1!function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/",t(t.s=45)}([function(e,t,n){"use strict";e.exports=n(52)},function(e,t,n){"use strict";var r=function(){};e.exports=r},function(e,t,n){e.exports=n(64)()},function(e,t,n){"use strict";var r=function(e,t,n,r,i,o,a,s){if(!e){var u;if(void 0===t)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,i,o,a,s],l=0;u=new Error(t.replace(/%s/g,function(){return c[l++]})),u.name="Invariant Violation"}throw u.framesToPop=1,u}};e.exports=r},function(e,t,n){var r=n(85);n(90),n(92),n(95),n(97),e.exports=r},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"===typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";var r=n(63);n.d(t,"a",function(){return r.a});var i=(n(67),n(32));n.d(t,"b",function(){return i.a});var o=(n(69),n(71),n(74),n(75),n(34));n.d(t,"c",function(){return o.a});var a=(n(20),n(80),n(81));n.d(t,"d",function(){return a.a});var s=(n(82),n(83));n.d(t,"e",function(){return s.a})},function(e,t,n){"use strict";t.__esModule=!0;var r=(t.addLeadingSlash=function(e){return"/"===e.charAt(0)?e:"/"+e},t.stripLeadingSlash=function(e){return"/"===e.charAt(0)?e.substr(1):e},t.hasBasename=function(e,t){return new RegExp("^"+t+"(\\/|\\?|#|$)","i").test(e)});t.stripBasename=function(e,t){return r(e,t)?e.substr(t.length):e},t.stripTrailingSlash=function(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e},t.parsePath=function(e){var t=e||"/",n="",r="",i=t.indexOf("#");-1!==i&&(r=t.substr(i),t=t.substr(0,i));var o=t.indexOf("?");return-1!==o&&(n=t.substr(o),t=t.substr(0,o)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}},t.createPath=function(e){var t=e.pathname,n=e.search,r=e.hash,i=t||"/";return n&&"?"!==n&&(i+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(i+="#"===r.charAt(0)?r:"#"+r),i}},function(e,t,n){"use strict";n.d(t,"a",function(){return r}),n.d(t,"f",function(){return i}),n.d(t,"c",function(){return o}),n.d(t,"e",function(){return a}),n.d(t,"g",function(){return s}),n.d(t,"d",function(){return u}),n.d(t,"b",function(){return c});var r=function(e){return"/"===e.charAt(0)?e:"/"+e},i=function(e){return"/"===e.charAt(0)?e.substr(1):e},o=function(e,t){return new RegExp("^"+t+"(\\/|\\?|#|$)","i").test(e)},a=function(e,t){return o(e,t)?e.substr(t.length):e},s=function(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e},u=function(e){var t=e||"/",n="",r="",i=t.indexOf("#");-1!==i&&(r=t.substr(i),t=t.substr(0,i));var o=t.indexOf("?");return-1!==o&&(n=t.substr(o),t=t.substr(0,o)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}},c=function(e){var t=e.pathname,n=e.search,r=e.hash,i=t||"/";return n&&"?"!==n&&(i+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(i+="#"===r.charAt(0)?r:"#"+r),i}},function(e,t,n){"use strict";n.d(t,"e",function(){return r}),n.d(t,"c",function(){return i}),n.d(t,"a",function(){return o}),n.d(t,"d",function(){return a}),n.d(t,"f",function(){return s}),n.d(t,"b",function(){return u});var r="/",i="/blog",o="/about",a="/community",s="/admin",u="/admin/blog"},function(e,t,n){"use strict";function r(){function e(e){f(d[e],"delete"),delete d[e]}function t(e){return e=e||s,a(d,e)||i("no-app",{name:e}),d[e]}function n(e,t){if(void 0===t&&(t={}),"object"!==typeof t||null===t){t={name:t}}var n=t;void 0===n.name&&(n.name=s);var r=n.name;"string"===typeof r&&r||i("bad-app-name",{name:r+""}),a(d,r)&&i("duplicate-app",{name:r});var o=new c(e,n,m);return d[r]=o,f(o,"create"),o}function u(){return Object.keys(d).map(function(e){return d[e]})}function l(e,n,r,a,s){y[e]&&i("duplicate-service",{name:e}
1),y[e]=n,a&&(v[e]=a,u().forEach(function(e){a("create",e)}));var l=function(n){return void 0===n&&(n=t()),"function"!==typeof n[e]&&i("invalid-app-argument",{name:e}),n[e]()};return void 0!==r&&Object(o.deepExtend)(l,r),m[e]=l,c.prototype[e]=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return this._getService.bind(this,e).apply(this,s?t:[])},l}function h(e){Object(o.deepExtend)(m,e)}function f(e,t){Object.keys(y).forEach(function(n){var r=p(e,n);null!==r&&v[r]&&v[r](t,e)})}function p(e,t){if("serverAuth"===t)return null;var n=t;e.options;return n}var d={},y={},v={},m={__esModule:!0,initializeApp:n,app:t,apps:null,Promise:Promise,SDK_VERSION:"4.13.0",INTERNAL:{registerService:l,createFirebaseNamespace:r,extendNamespace:h,createSubscribe:o.createSubscribe,ErrorFactory:o.ErrorFactory,removeApp:e,factories:y,useAsService:p,Promise:Promise,deepExtend:o.deepExtend}};return Object(o.patchProperty)(m,"default",m),Object.defineProperty(m,"apps",{get:u}),Object(o.patchProperty)(t,"App",c),m}function i(e,t){throw h.create(e,t)}Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"firebase",function(){return f});var o=n(23),a=(n.n(o),function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}),s="[DEFAULT]",u=[],c=function(){function e(e,t,n){this.firebase_=n,this.isDeleted_=!1,this.services_={},this.name_=t.name,this._automaticDataCollectionEnabled=t.automaticDataCollectionEnabled||!1,this.options_=Object(o.deepCopy)(e),this.INTERNAL={getUid:function(){return null},getToken:function(){return Promise.resolve(null)},addAuthTokenListener:function(e){u.push(e),setTimeout(function(){return e(null)},0)},removeAuthTokenListener:function(e){u=u.filter(function(t){return t!==e})}}}return Object.defineProperty(e.prototype,"automaticDataCollectionEnabled",{get:function(){return this.checkDestroyed_(),this._automaticDataCollectionEnabled},set:function(e){this.checkDestroyed_(),this._automaticDataCollectionEnabled=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this.checkDestroyed_(),this.name_},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){return this.checkDestroyed_(),this.options_},enumerable:!0,configurable:!0}),e.prototype.delete=function(){var e=this;return new Promise(function(t){e.checkDestroyed_(),t()}).then(function(){e.firebase_.INTERNAL.removeApp(e.name_);var t=[];return Object.keys(e.services_).forEach(function(n){Object.keys(e.services_[n]).forEach(function(r){t.push(e.services_[n][r])})}),Promise.all(t.map(function(e){return e.INTERNAL.delete()}))}).then(function(){e.isDeleted_=!0,e.services_={}})},e.prototype._getService=function(e,t){if(void 0===t&&(t=s),this.checkDestroyed_(),this.services_[e]||(this.services_[e]={}),!this.services_[e][t]){var n=t!==s?t:void 0,r=this.firebase_.INTERNAL.factories[e](this,this.extendApp.bind(this),n);this.services_[e][t]=r}return this.services_[e][t]},e.prototype.extendApp=function(e){var t=this;Object(o.deepExtend)(this,e),e.INTERNAL&&e.INTERNAL.addAuthTokenListener&&(u.forEach(function(e){t.INTERNAL.addAuthTokenListener(e)}),u=[])},e.prototype.checkDestroyed_=function(){this.isDeleted_&&i("app-deleted",{name:this.name_})},e}();c.prototype.name&&c.prototype.options||c.prototype.delete||console.log("dc");var l={"no-app":"No Firebase App '{$name}' has been created - call Firebase App.initializeApp()","bad-app-name":"Illegal App name: '{$name}","duplicate-app":"Firebase App named '{$name}' already exists","app-deleted":"Firebase App named '{$name}' already deleted","duplicate-service":"Firebase service named '{$name}' already registered","sa-not-supported":"Initializing the Firebase SDK with a service account is only allowed in a Node.js environment. On client devices, you should instead initialize the SDK with an api key and auth domain","invalid-app-argument":"firebase.{$name}() takes either no argument or a Firebase App instance."},h=new o.ErrorFactory("app","Firebase",l),f=r();t.default=f},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(1),s=n.n(a),u=n(3),c=n.n(u),l=n(0),h=n.n(l),f=n(2),p=n.n(f),d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},y=function(e){function t(){var n,o,a;r(this,t);for(var s=arguments.length,u=Array(s),c=0;c<s;c++)u[c]=arguments[c];return n=o=i(this,e.call.apply(e,[this].concat(u))),o.state={match:o.computeMatch(o.props.history.location.pathname)},a=n,i(o,a)}return o(t,e),t.prototype.getChildContext=function(){return{router:d({},this.context.router,{history:this.props.history,route:{location:this.props.history.location,match:this.state.match}})}},t.prototype.computeMatch=function(e){return{path:"/",url:"/",params:{},isExact:"/"===e}},t.prototype.componentWillMount=function(){var e=this,t=this.props,n=t.children,r=t.history;c()(null==n||1===h.a.Children.count(n),"A <Router> may have only one child element"),this.unlisten=r.listen(function(){e.setState({match:e.computeMatch(r.location.pathname)})})},t.prototype.componentWillReceiveProps=function(e){s()(this.props.history===e.history,"You cannot change <Router history>")},t.prototype.componentWillUnmount=function(){this.unlisten()},t.prototype.render=function(){var e=this.props.children;return e?h.a.Children.only(e):null},t}(h.a.Component);y.propTypes={history:p.a.object.isRequired,children:p.a.node},y.contextTypes={router:p.a.object},y.childContextTypes={router:p.a.object.isRequired},t.a=y},function(e,t,n){"use strict";var r=n(72),i=n.n(r),o={},a=0,s=function(e,t){var n=""+t.end+t.strict+t.sensitive,r=o[n]||(o[n]={});if(r[e])return r[e];
1var s=[],u=i()(e,s,t),c={re:u,keys:s};return a<1e4&&(r[e]=c,a++),c},u=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"string"===typeof t&&(t={path:t});var n=t,r=n.path,i=void 0===r?"/":r,o=n.exact,a=void 0!==o&&o,u=n.strict,c=void 0!==u&&u,l=n.sensitive,h=void 0!==l&&l,f=s(i,{end:a,strict:c,sensitive:h}),p=f.re,d=f.keys,y=p.exec(e);if(!y)return null;var v=y[0],m=y.slice(1),g=e===v;return a&&!g?null:{path:i,url:"/"===i&&""===v?"/":v,isExact:g,params:d.reduce(function(e,t,n){return e[t.name]=m[n],e},{})}};t.a=u},function(e,t,n){"use strict";n.d(t,"a",function(){return s}),n.d(t,"b",function(){return u});var r=n(29),i=n(30),o=n(8),a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s=function(e,t,n,i){var s=void 0;"string"===typeof e?(s=Object(o.d)(e),s.state=t):(s=a({},e),void 0===s.pathname&&(s.pathname=""),s.search?"?"!==s.search.charAt(0)&&(s.search="?"+s.search):s.search="",s.hash?"#"!==s.hash.charAt(0)&&(s.hash="#"+s.hash):s.hash="",void 0!==t&&void 0===s.state&&(s.state=t));try{s.pathname=decodeURI(s.pathname)}catch(e){throw e instanceof URIError?new URIError('Pathname "'+s.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):e}return n&&(s.key=n),i?s.pathname?"/"!==s.pathname.charAt(0)&&(s.pathname=Object(r.default)(s.pathname,i.pathname)):s.pathname=i.pathname:s.pathname||(s.pathname="/"),s},u=function(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&Object(i.default)(e.state,t.state)}},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=i.a.createContext({user:null});t.a=o},function(e,t,n){"use strict";function r(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var i=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;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(e){return!1}}()?Object.assign:function(e,t){for(var n,s,u=r(e),c=1;c<arguments.length;c++){n=Object(arguments[c]);for(var l in n)o.call(n,l)&&(u[l]=n[l]);if(i){s=i(n);for(var h=0;h<s.length;h++)a.call(n,s[h])&&(u[s[h]]=n[s[h]])}}return u}},function(e,t,n){"use strict";function r(e,t,n,r,o,a,s,u){if(i(t),!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,o,a,s,u],h=0;c=new Error(t.replace(/%s/g,function(){return l[h++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}}var i=function(e){};e.exports=r},function(e,t,n){"use strict";function r(e){return function(){return e}}var i=function(){};i.thatReturns=r,i.thatReturnsFalse=r(!1),i.thatReturnsTrue=r(!0),i.thatReturnsNull=r(null),i.thatReturnsThis=function(){return this},i.thatReturnsArgument=function(e){return e},e.exports=i},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.locationsAreEqual=t.createLocation=void 0;var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=n(29),a=r(o),s=n(30),u=r(s),c=n(7);t.createLocation=function(e,t,n,r){var o=void 0;"string"===typeof e?(o=(0,c.parsePath)(e),o.state=t):(o=i({},e),void 0===o.pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==t&&void 0===o.state&&(o.state=t));try{o.pathname=decodeURI(o.pathname)}catch(e){throw e instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invali
1d percent-encoding.'):e}return n&&(o.key=n),r?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=(0,a.default)(o.pathname,r.pathname)):o.pathname=r.pathname:o.pathname||(o.pathname="/"),o},t.locationsAreEqual=function(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&(0,u.default)(e.state,t.state)}},function(e,t,n){"use strict";t.__esModule=!0;var r=n(1),i=function(e){return e&&e.__esModule?e:{default:e}}(r),o=function(){var e=null,t=function(t){return(0,i.default)(null==e,"A history supports only one prompt at a time"),e=t,function(){e===t&&(e=null)}},n=function(t,n,r,o){if(null!=e){var a="function"===typeof e?e(t,n):e;"string"===typeof a?"function"===typeof r?r(a,o):((0,i.default)(!1,"A history needs a getUserConfirmation function in order to use a prompt message"),o(!0)):o(!1!==a)}else o(!0)},r=[];return{setPrompt:t,confirmTransitionTo:n,appendListener:function(e){var t=!0,n=function(){t&&e.apply(void 0,arguments)};return r.push(n),function(){t=!1,r=r.filter(function(e){return e!==n})}},notifyListeners:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];r.forEach(function(e){return e.apply(void 0,t)})}}};t.default=o},function(e,t,n){"use strict";var r=n(11);t.a=r.a},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(1),s=n.n(a),u=n(3),c=n.n(u),l=n(0),h=n.n(l),f=n(2),p=n.n(f),d=n(12),y=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},v=function(e){return 0===h.a.Children.count(e)},m=function(e){function t(){var n,o,a;r(this,t);for(var s=arguments.length,u=Array(s),c=0;c<s;c++)u[c]=arguments[c];return n=o=i(this,e.call.apply(e,[this].concat(u))),o.state={match:o.computeMatch(o.props,o.context.router)},a=n,i(o,a)}return o(t,e),t.prototype.getChildContext=function(){return{router:y({},this.context.router,{route:{location:this.props.location||this.context.router.route.location,match:this.state.match}})}},t.prototype.computeMatch=function(e,t){var n=e.computedMatch,r=e.location,i=e.path,o=e.strict,a=e.exact,s=e.sensitive;if(n)return n;c()(t,"You should not use <Route> or withRouter() outside a <Router>");var u=t.route,l=(r||u.location).pathname;return i?Object(d.a)(l,{path:i,strict:o,exact:a,sensitive:s}):u.match},t.prototype.componentWillMount=function(){s()(!(this.props.component&&this.props.render),"You should not use <Route component> and <Route render> in the same route; <Route render> will be ignored"),s()(!(this.props.component&&this.props.children&&!v(this.props.children)),"You should not use <Route component> and <Route children> in the same route; <Route children> will be ignored"),s()(!(this.props.render&&this.props.children&&!v(this.props.children)),"You should not use <Route render> and <Route children> in the same route; <Route children> will be ignored")},t.prototype.componentWillReceiveProps=function(e,t){s()(!(e.location&&!this.props.location),'<Route> elements should not change from uncontrolled to controlled (or vice versa). You initially used no "location" prop and then provided one on a subsequent render.'),s()(!(!e.location&&this.props.location),'<Route> elements should not change from controlled to uncontrolled (or vice versa). You provided a "location" prop initially but omitted it on a subsequent render.'),this.setState({match:this.computeMatch(e,t.router)})},t.prototype.render=function(){var e=this.state.match,t=this.props,n=t.children,r=t.component,i=t.render,o=this.context.router,a=o.history,s=o.route,u=o.staticContext,c=this.props.location||s.location,l={match:e,location:c,history:a,staticContext:u};return r?e?h.a.createElement(r,l):null:i?e?i(l):null:n?"function"===typeof n?n(l):v(n)?null:h.a.Children.only(n):null},t}(h.a.Component);m.propTypes={computedMatch:p.a.object,path:p.a.string,exact:p.a.bool,strict:p.a.bool,sensitive:p.a.bool,component:p.a.func,render:p.a.func,children:p.a.oneOfType([p.a.func,p.a.node]),location:p.a.object},m.contextTypes={router:p.a.shape({history:p.a.object.isRequired,route:p.a.object.isRequired,staticContext:p.a.object})},m.childContextTypes={router:p.a.object.isRequired},t.a=m},function(e,t,n){"use strict";var r=n(1),i=n.n(r),o=function(){var e=null,t=function(t){return i()(null==e,"A history supports only one prompt at a time"),e=t,function(){e===t&&(e=null)}},n=function(t,n,r,o){if(null!=e){var a="function"===typeof e?e(t,n):e;"string"===typeof a?"function"===typeof r?r(a,o):(i()(!1,"A history needs a getUserConfirmation function in order to use a prompt message"),o(!0)):o(!1!==a)}else o(!0)},r=[];return{setPrompt:t,confirmTransitionTo:n,appendListener:function(e){var t=!0,n=function(){t&&e.apply(void 0,arguments)};return r.push(n),function(){t=!1,r=r.filter(function(e){return e!==n})}},notifyListeners:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];r.forEach(function(e){return e.apply(void 0,t)})}}};t.a=o},function(e,t,n){"use strict";function r(e){return i(void 0,e)}function i(e,t){if(!(t instanceof Object))return t;switch(t.constructor){case Date:var n=t;return new Date(n.getTime());case Object:void 0===e&&(e={});break;case Array:e=[];break;default:return t}for(var r in t)t.hasOwnProperty(r)&&(e[r]=i(e[r],t[r]));return e}function o(e,t,n){e[t]=n}function a(e){var t=A;return A=e,t}function s(e){return JSON.parse(e)}function u(e){return JSON.stringify(e)}function c(e,t){var n=new ie(e,t);return n.subscribe.bind(n)}function l(e,t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];Promise.resolve(!0).then(function(){e.apply(void 0,n)}).catch(function(e){t&&t(e)})}}function h(e,t){if("object"!==typeof e||null===e)return!1;for(var n=0,r=t;n<r.length;n++){var i=r[n];if(i in e&&"function"===typeof e[i])return!0}return!1}function f(){}function p(e,t,n){var r="";switch(t){case 1:r=n?"first":"First";break;case 2:r=n?"second":"Second";break;case 3:r=n?"third":"Third";break;case 4:r=n?"fourth":"Fourth";break;default:throw new Error("errorPrefix called with argumentNumber > 4. Need to update it?")}var i=e+" failed: ";return i+=r+" argument "}function d(e,t,n,r){if((!r||n)&&"string"!==typeof n)throw new Error(p(e,t,r)+"must be a valid firebase namespace.")}function y(e,t,n,r){if((!r||n)&&"function"!==typeof n)throw new Error(p(e,t,r)+"must be a valid function.")}function v(e,t,n,r){if((!r||n)&&("object"!==typeof n||null===n))throw new Error(p(e,t,r)+"must be a valid context object.")}
1Object.defineProperty(t,"__esModule",{value:!0});var m=n(24),g={NODE_CLIENT:!1,NODE_ADMIN:!1,SDK_VERSION:"${JSCORE_VERSION}"},_=function(e,t){if(!e)throw b(t)},b=function(e){return new Error("Firebase Database ("+g.SDK_VERSION+") INTERNAL ASSERT FAILED: "+e)},w=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},E=function(e){for(var t=[],n=0,r=0;n<e.length;){var i=e[n++];if(i<128)t[r++]=String.fromCharCode(i);else if(i>191&&i<224){var o=e[n++];t[r++]=String.fromCharCode((31&i)<<6|63&o)}else if(i>239&&i<365){var o=e[n++],a=e[n++],s=e[n++],u=((7&i)<<18|(63&o)<<12|(63&a)<<6|63&s)-65536;t[r++]=String.fromCharCode(55296+(u>>10)),t[r++]=String.fromCharCode(56320+(1023&u))}else{var o=e[n++],a=e[n++];t[r++]=String.fromCharCode((15&i)<<12|(63&o)<<6|63&a)}}return t.join("")},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 o=e[i],a=i+1<e.length,s=a?e[i+1]:0,u=i+2<e.length,c=u?e[i+2]:0,l=o>>2,h=(3&o)<<4|s>>4,f=(15&s)<<2|c>>6,p=63&c;u||(p=64,a||(f=64)),r.push(n[l],n[h],n[f],n[p])}return r.join("")},encodeString:function(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(w(e),t)},decodeString:function(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):E(this.decodeStringToByteArray(e,t))},decodeStringToByteArray:function(e,t){this.init_();for(var n=t?this.charToByteMapWebSafe_:this.charToByteMap_,r=[],i=0;i<e.length;){var o=n[e.charAt(i++)],a=i<e.length,s=a?n[e.charAt(i)]:0;++i;var u=i<e.length,c=u?n[e.charAt(i)]:64;++i;var l=i<e.length,h=l?n[e.charAt(i)]:64;if(++i,null==o||null==s||null==c||null==h)throw Error();var f=o<<2|s>>4;if(r.push(f),64!=c){var p=s<<4&240|c>>2;if(r.push(p),64!=h){var d=c<<6&192|h;r.push(d)}}}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)}}},T=function(e){var t=w(e);return C.encodeByteArray(t,!0)},S=function(e){try{return C.decodeString(e,!0)}catch(e){console.error("base64Decode failed: ",e)}return null},I=function(){function e(){var e=this;this.promise=new Promise(function(t,n){e.resolve=t,e.reject=n})}return e.prototype.wrapCallback=function(e){var t=this;return function(n,r){n?t.reject(n):t.resolve(r),"function"===typeof e&&(t.promise.catch(function(){}),1===e.length?e(n):e(n,r))}},e}(),k=function(){return"undefined"!==typeof navigator&&"string"===typeof navigator.userAgent?navigator.userAgent:""},O=function(){return"undefined"!==typeof window&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(k())},N=function(){return"object"===typeof navigator&&"ReactNative"===navigator.product},P=function(){return!0===g.NODE_CLIENT||!0===g.NODE_ADMIN},R="FirebaseError",A=Error.captureStackTrace,x=function(){function e(e,t){if(this.code=e,this.message=t,A)A(this,D.prototype.create);else{var n=Error.apply(this,arguments);this.name=R,Object.defineProperty(this,"stack",{get:function(){return n.stack}})}}return e}();x.prototype=Object.create(Error.prototype),x.prototype.constructor=x,x.prototype.name=R;var D=function(){function e(e,t,n){this.service=e,this.serviceName=t,this.errors=n,this.pattern=/\{\$([^}]+)}/g}return e.prototype.create=function(e,t){void 0===t&&(t={});var n,r=this.errors[e],i=this.service+"/"+e;n=void 0===r?"Error":r.replace(this.pattern,function(e,n){var r=t[n];return void 0!==r?r.toString():"<"+n+"?>"}),n=this.serviceName+": "+n+" ("+i+").";var o=new x(i,n);for(var a in t)t.hasOwnProperty(a)&&"_"!==a.slice(-1)&&(o[a]=t[a]);return o},e}(),L=function(e){var t={},n={},r={},i="";try{var o=e.split(".");t=s(S(o[0])||""),n=s(S(o[1])||""),i=o[2],r=n.d||{},delete n.d}catch(e){}return{header:t,claims:n,data:r,signature:i}},U=function(e){var t,n,r=L(e).claims,i=Math.floor((new Date).getTime()/1e3);return"object"===typeof r&&(r.hasOwnProperty("nbf")?t=r.nbf:r.hasOwnProperty("iat")&&(t=r.iat),n=r.hasOwnProperty("exp")?r.exp:t+86400),i&&t&&n&&i>=t&&i<=n},M=function(e){var t=L(e).claims;return"object"===typeof t&&t.hasOwnProperty("iat")?t.iat:null},F=function(e){var t=L(e),n=t.claims;return!!t.signature&&!!n&&"object"===typeof n&&n.hasOwnProperty("iat")},j=function(e){var t=L(e).claims;return"object"===typeof t&&!0===t.admin},B=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},W=function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]},V=function(e,t){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t(n,e[n])},H=function(e,t){return V(t,function(t,n){e[t]=n}),e},q=function(e){return H({},e)},K=function(e){return"object"===typeof e&&null!==e},z=function(e){for(var t in e)return!1;return!0},G=function(e){var t=0;for(var n in e)t++;return t},Q=function(e,t,n){var r={};for(var i in e)r[i]=t.call(n,e[i],i,e);return r},Y=function(e,t,n){for(var r in e)if(t.call(n,e[r],r,e))return r},X=function(e,t,n){var r=Y(e,t,n);return r&&e[r]},$=function(e){for(var t in e)return t},J=function(e){var t=[],n=0;for(var r in e)t[n++]=e[r];return t},Z=function(e,t){for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&!t(n,e[n]))return!1;return!0},ee=function(e){var t=[];
1return V(e,function(e,n){Array.isArray(n)?n.forEach(function(n){t.push(encodeURIComponent(e)+"="+encodeURIComponent(n))}):t.push(encodeURIComponent(e)+"="+encodeURIComponent(n))}),t.length?"&"+t.join("&"):""},te=function(e){var t={};return e.replace(/^\?/,"").split("&").forEach(function(e){if(e){var n=e.split("=");t[n[0]]=n[1]}}),t},ne=function(){function e(){this.blockSize=-1}return e}(),re=function(e){function t(){var t=e.call(this)||this;t.chain_=[],t.buf_=[],t.W_=[],t.pad_=[],t.inbuf_=0,t.total_=0,t.blockSize=64,t.pad_[0]=128;for(var n=1;n<t.blockSize;++n)t.pad_[n]=0;return t.reset(),t}return m.__extends(t,e),t.prototype.reset=function(){this.chain_[0]=1732584193,this.chain_[1]=4023233417,this.chain_[2]=2562383102,this.chain_[3]=271733878,this.chain_[4]=3285377520,this.inbuf_=0,this.total_=0},t.prototype.compress_=function(e,t){t||(t=0);var n=this.W_;if("string"===typeof e)for(var r=0;r<16;r++)n[r]=e.charCodeAt(t)<<24|e.charCodeAt(t+1)<<16|e.charCodeAt(t+2)<<8|e.charCodeAt(t+3),t+=4;else for(var r=0;r<16;r++)n[r]=e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3],t+=4;for(var r=16;r<80;r++){var i=n[r-3]^n[r-8]^n[r-14]^n[r-16];n[r]=4294967295&(i<<1|i>>>31)}for(var o,a,s=this.chain_[0],u=this.chain_[1],c=this.chain_[2],l=this.chain_[3],h=this.chain_[4],r=0;r<80;r++){r<40?r<20?(o=l^u&(c^l),a=1518500249):(o=u^c^l,a=1859775393):r<60?(o=u&c|l&(u|c),a=2400959708):(o=u^c^l,a=3395469782);var i=(s<<5|s>>>27)+o+h+a+n[r]&4294967295;h=l,l=c,c=4294967295&(u<<30|u>>>2),u=s,s=i}this.chain_[0]=this.chain_[0]+s&4294967295,this.chain_[1]=this.chain_[1]+u&4294967295,this.chain_[2]=this.chain_[2]+c&4294967295,this.chain_[3]=this.chain_[3]+l&4294967295,this.chain_[4]=this.chain_[4]+h&4294967295},t.prototype.update=function(e,t){if(null!=e){void 0===t&&(t=e.length);for(var n=t-this.blockSize,r=0,i=this.buf_,o=this.inbuf_;r<t;){if(0==o)for(;r<=n;)this.compress_(e,r),r+=this.blockSize;if("string"===typeof e){for(;r<t;)if(i[o]=e.charCodeAt(r),++o,++r,o==this.blockSize){this.compress_(i),o=0;break}}else for(;r<t;)if(i[o]=e[r],++o,++r,o==this.blockSize){this.compress_(i),o=0;break}}this.inbuf_=o,this.total_+=t}},t.prototype.digest=function(){var e=[],t=8*this.total_;this.inbuf_<56?this.update(this.pad_,56-this.inbuf_):this.update(this.pad_,this.blockSize-(this.inbuf_-56));for(var n=this.blockSize-1;n>=56;n--)this.buf_[n]=255&t,t/=256;this.compress_(this.buf_);for(var r=0,n=0;n<5;n++)for(var i=24;i>=0;i-=8)e[r]=this.chain_[n]>>i&255,++r;return e},t}(ne),ie=function(){function e(e,t){var n=this;this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=t,this.task.then(function(){e(n)}).catch(function(e){n.error(e)})}return e.prototype.next=function(e){this.forEachObserver(function(t){t.next(e)})},e.prototype.error=function(e){this.forEachObserver(function(t){t.error(e)}),this.close(e)},e.prototype.complete=function(){this.forEachObserver(function(e){e.complete()}),this.close()},e.prototype.subscribe=function(e,t,n){var r,i=this;if(void 0===e&&void 0===t&&void 0===n)throw new Error("Missing Observer.");r=h(e,["next","error","complete"])?e:{next:e,error:t,complete:n},void 0===r.next&&(r.next=f),void 0===r.error&&(r.error=f),void 0===r.complete&&(r.complete=f);var o=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(function(){try{i.finalError?r.error(i.finalError):r.complete()}catch(e){}}),this.observers.push(r),o},e.prototype.unsubscribeOne=function(e){void 0!==this.observers&&void 0!==this.observers[e]&&(delete this.observers[e],this.observerCount-=1,0===this.observerCount&&void 0!==this.onNoObservers&&this.onNoObservers(this))},e.prototype.forEachObserver=function(e){if(!this.finalized)for(var t=0;t<this.observers.length;t++)this.sendOne(t,e)},e.prototype.sendOne=function(e,t){var n=this;this.task.then(function(){if(void 0!==n.observers&&void 0!==n.observers[e])try{t(n.observers[e])}catch(e){"undefined"!==typeof console&&console.error&&console.error(e)}})},e.prototype.close=function(e){var t=this;this.finalized||(this.finalized=!0,void 0!==e&&(this.finalError=e),this.task.then(function(){t.observers=void 0,t.onNoObservers=void 0}))},e}(),oe=function(e,t,n,r){var i;if(r<t?i="at least "+t:r>n&&(i=0===n?"none":"no more than "+n),i){var o=e+" failed: Was called with "+r+(1===r?" argument.":" arguments.")+" Expects "+i+".";throw new Error(o)}},ae=function(e){for(var t=[],n=0,r=0;r<e.length;r++){var i=e.charCodeAt(r);if(i>=55296&&i<=56319){var o=i-55296;r++,_(r<e.length,"Surrogate pair missing trail surrogate.");i=65536+(o<<10)+(e.charCodeAt(r)-56320)}i<128?t[n++]=i:i<2048?(t[n++]=i>>6|192,t[n++]=63&i|128):i<65536?(t[n++]=i>>12|224,t[n++]=i>>6&63|128,t[n++]=63&i|128):(t[n++]=i>>18|240,t[n++]=i>>12&63|128,t[n++]=i>>6&63|128,t[n++]=63&i|128)}return t},se=function(e){for(var t=0,n=0;n<e.length;n++){var r=e.charCodeAt(n);r<128?t++:r<2048?t+=2:r>=55296&&r<=56319?(t+=4,n++):t+=3}return t};t.assert=_,t.assertionError=b,t.base64=C,t.base64Decode=S,t.base64Encode=T,t.CONSTANTS=g,t.deepCopy=r,t.deepExtend=i,t.patchProperty=o,t.Deferred=I,t.getUA=k,t.isMobileCordova=O,t.isNodeSdk=P,t.isReactNative=N,t.ErrorFactory=D,t.FirebaseError=x,t.patchCapture=a,t.jsonEval=s,t.stringify=u,t.decode=L,t.isAdmin=j,t.issuedAtTime=M,t.isValidFormat=F,t.isValidTimestamp=U,t.clone=q,t.contains=B,t.every=Z,t.extend=H,t.findKey=Y,t.findValue=X,t.forEach=V,t.getAnyKey=$,t.getCount=G,t.getValues=J,t.isEmpty=z,t.isNonNullObject=K,t.map=Q,t.safeGet=W,t.querystring=ee,t.querystringDecode=te,t.Sha1=re,t.async=l,t.createSubscribe=c,t.errorPrefix=p,t.validateArgCount=oe,t.validateCallback=y,t.validateContextObject=v,t.validateNamespace=d,t.stringLength=se,t.stringToByteArray=ae},function(e,t,n){"use strict";function r(e,t){function n(){this.constructor=e}w(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function i(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&(n[r[i]]=e[r[i]]);return n}function o(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a}function a(e,t){return function(n,r){t(n,r,e)}}function s(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)}
1function u(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){e.done?i(e.value):new n(function(t){t(e.value)}).then(a,s)}u((r=r.apply(e,t||[])).next())})}function c(e,t){function n(e){return function(t){return r([e,t])}}function r(n){if(i)throw new TypeError("Generator is already executing.");for(;u;)try{if(i=1,o&&(a=o[2&n[0]?"return":n[0]?"throw":"next"])&&!(a=a.call(o,n[1])).done)return a;switch(o=0,a&&(n=[0,a.value]),n[0]){case 0:case 1:a=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,o=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(a=u.trys,!(a=a.length>0&&a[a.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]<a[3])){u.label=n[1];break}if(6===n[0]&&u.label<a[1]){u.label=a[1],a=n;break}if(a&&u.label<a[2]){u.label=a[2],u.ops.push(n);break}a[2]&&u.ops.pop(),u.trys.pop();continue}n=t.call(e,u)}catch(e){n=[6,e],o=0}finally{i=a=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var i,o,a,s,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:n(0),throw:n(1),return:n(2)},"function"===typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s}function l(e,t){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}function h(e){var t="function"===typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}function f(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function p(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(f(arguments[t]));return e}function d(e){return this instanceof d?(this.v=e,this):new d(e)}function y(e,t,n){function r(e){l[e]&&(c[e]=function(t){return new Promise(function(n,r){h.push([e,t,n,r])>1||i(e,t)})})}function i(e,t){try{o(l[e](t))}catch(e){u(h[0][3],e)}}function o(e){e.value instanceof d?Promise.resolve(e.value.v).then(a,s):u(h[0][2],e)}function a(e){i("next",e)}function s(e){i("throw",e)}function u(e,t){e(t),h.shift(),h.length&&i(h[0][0],h[0][1])}if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var c,l=n.apply(e,t||[]),h=[];return c={},r("next"),r("throw"),r("return"),c[Symbol.asyncIterator]=function(){return this},c}function v(e){function t(t,i){e[t]&&(n[t]=function(n){return(r=!r)?{value:d(e[t](n)),done:"return"===t}:i?i(n):n})}var n,r;return n={},t("next"),t("throw",function(e){throw e}),t("return"),n[Symbol.iterator]=function(){return this},n}function m(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator];return t?t.call(e):"function"===typeof h?h(e):e[Symbol.iterator]()}function g(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function _(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function b(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.__extends=r,n.d(t,"__assign",function(){return E}),t.__rest=i,t.__decorate=o,t.__param=a,t.__metadata=s,t.__awaiter=u,t.__generator=c,t.__exportStar=l,t.__values=h,t.__read=f,t.__spread=p,t.__await=d,t.__asyncGenerator=y,t.__asyncDelegator=v,t.__asyncValues=m,t.__makeTemplateOb
1ject=g,t.__importStar=_,t.__importDefault=b;var w=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},E=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e}},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(100),a=function(e){return i.a.createElement("div",null,i.a.createElement(o.a,null),i.a.createElement("hr",null),e.children)};t.a=a},function(e,t,n){"use strict";n.d(t,"a",function(){return r}),n.d(t,"b",function(){return i});var r={IMAGE:"media_image",VIDEO:"media_video",SOUNDCLOUD:"media_soundcloud"},i={ADD:"post_add",EDIT:"post_edit",UPLOADING:"post_uploading"}},function(e,t,n){"use strict";function r(){}function i(e){try{return e.then}catch(e){return m=e,g}}function o(e,t){try{return e(t)}catch(e){return m=e,g}}function a(e,t,n){try{e(t,n)}catch(e){return m=e,g}}function s(e){if("object"!==typeof this)throw new TypeError("Promises must be constructed via new");if("function"!==typeof e)throw new TypeError("Promise constructor's argument is not a function");this._75=0,this._83=0,this._18=null,this._38=null,e!==r&&y(e,this)}function u(e,t,n){return new e.constructor(function(i,o){var a=new s(r);a.then(i,o),c(e,new d(t,n,a))})}function c(e,t){for(;3===e._83;)e=e._18;if(s._47&&s._47(e),0===e._83)return 0===e._75?(e._75=1,void(e._38=t)):1===e._75?(e._75=2,void(e._38=[e._38,t])):void e._38.push(t);l(e,t)}function l(e,t){v(function(){var n=1===e._83?t.onFulfilled:t.onRejected;if(null===n)return void(1===e._83?h(t.promise,e._18):f(t.promise,e._18));var r=o(n,e._18);r===g?f(t.promise,m):h(t.promise,r)})}function h(e,t){if(t===e)return f(e,new TypeError("A promise cannot be resolved with itself."));if(t&&("object"===typeof t||"function"===typeof t)){var n=i(t);if(n===g)return f(e,m);if(n===e.then&&t instanceof s)return e._83=3,e._18=t,void p(e);if("function"===typeof n)return void y(n.bind(t),e)}e._83=1,e._18=t,p(e)}function f(e,t){e._83=2,e._18=t,s._71&&s._71(e,t),p(e)}function p(e){if(1===e._75&&(c(e,e._38),e._38=null),2===e._75){for(var t=0;t<e._38.length;t++)c(e,e._38[t]);e._38=null}}function d(e,t,n){this.onFulfilled="function"===typeof e?e:null,this.onRejected="function"===typeof t?t:null,this.promise=n}function y(e,t){var n=!1,r=a(e,function(e){n||(n=!0,h(t,e))},function(e){n||(n=!0,f(t,e))});n||r!==g||(n=!0,f(t,m))}var v=n(48),m=null,g={};e.exports=s,s._47=null,s._71=null,s._44=r,s.prototype.then=function(e,t){if(this.constructor!==s)return u(this,e,t);var n=new s(r);return c(this,new d(e,t,n)),n}},function(e,t,n){"use strict";var r={};e.exports=r},function(e,t,n){"use strict";function r(e){return"/"===e.charAt(0)}function i(e,t){for(var n=t,r=n+1,i=e.length;r<i;n+=1,r+=1)e[n]=e[r];e.pop()}function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e&&e.split("/")||[],o=t&&t.split("/")||[],a=e&&r(e),s=t&&r(t),u=a||s;if(e&&r(e)?o=n:n.length&&(o.pop(),o=o.concat(n)),!o.length)return"/";var c=void 0;if(o.length){var l=o[o.length-1];c="."===l||".."===l||""===l}else c=!1;for(var h=0,f=o.length;f>=0;f--){var p=o[f];"."===p?i(o,f):".."===p?(i(o,f),h++):h&&(i(o,f),h--)}if(!u)for(;h--;h)o.unshift("..");!u||""===o[0]||o[0]&&r(o[0])||o.unshift("");var d=o.join("/");return c&&"/"!==d.substr(-1)&&(d+="/"),d}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o},function(e,t,n){"use strict";function r(e,t){if(e===t)return!0;if(null==e||null==t)return!1;if(Array.isArray(e))return Array.isArray(t)&&e.length===t.length&&e.every(function(e,n){return r(e,t[n])});var n="undefined"===typeof e?"undefined":i(e);if(n!==("undefined"===typeof t?"undefined":i(t)))return!1;if("object"===n){var o=e.valueOf(),a=t.valueOf();if(o!==e||a!==t)return r(o,a);var s=Object.keys(e),u=Object.keys(t);return s.length===u.length&&s.every(function(n){return r(e[n],t[n])})}return!1}Object.defineProperty(t,"__esModule",{value:!0});var i="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};t.default=r},function(e,t,n){"use strict";t.__esModule=!0;t.canUseDOM=!("undefined"===typeof window||!window.document||!window.document.createElement),t.addEventListener=function(e,t,n){return e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent("on"+t,n)},t.removeEventListener=function(e,t,n){return e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent("on"+t,n)},t.getConfirmation=function(e,t){return t(window.confirm(e))},t.supportsHistory=function(){var e=window.navigator.userAgent;return(-1===e.indexOf("Android 2.")&&-1===e.indexOf("Android 4.0")||-1===e.indexOf("Mobile Safari")||-1!==e.indexOf("Chrome")||-1!==e.indexOf("Windows Phone"))&&(window.history&&"pushState"in window.history)},t.supportsPopStateOnHashChange=function(){return-1===window.navigator.userAgent.indexOf("Trident")},t.supportsGoWithoutReloadUsingHash=function(){return-1===window.navigator.userAgent.indexOf("Firefox")},t.isExtraneousPopstateEvent=function(e){return void 0===e.state&&-1===navigator.userAgent.indexOf("CriOS")}},function(e,t,n){"use strict";function r(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function a(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=n(0),u=n.n(s),c=n(2),l=n.n(c),h=n(3),f=n.n(h),p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},d=function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)},y=function(e){function t(){var n,r,a;i(this,t);for(var s=arguments.length,u=Array(s),c=0;c<s;c++)u[c]=arguments[c];return n=r=o(this,e.call.apply(e,[this].concat(u))),r.handleClick=function(e){if(r.props.onClick&&r.props.onClick(e),!e.defaultPrevented&&0===e.button&&!r.props.target&&!d(e)){e.preventDefault();var t=r.context.router.history,n=r.props,i=n.replace,o=n.to;i?t.replace(o):t.push(o)}},a=n,o(r,a)}return a(t,e),t.prototype.render=function(){var e=this.props,t=(e.replace,e.to),n=e.innerRef,i=r(e,["replace","to","innerRef"]);f()(this.context.router,"You should not use <Link> outside a <Router>");var o=this.context.router.history.createHref("string"===typeof t?{pathname:t}:t);return u.a.createElement("a",p({},i,{onClick:this.handleClick,href:o,ref:n}))},t}(u.a.Component);y.propTypes={onClick:l.a.func,target:l.a.string,replace:l.a.bool,to:l.a.oneOfType([l.a.string,l.a.object]).isRequired,innerRef:l.a.oneOfType([l.a.string,l.a.func])},y.defaultProps={replace:!1},y.contextTypes={router:l.a.shape({history:l.a.shape({push:l.a.func.isRequired,replace:l.a.func.isRequired,createHref:l.a.func.isRequired}).isRequired}).isRequired},t.a=y},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(1),s=n.n(a),u=n(0),c=n.n(u),l=n(2),h=n.n(l),f=n(70),p=n.n(f),d=n(11),y=function(e){function t(){var n,o,a;r(this,t);for(var s=arguments.length,u=Array(s),c=0;c<s;c++)u[c]=arguments[c];return n=o=i(this,e.call.apply(e,[this].concat(u))),o.history=p()(o.props),a=n,i(o,a)}return o(t,e),t.prototype.componentWillMount=function(){s()(!this.props.history,"<MemoryRouter> ignores the history prop. To use a custom history, use `import { Router }` instead of `import { MemoryRouter as Router }`.")},t.prototype.render=function(){return c.a.createElement(d.a,{history:this.history,children:this.props.children})},t}(c.a.Component);y.propTypes={initialEntries:h.a.array,initialIndex:h.a.number,getUserConfirmation:h.a.func,keyLength:h.a.number,children:h.a.node},t.a=y},function(e,t,n){"use strict";var r=n(21);t.a=r.a},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(0),s=n.n(a),u=n(2),c=n.n(u),l=n(3),h=n.n(l),f=function(e){function t(){return r(this,t),i(this,e.apply(this,arguments))}return o(t,e),t.prototype.enable=function(e){this.unblock&&this.unblock(),this.unblock=this.context.router.history.block(e)},t.prototype.disable=function(){this.unblock&&(this.unblock(),this.unblock=null)},t.prototype.componentWillMount=function(){h()(this.context.router,"You should not use <Prompt> outside a <Router>"),this.props.when&&this.enable(this.props.message)},t.prototype.componentWillReceiveProps=function(e){e.when?this.props.when&&this.props.message===e.message||this.enable(e.message):this.disable()},t.prototype.componentWillUnmount=function(){this.disable()},t.prototype.render=function(){return null},t}(s.a.Component);f.propTypes={when:c.a.bool,message:c.a.oneOfType([c.a.func,c.a.string]).isRequired},f.defaultProps={when:!0},f.contextTypes={router:c.a.shape({history:c.a.shape({block:c.a.func.isRequired}).isRequired}).isRequired},t.a=f},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(0),s=n.n(a),u=n(2),c=n.n(u),l=n(1),h=n.n(l),f=n(3),p=n.n(f),d=n(76),y=function(e){function t(){return r(this,t),i(this,e.apply(this,arguments))}return o(t,e),t.prototype.isStatic=function(){return this.context.router&&this.context.router.staticContext},t.prototype.componentWillMount=function(){p()(this.context.router,"You should not use <Redirect> outside a <Router>"),this.isStatic()&&this.perform()},t.prototype.componentDidMount=function(){this.isStatic()||this.perform()},t.prototype.componentDidUpdate=function(e){var t=Object(d.a)(e.to),n=Object(d.a)(this.props.to);if(Object(d.b)(t,n))return void h()(!1,"You tried to redirect to the same route you're currently on: \""+n.pathname+n.search+'"');this.perform()},t.prototype.perform=function(){var e=this.context.router.history,t=this.props,n=t.push,r=t.to;
1n?e.push(r):e.replace(r)},t.prototype.render=function(){return null},t}(s.a.Component);y.propTypes={push:c.a.bool,from:c.a.string,to:c.a.oneOfType([c.a.string,c.a.object]).isRequired},y.defaultProps={push:!1},y.contextTypes={router:c.a.shape({history:c.a.shape({push:c.a.func.isRequired,replace:c.a.func.isRequired}).isRequired,staticContext:c.a.object}).isRequired},t.a=y},function(e,t,n){"use strict";n.d(t,"b",function(){return r}),n.d(t,"a",function(){return i}),n.d(t,"e",function(){return o}),n.d(t,"c",function(){return a}),n.d(t,"g",function(){return s}),n.d(t,"h",function(){return u}),n.d(t,"f",function(){return c}),n.d(t,"d",function(){return l});var r=!("undefined"===typeof window||!window.document||!window.document.createElement),i=function(e,t,n){return e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent("on"+t,n)},o=function(e,t,n){return e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent("on"+t,n)},a=function(e,t){return t(window.confirm(e))},s=function(){var e=window.navigator.userAgent;return(-1===e.indexOf("Android 2.")&&-1===e.indexOf("Android 4.0")||-1===e.indexOf("Mobile Safari")||-1!==e.indexOf("Chrome")||-1!==e.indexOf("Windows Phone"))&&(window.history&&"pushState"in window.history)},u=function(){return-1===window.navigator.userAgent.indexOf("Trident")},c=function(){return-1===window.navigator.userAgent.indexOf("Firefox")},l=function(e){return void 0===e.state&&-1===navigator.userAgent.indexOf("CriOS")}},function(e,t,n){"use strict";function r(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function a(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=n(1),u=n.n(s),c=n(3),l=n.n(c),h=n(0),f=n.n(h),p=n(2),d=n.n(p),y=n(7),v=(n.n(y),n(11)),m=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},g=function(e){var t=e.pathname,n=void 0===t?"/":t,r=e.search,i=void 0===r?"":r,o=e.hash,a=void 0===o?"":o;return{pathname:n,search:"?"===i?"":i,hash:"#"===a?"":a}},_=function(e,t){return e?m({},t,{pathname:Object(y.addLeadingSlash)(e)+t.pathname}):t},b=function(e,t){if(!e)return t;var n=Object(y.addLeadingSlash)(e);return 0!==t.pathname.indexOf(n)?t:m({},t,{pathname:t.pathname.substr(n.length)})},w=function(e){return"string"===typeof e?Object(y.parsePath)(e):g(e)},E=function(e){return"string"===typeof e?e:Object(y.createPath)(e)},C=function(e){return function(){l()(!1,"You cannot %s with <StaticRouter>",e)}},T=function(){},S=function(e){function t(){var n,r,a;i(this,t);for(var s=arguments.length,u=Array(s),c=0;c<s;c++)u[c]=arguments[c];return n=r=o(this,e.call.apply(e,[this].concat(u))),r.createHref=function(e){return Object(y.addLeadingSlash)(r.props.basename+E(e))},r.handlePush=function(e){var t=r.props,n=t.basename,i=t.context;i.action="PUSH",i.location=_(n,w(e)),i.url=E(i.location)},r.handleReplace=function(e){var t=r.props,n=t.basename,i=t.context;i.action="REPLACE",i.location=_(n,w(e)),i.url=E(i.location)},r.handleListen=function(){return T},r.handleBlock=function(){return T},a=n,o(r,a)}return a(t,e),t.prototype.getChildContext=function(){return{router:{staticContext:this.props.context}}},t.prototype.componentWillMount=function(){u()(!this.props.history,"<StaticRouter> ignores the history prop. To use a custom history, use `import { Router }` instead of `import { StaticRouter as Router }`.")},t.prototype.render=function(){var e=this.props,t=e.basename,n=(e.context,e.location),i=r(e,["basename","context","location"]),o={createHref:this.createHref,action:"POP",location:b(t,w(n)),push:this.handlePush,replace:this.handleReplace,go:C("go"),goBack:C("goBack"),goForward:C("goForward"),listen:this.handleListen,block:this.handleBlock};return f.a.createElement(v.a,m({},i,{history:o}))},t}(f.a.Component);S.propTypes={basename:d.a.string,context:d.a.object.isRequired,location:d.a.oneOfType([d.a.string,d.a.object])},S.defaultProps={basename:"",location:"/"},S.childContextTypes={router:d.a.object.isRequired},t.a=S},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(0),s=n.n(a),u=n(2),c=n.n(u),l=n(1),h=n.n(l),f=n(3),p=n.n(f),d=n(12),y=function(e){function t(){return r(this,t),i(this,e.apply(this,arguments))}return o(t,e),t.prototype.componentWillMount=function(){p()(this.context.router,"You should not use <Switch> outside a <Router>")},t.prototype.componentWillReceiveProps=function(e){h()(!(e.location&&!this.props.location),'<Switch> elements should not change from uncontrolled to controlled (or vice versa). You initially used no "location" prop and then provided one on a subsequent render.'),h()(!(!e.location&&this.props.location),'<Switch> elements should not change from controlled to uncontrolled (or vice versa). You provided a "location" prop initially but omitted it on a subsequent render.')},t.prototype.render=function(){var e=this.context.router.route,t=this.props.children,n=this.props.location||e.location,r=void 0,i=void 0;
1return s.a.Children.forEach(t,function(t){if(s.a.isValidElement(t)){var o=t.props,a=o.path,u=o.exact,c=o.strict,l=o.sensitive,h=o.from,f=a||h;null==r&&(i=t,r=f?Object(d.a)(n.pathname,{path:f,exact:u,strict:c,sensitive:l}):e.match)}}),r?s.a.cloneElement(i,{location:n,computedMatch:r}):null},t}(s.a.Component);y.contextTypes={router:c.a.shape({route:c.a.object.isRequired}).isRequired},y.propTypes={children:c.a.node,location:c.a.object},t.a=y},function(e,t,n){"use strict";function r(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}var i=n(0),o=n.n(i),a=n(2),s=n.n(a),u=n(84),c=n.n(u),l=n(21),h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},f=function(e){var t=function(t){var n=t.wrappedComponentRef,i=r(t,["wrappedComponentRef"]);return o.a.createElement(l.a,{render:function(t){return o.a.createElement(e,h({},i,t,{ref:n}))}})};return t.displayName="withRouter("+(e.displayName||e.name)+")",t.WrappedComponent=e,t.propTypes={wrappedComponentRef:s.a.func},c()(t,e)};t.a=f},function(e,t){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function i(e){if(l===setTimeout)return setTimeout(e,0);if((l===n||!l)&&setTimeout)return l=setTimeout,setTimeout(e,0);try{return l(e,0)}catch(t){try{return l.call(null,e,0)}catch(t){return l.call(this,e,0)}}}function o(e){if(h===clearTimeout)return clearTimeout(e);if((h===r||!h)&&clearTimeout)return h=clearTimeout,clearTimeout(e);try{return h(e)}catch(t){try{return h.call(null,e)}catch(t){return h.call(this,e)}}}function a(){y&&p&&(y=!1,p.length?d=p.concat(d):v=-1,d.length&&s())}function s(){if(!y){var e=i(a);y=!0;for(var t=d.length;t;){for(p=d,d=[];++v<t;)p&&p[v].run();v=-1,t=d.length}p=null,y=!1,o(e)}}function u(e,t){this.fun=e,this.array=t}function c(){}var l,h,f=e.exports={};!function(){try{l="function"===typeof setTimeout?setTimeout:n}catch(e){l=n}try{h="function"===typeof clearTimeout?clearTimeout:r}catch(e){h=r}}();var p,d=[],y=!1,v=-1;f.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];d.push(new u(e,t)),1!==d.length||y||i(s)},u.prototype.run=function(){this.fun.apply(null,this.array)},f.title="browser",f.browser=!0,f.env={},f.argv=[],f.version="",f.versions={},f.on=c,f.addListener=c,f.once=c,f.off=c,f.removeListener=c,f.removeAllListeners=c,f.emit=c,f.prependListener=c,f.prependOnceListener=c,f.listeners=function(e){return[]},f.binding=function(e){throw new Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(e){throw new Error("process.chdir is not supported")},f.umask=function(){return 0}},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(6),a=function(e){return i.a.createElement("li",{className:"nav-item"},i.a.createElement(o.b,{className:"nav-link",to:e.route},e.title))};t.a=a},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(0),s=n.n(a),u=n(6),c=n(4),l=n.n(c),h=n(9),f=n(42),p=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),d=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),p(t,[{key:"render",value:function(){return s.a.createElement("nav",{className:"navbar navbar-expand-lg navbar-light bg-light"},s.a.createElement(u.b,{to:h.e},s.a.createElement("img",{src:"/img/rufflerim_logo.png",width:"50",height:"50",alt:"Return to homepage"})),s.a.createElement("div",{className:"collapse navbar-collapse",id:"navbarNav"},s.a.createElement("ul",{className:"navbar-nav mr-auto"},s.a.createElement(f.a,{title:"Blog",route:h.b}))),s.a.createElement("ul",{className:"navbar-nav mr-auto"},s.a.createElement("li",{className:"nav-item"},s.a.createElement("a",{className:"nav-link",onClick:function(){return l.a.auth().signOut()}},"D\xe9connexion"))))}}]),t}(a.Component);t.a=d},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}var i=function(e,t){return function(){return r({},e,t)}};t.a=i},function(e,t,n){n(46),e.exports=n(51)},function(e,t,n){"use strict";"undefined"===typeof Promise&&(n(47).enable(),window.Promise=n(49)),n(50),Ob
1ject.assign=n(15)},function(e,t,n){"use strict";function r(){c=!1,s._47=null,s._71=null}function i(e){function t(t){(e.allRejections||a(h[t].error,e.whitelist||u))&&(h[t].displayId=l++,e.onUnhandled?(h[t].logged=!0,e.onUnhandled(h[t].displayId,h[t].error)):(h[t].logged=!0,o(h[t].displayId,h[t].error)))}function n(t){h[t].logged&&(e.onHandled?e.onHandled(h[t].displayId,h[t].error):h[t].onUnhandled||(console.warn("Promise Rejection Handled (id: "+h[t].displayId+"):"),console.warn(' This means you can ignore any previous messages of the form "Possible Unhandled Promise Rejection" with id '+h[t].displayId+".")))}e=e||{},c&&r(),c=!0;var i=0,l=0,h={};s._47=function(e){2===e._83&&h[e._56]&&(h[e._56].logged?n(e._56):clearTimeout(h[e._56].timeout),delete h[e._56])},s._71=function(e,n){0===e._75&&(e._56=i++,h[e._56]={displayId:null,error:n,timeout:setTimeout(t.bind(null,e._56),a(n,u)?100:2e3),logged:!1})}}function o(e,t){console.warn("Possible Unhandled Promise Rejection (id: "+e+"):"),((t&&(t.stack||t))+"").split("\n").forEach(function(e){console.warn(" "+e)})}function a(e,t){return t.some(function(t){return e instanceof t})}var s=n(27),u=[ReferenceError,TypeError,RangeError],c=!1;t.disable=r,t.enable=i},function(e,t,n){"use strict";(function(t){function n(e){a.length||(o(),s=!0),a[a.length]=e}function r(){for(;u<a.length;){var e=u;if(u+=1,a[e].call(),u>c){for(var t=0,n=a.length-u;t<n;t++)a[t]=a[t+u];a.length-=u,u=0}}a.length=0,u=0,s=!1}function i(e){return function(){function t(){clearTimeout(n),clearInterval(r),e()}var n=setTimeout(t,0),r=setInterval(t,50)}}e.exports=n;var o,a=[],s=!1,u=0,c=1024,l="undefined"!==typeof t?t:self,h=l.MutationObserver||l.WebKitMutationObserver;o="function"===typeof h?function(e){var t=1,n=new h(e),r=document.createTextNode("");return n.observe(r,{characterData:!0}),function(){t=-t,r.data=t}}(r):i(r),n.requestFlush=o,n.makeRequestCallFromTimer=i}).call(t,n(5))},function(e,t,n){"use strict";function r(e){var t=new i(i._44);return t._83=1,t._18=e,t}var i=n(27);e.exports=i;var o=r(!0),a=r(!1),s=r(null),u=r(void 0),c=r(0),l=r("");i.resolve=function(e){if(e instanceof i)return e;if(null===e)return s;if(void 0===e)return u;if(!0===e)return o;if(!1===e)return a;
1if(0===e)return c;if(""===e)return l;if("object"===typeof e||"function"===typeof e)try{var t=e.then;if("function"===typeof t)return new i(t.bind(e))}catch(e){return new i(function(t,n){n(e)})}return r(e)},i.all=function(e){var t=Array.prototype.slice.call(e);return new i(function(e,n){function r(a,s){if(s&&("object"===typeof s||"function"===typeof s)){if(s instanceof i&&s.then===i.prototype.then){for(;3===s._83;)s=s._18;return 1===s._83?r(a,s._18):(2===s._83&&n(s._18),void s.then(function(e){r(a,e)},n))}var u=s.then;if("function"===typeof u){return void new i(u.bind(s)).then(function(e){r(a,e)},n)}}t[a]=s,0===--o&&e(t)}if(0===t.length)return e([]);for(var o=t.length,a=0;a<t.length;a++)r(a,t[a])})},i.reject=function(e){return new i(function(t,n){n(e)})},i.race=function(e){return new i(function(t,n){e.forEach(function(e){i.resolve(e).then(t,n)})})},i.prototype.catch=function(e){return this.then(null,e)}},function(e,t){!function(e){"use strict";function t(e){if("string"!==typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function n(e){return"string"!==typeof e&&(e=String(e)),e}function r(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return m.iterable&&(t[Symbol.iterator]=function(){return t}),t}function i(e){this.map={},e instanceof i?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function o(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function a(e){return new Promise(function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}})}function s(e){var t=new FileReader,n=a(t);return t.readAsArrayBuffer(e),n}function u(e){var t=new FileReader,n=a(t);return t.readAsText(e),n}function c(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}function l(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function h(){return this.bodyUsed=!1,this._initBody=function(e){if(this._bodyInit=e,e)if("string"===typeof e)this._bodyText=e;else if(m.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(m.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(m.searchParams&&URLSearchParams.prototype.isPrototypeOf(e))this._bodyText=e.toString();else if(m.arrayBuffer&&m.blob&&_(e))this._bodyArrayBuffer=l(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else{if(!m.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(e)&&!b(e))throw new Error("unsupported BodyInit type");this._bodyArrayBuffer=l(e)}else this._bodyText="";this.headers.get("content-type")||("string"===typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):m.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},m.blob&&(this.blob=function(){var e=o(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?o(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(s)}),this.text=function(){var e=o(this);if(e)return e;if(this._bodyBlob)return u(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(c(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},m.formData&&(this.formData=function(){return this.text().then(d)}),this.json=function(){return this.text().then(JSON.parse)},this}function f(e){var t=e.toUpperCase();return w.indexOf(t)>-1?t:e}function p(e,t){t=t||{};var n=t.body;if(e instanceof p){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new i(e.headers)),this.method=e.method,this.mode=e.mode,n||null==e._bodyInit||(n=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new i(t.headers)),this.method=f(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function d(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}}),t}function y(e){var t=new i;
1return e.split(/\r?\n/).forEach(function(e){var n=e.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();t.append(r,i)}}),t}function v(e,t){t||(t={}),this.type="default",this.status="status"in t?t.status:200,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new i(t.headers),this.url=t.url||"",this._initBody(e)}if(!e.fetch){var m={searchParams:"URLSearchParams"in e,iterable:"Symbol"in e&&"iterator"in Symbol,blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e};if(m.arrayBuffer)var g=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],_=function(e){return e&&DataView.prototype.isPrototypeOf(e)},b=ArrayBuffer.isView||function(e){return e&&g.indexOf(Object.prototype.toString.call(e))>-1};i.prototype.append=function(e,r){e=t(e),r=n(r);var i=this.map[e];this.map[e]=i?i+","+r:r},i.prototype.delete=function(e){delete this.map[t(e)]},i.prototype.get=function(e){return e=t(e),this.has(e)?this.map[e]:null},i.prototype.has=function(e){return this.map.hasOwnProperty(t(e))},i.prototype.set=function(e,r){this.map[t(e)]=n(r)},i.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},i.prototype.keys=function(){var e=[];return this.forEach(function(t,n){e.push(n)}),r(e)},i.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),r(e)},i.prototype.entries=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),r(e)},m.iterable&&(i.prototype[Symbol.iterator]=i.prototype.entries);var w=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];p.prototype.clone=function(){return new p(this,{body:this._bodyInit})},h.call(p.prototype),h.call(v.prototype),v.prototype.clone=function(){return new v(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new i(this.headers),url:this.url})},v.error=function(){var e=new v(null,{status:0,statusText:""});return e.type="error",e};var E=[301,302,303,307,308];v.redirect=function(e,t){if(-1===E.indexOf(t))throw new RangeError("Invalid status code");return new v(null,{status:t,headers:{location:e}})},e.Headers=i,e.Request=p,e.Response=v,e.fetch=function(e,t){return new Promise(function(n,r){var i=new p(e,t),o=new XMLHttpRequest;o.onload=function(){var e={status:o.status,statusText:o.statusText,headers:y(o.getAllResponseHeaders()||"")};e.url="responseURL"in o?o.responseURL:e.headers.get("X-Request-URL");var t="response"in o?o.response:o.responseText;n(new v(t,e))},o.onerror=function(){r(new TypeError("Network request failed"))},o.ontimeout=function(){r(new TypeError("Network request failed"))},o.open(i.method,i.url,!0),"include"===i.credentials&&(o.withCredentials=!0),"responseType"in o&&m.blob&&(o.responseType="blob"),i.headers.forEach(function(e,t){o.setRequestHeader(t,e)}),o.send("undefined"===typeof i._bodyInit?null:i._bodyInit)})},e.fetch.polyfill=!0}}("undefined"!==typeof self?self:this)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=n.n(r),o=n(53),a=n.n(o),s=n(61),u=(n.n(s),n(62)),c=n(113);a.a.render(i.a.createElement(u.a,null),document.getElementById("root")),Object(c.a)()},function(e,t,n){"use strict";function r(e){for(var t=arguments.length-1,n="http://reactjs.org/docs/error-decoder.html?invariant="+e,r=0;r<t;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);g(!1,"Minified React error #"+e+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",n)}function i(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||R}function o(){}function a(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||R}function s(e,t,n){var r=void 0,i={},o=null,a=null;if(null!=t)for(r in void 0!==t.ref&&(a=t.ref),void 0!==t.key&&(o=""+t.key),t)D.call(t,r)&&!L.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(1===s)i.children=n;else if(1<s){for(var u=Array(s),c=0;c<s;c++)u[c]=arguments[c+2];i.children=u}if(e&&e.defaultProps)for(r in s=e.defaultProps)void 0===i[r]&&(i[r]=s[r]);return{$$typeof:E,type:e,key:o,ref:a,props:i,_owner:x.current}}function u(e){return"object"===typeof e&&null!==e&&e.$$typeof===E}function c(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,function(e){return t[e]})}function l(e,t,n,r){if(M.length){var i=M.pop();return i.result=e,i.keyPrefix=t,i.func=n,i.context=r,i.count=0,i}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function h(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>M.length&&M.push(e)}function f(e,t,n,i){var o=typeof e;"undefined"!==o&&"boolean"!==o||(e=null);var a=!1;if(null===e)a=!0;else switch(o){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case E:case C:a=!0}}
1if(a)return n(i,e,""===t?"."+p(e,0):t),1;if(a=0,t=""===t?".":t+":",Array.isArray(e))for(var s=0;s<e.length;s++){o=e[s];var u=t+p(o,s);a+=f(o,u,n,i)}else if(null===e||"undefined"===typeof e?u=null:(u=P&&e[P]||e["@@iterator"],u="function"===typeof u?u:null),"function"===typeof u)for(e=u.call(e),s=0;!(o=e.next()).done;)o=o.value,u=t+p(o,s++),a+=f(o,u,n,i);else"object"===o&&(n=""+e,r("31","[object Object]"===n?"object with keys {"+Object.keys(e).join(", ")+"}":n,""));return a}function p(e,t){return"object"===typeof e&&null!==e&&null!=e.key?c(e.key):t.toString(36)}function d(e,t){e.func.call(e.context,t,e.count++)}function y(e,t,n){var r=e.result,i=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?v(e,r,n,b.thatReturnsArgument):null!=e&&(u(e)&&(t=i+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(U,"$&/")+"/")+n,e={$$typeof:E,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}),r.push(e))}function v(e,t,n,r,i){var o="";null!=n&&(o=(""+n).replace(U,"$&/")+"/"),t=l(t,o,r,i),null==e||f(e,"",y,t),h(t)}var m=n(15),g=n(16),_=n(28),b=n(17),w="function"===typeof Symbol&&Symbol.for,E=w?Symbol.for("react.element"):60103,C=w?Symbol.for("react.portal"):60106,T=w?Symbol.for("react.fragment"):60107,S=w?Symbol.for("react.strict_mode"):60108,I=w?Symbol.for("react.provider"):60109,k=w?Symbol.for("react.context"):60110,O=w?Symbol.for("react.async_mode"):60111,N=w?Symbol.for("react.forward_ref"):60112,P="function"===typeof Symbol&&Symbol.iterator,R={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}};i.prototype.isReactComponent={},i.prototype.setState=function(e,t){"object"!==typeof e&&"function"!==typeof e&&null!=e&&r("85"),this.updater.enqueueSetState(this,e,t,"setState")},i.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},o.prototype=i.prototype;var A=a.prototype=new o;A.constructor=a,m(A,i.prototype),A.isPureReactComponent=!0;var x={current:null},D=Object.prototype.hasOwnProperty,L={key:!0,ref:!0,__self:!0,__source:!0},U=/\/+/g,M=[],F={Children:{map:function(e,t,n){if(null==e)return e;var r=[];return v(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;t=l(null,null,t,n),null==e||f(e,"",d,t),h(t)},count:function(e){return null==e?0:f(e,"",b.thatReturnsNull,null)},toArray:function(e){var t=[];return v(e,t,null,b.thatReturnsArgument),t},only:function(e){return u(e)||r("143"),e}},createRef:function(){return{current:null}},Component:i,PureComponent:a,createContext:function(e,t){return void 0===t&&(t=null),e={$$typeof:k,_calculateChangedBits:t,_defaultValue:e,_currentValue:e,_changedBits:0,Provider:null,Consumer:null},e.Provider={$$typeof:I,_context:e},e.Consumer=e},forwardRef:function(e){return{$$typeof:N,render:e}},Fragment:T,StrictMode:S,unstable_AsyncMode:O,createElement:s,cloneElement:function(e,t,n){(null===e||void 0===e)&&r("267",e);var i=void 0,o=m({},e.props),a=e.key,s=e.ref,u=e._owner;if(null!=t){void 0!==t.ref&&(s=t.ref,u=x.current),void 0!==t.key&&(a=""+t.key);var c=void 0;e.type&&e.type.defaultProps&&(c=e.type.defaultProps);for(i in t)D.call(t,i)&&!L.hasOwnProperty(i)&&(o[i]=void 0===t[i]&&void 0!==c?c[i]:t[i])}if(1===(i=arguments.length-2))o.children=n;else if(1<i){c=Array(i);for(var l=0;l<i;l++)c[l]=arguments[l+2];o.children=c}return{$$typeof:E,type:e.type,key:a,ref:s,props:o,_owner:u}},createFactory:function(e){var t=s.bind(null,e);return t.type=e,t},isValidElement:u,version:"16.3.2",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentOwner:x,assign:m}},j=Object.freeze({default:F}),B=j&&F||j;e.exports=B.default?B.default:B},function(e,t,n){"use strict";function r(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(e){console.error(e)}}r(),e.exports=n(54)},function(e,t,n){"use strict";function r(e){for(var t=arguments.length-1,n="http://reactjs.org/docs/error-decoder.html?invariant="+e,r=0;r<t;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);cn(!1,"Minified React error #"+e+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",n)}function i(e,t,n,r,i,o,a,s,u){this._hasCaughtError=!1,this._caughtError=null;var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(e){this._caughtError=e,this._hasCaughtError=!0}}function o(){if(gn._hasRethrowError){var e=gn._rethrowError;throw gn._rethrowError=null,gn._hasRethrowError=!1,e}}function a(){if(_n)for(var e in bn){var t=bn[e],n=_n.indexOf(e);if(-1<n||r("96",e),!wn[n]){t.extractEvents||r("97",e),wn[n]=t,n=t.eventTypes;for(var i in n){var o=void 0,a=n[i],u=t,c=i;En.hasOwnProperty(c)&&r("99",c),En[c]=a;
vendor: 12,998 bytes, line 1
1var l=a.phasedRegistrationNames;if(l){for(o in l)l.hasOwnProperty(o)&&s(l[o],u,c);o=!0}else a.registrationName?(s(a.registrationName,u,c),o=!0):o=!1;o||r("98",i,e)}}}}function s(e,t,n){Cn[e]&&r("100",e),Cn[e]=t,Tn[e]=t.eventTypes[n].dependencies}function u(e){_n&&r("101"),_n=Array.prototype.slice.call(e),a()}function c(e){var t,n=!1;for(t in e)if(e.hasOwnProperty(t)){var i=e[t];bn.hasOwnProperty(t)&&bn[t]===i||(bn[t]&&r("102",t),bn[t]=i,n=!0)}n&&a()}function l(e,t,n,r){t=e.type||"unknown-event",e.currentTarget=On(r),gn.invokeGuardedCallbackAndCatchFirstError(t,n,void 0,e),e.currentTarget=null}function h(e,t){return null==t&&r("30"),null==e?t:Array.isArray(e)?Array.isArray(t)?(e.push.apply(e,t),e):(e.push(t),e):Array.isArray(t)?[e].concat(t):[e,t]}function f(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)}function p(e,t){if(e){var n=e._dispatchListeners,r=e._dispatchInstances;if(Array.isArray(n))for(var i=0;i<n.length&&!e.isPropagationStopped();i++)l(e,t,n[i],r[i]);else n&&l(e,t,n,r);e._dispatchListeners=null,e._dispatchInstances=null,e.isPersistent()||e.constructor.release(e)}}function d(e){return p(e,!0)}function y(e){return p(e,!1)}function v(e,t){var n=e.stateNode;if(!n)return null;var i=In(n);if(!i)return null;n=i[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":(i=!i.disabled)||(e=e.type,i=!("button"===e||"input"===e||"select"===e||"textarea"===e)),e=!i;break e;default:e=!1}return e?null:(n&&"function"!==typeof n&&r("231",t,typeof n),n)}function m(e,t){null!==e&&(Nn=h(Nn,e)),e=Nn,Nn=null,e&&(t?f(e,d):f(e,y),Nn&&r("95"),gn.rethrowCaughtError())}function g(e,t,n,r){for(var i=null,o=0;o<wn.length;o++){var a=wn[o];a&&(a=a.extractEvents(e,t,n,r))&&(i=h(i,a))}m(i,!1)}function _(e){if(e[xn])return e[xn];for(;!e[xn];){if(!e.parentNode)return null;e=e.parentNode}return e=e[xn],5===e.tag||6===e.tag?e:null}function b(e){if(5===e.tag||6===e.tag)return e.stateNode;r("33")}function w(e){return e[Dn]||null}function E(e){do{e=e.return}while(e&&5!==e.tag);return e||null}function C(e,t,n){for(var r=[];e;)r.push(e),e=E(e);for(e=r.length;0<e--;)t(r[e],"captured",n);for(e=0;e<r.length;e++)t(r[e],"bubbled",n)}function T(e,t,n){(t=v(e,n.dispatchConfig.phasedRegistrationNames[t]))&&(n._dispatchListeners=h(n._dispatchListeners,t),n._dispatchInstances=h(n._dispatchInstances,e))}function S(e){e&&e.dispatchConfig.phasedRegistrationNames&&C(e._targetInst,T,e)}function I(e){if(e&&e.dispatchConfig.phasedRegistrationNames){var t=e._targetInst;t=t?E(t):null,C(t,T,e)}}function k(e,t,n){e&&n&&n.dispatchConfig.registrationName&&(t=v(e,n.dispatchConfig.registrationName))&&(n._dispatchListeners=h(n._dispatchListeners,t),n._dispatchInstances=h(n._dispatchInstances,e))}function O(e){e&&e.dispatchConfig.registrationName&&k(e._targetInst,null,e)}function N(e){f(e,S)}function P(e,t,n,r){if(n&&r)e:{for(var i=n,o=r,a=0,s=i;s;s=E(s))a++;s=0;for(var u=o;u;u=E(u))s++;for(;0<a-s;)i=E(i),a--;for(;0<s-a;)o=E(o),s--;for(;a--;){if(i===o||i===o.alternate)break e;i=E(i),o=E(o)}i=null}else i=null;for(o=i,i=[];n&&n!==o&&(null===(a=n.alternate)||a!==o);)i.push(n),n=E(n);for(n=[];r&&r!==o&&(null===(a=r.alternate)||a!==o);)n.push(r),r=E(r);for(r=0;r<i.length;r++)k(i[r],"bubbled",e);for(e=n.length;0<e--;)k(n[e],"captured",t)}function R(){return!Mn&&hn.canUseDOM&&(Mn="textContent"in document.documentElement?"textContent":"innerText"),Mn}function A(){if(Fn._fallbackText)return Fn._fallbackText;var e,t,n=Fn._startText,r=n.length,i=x(),o=i.length;for(e=0;e<r&&n[e]===i[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===i[o-t];t++);return Fn._fallbackText=i.slice(e,1<t?1-t:void 0),Fn._fallbackText}function x(){return"value"in Fn._root?Fn._root.value:Fn._root[R()]}function D(e,t,n,r){this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=n,e=this.constructor.Interface;for(var i in e)e.hasOwnProperty(i)&&((t=e[i])?this[i]=t(n):"target"===i?this.target=r:this[i]=n[i]);return this.isDefaultPrevented=(null!=n.defaultPrevented?n.defaultPrevented:!1===n.returnValue)?pn.thatReturnsTrue:pn.thatReturnsFalse,this.isPropagationStopped=pn.thatReturnsFalse,this}function L(e,t,n,r){if(this.eventPool.length){var i=this.eventPool.pop();return this.call(i,e,t,n,r),i}return new this(e,t,n,r)}function U(e){e instanceof this||r("223"),e.destructor(),10>this.eventPool.length&&this.eventPool.push(e)}function M(e){e.eventPool=[],e.getPooled=L,e.release=U}function F(e,t){switch(e){case"topKeyUp":return-1!==Hn.indexOf(t.keyCode);case"topKeyDown":return 229!==t.keyCode;case"topKeyPress":case"topMouseDown":case"topBlur":return!0;default:return!1}}function j(e){return e=e.detail,"object"===typeof e&&"data"in e?e.data:null}function B(e,t){switch(e){case"topCompositionEnd":return j(t);case"topKeyPress":return 32!==t.which?null:(Xn=!0,Qn);case"topTextInput":return e=t.data,e===Qn&&Xn?null:e;default:return null}}function W(e,t){if($n)return"topCompositionEnd"===e||!qn&&F(e,t)?(e=A(),Fn._root=null,Fn._startText=null,Fn._fallbackText=null,$n=!1,e):null;switch(e){case"topPaste":return null;case"topKeyPress":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"topCompositionEnd":return Gn?null:t.data;default:return null}}function V(e){if(e=kn(e)){Zn&&"function"===typeof Zn.restoreControlledState||r("194");var t=In(e.stateNode);Zn.restoreControlledState(e.stateNode,e.type,t)}}function H(e){tr?nr?nr.push(e):nr=[e]:tr=e}function q(){return null!==tr||null!==nr}function K(){if(tr){var e=tr,t=nr;if(nr=tr=null,V(e),t)for(e=0;e<t.length;e++)V(t[e])}}function z(e,t){return e(t)}function G(e,t,n){return e(t,n)}function Q(){}function Y(e,t){if(ir)return e(t);ir=!0;try{return z(e,t)}finally{ir=!1,q()&&(Q(),K())}}function X(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!or[e.type]:"textarea"===t}function $(e){return e=e.target||window,e.correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}function J(e,t){return!(!hn.canUseDOM||t&&!("addEventListener"in document))&&(e="on"+e,t=e in document,t||(t=document.createElement("div"),t.setAttribute(e,"return;"),t="function"===typeof t[e]),t)}function Z(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function ee(e){var t=Z(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&"function"===typeof n.get&&"function"===typeof n.set)return Object.defineProperty(e,t,{configurable:!0,get:function(){return n.get.call(this)},set:function(e){r=""+e,n.set.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]}}}function te(e){e._valueTracker||(e._valueTracker=ee(e))}function ne(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Z(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function re(e){return null===e||"undefined"===typeof e?null:(e=gr&&e[gr]||e["@@iterator"],"function"===typeof e?e:null)}function ie(e){if("function"===typeof(e=e.type))return e.displayName||e.name;if("string"===typeof e)return e;switch(e){case fr:return"ReactFragment";case hr:return"ReactPortal";case cr:return"ReactCall";case lr:return"ReactReturn"}if("object"===typeof e&&null!==e)switch(e.$$typeof){case mr:return e=e.render.displayName||e.render.name||"",""!==e?"ForwardRef("+e+")":"ForwardRef"}return null}function oe(e){var t="";do{e:switch(e.tag){case 0:case 1:case 2:case 5:var n=e._debugOwner,r=e._debugSource,i=ie(e),o=null;n&&(o=ie(n)),n=r,i="\n in "+(i||"Unknown")+(n?" (at "+n.fileName.replace(/^.*[\\\/]/,"")+":"+n.lineNumber+")":o?" (created by "+o+")":"");break e;default:i=""}t+=i,e=e.return}while(e);return t}function ae(e){return!!wr.hasOwnProperty(e)||!br.hasOwnProperty(e)&&(_r.test(e)?wr[e]=!0:(br[e]=!0,!1))}function se(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}}function ue(e,t,n,r){if(null===t||"undefined"===typeof t||se(e,t,n,r))return!0;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}function ce(e,t,n,r,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t}function le(e){return e[1].toUpperCase()}function he(e,t,n,r){var i=Er.hasOwnProperty(t)?Er[t]:null;(null!==i?0===i.type:!r&&(2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1])))||(ue(t,n,i,r)&&(n=null),r||null===i?ae(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):(i=i.type,n=3===i||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}function fe(e,t){var n=t.checked;return fn({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function pe(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=ge(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 de(e,t){null!=(t=t.checked)&&he(e,"checked",t,!1)}function ye(e,t){de(e,t);var n=ge(t.value);null!=n&&("number"===t.type?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n)),t.hasOwnProperty("value")?me(e,t.type,n):t.hasOwnProperty("defaultValue")&&me(e,t.type,ge(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function ve(e,t){(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue"))&&(""===e.value&&(e.value=""+e._wrapperState.initialValue),e.defaultValue=""+e._wrapperState.initialValue),t=e.name,""!==t&&(e.name=""),e.defaultChecked=!e.defaultChecked,e.defaultChecked=!e.defaultChecked,""!==t&&(e.name=t)}function me(e,t,n){"number"===t&&e.ownerDocument.activeElement===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function ge(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function _e(e,t,n){return e=D.getPooled(Tr.change,e,t,n),e.type="change",H(n),N(e),e}function be(e){m(e,!1)}function we(e){if(ne(b(e)))return e}function Ee(e,t){if("topChange"===e)return t}function Ce(){Sr&&(Sr.detachEvent("onpropertychange",Te),Ir=Sr=null)}function Te(e){"value"===e.propertyName&&we(Ir)&&(e=_e(Ir,e,$(e)),Y(be,e))}function Se(e,t,n){"topFocus"===e?(Ce(),Sr=t,Ir=n,Sr.attachEvent("onpropertychange",Te)):"topBlur"===e&&Ce()}function Ie(e){if("topSelectionChange"===e||"topKeyUp"===e||"topKeyDown"===e)return we(Ir)}function ke(e,t){if("topClick"===e)return we(t)}function Oe(e,t){if("topInput"===e||"topChange"===e)return we(t)}function Ne(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Pr[e])&&!!t[e]}function Pe(){return Ne}function Re(e){var t=e;if(e.alternate)for(;t.return;)t=t.return;else{if(0!==(2&t.effectTag))return 1;for(;t.return;)if(t=t.return,0!==(2&t.effectTag))return 1}return 3===t.tag?2:3}function Ae(e){return!!(e=e._reactInternalFiber)&&2===Re(e)}function xe(e){2!==Re(e)&&r("188")}function De(e){var t=e.alternate;if(!t)return t=Re(e),3===t&&r("188"),1===t?null:e;for(var n=e,i=t;;){var o=n.return,a=o?o.alternate:null;if(!o||!a)break;if(o.child===a.child){for(var s=o.child;s;){if(s===n)return xe(o),e;if(s===i)return xe(o),t;s=s.sibling}r("188")}if(n.return!==i.return)n=o,i=a;else{s=!1;for(var u=o.child;u;){if(u===n){s=!0,n=o,i=a;break}if(u===i){s=!0,i=o,n=a;break}u=u.sibling}if(!s){for(u=a.child;u;){if(u===n){s=!0,n=a,i=o;break}if(u===i){s=!0,i=a,n=o;break}u=u.sibling}s||r("189")}}n.alternate!==i&&r("190")}return 3!==n.tag&&r("188"),n.stateNode.current===n?e:t}function Le(e){if(!(e=De(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 Ue(e){if(!(e=De(e)))return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child&&4!==t.tag)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 Me(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 Fe(e,t){var n=e[0].toUpperCase()+e.slice(1),r="on"+n;
1n="top"+n,t={phasedRegistrationNames:{bubbled:r,captured:r+"Capture"},dependencies:[n],isInteractive:t},qr[e]=t,Kr[n]=t}function je(e){var t=e.targetInst;do{if(!t){e.ancestors.push(t);break}var n;for(n=t;n.return;)n=n.return;if(!(n=3!==n.tag?null:n.stateNode.containerInfo))break;e.ancestors.push(t),t=_(n)}while(t);for(n=0;n<e.ancestors.length;n++)t=e.ancestors[n],g(e.topLevelType,t,e.nativeEvent,$(e.nativeEvent))}function Be(e){Yr=!!e}function We(e,t,n){if(!n)return null;e=(Gr(e)?He:qe).bind(null,e),n.addEventListener(t,e,!1)}function Ve(e,t,n){if(!n)return null;e=(Gr(e)?He:qe).bind(null,e),n.addEventListener(t,e,!0)}function He(e,t){G(qe,e,t)}function qe(e,t){if(Yr){var n=$(t);if(n=_(n),null!==n&&"number"===typeof n.tag&&2!==Re(n)&&(n=null),Qr.length){var r=Qr.pop();r.topLevelType=e,r.nativeEvent=t,r.targetInst=n,e=r}else e={topLevelType:e,nativeEvent:t,targetInst:n,ancestors:[]};try{Y(je,e)}finally{e.topLevelType=null,e.nativeEvent=null,e.targetInst=null,e.ancestors.length=0,10>Qr.length&&Qr.push(e)}}}function Ke(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n["ms"+e]="MS"+t,n["O"+e]="o"+t.toLowerCase(),n}function ze(e){if(Jr[e])return Jr[e];if(!$r[e])return e;var t,n=$r[e];for(t in n)if(n.hasOwnProperty(t)&&t in Zr)return Jr[e]=n[t];return e}function Ge(e){return Object.prototype.hasOwnProperty.call(e,ii)||(e[ii]=ri++,ni[e[ii]]={}),ni[e[ii]]}function Qe(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ye(e,t){var n=Qe(e);e=0;for(var r;n;){if(3===n.nodeType){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Qe(n)}}function Xe(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&"text"===e.type||"textarea"===t||"true"===e.contentEditable)}function $e(e,t){if(li||null==si||si!==dn())return null;var n=si;return"selectionStart"in n&&Xe(n)?n={start:n.selectionStart,end:n.selectionEnd}:window.getSelection?(n=window.getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}):n=void 0,ci&&yn(ci,n)?null:(ci=n,e=D.getPooled(ai.select,ui,e,t),e.type="select",e.target=si,N(e),e)}function Je(e,t,n,r){this.tag=e,this.key=n,this.stateNode=this.type=null,this.sibling=this.child=this.return=null,this.index=0,this.ref=null,this.pendingProps=t,this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.expirationTime=0,this.alternate=null}function Ze(e,t,n){var r=e.alternate;return null===r?(r=new Je(e.tag,t,e.key,e.mode),r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.effectTag=0,r.nextEffect=null,r.firstEffect=null,r.lastEffect=null),r.expirationTime=n,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function et(e,t,n){var i=e.type,o=e.key;e=e.props;var a=void 0;if("function"===typeof i)a=i.prototype&&i.prototype.isReactComponent?2:0;else if("string"===typeof i)a=5;else switch(i){case fr:return tt(e.children,t,n,o);case vr:a=11,t|=3;break;case pr:a=11,t|=2;break;case cr:a=7;break;case lr:a=9;break;default:if("object"===typeof i&&null!==i)switch(i.$$typeof){case dr:a=13;break;case yr:a=12;break;case mr:a=14;break;default:if("number"===typeof i.tag)return t=i,t.pendingProps=e,t.expirationTime=n,t;r("130",null==i?i:typeof i,"")}else r("130",null==i?i:typeof i,"")}return t=new Je(a,e,o,t),t.type=i,t.expirationTime=n,t}function tt(e,t,n,r){return e=new Je(10,e,r,t),e.expirationTime=n,e}function nt(e,t,n){return e=new Je(6,e,null,t),e.expirationTime=n,e}function rt(e,t,n){return t=new Je(4,null!==e.children?e.children:[],e.key,t),t.expirationTime=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function it(e){return function(t){try{return e(t)}catch(e){}}}function ot(e){if("undefined"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;
1if(t.isDisabled||!t.supportsFiber)return!0;try{var n=t.inject(e);fi=it(function(e){return t.onCommitFiberRoot(n,e)}),pi=it(function(e){return t.onCommitFiberUnmount(n,e)})}catch(e){}return!0}function at(e){"function"===typeof fi&&fi(e)}function st(e){"function"===typeof pi&&pi(e)}function ut(e){return{baseState:e,expirationTime:0,first:null,last:null,callbackList:null,hasForceUpdate:!1,isInitialized:!1,capturedValues:null}}function ct(e,t){null===e.last?e.first=e.last=t:(e.last.next=t,e.last=t),(0===e.expirationTime||e.expirationTime>t.expirationTime)&&(e.expirationTime=t.expirationTime)}function lt(e){di=yi=null;var t=e.alternate,n=e.updateQueue;null===n&&(n=e.updateQueue=ut(null)),null!==t?null===(e=t.updateQueue)&&(e=t.updateQueue=ut(null)):e=null,di=n,yi=e!==n?e:null}function ht(e,t){lt(e),e=di;var n=yi;null===n?ct(e,t):null===e.last||null===n.last?(ct(e,t),ct(n,t)):(ct(e,t),n.last=t)}function ft(e,t,n,r){return e=e.partialState,"function"===typeof e?e.call(t,n,r):e}function pt(e,t,n,r,i,o){null!==e&&e.updateQueue===n&&(n=t.updateQueue={baseState:n.baseState,expirationTime:n.expirationTime,first:n.first,last:n.last,isInitialized:n.isInitialized,capturedValues:n.capturedValues,callbackList:null,hasForceUpdate:!1}),n.expirationTime=0,n.isInitialized?e=n.baseState:(e=n.baseState=t.memoizedState,n.isInitialized=!0);for(var a=!0,s=n.first,u=!1;null!==s;){var c=s.expirationTime;if(c>o){var l=n.expirationTime;(0===l||l>c)&&(n.expirationTime=c),u||(u=!0,n.baseState=e)}else u||(n.first=s.next,null===n.first&&(n.last=null)),s.isReplace?(e=ft(s,r,e,i),a=!0):(c=ft(s,r,e,i))&&(e=a?fn({},e,c):fn(e,c),a=!1),s.isForced&&(n.hasForceUpdate=!0),null!==s.callback&&(c=n.callbackList,null===c&&(c=n.callbackList=[]),c.push(s)),null!==s.capturedValue&&(c=n.capturedValues,null===c?n.capturedValues=[s.capturedValue]:c.push(s.capturedValue));s=s.next}return null!==n.callbackList?t.effectTag|=32:null!==n.first||n.hasForceUpdate||null!==n.capturedValues||(t.updateQueue=null),u||(n.baseState=e),e}function dt(e,t){var n=e.callbackList;if(null!==n)for(e.callbackList=null,e=0;e<n.length;e++){var i=n[e],o=i.callback;i.callback=null,"function"!==typeof o&&r("191",o),o.call(t)}}function yt(e,t,n,r,i){function o(e,t,n,r,i,o){if(null===t||null!==e.updateQueue&&e.updateQueue.hasForceUpdate)return!0;var a=e.stateNode;return e=e.type,"function"===typeof a.shouldComponentUpdate?a.shouldComponentUpdate(n,i,o):!e.prototype||!e.prototype.isPureReactComponent||(!yn(t,n)||!yn(r,i))}function a(e,t){t.updater=d,e.stateNode=t,t._reactInternalFiber=e}function s(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&&d.enqueueReplaceState(t,t.state,null)}function u(e,t,n,r){if(e=e.type,"function"===typeof e.getDerivedStateFromProps)return e.getDerivedStateFromProps.call(null,n,r)}var c=e.cacheContext,l=e.getMaskedContext,h=e.getUnmaskedContext,f=e.isContextConsumer,p=e.hasContextChanged,d={isMounted:Ae,enqueueSetState:function(e,r,i){e=e._reactInternalFiber,i=void 0===i?null:i;var o=n(e);ht(e,{expirationTime:o,partialState:r,callback:i,isReplace:!1,isForced:!1,capturedValue:null,next:null}),t(e,o)},enqueueReplaceState:function(e,r,i){e=e._reactInternalFiber,i=void 0===i?null:i;var o=n(e);ht(e,{expirationTime:o,partialState:r,callback:i,isReplace:!0,isForced:!1,capturedValue:null,next:null}),t(e,o)},enqueueForceUpdate:function(e,r){e=e._reactInternalFiber,r=void 0===r?null:r;var i=n(e);ht(e,{expirationTime:i,partialState:null,callback:r,isReplace:!1,isForced:!0,capturedValue:null,next:null}),t(e,i)}};return{adoptClassInstance:a,callGetDerivedStateFromProps:u,constructClassInstance:function(e,t){var n=e.type,r=h(e),i=f(e),o=i?l(e,r):mn;n=new n(t,o);var s=null!==n.state&&void 0!==n.state?n.state:null;return a(e,n),e.memoizedState=s,t=u(e,n,t,s),null!==t&&void 0!==t&&(e.memoizedState=fn({},e.memoizedState,t)),i&&c(e,r,o),n},mountClassInstance:function(e,t){var n=e.type,r=e.alternate,i=e.stateNode,o=e.pendingProps,a=h(e);i.props=o,i.state=e.memoizedState,i.refs=mn,i.context=l(e,a),"function"===typeof n.getDerivedStateFromProps||"function"===typeof i.getSnapshotBeforeUpdate||"function"!==typeof i.UNSAFE_componentWillMount&&"function"!==typeof i.componentWillMount||(n=i.state,"function"===typeof i.componentWillMount&&i.componentWillMount(),"function"===typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),n!==i.state&&d.enqueueReplaceState(i,i.state,null),null!==(n=e.updateQueue)&&(i.state=pt(r,e,n,i,o,t))),"function"===typeof i.componentDidMount&&(e.effectTag|=4)},resumeMountClassInstance:function(e,t){var n=e.type,a=e.stateNode;a.props=e.memoizedProps,a.state=e.memoizedState;var c=e.memoizedProps,f=e.pendingProps,d=a.context,y=h(e);y=l(e,y),(n="function"===typeof n.getDerivedStateFromProps||"function"===typeof a.getSnapshotBeforeUpdate)||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(c!==f||d!==y)&&s(e,a,f,y),d=e.memoizedState,t=null!==e.updateQueue?pt(null,e,e.updateQueue,a,f,t):d;var v=void 0;if(c!==f&&(v=u(e,a,f,t)),null!==v&&void 0!==v){t=null===t||void 0===t?v:fn({},t,v);var m=e.updateQueue;null!==m&&(m.baseState=fn({},m.baseState,v))}return c!==f||d!==t||p()||null!==e.updateQueue&&e.updateQueue.hasForceUpdate?((c=o(e,c,f,d,t,y))?(n||"function"!==typeof a.UNSAFE_componentWillMount&&"function"!==typeof a.componentWillMount||("function"===typeof a.componentWillMount&&a.componentWillMount(),"function"===typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"===typeof a.componentDidMount&&(e.effectTag|=4)):("function"===typeof a.componentDidMount&&(e.effectTag|=4),r(e,f),i(e,t)),a.props=f,a.state=t,a.context=y,c):("function"===typeof a.componentDidMount&&(e.effectTag|=4),!1)},updateClassInstance:function(e,t,n){var a=t.type,c=t.stateNode;c.props=t.memoizedProps,c.state=t.memoizedState;var f=t.memoizedProps,d=t.pendingProps,y=c.context,v=h(t);v=l(t,v),(a="function"===typeof a.getDerivedStateFromProps||"function"===typeof c.getSnapshotBeforeUpdate)||"function"!==typeof c.UNSAFE_componentWillReceiveProps&&"function"!==typeof c.componentWillReceiveProps||(f!==d||y!==v)&&s(t,c,d,v),y=t.memoizedState,n=null!==t.updateQueue?pt(e,t,t.updateQueue,c,d,n):y;var m=void 0;if(f!==d&&(m=u(t,c,d,n)),null!==m&&void 0!==m){n=null===n||void 0===n?m:fn({},n,m);var g=t.updateQueue;null!==g&&(g.baseState=fn({},g.baseState,m))}return f!==d||y!==n||p()||null!==t.updateQueue&&t.updateQueue.hasForceUpdate?((m=o(t,f,d,y,n,v))?(a||"function"!==typeof c.UNSAFE_componentWillUpdate&&"function"!==typeof c.componentWillUpdate||("function"===typeof c.componentWillUpdate&&c.componentWillUpdate(d,n,v),"function"===typeof c.UNSAFE_componentWillUpdate&&c.UNSAFE_componentWillUpdate(d,n,v)),"function"===typeof c.componentDidUpdate&&(t.effectTag|=4),"function"===typeof c.getSnapshotBeforeUpdate&&(t.effectTag|=2048)):("function"!==typeof c.componentDidUpdate||f===e.memoizedProps&&y===e.memoizedState||(t.effectTag|=4),"function"!==typeof c.getSnapshotBeforeUpdate||f===e.memoizedProps&&y===e.memoizedState||(t.effectTag|=2048),r(t,d),i(t,
vendor: 4,313 bytes, line 1
1n)),c.props=d,c.state=n,c.context=v,m):("function"!==typeof c.componentDidUpdate||f===e.memoizedProps&&y===e.memoizedState||(t.effectTag|=4),"function"!==typeof c.getSnapshotBeforeUpdate||f===e.memoizedProps&&y===e.memoizedState||(t.effectTag|=2048),!1)}}}function vt(e,t,n){if(null!==(e=n.ref)&&"function"!==typeof e&&"object"!==typeof e){if(n._owner){n=n._owner;var i=void 0;n&&(2!==n.tag&&r("110"),i=n.stateNode),i||r("147",e);var o=""+e;return null!==t&&null!==t.ref&&t.ref._stringRef===o?t.ref:(t=function(e){var t=i.refs===mn?i.refs={}:i.refs;null===e?delete t[o]:t[o]=e},t._stringRef=o,t)}"string"!==typeof e&&r("148"),n._owner||r("254",e)}return e}function mt(e,t){"textarea"!==e.type&&r("31","[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t,"")}function gt(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.effectTag=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function i(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 o(e,t,n){return e=Ze(e,t,n),e.index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index,r<n?(t.effectTag=2,n):r):(t.effectTag=2,n):n}function s(t){return e&&null===t.alternate&&(t.effectTag=2),t}function u(e,t,n,r){return null===t||6!==t.tag?(t=nt(n,e.mode,r),t.return=e,t):(t=o(t,n,r),t.return=e,t)}function c(e,t,n,r){return null!==t&&t.type===n.type?(r=o(t,n.props,r),r.ref=vt(e,t,n),r.return=e,r):(r=et(n,e.mode,r),r.ref=vt(e,t,n),r.return=e,r)}function l(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=rt(n,e.mode,r),t.return=e,t):(t=o(t,n.children||[],r),t.return=e,t)}function h(e,t,n,r,i){return null===t||10!==t.tag?(t=tt(n,e.mode,r,i),t.return=e,t):(t=o(t,n,r),t.return=e,t)}function f(e,t,n){if("string"===typeof t||"number"===typeof t)return t=nt(""+t,e.mode,n),t.return=e,t;if("object"===typeof t&&null!==t){switch(t.$$typeof){case ur:return n=et(t,e.mode,n),n.ref=vt(e,null,t),n.return=e,n;case hr:return t=rt(t,e.mode,n),t.return=e,t}if(vi(t)||re(t))return t=tt(t,e.mode,n,null),t.return=e,t;mt(e,t)}return null}function p(e,t,n,r){var i=null!==t?t.key:null;if("string"===typeof n||"number"===typeof n)return null!==i?null:u(e,t,""+n,r);if("object"===typeof n&&null!==n){switch(n.$$typeof){case ur:return n.key===i?n.type===fr?h(e,t,n.props.children,r,i):c(e,t,n,r):null;case hr:return n.key===i?l(e,t,n,r):null}if(vi(n)||re(n))return null!==i?null:h(e,t,n,r,null);mt(e,n)}return null}function d(e,t,n,r,i){if("string"===typeof r||"number"===typeof r)return e=e.get(n)||null,u(t,e,""+r,i);if("object"===typeof r&&null!==r){switch(r.$$typeof){case ur:return e=e.get(null===r.key?n:r.key)||null,r.type===fr?h(t,e,r.props.children,i,r.key):c(t,e,r,i);case hr:return e=e.get(null===r.key?n:r.key)||null,l(t,e,r,i)}if(vi(r)||re(r))return e=e.get(n)||null,h(t,e,r,i,null);mt(t,r)}return null}function y(r,o,s,u){for(var c=null,l=null,h=o,y=o=0,v=null;null!==h&&y<s.length;y++){h.index>y?(v=h,h=null):v=h.sibling;var m=p(r,h,s[y],u);if(null===m){null===h&&(h=v);break}e&&h&&null===m.alternate&&t(r,h),o=a(m,o,y),null===l?c=m:l.sibling=m,l=m,h=v}if(y===s.length)return n(r,h),c;if(null===h){for(;y<s.length;y++)(h=f(r,s[y],u))&&(o=a(h,o,y),null===l?c=h:l.sibling=h,l=h);return c}for(h=i(r,h);y<s.length;y++)(v=d(h,r,y,s[y],u))&&(e&&null!==v.alternate&&h.delete(null===v.key?y:v.key),o=a(v,o,y),null===l?c=v:l.sibling=v,l=v);return e&&h.forEach(function(e){return t(r,e)}),c}function v(o,s,u,c){var l=re(u);"function"!==typeof l&&r("150"),null==(u=l.call(u))&&r("151");for(var h=l=null,y=s,v=s=0,m=null,g=u.next();null!==y&&!g.done;v++,g=u.next()){y.index>v?(m=y,y=null):m=y.sibling;var _=p(o,y,g.value,c);if(null===_){y||(y=m);break}e&&y&&null===_.alternate&&t(o,y),s=a(_,s,v),null===h?l=_:h.sibling=_,h=_,y=m}if(g.done)return n(o,y),l;if(null===y){for(;!g.done;v++,g=u.next())null!==(g=f(o,g.value,c))&&(s=a(g,s,v),null===h?l=g:h.sibling=g,h=g);return l}for(y=i(o,y);!g.done;v++,g=u.next())null!==(g=d(y,o,v,g.value,c))&&(e&&null!==g.alternate&&y.delete(null===g.key?v:g.key),s=a(g,s,v),null===h?l=g:h.sibling=g,h=g);
1return e&&y.forEach(function(e){return t(o,e)}),l}return function(e,i,a,u){"object"===typeof a&&null!==a&&a.type===fr&&null===a.key&&(a=a.props.children);var c="object"===typeof a&&null!==a;if(c)switch(a.$$typeof){case ur:e:{var l=a.key;for(c=i;null!==c;){if(c.key===l){if(10===c.tag?a.type===fr:c.type===a.type){n(e,c.sibling),i=o(c,a.type===fr?a.props.children:a.props,u),i.ref=vt(e,c,a),i.return=e,e=i;break e}n(e,c);break}t(e,c),c=c.sibling}a.type===fr?(i=tt(a.props.children,e.mode,u,a.key),i.return=e,e=i):(u=et(a,e.mode,u),u.ref=vt(e,i,a),u.return=e,e=u)}return s(e);case hr:e:{for(c=a.key;null!==i;){if(i.key===c){if(4===i.tag&&i.stateNode.containerInfo===a.containerInfo&&i.stateNode.implementation===a.implementation){n(e,i.sibling),i=o(i,a.children||[],u),i.return=e,e=i;break e}n(e,i);break}t(e,i),i=i.sibling}i=rt(a,e.mode,u),i.return=e,e=i}return s(e)}if("string"===typeof a||"number"===typeof a)return a=""+a,null!==i&&6===i.tag?(n(e,i.sibling),i=o(i,a,u),i.return=e,e=i):(n(e,i),i=nt(a,e.mode,u),i.return=e,e=i),s(e);if(vi(a))return y(e,i,a,u);if(re(a))return v(e,i,a,u);if(c&&mt(e,a),"undefined"===typeof a)switch(e.tag){case 2:case 1:u=e.type,r("152",u.displayName||u.name||"Component")}return n(e,i)}}function _t(e,t,n,i,o,a,s){function u(e,t,n){c(e,t,n,t.expirationTime)}function c(e,t,n,r){t.child=null===e?gi(t,null,n,r):mi(t,e.child,n,r)}function l(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.effectTag|=128)}function h(e,t,n,r,i,o){if(l(e,t),!n&&!i)return r&&I(t,!1),y(e,t);n=t.stateNode,ar.current=t;var a=i?null:n.render();return t.effectTag|=1,i&&(c(e,t,null,o),t.child=null),c(e,t,a,o),t.memoizedState=n.state,t.memoizedProps=n.props,r&&I(t,!0),t.child}function f(e){var t=e.stateNode;t.pendingContext?S(e,t.pendingContext,t.pendingContext!==t.context):t.context&&S(e,t.context,!1),_(e,t.containerInfo)}function p(e,t,n,r){var i=e.child;for(null!==i&&(i.return=e);null!==i;){switch(i.tag){case 12:var o=0|i.stateNode;if(i.type===t&&0!==(o&n)){for(o=i;null!==o;){var a=o.alternate;if(0===o.expirationTime||o.expirationTime>r)o.expirationTime=r,null!==a&&(0===a.expirationTime||a.expirationTime>r)&&(a.expirationTime=r);else{if(null===a||!(0===a.expirationTime||a.expirationTime>r))break;a.expirationTime=r}o=o.return}o=null}else o=i.child;break;case 13:o=i.type===e.type?null:i.child;break;default:o=i.child}if(null!==o)o.return=i;else for(o=i;null!==o;){if(o===e){o=null;break}if(null!==(i=o.sibling)){o=i;break}o=o.return}i=o}}function d(e,t,n){var r=t.type._context,i=t.pendingProps,o=t.memoizedProps;if(!C()&&o===i)return t.stateNode=0,b(t),y(e,t);var a=i.value;if(t.memoizedProps=i,null===o)a=1073741823;else if(o.value===i.value){if(o.children===i.children)return t.stateNode=0,b(t),y(e,t);a=0}else{var s=o.value;if(s===a&&(0!==s||1/s===1/a)||s!==s&&a!==a){if(o.children===i.children)return t.stateNode=0,b(t),y(e,t);a=0}else if(a="function"===typeof r._calculateChangedBits?r._calculateChangedBits(s,a):1073741823,0===(a|=0)){if(o.children===i.children)return t.stateNode=0,b(t),y(e,t)}else p(t,r,a,n)}return t.stateNode=a,b(t),u(e,t,i.children),t.child}function y(e,t){if(null!==e&&t.child!==e.child&&r("153"),null!==t.child){e=t.child;var n=Ze(e,e.pendingProps,e.expirationTime);for(t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,n=n.sibling=Ze(e,e.pendingProps,e.expirationTime),n.return=t;n.sibling=null}return t.child}var v=e.shouldSetTextContent,m=e.shouldDeprioritizeSubtree,g=t.pushHostContext,_=t.pushHostContainer,b=i.pushProvider,w=n.getMaskedContext,E=n.getUnmaskedContext,C=n.hasContextChanged,T=n.pushContextProvider,S=n.pushTopLevelContextObject,I=n.invalidateContextProvider,k=o.enterHydrationState,O=o.resetHydrationState,N=o.tryToClaimNextHydratableInstance;e=yt(n,a,s,function(e,t){e.memoizedProps=t},function(e,t){e.memoizedState=t});var P=e.adoptClassInstance,R=e.callGetDerivedStateFromProps,A=e.constructClassInstance,x=e.mountClassInstance,D=e.resumeMountClassInstance,L=e.updateClassInstance;return{beginWork:function(e,t,n){if(0===t.expirationTime||t.expirationTime>n){switch(t.tag){case 3:f(t);break;case 2:T(t);break;case 4:_(t,t.stateNode.containerInfo);break;case 13:b(t)}return null}switch(t.tag){case 0:null!==e&&r("155");var i=t.type,o=t.pendingProps,a=E(t);return a=w(t,a),i=i(o,a),t.effectTag|=1,"object"===typeof i&&null!==i&&"function"===typeof i.render&&void 0===i.$$typeof?(a=t.type,t.tag=2,t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,"function"===typeof a.getDerivedStateFromProps&&null!==(o=R(t,i,o,t.memoizedState))&&void 0!==o&&(t.memoizedState=fn({},t.memoizedState,o)),o=T(t),P(t,i),x(t,n),e=h(e,t,!0,o,!1,n)):(t.tag=1,u(e,t,i),t.memoizedProps=o,e=t.child),e;case 1:return o=t.type,n=t.pendingProps,C()||t.memoizedProps!==n?(i=E(t),i=w(t,i),o=o(n,i),t.effectTag|=1,u(e,t,o),t.memoizedProps=n,e=t.child):e=y(e,t),e;case 2:o=T(t),null===e?null===t.stateNode?(A(t,t.pendingProps),x(t,n),i=!0):i=D(t,n):i=L(e,t,n),a=!1;var s=t.updateQueue;return null!==s&&null!==s.capturedValues&&(a=i=!0),h(e,t,i,o,a,n);case 3:e:if(f(t),null!==(i=t.updateQueue)){if(a=t.memoizedState,o=pt(e,t,i,null,null,n),t.memoizedState=o,null!==(i=t.updateQueue)&&null!==i.capturedValues)i=null;else{if(a===o){O(),e=y(e,t);break e}i=o.element}a=t.stateNode,(null===e||null===e.child)&&a.hydrate&&k(t)?(t.effectTag|=2,t.child=gi(t,null,i,n)):(O(),u(e,t,i)),t.memoizedState=o,e=t.child}else O(),e=y(e,t);return e;case 5:return g(t),null===e&&N(t),o=t.type,s=t.memoizedProps,i=t.pendingProps,a=null!==e?e.memoizedProps:null,C()||s!==i||((s=1&t.mode&&m(o,i))&&(t.expirationTime=1073741823),s&&1073741823===n)?(s=i.children,v(o,i)?s=null:a&&v(o,a)&&(t.effectTag|=16),l(e,t),1073741823!==n&&1&t.mode&&m(o,i)?(t.expirationTime=1073741823,t.memoizedProps=i,e=null):(u(e,t,s),t.memoizedProps=i,e=t.child)):e=y(e,t),e;case 6:return null===e&&N(t),t.memoizedProps=t.pendingProps,null;case 8:t.tag=7;case 7:return o=t.pendingProps,C()||t.memoizedProps!==o||(o=t.memoizedProps),i=o.children,t.stateNode=null===e?gi(t,t.stateNode,i,n):mi(t,e.stateNode,i,n),t.memoizedProps=o,t.stateNode;case 9:return null;case 4:return _(t,t.stateNode.containerInfo),o=t.pendingProps,C()||t.memoizedProps!==o?(null===e?t.child=mi(t,null,o,n):u(e,t,o),t.memoizedProps=o,e=t.child):e=y(e,t),e;case 14:return n=t.type.render,n=n(t.pendingProps,t.ref),u(e,t,n),t.memoizedProps=n,t.child;case 10:return n=t.pendingProps,C()||t.memoizedProps!==n?(u(e,t,n),t.memoizedProps=n,e=t.child):e=y(e,t),e;case 11:return n=t.pendingProps.children,C()||null!==n&&t.memoizedProps!==n?(u(e,t,n),t.memoizedProps=n,e=t.child):e=y(e,t),e;case 13:return d(e,t,n);case 12:e:{i=t.type,a=t.pendingProps,s=t.memoizedProps,o=i._currentValue;var c=i._changedBits;if(C()||0!==c||s!==a){t.memoizedProps=a;var S=a.unstable_observedBits;if(void 0!==S&&null!==S||(S=1073741823),t.stateNode=S,0!==(c&S))p(t,i,c,n);else if(s===a){e=y(e,t);break e}n=a.children,n=n(o),u(e,t,n),e=t.child}else e=y(e,t)}return e;default:r("156")}}}}function bt(e,t,n,i,o){function a(e){e.effectTag|=4}var s=e.createInstance,u=e.createTextInstance,c=e.appendInitialChild,l=e.finalizeInitialChildren,h=e.prepareUpdate,f=e.persistence,p=t.getRootHostContainer,d=t.popHostContext,y=t.getHostContext,v=t.popHostContainer,m=n.popContextProvider,g=n.popTopLevelContextObject,_=i.popProvi
1der,b=o.prepareToHydrateHostInstance,w=o.prepareToHydrateHostTextInstance,E=o.popHydrationState,C=void 0,T=void 0,S=void 0;return e.mutation?(C=function(){},T=function(e,t,n){(t.updateQueue=n)&&a(t)},S=function(e,t,n,r){n!==r&&a(t)}):r(f?"235":"236"),{completeWork:function(e,t,n){var i=t.pendingProps;switch(t.tag){case 1:return null;case 2:return m(t),e=t.stateNode,i=t.updateQueue,null!==i&&null!==i.capturedValues&&(t.effectTag&=-65,"function"===typeof e.componentDidCatch?t.effectTag|=256:i.capturedValues=null),null;case 3:return v(t),g(t),i=t.stateNode,i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),null!==e&&null!==e.child||(E(t),t.effectTag&=-3),C(t),e=t.updateQueue,null!==e&&null!==e.capturedValues&&(t.effectTag|=256),null;case 5:d(t),n=p();var o=t.type;if(null!==e&&null!=t.stateNode){var f=e.memoizedProps,I=t.stateNode,k=y();I=h(I,o,f,i,n,k),T(e,t,I,o,f,i,n,k),e.ref!==t.ref&&(t.effectTag|=128)}else{if(!i)return null===t.stateNode&&r("166"),null;if(e=y(),E(t))b(t,n,e)&&a(t);else{f=s(o,i,n,e,t);e:for(k=t.child;null!==k;){if(5===k.tag||6===k.tag)c(f,k.stateNode);else if(4!==k.tag&&null!==k.child){k.child.return=k,k=k.child;continue}if(k===t)break;for(;null===k.sibling;){if(null===k.return||k.return===t)break e;k=k.return}k.sibling.return=k.return,k=k.sibling}l(f,o,i,n,e)&&a(t),t.stateNode=f}null!==t.ref&&(t.effectTag|=128)}return null;case 6:if(e&&null!=t.stateNode)S(e,t,e.memoizedProps,i);else{if("string"!==typeof i)return null===t.stateNode&&r("166"),null;e=p(),n=y(),E(t)?w(t)&&a(t):t.stateNode=u(i,e,n,t)}return null;case 7:(i=t.memoizedProps)||r("165"),t.tag=8,o=[];e:for((f=t.stateNode)&&(f.return=t);null!==f;){if(5===f.tag||6===f.tag||4===f.tag)r("247");else if(9===f.tag)o.push(f.pendingProps.value);else if(null!==f.child){f.child.return=f,f=f.child;continue}for(;null===f.sibling;){if(null===f.return||f.return===t)break e;f=f.return}f.sibling.return=f.return,f=f.sibling}return f=i.handler,i=f(i.props,o),t.child=mi(t,null!==e?e.child:null,i,n),t.child;case 8:return t.tag=7,null;case 9:case 14:case 10:case 11:return null;case 4:return v(t),C(t),null;case 13:return _(t),null;case 12:return null;case 0:r("167");default:r("156")}}}}function wt(e,t,n,r,i){var o=e.popHostContainer,a=e.popHostContext,s=t.popContextProvider,u=t.popTopLevelContextObject,c=n.popProvider;return{throwException:function(e,t,n){t.effectTag|=512,t.firstEffect=t.lastEffect=null,t={value:n,source:t,stack:oe(t)};do{switch(e.tag){case 3:return lt(e),e.updateQueue.capturedValues=[t],void(e.effectTag|=1024);case 2:if(n=e.stateNode,0===(64&e.effectTag)&&null!==n&&"function"===typeof n.componentDidCatch&&!i(n)){lt(e),n=e.updateQueue;var r=n.capturedValues;return null===r?n.capturedValues=[t]:r.push(t),void(e.effectTag|=1024)}}e=e.return}while(null!==e)},unwindWork:function(e){switch(e.tag){case 2:s(e);var t=e.effectTag;return 1024&t?(e.effectTag=-1025&t|64,e):null;case 3:return o(e),u(e),t=e.effectTag,1024&t?(e.effectTag=-1025&t|64,e):null;case 5:return a(e),null;case 4:return o(e),null;case 13:return c(e),null;default:return null}},unwindInterruptedWork:function(e){switch(e.tag){case 2:s(e);break;case 3:o(e),u(e);break;case 5:a(e);break;case 4:o(e);break;case 13:c(e)}}}}function Et(e,t){var n=t.source;null===t.stack&&oe(n),null!==n&&ie(n),t=t.value,null!==e&&2===e.tag&&ie(e);try{t&&t.suppressReactErrorLogging||console.error(t)}catch(e){e&&e.suppressReactErrorLogging||console.error(e)}}function Ct(e,t,n,i,o){function a(e){var n=e.ref;if(null!==n)if("function"===typeof n)try{n(null)}catch(n){t(e,n)}else n.current=null}function s(e){switch("function"===typeof st&&st(e),e.tag){case 2:a(e);var n=e.stateNode;if("function"===typeof n.componentWillUnmount)try{n.props=e.memoizedProps,n.state=e.memoizedState,n.componentWillUnmount()}catch(n){t(e,n)}break;case 5:a(e);break;case 7:u(e.stateNode);break;case 4:f&&l(e)}}function u(e){for(var t=e;;)if(s(t),null===t.child||f&&4===t.tag){if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return;t=t.return}t.sibling.return=t.return,t=t.sibling}else t.child.return=t,t=t.child}function c(e){return 5===e.tag||3===e.tag||4===e.tag}function l(e){for(var t=e,n=!1,i=void 0,o=void 0;;){if(!n){n=t.return;e:for(;;){switch(null===n&&r("160"),n.tag){case 5:i=n.stateNode,o=!1;break e;case 3:case 4:i=n.stateNode.containerInfo,o=!0;break e}n=n.return}n=!0}if(5===t.tag||6===t.tag)u(t),o?E(i,t.stateNode):w(i,t.stateNode);else if(4===t.tag?i=t.stateNode.containerInfo:s(t),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;t=t.return,4===t.tag&&(n=!1)}t.sibling.return=t.return,t=t.sibling}}var h=e.getPublicInstance,f=e.mutation;e=e.persistence,f||r(e?"235":"236");var p=f.commitMount,d=f.commitUpdate,y=f.resetTextContent,v=f.commitTextUpdate,m=f.appendChild,g=f.appendChildToContainer,_=f.insertBefore,b=f.insertInContainerBefore,w=f.removeChild,E=f.removeChildFromContainer;return{commitBeforeMutationLifeCycles:function(e,t){switch(t.tag){case 2:if(2048&t.effectTag&&null!==e){var n=e.memoizedProps,i=e.memoizedState;e=t.stateNode,e.props=t.memoizedProps,e.state=t.memoizedState,t=e.getSnapshotBeforeUpdate(n,i),e.__reactInternalSnapshotBeforeUpdate=t}break;
1case 3:case 5:case 6:case 4:break;default:r("163")}},commitResetTextContent:function(e){y(e.stateNode)},commitPlacement:function(e){e:{for(var t=e.return;null!==t;){if(c(t)){var n=t;break e}t=t.return}r("160"),n=void 0}var i=t=void 0;switch(n.tag){case 5:t=n.stateNode,i=!1;break;case 3:case 4:t=n.stateNode.containerInfo,i=!0;break;default:r("161")}16&n.effectTag&&(y(t),n.effectTag&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||c(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag;){if(2&n.effectTag)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.effectTag)){n=n.stateNode;break e}}for(var o=e;;){if(5===o.tag||6===o.tag)n?i?b(t,o.stateNode,n):_(t,o.stateNode,n):i?g(t,o.stateNode):m(t,o.stateNode);else if(4!==o.tag&&null!==o.child){o.child.return=o,o=o.child;continue}if(o===e)break;for(;null===o.sibling;){if(null===o.return||o.return===e)return;o=o.return}o.sibling.return=o.return,o=o.sibling}},commitDeletion:function(e){l(e),e.return=null,e.child=null,e.alternate&&(e.alternate.child=null,e.alternate.return=null)},commitWork:function(e,t){switch(t.tag){case 2:break;case 5:var n=t.stateNode;if(null!=n){var i=t.memoizedProps;e=null!==e?e.memoizedProps:i;var o=t.type,a=t.updateQueue;t.updateQueue=null,null!==a&&d(n,a,o,e,i,t)}break;case 6:null===t.stateNode&&r("162"),n=t.memoizedProps,v(t.stateNode,null!==e?e.memoizedProps:n,n);break;case 3:break;default:r("163")}},commitLifeCycles:function(e,t,n){switch(n.tag){case 2:if(e=n.stateNode,4&n.effectTag)if(null===t)e.props=n.memoizedProps,e.state=n.memoizedState,e.componentDidMount();else{var i=t.memoizedProps;t=t.memoizedState,e.props=n.memoizedProps,e.state=n.memoizedState,e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}n=n.updateQueue,null!==n&&dt(n,e);break;case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:e=h(n.child.stateNode);break;case 2:e=n.child.stateNode}dt(t,e)}break;case 5:e=n.stateNode,null===t&&4&n.effectTag&&p(e,n.type,n.memoizedProps,n);break;case 6:case 4:break;default:r("163")}},commitErrorLogging:function(e,t){switch(e.tag){case 2:var n=e.type;t=e.stateNode;var i=e.updateQueue;(null===i||null===i.capturedValues)&&r("264");var a=i.capturedValues;for(i.capturedValues=null,"function"!==typeof n.getDerivedStateFromCatch&&o(t),t.props=e.memoizedProps,t.state=e.memoizedState,n=0;n<a.length;n++){i=a[n];var s=i.value,u=i.stack;Et(e,i),t.componentDidCatch(s,{componentStack:null!==u?u:""})}break;case 3:for(n=e.updateQueue,(null===n||null===n.capturedValues)&&r("264"),a=n.capturedValues,n.capturedValues=null,n=0;n<a.length;n++)i=a[n],Et(e,i),t(i.value);break;default:r("265")}},commitAttachRef:function(e){var t=e.ref;if(null!==t){var n=e.stateNode;switch(e.tag){case 5:e=h(n);break;default:e=n}"function"===typeof t?t(e):t.current=e}},commitDetachRef:function(e){null!==(e=e.ref)&&("function"===typeof e?e(null):e.current=null)}}}function Tt(e,t){function n(e){return e===_i&&r("174"),e}var i=e.getChildHostContext,o=e.getRootHostContext;e=t.createCursor;var a=t.push,s=t.pop,u=e(_i),c=e(_i),l=e(_i);return{getHostContext:function(){return n(u.current)},getRootHostContainer:function(){return n(l.current)},popHostContainer:function(e){s(u,e),s(c,e),s(l,e)},popHostContext:function(e){c.current===e&&(s(u,e),s(c,e))},pushHostContainer:function(e,t){a(l,t,e),a(c,e,e),a(u,_i,e),t=o(t),s(u,e),a(u,t,e)},pushHostContext:function(e){var t=n(l.current),r=n(u.current);t=i(r,e.type,t),r!==t&&(a(c,e,e),a(u,t,e))}}}function St(e){function t(e,t){var n=new Je(5,null,null,0);n.type="DELETED",n.stateNode=t,n.return=e,n.effectTag=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function n(e,t){switch(e.tag){case 5:return null!==(t=a(t,e.type,e.pendingProps))&&(e.stateNode=t,!0);case 6:return null!==(t=s(t,e.pendingProps))&&(e.stateNode=t,!0);default:return!1}}function i(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag;)e=e.return;f=e}var o=e.shouldSetTextContent;if(!(e=e.hydration))return{enterHydrationState:function(){return!1},resetHydrationState:function(){},tryToClaimNextHydratableInstance:function(){},prepareToHydrateHostInstance:function(){r("175")},prepareToHydrateHostTextInstance:function(){r("176")},popHydrationState:function(){return!1}};var a=e.canHydrateInstance,s=e.canHydrateTextInstance,u=e.getNextHydratableSibling,c=e.getFirstHydratableChild,l=e.hydrateInstance,h=e.hydrateTextInstance,f=null,p=null,d=!1;return{enterHydrationState:function(e){return p=c(e.stateNode.containerInfo),f=e,d=!0},resetHydrationState:function(){p=f=null,d=!1}
1,tryToClaimNextHydratableInstance:function(e){if(d){var r=p;if(r){if(!n(e,r)){if(!(r=u(r))||!n(e,r))return e.effectTag|=2,d=!1,void(f=e);t(f,p)}f=e,p=c(r)}else e.effectTag|=2,d=!1,f=e}},prepareToHydrateHostInstance:function(e,t,n){return t=l(e.stateNode,e.type,e.memoizedProps,t,n,e),e.updateQueue=t,null!==t},prepareToHydrateHostTextInstance:function(e){return h(e.stateNode,e.memoizedProps,e)},popHydrationState:function(e){if(e!==f)return!1;if(!d)return i(e),d=!0,!1;var n=e.type;if(5!==e.tag||"head"!==n&&"body"!==n&&!o(n,e.memoizedProps))for(n=p;n;)t(e,n),n=u(n);return i(e),p=f?u(e.stateNode):null,!0}}}function It(e){function t(e,t,n){e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=n}function n(e){return 2===e.tag&&null!=e.type.childContextTypes}function i(e,t){var n=e.stateNode,i=e.type.childContextTypes;if("function"!==typeof n.getChildContext)return t;n=n.getChildContext();for(var o in n)o in i||r("108",ie(e)||"Unknown",o);return fn({},t,n)}var o=e.createCursor,a=e.push,s=e.pop,u=o(mn),c=o(!1),l=mn;return{getUnmaskedContext:function(e){return n(e)?l:u.current},cacheContext:t,getMaskedContext:function(e,n){var r=e.type.contextTypes;if(!r)return mn;var i=e.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===n)return i.__reactInternalMemoizedMaskedChildContext;var o,a={};for(o in r)a[o]=n[o];return i&&t(e,n,a),a},hasContextChanged:function(){return c.current},isContextConsumer:function(e){return 2===e.tag&&null!=e.type.contextTypes},isContextProvider:n,popContextProvider:function(e){n(e)&&(s(c,e),s(u,e))},popTopLevelContextObject:function(e){s(c,e),s(u,e)},pushTopLevelContextObject:function(e,t,n){null!=u.cursor&&r("168"),a(u,t,e),a(c,n,e)},processChildContext:i,pushContextProvider:function(e){if(!n(e))return!1;var t=e.stateNode;return t=t&&t.__reactInternalMemoizedMergedChildContext||mn,l=u.current,a(u,t,e),a(c,c.current,e),!0},invalidateContextProvider:function(e,t){var n=e.stateNode;if(n||r("169"),t){var o=i(e,l);n.__reactInternalMemoizedMergedChildContext=o,s(c,e),s(u,e),a(u,o,e)}else s(c,e);a(c,t,e)},findCurrentUnmaskedContext:function(e){for(2!==Re(e)||2!==e.tag?r("170"):void 0;3!==e.tag;){if(n(e))return e.stateNode.__reactInternalMemoizedMergedChildContext;(e=e.return)||r("171")}return e.stateNode.context}}}function kt(e){var t=e.createCursor,n=e.push,r=e.pop,i=t(null),o=t(null),a=t(0);return{pushProvider:function(e){var t=e.type._context;n(a,t._changedBits,e),n(o,t._currentValue,e),n(i,e,e),t._currentValue=e.pendingProps.value,t._changedBits=e.stateNode},popProvider:function(e){var t=a.current,n=o.current;r(i,e),r(o,e),r(a,e),e=e.type._context,e._currentValue=n,e._changedBits=t}}}function Ot(){var e=[],t=-1;return{createCursor:function(e){return{current:e}},isEmpty:function(){return-1===t},pop:function(n){0>t||(n.current=e[t],e[t]=null,t--)},push:function(n,r){t++,e[t]=n.current,n.current=r},checkThatStackIsEmpty:function(){},resetStackAfterFatalErrorInDev:function(){}}}function Nt(e){function t(){if(null!==Z)for(var e=Z.return;null!==e;)A(e),e=e.return;ee=null,te=0,Z=null,ie=!1}function n(e){return null!==ae&&ae.has(e)}function i(e){for(;;){var t=e.alternate,n=e.return,r=e.sibling;if(0===(512&e.effectTag)){t=N(t,e,te);var i=e;if(1073741823===te||1073741823!==i.expirationTime){e:switch(i.tag){case 3:case 2:var o=i.updateQueue;o=null===o?0:o.expirationTime;break e;default:o=0}for(var a=i.child;null!==a;)0!==a.expirationTime&&(0===o||o>a.expirationTime)&&(o=a.expirationTime),a=a.sibling;i.expirationTime=o}if(null!==t)return t;if(null!==n&&0===(512&n.effectTag)&&(null===n.firstEffect&&(n.firstEffect=e.firstEffect),null!==e.lastEffect&&(null!==n.lastEffect&&(n.lastEffect.nextEffect=e.firstEffect),n.lastEffect=e.lastEffect),1<e.effectTag&&(null!==n.lastEffect?n.lastEffect.nextEffect=e:n.firstEffect=e,n.lastEffect=e)),null!==r)return r;if(null===n){ie=!0;break}e=n}else{if(null!==(e=R(e)))return e.effectTag&=2559,e;if(null!==n&&(n.firstEffect=n.lastEffect=null,n.effectTag|=512),null!==r)return r;if(null===n)break;e=n}}return null}function o(e){var t=O(e.alternate,e,te);return null===t&&(t=i(e)),ar.current=null,t}function a(e,n,a){J&&r("243"),J=!0,n===te&&e===ee&&null!==Z||(t(),ee=e,te=n,Z=Ze(ee.current,null,te),e.pendingCommitExpirationTime=0);for(var s=!1;;){try{if(a)for(;null!==Z&&!E();)Z=o(Z);else for(;null!==Z;)Z=o(Z)}catch(e){if(null===Z){s=!0,C(e);break}a=Z;var u=a.return;if(null===u){s=!0,C(e);break}P(u,a,e),Z=i(a)}break}return J=!1,s||null!==Z?null:ie?(e.pendingCommitExpirationTime=n,e.current.alternate):void r("262")}function s(e,t,n,r){e={value:n,source:e,stack:oe(e)},ht(t,{expirationTime:r,partialState:null,callback:null,isReplace:!1,isForced:!1,capturedValue:e,next:null}),l(t,r)}function u(e,t){e:{J&&!re&&r("263");for(var i=e.return;null!==i;){switch(i.tag){case 2:var o=i.stateNode;if("function"===typeof i.type.getDerivedStateFromCatch||"function"===typeof o.componentDidCatch&&!n(o)){s(e,i,t,1),e=void 0;break e}break;case 3:s(e,i,t,1),e=void 0;break e}i=i.return}3===e.tag&&s(e,e,t,1),e=void 0}return e}function c(e){return e=0!==$?$:J?re?1:te:1&e.mode?we?10*(1+((h()+15)/10|0)):25*(1+((h()+500)/25|0)):1,we&&(0===de||e>de)&&(de=e),e}function l(e,n){e:{for(;null!==e;){if((0===e.expirationTime||e.expirationTime>n)&&(e.expirationTime=n),null!==e.alternate&&(0===e.alternate.expirationTime||e.alternate.expirationTime>n)&&(e.alternate.expirationTime=n),null===e.return){if(3!==e.tag){n=void 0;break e}var i=e.stateNode;!J&&0!==te&&n<te&&t(),J&&!re&&ee===i||d(i,n),Te>Ce&&r("185")}e=e.return}n=void 0}return n}function h(){return Y=V()-G,Q=2+(Y/10|0)}function f(e,t,n,r,i){var o=$;$=1;try{return e(t,n,r,i)}finally{$=o}}function p(e){if(0!==ce){if(e>ce)return;q(le)}var t=V()-G;ce=e,le=H(v,{timeout:10*(e-2)-t})}function d(e,t){if(null===e.nextScheduledRoot)e.remainingExpirationTime=t,null===ue?(se=ue=e,e.nextScheduledRoot=e):(ue=ue.nextScheduledRoot=e,ue.nextScheduledRoot=se);else{var n=e.remainingExpirationTime;(0===n||t<n)&&(e.remainingExpirationTime=t)}
1he||(_e?be&&(fe=e,pe=1,b(e,1,!1)):1===t?m():p(t))}function y(){var e=0,t=null;if(null!==ue)for(var n=ue,i=se;null!==i;){var o=i.remainingExpirationTime;if(0===o){if((null===n||null===ue)&&r("244"),i===i.nextScheduledRoot){se=ue=i.nextScheduledRoot=null;break}if(i===se)se=o=i.nextScheduledRoot,ue.nextScheduledRoot=o,i.nextScheduledRoot=null;else{if(i===ue){ue=n,ue.nextScheduledRoot=se,i.nextScheduledRoot=null;break}n.nextScheduledRoot=i.nextScheduledRoot,i.nextScheduledRoot=null}i=n.nextScheduledRoot}else{if((0===e||o<e)&&(e=o,t=i),i===ue)break;n=i,i=i.nextScheduledRoot}}n=fe,null!==n&&n===t&&1===e?Te++:Te=0,fe=t,pe=e}function v(e){g(0,!0,e)}function m(){g(1,!1,null)}function g(e,t,n){if(ge=n,y(),t)for(;null!==fe&&0!==pe&&(0===e||e>=pe)&&(!ye||h()>=pe);)b(fe,pe,!ye),y();else for(;null!==fe&&0!==pe&&(0===e||e>=pe);)b(fe,pe,!1),y();null!==ge&&(ce=0,le=-1),0!==pe&&p(pe),ge=null,ye=!1,_()}function _(){if(Te=0,null!==Ee){var e=Ee;Ee=null;for(var t=0;t<e.length;t++){var n=e[t];try{n._onComplete()}catch(e){ve||(ve=!0,me=e)}}}if(ve)throw e=me,me=null,ve=!1,e}function b(e,t,n){he&&r("245"),he=!0,n?(n=e.finishedWork,null!==n?w(e,n,t):(e.finishedWork=null,null!==(n=a(e,t,!0))&&(E()?e.finishedWork=n:w(e,n,t)))):(n=e.finishedWork,null!==n?w(e,n,t):(e.finishedWork=null,null!==(n=a(e,t,!1))&&w(e,n,t))),he=!1}function w(e,t,n){var i=e.firstBatch;if(null!==i&&i._expirationTime<=n&&(null===Ee?Ee=[i]:Ee.push(i),i._defer))return e.finishedWork=t,void(e.remainingExpirationTime=0);e.finishedWork=null,re=J=!0,n=t.stateNode,n.current===t&&r("177"),i=n.pendingCommitExpirationTime,0===i&&r("261"),n.pendingCommitExpirationTime=0;var o=h();if(ar.current=null,1<t.effectTag)if(null!==t.lastEffect){t.lastEffect.nextEffect=t;var a=t.firstEffect}else a=t;else a=t.firstEffect;for(K(n.containerInfo),ne=a;null!==ne;){var s=!1,c=void 0;try{for(;null!==ne;)2048&ne.effectTag&&x(ne.alternate,ne),ne=ne.nextEffect}catch(e){s=!0,c=e}s&&(null===ne&&r("178"),u(ne,c),null!==ne&&(ne=ne.nextEffect))}for(ne=a;null!==ne;){s=!1,c=void 0;try{for(;null!==ne;){var l=ne.effectTag;if(16&l&&D(ne),128&l){var f=ne.alternate;null!==f&&W(f)}switch(14&l){case 2:L(ne),ne.effectTag&=-3;break;case 6:L(ne),ne.effectTag&=-3,M(ne.alternate,ne);break;case 4:M(ne.alternate,ne);break;case 8:U(ne)}ne=ne.nextEffect}}catch(e){s=!0,c=e}s&&(null===ne&&r("178"),u(ne,c),null!==ne&&(ne=ne.nextEffect))}for(z(n.containerInfo),n.current=t,ne=a;null!==ne;){l=!1,f=void 0;try{for(a=n,s=o,c=i;null!==ne;){var p=ne.effectTag;36&p&&F(a,ne.alternate,ne,s,c),256&p&&j(ne,C),128&p&&B(ne);var d=ne.nextEffect;ne.nextEffect=null,ne=d}}catch(e){l=!0,f=e}l&&(null===ne&&r("178"),u(ne,f),null!==ne&&(ne=ne.nextEffect))}J=re=!1,"function"===typeof at&&at(t.stateNode),t=n.current.expirationTime,0===t&&(ae=null),e.remainingExpirationTime=t}function E(){return!(null===ge||ge.timeRemaining()>Se)&&(ye=!0)}function C(e){null===fe&&r("246"),fe.remainingExpirationTime=0,ve||(ve=!0,me=e)}var T=Ot(),S=Tt(e,T),I=It(T);T=kt(T);var k=St(e),O=_t(e,S,I,T,k,l,c).beginWork,N=bt(e,S,I,T,k).completeWork;S=wt(S,I,T,l,n);var P=S.throwException,R=S.unwindWork,A=S.unwindInterruptedWork;S=Ct(e,u,l,c,function(e){null===ae?ae=new Set([e]):ae.add(e)},h);var x=S.commitBeforeMutationLifeCycles,D=S.commitResetTextContent,L=S.commitPlacement,U=S.commitDeletion,M=S.commitWork,F=S.commitLifeCycles,j=S.commitErrorLogging,B=S.commitAttachRef,W=S.commitDetachRef,V=e.now,H=e.scheduleDeferredCallback,q=e.cancelDeferredCallback,K=e.prepareForCommit,z=e.resetAfterCommit,G=V(),Q=2,Y=G,X=0,$=0,J=!1,Z=null,ee=null,te=0,ne=null,re=!1,ie=!1,ae=null,se=null,ue=null,ce=0,le=-1,he=!1,fe=null,pe=0,de=0,ye=!1,ve=!1,me=null,ge=null,_e=!1,be=!1,we=!1,Ee=null,Ce=1e3,Te=0,Se=1;return{recalculateCurrentTime:h,computeExpirationForFiber:c,scheduleWork:l,requestWork:d,flushRoot:function(e,t){he&&r("253"),fe=e,pe=t,b(e,t,!1),m(),_()},batchedUpdates:function(e,t){var n=_e;_e=!0;try{return e(t)}finally{(_e=n)||he||m()}},unbatchedUpdates:function(e,t){if(_e&&!be){be=!0;try{return e(t)}finally{be=!1}}return e(t)},flushSync:function(e,t){he&&r("187");var n=_e;_e=!0;try{return f(e,t)}finally{_e=n,m()}},flushControlled:function(e){var t=_e;_e=!0;try{f(e)}finally{(_e=t)||he||g(1,!1,null)}},deferredUpdates:function(e){var t=$;$=25*(1+((h()+500)/25|0));try{return e()}finally{$=t}},syncUpdates:f,interactiveUpdates:function(e,t,n){if(we)return e(t,n);_e||he||0===de||(g(de,!1,null),de=0);var r=we,i=_e;_e=we=!0;try{return e(t,n)}finally{we=r,(_e=i)||he||m()}},flushInteractiveUpdates:function(){he||0===de||(g(de,!1,null),de=0)},computeUniqueAsyncExpiration:function(){var e=25*(1+((h()+500)/25|0));return e<=X&&(e=X+1),X=e},legacyContext:I}}function Pt(e){function t(e,t,n,r,i,o){if(r=t.current,n){n=n._reactInternalFiber;var s=u(n);n=c(n)?l(n,s):s}else n=mn;return null===t.context?t.context=n:t.pendingContext=n,t=o,ht(r,{expirationTime:i,partialState:{element:e},callback:void 0===t?null:t,isReplace:!1,isForced:!1,capturedValue:null,next:null}),a(r,i),i}var n=e.getPublicInstance;e=Nt(e);var i=e.recalculateCurrentTime,o=e.computeExpirationForFiber,a=e.scheduleWork,s=e.legacyContext,u=s.findCurrentUnmaskedContext,c=s.isContextProvider,l=s.processChildContext;return{createContainer:function(e,t,n){return t=new Je(3,null,null,t?3:0),e={current:t,containerInfo:e,pendingChildren:null,pendingCommitExpirationTime:0,finishedWork:null,context:null,pendingContext:null,hydrate:n,remainingExpirationTime:0,firstBatch:null,nextScheduledRoot:null},t.stateNode=e},updateContainer:function(e,n,r,a){var s=n.current,u=i();return s=o(s),t(e,n,r,u,s,a)},updateContainerAtExpirationTime:function(e,n,r,o,a){return t(e,n,r,i(),o,a)},flushRoot:e.flushRoot,requestWork:e.requestWork,computeUniqueAsyncExpiration:e.computeUniqueAsyncExpiration,batchedUpdates:e.batchedUpdates,unbatchedUpdates:e.unbatchedUpdates,deferredUpdates:e.deferredUpdates,syncUpdates:e.syncUpdates,interactiveUpdates:e.interactiveUpdates,flushInteractiveUpdates:e.flushInteractiveUpdates,flushControlled:e.flushControlled,flushSync:e.flushSync,getPublicRootInstance:function(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return n(e.child.stateNode);default:return e.child.stateNode}},findHostInstance:function(e){var t=e._reactInternalFiber;return void 0===t&&("function"===typeof e.render?r("188"):r("268",Object.keys(e))),e=Le(t),null===e?null:e.stateNode},findHostInstanceWithNoPortals:function(e){return e=Ue(e),null===e?null:e.stateNode},injectIntoDevTools:function(e){var t=e.findFiberByHostInstance;return ot(fn({},e,{findHostInstanceByFiber:function(e){return e=Le(e),null===e?null:e.stateNode},findFiberByHostInstance:function(e){return t?t(e):null}}))}}}function Rt(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:hr,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function At(e){var t="";
1return ln.Children.forEach(e,function(e){null==e||"string"!==typeof e&&"number"!==typeof e||(t+=e)}),t}function xt(e,t){return e=fn({children:void 0},t),(t=At(t.children))&&(e.children=t),e}function Dt(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=""+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 Lt(e,t){var n=t.value;e._wrapperState={initialValue:null!=n?n:t.defaultValue,wasMultiple:!!t.multiple}}function Ut(e,t){return null!=t.dangerouslySetInnerHTML&&r("91"),fn({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Mt(e,t){var n=t.value;null==n&&(n=t.defaultValue,t=t.children,null!=t&&(null!=n&&r("92"),Array.isArray(t)&&(1>=t.length||r("93"),t=t[0]),n=""+t),null==n&&(n="")),e._wrapperState={initialValue:""+n}}function Ft(e,t){var n=t.value;null!=n&&(n=""+n,n!==e.value&&(e.value=n),null==t.defaultValue&&(e.defaultValue=n)),null!=t.defaultValue&&(e.defaultValue=t.defaultValue)}function jt(e){var t=e.textContent;t===e._wrapperState.initialValue&&(e.value=t)}function Bt(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 Wt(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?Bt(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}function Vt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}function Ht(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=n,o=t[n];i=null==o||"boolean"===typeof o||""===o?"":r||"number"!==typeof o||0===o||Bi.hasOwnProperty(i)&&Bi[i]?(""+o).trim():o+"px","float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}function qt(e,t,n){t&&(Vi[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML)&&r("137",e,n()),null!=t.dangerouslySetInnerHTML&&(null!=t.children&&r("60"),"object"===typeof t.dangerouslySetInnerHTML&&"__html"in t.dangerouslySetInnerHTML||r("61")),null!=t.style&&"object"!==typeof t.style&&r("62",n()))}function Kt(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 zt(e,t){e=9===e.nodeType||11===e.nodeType?e:e.ownerDocument;var n=Ge(e);t=Tn[t];for(var r=0;r<t.length;r++){var i=t[r];n.hasOwnProperty(i)&&n[i]||("topScroll"===i?Ve("topScroll","scroll",e):"topFocus"===i||"topBlur"===i?(Ve("topFocus","focus",e),Ve("topBlur","blur",e),n.topBlur=!0,n.topFocus=!0):"topCancel"===i?(J("cancel",!0)&&Ve("topCancel","cancel",e),n.topCancel=!0):"topClose"===i?(J("close",!0)&&Ve("topClose","close",e),n.topClose=!0):ei.hasOwnProperty(i)&&We(i,ei[i],e),n[i]=!0)}}function Gt(e,t,n,r){return n=9===n.nodeType?n:n.ownerDocument,r===Mi.html&&(r=Bt(e)),r===Mi.html?"script"===e?(e=n.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):e="string"===typeof t.is?n.createElement(e,{is:t.is}):n.createElement(e):e=n.createElementNS(r,e),e}function Qt(e,t){return(9===t.nodeType?t:t.ownerDocument).createTextNode(e)}function Yt(e,t,n,r){var i=Kt(t,n);switch(t){case"iframe":case"object":We("topLoad","load",e);var o=n;break;case"video":case"audio":for(o in ti)ti.hasOwnProperty(o)&&We(o,ti[o],e);o=n;break;case"source":We("topError","error",e),o=n;break;case"img":case"image":case"link":We("topError","error",e),We("topLoad","load",e),o=n;break;case"form":We("topReset","reset",e),We("topSubmit","submit",e),o=n;break;case"details":We("topToggle","toggle",e),o=n;break;case"input":pe(e,n),o=fe(e,n),We("topInvalid","invalid",e),zt(r,"onChange");break;case"option":o=xt(e,n);break;case"select":Lt(e,n),o=fn({},n,{value:void 0}
1),We("topInvalid","invalid",e),zt(r,"onChange");break;case"textarea":Mt(e,n),o=Ut(e,n),We("topInvalid","invalid",e),zt(r,"onChange");break;default:o=n}qt(t,o,Hi);var a,s=o;for(a in s)if(s.hasOwnProperty(a)){var u=s[a];"style"===a?Ht(e,u,Hi):"dangerouslySetInnerHTML"===a?null!=(u=u?u.__html:void 0)&&ji(e,u):"children"===a?"string"===typeof u?("textarea"!==t||""!==u)&&Vt(e,u):"number"===typeof u&&Vt(e,""+u):"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&"autoFocus"!==a&&(Cn.hasOwnProperty(a)?null!=u&&zt(r,a):null!=u&&he(e,a,u,i))}switch(t){case"input":te(e),ve(e,n);break;case"textarea":te(e),jt(e,n);break;case"option":null!=n.value&&e.setAttribute("value",n.value);break;case"select":e.multiple=!!n.multiple,t=n.value,null!=t?Dt(e,!!n.multiple,t,!1):null!=n.defaultValue&&Dt(e,!!n.multiple,n.defaultValue,!0);break;default:"function"===typeof o.onClick&&(e.onclick=pn)}}function Xt(e,t,n,r,i){var o=null;switch(t){case"input":n=fe(e,n),r=fe(e,r),o=[];break;case"option":n=xt(e,n),r=xt(e,r),o=[];break;case"select":n=fn({},n,{value:void 0}),r=fn({},r,{value:void 0}),o=[];break;case"textarea":n=Ut(e,n),r=Ut(e,r),o=[];break;default:"function"!==typeof n.onClick&&"function"===typeof r.onClick&&(e.onclick=pn)}qt(t,r,Hi),t=e=void 0;var a=null;for(e in n)if(!r.hasOwnProperty(e)&&n.hasOwnProperty(e)&&null!=n[e])if("style"===e){var s=n[e];for(t in s)s.hasOwnProperty(t)&&(a||(a={}),a[t]="")}else"dangerouslySetInnerHTML"!==e&&"children"!==e&&"suppressContentEditableWarning"!==e&&"suppressHydrationWarning"!==e&&"autoFocus"!==e&&(Cn.hasOwnProperty(e)?o||(o=[]):(o=o||[]).push(e,null));for(e in r){var u=r[e];if(s=null!=n?n[e]:void 0,r.hasOwnProperty(e)&&u!==s&&(null!=u||null!=s))if("style"===e)if(s){for(t in s)!s.hasOwnProperty(t)||u&&u.hasOwnProperty(t)||(a||(a={}),a[t]="");for(t in u)u.hasOwnProperty(t)&&s[t]!==u[t]&&(a||(a={}),a[t]=u[t])}else a||(o||(o=[]),o.push(e,a)),a=u;else"dangerouslySetInnerHTML"===e?(u=u?u.__html:void 0,s=s?s.__html:void 0,null!=u&&s!==u&&(o=o||[]).push(e,""+u)):"children"===e?s===u||"string"!==typeof u&&"number"!==typeof u||(o=o||[]).push(e,""+u):"suppressContentEditableWarning"!==e&&"suppressHydrationWarning"!==e&&(Cn.hasOwnProperty(e)?(null!=u&&zt(i,e),o||s===u||(o=[])):(o=o||[]).push(e,u))}return a&&(o=o||[]).push("style",a),o}function $t(e,t,n,r,i){"input"===n&&"radio"===i.type&&null!=i.name&&de(e,i),Kt(n,r),r=Kt(n,i);for(var o=0;o<t.length;o+=2){var a=t[o],s=t[o+1];"style"===a?Ht(e,s,Hi):"dangerouslySetInnerHTML"===a?ji(e,s):"children"===a?Vt(e,s):he(e,a,s,r)}switch(n){case"input":ye(e,i);break;case"textarea":Ft(e,i);break;case"select":e._wrapperState.initialValue=void 0,t=e._wrapperState.wasMultiple,e._wrapperState.wasMultiple=!!i.multiple,n=i.value,null!=n?Dt(e,!!i.multiple,n,!1):t!==!!i.multiple&&(null!=i.defaultValue?Dt(e,!!i.multiple,i.defaultValue,!0):Dt(e,!!i.multiple,i.multiple?[]:"",!1))}}function Jt(e,t,n,r,i){switch(t){case"iframe":case"object":We("topLoad","load",e);break;case"video":case"audio":for(var o in ti)ti.hasOwnProperty(o)&&We(o,ti[o],e);break;case"source":We("topError","error",e);break;case"img":case"image":case"link":We("topError","error",e),We("topLoad","load",e);break;case"form":We("topReset","reset",e),We("topSubmit","submit",e);break;case"details":We("topToggle","toggle",e);break;case"input":pe(e,n),We("topInvalid","invalid",e),zt(i,"onChange");break;case"select":Lt(e,n),We("topInvalid","invalid",e),zt(i,"onChange");break;case"textarea":Mt(e,n),We("topInvalid","invalid",e),zt(i,"onChange")}qt(t,n,Hi),r=null;for(var a in n)n.hasOwnProperty(a)&&(o=n[a],"children"===a?"string"===typeof o?e.textContent!==o&&(r=["children",o]):"number"===typeof o&&e.textContent!==""+o&&(r=["children",""+o]):Cn.hasOwnProperty(a)&&null!=o&&zt(i,a));switch(t){case"input":te(e),ve(e,n);break;case"textarea":te(e),jt(e,n);break;case"select":case"option":break;default:"function"===typeof n.onClick&&(e.onclick=pn)}return r}function Zt(e,t){return e.nodeValue!==t}function en(e){this._expirationTime=Gi.computeUniqueAsyncExpiration(),this._root=e,this._callbacks=this._next=null,this._hasChildren=this._didComplete=!1,this._children=null,this._defer=!0}function tn(){this._callbacks=null,this._didCommit=!1,this._onCommit=this._onCommit.bind(this)}function nn(e,t,n){this._internalRoot=Gi.createContainer(e,t,n)}function rn(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function on(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoF
1ocus}return!1}function an(e,t){if(t||(t=e?9===e.nodeType?e.documentElement:e.firstChild:null,t=!(!t||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new nn(e,!1,t)}function sn(e,t,n,i,o){rn(n)||r("200");var a=n._reactRootContainer;if(a){if("function"===typeof o){var s=o;o=function(){var e=Gi.getPublicRootInstance(a._internalRoot);s.call(e)}}null!=e?a.legacy_renderSubtreeIntoContainer(e,t,o):a.render(t,o)}else{if(a=n._reactRootContainer=an(n,i),"function"===typeof o){var u=o;o=function(){var e=Gi.getPublicRootInstance(a._internalRoot);u.call(e)}}Gi.unbatchedUpdates(function(){null!=e?a.legacy_renderSubtreeIntoContainer(e,t,o):a.render(t,o)})}return Gi.getPublicRootInstance(a._internalRoot)}function un(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;return rn(t)||r("200"),Rt(e,t,null,n)}var cn=n(16),ln=n(0),hn=n(55),fn=n(15),pn=n(17),dn=n(56),yn=n(57),vn=n(58),mn=n(28);ln||r("227");var gn={_caughtError:null,_hasCaughtError:!1,_rethrowError:null,_hasRethrowError:!1,invokeGuardedCallback:function(e,t,n,r,o,a,s,u,c){i.apply(gn,arguments)},invokeGuardedCallbackAndCatchFirstError:function(e,t,n,r,i,o,a,s,u){if(gn.invokeGuardedCallback.apply(this,arguments),gn.hasCaughtError()){var c=gn.clearCaughtError();gn._hasRethrowError||(gn._hasRethrowError=!0,gn._rethrowError=c)}},rethrowCaughtError:function(){return o.apply(gn,arguments)},hasCaughtError:function(){return gn._hasCaughtError},clearCaughtError:function(){if(gn._hasCaughtError){var e=gn._caughtError;return gn._caughtError=null,gn._hasCaughtError=!1,e}r("198")}},_n=null,bn={},wn=[],En={},Cn={},Tn={},Sn=Object.freeze({plugins:wn,eventNameDispatchConfigs:En,registrationNameModules:Cn,registrationNameDependencies:Tn,possibleRegistrationNames:null,injectEventPluginOrder:u,injectEventPluginsByName:c}),In=null,kn=null,On=null,Nn=null,Pn={injectEventPluginOrder:u,injectEventPluginsByName:c},Rn=Object.freeze({injection:Pn,getListener:v,runEventsInBatch:m,runExtractedEventsInBatch:g}),An=Math.random().toString(36).slice(2),xn="__reactInternalInstance$"+An,Dn="__reactEventHandlers$"+An,Ln=Object.freeze({precacheFiberNode:function(e,t){t[xn]=e},getClosestInstanceFromNode:_,getInstanceFromNode:function(e){return e=e[xn],!e||5!==e.tag&&6!==e.tag?null:e},getNodeFromInstance:b,getFiberCurrentPropsFromNode:w,updateFiberProps:function(e,t){e[Dn]=t}}),Un=Object.freeze({accumulateTwoPhaseDispatches:N,accumulateTwoPhaseDispatchesSkipTarget:function(e){f(e,I)},accumulateEnterLeaveDispatches:P,accumulateDirectDispatches:function(e){f(e,O)}}),Mn=null,Fn={_root:null,_startText:null,_fallbackText:null},jn="dispatchConfig _targetInst nativeEvent isDefaultPrevented isPropagationStopped _dispatchListeners _dispatchInstances".split(" "),Bn={type:null,target:null,currentTarget:pn.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};fn(D.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=pn.thatReturnsTrue)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=pn.thatReturnsTrue)},persist:function(){this.isPersistent=pn.thatReturnsTrue},isPersistent:pn.thatReturnsFalse,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;for(t=0;t<jn.length;t++)this[jn[t]]=null}}),D.Interface=Bn,D.extend=function(e){function t(){}function n(){return r.apply(this,arguments)}var r=this;t.prototype=r.prototype;var i=new t;return fn(i,n.prototype),n.prototype=i,n.prototype.constructor=n,n.Interface=fn({},r.Interface,e),n.extend=r.extend,M(n),n},M(D);var Wn=D.extend({data:null}),Vn=D.extend({data:null}),Hn=[9,13,27,32],qn=hn.canUseDOM&&"CompositionEvent"in window,Kn=null;hn.canUseDOM&&"documentMode"in document&&(Kn=document.documentMode);var zn=hn.canUseDOM&&"TextEvent"in window&&!Kn,Gn=hn.canUseDOM&&(!qn||Kn&&8<Kn&&11>
vendor: 4,944 bytes, line 1
1=Kn),Qn=String.fromCharCode(32),Yn={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["topCompositionEnd","topKeyPress","topTextInput","topPaste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"topBlur topCompositionEnd topKeyDown topKeyPress topKeyUp topMouseDown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"topBlur topCompositionStart topKeyDown topKeyPress topKeyUp topMouseDown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"topBlur topCompositionUpdate topKeyDown topKeyPress topKeyUp topMouseDown".split(" ")}},Xn=!1,$n=!1,Jn={eventTypes:Yn,extractEvents:function(e,t,n,r){var i=void 0,o=void 0;if(qn)e:{switch(e){case"topCompositionStart":i=Yn.compositionStart;break e;case"topCompositionEnd":i=Yn.compositionEnd;break e;case"topCompositionUpdate":i=Yn.compositionUpdate;break e}i=void 0}else $n?F(e,n)&&(i=Yn.compositionEnd):"topKeyDown"===e&&229===n.keyCode&&(i=Yn.compositionStart);return i?(Gn&&($n||i!==Yn.compositionStart?i===Yn.compositionEnd&&$n&&(o=A()):(Fn._root=r,Fn._startText=x(),$n=!0)),i=Wn.getPooled(i,t,n,r),o?i.data=o:null!==(o=j(n))&&(i.data=o),N(i),o=i):o=null,(e=zn?B(e,n):W(e,n))?(t=Vn.getPooled(Yn.beforeInput,t,n,r),t.data=e,N(t)):t=null,null===o?t:null===t?o:[o,t]}},Zn=null,er={injectFiberControlledHostComponent:function(e){Zn=e}},tr=null,nr=null,rr=Object.freeze({injection:er,enqueueStateRestore:H,needsStateRestore:q,restoreStateIfNeeded:K}),ir=!1,or={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},ar=ln.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,sr="function"===typeof Symbol&&Symbol.for,ur=sr?Symbol.for("react.element"):60103,cr=sr?Symbol.for("react.call"):60104,lr=sr?Symbol.for("react.return"):60105,hr=sr?Symbol.for("react.portal"):60106,fr=sr?Symbol.for("react.fragment"):60107,pr=sr?Symbol.for("react.strict_mode"):60108,dr=sr?Symbol.for("react.provider"):60109,yr=sr?Symbol.for("react.context"):60110,vr=sr?Symbol.for("react.async_mode"):60111,mr=sr?Symbol.for("react.forward_ref"):60112,gr="function"===typeof Symbol&&Symbol.iterator,_r=/^[: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]*$/,br={},wr={},Er={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Er[e]=new ce(e,0,!1,e,null)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Er[t]=new ce(t,1,!1,e[1],null)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){Er[e]=new ce(e,2,!1,e.toLowerCase(),null)}),["autoReverse","externalResourcesRequired","preserveAlpha"].forEach(function(e){Er[e]=new ce(e,2,!1,e,null)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Er[e]=new ce(e,3,!1,e.toLowerCase(),null)}),["checked","multiple","muted","selected"].forEach(function(e){Er[e]=new ce(e,3,!0,e.toLowerCase(),null)}),["capture","download"].forEach(function(e){Er[e]=new ce(e,4,!1,e.toLowerCase(),null)}),["cols","rows","size","span"].forEach(function(e){Er[e]=new ce(e,6,!1,e.toLowerCase(),null)}),["rowSpan","start"].forEach(function(e){Er[e]=new ce(e,5,!1,e.toLowerCase(),null)});var Cr=/[\-:]([a-z])/g;"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
1-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(Cr,le);Er[t]=new ce(t,1,!1,e,null)}),"xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Cr,le);Er[t]=new ce(t,1,!1,e,"http://www.w3.org/1999/xlink")}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Cr,le);Er[t]=new ce(t,1,!1,e,"http://www.w3.org/XML/1998/namespace")}),Er.tabIndex=new ce("tabIndex",1,!1,"tabindex",null);var Tr={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"topBlur topChange topClick topFocus topInput topKeyDown topKeyUp topSelectionChange".split(" ")}},Sr=null,Ir=null,kr=!1;hn.canUseDOM&&(kr=J("input")&&(!document.documentMode||9<document.documentMode));var Or={eventTypes:Tr,_isInputEventSupported:kr,extractEvents:function(e,t,n,r){var i=t?b(t):window,o=void 0,a=void 0,s=i.nodeName&&i.nodeName.toLowerCase();if("select"===s||"input"===s&&"file"===i.type?o=Ee:X(i)?kr?o=Oe:(o=Ie,a=Se):(s=i.nodeName)&&"input"===s.toLowerCase()&&("checkbox"===i.type||"radio"===i.type)&&(o=ke),o&&(o=o(e,t)))return _e(o,n,r);a&&a(e,i,t),"topBlur"===e&&null!=t&&(e=t._wrapperState||i._wrapperState)&&e.controlled&&"number"===i.type&&me(i,"number",i.value)}},Nr=D.extend({view:null,detail:null}),Pr={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"},Rr=Nr.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:Pe,button:null,buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)}}),Ar={mouseEnter:{registrationName:"onMouseEnter",dependencies:["topMouseOut","topMouseOver"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["topMouseOut","topMouseOver"]}},xr={eventTypes:Ar,extractEvents:function(e,t,n,r){if("topMouseOver"===e&&(n.relatedTarget||n.fromElement)||"topMouseOut"!==e&&"topMouseOver"!==e)return null;var i=r.window===r?r:(i=r.ownerDocument)?i.defaultView||i.parentWindow:window;if("topMouseOut"===e?(e=t,t=(t=n.relatedTarget||n.toElement)?_(t):null):e=null,e===t)return null;var o=null==e?i:b(e);i=null==t?i:b(t);var a=Rr.getPooled(Ar.mouseLeave,e,n,r);return a.type="mouseleave",a.target=o,a.relatedTarget=i,n=Rr.getPooled(Ar.mouseEnter,t,n,r),n.type="mouseenter",n.target=i,n.relatedTarget=o,P(a,n,e,t),[a,n]}},Dr=D.extend({animationName:null,elapsedTime:null,pseudoElement:null}),Lr=D.extend({clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Ur=Nr.extend({relatedTarget:null}),Mr={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Fr={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"},jr=Nr.extend({key:function(e){if(e.key){var t=Mr[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?(e=Me(e),13===e?"Enter":String.fromCharCode(e)):"keydown"===e.type||"keyup"===e.type?Fr[e.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:Pe,charCode:function(e){return"keypress"===e.type?Me(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?Me(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),Br=Rr.extend({dataTransfer:null}),Wr=Nr.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,
1shiftKey:null,getModifierState:Pe}),Vr=D.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),Hr=Rr.extend({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:null,deltaMode:null}),qr={},Kr={};"blur cancel click close contextMenu copy cut doubleClick dragEnd dragStart drop focus input invalid keyDown keyPress keyUp mouseDown mouseUp paste pause play rateChange reset seeked submit touchCancel touchEnd touchStart volumeChange".split(" ").forEach(function(e){Fe(e,!0)}),"abort animationEnd animationIteration animationStart canPlay canPlayThrough drag dragEnter dragExit dragLeave dragOver durationChange emptied encrypted ended error load loadedData loadedMetadata loadStart mouseMove mouseOut mouseOver playing progress scroll seeking stalled suspend timeUpdate toggle touchMove transitionEnd waiting wheel".split(" ").forEach(function(e){Fe(e,!1)});var zr={eventTypes:qr,isInteractiveTopLevelEventType:function(e){return void 0!==(e=Kr[e])&&!0===e.isInteractive},extractEvents:function(e,t,n,r){var i=Kr[e];if(!i)return null;switch(e){case"topKeyPress":if(0===Me(n))return null;case"topKeyDown":case"topKeyUp":e=jr;break;case"topBlur":case"topFocus":e=Ur;break;case"topClick":if(2===n.button)return null;case"topDoubleClick":case"topMouseDown":case"topMouseMove":case"topMouseUp":case"topMouseOut":case"topMouseOver":case"topContextMenu":e=Rr;break;case"topDrag":case"topDragEnd":case"topDragEnter":case"topDragExit":case"topDragLeave":case"topDragOver":case"topDragStart":case"topDrop":e=Br;break;case"topTouchCancel":case"topTouchEnd":case"topTouchMove":case"topTouchStart":e=Wr;break;case"topAnimationEnd":case"topAnimationIteration":case"topAnimationStart":e=Dr;break;case"topTransitionEnd":e=Vr;break;case"topScroll":e=Nr;break;case"topWheel":e=Hr;break;case"topCopy":case"topCut":case"topPaste":e=Lr;break;default:e=D}return t=e.getPooled(i,t,n,r),N(t),t}},Gr=zr.isInteractiveTopLevelEventType,Qr=[],Yr=!0,Xr=Object.freeze({get _enabled(){return Yr},setEnabled:Be,isEnabled:function(){return Yr},trapBubbledEvent:We,trapCapturedEvent:Ve,dispatchEvent:qe}),$r={animationend:Ke("Animation","AnimationEnd"),animationiteration:Ke("Animation","AnimationIteration"),animationstart:Ke("Animation","AnimationStart"),transitionend:Ke("Transition","TransitionEnd")},Jr={},Zr={};hn.canUseDOM&&(Zr=document.createElement("div").style,"AnimationEvent"in window||(delete $r.animationend.animation,delete $r.animationiteration.animation,delete $r.animationstart.animation),"TransitionEvent"in window||delete $r.transitionend.transition);var ei={topAnimationEnd:ze("animationend"),topAnimationIteration:ze("animationiteration"),topAnimationStart:ze("animationstart"),topBlur:"blur",topCancel:"cancel",topChange:"change",topClick:"click",topClose:"close",topCompositionEnd:"compositionend",topCompositionStart:"compositionstart",topCompositionUpdate:"compositionupdate",topContextMenu:"contextmenu",topCopy:"copy",topCut:"cut",topDoubleClick:"dblclick",topDrag:"drag",topDragEnd:"dragend",topDragEnter:"dragenter",topDragExit:"dragexit",topDragLeave:"dragleave",topDragOver:"dragover",topDragStart:"dragstart",topDrop:"drop",topFocus:"focus",topInput:"input",topKeyDown:"keydown",topKeyPress:"keypress",topKeyUp:"keyup",topLoad:"load",topLoadStart:"loadstart",topMouseDown:"mousedown",topMouseMove:"mousemove",topMouseOut:"mouseout",topMouseOver:"mouseover",topMouseUp:"mouseup",topPaste:"paste",topScroll:"scroll",topSelectionChange:"selectionchange",topTextInput:"textInput",topToggle:"toggle",topTouchCancel:"touchcancel",topTouchEnd:"touchend",topTouchMove:"touchmove",topTouchStart:"touchstart",topTransitionEnd:ze("transitionend"),topWheel:"wheel"},ti={topAbort:"abort",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topSeeked:"seeked",topSeeking:"seeking",topStalled:"stalled",topSuspend:"suspend",topTimeUpdate:"timeupdate",topVolumeChange:"volumechange",topWaiting:"waiting"},ni={},ri=0,ii="_reactListenersID"+(""+Math.random()).slice(2),oi=hn.canUseDOM&&"documentMode"in document&&11>
1=document.documentMode,ai={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"topBlur topContextMenu topFocus topKeyDown topKeyUp topMouseDown topMouseUp topSelectionChange".split(" ")}},si=null,ui=null,ci=null,li=!1,hi={eventTypes:ai,extractEvents:function(e,t,n,r){var i,o=r.window===r?r.document:9===r.nodeType?r:r.ownerDocument;if(!(i=!o)){e:{o=Ge(o),i=Tn.onSelect;for(var a=0;a<i.length;a++){var s=i[a];if(!o.hasOwnProperty(s)||!o[s]){o=!1;break e}}o=!0}i=!o}if(i)return null;switch(o=t?b(t):window,e){case"topFocus":(X(o)||"true"===o.contentEditable)&&(si=o,ui=t,ci=null);break;case"topBlur":ci=ui=si=null;break;case"topMouseDown":li=!0;break;case"topContextMenu":case"topMouseUp":return li=!1,$e(n,r);case"topSelectionChange":if(oi)break;case"topKeyDown":case"topKeyUp":return $e(n,r)}return null}};Pn.injectEventPluginOrder("ResponderEventPlugin SimpleEventPlugin TapEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" ")),In=Ln.getFiberCurrentPropsFromNode,kn=Ln.getInstanceFromNode,On=Ln.getNodeFromInstance,Pn.injectEventPluginsByName({SimpleEventPlugin:zr,EnterLeaveEventPlugin:xr,ChangeEventPlugin:Or,SelectEventPlugin:hi,BeforeInputEventPlugin:Jn});var fi=null,pi=null;new Set;var di=void 0,yi=void 0,vi=Array.isArray,mi=gt(!0),gi=gt(!1),_i={},bi=Object.freeze({default:Pt}),wi=bi&&Pt||bi,Ei=wi.default?wi.default:wi,Ci="object"===typeof performance&&"function"===typeof performance.now,Ti=void 0;Ti=Ci?function(){return performance.now()}:function(){return Date.now()};var Si=void 0,Ii=void 0;if(hn.canUseDOM)if("function"!==typeof requestIdleCallback||"function"!==typeof cancelIdleCallback){var ki=null,Oi=!1,Ni=-1,Pi=!1,Ri=0,Ai=33,xi=33,Di=void 0;Di=Ci?{didTimeout:!1,timeRemaining:function(){var e=Ri-performance.now();return 0<e?e:0}}:{didTimeout:!1,timeRemaining:function(){var e=Ri-Date.now();return 0<e?e:0}};var Li="__reactIdleCallback$"+Math.random().toString(36).slice(2);window.addEventListener("message",function(e){if(e.source===window&&e.data===Li){if(Oi=!1,e=Ti(),0>=Ri-e){if(!(-1!==Ni&&Ni<=e))return void(Pi||(Pi=!0,requestAnimationFrame(Ui)));Di.didTimeout=!0}else Di.didTimeout=!1;Ni=-1,e=ki,ki=null,null!==e&&e(Di)}},!1);var Ui=function(e){Pi=!1;var t=e-Ri+xi;t<xi&&Ai<xi?(8>t&&(t=8),xi=t<Ai?Ai:t):Ai=t,Ri=e+xi,Oi||(Oi=!0,window.postMessage(Li,"*"))};Si=function(e,t){return ki=e,null!=t&&"number"===typeof t.timeout&&(Ni=Ti()+t.timeout),Pi||(Pi=!0,requestAnimationFrame(Ui)),0},Ii=function(){ki=null,Oi=!1,Ni=-1}}else Si=window.requestIdleCallback,Ii=window.cancelIdleCallback;else Si=function(e){return setTimeout(function(){e({timeRemaining:function(){return 1/0},didTimeout:!1})})},Ii=function(e){clearTimeout(e)};var Mi={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"},Fi=void 0,ji=function(e){return"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n)})}:e}(function(e,t){if(e.namespaceURI!==Mi.svg||"innerHTML"in e)e.innerHTML=t;else{for(Fi=Fi||document.createElement("div"),Fi.innerHTML="<svg>"+t+"</svg>",t=Fi.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}}),Bi={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,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},Wi=["Webkit","ms","Moz","O"];Object.keys(Bi).forEach(function(e){Wi.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Bi[t]=Bi[e]})});var Vi=fn({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}),Hi=pn.thatReturns(""),qi=Object.freeze({createElement:Gt,createTextNode:Qt,setInitialProperties:Yt,diffProperties:Xt,updateProperties:$t,diffHydratedProperties:Jt,diffHydratedText:Zt,warnForUnmatchedText:function(){},warnForDeletedHydratableElement:function(){},warnForDeletedHydratableText:function(){},warnForInsertedHydratedElement:function(){},warnForInsertedHydratedText:function(){},restoreControlledState:function(e,t,n){switch(t){case"input":if(ye(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 i=n[t];if(i!==e&&i.form===e.form){var o=w(i);o||r("90"),ne(i),ye(i,o)}}}break;case"textarea":Ft(e,n);break;case"select":null!=(t=n.value)&&Dt(e,!!n.multiple,t,!1)}}});er.injectFiberControlledHostComponent(qi);var Ki=null,zi=null;en.prototype.render=function(e){this._defer||r("250"),this._hasChildren=!0,this._children=e;var t=this._root._internalRoot,n=this._expirationTime,i=new tn;return Gi.updateContainerAtExpirationTime(e,t,null,n,i._onCommit),i},en.prototype.then=function(e){if(this._didComplete)e();else{var t=this._callbacks;null===t&&(t=this._callbacks=[]),t.push(e)}},en.prototype.commit=function(){var e=this._root._internalRoot,t=e.firstBatch;if(this._defer&&null!==t||r("251"),this._hasChildren){var n=this._expirationTime;if(t!==this){this._hasChildren&&(n=this._expirationTime=t._expirationTime,this.render(this._children));for(var i=null,o=t;o!==this;)i=o,o=o._next;null===i&&r("251"),i._next=o._next,this._next=t,e.firstBatch=this}this._defer=!1,Gi.flushRoot(e,n),t=this._next,this._next=null,t=e.firstBatch=t,null!==t&&t._hasChildren&&t.render(t._children)}else this._next=null,this._defer=!1},en.prototype._onComplete=function(){if(!this._didComplete){this._didComplete=!0;var e=this._callbacks;
1if(null!==e)for(var t=0;t<e.length;t++)(0,e[t])()}},tn.prototype.then=function(e){if(this._didCommit)e();else{var t=this._callbacks;null===t&&(t=this._callbacks=[]),t.push(e)}},tn.prototype._onCommit=function(){if(!this._didCommit){this._didCommit=!0;var e=this._callbacks;if(null!==e)for(var t=0;t<e.length;t++){var n=e[t];"function"!==typeof n&&r("191",n),n()}}},nn.prototype.render=function(e,t){var n=this._internalRoot,r=new tn;return t=void 0===t?null:t,null!==t&&r.then(t),Gi.updateContainer(e,n,null,r._onCommit),r},nn.prototype.unmount=function(e){var t=this._internalRoot,n=new tn;return e=void 0===e?null:e,null!==e&&n.then(e),Gi.updateContainer(null,t,null,n._onCommit),n},nn.prototype.legacy_renderSubtreeIntoContainer=function(e,t,n){var r=this._internalRoot,i=new tn;return n=void 0===n?null:n,null!==n&&i.then(n),Gi.updateContainer(t,r,e,i._onCommit),i},nn.prototype.createBatch=function(){var e=new en(this),t=e._expirationTime,n=this._internalRoot,r=n.firstBatch;if(null===r)n.firstBatch=e,e._next=null;else{for(n=null;null!==r&&r._expirationTime<=t;)n=r,r=r._next;e._next=r,null!==n&&(n._next=e)}return e};var Gi=Ei({getRootHostContext:function(e){var t=e.nodeType;switch(t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:Wt(null,"");break;default:t=8===t?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=Wt(e,t)}return e},getChildHostContext:function(e,t){return Wt(e,t)},getPublicInstance:function(e){return e},prepareForCommit:function(){Ki=Yr;var e=dn();if(Xe(e)){if("selectionStart"in e)var t={start:e.selectionStart,end:e.selectionEnd};else e:{var n=window.getSelection&&window.getSelection();if(n&&0!==n.rangeCount){t=n.anchorNode;var r=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{t.nodeType,i.nodeType}catch(e){t=null;break e}var o=0,a=-1,s=-1,u=0,c=0,l=e,h=null;t:for(;;){for(var f;l!==t||0!==r&&3!==l.nodeType||(a=o+r),l!==i||0!==n&&3!==l.nodeType||(s=o+n),3===l.nodeType&&(o+=l.nodeValue.length),null!==(f=l.firstChild);)h=l,l=f;for(;;){if(l===e)break t;if(h===t&&++u===r&&(a=o),h===i&&++c===n&&(s=o),null!==(f=l.nextSibling))break;l=h,h=l.parentNode}l=f}t=-1===a||-1===s?null:{start:a,end:s}}else t=null}t=t||{start:0,end:0}}else t=null;zi={focusedElem:e,selectionRange:t},Be(!1)},resetAfterCommit:function(){var e=zi,t=dn(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&vn(document.documentElement,n)){if(Xe(n))if(t=r.start,e=r.end,void 0===e&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(window.getSelection){t=window.getSelection();var i=n[R()].length;e=Math.min(r.start,i),r=void 0===r.end?e:Math.min(r.end,i),!t.extend&&e>r&&(i=r,r=e,e=i),i=Ye(n,e);var o=Ye(n,r);if(i&&o&&(1!==t.rangeCount||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)){var a=document.createRange();a.setStart(i.node,i.offset),t.removeAllRanges(),e>r?(t.addRange(a),t.extend(o.node,o.offset)):(a.setEnd(o.node,o.offset),t.addRange(a))}}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}zi=null,Be(Ki),Ki=null},createInstance:function(e,t,n,r,i){return e=Gt(e,t,n,r),e[xn]=i,e[Dn]=t,e},appendInitialChild:function(e,t){e.appendChild(t)},finalizeInitialChildren:function(e,t,n,r){return Yt(e,t,n,r),on(t,n)},prepareUpdate:function(e,t,n,r,i){return Xt(e,t,n,r,i)},shouldSetTextContent:function(e,t){return"textarea"===e||"string"===typeof t.children||"number"===typeof t.children||"object"===typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&"string"===typeof t.dangerouslySetInnerHTML.__html},shouldDeprioritizeSubtree:function(e,t){return!!t.hidden},createTextInstance:function(e,t,n,r){return e=Qt(e,t),e[xn]=r,e},now:Ti,mutation:{commitMount:function(e,t,n){on(t,n)&&e.focus()},commitUpdate:function(e,t,n,r,i){e[Dn]=i,$t(e,t,n,r,i)},resetTextContent:function(e){Vt(e,"")},commitTextUpdate:function(e,t,n){e.nodeValue=n},appendChild:function(e,t){e.appendChild(t)},appendChildToContainer:function(e,t){8===e.nodeType?e.parentNode.insertBefore(t,e):e.appendChild(t)},insertBefore:function(e,t,n){e.insertBefore(t,n)},insertInContainerBefore:function(e,t,n){8===e.nodeType?e.parentNode.insertBefore(t,n):e.insertBefore(t,n)},removeChild:function(e,t){e.removeChild(t)},removeChildFromContainer:function(e,t){8===e.nodeType?e.parentNode.removeChild(t):e.removeChild(t)}},hydration:{canHydrateInstance:function(e,t){return 1!==e.nodeType||t.toLowerCase()!==e.nodeName.toLowerCase()?null:e},canHydrateTextInstance:function(e,t){return""===t||3!==e.nodeType?null:e},getNextHydratableSibling:function(e){for(e=e.nextSibling;e&&1!==e.nodeType&&3!==e.nodeType;)e=e.nextSibling;return e},getFirstHydratableChild:function(e){for(e=e.firstChild;e&&1!==e.nodeType&&3!==e.nodeType;)e=e.nextSibling;return e},hydrateInstance:function(e,t,n,r,i,o){return e[xn]=o,e[Dn]=n,Jt(e,t,n,i,r)},hydrateTextInstance:function(e,t,n){return e[xn]=n,Zt(e,t)},didNotMatchHydratedContainerTextInstance:function(){},didNotMatchHydratedTextInstance:function(){},didNotHydrateContainerInstance:function(){},didNotHydrateInstance:function(){},didNotFindHydratableContainerInstance:function(){},didNotFindHydratableContainerTextInstance:function(){},didNotFindHydratableInstance:function(){},didNotFindHydratableTextInstance:function(){}},scheduleDeferredCallback:Si,cancelDeferredCallback:Ii}),Qi=Gi;z=Qi.batchedUpdates,G=Qi.interactiveUpdates,Q=Qi.flushInteractiveUpdates;var Yi={createPortal:un,findDOMNode:function(e){return null==e?null:1===e.nodeType?e:Gi.findHostInstance(e)},hydrate:function(e,t,n){return sn(null,e,t,!0,n)},render:function(e,t,n){return sn(null,e,t,!1,n)},unstable_renderSubtreeIntoContainer:function(e,t,n,i){return(null==e||void 0===e._reactInternalFiber)&&r("38"),sn(e,t,n,!1,i)},unmountComponentAtNode:function(e){return rn(e)||r("40"),!!e._reactRootContainer&&(Gi.unbatchedUpdates(function(){sn(null,null,e,!1,function(){e._reactRootContainer=null})}),!0)},unstable_createPortal:function(){return un.apply(void 0,arguments)},unstable_batchedUpdates:Gi.batchedUpdates,unstable_deferredUpdates:Gi.deferredUpdates,flushSync:Gi.flushSync,unstable_flushControlled:Gi.flushControlled,__SECRET_INT
1ERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{EventPluginHub:Rn,EventPluginRegistry:Sn,EventPropagators:Un,ReactControlledComponent:rr,ReactDOMComponentTree:Ln,ReactDOMEventListener:Xr},unstable_createRoot:function(e,t){return new nn(e,!0,null!=t&&!0===t.hydrate)}};Gi.injectIntoDevTools({findFiberByHostInstance:_,bundleType:0,version:"16.3.2",rendererPackageName:"react-dom"});var Xi=Object.freeze({default:Yi}),$i=Xi&&Yi||Xi;e.exports=$i.default?$i.default:$i},function(e,t,n){"use strict";var r=!("undefined"===typeof window||!window.document||!window.document.createElement),i={canUseDOM:r,canUseWorkers:"undefined"!==typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen,isInWorker:!r};e.exports=i},function(e,t,n){"use strict";function r(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}}e.exports=r},function(e,t,n){"use strict";function r(e,t){return e===t?0!==e||0!==t||1/e===1/t:e!==e&&t!==t}function i(e,t){if(r(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(var a=0;a<n.length;a++)if(!o.call(t,n[a])||!r(e[n[a]],t[n[a]]))return!1;return!0}var o=Object.prototype.hasOwnProperty;e.exports=i},function(e,t,n){"use strict";function r(e,t){return!(!e||!t)&&(e===t||!i(e)&&(i(t)?r(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}var i=n(59);e.exports=r},function(e,t,n){"use strict";function r(e){return i(e)&&3==e.nodeType}var i=n(60);e.exports=r},function(e,t,n){"use strict";function r(e){var t=e?e.ownerDocument||e:document,n=t.defaultView||window;return!(!e||!("function"===typeof n.Node?e instanceof n.Node:"object"===typeof e&&"number"===typeof e.nodeType&&"string"===typeof e.nodeName))}e.exports=r},function(e,t){},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(0),s=n.n(a),u=n(6),c=n(9),l=n(4),h=n.n(l),f=n(99),p=n(101),d=n(103),y=n(104),v=n(105),m=n(112),g=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),_=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),g(t,[{key:"componentWillMount",value:function(){var e={apiKey:"AIzaSyC0fqjDZ5svMpxt2t1wFfZoBmquJ_eAeck",authDomain:"react-auth-58991.firebaseapp.com",databaseURL:"https://react-auth-58991.firebaseio.com",projectId:"react-auth-58991",storageBucket:"react-auth-58991.appspot.com",messagingSenderId:"725846966804"};h.a.apps.length||h.a.initializeApp(e)}},{key:"render",value:function(){return s.a.createElement(u.a,null,s.a.createElement("div",{className:"container"},s.a.createElement(u.d,null,s.a.createElement(u.c,{exact:!0,path:c.f,component:function(){return s.a.createElement(y.a,{title:"log in"})}}),s.a.createElement(u.c,{exact:!0,path:c.b,component:function(){return s.a.createElement(v.a,{title:"Blog admin"})}}),s.a.createElement(u.c,{exact:!0,path:c.e,component:function(){return s.a.createElement(p.a,{title:"Dev Blog"})}}),s.a.createElement(u.c,{exact:!0,path:c.c,component:function(){return s.a.createElement(p.a,{title:"Dev Blog"})}}),s.a.createElement(u.c,{exact:!0,path:c.d,component:function(){return s.a.createElement(d.a,{title:"Community"})}}),s.a.createElement(u.c,{exact:!0,path:c.a,component:function(){return s.a.createElement(f.a,{title:"About"})}}))))}}]),t}(a.Component);t.a=Object(m.a)(_)},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(1),s=n.n(a),u=n(0),c=n.n(u),l=n(2),h=n.n(l),f=n(66),p=n.n(f),d=n(20),y=function(e){function t(){var n,o,a;r(this,t);for(var s=arguments.length,u=Array(s),c=0;c<s;c++)u[c]=arguments[c];return n=o=i(this,e.call.apply(e,[this].concat(u))),o.history=p()(o.props),a=n,i(o,a)}return o(t,e),t.prototype.componentWillMount=function(){s()(!this.props.history,"<BrowserRouter> ignores the history prop. To use a custom history, use `import { Router }` instead of `import { BrowserRouter as Router }`.")},t.prototype.render=function(){return c.a.createElement(d.a,{history:this.history,children:this.props.children})},t}(c.a.Component);y.propTypes={basename:h.a.string,forceRefresh:h.a.bool,getUserConfirmation:h.a.func,keyLength:h.a.number,children:h.a.node},t.a=y},function(e,t,n){"use strict";var r=n(17),i=n(16),o=n(65);e.exports=function(){function e(e,t,n,r,a,s){s!==o&&i(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function t(){return e}e.isRequired=e;
1var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=r,n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i="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},o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=n(1),s=r(a),u=n(3),c=r(u),l=n(18),h=n(7),f=n(19),p=r(f),d=n(31),y=function(){try{return window.history.state||{}}catch(e){return{}}},v=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,c.default)(d.canUseDOM,"Browser history needs a DOM");var t=window.history,n=(0,d.supportsHistory)(),r=!(0,d.supportsPopStateOnHashChange)(),a=e.forceRefresh,u=void 0!==a&&a,f=e.getUserConfirmation,v=void 0===f?d.getConfirmation:f,m=e.keyLength,g=void 0===m?6:m,_=e.basename?(0,h.stripTrailingSlash)((0,h.addLeadingSlash)(e.basename)):"",b=function(e){var t=e||{},n=t.key,r=t.state,i=window.location,o=i.pathname,a=i.search,u=i.hash,c=o+a+u;return(0,s.default)(!_||(0,h.hasBasename)(c,_),'You are attempting to use a basename on a page whose URL path does not begin with the basename. Expected path "'+c+'" to begin with "'+_+'".'),_&&(c=(0,h.stripBasename)(c,_)),(0,l.createLocation)(c,r,n)},w=function(){return Math.random().toString(36).substr(2,g)},E=(0,p.default)(),C=function(e){o(V,e),V.length=t.length,E.notifyListeners(V.location,V.action)},T=function(e){(0,d.isExtraneousPopstateEvent)(e)||k(b(e.state))},S=function(){k(b(y()))},I=!1,k=function(e){if(I)I=!1,C();else{E.confirmTransitionTo(e,"POP",v,function(t){t?C({action:"POP",location:e}):O(e)})}},O=function(e){var t=V.location,n=P.indexOf(t.key);-1===n&&(n=0);var r=P.indexOf(e.key);-1===r&&(r=0);var i=n-r;i&&(I=!0,D(i))},N=b(y()),P=[N.key],R=function(e){return _+(0,h.createPath)(e)},A=function(e,r){(0,s.default)(!("object"===("undefined"===typeof e?"undefined":i(e))&&void 0!==e.state&&void 0!==r),"You should avoid providing a 2nd state argument to push when the 1st argument is a location-like object that already has state; it is ignored");var o=(0,l.createLocation)(e,r,w(),V.location);E.confirmTransitionTo(o,"PUSH",v,function(e){if(e){var r=R(o),i=o.key,a=o.state;if(n)if(t.pushState({key:i,state:a},null,r),u)window.location.href=r;else{var c=P.indexOf(V.location.key),l=P.slice(0,-1===c?0:c+1);l.push(o.key),P=l,C({action:"PUSH",location:o})}else(0,s.default)(void 0===a,"Browser history cannot push state in browsers that do not support HTML5 history"),window.location.href=r}})},x=function(e,r){(0,s.default)(!("object"===("undefined"===typeof e?"undefined":i(e))&&void 0!==e.state&&void 0!==r),"You should avoid providing a 2nd state argument to replace when the 1st argument is a location-like object that already has state; it is ignored");var o=(0,l.createLocation)(e,r,w(),V.location);E.confirmTransitionTo(o,"REPLACE",v,function(e){if(e){var r=R(o),i=o.key,a=o.state;if(n)if(t.replaceState({key:i,state:a},null,r),u)window.location.replace(r);else{var c=P.indexOf(V.location.key);-1!==c&&(P[c]=o.key),C({action:"REPLACE",location:o})}else(0,s.default)(void 0===a,"Browser history cannot replace state in browsers that do not support HTML5 history"),window.location.replace(r)}})},D=function(e){t.go(e)},L=function(){return D(-1)},U=function(){return D(1)},M=0,F=function(e){M+=e,1===M?((0,d.addEventListener)(window,"popstate",T),r&&(0,d.addEventListener)(window,"hashchange",S)):0===M&&((0,d.removeEventListener)(window,"popstate",T),r&&(0,d.removeEventListener)(window,"hashchange",S))},j=!1,B=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=E.setPrompt(e);return j||(F(1),j=!0),function(){return j&&(j=!1,F(-1)),t()}},W=function(e){var t=E.appendListener(e);return F(1),function(){F(-1),t()}},V={length:t.length,action:"POP",location:N,createHref:R,push:A,replace:x,go:D,goBack:L,goForward:U,block:B,listen:W};return V};t.default=v},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(1),s=n.n(a),u=n(0),c=n.n(u),l=n(2),h=n.n(l),f=n(68),p=n.n(f),d=n(20),y=function(e){function t(){var n,o,a;r(this,t);for(var s=arguments.length,u=Array(s),c=0;c<s;c++)u[c]=arguments[c];return n=o=i(this,e.call.apply(e,[this].concat(u))),o.history=p()(o.props),a=n,i(o,a)}return o(t,e),t.prototype.componentWillMount=function(){s()(!this.props.history,"<HashRouter> ignores the history prop. To use a custom history, use `import { Router }` instead of `import { HashRouter as Router }`.")},t.prototype.render=function(){return c.a.createElement(d.a,{history:this.history,children:this.props.children})},t}(c.a.Component);y.propTypes={basename:h.a.string,getUserConfirmation:h.a.func,hashType:h.a.oneOf(["hashbang","noslash","slash"]),children:h.a.node}},function(e,t,n){"use strict";
1function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=n(1),a=r(o),s=n(3),u=r(s),c=n(18),l=n(7),h=n(19),f=r(h),p=n(31),d={hashbang:{encodePath:function(e){return"!"===e.charAt(0)?e:"!/"+(0,l.stripLeadingSlash)(e)},decodePath:function(e){return"!"===e.charAt(0)?e.substr(1):e}},noslash:{encodePath:l.stripLeadingSlash,decodePath:l.addLeadingSlash},slash:{encodePath:l.addLeadingSlash,decodePath:l.addLeadingSlash}},y=function(){var e=window.location.href,t=e.indexOf("#");return-1===t?"":e.substring(t+1)},v=function(e){return window.location.hash=e},m=function(e){var t=window.location.href.indexOf("#");window.location.replace(window.location.href.slice(0,t>=0?t:0)+"#"+e)},g=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,u.default)(p.canUseDOM,"Hash history needs a DOM");var t=window.history,n=(0,p.supportsGoWithoutReloadUsingHash)(),r=e.getUserConfirmation,o=void 0===r?p.getConfirmation:r,s=e.hashType,h=void 0===s?"slash":s,g=e.basename?(0,l.stripTrailingSlash)((0,l.addLeadingSlash)(e.basename)):"",_=d[h],b=_.encodePath,w=_.decodePath,E=function(){var e=w(y());return(0,a.default)(!g||(0,l.hasBasename)(e,g),'You are attempting to use a basename on a page whose URL path does not begin with the basename. Expected path "'+e+'" to begin with "'+g+'".'),g&&(e=(0,l.stripBasename)(e,g)),(0,c.createLocation)(e)},C=(0,f.default)(),T=function(e){i(K,e),K.length=t.length,C.notifyListeners(K.location,K.action)},S=!1,I=null,k=function(){var e=y(),t=b(e);if(e!==t)m(t);else{var n=E(),r=K.location;if(!S&&(0,c.locationsAreEqual)(r,n))return;if(I===(0,l.createPath)(n))return;I=null,O(n)}},O=function(e){if(S)S=!1,T();else{C.confirmTransitionTo(e,"POP",o,function(t){t?T({action:"POP",location:e}):N(e)})}},N=function(e){var t=K.location,n=x.lastIndexOf((0,l.createPath)(t));-1===n&&(n=0);var r=x.lastIndexOf((0,l.createPath)(e));-1===r&&(r=0);var i=n-r;i&&(S=!0,M(i))},P=y(),R=b(P);P!==R&&m(R);var A=E(),x=[(0,l.createPath)(A)],D=function(e){return"#"+b(g+(0,l.createPath)(e))},L=function(e,t){(0,a.default)(void 0===t,"Hash history cannot push state; it is ignored");var n=(0,c.createLocation)(e,void 0,void 0,K.location);C.confirmTransitionTo(n,"PUSH",o,function(e){if(e){var t=(0,l.createPath)(n),r=b(g+t);if(y()!==r){I=t,v(r);var i=x.lastIndexOf((0,l.createPath)(K.location)),o=x.slice(0,-1===i?0:i+1);o.push(t),x=o,T({action:"PUSH",location:n})}else(0,a.default)(!1,"Hash history cannot PUSH the same path; a new entry will not be added to the history stack"),T()}})},U=function(e,t){(0,a.default)(void 0===t,"Hash history cannot replace state; it is ignored");var n=(0,c.createLocation)(e,void 0,void 0,K.location);C.confirmTransitionTo(n,"REPLACE",o,function(e){if(e){var t=(0,l.createPath)(n),r=b(g+t);y()!==r&&(I=t,m(r));var i=x.indexOf((0,l.createPath)(K.location));-1!==i&&(x[i]=t),T({action:"REPLACE",location:n})}})},M=function(e){(0,a.default)(n,"Hash history go(n) causes a full page reload in this browser"),t.go(e)},F=function(){return M(-1)},j=function(){return M(1)},B=0,W=function(e){B+=e,1===B?(0,p.addEventListener)(window,"hashchange",k):0===B&&(0,p.removeEventListener)(window,"hashchange",k)},V=!1,H=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=C.setPrompt(e);return V||(W(1),V=!0),function(){return V&&(V=!1,W(-1)),t()}},q=function(e){var t=C.appendListener(e);return W(1),function(){W(-1),t()}},K={length:t.length,action:"POP",location:A,createHref:D,push:L,replace:U,go:M,goBack:F,goForward:j,block:H,listen:q};return K};t.default=g},function(e,t,n){"use strict";var r=n(33);r.a},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i="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},o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}
1,a=n(1),s=r(a),u=n(7),c=n(18),l=n(19),h=r(l),f=function(e,t,n){return Math.min(Math.max(e,t),n)},p=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.getUserConfirmation,n=e.initialEntries,r=void 0===n?["/"]:n,a=e.initialIndex,l=void 0===a?0:a,p=e.keyLength,d=void 0===p?6:p,y=(0,h.default)(),v=function(e){o(N,e),N.length=N.entries.length,y.notifyListeners(N.location,N.action)},m=function(){return Math.random().toString(36).substr(2,d)},g=f(l,0,r.length-1),_=r.map(function(e){return"string"===typeof e?(0,c.createLocation)(e,void 0,m()):(0,c.createLocation)(e,void 0,e.key||m())}),b=u.createPath,w=function(e,n){(0,s.default)(!("object"===("undefined"===typeof e?"undefined":i(e))&&void 0!==e.state&&void 0!==n),"You should avoid providing a 2nd state argument to push when the 1st argument is a location-like object that already has state; it is ignored");var r=(0,c.createLocation)(e,n,m(),N.location);y.confirmTransitionTo(r,"PUSH",t,function(e){if(e){var t=N.index,n=t+1,i=N.entries.slice(0);i.length>n?i.splice(n,i.length-n,r):i.push(r),v({action:"PUSH",location:r,index:n,entries:i})}})},E=function(e,n){(0,s.default)(!("object"===("undefined"===typeof e?"undefined":i(e))&&void 0!==e.state&&void 0!==n),"You should avoid providing a 2nd state argument to replace when the 1st argument is a location-like object that already has state; it is ignored");var r=(0,c.createLocation)(e,n,m(),N.location);y.confirmTransitionTo(r,"REPLACE",t,function(e){e&&(N.entries[N.index]=r,v({action:"REPLACE",location:r}))})},C=function(e){var n=f(N.index+e,0,N.entries.length-1),r=N.entries[n];y.confirmTransitionTo(r,"POP",t,function(e){e?v({action:"POP",location:r,index:n}):v()})},T=function(){return C(-1)},S=function(){return C(1)},I=function(e){var t=N.index+e;return t>=0&&t<N.entries.length},k=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return y.setPrompt(e)},O=function(e){return y.appendListener(e)},N={length:_.length,action:"POP",location:_[g],index:g,entries:_,createHref:b,push:w,replace:E,go:C,goBack:T,goForward:S,canGo:I,block:k,listen:O};return N};t.default=p},function(e,t,n){"use strict";function r(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}var i=n(0),o=n.n(i),a=n(2),s=n.n(a),u=n(34),c=n(32),l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},h="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},f=function(e){var t=e.to,n=e.exact,i=e.strict,a=e.location,s=e.activeClassName,f=e.className,p=e.activeStyle,d=e.style,y=e.isActive,v=e.ariaCurrent,m=r(e,["to","exact","strict","location","activeClassName","className","activeStyle","style","isActive","ariaCurrent"]);return o.a.createElement(u.a,{path:"object"===("undefined"===typeof t?"undefined":h(t))?t.pathname:t,exact:n,strict:i,location:a,children:function(e){var n=e.location,r=e.match,i=!!(y?y(r,n):r);return o.a.createElement(c.a,l({to:t,className:i?[f,s].filter(function(e){return e}).join(" "):f,style:i?l({},d,p):d,"aria-current":i&&v},m))}})};f.propTypes={to:c.a.propTypes.to,exact:s.a.bool,strict:s.a.bool,location:s.a.object,activeClassName:s.a.string,className:s.a.string,activeStyle:s.a.object,style:s.a.object,isActive:s.a.func,ariaCurrent:s.a.oneOf(["page","step","location","true"])},f.defaultProps={activeClassName:"active",ariaCurrent:"true"}},function(e,t,n){function r(e,t){for(var n,r=[],i=0,o=0,a="",s=t&&t.delimiter||"/";null!=(n=g.exec(e));){var l=n[0],h=n[1],f=n.index;if(a+=e.slice(o,f),o=f+l.length,h)a+=h[1];else{var p=e[o],d=n[2],y=n[3],v=n[4],m=n[5],_=n[6],b=n[7];a&&(r.push(a),a="");var w=null!=d&&null!=p&&p!==d,E="+"===_||"*"===_,C="?"===_||"*"===_,T=n[2]||s,S=v||m;r.push({name:y||i++,prefix:d||"",delimiter:T,optional:C,repeat:E,partial:w,asterisk:!!b,pattern:S?c(S):b?".*":"[^"+u(T)+"]+?"})}}return o<e.length&&(a+=e.substr(o)),a&&r.push(a),r}function i(e,t){return s(r(e,t))}function o(e){return encodeURI(e).replace(/[\/?#]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}function a(e){return encodeURI(e).replace(/[?#]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}function s(e){for(var t=new Array(e.length),n=0;n<e.length;n++)"object"===typeof e[n]&&(t[n]=new RegExp("^(?:"+e[n].pattern+")$"));return function(n,r){for(var i="",s=n||{},u=r||{},c=u.pretty?o:encodeURIComponent,l=0;l<e.length;l++){var h=e[l];
1if("string"!==typeof h){var f,p=s[h.name];if(null==p){if(h.optional){h.partial&&(i+=h.prefix);continue}throw new TypeError('Expected "'+h.name+'" to be defined')}if(m(p)){if(!h.repeat)throw new TypeError('Expected "'+h.name+'" to not repeat, but received `'+JSON.stringify(p)+"`");if(0===p.length){if(h.optional)continue;throw new TypeError('Expected "'+h.name+'" to not be empty')}for(var d=0;d<p.length;d++){if(f=c(p[d]),!t[l].test(f))throw new TypeError('Expected all "'+h.name+'" to match "'+h.pattern+'", but received `'+JSON.stringify(f)+"`");i+=(0===d?h.prefix:h.delimiter)+f}}else{if(f=h.asterisk?a(p):c(p),!t[l].test(f))throw new TypeError('Expected "'+h.name+'" to match "'+h.pattern+'", but received "'+f+'"');i+=h.prefix+f}}else i+=h}return i}}function u(e){return e.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function c(e){return e.replace(/([=!:$\/()])/g,"\\$1")}function l(e,t){return e.keys=t,e}function h(e){return e.sensitive?"":"i"}function f(e,t){var n=e.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)t.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return l(e,t)}function p(e,t,n){for(var r=[],i=0;i<e.length;i++)r.push(v(e[i],t,n).source);return l(new RegExp("(?:"+r.join("|")+")",h(n)),t)}function d(e,t,n){return y(r(e,n),t,n)}function y(e,t,n){m(t)||(n=t||n,t=[]),n=n||{};for(var r=n.strict,i=!1!==n.end,o="",a=0;a<e.length;a++){var s=e[a];if("string"===typeof s)o+=u(s);else{var c=u(s.prefix),f="(?:"+s.pattern+")";t.push(s),s.repeat&&(f+="(?:"+c+f+")*"),f=s.optional?s.partial?c+"("+f+")?":"(?:"+c+"("+f+"))?":c+"("+f+")",o+=f}}var p=u(n.delimiter||"/"),d=o.slice(-p.length)===p;return r||(o=(d?o.slice(0,-p.length):o)+"(?:"+p+"(?=$))?"),o+=i?"$":r&&d?"":"(?="+p+"|$)",l(new RegExp("^"+o,h(n)),t)}function v(e,t,n){return m(t)||(n=t||n,t=[]),n=n||{},e instanceof RegExp?f(e,t):m(e)?p(e,t,n):d(e,t,n)}var m=n(73);e.exports=v,e.exports.parse=r,e.exports.compile=i,e.exports.tokensToFunction=s,e.exports.tokensToRegExp=y;var g=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g")},function(e,t){e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},function(e,t,n){"use strict";var r=n(35);r.a},function(e,t,n){"use strict";var r=n(36);r.a},function(e,t,n){"use strict";var r=(n(77),n(78),n(79),n(13));n.d(t,"a",function(){return r.a}),n.d(t,"b",function(){return r.b});n(8)},function(e,t,n){"use strict";var r=n(1),i=(n.n(r),n(3));n.n(i),n(13),n(8),n(22),n(37),"function"===typeof Symbol&&Symbol.iterator,Object.assign},function(e,t,n){"use strict";var r=n(1),i=(n.n(r),n(3)),o=(n.n(i),n(13),n(8));n(22),n(37),Object.assign,o.f,o.a,o.a,o.a},function(e,t,n){"use strict";var r=n(1);n.n(r),n(8),n(13),n(22),"function"===typeof Symbol&&Symbol.iterator,Object.assign},function(e,t,n){"use strict";var r=n(38);r.a},function(e,t,n){"use strict";var r=n(39);t.a=r.a},function(e,t,n){"use strict";var r=n(12);r.a},function(e,t,n){"use strict";var r=n(40);t.a=r.a},function(e,t,n){!function(t,n){e.exports=n()}(0,function(){"use strict";var e={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},t={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},n=Object.defineProperty,r=Object.getOwnPropertyNames,i=Object.getOwnPropertySymbols,o=Object.getOwnPropertyDescriptor,a=Object.getPrototypeOf,s=a&&a(Object);return function u(c,l,h){if("string"!==typeof l){if(s){var f=a(l);f&&f!==s&&u(c,f,h)}var p=r(l);i&&(p=p.concat(i(l)));for(var d=0;d<p.length;++d){var y=p[d];if(!e[y]&&!t[y]&&(!h||!h[y])){var v=o(l,y);try{n(c,y,v)}catch(e){}}}return c}return c}})},function(e,t,n){n(86),e.exports=n(10).default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){function r(){}function i(e,t){return function(){e.apply(t,arguments)}}function o(e){if(!(this instanceof o))throw new TypeError("Promises must be constructed via new");if("function"!==typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],h(e,this)}function a(e,t){for(;3===e._state;)e=e._value;if(0===e._state)return void e._deferreds.push(t);e._handled=!0,o._immediateFn(function(){var n=1===e._state?t.onFulfilled:t.onRejected;if(null===n)return void(1===e._state?s:u)(t.promise,e._value);var r;try{r=n(e._value)}catch(e){return void u(t.promise,e)}s(t.promise,r)})}function s(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"===typeof t||"function"===typeof t)){var n=t.then;if(t instanceof o)return e._state=3,e._value=t,void c(e);if("function"===typeof n)return void h(i(n,t),e)}e._state=1,e._value=t,c(e)}catch(t){u(e,t)}}function u(e,t){e._state=2,e._value=t,c(e)}function c(e){2===e._state&&0===e._deferreds.length&&o._immediateFn(function(){e._handled||o._unhandledRejectionFn(e._value)});for(var t=0,n=e._deferreds.length;t<n;t++)a(e,e._deferreds[t]);e._deferreds=null}function l(e,t,n){this.onFulfilled="function"===typeof e?e:null,this.onRejected="function"===typeof t?t:null,this.promise=n}function h(e,t){var n=!1;try{e(function(e){n||(n=!0,s(t,e))},function(e){n||(n=!0,u(t,e))})}catch(e){if(n)return;n=!0,u(t,e)}}function f(e,t){return t={exports:{}},e(t,t.exports),t.exports}var p=n(89),d=(n.n(p),setTimeout);o.prototype.catch=function(e){return this.then(null,e)},o.prototype.then=function(e,t){var n=new this.constructor(r);return a(this,new l(e,t,n)),n},o.prototype.finally=function(e){var t=this.constructor;return this.then(function(n){return t.resolve(e()).then(function(){return n})},function(n){return t.resolve(e()).then(function(){return t.reject(n)})})},o.all=function(e){return new o(function(t,n){function r(e,a){try{if(a&&
1("object"===typeof a||"function"===typeof a)){var s=a.then;if("function"===typeof s)return void s.call(a,function(t){r(e,t)},n)}i[e]=a,0===--o&&t(i)}catch(e){n(e)}}if(!e||"undefined"===typeof e.length)throw new TypeError("Promise.all accepts an array");var i=Array.prototype.slice.call(e);if(0===i.length)return t([]);for(var o=i.length,a=0;a<i.length;a++)r(a,i[a])})},o.resolve=function(e){return e&&"object"===typeof e&&e.constructor===o?e:new o(function(t){t(e)})},o.reject=function(e){return new o(function(t,n){n(e)})},o.race=function(e){return new o(function(t,n){for(var r=0,i=e.length;r<i;r++)e[r].then(t,n)})},o._immediateFn="function"===typeof e&&function(t){e(t)}||function(e){d(e,0)},o._unhandledRejectionFn=function(e){"undefined"!==typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)};var y=function(){if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof t)return t;throw new Error("unable to locate global object")}();y.Promise||(y.Promise=o);var v=f(function(e){var t=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=t)}),m=f(function(e){var t=e.exports={version:"2.5.5"};"number"==typeof __e&&(__e=t)}),g=(m.version,function(e){return"object"===typeof e?null!==e:"function"===typeof e}),_=function(e){if(!g(e))throw TypeError(e+" is not an object!");return e},b=function(e){try{return!!e()}catch(e){return!0}},w=!b(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),E=v.document,C=g(E)&&g(E.createElement),T=function(e){return C?E.createElement(e):{}},S=!w&&!b(function(){return 7!=Object.defineProperty(T("div"),"a",{get:function(){return 7}}).a}),I=function(e,t){if(!g(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!g(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!g(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!g(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},k=Object.defineProperty,O=w?Object.defineProperty:function(e,t,n){if(_(e),t=I(t,!0),_(n),S)try{return k(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e},N={f:O},P=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},R=w?function(e,t,n){return N.f(e,t,P(1,n))}:function(e,t,n){return e[t]=n,e},A={}.hasOwnProperty,x=function(e,t){return A.call(e,t)},D=0,L=Math.random(),U=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++D+L).toString(36))},M=f(function(e){var t=U("src"),n=Function.toString,r=(""+n).split("toString");m.inspectSource=function(e){return n.call(e)},(e.exports=function(e,n,i,o){var a="function"==typeof i;a&&(x(i,"name")||R(i,"name",n)),e[n]!==i&&(a&&(x(i,t)||R(i,t,e[n]?""+e[n]:r.join(String(n)))),e===v?e[n]=i:o?e[n]?e[n]=i:R(e,n,i):(delete e[n],R(e,n,i)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[t]||n.call(this)})}),F=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e},j=function(e,t,n){if(F(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}},B=function(e,t,n){var r,i,o,a,s=e&B.F,u=e&B.G,c=e&B.S,l=e&B.P,h=e&B.B,f=u?v:c?v[t]||(v[t]={}):(v[t]||{}).prototype,p=u?m:m[t]||(m[t]={}),d=p.prototype||(p.prototype={});u&&(n=t);for(r in n)i=!s&&f&&void 0!==f[r],o=(i?f:n)[r],a=h&&i?j(o,v):l&&"function"==typeof o?j(Function.call,o):o,f&&M(f,r,o,e&B.U),p[r]!=o&&R(p,r,a),l&&d[r]!=o&&(d[r]=o)};v.core=m,B.F=1,B.G=2,B.S=4,B.P=8,B.B=16,B.W=32,B.U=64,B.R=128;var W=B,V={}.toString,H=function(e){return V.call(e).slice(8,-1)},q=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==H(e)?e.split(""):Object(e)},K=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e},z=function(e){return Object(K(e))},G=Math.ceil,Q=Math.floor,Y=function(e){return isNaN(e=+e)?0:(e>0?Q:G)(e)},X=Math.min,$=function(e){return e>0?X(Y(e),9007199254740991):0},J=Array.isArray||function(e){return"Array"==H(e)}
1,Z=v["__core-js_shared__"]||(v["__core-js_shared__"]={}),ee=function(e){return Z[e]||(Z[e]={})},te=f(function(e){var t=ee("wks"),n=v.Symbol,r="function"==typeof n;(e.exports=function(e){return t[e]||(t[e]=r&&n[e]||(r?n:U)("Symbol."+e))}).store=t}),ne=te("species"),re=function(e){var t;return J(e)&&(t=e.constructor,"function"!=typeof t||t!==Array&&!J(t.prototype)||(t=void 0),g(t)&&null===(t=t[ne])&&(t=void 0)),void 0===t?Array:t},ie=function(e,t){return new(re(e))(t)},oe=function(e,t){var n=1==e,r=2==e,i=3==e,o=4==e,a=6==e,s=5==e||a,u=t||ie;return function(t,c,l){for(var h,f,p=z(t),d=q(p),y=j(c,l,3),v=$(d.length),m=0,g=n?u(t,v):r?u(t,0):void 0;v>m;m++)if((s||m in d)&&(h=d[m],f=y(h,m,p),e))if(n)g[m]=f;else if(f)switch(e){case 3:return!0;case 5:return h;case 6:return m;case 2:g.push(h)}else if(o)return!1;return a?-1:i||o?o:g}},ae=te("unscopables"),se=Array.prototype;void 0==se[ae]&&R(se,ae,{});var ue=function(e){se[ae][e]=!0},ce=oe(5),le=!0;"find"in[]&&Array(1).find(function(){le=!1}),W(W.P+W.F*le,"Array",{find:function(e){return ce(this,e,arguments.length>1?arguments[1]:void 0)}}),ue("find");var he=(m.Array.find,oe(6)),fe=!0;"findIndex"in[]&&Array(1).findIndex(function(){fe=!1}),W(W.P+W.F*fe,"Array",{findIndex:function(e){return he(this,e,arguments.length>1?arguments[1]:void 0)}}),ue("findIndex");var pe=(m.Array.findIndex,te("match")),de=function(e){var t;return g(e)&&(void 0!==(t=e[pe])?!!t:"RegExp"==H(e))},ye=function(e,t,n){if(de(t))throw TypeError("String#"+n+" doesn't accept regex!");return String(K(e))},ve=te("match"),me="".startsWith;W(W.P+W.F*function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[ve]=!1,!"/./"[e](t)}catch(e){}}return!0}("startsWith"),"String",{startsWith:function(e){var t=ye(this,e,"startsWith"),n=$(Math.min(arguments.length>1?arguments[1]:void 0,t.length)),r=String(e);return me?me.call(t,r,n):t.slice(n,n+r.length)===r}});m.String.startsWith}.call(t,n(87).setImmediate,n(5))},function(e,t,n){(function(e){function r(e,t){this._id=e,this._clearFn=t}var i="undefined"!==typeof e&&e||"undefined"!==typeof self&&self||window,o=Function.prototype.apply;t.setTimeout=function(){return new r(o.call(setTimeout,i,arguments),clearTimeout)},t.setInterval=function(){return new r(o.call(setInterval,i,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},r.prototype.unref=r.prototype.ref=function(){},r.prototype.close=function(){this._clearFn.call(i,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},n(88),t.setImmediate="undefined"!==typeof self&&self.setImmediate||"undefined"!==typeof e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!==typeof self&&self.clearImmediate||"undefined"!==typeof e&&e.clearImmediate||this&&this.clearImmediate}).call(t,n(5))},function(e,t,n){(function(e,t){!function(e,n){"use strict";function r(e){"function"!==typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var r={callback:e,args:t};return c[u]=r,s(u),u++}function i(e){delete c[e]}function o(e){var t=e.callback,r=e.args;switch(r.length){case 0:t();break;case 1:t(r[0]);break;case 2:t(r[0],r[1]);break;case 3:t(r[0],r[1],r[2]);break;default:t.apply(n,r)}}function a(e){if(l)setTimeout(a,0,e);else{var t=c[e];if(t){l=!0;try{o(t)}finally{i(e),l=!1}}}}if(!e.setImmediate){var s,u=1,c={},l=!1,h=e.document,f=Object.getPrototypeOf&&Object.getPrototypeOf(e);f=f&&f.setTimeout?f:e,"[object process]"==={}.toString.call(e.process)?function(){s=function(e){t.nextTick(function(){a(e)})}}():function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?function(){var t="setImmediate$"+Math.random()+"$",n=function(n){n.source===e&&"string"===typeof n.data&&0===n.data.indexOf(t)&&a(+n.data.slice(t.length))};e.addEventListener?e.addEventListener("message",n,!1):e.attachEvent("onmessage",n),s=function(n){e.postMessage(t+n,"*")}}():e.MessageChannel?function(){var e=new MessageChannel;e.port1.onmessage=function(e){a(e.data)},s=function(t){e.port2.postMessage(t)}}():h&&"onreadystatechange"in h.createElement("script")?function(){var e=h.documentElement;s=function(t){var n=h.createElement("script");n.onreadystatechange=function(){a(t),n.onreadystatechange=null,e.removeChild(n),n=null},e.appendChild(n)}}():function(){s=function(e){setTimeout(a,0,e)}}(),f.setImmediate=r,f.clearImmediate=i}}
vendor: 4,183 bytes, line 1
1("undefined"===typeof self?"undefined"===typeof e?this:e:self)}).call(t,n(5),n(41))},function(e,t){!function(e){"use strict";function t(e){if("string"!==typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function n(e){return"string"!==typeof e&&(e=String(e)),e}function r(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return m.iterable&&(t[Symbol.iterator]=function(){return t}),t}function i(e){this.map={},e instanceof i?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function o(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function a(e){return new Promise(function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}})}function s(e){var t=new FileReader,n=a(t);return t.readAsArrayBuffer(e),n}function u(e){var t=new FileReader,n=a(t);return t.readAsText(e),n}function c(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}function l(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function h(){return this.bodyUsed=!1,this._initBody=function(e){if(this._bodyInit=e,e)if("string"===typeof e)this._bodyText=e;else if(m.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(m.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(m.searchParams&&URLSearchParams.prototype.isPrototypeOf(e))this._bodyText=e.toString();else if(m.arrayBuffer&&m.blob&&_(e))this._bodyArrayBuffer=l(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else{if(!m.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(e)&&!b(e))throw new Error("unsupported BodyInit type");this._bodyArrayBuffer=l(e)}else this._bodyText="";this.headers.get("content-type")||("string"===typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):m.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},m.blob&&(this.blob=function(){var e=o(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?o(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(s)}),this.text=function(){var e=o(this);if(e)return e;if(this._bodyBlob)return u(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(c(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},m.formData&&(this.formData=function(){return this.text().then(d)}),this.json=function(){return this.text().then(JSON.parse)},this}function f(e){var t=e.toUpperCase();return w.indexOf(t)>-1?t:e}function p(e,t){t=t||{};var n=t.body;if(e instanceof p){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new i(e.headers)),this.method=e.method,this.mode=e.mode,n||null==e._bodyInit||(n=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new i(t.headers)),this.method=f(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function d(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}}),t}function y(e){var t=new i;
1return e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach(function(e){var n=e.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();t.append(r,i)}}),t}function v(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new i(t.headers),this.url=t.url||"",this._initBody(e)}if(!e.fetch){var m={searchParams:"URLSearchParams"in e,iterable:"Symbol"in e&&"iterator"in Symbol,blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e};if(m.arrayBuffer)var g=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],_=function(e){return e&&DataView.prototype.isPrototypeOf(e)},b=ArrayBuffer.isView||function(e){return e&&g.indexOf(Object.prototype.toString.call(e))>-1};i.prototype.append=function(e,r){e=t(e),r=n(r);var i=this.map[e];this.map[e]=i?i+","+r:r},i.prototype.delete=function(e){delete this.map[t(e)]},i.prototype.get=function(e){return e=t(e),this.has(e)?this.map[e]:null},i.prototype.has=function(e){return this.map.hasOwnProperty(t(e))},i.prototype.set=function(e,r){this.map[t(e)]=n(r)},i.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},i.prototype.keys=function(){var e=[];return this.forEach(function(t,n){e.push(n)}),r(e)},i.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),r(e)},i.prototype.entries=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),r(e)},m.iterable&&(i.prototype[Symbol.iterator]=i.prototype.entries);var w=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];p.prototype.clone=function(){return new p(this,{body:this._bodyInit})},h.call(p.prototype),h.call(v.prototype),v.prototype.clone=function(){return new v(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new i(this.headers),url:this.url})},v.error=function(){var e=new v(null,{status:0,statusText:""});return e.type="error",e};var E=[301,302,303,307,308];v.redirect=function(e,t){if(-1===E.indexOf(t))throw new RangeError("Invalid status code");return new v(null,{status:t,headers:{location:e}})},e.Headers=i,e.Request=p,e.Response=v,e.fetch=function(e,t){return new Promise(function(n,r){var i=new p(e,t),o=new XMLHttpRequest;o.onload=function(){var e={status:o.status,statusText:o.statusText,headers:y(o.getAllResponseHeaders()||"")};e.url="responseURL"in o?o.responseURL:e.headers.get("X-Request-URL");var t="response"in o?o.response:o.responseText;n(new v(t,e))},o.onerror=function(){r(new TypeError("Network request failed"))},o.ontimeout=function(){r(new TypeError("Network request failed"))},o.open(i.method,i.url,!0),"include"===i.credentials?o.withCredentials=!0:"omit"===i.credentials&&(o.withCredentials=!1),"responseType"in o&&m.blob&&(o.responseType="blob"),i.headers.forEach(function(e,t){o.setRequestHeader(t,e)}),o.send("undefined"===typeof i._bodyInit?null:i._bodyInit)})},e.fetch.polyfill=!0}}("undefined"!==typeof self?self:this)},function(e,t,n){n(91)},function(e,t,n){(function(e){(function(){function e(e){return"string"==typeof e}function t(e){return"boolean"==typeof e}function r(){}function i(e){var t=typeof e;if("object"==t){if(!e)return"null";if(e instanceof Array)return"array";if(e instanceof Object)return t;var n=Object.prototype.toString.call(e);if("[object Window]"==n)return"object";if("[object Array]"==n||"number"==typeof e.length&&"undefined"!=typeof e.splice&&"undefined"!=typeof e.propertyIsEnumerable&&!e.propertyIsEnumerable("splice"))return"array";if("[object Function]"==n||"undefined"!=typeof e.call&&"undefined"!=typeof e.propertyIsEnumerable&&!e.propertyIsEnumerable("call"))return"function"}else if("function"==t&&"undefined"==typeof e.call)return"object";return t}function o(e){return null===e}function a(e){return"array"==i(e)}function s(e){var t=i(e);return"array"==t||"object"==t&&"number"==typeof e.length}function u(e){return"function"==i(e)}function c(e){var t=typeof e;return"object"==t&&null!=e||"function"==t}function l(e,t,n){return e.call.apply(e.bind,arguments)}function h(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 f(e,t,n){return f=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?l:h,f.apply(null,arguments)}
1function p(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 d(e,t){function n(){}n.prototype=t.prototype,e.lb=t.prototype,e.prototype=new n,e.prototype.constructor=e,e.ad=function(e,n,r){for(var i=Array(arguments.length-2),o=2;o<arguments.length;o++)i[o-2]=arguments[o];return t.prototype[n].apply(e,i)}}function y(e){e.prototype.then=e.prototype.then,e.prototype.$goog_Thenable=!0}function v(e){if(!e)return!1;try{return!!e.$goog_Thenable}catch(e){return!1}}function m(e){if(Error.captureStackTrace)Error.captureStackTrace(this,m);else{var t=Error().stack;t&&(this.stack=t)}e&&(this.message=String(e))}function g(e,t){e=e.split("%s");for(var n="",r=e.length-1,i=0;i<r;i++)n+=e[i]+(i<t.length?t[i]:"%s");m.call(this,n+e[r])}function _(e,t){throw new g("Failure"+(e?": "+e:""),Array.prototype.slice.call(arguments,1))}function b(e,t){this.c=e,this.f=t,this.b=0,this.a=null}function w(e,t){e.f(t),100>e.b&&(e.b++,t.next=e.a,e.a=t)}function E(){this.b=this.a=null}function C(){var e=Fu,t=null;return e.a&&(t=e.a,e.a=e.a.next,e.a||(e.b=null),t.next=null),t}function T(){this.next=this.b=this.a=null}function S(t,n){var r=t.length,i=e(t)?t.split(""):t;for(--r;0<=r;--r)r in i&&n.call(void 0,i[r],r,t)}function I(t){e:{for(var n=Hr,r=t.length,i=e(t)?t.split(""):t,o=0;o<r;o++)if(o in i&&n.call(void 0,i[o],o,t)){n=o;break e}n=-1}return 0>n?null:e(t)?t.charAt(n):t[n]}function k(e,t){return 0<=bu(e,t)}function O(e,t){t=bu(e,t);var n;return(n=0<=t)&&Array.prototype.splice.call(e,t,1),n}function N(e,t){var n=0;S(e,function(r,i){t.call(void 0,r,i,e)&&1==Array.prototype.splice.call(e,i,1).length&&n++})}function P(e){return Array.prototype.concat.apply([],arguments)}function R(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 A(e,t){for(var n=e.split("%s"),r="",i=Array.prototype.slice.call(arguments,1);i.length&&1<n.length;)r+=n.shift()+i.shift();return r+n.join("%s")}function x(e){return Ru.test(e)?(-1!=e.indexOf("&")&&(e=e.replace(Su,"&")),-1!=e.indexOf("<")&&(e=e.replace(Iu,"<")),-1!=e.indexOf(">")&&(e=e.replace(ku,">")),-1!=e.indexOf('"')&&(e=e.replace(Ou,""")),-1!=e.indexOf("'")&&(e=e.replace(Nu,"'")),-1!=e.indexOf("\0")&&(e=e.replace(Pu,"�")),e):e}function D(e,t){return-1!=e.indexOf(t)}function L(e,t){return e<t?-1:e>t?1:0}function U(e){return D(_u,e)}function M(e,t){for(var n in e)t.call(void 0,e[n],n,e)}function F(e){for(var t in e)return!1;return!0}function j(e){var t,n={};for(t in e)n[t]=e[t];return n}function B(e,t){for(var n,r,i=1;i<arguments.length;i++){r=arguments[i];for(n in r)e[n]=r[n];for(var o=0;o<Uu.length;o++)n=Uu[o],Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}}function W(e){du.setTimeout(function(){throw e},0)}function V(){var e=du.MessageChannel;if("undefined"===typeof e&&"undefined"!==typeof window&&window.postMessage&&window.addEventListener&&!U("Presto")&&(e=function(){var e=document.createElement("IFRAME");e.style.display="none",e.src="",document.documentElement.appendChild(e);var t=e.contentWindow;e=t.document,e.open(),e.write(""),e.close();var n="callImmediate"+Math.random(),r="file:"==t.location.protocol?"*":t.location.protocol+"//"+t.location.host;e=f(function(e){"*"!=r&&e.origin!=r||e.data!=n||this.port1.onmessage()},this),t.addEventListener("message",e,!1),this.port1={},this.port2={postMessage:function(){t.postMessage(n,r)}}}),"undefined"!==typeof e&&!U("Trident")&&!U("MSIE")){var t=new e,n={},r=n;return t.port1.onmessage=function(){if(void 0!==n.next){n=n.next;var e=n.rb;n.rb=null,e()}},function(e){r.next={rb:e},r=r.next,t.port2.postMessage(0)}}return"undefined"!==typeof document&&"onreadystatechange"in document.createElement("SCRIPT")?function(e){var t=document.createElement("SCRIPT");t.onreadystatechange=function(){t.onreadystatechange=null,t.parentNode.removeChild(t),t=null,e(),e=null},document.documentElement.appendChild(t)}:function(e){du.setTimeout(e,0)}}function H(e,t){Lu||q(),Mu||(Lu(),Mu=!0),Fu.add(e,t)}function q(){if(du.Promise&&du.Promise.resolve){var e=du.Promise.resolve(void 0);Lu=function(){e.then(K)}}else Lu=function(){var e=K;!u(du.setImmediate)||du.Window&&du.Window.prototype&&!U("Edge")&&du.Window.prototype.setImmediate==du.setImmediate?(Du||(Du=V()),Du(e)):du.setImmediate(e)}}function K(){for(var e;e=C();){try{e.a.call(e.b)}catch(e){W(e)}w(gu,e)}Mu=!1}function z(e,t){if(this.a=ju,this.j=void 0,this.f=this.b=this.c=null,this.g=this.h=!1,e!=r)try{var n=this;e.call(t,function(e){re(n,Bu,e)},function(e){if(!(e instanceof he))try{if(e instanceof Error)throw e;throw Error("Promise rejected.")}catch(e){}re(n,Wu,e)})}catch(e){re(this,Wu,e)}}function G(){this.next=this.f=this.b=this.g=this.a=null,this.c=!1}function Q(e,t,n){var r=Vu.get();return r.g=e,r.b=t,r.f=n,r}function Y(e){if(e instanceof z)return e;var t=new z(r);return re(t,Bu,e),t}function X(e){return new z(function(t,n){n(e)})}function $(e,t,n){ie(e,t,n,null)||H(p(t,e))}function J(e){return new z(function(t,n){var r=e.length,i=[];if(r)for(var o,a=function(e,n){r--,i[e]=n,0==r&&t(i)},s=function(e){n(e)},u=0;u<e.length;u++)o=e[u],$(o,p(a,u),s);else t(i)})}function Z(e){return new z(function(t){var n=e.length,r=[];if(n)for(var i,o=function(e,i,o){n--,r[e]=i?{Zb:!0,value:o}:{Zb:!1,reason:o},0==n&&t(r)},a=0;a<e.length;a++)i=e[a],$(i,p(o,a,!0),p(o,a,!1));else t(r)})}function ee(e,t){if(e.a==ju)if(e.c){var n=e.c;if(n.b){for(var r=0,i=null,o=null,a=n.b;a&&(a.c||(r++,a.a==e&&(i=a),!(i&&1<r)));a=a.next)i||(o=a);i&&(n.a==ju&&1==r?ee(n,t):(o?(r=o,r.next==n.f&&(n.f=r),r.next=r.next.next):se(n),ue(n,i,Wu,t)))}e.c=null}else re(e,Wu,t)}function te(e,t){e.b||e.a!=Bu&&e.a!=Wu||ae(e),e.f?e.f.next=t:e.b=t,e.f=t}function ne(e,t,n,r){var i=Q(null,null,null);return i.a=new z(function(e,o){i.g=t?function(n){try{var i=t.call(r,n);e(i)}catch(e){o(e)}}:e,i.b=n?function(t){try{var i=n.call(r,t);void 0===i&&t instanceof he?o(t):e(i)}catch(e){o(e)}}:o}),i.a.c=e,te(e,i),i.a}function re(e,t,n){e.a==ju&&(e===n&&(t=Wu,n=new TypeError("Promise cannot resolve to itself")),e.a=1,ie(n,e.Kc,e.Lc,e)||(e.j=n,e.a=t,e.c=null,ae(e),t!=Wu||n instanceof he||le(e,n)))}function ie(e,t,n,i){if(e instanceof z)return te(e,Q(t||r,n||null,i)),!0;if(v(e))return e.then(t,n,i),!0;if(c(e))try{var o=e.then;if(u(o))return oe(e,o,t,n,i),!0}catch(e){return n.call(i,e),!0}return!1}function oe(e,t,n,r,i){function o(e){s||(s=!0,r.call(i,e))}function a(e){s||(s=!0,n.call(i,e))}var s=!1;try{t.call(e,a,o)}catch(e){o(e)}}function ae(e){e.h||(e.h=!0,H(e.Ub,e))}function se(e){var t=null;return e.b&&(t=e.b,e.b=t.next,t.next=null),e.b||(e.f=null),t}function ue(e,t,n,r){if(n==Wu&&t.b&&!t.c)for(;e&&e.g;e=e.c)e.g=!1;if(t.a)t.a.c=null,ce(t,n,r);else try{t.c?t.g.call(t.f):ce(t,n,r)}catch(e){Hu.call(null,e)}w(Vu,t)}function ce(e,t,n){t==Bu?e.g.call(e.f,n):e.b&&e.b.call(e.f,n)}function le(e,t){e.g=!0,H(function(){e.g&&Hu.call(null,t)})}function he(e){m.call(this,e)}function fe(){0!=qu&&(Ku[this[yu]||(this[yu]=++vu)]=this),this.pa=this.pa,this.oa=this.oa}function pe(e){if(!e.pa&&(e.pa=!0,e.ua(),0!=qu)){var t=e[yu]||(e[yu]=++vu);if(0!=qu&&e.oa&&0<e.oa.length)throw Error(e+" did not empty its onDisposeCallbacks queue. This probably means it overrode dispose() or disposeInternal() without calling the superclass' method.");delete Ku[t]}}function de(e){return de[" "](e),e}function ye(e,t){var n=rc;return Object.prototype.hasOwnProperty.call(n,e)?n[e]:n[e]=t(e)}function ve(){var e=du.document;return e?e.documentMode:void 0}function me(e){return ye(e,function(){for(var t=0,n=Tu(String(zu)).split("."),r=Tu(String(e)).split("."),i=Math.max(n.length,r.length),o=0;0==t&&o<i;o++){var a=n[o]||"",s=r[o]||"";do{if(a=/(\d*)(\D*)(.*)/.exec(a)||["","","",""],s=/(\d*)(\D*)(.*)/.exec(s)||["","","",""],0==a[0].length&&0==s[0].length)break;t=L(0==a[1].length?0:parseInt(a[1],10),0==s[1].length?0:parseInt(s[1],10))||L(0==a[2].length,0==s[2].length)||L(a[2],s[2]),a=a[3],s=s[3]}while(0==t)}return 0<=t})}function ge(e,t){this.type=e,this.b=this.target=t,this.Eb=!0}function _e(t,n){if(ge.call(this,t?t.type:""),this.relatedTarget=this.b=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.pointerId=0,this.pointerType="",this.a=null,t){var r=this.t
1ype=t.type,i=t.changedTouches?t.changedTouches[0]:null;if(this.target=t.target||t.srcElement,this.b=n,n=t.relatedTarget){if($u){e:{try{de(n.nodeName);var o=!0;break e}catch(e){}o=!1}o||(n=null)}}else"mouseover"==r?n=t.fromElement:"mouseout"==r&&(n=t.toElement);this.relatedTarget=n,null===i?(this.clientX=void 0!==t.clientX?t.clientX:t.pageX,this.clientY=void 0!==t.clientY?t.clientY:t.pageY,this.screenX=t.screenX||0,this.screenY=t.screenY||0):(this.clientX=void 0!==i.clientX?i.clientX:i.pageX,this.clientY=void 0!==i.clientY?i.clientY:i.pageY,this.screenX=i.screenX||0,this.screenY=i.screenY||0),this.button=t.button,this.key=t.key||"",this.ctrlKey=t.ctrlKey,this.altKey=t.altKey,this.shiftKey=t.shiftKey,this.metaKey=t.metaKey,this.pointerId=t.pointerId||0,this.pointerType=e(t.pointerType)?t.pointerType:cc[t.pointerType]||"",this.a=t,t.defaultPrevented&&this.preventDefault()}}function be(e,t,n,r,i){this.listener=e,this.proxy=null,this.src=t,this.type=n,this.capture=!!r,this.La=i,this.key=++hc,this.ma=this.Ha=!1}function we(e){e.ma=!0,e.listener=null,e.proxy=null,e.src=null,e.La=null}function Ee(e){this.src=e,this.a={},this.b=0}function Ce(e,t){var n=t.type;n in e.a&&O(e.a[n],t)&&(we(t),0==e.a[n].length&&(delete e.a[n],e.b--))}function Te(e,t,n,r){for(var i=0;i<e.length;++i){var o=e[i];if(!o.ma&&o.listener==t&&o.capture==!!n&&o.La==r)return i}return-1}function Se(e,t,n,r,i){if(r&&r.once)Oe(e,t,n,r,i);else if(a(t))for(var o=0;o<t.length;o++)Se(e,t[o],n,r,i);else n=Ue(n),e&&e[lc]?Fe(e,t,n,c(r)?!!r.capture:!!r,i):Ie(e,t,n,!1,r,i)}function Ie(e,t,n,r,i,o){if(!t)throw Error("Invalid event type");var a=c(i)?!!i.capture:!!i,s=Le(e);if(s||(e[fc]=s=new Ee(e)),n=s.add(t,n,r,a,o),!n.proxy){if(r=ke(),n.proxy=r,r.src=e,r.listener=n,e.addEventListener)uc||(i=a),void 0===i&&(i=!1),e.addEventListener(t.toString(),r,i);else if(e.attachEvent)e.attachEvent(Re(t.toString()),r);else{if(!e.addListener||!e.removeListener)throw Error("addEventListener and attachEvent are unavailable.");e.addListener(r)}dc++}}function ke(){var e=De,t=ac?function(n){return e.call(t.src,t.listener,n)}:function(n){if(!(n=e.call(t.src,t.listener,n)))return n};return t}function Oe(e,t,n,r,i){if(a(t))for(var o=0;o<t.length;o++)Oe(e,t[o],n,r,i);else n=Ue(n),e&&e[lc]?je(e,t,n,c(r)?!!r.capture:!!r,i):Ie(e,t,n,!0,r,i)}function Ne(e,t,n,r,i){if(a(t))for(var o=0;o<t.length;o++)Ne(e,t[o],n,r,i);else r=c(r)?!!r.capture:!!r,n=Ue(n),e&&e[lc]?(e=e.u,(t=String(t).toString())in e.a&&(o=e.a[t],-1<(n=Te(o,n,r,i))&&(we(o[n]),Array.prototype.splice.call(o,n,1),0==o.length&&(delete e.a[t],e.b--)))):e&&(e=Le(e))&&(t=e.a[t.toString()],e=-1,t&&(e=Te(t,n,r,i)),(n=-1<e?t[e]:null)&&Pe(n))}function Pe(e){if("number"!=typeof e&&e&&!e.ma){var t=e.src;if(t&&t[lc])Ce(t.u,e);else{var n=e.type,r=e.proxy;t.removeEventListener?t.removeEventListener(n,r,e.capture):t.detachEvent?t.detachEvent(Re(n),r):t.addListener&&t.removeListener&&t.removeListener(r),dc--,(n=Le(t))?(Ce(n,e),0==n.b&&(n.src=null,t[fc]=null)):we(e)}}}function Re(e){return e in pc?pc[e]:pc[e]="on"+e}function Ae(e,t,n,r){var i=!0;if((e=Le(e))&&(t=e.a[t.toString()]))for(t=t.concat(),e=0;e<t.length;e++){var o=t[e];o&&o.capture==n&&!o.ma&&(o=xe(o,r),i=i&&!1!==o)}return i}function xe(e,t){var n=e.listener,r=e.La||e.src;return e.Ha&&Pe(e),n.call(r,t)}function De(e,t){if(e.ma)return!0;if(!ac){if(!t)e:{t=["window","event"];for(var n=du,r=0;r<t.length;r++)if(null==(n=n[t[r]])){t=null;break e}t=n}if(r=t,t=new _e(r,this),n=!0,!(0>r.keyCode||void 0!=r.returnValue)){e:{var i=!1;if(0==r.keyCode)try{r.keyCode=-1;break e}catch(e){i=!0}(i||void 0==r.returnValue)&&(r.returnValue=!0)}for(r=[],i=t.b;i;i=i.parentNode)r.push(i);for(e=e.type,i=r.length-1;0<=i;i--){t.b=r[i];var o=Ae(r[i],e,!0,t);n=n&&o}for(i=0;i<r.length;i++)t.b=r[i],o=Ae(r[i],e,!1,t),n=n&&o}return n}return xe(e,new _e(t,this))}function Le(e){return e=e[fc],e instanceof Ee?e:null}function Ue(e){return u(e)?e:(e[yc]||(e[yc]=function(t){return e.handleEvent(t)}),e[yc])}function Me(){fe.call(this),this.u=new Ee(this),this.Mb=this,this.Ta=null}function Fe(e,t,n,r,i){e.u.add(String(t),n,!1,r,i)}function je(e,t,n,r,i){e.u.add(String(t),n,!0,r,i)}function Be(e,t,n,r){if(!(t=e.u.a[String(t)]))return!0;t=t.concat();for(var i=!0,o=0;o<t.length;++o){var a=t[o];if(a&&!a.ma&&a.capture==n){var s=a.listener,u=a.La||a.src;a.Ha&&Ce(e.u,a),i=!1!==s.call(u,r)&&i}}return i&&0!=r.Eb}function We(e,t,n){if(u(e))n&&(e=f(e,n));else{if(!e||"function"!=typeof e.handleEvent)throw Error("Invalid listener argument");e=f(e.handleEvent,e)}return 2147483647<Number(t)?-1:du.setTimeout(e,t||0)}function Ve(e){var t=null;return new z(function(n,r){-1==(t=We(function(){n(void 0)},e))&&r(Error("Failed to schedule timer."))}).m(function(e){throw du.clearTimeout(t),e})}function He(t){if(t.S&&"function"==typeof t.S)return t.S();if(e(t))return t.split("");
1if(s(t)){for(var n=[],r=t.length,i=0;i<r;i++)n.push(t[i]);return n}n=[],r=0;for(i in t)n[r++]=t[i];return n}function qe(t){if(t.U&&"function"==typeof t.U)return t.U();if(!t.S||"function"!=typeof t.S){if(s(t)||e(t)){var n=[];t=t.length;for(var r=0;r<t;r++)n.push(r);return n}n=[],r=0;for(var i in t)n[r++]=i;return n}}function Ke(t,n){if(t.forEach&&"function"==typeof t.forEach)t.forEach(n,void 0);else if(s(t)||e(t))wu(t,n,void 0);else for(var r=qe(t),i=He(t),o=i.length,a=0;a<o;a++)n.call(void 0,i[a],r&&r[a],t)}function ze(e,t){this.b={},this.a=[],this.c=0;var n=arguments.length;if(1<n){if(n%2)throw Error("Uneven number of arguments");for(var r=0;r<n;r+=2)this.set(arguments[r],arguments[r+1])}else if(e)if(e instanceof ze)for(n=e.U(),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 Ge(e){if(e.c!=e.a.length){for(var t=0,n=0;t<e.a.length;){var r=e.a[t];Qe(e.b,r)&&(e.a[n++]=r),t++}e.a.length=n}if(e.c!=e.a.length){var i={};for(n=t=0;t<e.a.length;)r=e.a[t],Qe(i,r)||(e.a[n++]=r,i[r]=1),t++;e.a.length=n}}function Qe(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Ye(e,t){if(e){e=e.split("&");for(var n=0;n<e.length;n++){var r=e[n].indexOf("="),i=null;if(0<=r){var o=e[n].substring(0,r);i=e[n].substring(r+1)}else o=e[n];t(o,i?decodeURIComponent(i.replace(/\+/g," ")):"")}}}function Xe(e,t){if(this.b=this.l=this.c="",this.j=null,this.h=this.g="",this.f=!1,e instanceof Xe){this.f=void 0!==t?t:e.f,$e(this,e.c),this.l=e.l,this.b=e.b,Je(this,e.j),this.g=e.g,t=e.a;var n=new st;n.c=t.c,t.a&&(n.a=new ze(t.a),n.b=t.b),Ze(this,n),this.h=e.h}else e&&(n=String(e).match(vc))?(this.f=!!t,$e(this,n[1]||"",!0),this.l=it(n[2]||""),this.b=it(n[3]||"",!0),Je(this,n[4]),this.g=it(n[5]||"",!0),Ze(this,n[6]||"",!0),this.h=it(n[7]||"")):(this.f=!!t,this.a=new st(null,this.f))}function $e(e,t,n){e.c=n?it(t,!0):t,e.c&&(e.c=e.c.replace(/:$/,""))}function Je(e,t){if(t){if(t=Number(t),isNaN(t)||0>t)throw Error("Bad port number "+t);e.j=t}else e.j=null}function Ze(e,t,n){t instanceof st?(e.a=t,dt(e.a,e.f)):(n||(t=ot(t,bc)),e.a=new st(t,e.f))}function et(e,t,n){e.a.set(t,n)}function tt(e,t){return e.a.get(t)}function nt(e){return e instanceof Xe?new Xe(e):new Xe(e,void 0)}function rt(e,t){var n=new Xe(null,void 0);return $e(n,"https"),e&&(n.b=e),t&&(n.g=t),n}function it(e,t){return e?t?decodeURI(e.replace(/%25/g,"%2525")):decodeURIComponent(e):""}function ot(t,n,r){return e(t)?(t=encodeURI(t).replace(n,at),r&&(t=t.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),t):null}function at(e){return e=e.charCodeAt(0),"%"+(e>>4&15).toString(16)+(15&e).toString(16)}function st(e,t){this.b=this.a=null,this.c=e||null,this.f=!!t}function ut(e){e.a||(e.a=new ze,e.b=0,e.c&&Ye(e.c,function(t,n){e.add(decodeURIComponent(t.replace(/\+/g," ")),n)}))}function ct(e){var t=qe(e);if("undefined"==typeof t)throw Error("Keys are undefined");var n=new st(null,void 0);e=He(e);for(var r=0;r<t.length;r++){var i=t[r],o=e[r];a(o)?ft(n,i,o):n.add(i,o)}return n}function lt(e,t){ut(e),t=pt(e,t),Qe(e.a.b,t)&&(e.c=null,e.b-=e.a.get(t).length,e=e.a,Qe(e.b,t)&&(delete e.b[t],e.c--,e.a.length>2*e.c&&Ge(e)))}function ht(e,t){return ut(e),t=pt(e,t),Qe(e.a.b,t)}function ft(e,t,n){lt(e,t),0<n.length&&(e.c=null,e.a.set(pt(e,t),R(n)),e.b+=n.length)}function pt(e,t){return t=String(t),e.f&&(t=t.toLowerCase()),t}function dt(e,t){t&&!e.f&&(ut(e),e.c=null,e.a.forEach(function(e,t){var n=t.toLowerCase();t!=n&&(lt(this,t),ft(this,n,e))},e)),e.f=t}function yt(){this.a="",this.b=Cc}function vt(e){return e instanceof yt&&e.constructor===yt&&e.b===Cc?e.a:(_("expected object of type Const, got '"+e+"'"),"type_error:Const")}function mt(e){var t=new yt;return t.a=e,t}function gt(){this.a="",this.b=Ic}function _t(e){return e instanceof gt&&e.constructor===gt&&e.b===Ic?e.a:(_("expected object of type TrustedResourceUrl, got '"+e+"' of type "+i(e)),"type_error:TrustedResourceUrl")}function bt(e,t){var n=vt(e);if(!Sc.test(n))throw Error("Invalid TrustedResourceUrl format: "+n);return e=n.replace(Tc,function(e,r){if(!Object.prototype.hasOwnProperty.call(t,r))throw Error('Found marker, "'+r+'", in format str
1ing, "'+n+'", but no valid label mapping found in args: '+JSON.stringify(t));return e=t[r],e instanceof yt?vt(e):encodeURIComponent(String(e))}),wt(e)}function wt(e){var t=new gt;return t.a=e,t}function Et(){this.a="",this.b=Oc}function Ct(e){return e instanceof Et&&e.constructor===Et&&e.b===Oc?e.a:(_("expected object of type SafeUrl, got '"+e+"' of type "+i(e)),"type_error:SafeUrl")}function Tt(e){return e instanceof Et?e:(e=e.la?e.ja():String(e),kc.test(e)||(e="about:invalid#zClosurez"),St(e))}function St(e){var t=new Et;return t.a=e,t}function It(){this.a="",this.b=Nc}function kt(e){return e instanceof It&&e.constructor===It&&e.b===Nc?e.a:(_("expected object of type SafeHtml, got '"+e+"' of type "+i(e)),"type_error:SafeHtml")}function Ot(e){var t=new It;return t.a=e,t}function Nt(t){var n=document;return e(t)?n.getElementById(t):t}function Pt(e,t){M(t,function(t,n){t&&t.la&&(t=t.ja()),"style"==n?e.style.cssText=t:"class"==n?e.className=t:"for"==n?e.htmlFor=t:Pc.hasOwnProperty(n)?e.setAttribute(Pc[n],t):0==n.lastIndexOf("aria-",0)||0==n.lastIndexOf("data-",0)?e.setAttribute(n,t):e[n]=t})}function Rt(t,n,r){var i=arguments,o=document,s=String(i[0]),u=i[1];if(!Ec&&u&&(u.name||u.type)){if(s=["<",s],u.name&&s.push(' name="',x(u.name),'"'),u.type){s.push(' type="',x(u.type),'"');var c={};B(c,u),delete c.type,u=c}s.push(">"),s=s.join("")}return s=o.createElement(s),u&&(e(u)?s.className=u:a(u)?s.className=u.join(" "):Pt(s,u)),2<i.length&&At(o,s,i),s}function At(t,n,r){function i(r){r&&n.appendChild(e(r)?t.createTextNode(r):r)}for(var o=2;o<r.length;o++){var a=r[o];!s(a)||c(a)&&0<a.nodeType?i(a):wu(xt(a)?R(a):a,i)}}function xt(e){if(e&&"number"==typeof e.length){if(c(e))return"function"==typeof e.item||"string"==typeof e.item;if(u(e))return"function"==typeof e.item}return!1}function Dt(e){var t=[];return Ut(new Lt,e,t),t.join("")}function Lt(){}function Ut(e,t,n){if(null==t)n.push("null");else{if("object"==typeof t){if(a(t)){var r=t;t=r.length,n.push("[");for(var i="",o=0;o<t;o++)n.push(i),Ut(e,r[o],n),i=",";return void n.push("]")}if(!(t instanceof String||t instanceof Number||t instanceof Boolean)){n.push("{"),i="";for(r in t)Object.prototype.hasOwnProperty.call(t,r)&&"function"!=typeof(o=t[r])&&(n.push(i),Mt(r,n),n.push(":"),Ut(e,o,n),i=",");return void n.push("}")}t=t.valueOf()}switch(typeof t){case"string":Mt(t,n);break;case"number":n.push(isFinite(t)&&!isNaN(t)?String(t):"null");break;case"boolean":n.push(String(t));break;case"function":n.push("null");break;default:throw Error("Unknown type: "+typeof t)}}}function Mt(e,t){t.push('"',e.replace(Ac,function(e){var t=Rc[e];return t||(t="\\u"+(65536|e.charCodeAt(0)).toString(16).substr(1),Rc[e]=t),t}),'"')}function Ft(){var e=nn();return Qu&&!!nc&&11==nc||/Edge\/\d+/.test(e)}function jt(){return du.window&&du.window.location.href||self&&self.location&&self.location.href||""}function Bt(e,t){t=t||du.window;var n="about:blank";e&&(n=Ct(Tt(e))),t.location.href=n}function Wt(e,t){var n,r=[];for(n in e)if(n in t)if(typeof e[n]!=typeof t[n])r.push(n);else if(a(e[n])){e:{var i=void 0,o=e[n],s=t[n];for(i in o)if(!(i in s)||o[i]!==s[i]){i=!1;break e}for(i in s)if(!(i in o)){i=!1;break e}i=!0}i||r.push(n)}else"object"==typeof e[n]&&null!=e[n]&&null!=t[n]?0<Wt(e[n],t[n]).length&&r.push(n):e[n]!==t[n]&&r.push(n);else r.push(n);for(n in t)n in e||r.push(n);return r}function Vt(){var e=nn();return!((e=en(e)!=Lc?null:(e=e.match(/\sChrome\/(\d+)/i))&&2==e.length?parseInt(e[1],10):null)&&30>e)&&(!Qu||!nc||9<nc)}function Ht(e){return e=(e||nn()).toLowerCase(),!!(e.match(/android/)||e.match(/webos/)||e.match(/iphone|ipad|ipod/)||e.match(/blackberry/)||e.match(/windows phone/)||e.match(/iemobile/))}function qt(e){e=e||du.window;try{e.close()}catch(e){}}function Kt(e,t,n){var r=Math.floor(1e9*Math.random()).toString();t=t||500,n=n||600;var i=(window.screen.availHeight-n)/2,o=(window.screen.availWidth-t)/2;t={width:t,height:n,top:0<i?i:0,left:0<o?o:0,location:!0,resizable:!0,statusbar:!0,toolbar:!1},n=nn().toLowerCase(),r&&(t.target=r,D(n,"crios/")&&(t.target="_blank")),en(nn())==Dc&&(e=e||"http://localhost",t.scrollbars=!0),n=e||"",(e=t)||(e={}),r=window,t=n instanceof Et?n:Tt("undefined"!=typeof n.href?n.href:String(n)),n=e.target||n.target,i=[];for(a in e)switch(a){case"width":case"height":case"top":case"left":i.push(a+"="+e[a]);break;case"target":case"noopener":case"noreferrer":break;default:i.push(a+"="+(e[a]?1:0))}var a=i.join(",");if((U("iPhone")&&!U("iPod")&&!U("iPad")||U("iPad")||U("iPod"))&&r.navigator&&r.navigator.standalone&&n&&"_self"!=n?(a=r.document.createElement("A"),t instanceof Et||t instanceof Et||(t=t.la?t.ja():String(t),kc.test(t)||(t="about:invalid#zClosurez"),t=St(t)),a.href=Ct(t),a.setAttribute("target",n),e.noreferrer&&a.setAttribute("rel","noreferrer"),e=document.createEvent("MouseEvent"),e.initMouseEvent("click",!0,!0,r,1),a.dispatchEvent(e),a={}):e.noreferrer?(a=r.open("",n,a),e=Ct(t),a&&(Xu&&D(e,";")&&(e="'"+e.replace(/'/g,"%27")+"'"),a.opener=null,mt("b/12014412, meta tag with sanitized URL"),e='<meta name="referrer" content="no-referrer"><meta http-equiv="refresh" content="0; url='+x(e)+'">',e=Ot(e),a.document.write(kt(e)),a.document.close())):(a=r.open(Ct(t),n,a))&&e.noopener&&(a.opener=null),a)try{a.focus()}catch(e){}return a}function zt(e){return new z(function(t){function n(){Ve(2e3).then(function(){if(e&&!e.closed)return n();t()})}return n()})}function Gt(){var e=null;return new z(function(t){"complete"==du.document.readyState?t():(e=function(){t()},Oe(window,"load",e))}).m(function(t){throw Ne(window,"load",e),t})}function Qt(){return Yt(void 0)?Gt().then(function(){return new z(function(e,t){var n=du.document,r=setTimeout(function(){t(Error("Cordova framework is not ready."))},1e3);n.addEventListener("deviceready",function(){clearTimeout(r),e()},!1)})}):X(Error("Cordova must run in an Android or iOS file scheme."))}function Yt(e){return e=e||nn(),!("file:"!==un()||!e.toLowerCase().match(/iphone|ipad|ipod|android/))}function Xt(){var e=du.window;try{return!(!e||e==e.top)}catch(e){return!1}}function $t(){return"object"!==typeof du.window&&"function"===typeof du.importScripts}function Jt(){return fu.INTERNAL.hasOwnProperty("reactNative")?"ReactNative":fu.INTERNAL.hasOwnProperty("node")?"Node":$t()?"Worker":"Browser"}function Zt(){var e=Jt();return"ReactNative"===e||"Node"===e}function en(e){var t=e.toLowerCase();return D(t,"opera/")||D(t,"opr/")||D(t,"opios/")?"Opera":D(t,"iemobile")?"IEMobile":D(t,"msie")||D(t,"trident/")?"IE":D(t,"edge/")?"Edge":D(t,"firefox/")?Dc:D(t,"silk/")?"Silk":D(t,"blackberry")?"Blackberry":D(t,"webos")?"Webos":!D(t,"safari/")||D(t,"chrome/")||D(t,"crios/")||D(t,"android")?!D(t,"chrome/")&&!D(t,"crios/")||D(t,"edge/")?D(t,"android")?"Android":(e=e.match(/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/))&&2==e.length?e[1]:"Other":Lc:"Safari"}
1function tn(e,t){t=t||[];var n,r=[],i={};for(n in Uc)i[Uc[n]]=!0;for(n=0;n<t.length;n++)"undefined"!==typeof i[t[n]]&&(delete i[t[n]],r.push(t[n]));return r.sort(),t=r,t.length||(t=["FirebaseCore-web"]),r=Jt(),"Browser"===r?(i=nn(),r=en(i)):"Worker"===r&&(i=nn(),r=en(i)+"-"+r),r+"/JsCore/"+e+"/"+t.join(",")}function nn(){return du.navigator&&du.navigator.userAgent||""}function rn(e,t){e=e.split("."),t=t||du;for(var n=0;n<e.length&&"object"==typeof t&&null!=t;n++)t=t[e[n]];return n!=e.length&&(t=void 0),t}function on(){try{var e=du.localStorage,t=pn();if(e)return e.setItem(t,"1"),e.removeItem(t),!Ft()||!!du.indexedDB}catch(e){return $t()&&!!du.indexedDB}return!1}function an(){return(sn()||"chrome-extension:"===un()||Yt())&&!Zt()&&on()&&!$t()}function sn(){return"http:"===un()||"https:"===un()}function un(){return du.location&&du.location.protocol||null}function cn(e){return e=e||nn(),!Ht(e)&&en(e)!=Dc}function ln(e){return"undefined"===typeof e?null:Dt(e)}function hn(e){var t,n={};for(t in e)e.hasOwnProperty(t)&&null!==e[t]&&void 0!==e[t]&&(n[t]=e[t]);return n}function fn(e){if(null!==e)return JSON.parse(e)}function pn(e){return e||Math.floor(1e9*Math.random()).toString()}function dn(e){return e=e||nn(),"Safari"!=en(e)&&!e.toLowerCase().match(/iphone|ipad|ipod/)}function yn(){var e=du.___jsl;if(e&&e.H)for(var t in e.H)if(e.H[t].r=e.H[t].r||[],e.H[t].L=e.H[t].L||[],e.H[t].r=e.H[t].L.concat(),e.CP)for(var n=0;n<e.CP.length;n++)e.CP[n]=null}function vn(e,t){if(e>t)throw Error("Short delay should be less than long delay!");this.a=e,this.c=t,e=nn(),t=Jt(),this.b=Ht(e)||"ReactNative"===t}function mn(){var e=du.document;return!e||"undefined"===typeof e.visibilityState||"visible"==e.visibilityState}function gn(){var e=du.document,t=null;return mn()||!e?Y():new z(function(n){t=function(){mn()&&(e.removeEventListener("visibilitychange",t,!1),n())},e.addEventListener("visibilitychange",t,!1)}).m(function(n){throw e.removeEventListener("visibilitychange",t,!1),n})}function _n(e){try{var t=new Date(parseInt(e,10));if(!isNaN(t.getTime())&&!/[^0-9]/.test(e))return t.toUTCString()}catch(e){}return null}function bn(){return!(!rn("fireauth.oauthhelper",du)&&!rn("fireauth.iframe",du))}function wn(e,t,n){Mc?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,value:n}):e[t]=n}function En(e,t){if(t)for(var n in t)t.hasOwnProperty(n)&&wn(e,n,t[n])}function Cn(e){var t={};return En(t,e),t}function Tn(e){var t,n={};for(t in e)e.hasOwnProperty(t)&&(n[t]=e[t]);return n}function Sn(e,t){if(!t||!t.length)return!0;if(!e)return!1;for(var n=0;n<t.length;n++){var r=e[t[n]];if(void 0===r||null===r||""===r)return!1}return!0}function In(e){var t=e;if("object"==typeof e&&null!=e){t="length"in e?[]:{};for(var n in e)wn(t,n,In(e[n]))}return t}function kn(e){var t={},n=e[Wc],r=e[Vc];if(!(e=e[Hc])||e!=Bc&&!n)throw Error("Invalid provider user info!");t[Kc]=r||null,t[qc]=n||null,wn(this,Gc,e),wn(this,zc,In(t))}function On(e,t){this.code=Qc+e,this.message=t||Yc[e]||""}function Nn(e){var t=e&&e.code;return t?new On(t.substring(Qc.length),e.message):null}function Pn(e){var t=e[Zc];if("undefined"===typeof t)throw new On("missing-continue-uri");if("string"!==typeof t||"string"===typeof t&&!t.length)throw new On("invalid-continue-uri");this.h=t,this.b=this.a=null,this.g=!1;var n=e[Xc];if(n&&"object"===typeof n){t=n[nl];var r=n[el];if(n=n[tl],"string"===typeof t&&t.length){if(this.a=t,"undefined"!==typeof r&&"boolean"!==typeof r)throw new On("argument-error",el+" property must be a boolean when specified.");if(this.g=!!r,"undefined"!==typeof n&&("string"!==typeof n||"string"===typeof n&&!n.length))throw new On("argument-error",tl+" property must be a non empty string when specified.");this.b=n||null}else{if("undefined"!==typeof t)throw new On("argument-error",nl+" property must be a non empty string when specified.");if("undefined"!==typeof r||"undefined"!==typeof n)throw new On("missing-android-pkg-name")}}else if("undefined"!==typeof n)throw new On("argument-error",Xc+" property must be a non null object when specified.");if(this.f=null,(t=e[Jc])&&"object"===typeof t){if("string"===typeof(t=t[rl])&&t.length)this.f=t;else if("undefined"!==typeof t)throw new On("argument-error",rl+" property must be a non empty string when specified.")}else if("undefined"!==typeof t)throw new On("argument-error",Jc+" property must be a non null object when specified.");if("undefined"!==typeof(e=e[$c])&&"boolean"!==typeof e)throw new On("argument-error",$c+" property must be a boolean when specified.");this.c=!!e}function Rn(e){var t={};t.continueUrl=e.h,t.canHandleCodeInApp=e.c,(t.androidPackageName=e.a)&&(t.androidMinimumVersion=e.b,t.androidInstallApp=e.g),t.iOSBundleId=e.f;for(var n in t)null===t[n]&&delete t[n];return t}function An(e){return Eu(e,function(e){return e=e.toString(16),1<e.length?e:"0"+e}).join("")}function xn(e){var t="";return Dn(e,function(e){t+=String.fromCharCode(e)}),t}function Dn(e,t){function n(t){for(;r<e.length;){var n=e.charAt(r++),i=ol[n];if(null!=i)return i;if(!/^[\s\xa0]*$/.test(n))throw Error("Unknown base64 encoding at char: "+n)}return t}Ln();for(var r=0;;){var i=n(-1),o=n(0),a=n(64),s=n(64);if(64===s&&-1===i)break;t(i<<2|o>>4),64!=a&&(t(o<<4&240|a>>2),64!=s&&t(a<<6&192|s))}}function Ln(){if(!il){il={},ol={};for(var e=0;65>e;e++)il[e]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
1+/=".charAt(e),ol[il[e]]=e,62<=e&&(ol["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_.".charAt(e)]=e)}}function Un(e){this.c=e.sub,mu(),this.a=e.provider_id||e.firebase&&e.firebase.sign_in_provider||null,this.b=!!e.is_anonymous||"anonymous"==this.a}function Mn(e){return(e=Fn(e))&&e.sub&&e.iss&&e.aud&&e.exp?new Un(e):null}function Fn(e){if(!e)return null;if(e=e.split("."),3!=e.length)return null;e=e[1];for(var t=(4-e.length%4)%4,n=0;n<t;n++)e+=".";try{return JSON.parse(xn(e))}catch(e){}return null}function jn(e){for(var t in ul)if(ul[t].Na==e)return ul[t];return null}function Bn(e){var t={};t["facebook.com"]=Hn,t["google.com"]=Kn,t["github.com"]=qn,t["twitter.com"]=zn;var n=e&&e[ll];try{if(n)return t[n]?new t[n](e):new Vn(e);if("undefined"!==typeof e[cl])return new Wn(e)}catch(e){}return null}function Wn(e){var t=e[ll];if(!t&&e[cl]){var n=Mn(e[cl]);n&&n.a&&(t=n.a)}if(!t)throw Error("Invalid additional user info!");"anonymous"!=t&&"custom"!=t||(t=null),n=!1,"undefined"!==typeof e.isNewUser?n=!!e.isNewUser:"identitytoolkit#SignupNewUserResponse"===e.kind&&(n=!0),wn(this,"providerId",t),wn(this,"isNewUser",n)}function Vn(e){Wn.call(this,e),e=fn(e.rawUserInfo||"{}"),wn(this,"profile",In(e||{}))}function Hn(e){if(Vn.call(this,e),"facebook.com"!=this.providerId)throw Error("Invalid provider ID!")}function qn(e){if(Vn.call(this,e),"github.com"!=this.providerId)throw Error("Invalid provider ID!");wn(this,"username",this.profile&&this.profile.login||null)}function Kn(e){if(Vn.call(this,e),"google.com"!=this.providerId)throw Error("Invalid provider ID!")}function zn(e){if(Vn.call(this,e),"twitter.com"!=this.providerId)throw Error("Invalid provider ID!");wn(this,"username",e.screenName||null)}function Gn(e){this.a=nt(e)}function Qn(e){var t=nt(e),n=tt(t,"link"),r=tt(nt(n),"link");return t=tt(t,"deep_link_id"),tt(nt(t),"link")||t||r||n||e}function Yn(e,t){return e.then(function(e){if(e[Nl]){var n=Mn(e[Nl]);if(!n||t!=n.c)throw new On("user-mismatch");return e}throw new On("user-mismatch")}).m(function(e){throw e&&e.code&&e.code==Qc+"user-not-found"?new On("user-mismatch"):e})}function Xn(e,t,n){if(t.idToken||t.accessToken)t.idToken&&wn(this,"idToken",t.idToken),t.accessToken&&wn(this,"accessToken",t.accessToken);else{if(!t.oauthToken||!t.oauthTokenSecret)throw new On("internal-error","failed to construct a credential");wn(this,"accessToken",t.oauthToken),wn(this,"secret",t.oauthTokenSecret)}wn(this,"providerId",e),wn(this,"signInMethod",n)}function $n(e){var t={};return e.idToken&&(t.id_token=e.idToken),e.accessToken&&(t.access_token=e.accessToken),e.secret&&(t.oauth_token_secret=e.secret),t.providerId=e.providerId,{postBody:ct(t).toString(),requestUri:"http://localhost"}}function Jn(e,t){this.Ac=t||[],En(this,{providerId:e,isOAuthProvider:!0}),this.tb={},this.Za=(jn(e)||{}).Ma||null,this.Xa=null}function Zn(e){Jn.call(this,e,sl),this.a=[]}function er(){Zn.call(this,"facebook.com")}function tr(e){if(!e)throw new On("argument-error","credential failed: expected 1 argument (the OAuth access token).");var t=e;return c(e)&&(t=e.accessToken),(new er).credential(null,t)}function nr(){Zn.call(this,"github.com")}function rr(e){if(!e)throw new On("argument-error","credential failed: expected 1 argument (the OAuth access token).");var t=e;return c(e)&&(t=e.accessToken),(new nr).credential(null,t)}function ir(){Zn.call(this,"google.com"),this.ta("profile")}function or(e,t){var n=e;return c(e)&&(n=e.idToken,t=e.accessToken),(new ir).credential(n,t)}function ar(){Jn.call(this,"twitter.com",al)}function sr(e,t){var n=e;if(c(n)||(n={oauthToken:e,oauthTokenSecret:t}),!n.oauthToken||!n.oauthTokenSecret)throw new On("argument-error","credential failed: expected 2 arguments (the OAuth access token and secret).");return new Xn("twitter.com",n,"twitter.com")}function ur(e,t,n){this.a=e,this.b=t,wn(this,"providerId","password"),wn(this,"signInMethod",n===cr.EMAIL_LINK_SIGN_IN_METHOD?cr.EMAIL_LINK_SIGN_IN_METHOD:cr.EMAIL_PASSWORD_SIGN_IN_METHOD)}function cr(){En(this,{providerId:"password",isOAuthProvider:!1})}function lr(e,t){if(!(t=hr(t)))throw new On("argument-error","Invalid email link!");return new ur(e,t,cr.EMAIL_LINK_SIGN_IN_METHOD)}function hr(e){e=Qn(e),e=new Gn(e);var t=tt(e.a,"oobCode")||null;return"signIn"===(tt(e.a,"mode")||null)&&t?t:null}function fr(e){if(!(e.Ra&&e.Qa||e.Ea&&e.Z))throw new On("internal-error");this.a=e,wn(this,"providerId","phone"),wn(this,"signInMethod","phone")}function pr(e){return e.a.Ea&&e.a.Z?{temporaryProof:e.a.Ea,phoneNumber:e.a.Z}:{sessionInfo:e.a.Ra,code:e.a.Qa}}function dr(e){try{this.a=e||fu.auth()}catch(e){throw new On("argument-error","Either an instance of firebase.auth.Auth must be passed as an argument to the firebase.auth.PhoneAuthProvider constructor, or the default firebase App instance must be initialized via firebase.initializeApp().")}En(this,{providerId:"phone",isOAuthProvider:!1})}function yr(e,t){if(!e)throw new On("missing-verification-id");if(!t)throw new On("missing-verification-code");return new fr({Ra:e,Qa:t})}function vr(e){if(e.temporaryProof&&e.phoneNumber)return new fr({Ea:e.temporaryProof,Z:e.phoneNumber});var t=e&&e.providerId;if(!t||"password"===t)return null;var n=e&&e.oauthAccessToken,r=e&&e.oauthTokenSecret;e=e&&e.oauthIdToken;try{switch(t){case"google.com":return or(e,n);case"facebook.com":return tr(n);case"github.com":return rr(n);case"twitter.com":return sr(n,r);default:return new Zn(t).credential(e,n)}}catch(e){return null}}function mr(e){if(!e.isOAuthProvider)throw new On("invalid-oauth-provider")}function gr(e,t,n,r,i){if(this.b=e,this.c=t||null,this.f=n||null,this.g=r||null,this.a=i||null,!this.f&&!this.a)throw new On("invalid-auth-event");
1if(this.f&&this.a)throw new On("invalid-auth-event");if(this.f&&!this.g)throw new On("invalid-auth-event")}function _r(e){return e=e||{},e.type?new gr(e.type,e.eventId,e.urlResponse,e.sessionId,e.error&&Nn(e.error)):null}function br(){this.b=null,this.a=[]}function wr(e){var t="unauthorized-domain",n=void 0,r=nt(e);e=r.b,r=r.c,"chrome-extension"==r?n=A("This chrome extension ID (chrome-extension://%s) is not authorized to run this operation. Add it to the OAuth redirect domains list in the Firebase console -> Auth section -> Sign in method tab.",e):"http"==r||"https"==r?n=A("This domain (%s) is not authorized to run this operation. Add it to the OAuth redirect domains list in the Firebase console -> Auth section -> Sign in method tab.",e):t="operation-not-supported-in-this-environment",On.call(this,t,n)}function Er(e,t,n){On.call(this,e,n),e=t||{},e.ub&&wn(this,"email",e.ub),e.Z&&wn(this,"phoneNumber",e.Z),e.credential&&wn(this,"credential",e.credential)}function Cr(e){if(e.code){var t=e.code||"";0==t.indexOf(Qc)&&(t=t.substring(Qc.length));var n={credential:vr(e)};if(e.email)n.ub=e.email;else{if(!e.phoneNumber)return new On(t,e.message||void 0);n.Z=e.phoneNumber}return new Er(t,n,e.message)}return null}function Tr(){}function Sr(e){return e.c||(e.c=e.b())}function Ir(){}function kr(e){if(!e.f&&"undefined"==typeof XMLHttpRequest&&"undefined"!=typeof ActiveXObject){for(var t=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],n=0;n<t.length;n++){var r=t[n];try{return new ActiveXObject(r),e.f=r}catch(e){}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed")}return e.f}function Or(){}function Nr(){this.a=new XDomainRequest,this.readyState=0,this.onreadystatechange=null,this.responseText="",this.status=-1,this.statusText="",this.a.onload=f(this.bc,this),this.a.onerror=f(this.zb,this),this.a.onprogress=f(this.cc,this),this.a.ontimeout=f(this.fc,this)}function Pr(e,t){e.readyState=t,e.onreadystatechange&&e.onreadystatechange()}function Rr(e,t,n){this.reset(e,t,n,void 0,void 0)}function Ar(e){this.f=e,this.b=this.c=this.a=null}function xr(e,t){this.name=e,this.value=t}function Dr(e){return e.c?e.c:e.a?Dr(e.a):(_("Root logger has no level set."),null)}function Lr(e){bl||(bl=new Ar(""),_l[""]=bl,bl.c=ml);var t;if(!(t=_l[e])){t=new Ar(e);var n=e.lastIndexOf("."),r=e.substr(n+1);n=Lr(e.substr(0,n)),n.b||(n.b={}),n.b[r]=t,t.a=n,_l[e]=t}return t}function Ur(e,t){e&&e.log(gl,t,void 0)}function Mr(e){this.f=e}function Fr(e){Me.call(this),this.j=e,this.readyState=wl,this.status=0,this.responseText=this.statusText="",this.onreadystatechange=null,this.g=new Headers,this.b=null,this.h="GET",this.c="",this.a=!1,this.f=Lr("goog.net.FetchXmlHttp")}function jr(e){e.onreadystatechange&&e.onreadystatechange.call(e)}function Br(e){Me.call(this),this.headers=new ze,this.D=e||null,this.c=!1,this.B=this.a=null,this.h=this.N=this.l="",this.f=this.I=this.j=this.G=!1,this.g=0,this.s=null,this.o=El,this.v=this.O=!1}function Wr(e,t,n,r,i){if(e.a)throw Error("[goog.net.XhrIo] Object is active with another request="+e.l+"; newUri="+t);n=n?n.toUpperCase():"GET",e.l=t,e.h="",e.N=n,e.G=!1,e.c=!0,e.a=e.D?e.D.a():pl.a(),e.B=Sr(e.D?e.D:pl),e.a.onreadystatechange=f(e.Db,e);try{Ur(e.b,Jr(e,"Opening Xhr")),e.I=!0,e.a.open(n,String(t),!0),e.I=!1}catch(t){return Ur(e.b,Jr(e,"Error opening Xhr: "+t.message)),void qr(e,t)}t=r||"";var o=new ze(e.headers);i&&Ke(i,function(e,t){o.set(t,e)}),i=I(o.U()),r=du.FormData&&t instanceof du.FormData,!k(Tl,n)||i||r||o.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8"),o.forEach(function(e,t){this.a.setRequestHeader(t,e)},e),e.o&&(e.a.responseType=e.o),"withCredentials"in e.a&&e.a.withCredentials!==e.O&&(e.a.withCredentials=e.O);try{Qr(e),0<e.g&&(e.v=Vr(e.a),Ur(e.b,Jr(e,"Will abort after "+e.g+"ms if incomplete, xhr2 "+e.v)),e.v?(e.a.timeout=e.g,e.a.ontimeout=f(e.Fa,e)):e.s=We(e.Fa,e.g,e)),Ur(e.b,Jr(e,"Sending request")),e.j=!0,e.a.send(t),e.j=!1}catch(t){Ur(e.b,Jr(e,"Send error: "+t.message)),qr(e,t)}}function Vr(e){return Qu&&me(9)&&"number"==typeof e.timeout&&void 0!==e.ontimeout}function Hr(e){return"content-type"==e.toLowerCase()}function qr(e,t){e.c=!1,e.a&&(e.f=!0,e.a.abort(),e.f=!1),e.h=t,Kr(e),Gr(e)}function Kr(e){e.G||(e.G=!0,e.dispatchEvent("complete"),e.dispatchEvent("error"))}function zr(e){if(e.c&&"undefined"!=typeof pu)if(e.B[1]&&4==Yr(e)&&2==Xr(e))Ur(e.b,Jr(e,"Local request error detected and ignored"));else if(e.j&&4==Yr(e))We(e.Db,0,e);else if(e.dispatchEvent("readystatechange"),4==Yr(e)){Ur(e.b,Jr(e,"Request complete")),e.c=!1;try{var t=Xr(e);e:switch(t){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var n=!0;break e;default:n=!1}var r;if(!(r=n)){var i;if(i=0===t){var o=String(e.l).match(vc)[1]||null;if(!o&&du.self&&du.self.location){var a=du.self.location.protocol;o=a.substr(0,a.length-1)}i=!Cl.test(o?o.toLowerCase():"")}r=i}if(r)e.dispatchEvent("complete"),e.dispatchEvent("success");else{try{var s=2<Yr(e)?e.a.statusText:""}catch(t){Ur(e.b,"Can not get status: "+t.message),s=""}e.h=s+" ["+Xr(e)+"]",Kr(e)}}finally{Gr(e)}}}function Gr(e,t){if(e.a){Qr(e);var n=e.a,i=e.B[0]?r:null;e.a=null,e.B=null,t||e.dispatchEvent("ready");try{n.onreadystatechange=i}catch(t){(e=e.b)&&e.log(yl,"Problem encountered resetting onreadystatechange: "+t.message,void 0)}}}function Qr(e){e.a&&e.v&&(e.a.ontimeout=null),e.s&&(du.clearTimeout(e.s),e.s=null)}function Yr(e){return e.a?e.a.readyState:0}function Xr(e){try{return 2<Yr(e)?e.a.status:-1}catch(e){return-1}}function $r(e){try{return e.a?e.a.responseText:""}catch(t){return Ur(e.b,"Can not get responseText: "+t.message),""}}function Jr(e,t){return t+" ["+e.N+" "+e.l+" "+Xr(e)+"]"}function Zr(e,t){this.g=[],this.v=e,this.s=t||null,this.f=this.a=!1,this.c=void 0,this.u=this.B=this.j=!1,this.h=0,this.b=null,this.l=0}
1function ei(e,t,n){e.a=!0,e.c=n,e.f=!t,oi(e)}function ti(e){if(e.a){if(!e.u)throw new ai(e);e.u=!1}}function ni(e,t){ri(e,null,t,void 0)}function ri(e,t,n,r){e.g.push([t,n,r]),e.a&&oi(e)}function ii(e){return Cu(e.g,function(e){return u(e[1])})}function oi(e){if(e.h&&e.a&&ii(e)){var t=e.h,n=Sl[t];n&&(du.clearTimeout(n.a),delete Sl[t]),e.h=0}e.b&&(e.b.l--,delete e.b),t=e.c;for(var r=n=!1;e.g.length&&!e.j;){var i=e.g.shift(),o=i[0],a=i[1];if(i=i[2],o=e.f?a:o)try{var s=o.call(i||e.s,t);void 0!==s&&(e.f=e.f&&(s==t||s instanceof Error),e.c=t=s),(v(t)||"function"===typeof du.Promise&&t instanceof du.Promise)&&(r=!0,e.j=!0)}catch(r){t=r,e.f=!0,ii(e)||(n=!0)}}e.c=t,r&&(s=f(e.o,e,!0),r=f(e.o,e,!1),t instanceof Zr?(ri(t,s,r),t.B=!0):t.then(s,r)),n&&(t=new ui(t),Sl[t.a]=t,e.h=t.a)}function ai(){m.call(this)}function si(){m.call(this)}function ui(e){this.a=du.setTimeout(f(this.c,this),0),this.b=e}function ci(e){var t={},n=t.document||document,r=_t(e),i=document.createElement("SCRIPT"),o={Fb:i,Fa:void 0},a=new Zr(hi,o),s=null,u=null!=t.timeout?t.timeout:5e3;return 0<u&&(s=window.setTimeout(function(){fi(i,!0);var e=new pi(kl,"Timeout reached for loading script "+r);ti(a),ei(a,!1,e)},u),o.Fa=s),i.onload=i.onreadystatechange=function(){i.readyState&&"loaded"!=i.readyState&&"complete"!=i.readyState||(fi(i,t.bd||!1,s),a.D())},i.onerror=function(){fi(i,!0,s);var e=new pi(Il,"Error while loading script "+r);ti(a),ei(a,!1,e)},o=t.attributes||{},B(o,{type:"text/javascript",charset:"UTF-8"}),Pt(i,o),i.src=_t(e),li(n).appendChild(i),a}function li(e){var t;return(t=(e||document).getElementsByTagName("HEAD"))&&0!=t.length?t[0]:e.documentElement}function hi(){if(this&&this.Fb){var e=this.Fb;e&&"SCRIPT"==e.tagName&&fi(e,!0,this.Fa)}}function fi(e,t,n){null!=n&&du.clearTimeout(n),e.onload=r,e.onerror=r,e.onreadystatechange=r,t&&window.setTimeout(function(){e&&e.parentNode&&e.parentNode.removeChild(e)},0)}function pi(e,t){var n="Jsloader error (code #"+e+")";t&&(n+=": "+t),m.call(this,n),this.code=e}function di(e){this.f=e}function yi(e,t,n){if(this.b=e,e=t||{},this.j=e.secureTokenEndpoint||"https://securetoken.googleapis.com/v1/token",this.l=e.secureTokenTimeout||Pl,this.f=j(e.secureTokenHeaders||Rl),this.g=e.firebaseEndpoint||"https://www.googleapis.com/identitytoolkit/v3/relyingparty/",this.h=e.firebaseTimeout||Al,this.a=j(e.firebaseHeaders||xl),n&&(this.a["X-Client-Version"]=n,this.f["X-Client-Version"]=n),n="Node"==Jt(),!(n=du.XMLHttpRequest||n&&fu.INTERNAL.node&&fu.INTERNAL.node.XMLHttpRequest)&&!$t())throw new On("internal-error","The XMLHttpRequest compatibility library was not found.");this.c=void 0,$t()?this.c=new Mr(self):Zt()?this.c=new di(n):this.c=new Or}function vi(e,t){t?e.a["X-Firebase-Locale"]=t:delete e.a["X-Firebase-Locale"]}function mi(e,t){t?(e.a["X-Client-Version"]=t,e.f["X-Client-Version"]=t):(delete e.a["X-Client-Version"],delete e.f["X-Client-Version"])}function gi(e,t,n,r,i,o,a){Vt()||$t()?e=f(e.o,e):(Ol||(Ol=new z(function(e,t){_i(e,t)})),e=f(e.u,e)),e(t,n,r,i,o,a)}function _i(e,t){if(((window.gapi||{}).client||{}).request)e();else{du[Ll]=function(){((window.gapi||{}).client||{}).request?e():t(Error("CORS_UNSUPPORTED"))};ni(ci(bt(Dl,{onload:Ll})),function(){t(Error("CORS_UNSUPPORTED"))})}}function bi(e,t){return new z(function(n,r){"refresh_token"==t.grant_type&&t.refresh_token||"authorization_code"==t.grant_type&&t.code?gi(e,e.j+"?key="+encodeURIComponent(e.b),function(e){e?e.error?r(ji(e)):e.access_token&&e.refresh_token?n(e):r(new On("internal-error")):r(new On("network-request-failed"))},"POST",ct(t).toString(),e.f,e.l.get()):r(new On("internal-error"))})}function wi(e,t,n,r,i,o){var a=nt(e.g+t);et(a,"key",e.b),o&&et(a,"cb",mu().toString());var s="GET"==n;if(s)for(var u in r)r.hasOwnProperty(u)&&et(a,u,r[u]);return new z(function(t,o){gi(e,a.toString(),function(e){e?e.error?o(ji(e,i||{})):t(e):o(new On("network-request-failed"))},n,s?void 0:Dt(hn(r)),e.a,e.h.get())})}function Ei(e){if(!fl.test(e.email))throw new On("invalid-email")}function Ci(e){"email"in e&&Ei(e)}function Ti(e,t){return Mi(e,Wl,{identifier:t,continueUri:sn()?jt():"http://localhost"}).then(function(e){return e.allProviders||[]})}function Si(e,t){return Mi(e,Wl,{identifier:t,continueUri:sn()?jt():"http://localhost"}).then(function(e){return e.signinMethods||[]})}function Ii(e){return Mi(e,Xl,{}).then(function(e){return e.authorizedDomains||[]})}function ki(e){if(!e[Nl])throw new On("internal-error")}function Oi(e){if(e.phoneNumber||e.temporaryProof){if(!e.phoneNumber||!e.temporaryProof)throw new On("internal-error")}else{if(!e.sessionInfo)throw new On("missing-verification-id");if(!e.code)throw new On("missing-verification-code")}}function Ni(e,t){return Mi(e,Zl,t)}function Pi(e,t,n){return Mi(e,Hl,{idToken:t,deleteProvider:n})}function Ri(e){if(!e.requestUri||!e.sessionId&&!e.postBody)throw new On("internal-error")}function Ai(e){var t=null;if(e.needConfirmation?(e.code="account-exists-with-different-credential",t=Cr(e)):"FEDERATED_USER_ID_ALREADY_LINKED"==e.errorMessage?(e.code="credential-already-in-use",t=Cr(e)):"EMAIL_EXISTS"==e.errorMessage?(e.code="email-already-in-use",t=Cr(e)):e.errorMessage&&(t=Fi(e.errorMessage)),t)throw t;if(!e[Nl])throw new On("internal-error")}function xi(e,t){return t.returnIdpCredential=!0,Mi(e,rh,t)}function Di(e,t){return t.returnIdpCredential=!0,Mi(e,oh,t)}function Li(e,t){return t.returnIdpCredential=!0,t.autoCreate=!1,Mi(e,ih,t)}function Ui(e){if(!e.oobCode)throw new On("invalid-action-code")}function Mi(e,t,n){if(!Sn(n,t.T))return X(new On("internal-error"));var r,i=t.Cb||"POST";return Y(n).then(t.A).then(function(){return t.R&&(n.returnSecureToken=!0),wi(e,t.endpoint,i,n,t.Tb,t.pb||!1)}).then(function(e){return r=e}).then(t.J).then(function(){if(!t.ba)return r;if(!(t.ba in r))throw new On("internal-error");return r[t.ba]})}function Fi(e){return ji({error:{errors:[{message:e}],code:400,message:e}})}function ji(e,t){var n=(e.error&&e.error.errors&&e.error.errors[0]||{}).reason||"",r={keyInvalid:"invalid-api-key",ipRefererBlocked:"app-not-authorized"};if(n=r[n]?new On(r[n]):null)return n;n=e.error&&e.error.message||"",r={INVALID_CUSTOM_TOKEN:"invalid-custom-token",CREDENTIAL_MISMATCH:"custom-token-mismatch",MISSING_CUSTOM_TOKEN:"internal-error",INVA
1LID_IDENTIFIER:"invalid-email",MISSING_CONTINUE_URI:"internal-error",INVALID_EMAIL:"invalid-email",INVALID_PASSWORD:"wrong-password",USER_DISABLED:"user-disabled",MISSING_PASSWORD:"internal-error",EMAIL_EXISTS:"email-already-in-use",PASSWORD_LOGIN_DISABLED:"operation-not-allowed",INVALID_IDP_RESPONSE:"invalid-credential",FEDERATED_USER_ID_ALREADY_LINKED:"credential-already-in-use",INVALID_MESSAGE_PAYLOAD:"invalid-message-payload",INVALID_RECIPIENT_EMAIL:"invalid-recipient-email",INVALID_SENDER:"invalid-sender",EMAIL_NOT_FOUND:"user-not-found",EXPIRED_OOB_CODE:"expired-action-code",INVALID_OOB_CODE:"invalid-action-code",MISSING_OOB_CODE:"internal-error",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"requires-recent-login",INVALID_ID_TOKEN:"invalid-user-token",TOKEN_EXPIRED:"user-token-expired",USER_NOT_FOUND:"user-token-expired",CORS_UNSUPPORTED:"cors-unsupported",DYNAMIC_LINK_NOT_ACTIVATED:"dynamic-link-not-activated",INVALID_APP_ID:"invalid-app-id",TOO_MANY_ATTEMPTS_TRY_LATER:"too-many-requests",WEAK_PASSWORD:"weak-password",OPERATION_NOT_ALLOWED:"operation-not-allowed",USER_CANCELLED:"user-cancelled",CAPTCHA_CHECK_FAILED:"captcha-check-failed",INVALID_APP_CREDENTIAL:"invalid-app-credential",INVALID_CODE:"invalid-verification-code",INVALID_PHONE_NUMBER:"invalid-phone-number",INVALID_SESSION_INFO:"invalid-verification-id",INVALID_TEMPORARY_PROOF:"invalid-credential",MISSING_APP_CREDENTIAL:"missing-app-credential",MISSING_CODE:"missing-verification-code",MISSING_PHONE_NUMBER:"missing-phone-number",MISSING_SESSION_INFO:"missing-verification-id",QUOTA_EXCEEDED:"quota-exceeded",SESSION_EXPIRED:"code-expired",INVALID_CONTINUE_URI:"invalid-continue-uri",MISSING_ANDROID_PACKAGE_NAME:"missing-android-pkg-name",MISSING_IOS_BUNDLE_ID:"missing-ios-bundle-id",UNAUTHORIZED_DOMAIN:"unauthorized-continue-uri",INVALID_OAUTH_CLIENT_ID:"invalid-oauth-client-id",INVALID_CERT_HASH:"invalid-cert-hash"},B(r,t||{}),t=(t=n.match(/^[^\s]+\s*:\s*(.*)$/))&&1<t.length?t[1]:void 0;for(var i in r)if(0===n.indexOf(i))return new On(r[i],t);return!t&&e&&(t=ln(e)),new On("internal-error",t)}function Bi(e){for(var t in hh)if(hh[t].id===e)return e=hh[t],{firebaseEndpoint:e.Ya,secureTokenEndpoint:e.eb};return null}function Wi(e){this.b=e,this.a=null,this.ab=Vi(this)}function Vi(e){return Ki().then(function(){return new z(function(t,n){rn("gapi.iframes.getContext")().open({where:document.body,url:e.b,messageHandlersFilter:rn("gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER"),attributes:{style:{position:"absolute",top:"-100px",width:"1px",height:"1px"}},dontclear:!0},function(r){function i(){clearTimeout(o),t()}e.a=r,e.a.restyle({setHideOnLeave:!1});var o=setTimeout(function(){n(Error("Network Error"))},dh.get());r.ping(i).then(i,function(){n(Error("Network Error"))})})})})}function Hi(e,t){return e.ab.then(function(){return new z(function(n){e.a.send(t.type,t,n,rn("gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER"))})})}function qi(e,t){e.ab.then(function(){e.a.register("authEvent",t,rn("gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER"))})}function Ki(){return yh||(yh=new z(function(e,t){function n(){yn(),rn("gapi.load")("gapi.iframes",{callback:e,ontimeout:function(){yn(),t(Error("Network Error"))},timeout:ph.get()})}if(rn("gapi.iframes.Iframe"))e();else if(rn("gapi.load"))n();else{var r="__iframefcb"+Math.floor(1e6*Math.random()).toString();du[r]=function(){rn("gapi.load")?n():t(Error("Network Error"))},r=bt(fh,{onload:r}),Y(ci(r)).m(function(){t(Error("Network Error"))})}}).m(function(e){throw yh=null,e}))}function zi(e,t,n){this.j=e,this.g=t,this.h=n,this.f=null,this.a=rt(this.j,"/__/auth/iframe"),et(this.a,"apiKey",this.g),et(this.a,"appName",this.h),this.b=null,this.c=[]}function Gi(e,t,n,r,i){this.o=e,this.u=t,this.c=n,this.l=r,this.h=this.g=this.j=null,this.a=i,this.f=null}function Qi(e){try{return fu.app(e).auth().Ka()}catch(e){return[]}}function Yi(e,t,n,r,i){this.u=e,this.f=t,this.b=n,this.c=r||null,this.h=i||null,this.o=this.s=this.v=null,this.g=[],this.l=this.a=null}function Xi(e){var t=jt();return Ii(e).then(function(e){e:{var n=nt(t),r=n.c;n=n.b;for(var i=0;i<e.length;i++){var o=e[i],a=n,s=r;if(0==o.indexOf("chrome-extension://")?a=nt(o).b==a&&"chrome-extension"==s:"http"!=s&&"https"!=s?a=!1:xc.test(o)?a=a==o:(o=o.split(".").join("\\."),a=new RegExp("^(.+\\."+o+"|"+o+")$","i").test(a)),a){e=!0;break e}}e=!1}if(!e)throw new wr(jt())})}function $i(e){return e.l?e.l:(e.l=Gt().then(function(){if(!e.s){var t=e.c,n=e.h,r=Qi(e.b),i=new zi(e.u,e.f,e.b);i.f=t,i.b=n,i.c=R(r||[]),e.s=i.toString()}e.j=new Wi(e.s),eo(e)}),e.l)}
1function Ji(e){return e.o||(e.v=e.c?tn(e.c,Qi(e.b)):null,e.o=new yi(e.f,Bi(e.h),e.v)),e.o}function Zi(e,t,n,r,i,o,a,s,u,c){return e=new Gi(e,t,n,r,i),e.j=o,e.g=a,e.h=s,e.b=j(u||null),e.f=c,e.toString()}function eo(e){if(!e.j)throw Error("IfcHandler must be initialized!");qi(e.j,function(t){var n={};if(t&&t.authEvent){var r=!1;for(t=_r(t.authEvent),n=0;n<e.g.length;n++)r=e.g[n](t)||r;return n={},n.status=r?"ACK":"ERROR",Y(n)}return n.status="ERROR",Y(n)})}function to(e){var t={type:"webStorageSupport"};return $i(e).then(function(){return Hi(e.j,t)}).then(function(e){if(e&&e.length&&"undefined"!==typeof e[0].webStorageSupport)return e[0].webStorageSupport;throw Error()})}function no(e){if(this.a=e||fu.INTERNAL.reactNative&&fu.INTERNAL.reactNative.AsyncStorage,!this.a)throw new On("internal-error","The React Native compatibility library was not found.");this.type="asyncStorage"}function ro(){if(!so())throw new On("web-storage-unsupported");this.f={},this.a=[],this.b=0,this.g=du.indexedDB,this.type="indexedDB"}function io(e){return new z(function(t,n){var r=e.g.deleteDatabase("firebaseLocalStorageDb");r.onsuccess=function(){t()},r.onerror=function(e){n(Error(e.target.error))}})}function oo(e){return new z(function(t,n){var r=e.g.open("firebaseLocalStorageDb",1);r.onerror=function(e){try{e.preventDefault()}catch(e){}n(Error(e.target.error))},r.onupgradeneeded=function(e){e=e.target.result;try{e.createObjectStore("firebaseLocalStorage",{keyPath:"fbase_key"})}catch(e){n(e)}},r.onsuccess=function(r){r=r.target.result,r.objectStoreNames.contains("firebaseLocalStorage")?t(r):io(e).then(function(){return oo(e)}).then(function(e){t(e)}).m(function(e){n(e)})}})}function ao(e){return e.h||(e.h=oo(e)),e.h}function so(){try{return!!du.indexedDB}catch(e){return!1}}function uo(e){return e.objectStore("firebaseLocalStorage")}function co(e,t){return e.transaction(["firebaseLocalStorage"],t?"readwrite":"readonly")}function lo(e){return new z(function(t,n){e.onsuccess=function(e){e&&e.target?t(e.target.result):t()},e.onerror=function(e){n(Error(e.target.errorCode))}})}function ho(e){function t(){return e.c=Ve(800).then(f(e.Jc,e)).then(function(t){0<t.length&&wu(e.a,function(e){e(t)})}).then(t).m(function(e){"STOP_EVENT"!=e.message&&t()}),e.c}e.c&&e.c.cancel("STOP_EVENT"),t()}function fo(e){var t=this,n=null;this.a=[],this.type="indexedDB",this.c=e,this.b=Y().then(function(){return so()?(vh||(vh=new ro),n=vh,n.set("__sak","!").then(function(){return n.get("__sak")}).then(function(e){if("!"!==e)throw Error("indexedDB not supported!");return n.P("__sak")}).then(function(){return n}).m(function(){return t.c})):t.c}).then(function(e){return t.type=e.type,e.Y(function(e){wu(t.a,function(t){t(e)})}),e})}function po(){this.a={},this.type="inMemory"}function yo(){if(!mo()){if("Node"==Jt())throw new On("internal-error","The LocalStorage compatibility library was not found.");throw new On("web-storage-unsupported")}this.a=vo()||fu.INTERNAL.node.localStorage,this.type="localStorage"}function vo(){try{var e=du.localStorage,t=pn();return e&&(e.setItem(t,"1"),e.removeItem(t)),e}catch(e){return null}}function mo(){var e="Node"==Jt();if(!(e=vo()||e&&fu.INTERNAL.node&&fu.INTERNAL.node.localStorage))return!1;try{return e.setItem("__sak","1"),e.removeItem("__sak"),!0}catch(e){return!1}}function go(){this.type="nullStorage"}function _o(){if(!wo()){if("Node"==Jt())throw new On("internal-error","The SessionStorage compatibility library was not found.");throw new On("web-storage-unsupported")}this.a=bo()||fu.INTERNAL.node.sessionStorage,this.type="sessionStorage"}function bo(){try{var e=du.sessionStorage,t=pn();return e&&(e.setItem(t,"1"),e.removeItem(t)),e}catch(e){return null}}function wo(){var e="Node"==Jt();if(!(e=bo()||e&&fu.INTERNAL.node&&fu.INTERNAL.node.sessionStorage))return!1;try{return e.setItem("__sak","1"),e.removeItem("__sak"),!0}catch(e){return!1}}function Eo(){var e={};e.Browser=_h,e.Node=bh,e.ReactNative=wh,e.Worker=Eh,this.a=e[Jt()]}function Co(e){var t=new On("invalid-persistence-type"),n=new On("unsupported-persistence-type");e:{for(r in Ch)if(Ch[r]==e){var r=!0;break e}r=!1}if(!r||"string"!==typeof e)throw t;switch(Jt()){case"ReactNative":if("session"===e)throw n;break;case"Node":if("none"!==e)throw n;break;default:if(!on()&&"none"!==e)throw n}}function To(){var e=!(dn(nn())||!Xt()),t=cn(),n=on();this.o=e,this.h=t,this.l=n,this.a={},mh||(mh=new Eo),e=mh;try{this.g=!Ft()&&bn()||!du.indexedDB?new e.a.w:new fo($t()?new po:new e.a.w)}catch(e){this.g=new po,this.h=!0}try{this.j=new e.a.Pa}catch(e){this.j=new po}this.u=new po,this.f=f(this.Kb,this),this.b={}}function So(){return gh||(gh=new To),gh}function Io(e,t){switch(t){case"session":return e.j;case"none":return e.u;default:return e.g}}function ko(e,t){return"firebase:"+e.name+(t?":"+t:"")}function Oo(e,t,n){var r=ko(t,n),i=Io(e,t.w);return e.get(t,n).then(function(o){var a=null;try{a=fn(du.localStorage.getItem(r))}catch(e){}if(a&&!o)return du.localStorage.removeItem(r),e.set(t,a,n);a&&o&&"localStorage"!=i.type&&du.localStorage.removeItem(r)})}function No(e,t,n){return n=ko(t,n),"local"==t.w&&(e.b[n]=null),Io(e,t.w).P(n)}function Po(e){Ro(e),e.c=setInterval(function(){for(var t in e.a){var n=du.localStorage.getItem(t),r=e.b[t];n!=r&&(e.b[t]=n,n=new _e({type:"storage",key:t,target:window,oldValue:r,newValue:n,a:!0}),e.Kb(n))}},1e3)}function Ro(e){e.c&&(clearInterval(e.c),e.c=null)}function Ao(e){this.a=e,this.b=So()}function xo(e){return e.b.get(Sh,e.a).then(function(e){return _r(e)})}function Do(){this.a=So()}function Lo(){this.b=-1}function Uo(e,t){this.b=-1,this.b=Ih,this.f=du.Uint8Array?new Uint8Array(this.b):Array(this.b),this.g=this.c=0,this.a=[],this.j=e,this.h=t,this.l=du.Int32Array?new Int32Array(64):Array(64),void 0!==Th||(Th=du.Int32Array?new Int32Array(Rh):Rh),this.reset()}function Mo(e){for(var t=e.f,n=e.l,r=0,i=0;i<t.length;)n[r++]=t[i]<<24|t[i+1]<<16|t[i+2]<<8|t[i+3],i=4*r;for(t=16;64>t;t++){i=0|n[t-15],r=0|n[t-2];var o=(0|n[t-16])+((i>>>7|i<<25)^(i>>>18|i<<14)^i>>>3)|0,a=(0|n[t-7])+((r>>>17|r<<15)^(r>>
1>19|r<<13)^r>>>10)|0;n[t]=o+a|0}r=0|e.a[0],i=0|e.a[1];var s=0|e.a[2],u=0|e.a[3],c=0|e.a[4],l=0|e.a[5],h=0|e.a[6];for(o=0|e.a[7],t=0;64>t;t++){var f=((r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10))+(r&i^r&s^i&s)|0;a=c&l^~c&h,o=o+((c>>>6|c<<26)^(c>>>11|c<<21)^(c>>>25|c<<7))|0,a=a+(0|Th[t])|0,a=o+(a+(0|n[t])|0)|0,o=h,h=l,l=c,c=u+a|0,u=s,s=i,i=r,r=a+f|0}e.a[0]=e.a[0]+r|0,e.a[1]=e.a[1]+i|0,e.a[2]=e.a[2]+s|0,e.a[3]=e.a[3]+u|0,e.a[4]=e.a[4]+c|0,e.a[5]=e.a[5]+l|0,e.a[6]=e.a[6]+h|0,e.a[7]=e.a[7]+o|0}function Fo(t,n,r){void 0===r&&(r=n.length);var i=0,o=t.c;if(e(n))for(;i<r;)t.f[o++]=n.charCodeAt(i++),o==t.b&&(Mo(t),o=0);else{if(!s(n))throw Error("message must be string or array");for(;i<r;){var a=n[i++];if(!("number"==typeof a&&0<=a&&255>=a&&a==(0|a)))throw Error("message must be a byte array");t.f[o++]=a,o==t.b&&(Mo(t),o=0)}}t.c=o,t.g+=r}function jo(){Uo.call(this,8,Ah)}function Bo(e,t,n,r,i){this.u=e,this.j=t,this.l=n,this.o=r||null,this.s=i||null,this.h=t+":"+n,this.v=new Do,this.g=new Ao(this.h),this.f=null,this.b=[],this.a=this.c=null}function Wo(e){return new On("invalid-cordova-configuration",e)}function Vo(){for(var e=20,t=[];0<e;)t.push("1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".charAt(Math.floor(62*Math.random()))),e--;return t.join("")}function Ho(e){var t=new jo;Fo(t,e),e=[];var n=8*t.g;56>t.c?Fo(t,Ph,56-t.c):Fo(t,Ph,t.b-(t.c-56));for(var r=63;56<=r;r--)t.f[r]=255&n,n/=256;for(Mo(t),r=n=0;r<t.j;r++)for(var i=24;0<=i;i-=8)e[n++]=t.a[r]>>i&255;return An(e)}function qo(e,t,n,r){var i=Vo(),o=new gr(t,r,null,i,new On("no-auth-event")),a=rn("BuildInfo.packageName",du);if("string"!==typeof a)throw new On("invalid-cordova-configuration");var s=rn("BuildInfo.displayName",du),u={};if(nn().toLowerCase().match(/iphone|ipad|ipod/))u.ibi=a;else{if(!nn().toLowerCase().match(/android/))return X(new On("operation-not-supported-in-this-environment"));u.apn=a}s&&(u.appDisplayName=s),i=Ho(i),u.sessionId=i;var c=Zi(e.u,e.j,e.l,t,n,null,r,e.o,u,e.s);return e.ea().then(function(){var t=e.h;return e.v.a.set(Sh,o.C(),t)}).then(function(){var t=rn("cordova.plugins.browsertab.isAvailable",du);if("function"!==typeof t)throw new On("invalid-cordova-configuration");var n=null;t(function(t){if(t){if("function"!==typeof(n=rn("cordova.plugins.browsertab.openUrl",du)))throw new On("invalid-cordova-configuration");n(c)}else{if("function"!==typeof(n=rn("cordova.InAppBrowser.open",du)))throw new On("invalid-cordova-configuration");t=nn(),t=!(!t.match(/(iPad|iPhone|iPod).*OS 7_\d/i)&&!t.match(/(iPad|iPhone|iPod).*OS 8_\d/i)),e.a=n(c,t?"_blank":"_system","location=yes")}})})}function Ko(e,t){for(var n=0;n<e.b.length;n++)try{e.b[n](t)}catch(e){}}function zo(e){return e.f||(e.f=e.ea().then(function(){return new z(function(t){function n(r){return t(r),e.Ja(n),!1}e.va(n),Qo(e)})})),e.f}function Go(e){var t=null;return xo(e.g).then(function(n){return t=n,n=e.g,No(n.b,Sh,n.a)}).then(function(){return t})}function Qo(e){function t(t){r=!0,i&&i.cancel(),Go(e).then(function(r){var i=n;if(r&&t&&t.url){var o=null;i=Qn(t.url),-1!=i.indexOf("/__/auth/callback")&&(o=nt(i),o=fn(tt(o,"firebaseError")||null),o=(o="object"===typeof o?Nn(o):null)?new gr(r.b,r.c,null,null,o):new gr(r.b,r.c,i,r.g)),i=o||n}Ko(e,i)})}var n=new gr("unknown",null,null,null,new On("no-auth-event")),r=!1,i=Ve(500).then(function(){return Go(e).then(function(){r||Ko(e,n)})}),o=du.handleOpenURL;du.handleOpenURL=function(e){if(0==e.toLowerCase().indexOf(rn("BuildInfo.packageName",du).toLowerCase()+"://")&&t({url:e}),"function"===typeof o)try{o(e)}catch(e){console.error(e)}},hl||(hl=new br),hl.subscribe(t)}function Yo(e){this.a=e,this.b=So()}function Xo(e){return e.b.set(xh,"pending",e.a)}function $o(e){return No(e.b,xh,e.a)}function Jo(e){return e.b.get(xh,e.a).then(function(e){return"pending"==e})}function Zo(e,t,n){this.v=e,this.l=t,this.u=n,this.h=[],this.f=!1,this.j=f(this.o,this),this.c=new aa,this.s=new pa,this.g=new Yo(this.l+":"+this.u),this.b={},this.b.unknown=this.c,this.b.signInViaRedirect=this.c,this.b.linkViaRedirect=this.c,this.b.reauthViaRedirect=this.c,this.b.signInViaPopup=this.s,this.b.linkViaPopup=this.s,this.b.reauthViaPopup=this.s,this.a=ea(this.v,this.l,this.u,Ml)}function ea(e,t,n,r){var i=fu.SDK_VERSION||null;return Yt()?new Bo(e,t,n,i,r):new Yi(e,t,n,i,r)}function ta(e){e.f||(e.f=!0,e.a.va(e.j));var t=e.a;return e.a.ea().m(function(n){throw e.a==t&&e.reset(),n})}function na(e){e.a.Gb()&&ta(e).m(function(t){var n=new gr("unknown",null,null,null,new On("operation-not-supported-in-this-environment"));ia(t)&&e.o(n)}),e.a.Bb()||sa(e.c)}function ra(e,t,n,r,i,o){return e.a.xb(t,n,r,function(){e.f||(e.f=!0,e.a.va(e.j))},function(){e.reset()},i,o)}function ia(e){return!(!e||"auth/cordova-not-ready"!=e.code)}
1function oa(e,t,n){var r=t+":"+n;return Uh[r]||(Uh[r]=new Zo(e,t,n)),Uh[r]}function aa(){this.b=null,this.f=[],this.c=[],this.a=null,this.g=!1}function sa(e){e.g||(e.g=!0,ha(e,!1,null,null))}function ua(e,t,n){n=n.wa(t.b,t.c);var r=t.f,i=t.g,o=!!t.b.match(/Redirect$/);n(r,i).then(function(t){ha(e,o,t,null)}).m(function(t){ha(e,o,null,t)})}function ca(e,t){if(e.b=function(){return X(t)},e.c.length)for(var n=0;n<e.c.length;n++)e.c[n](t)}function la(e,t){if(e.b=function(){return Y(t)},e.f.length)for(var n=0;n<e.f.length;n++)e.f[n](t)}function ha(e,t,n,r){t?r?ca(e,r):la(e,n):la(e,{user:null}),e.f=[],e.c=[]}function fa(e){var t=new On("timeout");e.a&&e.a.cancel(),e.a=Ve(Lh.get()).then(function(){e.b||ha(e,!0,null,t)})}function pa(){}function da(e,t){var n=e.c,r=e.b;t.wa(r,n)(e.f,e.g).then(function(e){t.ga(r,e,null,n)}).m(function(e){t.ga(r,null,e,n)})}function ya(e,t){this.a=t,wn(this,"verificationId",e)}function va(e,t,n,r){return new dr(e).Sa(t,n).then(function(e){return new ya(e,r)})}function ma(e){var t=Fn(e);if(!(t&&t.exp&&t.auth_time&&t.iat))throw new On("internal-error","An internal error occurred. The token obtained by Firebase appears to be malformed. Please retry the operation.");En(this,{token:e,expirationTime:_n(1e3*t.exp),authTime:_n(1e3*t.auth_time),issuedAtTime:_n(1e3*t.iat),signInProvider:t.firebase&&t.firebase.sign_in_provider?t.firebase.sign_in_provider:null,claims:t})}function ga(e,t,n){if(this.h=e,this.j=t,this.g=n,this.c=3e4,this.f=96e4,this.b=null,this.a=this.c,this.f<this.c)throw Error("Proactive refresh lower bound greater than upper bound!")}function _a(e,t){return t?(e.a=e.c,e.g()):(t=e.a,e.a*=2,e.a>e.f&&(e.a=e.f),t)}function ba(e,t){e.stop(),e.b=Ve(_a(e,t)).then(function(){return gn()}).then(function(){return e.h()}).then(function(){ba(e,!0)}).m(function(t){e.j(t)&&ba(e,!1)})}function wa(e){this.f=e,this.b=this.a=null,this.c=0}function Ea(e,t){var n=t[Nl],r=t.refreshToken;t=Ca(t.expiresIn),e.b=n,e.c=t,e.a=r}function Ca(e){return mu()+1e3*parseInt(e,10)}function Ta(e,t){return bi(e.f,t).then(function(t){return e.b=t.access_token,e.c=Ca(t.expires_in),e.a=t.refresh_token,{accessToken:e.b,expirationTime:e.c,refreshToken:e.a}}).m(function(t){throw"auth/user-token-expired"==t.code&&(e.a=null),t})}function Sa(e,t){this.a=e||null,this.b=t||null,En(this,{lastSignInTime:_n(t||null),creationTime:_n(e||null)})}function Ia(e){return new Sa(e.a,e.b)}function ka(e,t,n,r,i,o){En(this,{uid:e,displayName:r||null,photoURL:i||null,email:n||null,phoneNumber:o||null,providerId:t})}function Oa(e,t){ge.call(this,e);for(var n in t)this[n]=t[n]}function Na(e,t,n){this.D=[],this.G=e.apiKey,this.s=e.appName,this.B=e.authDomain||null,e=fu.SDK_VERSION?tn(fu.SDK_VERSION):null,this.b=new yi(this.G,Bi(Ml),e),this.h=new wa(this.b),Ma(this,t[Nl]),Ea(this.h,t),wn(this,"refreshToken",this.h.a),Wa(this,n||{}),Me.call(this),this.I=!1,this.B&&an()&&(this.a=oa(this.B,this.G,this.s)),this.N=[],this.j=null,this.l=Da(this),this.V=f(this.Ga,this);var r=this;this.ia=null,this.sa=function(e){r.na(e.g)},this.X=null,this.O=[],this.ra=function(e){Ra(r,e.c)},this.W=null}function Pa(e,t){e.X&&Ne(e.X,"languageCodeChanged",e.sa),(e.X=t)&&Se(t,"languageCodeChanged",e.sa)}function Ra(e,t){e.O=t,mi(e.b,fu.SDK_VERSION?tn(fu.SDK_VERSION,e.O):null)}function Aa(e,t){e.W&&Ne(e.W,"frameworkChanged",e.ra),(e.W=t)&&Se(t,"frameworkChanged",e.ra)}function xa(e){try{return fu.app(e.s).auth()}catch(t){throw new On("internal-error","No firebase.auth.Auth instance is available for the Firebase App '"+e.s+"'!")}}function Da(e){return new ga(function(){return e.F(!0)},function(e){return!(!e||"auth/network-request-failed"!=e.code)},function(){var t=e.h.c-mu()-3e5;return 0<t?t:0})}function La(e){e.o||e.l.b||(e.l.start(),Ne(e,"tokenChanged",e.V),Se(e,"tokenChanged",e.V))}function Ua(e){Ne(e,"tokenChanged",e.V),e.l.stop()}function Ma(e,t){e.qa=t,wn(e,"_lat",t)}function Fa(e,t){N(e.N,function(e){return e==t})}function ja(e){for(var t=[],n=0;n<e.N.length;n++)t.push(e.N[n](e));return Z(t).then(function(){return e})}function Ba(e){e.a&&!e.I&&(e.I=!0,e.a.subscribe(e))}function Wa(e,t){En(e,{uid:t.uid,displayName:t.displayName||null,photoURL:t.photoURL||null,email:t.email||null,emailVerified:t.emailVerified||!1,phoneNumber:t.phoneNumber||null,isAnonymous:t.isAnonymous||!1,metadata:new Sa(t.createdAt,t.lastLoginAt),providerData:[]})}function Va(){}function Ha(e){return Y().then(function(){if(e.o)throw new On("app-deleted")})}function qa(e){return Eu(e.providerData,function(e){return e.providerId})}function Ka(e,t){t&&(za(e,t.providerId),e.providerData.push(t))}function za(e,t){N(e.providerData,function(e){return e.providerId==t})}function Ga(e,t,n){("uid"!=t||n)&&e.hasOwnProperty(t)&&wn(e,t,n)}function Qa(e,t){e!=t&&(En(e,{uid:t.uid,displayName:t.displayName,photoURL:t.photoURL,email:t.email,emailVerified:t.emailVerified,phoneNumber:t.phoneNumber,isAnonymous:t.isAnonymous,providerData:[]}),t.metadata?wn(e,"metadata",Ia(t.metadata)):wn(e,"metadata",new Sa),wu(t.providerData,function(t){Ka(e,t)}),e.h=t.h,wn(e,"refreshToken",e.h.a))}function Ya(e){return e.F().then(function(t){var n=e.isAnonymous;return $a(e,t).then(function(){return n||Ga(e,"isAnonymous",!1),t})})}function Xa(e,t){t[Nl]&&e.qa!=t[Nl]&&(Ea(e.h,t),e.dispatchEvent(new Oa("tokenChanged")),Ma(e,t[Nl]),Ga(e,"refreshToken",e.h.a))}function $a(e,t){return Mi(e.b,zl,{idToken:t}).then(f(e.uc,e))}function Ja(e){return(e=e.providerUserInfo)&&e.length?Eu(e,function(e){return new ka(e.rawId,e.providerId,e.email,e.displayName,e.photoUrl,e.phoneNumber)}):[]}function Za(e,t){return Ya(e).then(function(){if(k(qa(e),t))return ja(e).then(function(){throw new On("provider-already-linked")})})}
1function es(e,t,n){var r=vr(t);return t=Bn(t),Cn({user:e,credential:r,additionalUserInfo:t,operationType:n})}function ts(e,t){return Xa(e,t),e.reload().then(function(){return e})}function ns(e,t,n,r,i){if(!an())return X(new On("operation-not-supported-in-this-environment"));if(e.j&&!i)return X(e.j);var o=jn(n.providerId),a=pn(e.uid+":::"),s=null;(!cn()||Xt())&&e.B&&n.isOAuthProvider&&(s=Zi(e.B,e.G,e.s,t,n,null,a,fu.SDK_VERSION||null));var u=Kt(s,o&&o.Aa,o&&o.za);return r=r().then(function(){if(is(e),!i)return e.F().then(function(){})}).then(function(){return ra(e.a,u,t,n,a,!!s)}).then(function(){return new z(function(n,r){e.ga(t,null,new On("cancelled-popup-request"),e.g||null),e.f=n,e.v=r,e.g=a,e.c=e.a.Da(e,t,u,a)})}).then(function(e){return u&&qt(u),e?Cn(e):null}).m(function(e){throw u&&qt(u),e}),os(e,r,i)}function rs(e,t,n,r,i){if(!an())return X(new On("operation-not-supported-in-this-environment"));if(e.j&&!i)return X(e.j);var o=null,a=pn(e.uid+":::");return r=r().then(function(){if(is(e),!i)return e.F().then(function(){})}).then(function(){return e.$=a,ja(e)}).then(function(t){return e.fa&&(t=e.fa,t=t.b.set(Mh,e.C(),t.a)),t}).then(function(){return e.a.Ba(t,n,a)}).m(function(t){if(o=t,e.fa)return ls(e.fa);throw o}).then(function(){if(o)throw o}),os(e,r,i)}function is(e){if(!e.a||!e.I){if(e.a&&!e.I)throw new On("internal-error");throw new On("auth-domain-config-required")}}function os(e,t,n){var r=as(e,t,n);return e.D.push(r),r.ha(function(){O(e.D,r)}),r}function as(e,t,n){return e.j&&!n?(t.cancel(),X(e.j)):t.m(function(t){throw!t||"auth/user-disabled"!=t.code&&"auth/user-token-expired"!=t.code||(e.j||e.dispatchEvent(new Oa("userInvalidated")),e.j=t),t})}function ss(e){if(!e.apiKey)return null;var t={apiKey:e.apiKey,authDomain:e.authDomain,appName:e.appName},n={};if(!(e.stsTokenManager&&e.stsTokenManager.accessToken&&e.stsTokenManager.expirationTime))return null;n[Nl]=e.stsTokenManager.accessToken,n.refreshToken=e.stsTokenManager.refreshToken||null,n.expiresIn=(e.stsTokenManager.expirationTime-mu())/1e3;var r=new Na(t,n,e);return e.providerData&&wu(e.providerData,function(e){e&&Ka(r,Cn(e))}),e.redirectEventId&&(r.$=e.redirectEventId),r}function us(e,t,n,r){var i=new Na(e,t);return n&&(i.fa=n),r&&Ra(i,r),i.reload().then(function(){return i})}function cs(e){this.a=e,this.b=So()}function ls(e){return No(e.b,Mh,e.a)}function hs(e,t){return e.b.get(Mh,e.a).then(function(e){return e&&t&&(e.authDomain=t),ss(e||{})})}function fs(e){this.a=e,this.b=So(),this.c=null,this.f=ds(this),this.b.addListener(ys("local"),this.a,f(this.g,this))}function ps(e,t){var n,r=[];for(n in Ch)Ch[n]!==t&&r.push(No(e.b,ys(Ch[n]),e.a));return r.push(No(e.b,Fh,e.a)),J(r)}function ds(e){var t=ys("local"),n=ys("session"),r=ys("none");return Oo(e.b,t,e.a).then(function(){return e.b.get(n,e.a)}).then(function(i){return i?n:e.b.get(r,e.a).then(function(n){return n?r:e.b.get(t,e.a).then(function(n){return n?t:e.b.get(Fh,e.a).then(function(e){return e?ys(e):t})})})}).then(function(t){return e.c=t,ps(e,t.w)}).m(function(){e.c||(e.c=t)})}function ys(e){return{name:"authUser",w:e}}function vs(e){return bs(e,function(){return e.b.set(Fh,e.c.w,e.a)})}function ms(e,t){return bs(e,function(){return e.b.set(e.c,t.C(),e.a)})}function gs(e){return bs(e,function(){return No(e.b,e.c,e.a)})}function _s(e,t){return bs(e,function(){return e.b.get(e.c,e.a).then(function(e){return e&&t&&(e.authDomain=t),ss(e||{})})})}function bs(e,t){return e.f=e.f.then(t,t),e.f}function ws(e){if(this.l=!1,wn(this,"app",e),!xs(this).options||!xs(this).options.apiKey)throw new On("invalid-api-key");e=fu.SDK_VERSION?tn(fu.SDK_VERSION):null,this.b=new yi(xs(this).options&&xs(this).options.apiKey,Bi(Ml),e),this.N=[],this.o=[],this.I=[],this.Ob=fu.INTERNAL.createSubscribe(f(this.ic,this)),this.O=void 0,this.Pb=fu.INTERNAL.createSubscribe(f(this.jc,this)),Os(this,null),this.h=new fs(xs(this).options.apiKey+":"+xs(this).name),this.G=new cs(xs(this).options.apiKey+":"+xs(this).name),this.V=Fs(this,Ps(this)),this.j=Fs(this,Rs(this)),this.X=!1,this.ia=f(this.Ic,this),this.Ga=f(this.ka,this),this.qa=f(this.Yb,this),this.ra=f(this.gc,this),this.sa=f(this.hc,this),Is(this),this.INTERNAL={},this.INTERNAL.delete=f(this.delete,this),this.INTERNAL.logFramework=f(this.qc,this),this.s=0,Me.call(this),Ts(this),this.D=[]}function Es(e){ge.call(this,"languageCodeChanged"),this.g=e}function Cs(e){ge.call(this,"frameworkChanged"),this.c=e}function Ts(e){Object.defineProperty(e,"lc",{get:function(){return this.ca()},set:function(e){this.na(e)},enumerable:!1}),e.W=null}function Ss(e){return e.Nb||X(new On("auth-domain-config-required"))}function Is(e){var t=xs(e).options.authDomain,n=xs(e).options.apiKey;t&&an()&&(e.Nb=e.V.then(function(){if(!e.l){if(e.a=oa(t,n,xs(e).name),e.a.subscribe(e),Ds(e)&&Ba(Ds(e)),e.B){Ba(e.B);var r=e.B;r.na(e.ca()),Pa(r,e),r=e.B,Ra(r,e.D),Aa(r,e),e.B=null}return e.a}}))}function ks(e,t){var n={};return n.apiKey=xs(e).options.apiKey,n.authDomain=xs(e).options.authDomain,n.appName=xs(e).name,e.V.then(function(){return us(n,t,e.G,e.Ka())}).then(function(t){return Ds(e)&&t.uid==Ds(e).uid?(Qa(Ds(e),t),e.ka(t)):(Os(e,t),Ba(t),e.ka(t))}).then(function(){Us(e)})}function Os(e,t){Ds(e)&&(Fa(Ds(e),e.Ga),Ne(Ds(e),"tokenChanged",e.qa),Ne(Ds(e),"userDeleted",e.ra),Ne(Ds(e),"userInvalidated",e.sa),Ua(Ds(e))),t&&(t.N.push(e.Ga),Se(t,"tokenChanged",e.qa),Se(t,"userDeleted",e.ra),Se(t,"userInvalidated",e.sa),0<e.s&&La(t)),wn(e,"currentUser",t),t&&(t.na(e.ca()),Pa(t,e),Ra(t,e.D),Aa(t,e))}function Ns(e){var t=hs(e.G,xs(e).options.authDomain).then(function(t){return(e.B=t)&&(t.fa=e.G),ls(e.G)});return Fs(e,t)}function Ps(e){var t=xs(e).options.authDomain,n=Ns(e).then(function(){return _s(e.h,t)}).then(function(t){return t?(t.fa=e.G,e.B&&(e.B.$||null)==(t.$||null)?t:t.reload().then(function(){return ms(e.h,t).then(function(){return t})}).m(function(n){return"auth/network-request-failed"==n.code?t:gs(e.h)})):null}).then(function(t){Os(e,t||null)});return Fs(e,n)}function Rs(e){return e.V.then(function(){return e.da()}).m(function(){}).then(function(){if(!e.l)return e.ia()}).m(function(){}).then(function(){if(!e.l){e.X=!0;var t=e.h;t.b.addListener(ys("local"),t.a,e.ia)}})}function As(e,t){var n=null,r=null;return Fs(e,t.then(function(t){return n=vr(t),r=Bn(t),ks(e,t)}).then(function(){return Cn({user:Ds(e),credential:n,additionalUserInfo:r,operationType:"signIn"})}))}function xs(e){return e.app}function Ds(e){return e.currentUser}function Ls(e){return Ds(e)&&Ds(e)._lat||null}function Us(e){if(e.X){for(var t=0;t<e.o.length;t++)e.o[t]&&e.o[t](Ls(e));if(e.O!==e.getUid()&&e.I.length)for(e.O=e.getUid(),t=0;t<e.I.length;t++)e.I[t]&&e.I[t](Ls(e))}}function Ms(e,t){e.I.push(t),Fs(e,e.j.then(function(){!e.l&&k(e.I,t)&&e.O!==e.getUid()&&(e.O=e.getUid(),t(Ls(e)))}))}function Fs(e,t){return e.N.push(t),t.ha(function(){O(e.N,t)}),t}function js(e,t,n,r,i,o){if(wn(this,"type","recaptcha"),this.b=this.c=null,this.o=!1,this.l=t,this.a=n||{theme:"light",type:"image"},this.g=[],this.a[Wh])throw new On("argument-error","sitekey should not be provided for reCAPTCHA as one is automatically provisioned for the current project.");if(this.h="invisible"===this.a[Vh],!du.document)throw new On("operation-not-supported-in-this-environment","RecaptchaVerifier is only supported in a browser HTTP/HTTPS environment with DOM support.");if(!Nt(t)||!this.h&&Nt(t).hasChildNodes())throw new On("argument-error","reCAPTCHA container is either not found or already contains inner elements!");this.u=new yi(e,o||null,i||null),this.s=r||function(){return null};var a=this;this.j=[];var s=this.a[jh];this.a[jh]=function(e){if(Bs(a,e),"function"===typeof s)s(e);else if("string"===typeof s){var t=rn(s,du);"function"===typeof t&&t(e)}};var u=this.a[Bh];this.a[Bh]=function(){if(Bs(a,null),"function"===typeof u)u();else if("string"===typeof u){var e=rn(u,du);"function"===typeof e&&e()}}}function Bs(e,t){for(var n=0;n<e.j.length;n++)try{e.j[n](t)}catch(e){}}function Ws(e,t){N(e.j,function(e){return e==t})}function Vs(e,t){return e.g.push(t),t.ha(function(){O(e.g,t)}),t}function Hs(e){if(e.o)throw new On("internal-error","RecaptchaVerifier instance has been destroyed.")}function qs(){this.b=du.grecaptcha?1/0:0,this.c=null,this.a="__rcb"+Math.floor(1e6*Math.random()).toString()}function Ks(e,t){return new z(function(n,r){var i=setTimeout(function(){r(new On("network-request-failed"))},qh.get());if(!du.grecaptcha||t!==e.c&&!e.b){du[e.a]=function(){if(du.grecaptcha){e.c=t;var o=du.grecaptcha.render;du.grecaptcha.render=function(t,n){return t=o(t,n),e.b++,t},clearTimeout(i),n()}else clearTimeout(i),r(new On("internal-error"));delete du[e.a]};Y(ci(bt(Hh,{onload:e.a,hl:t||""}))).m(function(){clearTimeout(i),r(new On("internal-error","Unable to load external reCAPTCHA dependencies!"))})}else clearTimeout(i),n()})}function zs(){return Kh||(Kh=new qs),Kh}function Gs(e,t,n){try{this.f=n||fu.app()}catch(e){throw new On("argument-error","No firebase.app.App instance is currently initialized.")}if(!this.f.options||!this.f.options.apiKey)throw new On("invalid-api-key");n=this.f.options.apiKey;var r=this,i=null;try{i=this.f.auth().Ka()}catch(e){}
1i=fu.SDK_VERSION?tn(fu.SDK_VERSION,i):null,js.call(this,n,e,t,function(){try{var e=r.f.auth().ca()}catch(t){e=null}return e},i,Bi(Ml))}function Qs(e,t,n,r){e:{n=Array.prototype.slice.call(n);for(var i=0,o=!1,a=0;a<t.length;a++)if(t[a].optional)o=!0;else{if(o)throw new On("internal-error","Argument validator encountered a required argument after an optional argument.");i++}if(o=t.length,n.length<i||o<n.length)r="Expected "+(i==o?1==i?"1 argument":i+" arguments":i+"-"+o+" arguments")+" but got "+n.length+".";else{for(i=0;i<n.length;i++)if(o=t[i].optional&&void 0===n[i],!t[i].M(n[i])&&!o){if(t=t[i],0>i||i>=zh.length)throw new On("internal-error","Argument validator received an unsupported number of arguments.");n=zh[i],r=(r?"":n+" argument ")+(t.name?'"'+t.name+'" ':"")+"must be "+t.K+".";break e}r=null}}if(r)throw new On("argument-error",e+" failed: "+r)}function Ys(t,n){return{name:t||"",K:"a valid string",optional:!!n,M:e}}function Xs(){return{name:"opt_forceRefresh",K:"a boolean",optional:!0,M:t}}function $s(e,t){return{name:e||"",K:"a valid object",optional:!!t,M:c}}function Js(e,t){return{name:e||"",K:"a function",optional:!!t,M:u}}function Zs(e,t){return{name:e||"",K:"null",optional:!!t,M:o}}function eu(){return{name:"",K:"an HTML element",optional:!1,M:function(e){return!!(e&&e instanceof Element)}}}function tu(){return{name:"auth",K:"an instance of Firebase Auth",optional:!0,M:function(e){return!!(e&&e instanceof ws)}}}function nu(){return{name:"app",K:"an instance of Firebase App",optional:!0,M:function(e){return!!(e&&e instanceof fu.app.App)}}}function ru(e){return{name:e?e+"Credential":"credential",K:e?"a valid "+e+" credential":"a valid credential",optional:!1,M:function(t){if(!t)return!1;var n=!e||t.providerId===e;return!(!t.xa||!n)}}}function iu(){return{name:"authProvider",K:"a valid Auth provider",optional:!1,M:function(e){return!!(e&&e.providerId&&e.hasOwnProperty&&e.hasOwnProperty("isOAuthProvider"))}}}function ou(){return{name:"applicationVerifier",K:"an implementation of firebase.auth.ApplicationVerifier",optional:!1,M:function(t){return!!(t&&e(t.type)&&u(t.verify))}}}function au(e,t,n,r){return{name:n||"",K:e.K+" or "+t.K,optional:!!r,M:function(n){return e.M(n)||t.M(n)}}}function su(e,t){for(var n in t){var r=t[n].name;e[r]=cu(r,e[n],t[n].i)}}function uu(e,t,n,r){e[t]=cu(t,n,r)}function cu(e,t,n){function r(){var e=Array.prototype.slice.call(arguments);return Qs(o,n,e),t.apply(this,e)}if(!n)return t;var i,o=lu(e);for(i in t)r[i]=t[i];for(i in t.prototype)r.prototype[i]=t.prototype[i];return r}function lu(e){return e=e.split("."),e[e.length-1]}var hu,fu=n(10).default,pu=pu||{},du=this,yu="closure_uid_"+(1e9*Math.random()>>>0),vu=0,mu=Date.now||function(){return+new Date};d(m,Error),m.prototype.name="CustomError",d(g,m),g.prototype.name="AssertionError",b.prototype.get=function(){if(0<this.b){this.b--;var e=this.a;this.a=e.next,e.next=null}else e=this.c();return e};var gu=new b(function(){return new T},function(e){e.reset()});E.prototype.add=function(e,t){var n=gu.get();n.set(e,t),this.b?this.b.next=n:this.a=n,this.b=n},T.prototype.set=function(e,t){this.a=e,this.b=t,this.next=null},T.prototype.reset=function(){this.next=this.b=this.a=null};var _u,bu=Array.prototype.indexOf?function(e,t){return Array.prototype.indexOf.call(e,t,void 0)}:function(t,n){if(e(t))return e(n)&&1==n.length?t.indexOf(n,0):-1;for(var r=0;r<t.length;r++)if(r in t&&t[r]===n)return r;return-1},wu=Array.prototype.forEach?function(e,t,n){Array.prototype.forEach.call(e,t,n)}:function(t,n,r){for(var i=t.length,o=e(t)?t.split(""):t,a=0;a<i;a++)a in o&&n.call(r,o[a],a,t)},Eu=Array.prototype.map?function(e,t){return Array.prototype.map.call(e,t,void 0)}:function(t,n){for(var r=t.length,i=Array(r),o=e(t)?t.split(""):t,a=0;a<r;a++)a in o&&(i[a]=n.call(void 0,o[a],a,t));return i},Cu=Array.prototype.some?function(e,t){return Array.prototype.some.call(e,t,void 0)}:function(t,n){for(var r=t.length,i=e(t)?t.split(""):t,o=0;o<r;o++)if(o in i&&n.call(void 0,i[o],o,t))return!0;return!1},Tu=String.prototype.trim?function(e){return e.trim()}:function(e){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(e)[1]},Su=/&/g,Iu=/</g,ku=/>/g,Ou=/"/g,Nu=/'/g,Pu=/\x00/g,Ru=/[\x00&<>"']/;e:{var Au=du.navigator;if(Au){var xu=Au.userAgent;if(xu){_u=xu;break e}}_u=""}var Du,Lu,Uu="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleStr
1ing toString valueOf".split(" "),Mu=!1,Fu=new E,ju=0,Bu=2,Wu=3;G.prototype.reset=function(){this.f=this.b=this.g=this.a=null,this.c=!1};var Vu=new b(function(){return new G},function(e){e.reset()});z.prototype.then=function(e,t,n){return ne(this,u(e)?e:null,u(t)?t:null,n)},y(z),hu=z.prototype,hu.ha=function(e,t){return e=Q(e,e,t),e.c=!0,te(this,e),this},hu.m=function(e,t){return ne(this,null,e,t)},hu.cancel=function(e){this.a==ju&&H(function(){ee(this,new he(e))},this)},hu.Kc=function(e){this.a=ju,re(this,Bu,e)},hu.Lc=function(e){this.a=ju,re(this,Wu,e)},hu.Ub=function(){for(var e;e=se(this);)ue(this,e,this.a,this.j);this.h=!1};var Hu=W;d(he,m),he.prototype.name="cancel";var qu=0,Ku={};fe.prototype.pa=!1,fe.prototype.ua=function(){if(this.oa)for(;this.oa.length;)this.oa.shift()()},de[" "]=r;var zu,Gu=U("Opera"),Qu=U("Trident")||U("MSIE"),Yu=U("Edge"),Xu=Yu||Qu,$u=U("Gecko")&&!(D(_u.toLowerCase(),"webkit")&&!U("Edge"))&&!(U("Trident")||U("MSIE"))&&!U("Edge"),Ju=D(_u.toLowerCase(),"webkit")&&!U("Edge");e:{var Zu="",ec=function(){var e=_u;return $u?/rv:([^\);]+)(\)|;)/.exec(e):Yu?/Edge\/([\d\.]+)/.exec(e):Qu?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(e):Ju?/WebKit\/(\S+)/.exec(e):Gu?/(?:Version)[ \/]?(\S+)/.exec(e):void 0}();if(ec&&(Zu=ec?ec[1]:""),Qu){var tc=ve();if(null!=tc&&tc>parseFloat(Zu)){zu=String(tc);break e}}zu=Zu}var nc,rc={},ic=du.document;nc=ic&&Qu?ve()||("CSS1Compat"==ic.compatMode?parseInt(zu,10):5):void 0;var oc=Object.freeze||function(e){return e},ac=!Qu||9<=Number(nc),sc=Qu&&!me("9"),uc=function(){if(!du.addEventListener||!Object.defineProperty)return!1;var e=!1,t=Object.defineProperty({},"passive",{get:function(){e=!0}});return du.addEventListener("test",r,t),du.removeEventListener("test",r,t),e}();ge.prototype.preventDefault=function(){this.Eb=!1},d(_e,ge);var cc=oc({2:"touch",3:"pen",4:"mouse"});_e.prototype.preventDefault=function(){_e.lb.preventDefault.call(this);var e=this.a;if(e.preventDefault)e.preventDefault();else if(e.returnValue=!1,sc)try{(e.ctrlKey||112<=e.keyCode&&123>=e.keyCode)&&(e.keyCode=-1)}catch(e){}},_e.prototype.f=function(){return this.a};var lc="closure_listenable_"+(1e6*Math.random()|0),hc=0;Ee.prototype.add=function(e,t,n,r,i){var o=e.toString();(e=this.a[o])||(e=this.a[o]=[],this.b++);var a=Te(e,t,r,i);return-1<a?(t=e[a],n||(t.Ha=!1)):(t=new be(t,this.src,o,!!r,i),t.Ha=n,e.push(t)),t};var fc="closure_lm_"+(1e6*Math.random()|0),pc={},dc=0,yc="__closure_events_fn_"+(1e9*Math.random()>>>0);d(Me,fe),Me.prototype[lc]=!0,Me.prototype.addEventListener=function(e,t,n,r){Se(this,e,t,n,r)},Me.prototype.removeEventListener=function(e,t,n,r){Ne(this,e,t,n,r)},Me.prototype.dispatchEvent=function(t){var n,r=this.Ta;if(r)for(n=[];r;r=r.Ta)n.push(r);r=this.Mb;var i=t.type||t;if(e(t))t=new ge(t,r);else if(t instanceof ge)t.target=t.target||r;else{var o=t;t=new ge(i,r),B(t,o)}if(o=!0,n)for(var a=n.length-1;0<=a;a--){var s=t.b=n[a];o=Be(s,i,!0,t)&&o}if(s=t.b=r,o=Be(s,i,!0,t)&&o,o=Be(s,i,!1,t)&&o,n)for(a=0;a<n.length;a++)s=t.b=n[a],o=Be(s,i,!1,t)&&o;return o},Me.prototype.ua=function(){if(Me.lb.ua.call(this),this.u){var e,t=this.u,n=0;for(e in t.a){for(var r=t.a[e],i=0;i<r.length;i++)++n,we(r[i]);delete t.a[e],t.b--}}this.Ta=null},hu=ze.prototype,hu.S=function(){Ge(this);for(var e=[],t=0;t<this.a.length;t++)e.push(this.b[this.a[t]]);return e},hu.U=function(){return Ge(this),this.a.concat()},hu.clear=function(){this.b={},this.c=this.a.length=0},hu.get=function(e,t){return Qe(this.b,e)?this.b[e]:t},hu.set=function(e,t){Qe(this.b,e)||(this.c++,this.a.push(e)),this.b[e]=t},hu.forEach=function(e,t){for(var n=this.U(),r=0;r<n.length;r++){var i=n[r],o=this.get(i);e.call(t,o,i,this)}};var vc=/^(?:([^:\/?#.]+):)?(?:\/\/(?:([^\/?#]*)@)?([^\/#?]*?)(?::([0-9]+))?(?=[\/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/;Xe.prototype.toString=function(){var e=[],t=this.c;t&&e.push(ot(t,mc,!0),":");var n=this.b;return(n||"file"==t)&&(e.push("//"),(t=this.l)&&e.push(ot(t,mc,!0),"@"),e.push(encodeURIComponent(String(n)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(n=this.j)&&e.push(":",String(n))),(n=this.g)&&(this.b&&"/"!=n.charAt(0)&&e.push("/"),e.push(ot
1(n,"/"==n.charAt(0)?_c:gc,!0))),(n=this.a.toString())&&e.push("?",n),(n=this.h)&&e.push("#",ot(n,wc)),e.join("")};var mc=/[#\/\?@]/g,gc=/[#\?:]/g,_c=/[#\?]/g,bc=/[#\?@]/g,wc=/#/g;hu=st.prototype,hu.add=function(e,t){ut(this),this.c=null,e=pt(this,e);var n=this.a.get(e);return n||this.a.set(e,n=[]),n.push(t),this.b+=1,this},hu.clear=function(){this.a=this.c=null,this.b=0},hu.forEach=function(e,t){ut(this),this.a.forEach(function(n,r){wu(n,function(n){e.call(t,n,r,this)},this)},this)},hu.U=function(){ut(this);for(var e=this.a.S(),t=this.a.U(),n=[],r=0;r<t.length;r++)for(var i=e[r],o=0;o<i.length;o++)n.push(t[r]);return n},hu.S=function(t){ut(this);var n=[];if(e(t))ht(this,t)&&(n=P(n,this.a.get(pt(this,t))));else{t=this.a.S();for(var r=0;r<t.length;r++)n=P(n,t[r])}return n},hu.set=function(e,t){return ut(this),this.c=null,e=pt(this,e),ht(this,e)&&(this.b-=this.a.get(e).length),this.a.set(e,[t]),this.b+=1,this},hu.get=function(e,t){return e=e?this.S(e):[],0<e.length?String(e[0]):t},hu.toString=function(){if(this.c)return this.c;if(!this.a)return"";for(var e=[],t=this.a.U(),n=0;n<t.length;n++){var r=t[n],i=encodeURIComponent(String(r));r=this.S(r);for(var o=0;o<r.length;o++){var a=i;""!==r[o]&&(a+="="+encodeURIComponent(String(r[o]))),e.push(a)}}return this.c=e.join("&")};var Ec=!Qu||9<=Number(nc);yt.prototype.la=!0,yt.prototype.ja=function(){return this.a},yt.prototype.toString=function(){return"Const{"+this.a+"}"};var Cc={};mt(""),gt.prototype.la=!0,gt.prototype.ja=function(){return this.a},gt.prototype.toString=function(){return"TrustedResourceUrl{"+this.a+"}"};var Tc=/%{(\w+)}/g,Sc=/^(?:https:)?\/\/[0-9a-z.:[\]-]+\/|^\/[^\/\\]|^about:blank#/i,Ic={};Et.prototype.la=!0,Et.prototype.ja=function(){return this.a},Et.prototype.toString=function(){return"SafeUrl{"+this.a+"}"};var kc=/^(?:(?:https?|mailto|ftp):|[^:\/?#]*(?:[\/?#]|$))/i,Oc={};St("about:blank"),It.prototype.la=!0,It.prototype.ja=function(){return this.a},It.prototype.toString=function(){return"SafeHtml{"+this.a+"}"};var Nc={};Ot("<!DOCTYPE html>"),Ot(""),Ot("<br>");var Pc={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",nonce:"nonce",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"},Rc={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\u000b"},Ac=/\uffff/.test("\uffff")?/[\\"\x00-\x1f\x7f-\uffff]/g:/[\\"\x00-\x1f\x7f-\xff]/g,xc=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,Dc="Firefox",Lc="Chrome",Uc={Qc:"FirebaseCore-web",Sc:"FirebaseUI-web"};vn.prototype.get=function(){var e=du.navigator;return(e&&"boolean"===typeof e.onLine&&(sn()||"chrome-extension:"===un()||"undefined"!==typeof e.connection)?e.onLine:1)?this.b?this.c:this.a:Math.min(5e3,this.a)};var Mc,Fc={};try{var jc={};Object.defineProperty(jc,"abcd",{configurable:!0,enumerable:!0,value:1}),Object.defineProperty(jc,"abcd",{configurable:!0,enumerable:!0,value:2}),Mc=2==jc.abcd}catch(e){Mc=!1}var Bc="EMAIL_SIGNIN",Wc="email",Vc="newEmail",Hc="requestType",qc="email",Kc="fromEmail",zc="data",Gc="operation";d(On,Error),On.prototype.C=function(){return{code:this.code,message:this.message}},On.prototype.toJSON=function(){return this.C()};var Qc="auth/",Yc={"argument-error":"","app-not-authorized":"This app, identified by the domain where it's hosted, is not authorized to use Firebase Authentication with the provided API key. Review your key configuration in the Google API console.","app-not-installed":"The requested mobile application corresponding to the identifier (Android package name or iOS bundle ID) provided is not installed on this device.","captcha-check-failed":"The reCAPTCHA response token provided is either invalid, expired, already used or the domain associated with it does not match the list of whitelisted domains.","code-expired":"The SMS code has expired. Please re-send the verification code to try again.","cordova-not-ready":"Cordova framework is not ready.","cors-unsupported":"This browser is not supported.","credential-already-in-use":"This credential is already associated with a different user account.","custom-token-mismatch":"The custom token corresponds to a different audience.","requires-recent-login":"This operation is sensitive and requires recent authentication. Log in again before retrying this request.","dynamic-link-not-activated":"Please activate Dynamic Links in the Firebase Console and agree to the terms and conditions.","email-already-in-use":"The email address is already in use by another account.","expired-action-code":"The action code has expired. ","cancelled-popup-request":"This operation has been cancelled due to another conflicting popup being opened.","internal-error":"An internal error has occurred.","invali
1d-app-credential":"The phone verification request contains an invalid application verifier. The reCAPTCHA token response is either invalid or expired.","invalid-app-id":"The mobile app identifier is not registed for the current project.","invalid-user-token":"This user's credential isn't valid for this project. This can happen if the user's token has been tampered with, or if the user isn't for the project associated with this API key.","invalid-auth-event":"An internal error has occurred.","invalid-verification-code":"The SMS verification code used to create the phone auth credential is invalid. Please resend the verification code sms and be sure use the verification code provided by the user.","invalid-continue-uri":"The continue URL provided in the request is invalid.","invalid-cordova-configuration":"The following Cordova plugins must be installed to enable OAuth sign-in: cordova-plugin-buildinfo, cordova-universal-links-plugin, cordova-plugin-browsertab, cordova-plugin-inappbrowser and cordova-plugin-customurlscheme.","invalid-custom-token":"The custom token format is incorrect. Please check the documentation.","invalid-email":"The email address is badly formatted.","invalid-api-key":"Your API key is invalid, please check you have copied it correctly.","invalid-cert-hash":"The SHA-1 certificate hash provided is invalid.","invalid-credential":"The supplied auth credential is malformed or has expired.","invalid-persistence-type":"The specified persistence type is invalid. It can only be local, session or none.","invali
1d-message-payload":"The email template corresponding to this action contains invalid characters in its message. Please fix by going to the Auth email templates section in the Firebase Console.","invalid-oauth-provider":"EmailAuthProvider is not supported for this operation. This operation only supports OAuth providers.","invalid-oauth-client-id":"The OAuth client ID provided is either invalid or does not match the specified API key.","unauthorized-domain":"This domain is not authorized for OAuth operations for your Firebase project. Edit the list of authorized domains from the Firebase console.","invalid-action-code":"The action code is invalid. This can happen if the code is malformed, expired, or has already been used.","wrong-password":"The password is invalid or the user does not have a password.","invalid-phone-number":"The format of the phone number provided is incorrect. Please enter the phone number in a format that can be parsed into E.164 format. E.164 phone numbers are written in the format [+][country code][subscriber number including area code].","invalid-recipient-email":"The email corresponding to this action failed to send as the provided recipient email address is invalid.","invalid-sender":"The email template corresponding to this action contains an invalid sender email or name. Please fix by going to the Auth email templates section in the Firebase Console.","invalid-verification-id":"The verification ID used to create the phone auth credential is invalid.","missing-android-pkg-name":"An Android Package Name must be provided if the Android App is required to be installed.","auth-domain-config-required":"Be sure to include authDomain when calling firebase.initializeApp(), by following the instructions in the Firebase console.","missing-app-credential":"The phone verification request is missing an application verifier assertion. A reCAPTCHA response token needs to be provided.","missing-verification-code":"The phone auth credential was created with an empty SMS verification code.","missing-continue-uri":"A continue URL must be provided in the request.","missing-iframe-start":"An internal error has occurred.","missing-ios-bundle-id":"An iOS Bundle ID must be provided if an App Store ID is provided.","missing-phone-number":"To send verification codes, provide a phone number for the recipient.","missing-verification-id":"The phone auth credential was created with an empty verification ID.","app-deleted":"This instance of FirebaseApp has been deleted.","account-exists-with-different-credential":"An account already exists with the same email address but different sign-in credentials. Sign in using a provider associated with this email address.","network-request-failed":"A network error (such as timeout, interrupted connection or unreachable host) has occurred.","no-auth-event":"An internal error has occurred.","no-such-provider":"User was not linked to an account with the given provider.","operation-not-allowed":"The given sign-in provider is disabled for this Firebase project. Enable it in the Firebase console, under the sign-in method tab of the Auth section.","operation-not-supported-in-this-environment":'This operation is not supported in the environment this application is running on. "location.protocol" must be http, https or chrome-extension and web storage must be enabled.',"popup-blocked":"Unable to establish a connection with the popup. It may have been blocked by the browser.","popup-closed-by-user":"The popup has been closed by the user before finalizing the operation.","provider-already-linked":"User can only be linked to one identity for the given provider.","quota-exceeded":"The project's quota for this operation has been exceeded.","redirect-cancelled-by-user":"The redirect operation has been cancelled by the user before finalizing.","redirect-operation-pending":"A redirect sign-in operation is already pending.",timeout:"The operation has timed out.","user-token-expired":"The user's credential is no longer valid. The user must sign in again.","too-many-requests":"We have blocked all requests from this device due to unusual activity. Try again later.","unauthorized-continue-uri":"The domain of the continue URL is not whitelisted. Please whitelist the domain in the Firebase console.","unsupported-persistence-type":"The current environment does not support the specified persistence type.","user-cancelled":"User did not grant your application the permissions it requested.","user-not-found":"There is no user record corresponding to this identifier. The user may have been deleted.","user-disabled":"The user account has been disabled by an administrator.","user-mismatch":"The supplied credentials do not correspond to the previously signed in user.","user-signed-out":"","weak-password":"The password must be 6 characters long or more.","web-storage-unsupported":"This browser is not supported or 3rd party cookies and data may be disabled."},Xc="android",$c="handleCodeInApp",Jc="iOS",Zc="url",el="installApp",tl="minimumVersion",nl="packageName",rl="bundleId",il=null,ol=null;Un.prototype.f=function(){return this.b};var al="oauth_consumer_key oauth_nonce oauth_signature oauth_signature_method oauth_timestamp oauth_token oauth_version".split(" "),sl=["client_id","response_type","scope","redirect_uri","state"],ul={Rc:{Ma:"locale",Aa:500,za:600,Na:"facebook.com",cb:sl},Tc:{Ma:null,Aa:500,za:620,Na:"github.com",cb:sl},Uc:{Ma:"hl",Aa:515,za:680,Na:"google.com",cb:sl},$c:{Ma:"lang",Aa:485,za:705,Na:"twitter.com",cb:al}},cl="idToken",ll="providerId";d(Vn,Wn),d(Hn,Vn),d(qn,Vn),d(Kn,Vn),d(zn,Vn),Xn.prototype.xa=function(e){return xi(e,$n(this))},Xn.prototype.c=function(e,t){var n=$n(this);return n.idToken=t,Di(e,n)},Xn.prototype.f=function(e,t){return Yn(Li(e,$n(this)),t)},Xn.prototype.C=function(){var e={providerId:this.providerId,sign
1InMethod:this.signInMethod};return this.idToken&&(e.oauthIdToken=this.idToken),this.accessToken&&(e.oauthAccessToken=this.accessToken),this.secret&&(e.oauthTokenSecret=this.secret),e},Jn.prototype.Ca=function(e){return this.tb=j(e),this},d(Zn,Jn),Zn.prototype.ta=function(e){return k(this.a,e)||this.a.push(e),this},Zn.prototype.yb=function(){return R(this.a)},Zn.prototype.credential=function(e,t){if(!e&&!t)throw new On("argument-error","credential failed: must provide the ID token and/or the access token.");return new Xn(this.providerId,{idToken:e||null,accessToken:t||null},this.providerId)},d(er,Zn),wn(er,"PROVIDER_ID","facebook.com"),wn(er,"FACEBOOK_SIGN_IN_METHOD","facebook.com"),d(nr,Zn),wn(nr,"PROVIDER_ID","github.com"),wn(nr,"GITHUB_SIGN_IN_METHOD","github.com"),d(ir,Zn),wn(ir,"PROVIDER_ID","google.com"),wn(ir,"GOOGLE_SIGN_IN_METHOD","google.com"),d(ar,Jn),wn(ar,"PROVIDER_ID","twitter.com"),wn(ar,"TWITTER_SIGN_IN_METHOD","twitter.com"),ur.prototype.xa=function(e){return this.signInMethod==cr.EMAIL_LINK_SIGN_IN_METHOD?Mi(e,ql,{email:this.a,oobCode:this.b}):Mi(e,sh,{email:this.a,password:this.b})},ur.prototype.c=function(e,t){return this.signInMethod==cr.EMAIL_LINK_SIGN_IN_METHOD?Mi(e,Kl,{idToken:t,email:this.a,oobCode:this.b}):Mi(e,th,{idToken:t,email:this.a,password:this.b})},ur.prototype.f=function(e,t){return Yn(this.xa(e),t)},ur.prototype.C=function(){return{email:this.a,password:this.b,signInMethod:this.signInMethod}},En(cr,{PROVIDER_ID:"password"}),En(cr,{EMAIL_LINK_SIGN_IN_METHOD:"emailLink"}),En(cr,{EMAIL_PASSWORD_SIGN_IN_METHOD:"password"}),fr.prototype.xa=function(e){return e.Sa(pr(this))},fr.prototype.c=function(e,t){var n=pr(this);return n.idToken=t,Mi(e,ch,n)},fr.prototype.f=function(e,t){var n=pr(this);return n.operation="REAUTH",e=Mi(e,lh,n),Yn(e,t)},fr.prototype.C=function(){var e={providerId:"phone"};return this.a.Ra&&(e.verificationId=this.a.Ra),this.a.Qa&&(e.verificationCode=this.a.Qa),this.a.Ea&&(e.temporaryProof=this.a.Ea),this.a.Z&&(e.phoneNumber=this.a.Z),e},dr.prototype.Sa=function(t,n){var r=this.a.b;return Y(n.verify()).then(function(i){if(!e(i))throw new On("argument-error","An implementation of firebase.auth.ApplicationVerifier.prototype.verify() must return a firebase.Promise that resolves with a string.");switch(n.type){case"recaptcha":return Ni(r,{phoneNumber:t,recaptchaToken:i}).then(function(e){return"function"===typeof n.reset&&n.reset(),e},function(e){throw"function"===typeof n.reset&&n.reset(),e});default:throw new On("argument-error",'Only firebase.auth.ApplicationVerifiers with type="recaptcha" are currently supported.')}})},En(dr,{PROVIDER_ID:"phone"}),En(dr,{PHONE_SIGN_IN_METHOD:"phone"}),gr.prototype.C=function(){return{type:this.b,eventId:this.c,urlResponse:this.f,sessionId:this.g,error:this.a&&this.a.C()}};var hl=null;br.prototype.subscribe=function(e){var t=this;this.a.push(e),this.b||(this.b=function(e){for(var n=0;n<t.a.length;n++)t.a[n](e)},"function"===typeof(e=rn("universalLinks.subscribe",du))&&e(null,this.b))},br.prototype.unsubscribe=function(e){N(this.a,function(t){return t==e})},d(wr,On),d(Er,On),Er.prototype.C=function(){var e={code:this.code,message:this.message};this.email&&(e.email=this.email),this.phoneNumber&&(e.phoneNumber=this.phoneNumber);var t=this.credential&&this.credential.C();return t&&B(e,t),e},Er.prototype.toJSON=function(){return this.C()};var fl=/^[+a-zA-Z0-9_.!#$%&'*\/=?^`{|}~-]+@([a-zA-Z0-9-]+\.)+[a-zA-Z0-9]{2,63}$/;Tr.prototype.c=null;var pl;d(Ir,Tr),Ir.prototype.a=function(){var e=kr(this);return e?new ActiveXObject(e):new XMLHttpRequest},Ir.prototype.b=function(){var e={};return kr(this)&&(e[0]=!0,e[1]=!0),e},pl=new Ir,d(Or,Tr),Or.prototype.a=function(){var e=new XMLHttpRequest;if("withCredentials"in e)return e;if("undefined"!=typeof XDomainRequest)return new Nr;throw Error("Unsupported browser")},Or.prototype.b=function(){return{}},hu=Nr.prototype,hu.open=function(e,t,n){if(null!=n&&!n)throw Error("Only async requests are supported.");this.a.open(e,t)},hu.send=function(e){if(e){if("string"!=typeof e)throw Error("Only string data is supported");this.a.send(e)}else this.a.send()},hu.abort=function(){this.a.abort()},hu.setRequestHeader=function(){},hu.getResponseHeader=function(e){return"content-type"==e.toLowerCase()?this.a.contentType:""},hu.bc=function(){this.status=200,this.responseText=this.a.responseText,Pr(this,4)},hu.zb=function(){this.status=500,this.responseText="",Pr(this,4)},hu.fc=function(){this.zb()},hu.cc=function(){this.status=200,Pr(this,1)},hu.getAllResponseHeaders=function(){return"content-type: "+this.a.contentType},Rr.prototype.a=null;var dl=0;Rr.prototype.reset=function(e,t,n,r,i){"number"==typeof i||dl++,r||mu(),delete this.a},xr.prototype.toString=function(){return this.name};var yl=new xr("SEVERE",1e3),vl=new xr("WARNING",900),ml=new xr("CONFIG",700),gl=new xr("FINE",500);Ar.prototype.log=function(e,t,n){if(e.value>=Dr(this).value)for(u(t)&&(t=t()),e=new Rr(e,String(t),this.f),n&&(e.a=n),n=this;n;)n=n.a};var _l={},bl=null;d(Mr,Tr),Mr.prototype.a=function(){return new Fr(this.f)},Mr.prototype.b=function(e){return function(){return e}}({}),d(Fr,Me);var wl=0;hu=Fr.prototype,hu.open=function(e,t){if(this.readyState!=wl)throw this.abort(),Error("Error reopening a connection");this.h=e,this.c=t,this.readyState=1,jr(this)},hu.send=function(e){if(1!=this.readyState)throw this.abort(),Error("need to call open() first. ");this.a=!0;var t={headers:this.g,method:this.h,credentials:void 0,cache:void 0};
1e&&(t.body=e),this.j.fetch(new Request(this.c,t)).then(this.ec.bind(this),this.Ab.bind(this))},hu.abort=function(){this.responseText="",this.g=new Headers,this.status=0,1<=this.readyState&&this.a&&4!=this.readyState&&(this.readyState=4,this.a=!1,jr(this)),this.readyState=wl},hu.ec=function(e){this.a&&(this.b||(this.b=e.headers,this.readyState=2,jr(this)),this.a&&(this.readyState=3,jr(this),this.a&&e.text().then(this.dc.bind(this,e),this.Ab.bind(this))))},hu.dc=function(e,t){this.a&&(this.status=e.status,this.statusText=e.statusText,this.responseText=t,this.readyState=4,jr(this))},hu.Ab=function(e){var t=this.f;t&&t.log(vl,"Failed to fetch url "+this.c,e instanceof Error?e:Error(e)),this.a&&(this.readyState=4,jr(this))},hu.setRequestHeader=function(e,t){this.g.append(e,t)},hu.getResponseHeader=function(e){return this.b?this.b.get(e.toLowerCase())||"":((e=this.f)&&e.log(vl,"Attempting to get response header but no headers have been received for url: "+this.c,void 0),"")},hu.getAllResponseHeaders=function(){if(!this.b){var e=this.f;return e&&e.log(vl,"Attempting to get all response headers but no headers have been received for url: "+this.c,void 0),""}e=[];for(var t=this.b.entries(),n=t.next();!n.done;)n=n.value,e.push(n[0]+": "+n[1]),n=t.next();return e.join("\r\n")},d(Br,Me);var El="";Br.prototype.b=Lr("goog.net.XhrIo");var Cl=/^https?$/i,Tl=["POST","PUT"];hu=Br.prototype,hu.Fa=function(){"undefined"!=typeof pu&&this.a&&(this.h="Timed out after "+this.g+"ms, aborting",Ur(this.b,Jr(this,this.h)),this.dispatchEvent("timeout"),this.abort(8))},hu.abort=function(){this.a&&this.c&&(Ur(this.b,Jr(this,"Aborting")),this.c=!1,this.f=!0,this.a.abort(),this.f=!1,this.dispatchEvent("complete"),this.dispatchEvent("abort"),Gr(this))},hu.ua=function(){this.a&&(this.c&&(this.c=!1,this.f=!0,this.a.abort(),this.f=!1),Gr(this,!0)),Br.lb.ua.call(this)},hu.Db=function(){this.pa||(this.I||this.j||this.f?zr(this):this.tc())},hu.tc=function(){zr(this)},hu.getResponse=function(){try{if(!this.a)return null;if("response"in this.a)return this.a.response;switch(this.o){case El:case"text":return this.a.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in this.a)return this.a.mozResponseArrayBuffer}var e=this.b;return e&&e.log(yl,"Response type "+this.o+" is not supported on this browser",void 0),null}catch(e){return Ur(this.b,"Can not get response: "+e.message),null}},Zr.prototype.cancel=function(e){if(this.a)this.c instanceof Zr&&this.c.cancel();else{if(this.b){var t=this.b;delete this.b,e?t.cancel(e):0>=--t.l&&t.cancel()}this.v?this.v.call(this.s,this):this.u=!0,this.a||(e=new si(this),ti(this),ei(this,!1,e))}},Zr.prototype.o=function(e,t){this.j=!1,ei(this,e,t)},Zr.prototype.D=function(){ti(this),ei(this,!0,null)},Zr.prototype.then=function(e,t,n){var r,i,o=new z(function(e,t){r=e,i=t});return ri(this,r,function(e){e instanceof si?o.cancel():i(e)}),o.then(e,t,n)},y(Zr),d(ai,m),ai.prototype.message="Deferred has already fired",ai.prototype.name="AlreadyCalledError",d(si,m),si.prototype.message="Deferred was canceled",si.prototype.name="CanceledError",ui.prototype.c=function(){throw delete Sl[this.a],this.b};var Sl={},Il=0,kl=1;d(pi,m),d(di,Tr),di.prototype.a=function(){return new this.f},di.prototype.b=function(){return{}};var Ol,Nl="idToken",Pl=new vn(3e4,6e4),Rl={"Content-Type":"application/x-www-form-urlencoded"},Al=new vn(3e4,6e4),xl={"Content-Type":"application/json"};yi.prototype.o=function(e,t,n,r,i,o){if($t()&&("undefined"===typeof du.fetch||"undefined"===typeof du.Headers||"undefined"===typeof du.Request))throw new On("operation-not-supported-in-this-environment","fetch, Headers and Request native APIs or equivalent Polyfills must be available to support HTTP requests from a Worker environment.");var a=new Br(this.c);if(o){a.g=Math.max(0,o);var s=setTimeout(function(){a.dispatchEvent("timeout")},o)}Fe(a,"complete",function(){s&&clearTimeout(s);var e=null;try{e=JSON.parse($r(this))||null}catch(t){e=null}t&&t(e)}),je(a,"ready",function(){s&&clearTimeout(s),pe(this)}),je(a,"timeout",function(){s&&clearTimeout(s),pe(this),t&&t(null)}),Wr(a,e,n,r,i)};var Dl=mt("https://apis.google.com/js/client.js?onload=%{onload}"),Ll="__fcb"+Math.floor(1e6*Math.random()).toString();yi.prototype.u=function(e,t,n,r,i){var o=this;Ol.then(function(){window.gapi.client.setApiKey(o.b);var a=window.gapi.auth.getToken();window.gapi.auth.setToken(null),window.gapi.client.request({path:e,method:n,body:r,headers:i,authType:"none",callback:function(e){window.gapi.auth.setToken(a),t&&t(e)}})}).m(function(e){t&&t({error:{message:e&&e.message||"CORS_UNSUPPORTED"}})})},yi.prototype.jb=function(){return Mi(this,nh,{})},yi.prototype.mb=function(e,t){return Mi(this,eh,{idToken:e,email:t})},yi.prototype.nb=function(e,t){return Mi(this,th,{idToken:e,password:t})};var Ul={displayName:"DISPLAY_NAME",photoUrl:"PHOTO_URL"};hu=yi.prototype,hu.ob=function(e,t){var n={idToken:e},r=[];return M(Ul,function(e,i){var o=t[i];null===o?r.push(e):i in t&&(n[i]=o)}),r.length&&(n.deleteAttribute=r),Mi(this,eh,n)},hu.gb=function(e,t){return e={requestType:"PASSWORD_RESET",email:e},B(e,t),Mi(this,Yl,e)},hu.hb=function(e,t){return e={requestType:"EMAIL_SIGNIN",email:e},B(e,t),Mi(this,Gl,e)},hu.fb=function(e,t){return e={requestType:"VERIFY_EMAIL",idToken:e},B(e,t),Mi(this,Ql,e)},hu.Sa=function(e){return Mi(this,uh,e)},hu.Wa=function(e,t){return Mi(this,Jl,{oobCode:e,newPassword:t})},hu.Ia=function(e){return Mi(this,jl,{oobCode:e})},hu.Ua=function(e){return Mi(this,Fl,{oobCode:e})};var Ml,Fl={endpoint:"setAccountInfo",A:Ui,ba:"email"},jl={endpoint:"resetPassword",A:Ui,J:function(e){var t=e.requestType;if(!t||!e.email&&"EMAIL_SIGNIN"!=t)throw new On("internal-error")}},Bl={endpoint:"signupNewUser",A:function(e){if(Ei(e),!e.password)throw new On("weak-password")},J:ki,R:!0},Wl={endpoint:"createAuthUri"},Vl={endpoint:"deleteAccount",T:["idToken"]},Hl={endpoint:"setAccountInfo",T:["idToken","deleteProvider"],A:function(e){if(!a(e.deleteProvider))throw new On("internal-error")}},ql={endpoint:"emailLinkSignin",T:["email","oobCode"],A:Ei,J:ki,R:!0},Kl={endpoint:"emailLinkSignin",T:["idToken","email","oobCode"],A:Ei,J:ki,R:!0},zl={endpoint:"getAccountInfo"},Gl={endpoint:"getOobConfirmationCode",T:["requestType"],A:function(e){if("EMAIL_SIGNIN"!=e.requestType)throw new On("internal-error");Ei(e)},ba:"email"},Ql={endpoint:"getOobConfirmationCode",T:["idToken","requestType"],A:function(e){if("VERIFY_EMAIL"!=e.requestType)throw new On("internal-error")},ba:"email"},Yl={endpoint:"getOobConfirmationCode",T:["requestType"],A:function(e){if("PASSWORD_RESET"!=e.requestType)throw new On("internal-error");Ei(e)},ba:"email"},Xl={pb:!0,endpoint:"getProjectConfig",Cb:"GET"},$l={pb:!0,endpoint:"getRecaptchaParam",Cb:"GET",J:function(e){if(!e.recaptchaSiteKey)throw new On("internal-error")}},Jl={endpoint:"resetPassword",A:Ui,ba:"email"},Zl={endpoint:"sendVerificationCode",T:["phoneNumber","recaptchaToken"],ba:"sessionInfo"},eh={endpoint:"setAccountInfo",T:["idToken"],A:Ci,R:!0},th={endpoint:"setAccountInfo",T:["idToken"],A:function(e){if(Ci(e),!e.password)throw new On("weak-password")},J:ki,R:!0},nh={endpoint:"signupNewUser",J:ki,R:!0},rh={endpoint:"verifyAssertion",A:Ri,J:Ai,R:!0},ih={endpoint:"verifyAssertion",A:Ri,J:function(e){if(e.errorMessage&&"USER_NOT_FOUND"==e.errorMessage)throw new On("user-not-found");if(e.errorMessage)throw Fi(e.errorMessage);if(!e[Nl])throw new On("internal-error")},R:!0},oh={endpoint:"verifyAssertion",A:function(e){if(Ri(e),!e.idToken)throw new On("internal-error")},J:Ai,R:!0},ah={endpoint:"verifyCustomToken",A:function(e){if(!e.token)throw new On("invalid-custom-token")},J:ki,R:!0},sh={endpoint:"verifyPassword",A:function(e){if(Ei(e),!e.password)throw new On("wrong-password")},J:ki,R:!0},uh={endpoint:"verifyPhoneNumber",A:Oi,J:ki},ch={endpoint:"verifyPhoneNumber",A:function(e){if(!e.idToken)throw new On("internal-error");Oi(e)},J:function(e){if(e.temporaryProof)throw e.code="credential-already-in-use",Cr(e);ki(e)}},lh={Tb:{USER_NOT_FOUND:"user-not-found"},endpoint:"verifyPhoneNumber",A:Oi,J:ki},hh={Wc:{Ya:"https://www.googleapis.com/identitytoolkit/v3/relyingparty/",eb:"https://securetoken.googleapis.com/v1/token",id:"p"},Yc:{Ya:"https://staging-www.sandbox.googleapis.com/identitytoolkit/v3/relyingparty/",eb:"https://staging-securetoken.sandbox.googleapis.com/v1/token",id:"s"},Zc:{Ya:"https://www-googleapis-test.sandbox.google.com/identitytoolkit/v3/relyingparty/",eb:"https://test-securetoken.sandbox.googleapis.com/v1/token",id:"t"}};Ml=Bi("__EID__")?"__EID__":void 0;var fh=mt("https://apis.google.com/js/api.js?onload=%{onload}"),ph=new vn(3e4,6e4),dh=new vn(5e3,15e3),yh=null;zi.prototype.toString=function(){return this.f?et(this.a,"v",this.f):lt(this.a.a,"v"),this.b?et(this.a,"eid",this.b):lt(this.a.a,"eid"),this.c.length?et(this.a,"fw",this.c.join(",")):lt(this.a.a,"fw"),this.a.toString()},Gi.prototype.toString=function(){var e=rt(this.o,"/__/auth/handler");if(et(e,"apiKey",this.u),et(e,"appName",this.c),et(e,"authType",this.l),this.a.isOAuthProvider){var t=this.a;try{var n=fu.app(this.c).auth().ca()}catch(e){n=null}t.Xa=n,et(e,"providerId",this.a.providerId),t=this.a,n=hn(t.tb);for(var r in n)n[r]=n[r].toString();r=t.Ac,n=j(n);for(var i=0;i<r.length;i++){var o=r[i];o in n&&delete n[o]}t.Za&&t.Xa&&!n[t.Za]&&(n[t.Za]=t.Xa),F(n)||et(e,"customParameters",ln(n))}if("function"===typeof this.a.yb&&(t=this.a.yb(),t.length&&et(e,"scopes",t.join(","))),this.j?et(e,"redirectUrl",this.j):lt(e.a,"redirectUrl"),this.g?et(e,"eventId",this.g):lt(e.a,"eventId"),this.h?et(e,"v",this.h):lt(e.a,"v"),this.b)for(var a in this.b)this.b.hasOwnProperty(a)&&!tt(e,a)&&et(e,a,this.b[a]);return this.f?et(e,"eid",this.f):lt(e.a,"eid"),a=Qi(this.c),a.length&&et(e,"fw",a.join(",")),e.toString()},hu=Yi.prototype,hu.Da=function(e,t,n){var r=new On("popup-closed-by-user"),i=new On("web-storage-unsupported"),o=this,a=!1;return this.ea().then(function(){to(o).then(function(n){n||(e&&qt(e),t(i),a=!0)})}).m(function(){}).then(function(){if(!a)return zt(e)}).then(function(){if(!a)return Ve(n).then(function(){t(r)})})},hu.Gb=function(){var e=nn();return!cn(e)&&!dn(e)},hu.Bb=function(){return!1},hu.xb=function(e,t,n,r,i,o,a){if(!e)return X(new On("popup-blocked"));if(a&&!cn())return this.ea().m(function(t){qt(e),i(t)}),r(),Y();this.a||(this.a=Xi(Ji(this)));var s=this;return this.a.then(function(){var t=s.ea().m(function(t){throw qt(e),i(t),t});return r(),t}).then(function(){if(mr(n),!a){Bt(Zi(s.u,s.f,s.b,t,n,null,o,s.c,void 0,s.h),e)}}).m(function(e){throw"auth/network-request-failed"==e.code&&(s.a=null),e})},hu.Ba=function(e,t,n){this.a||(this.a=Xi(Ji(this)));var r=this;return this.a.then(function(){mr(t),Bt(Zi(r.u,r.f,r.b,e,t,jt(),n,r.c,void 0,r.h))}).m(function(e){throw"auth/network-request-failed"==e.code&&(r.a=null),e})},hu.ea=function(){var e=this;return $i(this).then(function(){return e.j.ab}).m(function(){throw e.a=null,new On("network-request-failed")})},hu.Lb=function(){return!0},hu.va=function(e){this.g.push(e)},hu.Ja=function(e){N(this.g,function(t){return t==e})},hu=no.prototype,hu.get=function(e){return Y(this.a.getItem(e)).then(function(e){return e&&fn(e)})},hu.set=function(e,t){return Y(this.a.setItem(e,ln(t)))},hu.P=function(e){return Y(this.a.removeItem(e))},hu.Y=function(){},hu.aa=function(){};var vh;hu=ro.prototype,hu.set=function(e,t){var n,r=!1,i=this;return ao(this).then(function(t){return n=t,t=uo(co(n,!0)),lo(t.get(e))}).then(function(o){var a=uo(co(n,!0));return o?(o.value=t,lo(a.put(o))):(i.b++,r=!0,o={},o.fbase_key=e,o.value=t,lo(a.add(o)))}).then(function(){i.f[e]=t}).ha(function(){r&&i.b--})},hu.get=function(e){return ao(this).then(function(t){return lo(uo(co(t,!1)).get(e))}).then(function(e){return e&&e.value})},hu.P=function(e){var t=!1,n=this;return ao(this).then(function(r){return t=!0,n.b++,lo(uo(co(r,!0)).delete(e))}).then(function(){delete n.f[e]}).ha(function(){t&&n.b--})},hu.Jc=function(){var e=this;return ao(this).then(function(e){var t=uo(co(e,!1));return t.getAll?lo(t.getAll()):new z(function(e,n){var r=[],i=t.openCursor();i.onsuccess=function(t){(t=t.target.result)?(r.push(t.value),t.continue()):e(r)},i.onerror=function(e){n(Error(e.target.errorCode))}})}).then(function(t){var n={},r=[];if(0==e.b){for(r=0;r<t.length;r++)n[t[r].fbase_key]=t[r].value;r=Wt(e.f,n),e.f=n}return r})},hu.Y=function(e){0==this.a.length&&ho(this),this.a.push(e)},hu.aa=function(e){N(this.a,function(t){return t==e}),0==this.a.length&&this.c&&this.c.cancel("STOP_EVENT")},hu=fo.prototype,hu.get=function(e){return this.b.then(function(t){return t.get(e)})},hu.set=function(e,t){return this.b.then(function(n){return n.set(e,t)})},hu.P=function(e){return this.b.then(function(t){return t.P(e)})},hu.Y=function(e){this.a.push(e)},hu.aa=function(e){N(this.a,function(t){return t==e})},hu=po.prototype,hu.get=function(e){return Y(this.a[e])},hu.set=function(e,t){return this.a[e]=t,Y()},hu.P=function(e){return delete this.a[e],Y()},hu.Y=function(){},hu.aa=function(){},hu=yo.prototype,hu.get=function(e){var t=this;return Y().then(function(){return fn(t.a.getItem(e))})},hu.set=function(e,t){var n=this;return Y().then(function(){var r=ln(t);null===r?n.P(e):n.a.setItem(e,r)})},hu.P=function(e){var t=this;return Y().then(function(){t.a.removeItem(e)})},hu.Y=function(e){du.window&&Se(du.window,"storage",e)},hu.aa=function(e){du.window&&Ne(du.window,"storage",e)},hu=go.prototype,hu.get=function(){return Y(null)},hu.set=function(){return Y()},hu.P=function(){return Y()},hu.Y=function(){},hu.aa=function(){},hu=_o.prototype,hu.get=function(e){var t=this;return Y().then(function(){return fn(t.a.getItem(e))})},hu.set=function(e,t){var n=this;return Y().then(function(){var r=ln(t);null===r?n.P(e):n.a.setItem(e,r)})},hu.P=function(e){var t=this;return Y().then(function(){t.a.removeItem(e)})},hu.Y=function(){},hu.aa=function(){};var mh,gh,_h={w:yo,Pa:_o},bh={w:yo,Pa:_o},wh={w:no,Pa:go},Eh={w:yo,Pa:go},Ch={Vc:"local",NONE:"none",Xc:"session"};hu=To.prototype,hu.get=function(e,t){return Io(this,e.w).get(ko(e,t))},hu.set=function(e,t,n){var r=ko(e,n),i=this,o=Io(this,e.w);return o.set(r,t).then(function(){return o.get(r)}).then(function(t){"local"==e.w&&(i.b[r]=t)})},hu.addListener=function(e,t,n){e=ko(e,t),this.l&&(this.b[e]=du.localStorage.getItem(e)),F(this.a)&&(Io(this,"local").Y(this.f),this.h||(Ft
1()||!bn())&&du.indexedDB||!this.l||Po(this)),this.a[e]||(this.a[e]=[]),this.a[e].push(n)},hu.removeListener=function(e,t,n){e=ko(e,t),this.a[e]&&(N(this.a[e],function(e){return e==n}),0==this.a[e].length&&delete this.a[e]),F(this.a)&&(Io(this,"local").aa(this.f),Ro(this))},hu.Kb=function(e){if(e&&e.f){var t=e.a.key;if(null==t)for(var n in this.a){var r=this.b[n];"undefined"===typeof r&&(r=null);var i=du.localStorage.getItem(n);i!==r&&(this.b[n]=i,this.Va(n))}else if(0==t.indexOf("firebase:")&&this.a[t]){if("undefined"!==typeof e.a.a?Io(this,"local").aa(this.f):Ro(this),this.o)if(n=du.localStorage.getItem(t),(r=e.a.newValue)!==n)null!==r?du.localStorage.setItem(t,r):du.localStorage.removeItem(t);else if(this.b[t]===r&&"undefined"===typeof e.a.a)return;var o=this;n=function(){"undefined"===typeof e.a.a&&o.b[t]===du.localStorage.getItem(t)||(o.b[t]=du.localStorage.getItem(t),o.Va(t))},Qu&&nc&&10==nc&&du.localStorage.getItem(t)!==e.a.newValue&&e.a.newValue!==e.a.oldValue?setTimeout(n,10):n()}}else wu(e,f(this.Va,this))},hu.Va=function(e){this.a[e]&&wu(this.a[e],function(e){e()})};var Th,Sh={name:"authEvent",w:"local"};d(Uo,Lo);for(var Ih=64,kh=Ih-1,Oh=[],Nh=0;Nh<kh;Nh++)Oh[Nh]=0;var Ph=P(128,Oh);Uo.prototype.reset=function(){this.g=this.c=0,this.a=du.Int32Array?new Int32Array(this.h):R(this.h)};var Rh=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];d(jo,Uo);var Ah=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225];hu=Bo.prototype,hu.ea=function(){return this.ya?this.ya:this.ya=Qt().then(function(){if("function"!==typeof rn("universalLinks.subscribe",du))throw Wo("cordova-universal-links-plugin is not installed");if("undefined"===typeof rn("BuildInfo.packageName",du))throw Wo("cordova-plugin-buildinfo is not installed");if("function"!==typeof rn("cordova.plugins.browsertab.openUrl",du))throw Wo("cordova-plugin-browsertab is not installed");if("function"!==typeof rn("cordova.InAppBrowser.open",du))throw Wo("cordova-plugin-inappbrowser is not installed")},function(){throw new On("cordova-not-ready")})},hu.Da=function(e,t){return t(new On("operation-not-supported-in-this-environment")),Y()},hu.xb=function(){return X(new On("operation-not-supported-in-this-environment"))},hu.Lb=function(){return!1},hu.Gb=function(){return!0},hu.Bb=function(){return!0},hu.Ba=function(e,t,n){if(this.c)return X(new On("redirect-operation-pending"));var r=this,i=du.document,o=null,a=null,s=null,u=null;return this.c=Y().then(function(){return mr(t),zo(r)}).then(function(){return qo(r,e,t,n)}).then(function(){return new z(function(e,t){a=function(){var t=rn("cordova.plugins.browsertab.close",du);return e(),"function"===typeof t&&t(),r.a&&"function"===typeof r.a.close&&(r.a.close(),r.a=null),!1},r.va(a),s=function(){o||(o=Ve(2e3).then(function(){t(new On("redirect-cancelled-by-user"))}))},u=function(){mn()&&s()},i.addEventListener("resume",s,!1),nn().toLowerCase().match(/android/)||i.addEventListener("visibilitychange",u,!1)}).m(function(e){return Go(r).then(function(){throw e})})}).ha(function(){s&&i.removeEventListener("resume",s,!1),u&&i.removeEventListener("visibilitychange",u,!1),o&&o.cancel(),a&&r.Ja(a),r.c=null})},hu.va=function(e){this.b.push(e),zo(this).m(function(t){"auth/invalid-cordova-configuration"===t.code&&(t=new gr("unknown",null,null,null,new On("no-auth-event")),e(t))})},hu.Ja=function(e){N(this.b,function(t){return t==e})};var xh={name:"pendingRedirect",w:"session"};Zo.prototype.reset=function(){this.f=!1,this.a.Ja(this.j),this.a=ea(this.v,this.l,this.u)},Zo.prototype.subscribe=function(e){if(k(this.h,e)||this.h.push(e),!this.f){var t=this;Jo(this.g).then(function(e){e?$o(t.g).then(function(){ta(t).m(function(e){var n=new gr("unknown",null,null,null,new On("operation-not-supported-in-this-environment"));ia(e)&&t.o(n)})}):na(t)}).m(function(){na(t)})}},Zo.prototype.unsubscribe=function(e){N(this.h,function(t){return t==e})},Zo.prototype.o=function(e){if(!e)throw new On("invalid-auth-event");for(var t=!1,n=0;n<this.h.length;n++){var r=this.h[n];if(r.qb(e.b,e.c)){(t=this.b[e.b])&&t.h(e,r),t=!0;break}}return sa(this.c),t};var Dh=new vn(2e3,1e4),Lh=new vn(3e4,6e4);Zo.prototype.da=function(){return this.c.da()},Zo.prototype.Ba=function(e,t,n){var r,i=this;
1return Xo(this.g).then(function(){return i.a.Ba(e,t,n).m(function(e){if(ia(e))throw new On("operation-not-supported-in-this-environment");return r=e,$o(i.g).then(function(){throw r})}).then(function(){return i.a.Lb()?new z(function(){}):$o(i.g).then(function(){return i.da()}).then(function(){}).m(function(){})})})},Zo.prototype.Da=function(e,t,n,r){return this.a.Da(n,function(n){e.ga(t,null,n,r)},Dh.get())};var Uh={};aa.prototype.reset=function(){this.b=null,this.a&&(this.a.cancel(),this.a=null)},aa.prototype.h=function(e,t){if(e){this.reset(),this.g=!0;var n=e.b,r=e.c,i=e.a&&"auth/web-storage-unsupported"==e.a.code,o=e.a&&"auth/operation-not-supported-in-this-environment"==e.a.code;"unknown"!=n||i||o?e.a?(ha(this,!0,null,e.a),Y()):t.wa(n,r)?ua(this,e,t):X(new On("invalid-auth-event")):(ha(this,!1,null,null),Y())}else X(new On("invalid-auth-event"))},aa.prototype.da=function(){var e=this;return new z(function(t,n){e.b?e.b().then(t,n):(e.f.push(t),e.c.push(n),fa(e))})},pa.prototype.h=function(e,t){if(e){var n=e.b,r=e.c;e.a?(t.ga(e.b,null,e.a,e.c),Y()):t.wa(n,r)?da(e,t):X(new On("invalid-auth-event"))}else X(new On("invalid-auth-event"))},ya.prototype.confirm=function(e){return e=yr(this.verificationId,e),this.a(e)},ga.prototype.start=function(){this.a=this.c,ba(this,!0)},ga.prototype.stop=function(){this.b&&(this.b.cancel(),this.b=null)},wa.prototype.C=function(){return{apiKey:this.f.b,refreshToken:this.a,accessToken:this.b,expirationTime:this.c}},wa.prototype.getToken=function(e){return e=!!e,this.b&&!this.a?X(new On("user-token-expired")):e||!this.b||mu()>this.c-3e4?this.a?Ta(this,{grant_type:"refresh_token",refresh_token:this.a}):Y(null):Y({accessToken:this.b,expirationTime:this.c,refreshToken:this.a})},Sa.prototype.C=function(){return{lastLoginAt:this.b,createdAt:this.a}},d(Oa,ge),d(Na,Me),Na.prototype.na=function(e){this.ia=e,vi(this.b,e)},Na.prototype.ca=function(){return this.ia},Na.prototype.Ka=function(){return R(this.O)},Na.prototype.Ga=function(){this.l.b&&(this.l.stop(),this.l.start())},wn(Na.prototype,"providerId","firebase"),hu=Na.prototype,hu.reload=function(){var e=this;return os(this,Ha(this).then(function(){return Ya(e).then(function(){return ja(e)}).then(Va)}))},hu.ac=function(e){return this.F(e).then(function(e){return new ma(e)})},hu.F=function(e){var t=this;return os(this,Ha(this).then(function(){return t.h.getToken(e)}).then(function(e){if(!e)throw new On("internal-error");return e.accessToken!=t.qa&&(Ma(t,e.accessToken),t.dispatchEvent(new Oa("tokenChanged"))),Ga(t,"refreshToken",e.refreshToken),e.accessToken}))},hu.getToken=function(e){return Fc["firebase.User.prototype.getToken is deprecated. Please use firebase.User.prototype.getIdToken instead."]||(Fc["firebase.User.prototype.getToken is deprecated. Please use firebase.User.prototype.getIdToken instead."]=!0,"undefined"!==typeof console&&"function"===typeof console.warn&&console.warn("firebase.User.prototype.getToken is deprecated. Please use firebase.User.prototype.getIdToken instead.")),this.F(e)},hu.uc=function(e){if(!(e=e.users)||!e.length)throw new On("internal-error");e=e[0],Wa(this,{uid:e.localId,displayName:e.displayName,photoURL:e.photoUrl,email:e.email,emailVerified:!!e.emailVerified,phoneNumber:e.phoneNumber,lastLoginAt:e.lastLoginAt,createdAt:e.createdAt});for(var t=Ja(e),n=0;n<t.length;n++)Ka(this,t[n]);Ga(this,"isAnonymous",!(this.email&&e.passwordHash)&&!(this.providerData&&this.providerData.length))},hu.bb=function(e){var t=this,n=null;return os(this,e.f(this.b,this.uid).then(function(e){return Xa(t,e),n=es(t,e,"reauthenticate"),t.j=null,t.reload()}).then(function(){return n}),!0)},hu.vc=function(e){return this.bb(e).then(function(){})},hu.$a=function(e){var t=this,n=null;return os(this,Za(this,e.providerId).then(function(){return t.F()}).then(function(n){return e.c(t.b,n)}).then(function(e){return n=es(t,e,"link"),ts(t,e)}).then(function(){return n}))},hu.mc=function(e){return this.$a(e).then(function(e){return e.user})},hu.nc=function(e,t){var n=this;return os(this,Za(this,"phone").then(function(){return va(xa(n),e,t,f(n.$a,n))}))},hu.wc=function(e,t){var n=this;return os(this,Y().then(function(){return va(xa(n),e,t,f(n.bb,n))}),!0)},hu.mb=function(e){var t=this;return os(this,this.F().then(function(n){return t.b.mb(n,e)}).then(function(e){return Xa(t,e),t.reload()}))},hu.Nc=function(e){var t=this;
1return os(this,this.F().then(function(n){return e.c(t.b,n)}).then(function(e){return Xa(t,e),t.reload()}))},hu.nb=function(e){var t=this;return os(this,this.F().then(function(n){return t.b.nb(n,e)}).then(function(e){return Xa(t,e),t.reload()}))},hu.ob=function(e){if(void 0===e.displayName&&void 0===e.photoURL)return Ha(this);var t=this;return os(this,this.F().then(function(n){return t.b.ob(n,{displayName:e.displayName,photoUrl:e.photoURL})}).then(function(e){return Xa(t,e),Ga(t,"displayName",e.displayName||null),Ga(t,"photoURL",e.photoUrl||null),wu(t.providerData,function(e){"password"===e.providerId&&(wn(e,"displayName",t.displayName),wn(e,"photoURL",t.photoURL))}),ja(t)}).then(Va))},hu.Mc=function(e){var t=this;return os(this,Ya(this).then(function(n){return k(qa(t),e)?Pi(t.b,n,[e]).then(function(e){var n={};return wu(e.providerUserInfo||[],function(e){n[e.providerId]=!0}),wu(qa(t),function(e){n[e]||za(t,e)}),n[dr.PROVIDER_ID]||wn(t,"phoneNumber",null),ja(t)}):ja(t).then(function(){throw new On("no-such-provider")})}))},hu.delete=function(){var e=this;return os(this,this.F().then(function(t){return Mi(e.b,Vl,{idToken:t})}).then(function(){e.dispatchEvent(new Oa("userDeleted"))})).then(function(){for(var t=0;t<e.D.length;t++)e.D[t].cancel("app-deleted");Pa(e,null),Aa(e,null),e.D=[],e.o=!0,Ua(e),wn(e,"refreshToken",null),e.a&&e.a.unsubscribe(e)})},hu.qb=function(e,t){return!!("linkViaPopup"==e&&(this.g||null)==t&&this.f||"reauthViaPopup"==e&&(this.g||null)==t&&this.f||"linkViaRedirect"==e&&(this.$||null)==t||"reauthViaRedirect"==e&&(this.$||null)==t)},hu.ga=function(e,t,n,r){"linkViaPopup"!=e&&"reauthViaPopup"!=e||r!=(this.g||null)||(n&&this.v?this.v(n):t&&!n&&this.f&&this.f(t),this.c&&(this.c.cancel(),this.c=null),delete this.f,delete this.v)},hu.wa=function(e,t){return"linkViaPopup"==e&&t==(this.g||null)?f(this.vb,this):"reauthViaPopup"==e&&t==(this.g||null)?f(this.wb,this):"linkViaRedirect"==e&&(this.$||null)==t?f(this.vb,this):"reauthViaRedirect"==e&&(this.$||null)==t?f(this.wb,this):null},hu.oc=function(e){var t=this;return ns(this,"linkViaPopup",e,function(){return Za(t,e.providerId).then(function(){return ja(t)})},!1)},hu.xc=function(e){return ns(this,"reauthViaPopup",e,function(){return Y()},!0)},hu.pc=function(e){var t=this;return rs(this,"linkViaRedirect",e,function(){return Za(t,e.providerId)},!1)},hu.yc=function(e){return rs(this,"reauthViaRedirect",e,function(){return Y()},!0)},hu.vb=function(e,t){var n=this;this.c&&(this.c.cancel(),this.c=null);var r=null;return os(this,this.F().then(function(r){return Di(n.b,{requestUri:e,sessionId:t,idToken:r})}).then(function(e){return r=es(n,e,"link"),ts(n,e)}).then(function(){return r}))},hu.wb=function(e,t){var n=this;this.c&&(this.c.cancel(),this.c=null);var r=null;return os(this,Y().then(function(){return Yn(Li(n.b,{requestUri:e,sessionId:t}),n.uid)}).then(function(e){return r=es(n,e,"reauthenticate"),Xa(n,e),n.j=null,n.reload()}).then(function(){return r}),!0)},hu.fb=function(e){var t=this,n=null;return os(this,this.F().then(function(t){return n=t,"undefined"===typeof e||F(e)?{}:Rn(new Pn(e))}).then(function(e){return t.b.fb(n,e)}).then(function(e){if(t.email!=e)return t.reload()}).then(function(){}))},hu.toJSON=function(){return this.C()},hu.C=function(){var e={uid:this.uid,displayName:this.displayName,photoURL:this.photoURL,email:this.email,emailVerified:this.emailVerified,phoneNumber:this.phoneNumber,isAnonymous:this.isAnonymous,providerData:[],apiKey:this.G,appName:this.s,authDomain:this.B,stsTokenManager:this.h.C(),redirectEventId:this.$||null};return this.metadata&&B(e,this.metadata.C()),wu(this.providerData,function(t){e.providerData.push(Tn(t))}),e};var Mh={name:"redirectUser",w:"session"};fs.prototype.g=function(){var e=this,t=ys("local");bs(this,function(){return Y().then(function(){return e.c&&"local"!=e.c.w?e.b.get(t,e.a):null}).then(function(n){if(n)return ps(e,"local").then(function(){e.c=t})})})};var Fh={name:"persistence",w:"session"};fs.prototype.ib=function(e){var t=null,n=this;return Co(e),bs(this,function(){return e!=n.c.w?n.b.get(n.c,n.a).then(function(r){return t=r,ps(n,e)}).then(function(){if(n.c=ys(e),t)return n.b.set(n.c,t,n.a)}):Y()})},d(ws,Me),d(Es,ge),d(Cs,ge),hu=ws.prototype,hu.ib=function(e){return e=this.h.ib(e),Fs(this,e)},hu.na=function(e){this.W===e||this.l||(this.W=e,vi(this.b,this.W),this.dispatchEvent(new Es(this.ca())))},hu.ca=function(){return this.W},hu.Oc=function(){var e=du.navigator;this.na(e?e.languages&&e.languages[0]||e.language||e.userLanguage||null:null)}
1,hu.qc=function(e){this.D.push(e),mi(this.b,fu.SDK_VERSION?tn(fu.SDK_VERSION,this.D):null),this.dispatchEvent(new Cs(this.D))},hu.Ka=function(){return R(this.D)},hu.toJSON=function(){return{apiKey:xs(this).options.apiKey,authDomain:xs(this).options.authDomain,appName:xs(this).name,currentUser:Ds(this)&&Ds(this).C()}},hu.qb=function(e,t){switch(e){case"unknown":case"signInViaRedirect":return!0;case"signInViaPopup":return this.g==t&&!!this.f;default:return!1}},hu.ga=function(e,t,n,r){"signInViaPopup"==e&&this.g==r&&(n&&this.v?this.v(n):t&&!n&&this.f&&this.f(t),this.c&&(this.c.cancel(),this.c=null),delete this.f,delete this.v)},hu.wa=function(e,t){return"signInViaRedirect"==e||"signInViaPopup"==e&&this.g==t&&this.f?f(this.Xb,this):null},hu.Xb=function(e,t){var n=this;e={requestUri:e,sessionId:t},this.c&&(this.c.cancel(),this.c=null);var r=null,i=null,o=xi(n.b,e).then(function(e){return r=vr(e),i=Bn(e),e});return e=n.V.then(function(){return o}).then(function(e){return ks(n,e)}).then(function(){return Cn({user:Ds(n),credential:r,additionalUserInfo:i,operationType:"signIn"})}),Fs(this,e)},hu.Gc=function(e){if(!an())return X(new On("operation-not-supported-in-this-environment"));var t=this,n=jn(e.providerId),r=pn(),i=null;(!cn()||Xt())&&xs(this).options.authDomain&&e.isOAuthProvider&&(i=Zi(xs(this).options.authDomain,xs(this).options.apiKey,xs(this).name,"signInViaPopup",e,null,r,fu.SDK_VERSION||null));var o=Kt(i,n&&n.Aa,n&&n.za);return n=Ss(this).then(function(t){return ra(t,o,"signInViaPopup",e,r,!!i)}).then(function(){return new z(function(e,n){t.ga("signInViaPopup",null,new On("cancelled-popup-request"),t.g),t.f=e,t.v=n,t.g=r,t.c=t.a.Da(t,"signInViaPopup",o,r)})}).then(function(e){return o&&qt(o),e?Cn(e):null}).m(function(e){throw o&&qt(o),e}),Fs(this,n)},hu.Hc=function(e){if(!an())return X(new On("operation-not-supported-in-this-environment"));var t=this;return Fs(this,Ss(this).then(function(){return vs(t.h)}).then(function(){return t.a.Ba("signInViaRedirect",e)}))},hu.da=function(){if(!an())return X(new On("operation-not-supported-in-this-environment"));var e=this;return Fs(this,Ss(this).then(function(){return e.a.da()}).then(function(e){return e?Cn(e):null}))},hu.kb=function(){var e=this;return Fs(this,this.j.then(function(){return Ds(e)?(Os(e,null),gs(e.h).then(function(){Us(e)})):Y()}))},hu.Ic=function(){var e=this;return _s(this.h,xs(this).options.authDomain).then(function(t){if(!e.l){var n;if(n=Ds(e)&&t){n=Ds(e).uid;var r=t.uid;n=void 0!==n&&null!==n&&""!==n&&void 0!==r&&null!==r&&""!==r&&n==r}if(n)return Qa(Ds(e),t),Ds(e).F();(Ds(e)||t)&&(Os(e,t),t&&(Ba(t),t.fa=e.G),e.a&&e.a.subscribe(e),Us(e))}})},hu.ka=function(e){return ms(this.h,e)},hu.Yb=function(){Us(this),this.ka(Ds(this))},hu.gc=function(){this.kb()},hu.hc=function(){this.kb()},hu.ic=function(e){var t=this;this.addAuthTokenListener(function(){e.next(Ds(t))})},hu.jc=function(e){var t=this;Ms(this,function(){e.next(Ds(t))})},hu.sc=function(e,t,n){var r=this;return this.X&&fu.Promise.resolve().then(function(){u(e)?e(Ds(r)):u(e.next)&&e.next(Ds(r))}),this.Ob(e,t,n)},hu.rc=function(e,t,n){var r=this;return this.X&&fu.Promise.resolve().then(function(){r.O=r.getUid(),u(e)?e(Ds(r)):u(e.next)&&e.next(Ds(r))}),this.Pb(e,t,n)},hu.$b=function(e){var t=this;return Fs(this,this.j.then(function(){return Ds(t)?Ds(t).F(e).then(function(e){return{accessToken:e}}):null}))},hu.Cc=function(e){return this.Hb(e).then(function(e){return e.user})},hu.Hb=function(e){var t=this;return this.j.then(function(){return As(t,Mi(t.b,ah,{token:e}))}).then(function(e){var n=e.user;return Ga(n,"isAnonymous",!1),t.ka(n),e})},hu.Ib=function(e,t){var n=this;return this.j.then(function(){return As(n,Mi(n.b,sh,{email:e,password:t}))})},hu.Dc=function(e,t){return this.Ib(e,t).then(function(e){return e.user})},hu.Sb=function(e,t){return this.sb(e,t).then(function(e){return e.user})},hu.sb=function(e,t){var n=this;return this.j.then(function(){return As(n,Mi(n.b,Bl,{email:e,password:t}))})},hu.Bc=function(e){return this.Oa(e).then(function(e){return e.user})},hu.Oa=function(e){var t=this;return this.j.then(function(){return As(t,e.xa(t.b))})},hu.jb=function(){return this.Jb().then(function(e){return e.user})},hu.Jb=function(){var e=this;return this.j.then(function(){var t=Ds(e);if(t&&t.isAnonymous){return Cn({user:t,credential:null,additionalUserInfo:Cn({providerId:null,isNewUser:!1}),operationType:"signIn"})}return As(e,e.b.jb()).then(function(t){var n=t.user;return Ga(n,"isAnonymous",!0),e.ka(n),t})})},hu.getUid=function(){return Ds(this)&&Ds(this).uid||null},hu.Qb=function(e){this.addAuthTokenListener(e),0<++this.s&&Ds(this)&&La(Ds(this))},hu.zc=function(e){var t=this;wu(this.o,function(n){n==e&&t.s--}),0>this.s&&(this.s=0),0==this.s&&Ds(this)&&Ua(Ds(this)),this.removeAuthTokenListener(e)},hu.addAuthTokenListener=function(e){var t=this;this.o.push(e),Fs(this,this.j.then(function(){t.l||k(t.o,e)&&e(Ls(t))}))},hu.removeAuthTokenListener=function(e){N(this.o,function(t){return t==e})},hu.delete=function(){this.l=!0;for(var e=0;e<this.N.length;e++)this.N[e].cancel("app-deleted");return this.N=[],this.h&&(e=this.h,e.b.removeListener(ys("local"),e.a,this.ia)),this.a&&this.a.unsubscribe(this),fu.Promise.resolve()},hu.Vb=function(e){return Fs(this,Ti(this.b,e))},hu.Wb=function(e){return Fs(this,Si(this.b,e))},hu.kc=function(e){return!!hr(e)},hu.hb=function(e,t){var n=this;return Fs(this,Y().then(function(){var e=new Pn(t);if(!e.c)throw new On("argument-error",$c+" must be true when sending sign in link to email");return Rn(e)}).then(function(t){return n.b.hb(e,t)}).then(function(){}))},hu.Pc=function(e){return this.Ia(e).then(function(e){return e.data.email})},hu.Wa=function(e,t){return Fs(this,this.b.Wa(e,t).then(function(){}))},hu.Ia=function(e){return Fs(this,this.b.Ia(e).then(function(e){return new kn(e)}))},hu.Ua=function(e){return Fs(this,this.b.Ua(e).then(function(){}))},hu.gb=function(e,t){var n=this;return Fs(this,Y().then(function(){return"undefined"===typeof t||F(t)?{}:Rn(new Pn(t))}).then(function(t){return n.b.gb(e,t)}).then(function(){}))},hu.Fc=function(e,t){return Fs(this,va(this,e,t,f(this.Oa,this)))},hu.Ec=function(e,t){var n=this;return Fs(this,Y().then(function(){var r=lr(e,t||jt());return n.Oa(r)}))};var jh="callback",Bh="expired-callback",Wh="sitekey",Vh="size";hu=js.prototype,hu.ya=function(){var e=this;return this.c?this.c:this.c=Vs(this,Y().then(function(){if(sn()&&!$t())return Gt();throw new On("operation-not-supported-in-this-environment","RecaptchaVerifier is only supported in a browser HTTP/HTTPS environment.")}).then(function(){return Ks(zs(),e.s())}).then(function(){return Mi(e.u,$l,{})}).then(function(t){e.a[Wh]=t.recaptchaSiteKey}).m(function(t){throw e.c=null,t}))},hu.render=function(){Hs(this);var e=this;return Vs(this,this.ya().then(function(){if(null===e.b){var t=e.l;if(!e.h){var n=Nt(t);t=Rt("DIV"),n.appendChild(t)}e.b=grecaptcha.render(t,e.a)}return e.b}))},hu.verify=function(){Hs(this);var e=this;return Vs(this,this.render().then(function(t){return new z(function(n){var r=grecaptcha.getResponse(t);if(r)n(r);else{var i=function(t){t&&(Ws(e,i),n(t))};e.j.push(i),e.h&&grecaptcha.execute(e.b)}})}))},hu.reset=function(){Hs(this),null!==this.b&&grecaptcha.reset(this.b)},hu.clear=function(){Hs(this),this.o=!0,zs().b--;for(var e=0;e<this.g.length;e++)this.g[e].cancel("RecaptchaVerifier instance has been destroyed.");if(!this.h){e=Nt(this.l);for(var t;t=e.firstChild;)e.removeChild(t)}};var Hh=mt("https://www.google.com/recaptcha/api.js?onload=%{onload}&render=explicit&hl=%{hl}"),qh=new vn(3e4,6e4),Kh=null;d(Gs,js);var zh="First Second Third Fourth Fifth Sixth Seventh Eighth Ninth".split(" ");su(ws.prototype,{Ua:{name:"applyActionCode",i:[Ys("code")]},Ia:{name:"checkActionCode",i:[Ys("code")]},Wa:{name:"confirmPasswordReset",i:[Ys("code"),Ys("newPassword")]},Sb:{name:"createUserWithEmailAndPassword",i:[Ys("email"),Ys("password")]},sb:{name:"createUserAndRetrieveDataWithEmailAndPassword",i:[Ys("email"),Ys("password")]}
1,Vb:{name:"fetchProvidersForEmail",i:[Ys("email")]},Wb:{name:"fetchSignInMethodsForEmail",i:[Ys("email")]},da:{name:"getRedirectResult",i:[]},kc:{name:"isSignInWithEmailLink",i:[Ys("emailLink")]},rc:{name:"onAuthStateChanged",i:[au($s(),Js(),"nextOrObserver"),Js("opt_error",!0),Js("opt_completed",!0)]},sc:{name:"onIdTokenChanged",i:[au($s(),Js(),"nextOrObserver"),Js("opt_error",!0),Js("opt_completed",!0)]},gb:{name:"sendPasswordResetEmail",i:[Ys("email"),au($s("opt_actionCodeSettings",!0),Zs(null,!0),"opt_actionCodeSettings",!0)]},hb:{name:"sendSignInLinkToEmail",i:[Ys("email"),$s("actionCodeSettings")]},ib:{name:"setPersistence",i:[Ys("persistence")]},Oa:{name:"signInAndRetrieveDataWithCredential",i:[ru()]},jb:{name:"signInAnonymously",i:[]},Jb:{name:"signInAnonymouslyAndRetrieveData",i:[]},Bc:{name:"signInWithCredential",i:[ru()]},Cc:{name:"signInWithCustomToken",i:[Ys("token")]},Hb:{name:"signInAndRetrieveDataWithCustomToken",i:[Ys("token")]},Dc:{name:"signInWithEmailAndPassword",i:[Ys("email"),Ys("password")]},Ec:{name:"signInWithEmailLink",i:[Ys("email"),Ys("emailLink",!0)]},Ib:{name:"signInAndRetrieveDataWithEmailAndPassword",i:[Ys("email"),Ys("password")]},Fc:{name:"signInWithPhoneNumber",i:[Ys("phoneNumber"),ou()]},Gc:{name:"signInWithPopup",i:[iu()]},Hc:{name:"signInWithRedirect",i:[iu()]},kb:{name:"signOut",i:[]},toJSON:{name:"toJSON",i:[Ys(null,!0)]},Oc:{name:"useDeviceLanguage",i:[]},Pc:{name:"verifyPasswordResetCode",i:[Ys("code")]}}),function(e,t){for(var n in t){var r=t[n].name;if(r!==n){var i=t[n].Rb;Object.defineProperty(e,r,{get:function(){return this[n]},set:function(e){Qs(r,[i],[e],!0),this[n]=e},enumerable:!0})}}}(ws.prototype,{lc:{name:"languageCode",Rb:au(Ys(),Zs(),"languageCode")}}),ws.Persistence=Ch,ws.Persistence.LOCAL="local",ws.Persistence.SESSION="session",ws.Persistence.NONE="none",su(Na.prototype,{delete:{name:"delete",i:[]},ac:{name:"getIdTokenResult",i:[Xs()]},F:{name:"getIdToken",i:[Xs()]},getToken:{name:"getToken",i:[Xs()]},$a:{name:"linkAndRetrieveDataWithCredential",i:[ru()]},mc:{name:"linkWithCredential",i:[ru()]},nc:{name:"linkWithPhoneNumber",i:[Ys("phoneNumber"),ou()]},oc:{name:"linkWithPopup",i:[iu()]},pc:{name:"linkWithRedirect",i:[iu()]},bb:{name:"reauthenticateAndRetrieveDataWithCredential",i:[ru()]},vc:{name:"reauthenticateWithCredential",i:[ru()]},wc:{name:"reauthenticateWithPhoneNumber",i:[Ys("phoneNumber"),ou()]},xc:{name:"reauthenticateWithPopup",i:[iu()]},yc:{name:"reauthenticateWithRedirect",i:[iu()]},reload:{name:"reload",i:[]},fb:{name:"sendEmailVerification",i:[au($s("opt_actionCodeSettings",!0),Zs(null,!0),"opt_actionCodeSettings",!0)]},toJSON:{name:"toJSON",i:[Ys(null,!0)]},Mc:{name:"unlink",i:[Ys("provider")]},mb:{name:"updateEmail",i:[Ys("email")]},nb:{name:"updatePassword",i:[Ys("password")]},Nc:{name:"updatePhoneNumber",i:[ru("phone")]},ob:{name:"updateProfile",i:[$s("profile")]}}),su(z.prototype,{ha:{name:"finally"},m:{name:"catch"},then:{name:"then"}}),su(ya.prototype,{confirm:{name:"confirm",i:[Ys("verificationCode")]}}),uu(cr,"credential",function(e,t){return new ur(e,t)},[Ys("email"),Ys("password")]),su(er.prototype,{ta:{name:"addScope",i:[Ys("scope")]},Ca:{name:"setCustomParameters",i:[$s("customOAuthParameters")]}}),uu(er,"credential",tr,[au(Ys(),$s(),"token")]),uu(cr,"credentialWithLink",lr,[Ys("email"),Ys("emailLink")]),su(nr.prototype,{ta:{name:"addScope",i:[Ys("scope")]},Ca:{name:"setCustomParameters",i:[$s("customOAuthParameters")]}}),uu(nr,"credential",rr,[au(Ys(),$s(),"token")]),su(ir.prototype,{ta:{name:"addScope",i:[Ys("scope")]},Ca:{name:"setCustomParameters",i:[$s("customOAuthParameters")]}}),uu(ir,"credential",or,[au(Ys(),au($s(),Zs()),"idToken"),au(Ys(),Zs(),"accessToken",!0)]),su(ar.prototype,{Ca:{name:"setCustomParameters",i:[$s("customOAuthParameters")]}}),uu(ar,"credential",sr,[au(Ys(),$s(),"token"),Ys("secret",!0)]),su(Zn.prototype,{ta:{name:"addScope",i:[Ys("scope")]},credential:{name:"credential",i:[au(Ys(),Zs(),"idToken",!0),au(Ys(),Zs(),"accessToken",!0)]},Ca:{name:"setCustomParameters",i:[$s("customOAuthParameters")]}}),uu(dr,"credential",yr,[Ys("verificationId"),Ys("verificationCode")]),su(dr.prototype,{Sa:{name:"verifyPhoneNumber",i:[Ys("phoneNumber"),ou()]}}),su(On.prototype,{toJSON:{name:"toJSON",i:[Ys(null,!0)]}}),su(Er.prototype,{toJSON:{name:"toJSON",i:[Ys(null,!0)]}}),su(wr.prototype,{toJSON:{name:"toJSON",i:[Ys(null,!0)]}}),su(Gs.prototype,{clear:{name:"clear",i:[]},render:{name:"render",i:[]},verify:{name:"verify",i:[]}}),function(){if("undefined"===typeof fu||!fu.INTERNAL||!fu.INTERNAL.registerService)throw Error("Cannot find the firebase namespace; be sure to include firebase-app.js before this library.");var e={Auth:ws,Error:On};uu(e,"EmailAuthProvider",cr,[]),uu(e,"FacebookAuthProvider",er,[]),uu(e,"GithubAuthProvider",nr,[]),uu(e,"GoogleAuthProvider",ir,[]),uu(e,"TwitterAuthProvider",ar,[]),uu(e,"OAuthProvider",Zn,[Ys("providerId")]),uu(e,"PhoneAuthProvider",dr,[tu()]),uu(e,"RecaptchaVerifier",Gs,[au(Ys(),eu(),"recaptchaContainer"),$s("recaptchaParameters",!0),nu()]),fu.INTERNAL.registerService("auth",function(e,t){return e=new ws(e),t({INTERNAL:{getUid:f(e.getUid,e),getToken:f(e.$b,e),addAuthTokenListener:f(e.Qb,e),removeAuthTokenListener:f(e.zc,e)}}),e},e,function(e,t){if("create"===e)try{t.auth()}catch(e){}}),fu.INTERNAL.extendNamespace({User:Na})}()}).call("undefined"!==typeof e?e:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})}).call(t,n(5))},function(e,t,n){e.exports=n(93)}
1,function(e,t,n){"use strict";(function(r){function i(e){for(var t="",n=e.split("/"),r=0;r<n.length;r++)if(n[r].length>0){var i=n[r];try{i=decodeURIComponent(i.replace(/\+/g," "))}catch(e){}t+="/"+i}return t}function o(e){var t={};e.startsWith("?")&&(e=e.substring(1));for(var n=0,r=e.split("&");n<r.length;n++){var i=r[n];if(0!==i.length){var o=i.split("=");2===o.length?t[decodeURIComponent(o[0])]=decodeURIComponent(o[1]):M("Invalid query segment '"+i+"' in query '"+e+"'")}}return t}function a(e,t){return H(e.name,t.name)}function s(e,t){return H(e,t)}function u(e,t){if(void 0===t&&(t=null),null===e)return Ye.EMPTY_NODE;if("object"===typeof e&&".priority"in e&&(t=e[".priority"]),m.assert(null===t||"string"===typeof t||"number"===typeof t||"object"===typeof t&&".sv"in t,"Invalid priority type found: "+typeof t),"object"===typeof e&&".value"in e&&null!==e[".value"]&&(e=e[".value"]),"object"!==typeof e||".sv"in e){return new Me(e,u(t))}if(e instanceof Array||!Je){var n=Ye.EMPTY_NODE,r=e;return m.forEach(r,function(e,t){if(m.contains(r,e)&&"."!==e.substring(0,1)){var i=u(t);!i.isLeafNode()&&i.isEmpty()||(n=n.updateImmediateChild(e,i))}}),n.updatePriority(u(t))}var i=[],o=!1,c=e;if(m.forEach(c,function(e,t){if("string"!==typeof e||"."!==e.substring(0,1)){var n=u(c[e]);n.isEmpty()||(o=o||!n.getPriority().isEmpty(),i.push(new Re(e,n)))}}),0==i.length)return Ye.EMPTY_NODE;var l=ze(i,a,function(e){return e.name},s);if(o){var h=ze(i,je.getCompare());return new Ye(l,u(t),new Qe({".priority":h},{".priority":je}))}return new Ye(l,u(t),Qe.Default)}function c(t){var n=t.INTERNAL.registerService("database",function(e,t,n){return Sn.getInstance().databaseFromApp(e,n)},{Reference:bn,Query:ct,Database:In,enableLogging:A,INTERNAL:Un,ServerValue:Kn,TEST_ACCESS:qn},null,!0);m.isNodeSdk()&&(e.exports=n)}Object.defineProperty(t,"__esModule",{value:!0});var l,h,f,p,d,y,v,m=n(23),g=n(94),_=n(24),b=function(e){return e&&"object"===typeof e&&"default"in e?e.default:e}(n(10)),w=function(){function e(e){this.domStorage_=e,this.prefix_="firebase:"}return e.prototype.set=function(e,t){null==t?this.domStorage_.removeItem(this.prefixedName_(e)):this.domStorage_.setItem(this.prefixedName_(e),m.stringify(t))},e.prototype.get=function(e){var t=this.domStorage_.getItem(this.prefixedName_(e));return null==t?null:m.jsonEval(t)},e.prototype.remove=function(e){this.domStorage_.removeItem(this.prefixedName_(e))},e.prototype.prefixedName_=function(e){return this.prefix_+e},e.prototype.toString=function(){return this.domStorage_.toString()},e}(),E=function(){function e(){this.cache_={},this.isInMemoryStorage=!0}return e.prototype.set=function(e,t){null==t?delete this.cache_[e]:this.cache_[e]=t},e.prototype.get=function(e){return m.contains(this.cache_,e)?this.cache_[e]:null},e.prototype.remove=function(e){delete this.cache_[e]},e}(),C=function(e){try{if("undefined"!==typeof window&&"undefined"!==typeof window[e]){var t=window[e];return t.setItem("firebase:sentinel","cache"),t.removeItem("firebase:sentinel"),new w(t)}}catch(e){}return new E},T=C("localStorage"),S=C("sessionStorage"),I=new g.Logger("@firebase/database"),k=function(){var e=1;return function(){return e++}}(),O=function(e){var t=m.stringToByteArray(e),n=new m.Sha1;n.update(t);var r=n.digest();return m.base64.encodeByteArray(r)},N=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n="",r=0;r<e.length;r++)Array.isArray(e[r])||e[r]&&"object"===typeof e[r]&&"number"===typeof e[r].length?n+=N.apply(null,e[r]):"object"===typeof e[r]?n+=m.stringify(e[r]):n+=e[r],n+=" ";return n},P=null,R=!0,A=function(e,t){m.assert(!t||!0===e||!1===e,"Can't turn on custom loggers persistently."),!0===e?(I.logLevel=g.LogLevel.VERBOSE,P=I.log.bind(I),t&&S.set("logging_enabled",!0)):"function"===typeof e?P=e:(P=null,S.remove("logging_enabled"))},x=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(!0===R&&(R=!1,null===P&&!0===S.get("logging_enabled")&&A(!0)),P){var n=N.apply(null,e);P(n)}},D=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];x.apply(void 0,[e].concat(t))}},L=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n="FIREBASE INTERNAL ERROR: "+N.apply(void 0,e);I.error(n)},U=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n="FIREBASE FATAL ERROR: "+N.apply(void 0,e);throw I.error(n),new Error(n)},M=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n="FIREBASE WARNING: "+N.apply(void 0,e);I.warn(n)},F=function(){"undefined"!==typeof window&&window.location&&window.location.protocol&&-1!==window.location.protocol.indexOf("https:")&&M("Insecure Firebase access from a secure page. Please use https in calls to new Firebase().")},j=function(e){return"number"===typeof e&&(e!=e||e==Number.POSITIVE_INFINITY||e==Number.NEGATIVE_INFINITY)},B=function(e){if(m.isNodeSdk()||"complete"===document.readyState)e();else{var t=!1,n=function(){if(!document.body)return void setTimeout(n,Math.floor(10));t||(t=!0,e())};document.addEventListener?(document.addEventListener("DOMContentLoaded",n,!1),window.addEventListener("load",n,!1)):document.attachEvent&&(document.attachEvent("onreadystatechange",function(){"complete"===document.readyState&&n()}),window.attachEvent("onload",n))}},W="[MIN_NAME]",V="[MAX_NAME]",H=function(e,t){if(e===t)return 0;if(e===W||t===V)return-1;if(t===W||e===V)return 1;var n=ee(e),r=ee(t);return null!==n?null!==r?n-r==0?e.length-t.length:n-r:-1:null!==r?1:e<t?-1:1},q=function(e,t){return e===t?0:e<t?-1:1},K=function(e,t){if(t&&e in t)return t[e];throw new Error("Missing required key ("+e+") in object: "+m.stringify(t))},z=function(e){if("object"!==typeof e||null===e)return m.stringify(e);var t=[];for(var n in e)t.push(n);
1t.sort();for(var r="{",i=0;i<t.length;i++)0!==i&&(r+=","),r+=m.stringify(t[i]),r+=":",r+=z(e[t[i]]);return r+="}"},G=function(e,t){var n=e.length;if(n<=t)return[e];for(var r=[],i=0;i<n;i+=t)i+t>n?r.push(e.substring(i,n)):r.push(e.substring(i,i+t));return r},Q=function(e,t){if(Array.isArray(e))for(var n=0;n<e.length;++n)t(n,e[n]);else m.forEach(e,function(e,n){return t(n,e)})},Y=function(e){m.assert(!j(e),"Invalid JSON number");var t,n,r,i,o,a,s;for(0===e?(n=0,r=0,t=1/e===-1/0?1:0):(t=e<0,e=Math.abs(e),e>=Math.pow(2,-1022)?(i=Math.min(Math.floor(Math.log(e)/Math.LN2),1023),n=i+1023,r=Math.round(e*Math.pow(2,52-i)-Math.pow(2,52))):(n=0,r=Math.round(e/Math.pow(2,-1074)))),a=[],o=52;o;o-=1)a.push(r%2?1:0),r=Math.floor(r/2);for(o=11;o;o-=1)a.push(n%2?1:0),n=Math.floor(n/2);a.push(t?1:0),a.reverse(),s=a.join("");var u="";for(o=0;o<64;o+=8){var c=parseInt(s.substr(o,8),2).toString(16);1===c.length&&(c="0"+c),u+=c}return u.toLowerCase()},X=function(){return!("object"!==typeof window||!window.chrome||!window.chrome.extension||/^chrome/.test(window.location.href))},$=function(){return"object"===typeof Windows&&"object"===typeof Windows.UI},J=function(e,t){var n="Unknown Error";"too_big"===e?n="The data requested exceeds the maximum size that can be accessed with a single request.":"permission_denied"==e?n="Client doesn't have permission to access the desired data.":"unavailable"==e&&(n="The service is unavailable");var r=new Error(e+" at "+t.path.toString()+": "+n);return r.code=e.toUpperCase(),r},Z=new RegExp("^-?\\d{1,10}$"),ee=function(e){if(Z.test(e)){var t=Number(e);if(t>=-2147483648&&t<=2147483647)return t}return null},te=function(e){try{e()}catch(e){setTimeout(function(){var t=e.stack||"";throw M("Exception was thrown by user callback.",t),e},Math.floor(0))}},ne=function(){return("object"===typeof window&&window.navigator&&window.navigator.userAgent||"").search(/googlebot|google webmaster tools|bingbot|yahoo! slurp|baiduspider|yandexbot|duckduckbot/i)>=0},re=function(e,t){var n=setTimeout(e,t);return"object"===typeof n&&n.unref&&n.unref(),n},ie=function(){function e(e,t){if(void 0===t){this.pieces_=e.split("/");for(var n=0,r=0;r<this.pieces_.length;r++)this.pieces_[r].length>0&&(this.pieces_[n]=this.pieces_[r],n++);this.pieces_.length=n,this.pieceNum_=0}else this.pieces_=e,this.pieceNum_=t}return Object.defineProperty(e,"Empty",{get:function(){return new e("")},enumerable:!0,configurable:!0}),e.prototype.getFront=function(){return this.pieceNum_>=this.pieces_.length?null:this.pieces_[this.pieceNum_]},e.prototype.getLength=function(){return this.pieces_.length-this.pieceNum_},e.prototype.popFront=function(){var t=this.pieceNum_;return t<this.pieces_.length&&t++,new e(this.pieces_,t)},e.prototype.getBack=function(){return this.pieceNum_<this.pieces_.length?this.pieces_[this.pieces_.length-1]:null},e.prototype.toString=function(){for(var e="",t=this.pieceNum_;t<this.pieces_.length;t++)""!==this.pieces_[t]&&(e+="/"+this.pieces_[t]);return e||"/"},e.prototype.toUrlEncodedString=function(){for(var e="",t=this.pieceNum_;t<this.pieces_.length;t++)""!==this.pieces_[t]&&(e+="/"+encodeURIComponent(String(this.pieces_[t])));return e||"/"},e.prototype.slice=function(e){return void 0===e&&(e=0),this.pieces_.slice(this.pieceNum_+e)},e.prototype.parent=function(){if(this.pieceNum_>=this.pieces_.length)return null;for(var t=[],n=this.pieceNum_;n<this.pieces_.length-1;n++)t.push(this.pieces_[n]);return new e(t,0)},e.prototype.child=function(t){for(var n=[],r=this.pieceNum_;r<this.pieces_.length;r++)n.push(this.pieces_[r]);if(t instanceof e)for(var r=t.pieceNum_;r<t.pieces_.length;r++)n.push(t.pieces_[r]);else for(var i=t.split("/"),r=0;r<i.length;r++)i[r].length>0&&n.push(i[r]);return new e(n,0)},e.prototype.isEmpty=function(){return this.pieceNum_>=this.pieces_.length},e.relativePath=function(t,n){var r=t.getFront(),i=n.getFront();if(null===r)return n;if(r===i)return e.relativePath(t.popFront(),n.popFront());throw new Error("INTERNAL ERROR: innerPath ("+n+") is not within outerPath ("+t+")")},e.comparePaths=function(e,t){for(var n=e.slice(),r=t.slice(),i=0;i<n.length&&i<r.length;i++){var o=H(n[i],r[i]);if(0!==o)return o}return n.length===r.length?0:n.length<r.length?-1:1},e.prototype.equals=function(e){if(this.getLength()!==e.getLength())return!1;for(var t=this.pieceNum_,n=e.pieceNum_;t<=this.pieces_.length;t++,n++)if(this.pieces_[t]!==e.pieces_[n])return!1;return!0},e.prototype.contains=function(e){var t=this.pieceNum_,n=e.pieceNum_;if(this.getLength()>e.getLength())return!1;for(;t<this.pieces_.length;){if(this.pieces_[t]!==e.pieces_[n])return!1;++t,++n}return!0},e}(),oe=function(){function e(e,t){this.errorPrefix_=t,this.parts_=e.slice(),this.byteLength_=Math.max(1,this.parts_.length);for(var n=0;n<this.parts_.length;n++)this.byteLength_+=m.stringLength(this.parts_[n]);this.checkValid_()}return Object.defineProperty(e,"MAX_PATH_DEPTH",{get:function(){return 32},enumerable:!0,configurable:!0}),Object.defineProperty(e,"MAX_PATH_LENGTH_BYTES",{get:function(){return 768},enumerable:!0,configurable:!0}),e.prototype.push=function(e){this.parts_.length>0&&(this.byteLength_+=1),this.parts_.push(e),this.byteLength_+=m.stringLength(e),this.checkValid_()},e.prototype.pop=function(){var e=this.parts_.pop();this.byteLength_-=m.stringLength(e),this.parts_.length>0&&(this.byteLength_-=1)},e.prototype.checkValid_=function(){if(this.byteLength_>e.MAX_PATH_LENGTH_BYTES)throw new Error(this.errorPrefix_+"has a key path longer than "+e.MAX_PATH_LENGTH_BYTES+" bytes ("+this.byteLength_+").");
1if(this.parts_.length>e.MAX_PATH_DEPTH)throw new Error(this.errorPrefix_+"path specified exceeds the maximum depth that can be written ("+e.MAX_PATH_DEPTH+") or object contains a cycle "+this.toErrorString())},e.prototype.toErrorString=function(){return 0==this.parts_.length?"":"in property '"+this.parts_.join(".")+"'"},e}(),ae="long_polling",se=function(){function e(e,t,n,r,i){void 0===i&&(i=""),this.secure=t,this.namespace=n,this.webSocketOnly=r,this.persistenceKey=i,this.host=e.toLowerCase(),this.domain=this.host.substr(this.host.indexOf(".")+1),this.internalHost=T.get("host:"+e)||this.host}return e.prototype.needsQueryParam=function(){return this.host!==this.internalHost||this.isCustomHost()},e.prototype.isCacheableHost=function(){return"s-"===this.internalHost.substr(0,2)},e.prototype.isDemoHost=function(){return"firebaseio-demo.com"===this.domain},e.prototype.isCustomHost=function(){return"firebaseio.com"!==this.domain&&"firebaseio-demo.com"!==this.domain},e.prototype.updateHost=function(e){e!==this.internalHost&&(this.internalHost=e,this.isCacheableHost()&&T.set("host:"+this.host,this.internalHost))},e.prototype.connectionURL=function(e,t){m.assert("string"===typeof e,"typeof type must == string"),m.assert("object"===typeof t,"typeof params must == object");var n;if("websocket"===e)n=(this.secure?"wss://":"ws://")+this.internalHost+"/.ws?";else{if(e!==ae)throw new Error("Unknown connection type: "+e);n=(this.secure?"https://":"http://")+this.internalHost+"/.lp?"}this.needsQueryParam()&&(t.ns=this.namespace);var r=[];return m.forEach(t,function(e,t){r.push(e+"="+t)}),n+r.join("&")},e.prototype.toString=function(){var e=this.toURLString();return this.persistenceKey&&(e+="<"+this.persistenceKey+">"),e},e.prototype.toURLString=function(){return(this.secure?"https://":"http://")+this.host},e}(),ue=function(e){var t=ce(e),n=t.subdomain;"firebase"===t.domain&&U(t.host+" is no longer supported. Please use <YOUR FIREBASE>.firebaseio.com instead"),n&&"undefined"!=n||"localhost"===t.domain||U("Cannot parse Firebase url. Please use https://<YOUR FIREBASE>.firebaseio.com"),t.secure||F();var r="ws"===t.scheme||"wss"===t.scheme;return{repoInfo:new se(t.host,t.secure,n,r),path:new ie(t.pathString)}},ce=function(e){var t="",n="",r="",a="",s=!0,u="https",c=443;if("string"===typeof e){var l=e.indexOf("//");l>=0&&(u=e.substring(0,l-1),e=e.substring(l+2));var h=e.indexOf("/");-1===h&&(h=e.length);var f=e.indexOf("?");-1===f&&(f=e.length),t=e.substring(0,Math.min(h,f)),h<f&&(a=i(e.substring(h,f)));var p=o(e.substring(Math.min(e.length,f)));l=t.indexOf(":"),l>=0?(s="https"===u||"wss"===u,c=parseInt(t.substring(l+1),10)):l=e.length;var d=t.split(".");3===d.length?(n=d[1],r=d[0].toLowerCase()):2===d.length?n=d[0]:"localhost"===d[0].slice(0,l).toLowerCase()&&(n="localhost"),""===r&&"ns"in p&&(r=p.ns)}return{host:t,port:c,domain:n,subdomain:r,secure:s,scheme:u,pathString:a}},le=/[\[\].#$\/\u0000-\u001F\u007F]/,he=/[\[\].#$\u0000-\u001F\u007F]/,fe=function(e){return"string"===typeof e&&0!==e.length&&!le.test(e)},pe=function(e){return"string"===typeof e&&0!==e.length&&!he.test(e)},de=function(e){return e&&(e=e.replace(/^\/*\.info(\/|$)/,"/")),pe(e)},ye=function(e){return null===e||"string"===typeof e||"number"===typeof e&&!j(e)||e&&"object"===typeof e&&m.contains(e,".sv")},ve=function(e,t,n,r,i){i&&void 0===n||me(m.errorPrefix(e,t,i),n,r)},me=function(e,t,n){var r=n instanceof ie?new oe(n,e):n;if(void 0===t)throw new Error(e+"contains undefined "+r.toErrorString());if("function"===typeof t)throw new Error(e+"contains a function "+r.toErrorString()+" with contents = "+t.toString());if(j(t))throw new Error(e+"contains "+t.toString()+" "+r.toErrorString());if("string"===typeof t&&t.length>10485760/3&&m.stringLength(t)>10485760)throw new Error(e+"contains a string greater than 10485760 utf8 bytes "+r.toErrorString()+" ('"+t.substring(0,50)+"...')");if(t&&"object"===typeof t){var i=!1,o=!1;if(m.forEach(t,function(t,n){if(".value"===t)i=!0;else if(".priority"!==t&&".sv"!==t&&(o=!0,!fe(t)))throw new Error(e+" contains an invalid key ("+t+") "+r.toErrorString()+'. Keys must be non-empty strings and can\'t contain ".", "#", "$", "/", "[", or "]"');r.push(t),me(e,n,r),r.pop()}),i&&o)throw new Error(e+' contains ".value" child '+r.toErrorString()+" in addition to actual children.")}},ge=function(e,t){var n,r;for(n=0;n<t.length;n++){r=t[n];for(var i=r.slice(),o=0;o<i.length;o++)if(".priority"===i[o]&&o===i.length-1);
1else if(!fe(i[o]))throw new Error(e+"contains an invalid key ("+i[o]+") in path "+r.toString()+'. Keys must be non-empty strings and can\'t contain ".", "#", "$", "/", "[", or "]"')}t.sort(ie.comparePaths);var a=null;for(n=0;n<t.length;n++){if(r=t[n],null!==a&&a.contains(r))throw new Error(e+"contains a path "+a.toString()+" that is ancestor of another path "+r.toString());a=r}},_e=function(e,t,n,r,i){if(!i||void 0!==n){var o=m.errorPrefix(e,t,i);if(!n||"object"!==typeof n||Array.isArray(n))throw new Error(o+" must be an object containing the children to replace.");var a=[];m.forEach(n,function(e,t){var n=new ie(e);if(me(o,t,r.child(n)),".priority"===n.getBack()&&!ye(t))throw new Error(o+"contains an invalid value for '"+n.toString()+"', which must be a valid Firebase priority (a string, finite number, server value, or null).");a.push(n)}),ge(o,a)}},be=function(e,t,n,r){if(!r||void 0!==n){if(j(n))throw new Error(m.errorPrefix(e,t,r)+"is "+n.toString()+", but must be a valid Firebase priority (a string, finite number, server value, or null).");if(!ye(n))throw new Error(m.errorPrefix(e,t,r)+"must be a valid Firebase priority (a string, finite number, server value, or null).")}},we=function(e,t,n,r){if(!r||void 0!==n)switch(n){case"value":case"child_added":case"child_removed":case"child_changed":case"child_moved":break;default:throw new Error(m.errorPrefix(e,t,r)+'must be a valid event type = "value", "child_added", "child_removed", "child_changed", or "child_moved".')}},Ee=function(e,t,n,r){if((!r||void 0!==n)&&!fe(n))throw new Error(m.errorPrefix(e,t,r)+'was an invalid key = "'+n+'". Firebase keys must be non-empty strings and can\'t contain ".", "#", "$", "/", "[", or "]").')},Ce=function(e,t,n,r){if((!r||void 0!==n)&&!pe(n))throw new Error(m.errorPrefix(e,t,r)+'was an invalid path = "'+n+'". Paths must be non-empty strings and can\'t contain ".", "#", "$", "[", or "]"')},Te=function(e,t,n,r){n&&(n=n.replace(/^\/*\.info(\/|$)/,"/")),Ce(e,t,n,r)},Se=function(e,t){if(".info"===t.getFront())throw new Error(e+" failed = Can't modify data under /.info/")},Ie=function(e,t,n){var r=n.path.toString();if("string"!==typeof n.repoInfo.host||0===n.repoInfo.host.length||!fe(n.repoInfo.namespace)&&"localhost"!==n.repoInfo.host.split(":")[0]||0!==r.length&&!de(r))throw new Error(m.errorPrefix(e,t,!1)+'must be a valid firebase URL and the path can\'t contain ".", "#", "$", "[", or "]".')},ke=function(e,t,n,r){if((!r||void 0!==n)&&"boolean"!==typeof n)throw new Error(m.errorPrefix(e,t,r)+"must be a boolean.")},Oe=function(){function e(e,t){this.repo_=e,this.path_=t}return e.prototype.cancel=function(e){m.validateArgCount("OnDisconnect.cancel",0,1,arguments.length),m.validateCallback("OnDisconnect.cancel",1,e,!0);var t=new m.Deferred;return this.repo_.onDisconnectCancel(this.path_,t.wrapCallback(e)),t.promise},e.prototype.remove=function(e){m.validateArgCount("OnDisconnect.remove",0,1,arguments.length),Se("OnDisconnect.remove",this.path_),m.validateCallback("OnDisconnect.remove",1,e,!0);var t=new m.Deferred;return this.repo_.onDisconnectSet(this.path_,null,t.wrapCallback(e)),t.promise},e.prototype.set=function(e,t){m.validateArgCount("OnDisconnect.set",1,2,arguments.length),Se("OnDisconnect.set",this.path_),ve("OnDisconnect.set",1,e,this.path_,!1),m.validateCallback("OnDisconnect.set",2,t,!0);var n=new m.Deferred;return this.repo_.onDisconnectSet(this.path_,e,n.wrapCallback(t)),n.promise},e.prototype.setWithPriority=function(e,t,n){m.validateArgCount("OnDisconnect.setWithPriority",2,3,arguments.length),Se("OnDisconnect.setWithPriority",this.path_),ve("OnDisconnect.setWithPriority",1,e,this.path_,!1),be("OnDisconnect.setWithPriority",2,t,!1),m.validateCallback("OnDisconnect.setWithPriority",3,n,!0);var r=new m.Deferred;return this.repo_.onDisconnectSetWithPriority(this.path_,e,t,r.wrapCallback(n)),r.promise},e.prototype.update=function(e,t){if(m.validateArgCount("OnDisconnect.update",1,2,arguments.length),Se("OnDisconnect.update",this.path_),Array.isArray(e)){for(var n={},r=0;r<e.length;++r)n[""+r]=e[r];e=n,M("Passing an Array to firebase.database.onDisconnect().update() is deprecated. Use set() if you want to overwrite the existing data, or an Object with integer keys if you really do want to only update some of the children.")}_e("OnDisconnect.update",1,e,this.path_,!1),m.validateCallback("OnDisconnect.update",2,t,!0);var i=new m.Deferred;return this.repo_.onDisconnectUpdate(this.path_,e,i.wrapCallback(t)),i.promise},e}(),Ne=function(){function e(e,t){this.committed=e,this.snapshot=t}return e.prototype.toJSON=function(){return m.validateArgCount("TransactionResult.toJSON",0,1,arguments.length),{committed:this.committed,snapshot:this.snapshot.toJSON()}},e}(),Pe=function(){var e="-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz",t=0,n=[];return function(r){var i=r===t;t=r;var o,a=new Array(8);for(o=7;o>=0;o--)a[o]=e.charAt(r%64),r=Math.floor(r/64);m.assert(0===r,"Cannot push at time == 0");var s=a.join("");if(i){for(o=11;o>
1=0&&63===n[o];o--)n[o]=0;n[o]++}else for(o=0;o<12;o++)n[o]=Math.floor(64*Math.random());for(o=0;o<12;o++)s+=e.charAt(n[o]);return m.assert(20===s.length,"nextPushId: Length should be 20."),s}}(),Re=function(){function e(e,t){this.name=e,this.node=t}return e.Wrap=function(t,n){return new e(t,n)},e}(),Ae=function(){function e(){}return e.prototype.getCompare=function(){return this.compare.bind(this)},e.prototype.indexedValueChanged=function(e,t){var n=new Re(W,e),r=new Re(W,t);return 0!==this.compare(n,r)},e.prototype.minPost=function(){return Re.MIN},e}(),xe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _.__extends(t,e),Object.defineProperty(t,"__EMPTY_NODE",{get:function(){return l},set:function(e){l=e},enumerable:!0,configurable:!0}),t.prototype.compare=function(e,t){return H(e.name,t.name)},t.prototype.isDefinedOn=function(e){throw m.assertionError("KeyIndex.isDefinedOn not expected to be called.")},t.prototype.indexedValueChanged=function(e,t){return!1},t.prototype.minPost=function(){return Re.MIN},t.prototype.maxPost=function(){return new Re(V,l)},t.prototype.makePost=function(e,t){return m.assert("string"===typeof e,"KeyIndex indexValue must always be a string."),new Re(e,l)},t.prototype.toString=function(){return".key"},t}(Ae),De=new xe,Le=function(e){return"number"===typeof e?"number:"+Y(e):"string:"+e},Ue=function(e){if(e.isLeafNode()){var t=e.val();m.assert("string"===typeof t||"number"===typeof t||"object"===typeof t&&m.contains(t,".sv"),"Priority must be a string or number.")}else m.assert(e===h||e.isEmpty(),"priority of unexpected type.");m.assert(e===h||e.getPriority().isEmpty(),"Priority nodes can't have a priority of their own.")},Me=function(){function e(t,n){void 0===n&&(n=e.__childrenNodeConstructor.EMPTY_NODE),this.value_=t,this.priorityNode_=n,this.lazyHash_=null,m.assert(void 0!==this.value_&&null!==this.value_,"LeafNode shouldn't be created with null/undefined value."),Ue(this.priorityNode_)}return Object.defineProperty(e,"__childrenNodeConstructor",{get:function(){return f},set:function(e){f=e},enumerable:!0,configurable:!0}),e.prototype.isLeafNode=function(){return!0},e.prototype.getPriority=function(){return this.priorityNode_},e.prototype.updatePriority=function(t){return new e(this.value_,t)},e.prototype.getImmediateChild=function(t){return".priority"===t?this.priorityNode_:e.__childrenNodeConstructor.EMPTY_NODE},e.prototype.getChild=function(t){return t.isEmpty()?this:".priority"===t.getFront()?this.priorityNode_:e.__childrenNodeConstructor.EMPTY_NODE},e.prototype.hasChild=function(){return!1},e.prototype.getPredecessorChildName=function(e,t){return null},e.prototype.updateImmediateChild=function(t,n){return".priority"===t?this.updatePriority(n):n.isEmpty()&&".priority"!==t?this:e.__childrenNodeConstructor.EMPTY_NODE.updateImmediateChild(t,n).updatePriority(this.priorityNode_)},e.prototype.updateChild=function(t,n){var r=t.getFront();return null===r?n:n.isEmpty()&&".priority"!==r?this:(m.assert(".priority"!==r||1===t.getLength(),".priority must be the last token in a path"),this.updateImmediateChild(r,e.__childrenNodeConstructor.EMPTY_NODE.updateChild(t.popFront(),n)))},e.prototype.isEmpty=function(){return!1},e.prototype.numChildren=function(){return 0},e.prototype.forEachChild=function(e,t){return!1},e.prototype.val=function(e){return e&&!this.getPriority().isEmpty()?{".value":this.getValue(),".priority":this.getPriority().val()}:this.getValue()},e.prototype.hash=function(){if(null===this.lazyHash_){var e="";this.priorityNode_.isEmpty()||(e+="priority:"+Le(this.priorityNode_.val())+":");var t=typeof this.value_;e+=t+":",e+="number"===t?Y(this.value_):this.value_,this.lazyHash_=O(e)}return this.lazyHash_},e.prototype.getValue=function(){return this.value_},e.prototype.compareTo=function(t){return t===e.__childrenNodeConstructor.EMPTY_NODE?1:t instanceof e.__childrenNodeConstructor?-1:(m.assert(t.isLeafNode(),"Unknown node type"),this.compareToLeafNode_(t))},e.prototype.compareToLeafNode_=function(t){var n=typeof t.value_,r=typeof this.value_,i=e.VALUE_TYPE_ORDER.indexOf(n),o=e.VALUE_TYPE_ORDER.indexOf(r);return m.assert(i>=0,"Unknown leaf type: "+n),m.assert(o>=0,"Unknown leaf type: "+r),i===o?"object"===r?0:this.value_<t.value_?-1:this.value_===t.value_?0:1:o-i},e.prototype.withIndex=function(){return this},e.prototype.isIndexed=function(){return!0},e.prototype.equals=function(e){if(e===this)return!0;
1if(e.isLeafNode()){var t=e;return this.value_===t.value_&&this.priorityNode_.equals(t.priorityNode_)}return!1},e.VALUE_TYPE_ORDER=["object","boolean","number","string"],e}(),Fe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _.__extends(t,e),t.prototype.compare=function(e,t){var n=e.node.getPriority(),r=t.node.getPriority(),i=n.compareTo(r);return 0===i?H(e.name,t.name):i},t.prototype.isDefinedOn=function(e){return!e.getPriority().isEmpty()},t.prototype.indexedValueChanged=function(e,t){return!e.getPriority().equals(t.getPriority())},t.prototype.minPost=function(){return Re.MIN},t.prototype.maxPost=function(){return new Re(V,new Me("[PRIORITY-POST]",d))},t.prototype.makePost=function(e,t){var n=p(e);return new Re(t,new Me("[PRIORITY-POST]",n))},t.prototype.toString=function(){return".priority"},t}(Ae),je=new Fe,Be=function(){function e(e,t,n,r,i){void 0===i&&(i=null),this.isReverse_=r,this.resultGenerator_=i,this.nodeStack_=[];for(var o=1;!e.isEmpty();)if(e=e,o=t?n(e.key,t):1,r&&(o*=-1),o<0)e=this.isReverse_?e.left:e.right;else{if(0===o){this.nodeStack_.push(e);break}this.nodeStack_.push(e),e=this.isReverse_?e.right:e.left}}return e.prototype.getNext=function(){if(0===this.nodeStack_.length)return null;var e,t=this.nodeStack_.pop();if(e=this.resultGenerator_?this.resultGenerator_(t.key,t.value):{key:t.key,value:t.value},this.isReverse_)for(t=t.left;!t.isEmpty();)this.nodeStack_.push(t),t=t.right;else for(t=t.right;!t.isEmpty();)this.nodeStack_.push(t),t=t.left;return e},e.prototype.hasNext=function(){return this.nodeStack_.length>0},e.prototype.peek=function(){if(0===this.nodeStack_.length)return null;var e=this.nodeStack_[this.nodeStack_.length-1];return this.resultGenerator_?this.resultGenerator_(e.key,e.value):{key:e.key,value:e.value}},e}(),We=function(){function e(t,n,r,i,o){this.key=t,this.value=n,this.color=null!=r?r:e.RED,this.left=null!=i?i:He.EMPTY_NODE,this.right=null!=o?o:He.EMPTY_NODE}return e.prototype.copy=function(t,n,r,i,o){return new e(null!=t?t:this.key,null!=n?n:this.value,null!=r?r:this.color,null!=i?i:this.left,null!=o?o:this.right)},e.prototype.count=function(){return this.left.count()+1+this.right.count()},e.prototype.isEmpty=function(){return!1},e.prototype.inorderTraversal=function(e){return this.left.inorderTraversal(e)||e(this.key,this.value)||this.right.inorderTraversal(e)},e.prototype.reverseTraversal=function(e){return this.right.reverseTraversal(e)||e(this.key,this.value)||this.left.reverseTraversal(e)},e.prototype.min_=function(){return this.left.isEmpty()?this:this.left.min_()},e.prototype.minKey=function(){return this.min_().key},e.prototype.maxKey=function(){return this.right.isEmpty()?this.key:this.right.maxKey()},e.prototype.insert=function(e,t,n){var r,i;return i=this,r=n(e,i.key),i=r<0?i.copy(null,null,null,i.left.insert(e,t,n),null):0===r?i.copy(null,t,null,null,null):i.copy(null,null,null,null,i.right.insert(e,t,n)),i.fixUp_()},e.prototype.removeMin_=function(){if(this.left.isEmpty())return He.EMPTY_NODE;var e=this;return e.left.isRed_()||e.left.left.isRed_()||(e=e.moveRedLeft_()),e=e.copy(null,null,null,e.left.removeMin_(),null),e.fixUp_()},e.prototype.remove=function(e,t){var n,r;if(n=this,t(e,n.key)<0)n.left.isEmpty()||n.left.isRed_()||n.left.left.isRed_()||(n=n.moveRedLeft_()),n=n.copy(null,null,null,n.left.remove(e,t),null);else{if(n.left.isRed_()&&(n=n.rotateRight_()),n.right.isEmpty()||n.right.isRed_()||n.right.left.isRed_()||(n=n.moveRedRight_()),0===t(e,n.key)){if(n.right.isEmpty())return He.EMPTY_NODE;r=n.right.min_(),n=n.copy(r.key,r.value,null,null,n.right.removeMin_())}n=n.copy(null,null,null,null,n.right.remove(e,t))}return n.fixUp_()},e.prototype.isRed_=function(){return this.color},e.prototype.fixUp_=function(){var e=this;return e.right.isRed_()&&!e.left.isRed_()&&(e=e.rotateLeft_()),e.left.isRed_()&&e.left.left.isRed_()&&(e=e.rotateRight_()),e.left.isRed_()&&e.right.isRed_()&&(e=e.colorFlip_()),e},e.prototype.moveRedLeft_=function(){var e=this.colorFlip_();return e.right.left.isRed_()&&(e=e.copy(null,null,null,null,e.right.rotateRight_()),e=e.rotateLeft_(),e=e.colorFlip_()),e},e.prototype.moveRedRight_=function(){var e=this.colorFlip_();return e.left.left.isRed_()&&(e=e.rotateRight_(),e=e.colorFlip_()),e},e.prototype.rotateLeft_=function(){var t=this.copy(null,null,e.RED,null,this.right.left);return this.right.copy(null,null,this.color,t,null)},e.prototype.rotateRight_=function(){var t=this.copy(null,null,e.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,t)},e.prototype.colorFlip_=function(){var e=this.left.copy(null,null,!this.left.color,null,null),t=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,e,t)},e.prototype.checkMaxDepth_=function(){var e=this.check_();return Math.pow(2,e)<=this.count()+1},e.prototype.check_=function(){var e;
1if(this.isRed_()&&this.left.isRed_())throw new Error("Red node has red child("+this.key+","+this.value+")");if(this.right.isRed_())throw new Error("Right child of ("+this.key+","+this.value+") is red");if((e=this.left.check_())!==this.right.check_())throw new Error("Black depths differ");return e+(this.isRed_()?0:1)},e.RED=!0,e.BLACK=!1,e}(),Ve=function(){function e(){}return e.prototype.copy=function(e,t,n,r,i){return this},e.prototype.insert=function(e,t,n){return new We(e,t,null)},e.prototype.remove=function(e,t){return this},e.prototype.count=function(){return 0},e.prototype.isEmpty=function(){return!0},e.prototype.inorderTraversal=function(e){return!1},e.prototype.reverseTraversal=function(e){return!1},e.prototype.minKey=function(){return null},e.prototype.maxKey=function(){return null},e.prototype.check_=function(){return 0},e.prototype.isRed_=function(){return!1},e}(),He=function(){function e(t,n){void 0===n&&(n=e.EMPTY_NODE),this.comparator_=t,this.root_=n}return e.prototype.insert=function(t,n){return new e(this.comparator_,this.root_.insert(t,n,this.comparator_).copy(null,null,We.BLACK,null,null))},e.prototype.remove=function(t){return new e(this.comparator_,this.root_.remove(t,this.comparator_).copy(null,null,We.BLACK,null,null))},e.prototype.get=function(e){for(var t,n=this.root_;!n.isEmpty();){if(0===(t=this.comparator_(e,n.key)))return n.value;t<0?n=n.left:t>0&&(n=n.right)}return null},e.prototype.getPredecessorKey=function(e){for(var t,n=this.root_,r=null;!n.isEmpty();){if(0===(t=this.comparator_(e,n.key))){if(n.left.isEmpty())return r?r.key:null;for(n=n.left;!n.right.isEmpty();)n=n.right;return n.key}t<0?n=n.left:t>0&&(r=n,n=n.right)}throw new Error("Attempted to find predecessor key for a nonexistent key. What gives?")},e.prototype.isEmpty=function(){return this.root_.isEmpty()},e.prototype.count=function(){return this.root_.count()},e.prototype.minKey=function(){return this.root_.minKey()},e.prototype.maxKey=function(){return this.root_.maxKey()},e.prototype.inorderTraversal=function(e){return this.root_.inorderTraversal(e)},e.prototype.reverseTraversal=function(e){return this.root_.reverseTraversal(e)},e.prototype.getIterator=function(e){return new Be(this.root_,null,this.comparator_,!1,e)},e.prototype.getIteratorFrom=function(e,t){return new Be(this.root_,e,this.comparator_,!1,t)},e.prototype.getReverseIteratorFrom=function(e,t){return new Be(this.root_,e,this.comparator_,!0,t)},e.prototype.getReverseIterator=function(e){return new Be(this.root_,null,this.comparator_,!0,e)},e.EMPTY_NODE=new Ve,e}(),qe=Math.log(2),Ke=function(){function e(e){this.count=function(e){return parseInt(Math.log(e)/qe,10)}(e+1),this.current_=this.count-1;var t=function(e){return parseInt(Array(e+1).join("1"),2)}(this.count);this.bits_=e+1&t}return e.prototype.nextBitIsOne=function(){var e=!(this.bits_&1<<this.current_);return this.current_--,e},e}(),ze=function(e,t,n,r){e.sort(t);var i=function(t,r){var o,a,s=r-t;if(0==s)return null;if(1==s)return o=e[t],a=n?n(o):o,new We(a,o.node,We.BLACK,null,null);var u=parseInt(s/2,10)+t,c=i(t,u),l=i(u+1,r);return o=e[u],a=n?n(o):o,new We(a,o.node,We.BLACK,c,l)},o=new Ke(e.length),a=function(t){for(var r=null,o=null,a=e.length,s=function(t,r){var o=a-t,s=a;a-=t;var c=i(o+1,s),l=e[o],h=n?n(l):l;u(new We(h,l.node,r,null,c))},u=function(e){r?(r.left=e,r=e):(o=e,r=e)},c=0;c<t.count;++c){var l=t.nextBitIsOne(),h=Math.pow(2,t.count-(c+1));l?s(h,We.BLACK):(s(h,We.BLACK),s(h,We.RED))}return o}(o);return new He(r||t,a)},Ge={},Qe=function(){function e(e,t){this.indexes_=e,this.indexSet_=t}return Object.defineProperty(e,"Default",{get:function(){return m.assert(Ge&&je,"ChildrenNode.ts has not been loaded"),y=y||new e({".priority":Ge},{".priority":je})},enumerable:!0,configurable:!0}),e.prototype.get=function(e){var t=m.safeGet(this.indexes_,e);if(!t)throw new Error("No index defined for "+e);return t===Ge?null:t},e.prototype.hasIndex=function(e){return m.contains(this.indexSet_,e.toString())},e.prototype.addIndex=function(t,n){m.assert(t!==De,"KeyIndex always exists and isn't meant to be added to the IndexMap.");for(var r=[],i=!1,o=n.getIterator(Re.Wrap),a=o.getNext();a;)i=i||t.isDefinedOn(a.node),r.push(a),a=o.getNext();var s;s=i?ze(r,t.getCompare()):Ge;var u=t.toString(),c=m.clone(this.indexSet_);c[u]=t;var l=m.clone(this.indexes_);return l[u]=s,new e(l,c)},e.prototype.addToIndexes=function(t,n){var r=this;return new e(m.map(this.indexes_,function(e,i){var o=m.safeGet(r.indexSet_,i);if(m.assert(o,"Missing index implementation for "+i),e===Ge){if(o.isDefinedOn(t.node)){for(var a=[],s=n.getIterator(Re.Wrap),u=s.getNext();u;)u.name!=t.name&&a.push(u),u=s.getNext();return a.push(t),ze(a,o.getCompare())}return Ge}var c=n.get(t.name),l=e;return c&&(l=l.remove(new Re(t.name,c))),l.insert(t,t.node)}),this.indexSet_)}
1,e.prototype.removeFromIndexes=function(t,n){return new e(m.map(this.indexes_,function(e){if(e===Ge)return e;var r=n.get(t.name);return r?e.remove(new Re(t.name,r)):e}),this.indexSet_)},e}(),Ye=function(){function e(e,t,n){this.children_=e,this.priorityNode_=t,this.indexMap_=n,this.lazyHash_=null,this.priorityNode_&&Ue(this.priorityNode_),this.children_.isEmpty()&&m.assert(!this.priorityNode_||this.priorityNode_.isEmpty(),"An empty node cannot have a priority")}return Object.defineProperty(e,"EMPTY_NODE",{get:function(){return v||(v=new e(new He(s),null,Qe.Default))},enumerable:!0,configurable:!0}),e.prototype.isLeafNode=function(){return!1},e.prototype.getPriority=function(){return this.priorityNode_||v},e.prototype.updatePriority=function(t){return this.children_.isEmpty()?this:new e(this.children_,t,this.indexMap_)},e.prototype.getImmediateChild=function(e){if(".priority"===e)return this.getPriority();var t=this.children_.get(e);return null===t?v:t},e.prototype.getChild=function(e){var t=e.getFront();return null===t?this:this.getImmediateChild(t).getChild(e.popFront())},e.prototype.hasChild=function(e){return null!==this.children_.get(e)},e.prototype.updateImmediateChild=function(t,n){if(m.assert(n,"We should always be passing snapshot nodes"),".priority"===t)return this.updatePriority(n);var r=new Re(t,n),i=void 0,o=void 0,a=void 0;return n.isEmpty()?(i=this.children_.remove(t),o=this.indexMap_.removeFromIndexes(r,this.children_)):(i=this.children_.insert(t,n),o=this.indexMap_.addToIndexes(r,this.children_)),a=i.isEmpty()?v:this.priorityNode_,new e(i,a,o)},e.prototype.updateChild=function(e,t){var n=e.getFront();if(null===n)return t;m.assert(".priority"!==e.getFront()||1===e.getLength(),".priority must be the last token in a path");var r=this.getImmediateChild(n).updateChild(e.popFront(),t);return this.updateImmediateChild(n,r)},e.prototype.isEmpty=function(){return this.children_.isEmpty()},e.prototype.numChildren=function(){return this.children_.count()},e.prototype.val=function(t){if(this.isEmpty())return null;var n={},r=0,i=0,o=!0;if(this.forEachChild(je,function(a,s){n[a]=s.val(t),r++,o&&e.INTEGER_REGEXP_.test(a)?i=Math.max(i,Number(a)):o=!1}),!t&&o&&i<2*r){var a=[];for(var s in n)a[s]=n[s];return a}return t&&!this.getPriority().isEmpty()&&(n[".priority"]=this.getPriority().val()),n},e.prototype.hash=function(){if(null===this.lazyHash_){var e="";this.getPriority().isEmpty()||(e+="priority:"+Le(this.getPriority().val())+":"),this.forEachChild(je,function(t,n){var r=n.hash();""!==r&&(e+=":"+t+":"+r)}),this.lazyHash_=""===e?"":O(e)}return this.lazyHash_},e.prototype.getPredecessorChildName=function(e,t,n){var r=this.resolveIndex_(n);if(r){var i=r.getPredecessorKey(new Re(e,t));return i?i.name:null}return this.children_.getPredecessorKey(e)},e.prototype.getFirstChildName=function(e){var t=this.resolveIndex_(e);if(t){var n=t.minKey();return n&&n.name}return this.children_.minKey()},e.prototype.getFirstChild=function(e){var t=this.getFirstChildName(e);return t?new Re(t,this.children_.get(t)):null},e.prototype.getLastChildName=function(e){var t=this.resolveIndex_(e);if(t){var n=t.maxKey();return n&&n.name}return this.children_.maxKey()},e.prototype.getLastChild=function(e){var t=this.getLastChildName(e);return t?new Re(t,this.children_.get(t)):null},e.prototype.forEachChild=function(e,t){var n=this.resolveIndex_(e);return n?n.inorderTraversal(function(e){return t(e.name,e.node)}):this.children_.inorderTraversal(t)},e.prototype.getIterator=function(e){return this.getIteratorFrom(e.minPost(),e)},e.prototype.getIteratorFrom=function(e,t){var n=this.resolveIndex_(t);if(n)return n.getIteratorFrom(e,function(e){return e});for(var r=this.children_.getIteratorFrom(e.name,Re.Wrap),i=r.peek();null!=i&&t.compare(i,e)<0;)r.getNext(),i=r.peek();return r},e.prototype.getReverseIterator=function(e){return this.getReverseIteratorFrom(e.maxPost(),e)},e.prototype.getReverseIteratorFrom=function(e,t){var n=this.resolveIndex_(t);if(n)return n.getReverseIteratorFrom(e,function(e){return e});for(var r=this.children_.getReverseIteratorFrom(e.name,Re.Wrap),i=r.peek();null!=i&&t.compare(i,e)>0;)r.getNext(),i=r.peek();return r},e.prototype.compareTo=function(e){return this.isEmpty()?e.isEmpty()?0:-1:e.isLeafNode()||e.isEmpty()?1:e===$e?-1:0},e.prototype.withIndex=function(t){if(t===De||this.indexMap_.hasIndex(t))return this;var n=this.indexMap_.addIndex(t,this.children_);return new e(this.children_,this.priorityNode_,n)},e.prototype.isIndexed=function(e){return e===De||this.indexMap_.hasIndex(e)},e.prototype.equals=function(e){if(e===this)return!0;
1if(e.isLeafNode())return!1;var t=e;if(this.getPriority().equals(t.getPriority())){if(this.children_.count()===t.children_.count()){for(var n=this.getIterator(je),r=t.getIterator(je),i=n.getNext(),o=r.getNext();i&&o;){if(i.name!==o.name||!i.node.equals(o.node))return!1;i=n.getNext(),o=r.getNext()}return null===i&&null===o}return!1}return!1},e.prototype.resolveIndex_=function(e){return e===De?null:this.indexMap_.get(e.toString())},e.INTEGER_REGEXP_=/^(0|[1-9]\d*)$/,e}(),Xe=function(e){function t(){return e.call(this,new He(s),Ye.EMPTY_NODE,Qe.Default)||this}return _.__extends(t,e),t.prototype.compareTo=function(e){return e===this?0:1},t.prototype.equals=function(e){return e===this},t.prototype.getPriority=function(){return this},t.prototype.getImmediateChild=function(e){return Ye.EMPTY_NODE},t.prototype.isEmpty=function(){return!1},t}(Ye),$e=new Xe;Object.defineProperties(Re,{MIN:{value:new Re(W,Ye.EMPTY_NODE)},MAX:{value:new Re(V,$e)}}),xe.__EMPTY_NODE=Ye.EMPTY_NODE,Me.__childrenNodeConstructor=Ye,function(e){h=e}($e),function(e){d=e}($e);var Je=!0;!function(e){p=e}(u);var Ze,et,tt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _.__extends(t,e),t.prototype.compare=function(e,t){var n=e.node.compareTo(t.node);return 0===n?H(e.name,t.name):n},t.prototype.isDefinedOn=function(e){return!0},t.prototype.indexedValueChanged=function(e,t){return!e.equals(t)},t.prototype.minPost=function(){return Re.MIN},t.prototype.maxPost=function(){return Re.MAX},t.prototype.makePost=function(e,t){var n=u(e);return new Re(t,n)},t.prototype.toString=function(){return".value"},t}(Ae),nt=new tt,rt=function(e){function t(t){var n=e.call(this)||this;return n.indexPath_=t,m.assert(!t.isEmpty()&&".priority"!==t.getFront(),"Can't create PathIndex with empty path or .priority key"),n}return _.__extends(t,e),t.prototype.extractChild=function(e){return e.getChild(this.indexPath_)},t.prototype.isDefinedOn=function(e){return!e.getChild(this.indexPath_).isEmpty()},t.prototype.compare=function(e,t){var n=this.extractChild(e.node),r=this.extractChild(t.node),i=n.compareTo(r);return 0===i?H(e.name,t.name):i},t.prototype.makePost=function(e,t){var n=u(e),r=Ye.EMPTY_NODE.updateChild(this.indexPath_,n);return new Re(t,r)},t.prototype.maxPost=function(){var e=Ye.EMPTY_NODE.updateChild(this.indexPath_,$e);return new Re(V,e)},t.prototype.toString=function(){return this.indexPath_.slice().join("/")},t}(Ae),it=function(){function e(e,t,n){this.node_=e,this.ref_=t,this.index_=n}return e.prototype.val=function(){return m.validateArgCount("DataSnapshot.val",0,0,arguments.length),this.node_.val()},e.prototype.exportVal=function(){return m.validateArgCount("DataSnapshot.exportVal",0,0,arguments.length),this.node_.val(!0)},e.prototype.toJSON=function(){return m.validateArgCount("DataSnapshot.toJSON",0,1,arguments.length),this.exportVal()},e.prototype.exists=function(){return m.validateArgCount("DataSnapshot.exists",0,0,arguments.length),!this.node_.isEmpty()},e.prototype.child=function(t){m.validateArgCount("DataSnapshot.child",0,1,arguments.length),t=String(t),Ce("DataSnapshot.child",1,t,!1);var n=new ie(t),r=this.ref_.child(n);return new e(this.node_.getChild(n),r,je)},e.prototype.hasChild=function(e){m.validateArgCount("DataSnapshot.hasChild",1,1,arguments.length),Ce("DataSnapshot.hasChild",1,e,!1);var t=new ie(e);return!this.node_.getChild(t).isEmpty()},e.prototype.getPriority=function(){return m.validateArgCount("DataSnapshot.getPriority",0,0,arguments.length),this.node_.getPriority().val()},e.prototype.forEach=function(t){var n=this;return m.validateArgCount("DataSnapshot.forEach",1,1,arguments.length),m.validateCallback("DataSnapshot.forEach",1,t,!1),!this.node_.isLeafNode()&&!!this.node_.forEachChild(this.index_,function(r,i){return t(new e(i,n.ref_.child(r),je))})},e.prototype.hasChildren=function(){return m.validateArgCount("DataSnapshot.hasChildren",0,0,arguments.length),!this.node_.isLeafNode()&&!this.node_.isEmpty()},Object.defineProperty(e.prototype,"key",{get:function(){return this.ref_.getKey()},enumerable:!0,configurable:!0}),e.prototype.numChildren=function(){return m.validateArgCount("DataSnapshot.numChildren",0,0,arguments.length),this.node_.numChildren()},e.prototype.getRef=function(){return m.validateArgCount("DataSnapshot.ref",0,0,arguments.length),this.ref_},Object.defineProperty(e.prototype,"ref",{get:function(){return this.getRef()},enumerable:!0,configurable:!0}),e}(),ot=function(){function e(e,t,n,r){this.eventType=e,this.eventRegistration=t,this.snapshot=n,this.prevName=r}return e.prototype.getPath=function(){var e=this.snapshot.getRef();return"value"===this.eventType?e.path:e.getParent().path},e.prototype.getEventType=function(){return this.eventType},e.prototype.getEventRunner=function(){return this.eventRegistration.getEventRunner(this)},e.prototype.toString=function(){return this.getPath().toString()+":"+this.eventType+":"+m.stringify(this.snapshot.exportVal())},e}(),at=function(){function e(e,t,n){this.eventRegistration=e,this.error=t,this.path=n}return e.prototype.getPath=function(){return this.path},e.prototype.getEventType=function(){return"cancel"},e.prototype.getEventRunner=function(){return this.eventRegistration.getEventRunner(this)},e.prototype.toString=function(){return this.path.toString()+":cancel"},e}(),st=function(){function e(e,t,n){this.callback_=e,this.cancelCallback_=t,this.context_=n}return e.prototype.respondsTo=function(e){return"value"===e},e.prototype.createEvent=function(e,t){var n=t.getQueryParams().getIndex();return new ot("value",this,new it(e.snapshotNode,t.getRef(),n))},e.prototype.getEventRunner=function(e){var t=this.context_;if("cancel"===e.getEventType()){m.assert(this.cancelCallback_,"Raising a cancel event on a listener with no cancel callback");var n=this.cancelCallback_;return function(){n.call(t,e.error)}}var r=this.callback_;return function(){r.call(t,e.snapshot)}},e.prototype.createCancelEvent=function(e,t){return this.cancelCallback_?new at(this,e,t):null},e.prototype.matches=function(t){return t instanceof e&&(!t.callback_||!this.callback_||t.callback_===this.callback_&&t.context_===this.context_)},e.prototype.hasAnyCallback=function(){return null!==this.callback_},e}(),ut=function(){function e(e,t,n){this.callbacks_=e,this.cancelCallback_=t,this.context_=n}return e.prototype.respondsTo=function(e){var t="children_added"===e?"child_added":e;return t="children_removed"===t?"child_removed":t,m.contains(this.callbacks_,t)},e.prototype.createCancelEvent=function(e,t){return this.cancelCallback_?new at(this,e,t):null},e.prototype.createEvent=function(e,t){m.assert(null!=e.childName,"Child events should have a childName.");var n=t.getRef().child(e.childName),r=t.getQueryParams().getIndex();return new ot(e.type,this,new it(e.snapshotNode,n,r),e.prevName)},e.prototype.getEventRunner=function(e){var t=this.context_;if("cancel"===e.getEventType()){m.assert(this.cancelCallback_,"Raising a cancel event on a listener with no cancel callback");var n=this.cancelCallback_;return function(){n.call(t,e.error)}}var r=this.callbacks_[e.eventType];return function(){r.call(t,e.snapshot,e.prevName)}},e.prototype.matches=function(t){if(t instanceof e){if(!this.callbacks_||!t.callbacks_)return!0;
1if(this.context_===t.context_){var n=m.getCount(t.callbacks_);if(n===m.getCount(this.callbacks_)){if(1===n){var r=m.getAnyKey(t.callbacks_),i=m.getAnyKey(this.callbacks_);return i===r&&(!t.callbacks_[r]||!this.callbacks_[i]||t.callbacks_[r]===this.callbacks_[i])}return m.every(this.callbacks_,function(e,n){return t.callbacks_[e]===n})}}}return!1},e.prototype.hasAnyCallback=function(){return null!==this.callbacks_},e}(),ct=function(){function e(e,t,n,r){this.repo=e,this.path=t,this.queryParams_=n,this.orderByCalled_=r}return Object.defineProperty(e,"__referenceConstructor",{get:function(){return m.assert(Ze,"Reference.ts has not been loaded"),Ze},set:function(e){Ze=e},enumerable:!0,configurable:!0}),e.validateQueryEndpoints_=function(e){var t=null,n=null;if(e.hasStart()&&(t=e.getIndexStartValue()),e.hasEnd()&&(n=e.getIndexEndValue()),e.getIndex()===De){var r="Query: When ordering by key, you may only pass one argument to startAt(), endAt(), or equalTo().",i="Query: When ordering by key, the argument passed to startAt(), endAt(),or equalTo() must be a string.";if(e.hasStart()){if(e.getIndexStartName()!=W)throw new Error(r);if("string"!==typeof t)throw new Error(i)}if(e.hasEnd()){if(e.getIndexEndName()!=V)throw new Error(r);if("string"!==typeof n)throw new Error(i)}}else if(e.getIndex()===je){if(null!=t&&!ye(t)||null!=n&&!ye(n))throw new Error("Query: When ordering by priority, the first argument passed to startAt(), endAt(), or equalTo() must be a valid priority value (null, a number, or a string).")}else if(m.assert(e.getIndex()instanceof rt||e.getIndex()===nt,"unknown index type."),null!=t&&"object"===typeof t||null!=n&&"object"===typeof n)throw new Error("Query: First argument passed to startAt(), endAt(), or equalTo() cannot be an object.")},e.validateLimit_=function(e){if(e.hasStart()&&e.hasEnd()&&e.hasLimit()&&!e.hasAnchoredLimit())throw new Error("Query: Can't combine startAt(), endAt(), and limit(). Use limitToFirst() or limitToLast() instead.")},e.prototype.validateNoPreviousOrderByCall_=function(e){if(!0===this.orderByCalled_)throw new Error(e+": You can't combine multiple orderBy calls.")},e.prototype.getQueryParams=function(){return this.queryParams_},e.prototype.getRef=function(){return m.validateArgCount("Query.ref",0,0,arguments.length),new e.__referenceConstructor(this.repo,this.path)},e.prototype.on=function(t,n,r,i){m.validateArgCount("Query.on",2,4,arguments.length),we("Query.on",1,t,!1),m.validateCallback("Query.on",2,n,!1);var o=e.getCancelAndContextArgs_("Query.on",r,i);if("value"===t)this.onValueEvent(n,o.cancel,o.context);else{var a={};a[t]=n,this.onChildEvent(a,o.cancel,o.context)}return n},e.prototype.onValueEvent=function(e,t,n){var r=new st(e,t||null,n||null);this.repo.addEventCallbackForQuery(this,r)},e.prototype.onChildEvent=function(e,t,n){var r=new ut(e,t,n);this.repo.addEventCallbackForQuery(this,r)},e.prototype.off=function(e,t,n){m.validateArgCount("Query.off",0,3,arguments.length),we("Query.off",1,e,!0),m.validateCallback("Query.off",2,t,!0),m.validateContextObject("Query.off",3,n,!0);var r=null,i=null;if("value"===e){r=new st(t||null,null,n||null)}else e&&(t&&(i={},i[e]=t),r=new ut(i,null,n||null));this.repo.removeEventCallbackForQuery(this,r)},e.prototype.once=function(t,n,r,i){var o=this;m.validateArgCount("Query.once",1,4,arguments.length),we("Query.once",1,t,!1),m.validateCallback("Query.once",2,n,!0);var a=e.getCancelAndContextArgs_("Query.once",r,i),s=!0,u=new m.Deferred;u.promise.catch(function(){});var c=function(e){s&&(s=!1,o.off(t,c),n&&n.bind(a.context)(e),u.resolve(e))};return this.on(t,c,function(e){o.off(t,c),a.cancel&&a.cancel.bind(a.context)(e),u.reject(e)}),u.promise},e.prototype.limitToFirst=function(t){if(m.validateArgCount("Query.limitToFirst",1,1,arguments.length),"number"!==typeof t||Math.floor(t)!==t||t<=0)throw new Error("Query.limitToFirst: First argument must be a positive integer.");if(this.queryParams_.hasLimit())throw new Error("Query.limitToFirst: Limit was already set (by another call to limit, limitToFirst, or limitToLast).");return new e(this.repo,this.path,this.queryParams_.limitToFirst(t),this.orderByCalled_)},e.prototype.limitToLast=function(t){if(m.validateArgCount("Query.limitToLast",1,1,arguments.length),"number"!==typeof t||Math.floor(t)!==t||t<=0)throw new Error("Query.limitToLast: First argument must be a positive integer.");if(this.queryParams_.hasLimit())throw new Error("Query.limitToLast: Limit was already set
1(by another call to limit, limitToFirst, or limitToLast).");return new e(this.repo,this.path,this.queryParams_.limitToLast(t),this.orderByCalled_)},e.prototype.orderByChild=function(t){if(m.validateArgCount("Query.orderByChild",1,1,arguments.length),"$key"===t)throw new Error('Query.orderByChild: "$key" is invalid. Use Query.orderByKey() instead.');if("$priority"===t)throw new Error('Query.orderByChild: "$priority" is invalid. Use Query.orderByPriority() instead.');if("$value"===t)throw new Error('Query.orderByChild: "$value" is invalid. Use Query.orderByValue() instead.');Ce("Query.orderByChild",1,t,!1),this.validateNoPreviousOrderByCall_("Query.orderByChild");var n=new ie(t);if(n.isEmpty())throw new Error("Query.orderByChild: cannot pass in empty path. Use Query.orderByValue() instead.");var r=new rt(n),i=this.queryParams_.orderBy(r);return e.validateQueryEndpoints_(i),new e(this.repo,this.path,i,!0)},e.prototype.orderByKey=function(){m.validateArgCount("Query.orderByKey",0,0,arguments.length),this.validateNoPreviousOrderByCall_("Query.orderByKey");var t=this.queryParams_.orderBy(De);return e.validateQueryEndpoints_(t),new e(this.repo,this.path,t,!0)},e.prototype.orderByPriority=function(){m.validateArgCount("Query.orderByPriority",0,0,arguments.length),this.validateNoPreviousOrderByCall_("Query.orderByPriority");var t=this.queryParams_.orderBy(je);return e.validateQueryEndpoints_(t),new e(this.repo,this.path,t,!0)},e.prototype.orderByValue=function(){m.validateArgCount("Query.orderByValue",0,0,arguments.length),this.validateNoPreviousOrderByCall_("Query.orderByValue");var t=this.queryParams_.orderBy(nt);return e.validateQueryEndpoints_(t),new e(this.repo,this.path,t,!0)},e.prototype.startAt=function(t,n){void 0===t&&(t=null),m.validateArgCount("Query.startAt",0,2,arguments.length),ve("Query.startAt",1,t,this.path,!0),Ee("Query.startAt",2,n,!0);var r=this.queryParams_.startAt(t,n);if(e.validateLimit_(r),e.validateQueryEndpoints_(r),this.queryParams_.hasStart())throw new Error("Query.startAt: Starting point was already set (by another call to startAt or equalTo).");return void 0===t&&(t=null,n=null),new e(this.repo,this.path,r,this.orderByCalled_)},e.prototype.endAt=function(t,n){void 0===t&&(t=null),m.validateArgCount("Query.endAt",0,2,arguments.length),ve("Query.endAt",1,t,this.path,!0),Ee("Query.endAt",2,n,!0);var r=this.queryParams_.endAt(t,n);if(e.validateLimit_(r),e.validateQueryEndpoints_(r),this.queryParams_.hasEnd())throw new Error("Query.endAt: Ending point was already set (by another call to endAt or equalTo).");return new e(this.repo,this.path,r,this.orderByCalled_)},e.prototype.equalTo=function(e,t){if(m.validateArgCount("Query.equalTo",1,2,arguments.length),ve("Query.equalTo",1,e,this.path,!1),Ee("Query.equalTo",2,t,!0),this.queryParams_.hasStart())throw new Error("Query.equalTo: Starting point was already set (by another call to startAt or equalTo).");if(this.queryParams_.hasEnd())throw new Error("Query.equalTo: Ending point was already set (by another call to endAt or equalTo).");return this.startAt(e,t).endAt(e,t)},e.prototype.toString=function(){return m.validateArgCount("Query.toString",0,0,arguments.length),this.repo.toString()+this.path.toUrlEncodedString()},e.prototype.toJSON=function(){return m.validateArgCount("Query.toJSON",0,1,arguments.length),this.toString()},e.prototype.queryObject=function(){return this.queryParams_.getQueryObject()},e.prototype.queryIdentifier=function(){var e=this.queryObject(),t=z(e);return"{}"===t?"default":t},e.prototype.isEqual=function(t){if(m.validateArgCount("Query.isEqual",1,1,arguments.length),!(t instanceof e)){throw new Error("Query.isEqual failed: First argument must be an instance of firebase.database.Query.")}var n=this.repo===t.repo,r=this.path.equals(t.path),i=this.queryIdentifier()===t.queryIdentifier();return n&&r&&i},e.getCancelAndContextArgs_=function(e,t,n){var r={cancel:null,context:null};if(t&&n)r.cancel=t,m.validateCallback(e,3,r.cancel,!0),r.context=n,m.validateContextObject(e,4,r.context,!0);else if(t)if("object"===typeof t&&null!==t)r.context=t;else{if("function"!==typeof t)throw new Error(m.errorPrefix(e,3,!0)+" must either be a cancel callback or a context object.");r.cancel=t}return r},Object.defineProperty(e.prototype,"ref",{get:function(){return this.getRef()},enumerable:!0,configurable:!0}),e}(),lt=function(){function e(){this.set={}}return e.prototype.add=function(e,t){this.set[e]=null===t||t},e.prototype.contains=function(e){return m.contains(this.set,e)},e.prototype.get=function(e){return this.contains(e)?this.set[e]:void 0},e.prototype.remove=function(e){delete this.set[e]},e.prototype.clear=function(){this.set={}},e.prototype.isEmpty=function(){return m.isEmpty(this.set)},e.prototype.count=function(){return m.getCount(this.set)},e.prototype.each=function(e){m.forEach(this.set,function(t,n){return e(t,n)})},e.prototype.keys=function(){var e=[];return m.forEach(this.set,function(t){e.push(t)}),e},e}(),ht=function(){function e(){this.value_=null,this.children_=null}return e.prototype.find=function(e){if(null!=this.value_)return this.value_.getChild(e);if(e.isEmpty()||null==this.children_)return null;var t=e.getFront();if(e=e.popFront(),this.children_.contains(t)){return this.children_.get(t).find(e)}return null},e.prototype.remember=function(t,n){if(t.isEmpty())this.value_=n,this.children_=null;else if(null!==this.value_)this.value_=this.value_.updateChild(t,n);else{null==this.children_&&(this.children_=new lt);var r=t.getFront();this.children_.contains(r)||this.children_.add(r,new e);var i=this.children_.get(r);t=t.popFront(),i.remember(t,n)}},e.prototype.forget=function(e){if(e.isEmpty())return this.value_=null,this.children_=null,!0;if(null!==this.value_){if(this.value_.isLeafNode())return!1;var t=this.value_;this.value_=null;var n=this;return t.forEachChild(je,function(e,t){n.remember(new ie(e),t)}),this.forget(e)}if(null!==this.children_){var r=e.getFront();if(e=e.popFront(),this.children_.contains(r)){this.children_.get(r).forget(e)&&this.children_.remove(r)}return!!this.children_.isEmpty()&&(this.children_=null,!0)}return!0},e.prototype.forEachTree=function(e,t){null!==this.value_?t(e,this.value_):this.forEachChild(function(n,r){var i=new ie(e.toString()+"/"+n);r.forEachTree(i,t)})},e.prototype.forEachChild=function(e){null!==this.children_&&this.children_.each(function(t,n){e(t,n)})},e}(),ft=function(e){return e=e||{},e.timestamp=e.timestamp||(new Date).getTime(),e},pt=function(e,t){return e&&"object"===typeof e?(m.assert(".sv"in e,"Unexpected leaf node or priority contents"),t[e[".sv"]]):e},dt=function(e,t){var n=new ht;return e.forEachTree(new ie(""),function(e,r){n.remember(e,yt(r,t))}),n},yt=function(e,t){var n,r=e.getPriority().val(),i=pt(r,t);if(e.isLeafNode()){var o=e,a=pt(o.getValue(),t);return a!==o.getValue()||i!==o.getPriority().val()?new Me(a,u(i)):e}var s=e;
1return n=s,i!==s.getPriority().val()&&(n=n.updatePriority(new Me(i))),s.forEachChild(je,function(e,r){var i=yt(r,t);i!==r&&(n=n.updateImmediateChild(e,i))}),n};!function(e){e[e.OVERWRITE=0]="OVERWRITE",e[e.MERGE=1]="MERGE",e[e.ACK_USER_WRITE=2]="ACK_USER_WRITE",e[e.LISTEN_COMPLETE=3]="LISTEN_COMPLETE"}(et||(et={}));var vt,mt,gt=function(){function e(e,t,n,r){this.fromUser=e,this.fromServer=t,this.queryId=n,this.tagged=r,m.assert(!r||t,"Tagged queries must be from server.")}return e.User=new e(!0,!1,null,!1),e.Server=new e(!1,!0,null,!1),e.forServerTaggedQuery=function(t){return new e(!1,!0,t,!0)},e}(),_t=function(){function e(e,t,n){this.path=e,this.affectedTree=t,this.revert=n,this.type=et.ACK_USER_WRITE,this.source=gt.User}return e.prototype.operationForChild=function(t){if(this.path.isEmpty()){if(null!=this.affectedTree.value)return m.assert(this.affectedTree.children.isEmpty(),"affectedTree should not have overlapping affected paths."),this;var n=this.affectedTree.subtree(new ie(t));return new e(ie.Empty,n,this.revert)}return m.assert(this.path.getFront()===t,"operationForChild called for unrelated child."),new e(this.path.popFront(),this.affectedTree,this.revert)},e}(),bt=function(){return vt||(vt=new He(q)),vt},wt=function(){function e(e,t){void 0===t&&(t=bt()),this.value=e,this.children=t}return e.fromObject=function(t){var n=e.Empty;return m.forEach(t,function(e,t){n=n.set(new ie(e),t)}),n},e.prototype.isEmpty=function(){return null===this.value&&this.children.isEmpty()},e.prototype.findRootMostMatchingPathAndValue=function(e,t){if(null!=this.value&&t(this.value))return{path:ie.Empty,value:this.value};if(e.isEmpty())return null;var n=e.getFront(),r=this.children.get(n);if(null!==r){var i=r.findRootMostMatchingPathAndValue(e.popFront(),t);if(null!=i){return{path:new ie(n).child(i.path),value:i.value}}return null}return null},e.prototype.findRootMostValueAndPath=function(e){return this.findRootMostMatchingPathAndValue(e,function(){return!0})},e.prototype.subtree=function(t){if(t.isEmpty())return this;var n=t.getFront(),r=this.children.get(n);return null!==r?r.subtree(t.popFront()):e.Empty},e.prototype.set=function(t,n){if(t.isEmpty())return new e(n,this.children);var r=t.getFront(),i=this.children.get(r)||e.Empty,o=i.set(t.popFront(),n),a=this.children.insert(r,o);return new e(this.value,a)},e.prototype.remove=function(t){if(t.isEmpty())return this.children.isEmpty()?e.Empty:new e(null,this.children);var n=t.getFront(),r=this.children.get(n);if(r){var i=r.remove(t.popFront()),o=void 0;return o=i.isEmpty()?this.children.remove(n):this.children.insert(n,i),null===this.value&&o.isEmpty()?e.Empty:new e(this.value,o)}return this},e.prototype.get=function(e){if(e.isEmpty())return this.value;var t=e.getFront(),n=this.children.get(t);return n?n.get(e.popFront()):null},e.prototype.setTree=function(t,n){if(t.isEmpty())return n;var r=t.getFront(),i=this.children.get(r)||e.Empty,o=i.setTree(t.popFront(),n),a=void 0;return a=o.isEmpty()?this.children.remove(r):this.children.insert(r,o),new e(this.value,a)},e.prototype.fold=function(e){return this.fold_(ie.Empty,e)},e.prototype.fold_=function(e,t){var n={};return this.children.inorderTraversal(function(r,i){n[r]=i.fold_(e.child(r),t)}),t(e,this.value,n)},e.prototype.findOnPath=function(e,t){return this.findOnPath_(e,ie.Empty,t)},e.prototype.findOnPath_=function(e,t,n){var r=!!this.value&&n(t,this.value);if(r)return r;if(e.isEmpty())return null;var i=e.getFront(),o=this.children.get(i);return o?o.findOnPath_(e.popFront(),t.child(i),n):null},e.prototype.foreachOnPath=function(e,t){return this.foreachOnPath_(e,ie.Empty,t)},e.prototype.foreachOnPath_=function(t,n,r){if(t.isEmpty())return this;this.value&&r(n,this.value);var i=t.getFront(),o=this.children.get(i);return o?o.foreachOnPath_(t.popFront(),n.child(i),r):e.Empty},e.prototype.foreach=function(e){this.foreach_(ie.Empty,e)},e.prototype.foreach_=function(e,t){this.children.inorderTraversal(function(n,r){r.foreach_(e.child(n),t)}),this.value&&t(e,this.value)},e.prototype.foreachChild=function(e){this.children.inorderTraversal(function(t,n){n.value&&e(t,n.value)})},e.Empty=new e(null),e}(),Et=function(){function e(e,t){this.source=e,this.path=t,this.type=et.LISTEN_COMPLETE}return e.prototype.operationForChild=function(t){return this.path.isEmpty()?new e(this.source,ie.Empty):new e(this.source,this.path.popFront())},e}(),Ct=function(){function e(e,t,n){this.source=e,this.path=t,this.snap=n,this.type=et.OVERWRITE}return e.prototype.operationForChild=function(t){return this.path.isEmpty()?new e(this.source,ie.Empty,this.snap.getImmediateChild(t)):new e(this.source,this.path.popFront(),this.snap)},e}(),Tt=function(){function e(e,t,n){this.source=e,this.path=t,this.children=n,this.type=et.MERGE}return e.prototype.operationForChild=function(t){if(this.path.isEmpty()){var n=this.children.subtree(new ie(t));return n.isEmpty()?null:n.value?new Ct(this.source,ie.Empty,n.value):new e(this.source,ie.Empty,n)}return m.assert(this.path.getFront()===t,"Can't get a merge for a child not on the path of the operation"),new e(this.source,this.path.popFront(),this.children)},e.prototype.toString=function(){return"Operation("+this.path+": "+this.source.toString()+" merge: "+this.children.toString()+")"},e}(),St=function(){function e(e,t,n){this.node_=e,this.fullyInitialized_=t,this.filtered_=n}return e.prototype.isFullyInitialized=function(){return this.fullyInitialized_},e.prototype.isFiltered=function(){return this.filtered_},e.prototype.isCompleteForPath=function(e){if(e.isEmpty())return this.isFullyInitialized()&&!this.filtered_;var t=e.getFront();return this.isCompleteForChild(t)},e.prototype.isCompleteForChild=function(e){return this.isFullyInitialized()&&!this.filtered_||this.node_.hasChild(e)},e.prototype.getNode=function(){return this.node_},e}(),It=function(){function e(e,t){this.eventCache_=e,this.serverCache_=t}return e.prototype.updateEventSnap=function(t,n,r){return new e(new St(t,n,r),this.serverCache_)},e.prototype.updateServerSnap=function(t,n,r){return new e(this.eventCache_,new St(t,n,r))},e.prototype.getEventCache=function(){return this.eventCache_},e.prototype.getCompleteEventSnap=function(){return this.eventCache_.isFullyInitialized()?this.eventCache_.getNode():null},e.prototype.getServerCache=function(){return this.serverCache_},e.prototype.getCompleteServerSnap=function(){return this.serverCache_.isFullyInitialized()?this.serverCache_.getNode():null},e.Empty=new e(new St(Ye.EMPTY_NODE,!1,!1),new St(Ye.EMPTY_NODE,!1,!1)),e}(),kt=function(){function e(e,t,n,r,i){this.type=e,this.snapshotNode=t,this.childName=n,this.oldSnap=r,this.prevName=i}return e.valueChange=function(t){return new e(e.VALUE,t)},e.childAddedChange=function(t,n){return new e(e.CHILD_ADDED,n,t)},e.childRemovedChange=function(t,n){return new e(e.CHILD_REMOVED,n,t)},e.childChangedChange=function(t,n,r){return new e(e.CHILD_CHANGED,n,t,r)},e.childMovedChange=function(t,n){return new e(e.CHILD_MOVED,n,t)},e.CHILD_ADDED="child_added",e.CHILD_REMOVED="child_removed",e.CHILD_CHANGED="child_changed",e.CHILD_MOVED="child_moved",e.VALUE="value",e}(),Ot=function(){function e(e){this.index_=e}return e.prototype.updateChild=function(e,t,n,r,i,o){m.assert(e.isIndexed(this.index_),"A node must be indexed if only a child is updated");var a=e.getImmediateChild(t);return a.getChild(r).equals(n.getChild(r))&&a.isEmpty()==n.isEmpty()?e:(null!=o&&(n.isEmpty()?e.hasChild(t)?o.trackChildChange(kt.childRemovedChange(t,a)):m.assert(e.isLeafNode(),"A child remove without an old child only makes sense on a leaf node"):a.isEmpty()?o.trackChildChange(kt.childAddedChange(t,n)):o.trackChildChange(kt.childChangedChange(t,n,a))),e.isLeafNode()&&n.isEmpty()?e:e.updateImmediateChild(t,n).withIndex(this.index_))},e.prototype.updateFullNode=function(e,t,n){return null!=n&&(e.isLeafNode()||e.forEachChild(je,function(e,r){t.hasChild(e)||n.trackChildChange(kt.childRemovedChange(e,r))}),t.isLeafNode()||t.forEachChild(je,function(t,r){if(e.hasChild(t)){var i=e.getImmediateChild(t);i.equals(r)||n.trackChildChange(kt.childChangedChange(t,r,i))}else n.trackChildChange(kt.childAddedChange(t,r))})),t.withIndex(this.index_)},e.prototype.updatePriority=function(e,t){return e.isEmpty()?Ye.EMPTY_NODE:e.updatePriority(t)},e.prototype.filtersNodes=function(){return!1},e.prototype.getIndexedFilter=function(){return this},e.prototype.getIndex=function(){return this.index_},e}(),Nt=function(){function e(){this.changeMap_={}}return e.prototype.trackChildChange=function(e){var t=e.type,n=e.childName;m.assert(t==kt.CHILD_ADDED||t==kt.CHILD_CHANGED||t==kt.CHILD_REMOVED,"Only child changes supported for tracking"),m.assert(".priority"!==n,"Only non-priority child changes can be tracked.");var r=m.safeGet(this.changeMap_,n);if(r){var i=r.type;if(t==kt.CHILD_ADDED&&i==kt.CHILD_REMOVED)this.changeMap_[n]=kt.childChangedChange(n,e.snapshotNode,r.snapshotNode);else if(t==kt.CHILD_REMOVED&&i==kt.CHILD_ADDED)delete this.changeMap_[n];else if(t==kt.CHILD_REMOVED&&i==kt.CHILD_CHANGED)this.changeMap_[n]=kt.childRemovedChange(n,r.oldSnap);else if(t==kt.CHILD_CHANGED&&i==kt.CHILD_ADDED)this.changeMap_[n]=kt.childAddedChange(n,e.snapshotNode);else{if(t!=kt.CHILD_CHANGED||i!=kt.CHILD_CHANGED)throw m.assertionError("Illegal combination of changes: "+e+" occurred after "+r);this.changeMap_[n]=kt.childChangedChange(n,e.snapshotNode,r.oldSnap)}}else this.changeMap_[n]=e},e.prototype.getChanges=function(){return m.getValues(this.changeMap_)},e}(),Pt=function(){function e(){}return e.prototype.getCompleteChild=function(e){return null},e.prototype.getChildAfterChild=function(e,t,n){return null},e}(),Rt=new Pt,At=function(){function e(e,t,n){void 0===n&&(n=null),this.writes_=e,this.viewCache_=t,this.optCompleteServerCache_=n}return e.prototype.getCompleteChild=function(e){var t=this.viewCache_.getEventCache();if(t.isCompleteForChild(e))return t.getNode().getImmediateChild(e);var n=null!=this.optCompleteServerCache_?new St(this.optCompleteServerCache_,!0,!1):this.viewCache_.getServerCache();return this.writes_.calcCompleteChild(e,n)},e.prototype.getChildAfterChild=function(e,t,n){var r=null!=this.optCompleteServerCache_?this.optCompleteServerCache_:this.viewCache_.getCompleteServerSnap(),i=this.writes_.calcIndexedSlice(r,t,1,n,e);return 0===i.length?null:i[0]},e}(),xt=function(){function e(e,t){this.viewCache=e,this.changes=t}return e}(),Dt=function(){function e(e){this.filter_=e}return e.prototype.assertIndexed=function(e){m.assert(e.getEventCache().getNode().isIndexed(this.filter_.getIndex()),"Event snap not indexed"),m.assert(e.getServerCache().getNode().isIndexed(this.filter_.getIndex()),"Server snap not indexed")},e.prototype.applyOperation=function(t,n,r,i){var o,a,s=new Nt;if(n.type===et.OVERWRITE){var u=n;u.source.fromUser?o=this.applyUserOverwrite_(t,u.path,u.snap,r,i,s):(m.assert(u.source.fromServer,"Unknown source."),a=u.source.tagged||t.getServerCache().isFiltered()&&!u.path.isEmpty(),o=this.applyServerOverwrite_(t,u.path,u.snap,r,i,a,s))}else if(n.type===et.MERGE){var c=n;c.source.fromUser?o=this.applyUserMerge_(t,c.path,c.children,r,i,s):(m.assert(c.source.fromServer,"Unknown source."),a=c.source.tagged||t.getServerCache().isFiltered(),o=this.applyServerMerge_(t,c.path,c.children,r,i,a,s))}else if(n.type===et.ACK_USER_WRITE){var l=n;o=l.revert?this.revertUserWrite_(t,l.path,r,i,s):this.ackUserWrite_(t,l.path,l.affectedTree,r,i,s)}else{if(n.type!==et.LISTEN_COMPLETE)throw m.assertionError("Unknown operation type: "+n.type);o=this.listenComplete_(t,n.path,r,s)}var h=s.getChanges();return e.maybeAddValueEvent_(t,o,h),new xt(o,h)},e.maybeAddValueEvent_=function(e,t,n){var r=t.getEventCache();if(r.isFullyInitialized()){var i=r.getNode().isLeafNode()||r.getNode().isEmpty(),o=e.getCompleteEventSnap();(n.length>
10||!e.getEventCache().isFullyInitialized()||i&&!r.getNode().equals(o)||!r.getNode().getPriority().equals(o.getPriority()))&&n.push(kt.valueChange(t.getCompleteEventSnap()))}},e.prototype.generateEventCacheAfterServerEvent_=function(e,t,n,r,i){var o=e.getEventCache();if(null!=n.shadowingWrite(t))return e;var a=void 0,s=void 0;if(t.isEmpty())if(m.assert(e.getServerCache().isFullyInitialized(),"If change path is empty, we must have complete server data"),e.getServerCache().isFiltered()){var u=e.getCompleteServerSnap(),c=u instanceof Ye?u:Ye.EMPTY_NODE,l=n.calcCompleteEventChildren(c);a=this.filter_.updateFullNode(e.getEventCache().getNode(),l,i)}else{var h=n.calcCompleteEventCache(e.getCompleteServerSnap());a=this.filter_.updateFullNode(e.getEventCache().getNode(),h,i)}else{var f=t.getFront();if(".priority"==f){m.assert(1==t.getLength(),"Can't have a priority with additional path components");var p=o.getNode();s=e.getServerCache().getNode();var d=n.calcEventCacheAfterServerOverwrite(t,p,s);a=null!=d?this.filter_.updatePriority(p,d):o.getNode()}else{var y=t.popFront(),v=void 0;if(o.isCompleteForChild(f)){s=e.getServerCache().getNode();var g=n.calcEventCacheAfterServerOverwrite(t,o.getNode(),s);v=null!=g?o.getNode().getImmediateChild(f).updateChild(y,g):o.getNode().getImmediateChild(f)}else v=n.calcCompleteChild(f,e.getServerCache());a=null!=v?this.filter_.updateChild(o.getNode(),f,v,y,r,i):o.getNode()}}return e.updateEventSnap(a,o.isFullyInitialized()||t.isEmpty(),this.filter_.filtersNodes())},e.prototype.applyServerOverwrite_=function(e,t,n,r,i,o,a){var s,u=e.getServerCache(),c=o?this.filter_:this.filter_.getIndexedFilter();if(t.isEmpty())s=c.updateFullNode(u.getNode(),n,null);else if(c.filtersNodes()&&!u.isFiltered()){var l=u.getNode().updateChild(t,n);s=c.updateFullNode(u.getNode(),l,null)}else{var h=t.getFront();if(!u.isCompleteForPath(t)&&t.getLength()>1)return e;var f=t.popFront(),p=u.getNode().getImmediateChild(h),d=p.updateChild(f,n);s=".priority"==h?c.updatePriority(u.getNode(),d):c.updateChild(u.getNode(),h,d,f,Rt,null)}var y=e.updateServerSnap(s,u.isFullyInitialized()||t.isEmpty(),c.filtersNodes()),v=new At(r,y,i);return this.generateEventCacheAfterServerEvent_(y,t,r,v,a)},e.prototype.applyUserOverwrite_=function(e,t,n,r,i,o){var a,s,u=e.getEventCache(),c=new At(r,e,i);if(t.isEmpty())s=this.filter_.updateFullNode(e.getEventCache().getNode(),n,o),a=e.updateEventSnap(s,!0,this.filter_.filtersNodes());else{var l=t.getFront();if(".priority"===l)s=this.filter_.updatePriority(e.getEventCache().getNode(),n),a=e.updateEventSnap(s,u.isFullyInitialized(),u.isFiltered());else{var h=t.popFront(),f=u.getNode().getImmediateChild(l),p=void 0;if(h.isEmpty())p=n;else{var d=c.getCompleteChild(l);p=null!=d?".priority"===h.getBack()&&d.getChild(h.parent()).isEmpty()?d:d.updateChild(h,n):Ye.EMPTY_NODE}if(f.equals(p))a=e;else{var y=this.filter_.updateChild(u.getNode(),l,p,h,c,o);a=e.updateEventSnap(y,u.isFullyInitialized(),this.filter_.filtersNodes())}}}return a},e.cacheHasChild_=function(e,t){return e.getEventCache().isCompleteForChild(t)},e.prototype.applyUserMerge_=function(t,n,r,i,o,a){var s=this,u=t;return r.foreach(function(r,c){var l=n.child(r);e.cacheHasChild_(t,l.getFront())&&(u=s.applyUserOverwrite_(u,l,c,i,o,a))}),r.foreach(function(r,c){var l=n.child(r);e.cacheHasChild_(t,l.getFront())||(u=s.applyUserOverwrite_(u,l,c,i,o,a))}),u},e.prototype.applyMerge_=function(e,t){return t.foreach(function(t,n){e=e.updateChild(t,n)}),e},e.prototype.applyServerMerge_=function(e,t,n,r,i,o,a){var s=this;if(e.getServerCache().getNode().isEmpty()&&!e.getServerCache().isFullyInitialized())return e;var u,c=e;u=t.isEmpty()?n:wt.Empty.setTree(t,n);var l=e.getServerCache().getNode();return u.children.inorderTraversal(function(t,n){if(l.hasChild(t)){var u=e.getServerCache().getNode().getImmediateChild(t),h=s.applyMerge_(u,n);c=s.applyServerOverwrite_(c,new ie(t),h,r,i,o,a)}}),u.children.inorderTraversal(function(t,n){var u=!e.getServerCache().isCompleteForChild(t)&&null==n.value;if(!l.hasChild(t)&&!u){var h=e.getServerCache().getNode().getImmediateChild(t),f=s.applyMerge_(h,n);c=s.applyServerOverwrite_(c,new ie(t),f,r,i,o,a)}}),c},e.prototype.ackUserWrite_=function(e,t,n,r,i,o){if(null!=r.shadowingWrite(t))return e;var a=e.getServerCache().isFiltered(),s=e.getServerCache();if(null!=n.value){if(t.isEmpty()&&s.isFullyInitialized()||s.isCompleteForPath(t))return this.applyServerOverwrite_(e,t,s.getNode().getChild(t),r,i,a,o);if(t.isEmpty()){var u=wt.Empty;
1return s.getNode().forEachChild(De,function(e,t){u=u.set(new ie(e),t)}),this.applyServerMerge_(e,t,u,r,i,a,o)}return e}var c=wt.Empty;return n.foreach(function(e,n){var r=t.child(e);s.isCompleteForPath(r)&&(c=c.set(e,s.getNode().getChild(r)))}),this.applyServerMerge_(e,t,c,r,i,a,o)},e.prototype.listenComplete_=function(e,t,n,r){var i=e.getServerCache(),o=e.updateServerSnap(i.getNode(),i.isFullyInitialized()||t.isEmpty(),i.isFiltered());return this.generateEventCacheAfterServerEvent_(o,t,n,Rt,r)},e.prototype.revertUserWrite_=function(e,t,n,r,i){var o;if(null!=n.shadowingWrite(t))return e;var a=new At(n,e,r),s=e.getEventCache().getNode(),u=void 0;if(t.isEmpty()||".priority"===t.getFront()){var c=void 0;if(e.getServerCache().isFullyInitialized())c=n.calcCompleteEventCache(e.getCompleteServerSnap());else{var l=e.getServerCache().getNode();m.assert(l instanceof Ye,"serverChildren would be complete if leaf node"),c=n.calcCompleteEventChildren(l)}c=c,u=this.filter_.updateFullNode(s,c,i)}else{var h=t.getFront(),f=n.calcCompleteChild(h,e.getServerCache());null==f&&e.getServerCache().isCompleteForChild(h)&&(f=s.getImmediateChild(h)),u=null!=f?this.filter_.updateChild(s,h,f,t.popFront(),a,i):e.getEventCache().getNode().hasChild(h)?this.filter_.updateChild(s,h,Ye.EMPTY_NODE,t.popFront(),a,i):s,u.isEmpty()&&e.getServerCache().isFullyInitialized()&&(o=n.calcCompleteEventCache(e.getCompleteServerSnap()),o.isLeafNode()&&(u=this.filter_.updateFullNode(u,o,i)))}return o=e.getServerCache().isFullyInitialized()||null!=n.shadowingWrite(ie.Empty),e.updateEventSnap(u,o,this.filter_.filtersNodes())},e}(),Lt=function(){function e(e){this.query_=e,this.index_=this.query_.getQueryParams().getIndex()}return e.prototype.generateEventsForChanges=function(e,t,n){var r=this,i=[],o=[];return e.forEach(function(e){e.type===kt.CHILD_CHANGED&&r.index_.indexedValueChanged(e.oldSnap,e.snapshotNode)&&o.push(kt.childMovedChange(e.childName,e.snapshotNode))}),this.generateEventsForType_(i,kt.CHILD_REMOVED,e,n,t),this.generateEventsForType_(i,kt.CHILD_ADDED,e,n,t),this.generateEventsForType_(i,kt.CHILD_MOVED,o,n,t),this.generateEventsForType_(i,kt.CHILD_CHANGED,e,n,t),this.generateEventsForType_(i,kt.VALUE,e,n,t),i},e.prototype.generateEventsForType_=function(e,t,n,r,i){var o=this,a=n.filter(function(e){return e.type===t});a.sort(this.compareChanges_.bind(this)),a.forEach(function(t){var n=o.materializeSingleChange_(t,i);r.forEach(function(r){r.respondsTo(t.type)&&e.push(r.createEvent(n,o.query_))})})},e.prototype.materializeSingleChange_=function(e,t){return"value"===e.type||"child_removed"===e.type?e:(e.prevName=t.getPredecessorChildName(e.childName,e.snapshotNode,this.index_),e)},e.prototype.compareChanges_=function(e,t){if(null==e.childName||null==t.childName)throw m.assertionError("Should only compare child_ events.");var n=new Re(e.childName,e.snapshotNode),r=new Re(t.childName,t.snapshotNode);return this.index_.compare(n,r)},e}(),Ut=function(){function e(e,t){this.query_=e,this.eventRegistrations_=[];var n=this.query_.getQueryParams(),r=new Ot(n.getIndex()),i=n.getNodeFilter();this.processor_=new Dt(i);var o=t.getServerCache(),a=t.getEventCache(),s=r.updateFullNode(Ye.EMPTY_NODE,o.getNode(),null),u=i.updateFullNode(Ye.EMPTY_NODE,a.getNode(),null),c=new St(s,o.isFullyInitialized(),r.filtersNodes()),l=new St(u,a.isFullyInitialized(),i.filtersNodes());this.viewCache_=new It(l,c),this.eventGenerator_=new Lt(this.query_)}return e.prototype.getQuery=function(){return this.query_},e.prototype.getServerCache=function(){return this.viewCache_.getServerCache().getNode()},e.prototype.getCompleteServerCache=function(e){var t=this.viewCache_.getCompleteServerSnap();return t&&(this.query_.getQueryParams().loadsAllData()||!e.isEmpty()&&!t.getImmediateChild(e.getFront()).isEmpty())?t.getChild(e):null},e.prototype.isEmpty=function(){return 0===this.eventRegistrations_.length},e.prototype.addEventRegistration=function(e){this.eventRegistrations_.push(e)},e.prototype.removeEventRegistration=function(e,t){var n=[];if(t){m.assert(null==e,"A cancel should cancel all event registrations.");var r=this.query_.path;this.eventRegistrations_.forEach(function(e){t=t;var i=e.createCancelEvent(t,r);i&&n.push(i)})}if(e){for(var i=[],o=0;o<this.eventRegistrations_.length;++o){var a=this.eventRegistrations_[o];if(a.matches(e)){if(e.hasAnyCallback()){i=i.concat(this.eventRegistrations_.slice(o+1));break}}else i.push(a)}this.eventRegistrations_=i}else this.eventRegistrations_=[];return n},e.prototype.applyOperation=function(e,t,n){e.type===et.MERGE&&null!==e.source.queryId&&(m.assert(this.viewCache_.getCompleteServerSnap(),"We should always have a full c
1ache before handling merges"),m.assert(this.viewCache_.getCompleteEventSnap(),"Missing event cache, even though we have a server cache"));var r=this.viewCache_,i=this.processor_.applyOperation(r,e,t,n);return this.processor_.assertIndexed(i.viewCache),m.assert(i.viewCache.getServerCache().isFullyInitialized()||!r.getServerCache().isFullyInitialized(),"Once a server snap is complete, it should never go back"),this.viewCache_=i.viewCache,this.generateEventsForChanges_(i.changes,i.viewCache.getEventCache().getNode(),null)},e.prototype.getInitialEvents=function(e){var t=this.viewCache_.getEventCache(),n=[];if(!t.getNode().isLeafNode()){t.getNode().forEachChild(je,function(e,t){n.push(kt.childAddedChange(e,t))})}return t.isFullyInitialized()&&n.push(kt.valueChange(t.getNode())),this.generateEventsForChanges_(n,t.getNode(),e)},e.prototype.generateEventsForChanges_=function(e,t,n){var r=n?[n]:this.eventRegistrations_;return this.eventGenerator_.generateEventsForChanges(e,t,r)},e}(),Mt=function(){function e(){this.views_={}}return Object.defineProperty(e,"__referenceConstructor",{get:function(){return m.assert(mt,"Reference.ts has not been loaded"),mt},set:function(e){m.assert(!mt,"__referenceConstructor has already been defined"),mt=e},enumerable:!0,configurable:!0}),e.prototype.isEmpty=function(){return m.isEmpty(this.views_)},e.prototype.applyOperation=function(e,t,n){var r=e.source.queryId;if(null!==r){var i=m.safeGet(this.views_,r);return m.assert(null!=i,"SyncTree gave us an op for an invalid query."),i.applyOperation(e,t,n)}var o=[];return m.forEach(this.views_,function(r,i){o=o.concat(i.applyOperation(e,t,n))}),o},e.prototype.addEventRegistration=function(e,t,n,r,i){var o=e.queryIdentifier(),a=m.safeGet(this.views_,o);if(!a){var s=n.calcCompleteEventCache(i?r:null),u=!1;s?u=!0:r instanceof Ye?(s=n.calcCompleteEventChildren(r),u=!1):(s=Ye.EMPTY_NODE,u=!1);var c=new It(new St(s,u,!1),new St(r,i,!1));a=new Ut(e,c),this.views_[o]=a}return a.addEventRegistration(t),a.getInitialEvents(t)},e.prototype.removeEventRegistration=function(t,n,r){var i=t.queryIdentifier(),o=[],a=[],s=this.hasCompleteView();if("default"===i){var u=this;m.forEach(this.views_,function(e,t){a=a.concat(t.removeEventRegistration(n,r)),t.isEmpty()&&(delete u.views_[e],t.getQuery().getQueryParams().loadsAllData()||o.push(t.getQuery()))})}else{var c=m.safeGet(this.views_,i);c&&(a=a.concat(c.removeEventRegistration(n,r)),c.isEmpty()&&(delete this.views_[i],c.getQuery().getQueryParams().loadsAllData()||o.push(c.getQuery())))}return s&&!this.hasCompleteView()&&o.push(new e.__referenceConstructor(t.repo,t.path)),{removed:o,events:a}},e.prototype.getQueryViews=function(){var e=this;return Object.keys(this.views_).map(function(t){return e.views_[t]}).filter(function(e){return!e.getQuery().getQueryParams().loadsAllData()})},e.prototype.getCompleteServerCache=function(e){var t=null;return m.forEach(this.views_,function(n,r){t=t||r.getCompleteServerCache(e)}),t},e.prototype.viewForQuery=function(e){if(e.getQueryParams().loadsAllData())return this.getCompleteView();var t=e.queryIdentifier();return m.safeGet(this.views_,t)},e.prototype.viewExistsForQuery=function(e){return null!=this.viewForQuery(e)},e.prototype.hasCompleteView=function(){return null!=this.getCompleteView()},e.prototype.getCompleteView=function(){return m.findValue(this.views_,function(e){return e.getQuery().getQueryParams().loadsAllData()})||null},e}(),Ft=function(){function e(e){this.writeTree_=e}return e.prototype.addWrite=function(t,n){if(t.isEmpty())return new e(new wt(n));var r=this.writeTree_.findRootMostValueAndPath(t);if(null!=r){var i=r.path,o=r.value,a=ie.relativePath(i,t);return o=o.updateChild(a,n),new e(this.writeTree_.set(i,o))}var s=new wt(n);return new e(this.writeTree_.setTree(t,s))},e.prototype.addWrites=function(e,t){var n=this;return m.forEach(t,function(t,r){n=n.addWrite(e.child(t),r)}),n},e.prototype.removeWrite=function(t){return t.isEmpty()?e.Empty:new e(this.writeTree_.setTree(t,wt.Empty))},e.prototype.hasCompleteWrite=function(e){return null!=this.getCompleteNode(e)},e.prototype.getCompleteNode=function(e){var t=this.writeTree_.findRootMostValueAndPath(e);return null!=t?this.writeTree_.get(t.path).getChild(ie.relativePath(t.path,e)):null},e.prototype.getCompleteChildren=function(){var e=[],t=this.writeTree_.value;return null!=t?t.isLeafNode()||t.forEachChild(je,function(t,n){e.push(new Re(t,n))}):this.writeTree_.children.inorderTraversal(function(t,n){null!=n.value&&e.push(new Re(t,n.value))}),e},e.prototype.childCompoundWrite=function(t){if(t.isEmpty())return this;var n=this.getCompleteNode(t);return new e(null!=n?new wt(n):this.writeTree_.subtree(t))},e.prototype.isEmpty=function(){return this.writeTree_.isEmpty()},e.prototype.apply=function(t){return e.applySubtreeWrite_(ie.Empty,this.writeTree_,t)},e.Empty=new e(new wt(null)),e.applySubtreeWrite_=function(t,n,r){if(null!=n.value)return r.updateChild(t,n.value);var i=null;return n.children.inorderTraversal(function(n,o){".priority"===n?(m.assert(null!==o.value,"Priority writes must al
1ways be leaf nodes"),i=o.value):r=e.applySubtreeWrite_(t.child(n),o,r)}),r.getChild(t).isEmpty()||null===i||(r=r.updateChild(t.child(".priority"),i)),r},e}(),jt=function(){function e(){this.visibleWrites_=Ft.Empty,this.allWrites_=[],this.lastWriteId_=-1}return e.prototype.childWrites=function(e){return new Bt(e,this)},e.prototype.addOverwrite=function(e,t,n,r){m.assert(n>this.lastWriteId_,"Stacking an older write on top of newer ones"),void 0===r&&(r=!0),this.allWrites_.push({path:e,snap:t,writeId:n,visible:r}),r&&(this.visibleWrites_=this.visibleWrites_.addWrite(e,t)),this.lastWriteId_=n},e.prototype.addMerge=function(e,t,n){m.assert(n>this.lastWriteId_,"Stacking an older merge on top of newer ones"),this.allWrites_.push({path:e,children:t,writeId:n,visible:!0}),this.visibleWrites_=this.visibleWrites_.addWrites(e,t),this.lastWriteId_=n},e.prototype.getWrite=function(e){for(var t=0;t<this.allWrites_.length;t++){var n=this.allWrites_[t];if(n.writeId===e)return n}return null},e.prototype.removeWrite=function(e){var t=this,n=this.allWrites_.findIndex(function(t){return t.writeId===e});m.assert(n>=0,"removeWrite called with nonexistent writeId.");var r=this.allWrites_[n];this.allWrites_.splice(n,1);for(var i=r.visible,o=!1,a=this.allWrites_.length-1;i&&a>=0;){var s=this.allWrites_[a];s.visible&&(a>=n&&this.recordContainsPath_(s,r.path)?i=!1:r.path.contains(s.path)&&(o=!0)),a--}if(i){if(o)return this.resetTree_(),!0;if(r.snap)this.visibleWrites_=this.visibleWrites_.removeWrite(r.path);else{var u=r.children;m.forEach(u,function(e){t.visibleWrites_=t.visibleWrites_.removeWrite(r.path.child(e))})}return!0}return!1},e.prototype.getCompleteWriteData=function(e){return this.visibleWrites_.getCompleteNode(e)},e.prototype.calcCompleteEventCache=function(t,n,r,i){if(r||i){var o=this.visibleWrites_.childCompoundWrite(t);if(!i&&o.isEmpty())return n;if(i||null!=n||o.hasCompleteWrite(ie.Empty)){var a=function(e){return(e.visible||i)&&(!r||!~r.indexOf(e.writeId))&&(e.path.contains(t)||t.contains(e.path))},s=e.layerTree_(this.allWrites_,a,t),u=n||Ye.EMPTY_NODE;return s.apply(u)}return null}var c=this.visibleWrites_.getCompleteNode(t);if(null!=c)return c;var l=this.visibleWrites_.childCompoundWrite(t);if(l.isEmpty())return n;if(null!=n||l.hasCompleteWrite(ie.Empty)){var u=n||Ye.EMPTY_NODE;return l.apply(u)}return null},e.prototype.calcCompleteEventChildren=function(e,t){var n=Ye.EMPTY_NODE,r=this.visibleWrites_.getCompleteNode(e);if(r)return r.isLeafNode()||r.forEachChild(je,function(e,t){n=n.updateImmediateChild(e,t)}),n;if(t){var i=this.visibleWrites_.childCompoundWrite(e);return t.forEachChild(je,function(e,t){var r=i.childCompoundWrite(new ie(e)).apply(t);n=n.updateImmediateChild(e,r)}
1),i.getCompleteChildren().forEach(function(e){n=n.updateImmediateChild(e.name,e.node)}),n}return this.visibleWrites_.childCompoundWrite(e).getCompleteChildren().forEach(function(e){n=n.updateImmediateChild(e.name,e.node)}),n},e.prototype.calcEventCacheAfterServerOverwrite=function(e,t,n,r){m.assert(n||r,"Either existingEventSnap or existingServerSnap must exist");var i=e.child(t);if(this.visibleWrites_.hasCompleteWrite(i))return null;var o=this.visibleWrites_.childCompoundWrite(i);return o.isEmpty()?r.getChild(t):o.apply(r.getChild(t))},e.prototype.calcCompleteChild=function(e,t,n){var r=e.child(t),i=this.visibleWrites_.getCompleteNode(r);if(null!=i)return i;if(n.isCompleteForChild(t)){return this.visibleWrites_.childCompoundWrite(r).apply(n.getNode().getImmediateChild(t))}return null},e.prototype.shadowingWrite=function(e){return this.visibleWrites_.getCompleteNode(e)},e.prototype.calcIndexedSlice=function(e,t,n,r,i,o){var a,s=this.visibleWrites_.childCompoundWrite(e),u=s.getCompleteNode(ie.Empty);if(null!=u)a=u;else{if(null==t)return[];a=s.apply(t)}if(a=a.withIndex(o),a.isEmpty()||a.isLeafNode())return[];for(var c=[],l=o.getCompare(),h=i?a.getReverseIteratorFrom(n,o):a.getIteratorFrom(n,o),f=h.getNext();f&&c.length<r;)0!==l(f,n)&&c.push(f),f=h.getNext();return c},e.prototype.recordContainsPath_=function(e,t){return e.snap?e.path.contains(t):!!m.findKey(e.children,function(n,r){return e.path.child(r).contains(t)})},e.prototype.resetTree_=function(){this.visibleWrites_=e.layerTree_(this.allWrites_,e.DefaultFilter_,ie.Empty),this.allWrites_.length>0?this.lastWriteId_=this.allWrites_[this.allWrites_.length-1].writeId:this.lastWriteId_=-1},e.DefaultFilter_=function(e){return e.visible},e.layerTree_=function(e,t,n){for(var r=Ft.Empty,i=0;i<e.length;++i){var o=e[i];if(t(o)){var a=o.path,s=void 0;if(o.snap)n.contains(a)?(s=ie.relativePath(n,a),r=r.addWrite(s,o.snap)):a.contains(n)&&(s=ie.relativePath(a,n),r=r.addWrite(ie.Empty,o.snap.getChild(s)));else{if(!o.children)throw m.assertionError("WriteRecord should have .snap or .children");if(n.contains(a))s=ie.relativePath(n,a),r=r.addWrites(s,o.children);else if(a.contains(n))if(s=ie.relativePath(a,n),s.isEmpty())r=r.addWrites(ie.Empty,o.children);else{var u=m.safeGet(o.children,s.getFront());if(u){var c=u.getChild(s.popFront());r=r.addWrite(ie.Empty,c)}}}}}return r},e}(),Bt=function(){function e(e,t){this.treePath_=e,this.writeTree_=t}return e.prototype.calcCompleteEventCache=function(e,t,n){return this.writeTree_.calcCompleteEventCache(this.treePath_,e,t,n)},e.prototype.calcCompleteEventChildren=function(e){return this.writeTree_.calcCompleteEventChildren(this.treePath_,e)},e.prototype.calcEventCacheAfterServerOverwrite=function(e,t,n){return this.writeTree_.calcEventCacheAfterServerOverwrite(this.treePath_,e,t,n)},e.prototype.shadowingWrite=function(e){return this.writeTree_.shadowingWrite(this.treePath_.child(e))},e.prototype.calcIndexedSlice=function(e,t,n,r,i){return this.writeTree_.calcIndexedSlice(this.treePath_,e,t,n,r,i)},e.prototype.calcCompleteChild=function(e,t){return this.writeTree_.calcCompleteChild(this.treePath_,e,t)},e.prototype.child=function(t){return new e(this.treePath_.child(t),this.writeTree_)},e}(),Wt=function(){function e(e){this.listenProvider_=e,this.syncPointTree_=wt.Empty,this.pendingWriteTree_=new jt,this.tagToQueryMap_={},this.queryToTagMap_={}}return e.prototype.applyUserOverwrite=function(e,t,n,r){return this.pendingWriteTree_.addOverwrite(e,t,n,r),r?this.applyOperationToSyncPoints_(new Ct(gt.User,e,t)):[]},e.prototype.applyUserMerge=function(e,t,n){this.pendingWriteTree_.addMerge(e,t,n);var r=wt.fromObject(t);return this.applyOperationToSyncPoints_(new Tt(gt.User,e,r))},e.prototype.ackUserWrite=function(e,t){void 0===t&&(t=!1);var n=this.pendingWriteTree_.getWrite(e);if(this.pendingWriteTree_.removeWrite(e)){var r=wt.Empty;return null!=n.snap?r=r.set(ie.Empty,!0):m.forEach(n.children,function(e,t){r=r.set(new ie(e),t)}),this.applyOperationToSyncPoints_(new _t(n.path,r,t))}return[]},e.prototype.applyServerOverwrite=function(e,t){return this.applyOperationToSyncPoints_(new Ct(gt.Server,e,t))},e.prototype.applyServerMerge=function(e,t){var n=wt.fromObject(t);return this.applyOperationToSyncPoints_(new Tt(gt.Server,e,n))},e.prototype.applyListenComplete=function(e){return this.applyOperationToSyncPoints_(new Et(gt.Server,e))},e.prototype.applyTaggedQueryOverwrite=function(t,n,r){var i=this.queryKeyForTag_(r);if(null!=i){var o=e.parseQueryKey_(i),a=o.path,s=o.queryId,u=ie.relativePath(a,t),c=new Ct(gt.forServerTaggedQuery(s),u,n);return this.applyTaggedOperation_(a,c)}return[]},e.prototype.applyTaggedQueryMerge=function(t,n,r){var i=this.queryKeyForTag_(r);if(i){var o=e.parseQueryKey_(i),a=o.path,s=o.queryId,u=ie.relativePath(a,t),c=wt.fromObject(n),l=new Tt(gt.forServerTaggedQuery(s),u,c);return this.applyTaggedOperation_(a,l)}return[]},e.prototype.applyTaggedListenComplete=function(t,n){var r=this.queryKeyForTag_(n);if(r){var i=e.parseQueryKey_(r),o=i.path,a=i.queryId,s=ie.relativePath(o,t),u=new Et(gt.forServerTaggedQuery(a),s);return this.applyTaggedOperation_(o,u)}return[]},e.prototype.addEventRegistration=function(t,n){var r=t.path,i=null,o=!1;this.syncPointTree_.foreachOnPath(r,function(e,t){var n=ie.relativePath(e,r);i=i||t.getCompleteServerCache(n),o=o||t.hasCompleteView()});var a=this.syncPointTree_.get(r);a?(o=o||a.hasCompleteView(),i=i||a.getCompleteServerCache(ie.Empty)):(a=new Mt,this.syncPointTree_=this.syncPointTree_.set(r,a));var s;if(null!=i)s=!0;else{s=!1,i=Ye.EMPTY_NODE;this.syncPointTree_.subtree(r).foreachChild(function(e,t){var n=t.getCompleteServerCache(ie.Empty);n&&(i=i.updateImmediateChild(e,n))})}var u=a.viewExistsForQuery(t);if(!u&&!t.getQueryParams().loadsAllData()){var c=e.makeQueryKey_(t);m.assert(!(c in this.queryToTagMap_),"View does not exist, but we have a tag");var l=e.getNextQueryTag_();this.queryToTagMap_[c]=l,this.tagToQueryMap_["_"+l]=c}var h=this.pendingWriteTree_.childWrites(r),f=a.addEventRegistration(t,n,h,i,s);if(!u&&!o){var p=a.viewForQuery(t);f=f.concat(this.setupListener_(t,p))}return f},e.prototype.removeEventRegistration=function(t,n,r){var i=this,o=t.path,a=this.syncPointTree_.get(o),s=[];
1if(a&&("default"===t.queryIdentifier()||a.viewExistsForQuery(t))){var u=a.removeEventRegistration(t,n,r);a.isEmpty()&&(this.syncPointTree_=this.syncPointTree_.remove(o));var c=u.removed;s=u.events;var l=-1!==c.findIndex(function(e){return e.getQueryParams().loadsAllData()}),h=this.syncPointTree_.findOnPath(o,function(e,t){return t.hasCompleteView()});if(l&&!h){var f=this.syncPointTree_.subtree(o);if(!f.isEmpty())for(var p=this.collectDistinctViewsForSubTree_(f),d=0;d<p.length;++d){var y=p[d],v=y.getQuery(),m=this.createListenerForView_(y);this.listenProvider_.startListening(e.queryForListening_(v),this.tagForQuery_(v),m.hashFn,m.onComplete)}}if(!h&&c.length>0&&!r)if(l){this.listenProvider_.stopListening(e.queryForListening_(t),null)}else c.forEach(function(t){var n=i.queryToTagMap_[e.makeQueryKey_(t)];i.listenProvider_.stopListening(e.queryForListening_(t),n)});this.removeTags_(c)}return s},e.prototype.calcCompleteEventCache=function(e,t){var n=this.pendingWriteTree_,r=this.syncPointTree_.findOnPath(e,function(t,n){var r=ie.relativePath(t,e),i=n.getCompleteServerCache(r);if(i)return i});return n.calcCompleteEventCache(e,r,t,!0)},e.prototype.collectDistinctViewsForSubTree_=function(e){return e.fold(function(e,t,n){if(t&&t.hasCompleteView()){return[t.getCompleteView()]}var r=[];return t&&(r=t.getQueryViews()),m.forEach(n,function(e,t){r=r.concat(t)}),r})},e.prototype.removeTags_=function(t){for(var n=0;n<t.length;++n){var r=t[n];if(!r.getQueryParams().loadsAllData()){var i=e.makeQueryKey_(r),o=this.queryToTagMap_[i];delete this.queryToTagMap_[i],delete this.tagToQueryMap_["_"+o]}}},e.queryForListening_=function(e){return e.getQueryParams().loadsAllData()&&
1!e.getQueryParams().isDefault()?e.getRef():e},e.prototype.setupListener_=function(t,n){var r=t.path,i=this.tagForQuery_(t),o=this.createListenerForView_(n),a=this.listenProvider_.startListening(e.queryForListening_(t),i,o.hashFn,o.onComplete),s=this.syncPointTree_.subtree(r);if(i)m.assert(!s.value.hasCompleteView(),"If we're adding a query, it shouldn't be shadowed");else for(var u=s.fold(function(e,t,n){if(!e.isEmpty()&&t&&t.hasCompleteView())return[t.getCompleteView().getQuery()];var r=[];return t&&(r=r.concat(t.getQueryViews().map(function(e){return e.getQuery()}))),m.forEach(n,function(e,t){r=r.concat(t)}),r}),c=0;c<u.length;++c){var l=u[c];this.listenProvider_.stopListening(e.queryForListening_(l),this.tagForQuery_(l))}return a},e.prototype.createListenerForView_=function(e){var t=this,n=e.getQuery(),r=this.tagForQuery_(n);return{hashFn:function(){return(e.getServerCache()||Ye.EMPTY_NODE).hash()},onComplete:function(e){if("ok"===e)return r?t.applyTaggedListenComplete(n.path,r):t.applyListenComplete(n.path);var i=J(e,n);return t.removeEventRegistration(n,null,i)}}},e.makeQueryKey_=function(e){return e.path.toString()+"$"+e.queryIdentifier()},e.parseQueryKey_=function(e){var t=e.indexOf("$");return m.assert(-1!==t&&t<e.length-1,"Bad queryKey."),{queryId:e.substr(t+1),path:new ie(e.substr(0,t))}},e.prototype.queryKeyForTag_=function(e){return this.tagToQueryMap_["_"+e]},e.prototype.tagForQuery_=function(t){var n=e.makeQueryKey_(t);return m.safeGet(this.queryToTagMap_,n)},e.getNextQueryTag_=function(){return e.nextQueryTag_++},e.prototype.applyTaggedOperation_=function(e,t){var n=this.syncPointTree_.get(e);m.assert(n,"Missing sync point for query tag that we're tracking");var r=this.pendingWriteTree_.childWrites(e);return n.applyOperation(t,r,null)},e.prototype.applyOperationToSyncPoints_=function(e){return this.applyOperationHelper_(e,this.syncPointTree_,null,this.pendingWriteTree_.childWrites(ie.Empty))},e.prototype.applyOperationHelper_=function(e,t,n,r){if(e.path.isEmpty())return this.applyOperationDescendantsHelper_(e,t,n,r);var i=t.get(ie.Empty);null==n&&null!=i&&(n=i.getCompleteServerCache(ie.Empty));var o=[],a=e.path.getFront(),s=e.operationForChild(a),u=t.children.get(a);if(u&&s){var c=n?n.getImmediateChild(a):null,l=r.child(a);o=o.concat(this.applyOperationHelper_(s,u,c,l))}return i&&(o=o.concat(i.applyOperation(e,r,n))),o},e.prototype.applyOperationDescendantsHelper_=function(e,t,n,r){var i=this,o=t.get(ie.Empty);null==n&&null!=o&&(n=o.getCompleteServerCache(ie.Empty));var a=[];return t.children.inorderTraversal(function(t,o){var s=n?n.getImmediateChild(t):null,u=r.child(t),c=e.operationForChild(t);c&&(a=a.concat(i.applyOperationDescendantsHelper_(c,o,s,u)))}),o&&(a=a.concat(o.applyOperation(e,r,n))),a},e.nextQueryTag_=1,e}(),Vt=function(){function e(){this.rootNode_=Ye.EMPTY_NODE}return e.prototype.getNode=function(e){return this.rootNode_.getChild(e)},e.prototype.updateSnapshot=function(e,t){this.rootNode_=this.rootNode_.updateChild(e,t)},e}(),Ht=function(){function e(e){this.app_=e}return e.prototype.getToken=function(e){return this.app_.INTERNAL.getToken(e).then(null,function(e){return e&&"auth/token-not-initialized"===e.code?(x("Got auth/token-not-initialized error. Treating as null token."),null):Promise.reject(e)})},e.prototype.addTokenChangeListener=function(e){this.app_.INTERNAL.addAuthTokenListener(e)},e.prototype.removeTokenChangeListener=function(e){this.app_.INTERNAL.removeAuthTokenListener(e)},e.prototype.notifyForInvalidToken=function(){var e='Provided authentication credentials for the app named "'+this.app_.name+'" are invalid. This usually indicates your app was not initialized correctly. ';"credential"in this.app_.options?e+='Make sure the "credential" property provided to initializeApp() is authorized to access the specified "databaseURL" and is from the correct project.':"serviceAccount"in this.app_.options?e+='Make sure the "serviceAccount" property provided to initializeApp() is authorized to access the specified "databaseURL" and is from the correct project.':e+='Make sure the "apiKey" and "databaseURL" properties provided to initializeApp() match the values provided for your app at https://console.firebase.google.com/.',M(e)},e}(),qt=function(){function e(){this.counters_={}}return e.prototype.incrementCounter=function(e,t){void 0===t&&(t=1),m.contains(this.counters_,e)||(this.counters_[e]=0),this.counters_[e]+=t},e.prototype.get=function(){return m.deepCopy(this.counters_)},e}(),Kt=function(){function e(){}return e.getCollection=function(e){var t=e.toString();return this.collections_[t]||(this.collections_[t]=new qt),this.collections_[t]},e.getOrCreateReporter=function(e,t){var n=e.toString();return this.reporters_[n]||(this.reporters_[n]=t()),this.reporters_[n]},e.collections_={},e.reporters_={},e}(),zt=function(){function e(e){this.collection_=e,this.last_=null}return e.prototype.get=function(){var e=this.collection_.get(),t=m.clone(e);return this.last_&&m.forEach(this.last_,function(e,n){t[e]=t[e]-n}),this.last_=e,t},e}(),Gt=1e4,Qt=3e4,Yt=function(){function e(e,t){this.server_=t,this.statsToReport_={},this.statsListener_=new zt(e);var n=Gt+(Qt-Gt)*Math.random();re(this.reportStats_.bind(this),Math.floor(n))}return e.prototype.includeStat=function(e){this.statsToReport_[e]=!0},e.prototype.reportStats_=function(){var e=this,t=this.statsListener_.get(),n={},r=!1;m.forEach(t,function(t,i){i>0&&m.contains(e.statsToReport_,t)&&(n[t]=i,r=!0)}),r&&this.server_.reportStats(n),re(this.reportStats_.bind(this),Math.floor(2*Math.random()*3e5))},e}(),Xt=function(){function e(){this.eventLists_=[],this.recursionDepth_=0}return e.prototype.queueEvents=function(e){for(var t=null,n=0;n<e.length;n++){var r=e[n],i=r.getPath();null===t||i.equals(t.getPath())||(this.eventLists_.push(t),t=null),null===t&&(t=new $t(i)),t.add(r)}t&&this.eventLists_.push(t)},e.prototype.raiseEventsAtPath=function(e,t){this.queueEvents(t),this.raiseQueuedEventsMatchingPredicate_(function(t){return t.equals(e)})},e.prototype.raiseEventsForChangedPath=function(e,t){this.queueEvents(t),this.raiseQueuedEventsMatchingPredicate_(function(t){return t.contains(e)||e.contains(t)})},e.prototype.raiseQueuedEventsMatchingPredicate_=function(e){this.recursionDepth_++;for(var t=!0,n=0;n<this.eventLists_.length;n++){var r=this.eventLists_[n];if(r){e(r.getPath())?(this.eventLists_[n].raise(),this.eventLists_[n]=null):t=!1}}t&&(this.eventLists_=[]),this.recursionDepth_--},e}(),$t=function(){function e(e){this.path_=e,this.events_=[]}
1return e.prototype.add=function(e){this.events_.push(e)},e.prototype.raise=function(){for(var e=0;e<this.events_.length;e++){var t=this.events_[e];if(null!==t){this.events_[e]=null;var n=t.getEventRunner();P&&x("event: "+t.toString()),te(n)}}},e.prototype.getPath=function(){return this.path_},e}(),Jt=function(){function e(e){this.allowedEvents_=e,this.listeners_={},m.assert(Array.isArray(e)&&e.length>0,"Requires a non-empty array")}return e.prototype.trigger=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(Array.isArray(this.listeners_[e]))for(var r=this.listeners_[e].slice(),i=0;i<r.length;i++)r[i].callback.apply(r[i].context,t)},e.prototype.on=function(e,t,n){this.validateEventType_(e),this.listeners_[e]=this.listeners_[e]||[],this.listeners_[e].push({callback:t,context:n});var r=this.getInitialEvent(e);r&&t.apply(n,r)},e.prototype.off=function(e,t,n){this.validateEventType_(e);for(var r=this.listeners_[e]||[],i=0;i<r.length;i++)if(r[i].callback===t&&(!n||n===r[i].context))return void r.splice(i,1)},e.prototype.validateEventType_=function(e){m.assert(this.allowedEvents_.find(function(t){return t===e}),"Unknown event: "+e)},e}(),Zt=function(e){function t(){var t,n,r=e.call(this,["visible"])||this;return"undefined"!==typeof document&&"undefined"!==typeof document.addEventListener&&("undefined"!==typeof document.hidden?(n="visibilitychange",t="hidden"):"undefined"!==typeof document.mozHidden?(n="mozvisibilitychange",t="mozHidden"):"undefined"!==typeof document.msHidden?(n="msvisibilitychange",t="msHidden"):"undefined"!==typeof document.webkitHidden&&(n="webkitvisibilitychange",t="webkitHidden")),r.visible_=!0,n&&document.addEventListener(n,function(){var e=!document[t];e!==r.visible_&&(r.visible_=e,r.trigger("visible",e))},!1),r}return _.__extends(t,e),t.getInstance=function(){return new t},t.prototype.getInitialEvent=function(e){return m.assert("visible"===e,"Unknown event type: "+e),[this.visible_]},t}(Jt),en=function(e){function t(){var t=e.call(this,["online"])||this;return t.online_=!0,"undefined"===typeof window||"undefined"===typeof window.addEventListener||m.isMobileCordova()||(window.addEventListener("online",function(){t.online_||(t.online_=!0,t.trigger("online",!0))},!1),window.addEventListener("offline",function(){t.online_&&(t.online_=!1,t.trigger("online",!1))},!1)),t}return _.__extends(t,e),t.getInstance=function(){return new t},t.prototype.getInitialEvent=function(e){return m.assert("online"===e,"Unknown event type: "+e),[this.online_]},t.prototype.currentlyOnline=function(){return this.online_},t}(Jt),tn=function(){function e(e){this.onMessage_=e,this.pendingResponses=[],this.currentResponseNum=0,this.closeAfterResponse=-1,this.onClose=null}return e.prototype.closeAfter=function(e,t){this.closeAfterResponse=e,this.onClose=t,this.closeAfterResponse<this.currentResponseNum&&(this.onClose(),this.onClose=null)},e.prototype.handleResponse=function(e,t){var n=this;this.pendingResponses[e]=t;for(var r=this;this.pendingResponses[this.currentResponseNum];){if("break"===function(){var e=r.pendingResponses[r.currentResponseNum];delete r.pendingResponses[r.currentResponseNum];for(var t=0;t<e.length;++t)!function(t){e[t]&&te(function(){n.onMessage_(e[t])})}(t);if(r.currentResponseNum===r.closeAfterResponse)return r.onClose&&(r.onClose(),r.onClose=null),"break";r.currentResponseNum++}())break}},e}(),nn="pLPCommand",rn="pRTLPCB",on=function(){function e(e,t,n,r){this.connId=e,this.repoInfo=t,this.transportSessionId=n,this.lastSessionId=r,this.bytesSent=0,this.bytesReceived=0,this.everConnected_=!1,this.log_=D(e),this.stats_=Kt.getCollection(t),this.urlFn=function(e){return t.connectionURL(ae,e)}}return e.prototype.open=function(e,t){var n=this;this.curSegmentNum=0,this.onDisconnect_=t,this.myPacketOrderer=new tn(e),this.isClosed_=!1,this.connectTimeoutTimer_=setTimeout(function(){n.log_("Timed out trying to connect."),n.onClosed_(),n.connectTimeoutTimer_=null},Math.floor(3e4)),B(function(){if(!n.isClosed_){n.scriptTagHolder=new an(function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e[0],i=e[1],o=e[2];if(n.incrementIncomingBytes_(e),n.scriptTagHolder)if(n.connectTimeoutTimer_&&(clearTimeout(n.connectTimeoutTimer_),n.connectTimeoutTimer_=null),n.everConnected_=!0,"start"==r)n.id=i,n.password=o;else{if("close"!==r)throw new Error("Unrecognized command received: "+r);i?(n.scriptTagHolder.sendNewPolls=!1,n.myPacketOrderer.closeAfter(i,function(){n.onClosed_()})):n.onClosed_()}},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e[0],i=e[1];n.incrementIncomingBytes_(e),n.myPacketOrderer.handleResponse(r,i)},function(){n.onClosed_()},n.urlFn);var e={};e.start="t",e.ser=Math.floor(1e8*Math.random()),n.scriptTagHolder.uniqueCallbackIdentifier&&(e.cb=n.scriptTagHolder.uniqueCallbackIdentifier),e.v="5",n.transportSessionId&&(e.s=n.transportSessionId),n.lastSessionId&&(e.ls=n.lastSessionId),!m.isNodeSdk()&&"undefined"!==typeof location&&location.href&&-1!==location.href.indexOf("firebaseio.com")&&(e.r="f");var t=n.urlFn(e);n.log_("Connecting via long-poll to "+t),n.scriptTagHolder.addTag(t,function(){})}})},e.prototype.start=function(){this.scriptTagHolder.startLongPoll(this.id,this.password),this.addDisconnectPingFrame(this.id,this.password)},e.forceAllow=function(){e.forceAllow_=!0},e.forceDisallow=function(){e.forceDisallow_=!0},e.isAvailable=function(){return e.forceAllow_||!e.forceDisallow_&&"undefined"!==typeof document&&null!=document.createElement&&!X()&&!$()&&!m.isNodeSdk()},e.prototype.markConnectionHealthy=function(){},e.prototype.shutdown_=function(){this.isClosed_=!0,this.scriptTagHolder&&(this.scriptTagHolder.close(),this.scriptTagHolder=null),this.myDisconnFrame&&(document.body.removeChild(this.myDisconnFrame),this.myDisconnFrame=null),this.connectTimeoutTimer_&&(clearTimeout(this.connectTimeoutTimer_),this.connectTimeoutTimer_=null)},e.prototype.onClosed_=function(){this.isClosed_||(this.log_("Longpoll is closing itself"),this.shutdown_(),this.onDisconnect_&&(this.onDisconnect_(this.everConnected_),this.onDisconnect_=null))},e.prototype.close=function(){this.isClosed_||(this.log_("Longpoll is being closed."),this.shutdown_())},e.prototype.send=function(e){var t=m.stringify(e);this.bytesSent+=t.length,this.stats_.incrementCounter("bytes_sent",t.length);for(var n=m.base64Encode(t),r=G(n,1840),i=0;i<r.length;i++)this.scriptTagHolder.enqueueSegment(this.curSegmentNum,r.length,r[i]),this.curSegmentNum++},e.prototype.addDisconnectPingFrame=function(e,t){if(!m.isNodeSdk()){this.myDisconnFrame=document.createElement("iframe");var n={};n.dframe="t",n.id=e,n.pw=t,this.myDisconnFrame.src=this.urlFn(n),this.myDisconnFrame.style.display="none",document.body.appendChild(this.myDisconnFrame)}},e.prototype.incrementIncomingBytes_=function(e){var t=m.stringify(e).length;this.bytesReceived+=t,this.stats_.incrementCounter("bytes_received",t)},e}(),an=function(){function e(t,n,r,i){if(this.onDisconnect=r,this.urlFn=i,this.outstandingRequests=new lt,this.pendingSegs=[],this.currentSerial=Math.floor(1e8*Math.random()),this.sendNewPolls=!0,m.isNodeSdk())this.commandCB=t,this.onMessageCB=n;else{this.uniqueCallbackIdentifier=k(),window[nn+this.uniqueCallbackIdentifier]=t,window[rn+this.uniqueCallbackIdentifier]=n,this.myIFrame=e.createI
1Frame_();var o="";if(this.myIFrame.src&&"javascript:"===this.myIFrame.src.substr(0,"javascript:".length)){o='<script>document.domain="'+document.domain+'";<\/script>'}var a="<html><body>"+o+"</body></html>";try{this.myIFrame.doc.open(),this.myIFrame.doc.write(a),this.myIFrame.doc.close()}catch(e){x("frame writing exception"),e.stack&&x(e.stack),x(e)}}}return e.createIFrame_=function(){var e=document.createElement("iframe");if(e.style.display="none",!document.body)throw"Document body has not initialized. Wait to initialize Firebase until after the document is ready.";document.body.appendChild(e);try{e.contentWindow.document||x("No IE domain setting required")}catch(n){var t=document.domain;e.src="javascript:void((function(){document.open();document.domain='"+t+"';document.close();})())"}return e.contentDocument?e.doc=e.contentDocument:e.contentWindow?e.doc=e.contentWindow.document:e.document&&(e.doc=e.document),e},e.prototype.close=function(){var t=this;if(this.alive=!1,this.myIFrame&&(this.myIFrame.doc.body.innerHTML="",setTimeout(function(){null!==t.myIFrame&&(document.body.removeChild(t.myIFrame),t.myIFrame=null)},Math.floor(0))),m.isNodeSdk()&&this.myID){var n={};n.disconn="t",n.id=this.myID,n.pw=this.myPW;var r=this.urlFn(n);e.nodeRestRequest(r)}var i=this.onDisconnect;i&&(this.onDisconnect=null,i())},e.prototype.startLongPoll=function(e,t){for(this.myID=e,this.myPW=t,this.alive=!0;this.newRequest_(););},e.prototype.newRequest_=function(){if(this.alive&&this.sendNewPolls&&this.outstandingRequests.count()<(this.pendingSegs.length>0?2:1)){this.currentSerial++;var e={};e.id=this.myID,e.pw=this.myPW,e.ser=this.currentSerial;for(var t=this.urlFn(e),n="",r=0;this.pendingSegs.length>0;){if(!(this.pendingSegs[0].d.length+30+n.length<=1870))break;var i=this.pendingSegs.shift();n=n+"&seg"+r+"="+i.seg+"&ts"+r+"="+i.ts+"&d"+r+"="+i.d,r++}return t+=n,this.addLongPollTag_(t,this.currentSerial),!0}return!1},e.prototype.enqueueSegment=function(e,t,n){this.pendingSegs.push({seg:e,ts:t,d:n}),this.alive&&this.newRequest_()},e.prototype.addLongPollTag_=function(e,t){var n=this;this.outstandingRequests.add(t,1);var r=function(){n.outstandingRequests.remove(t),n.newRequest_()},i=setTimeout(r,Math.floor(25e3)),o=function(){clearTimeout(i),r()};this.addTag(e,o)},e.prototype.addTag=function(e,t){var n=this;m.isNodeSdk()?this.doNodeLongPoll(e,t):setTimeout(function(){try{if(!n.sendNewPolls)return;var r=n.myIFrame.doc.createElement("script");r.type="text/javascript",r.async=!0,r.src=e,r.onload=r.onreadystatechange=function(){var e=r.readyState;e&&"loaded"!==e&&"complete"!==e||(r.onload=r.onreadystatechange=null,r.parentNode&&r.parentNode.removeChild(r),t())},r.onerror=function(){x("Long-poll script failed to load: "+e),n.sendNewPolls=!1,n.close()},n.myIFrame.doc.body.appendChild(r)}catch(e){}},Math.floor(1))},e}(),sn=null;"undefined"!==typeof MozWebSocket?sn=MozWebSocket:"undefined"!==typeof WebSocket&&(sn=WebSocket);var un=function(){function e(t,n,r,i){this.connId=t,this.keepaliveTimer=null,this.frames=null,this.totalFrames=0,this.bytesSent=0,this.bytesReceived=0,this.log_=D(this.connId),this.stats_=Kt.getCollection(n),this.connURL=e.connectionURL_(n,r,i)}return e.connectionURL_=function(e,t,n){var r={};return r.v="5",!m.isNodeSdk()&&"undefined"!==typeof location&&location.href&&-1!==location.href.indexOf("firebaseio.com")&&(r.r="f"),t&&(r.s=t),n&&(r.ls=n),e.connectionURL("websocket",r)},e.prototype.open=function(e,t){var n=this;this.onDisconnect=t,this.onMessage=e,this.log_("Websocket connecting to "+this.connURL),this.everConnected_=!1,T.set("previous_websocket_failure",!0);try{if(m.isNodeSdk()){var i=m.CONSTANTS.NODE_ADMIN?"AdminNode":"Node",o={headers:{"User-Agent":"Firebase/5/"+b.SDK_VERSION+"/"+r.platform+"/"+i}},a=Object({NODE_ENV:"production",PUBLIC_URL:""}),s=0==this.connURL.indexOf("wss://")?a.HTTPS_PROXY||a.https_proxy:a.HTTP_PROXY||a.http_proxy;s&&(o.proxy={origin:s}),this.mySock=new sn(this.connURL,[],o)}else this.mySock=new sn(this.connURL)}catch(e){this.log_("Error instantiating WebSocket.");var u=e.message||e.data;return u&&this.log_(u),void this.onClosed_()}this.mySock.onopen=function(){n.log_("Websocket connected."),n.everConnected_=!0}
1,this.mySock.onclose=function(){n.log_("Websocket connection was disconnected."),n.mySock=null,n.onClosed_()},this.mySock.onmessage=function(e){n.handleIncomingFrame(e)},this.mySock.onerror=function(e){n.log_("WebSocket error. Closing connection.");var t=e.message||e.data;t&&n.log_(t),n.onClosed_()}},e.prototype.start=function(){},e.forceDisallow=function(){e.forceDisallow_=!0},e.isAvailable=function(){var t=!1;if("undefined"!==typeof navigator&&navigator.userAgent){var n=/Android ([0-9]{0,}\.[0-9]{0,})/,r=navigator.userAgent.match(n);r&&r.length>1&&parseFloat(r[1])<4.4&&(t=!0)}return!t&&null!==sn&&!e.forceDisallow_},e.previouslyFailed=function(){return T.isInMemoryStorage||!0===T.get("previous_websocket_failure")},e.prototype.markConnectionHealthy=function(){T.remove("previous_websocket_failure")},e.prototype.appendFrame_=function(e){if(this.frames.push(e),this.frames.length==this.totalFrames){var t=this.frames.join("");this.frames=null;var n=m.jsonEval(t);this.onMessage(n)}},e.prototype.handleNewFrameCount_=function(e){this.totalFrames=e,this.frames=[]},e.prototype.extractFrameCount_=function(e){if(m.assert(null===this.frames,"We already have a frame buffer"),e.length<=6){var t=Number(e);if(!isNaN(t))return this.handleNewFrameCount_(t),null}return this.handleNewFrameCount_(1),e},e.prototype.handleIncomingFrame=function(e){if(null!==this.mySock){var t=e.data;if(this.bytesReceived+=t.length,this.stats_.incrementCounter("bytes_received",t.length),this.resetKeepAlive(),null!==this.frames)this.appendFrame_(t);else{var n=this.extractFrameCount_(t);null!==n&&this.appendFrame_(n)}}},e.prototype.send=function(e){this.resetKeepAlive();var t=m.stringify(e);this.bytesSent+=t.length,this.stats_.incrementCounter("bytes_sent",t.length);var n=G(t,16384);n.length>1&&this.sendString_(String(n.length));for(var r=0;r<n.length;r++)this.sendString_(n[r])},e.prototype.shutdown_=function(){this.isClosed_=!0,this.keepaliveTimer&&(clearInterval(this.keepaliveTimer),this.keepaliveTimer=null),this.mySock&&(this.mySock.close(),this.mySock=null)},e.prototype.onClosed_=function(){this.isClosed_||(this.log_("WebSocket is closing itself"),this.shutdown_(),this.onDisconnect&&(this.onDisconnect(this.everConnected_),this.onDisconnect=null))},e.prototype.close=function(){this.isClosed_||(this.log_("WebSocket is being closed"),this.shutdown_())},e.prototype.resetKeepAlive=function(){var e=this;clearInterval(this.keepaliveTimer),this.keepaliveTimer=setInterval(function(){e.mySock&&e.sendString_("0"),e.resetKeepAlive()},Math.floor(45e3))},e.prototype.sendString_=function(e){try{this.mySock.send(e)}catch(e){this.log_("Exception thrown from WebSocket.send():",e.message||e.data,"Closing connection."),setTimeout(this.onClosed_.bind(this),0)}},e.responsesRequiredToBeHealthy=2,e.healthyTimeout=3e4,e}(),cn=function(){function e(e){this.initTransports_(e)}return Object.defineProperty(e,"ALL_TRANSPORTS",{get:function(){return[on,un]},enumerable:!0,configurable:!0}),e.prototype.initTransports_=function(t){var n=un&&un.isAvailable(),r=n&&!un.previouslyFailed();if(t.webSocketOnly&&(n||M("wss:// URL used, but browser isn't known to support websockets. Trying anyway."),r=!0),r)this.transports_=[un];else{var i=this.transports_=[];Q(e.ALL_TRANSPORTS,function(e,t){t&&t.isAvailable()&&i.push(t)})}},e.prototype.initialTransport=function(){if(this.transports_.length>0)return this.transports_[0];throw new Error("No transports available")},e.prototype.upgradeTransport=function(){return this.transports_.length>1?this.transports_[1]:null},e}(),ln=function(){function e(e,t,n,r,i,o,a){this.id=e,this.repoInfo_=t,this.onMessage_=n,this.onReady_=r,this.onDisconnect_=i,this.onKill_=o,this.lastSessionId=a,this.connectionCount=0,this.pendingDataMessages=[],this.state_=0,this.log_=D("c:"+this.id+":"),this.transportManager_=new cn(t),this.log_("Connection created"),this.start_()}return e.prototype.start_=function(){var e=this,t=this.transportManager_.initialTransport();this.conn_=new t(this.nextTransportId_(),this.repoInfo_,void 0,this.lastSessionId),this.primaryResponsesRequired_=t.responsesRequiredToBeHealthy||0;var n=this.connReceiver_(this.conn_),r=this.disconnReceiver_(this.conn_);this.tx_=this.conn_,this.rx_=this.conn_,this.secondaryConn_=null,this.isHealthy_=!1,setTimeout(function(){e.conn_&&e.conn_.open(n,r)},Math.floor(0));var i=t.healthyTimeout||0;i>0&&(this.healthyTimeout_=re(function(){e.healthyTimeout_=null,e.isHealthy_||(e.conn_&&e.conn_.bytesReceived>
1102400?(e.log_("Connection exceeded healthy timeout but has received "+e.conn_.bytesReceived+" bytes. Marking connection healthy."),e.isHealthy_=!0,e.conn_.markConnectionHealthy()):e.conn_&&e.conn_.bytesSent>10240?e.log_("Connection exceeded healthy timeout but has sent "+e.conn_.bytesSent+" bytes. Leaving connection alive."):(e.log_("Closing unhealthy connection after timeout."),e.close()))},Math.floor(i)))},e.prototype.nextTransportId_=function(){return"c:"+this.id+":"+this.connectionCount++},e.prototype.disconnReceiver_=function(e){var t=this;return function(n){e===t.conn_?t.onConnectionLost_(n):e===t.secondaryConn_?(t.log_("Secondary connection lost."),t.onSecondaryConnectionLost_()):t.log_("closing an old connection")}},e.prototype.connReceiver_=function(e){var t=this;return function(n){2!=t.state_&&(e===t.rx_?t.onPrimaryMessageReceived_(n):e===t.secondaryConn_?t.onSecondaryMessageReceived_(n):t.log_("message on old connection"))}},e.prototype.sendRequest=function(e){var t={t:"d",d:e};this.sendData_(t)},e.prototype.tryCleanupConnection=function(){this.tx_===this.secondaryConn_&&this.rx_===this.secondaryConn_&&(this.log_("cleaning up and promoting a connection: "+this.secondaryConn_.connId),this.conn_=this.secondaryConn_,this.secondaryConn_=null)},e.prototype.onSecondaryControl_=function(e){if("t"in e){var t=e.t;"a"===t?this.upgradeIfSecondaryHealthy_():"r"===t?(this.log_("Got a reset on secondary, closing it"),this.secondaryConn_.close(),this.tx_!==this.secondaryConn_&&this.rx_!==this.secondaryConn_||this.close()):"o"===t&&(this.log_("got pong on secondary."),this.secondaryResponsesRequired_--,this.upgradeIfSecondaryHealthy_())}},e.prototype.onSecondaryMessageReceived_=function(e){var t=K("t",e),n=K("d",e);if("c"==t)this.onSecondaryControl_(n);else{if("d"!=t)throw new Error("Unknown protocol layer: "+t);this.pendingDataMessages.push(n)}},e.prototype.upgradeIfSecondaryHealthy_=function(){this.secondaryResponsesRequired_<=0?(this.log_("Secondary connection is healthy."),this.isHealthy_=!0,this.secondaryConn_.markConnectionHealthy(),this.proceedWithUpgrade_()):(this.log_("sending ping on secondary."),this.secondaryConn_.send({t:"c",d:{t:"p",d:{}}}))},e.prototype.proceedWithUpgrade_=function(){this.secondaryConn_.start(),this.log_("sending client ack on secondary"),this.secondaryConn_.send({t:"c",d:{t:"a",d:{}}}),this.log_("Ending transmission on primary"),this.conn_.send({t:"c",d:{t:"n",d:{}}}),this.tx_=this.secondaryConn_,this.tryCleanupConnection()},e.prototype.onPrimaryMessageReceived_=function(e){var t=K("t",e),n=K("d",e);"c"==t?this.onControl_(n):"d"==t&&this.onDataMessage_(n)},e.prototype.onDataMessage_=function(e){this.onPrimaryResponse_(),this.onMessage_(e)},e.prototype.onPrimaryResponse_=function(){this.isHealthy_||--this.primaryResponsesRequired_<=0&&(this.log_("Primary connection is healthy."),this.isHealthy_=!0,this.conn_.markConnectionHealthy())},e.prototype.onControl_=function(e){var t=K("t",e);if("d"in e){var n=e.d;if("h"===t)this.onHandshake_(n);else if("n"===t){this.log_("recvd end transmission on primary"),this.rx_=this.secondaryConn_;for(var r=0;r<this.pendingDataMessages.length;++r)this.onDataMessage_(this.pendingDataMessages[r]);this.pendingDataMessages=[],this.tryCleanupConnection()}else"s"===t?this.onConnectionShutdown_(n):"r"===t?this.onReset_(n):"e"===t?L("Server Error: "+n):"o"===t?(this.log_("got pong on primary."),this.onPrimaryResponse_(),this.sendPingOnPrimaryIfNecessary_()):L("Unknown control packet command: "+t)}},e.prototype.onHandshake_=function(e){var t=e.ts,n=e.v,r=e.h;this.sessionId=e.s,this.repoInfo_.updateHost(r),0==this.state_&&(this.conn_.start(),this.onConnectionEstablished_(this.conn_,t),"5"!==n&&M("Protocol version mismatch detected"),this.tryStartUpgrade_())},e.prototype.tryStartUpgrade_=function(){var e=this.transportManager_.upgradeTransport();e&&this.startUpgrade_(e)},e.prototype.startUpgrade_=function(e){var t=this;this.secondaryConn_=new e(this.nextTransportId_(),this.repoInfo_,this.sessionId),this.secondaryResponsesRequired_=e.responsesRequiredToBeHealthy||0;var n=this.connReceiver_(this.secondaryConn_),r=this.disconnReceiver_(this.secondaryConn_);this.secondaryConn_.open(n,r),re(function(){t.secondaryConn_&&(t.log_("Timed out trying to upgrade."),t.secondaryConn_.close())},Math.floor(6e4))},e.prototype.onReset_=function(e){this.log_("Reset packet received. New host: "+e),this.repoInfo_.updateHost(e),1===this.state_?this.close():(this.closeConnections_(),this.start_())},e.prototype.onConnectionEstablished_=function(e,t){var n=this;this.log_("Realtime connection established."),this.conn_=e,this.state_=1,this.onReady_&&(this.onReady_(t,this.sessionId),this.onReady_=null),0===this.primaryResponsesRequired_?(this.log_("Primary connection is healthy."),this.isHealthy_=!0):re(function(){n.sendPingOnPrimaryIfNecessary_()},Math.floor(5e3))},e.prototype.sendPingOnPrimaryIfNecessary_=function(){this.isHealthy_||1!==this.state_||(this.log_("sending ping on primary."),this.sendData_({t:"c",d:{t:"p",d:{}}}))},e.prototype.onSecondaryConnectionLost_=function(){var e=this.secondaryConn_;this.secondaryConn_=null,this.tx_!==e&&this.rx_!==e||this.close()},e.prototype.onConnectionLost_=function(e){this.conn_=null,e||0!==this.state_?1===this.state_&&this.log_("Realtime connection lost."):(this.log_("Realtime connection failed."),this.repoInfo_.isCacheableHost()&&(T.remove("host:"+this.repoInfo_.host),this.repoInfo_.internalHost=this.repoInfo_.host)),this.close()},e.prototype.onConnectionShutdown_=function(e){this.log_("Connection shutdown command received. Shutting down..."),this.onKill_&&(this.onKill_(e),this.onKill_=null),this.onDisconnect_=null,this.close()},e.prototype.sendData_=function(e){if(1!==this.state_)throw"Connection is not connected";this.tx_.send(e)},e.prototype.close=function(){2!==this.state_&&(this.log_("Closing realtime connection."),this.state_=2,this.closeConnections_(),this.onDisconnect_&&(this.onDisconnect_(),this.onDisconnect_=null))},e.prototype.closeConnections_=function(){this.log_("Shutting down all connections"),this.conn_&&(this.conn_.close(),this.conn_=null),this.secondaryConn_&&(this.secondaryConn_.close(),this.secondaryConn_=null),this.healthyTimeout_&&(clearTimeout(this.healthyTimeout_),this.healthyTimeout_=null)},e}(),hn=function(){function e(){}return e.prototype.put=function(e,t,n,r){},e.prototype.merge=function(e,t,n,r){},e.prototype.refreshAuthToken=function(e){},e.prototype.onDisconnectPut=function(e,t,n){},e.prototype.onDisconnectMerge=function(e,t,n){},e.prototype.onDisconnectCancel=function(e,t){},e.prototype.reportStats=function(e){},e}(),fn=1e3,pn=3e5,dn=function(e){function t(n,r,i,o,a,s){var u=e.call(this)||this;if(u.repoInfo_=n,u.onDataUpdate_=r,u.onConnectStatus_=i,u.onServerInfoUpdate_=o,u.authTokenProvider_=a,u.authOverride_=s,u.id=t.nextPersistentConnectionId_++,u.log_=D("p:"+u.id+":"),u.interruptReasons_={},u.listens_={},u.outstandingPuts_=[],u.outstandingPutCount_=0,u.onDisconnectRequestQueue_=[],u.connected_=!1,u.reconnectDelay_=fn,u.maxReconnectDelay_=pn,u.securityDebugCallback_=null,u.lastSessionId=null,u.establishConnectionTimer_=null,u.visible_=!1,u.requestCBHash_={},u.requestNumber_=0,u.realtime_=null,u.authToken_=null,u.forceTokenRefresh_=!1,u.invali
1dAuthTokenCount_=0,u.firstConnection_=!0,u.lastConnectionAttemptTime_=null,u.lastConnectionEstablishedTime_=null,s&&!m.isNodeSdk())throw new Error("Auth override specified in options, but not supported on non Node.js platforms");return u.scheduleConnect_(0),Zt.getInstance().on("visible",u.onVisible_,u),-1===n.host.indexOf("fblocal")&&en.getInstance().on("online",u.onOnline_,u),u}return _.__extends(t,e),t.prototype.sendRequest=function(e,t,n){var r=++this.requestNumber_,i={r:r,a:e,b:t};this.log_(m.stringify(i)),m.assert(this.connected_,"sendRequest call when we're not connected not allowed."),this.realtime_.sendRequest(i),n&&(this.requestCBHash_[r]=n)},t.prototype.listen=function(e,t,n,r){var i=e.queryIdentifier(),o=e.path.toString();this.log_("Listen called for "+o+" "+i),this.listens_[o]=this.listens_[o]||{},m.assert(e.getQueryParams().isDefault()||!e.getQueryParams().loadsAllData(),"listen() called for non-default but complete query"),m.assert(!this.listens_[o][i],"listen() called twice for same path/queryId.");var a={onComplete:r,hashFn:t,query:e,tag:n};this.listens_[o][i]=a,this.connected_&&this.sendListen_(a)},t.prototype.sendListen_=function(e){var n=this,r=e.query,i=r.path.toString(),o=r.queryIdentifier();this.log_("Listen on "+i+" for "+o);var a={p:i};e.tag&&(a.q=r.queryObject(),a.t=e.tag),a.h=e.hashFn(),this.sendRequest("q",a,function(a){var s=a.d,u=a.s;t.warnOnListenWarnings_(s,r),(n.listens_[i]&&n.listens_[i][o])===e&&(n.log_("listen response",a),"ok"!==u&&n.removeListen_(i,o),e.onComplete&&e.onComplete(u,s))})},t.warnOnListenWarnings_=function(e,t){if(e&&"object"===typeof e&&m.contains(e,"w")){var n=m.safeGet(e,"w");if(Array.isArray(n)&&~n.indexOf("no_index")){var r='".indexOn": "'+t.getQueryParams().getIndex().toString()+'"',i=t.path.toString();M("Using an unspecified index. Your data will be downloaded and filtered on the client. Consider adding "+r+" at "+i+" to your security rules for better performance.")}}},t.prototype.refreshAuthToken=function(e){this.authToken_=e,this.log_("Auth token refreshed"),this.authToken_?this.tryAuth():this.connected_&&this.sendRequest("unauth",{},function(){}),this.reduceReconnectDelayIfAdminCredential_(e)},t.prototype.reduceReconnectDelayIfAdminCredential_=function(e){(e&&40===e.length||m.isAdmin(e))&&(this.log_("Admin auth credential detected. Reducing max reconnect time."),this.maxReconnectDelay_=3e4)},t.prototype.tryAuth=function(){var e=this;if(this.connected_&&this.authToken_){var t=this.authToken_,n=m.isValidFormat(t)?"auth":"gauth",r={cred:t};null===this.authOverride_?r.noauth=!0:"object"===typeof this.authOverride_&&(r.authvar=this.authOverride_),this.sendRequest(n,r,function(n){var r=n.s,i=n.d||"error";e.authToken_===t&&("ok"===r?e.invalidAuthTokenCount_=0:e.onAuthRevoked_(r,i))})}},t.prototype.unlisten=function(e,t){var n=e.path.toString(),r=e.queryIdentifier();this.log_("Unlisten called for "+n+" "+r),m.assert(e.getQueryParams().isDefault()||!e.getQueryParams().loadsAllData(),"unlisten() called for non-default but complete query"),this.removeListen_(n,r)&&this.connected_&&this.sendUnlisten_(n,r,e.queryObject(),t)},t.prototype.sendUnlisten_=function(e,t,n,r){this.log_("Unlisten on "+e+" for "+t);var i={p:e};r&&(i.q=n,i.t=r),this.sendRequest("n",i)},t.prototype.onDisconnectPut=function(e,t,n){this.connected_?this.sendOnDisconnect_("o",e,t,n):this.onDisconnectRequestQueue_.push({pathString:e,action:"o",data:t,onComplete:n})},t.prototype.onDisconnectMerge=function(e,t,n){this.connected_?this.sendOnDisconnect_("om",e,t,n):this.onDisconnectRequestQueue_.push({pathString:e,action:"om",data:t,onComplete:n})},t.prototype.onDisconnectCancel=function(e,t){this.connected_?this.sendOnDisconnect_("oc",e,null,t):this.onDisconnectRequestQueue_.push({pathString:e,action:"oc",data:null,onComplete:t})},t.prototype.sendOnDisconnect_=function(e,t,n,r){var i={p:t,d:n};this.log_("onDisconnect "+e,i),this.sendRequest(e,i,function(e){r&&setTimeout(function(){r(e.s,e.d)},Math.floor(0))})},t.prototype.put=function(e,t,n,r){this.putInternal("p",e,t,n,r)},t.prototype.merge=function(e,t,n,r){this.putInternal("m",e,t,n,r)},t.prototype.putInternal=function(e,t,n,r,i){var o={p:t,d:n};void 0!==i&&(o.h=i),this.outstandingPuts_.push({action:e,request:o,onComplete:r}),this.outstandingPutCount_++;var a=this.outstandingPuts_.length-1;this.connected_?this.sendPut_(a):this.log_("Buffering put: "+t)},t.prototype.sendPut_=function(e){var t=this,n=this.outstandingPuts_[e].action,r=this.outstandingPuts_[e].request,i=this.outstandingPuts_[e].onComplete;this.outstandingPuts_[e].queued=this.connected_,this.sendRequest(n,r,function(r){t.log_(n+" response",r),delete t.outstandingPuts_[e],t.outstandingPutCount_--,0===t.outstandingPutCount_&&(t.outstandingPuts_=[]),i&&i(r.s,r.d)})},t.prototype.reportStats=function(e){var t=this;if(this.connected_){var n={c:e};this.log_("reportStats",n),this.sendRequest("s",n,function(e){if("ok"!==e.s){var n=e.d;t.log_("reportStats","Error sending stats: "+n)}})}},t.prototype.onDataMessage_=function(e){if("r"in e){this.log_("from server: "+m.stringify(e));var t=e.r,n=this.requestCBHash_[t];n&&(delete this.requestCBHash_[t],n(e.b))}else{if("error"in e)throw"A server-side error has occurred: "+e.error;"a"in e&&this.onDataPush_(e.a,e.b)}},t.prototype.onDataPush_=function(e,t){this.log_("handleServerMessage",e,t),"d"===e?this.onDataUpdate_(t.p,t.d,!1,t.t):"m"===e?this.onDataUpdate_(t.p,t.d,!0,t.t):"c"===e?this.onListenRevoked_(t.p,t.q):"ac"===e?this.onAuthRevoked_(t.s,t.d):"sd"===e?this.onSecurityDebugPacket_(t):L("Unrecognized action received from server: "+m.stringify(e)+"\nAre you using the latest client?")},t.prototype.onReady_=function(e,t){this.log_("connection ready"),this.connected_=!0,this.lastConnectionEstablishedTime_=(new Date).getTime(),this.handleTimestamp_(e),this.lastSessionId=t,this.firstConnection_&&this.sendConnectStats_(),this.restoreState_(),this.firstConnection_=!1,this.onConnectStatus_(!0)},t.prototype.scheduleConnect_=function(e){var t=this;m.assert(!this.realtime_,"Scheduling a connect when we're already connected/ing?"),this.establishConnectionTimer_&&clearTimeout(this.establishConnectionTimer_),this.establishConnectionTimer_=setTimeout(function(){t.establishConnectionTimer_=null,t.establishConnection_()},Math.floor(e))},t.prototype.onVisible_=function(e){e&&!this.visible_&&this.reconnectDelay_===this.maxReconnectDelay_&&(this.log_("Window became visible. Reducing delay."),this.reconnectDelay_=fn,this.realtime_||this.scheduleConnect_(0)),this.visible_=e},t.prototype.onOnline_=function(e){e?(this.log_("Browser went online."),this.reconnectDelay_=fn,this.realtime_||this.scheduleConnect_(0)):(this.log_("Browser went offline. Killing connection."),this.realtime_&&this.realtime_.close())},t.prototype.onRealtimeDisconnect_=function(){if(this.log_("data client disconnected"),this.connected_=!1,this.realtime_=null,this.cancelSentTransactions_(),this.requestCBHash_={},this.shouldReconnect_()){if(this.visible_){if(this.lastConnectionEstablishedTime_){var e=(new Date).getTime()-this.lastConnectionEstablishedTime_;e>3e4&&(this.reconnectDelay_=fn),this.lastConnectionEstablishedTime_=null}}else this.log_("Window isn't visible. Delaying reconnect."),this.reconnectDelay_=this.maxReconnectDelay_,this.lastConnectionAttemptTime_=(new Date).getTime();var t=(new Date).getTime()-this.lastConnectionAttemptTime_,n=Math.max(0,this.reconnectDelay_-t);
1n=Math.random()*n,this.log_("Trying to reconnect in "+n+"ms"),this.scheduleConnect_(n),this.reconnectDelay_=Math.min(this.maxReconnectDelay_,1.3*this.reconnectDelay_)}this.onConnectStatus_(!1)},t.prototype.establishConnection_=function(){if(this.shouldReconnect_()){this.log_("Making a connection attempt"),this.lastConnectionAttemptTime_=(new Date).getTime(),this.lastConnectionEstablishedTime_=null;var e=this.onDataMessage_.bind(this),n=this.onReady_.bind(this),r=this.onRealtimeDisconnect_.bind(this),i=this.id+":"+t.nextConnectionId_++,o=this,a=this.lastSessionId,s=!1,u=null,c=function(){u?u.close():(s=!0,r())},l=function(e){m.assert(u,"sendRequest call when we're not connected not allowed."),u.sendRequest(e)};this.realtime_={close:c,sendRequest:l};var h=this.forceTokenRefresh_;this.forceTokenRefresh_=!1,this.authTokenProvider_.getToken(h).then(function(t){s?x("getToken() completed but was canceled"):(x("getToken() completed. Creating connection."),o.authToken_=t&&t.accessToken,u=new ln(i,o.repoInfo_,e,n,r,function(e){M(e+" ("+o.repoInfo_.toString()+")"),o.interrupt("server_kill")},a))}).then(null,function(e){o.log_("Failed to get token: "+e),s||(m.CONSTANTS.NODE_ADMIN&&M(e),c())})}},t.prototype.interrupt=function(e){x("Interrupting connection for reason: "+e),this.interruptReasons_[e]=!0,this.realtime_?this.realtime_.close():(this.establishConnectionTimer_&&(clearTimeout(this.establishConnectionTimer_),this.establishConnectionTimer_=null),this.connected_&&this.onRealtimeDisconnect_())},t.prototype.resume=function(e){x("Resuming connection for reason: "+e),delete this.interruptReasons_[e],m.isEmpty(this.interruptReasons_)&&(this.reconnectDelay_=fn,this.realtime_||this.scheduleConnect_(0))},t.prototype.handleTimestamp_=function(e){var t=e-(new Date).getTime();this.onServerInfoUpdate_({serverTimeOffset:t})},t.prototype.cancelSentTransactions_=function(){for(var e=0;e<this.outstandingPuts_.length;e++){var t=this.outstandingPuts_[e];t&&"h"in t.request&&t.queued&&(t.onComplete&&t.onComplete("disconnect"),delete this.outstandingPuts_[e],this.outstandingPutCount_--)}0===this.outstandingPutCount_&&(this.outstandingPuts_=[])},t.prototype.onListenRevoked_=function(e,t){var n;n=t?t.map(function(e){return z(e)}).join("$"):"default";var r=this.removeListen_(e,n);r&&r.onComplete&&r.onComplete("permission_denied")},t.prototype.removeListen_=function(e,t){var n,r=new ie(e).toString();return void 0!==this.listens_[r]?(n=this.listens_[r][t],delete this.listens_[r][t],0===m.getCount(this.listens_[r])&&delete this.listens_[r]):n=void 0,n},t.prototype.onAuthRevoked_=function(e,t){x("Auth token revoked: "+e+"/"+t),this.authToken_=null,this.forceTokenRefresh_=!0,this.realtime_.close(),"invalid_token"!==e&&"permission_denied"!==e||++this.invalidAuthTokenCount_>=3&&(this.reconnectDelay_=3e4,this.authTokenProvider_.notifyForInvalidToken())},t.prototype.onSecurityDebugPacket_=function(e){this.securityDebugCallback_?this.securityDebugCallback_(e):"msg"in e&&console.log("FIREBASE: "+e.msg.replace("\n","\nFIREBASE: "))},t.prototype.restoreState_=function(){var e=this;this.tryAuth(),m.forEach(this.listens_,function(t,n){m.forEach(n,function(t,n){e.sendListen_(n)})});for(var t=0;t<this.outstandingPuts_.length;t++)this.outstandingPuts_[t]&&this.sendPut_(t);for(;this.onDisconnectRequestQueue_.length;){var n=this.onDisconnectRequestQueue_.shift();this.sendOnDisconnect_(n.action,n.pathString,n.data,n.onComplete)}},t.prototype.sendConnectStats_=function(){var e={},t="js";m.CONSTANTS.NODE_ADMIN?t="admin_node":m.CONSTANTS.NODE_CLIENT&&(t="node"),e["sdk."+t+"."+b.SDK_VERSION.replace(/\./g,"-")]=1,m.isMobileCordova()?e["framework.cordova"]=1:m.isReactNative()&&(e["framework.reactnative"]=1),this.reportStats(e)},t.prototype.shouldReconnect_=function(){var e=en.getInstance().currentlyOnline();return m.isEmpty(this.interruptReasons_)&&e},t.nextPersistentConnectionId_=0,t.nextConnectionId_=0,t}(hn),yn=function(e){function t(t,n,r){var i=e.call(this)||this;return i.repoInfo_=t,i.onDataUpdate_=n,i.authTokenProvider_=r,i.log_=D("p:rest:"),i.listens_={},i}return _.__extends(t,e),t.prototype.reportStats=function(e){throw new Error("Method not implemented.")},t.getListenId_=function(e,t){return void 0!==t?"tag$"+t:(m.assert(e.getQueryParams().isDefault(),"should have a tag if it's not a default query."),e.path.toString())},t.prototype.listen=function(e,n,r,i){var o=this,a=e.path.toString();this.log_("Listen called for "+a+" "+e.queryIdentifier());var s=t.getListenId_(e,r),u={};this.listens_[s]=u;var c=e.getQueryParams().toRestQueryStringParameters();this.restRequest_(a+".json",c,function(e,t){var n=t;if(404===e&&(n=null,e=null),null===e&&o.onDataUpdate_(a,n,!1,r),m.safeGet(o.listens_,s)===u){var c;c=e?401==e?"permission_denied":"rest_error:"+e:"ok",i(c,null)}})},t.prototype.unlisten=function(e,n){var r=t.getListenId_(e,n);delete this.listens_[r]},t.prototype.refreshAuthToken=function(e){},t.prototype.restRequest_=function(e,t,n){var r=this;void 0===t&&(t={}),t.format="export",this.authTokenProvider_.getToken(!1).then(function(i){var o=i&&i.accessToken;o&&(t.auth=o);var a=(r.repoInfo_.secure?"https://":"http://")+r.repoInfo_.host+e+"?"+m.querystring(t);r.log_("Sending REST request for "+a);var s=new XMLHttpRequest;s.onreadystatechange=function(){if(n&&4===s.readyState){r.log_("REST Response for "+a+" received. status:",s.status,"response:",s.responseText);var e=null;if(s.status>=200&&s.status<300){try{e=m.jsonEval(s.responseText)}catch(e){M("Failed to parse JSON response for "+a+": "+s.responseText)}n(null,e)}else 401!==s.status&&404!==s.status&&M("Got unsuccessful REST response for "+a+" Status: "+s.status),n(s.status);n=null}},s.open("GET",a,!0),s.send()})},t}(hn),vn=function(){function e(e,t,n){var r=this;this.repoInfo_=e,this.app=n,this.dataUpdateCount=0,this.statsListener_=null,this.eventQueue_=new Xt,this.nextWriteId_=1,this.interceptServerDataCallback_=null,this.onDisconnect_=new ht,this.persistentConnection_=null;var i=new Ht(n);if(this.stats_=Kt.getCollection(e),t||ne())this.server_=new yn(this.repoInfo_,this.onDataUpdate_.bind(this),i),setTimeout(this.onConnectStatus_.bind(this,!0),0);else{var o=n.options.databaseAuthVariableOverride;if("undefined"!==typeof o&&null!==o){if("object"!==typeof o)throw new Error("Only objects are supported for option databaseAuthVariableOverride");try{m.stringify(o)}catch(e){throw new Error("Invalid authOverride provided: "+e)}}this.persistentConnection_=new dn(this.repoInfo_,this.onDataUpdate_.bind(this),this.onConnectStatus_.bind(this),this.onServerInfoUpdate_.bind(this),i,o),this.server_=this.persistentConnection_}i.addTokenChangeListener(function(e){r.server_.refreshAuthToken(e)}),this.statsReporter_=Kt.getOrCreateReporter(e,function(){return new Yt(r.stats_,r.server_)}),this.transactions_init_(),this.infoData_=new Vt,this.infoSyncTree_=new Wt({startListening:function(e,t,n,i){var o=[],a=r.infoData_.getNode(e.path);return a.isEmpty()||(o=r.infoSyncTree_.applyServerOverwrite(e.path,a),setTimeout(function(){i("ok")},0)),o},stopListening:function(){}}),this.updateInfo_("connected",!1),this.serverSyncTree_=new Wt({startListening:function(e,t,n,i){return r.server_.listen(e,n,t,function(t,n){var o=i(t,n);r.eventQueue_.raiseEventsForChangedPath(e.path,o)}),[]},stopListening:function(e,t){r.server_.unlisten(e,t)}})}return e.prototype.toString=function(){return(this.repoInfo_.secure?"https://":"http://")+this.repoInfo_.host},e.prototype.name=function(){return this.repoInfo_.namespace},e.prototype.serverTime=function(){var e=this.infoData_.getNode(new ie(".info/serverTimeOffset")),t=e.val()||0;return(new Date).getTime()+t},e.prototype.generateServerValues=function(){return ft({timestamp:this.serverTime()})},e.prototype.onDataUpdate_=function(e,t,n,r){this.dataUpdateCount++;var i=new ie(e);t=this.interceptServerDataCallback_?this.interceptServerDataCallback_(e,t):t;var o=[];if(r)if(n){var a=m.map(t,function(e){return u(e)});o=this.serverSyncTree_.applyTaggedQueryMerge(i,a,r)}else{var s=u(t);o=this.serverSyncTree_.applyTaggedQueryOverwrite(i,s,r)}else if(n){var c=m.map(t,function(e){return u(e)});o=this.serverSyncTree_.applyServerMerge(i,c)}else{var l=u(t);o=this.serverSyncTree_.applyServerOverwrite(i,l)}var h=i;o.length>0&&(h=this.rerunTransactions_(i)),this.eventQueue_.raiseEventsForChangedPath(h,o)},e.prototype.interceptServerData_=function(e){this.interceptServerDataCallback_=e},e.prototype.onConnectStatus_=function(e){this.updateInfo_("connected",e),!1===e&&this.runOnDisconnectEvents_()},e.prototype.onServerInfoUpdate_=function(e){var t=this;Q(e,function(e,n){t.updateInfo_(n,e)})},e.prototype.updateInfo_=function(e,t){var n=new ie("/.info/"+e),r=u(t);this.infoData_.updateSnapshot(n,r);var i=this.infoSyncTree_.applyServerOverwrite(n,r);this.eventQueue_.raiseEventsForChangedPath(n,i)},e.prototype.getNextWriteId_=function(){return this.nextWriteId_++},e.prototype.setWithPriority=function(e,t,n,r){var i=this;this.log_("set",{path:e.toString(),value:t,priority:n});var o=this.generateServerValues(),a=u(t,n),s=yt(a,o),c=this.getNextWriteId_(),l=this.serverSyncTree_.applyUserOverwrite(e,s,c,!0);this.eventQueue_.queueEvents(l),this.server_.put(e.toString(),a.val(!0),function(t,n){var o="ok"===t;o||M("set at "+e+" failed: "+t);var a=i.serverSyncTree_.ackUserWrite(c,!o);i.eventQueue_.raiseEventsForChangedPath(e,a),i.callOnCompleteCallback(r,t,n)});var h=this.abortTransactions_(e);this.rerunTransactions_(h),this.eventQueue_.raiseEventsForChangedPath(h,[])},e.prototype.update=function(e,t,n){var r=this;this.log_("update",{path:e.toString(),value:t});var i=!0,o=this.generateServerValues(),a={};if(m.forEach(t,function(e,t){i=!1;var n=u(t);a[e]=yt(n,o)}),i)x("update() called with empty data. Don't do anything."),this.callOnCompleteCallback(n,"ok");else{var s=this.getNextWriteId_(),c=this.serverSyncTree_.applyUserMerge(e,a,s);this.eventQueue_.queueEvents(c),this.server_.merge(e.toString(),t,function(t,i){var o="ok"===t;o||M("update at "+e+" failed: "+t);var a=r.serverSyncTree_.ackUserWrite(s,!o),u=a.length>0?r.rerunTransactions_(e):e;r.eventQueue_.raiseEventsForChangedPath(u,a),r.callOnCompleteCallback(n,t,i)}),m.forEach(t,function(t){var n=r.abortTransactions_(e.child(t));r.rerunTransactions_(n)}),this.eventQueue_.raiseEventsForChangedPath(e,[])}},e.prototype.runOnDisconnectEvents_=function(){var e=this;this.log_("onDisconnectEvents");var t=this.generateServerValues(),n=dt(this.onDisconnect_,t),r=[];
1n.forEachTree(ie.Empty,function(t,n){r=r.concat(e.serverSyncTree_.applyServerOverwrite(t,n));var i=e.abortTransactions_(t);e.rerunTransactions_(i)}),this.onDisconnect_=new ht,this.eventQueue_.raiseEventsForChangedPath(ie.Empty,r)},e.prototype.onDisconnectCancel=function(e,t){var n=this;this.server_.onDisconnectCancel(e.toString(),function(r,i){"ok"===r&&n.onDisconnect_.forget(e),n.callOnCompleteCallback(t,r,i)})},e.prototype.onDisconnectSet=function(e,t,n){var r=this,i=u(t);this.server_.onDisconnectPut(e.toString(),i.val(!0),function(t,o){"ok"===t&&r.onDisconnect_.remember(e,i),r.callOnCompleteCallback(n,t,o)})},e.prototype.onDisconnectSetWithPriority=function(e,t,n,r){var i=this,o=u(t,n);this.server_.onDisconnectPut(e.toString(),o.val(!0),function(t,n){"ok"===t&&i.onDisconnect_.remember(e,o),i.callOnCompleteCallback(r,t,n)})},e.prototype.onDisconnectUpdate=function(e,t,n){var r=this;if(m.isEmpty(t))return x("onDisconnect().update() called with empty data. Don't do anything."),void this.callOnCompleteCallback(n,"ok");this.server_.onDisconnectMerge(e.toString(),t,function(i,o){"ok"===i&&m.forEach(t,function(t,n){var i=u(n);r.onDisconnect_.remember(e.child(t),i)}),r.callOnCompleteCallback(n,i,o)})},e.prototype.addEventCallbackForQuery=function(e,t){var n;n=".info"===e.path.getFront()?this.infoSyncTree_.addEventRegistration(e,t):this.serverSyncTree_.addEventRegistration(e,t),this.eventQueue_.raiseEventsAtPath(e.path,n)},e.prototype.removeEventCallbackForQuery=function(e,t){var n;n=".info"===e.path.getFront()?this.infoSyncTree_.removeEventRegistration(e,t):this.serverSyncTree_.removeEventRegistration(e,t),this.eventQueue_.raiseEventsAtPath(e.path,n)},e.prototype.interrupt=function(){this.persistentConnection_&&this.persistentConnection_.interrupt("repo_interrupt")},e.prototype.resume=function(){this.persistentConnection_&&this.persistentConnection_.resume("repo_interrupt")},e.prototype.stats=function(e){if(void 0===e&&(e=!1),"undefined"!==typeof console){var t;e?(this.statsListener_||(this.statsListener_=new zt(this.stats_)),t=this.statsListener_.get()):t=this.stats_.get();var n=Object.keys(t).reduce(function(e,t){return Math.max(t.length,e)},0);m.forEach(t,function(e,t){for(var r=e.length;r<n+2;r++)e+=" ";console.log(e+t)})}},e.prototype.statsIncrementCounter=function(e){this.stats_.incrementCounter(e),this.statsReporter_.includeStat(e)},e.prototype.log_=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n="";this.persistentConnection_&&(n=this.persistentConnection_.id+":"),x.apply(void 0,[n].concat(e))},e.prototype.callOnCompleteCallback=function(e,t,n){e&&te(function(){if("ok"==t)e(null);else{var r=(t||"error").toUpperCase(),i=r;n&&(i+=": "+n);var o=new Error(i);o.code=r,e(o)}})},Object.defineProperty(e.prototype,"database",{get:function(){return this.__database||(this.__database=new In(this))},enumerable:!0,configurable:!0}),e}(),mn=function(){function e(t){this.indexedFilter_=new Ot(t.getIndex()),this.index_=t.getIndex(),this.startPost_=e.getStartPost_(t),this.endPost_=e.getEndPost_(t)}return e.prototype.getStartPost=function(){return this.startPost_},e.prototype.getEndPost=function(){return this.endPost_},e.prototype.matches=function(e){return this.index_.compare(this.getStartPost(),e)<=0&&this.index_.compare(e,this.getEndPost())<=0},e.prototype.updateChild=function(e,t,n,r,i,o){return this.matches(new Re(t,n))||(n=Ye.EMPTY_NODE),this.indexedFilter_.updateChild(e,t,n,r,i,o)},e.prototype.updateFullNode=function(e,t,n){t.isLeafNode()&&(t=Ye.EMPTY_NODE);var r=t.withIndex(this.index_);r=r.updatePriority(Ye.EMPTY_NODE);var i=this;return t.forEachChild(je,function(e,t){i.matches(new Re(e,t))||(r=r.updateImmediateChild(e,Ye.EMPTY_NODE))}),this.indexedFilter_.updateFullNode(e,r,n)},e.prototype.updatePriority=function(e,t){return e},e.prototype.filtersNodes=function(){return!0},e.prototype.getIndexedFilter=function(){return this.indexedFilter_},e.prototype.getIndex=function(){return this.index_},e.getStartPost_=function(e){if(e.hasStart()){var t=e.getIndexStartName();return e.getIndex().makePost(e.getIndexStartValue(),t)}return e.getIndex().minPost()},e.getEndPost_=function(e){if(e.hasEnd()){var t=e.getIndexEndName();return e.getIndex().makePost(e.getIndexEndValue(),t)}return e.getIndex().maxPost()},e}
1(),gn=function(){function e(e){this.rangedFilter_=new mn(e),this.index_=e.getIndex(),this.limit_=e.getLimit(),this.reverse_=!e.isViewFromLeft()}return e.prototype.updateChild=function(e,t,n,r,i,o){return this.rangedFilter_.matches(new Re(t,n))||(n=Ye.EMPTY_NODE),e.getImmediateChild(t).equals(n)?e:e.numChildren()<this.limit_?this.rangedFilter_.getIndexedFilter().updateChild(e,t,n,r,i,o):this.fullLimitUpdateChild_(e,t,n,i,o)},e.prototype.updateFullNode=function(e,t,n){var r;if(t.isLeafNode()||t.isEmpty())r=Ye.EMPTY_NODE.withIndex(this.index_);else if(2*this.limit_<t.numChildren()&&t.isIndexed(this.index_)){r=Ye.EMPTY_NODE.withIndex(this.index_);var i=void 0;i=this.reverse_?t.getReverseIteratorFrom(this.rangedFilter_.getEndPost(),this.index_):t.getIteratorFrom(this.rangedFilter_.getStartPost(),this.index_);for(var o=0;i.hasNext()&&o<this.limit_;){var a=i.getNext(),s=void 0;if(!(s=this.reverse_?this.index_.compare(this.rangedFilter_.getStartPost(),a)<=0:this.index_.compare(a,this.rangedFilter_.getEndPost())<=0))break;r=r.updateImmediateChild(a.name,a.node),o++}}else{r=t.withIndex(this.index_),r=r.updatePriority(Ye.EMPTY_NODE);var u=void 0,c=void 0,l=void 0,i=void 0;if(this.reverse_){i=r.getReverseIterator(this.index_),u=this.rangedFilter_.getEndPost(),c=this.rangedFilter_.getStartPost();var h=this.index_.getCompare();l=function(e,t){return h(t,e)}}else i=r.getIterator(this.index_),u=this.rangedFilter_.getStartPost(),c=this.rangedFilter_.getEndPost(),l=this.index_.getCompare();for(var o=0,f=!1;i.hasNext();){var a=i.getNext();!f&&l(u,a)<=0&&(f=!0);var s=f&&o<this.limit_&&l(a,c)<=0;s?o++:r=r.updateImmediateChild(a.name,Ye.EMPTY_NODE)}}return this.rangedFilter_.getIndexedFilter().updateFullNode(e,r,n)},e.prototype.updatePriority=function(e,t){return e},e.prototype.filtersNodes=function(){return!0},e.prototype.getIndexedFilter=function(){return this.rangedFilter_.getIndexedFilter()},e.prototype.getIndex=function(){return this.index_},e.prototype.fullLimitUpdateChild_=function(e,t,n,r,i){var o;if(this.reverse_){var a=this.index_.getCompare();o=function(e,t){return a(t,e)}}else o=this.index_.getCompare();var s=e;m.assert(s.numChildren()==this.limit_,"");var u=new Re(t,n),c=this.reverse_?s.getFirstChild(this.index_):s.getLastChild(this.index_),l=this.rangedFilter_.matches(u);if(s.hasChild(t)){for(var h=s.getImmediateChild(t),f=r.getChildAfterChild(this.index_,c,this.reverse_);null!=f&&(f.name==t||s.hasChild(f.name));)f=r.getChildAfterChild(this.index_,f,this.reverse_);var p=null==f?1:o(f,u);if(l&&!n.isEmpty()&&p>=0)return null!=i&&i.trackChildChange(kt.childChangedChange(t,n,h)),s.updateImmediateChild(t,n);null!=i&&i.trackChildChange(kt.childRemovedChange(t,h));var d=s.updateImmediateChild(t,Ye.EMPTY_NODE);return null!=f&&this.rangedFilter_.matches(f)?(null!=i&&i.trackChildChange(kt.childAddedChange(f.name,f.node)),d.updateImmediateChild(f.name,f.node)):d}return n.isEmpty()?e:l&&o(c,u)>=0?(null!=i&&(i.trackChildChange(kt.childRemovedChange(c.name,c.node)),i.trackChildChange(kt.childAddedChange(t,n))),s.updateImmediateChild(t,n).updateImmediateChild(c.name,Ye.EMPTY_NODE)):e},e}(),_n=function(){function e(){this.limitSet_=!1,this.startSet_=!1,this.startNameSet_=!1,this.endSet_=!1,this.endNameSet_=!1,this.limit_=0,this.viewFrom_="",this.indexStartValue_=null,this.indexStartName_="",this.indexEndValue_=null,this.indexEndName_="",this.index_=je}return e.prototype.hasStart=function(){return this.startSet_},e.prototype.isViewFromLeft=function(){return""===this.viewFrom_?this.startSet_:this.viewFrom_===e.WIRE_PROTOCOL_CONSTANTS_.VIEW_FROM_LEFT},e.prototype.getIndexStartValue=function(){return m.assert(this.startSet_,"Only valid if start has been set"),this.indexStartValue_},e.prototype.getIndexStartName=function(){return m.assert(this.startSet_,"Only valid if start has been set"),this.startNameSet_?this.indexStartName_:W},e.prototype.hasEnd=function(){return this.endSet_},e.prototype.getIndexEndValue=function(){return m.assert(this.endSet_,"Only valid if end has been set"),this.indexEndValue_},e.prototype.getIndexEndName=function(){return m.assert(this.endSet_,"Only valid if end has been set"),this.endNameSet_?this.indexEndName_:V},e.prototype.hasLimit=function(){return this.limitSet_},e.prototype.hasAnchoredLimit=function(){return this.limitSet_&&""!==this.viewFrom_},e.prototype.getLimit=function(){return m.assert(this.limitSet_,"Only valid if limit has been set"),this.limit_},e.prototype.getIndex=function(){return this.index_},e.prototype.copy_=function(){var t=new e;return t.limitSet_=this.limitSet_,t.limit_=this.limit_,t.startSet_=this.startSet_,t.indexStartValue_=this.indexStartValue_,t.startNameSet_=this.startNameSet_,t.indexStartName_=this.indexStartName_,t.endSet_=this.endSet_,t.indexEndValue_=this.indexEndValue_,t.endNameSet_=this.endNameSet_,t.indexEndName_=this.indexEndName_,t.index_
1=this.index_,t.viewFrom_=this.viewFrom_,t},e.prototype.limit=function(e){var t=this.copy_();return t.limitSet_=!0,t.limit_=e,t.viewFrom_="",t},e.prototype.limitToFirst=function(t){var n=this.copy_();return n.limitSet_=!0,n.limit_=t,n.viewFrom_=e.WIRE_PROTOCOL_CONSTANTS_.VIEW_FROM_LEFT,n},e.prototype.limitToLast=function(t){var n=this.copy_();return n.limitSet_=!0,n.limit_=t,n.viewFrom_=e.WIRE_PROTOCOL_CONSTANTS_.VIEW_FROM_RIGHT,n},e.prototype.startAt=function(e,t){var n=this.copy_();return n.startSet_=!0,void 0===e&&(e=null),n.indexStartValue_=e,null!=t?(n.startNameSet_=!0,n.indexStartName_=t):(n.startNameSet_=!1,n.indexStartName_=""),n},e.prototype.endAt=function(e,t){var n=this.copy_();return n.endSet_=!0,void 0===e&&(e=null),n.indexEndValue_=e,void 0!==t?(n.endNameSet_=!0,n.indexEndName_=t):(n.endNameSet_=!1,n.indexEndName_=""),n},e.prototype.orderBy=function(e){var t=this.copy_();return t.index_=e,t},e.prototype.getQueryObject=function(){var t=e.WIRE_PROTOCOL_CONSTANTS_,n={};if(this.startSet_&&(n[t.INDEX_START_VALUE]=this.indexStartValue_,this.startNameSet_&&(n[t.INDEX_START_NAME]=this.indexStartName_)),this.endSet_&&(n[t.INDEX_END_VALUE]=this.indexEndValue_,this.endNameSet_&&(n[t.INDEX_END_NAME]=this.indexEndName_)),this.limitSet_){n[t.LIMIT]=this.limit_;var r=this.viewFrom_;""===r&&(r=this.isViewFromLeft()?t.VIEW_FROM_LEFT:t.VIEW_FROM_RIGHT),n[t.VIEW_FROM]=r}return this.index_!==je&&(n[t.INDEX]=this.index_.toString()),n},e.prototype.loadsAllData=function(){return!(this.startSet_||this.endSet_||this.limitSet_)},e.prototype.isDefault=function(){return this.loadsAllData()&&this.index_==je},e.prototype.getNodeFilter=function(){return this.loadsAllData()?new Ot(this.getIndex()):this.hasLimit()?new gn(this):new mn(this)},e.prototype.toRestQueryStringParameters=function(){var t=e.REST_QUERY_CONSTANTS_,n={};if(this.isDefault())return n;var r;return this.index_===je?r=t.PRIORITY_INDEX:this.index_===nt?r=t.VALUE_INDEX:this.index_===De?r=t.KEY_INDEX:(m.assert(this.index_ instanceof rt,"Unrecognized index type!"),r=this.index_.toString()),n[t.ORDER_BY]=m.stringify(r),this.startSet_&&(n[t.START_AT]=m.stringify(this.indexStartValue_),this.startNameSet_&&(n[t.START_AT]+=","+m.stringify(this.indexStartName_))),this.endSet_&&(n[t.END_AT]=m.stringify(this.indexEndValue_),this.endNameSet_&&(n[t.END_AT]+=","+m.stringify(this.indexEndName_))),this.limitSet_&&(this.isViewFromLeft()?n[t.LIMIT_TO_FIRST]=this.limit_:n[t.LIMIT_TO_LAST]=this.limit_),n},e.WIRE_PROTOCOL_CONSTANTS_={INDEX_START_VALUE:"sp",INDEX_START_NAME:"sn",INDEX_END_VALUE:"ep",INDEX_END_NAME:"en",LIMIT:"l",VIEW_FROM:"vf",VIEW_FROM_LEFT:"l",VIEW_FROM_RIGHT:"r",INDEX:"i"},e.REST_QUERY_CONSTANTS_={ORDER_BY:"orderBy",PRIORITY_INDEX:"$priority",VALUE_INDEX:"$value",KEY_INDEX:"$key",START_AT:"startAt",END_AT:"endAt",LIMIT_TO_FIRST:"limitToFirst",LIMIT_TO_LAST:"limitToLast"},e.DEFAULT=new e,e}(),bn=function(e){function t(t,n){if(!(t instanceof vn))throw new Error("new Reference() no longer supported - use app.database().");return e.call(this,t,n,_n.DEFAULT,!1)||this}return _.__extends(t,e),t.prototype.getKey=function(){return m.validateArgCount("Reference.key",0,0,arguments.length),this.path.isEmpty()?null:this.path.getBack()},t.prototype.child=function(e){return m.validateArgCount("Reference.child",1,1,arguments.length),"number"===typeof e?e=String(e):e instanceof ie||(null===this.path.getFront()?Te("Reference.child",1,e,!1):Ce("Reference.child",1,e,!1)),new t(this.repo,this.path.child(e))},t.prototype.getParent=function(){m.validateArgCount("Reference.parent",0,0,arguments.length);var e=this.path.parent();return null===e?null:new t(this.repo,e)},t.prototype.getRoot=function(){m.validateArgCount("Reference.root",0,0,arguments.length);for(var e=this;null!==e.getParent();)e=e.getParent();return e},t.prototype.databaseProp=function(){return this.repo.database},t.prototype.set=function(e,t){m.validateArgCount("Reference.set",1,2,arguments.length),Se("Reference.set",this.path),ve("Reference.set",1,e,this.path,!1),m.validateCallback("Reference.set",2,t,!0);var n=new m.Deferred;return this.repo.setWithPriority(this.path,e,null,n.wrapCallback(t)),n.promise},t.prototype.update=function(e,t){if(m.validateArgCount("Reference.update",1,2,arguments.length),Se("Reference.update",this.path),Array.isArray(e)){for(var n={},r=0;r<e.length;++r)n[""+r]=e[r];
1e=n,M("Passing an Array to Firebase.update() is deprecated. Use set() if you want to overwrite the existing data, or an Object with integer keys if you really do want to only update some of the children.")}_e("Reference.update",1,e,this.path,!1),m.validateCallback("Reference.update",2,t,!0);var i=new m.Deferred;return this.repo.update(this.path,e,i.wrapCallback(t)),i.promise},t.prototype.setWithPriority=function(e,t,n){if(m.validateArgCount("Reference.setWithPriority",2,3,arguments.length),Se("Reference.setWithPriority",this.path),ve("Reference.setWithPriority",1,e,this.path,!1),be("Reference.setWithPriority",2,t,!1),m.validateCallback("Reference.setWithPriority",3,n,!0),".length"===this.getKey()||".keys"===this.getKey())throw"Reference.setWithPriority failed: "+this.getKey()+" is a read-only object.";var r=new m.Deferred;return this.repo.setWithPriority(this.path,e,t,r.wrapCallback(n)),r.promise},t.prototype.remove=function(e){return m.validateArgCount("Reference.remove",0,1,arguments.length),Se("Reference.remove",this.path),m.validateCallback("Reference.remove",1,e,!0),this.set(null,e)},t.prototype.transaction=function(e,t,n){if(m.validateArgCount("Reference.transaction",1,3,arguments.length),Se("Reference.transaction",this.path),m.validateCallback("Reference.transaction",1,e,!1),m.validateCallback("Reference.transaction",2,t,!0),ke("Reference.transaction",3,n,!0),".length"===this.getKey()||".keys"===this.getKey())throw"Reference.transaction failed: "+this.getKey()+" is a read-only object.";void 0===n&&(n=!0);var r=new m.Deferred;"function"===typeof t&&r.promise.catch(function(){});var i=function(e,n,i){e?r.reject(e):r.resolve(new Ne(n,i)),"function"===typeof t&&t(e,n,i)};return this.repo.startTransaction(this.path,e,i,n),r.promise},t.prototype.setPriority=function(e,t){m.validateArgCount("Reference.setPriority",1,2,arguments.length),Se("Reference.setPriority",this.path),be("Reference.setPriority",1,e,!1),m.validateCallback("Reference.setPriority",2,t,!0);var n=new m.Deferred;return this.repo.setWithPriority(this.path.child(".priority"),e,null,n.wrapCallback(t)),n.promise},t.prototype.push=function(e,t){m.validateArgCount("Reference.push",0,2,arguments.length),Se("Reference.push",this.path),ve("Reference.push",1,e,this.path,!0),m.validateCallback("Reference.push",2,t,!0);var n,r=this.repo.serverTime(),i=Pe(r),o=this.child(i),a=this.child(i);return n=null!=e?o.set(e,t).then(function(){return a}):Promise.resolve(a),o.then=n.then.bind(n),o.catch=n.then.bind(n,void 0),"function"===typeof t&&n.catch(function(){}),o},t.prototype.onDisconnect=function(){return Se("Reference.onDisconnect",this.path),new Oe(this.repo,this.path)},Object.defineProperty(t.prototype,"database",{get:function(){return this.databaseProp()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"key",{get:function(){return this.getKey()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){return this.getParent()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"root",{get:function(){return this.getRoot()},enumerable:!0,configurable:!0}),t}(ct);ct.__referenceConstructor=bn,Mt.__referenceConstructor=bn;var wn,En=function(){function e(){this.children={},this.childCount=0,this.value=null}return e}(),Cn=function(){function e(e,t,n){void 0===e&&(e=""),void 0===t&&(t=null),void 0===n&&(n=new En),this.name_=e,this.parent_=t,this.node_=n}return e.prototype.subTree=function(t){for(var n,r=t instanceof ie?t:new ie(t),i=this;null!==(n=r.getFront());){i=new e(n,i,m.safeGet(i.node_.children,n)||new En),r=r.popFront()}return i},e.prototype.getValue=function(){return this.node_.value},e.prototype.setValue=function(e){m.assert("undefined"!==typeof e,"Cannot set value to undefined"),this.node_.value=e,this.updateParents_()},e.prototype.clear=function(){this.node_.value=null,this.node_.children={},this.node_.childCount=0,this.updateParents_()},e.prototype.hasChildren=function(){return this.node_.childCount>0},e.prototype.isEmpty=function(){return null===this.getValue()&&!this.hasChildren()},e.prototype.forEachChild=function(t){var n=this;m.forEach(this.node_.children,function(r,i){t(new e(r,n,i))})},e.prototype.forEachDescendant=function(e,t,n){t&&!n&&e(this),this.forEachChild(function(t){t.forEachDescendant(e,!0,n)}),t&&n&&e(this)},e.prototype.forEachAncestor=function(e,t){for(var n=t?this:this.parent();null!==n;){if(e(n))return!0;n=n.parent()}return!1},e.prototype.forEachImmediateDescendantWithValue=function(e){this.forEachChild(function(t){null!==t.getValue()?e(t):t.forEachImmediateDescendantWithValue(e)})},e.prototype.path=function(){return new ie(null===this.parent_?this.name_:this.parent_.path()+"/"+this.name_)},e.prototype.name=function(){return this.name_},e.prototype.parent=function(){return this.parent_},e.prototype.updateParents_=function(){null!==this.parent_&&this.parent_.updateChild_(this.name_,this)},e.prototype.updateChild_=function(e,t){var n=t.isEmpty(),r=m.contains(this.node_.children,e);n&&r?(delete this.node_.children[e],this.node_.childCount--,this.updateParents_()):n||r||(this.node_.children[e]=t.node_,this.node_.childCount++,this.updateParents_())},e}();!function(e){e[e.RUN=0]="RUN",e[e.SENT=1]="SENT",e[e.COMPLETED=2]="COMPLETED",e[e.SENT_NEEDS_ABORT=3]="SENT_NEEDS_ABORT",e[e.NEEDS_ABORT=4]="NEEDS_ABORT"}(wn||(wn={})),vn.MAX_TRANSACTION_RETRIES_=25,vn.prototype.transactions_init_=function(){this.transactionQueueTree_=new Cn},vn.prototype.startTransaction=function(e,t,n,r){this.log_("transaction on "+e);var i=function(){},o=new bn(this,e);o.on("value",i);var a=function(){o.off("value",i)},s={path:e,update:t,onComplete:n,status:null,order:k(),applyLocally:r,retryCount:0,unwatcher:a,abortReason:null,currentWriteId:null,currentInputSnapshot:null,currentOutputSnapshotRaw:null,currentOutputSnapshotResolved:null},c=this.getLatestState_(e);s.currentInputSnapshot=c;var l=s.update(c.val());if(void 0===l){if(s.unwatcher(),s.currentOutputSnapshotRaw=null,s.currentOutputSnapshotResolved=null,s.onComplete){var h=new it(s.currentInputSnapshot,new bn(this,s.path),je);s.onComplete(null,!1,h)}}else{me("transaction failed: Data returned ",l,s.path),s.status=wn.RUN;var f=this.transactionQueueTree_.subTree(e),p=f.getValue()||[];p.push(s),f.setValue(p);var d=void 0;if("object"===typeof l&&null!==l&&m.contains(l,".priority"))d=m.safeGet(l,".priority"),m.assert(ye(d),"Invalid priority returned by transaction. Priority must be a valid string, finite number, server value, or null.");else{d=(this.serverSyncTree_.calcCompleteEventCache(e)||Ye.EMPTY_NODE).getPriority().val()}d=d;var y=this.generateServerValues(),v=u(l,d),g=yt(v,y);s.currentOutputSnapshotRaw=v,s.currentOutputSnapshotResolved=g,s.currentWriteId=this.getNextWriteId_();var _=this.serverSyncTree_.applyUserOverwrite(e,g,s.currentWriteId,s.applyLocally);this.eventQueue_.raiseEventsForChangedPath(e,_),this.sendReadyTransactions_()}},vn.prototype.getLatestState_=function(e,t){return this.serverSyncTree_.calcCompleteEventCache(e,t)||Ye.EMPTY_NODE},vn.prototype.sendReadyTransactions_=function(e){var t=this;if(void 0===e&&(e=this.transactionQueueTree_),e||this.pruneCompletedTransactionsBelowNode_(e),null!==e.getValue()){var n=this.buildTransactionQueue_(e);m.assert(n.length>0,"Sending zero length transaction queue");n.every(function(e){return e.status===wn.RUN}
1)&&this.sendTransactionQueue_(e.path(),n)}else e.hasChildren()&&e.forEachChild(function(e){t.sendReadyTransactions_(e)})},vn.prototype.sendTransactionQueue_=function(e,t){for(var n=this,r=t.map(function(e){return e.currentWriteId}),i=this.getLatestState_(e,r),o=i,a=i.hash(),s=0;s<t.length;s++){var u=t[s];m.assert(u.status===wn.RUN,"tryToSendTransactionQueue_: items in queue should all be run."),u.status=wn.SENT,u.retryCount++;var c=ie.relativePath(e,u.path);o=o.updateChild(c,u.currentOutputSnapshotRaw)}var l=o.val(!0),h=e;this.server_.put(h.toString(),l,function(r){n.log_("transaction put response",{path:h.toString(),status:r});var i=[];if("ok"===r){for(var o=[],a=0;a<t.length;a++){if(t[a].status=wn.COMPLETED,i=i.concat(n.serverSyncTree_.ackUserWrite(t[a].currentWriteId)),t[a].onComplete){var s=t[a].currentOutputSnapshotResolved,u=new bn(n,t[a].path),c=new it(s,u,je);o.push(t[a].onComplete.bind(null,null,!0,c))}t[a].unwatcher()}n.pruneCompletedTransactionsBelowNode_(n.transactionQueueTree_.subTree(e)),n.sendReadyTransactions_(),n.eventQueue_.raiseEventsForChangedPath(e,i);for(var a=0;a<o.length;a++)te(o[a])}else{if("datastale"===r)for(var a=0;a<t.length;a++)t[a].status===wn.SENT_NEEDS_ABORT?t[a].status=wn.NEEDS_ABORT:t[a].status=wn.RUN;else{M("transaction at "+h.toString()+" failed: "+r);for(var a=0;a<t.length;a++)t[a].status=wn.NEEDS_ABORT,t[a].abortReason=r}n.rerunTransactions_(e)}},a)},vn.prototype.rerunTransactions_=function(e){var t=this.getAncestorTransactionNode_(e),n=t.path(),r=this.buildTransactionQueue_(t);return this.rerunTransactionQueue_(r,n),n},vn.prototype.rerunTransactionQueue_=function(e,t){if(0!==e.length){for(var n=[],r=[],i=e.filter(function(e){return e.status===wn.RUN}),o=i.map(function(e){return e.currentWriteId}),a=0;a<e.length;a++){var s=e[a],c=ie.relativePath(t,s.path),l=!1,h=void 0;if(m.assert(null!==c,"rerunTransactionsUnderNode_: relativePath should not be null."),s.status===wn.NEEDS_ABORT)l=!0,h=s.abortReason,r=r.concat(this.serverSyncTree_.ackUserWrite(s.currentWriteId,!0));else if(s.status===wn.RUN)if(s.retryCount>=vn.MAX_TRANSACTION_RETRIES_)l=!0,h="maxretry",r=r.concat(this.serverSyncTree_.ackUserWrite(s.currentWriteId,!0));else{var f=this.getLatestState_(s.path,o);s.currentInputSnapshot=f;var p=e[a].update(f.val());if(void 0!==p){me("transaction failed: Data returned ",p,s.path);var d=u(p),y="object"===typeof p&&null!=p&&m.contains(p,".priority");y||(d=d.updatePriority(f.getPriority()));var v=s.currentWriteId,g=this.generateServerValues(),_=yt(d,g);s.currentOutputSnapshotRaw=d,s.currentOutputSnapshotResolved=_,s.currentWriteId=this.getNextWriteId_(),o.splice(o.indexOf(v),1),r=r.concat(this.serverSyncTree_.applyUserOverwrite(s.path,_,s.currentWriteId,s.applyLocally)),r=r.concat(this.serverSyncTree_.ackUserWrite(v,!0))}else l=!0,h="nodata",r=r.concat(this.serverSyncTree_.ackUserWrite(s.currentWriteId,!0))}if(this.eventQueue_.raiseEventsForChangedPath(t,r),r=[],l&&(e[a].status=wn.COMPLETED,function(e){setTimeout(e,Math.floor(0))}(e[a].unwatcher),e[a].onComplete))if("nodata"===h){var b=new bn(this,e[a].path),w=e[a].currentInputSnapshot,E=new it(w,b,je);n.push(e[a].onComplete.bind(null,null,!1,E))}else n.push(e[a].onComplete.bind(null,new Error(h),!1,null))}this.pruneCompletedTransactionsBelowNode_(this.transactionQueueTree_);for(var a=0;a<n.length;a++)te(n[a]);this.sendReadyTransactions_()}},vn.prototype.getAncestorTransactionNode_=function(e){for(var t,n=this.transactionQueueTree_;null!==(t=e.getFront())&&null===n.getValue();)n=n.subTree(t),e=e.popFront();return n},vn.prototype.buildTransactionQueue_=function(e){var t=[];return this.aggregateTransactionQueuesForNode_(e,t),t.sort(function(e,t){return e.order-t.order}),t},vn.prototype.aggregateTransactionQueuesForNode_=function(e,t){var n=this,r=e.getValue();if(null!==r)for(var i=0;i<r.length;i++)t.push(r[i]);e.forEachChild(function(e){n.aggregateTransactionQueuesForNode_(e,t)})},vn.prototype.pruneCompletedTransactionsBelowNode_=function(e){var t=this,n=e.getValue();if(n){for(var r=0,i=0;i<n.length;i++)n[i].status!==wn.COMPLETED&&(n[r]=n[i],r++);n.length=r,e.setValue(n.length>0?n:null)}e.forEachChild(function(e){t.pruneCompletedTransactionsBelowNode_(e)})},vn.prototype.abortTransactions_=function(e){var t=this,n=this.getAncestorTransactionNode_(e).path(),r=this.transactionQueueTree_.subTree(e);return r.forEachAncestor(function(e){t.abortTransactionsOnNode_(e)}),this.abortTransactionsOnNode_(r),r.forEachDescendant(function(e){t.abortTransactionsOnNode_(e)}),n},vn.prototype.abortTransactionsOnNode_=function(e){var t=e.getValue();if(null!==t){for(var n=[],r=[],i=-1,o=0;o<t.length;o++)if(t[o].status===wn.SENT_NEEDS_ABORT);else if(t[o].status===wn.SENT)m.assert(i===o-1,"All SENT items should be at beginning of queue."),i=o,t[o].status=wn.SENT_NEEDS_ABORT,t[o].abortReason="set";else if(m.assert(t[o].status===wn.RUN,"Unexpected transaction status in abort"),t[o].unwatcher(),r
1=r.concat(this.serverSyncTree_.ackUserWrite(t[o].currentWriteId,!0)),t[o].onComplete){n.push(t[o].onComplete.bind(null,new Error("set"),!1,null))}-1===i?e.setValue(null):t.length=i+1,this.eventQueue_.raiseEventsForChangedPath(e.path(),r);for(var o=0;o<n.length;o++)te(n[o])}};var Tn,Sn=function(){function e(){this.repos_={},this.useRestClient_=!1}return e.getInstance=function(){return Tn||(Tn=new e),Tn},e.prototype.interrupt=function(){for(var e in this.repos_)for(var t in this.repos_[e])this.repos_[e][t].interrupt()},e.prototype.resume=function(){for(var e in this.repos_)for(var t in this.repos_[e])this.repos_[e][t].resume()},e.prototype.databaseFromApp=function(e,t){var n=t||e.options.databaseURL;void 0===n&&U("Can't determine Firebase Database URL. Be sure to include databaseURL option when calling firebase.initializeApp().");var r=ue(n),i=r.repoInfo;return Ie("Invalid Firebase Database URL",1,r),r.path.isEmpty()||U("Database URL must point to the root of a Firebase Database (not including a child path)."),this.createRepo(i,e).database},e.prototype.deleteRepo=function(e){var t=m.safeGet(this.repos_,e.app.name);t&&m.safeGet(t,e.repoInfo_.toURLString())===e||U("Database "+e.app.name+"("+e.repoInfo_+") has already been deleted."),e.interrupt(),delete t[e.repoInfo_.toURLString()]},e.prototype.createRepo=function(e,t){var n=m.safeGet(this.repos_,t.name);n||(n={},this.repos_[t.name]=n);var r=m.safeGet(n,e.toURLString());return r&&U("Database initialized multiple times. Please make sure the format of the database URL matches with each database() call."),r=new vn(e,this.useRestClient_,t),n[e.toURLString()]=r,r},e.prototype.forceRestClient=function(e){this.useRestClient_=e},e}(),In=function(){function e(e){this.repo_=e,e instanceof vn||U("Don't call new Database() directly - please use firebase.database()."),this.root_=new bn(e,ie.Empty),this.INTERNAL=new kn(this)}return Object.defineProperty(e.prototype,"app",{get:function(){return this.repo_.app},enumerable:!0,configurable:!0}),e.prototype.ref=function(e){return this.checkDeleted_("ref"),m.validateArgCount("database.ref",0,1,arguments.length),e instanceof bn?this.refFromURL(e.toString()):void 0!==e?this.root_.child(e):this.root_},e.prototype.refFromURL=function(e){var t="database.refFromURL";this.checkDeleted_(t),m.validateArgCount(t,1,1,arguments.length);var n=ue(e);Ie(t,1,n);var r=n.repoInfo;return r.host!==this.repo_.repoInfo_.host&&U(t+": Host name does not match the current database: (found "+r.host+" but expected "+this.repo_.repoInfo_.host+")"),this.ref(n.path.toString())},e.prototype.checkDeleted_=function(e){null===this.repo_&&U("Cannot call "+e+" on a deleted database.")},e.prototype.goOffline=function(){m.validateArgCount("database.goOffline",0,0,arguments.length),this.checkDeleted_("goOffline"),this.repo_.interrupt()},e.prototype.goOnline=function(){m.validateArgCount("database.goOnline",0,0,arguments.length),this.checkDeleted_("goOnline"),this.repo_.resume()},e.ServerValue={TIMESTAMP:{".sv":"timestamp"}},e}(),kn=function(){function e(e){this.database=e}return e.prototype.delete=function(){return _.__awaiter(this,void 0,void 0,function(){return _.__generator(this,function(e){return this.database.checkDeleted_("delete"),Sn.getInstance().deleteRepo(this.database.repo_),this.database.repo_=null,this.database.root_=null,this.database.INTERNAL=null,this.database=null,[2]})})},e}(),On=function(){un.forceDisallow(),on.forceAllow()},Nn=function(){on.forceDisallow()},Pn=function(){return un.isAvailable()},Rn=function(e,t){e.repo.persistentConnection_.securityDebugCallback_=t},An=function(e,t){e.repo.stats(t)},xn=function(e,t){e.repo.statsIncrementCounter(t)},Dn=function(e){return e.repo.dataUpdateCount},Ln=function(e,t){return e.repo.interceptServerData_(t)},Un=Object.freeze({forceLongPolling:On,forceWebSockets:Nn,isWebSocketsAvailable:Pn,setSecurityDebugCallback:Rn,stats:An,statsIncrementCounter:xn,dataUpdateCount:Dn,interceptServerData:Ln}),Mn=dn;dn.prototype.simpleListen=function(e,t){this.sendRequest("q",{p:e},t)},dn.prototype.echo=function(e,t){this.sendRequest("echo",{d:e},t)};var Fn=ln,jn=function(e){var t=dn.prototype.put;return dn.prototype.put=function(n,r,i,o){void 0!==o&&(o=e()),t.call(this,n,r,i,o)},function(){dn.prototype.put=t}},Bn=se,Wn=function(e){return e.queryIdentifier()},Vn=function(e){return e.repo.persistentConnection_.listens_}
1,Hn=function(e){Sn.getInstance().forceRestClient(e)},qn=Object.freeze({DataConnection:Mn,RealTimeConnection:Fn,hijackHash:jn,ConnectionTarget:Bn,queryIdentifier:Wn,listens:Vn,forceRestClient:Hn}),Kn=In.ServerValue;c(b),t.registerDatabase=c,t.Database=In,t.Query=ct,t.Reference=bn,t.enableLogging=A,t.ServerValue=Kn,t.DataSnapshot=it,t.OnDisconnect=Oe}).call(t,n(41))},function(e,t,n){"use strict";function r(e){o.forEach(function(t){t.logLevel=e})}Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"setLogLevel",function(){return r}),n.d(t,"Logger",function(){return u}),n.d(t,"LogLevel",function(){return i});var i,o=[];!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 a=i.INFO,s=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(!(t<e.logLevel)){var o=(new Date).toISOString();switch(t){case i.DEBUG:case i.VERBOSE:console.log.apply(console,["["+o+"] "+e.name+":"].concat(n));break;case i.INFO:console.info.apply(console,["["+o+"] "+e.name+":"].concat(n));break;case i.WARN:console.warn.apply(console,["["+o+"] "+e.name+":"].concat(n));break;case i.ERROR:console.error.apply(console,["["+o+"] "+e.name+":"].concat(n));break;default:throw new Error("Attempted to log a message with an invalid logType (value: "+t+")")}}},u=function(){function e(e){this.name=e,this._logLevel=a,this._logHandler=s,o.push(this)}return Object.defineProperty(e.prototype,"logLevel",{get:function(){return this._logLevel},set:function(e){if(!(e in i))throw new TypeError("Invalid value assigned to `logLevel`");this._logLevel=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"logHandler",{get:function(){return this._logHandler},set:function(e){if("function"!==typeof e)throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e},enumerable:!0,configurable:!0}),e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._logHandler.apply(this,[this,i.DEBUG].concat(e))},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._logHandler.apply(this,[this,i.VERBOSE].concat(e))},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._logHandler.apply(this,[this,i.INFO].concat(e))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._logHandler.apply(this,[this,i.WARN].concat(e))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._logHandler.apply(this,[this,i.ERROR].concat(e))},e}()},function(e,t,n){n(96)},function(e,t,n){"use strict";function r(e,t){if(null==e||null==t)return!1;if(e===t)return!0;if(e.byteLength!==t.byteLength)return!1;for(var n=new DataView(e),r=new DataView(t),i=0;i<e.byteLength;i++)if(n.getUint8(i)!==r.getUint8(i))return!1;return!0}function i(e){var t=new Uint8Array(e);return btoa(String.fromCharCode.apply(null,t))}function o(e){return i(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function a(e){for(var t="=".repeat((4-e.length%4)%4),n=(e+t).replace(/\-/g,"+").replace(/_/g,"/"),r=window.atob(n),i=new Uint8Array(r.length),o=0;o<r.length;++o)i[o]=r.charCodeAt(o);return i}function s(e){if(e.objectStoreNames.contains(O)){var t=e.transaction(O),n=t.objectStore(O),r=new I,i=n.openCursor();i.onerror=function(e){console.warn("Unable to cleanup old IDB.",e)},i.onsuccess=function(){var t=i.result;if(t){var n=t.value;r.deleteToken(n.fcmSenderId,n.fcmToken,n.fcmPushSet),t.continue()}else e.close(),indexedDB.deleteDatabase(k)}}}function u(){var e=indexedDB.open(k);e.onerror=function(e){},e.onsuccess=function(t){s(e.result)}}function c(e){return new Promise(function(t,n){e.onsuccess=function(){t(e.result)},e.onerror=function(){n(e.error)}})}function l(e){if(e.fcmToken&&("string"!==typeof e.fcmToken||0===e.fcmToken.length))throw E.create(b.BAD_TOKEN);if(e.swScope&&("string"!==typeof e.swScope||0===e.swScope.length))throw E.create(b.BAD_SCOPE);if(e.vapidKey&&(!(e.vapidKey instanceof Uint8Array)||65!==e.vapidKey.length))throw E.create(b.BAD_VAPID_KEY);if(e.endpoint&&("string"!==typeof e.endpoint||0===e.endpoint.length))throw E.create(b.BAD_SUBSCRIPTION);if(e.auth&&!(e.auth instanceof ArrayBuffer))throw E.create(b.BAD_SUBSCRIPTION);if(e.p256dh&&!(e.p256dh instanceof ArrayBuffer))throw E.create(b.BAD_SUBSCRIPTION);if(e.fcmSenderId&&("string"!==typeof e.fcmSenderId||0===e.fcmSenderId.length))throw E.create(b.BAD_SENDER_ID);if(e.fcmPushSet&&("string"!==typeof e.fcmPushSet||0===e.fcmPushSet.length))throw E.create(b.BAD_PUSH_SET)}function h(e,t,n){if(!r(t.buffer,n.vapidKey.buffer))return!1;var i=e.endpoint===n.endpoint,o=r(e.getKey("auth"),n.auth),a=r(e.getKey("p256dh"),n.p256dh);return i&&o&&a}function f(){return self.clients.matchAll({type:"window",includeUncontrolled:!0})}function p(e,t){return n={},n[v.TYPE_OF_MSG]=e,n[v.DATA]=t,n;var n}function d(e){var t=function(e){return self&&"ServiceWorkerGlobalScope"in self?new D(e):new L(e)},n={Messaging:L};e.INTERNAL.registerService("messaging",t,n)}
1Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"registerMessaging",function(){return d});var y,v,m=n(23),g=(n.n(m),n(24)),_=n(10),b={AVAILABLE_IN_WINDOW:"only-available-in-window",AVAILABLE_IN_SW:"only-available-in-sw",SHOULD_BE_INHERITED:"should-be-overriden",BAD_SENDER_ID:"bad-sender-id",INCORRECT_GCM_SENDER_ID:"incorrect-gcm-sender-id",PERMISSION_DEFAULT:"permission-default",PERMISSION_BLOCKED:"permission-blocked",UNSUPPORTED_BROWSER:"unsupported-browser",NOTIFICATIONS_BLOCKED:"notifications-blocked",FAILED_DEFAULT_REGISTRATION:"failed-serviceworker-registration",SW_REGISTRATION_EXPECTED:"sw-registration-expected",GET_SUBSCRIPTION_FAILED:"get-subscription-failed",INVALID_SAVED_TOKEN:"invalid-saved-token",SW_REG_REDUNDANT:"sw-reg-redundant",TOKEN_SUBSCRIBE_FAILED:"token-subscribe-failed",TOKEN_SUBSCRIBE_NO_TOKEN:"token-subscribe-no-token",TOKEN_SUBSCRIBE_NO_PUSH_SET:"token-subscribe-no-push-set",TOKEN_UNSUBSCRIBE_FAILED:"token-unsubscribe-failed",TOKEN_UPDATE_FAILED:"token-update-failed",TOKEN_UPDATE_NO_TOKEN:"token-update-no-token",USE_SW_BEFORE_GET_TOKEN:"use-sw-before-get-token",INVALID_DELETE_TOKEN:"invalid-delete-token",DELETE_TOKEN_NOT_FOUND:"delete-token-not-found",DELETE_SCOPE_NOT_FOUND:"delete-scope-not-found",BG_HANDLER_FUNCTION_EXPECTED:"bg-handler-function-expected",NO_WINDOW_CLIENT_TO_MSG:"no-window-client-to-msg",UNABLE_TO_RESUBSCRIBE:"unable-to-resubscribe",NO_FCM_TOKEN_FOR_RESUBSCRIBE:"no-fcm-token-for-resubscribe",FAILED_TO_DELETE_TOKEN:"failed-to-delete-token",NO_SW_IN_REG:"no-sw-in-reg",BAD_SCOPE:"bad-scope",BAD_VAPID_KEY:"bad-vapid-key",BAD_SUBSCRIPTION:"bad-subscription",BAD_TOKEN:"bad-token",BAD_PUSH_SET:"bad-push-set",FAILED_DELETE_VAPID_KEY:"failed-delete-vapid-key",INVALID_PUBLIC_VAPID_KEY:"invalid-public-vapid-key",USE_PUBLIC_KEY_BEFORE_GET_TOKEN:"use-public-key-before-get-token",PUBLIC_KEY_DECRYPTION_FAILED:"public-vapid-key-decryption-failed"},w=(y={},y[b.AVAILABLE_IN_WINDOW]="This method is available in a Window context.",y[b.AVAILABLE_IN_SW]="This method is available in a service worker context.",y[b.SHOULD_BE_INHERITED]="This method should be overriden by extended classes.",y[b.BAD_SENDER_ID]="Please ensure that 'messagingSenderId' is set correctly in the options passed into firebase.initializeApp().",y[b.PERMISSION_DEFAULT]="The required permissions were not granted and dismissed instead.",y[b.PERMISSION_BLOCKED]="The required permissions were not granted and blocked instead.",y[b.UNSUPPORTED_BROWSER]="This browser doesn't support the API's required to use the firebase SDK.",y[b.NOTIFICATIONS_BLOCKED]="Notifications have been blocked.",y[b.FAILED_DEFAULT_REGISTRATION]="We are unable to register the default service worker. {$browserErrorMessage}",y[b.SW_REGISTRATION_EXPECTED]="A service worker registration was the expected input.",y[b.GET_SUBSCRIPTION_FAILED]="There was an error when trying to get any existing Push Subscriptions.",y[b.INVALID_SAVED_TOKEN]="Unable to access details of the saved token.",y[b.SW_REG_REDUNDANT]="The service worker being used for push was made redundant.",y[b.TOKEN_SUBSCRIBE_FAILED]="A problem occured while subscribing the user to FCM: {$message}",y[b.TOKEN_SUBSCRIBE_NO_TOKEN]="FCM returned no token when subscribing the user to push.",y[b.TOKEN_SUBSCRIBE_NO_PUSH_SET]="FCM returned an invalid response when getting an FCM token.",y[b.TOKEN_UNSUBSCRIBE_FAILED]="A problem occured while unsubscribing the user from FCM: {$message}",y[b.TOKEN_UPDATE_FAILED]="A problem occured while updating the user from FCM: {$message}",y[b.TOKEN_UPDATE_NO_TOKEN]="FCM returned no token when updating the user to push.",y[b.USE_SW_BEFORE_GET_TOKEN]="The useServiceWorker() method may only be called once and must be called before calling getToken() to ensure your service worker is used.",y[b.INVALID_DELETE_TOKEN]="You must pass a valid token into deleteToken(), i.e. the token from getToken().",y[b.DELETE_TOKEN_NOT_FOUND]="The deletion attempt for token could not be performed as the token was not found.",y[b.DELETE_SCOPE_NOT_FOUND]="The deletion attempt for service worker scope could not be performed as the scope was not found.",y[b.BG_HANDLER_FUNCTION_EXPECTED]="The input to setBackgroun
1dMessageHandler() must be a function.",y[b.NO_WINDOW_CLIENT_TO_MSG]="An attempt was made to message a non-existant window client.",y[b.UNABLE_TO_RESUBSCRIBE]="There was an error while re-subscribing the FCM token for push messaging. Will have to resubscribe the user on next visit. {$message}",y[b.NO_FCM_TOKEN_FOR_RESUBSCRIBE]="Could not find an FCM token and as a result, unable to resubscribe. Will have to resubscribe the user on next visit.",y[b.FAILED_TO_DELETE_TOKEN]="Unable to delete the currently saved token.",y[b.NO_SW_IN_REG]="Even though the service worker registration was successful, there was a problem accessing the service worker itself.",y[b.INCORRECT_GCM_SENDER_ID]="Please change your web app manifest's 'gcm_sender_id' value to '103953800507' to use Firebase messaging.",y[b.BAD_SCOPE]="The service worker scope must be a string with at least one character.",y[b.BAD_VAPID_KEY]="The public VAPID key is not a Uint8Array with 65 bytes.",y[b.BAD_SUBSCRIPTION]="The subscription must be a valid PushSubscription.",y[b.BAD_TOKEN]="The FCM Token used for storage / lookup was not a valid token string.",y[b.BAD_PUSH_SET]="The FCM push set used for storage / lookup was not not a valid push set string.",y[b.FAILED_DELETE_VAPID_KEY]="The VAPID key could not be deleted.",y[b.INVALID_PUBLIC_VAPID_KEY]="The public VAPID key must be a string.",y[b.PUBLIC_KEY_DECRYPTION_FAILED]="The public VAPID key did not equal 65 bytes when decrypted.",y),E=new m.ErrorFactory("messaging","Messaging",w),C=new Uint8Array([4,51,148,247,223,161,235,177,220,3,162,94,21,113,219,72,211,46,237,237,178,52,219,183,71,58,12,143,196,204,225,111,60,140,132,223,171,182,102,62,242,12,212,139,254,227,249,118,47,20,28,99,8,106,111,45,177,26,149,176,206,55,192,156,110]),T="https://fcm.googleapis.com";!function(e){e.TYPE_OF_MSG="firebase-messaging-msg-type",e.DATA="firebase-messaging-msg-data"}(v||(v={}));var S;!function(e){e.PUSH_MSG_RECEIVED="push-msg-received",e.NOTIFICATION_CLICKED="notification-clicked"}(S||(S={}));var I=function(){function e(){}return e.prototype.getToken=function(e,t,n){return Object(g.__awaiter)(this,void 0,void 0,function(){var r,i,a,s,u,c,l,h,f,p;return Object(g.__generator)(this,function(d){switch(d.label){case 0:r=o(t.getKey("p256dh")),i=o(t.getKey("auth")),a="authorized_entity="+e+"&endpoint="+t.endpoint+"&encryption_key="+r+"&encryption_auth="+i,n!==C&&(s=o(n),a+="&application_pub_key="+s),u=new Headers,u.append("Content-Type","application/x-www-form-urlencoded"),c={method:"POST",headers:u,body:a},d.label=1;case 1:return d.trys.push([1,4,,5]),[4,fetch(T+"/fcm/connect/subscribe",c)];case 2:return h=d.sent(),[4,h.json()];case 3:return l=d.sent(),[3,5];case 4:throw f=d.sent(),E.create(b.TOKEN_SUBSCRIBE_FAILED);case 5:if(l.error)throw p=l.error.message,E.create(b.TOKEN_SUBSCRIBE_FAILED,{message:p});if(!l.token)throw E.create(b.TOKEN_SUBSCRIBE_NO_TOKEN);if(!l.pushSet)throw E.create(b.TOKEN_SUBSCRIBE_NO_PUSH_SET);return[2,{token:l.token,pushSet:l.pushSet}]}})})},e.prototype.updateToken=function(e,t,n,r,i){return Object(g.__awaiter)(this,void 0,void 0,function(){var a,s,u,c,l,h,f,p,d,y;return Object(g.__generator)(this,function(v){switch(v.label){case 0:a=o(r.getKey("p256dh")),s=o(r.getKey("auth")),u="push_set="+n+"&token="+t+"&authorized_entity="+e+"&endpoint="+r.endpoint+"&encryption_key="+a+"&encryption_auth="+s,i!==C&&(c=o(i),u+="&application_pub_key="+c),l=new Headers,l.append("Content-Type","application/x-www-form-urlencoded"),h={method:"POST",headers:l,body:u},v.label=1;case 1:return v.trys.push([1,4,,5]),[4,fetch(T+"/fcm/connect/subscribe",h)];case 2:return p=v.sent(),[4,p.json()];case 3:return f=v.sent(),[3,5];case 4:throw d=v.sent(),E.create(b.TOKEN_UPDATE_FAILED);case 5:if(f.error)throw y=f.error.message,E.create(b.TOKEN_UPDATE_FAILED,{message:y});if(!f.token)throw E.create(b.TOKEN_UPDATE_NO_TOKEN);return[2,f.token]}})})},e.prototype.deleteToken=function(e,t,n){return Object(g.__awaiter)(this,void 0,void 0,function(){var r,i,o,a,s,u,c;return Object(g.__generator)(this,function(l){switch(l.label){case 0:r="authorized_entity="+e+"&token="+t+"&pushSet="+n,i=new Headers,i.append("Content-Type","application/x-www-form-urlencoded"),o={method:"POST",headers:i,body:r},l.label=1;case 1:return l.trys.push([1,4,,5]),[4,fetch(T+"/fcm/connect/unsubscribe",o)];case 2:return a=l.sent(),[4,a.json()];case 3:if(s=l.sent(),s.error)throw u=s.error.message,E.create(b.TOKEN_UNSUBSCRIBE_FAILED,{message:u});return[3,5];case 4:throw c=l.sent(),E.create(b.TOKEN_UNSUBSCRIBE_FAILED);case 5:return[2]}})})},e}(),k="undefined",O="fcm_token_object_Store",N=function(){function e(){this.dbPromise=null}return e.prototype.get=function(e){return this.createTransaction(function(t){return t.get(e)})},e.prototype.getIndex=function(e,t){function n(n){return n.index(e).get(t)}return this.createTransaction(n)},e.prototype.put=function(e){return this.createTransaction(function(t){return t.put(e)},"readwrite")},e.prototype.delete=function(e){return this.createTransaction(function(t){return t.delete(e)},"readwrite")},e.prototype.closeDatabase=function(){return Object(g.__awaiter)(this,void 0,void 0,function(){var e;return Object(g.__generator)(this,function(t){switch(t.label){case 0:return this.dbPromise?[4,this.dbPromise]:[3,2];case 1:e=t.sent(),e.close(),this.dbPromise=null,t.label=2;case 2:return[2]}})})},e.prototype.createTransaction=function(e,t){return Object(g.__awaiter)(this,void 0,void 0,function(){var n,r,i,o;return Object(g.__generator)(this,function(a){switch(a.label){case 0:return[4,this.getDb()];case 1:return n=a.sent(),r=n.transaction(this.objectStoreName,t),i=r.objectStore(this.objectStoreName),[4,c(e(i))];case 2:return o=a.sent(),[2,new Promise(function(e,t){r.oncomplete=function(){e(o)},r.onerror=function(){t(r.error)}})]}})})},e.prototype.getDb=function(){var e=this;return this.dbPromise||(this.dbPromise=new Promise(function(t,n){var r=indexedDB.open(e.dbName,e.dbVersion);r.onsuccess=function(){t(r.result)},r.onerror=function(){e.dbPromise=null,n(r.error)},r.onupgradeneeded=function(t){return e.onDbUpgrade(r,t)}})),this.dbPromise},e}(),P=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.dbName="fcm_token_details_db",t.dbVersion=3,t.objectStoreName="fcm_token_object_Store",t}return Object(g.__extends)(t,e),t.prototype.onDbUpgrade=function(e,t){var n=e.result;switch(t.oldVersion){case 0:var r=n.createObjectStore(this.objectStoreName,{keyPath:"swScope"});r.createIndex("fcmSenderId","fcmSenderId",{unique:!1}),r.createIndex("fcmToken","fcmToken",{unique:!0});case 1:u();case 2:var r=e.transaction.objectStore(this.objectStoreName),i=r.openCursor();i.onsuccess=function(){var e=i.result;if(e){var t=e.value,n=Object(g.__assign)({},t);t.createTime||(n.createTime=Date.now()),"string"===typeof t.vapidKey&&(n.vapidKey=a(t.vapidKey)),"string"===typeof t.auth&&(n.auth=a(t.auth).buffer),"string"===typeof t.auth&&(n.p256dh=a(t.p256dh).buffer),e.update(n),e.continue()}}}},t.prototype.getTokenDetailsFromToken=function(e){return Object(g.__awaiter)(this,void 0,void 0,function(){return Object(g.__generator)(this,function(t){if(!e)throw E.create(b.BAD_TOKEN);return l({fcmToken:e}),[2,this.getIndex("fcmToken",e)]})})},t.prototype.getTokenDetailsFromSWScope=function(e){return Object(g.__awaiter)(this,void 0,void 0,function(){return Object(g.__generator)(this,function(t){if(!e)throw E.create(b.BAD_SCOPE);return l({swScope:e}),[2,this.get(e)]})})},t.prototype.saveTokenDetails=function(e){return Object(g.__awaiter)(this,void 0,void 0,function(){return Object(g.__generator)(this,function(t){if(!e.swScope)throw E.create(b.BAD_SCOPE);if(!e.vapidKey)throw E.create(b.BAD_VAPID_KEY);if(!e.endpoint||!e.auth||!e.p256dh)throw E.create(b.BAD_SUBSCRIPTION);if(!e.fcmSenderId)throw E.create(b.BAD_SENDER_ID);if(!e.fcmToken)throw E.create(b.BAD_TOKEN);if(!e.fcmPushSet)throw E.create(b.BAD_PUSH_SET);return l(e),[2,this.put(e)]})})},t.prototype.deleteToken=function(e){return Object(g.__awaiter)(this,void 0,void 0,function(){var t;return Object(g.__generator)(this,function(n){switch(n.label){case 0:return"string"!==typeof e||0===e.length?[2,Promise.reject(E.create(b.INVALID_DELETE_TOKEN))]:[4,this.getTokenDetailsFromToken(e)];case 1:if(!(t=n.sent()))throw E.create(b.DELETE_TOKEN_NOT_FOUND);return[4,this.delete(t.swScope)];case 2:return n.sent(),[2,t]}})})},t}(N),R=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.dbName="fcm_vapid_details_db",t.dbVersion=1,t.objectStoreName="fcm_vapid_object_Store",t}return Object(g.__extends)(t,e),t.prototype.onDbUpgrade=function(e){e.result.createObjectStore(this.objectStoreName,{keyPath:"swScope"})},t.prototype.getVapidFromSWScope=function(e){return Object(g.__awaiter)(this,void 0,void 0,function(){var t;return Object(g.__generator)(this,function(n){switch(n.label){case 0:if("string"!==typeof e||0===e.length)throw E.create(b.BAD_SCOPE);return[4,this.get(e)];case 1:return t=n.sent(),[2,t?t.vapidKey:void 0]}})})},t.prototype.saveVapidDetails=function(e,t){return Object(g.__awaiter)(this,void 0,void 0,function(){var n;return Object(g.__generator)(this,function(r){if("string"!==typeof e||0===e.length)throw E.create(b.BAD_SCOPE);if(null===t||65!==t.length)throw E.create(b.BAD_VAPID_KEY);return n={swScope:e,vapidKey:t},[2,this.put(n)]})})},t.prototype.deleteVapidDetails=function(e){return Object(g.__awaiter)(this,void 0,void 0,function(){var t;return Object(g.__generator)(this,function(n){switch(n.label){case 0:return[4,this.getVapidFromSWScope(e)];case 1:if(!(t=n.sent()))throw E.create(b.DELETE_SCOPE_NOT_FOUND);return[4,this.delete(e)];case 2:return n.sent(),[2,t]}})})},t}(N),A="messagingSenderId",x=function(){function e(e){var t=this;
1if(!e.options[A]||"string"!==typeof e.options[A])throw E.create(b.BAD_SENDER_ID);this.messagingSenderId=e.options[A],this.tokenDetailsModel=new P,this.vapidDetailsModel=new R,this.iidModel=new I,this.app=e,this.INTERNAL={delete:function(){return t.delete()}}}return e.prototype.getToken=function(){return Object(g.__awaiter)(this,void 0,void 0,function(){var e,t,n,r,i;return Object(g.__generator)(this,function(o){switch(o.label){case 0:return e=this.getNotificationPermission_(),"granted"!==e?"denied"===e?[2,Promise.reject(E.create(b.NOTIFICATIONS_BLOCKED))]:[2,Promise.resolve(null)]:[4,this.getSWRegistration_()];case 1:return t=o.sent(),[4,this.getPublicVapidKey_()];case 2:return n=o.sent(),[4,this.getPushSubscription(t,n)];case 3:return r=o.sent(),[4,this.tokenDetailsModel.getTokenDetailsFromSWScope(t.scope)];case 4:return i=o.sent(),i?[2,this.manageExistingToken(t,r,n,i)]:[2,this.getNewToken(t,r,n)]}})})},e.prototype.manageExistingToken=function(e,t,n,r){return Object(g.__awaiter)(this,void 0,void 0,function(){var i,o;return Object(g.__generator)(this,function(a){switch(a.label){case 0:return i=h(t,n,r),i?(o=Date.now(),o<r.createTime+6048e5?[2,r.fcmToken]:[2,this.updateToken(e,t,n,r)]):[4,this.deleteTokenFromDB(r.fcmToken)];case 1:return a.sent(),[2,this.getNewToken(e,t,n)]}})})},e.prototype.updateToken=function(e,t,n,r){return Object(g.__awaiter)(this,void 0,void 0,function(){var i,o,a;return Object(g.__generator)(this,function(s){switch(s.label){case 0:return s.trys.push([0,4,,6]),[4,this.iidModel.updateToken(this.messagingSenderId,r.fcmToken,r.fcmPushSet,t,n)];case 1:return i=s.sent(),o={swScope:e.scope,vapidKey:n,fcmSenderId:this.messagingSenderId,fcmToken:i,fcmPushSet:r.fcmPushSet,createTime:Date.now(),endpoint:t.endpoint,auth:t.getKey("auth"),p256dh:t.getKey("p256dh")},[4,this.tokenDetailsModel.saveTokenDetails(o)];case 2:return s.sent(),[4,this.vapidDetailsModel.saveVapidDetails(e.scope,n)];case 3:return s.sent(),[2,i];case 4:return a=s.sent(),[4,this.deleteToken(r.fcmToken)];case 5:throw s.sent(),a;case 6:return[2]}})})},e.prototype.getNewToken=function(e,t,n){return Object(g.__awaiter)(this,void 0,void 0,function(){var r,i;return Object(g.__generator)(this,function(o){switch(o.label){case 0:return[4,this.iidModel.getToken(this.messagingSenderId,t,n)];case 1:return r=o.sent(),i={swScope:e.scope,vapidKey:n,fcmSenderId:this.messagingSenderId,fcmToken:r.token,fcmPushSet:r.pushSet,createTime:Date.now(),endpoint:t.endpoint,auth:t.getKey("auth"),p256dh:t.getKey("p256dh")},[4,this.tokenDetailsModel.saveTokenDetails(i)];case 2:return o.sent(),[4,this.vapidDetailsModel.saveVapidDetails(e.scope,n)];case 3:return o.sent(),[2,r.token]}})})},e.prototype.deleteToken=function(e){return Object(g.__awaiter)(this,void 0,void 0,function(){var t,n;return Object(g.__generator)(this,function(r){switch(r.label){case 0:return[4,this.deleteTokenFromDB(e)];case 1:return r.sent(),[4,this.getSWRegistration_()];case 2:return t=r.sent(),t?[4,t.pushManager.getSubscription()]:[3,4];case 3:if(n=r.sent())return[2,n.unsubscribe()];r.label=4;case 4:return[2,!0]}})})},e.prototype.deleteTokenFromDB=function(e){return Object(g.__awaiter)(this,void 0,void 0,function(){var t;return Object(g.__generator)(this,function(n){switch(n.label){case 0:return[4,this.tokenDetailsModel.deleteToken(e)];case 1:return t=n.sent(),[4,this.iidModel.deleteToken(t.fcmSenderId,t.fcmToken,t.fcmPushSet)];case 2:return n.sent(),[2]}})})},e.prototype.getPushSubscription=function(e,t){return e.pushManager.getSubscription().then(function(n){return n||e.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:t})})},e.prototype.requestPermission=function(){throw E.create(b.AVAILABLE_IN_WINDOW)},e.prototype.useServiceWorker=function(e){throw E.create(b.AVAILABLE_IN_WINDOW)},e.prototype.usePublicVapidKey=function(e){throw E.create(b.AVAILABLE_IN_WINDOW)},e.prototype.onMessage=function(e,t,n){throw E.create(b.AVAILABLE_IN_WINDOW)},e.prototype.onTokenRefresh=function(e,t,n){throw E.create(b.AVAILABLE_IN_WINDOW)},e.prototype.setBackgroundMessageHandler=function(e){throw E.create(b.AVAILABLE_IN_SW)},e.prototype.delete=function(){return Object(g.__awaiter)(this,void 0,void 0,function(){return Object(g.__generator)(this,function(e){switch(e.label){case 0:return[4,Promise.all([this.tokenDetailsModel.closeDatabase(),this.vapidDetailsModel.closeDatabase()])];case 1:return e.sent(),[2]}})})},e.prototype.getNotificationPermission_=function(){return Notification.permission},e.prototype.getTokenDetailsModel=function(){return this.tokenDetailsModel},e.prototype.getVapidDetailsModel=function(){return this.vapidDetailsModel},e.prototype.getIIDModel=function(){return this.iidModel},e}(),D=function(e){function t(t){var n=e.call(this,t)||this;return n.bgMessageHandler=null,self.addEventListener("push",function(e){n.onPush(e)}),self.addEventListener("pushsubscriptionchange",function(e){n.onSubChange(e)}
1),self.addEventListener("notificationclick",function(e){n.onNotificationClick(e)}),n}return Object(g.__extends)(t,e),t.prototype.onPush=function(e){e.waitUntil(this.onPush_(e))},t.prototype.onSubChange=function(e){e.waitUntil(this.onSubChange_(e))},t.prototype.onNotificationClick=function(e){e.waitUntil(this.onNotificationClick_(e))},t.prototype.onPush_=function(e){return Object(g.__awaiter)(this,void 0,void 0,function(){var t,n,r,i,o;return Object(g.__generator)(this,function(a){switch(a.label){case 0:if(!e.data)return[2];try{t=e.data.json()}catch(e){return[2]}return[4,this.hasVisibleClients_()];case 1:return(n=a.sent())?t.notification||this.bgMessageHandler?[2,this.sendMessageToWindowClients_(t)]:[2]:(r=this.getNotificationData_(t))?(i=r.title||"",[4,this.getSWRegistration_()]):[3,3];case 2:return o=a.sent(),[2,o.showNotification(i,r)];case 3:return this.bgMessageHandler?[4,this.bgMessageHandler(t)]:[3,5];case 4:return a.sent(),[2];case 5:return[2]}})})},t.prototype.onSubChange_=function(e){return Object(g.__awaiter)(this,void 0,void 0,function(){var e,t,n,r,i;return Object(g.__generator)(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,this.getSWRegistration_()];case 1:return e=o.sent(),[3,3];case 2:throw t=o.sent(),E.create(b.UNABLE_TO_RESUBSCRIBE,{message:t});case 3:return o.trys.push([3,5,,8]),[4,e.pushManager.getSubscription()];case 4:return o.sent(),[3,8];case 5:return n=o.sent(),r=this.getTokenDetailsModel(),[4,r.getTokenDetailsFromSWScope(e.scope)];case 6:if(!(i=o.sent()))throw n;return[4,this.deleteToken(i.fcmToken)];case 7:throw o.sent(),n;case 8:return[2]}})})},t.prototype.onNotificationClick_=function(e){return Object(g.__awaiter)(this,void 0,void 0,function(){var t,n,r,i;return Object(g.__generator)(this,function(o){switch(o.label){case 0:return e.notification&&e.notification.data&&e.notification.data.FCM_MSG?(e.stopImmediatePropagation(),e.notification.close(),t=e.notification.data.FCM_MSG,t.notification?(n=t.notification.click_action,n?[4,this.getWindowClient_(n)]:[2]):[2]):[2];case 1:return r=o.sent(),r?[3,3]:[4,self.clients.openWindow(n)];case 2:return r=o.sent(),[3,5];case 3:return[4,r.focus()];case 4:r=o.sent(),o.label=5;case 5:return r?(delete t.notification,i=p(S.NOTIFICATION_CLICKED,t),[2,this.attemptToMessageClient_(r,i)]):[2]}})})},t.prototype.getNotificationData_=function(e){if(e&&"object"===typeof e.notification){var t=Object(g.__assign)({},e.notification);return t.data=(n={},n.FCM_MSG=e,n),t;var n}},t.prototype.setBackgroundMessageHandler=function(e){if(!e||"function"!==typeof e)throw E.create(b.BG_HANDLER_FUNCTION_EXPECTED);this.bgMessageHandler=e},t.prototype.getWindowClient_=function(e){return Object(g.__awaiter)(this,void 0,void 0,function(){var t,n,r,i,o;return Object(g.__generator)(this,function(a){switch(a.label){case 0:return t=new URL(e,self.location.href).href,[4,f()];case 1:for(n=a.sent(),r=null,i=0;i<n.length;i++)if((o=new URL(n[i].url,self.location.href).href)===t){r=n[i];break}return[2,r]}})})},t.prototype.attemptToMessageClient_=function(e,t){return Object(g.__awaiter)(this,void 0,void 0,function(){return Object(g.__generator)(this,function(n){if(!e)throw E.create(b.NO_WINDOW_CLIENT_TO_MSG);return e.postMessage(t),[2]})})},t.prototype.hasVisibleClients_=function(){return Object(g.__awaiter)(this,void 0,void 0,function(){var e;return Object(g.__generator)(this,function(t){switch(t.label){case 0:return[4,f()];case 1:return e=t.sent(),[2,e.some(function(e){return"visible"===e.visibilityState})]}})})},t.prototype.sendMessageToWindowClients_=function(e){return Object(g.__awaiter)(this,void 0,void 0,function(){var t,n,r=this;return Object(g.__generator)(this,function(i){switch(i.label){case 0:return[4,f()];case 1:return t=i.sent(),n=p(S.PUSH_MSG_RECEIVED,e),[4,Promise.all(t.map(function(e){return r.attemptToMessageClient_(e,n)}))];case 2:return i.sent(),[2]}})})},t.prototype.getSWRegistration_=function(){return Object(g.__awaiter)(this,void 0,void 0,function(){return Object(g.__generator)(this,function(e){return[2,self.registration]})})},t.prototype.getPublicVapidKey_=function(){return Object(g.__awaiter)(this,void 0,void 0,function(){var e,t;return Object(g.__generator)(this,function(n){switch(n.label){case 0:return[4,this.get
1SWRegistration_()];case 1:if(!(e=n.sent()))throw E.create(b.SW_REGISTRATION_EXPECTED);return[4,this.getVapidDetailsModel().getVapidFromSWScope(e.scope)];case 2:return t=n.sent(),null==t?[2,C]:[2,t]}})})},t}(x),L=function(e){function t(t){var n=e.call(this,t)||this;return n.registrationToUse=null,n.publicVapidKeyToUse=null,n.manifestCheckPromise=null,n.messageObserver=null,n.tokenRefreshObserver=null,n.onMessageInternal=Object(m.createSubscribe)(function(e){n.messageObserver=e}),n.onTokenRefreshInternal=Object(m.createSubscribe)(function(e){n.tokenRefreshObserver=e}),n.setupSWMessageListener_(),n}return Object(g.__extends)(t,e),t.prototype.getToken=function(){var t=this;return this.isSupported_()?this.manifestCheck_().then(function(){return e.prototype.getToken.call(t)}):Promise.reject(E.create(b.UNSUPPORTED_BROWSER))},t.prototype.manifestCheck_=function(){if(this.manifestCheckPromise)return this.manifestCheckPromise;var e=document.querySelector('link[rel="manifest"]');return this.manifestCheckPromise=e?fetch(e.href).then(function(e){return e.json()}).catch(function(){}).then(function(e){if(e&&e.gcm_sender_id&&"103953800507"!==e.gcm_sender_id)throw E.create(b.INCORRECT_GCM_SENDER_ID)}):Promise.resolve(),this.manifestCheckPromise},t.prototype.requestPermission=function(){return Object(g.__awaiter)(this,void 0,void 0,function(){return Object(g.__generator)(this,function(e){return"granted"===Notification.permission?[2]:[2,new Promise(function(e,t){var n=function(n){return"granted"===n?e():t("denied"===n?E.create(b.PERMISSION_BLOCKED):E.create(b.PERMISSION_DEFAULT))},r=Notification.requestPermission(n);r&&r.then(n)})]})})},t.prototype.useServiceWorker=function(e){if(!(e instanceof ServiceWorkerRegistration))throw E.create(b.SW_REGISTRATION_EXPECTED);if(null!=this.registrationToUse)throw E.create(b.USE_SW_BEFORE_GET_TOKEN);this.registrationToUse=e},t.prototype.usePublicVapidKey=function(e){if("string"!==typeof e)throw E.create(b.INVALID_PUBLIC_VAPID_KEY);if(null!=this.publicVapidKeyToUse)throw E.create(b.USE_PUBLIC_KEY_BEFORE_GET_TOKEN);var t=a(e);if(65!==t.length)throw E.create(b.PUBLIC_KEY_DECRYPTION_FAILED);this.publicVapidKeyToUse=t},t.prototype.onMessage=function(e,t,n){return"function"===typeof e?this.onMessageInternal(e,t,n):this.onMessageInternal(e)},t.prototype.onTokenRefresh=function(e,t,n){return"function"===typeof e?this.onTokenRefreshInternal(e,t,n):this.onTokenRefreshInternal(e)},t.prototype.waitForRegistrationToActivate_=function(e){var t=e.installing||e.waiting||e.active;return new Promise(function(n,r){if(!t)return void r(E.create(b.NO_SW_IN_REG));if("activated"===t.state)return void n(e);if("redundant"===t.state)return void r(E.create(b.SW_REG_REDUNDANT));var i=function(){if("activated"===t.state)n(e);else{if("redundant"!==t.state)return;r(E.create(b.SW_REG_REDUNDANT))}t.removeEventListener("statechange",i)};t.addEventListener("statechange",i)})},t.prototype.getSWRegistration_=function(){var e=this;return this.registrationToUse?this.waitForRegistrationToActivate_(this.registrationToUse):(this.registrationToUse=null,navigator.serviceWorker.register("/firebase-messaging-sw.js",{scope:"/firebase-cloud-messaging-push-scope"}).catch(function(e){throw E.create(b.FAILED_DEFAULT_REGISTRATION,{browserErrorMessage:e.message})}).then(function(t){return e.waitForRegistrationToActivate_(t).then(function(){return e.registrationToUse=t,t.update(),t})}))},t.prototype.getPublicVapidKey_=function(){return this.publicVapidKeyToUse?Promise.resolve(this.publicVapidKeyToUse):Promise.resolve(C)},t.prototype.setupSWMessageListener_=function(){var e=this;"serviceWorker"in navigator&&navigator.serviceWorker.addEventListener("message",function(t){if(t.data&&t.data[v.TYPE_OF_MSG]){var n=t.data;switch(n[v.TYPE_OF_MSG]){case S.PUSH_MSG_RECEIVED:case S.NOTIFICATION_CLICKED:var r=n[v.DATA];e.messageObserver&&e.messageObserver.next(r)}}},!1)},t.prototype.isSupported_=function(){return"serviceWorker"in navigator&&"PushManager"in window&&"Notification"in window&&"fetch"in window&&ServiceWorkerRegistration.prototype.hasOwnProperty("showNotification")&&PushSub
1scription.prototype.hasOwnProperty("getKey")},t}(x);d(_.default)},function(e,t,n){n(98)},function(e,t,n){"use strict";function r(e){return"storage/"+e}function i(){return new et(tt.UNKNOWN,"An unknown error occurred, please check the error payload for server response.")}function o(e){return new et(tt.OBJECT_NOT_FOUND,"Object '"+e+"' does not exist.")}function a(e){return new et(tt.QUOTA_EXCEEDED,"Quota for bucket '"+e+"' exceeded, please view quota on https://firebase.google.com/pricing/.")}function s(){return new et(tt.UNAUTHENTICATED,"User is not authenticated, please authenticate using Firebase Authentication and try again.")}function u(e){return new et(tt.UNAUTHORIZED,"User does not have permission to access '"+e+"'.")}function c(){return new et(tt.RETRY_LIMIT_EXCEEDED,"Max retry time for operation exceeded, please try again.")}function l(){return new et(tt.CANCELED,"User canceled the upload/download.")}function h(e){return new et(tt.INVALID_URL,"Invalid URL '"+e+"'.")}function f(e){return new et(tt.INVALID_DEFAULT_BUCKET,"Invalid default bucket '"+e+"'.")}function p(){return new et(tt.CANNOT_SLICE_BLOB,"Cannot slice blob for upload. Please retry the upload.")}function d(){return new et(tt.SERVER_FILE_WRONG_SIZE,"Server recorded incorrect upload file size, please retry the upload.")}function y(){return new et(tt.NO_DOWNLOAD_URL,"The given file does not have any download URLs.")}function v(e,t,n){return new et(tt.INVALID_ARGUMENT,"Invalid argument in `"+t+"` at index "+e+": "+n)}function m(e,t,n,r){var i,o;return e===t?(i=e,o=1===e?"argument":"arguments"):(i="between "+e+" and "+t,o="arguments"),new et(tt.INVALID_ARGUMENT_COUNT,"Invalid argument count in `"+n+"`: Expected "+i+" "+o+", received "+r+".")}function g(){return new et(tt.APP_DELETED,"The Firebase app was deleted.")}function _(e){return new et(tt.INVALID_ROOT_OPERATION,"The operation '"+e+"' cannot be performed on a root reference, create a non-root reference using child, such as .child('file.png').")}function b(e,t){return new et(tt.INVALID_FORMAT,"String does not match format '"+e+"': "+t)}function w(e){throw new et(tt.INTERNAL_ERROR,"Internal error: "+e)}function E(e){switch(e){case nt.RAW:case nt.BASE64:case nt.BASE64URL:case nt.DATA_URL:return;default:throw"Expected one of the event types: ["+nt.RAW+", "+nt.BASE64+", "+nt.BASE64URL+", "+nt.DATA_URL+"]."}}function C(e,t){switch(e){case nt.RAW:return new rt(T(t));case nt.BASE64:case nt.BASE64URL:return new rt(I(e,t));case nt.DATA_URL:return new rt(k(t),O(t))}throw i()}function T(e){for(var t=[],n=0;n<e.length;n++){var r=e.charCodeAt(n);if(r<=127)t.push(r);else if(r<=2047)t.push(192|r>>6,128|63&r);else if(55296==(64512&r)){var i=n<e.length-1&&56320==(64512&e.charCodeAt(n+1));if(i){var o=r,a=e.charCodeAt(++n);r=65536|(1023&o)<<10|1023&a,t.push(240|r>>18,128|r>>12&63,128|r>>6&63,128|63&r)}else t.push(239,191,189)}else 56320==(64512&r)?t.push(239,191,189):t.push(224|r>>12,128|r>>6&63,128|63&r)}return new Uint8Array(t)}function S(e){var t;try{t=decodeURIComponent(e)}catch(e){throw b(nt.DATA_URL,"Malformed data URL.")}return T(t)}function I(e,t){switch(e){case nt.BASE64:var n=-1!==t.indexOf("-"),r=-1!==t.indexOf("_");if(n||r){var i=n?"-":"_";throw b(e,"Invalid character '"+i+"' found: is it base64url encoded?")}break;case nt.BASE64URL:var o=-1!==t.indexOf("+"),a=-1!==t.indexOf("/");if(o||a){var i=o?"+":"/";throw b(e,"Invalid character '"+i+"' found: is it base64 encoded?")}t=t.replace(/-/g,"+").replace(/_/g,"/")}var s;try{s=atob(t)}catch(t){throw b(e,"Invalid character found")}for(var u=new Uint8Array(s.length),c=0;c<s.length;c++)u[c]=s.charCodeAt(c);return u}function k(e){var t=new it(e);return t.base64?I(nt.BASE64,t.rest):S(t.rest)}function O(e){return new it(e).contentType}function N(e,t){return!!(e.length>=t.length)&&e.substring(e.length-t.length)===t}function P(e){switch(e){case at.RUNNING:case at.PAUSING:case at.CANCELING:return st.RUNNING;case at.PAUSED:return st.PAUSED;case at.SUCCESS:return st.SUCCESS;case at.CANCELED:return st.CANCELED;case at.ERROR:default:return st.ERROR}}function R(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function A(e,t){for(var n in e)R(e,n)&&t(n,e[n])}function x(e){if(null==e)return{};var t={};return A(e,function(e,n){t[e]=n}),t}function D(e){return new Promise(e)}function L(e){return Promise.resolve(e)}function U(e){return Promise.reject(e)}function M(e){return null!=e}function F(e){return void 0!==e}function j(e){return"function"===typeof e}function B(e){return"object"===typeof e}function W(e){return B(e)&&null!==e}function V(e){return B(e)&&!Array.isArray(e)}function H(e){return"string"===typeof e||e instanceof String}function q(e){return"number"===typeof e||e instanceof Number}function K(e){return z()&&e instanceof Blob}function z(){return"undefined"!==typeof Blob}function G(e){var t;try{t=JSON.parse(e)}catch(e){return null}return V(t)?t:null}function Q(e){if(0==e.length)return null;var t=e.lastIndexOf("/");return-1===t?"":e.slice(0,t)}function Y(e,t){var n=t.split("/").filter(function(e){return e.length>0}).join("/");return 0===e.length?n:e+"/"+n}function X(e){var t=e.lastIndexOf("/",e.length-2);return-1===t?e:e.slice(t+1)}function $(e){return Ge+Ye+e}function J(e){return Qe+Ye+e}function Z(e){return Ge+Xe+e}function ee(e){var t=encodeURIComponent,n="?";return A(e,function(e,r){var i=t(e)+"="+t(r);n=n+i+"&"}),n=n.slice(0,-1)}function te(e,t){return t}function ne(e){return!H(e)||e.length<2?e:(e=e,X(e))}function re(){function e(e,t){return ne(t)}function t(e,t){return M(t)?+t:t}function n(e,t){if(!(H(t)&&t.length>0))return[];var n=encodeURIComponent;return t.split(",").map(function(t){var r=e.bucket,i=e.fullPath;return J("/b/"+n(r)+"/o/"+n(i))+ee({alt:"media",token:t})})}if(ft)return ft;var r=[];r.push(new ht("bucket")),r.push(new ht("generation")),r.push(new ht("metageneration")),r.push(new ht("name","fullPath",!0));var i=new ht("name");
1i.xform=e,r.push(i);var o=new ht("size");return o.xform=t,r.push(o),r.push(new ht("timeCreated")),r.push(new ht("updated")),r.push(new ht("md5Hash",null,!0)),r.push(new ht("cacheControl",null,!0)),r.push(new ht("contentDisposition",null,!0)),r.push(new ht("contentEncoding",null,!0)),r.push(new ht("contentLanguage",null,!0)),r.push(new ht("contentType",null,!0)),r.push(new ht("metadata","customMetadata",!0)),r.push(new ht("downloadTokens","downloadURLs",!1,n)),ft=r}function ie(e,t){function n(){var n=e.bucket,r=e.fullPath,i=new lt(n,r);return t.makeStorageReference(i)}Object.defineProperty(e,"ref",{get:n})}function oe(e,t,n){var r={};r.type="file";for(var i=n.length,o=0;o<i;o++){var a=n[o];r[a.local]=a.xform(r,t[a.server])}return ie(r,e),r}function ae(e,t,n){var r=G(t);return null===r?null:oe(e,r,n)}function se(e,t){for(var n={},r=t.length,i=0;i<r;i++){var o=t[i];o.writable&&(n[o.server]=e[o.local])}return JSON.stringify(n)}function ue(e){if(!e||!B(e))throw"Expected Metadata object.";for(var t in e){var n=e[t];if("customMetadata"===t){if(!B(n))throw"Expected object for 'customMetadata' mapping."}else if(W(n))throw"Mapping for '"+t+"' cannot be an object."}}function ce(e,t,n){for(var r=t.length,i=t.length,o=0;o<t.length;o++)if(t[o].optional){r=o;break}if(!(r<=n.length&&n.length<=i))throw m(r,i,e,n.length);for(var o=0;o<n.length;o++)try{t[o].validator(n[o])}catch(t){throw t instanceof Error?v(o,e,t.message):v(o,e,t)}}function le(e,t){return function(n){e(n),t(n)}}function he(e,t){function n(e){if(!H(e))throw"Expected string."}var r;return r=e?le(n,e):n,new pt(r,t)}function fe(){function e(e){if(!(e instanceof Uint8Array||e instanceof ArrayBuffer||z()&&e instanceof Blob))throw"Expected Blob or File."}return new pt(e)}function pe(e){return new pt(ue,e)}function de(){function e(e){if(!(q(e)&&e>=0))throw"Expected a number 0 or greater."}return new pt(e)}function ye(e,t){function n(t){if(!(null===t||M(t)&&t instanceof Object))throw"Expected an Object.";void 0!==e&&null!==e&&e(t)}return new pt(n,t)}function ve(e){function t(e){if(null!==e&&!j(e))throw"Expected a Function."}return new pt(t,e)}function me(){return"undefined"!==typeof BlobBuilder?BlobBuilder:"undefined"!==typeof WebKitBlobBuilder?WebKitBlobBuilder:void 0}function ge(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=me();if(void 0!==n){for(var r=new n,i=0;i<e.length;i++)r.append(e[i]);return r.getBlob()}if(z())return new Blob(e);throw Error("This browser doesn't seem to support creating Blobs")}function _e(e,t,n){return e.webkitSlice?e.webkitSlice(t,n):e.mozSlice?e.mozSlice(t,n):e.slice?e.slice(t,n):null}function be(e,t){return-1!==e.indexOf(t)}function we(e){return Array.prototype.slice.call(e)}function Ee(e,t){var n=e.indexOf(t);-1!==n&&e.splice(n,1)}function Ce(e){if(!e)throw i()}function Te(e,t){function n(n,r){var i=ae(e,r,t);return Ce(null!==i),i}return n}function Se(e){function t(t,n){var r;return r=401===t.getStatus()?s():402===t.getStatus()?a(e.bucket):403===t.getStatus()?u(e.path):n,r.setServerResponseProp(n.serverResponseProp()),r}return t}function Ie(e){function t(t,r){var i=n(t,r);return 404===t.getStatus()&&(i=o(e.path)),i.setServerResponseProp(r.serverResponseProp()),i}var n=Se(e);return t}function ke(e,t,n){var r=t.fullServerUrl(),i=$(r),o=e.maxOperationRetryTime(),a=new yt(i,"GET",Te(e,n),o);return a.errorHandler=Ie(t),a}function Oe(e,t,n,r){var i=t.fullServerUrl(),o=$(i),a=se(n,r),s={"Content-Type":"application/json; charset=utf-8"},u=e.maxOperationRetryTime(),c=new yt(o,"PATCH",Te(e,r),u);return c.headers=s,c.body=a,c.errorHandler=Ie(t),c}function Ne(e,t){function n(e,t){}var r=t.fullServerUrl(),i=$(r),o=e.maxOperationRetryTime(),a=new yt(i,"DELETE",n,o);return a.successCodes=[200,204],a.errorHandler=Ie(t),a}function Pe(e,t){return e&&e.contentType||t&&t.type()||"application/octet-stream"}function Re(e,t,n){var r=x(n);return r.fullPath=e.path,r.size=t.size(),r.contentType||(r.contentType=Pe(null,t)),r}function Ae(e,t,n,r,i){var o=t.bucketOnlyServerUrl(),a={"X-Goog-Upload-Protocol":"multipart"},s=function(){for(var e="",t=0;t<2;t++)e+=Math.random().toString().slice(2);return e}();a["Content-Type"]="multipart/related; boundary="+s;var u=Re(t,r,i),c=se(u,n),l="--"+s+"\r\nContent-Type: application/json; charset=utf-8\r\n\r\n"+c+"\r\n--"+s+"\r\nContent-Type: "+u.contentType+"\r\n\r\n",h="\r\n--"+s+"--",f=dt.getBlob(l,r,h);if(null===f)throw p();var d={name:u.fullPath},y=Z(o),v=e.maxUploadRetryTime(),m=new yt(y,"POST",Te(e,n),v);
1return m.urlParams=d,m.headers=a,m.body=f.uploadData(),m.errorHandler=Se(t),m}function xe(e,t){var n;try{n=e.getResponseHeader("X-Goog-Upload-Status")}catch(e){Ce(!1)}return Ce(be(t||["active"],n)),n}function De(e,t,n,r,i){function o(e,t){xe(e);var n;try{n=e.getResponseHeader("X-Goog-Upload-URL")}catch(e){Ce(!1)}return Ce(H(n)),n}var a=t.bucketOnlyServerUrl(),s=Re(t,r,i),u={name:s.fullPath},c=Z(a),l={"X-Goog-Upload-Protocol":"resumable","X-Goog-Upload-Command":"start","X-Goog-Upload-Header-Content-Length":r.size(),"X-Goog-Upload-Header-Content-Type":s.contentType,"Content-Type":"application/json; charset=utf-8"},h=se(s,n),f=e.maxUploadRetryTime(),p=new yt(c,"POST",o,f);return p.urlParams=u,p.headers=l,p.body=h,p.errorHandler=Se(t),p}function Le(e,t,n,r){function i(e,t){var n,i=xe(e,["active","final"]);try{n=e.getResponseHeader("X-Goog-Upload-Size-Received")}catch(e){Ce(!1)}var o=parseInt(n,10);return Ce(!isNaN(o)),new vt(o,r.size(),"final"===i)}var o={"X-Goog-Upload-Command":"query"},a=e.maxUploadRetryTime(),s=new yt(n,"POST",i,a);return s.headers=o,s.errorHandler=Se(t),s}function Ue(e,t,n,r,i,o,a,s){function u(e,n){var i,a=xe(e,["active","final"]),s=c.current+h,u=r.size();return i="final"===a?Te(t,o)(e,n):null,new vt(s,u,"final"===a,i)}var c=new vt(0,0);if(a?(c.current=a.current,c.total=a.total):(c.current=0,c.total=r.size()),r.size()!==c.total)throw d();var l=c.total-c.current,h=l;i>0&&(h=Math.min(h,i));var f=c.current,y=f+h,v=h===l?"upload, finalize":"upload",m={"X-Goog-Upload-Command":v,"X-Goog-Upload-Offset":c.current},g=r.slice(f,y);if(null===g)throw p();var _=t.maxUploadRetryTime(),b=new yt(n,"POST",u,_);return b.headers=m,b.body=g.uploadData(),b.progressCallback=s||null,b.errorHandler=Se(e),b}function Me(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];L(!0).then(function(){e.apply(null,t)})}}function Fe(e,t,n){function r(){return 2===h}function i(){f||(f=!0,t.apply(null,arguments))}function o(t){c=setTimeout(function(){c=null,e(a,r())},t)}function a(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!f){if(e)return void i.apply(null,arguments);if(r()||l)return void i.apply(null,arguments);u<64&&(u*=2);var a;1===h?(h=2,a=0):a=1e3*(u+Math.random()),o(a)}}function s(e){p||(p=!0,f||(null!==c?(e||(h=2),clearTimeout(c),o(0)):e||(h=1)))}var u=1,c=null,l=!1,h=0,f=!1,p=!1;return o(0),setTimeout(function(){l=!0,s(!0)},n),s}function je(e){e(!1)}function Be(e,t){null!==t&&t.length>0&&(e.Authorization="Firebase "+t)}function We(e){var t="undefined"!==typeof ze.default?ze.default.SDK_VERSION:"AppManager";e["X-Firebase-Storage-Version"]="webjs/"+t}function Ve(e,t,n){var r=ee(e.urlParams),i=e.url+r,o=x(e.headers);return Be(o,t),We(o),new Tt(i,e.method,o,e.body,e.successCodes,e.additionalRetryCodes,e.handler,e.errorHandler,e.timeout,e.progressCallback,n)}function He(e,t,n){return new It(e,new ct,n)}function qe(e){var t={TaskState:st,TaskEvent:ot,StringFormat:nt,Storage:It,Reference:bt};e.INTERNAL.registerService(Ot,He,t,void 0,!0)}Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"registerStorage",function(){return qe});var Ke,ze=n(10),Ge="https://firebasestorage.googleapis.com",Qe="https://firebasestorage.googleapis.com",Ye="/v0",Xe="/v0",$e=12e4,Je=6e4,Ze=-9007199254740991,et=function(){function e(e,t){this.code_=r(e),this.message_="Firebase Storage: "+t,this.serverResponse_=null,this.name_="FirebaseError"}return e.prototype.codeProp=function(){return this.code},e.prototype.codeEquals=function(e){return r(e)===this.codeProp()},e.prototype.serverResponseProp=function(){return this.serverResponse_},e.prototype.setServerResponseProp=function(e){this.serverResponse_=e},Object.defineProperty(e.prototype,"name",{get:function(){return this.name_},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"code",{get:function(){return this.code_},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"message",{get:function(){return this.message_},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"serverResponse",{get:function(){return this.serverResponse_},enumerable:!0,configurable:!0}),e}(),tt={UNKNOWN:"unknown",OBJECT_NOT_FOUND:"object-not-found",BUCKET_NOT_FOUND:"bucket-not-found",PROJECT_NOT_FOUND:"project-not-found",QUOTA_EXCEEDED:"quota-exceeded",UNAUTHENTICATED:"unauthenticated",UNAUTHORIZED:"unauthorized",RETRY_LIMIT_EXCEEDED:"retry-limit-exceeded",INVALID_CHECKSUM:"invalid-checksum",CANCELED:"canceled",INVALID_EVENT_NAME:"invalid-event-name",INVA
1LID_URL:"invalid-url",INVALID_DEFAULT_BUCKET:"invalid-default-bucket",NO_DEFAULT_BUCKET:"no-default-bucket",CANNOT_SLICE_BLOB:"cannot-slice-blob",SERVER_FILE_WRONG_SIZE:"server-file-wrong-size",NO_DOWNLOAD_URL:"no-download-url",INVALID_ARGUMENT:"invalid-argument",INVALID_ARGUMENT_COUNT:"invalid-argument-count",APP_DELETED:"app-deleted",INVALID_ROOT_OPERATION:"invalid-root-operation",INVALID_FORMAT:"invalid-format",INTERNAL_ERROR:"internal-error"},nt={RAW:"raw",BASE64:"base64",BASE64URL:"base64url",DATA_URL:"data_url"},rt=function(){function e(e,t){this.data=e,this.contentType=t||null}return e}(),it=function(){function e(e){this.base64=!1,this.contentType=null;var t=e.match(/^data:([^,]+)?,/);if(null===t)throw b(nt.DATA_URL,"Must be formatted 'data:[<mediatype>][;base64],<data>");var n=t[1]||null;null!=n&&(this.base64=N(n,";base64"),this.contentType=this.base64?n.substring(0,n.length-";base64".length):n),this.rest=e.substring(e.indexOf(",")+1)}return e}(),ot={STATE_CHANGED:"state_changed"},at={RUNNING:"running",PAUSING:"pausing",PAUSED:"paused",SUCCESS:"success",CANCELING:"canceling",CANCELED:"canceled",ERROR:"error"},st={RUNNING:"running",PAUSED:"paused",SUCCESS:"success",CANCELED:"canceled",ERROR:"error"};!function(e){e[e.NO_ERROR=0]="NO_ERROR",e[e.NETWORK_ERROR=1]="NETWORK_ERROR",e[e.ABORT=2]="ABORT"}(Ke||(Ke={}));var ut=function(){function e(){var e=this;this.sent_=!1,this.xhr_=new XMLHttpRequest,this.errorCode_=Ke.NO_ERROR,this.sendPromise_=D(function(t,n){e.xhr_.addEventListener("abort",function(n){e.errorCode_=Ke.ABORT,t(e)}),e.xhr_.addEventListener("error",function(n){e.errorCode_=Ke.NETWORK_ERROR,t(e)}),e.xhr_.addEventListener("load",function(n){t(e)})})}return e.prototype.send=function(e,t,n,r){var i=this;if(this.sent_)throw w("cannot .send() more than once");if(this.sent_=!0,this.xhr_.open(t,e,!0),M(r)){A(r,function(e,t){i.xhr_.setRequestHeader(e,t.toString())})}return M(n)?this.xhr_.send(n):this.xhr_.send(),this.sendPromise_},e.prototype.getErrorCode=function(){if(!this.sent_)throw w("cannot .getErrorCode() before sending");return this.errorCode_},e.prototype.getStatus=function(){if(!this.sent_)throw w("cannot .getStatus() before sending");try{return this.xhr_.status}catch(e){return-1}},e.prototype.getResponseText=function(){if(!this.sent_)throw w("cannot .getResponseText() before sending");return this.xhr_.responseText},e.prototype.abort=function(){this.xhr_.abort()},e.prototype.getResponseHeader=function(e){return this.xhr_.getResponseHeader(e)},e.prototype.addUploadProgressListener=function(e){M(this.xhr_.upload)&&this.xhr_.upload.addEventListener("progress",e)},e.prototype.removeUploadProgressListener=function(e){M(this.xhr_.upload)&&this.xhr_.upload.removeEventListener("progress",e)},e}(),ct=function(){function e(){}return e.prototype.createXhrIo=function(){return new ut},e}(),lt=function(){function e(e,t){this.bucket=e,this.path_=t}return Object.defineProperty(e.prototype,"path",{get:function(){return this.path_},enumerable:!0,configurable:!0}),e.prototype.fullServerUrl=function(){var e=encodeURIComponent;return"/b/"+e(this.bucket)+"/o/"+e(this.path)},e.prototype.bucketOnlyServerUrl=function(){return"/b/"+encodeURIComponent(this.bucket)+"/o"},e.makeFromBucketSpec=function(t){var n;try{n=e.makeFromUrl(t)}catch(n){return new e(t,"")}if(""===n.path)return n;throw f(t)},e.makeFromUrl=function(t){function n(e){"/"===e.path.charAt(e.path.length-1)&&(e.path_=e.path_.slice(0,-1))}function r(e){e.path_=decodeURIComponent(e.path)}for(var i=null,o=new RegExp("^gs://([A-Za-z0-9.\\-]+)(/(.*))?$","i"),a={bucket:1,path:3},s=new RegExp("^https?://firebasestorage\\.googleapis\\.com/v[A-Za-z0-9_]+/b/([A-Za-z0-9.\\-]+)/o(/([^?#]*).*)?$","i"),u={bucket:1,path:3},c=[{regex:o,indices:a,postModify:n},{regex:s,indices:u,postModify:r}],l=0;l<c.length;l++){var f=c[l],p=f.regex.exec(t);if(p){var d=p[f.indices.bucket],y=p[f.indices.path];y||(y=""),i=new e(d,y),f.postModify(i);break}}if(null==i)throw h(t);return i},e}(),ht=function(){function e(e,t,n,r){this.server=e,this.local=t||e,this.writable=!!n,this.xform=r||te}return e}(),ft=null,pt=function(){function e(e,t){var n=this;this.validator=function(t){n.optional&&!F(t)||e(t)},this.optional=!!t}return e}(),dt=function(){function e(e,t){var n=0,r="";K(e)?(this.data_=e,n=e.size,r=e.type):e instanceof ArrayBuffer?(t?this.data_=new Uint8Array(e):(this.data_=new Uint8Array(e.byteLength),this.data_.set(new Uint8Array(e))),n=this.data_.length):e instanceof Uint8Array&&(t?this.data_=e:(this.data_=new Uint8Array(e.length),this.data_.set(e)),n=e.length),this.size_=n,this.type_=r}return e.prototype.size=function(){return this.size_},e.prototype.type=function(){return this.type_},e.prototype.slice=function(t,n){if(K(this.data_)){var r=this.data_,i=_e(r,t,n);return null===i?null:new e(i)}return new e(new Uint8Array(this.data_.buffer,t,n-t),!0)},e.getBlob=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(z()){var r=t.map(function(t){return t instanceof e?t.data_:t});return new e(ge.apply(null,r))}var i=t.map(function(e){return H(e)?C(nt.RAW,e).data:e.data_}),o=0;
1i.forEach(function(e){o+=e.byteLength});var a=new Uint8Array(o),s=0;return i.forEach(function(e){for(var t=0;t<e.length;t++)a[s++]=e[t]}),new e(a,!0)},e.prototype.uploadData=function(){return this.data_},e}(),yt=function(){function e(e,t,n,r){this.url=e,this.method=t,this.handler=n,this.timeout=r,this.urlParams={},this.headers={},this.body=null,this.errorHandler=null,this.progressCallback=null,this.successCodes=[200],this.additionalRetryCodes=[]}return e}(),vt=function(){function e(e,t,n,r){this.current=e,this.total=t,this.finalized=!!n,this.metadata=r||null}return e}(),mt=function(){function e(e,t,n){if(j(e)||M(t)||M(n))this.next=e,this.error=t||null,this.complete=n||null;else{var r=e;this.next=r.next||null,this.error=r.error||null,this.complete=r.complete||null}}return e}(),gt=function(){function e(e,t,n,r,i,o){this.bytesTransferred=e,this.totalBytes=t,this.state=n,this.metadata=r,this.task=i,this.ref=o}return Object.defineProperty(e.prototype,"downloadURL",{get:function(){if(null!==this.metadata){var e=this.metadata.downloadURLs;return null!=e&&null!=e[0]?e[0]:null}return null},enumerable:!0,configurable:!0}),e}(),_t=function(){function e(e,t,n,r,i,o){void 0===o&&(o=null);var a=this;this.transferred_=0,this.needToFetchStatus_=!1,this.needToFetchMetadata_=!1,this.observers_=[],this.error_=null,this.uploadUrl_=null,this.request_=null,this.chunkMultiplier_=1,this.resolve_=null,this.reject_=null,this.ref_=e,this.authWrapper_=t,this.location_=n,this.blob_=i,this.metadata_=o,this.mappings_=r,this.resumable_=this.shouldDoResumable_(this.blob_),this.state_=at.RUNNING,this.errorHandler_=function(e){a.request_=null,a.chunkMultiplier_=1,e.codeEquals(tt.CANCELED)?(a.needToFetchStatus_=!0,a.completeTransitions_()):(a.error_=e,a.transition_(at.ERROR))},this.metadataErrorHandler_=function(e){a.request_=null,e.codeEquals(tt.CANCELED)?a.completeTransitions_():(a.error_=e,a.transition_(at.ERROR))},this.promise_=D(function(e,t){a.resolve_=e,a.reject_=t,a.start_()}),this.promise_.then(null,function(){})}return e.prototype.makeProgressCallback_=function(){var e=this,t=this.transferred_;return function(n,r){e.updateProgress_(t+n)}},e.prototype.shouldDoResumable_=function(e){return e.size()>262144},e.prototype.start_=function(){this.state_===at.RUNNING&&null===this.request_&&(this.resumable_?null===this.uploadUrl_?this.createResumable_():this.needToFetchStatus_?this.fetchStatus_():this.needToFetchMetadata_?this.fetchMetadata_():this.continueUpload_():this.oneShotUpload_())},e.prototype.resolveToken_=function(e){var t=this;this.authWrapper_.getAuthToken().then(function(n){switch(t.state_){case at.RUNNING:e(n);break;case at.CANCELING:t.transition_(at.CANCELED);break;case at.PAUSING:t.transition_(at.PAUSED)}})},e.prototype.createResumable_=function(){var e=this;this.resolveToken_(function(t){var n=De(e.authWrapper_,e.location_,e.mappings_,e.blob_,e.metadata_),r=e.authWrapper_.makeRequest(n,t);e.request_=r,r.getPromise().then(function(t){e.request_=null,e.uploadUrl_=t,e.needToFetchStatus_=!1,e.completeTransitions_()},e.errorHandler_)})},e.prototype.fetchStatus_=function(){var e=this,t=this.uploadUrl_;this.resolveToken_(function(n){var r=Le(e.authWrapper_,e.location_,t,e.blob_),i=e.authWrapper_.makeRequest(r,n);e.request_=i,i.getPromise().then(function(t){t=t,e.request_=null,e.updateProgress_(t.current),e.needToFetchStatus_=!1,t.finalized&&(e.needToFetchMetadata_=!0),e.completeTransitions_()},e.errorHandler_)})},e.prototype.continueUpload_=function(){var e=this,t=262144*this.chunkMultiplier_,n=new vt(this.transferred_,this.blob_.size()),r=this.uploadUrl_;this.resolveToken_(function(i){var o;try{o=Ue(e.location_,e.authWrapper_,r,e.blob_,t,e.mappings_,n,e.makeProgressCallback_())}catch(t){return e.error_=t,void e.transition_(at.ERROR)}var a=e.authWrapper_.makeRequest(o,i);e.request_=a,a.getPromise().then(function(t){e.increaseMultiplier_(),e.request_=null,e.updateProgress_(t.current),t.finalized?(e.metadata_=t.metadata,e.transition_(at.SUCCESS)):e.completeTransitions_()},e.errorHandler_)})},e.prototype.increaseMultiplier_=function(){262144*this.chunkMultiplier_<33554432&&(this.chunkMultiplier_*=2)},e.prototype.fetchMetadata_=function(){var e=this;this.resolveToken_(function(t){var n=ke(e.authWrapper_,e.location_,e.mappings_),r=e.authWrapper_.makeRequest
1(n,t);e.request_=r,r.getPromise().then(function(t){e.request_=null,e.metadata_=t,e.transition_(at.SUCCESS)},e.metadataErrorHandler_)})},e.prototype.oneShotUpload_=function(){var e=this;this.resolveToken_(function(t){var n=Ae(e.authWrapper_,e.location_,e.mappings_,e.blob_,e.metadata_),r=e.authWrapper_.makeRequest(n,t);e.request_=r,r.getPromise().then(function(t){e.request_=null,e.metadata_=t,e.updateProgress_(e.blob_.size()),e.transition_(at.SUCCESS)},e.errorHandler_)})},e.prototype.updateProgress_=function(e){var t=this.transferred_;this.transferred_=e,this.transferred_!==t&&this.notifyObservers_()},e.prototype.transition_=function(e){if(this.state_!==e)switch(e){case at.CANCELING:case at.PAUSING:this.state_=e,null!==this.request_&&this.request_.cancel();break;case at.RUNNING:var t=this.state_===at.PAUSED;this.state_=e,t&&(this.notifyObservers_(),this.start_());break;case at.PAUSED:this.state_=e,this.notifyObservers_();break;case at.CANCELED:this.error_=l(),this.state_=e,this.notifyObservers_();break;case at.ERROR:case at.SUCCESS:this.state_=e,this.notifyObservers_()}},e.prototype.completeTransitions_=function(){switch(this.state_){case at.PAUSING:this.transition_(at.PAUSED);break;case at.CANCELING:this.transition_(at.CANCELED);break;case at.RUNNING:this.start_()}},Object.defineProperty(e.prototype,"snapshot",{get:function(){var e=P(this.state_);return new gt(this.transferred_,this.blob_.size(),e,this.metadata_,this,this.ref_)},enumerable:!0,configurable:!0}),e.prototype.on=function(e,t,n,r){function i(t){if(e!==ot.STATE_CHANGED)throw"Expected one of the event types: ["+ot.STATE_CHANGED+"]."}function o(e){try{return void c(e)}catch(e){}try{l(e);if(!(F(e.next)||F(e.error)||F(e.complete)))throw"";return}catch(e){throw u}}function a(e){function t(t,n,i){null!==e&&ce("on",e,arguments);var o=new mt(t,n,r);return h.addObserver_(o),function(){h.removeObserver_(o)}}return t}function s(e){if(null===e)throw u;o(e)}void 0===t&&(t=void 0),void 0===n&&(n=void 0),void 0===r&&(r=void 0);var u="Expected a function or an Object with one of `next`, `error`, `complete` properties.",c=ve(!0).validator,l=ye(null,!0).validator;ce("on",[he(i),ye(o,!0),ve(!0),ve(!0)],arguments);var h=this,f=[ye(s),ve(!0),ve(!0)];return F(t)||F(n)||F(r)?a(null)(t,n,r):a(f)},e.prototype.then=function(e,t){return this.promise_.then(e,t)},e.prototype.catch=function(e){return this.then(null,e)},e.prototype.addObserver_=function(e){this.observers_.push(e),this.notifyObserver_(e)},e.prototype.removeObserver_=function(e){Ee(this.observers_,e)},e.prototype.notifyObservers_=function(){var e=this;this.finishPromise_(),we(this.observers_).forEach(function(t){e.notifyObserver_(t)})},e.prototype.finishPromise_=function(){if(null!==this.resolve_){var e=!0;switch(P(this.state_)){case st.SUCCESS:Me(this.resolve_.bind(null,this.snapshot))();break;case st.CANCELED:case st.ERROR:Me(this.reject_.bind(null,this.error_))();break;default:e=!1}e&&(this.resolve_=null,this.reject_=null)}},e.prototype.notifyObserver_=function(e){switch(P(this.state_)){case st.RUNNING:case st.PAUSED:null!==e.next&&Me(e.next.bind(e,this.snapshot))();break;case st.SUCCESS:null!==e.complete&&Me(e.complete.bind(e))();break;case st.CANCELED:case st.ERROR:null!==e.error&&Me(e.error.bind(e,this.error_))();break;default:null!==e.error&&Me(e.error.bind(e,this.error_))()}},e.prototype.resume=function(){ce("resume",[],arguments);var e=this.state_===at.PAUSED||this.state_===at.PAUSING;return e&&this.transition_(at.RUNNING),e},e.prototype.pause=function(){ce("pause",[],arguments);var e=this.state_===at.RUNNING;return e&&this.transition_(at.PAUSING),e},e.prototype.cancel=function(){ce("cancel",[],arguments);var e=this.state_===at.RUNNING||this.state_===at.PAUSING;return e&&this.transition_(at.CANCELING),e},e}(),bt=function(){function e(e,t){this.authWrapper=e,this.location=t instanceof lt?t:lt.makeFromUrl(t)}return e.prototype.toString=function(){return ce("toString",[],arguments),"gs://"+this.location.bucket+"/"+this.location.path},e.prototype.newRef=function(t,n){return new e(t,n)},e.prototype.mappings=function(){return re()},e.prototype.child=function(e){ce("child",[he()],arguments);var t=Y(this.location.path,e),n=new lt(this.location.bucket,t);return this.newRef(this.authWrapper,n)},Object.defineProperty(e.prototype,"parent",{get:function(){var e=Q(this.location.path);if(null===e)return null;var t=new lt(this.location.bucket,e);return this.newRef(this.authWrapper,t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"root",{get:function(){var e=new lt(this.location.bucket,"");return this.newRef(this.authWrapper,e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bucket",{get:function(){return this.location.bucket},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fullPath",{get:function(){return this.location.path},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return X(this.location.path)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"storage",{get:function(){return this.authWrapper.service()},enumerable:!0,configurable:!0}),e.prototype.put=function(e,t){return void 0===t&&(t=null),ce("put",[fe
1(),pe(!0)],arguments),this.throwIfRoot_("put"),new _t(this,this.authWrapper,this.location,this.mappings(),new dt(e),t)},e.prototype.putString=function(e,t,n){void 0===t&&(t=nt.RAW),ce("putString",[he(),he(E,!0),pe(!0)],arguments),this.throwIfRoot_("putString");var r=C(t,e),i=x(n);return!M(i.contentType)&&M(r.contentType)&&(i.contentType=r.contentType),new _t(this,this.authWrapper,this.location,this.mappings(),new dt(r.data,!0),i)},e.prototype.delete=function(){ce("delete",[],arguments),this.throwIfRoot_("delete");var e=this;return this.authWrapper.getAuthToken().then(function(t){var n=Ne(e.authWrapper,e.location);return e.authWrapper.makeRequest(n,t).getPromise()})},e.prototype.getMetadata=function(){ce("getMetadata",[],arguments),this.throwIfRoot_("getMetadata");var e=this;return this.authWrapper.getAuthToken().then(function(t){var n=ke(e.authWrapper,e.location,e.mappings());return e.authWrapper.makeRequest(n,t).getPromise()})},e.prototype.updateMetadata=function(e){ce("updateMetadata",[pe()],arguments),this.throwIfRoot_("updateMetadata");var t=this;return this.authWrapper.getAuthToken().then(function(n){var r=Oe(t.authWrapper,t.location,e,t.mappings());return t.authWrapper.makeRequest(r,n).getPromise()})},e.prototype.getDownloadURL=function(){return ce("getDownloadURL",[],arguments),this.throwIfRoot_("getDownloadURL"),this.getMetadata().then(function(e){var t=e.downloadURLs[0];if(M(t))return t;throw y()})},e.prototype.throwIfRoot_=function(e){if(""===this.location.path)throw _(e)},e}(),wt=function(){function e(e){this.promise_=U(e)}return e.prototype.getPromise=function(){return this.promise_},e.prototype.cancel=function(e){void 0===e&&(e=!1)},e}(),Et=function(){function e(){this.map_={},this.id_=Ze}return e.prototype.addRequest=function(e){function t(){delete r.map_[n]}var n=this.id_;this.id_++,this.map_[n]=e;var r=this;e.getPromise().then(t,t)},e.prototype.clear=function(){A(this.map_,function(e,t){t&&t.cancel(!0)}),this.map_={}},e}(),Ct=function(){function e(t,n,r,i,o){if(this.bucket_=null,this.deleted_=!1,this.app_=t,null!==this.app_){var a=this.app_.options;M(a)&&(this.bucket_=e.extractBucket_(a))}this.storageRefMaker_=n,this.requestMaker_=r,this.pool_=o,this.service_=i,this.maxOperationRetryTime_=$e,this.maxUploadRetryTime_=Je,this.requestMap_=new Et}return e.extractBucket_=function(e){var t=e.storageBucket||null;return null==t?null:lt.makeFromBucketSpec(t).bucket},e.prototype.getAuthToken=function(){return null!==this.app_&&M(this.app_.INTERNAL)&&M(this.app_.INTERNAL.getToken)?this.app_.INTERNAL.getToken().then(function(e){return null!==e?e.accessToken:null},function(e){return null}):L(null)},e.prototype.bucket=function(){if(this.deleted_)throw g();return this.bucket_},e.prototype.service=function(){return this.service_},e.prototype.makeStorageReference=function(e){return this.storageRefMaker_(this,e)},e.prototype.makeRequest=function(e,t){if(this.deleted_)return new wt(g());var n=this.requestMaker_(e,t,this.pool_);return this.requestMap_.addRequest(n),n},e.prototype.deleteApp=function(){this.deleted_=!0,this.app_=null,this.requestMap_.clear()},e.prototype.maxUploadRetryTime=function(){return this.maxUploadRetryTime_},e.prototype.setMaxUploadRetryTime=function(e){this.maxUploadRetryTime_=e},e.prototype.maxOperationRetryTime=function(){return this.maxOperationRetryTime_},e.prototype.setMaxOperationRetryTime=function(e){this.maxOperationRetryTime_=e},e}(),Tt=function(){function e(e,t,n,r,i,o,a,s,u,c,l){this.pendingXhr_=null,this.backoffId_=null,this.resolve_=null,this.reject_=null,this.canceled_=!1,this.appDelete_=!1,this.url_=e,this.method_=t,this.headers_=n,this.body_=r,this.successCodes_=i.slice(),this.additionalRetryCodes_=o.slice(),this.callback_=a,this.errorCallback_=s,this.progressCallback_=c,this.timeout_=u,this.pool_=l;var h=this;this.promise_=D(function(e,t){h.resolve_=e,h.reject_=t,h.start_()})}return e.prototype.start_=function(){function e(e,t){function r(e){var t=e.loaded,r=e.lengthComputable?e.total:-1;null!==n.progressCallback_&&n.progressCallback_(t,r)}if(t)return void e(!1,new St(!1,null,!0));var i=n.pool_.createXhrIo();n.pendingXhr_=i,null!==n.progressCallback_&&i.addUploadProgressListener(r),i.send(n.url_,n.method_,n.body_,n.headers_).then(function(t){null!==n.progressCallback_&&t.removeUploadProgressListener(r),n.pendingXhr_=null,t=t;var i=t.getErrorCode()===Ke.NO_ERROR,o=t.getStatus();if(!i||n.isRetryStatusCode_(o)){var a=t.getErrorCode()===Ke.ABORT;return void e(!1,new St(!1,null,a))}var s=be(n.successCodes_,o);e(!0,new St(s,t))})}function t(e,t){var r=n.resolve_,o=n.reject_,a=t.xhr;if(t.wasSuccessCode)try{var s=n.callback_(a,a.getResponseText());F(s)?r(s):r()}catch(e){o(e)}else if(null!==a){var u=i();u.setServerResponseProp(a.getResponseText()),o(n.errorCallback_?n.errorCallback_(a,u):u)}else if(t.canceled){var u=n.appDelete_?g():l();o(u)}else{var u=c();o(u)}}var n=this;this.canceled_?t(!1,new St(!1,null,!0)):this.backoffId_=Fe(e,t,this.timeout_)},e.prototype.getPromise=function(){return this.promise_},e.prototype.cancel=function(e){this.canceled_=!0,this.appDelete_=e||!1,null!==this.backoffId_&&je(this.backoffId_),null!==this.pendingXhr_&&this.pendingXhr_.abort()},e.prototype.isRetryStatusCode_=function(e){var t=e>=500&&e<600,n=[408,429],r=be(n,e),i=be(this.additionalRetryCodes_,e);return t||r||i},e}(),St=function(){function e(e,t,n){this.wasSuccessCode=e,this.xhr=t,this.canceled=!!n}return e}(),It=function(){function e(e,t,n){function r(e,t){return new bt(e,t)}if(this.bucket_=null,this.authWrapper_=new Ct(e,r,Ve,this,t),this.app_=e,null!=n)this.bucket_=lt.makeFromBucketSpec(n);else{var i=this.authWrapper_.bucket();null!=i&&(this.bucket_=new lt(i,""))}this.internals_=new kt(this)}return e.prototype.ref=function(e){function t(e){if(/^[A-Za-z]+:\/\//.test(e))throw"Expected child path but got a URL, use refFromURL instead."}if(ce("ref",[he(t,!0)],arguments),null==this.bucket_)throw new Error("No Storage Bucket defined in Firebase Options.");var n=new bt(this.authWrapper_,this.bucket_);return null!=e?n.child(e):n},e.prototype.refFromURL=function(e){function t(e){if(!/^[A-Za-z]+:\/\//.test(e))throw"Expected full URL but got a child path, use ref instead.";try{lt.makeFromUrl(e)}
1catch(e){throw"Expected valid full URL but got an invalid one."}}return ce("refFromURL",[he(t,!1)],arguments),new bt(this.authWrapper_,e)},Object.defineProperty(e.prototype,"maxUploadRetryTime",{get:function(){return this.authWrapper_.maxUploadRetryTime()},enumerable:!0,configurable:!0}),e.prototype.setMaxUploadRetryTime=function(e){ce("setMaxUploadRetryTime",[de()],arguments),this.authWrapper_.setMaxUploadRetryTime(e)},Object.defineProperty(e.prototype,"maxOperationRetryTime",{get:function(){return this.authWrapper_.maxOperationRetryTime()},enumerable:!0,configurable:!0}),e.prototype.setMaxOperationRetryTime=function(e){ce("setMaxOperationRetryTime",[de()],arguments),this.authWrapper_.setMaxOperationRetryTime(e)},Object.defineProperty(e.prototype,"app",{get:function(){return this.app_},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"INTERNAL",{get:function(){return this.internals_},enumerable:!0,configurable:!0}),e}(),kt=function(){function e(e){this.service_=e}return e.prototype.delete=function(){return this.service_.authWrapper_.deleteApp(),L(void 0)},e}(),Ot="storage";qe(ze.default)},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(0),s=n.n(a),u=n(25),c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}
1return o(t,e),c(t,[{key:"render",value:function(){return s.a.createElement(u.a,null,s.a.createElement("h2",null,this.props.title),s.a.createElement("p",null,"Rufflerim is a French indie collective, developing games with efficient designs and strong stories."))}}]),t}(a.Component);t.a=l},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(0),s=n.n(a),u=n(6),c=n(9),l=n(42),h=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),f=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),h(t,[{key:"render",value:function(){return s.a.createElement("nav",{className:"navbar navbar-expand-lg navbar-light bg-light"},s.a.createElement(u.b,{to:c.e},s.a.createElement("img",{src:"/img/rufflerim_logo.png",width:"50",height:"50",alt:"Return to homepage"})),s.a.createElement("div",{className:"collapse navbar-collapse",id:"navbarNav"},s.a.createElement("ul",{className:"navbar-nav mr-auto"},s.a.createElement(l.a,{title:"Dev Blog",route:c.c}))),s.a.createElement("ul",{className:"navbar-nav mr-auto"},s.a.createElement("li",{className:"nav-item"},s.a.createElement("a",{className:"nav-link",target:"_blank",rel:"noopener noreferrer",href:"https://rufflerim.itch.io/lije/community"},"Community")),s.a.createElement(l.a,{title:"About",route:c.a})))}}]),t}(a.Component);t.a=f},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(0),s=n.n(a),u=n(4),c=n.n(u),l=n(102),h=n(25),f=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),p=function(e){function t(){r(this,t);var e=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.state={posts:null},e}return o(t,e),f(t,[{key:"componentWillMount",value:function(){var e=this;c.a.database().ref("posts").once("value").then(function(t){e.setState({posts:t.val()})})}},{key:"render",value:function(){var e=this;return this.state.posts?s.a.createElement(h.a,null,Object.keys(this.state.posts).map(function(t){return s.a.createElement(l.a,{key:t,post:e.state.posts[t]})})):s.a.createElement(h.a,null,s.a.createElement("p",null,"Loading..."))}}]),t}(a.Component);t.a=p},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(0),s=n.n(a),u=n(4),c=n.n(u),l=n(26),h=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),f=function(e){function t(){r(this,t);var e=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.state={imageUrl:""},e.storageRef=c.a.storage().ref(),e}
1return o(t,e),h(t,[{key:"componentWillMount",value:function(){var e=this;this.props.post.mediaKind===l.a.IMAGE&&this.storageRef.child(this.props.post.media).getDownloadURL().then(function(t){e.setState({imageUrl:t})}).catch(function(e){return console.log(e)})}},{key:"render",value:function(){var e=new Date(this.props.post.date),t=e.getDate(),n=e.getMonth()+1,r=e.getFullYear(),i=null;switch(this.props.post.mediaKind){case l.a.VIDEO:var o=this.props.post.media.match(/[^=\/]*$/)[0];i=s.a.createElement("div",{className:"row"},s.a.createElement("div",{className:"col-sm-1"}),s.a.createElement("div",{className:"col-sm-10"},s.a.createElement("iframe",{title:"video_"+this.props.post.title,width:"100%",height:"400",className:"embed-responsive-item",src:"https://www.youtube.com/embed/"+o+"?rel=0",allowFullScreen:!0})),s.a.createElement("div",{className:"col-sm-1"}));break;case l.a.IMAGE:""!==this.state.imageUrl&&(i=s.a.createElement("div",{className:"row"},s.a.createElement("div",{className:"col-sm-1"}),s.a.createElement("div",{className:"col-sm-10"},s.a.createElement("img",{width:"100%",src:this.state.imageUrl,alt:"image_"+this.props.post.title})),s.a.createElement("div",{className:"col-sm-1"})));break;case l.a.SOUNDCLOUD:i=s.a.createElement("div",{className:"row"},s.a.createElement("div",{className:"col-sm-1"}),s.a.createElement("div",{className:"col-sm-10",dangerouslySetInnerHTML:{__html:this.props.post.media}}),s.a.createElement("div",{className:"col-sm-1"}))}return s.a.createElement("div",null,s.a.createElement("div",{className:"card"},s.a.createElement("div",{className:"card-body"},s.a.createElement("h5",{className:"card-title align-baseline"},this.props.post.title," "),s.a.createElement("footer",{className:"blockquote-footer text-muted align-baseline"}," by ",this.props.post.author," | ",r,"/",n,"/",t," "),s.a.createElement("hr",null),i,s.a.createElement("br",null),s.a.createElement("div",{className:"row"},s.a.createElement("div",{className:"col-sm-1"}),s.a.createElement("div",{className:"jumbotron col-sm-10"},s.a.createElement("div",{className:"row"},s.a.createElement("div",{className:"col-sm-9"},this.props.post.resume),s.a.createElement("div",{className:"col-sm-3"},s.a.createElement("button",{className:"btn btn-primary",type:"button","data-toggle":"collapse","data-target":"#collapse-"+this.props.post.key,"aria-expanded":"false","aria-controls":"collapse-"+this.props.post.key},"Read more")))),s.a.createElement("div",{className:"col-sm-1"})),s.a.createElement("div",{className:"collapse",id:"collapse-"+this.props.post.key},this.props.post.content))),s.a.createElement("br",null))}}]),t}(a.Component);t.a=f},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(0),s=n.n(a),u=n(25),c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}
1return o(t,e),c(t,[{key:"render",value:function(){return s.a.createElement(u.a,null,s.a.createElement("h1",null,this.props.title))}}]),t}(a.Component);t.a=l},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(0),s=n.n(a),u=n(6),c=n(4),l=n.n(c),h=n(9),f=n(14),p=n(43),d=n(44),y=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),v=function(e){var t=e.history;return s.a.createElement(f.a.Consumer,null,function(e){return e?s.a.createElement("div",null,s.a.createElement(p.a,null),s.a.createElement("br",null),s.a.createElement("div",{className:"jumbotron"},"Vous \xeates connect\xe9.")):s.a.createElement("div",null,s.a.createElement("br",null),s.a.createElement("div",{className:"jumbotron"},s.a.createElement(g,{history:t})))})},m={email:"",password:"",error:null},g=function(e){function t(e){r(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.onSubmit=function(e){var t=n.state,r=t.email,i=t.password,o=n.props.history;l.a.auth().signInWithEmailAndPassword(r,i).then(function(){n.setState(function(){return Object.assign({},m)}),o.push(h.b)}).catch(function(e){n.setState(Object(d.a)("error",e))}),e.preventDefault()},n.state=Object.assign({},m),n}return o(t,e),y(t,[{key:"render",value:function(){var e=this,t=this.state,n=t.email,r=t.password,i=t.error,o=""===r||""===n,a=i?s.a.createElement("p",null,i.message):null;return s.a.createElement("form",{onSubmit:this.onSubmit},s.a.createElement("div",{className:"form-group row"},s.a.createElement("label",{htmlFor:"inputTitle",className:"col-sm-2 col-form-label"},"Adresse mail"),s.a.createElement("div",{className:"col-sm-10"},s.a.createElement("input",{value:n,onChange:function(t){return e.setState(Object(d.a)("email",t.target.value))},type:"email",placeholder:"Email Address",id:"inputTitle",className:"form-control","aria-describedby":"emailHelp"}))),s.a.createElement("div",{className:"form-group row"},s.a.createElement("label",{htmlFor:"inputPassword",className:"col-sm-2 col-form-label"},"Password"),s.a.createElement("div",{className:"col-sm-10"},s.a.createElement("input",{value:r,onChange:function(t){return e.setState(Object(d.a)("password",t.target.value))},type:"password",placeholder:"Password",id:"inputPassword",className:"form-control"}))),s.a.createElement("button",{disabled:o,type:"submit",className:"btn btn-primary"},"Login"),a)}}]),t}(a.Component);t.a=Object(u.e)(v)},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(0),s=n.n(a),u=n(4),c=n.n(u),l=n(106),h=n(108),f=n(109),p=n(110),d=n(44),y=n(14),v=n(26),m=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),g={title:"",resume:"",content:"",error:null,media:"",mediaKind:"",postState:v.b.ADD},_=function(e){function t(){r(this,t);var e=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.handleEdit=e.handleEdit.bind(e),e.handleReset=e.handleReset.bind(e),e.handleDelete=e.handleDelete.bind(e),e.database=c.a.database(),e.
1imagesRef=c.a.storage().ref().child("images"),e.state={title:"",resume:"",content:"",media:"",mediaKind:"",postState:v.b.ADD,error:null,posts:null},e}return o(t,e),m(t,[{key:"componentWillMount",value:function(){var e=this;this.database.ref("posts").on("value",function(t){e.setState({posts:t.val()})})}},{key:"componentWillUnmount",value:function(){this.setState({posts:null})}},{key:"handleEdit",value:function(e){this.setState({title:this.state.posts[e].title,resume:this.state.posts[e].resume,content:this.state.posts[e].content,media:"",postState:v.b.EDIT})}},{key:"handleReset",value:function(e){this.reset(),e.preventDefault()}},{key:"reset",value:function(){this.state.mediaKind===v.a.IMAGE&&document.getElementById("inputMedia")&&(document.getElementById("inputMedia").files[0]=null),this.setState(g)}},{key:"handleDelete",value:function(e){this.database.ref("posts/"+e).remove()}},{key:"create",value:function(e,t){var n=this;e.preventDefault();var r=this.state.media;if(this.state.mediaKind===v.a.IMAGE){var i=document.getElementById("inputMedia").files[0];if(i){this.setState({postState:v.b.UPLOADING});var o=this.state.media.match(/[^\\\/]*$/)[0],a=this.imagesRef.child(o);r=a.fullPath,a.put(i).then(function(e){n.createPost(t,r),n.reset()},function(e){n.setState({error:e,postState:v.b.ADD})})}}else this.createPost(t,r),this.reset()}},{key:"createPost",value:function(e,t){var n=this.database.ref().child("posts").push().key,r={key:n,author:e.email,title:this.state.title,resume:this.state.resume,media:t,mediaKind:this.state.mediaKind,content:this.state.content,date:(new Date).getTime()};this.database.ref("posts/"+n).set(r)}},{key:"update",value:function(e,t){e.preventDefault()}},{key:"render",value:function(){var e=this,t=this.state,n=t.title,r=t.resume,i=t.content,o=t.error,a=t.postState,u=t.posts,c=t.media,m=""===n||""===r||""===i||""===c||a===v.b.UPLOADING,g=""===n&&""===r&&""===i&&""===c,_=o?s.a.createElement("p",null,o.message):null,b="Cr\xe9er";switch(a){case v.b.EDIT:b="Editer";break;case v.b.UPLOADING:b="Uploading"}return s.a.createElement(y.a.Consumer,null,function(t){return s.a.createElement(l.a,null,s.a.createElement("h2",null,e.props.title),u&&s.a.createElement(p.a,{posts:u,onEdit:e.handleEdit,onDelete:e.handleDelete}),s.a.createElement("form",{onSubmit:e.onSubmit},s.a.createElement(h.a,{id:"inputTitle",label:"Titre",value:n,type:"text",onChange:function(t){return e.setState(Object(d.a)("title",t.target.value))}}),s.a.createElement(f.a,{id:"inputMedia",label:"Media",value:c,onMediaKindChange:function(t){return e.setState({mediaKind:t})},onChange:function(t){return e.setState(Object(d.a)("media",t.target.value))}}),s.a.createElement(h.a,{id:"inputResume",label:"R\xe9sum\xe9",value:r,type:"text",onChange:function(t){return e.setState(Object(d.a)("resume",t.target.value))}}),s.a.createElement(h.a,{textarea:!0,id:"inputContent",label:"Texte",value:i,type:"text",onChange:function(t){return e.setState(Object(d.a)("content",t.target.value))}}),s.a.createElement("button",{disabled:m,type:"submit",className:"btn btn-primary",onClick:a===v.b.EDIT?function(n){return e.update(n,t)}:function(n){return e.create(n,t)}},b),s.a.createElement("button",{disabled:g,type:"cancel",className:"btn",onClick:e.handleReset},"Reset"),_))})}}]),t}(a.Component);t.a=_},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(107),a=n(9),s=n(43),u=n(14),c=function(e){return i.a.createElement(u.a.Consumer,null,function(t){return t?i.a.createElement("div",null,i.a.createElement(s.a,null),e.children):i.a.createElement(o.a,{to:a.f})})};t.a=c},function(e,t,n){"use strict";var r=(n(33),n(35),n(36));n.d(t,"a",function(){return r.a});n(21),n(11),n(38),n(39),n(12),n(40)},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=function(e){var t=e.textarea?i.a.createElement("textarea",{value:e.value,onChange:e.onChange,type:e.type,placeholder:e.label,id:e.id,className:"form-control"}):i.a.createElement("input",{value:e.value,onChange:e.onChange,type:e.type,placeholder:e.label,id:e.id,className:"form-control"});return i.a.createElement("div",{className:"form-group row"},i.a.createElement("label",{htmlFor:e.id,className:"col-sm-2 col-form-label"},e.label),i.a.createElement("div",{className:"col-sm-10"},t))};t.a=o},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(0),s=n.n(a),u=n(26),c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=function(e){function t(e){r(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.state={kind:u.a.VIDEO,filename:""},n.handleChangeKind=n.handleChangeKind.bind(n),n}
1return o(t,e),c(t,[{key:"handleChangeKind",value:function(e){this.props.onMediaKindChange(e.target.value),this.setState({kind:e.target.value})}},{key:"render",value:function(){var e=null;switch(this.state.kind){case u.a.VIDEO:e=s.a.createElement("input",{value:this.props.value,onChange:this.props.onChange,type:"text",placeholder:"Video url",id:this.props.id,className:"form-control"});break;case u.a.SOUNDCLOUD:e=s.a.createElement("input",{value:this.props.value,onChange:this.props.onChange,type:"text",placeholder:"Soundcloud url",id:this.props.id,className:"form-control"});break;case u.a.IMAGE:e=s.a.createElement("input",{value:this.props.value,onChange:this.props.onChange,type:"file",placeholder:"Upload image",id:this.props.id,className:"form-control"});break;default:e=s.a.createElement("p",null,"Bad input type")}var t=this.state.kind;return s.a.createElement("div",{className:"form-group row"},s.a.createElement("label",{htmlFor:this.props.id,className:"col-sm-2 col-form-label"},this.props.label),s.a.createElement("div",{className:"col-sm-10"},s.a.createElement("div",{className:"form-check form-check-inline"},s.a.createElement("input",{type:"radio",id:"video",name:"kind",value:u.a.VIDEO,className:"form-check-input",checked:t===u.a.VIDEO,onChange:this.handleChangeKind}),s.a.createElement("label",{className:"form-check-label",htmlFor:"video"},"Video")),s.a.createElement("div",{className:"form-check form-check-inline"},s.a.createElement("input",{type:"radio",id:"souncloud",name:"kind",value:u.a.SOUNDCLOUD,className:"form-check-input",checked:t===u.a.SOUNDCLOUD,onChange:this.handleChangeKind}),s.a.createElement("label",{className:"form-check-label",htmlFor:"souncloud"},"Souncloud")),s.a.createElement("div",{className:"form-check form-check-inline"},s.a.createElement("input",{type:"radio",id:"image",name:"kind",value:u.a.IMAGE,className:"form-check-input",checked:t===u.a.IMAGE,onChange:this.handleChangeKind}),s.a.createElement("label",{className:"form-check-label",htmlFor:"image"},"Image")),e))}}]),t}(a.Component);t.a=l},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(111),a=function(e){return i.a.createElement("table",{className:"table table-hover"},i.a.createElement("thead",null,i.a.createElement("tr",null,i.a.createElement("th",
1null,"Titre"),i.a.createElement("th",null,"Auteur"),i.a.createElement("th",null,"Date"),i.a.createElement("th",null,"Actions"))),i.a.createElement("tbody",null,Object.keys(e.posts).map(function(t){return i.a.createElement(o.a,{key:t,index:t,post:e.posts[t],onEdit:e.onEdit,onDelete:e.onDelete})})))};t.a=a},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=function(e){return i.a.createElement("tr",null,i.a.createElement("td",null,e.post.title),i.a.createElement("td",null,e.post.author),i.a.createElement("td",null,e.post.date.toString()),i.a.createElement("td",null,i.a.createElement("button",{className:"btn btn-primary",onClick:function(){return e.onEdit(e.index)}},"Editer"),i.a.createElement("button",{className:"btn btn-danger",onClick:function(){return e.onDelete(e.index)}},"Supprimer")))};t.a=o},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(0),s=n.n(a),u=n(4),c=n.n(u),l=n(14),h=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),f=function(e){return function(t){function n(e){r(this,n);var t=i(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e));return t.state={user:null},t}return o(n,t),h(n,[{key:"componentDidMount",value:function(){var e=this;c.a.auth().onAuthStateChanged(function(t){return t?e.setState({user:t}):e.setState({user:null})})}},{key:"render",value:function(){return s.a.createElement(l.a.Provider,{value:this.state.user},s.a.createElement(e,null))}}]),n}(s.a.Component)};t.a=f},function(e,t,n){"use strict";function r(){if("serviceWorker"in navigator){if(new URL("",window.location).origin!==window.location.origin)return;window.addEventListener("load",function(){var e="/service-worker.js";a?(o(e),navigator.serviceWorker.ready.then(function(){console.log("This web app is being served cache-first by a service worker. To learn more, visit https://goo.gl/SC7cgQ")})):i(e)})}}function i(e){navigator.serviceWorker.register(e).then(function(e){e.onupdatefound=function(){var t=e.installing;t.onstatechange=function(){"installed"===t.state&&(navigator.serviceWorker.controller?console.log("New content is available; please refresh."):console.log("Content is cached for offline use."))}}}).catch(function(e){console.error("Error during service worker registration:",e)})}function o(e){fetch(e).then(function(t){404===t.status||-1===t.headers.get("content-type").indexOf("javascript")?navigator.serviceWorker.ready.then(function(e){e.unregister().then(function(){window.location.reload()})}):i(e)}).catch(function(){console.log("No internet connection found. App is running in offline mode.")})}t.a=r;var a=Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/))}]); 2//# sourceMappingURL=main.e72dc073.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.