main.e928c8bd.js 630 KB

12
  1. !function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.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="/build/",t(t.s=130)}([function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),r(n(79)),r(n(80)),r(n(45)),r(n(187)),r(n(188)),r(n(189)),r(n(190)),r(n(81)),r(n(191)),r(n(82)),r(n(192)),r(n(193)),r(n(195)),r(n(196)),r(n(197))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(0),i=n(0),a=n(0),s=n(0),u=n(0),c=n(30),l=n(0);t.LUIDGenerator=function(){var e=1;return function(){return e++}}(),t.sha1=function(e){var t=s.stringToByteArray(e),n=new a.Sha1;n.update(t);var r=n.digest();return i.base64.encodeByteArray(r)};var h=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+=h.apply(null,e[r]):"object"===typeof e[r]?n+=u.stringify(e[r]):n+=e[r],n+=" ";return n};t.logger=null;var f=!0;t.enableLogging=function(e,n){r.assert(!n||!0===e||!1===e,"Can't turn on custom loggers persistently."),!0===e?("undefined"!==typeof console&&("function"===typeof console.log?t.logger=console.log.bind(console):"object"===typeof console.log&&(t.logger=function(e){console.log(e)})),n&&c.SessionStorage.set("logging_enabled",!0)):"function"===typeof e?t.logger=e:(t.logger=null,c.SessionStorage.remove("logging_enabled"))},t.log=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(!0===f&&(f=!1,null===t.logger&&!0===c.SessionStorage.get("logging_enabled")&&t.enableLogging(!0)),t.logger){var r=h.apply(null,e);t.logger(r)}},t.logWrapper=function(e){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];t.log.apply(void 0,[e].concat(n))}},t.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if("undefined"!==typeof console){var n="FIREBASE INTERNAL ERROR: "+h.apply(void 0,e);"undefined"!==typeof console.error?console.error(n):console.log(n)}},t.fatal=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=h.apply(void 0,e);throw new Error("FIREBASE FATAL ERROR: "+n)},t.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if("undefined"!==typeof console){var n="FIREBASE WARNING: "+h.apply(void 0,e);"undefined"!==typeof console.warn?console.warn(n):console.log(n)}},t.warnIfPageIsSecure=function(){"undefined"!==typeof window&&window.location&&window.location.protocol&&-1!==window.location.protocol.indexOf("https:")&&t.warn("Insecure Firebase access from a secure page. Please use https in calls to new Firebase().")},t.warnAboutUnsupportedMethod=function(e){t.warn(e+" is unsupported and will likely change soon. Please do not use.")},t.isInvalidJSONNumber=function(e){return"number"===typeof e&&(e!=e||e==Number.POSITIVE_INFINITY||e==Number.NEGATIVE_INFINITY)},t.executeWhenDOMReady=function(e){if(l.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))}},t.MIN_NAME="[MIN_NAME]",t.MAX_NAME="[MAX_NAME]",t.nameCompare=function(e,n){if(e===n)return 0;if(e===t.MIN_NAME||n===t.MAX_NAME)return-1;if(n===t.MIN_NAME||e===t.MAX_NAME)return 1;var r=t.tryParseInt(e),o=t.tryParseInt(n);return null!==r?null!==o?r-o==0?e.length-n.length:r-o:-1:null!==o?1:e<n?-1:1},t.stringCompare=function(e,t){return e===t?0:e<t?-1:1},t.requireKey=function(e,t){if(t&&e in t)return t[e];throw new Error("Missing required key ("+e+") in object: "+u.stringify(t))},t.ObjectToUniqueKey=function(e){if("object"!==typeof e||null===e)return u.stringify(e);var n=[];for(var r in e)n.push(r);n.sort();for(var o="{",i=0;i<n.length;i++)0!==i&&(o+=","),o+=u.stringify(n[i]),o+=":",o+=t.ObjectToUniqueKey(e[n[i]]);return o+="}"},t.splitStringBySize=function(e,t){var n=e.length;if(n<=t)return[e];for(var r=[],o=0;o<n;o+=t)o+t>n?r.push(e.substring(o,n)):r.push(e.substring(o,o+t));return r},t.each=function(e,t){if(Array.isArray(e))for(var n=0;n<e.length;++n)t(n,e[n]);else o.forEach(e,function(e,n){return t(n,e)})},t.bindCallback=function(e,t){return t?e.bind(t):e},t.doubleToIEEE754String=function(e){r.assert(!t.isInvalidJSONNumber(e),"Invalid JSON number");var n,o,i,a,s,u,c;for(0===e?(o=0,i=0,n=1/e===-1/0?1:0):(n=e<0,e=Math.abs(e),e>=Math.pow(2,-1022)?(a=Math.min(Math.floor(Math.log(e)/Math.LN2),1023),o=a+1023,i=Math.round(e*Math.pow(2,52-a)-Math.pow(2,52))):(o=0,i=Math.round(e/Math.pow(2,-1074)))),u=[],s=52;s;s-=1)u.push(i%2?1:0),i=Math.floor(i/2);for(s=11;s;s-=1)u.push(o%2?1:0),o=Math.floor(o/2);u.push(n?1:0),u.reverse(),c=u.join("");var l="";for(s=0;s<64;s+=8){var h=parseInt(c.substr(s,8),2).toString(16);1===h.length&&(h="0"+h),l+=h}return l.toLowerCase()},t.isChromeExtensionContentScript=function(){return!("object"!==typeof window||!window.chrome||!window.chrome.extension||/^chrome/.test(window.location.href))},t.isWindowsStoreApp=function(){return"object"===typeof Windows&&"object"===typeof Windows.UI},t.errorForServerCode=function(e,t){var n="Unknown Error";"too_big"===e?n="The data requested exceeds the maximum size that can be accessed with a single request.":"permission_denied"==e?n="Client doesn't have permission to access the desired data.":"unavailable"==e&&(n="The service is unavailable");var r=new Error(e+" at "+t.path.toString()+": "+n);return r.code=e.toUpperCase(),r},t.INTEGER_REGEXP_=new RegExp("^-?\\d{1,10}$"),t.tryParseInt=function(e){if(t.INTEGER_REGEXP_.test(e)){var n=Number(e);if(n>=-2147483648&&n<=2147483647)return n}return null},t.exceptionGuard=function(e){try{e()}catch(e){setTimeout(function(){var n=e.stack||"";throw t.warn("Exception was thrown by user callback.",n),e},Math.floor(0))}},t.callUserCallback=function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];"function"===typeof e&&t.exceptionGuard(function(){e.apply(void 0,n)})},t.beingCrawled=function(){return("object"===typeof window&&window.navigator&&window.navigator.userAgent||"").search(/googlebot|google webmaster tools|bingbot|yahoo! slurp|baiduspider|yandexbot|duckduckbot/i)>=0},t.exportPropGetter=function(e,t,n){Object.defineProperty(e,t,{get:n})},t.setTimeoutNonBlocking=function(e,t){var n=setTimeout(e,t);return"object"===typeof n&&n.unref&&n.unref(),n}},function(e,t,n){"use strict";e.exports=n(137)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),o=n(0),i=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 o=t.split("/"),r=0;r<o.length;r++)o[r].length>0&&n.push(o[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(),o=n.getFront();if(null===r)return n;if(r===o)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(),o=t.slice(),i=0;i<n.length&&i<o.length;i++){var a=r.nameCompare(n[i],o[i]);if(0!==a)return a}return n.length===o.length?0:n.length<o.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}();t.Path=i;var a=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_+=o.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_+=o.stringLength(e),this.checkValid_()},e.prototype.pop=function(){var e=this.parts_.pop();this.byteLength_-=o.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_+").");if(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}();t.ValidationPath=a},function(e,t,n){"use strict";var r=function(){};e.exports=r},function(e,t,n){e.exports=n(151)()},function(e,t,n){"use strict";function r(e){a=e}function o(e){s=e}var i=this&&this.__extends||function(){var e=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])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var a,s,u=n(32),c=n(1),l=n(9),h=n(33);t.setNodeFromJSON=r,t.setMaxNode=o;var f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.compare=function(e,t){var n=e.node.getPriority(),r=t.node.getPriority(),o=n.compareTo(r);return 0===o?c.nameCompare(e.name,t.name):o},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 l.NamedNode.MIN},t.prototype.maxPost=function(){return new l.NamedNode(c.MAX_NAME,new h.LeafNode("[PRIORITY-POST]",s))},t.prototype.makePost=function(e,t){var n=a(e);return new l.NamedNode(t,new h.LeafNode("[PRIORITY-POST]",n))},t.prototype.toString=function(){return".priority"},t}(u.Index);t.PriorityIndex=f,t.PRIORITY_INDEX=new f},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=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])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var o,i=n(0),a=n(1),s=n(34),u=n(9),c=n(88),l=n(6),h=n(21),f=n(90),p=n(33),d=n(92),y=function(){function e(e,t,n){this.children_=e,this.priorityNode_=t,this.indexMap_=n,this.lazyHash_=null,this.priorityNode_&&c.validatePriorityNode(this.priorityNode_),this.children_.isEmpty()&&i.assert(!this.priorityNode_||this.priorityNode_.isEmpty(),"An empty node cannot have a priority")}return Object.defineProperty(e,"EMPTY_NODE",{get:function(){return o||(o=new e(new s.SortedMap(d.NAME_COMPARATOR),null,f.IndexMap.Default))},enumerable:!0,configurable:!0}),e.prototype.isLeafNode=function(){return!1},e.prototype.getPriority=function(){return this.priorityNode_||o},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?o: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(i.assert(n,"We should always be passing snapshot nodes"),".priority"===t)return this.updatePriority(n);var r=new u.NamedNode(t,n),a=void 0,s=void 0,c=void 0;return n.isEmpty()?(a=this.children_.remove(t),s=this.indexMap_.removeFromIndexes(r,this.children_)):(a=this.children_.insert(t,n),s=this.indexMap_.addToIndexes(r,this.children_)),c=a.isEmpty()?o:this.priorityNode_,new e(a,c,s)},e.prototype.updateChild=function(e,t){var n=e.getFront();if(null===n)return t;i.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,o=0,i=!0;if(this.forEachChild(l.PRIORITY_INDEX,function(a,s){n[a]=s.val(t),r++,i&&e.INTEGER_REGEXP_.test(a)?o=Math.max(o,Number(a)):i=!1}),!t&&i&&o<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:"+c.priorityHashText(this.getPriority().val())+":"),this.forEachChild(l.PRIORITY_INDEX,function(t,n){var r=n.hash();""!==r&&(e+=":"+t+":"+r)}),this.lazyHash_=""===e?"":a.sha1(e)}return this.lazyHash_},e.prototype.getPredecessorChildName=function(e,t,n){var r=this.resolveIndex_(n);if(r){var o=r.getPredecessorKey(new u.NamedNode(e,t));return o?o.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 u.NamedNode(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 u.NamedNode(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,u.NamedNode.Wrap),o=r.peek();null!=o&&t.compare(o,e)<0;)r.getNext(),o=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,u.NamedNode.Wrap),o=r.peek();null!=o&&t.compare(o,e)>0;)r.getNext(),o=r.peek();return r},e.prototype.compareTo=function(e){return this.isEmpty()?e.isEmpty()?0:-1:e.isLeafNode()||e.isEmpty()?1:e===t.MAX_NODE?-1:0},e.prototype.withIndex=function(t){if(t===h.KEY_INDEX||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===h.KEY_INDEX||this.indexMap_.hasIndex(e)},e.prototype.equals=function(e){if(e===this)return!0;if(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(l.PRIORITY_INDEX),r=t.getIterator(l.PRIORITY_INDEX),o=n.getNext(),i=r.getNext();o&&i;){if(o.name!==i.name||!o.node.equals(i.node))return!1;o=n.getNext(),i=r.getNext()}return null===o&&null===i}return!1}return!1},e.prototype.resolveIndex_=function(e){return e===h.KEY_INDEX?null:this.indexMap_.get(e.toString())},e.INTEGER_REGEXP_=/^(0|[1-9]\d*)$/,e}();t.ChildrenNode=y;var v=function(e){function t(){return e.call(this,new s.SortedMap(d.NAME_COMPARATOR),y.EMPTY_NODE,f.IndexMap.Default)||this}return r(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 y.EMPTY_NODE},t.prototype.isEmpty=function(){return!1},t}(y);t.MaxNode=v,t.MAX_NODE=new v,Object.defineProperties(u.NamedNode,{MIN:{value:new u.NamedNode(a.MIN_NAME,y.EMPTY_NODE)},MAX:{value:new u.NamedNode(a.MAX_NAME,t.MAX_NODE)}}),h.KeyIndex.__EMPTY_NODE=y.EMPTY_NODE,p.LeafNode.__childrenNodeConstructor=y,c.setMaxNode(t.MAX_NODE),l.setMaxNode(t.MAX_NODE)},function(e,t,n){"use strict";var r=function(e,t,n,r,o,i,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,o,i,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){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){this.name=e,this.node=t}return e.Wrap=function(t,n){return new e(t,n)},e}();t.NamedNode=r},function(e,t,n){"use strict";function r(e){return null!=e}function o(e){return void 0!==e}function i(e){return"function"===typeof e}function a(e){return"object"===typeof e}function s(e){return a(e)&&null!==e}function u(e){return a(e)&&!Array.isArray(e)}function c(e){return"string"===typeof e||e instanceof String}function l(e){return"number"===typeof e||e instanceof Number}function h(e){return f()&&e instanceof Blob}function f(){return"undefined"!==typeof Blob}t.a=r,t.c=o,t.b=i,t.i=a,t.g=s,t.f=u,t.j=c,t.h=l,t.d=h,t.e=f},function(e,t,n){"use strict";function r(e){return"[object Array]"===T.call(e)}function o(e){return"[object ArrayBuffer]"===T.call(e)}function i(e){return"undefined"!==typeof FormData&&e instanceof FormData}function a(e){return"undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer}function s(e){return"string"===typeof e}function u(e){return"number"===typeof e}function c(e){return"undefined"===typeof e}function l(e){return null!==e&&"object"===typeof e}function h(e){return"[object Date]"===T.call(e)}function f(e){return"[object File]"===T.call(e)}function p(e){return"[object Blob]"===T.call(e)}function d(e){return"[object Function]"===T.call(e)}function y(e){return l(e)&&d(e.pipe)}function v(e){return"undefined"!==typeof URLSearchParams&&e instanceof URLSearchParams}function m(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}function g(){return("undefined"===typeof navigator||"ReactNative"!==navigator.product)&&("undefined"!==typeof window&&"undefined"!==typeof document)}function _(e,t){if(null!==e&&"undefined"!==typeof e)if("object"!==typeof e&&(e=[e]),r(e))for(var n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}function b(){function e(e,n){"object"===typeof t[n]&&"object"===typeof e?t[n]=b(t[n],e):t[n]=e}for(var t={},n=0,r=arguments.length;n<r;n++)_(arguments[n],e);return t}function w(e,t,n){return _(t,function(t,r){e[r]=n&&"function"===typeof t?E(t,n):t}),e}var E=n(117),C=n(262),T=Object.prototype.toString;e.exports={isArray:r,isArrayBuffer:o,isBuffer:C,isFormData:i,isArrayBufferView:a,isString:s,isNumber:u,isObject:l,isUndefined:c,isDate:h,isFile:f,isBlob:p,isFunction:d,isStream:y,isURLSearchParams:v,isStandardBrowserEnv:g,forEach:_,merge:b,extend:w,trim:m}},function(e,t,n){"use strict";function r(e){return"storage/"+e}function o(){return new E(C.UNKNOWN,"An unknown error occurred, please check the error payload for server response.")}function i(e){return new E(C.OBJECT_NOT_FOUND,"Object '"+e+"' does not exist.")}function a(e){return new E(C.QUOTA_EXCEEDED,"Quota for bucket '"+e+"' exceeded, please view quota on https://firebase.google.com/pricing/.")}function s(){return new E(C.UNAUTHENTICATED,"User is not authenticated, please authenticate using Firebase Authentication and try again.")}function u(e){return new E(C.UNAUTHORIZED,"User does not have permission to access '"+e+"'.")}function c(){return new E(C.RETRY_LIMIT_EXCEEDED,"Max retry time for operation exceeded, please try again.")}function l(){return new E(C.CANCELED,"User canceled the upload/download.")}function h(e){return new E(C.INVALID_URL,"Invalid URL '"+e+"'.")}function f(e){return new E(C.INVALID_DEFAULT_BUCKET,"Invalid default bucket '"+e+"'.")}function p(){return new E(C.CANNOT_SLICE_BLOB,"Cannot slice blob for upload. Please retry the upload.")}function d(){return new E(C.SERVER_FILE_WRONG_SIZE,"Server recorded incorrect upload file size, please retry the upload.")}function y(){return new E(C.NO_DOWNLOAD_URL,"The given file does not have any download URLs.")}function v(e,t,n){return new E(C.INVALID_ARGUMENT,"Invalid argument in `"+t+"` at index "+e+": "+n)}function m(e,t,n,r){var o,i;return e===t?(o=e,i=1===e?"argument":"arguments"):(o="between "+e+" and "+t,i="arguments"),new E(C.INVALID_ARGUMENT_COUNT,"Invalid argument count in `"+n+"`: Expected "+o+" "+i+", received "+r+".")}function g(){return new E(C.APP_DELETED,"The Firebase app was deleted.")}function _(e){return new E(C.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 E(C.INVALID_FORMAT,"String does not match format '"+e+"': "+t)}function w(e){throw new E(C.INTERNAL_ERROR,"Internal error: "+e)}n.d(t,"a",function(){return C}),t.s=o,t.m=i,t.n=a,t.q=s,t.r=u,t.o=c,t.c=l,t.k=h,t.h=f,t.d=p,t.p=d,t.l=y,t.f=v,t.g=m,t.b=g,t.j=_,t.i=b,t.e=w;var E=(n(38),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}()),C={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",INVALID_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"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"firebase",function(){return o});var r=n(186),o=Object(r.a)();t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),o=n(0),i=n(1),a=n(0),s=n(0);t.INVALID_KEY_REGEX_=/[\[\].#$\/\u0000-\u001F\u007F]/,t.INVALID_PATH_REGEX_=/[\[\].#$\u0000-\u001F\u007F]/,t.MAX_LEAF_SIZE_=10485760,t.isValidKey=function(e){return"string"===typeof e&&0!==e.length&&!t.INVALID_KEY_REGEX_.test(e)},t.isValidPathString=function(e){return"string"===typeof e&&0!==e.length&&!t.INVALID_PATH_REGEX_.test(e)},t.isValidRootPathString=function(e){return e&&(e=e.replace(/^\/*\.info(\/|$)/,"/")),t.isValidPathString(e)},t.isValidPriority=function(e){return null===e||"string"===typeof e||"number"===typeof e&&!i.isInvalidJSONNumber(e)||e&&"object"===typeof e&&o.contains(e,".sv")},t.validateFirebaseDataArg=function(e,n,r,o,i){i&&void 0===r||t.validateFirebaseData(a.errorPrefix(e,n,i),r,o)},t.validateFirebaseData=function(e,n,a){var u=a instanceof r.Path?new r.ValidationPath(a,e):a;if(void 0===n)throw new Error(e+"contains undefined "+u.toErrorString());if("function"===typeof n)throw new Error(e+"contains a function "+u.toErrorString()+" with contents = "+n.toString());if(i.isInvalidJSONNumber(n))throw new Error(e+"contains "+n.toString()+" "+u.toErrorString());if("string"===typeof n&&n.length>t.MAX_LEAF_SIZE_/3&&s.stringLength(n)>t.MAX_LEAF_SIZE_)throw new Error(e+"contains a string greater than "+t.MAX_LEAF_SIZE_+" utf8 bytes "+u.toErrorString()+" ('"+n.substring(0,50)+"...')");if(n&&"object"===typeof n){var c=!1,l=!1;if(o.forEach(n,function(n,r){if(".value"===n)c=!0;else if(".priority"!==n&&".sv"!==n&&(l=!0,!t.isValidKey(n)))throw new Error(e+" contains an invalid key ("+n+") "+u.toErrorString()+'. Keys must be non-empty strings and can\'t contain ".", "#", "$", "/", "[", or "]"');u.push(n),t.validateFirebaseData(e,r,u),u.pop()}),c&&l)throw new Error(e+' contains ".value" child '+u.toErrorString()+" in addition to actual children.")}},t.validateFirebaseMergePaths=function(e,n){var o,i;for(o=0;o<n.length;o++){i=n[o];for(var a=i.slice(),s=0;s<a.length;s++)if(".priority"===a[s]&&s===a.length-1);else if(!t.isValidKey(a[s]))throw new Error(e+"contains an invalid key ("+a[s]+") in path "+i.toString()+'. Keys must be non-empty strings and can\'t contain ".", "#", "$", "/", "[", or "]"')}n.sort(r.Path.comparePaths);var u=null;for(o=0;o<n.length;o++){if(i=n[o],null!==u&&u.contains(i))throw new Error(e+"contains a path "+u.toString()+" that is ancestor of another path "+i.toString());u=i}},t.validateFirebaseMergeDataArg=function(e,n,i,s,u){if(!u||void 0!==i){var c=a.errorPrefix(e,n,u);if(!i||"object"!==typeof i||Array.isArray(i))throw new Error(c+" must be an object containing the children to replace.");var l=[];o.forEach(i,function(e,n){var o=new r.Path(e);if(t.validateFirebaseData(c,n,s.child(o)),".priority"===o.getBack()&&!t.isValidPriority(n))throw new Error(c+"contains an invalid value for '"+o.toString()+"', which must be a valid Firebase priority (a string, finite number, server value, or null).");l.push(o)}),t.validateFirebaseMergePaths(c,l)}},t.validatePriority=function(e,n,r,o){if(!o||void 0!==r){if(i.isInvalidJSONNumber(r))throw new Error(a.errorPrefix(e,n,o)+"is "+r.toString()+", but must be a valid Firebase priority (a string, finite number, server value, or null).");if(!t.isValidPriority(r))throw new Error(a.errorPrefix(e,n,o)+"must be a valid Firebase priority (a string, finite number, server value, or null).")}},t.validateEventType=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(a.errorPrefix(e,t,r)+'must be a valid event type = "value", "child_added", "child_removed", "child_changed", or "child_moved".')}},t.validateKey=function(e,n,r,o){if((!o||void 0!==r)&&!t.isValidKey(r))throw new Error(a.errorPrefix(e,n,o)+'was an invalid key = "'+r+'". Firebase keys must be non-empty strings and can\'t contain ".", "#", "$", "/", "[", or "]").')},t.validatePathString=function(e,n,r,o){if((!o||void 0!==r)&&!t.isValidPathString(r))throw new Error(a.errorPrefix(e,n,o)+'was an invalid path = "'+r+'". Paths must be non-empty strings and can\'t contain ".", "#", "$", "[", or "]"')},t.validateRootPathString=function(e,n,r,o){r&&(r=r.replace(/^\/*\.info(\/|$)/,"/")),t.validatePathString(e,n,r,o)},t.validateWritablePath=function(e,t){if(".info"===t.getFront())throw new Error(e+" failed = Can't modify data under /.info/")},t.validateUrl=function(e,n,r){var o=r.path.toString();if("string"!==typeof r.repoInfo.host||0===r.repoInfo.host.length||!t.isValidKey(r.repoInfo.namespace)||0!==o.length&&!t.isValidRootPathString(o))throw new Error(a.errorPrefix(e,n,!1)+'must be a valid firebase URL and the path can\'t contain ".", "#", "$", "[", or "]".')},t.validateCredential=function(e,t,n,r){if((!r||void 0!==n)&&"string"!==typeof n)throw new Error(a.errorPrefix(e,t,r)+"must be a valid credential (a string).")},t.validateBoolean=function(e,t,n,r){if((!r||void 0!==n)&&"boolean"!==typeof n)throw new Error(a.errorPrefix(e,t,r)+"must be a boolean.")},t.validateString=function(e,t,n,r){if((!r||void 0!==n)&&"string"!==typeof n)throw new Error(a.errorPrefix(e,t,r)+"must be a valid string.")},t.validateObject=function(e,t,n,r){if((!r||void 0!==n)&&(!n||"object"!==typeof n||null===n))throw new Error(a.errorPrefix(e,t,r)+"must be a valid object.")},t.validateObjectContainsKey=function(e,t,n,r,i,s){if(!n||"object"!==typeof n||!o.contains(n,r)){if(i)return;throw new Error(a.errorPrefix(e,t,i)+'must contain the key "'+r+'"')}if(s){var u=o.safeGet(n,r);if("number"===s&&"number"!==typeof u||"string"===s&&"string"!==typeof u||"boolean"===s&&"boolean"!==typeof u||"function"===s&&"function"!==typeof u||"object"===s&&"object"!==typeof u&&u)throw i?new Error(a.errorPrefix(e,t,i)+'contains invalid value for key "'+r+'" (must be of type "'+s+'")'):new Error(a.errorPrefix(e,t,i)+'must contain the key "'+r+'" with type "'+s+'"')}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);!function(e){e[e.OVERWRITE=0]="OVERWRITE",e[e.MERGE=1]="MERGE",e[e.ACK_USER_WRITE=2]="ACK_USER_WRITE",e[e.LISTEN_COMPLETE=3]="LISTEN_COMPLETE"}(t.OperationType||(t.OperationType={}));var o=function(){function e(e,t,n,o){this.fromUser=e,this.fromServer=t,this.queryId=n,this.tagged=o,r.assert(!o||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.OperationSource=o},function(e,t,n){"use strict";function r(e){return new Promise(e)}function o(e){return Promise.resolve(e)}function i(e){return Promise.reject(e)}t.a=r,t.c=o,t.b=i},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";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t,n,r,o){this.type=e,this.snapshotNode=t,this.childName=n,this.oldSnap=r,this.prevName=o}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}();t.Change=r},function(e,t,n){"use strict";function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function o(e,t){for(var n in e)r(e,n)&&t(n,e[n])}function i(e){if(null==e)return{};var t={};return o(e,function(e,n){t[e]=n}),t}t.b=o,t.a=i},function(e,t,n){"use strict";var r=n(71),o=(n(170),n(171));n(172),n(74),n(73);n.d(t,"b",function(){return r.b}),n.d(t,"a",function(){return o.a})},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=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])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var o,i=n(32),a=n(9),s=n(1),u=n(0),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),Object.defineProperty(t,"__EMPTY_NODE",{get:function(){return o},set:function(e){o=e},enumerable:!0,configurable:!0}),t.prototype.compare=function(e,t){return s.nameCompare(e.name,t.name)},t.prototype.isDefinedOn=function(e){throw u.assertionError("KeyIndex.isDefinedOn not expected to be called.")},t.prototype.indexedValueChanged=function(e,t){return!1},t.prototype.minPost=function(){return a.NamedNode.MIN},t.prototype.maxPost=function(){return new a.NamedNode(s.MAX_NAME,o)},t.prototype.makePost=function(e,t){return u.assert("string"===typeof e,"KeyIndex indexValue must always be a string."),new a.NamedNode(e,o)},t.prototype.toString=function(){return".key"},t}(i.Index);t.KeyIndex=c,t.KEY_INDEX=new c},function(e,t,n){"use strict";function r(e,t){if(void 0===t&&(t=null),null===e)return o.ChildrenNode.EMPTY_NODE;if("object"===typeof e&&".priority"in e&&(t=e[".priority"]),u.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){var n=e;return new i.LeafNode(n,r(t))}if(e instanceof Array||!p){var d=o.ChildrenNode.EMPTY_NODE,y=e;return s.forEach(y,function(e,t){if(s.contains(y,e)&&"."!==e.substring(0,1)){var n=r(t);!n.isLeafNode()&&n.isEmpty()||(d=d.updateImmediateChild(e,n))}}),d.updatePriority(r(t))}var v=[],m=!1,g=e;if(s.forEach(g,function(e,t){if("string"!==typeof e||"."!==e.substring(0,1)){var n=r(g[e]);n.isEmpty()||(m=m||!n.getPriority().isEmpty(),v.push(new a.NamedNode(e,n)))}}),0==v.length)return o.ChildrenNode.EMPTY_NODE;var _=c.buildChildSet(v,l.NAME_ONLY_COMPARATOR,function(e){return e.name},l.NAME_COMPARATOR);if(m){var b=c.buildChildSet(v,f.PRIORITY_INDEX.getCompare());return new o.ChildrenNode(_,r(t),new h.IndexMap({".priority":b},{".priority":f.PRIORITY_INDEX}))}return new o.ChildrenNode(_,r(t),h.IndexMap.Default)}Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),i=n(33),a=n(9),s=n(0),u=n(0),c=n(91),l=n(92),h=n(90),f=n(6),p=!0;t.nodeFromJSON=r,f.setNodeFromJSON(r)},function(e,t,n){"use strict";function r(e){switch(e){case f.RAW:case f.BASE64:case f.BASE64URL:case f.DATA_URL:return;default:throw"Expected one of the event types: ["+f.RAW+", "+f.BASE64+", "+f.BASE64URL+", "+f.DATA_URL+"]."}}function o(e,t){switch(e){case f.RAW:return new p(i(t));case f.BASE64:case f.BASE64URL:return new p(s(e,t));case f.DATA_URL:return new p(u(t),c(t))}throw h.s()}function i(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 o=n<e.length-1&&56320==(64512&e.charCodeAt(n+1));if(o){var i=r,a=e.charCodeAt(++n);r=65536|(1023&i)<<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 a(e){var t;try{t=decodeURIComponent(e)}catch(e){throw h.i(f.DATA_URL,"Malformed data URL.")}return i(t)}function s(e,t){switch(e){case f.BASE64:var n=-1!==t.indexOf("-"),r=-1!==t.indexOf("_");if(n||r){var o=n?"-":"_";throw h.i(e,"Invalid character '"+o+"' found: is it base64url encoded?")}break;case f.BASE64URL:var i=-1!==t.indexOf("+"),a=-1!==t.indexOf("/");if(i||a){var o=i?"+":"/";throw h.i(e,"Invalid character '"+o+"' found: is it base64 encoded?")}t=t.replace(/-/g,"+").replace(/_/g,"/")}var s;try{s=atob(t)}catch(t){throw h.i(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 u(e){var t=new d(e);return t.base64?s(f.BASE64,t.rest):a(t.rest)}function c(e){return new d(e).contentType}function l(e,t){return!!(e.length>=t.length)&&e.substring(e.length-t.length)===t}n.d(t,"a",function(){return f}),t.c=r,t.b=o;var h=n(12),f={RAW:"raw",BASE64:"base64",BASE64URL:"base64url",DATA_URL:"data_url"},p=function(){function e(e,t){this.data=e,this.contentType=t||null}return e}(),d=function(){function e(e){this.base64=!1,this.contentType=null;var t=e.match(/^data:([^,]+)?,/);if(null===t)throw h.i(f.DATA_URL,"Must be formatted 'data:[<mediatype>][;base64],<data>");var n=t[1]||null;null!=n&&(this.base64=l(n,";base64"),this.contentType=this.base64?n.substring(0,n.length-";base64".length):n),this.rest=e.substring(e.indexOf(",")+1)}return e}()},function(e,t,n){"use strict";function r(e){switch(e){case i.RUNNING:case i.PAUSING:case i.CANCELING:return a.RUNNING;case i.PAUSED:return a.PAUSED;case i.SUCCESS:return a.SUCCESS;case i.CANCELED:return a.CANCELED;case i.ERROR:default:return a.ERROR}}n.d(t,"b",function(){return o}),n.d(t,"a",function(){return i}),n.d(t,"c",function(){return a}),t.d=r;var o={STATE_CHANGED:"state_changed"},i={RUNNING:"running",PAUSING:"pausing",PAUSED:"paused",SUCCESS:"success",CANCELING:"canceling",CANCELED:"canceled",ERROR:"error"},a={RUNNING:"running",PAUSED:"paused",SUCCESS:"success",CANCELED:"canceled",ERROR:"error"}},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="",o=t.indexOf("#");-1!==o&&(r=t.substr(o),t=t.substr(0,o));var i=t.indexOf("?");return-1!==i&&(n=t.substr(i),t=t.substr(0,i)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}},t.createPath=function(e){var t=e.pathname,n=e.search,r=e.hash,o=t||"/";return n&&"?"!==n&&(o+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o}},function(e,t,n){"use strict";n.d(t,"a",function(){return r}),n.d(t,"f",function(){return o}),n.d(t,"c",function(){return i}),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},o=function(e){return"/"===e.charAt(0)?e.substr(1):e},i=function(e,t){return new RegExp("^"+t+"(\\/|\\?|#|$)","i").test(e)},a=function(e,t){return i(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="",o=t.indexOf("#");-1!==o&&(r=t.substr(o),t=t.substr(0,o));var i=t.indexOf("?");return-1!==i&&(n=t.substr(i),t=t.substr(0,i)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}},c=function(e){var t=e.pathname,n=e.search,r=e.hash,o=t||"/";return n&&"?"!==n&&(o+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(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 a(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 s(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)}Object.defineProperty(t,"__esModule",{value:!0});var u=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},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=n(2),h=r(l),f=n(5),p=r(f),d=n(304),y=r(d),v=function(e){function t(){i(this,t);var e=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.displayName="FontAwesome",e}return s(t,e),c(t,[{key:"render",value:function(){var e=this.props,t=e.border,n=e.cssModule,r=e.className,i=e.fixedWidth,a=e.flip,s=e.inverse,c=e.name,l=e.pulse,f=e.rotate,p=e.size,d=e.spin,v=e.stack,m=e.tag,g=void 0===m?"span":m,_=e.ariaLabel,b=o(e,["border","cssModule","className","fixedWidth","flip","inverse","name","pulse","rotate","size","spin","stack","tag","ariaLabel"]),w=[];return n?(w.push(n.fa),w.push(n["fa-"+c]),p&&w.push(n["fa-"+p]),d&&w.push(n["fa-spin"]),l&&w.push(n["fa-pulse"]),t&&w.push(n["fa-border"]),i&&w.push(n["fa-fw"]),s&&w.push(n["fa-inverse"]),a&&w.push(n["fa-flip-"+a]),f&&w.push(n["fa-rotate-"+f]),v&&w.push(n["fa-stack-"+v])):(w.push("fa"),w.push("fa-"+c),p&&w.push("fa-"+p),d&&w.push("fa-spin"),l&&w.push("fa-pulse"),t&&w.push("fa-border"),i&&w.push("fa-fw"),s&&w.push("fa-inverse"),a&&w.push("fa-flip-"+a),f&&w.push("fa-rotate-"+f),v&&w.push("fa-stack-"+v)),r&&w.push(r),h.default.createElement(g,u({},b,{"aria-hidden":!0,className:w.join(" ")}),_?h.default.createElement("span",{style:y.default},_):null)}}]),t}(h.default.Component);v.propTypes={ariaLabel:p.default.string,border:p.default.bool,className:p.default.string,cssModule:p.default.object,fixedWidth:p.default.bool,flip:p.default.oneOf(["horizontal","vertical"]),inverse:p.default.bool,name:p.default.string.isRequired,pulse:p.default.bool,rotate:p.default.oneOf([90,180,270]),size:p.default.oneOf(["lg","2x","3x","4x","5x"]),spin:p.default.bool,stack:p.default.oneOf(["1x","2x"]),tag:p.default.string},t.default=v,e.exports=t.default},function(e,t,n){"use strict";function r(e){return function(){return e}}var o=function(){};o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},e.exports=o},function(e,t,n){"use strict";var r=n(150),o=(n(69),n(155));n.d(t,"a",function(){return r.a}),n.d(t,"b",function(){return o.a})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(202),o=n(203),i=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 r.DOMStorageWrapper(t)}}catch(e){}return new o.MemoryStorage};t.PersistentStorage=i("localStorage"),t.SessionStorage=i("sessionStorage")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PROTOCOL_VERSION="5",t.VERSION_PARAM="v",t.TRANSPORT_SESSION_PARAM="s",t.REFERER_PARAM="r",t.FORGE_REF="f",t.FORGE_DOMAIN="firebaseio.com",t.LAST_SESSION_PARAM="ls",t.WEBSOCKET="websocket",t.LONG_POLLING="long_polling"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9),o=n(1),i=function(){function e(){}return e.prototype.getCompare=function(){return this.compare.bind(this)},e.prototype.indexedValueChanged=function(e,t){var n=new r.NamedNode(o.MIN_NAME,e),i=new r.NamedNode(o.MIN_NAME,t);return 0!==this.compare(n,i)},e.prototype.minPost=function(){return r.NamedNode.MIN},e}();t.Index=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=n(0),i=n(1),a=n(88),s=function(){function e(t,n){void 0===n&&(n=e.__childrenNodeConstructor.EMPTY_NODE),this.value_=t,this.priorityNode_=n,this.lazyHash_=null,o.assert(void 0!==this.value_&&null!==this.value_,"LeafNode shouldn't be created with null/undefined value."),a.validatePriorityNode(this.priorityNode_)}return Object.defineProperty(e,"__childrenNodeConstructor",{get:function(){return r},set:function(e){r=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:(o.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:"+a.priorityHashText(this.priorityNode_.val())+":");var t=typeof this.value_;e+=t+":",e+="number"===t?i.doubleToIEEE754String(this.value_):this.value_,this.lazyHash_=i.sha1(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:(o.assert(t.isLeafNode(),"Unknown node type"),this.compareToLeafNode_(t))},e.prototype.compareToLeafNode_=function(t){var n=typeof t.value_,r=typeof this.value_,i=e.VALUE_TYPE_ORDER.indexOf(n),a=e.VALUE_TYPE_ORDER.indexOf(r);return o.assert(i>=0,"Unknown leaf type: "+n),o.assert(a>=0,"Unknown leaf type: "+r),i===a?"object"===r?0:this.value_<t.value_?-1:this.value_===t.value_?0:1:a-i},e.prototype.withIndex=function(){return this},e.prototype.isIndexed=function(){return!0},e.prototype.equals=function(e){if(e===this)return!0;if(e.isLeafNode()){var t=e;return this.value_===t.value_&&this.priorityNode_.equals(t.priorityNode_)}return!1},e.VALUE_TYPE_ORDER=["object","boolean","number","string"],e}();t.LeafNode=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t,n,r,o){void 0===o&&(o=null),this.isReverse_=r,this.resultGenerator_=o,this.nodeStack_=[];for(var i=1;!e.isEmpty();)if(e=e,i=t?n(e.key,t):1,r&&(i*=-1),i<0)e=this.isReverse_?e.left:e.right;else{if(0===i){this.nodeStack_.push(e);break}this.nodeStack_.push(e),e=this.isReverse_?e.right:e.left}}return e.prototype.getNext=function(){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}();t.SortedMapIterator=r;var o=function(){function e(t,n,r,o,i){this.key=t,this.value=n,this.color=null!=r?r:e.RED,this.left=null!=o?o:a.EMPTY_NODE,this.right=null!=i?i:a.EMPTY_NODE}return e.prototype.copy=function(t,n,r,o,i){return new e(null!=t?t:this.key,null!=n?n:this.value,null!=r?r:this.color,null!=o?o:this.left,null!=i?i: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,o;return o=this,r=n(e,o.key),o=r<0?o.copy(null,null,null,o.left.insert(e,t,n),null):0===r?o.copy(null,t,null,null,null):o.copy(null,null,null,null,o.right.insert(e,t,n)),o.fixUp_()},e.prototype.removeMin_=function(){if(this.left.isEmpty())return a.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 a.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;if(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}();t.LLRBNode=o;var i=function(){function e(){}return e.prototype.copy=function(e,t,n,r,o){return this},e.prototype.insert=function(e,t,n){return new o(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}();t.LLRBEmptyNode=i;var a=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,o.BLACK,null,null))},e.prototype.remove=function(t){return new e(this.comparator_,this.root_.remove(t,this.comparator_).copy(null,null,o.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 r(this.root_,null,this.comparator_,!1,e)},e.prototype.getIteratorFrom=function(e,t){return new r(this.root_,e,this.comparator_,!1,t)},e.prototype.getReverseIteratorFrom=function(e,t){return new r(this.root_,e,this.comparator_,!0,t)},e.prototype.getReverseIterator=function(e){return new r(this.root_,null,this.comparator_,!0,e)},e.EMPTY_NODE=new i,e}();t.SortedMap=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(94),o=n(22),i=n(3),a=n(95),s=n(208),u=n(219),c=n(0),l=n(1),h=n(0),f=n(220),p=n(50),d=n(222),y=n(100),v=n(223),m=n(101),g=n(228),_=n(83),b=function(){function e(e,t,n){var r=this;this.repoInfo_=e,this.app=n,this.dataUpdateCount=0,this.statsListener_=null,this.eventQueue_=new v.EventQueue,this.nextWriteId_=1,this.interceptServerDataCallback_=null,this.onDisconnect_=new a.SparseSnapshotTree,this.persistentConnection_=null;var o=new f.AuthTokenProvider(n);if(this.stats_=p.StatsManager.getCollection(e),t||l.beingCrawled())this.server_=new g.ReadonlyRestClient(this.repoInfo_,this.onDataUpdate_.bind(this),o),setTimeout(this.onConnectStatus_.bind(this,!0),0);else{var i=n.options.databaseAuthVariableOverride;if("undefined"!==typeof i&&null!==i){if("object"!==typeof i)throw new Error("Only objects are supported for option databaseAuthVariableOverride");try{c.stringify(i)}catch(e){throw new Error("Invalid authOverride provided: "+e)}}this.persistentConnection_=new m.PersistentConnection(this.repoInfo_,this.onDataUpdate_.bind(this),this.onConnectStatus_.bind(this),this.onServerInfoUpdate_.bind(this),o,i),this.server_=this.persistentConnection_}o.addTokenChangeListener(function(e){r.server_.refreshAuthToken(e)}),this.statsReporter_=p.StatsManager.getOrCreateReporter(e,function(){return new d.StatsReporter(r.stats_,r.server_)}),this.transactions_init_(),this.infoData_=new u.SnapshotHolder,this.infoSyncTree_=new s.SyncTree({startListening:function(e,t,n,o){var i=[],a=r.infoData_.getNode(e.path);return a.isEmpty()||(i=r.infoSyncTree_.applyServerOverwrite(e.path,a),setTimeout(function(){o("ok")},0)),i},stopListening:function(){}}),this.updateInfo_("connected",!1),this.serverSyncTree_=new s.SyncTree({startListening:function(e,t,n,o){return r.server_.listen(e,n,t,function(t,n){var i=o(t,n);r.eventQueue_.raiseEventsForChangedPath(e.path,i)}),[]},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 i.Path(".info/serverTimeOffset")),t=e.val()||0;return(new Date).getTime()+t},e.prototype.generateServerValues=function(){return r.generateWithValues({timestamp:this.serverTime()})},e.prototype.onDataUpdate_=function(e,t,n,r){this.dataUpdateCount++;var a=new i.Path(e);t=this.interceptServerDataCallback_?this.interceptServerDataCallback_(e,t):t;var s=[];if(r)if(n){var u=h.map(t,function(e){return o.nodeFromJSON(e)});s=this.serverSyncTree_.applyTaggedQueryMerge(a,u,r)}else{var c=o.nodeFromJSON(t);s=this.serverSyncTree_.applyTaggedQueryOverwrite(a,c,r)}else if(n){var l=h.map(t,function(e){return o.nodeFromJSON(e)});s=this.serverSyncTree_.applyServerMerge(a,l)}else{var f=o.nodeFromJSON(t);s=this.serverSyncTree_.applyServerOverwrite(a,f)}var p=a;s.length>0&&(p=this.rerunTransactions_(a)),this.eventQueue_.raiseEventsForChangedPath(p,s)},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;l.each(e,function(e,n){t.updateInfo_(n,e)})},e.prototype.updateInfo_=function(e,t){var n=new i.Path("/.info/"+e),r=o.nodeFromJSON(t);this.infoData_.updateSnapshot(n,r);var a=this.infoSyncTree_.applyServerOverwrite(n,r);this.eventQueue_.raiseEventsForChangedPath(n,a)},e.prototype.getNextWriteId_=function(){return this.nextWriteId_++},e.prototype.setWithPriority=function(e,t,n,i){var a=this;this.log_("set",{path:e.toString(),value:t,priority:n});var s=this.generateServerValues(),u=o.nodeFromJSON(t,n),c=r.resolveDeferredValueSnapshot(u,s),h=this.getNextWriteId_(),f=this.serverSyncTree_.applyUserOverwrite(e,c,h,!0);this.eventQueue_.queueEvents(f),this.server_.put(e.toString(),u.val(!0),function(t,n){var r="ok"===t;r||l.warn("set at "+e+" failed: "+t);var o=a.serverSyncTree_.ackUserWrite(h,!r);a.eventQueue_.raiseEventsForChangedPath(e,o),a.callOnCompleteCallback(i,t,n)});var p=this.abortTransactions_(e);this.rerunTransactions_(p),this.eventQueue_.raiseEventsForChangedPath(p,[])},e.prototype.update=function(e,t,n){var i=this;this.log_("update",{path:e.toString(),value:t});var a=!0,s=this.generateServerValues(),u={};if(h.forEach(t,function(e,t){a=!1;var n=o.nodeFromJSON(t);u[e]=r.resolveDeferredValueSnapshot(n,s)}),a)l.log("update() called with empty data. Don't do anything."),this.callOnCompleteCallback(n,"ok");else{var c=this.getNextWriteId_(),f=this.serverSyncTree_.applyUserMerge(e,u,c);this.eventQueue_.queueEvents(f),this.server_.merge(e.toString(),t,function(t,r){var o="ok"===t;o||l.warn("update at "+e+" failed: "+t);var a=i.serverSyncTree_.ackUserWrite(c,!o),s=a.length>0?i.rerunTransactions_(e):e;i.eventQueue_.raiseEventsForChangedPath(s,a),i.callOnCompleteCallback(n,t,r)}),h.forEach(t,function(t){var n=i.abortTransactions_(e.child(t));i.rerunTransactions_(n)}),this.eventQueue_.raiseEventsForChangedPath(e,[])}},e.prototype.runOnDisconnectEvents_=function(){var e=this;this.log_("onDisconnectEvents");var t=this.generateServerValues(),n=r.resolveDeferredValueTree(this.onDisconnect_,t),o=[];n.forEachTree(i.Path.Empty,function(t,n){o=o.concat(e.serverSyncTree_.applyServerOverwrite(t,n));var r=e.abortTransactions_(t);e.rerunTransactions_(r)}),this.onDisconnect_=new a.SparseSnapshotTree,this.eventQueue_.raiseEventsForChangedPath(i.Path.Empty,o)},e.prototype.onDisconnectCancel=function(e,t){var n=this;this.server_.onDisconnectCancel(e.toString(),function(r,o){"ok"===r&&n.onDisconnect_.forget(e),n.callOnCompleteCallback(t,r,o)})},e.prototype.onDisconnectSet=function(e,t,n){var r=this,i=o.nodeFromJSON(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,a=o.nodeFromJSON(t,n);this.server_.onDisconnectPut(e.toString(),a.val(!0),function(t,n){"ok"===t&&i.onDisconnect_.remember(e,a),i.callOnCompleteCallback(r,t,n)})},e.prototype.onDisconnectUpdate=function(e,t,n){var r=this;if(h.isEmpty(t))return l.log("onDisconnect().update() called with empty data. Don't do anything."),void this.callOnCompleteCallback(n,"ok");this.server_.onDisconnectMerge(e.toString(),t,function(i,a){"ok"===i&&h.forEach(t,function(t,n){var i=o.nodeFromJSON(n);r.onDisconnect_.remember(e.child(t),i)}),r.callOnCompleteCallback(n,i,a)})},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 y.StatsListener(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);h.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+":"),l.log.apply(void 0,[n].concat(e))},e.prototype.callOnCompleteCallback=function(e,t,n){e&&l.exceptionGuard(function(){if("ok"==t)e(null);else{var r=(t||"error").toUpperCase(),o=r;n&&(o+=": "+n);var i=new Error(o);i.code=r,e(i)}})},Object.defineProperty(e.prototype,"database",{get:function(){return this.__database||(this.__database=new _.Database(this))},enumerable:!0,configurable:!0}),e}();t.Repo=b},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=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}();t.CacheNode=r},function(e,t,n){"use strict";var r={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",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"},o=(i={},i[r.AVAILABLE_IN_WINDOW]="This method is available in a Window context.",i[r.AVAILABLE_IN_SW]="This method is available in a service worker context.",i[r.SHOULD_BE_INHERITED]="This method should be overriden by extended classes.",i[r.BAD_SENDER_ID]="Please ensure that 'messagingSenderId' is set correctly in the options passed into firebase.initializeApp().",i[r.PERMISSION_DEFAULT]="The required permissions were not granted and dismissed instead.",i[r.PERMISSION_BLOCKED]="The required permissions were not granted and blocked instead.",i[r.UNSUPPORTED_BROWSER]="This browser doesn't support the API's required to use the firebase SDK.",i[r.NOTIFICATIONS_BLOCKED]="Notifications have been blocked.",i[r.FAILED_DEFAULT_REGISTRATION]="We are unable to register the default service worker. {$browserErrorMessage}",i[r.SW_REGISTRATION_EXPECTED]="A service worker registration was the expected input.",i[r.GET_SUBSCRIPTION_FAILED]="There was an error when trying to get any existing Push Subscriptions.",i[r.INVALID_SAVED_TOKEN]="Unable to access details of the saved token.",i[r.SW_REG_REDUNDANT]="The service worker being used for push was made redundant.",i[r.TOKEN_SUBSCRIBE_FAILED]="A problem occured while subscribing the user to FCM: {$message}",i[r.TOKEN_SUBSCRIBE_NO_TOKEN]="FCM returned no token when subscribing the user to push.",i[r.TOKEN_SUBSCRIBE_NO_PUSH_SET]="FCM returned an invalid response when getting an FCM token.",i[r.USE_SW_BEFORE_GET_TOKEN]="You must call useServiceWorker() before calling getToken() to ensure your service worker is used.",i[r.INVALID_DELETE_TOKEN]="You must pass a valid token into deleteToken(), i.e. the token from getToken().",i[r.DELETE_TOKEN_NOT_FOUND]="The deletion attempt for token could not be performed as the token was not found.",i[r.DELETE_SCOPE_NOT_FOUND]="The deletion attempt for service worker scope could not be performed as the scope was not found.",i[r.BG_HANDLER_FUNCTION_EXPECTED]="The input to setBackgroundMessageHandler() must be a function.",i[r.NO_WINDOW_CLIENT_TO_MSG]="An attempt was made to message a non-existant window client.",i[r.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}",i[r.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.",i[r.FAILED_TO_DELETE_TOKEN]="Unable to delete the currently saved token.",i[r.NO_SW_IN_REG]="Even though the service worker registration was successful, there was a problem accessing the service worker itself.",i[r.INCORRECT_GCM_SENDER_ID]="Please change your web app manifest's 'gcm_sender_id' value to '103953800507' to use Firebase messaging.",i[r.BAD_SCOPE]="The service worker scope must be a string with at least one character.",i[r.BAD_VAPID_KEY]="The public VAPID key must be a string with at least one character.",i[r.BAD_SUBSCRIPTION]="The subscription must be a valid PushSubscription.",i[r.BAD_TOKEN]="The FCM Token used for storage / lookup was not a valid token string.",i[r.BAD_PUSH_SET]="The FCM push set used for storage / lookup was not not a valid push set string.",i[r.FAILED_DELETE_VAPID_KEY]="The VAPID key could not be deleted.",i);t.a={codes:r,map:o};var i},function(e,t,n){"use strict";n.d(t,"f",function(){return r}),n.d(t,"g",function(){return o}),n.d(t,"a",function(){return i}),n.d(t,"b",function(){return a}),n.d(t,"c",function(){return s}),n.d(t,"d",function(){return u}),n.d(t,"e",function(){return c}),n.d(t,"h",function(){return l});var r="https://firebasestorage.googleapis.com",o="https://firebasestorage.googleapis.com",i="/v0",a="/v0",s="storageBucket",u=12e4,c=6e4,l=-9007199254740991},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var r=n(12),o=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 r.h(t)},e.makeFromUrl=function(t){function n(e){"/"===e.path.charAt(e.path.length-1)&&(e.path_=e.path_.slice(0,-1))}function o(e){e.path_=decodeURIComponent(e.path)}for(var i=null,a=new RegExp("^gs://([A-Za-z0-9.\\-]+)(/(.*))?$","i"),s={bucket:1,path:3},u=new RegExp("^https?://firebasestorage\\.googleapis\\.com/v[A-Za-z0-9_]+/b/([A-Za-z0-9.\\-]+)/o(/([^?#]*).*)?$","i"),c={bucket:1,path:3},l=[{regex:a,indices:s,postModify:n},{regex:u,indices:c,postModify:o}],h=0;h<l.length;h++){var f=l[h],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 r.k(t);return i},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return s}),n.d(t,"b",function(){return u});var r=n(122),o=n(123),i=n(26),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,o){var s=void 0;"string"===typeof e?(s=Object(i.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),o?s.pathname?"/"!==s.pathname.charAt(0)&&(s.pathname=Object(r.default)(s.pathname,o.pathname)):s.pathname=o.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(o.default)(e.state,t.state)}},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 o=Object.getOwnPropertySymbols,i=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)i.call(n,l)&&(u[l]=n[l]);if(o){s=o(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){"undefined"!==typeof console&&"function"===typeof console.error&&console.error(e);try{throw new Error(e)}catch(e){}}t.a=r},function(e,t,n){"use strict";function r(e){if(!Object(a.a)(e)||Object(o.a)(e)!=s)return!1;var t=Object(i.a)(e);if(null===t)return!0;var n=h.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&l.call(n)==f}var o=n(158),i=n(163),a=n(165),s="[object Object]",u=Function.prototype,c=Object.prototype,l=u.toString,h=c.hasOwnProperty,f=l.call(Object);t.a=r},function(e,t){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function o(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 i(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=o(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,i(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||o(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";Object.defineProperty(t,"__esModule",{value:!0}),t.CONSTANTS={NODE_CLIENT:!1,NODE_ADMIN:!1,SDK_VERSION:"${JSCORE_VERSION}"}},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=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])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(86),i=n(204),a=n(1),s=n(205),u=n(87),c=n(35),l=n(3),h=n(229),f=n(14),p=n(0),d=n(0),y=n(98),v=function(e){function t(t,n){if(!(t instanceof c.Repo))throw new Error("new Reference() no longer supported - use app.database().");return e.call(this,t,n,h.QueryParams.DEFAULT,!1)||this}return r(t,e),t.prototype.getKey=function(){return p.validateArgCount("Reference.key",0,0,arguments.length),this.path.isEmpty()?null:this.path.getBack()},t.prototype.child=function(e){return p.validateArgCount("Reference.child",1,1,arguments.length),"number"===typeof e?e=String(e):e instanceof l.Path||(null===this.path.getFront()?f.validateRootPathString("Reference.child",1,e,!1):f.validatePathString("Reference.child",1,e,!1)),new t(this.repo,this.path.child(e))},t.prototype.getParent=function(){p.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(){p.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){p.validateArgCount("Reference.set",1,2,arguments.length),f.validateWritablePath("Reference.set",this.path),f.validateFirebaseDataArg("Reference.set",1,e,this.path,!1),p.validateCallback("Reference.set",2,t,!0);var n=new d.Deferred;return this.repo.setWithPriority(this.path,e,null,n.wrapCallback(t)),n.promise},t.prototype.update=function(e,t){if(p.validateArgCount("Reference.update",1,2,arguments.length),f.validateWritablePath("Reference.update",this.path),Array.isArray(e)){for(var n={},r=0;r<e.length;++r)n[""+r]=e[r];e=n,a.warn("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.")}f.validateFirebaseMergeDataArg("Reference.update",1,e,this.path,!1),p.validateCallback("Reference.update",2,t,!0);var o=new d.Deferred;return this.repo.update(this.path,e,o.wrapCallback(t)),o.promise},t.prototype.setWithPriority=function(e,t,n){if(p.validateArgCount("Reference.setWithPriority",2,3,arguments.length),f.validateWritablePath("Reference.setWithPriority",this.path),f.validateFirebaseDataArg("Reference.setWithPriority",1,e,this.path,!1),f.validatePriority("Reference.setWithPriority",2,t,!1),p.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 d.Deferred;return this.repo.setWithPriority(this.path,e,t,r.wrapCallback(n)),r.promise},t.prototype.remove=function(e){return p.validateArgCount("Reference.remove",0,1,arguments.length),f.validateWritablePath("Reference.remove",this.path),p.validateCallback("Reference.remove",1,e,!0),this.set(null,e)},t.prototype.transaction=function(e,t,n){if(p.validateArgCount("Reference.transaction",1,3,arguments.length),f.validateWritablePath("Reference.transaction",this.path),p.validateCallback("Reference.transaction",1,e,!1),p.validateCallback("Reference.transaction",2,t,!0),f.validateBoolean("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 d.Deferred;"function"===typeof t&&r.promise.catch(function(){});var o=function(e,n,o){e?r.reject(e):r.resolve(new i.TransactionResult(n,o)),"function"===typeof t&&t(e,n,o)};return this.repo.startTransaction(this.path,e,o,n),r.promise},t.prototype.setPriority=function(e,t){p.validateArgCount("Reference.setPriority",1,2,arguments.length),f.validateWritablePath("Reference.setPriority",this.path),f.validatePriority("Reference.setPriority",1,e,!1),p.validateCallback("Reference.setPriority",2,t,!0);var n=new d.Deferred;return this.repo.setWithPriority(this.path.child(".priority"),e,null,n.wrapCallback(t)),n.promise},t.prototype.push=function(e,t){p.validateArgCount("Reference.push",0,2,arguments.length),f.validateWritablePath("Reference.push",this.path),f.validateFirebaseDataArg("Reference.push",1,e,this.path,!0),p.validateCallback("Reference.push",2,t,!0);var n,r=this.repo.serverTime(),o=s.nextPushId(r),i=this.child(o),a=this.child(o);return n=null!=e?i.set(e,t).then(function(){return a}):Promise.resolve(a),i.then=n.then.bind(n),i.catch=n.then.bind(n,void 0),"function"===typeof t&&n.catch(function(){}),i},t.prototype.onDisconnect=function(){return f.validateWritablePath("Reference.onDisconnect",this.path),new o.OnDisconnect(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}(u.Query);t.Reference=v,u.Query.__referenceConstructor=v,y.SyncPoint.__referenceConstructor=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(14),i=n(3),a=n(6),s=function(){function e(e,t,n){this.node_=e,this.ref_=t,this.index_=n}return e.prototype.val=function(){return r.validateArgCount("DataSnapshot.val",0,0,arguments.length),this.node_.val()},e.prototype.exportVal=function(){return r.validateArgCount("DataSnapshot.exportVal",0,0,arguments.length),this.node_.val(!0)},e.prototype.toJSON=function(){return r.validateArgCount("DataSnapshot.toJSON",0,1,arguments.length),this.exportVal()},e.prototype.exists=function(){return r.validateArgCount("DataSnapshot.exists",0,0,arguments.length),!this.node_.isEmpty()},e.prototype.child=function(t){r.validateArgCount("DataSnapshot.child",0,1,arguments.length),t=String(t),o.validatePathString("DataSnapshot.child",1,t,!1);var n=new i.Path(t),s=this.ref_.child(n);return new e(this.node_.getChild(n),s,a.PRIORITY_INDEX)},e.prototype.hasChild=function(e){r.validateArgCount("DataSnapshot.hasChild",1,1,arguments.length),o.validatePathString("DataSnapshot.hasChild",1,e,!1);var t=new i.Path(e);return!this.node_.getChild(t).isEmpty()},e.prototype.getPriority=function(){return r.validateArgCount("DataSnapshot.getPriority",0,0,arguments.length),this.node_.getPriority().val()},e.prototype.forEach=function(t){var n=this;return r.validateArgCount("DataSnapshot.forEach",1,1,arguments.length),r.validateCallback("DataSnapshot.forEach",1,t,!1),!this.node_.isLeafNode()&&!!this.node_.forEachChild(this.index_,function(r,o){return t(new e(o,n.ref_.child(r),a.PRIORITY_INDEX))})},e.prototype.hasChildren=function(){return r.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 r.validateArgCount("DataSnapshot.numChildren",0,0,arguments.length),this.node_.numChildren()},e.prototype.getRef=function(){return r.validateArgCount("DataSnapshot.ref",0,0,arguments.length),this.ref_},Object.defineProperty(e.prototype,"ref",{get:function(){return this.getRef()},enumerable:!0,configurable:!0}),e}();t.DataSnapshot=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=n(34),i=n(3),a=n(1),s=n(0),u=function(){return r||(r=new o.SortedMap(a.stringCompare)),r},c=function(){function e(e,t){void 0===t&&(t=u()),this.value=e,this.children=t}return e.fromObject=function(t){var n=e.Empty;return s.forEach(t,function(e,t){n=n.set(new i.Path(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:i.Path.Empty,value:this.value};if(e.isEmpty())return null;var n=e.getFront(),r=this.children.get(n);if(null!==r){var o=r.findRootMostMatchingPathAndValue(e.popFront(),t);if(null!=o){return{path:new i.Path(n).child(o.path),value:o.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(),o=this.children.get(r)||e.Empty,i=o.set(t.popFront(),n),a=this.children.insert(r,i);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 o=r.remove(t.popFront()),i=void 0;return i=o.isEmpty()?this.children.remove(n):this.children.insert(n,o),null===this.value&&i.isEmpty()?e.Empty:new e(this.value,i)}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(),o=this.children.get(r)||e.Empty,i=o.setTree(t.popFront(),n),a=void 0;return a=i.isEmpty()?this.children.remove(r):this.children.insert(r,i),new e(this.value,a)},e.prototype.fold=function(e){return this.fold_(i.Path.Empty,e)},e.prototype.fold_=function(e,t){var n={};return this.children.inorderTraversal(function(r,o){n[r]=o.fold_(e.child(r),t)}),t(e,this.value,n)},e.prototype.findOnPath=function(e,t){return this.findOnPath_(e,i.Path.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 o=e.getFront(),i=this.children.get(o);return i?i.findOnPath_(e.popFront(),t.child(o),n):null},e.prototype.foreachOnPath=function(e,t){return this.foreachOnPath_(e,i.Path.Empty,t)},e.prototype.foreachOnPath_=function(t,n,r){if(t.isEmpty())return this;this.value&&r(n,this.value);var o=t.getFront(),i=this.children.get(o);return i?i.foreachOnPath_(t.popFront(),n.child(o),r):e.Empty},e.prototype.foreach=function(e){this.foreach_(i.Path.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}();t.ImmutableTree=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(18),i=n(7),a=n(6),s=function(){function e(e){this.index_=e}return e.prototype.updateChild=function(e,t,n,i,a,s){r.assert(e.isIndexed(this.index_),"A node must be indexed if only a child is updated");var u=e.getImmediateChild(t);return u.getChild(i).equals(n.getChild(i))&&u.isEmpty()==n.isEmpty()?e:(null!=s&&(n.isEmpty()?e.hasChild(t)?s.trackChildChange(o.Change.childRemovedChange(t,u)):r.assert(e.isLeafNode(),"A child remove without an old child only makes sense on a leaf node"):u.isEmpty()?s.trackChildChange(o.Change.childAddedChange(t,n)):s.trackChildChange(o.Change.childChangedChange(t,n,u))),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(a.PRIORITY_INDEX,function(e,r){t.hasChild(e)||n.trackChildChange(o.Change.childRemovedChange(e,r))}),t.isLeafNode()||t.forEachChild(a.PRIORITY_INDEX,function(t,r){if(e.hasChild(t)){var i=e.getImmediateChild(t);i.equals(r)||n.trackChildChange(o.Change.childChangedChange(t,r,i))}else n.trackChildChange(o.Change.childAddedChange(t,r))})),t.withIndex(this.index_)},e.prototype.updatePriority=function(e,t){return e.isEmpty()?i.ChildrenNode.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}();t.IndexedFilter=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(221),o=function(){function e(){}return e.getCollection=function(e){var t=e.toString();return this.collections_[t]||(this.collections_[t]=new r.StatsCollection),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}();t.StatsManager=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(35),i=n(1),a=n(84),s=n(14);n(231);var u,c=function(){function e(){this.repos_={},this.useRestClient_=!1}return e.getInstance=function(){return u||(u=new e),u},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&&i.fatal("Can't determine Firebase Database URL. Be sure to include databaseURL option when calling firebase.intializeApp().");var r=a.parseRepoInfo(n),o=r.repoInfo;return s.validateUrl("Invalid Firebase Database URL",1,r),r.path.isEmpty()||i.fatal("Database URL must point to the root of a Firebase Database (not including a child path)."),this.createRepo(o,e).database},e.prototype.deleteRepo=function(e){var t=r.safeGet(this.repos_,e.app.name);t&&r.safeGet(t,e.repoInfo_.toURLString())===e||i.fatal("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=r.safeGet(this.repos_,t.name);n||(n={},this.repos_[t.name]=n);var a=r.safeGet(n,e.toURLString());return a&&i.fatal("Database initialized multiple times. Please make sure the format of the database URL matches with each database() call."),a=new o.Repo(e,this.useRestClient_,t),n[e.toURLString()]=a,a},e.prototype.forceRestClient=function(e){this.useRestClient_=e},e}();t.RepoManager=c},function(e,t,n){"use strict";function r(e,t,n){for(var r=t.length,o=t.length,i=0;i<t.length;i++)if(t[i].optional){r=i;break}if(!(r<=n.length&&n.length<=o))throw h.g(r,o,e,n.length);for(var i=0;i<n.length;i++)try{t[i].validator(n[i])}catch(t){throw t instanceof Error?h.f(i,e,t.message):h.f(i,e,t)}}function o(e,t){return function(n){e(n),t(n)}}function i(e,t){function n(e){if(!p.j(e))throw"Expected string."}var r;return r=e?o(n,e):n,new d(r,t)}function a(){function e(e){if(!(e instanceof Uint8Array||e instanceof ArrayBuffer||p.e()&&e instanceof Blob))throw"Expected Blob or File."}return new d(e)}function s(e){return new d(f.c,e)}function u(){function e(e){if(!(p.h(e)&&e>=0))throw"Expected a number 0 or greater."}return new d(e)}function c(e,t){function n(t){if(!(null===t||p.a(t)&&t instanceof Object))throw"Expected an Object.";void 0!==e&&null!==e&&e(t)}return new d(n,t)}function l(e){function t(e){if(null!==e&&!p.b(e))throw"Expected a Function."}return new d(t,e)}t.g=r,t.e=i,t.f=a,t.b=s,t.c=u,t.a=c,t.d=l;var h=n(12),f=n(53),p=n(10),d=function(){function e(e,t){var n=this;this.validator=function(t){n.optional&&!p.c(t)||e(t)},this.optional=!!t}return e}()},function(e,t,n){"use strict";function r(e,t){return t}function o(e){return!d.j(e)||e.length<2?e:(e=e,p.b(e))}function i(){function e(e,t){return o(t)}function t(e,t){return d.a(t)?+t:t}function n(e,t){if(!(d.j(t)&&t.length>0))return[];var n=encodeURIComponent;return t.split(",").map(function(t){var r=e.bucket,o=e.fullPath,i="/b/"+n(r)+"/o/"+n(o);return y.a(i)+y.c({alt:"media",token:t})})}if(m)return m;var r=[];r.push(new v("bucket")),r.push(new v("generation")),r.push(new v("metageneration")),r.push(new v("name","fullPath",!0));var i=new v("name");i.xform=e,r.push(i);var a=new v("size");return a.xform=t,r.push(a),r.push(new v("timeCreated")),r.push(new v("updated")),r.push(new v("md5Hash",null,!0)),r.push(new v("cacheControl",null,!0)),r.push(new v("contentDisposition",null,!0)),r.push(new v("contentEncoding",null,!0)),r.push(new v("contentLanguage",null,!0)),r.push(new v("contentType",null,!0)),r.push(new v("metadata","customMetadata",!0)),r.push(new v("downloadTokens","downloadURLs",!1,n)),m=r}function a(e,t){function n(){var n=e.bucket,r=e.fullPath,o=new f.a(n,r);return t.makeStorageReference(o)}Object.defineProperty(e,"ref",{get:n})}function s(e,t,n){var r={};r.type="file";for(var o=n.length,i=0;i<o;i++){var s=n[i];r[s.local]=s.xform(r,t[s.server])}return a(r,e),r}function u(e,t,n){var r=h.a(t);return null===r?null:s(e,r,n)}function c(e,t){for(var n={},r=t.length,o=0;o<r;o++){var i=t[o];i.writable&&(n[i.server]=e[i.local])}return JSON.stringify(n)}function l(e){if(!e||!d.i(e))throw"Expected Metadata object.";for(var t in e){var n=e[t];if("customMetadata"===t){if(!d.i(n))throw"Expected object for 'customMetadata' mapping."}else if(d.g(n))throw"Mapping for '"+t+"' cannot be an object."}}t.b=i,t.a=u,t.d=c,t.c=l;var h=n(246),f=n(39),p=n(114),d=n(10),y=n(54),v=function(){function e(e,t,n,o){this.server=e,this.local=t||e,this.writable=!!n,this.xform=o||r}return e}(),m=null},function(e,t,n){"use strict";function r(e){return s.f+s.a+e}function o(e){return s.g+s.a+e}function i(e){return s.f+s.b+e}function a(e){var t=encodeURIComponent,n="?";return u.b(e,function(e,r){var o=t(e)+"="+t(r);n=n+o+"&"}),n=n.slice(0,-1)}t.b=r,t.a=o,t.d=i,t.c=a;var s=n(38),u=n(19)},function(e,t,n){"use strict";function r(e,t){return-1!==e.indexOf(t)}function o(e){return Array.prototype.slice.call(e)}function i(e,t){var n=e.indexOf(t);-1!==n&&e.splice(n,1)}t.b=r,t.a=o,t.c=i},function(e,t,n){"use strict";n.d(t,"a",function(){return r});var r=function(e){return{type:"ADD_NEW_TEST",testObject:e}}},function(e,t,n){"use strict";(function(t){function r(e,t){!o.isUndefined(e)&&o.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var o=n(11),i=n(264),a={"Content-Type":"application/x-www-form-urlencoded"},s={adapter:function(){var e;return"undefined"!==typeof XMLHttpRequest?e=n(118):"undefined"!==typeof t&&(e=n(118)),e}(),transformRequest:[function(e,t){return i(t,"Content-Type"),o.isFormData(e)||o.isArrayBuffer(e)||o.isBuffer(e)||o.isStream(e)||o.isFile(e)||o.isBlob(e)?e:o.isArrayBufferView(e)?e.buffer:o.isURLSearchParams(e)?(r(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):o.isObject(e)?(r(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"===typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300}};s.headers={common:{Accept:"application/json, text/plain, */*"}},o.forEach(["delete","get","head"],function(e){s.headers[e]={}}),o.forEach(["post","put","patch"],function(e){s.headers[e]=o.merge(a)}),e.exports=s}).call(t,n(44))},function(e,t,n){"use strict";var r=(n(280),n(281),n(125));n.d(t,"a",function(){return r.a});var o=(n(283),n(286));n.d(t,"b",function(){return o.a});var i=(n(289),n(291),n(126));n.d(t,"c",function(){return i.a});var a=n(62);n.d(t,"d",function(){return a.a});n(297),n(299),n(301),n(302)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var o="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},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},a=n(4),s=r(a),u=n(8),c=r(u),l=n(60),h=n(25),f=n(61),p=r(f),d=n(124),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,o=window.location,i=o.pathname,a=o.search,u=o.hash,c=i+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){i(V,e),V.length=t.length,E.notifyListeners(V.location,V.action)},T=function(e){(0,d.isExtraneousPopstateEvent)(e)||N(b(e.state))},S=function(){N(b(y()))},O=!1,N=function(e){if(O)O=!1,C();else{E.confirmTransitionTo(e,"POP",v,function(t){t?C({action:"POP",location:e}):P(e)})}},P=function(e){var t=V.location,n=R.indexOf(t.key);-1===n&&(n=0);var r=R.indexOf(e.key);-1===r&&(r=0);var o=n-r;o&&(O=!0,D(o))},I=b(y()),R=[I.key],A=function(e){return _+(0,h.createPath)(e)},k=function(e,r){(0,s.default)(!("object"===("undefined"===typeof e?"undefined":o(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 i=(0,l.createLocation)(e,r,w(),V.location);E.confirmTransitionTo(i,"PUSH",v,function(e){if(e){var r=A(i),o=i.key,a=i.state;if(n)if(t.pushState({key:o,state:a},null,r),u)window.location.href=r;else{var c=R.indexOf(V.location.key),l=R.slice(0,-1===c?0:c+1);l.push(i.key),R=l,C({action:"PUSH",location:i})}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":o(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 i=(0,l.createLocation)(e,r,w(),V.location);E.confirmTransitionTo(i,"REPLACE",v,function(e){if(e){var r=A(i),o=i.key,a=i.state;if(n)if(t.replaceState({key:o,state:a},null,r),u)window.location.replace(r);else{var c=R.indexOf(V.location.key);-1!==c&&(R[c]=i.key),C({action:"REPLACE",location:i})}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)},M=function(){return D(-1)},L=function(){return D(1)},j=0,F=function(e){j+=e,1===j?((0,d.addEventListener)(window,"popstate",T),r&&(0,d.addEventListener)(window,"hashchange",S)):0===j&&((0,d.removeEventListener)(window,"popstate",T),r&&(0,d.removeEventListener)(window,"hashchange",S))},U=!1,W=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=E.setPrompt(e);return U||(F(1),U=!0),function(){return U&&(U=!1,F(-1)),t()}},B=function(e){var t=E.appendListener(e);return F(1),function(){F(-1),t()}},V={length:t.length,action:"POP",location:I,createHref:A,push:k,replace:x,go:D,goBack:M,goForward:L,block:W,listen:B};return V};t.default=v},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 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},i=n(122),a=r(i),s=n(123),u=r(s),c=n(25);t.createLocation=function(e,t,n,r){var i=void 0;"string"===typeof e?(i=(0,c.parsePath)(e),i.state=t):(i=o({},e),void 0===i.pathname&&(i.pathname=""),i.search?"?"!==i.search.charAt(0)&&(i.search="?"+i.search):i.search="",i.hash?"#"!==i.hash.charAt(0)&&(i.hash="#"+i.hash):i.hash="",void 0!==t&&void 0===i.state&&(i.state=t));try{i.pathname=decodeURI(i.pathname)}catch(e){throw e instanceof URIError?new URIError('Pathname "'+i.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):e}return n&&(i.key=n),r?i.pathname?"/"!==i.pathname.charAt(0)&&(i.pathname=(0,a.default)(i.pathname,r.pathname)):i.pathname=r.pathname:i.pathname||(i.pathname="/"),i},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(4),o=function(e){return e&&e.__esModule?e:{default:e}}(r),i=function(){var e=null,t=function(t){return(0,o.default)(null==e,"A history supports only one prompt at a time"),e=t,function(){e===t&&(e=null)}},n=function(t,n,r,i){if(null!=e){var a="function"===typeof e?e(t,n):e;"string"===typeof a?"function"===typeof r?r(a,i):((0,o.default)(!1,"A history needs a getUserConfirmation function in order to use a prompt message"),i(!0)):i(!1!==a)}else i(!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=i},function(e,t,n){"use strict";var r=n(63);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 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 i(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(4),s=n.n(a),u=n(8),c=n.n(u),l=n(2),h=n.n(l),f=n(5),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,i,a;r(this,t);for(var s=arguments.length,u=Array(s),c=0;c<s;c++)u[c]=arguments[c];return n=i=o(this,e.call.apply(e,[this].concat(u))),i.state={match:i.computeMatch(i.props.history.location.pathname)},a=n,o(i,a)}return i(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(287),o=n.n(r),i={},a=0,s=function(e,t){var n=""+t.end+t.strict+t.sensitive,r=i[n]||(i[n]={});if(r[e])return r[e];var s=[],u=o()(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,o=void 0===r?"/":r,i=n.exact,a=void 0!==i&&i,u=n.strict,c=void 0!==u&&u,l=n.sensitive,h=void 0!==l&&l,f=s(o,{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:o,url:"/"===o&&""===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";var r=n(4),o=n.n(r),i=function(){var e=null,t=function(t){return o()(null==e,"A history supports only one prompt at a time"),e=t,function(){e===t&&(e=null)}},n=function(t,n,r,i){if(null!=e){var a="function"===typeof e?e(t,n):e;"string"===typeof a?"function"===typeof r?r(a,i):(o()(!1,"A history needs a getUserConfirmation function in order to use a prompt message"),i(!0)):i(!1!==a)}else i(!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=i},function(e,t,n){"use strict";function r(){}function o(e){try{return e.then}catch(e){return m=e,g}}function i(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(o,i){var a=new s(r);a.then(o,i),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=i(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=o(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(133),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";n.d(t,"b",function(){return i}),n.d(t,"a",function(){return a});var r=n(5),o=n.n(r),i=o.a.shape({trySubscribe:o.a.func.isRequired,tryUnsubscribe:o.a.func.isRequired,notifyNestedSubs:o.a.func.isRequired,isSubscribed:o.a.func.isRequired}),a=o.a.shape({subscribe:o.a.func.isRequired,dispatch:o.a.func.isRequired,getState:o.a.func.isRequired})},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 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 i(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)}function a(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 s(){}function u(e,t){var n={run:function(r){try{var o=e(t.getState(),r);(o!==n.props||n.error)&&(n.shouldComponentUpdate=!0,n.props=o,n.error=null)}catch(e){n.shouldComponentUpdate=!0,n.error=e}}};return n}function c(e){var t,n,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},l=c.getDisplayName,f=void 0===l?function(e){return"ConnectAdvanced("+e+")"}:l,b=c.methodName,w=void 0===b?"connectAdvanced":b,E=c.renderCountProp,C=void 0===E?void 0:E,T=c.shouldHandleStateChanges,S=void 0===T||T,O=c.storeKey,N=void 0===O?"store":O,P=c.withRef,I=void 0!==P&&P,R=a(c,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef"]),A=N+"Subscription",k=g++,x=(t={},t[N]=v.a,t[A]=v.b,t),D=(n={},n[A]=v.b,n);return function(t){p()("function"==typeof t,"You must pass a component to the function returned by connect. Instead received "+JSON.stringify(t));var n=t.displayName||t.name||"Component",a=f(n),c=m({},R,{getDisplayName:f,methodName:w,renderCountProp:C,shouldHandleStateChanges:S,storeKey:N,withRef:I,displayName:a,wrappedComponentName:n,WrappedComponent:t}),l=function(n){function l(e,t){r(this,l);var i=o(this,n.call(this,e,t));return i.version=k,i.state={},i.renderCount=0,i.store=e[N]||t[N],i.propsMode=Boolean(e[N]),i.setWrappedInstance=i.setWrappedInstance.bind(i),p()(i.store,'Could not find "'+N+'" in either the context or props of "'+a+'". Either wrap the root component in a <Provider>, or explicitly pass "'+N+'" as a prop to "'+a+'".'),i.initSelector(),i.initSubscription(),i}return i(l,n),l.prototype.getChildContext=function(){var e,t=this.propsMode?null:this.subscription;return e={},e[A]=t||this.context[A],e},l.prototype.componentDidMount=function(){S&&(this.subscription.trySubscribe(),this.selector.run(this.props),this.selector.shouldComponentUpdate&&this.forceUpdate())},l.prototype.componentWillReceiveProps=function(e){this.selector.run(e)},l.prototype.shouldComponentUpdate=function(){return this.selector.shouldComponentUpdate},l.prototype.componentWillUnmount=function(){this.subscription&&this.subscription.tryUnsubscribe(),this.subscription=null,this.notifyNestedSubs=s,this.store=null,this.selector.run=s,this.selector.shouldComponentUpdate=!1},l.prototype.getWrappedInstance=function(){return p()(I,"To access the wrapped instance, you need to specify { withRef: true } in the options argument of the "+w+"() call."),this.wrappedInstance},l.prototype.setWrappedInstance=function(e){this.wrappedInstance=e},l.prototype.initSelector=function(){var t=e(this.store.dispatch,c);this.selector=u(t,this.store),this.selector.run(this.props)},l.prototype.initSubscription=function(){if(S){var e=(this.propsMode?this.props:this.context)[A];this.subscription=new y.a(this.store,e,this.onStateChange.bind(this)),this.notifyNestedSubs=this.subscription.notifyNestedSubs.bind(this.subscription)}},l.prototype.onStateChange=function(){this.selector.run(this.props),this.selector.shouldComponentUpdate?(this.componentDidUpdate=this.notifyNestedSubsOnComponentDidUpdate,this.setState(_)):this.notifyNestedSubs()},l.prototype.notifyNestedSubsOnComponentDidUpdate=function(){this.componentDidUpdate=void 0,this.notifyNestedSubs()},l.prototype.isSubscribed=function(){return Boolean(this.subscription)&&this.subscription.isSubscribed()},l.prototype.addExtraProps=function(e){if(!I&&!C&&(!this.propsMode||!this.subscription))return e;var t=m({},e);return I&&(t.ref=this.setWrappedInstance),C&&(t[C]=this.renderCount++),this.propsMode&&this.subscription&&(t[A]=this.subscription),t},l.prototype.render=function(){var e=this.selector;if(e.shouldComponentUpdate=!1,e.error)throw e.error;return Object(d.createElement)(t,this.addExtraProps(e.props))},l}(d.Component);return l.WrappedComponent=t,l.displayName=a,l.childContextTypes=D,l.contextTypes=x,l.propTypes=x,h()(l,t)}}t.a=c;var l=n(70),h=n.n(l),f=n(8),p=n.n(f),d=n(2),y=(n.n(d),n(154)),v=n(68),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=0,_={}},function(e,t,n){"use strict";var r={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i=Object.defineProperty,a=Object.getOwnPropertyNames,s=Object.getOwnPropertySymbols,u=Object.getOwnPropertyDescriptor,c=Object.getPrototypeOf,l=c&&c(Object);e.exports=function e(t,n,h){if("string"!==typeof n){if(l){var f=c(n);f&&f!==l&&e(t,f,h)}var p=a(n);s&&(p=p.concat(s(n)));for(var d=0;d<p.length;++d){var y=p[d];if(!r[y]&&!o[y]&&(!h||!h[y])){var v=u(n,y);try{i(t,y,v)}catch(e){}}}return t}return t}},function(e,t,n){"use strict";function r(e,t,n){function i(){m===v&&(m=v.slice())}function u(){return y}function c(e){if("function"!==typeof e)throw new Error("Expected listener to be a function.");var t=!0;return i(),m.push(e),function(){if(t){t=!1,i();var n=m.indexOf(e);m.splice(n,1)}}}function l(e){if(!Object(o.a)(e))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if("undefined"===typeof e.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(g)throw new Error("Reducers may not dispatch actions.");try{g=!0,y=d(y,e)}finally{g=!1}for(var t=v=m,n=0;n<t.length;n++){(0,t[n])()}return e}function h(e){if("function"!==typeof e)throw new Error("Expected the nextReducer to be a function.");d=e,l({type:s.INIT})}function f(){var e,t=c;return e={subscribe:function(e){function n(){e.next&&e.next(u())}if("object"!==typeof e)throw new TypeError("Expected the observer to be an object.");return n(),{unsubscribe:t(n)}}},e[a.a]=function(){return this},e}var p;if("function"===typeof t&&"undefined"===typeof n&&(n=t,t=void 0),"undefined"!==typeof n){if("function"!==typeof n)throw new Error("Expected the enhancer to be a function.");return n(r)(e,t)}if("function"!==typeof e)throw new Error("Expected the reducer to be a function.");var d=e,y=t,v=[],m=v,g=!1;return l({type:s.INIT}),p={dispatch:l,subscribe:c,getState:u,replaceReducer:h},p[a.a]=f,p}n.d(t,"a",function(){return s}),t.b=r;var o=n(43),i=n(166),a=n.n(i),s={INIT:"@@redux/INIT"}},function(e,t,n){"use strict";var r=n(159),o=r.a.Symbol;t.a=o},function(e,t,n){"use strict"},function(e,t,n){"use strict";function r(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce(function(e,t){return function(){return e(t.apply(void 0,arguments))}})}t.a=r},function(e,t,n){"use strict";function r(e){return function(t,n){function r(){return o}var o=e(t,n);return r.dependsOnOwnProps=!1,r}}function o(e){return null!==e.dependsOnOwnProps&&void 0!==e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function i(e,t){return function(t,n){var r=(n.displayName,function(e,t){return r.dependsOnOwnProps?r.mapToProps(e,t):r.mapToProps(e)});return r.dependsOnOwnProps=!0,r.mapToProps=function(t,n){r.mapToProps=e,r.dependsOnOwnProps=o(e);var i=r(t,n);return"function"===typeof i&&(r.mapToProps=i,r.dependsOnOwnProps=o(i),i=r(t,n)),i},r}}t.a=r,t.b=i;n(76)},function(e,t,n){"use strict";n(43),n(42)},function(e,t,n){"use strict";var r=n(20),o=n(177),i=Object(r.b)(o.a);window.store=i,t.a=i},function(e,t,n){var r=n(178);n(198),n(200),n(235),n(242),e.exports=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(45);t.assert=function(e,n){if(!e)throw t.assertionError(n)},t.assertionError=function(e){return new Error("Firebase Database ("+r.CONSTANTS.SDK_VERSION+") INTERNAL ASSERT FAILED: "+e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){for(var t=[],n=0,r=0;r<e.length;r++){var o=e.charCodeAt(r);o<128?t[n++]=o:o<2048?(t[n++]=o>>6|192,t[n++]=63&o|128):55296==(64512&o)&&r+1<e.length&&56320==(64512&e.charCodeAt(r+1))?(o=65536+((1023&o)<<10)+(1023&e.charCodeAt(++r)),t[n++]=o>>18|240,t[n++]=o>>12&63|128,t[n++]=o>>6&63|128,t[n++]=63&o|128):(t[n++]=o>>12|224,t[n++]=o>>6&63|128,t[n++]=63&o|128)}return t},o=function(e){for(var t=[],n=0,r=0;n<e.length;){var o=e[n++];if(o<128)t[r++]=String.fromCharCode(o);else if(o>191&&o<224){var i=e[n++];t[r++]=String.fromCharCode((31&o)<<6|63&i)}else if(o>239&&o<365){var i=e[n++],a=e[n++],s=e[n++],u=((7&o)<<18|(63&i)<<12|(63&a)<<6|63&s)-65536;t[r++]=String.fromCharCode(55296+(u>>10)),t[r++]=String.fromCharCode(56320+(1023&u))}else{var i=e[n++],a=e[n++];t[r++]=String.fromCharCode((15&o)<<12|(63&i)<<6|63&a)}}return t.join("")};t.base64={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=[],o=0;o<e.length;o+=3){var i=e[o],a=o+1<e.length,s=a?e[o+1]:0,u=o+2<e.length,c=u?e[o+2]:0,l=i>>2,h=(3&i)<<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(r(e),t)},decodeString:function(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):o(this.decodeStringToByteArray(e,t))},decodeStringToByteArray:function(e,t){this.init_();for(var n=t?this.charToByteMapWebSafe_:this.charToByteMap_,r=[],o=0;o<e.length;){var i=n[e.charAt(o++)],a=o<e.length,s=a?n[e.charAt(o)]:0;++o;var u=o<e.length,c=u?n[e.charAt(o)]:64;++o;var l=o<e.length,h=l?n[e.charAt(o)]:64;if(++o,null==i||null==s||null==c||null==h)throw Error();var f=i<<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.base64Encode=function(e){var n=r(e);return t.base64.encodeByteArray(n,!0)},t.base64Decode=function(e){try{return t.base64.decodeString(e,!0)}catch(e){console.error("base64Decode failed: ",e)}return null}},function(e,t,n){"use strict";function r(e){return JSON.parse(e)}function o(e){return JSON.stringify(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.jsonEval=r,t.stringify=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.contains=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.safeGet=function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]},t.forEach=function(e,t){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t(n,e[n])},t.extend=function(e,n){return t.forEach(n,function(t,n){e[t]=n}),e},t.clone=function(e){return t.extend({},e)},t.isNonNullObject=function(e){return"object"===typeof e&&null!==e},t.isEmpty=function(e){for(var t in e)return!1;return!0},t.getCount=function(e){var t=0;for(var n in e)t++;return t},t.map=function(e,t,n){var r={};for(var o in e)r[o]=t.call(n,e[o],o,e);return r},t.findKey=function(e,t,n){for(var r in e)if(t.call(n,e[r],r,e))return r},t.findValue=function(e,n,r){var o=t.findKey(e,n,r);return o&&e[o]},t.getAnyKey=function(e){for(var t in e)return t},t.getValues=function(e){var t=[],n=0;for(var r in e)t[n++]=e[r];return t},t.every=function(e,t){for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&!t(n,e[n]))return!1;return!0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),o=n(84),i=n(3),a=n(46),s=n(35),u=n(51),c=n(0),l=n(14),h=function(){function e(e){this.repo_=e,e instanceof s.Repo||r.fatal("Don't call new Database() directly - please use firebase.database()."),this.root_=new a.Reference(e,i.Path.Empty),this.INTERNAL=new f(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"),c.validateArgCount("database.ref",0,1,arguments.length),void 0!==e?this.root_.child(e):this.root_},e.prototype.refFromURL=function(e){var t="database.refFromURL";this.checkDeleted_(t),c.validateArgCount(t,1,1,arguments.length);var n=o.parseRepoInfo(e);l.validateUrl(t,1,n);var i=n.repoInfo;return i.host!==this.repo_.repoInfo_.host&&r.fatal(t+": Host name does not match the current database: (found "+i.host+" but expected "+this.repo_.repoInfo_.host+")"),this.ref(n.path.toString())},e.prototype.checkDeleted_=function(e){null===this.repo_&&r.fatal("Cannot call "+e+" on a deleted database.")},e.prototype.goOffline=function(){c.validateArgCount("database.goOffline",0,0,arguments.length),this.checkDeleted_("goOffline"),this.repo_.interrupt()},e.prototype.goOnline=function(){c.validateArgCount("database.goOnline",0,0,arguments.length),this.checkDeleted_("goOnline"),this.repo_.resume()},e.ServerValue={TIMESTAMP:{".sv":"timestamp"}},e}();t.Database=h;var f=function(){function e(e){this.database=e}return e.prototype.delete=function(){return this.database.checkDeleted_("delete"),u.RepoManager.getInstance().deleteRepo(this.database.repo_),this.database.repo_=null,this.database.root_=null,this.database.INTERNAL=null,this.database=null,Promise.resolve()},e}();t.DatabaseInternals=f},function(e,t,n){"use strict";function r(e){for(var t="",n=e.split("/"),r=0;r<n.length;r++)if(n[r].length>0){var o=n[r];try{o=decodeURIComponent(o.replace(/\+/g," "))}catch(e){}t+="/"+o}return t}Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),i=n(85),a=n(1);t.parseRepoInfo=function(e){var n=t.parseURL(e),r=n.subdomain;"firebase"===n.domain&&a.fatal(n.host+" is no longer supported. Please use <YOUR FIREBASE>.firebaseio.com instead"),r&&"undefined"!=r||a.fatal("Cannot parse Firebase url. Please use https://<YOUR FIREBASE>.firebaseio.com"),n.secure||a.warnIfPageIsSecure();var s="ws"===n.scheme||"wss"===n.scheme;return{repoInfo:new i.RepoInfo(n.host,n.secure,r,s),path:new o.Path(n.pathString)}},t.parseURL=function(e){var t="",n="",o="",i="",a=!0,s="https",u=443;if("string"===typeof e){var c=e.indexOf("//");c>=0&&(s=e.substring(0,c-1),e=e.substring(c+2));var l=e.indexOf("/");-1===l&&(l=e.length),t=e.substring(0,l),i=r(e.substring(l));var h=t.split(".");3===h.length?(n=h[1],o=h[0].toLowerCase()):2===h.length&&(n=h[0]),c=t.indexOf(":"),c>=0&&(a="https"===s||"wss"===s,u=parseInt(t.substring(c+1),10))}return{host:t,port:u,domain:n,subdomain:o,secure:a,scheme:s,pathString:i}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(0),i=n(30),a=n(31),s=function(){function e(e,t,n,r,o){void 0===o&&(o=""),this.secure=t,this.namespace=n,this.webSocketOnly=r,this.persistenceKey=o,this.host=e.toLowerCase(),this.domain=this.host.substr(this.host.indexOf(".")+1),this.internalHost=i.PersistentStorage.get("host:"+e)||this.host}return e.prototype.needsQueryParam=function(){return this.host!==this.internalHost},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()&&i.PersistentStorage.set("host:"+this.host,this.internalHost))},e.prototype.connectionURL=function(e,t){r.assert("string"===typeof e,"typeof type must == string"),r.assert("object"===typeof t,"typeof params must == object");var n;if(e===a.WEBSOCKET)n=(this.secure?"wss://":"ws://")+this.internalHost+"/.ws?";else{if(e!==a.LONG_POLLING)throw new Error("Unknown connection type: "+e);n=(this.secure?"https://":"http://")+this.internalHost+"/.lp?"}this.needsQueryParam()&&(t.ns=this.namespace);var i=[];return o.forEach(t,function(e,t){i.push(e+"="+t)}),n+i.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}();t.RepoInfo=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(14),i=n(1),a=n(0),s=function(){function e(e,t){this.repo_=e,this.path_=t}return e.prototype.cancel=function(e){r.validateArgCount("OnDisconnect.cancel",0,1,arguments.length),r.validateCallback("OnDisconnect.cancel",1,e,!0);var t=new a.Deferred;return this.repo_.onDisconnectCancel(this.path_,t.wrapCallback(e)),t.promise},e.prototype.remove=function(e){r.validateArgCount("OnDisconnect.remove",0,1,arguments.length),o.validateWritablePath("OnDisconnect.remove",this.path_),r.validateCallback("OnDisconnect.remove",1,e,!0);var t=new a.Deferred;return this.repo_.onDisconnectSet(this.path_,null,t.wrapCallback(e)),t.promise},e.prototype.set=function(e,t){r.validateArgCount("OnDisconnect.set",1,2,arguments.length),o.validateWritablePath("OnDisconnect.set",this.path_),o.validateFirebaseDataArg("OnDisconnect.set",1,e,this.path_,!1),r.validateCallback("OnDisconnect.set",2,t,!0);var n=new a.Deferred;return this.repo_.onDisconnectSet(this.path_,e,n.wrapCallback(t)),n.promise},e.prototype.setWithPriority=function(e,t,n){r.validateArgCount("OnDisconnect.setWithPriority",2,3,arguments.length),o.validateWritablePath("OnDisconnect.setWithPriority",this.path_),o.validateFirebaseDataArg("OnDisconnect.setWithPriority",1,e,this.path_,!1),o.validatePriority("OnDisconnect.setWithPriority",2,t,!1),r.validateCallback("OnDisconnect.setWithPriority",3,n,!0);var i=new a.Deferred;return this.repo_.onDisconnectSetWithPriority(this.path_,e,t,i.wrapCallback(n)),i.promise},e.prototype.update=function(e,t){if(r.validateArgCount("OnDisconnect.update",1,2,arguments.length),o.validateWritablePath("OnDisconnect.update",this.path_),Array.isArray(e)){for(var n={},s=0;s<e.length;++s)n[""+s]=e[s];e=n,i.warn("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.")}o.validateFirebaseMergeDataArg("OnDisconnect.update",1,e,this.path_,!1),r.validateCallback("OnDisconnect.update",2,t,!0);var u=new a.Deferred;return this.repo_.onDisconnectUpdate(this.path_,e,u.wrapCallback(t)),u.promise},e}();t.OnDisconnect=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=n(0),i=n(21),a=n(6),s=n(89),u=n(93),c=n(1),l=n(3),h=n(14),f=n(0),p=n(206),d=n(0),y=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 o.assert(r,"Reference.ts has not been loaded"),r},set:function(e){r=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()===i.KEY_INDEX){var r="Query: When ordering by key, you may only pass one argument to startAt(), endAt(), or equalTo().",l="Query: When ordering by key, the argument passed to startAt(), endAt(),or equalTo() must be a string.";if(e.hasStart()){if(e.getIndexStartName()!=c.MIN_NAME)throw new Error(r);if("string"!==typeof t)throw new Error(l)}if(e.hasEnd()){if(e.getIndexEndName()!=c.MAX_NAME)throw new Error(r);if("string"!==typeof n)throw new Error(l)}}else if(e.getIndex()===a.PRIORITY_INDEX){if(null!=t&&!h.isValidPriority(t)||null!=n&&!h.isValidPriority(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(o.assert(e.getIndex()instanceof u.PathIndex||e.getIndex()===s.VALUE_INDEX,"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 f.validateArgCount("Query.ref",0,0,arguments.length),new e.__referenceConstructor(this.repo,this.path)},e.prototype.on=function(t,n,r,o){f.validateArgCount("Query.on",2,4,arguments.length),h.validateEventType("Query.on",1,t,!1),f.validateCallback("Query.on",2,n,!1);var i=e.getCancelAndContextArgs_("Query.on",r,o);if("value"===t)this.onValueEvent(n,i.cancel,i.context);else{var a={};a[t]=n,this.onChildEvent(a,i.cancel,i.context)}return n},e.prototype.onValueEvent=function(e,t,n){var r=new p.ValueEventRegistration(e,t||null,n||null);this.repo.addEventCallbackForQuery(this,r)},e.prototype.onChildEvent=function(e,t,n){var r=new p.ChildEventRegistration(e,t,n);this.repo.addEventCallbackForQuery(this,r)},e.prototype.off=function(e,t,n){f.validateArgCount("Query.off",0,3,arguments.length),h.validateEventType("Query.off",1,e,!0),f.validateCallback("Query.off",2,t,!0),f.validateContextObject("Query.off",3,n,!0);var r=null,o=null;if("value"===e){var i=t||null;r=new p.ValueEventRegistration(i,null,n||null)}else e&&(t&&(o={},o[e]=t),r=new p.ChildEventRegistration(o,null,n||null));this.repo.removeEventCallbackForQuery(this,r)},e.prototype.once=function(t,n,r,o){var i=this;f.validateArgCount("Query.once",1,4,arguments.length),h.validateEventType("Query.once",1,t,!1),f.validateCallback("Query.once",2,n,!0);var a=e.getCancelAndContextArgs_("Query.once",r,o),s=!0,u=new d.Deferred;u.promise.catch(function(){});var c=function(e){s&&(s=!1,i.off(t,c),n&&n.bind(a.context)(e),u.resolve(e))};return this.on(t,c,function(e){i.off(t,c),a.cancel&&a.cancel.bind(a.context)(e),u.reject(e)}),u.promise},e.prototype.limitToFirst=function(t){if(f.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(f.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 (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(f.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.');h.validatePathString("Query.orderByChild",1,t,!1),this.validateNoPreviousOrderByCall_("Query.orderByChild");var n=new l.Path(t);if(n.isEmpty())throw new Error("Query.orderByChild: cannot pass in empty path. Use Query.orderByValue() instead.");var r=new u.PathIndex(n),o=this.queryParams_.orderBy(r);return e.validateQueryEndpoints_(o),new e(this.repo,this.path,o,!0)},e.prototype.orderByKey=function(){f.validateArgCount("Query.orderByKey",0,0,arguments.length),this.validateNoPreviousOrderByCall_("Query.orderByKey");var t=this.queryParams_.orderBy(i.KEY_INDEX);return e.validateQueryEndpoints_(t),new e(this.repo,this.path,t,!0)},e.prototype.orderByPriority=function(){f.validateArgCount("Query.orderByPriority",0,0,arguments.length),this.validateNoPreviousOrderByCall_("Query.orderByPriority");var t=this.queryParams_.orderBy(a.PRIORITY_INDEX);return e.validateQueryEndpoints_(t),new e(this.repo,this.path,t,!0)},e.prototype.orderByValue=function(){f.validateArgCount("Query.orderByValue",0,0,arguments.length),this.validateNoPreviousOrderByCall_("Query.orderByValue");var t=this.queryParams_.orderBy(s.VALUE_INDEX);return e.validateQueryEndpoints_(t),new e(this.repo,this.path,t,!0)},e.prototype.startAt=function(t,n){void 0===t&&(t=null),f.validateArgCount("Query.startAt",0,2,arguments.length),h.validateFirebaseDataArg("Query.startAt",1,t,this.path,!0),h.validateKey("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),f.validateArgCount("Query.endAt",0,2,arguments.length),h.validateFirebaseDataArg("Query.endAt",1,t,this.path,!0),h.validateKey("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(f.validateArgCount("Query.equalTo",1,2,arguments.length),h.validateFirebaseDataArg("Query.equalTo",1,e,this.path,!1),h.validateKey("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 f.validateArgCount("Query.toString",0,0,arguments.length),this.repo.toString()+this.path.toUrlEncodedString()},e.prototype.toJSON=function(){return f.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=c.ObjectToUniqueKey(e);return"{}"===t?"default":t},e.prototype.isEqual=function(t){if(f.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),o=this.queryIdentifier()===t.queryIdentifier();return n&&r&&o},e.getCancelAndContextArgs_=function(e,t,n){var r={cancel:null,context:null};if(t&&n)r.cancel=t,f.validateCallback(e,3,r.cancel,!0),r.context=n,f.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(f.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}();t.Query=y},function(e,t,n){"use strict";function r(e){o=e}Object.defineProperty(t,"__esModule",{value:!0});var o,i=n(0),a=n(1),s=n(0);t.setMaxNode=r,t.priorityHashText=function(e){return"number"===typeof e?"number:"+a.doubleToIEEE754String(e):"string:"+e},t.validatePriorityNode=function(e){if(e.isLeafNode()){var t=e.val();i.assert("string"===typeof t||"number"===typeof t||"object"===typeof t&&s.contains(t,".sv"),"Priority must be a string or number.")}else i.assert(e===o||e.isEmpty(),"priority of unexpected type.");i.assert(e===o||e.getPriority().isEmpty(),"Priority nodes can't have a priority of their own.")}},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=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])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(32),i=n(9),a=n(1),s=n(22),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.compare=function(e,t){var n=e.node.compareTo(t.node);return 0===n?a.nameCompare(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 i.NamedNode.MIN},t.prototype.maxPost=function(){return i.NamedNode.MAX},t.prototype.makePost=function(e,t){var n=s.nodeFromJSON(e);return new i.NamedNode(t,n)},t.prototype.toString=function(){return".value"},t}(o.Index);t.ValueIndex=u,t.VALUE_INDEX=new u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=n(0),i=n(91),a=n(0),s=n(9),u=n(6),c=n(21),l={},h=function(){function e(e,t){this.indexes_=e,this.indexSet_=t}return Object.defineProperty(e,"Default",{get:function(){return o.assert(l&&u.PRIORITY_INDEX,"ChildrenNode.ts has not been loaded"),r=r||new e({".priority":l},{".priority":u.PRIORITY_INDEX})},enumerable:!0,configurable:!0}),e.prototype.get=function(e){var t=a.safeGet(this.indexes_,e);if(!t)throw new Error("No index defined for "+e);return t===l?null:t},e.prototype.hasIndex=function(e){return a.contains(this.indexSet_,e.toString())},e.prototype.addIndex=function(t,n){o.assert(t!==c.KEY_INDEX,"KeyIndex always exists and isn't meant to be added to the IndexMap.");for(var r=[],u=!1,h=n.getIterator(s.NamedNode.Wrap),f=h.getNext();f;)u=u||t.isDefinedOn(f.node),r.push(f),f=h.getNext();var p;p=u?i.buildChildSet(r,t.getCompare()):l;var d=t.toString(),y=a.clone(this.indexSet_);y[d]=t;var v=a.clone(this.indexes_);return v[d]=p,new e(v,y)},e.prototype.addToIndexes=function(t,n){var r=this;return new e(a.map(this.indexes_,function(e,u){var c=a.safeGet(r.indexSet_,u);if(o.assert(c,"Missing index implementation for "+u),e===l){if(c.isDefinedOn(t.node)){for(var h=[],f=n.getIterator(s.NamedNode.Wrap),p=f.getNext();p;)p.name!=t.name&&h.push(p),p=f.getNext();return h.push(t),i.buildChildSet(h,c.getCompare())}return l}var d=n.get(t.name),y=e;return d&&(y=y.remove(new s.NamedNode(t.name,d))),y.insert(t,t.node)}),this.indexSet_)},e.prototype.removeFromIndexes=function(t,n){return new e(a.map(this.indexes_,function(e){if(e===l)return e;var r=n.get(t.name);return r?e.remove(new s.NamedNode(t.name,r)):e}),this.indexSet_)},e}();t.IndexMap=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(34),o=n(34),i=Math.log(2),a=function(){function e(e){this.count=function(e){return parseInt(Math.log(e)/i,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}();t.buildChildSet=function(e,t,n,i){e.sort(t);var s=function(t,o){var i,a,u=o-t;if(0==u)return null;if(1==u)return i=e[t],a=n?n(i):i,new r.LLRBNode(a,i.node,r.LLRBNode.BLACK,null,null);var c=parseInt(u/2,10)+t,l=s(t,c),h=s(c+1,o);return i=e[c],a=n?n(i):i,new r.LLRBNode(a,i.node,r.LLRBNode.BLACK,l,h)},u=new a(e.length),c=function(t){for(var o=null,i=null,a=e.length,u=function(t,o){var i=a-t,u=a;a-=t;var l=s(i+1,u),h=e[i],f=n?n(h):h;c(new r.LLRBNode(f,h.node,o,null,l))},c=function(e){o?(o.left=e,o=e):(i=e,o=e)},l=0;l<t.count;++l){var h=t.nextBitIsOne(),f=Math.pow(2,t.count-(l+1));h?u(f,r.LLRBNode.BLACK):(u(f,r.LLRBNode.BLACK),u(f,r.LLRBNode.RED))}return i}(u);return new o.SortedMap(i||t,c)}},function(e,t,n){"use strict";function r(e,t){return i.nameCompare(e.name,t.name)}function o(e,t){return i.nameCompare(e,t)}Object.defineProperty(t,"__esModule",{value:!0});var i=n(1);t.NAME_ONLY_COMPARATOR=r,t.NAME_COMPARATOR=o},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=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])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),i=n(1),a=n(32),s=n(7),u=n(9),c=n(22),l=function(e){function t(t){var n=e.call(this)||this;return n.indexPath_=t,o.assert(!t.isEmpty()&&".priority"!==t.getFront(),"Can't create PathIndex with empty path or .priority key"),n}return r(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),o=n.compareTo(r);return 0===o?i.nameCompare(e.name,t.name):o},t.prototype.makePost=function(e,t){var n=c.nodeFromJSON(e),r=s.ChildrenNode.EMPTY_NODE.updateChild(this.indexPath_,n);return new u.NamedNode(t,r)},t.prototype.maxPost=function(){var e=s.ChildrenNode.EMPTY_NODE.updateChild(this.indexPath_,s.MAX_NODE);return new u.NamedNode(i.MAX_NAME,e)},t.prototype.toString=function(){return this.indexPath_.slice().join("/")},t}(a.Index);t.PathIndex=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(3),i=n(95),a=n(33),s=n(22),u=n(6);t.generateWithValues=function(e){return e=e||{},e.timestamp=e.timestamp||(new Date).getTime(),e},t.resolveDeferredValue=function(e,t){return e&&"object"===typeof e?(r.assert(".sv"in e,"Unexpected leaf node or priority contents"),t[e[".sv"]]):e},t.resolveDeferredValueTree=function(e,n){var r=new i.SparseSnapshotTree;return e.forEachTree(new o.Path(""),function(e,o){r.remember(e,t.resolveDeferredValueSnapshot(o,n))}),r},t.resolveDeferredValueSnapshot=function(e,n){var r,o=e.getPriority().val(),i=t.resolveDeferredValue(o,n);if(e.isLeafNode()){var c=e,l=t.resolveDeferredValue(c.getValue(),n);return l!==c.getValue()||i!==c.getPriority().val()?new a.LeafNode(l,s.nodeFromJSON(i)):e}var h=e;return r=h,i!==h.getPriority().val()&&(r=r.updatePriority(new a.LeafNode(i))),h.forEachChild(u.PRIORITY_INDEX,function(e,o){var i=t.resolveDeferredValueSnapshot(o,n);i!==o&&(r=r.updateImmediateChild(e,i))}),r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),o=n(6),i=n(96),a=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 i.CountedSet);var r=t.getFront();this.children_.contains(r)||this.children_.add(r,new e);var o=this.children_.get(r);t=t.popFront(),o.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(o.PRIORITY_INDEX,function(e,t){n.remember(new r.Path(e),t)}),this.forget(e)}if(null!==this.children_){var i=e.getFront();if(e=e.popFront(),this.children_.contains(i)){this.children_.get(i).forget(e)&&this.children_.remove(i)}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,o){var i=new r.Path(e.toString()+"/"+n);o.forEachTree(i,t)})},e.prototype.forEachChild=function(e){null!==this.children_&&this.children_.each(function(t,n){e(t,n)})},e}();t.SparseSnapshotTree=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=function(){function e(){this.set={}}return e.prototype.add=function(e,t){this.set[e]=null===t||t},e.prototype.contains=function(e){return r.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 r.isEmpty(this.set)},e.prototype.count=function(){return r.getCount(this.set)},e.prototype.each=function(e){r.forEach(this.set,function(t,n){return e(t,n)})},e.prototype.keys=function(){var e=[];return r.forEach(this.set,function(t){e.push(t)}),e},e}();t.CountedSet=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(15),o=n(3),i=function(){function e(e,t,n){this.source=e,this.path=t,this.snap=n,this.type=r.OperationType.OVERWRITE}return e.prototype.operationForChild=function(t){return this.path.isEmpty()?new e(this.source,o.Path.Empty,this.snap.getImmediateChild(t)):new e(this.source,this.path.popFront(),this.snap)},e}();t.Overwrite=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=n(36),i=n(7),a=n(0),s=n(0),u=n(99),c=n(212),l=function(){function e(){this.views_={}}return Object.defineProperty(e,"__referenceConstructor",{get:function(){return a.assert(r,"Reference.ts has not been loaded"),r},set:function(e){a.assert(!r,"__referenceConstructor has already been defined"),r=e},enumerable:!0,configurable:!0}),e.prototype.isEmpty=function(){return s.isEmpty(this.views_)},e.prototype.applyOperation=function(e,t,n){var r=e.source.queryId;if(null!==r){var o=s.safeGet(this.views_,r);return a.assert(null!=o,"SyncTree gave us an op for an invalid query."),o.applyOperation(e,t,n)}var i=[];return s.forEach(this.views_,function(r,o){i=i.concat(o.applyOperation(e,t,n))}),i},e.prototype.addEventRegistration=function(e,t,n,r,a){var l=e.queryIdentifier(),h=s.safeGet(this.views_,l);if(!h){var f=n.calcCompleteEventCache(a?r:null),p=!1;f?p=!0:r instanceof i.ChildrenNode?(f=n.calcCompleteEventChildren(r),p=!1):(f=i.ChildrenNode.EMPTY_NODE,p=!1);var d=new u.ViewCache(new o.CacheNode(f,p,!1),new o.CacheNode(r,a,!1));h=new c.View(e,d),this.views_[l]=h}return h.addEventRegistration(t),h.getInitialEvents(t)},e.prototype.removeEventRegistration=function(t,n,r){var o=t.queryIdentifier(),i=[],a=[],u=this.hasCompleteView();if("default"===o){var c=this;s.forEach(this.views_,function(e,t){a=a.concat(t.removeEventRegistration(n,r)),t.isEmpty()&&(delete c.views_[e],t.getQuery().getQueryParams().loadsAllData()||i.push(t.getQuery()))})}else{var l=s.safeGet(this.views_,o);l&&(a=a.concat(l.removeEventRegistration(n,r)),l.isEmpty()&&(delete this.views_[o],l.getQuery().getQueryParams().loadsAllData()||i.push(l.getQuery())))}return u&&!this.hasCompleteView()&&i.push(new e.__referenceConstructor(t.repo,t.path)),{removed:i,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 s.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 s.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 s.findValue(this.views_,function(e){return e.getQuery().getQueryParams().loadsAllData()})||null},e}();t.SyncPoint=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7),o=n(36),i=function(){function e(e,t){this.eventCache_=e,this.serverCache_=t}return e.prototype.updateEventSnap=function(t,n,r){return new e(new o.CacheNode(t,n,r),this.serverCache_)},e.prototype.updateServerSnap=function(t,n,r){return new e(this.eventCache_,new o.CacheNode(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 o.CacheNode(r.ChildrenNode.EMPTY_NODE,!1,!1),new o.CacheNode(r.ChildrenNode.EMPTY_NODE,!1,!1)),e}();t.ViewCache=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=function(){function e(e){this.collection_=e,this.last_=null}return e.prototype.get=function(){var e=this.collection_.get(),t=r.clone(e);return this.last_&&r.forEach(this.last_,function(e,n){t[e]=t[e]-n}),this.last_=e,t},e}();t.StatsListener=o},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=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])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(13),i=n(0),a=n(0),s=n(0),u=n(1),c=n(3),l=n(224),h=n(225),f=n(0),p=n(103),d=n(0),y=n(0),v=n(106),m=1e3,g=3e5,_=function(e){function t(n,r,o,i,a,s){var c=e.call(this)||this;if(c.repoInfo_=n,c.onDataUpdate_=r,c.onConnectStatus_=o,c.onServerInfoUpdate_=i,c.authTokenProvider_=a,c.authOverride_=s,c.id=t.nextPersistentConnectionId_++,c.log_=u.logWrapper("p:"+c.id+":"),c.interruptReasons_={},c.listens_={},c.outstandingPuts_=[],c.outstandingPutCount_=0,c.onDisconnectRequestQueue_=[],c.connected_=!1,c.reconnectDelay_=m,c.maxReconnectDelay_=g,c.securityDebugCallback_=null,c.lastSessionId=null,c.establishConnectionTimer_=null,c.visible_=!1,c.requestCBHash_={},c.requestNumber_=0,c.realtime_=null,c.authToken_=null,c.forceTokenRefresh_=!1,c.invalidAuthTokenCount_=0,c.firstConnection_=!0,c.lastConnectionAttemptTime_=null,c.lastConnectionEstablishedTime_=null,s&&!y.isNodeSdk())throw new Error("Auth override specified in options, but not supported on non Node.js platforms");return c.scheduleConnect_(0),l.VisibilityMonitor.getInstance().on("visible",c.onVisible_,c),-1===n.host.indexOf("fblocal")&&h.OnlineMonitor.getInstance().on("online",c.onOnline_,c),c}return r(t,e),t.prototype.sendRequest=function(e,t,n){var r=++this.requestNumber_,o={r:r,a:e,b:t};this.log_(a.stringify(o)),s.assert(this.connected_,"sendRequest call when we're not connected not allowed."),this.realtime_.sendRequest(o),n&&(this.requestCBHash_[r]=n)},t.prototype.listen=function(e,t,n,r){var o=e.queryIdentifier(),i=e.path.toString();this.log_("Listen called for "+i+" "+o),this.listens_[i]=this.listens_[i]||{},s.assert(e.getQueryParams().isDefault()||!e.getQueryParams().loadsAllData(),"listen() called for non-default but complete query"),s.assert(!this.listens_[i][o],"listen() called twice for same path/queryId.");var a={onComplete:r,hashFn:t,query:e,tag:n};this.listens_[i][o]=a,this.connected_&&this.sendListen_(a)},t.prototype.sendListen_=function(e){var n=this,r=e.query,o=r.path.toString(),i=r.queryIdentifier();this.log_("Listen on "+o+" for "+i);var a={p:o};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_[o]&&n.listens_[o][i])===e&&(n.log_("listen response",a),"ok"!==u&&n.removeListen_(o,i),e.onComplete&&e.onComplete(u,s))})},t.warnOnListenWarnings_=function(e,t){if(e&&"object"===typeof e&&i.contains(e,"w")){var n=i.safeGet(e,"w");if(Array.isArray(n)&&~n.indexOf("no_index")){var r='".indexOn": "'+t.getQueryParams().getIndex().toString()+'"',o=t.path.toString();u.warn("Using an unspecified index. Your data will be downloaded and filtered on the client. Consider adding "+r+" at "+o+" 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||f.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=f.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,o=n.d||"error";e.authToken_===t&&("ok"===r?e.invalidAuthTokenCount_=0:e.onAuthRevoked_(r,o))})}},t.prototype.unlisten=function(e,t){var n=e.path.toString(),r=e.queryIdentifier();this.log_("Unlisten called for "+n+" "+r),s.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 o={p:e};r&&(o.q=n,o.t=r),this.sendRequest("n",o)},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 o={p:t,d:n};this.log_("onDisconnect "+e,o),this.sendRequest(e,o,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,o){var i={p:t,d:n};void 0!==o&&(i.h=o),this.outstandingPuts_.push({action:e,request:i,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,o=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_=[]),o&&o(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: "+a.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):u.error("Unrecognized action received from server: "+a.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;s.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_=m,this.realtime_||this.scheduleConnect_(0)),this.visible_=e},t.prototype.onOnline_=function(e){e?(this.log_("Browser went online."),this.reconnectDelay_=m,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_=m),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);n=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),o=this.id+":"+t.nextConnectionId_++,i=this,a=this.lastSessionId,c=!1,l=null,h=function(){l?l.close():(c=!0,r())},f=function(e){s.assert(l,"sendRequest call when we're not connected not allowed."),l.sendRequest(e)};this.realtime_={close:h,sendRequest:f};var y=this.forceTokenRefresh_;this.forceTokenRefresh_=!1,this.authTokenProvider_.getToken(y).then(function(t){c?u.log("getToken() completed but was canceled"):(u.log("getToken() completed. Creating connection."),i.authToken_=t&&t.accessToken,l=new p.Connection(o,i.repoInfo_,e,n,r,function(e){u.warn(e+" ("+i.repoInfo_.toString()+")"),i.interrupt("server_kill")},a))}).then(null,function(e){i.log_("Failed to get token: "+e),c||(d.CONSTANTS.NODE_ADMIN&&u.warn(e),h())})}},t.prototype.interrupt=function(e){u.log("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){u.log("Resuming connection for reason: "+e),delete this.interruptReasons_[e],i.isEmpty(this.interruptReasons_)&&(this.reconnectDelay_=m,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 u.ObjectToUniqueKey(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 c.Path(e).toString();return void 0!==this.listens_[r]?(n=this.listens_[r][t],delete this.listens_[r][t],0===i.getCount(this.listens_[r])&&delete this.listens_[r]):n=void 0,n},t.prototype.onAuthRevoked_=function(e,t){u.log("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&&"undefined"!==typeof console&&console.log("FIREBASE: "+e.msg.replace("\n","\nFIREBASE: "))},t.prototype.restoreState_=function(){var e=this;this.tryAuth(),i.forEach(this.listens_,function(t,n){i.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";d.CONSTANTS.NODE_ADMIN?t="admin_node":d.CONSTANTS.NODE_CLIENT&&(t="node"),e["sdk."+t+"."+o.default.SDK_VERSION.replace(/\./g,"-")]=1,y.isMobileCordova()?e["framework.cordova"]=1:y.isReactNative()&&(e["framework.reactnative"]=1),this.reportStats(e)},t.prototype.shouldReconnect_=function(){var e=h.OnlineMonitor.getInstance().currentlyOnline();return i.isEmpty(this.interruptReasons_)&&e},t.nextPersistentConnectionId_=0,t.nextConnectionId_=0,t}(v.ServerActions);t.PersistentConnection=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=function(){function e(e){this.allowedEvents_=e,this.listeners_={},r.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(),o=0;o<r.length;o++)r[o].callback.apply(r[o].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]||[],o=0;o<r.length;o++)if(r[o].callback===t&&(!n||n===r[o].context))return void r.splice(o,1)},e.prototype.validateEventType_=function(e){r.assert(this.allowedEvents_.find(function(t){return t===e}),"Unknown event: "+e)},e}();t.EventEmitter=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),o=n(30),i=n(31),a=n(226),s=function(){function e(e,t,n,o,i,s,u){this.id=e,this.repoInfo_=t,this.onMessage_=n,this.onReady_=o,this.onDisconnect_=i,this.onKill_=s,this.lastSessionId=u,this.connectionCount=0,this.pendingDataMessages=[],this.state_=0,this.log_=r.logWrapper("c:"+this.id+":"),this.transportManager_=new a.TransportManager(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_),o=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,o)},Math.floor(0));var i=t.healthyTimeout||0;i>0&&(this.healthyTimeout_=r.setTimeoutNonBlocking(function(){e.healthyTimeout_=null,e.isHealthy_||(e.conn_&&e.conn_.bytesReceived>102400?(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=r.requireKey("t",e),n=r.requireKey("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=r.requireKey("t",e),n=r.requireKey("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=r.requireKey("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 o=0;o<this.pendingDataMessages.length;++o)this.onDataMessage_(this.pendingDataMessages[o]);this.pendingDataMessages=[],this.tryCleanupConnection()}else"s"===t?this.onConnectionShutdown_(n):"r"===t?this.onReset_(n):"e"===t?r.error("Server Error: "+n):"o"===t?(this.log_("got pong on primary."),this.onPrimaryResponse_(),this.sendPingOnPrimaryIfNecessary_()):r.error("Unknown control packet command: "+t)}},e.prototype.onHandshake_=function(e){var t=e.ts,n=e.v,o=e.h;this.sessionId=e.s,this.repoInfo_.updateHost(o),0==this.state_&&(this.conn_.start(),this.onConnectionEstablished_(this.conn_,t),i.PROTOCOL_VERSION!==n&&r.warn("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_),o=this.disconnReceiver_(this.secondaryConn_);this.secondaryConn_.open(n,o),r.setTimeoutNonBlocking(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):r.setTimeoutNonBlocking(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()&&(o.PersistentStorage.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}();t.Connection=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),o=n(96),i=n(50),a=n(227),s=n(31),u=n(0),c=n(0);t.FIREBASE_LONGPOLL_START_PARAM="start",t.FIREBASE_LONGPOLL_CLOSE_COMMAND="close",t.FIREBASE_LONGPOLL_COMMAND_CB_NAME="pLPCommand",t.FIREBASE_LONGPOLL_DATA_CB_NAME="pRTLPCB",t.FIREBASE_LONGPOLL_ID_PARAM="id",t.FIREBASE_LONGPOLL_PW_PARAM="pw",t.FIREBASE_LONGPOLL_SERIAL_PARAM="ser",t.FIREBASE_LONGPOLL_CALLBACK_ID_PARAM="cb",t.FIREBASE_LONGPOLL_SEGMENT_NUM_PARAM="seg",t.FIREBASE_LONGPOLL_SEGMENTS_IN_PACKET="ts",t.FIREBASE_LONGPOLL_DATA_PARAM="d",t.FIREBASE_LONGPOLL_DISCONN_FRAME_PARAM="disconn",t.FIREBASE_LONGPOLL_DISCONN_FRAME_REQUEST_PARAM="dframe";var l=function(){function e(e,t,n,o){this.connId=e,this.repoInfo=t,this.transportSessionId=n,this.lastSessionId=o,this.bytesSent=0,this.bytesReceived=0,this.everConnected_=!1,this.log_=r.logWrapper(e),this.stats_=i.StatsManager.getCollection(t),this.urlFn=function(e){return t.connectionURL(s.LONG_POLLING,e)}}return e.prototype.open=function(e,n){var o=this;this.curSegmentNum=0,this.onDisconnect_=n,this.myPacketOrderer=new a.PacketReceiver(e),this.isClosed_=!1,this.connectTimeoutTimer_=setTimeout(function(){o.log_("Timed out trying to connect."),o.onClosed_(),o.connectTimeoutTimer_=null},Math.floor(3e4)),r.executeWhenDOMReady(function(){if(!o.isClosed_){o.scriptTagHolder=new h(function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=e[0],i=e[1],a=e[2];e[3],e[4];if(o.incrementIncomingBytes_(e),o.scriptTagHolder)if(o.connectTimeoutTimer_&&(clearTimeout(o.connectTimeoutTimer_),o.connectTimeoutTimer_=null),o.everConnected_=!0,r==t.FIREBASE_LONGPOLL_START_PARAM)o.id=i,o.password=a;else{if(r!==t.FIREBASE_LONGPOLL_CLOSE_COMMAND)throw new Error("Unrecognized command received: "+r);i?(o.scriptTagHolder.sendNewPolls=!1,o.myPacketOrderer.closeAfter(i,function(){o.onClosed_()})):o.onClosed_()}},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e[0],r=e[1];o.incrementIncomingBytes_(e),o.myPacketOrderer.handleResponse(n,r)},function(){o.onClosed_()},o.urlFn);var e={};e[t.FIREBASE_LONGPOLL_START_PARAM]="t",e[t.FIREBASE_LONGPOLL_SERIAL_PARAM]=Math.floor(1e8*Math.random()),o.scriptTagHolder.uniqueCallbackIdentifier&&(e[t.FIREBASE_LONGPOLL_CALLBACK_ID_PARAM]=o.scriptTagHolder.uniqueCallbackIdentifier),e[s.VERSION_PARAM]=s.PROTOCOL_VERSION,o.transportSessionId&&(e[s.TRANSPORT_SESSION_PARAM]=o.transportSessionId),o.lastSessionId&&(e[s.LAST_SESSION_PARAM]=o.lastSessionId),!c.isNodeSdk()&&"undefined"!==typeof location&&location.href&&-1!==location.href.indexOf(s.FORGE_DOMAIN)&&(e[s.REFERER_PARAM]=s.FORGE_REF);var n=o.urlFn(e);o.log_("Connecting via long-poll to "+n),o.scriptTagHolder.addTag(n,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&&!r.isChromeExtensionContentScript()&&!r.isWindowsStoreApp()&&!c.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=u.stringify(e);this.bytesSent+=t.length,this.stats_.incrementCounter("bytes_sent",t.length);for(var n=u.base64Encode(t),o=r.splitStringBySize(n,1840),i=0;i<o.length;i++)this.scriptTagHolder.enqueueSegment(this.curSegmentNum,o.length,o[i]),this.curSegmentNum++},e.prototype.addDisconnectPingFrame=function(e,n){if(!c.isNodeSdk()){this.myDisconnFrame=document.createElement("iframe");var r={};r[t.FIREBASE_LONGPOLL_DISCONN_FRAME_REQUEST_PARAM]="t",r[t.FIREBASE_LONGPOLL_ID_PARAM]=e,r[t.FIREBASE_LONGPOLL_PW_PARAM]=n,this.myDisconnFrame.src=this.urlFn(r),this.myDisconnFrame.style.display="none",document.body.appendChild(this.myDisconnFrame)}},e.prototype.incrementIncomingBytes_=function(e){var t=u.stringify(e).length;this.bytesReceived+=t,this.stats_.incrementCounter("bytes_received",t)},e}();t.BrowserPollConnection=l;var h=function(){function e(n,i,a,s){if(this.onDisconnect=a,this.urlFn=s,this.outstandingRequests=new o.CountedSet,this.pendingSegs=[],this.currentSerial=Math.floor(1e8*Math.random()),this.sendNewPolls=!0,c.isNodeSdk())this.commandCB=n,this.onMessageCB=i;else{this.uniqueCallbackIdentifier=r.LUIDGenerator(),window[t.FIREBASE_LONGPOLL_COMMAND_CB_NAME+this.uniqueCallbackIdentifier]=n,window[t.FIREBASE_LONGPOLL_DATA_CB_NAME+this.uniqueCallbackIdentifier]=i,this.myIFrame=e.createIFrame_();var u="";if(this.myIFrame.src&&"javascript:"===this.myIFrame.src.substr(0,"javascript:".length)){u='<script>document.domain="'+document.domain+'";<\/script>'}var l="<html><body>"+u+"</body></html>";try{this.myIFrame.doc.open(),this.myIFrame.doc.write(l),this.myIFrame.doc.close()}catch(e){r.log("frame writing exception"),e.stack&&r.log(e.stack),r.log(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||r.log("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 n=this;if(this.alive=!1,this.myIFrame&&(this.myIFrame.doc.body.innerHTML="",setTimeout(function(){null!==n.myIFrame&&(document.body.removeChild(n.myIFrame),n.myIFrame=null)},Math.floor(0))),c.isNodeSdk()&&this.myID){var r={};r[t.FIREBASE_LONGPOLL_DISCONN_FRAME_PARAM]="t",r[t.FIREBASE_LONGPOLL_ID_PARAM]=this.myID,r[t.FIREBASE_LONGPOLL_PW_PARAM]=this.myPW;var o=this.urlFn(r);e.nodeRestRequest(o)}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[t.FIREBASE_LONGPOLL_ID_PARAM]=this.myID,e[t.FIREBASE_LONGPOLL_PW_PARAM]=this.myPW,e[t.FIREBASE_LONGPOLL_SERIAL_PARAM]=this.currentSerial;for(var n=this.urlFn(e),r="",o=0;this.pendingSegs.length>0;){if(!(this.pendingSegs[0].d.length+30+r.length<=1870))break;var i=this.pendingSegs.shift();r=r+"&"+t.FIREBASE_LONGPOLL_SEGMENT_NUM_PARAM+o+"="+i.seg+"&"+t.FIREBASE_LONGPOLL_SEGMENTS_IN_PACKET+o+"="+i.ts+"&"+t.FIREBASE_LONGPOLL_DATA_PARAM+o+"="+i.d,o++}return n+=r,this.addLongPollTag_(n,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_()},o=setTimeout(r,Math.floor(25e3)),i=function(){clearTimeout(o),r()};this.addTag(e,i)},e.prototype.addTag=function(e,t){var n=this;c.isNodeSdk()?this.doNodeLongPoll(e,t):setTimeout(function(){try{if(!n.sendNewPolls)return;var o=n.myIFrame.doc.createElement("script");o.type="text/javascript",o.async=!0,o.src=e,o.onload=o.onreadystatechange=function(){var e=o.readyState;e&&"loaded"!==e&&"complete"!==e||(o.onload=o.onreadystatechange=null,o.parentNode&&o.parentNode.removeChild(o),t())},o.onerror=function(){r.log("Long-poll script failed to load: "+e),n.sendNewPolls=!1,n.close()},n.myIFrame.doc.body.appendChild(o)}catch(e){}},Math.floor(1))},e}();t.FirebaseIFrameScriptHolder=h},function(e,t,n){"use strict";(function(e){function r(e){p=e}Object.defineProperty(t,"__esModule",{value:!0});var o=n(13),i=n(0),a=n(1),s=n(50),u=n(31),c=n(0),l=n(30),h=n(0),f=n(0),p=null;"undefined"!==typeof MozWebSocket?p=MozWebSocket:"undefined"!==typeof WebSocket&&(p=WebSocket),t.setWebSocketImpl=r;var d=function(){function t(e,n,r,o){this.connId=e,this.keepaliveTimer=null,this.frames=null,this.totalFrames=0,this.bytesSent=0,this.bytesReceived=0,this.log_=a.logWrapper(this.connId),this.stats_=s.StatsManager.getCollection(n),this.connURL=t.connectionURL_(n,r,o)}return t.connectionURL_=function(e,t,n){var r={};return r[u.VERSION_PARAM]=u.PROTOCOL_VERSION,!f.isNodeSdk()&&"undefined"!==typeof location&&location.href&&-1!==location.href.indexOf(u.FORGE_DOMAIN)&&(r[u.REFERER_PARAM]=u.FORGE_REF),t&&(r[u.TRANSPORT_SESSION_PARAM]=t),n&&(r[u.LAST_SESSION_PARAM]=n),e.connectionURL(u.WEBSOCKET,r)},t.prototype.open=function(t,n){var r=this;this.onDisconnect=n,this.onMessage=t,this.log_("Websocket connecting to "+this.connURL),this.everConnected_=!1,l.PersistentStorage.set("previous_websocket_failure",!0);try{if(f.isNodeSdk()){var i=c.CONSTANTS.NODE_ADMIN?"AdminNode":"Node",a={headers:{"User-Agent":"Firebase/"+u.PROTOCOL_VERSION+"/"+o.default.SDK_VERSION+"/"+e.platform+"/"+i}},s=Object({NODE_ENV:"production",PUBLIC_URL:"/build"}),h=0==this.connURL.indexOf("wss://")?s.HTTPS_PROXY||s.https_proxy:s.HTTP_PROXY||s.http_proxy;h&&(a.proxy={origin:h}),this.mySock=new p(this.connURL,[],a)}else this.mySock=new p(this.connURL)}catch(e){this.log_("Error instantiating WebSocket.");var d=e.message||e.data;return d&&this.log_(d),void this.onClosed_()}this.mySock.onopen=function(){r.log_("Websocket connected."),r.everConnected_=!0},this.mySock.onclose=function(){r.log_("Websocket connection was disconnected."),r.mySock=null,r.onClosed_()},this.mySock.onmessage=function(e){r.handleIncomingFrame(e)},this.mySock.onerror=function(e){r.log_("WebSocket error. Closing connection.");var t=e.message||e.data;t&&r.log_(t),r.onClosed_()}},t.prototype.start=function(){},t.forceDisallow=function(){t.forceDisallow_=!0},t.isAvailable=function(){var e=!1;if("undefined"!==typeof navigator&&navigator.userAgent){var n=/Android ([0-9]{0,}\.[0-9]{0,})/,r=navigator.userAgent.match(n);r&&r.length>1&&parseFloat(r[1])<4.4&&(e=!0)}return!e&&null!==p&&!t.forceDisallow_},t.previouslyFailed=function(){return l.PersistentStorage.isInMemoryStorage||!0===l.PersistentStorage.get("previous_websocket_failure")},t.prototype.markConnectionHealthy=function(){l.PersistentStorage.remove("previous_websocket_failure")},t.prototype.appendFrame_=function(e){if(this.frames.push(e),this.frames.length==this.totalFrames){var t=this.frames.join("");this.frames=null;var n=h.jsonEval(t);this.onMessage(n)}},t.prototype.handleNewFrameCount_=function(e){this.totalFrames=e,this.frames=[]},t.prototype.extractFrameCount_=function(e){if(i.assert(null===this.frames,"We already have a frame buffer"),e.length<=6){var t=Number(e);if(!isNaN(t))return this.handleNewFrameCount_(t),null}return this.handleNewFrameCount_(1),e},t.prototype.handleIncomingFrame=function(e){if(null!==this.mySock){var t=e.data;if(this.bytesReceived+=t.length,this.stats_.incrementCounter("bytes_received",t.length),this.resetKeepAlive(),null!==this.frames)this.appendFrame_(t);else{var n=this.extractFrameCount_(t);null!==n&&this.appendFrame_(n)}}},t.prototype.send=function(e){this.resetKeepAlive();var t=h.stringify(e);this.bytesSent+=t.length,this.stats_.incrementCounter("bytes_sent",t.length);var n=a.splitStringBySize(t,16384);n.length>1&&this.sendString_(String(n.length));for(var r=0;r<n.length;r++)this.sendString_(n[r])},t.prototype.shutdown_=function(){this.isClosed_=!0,this.keepaliveTimer&&(clearInterval(this.keepaliveTimer),this.keepaliveTimer=null),this.mySock&&(this.mySock.close(),this.mySock=null)},t.prototype.onClosed_=function(){this.isClosed_||(this.log_("WebSocket is closing itself"),this.shutdown_(),this.onDisconnect&&(this.onDisconnect(this.everConnected_),this.onDisconnect=null))},t.prototype.close=function(){this.isClosed_||(this.log_("WebSocket is being closed"),this.shutdown_())},t.prototype.resetKeepAlive=function(){var e=this;clearInterval(this.keepaliveTimer),this.keepaliveTimer=setInterval(function(){e.mySock&&e.sendString_("0"),e.resetKeepAlive()},Math.floor(45e3))},t.prototype.sendString_=function(e){try{this.mySock.send(e)}catch(e){this.log_("Exception thrown from WebSocket.send():",e.message||e.data,"Closing connection."),setTimeout(this.onClosed_.bind(this),0)}},t.responsesRequiredToBeHealthy=2,t.healthyTimeout=3e4,t}();t.WebSocketConnection=d}).call(t,n(44))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=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}();t.ServerActions=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(49),o=n(6),i=n(9),a=n(7),s=function(){function e(t){this.indexedFilter_=new r.IndexedFilter(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,o,s){return this.matches(new i.NamedNode(t,n))||(n=a.ChildrenNode.EMPTY_NODE),this.indexedFilter_.updateChild(e,t,n,r,o,s)},e.prototype.updateFullNode=function(e,t,n){t.isLeafNode()&&(t=a.ChildrenNode.EMPTY_NODE);var r=t.withIndex(this.index_);r=r.updatePriority(a.ChildrenNode.EMPTY_NODE);var s=this;return t.forEachChild(o.PRIORITY_INDEX,function(e,t){s.matches(new i.NamedNode(e,t))||(r=r.updateImmediateChild(e,a.ChildrenNode.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}();t.RangedFilter=s},function(e,t,n){"use strict";var r=n(0),o=(n.n(r),n(37)),i=n(238),a=n(110),s="messagingSenderId",u=function(){function e(e){var t=this;if(this.errorFactory_=new r.ErrorFactory("messaging","Messaging",o.a.map),!e.options[s]||"string"!==typeof e.options[s])throw this.errorFactory_.create(o.a.codes.BAD_SENDER_ID);this.messagingSenderId_=e.options[s],this.tokenManager_=new i.a,this.app=e,this.INTERNAL={},this.INTERNAL.delete=function(){return t.delete}}return e.prototype.getToken=function(){var e=this,t=this.getNotificationPermission_();return t!==a.a.granted?t===a.a.denied?Promise.reject(this.errorFactory_.create(o.a.codes.NOTIFICATIONS_BLOCKED)):Promise.resolve(null):this.getSWRegistration_().then(function(t){return e.tokenManager_.getSavedToken(e.messagingSenderId_,t).then(function(n){return n||e.tokenManager_.createToken(e.messagingSenderId_,t)})})},e.prototype.deleteToken=function(e){var t=this;return this.tokenManager_.deleteToken(e).then(function(){return t.getSWRegistration_().then(function(e){if(e)return e.pushManager.getSubscription()}).then(function(e){if(e)return e.unsubscribe()})})},e.prototype.getSWRegistration_=function(){throw this.errorFactory_.create(o.a.codes.SHOULD_BE_INHERITED)},e.prototype.requestPermission=function(){throw this.errorFactory_.create(o.a.codes.AVAILABLE_IN_WINDOW)},e.prototype.useServiceWorker=function(e){throw this.errorFactory_.create(o.a.codes.AVAILABLE_IN_WINDOW)},e.prototype.onMessage=function(e,t,n){throw this.errorFactory_.create(o.a.codes.AVAILABLE_IN_WINDOW)},e.prototype.onTokenRefresh=function(e,t,n){throw this.errorFactory_.create(o.a.codes.AVAILABLE_IN_WINDOW)},e.prototype.setBackgroundMessageHandler=function(e){throw this.errorFactory_.create(o.a.codes.AVAILABLE_IN_SW)},e.prototype.delete=function(){return this.tokenManager_.closeDatabase()},e.prototype.getNotificationPermission_=function(){return Notification.permission},e.prototype.getTokenManager=function(){return this.tokenManager_},e}();t.a=u},function(e,t,n){"use strict";var r=[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],o={userVisibleOnly:!0,applicationServerKey:new Uint8Array(r)};t.a={ENDPOINT:"https://fcm.googleapis.com",APPLICATION_SERVER_KEY:r,SUBSCRIPTION_OPTIONS:o}},function(e,t,n){"use strict";t.a={granted:"granted",default:"default",denied:"denied"}},function(e,t,n){"use strict";var r={TYPE_OF_MSG:"firebase-messaging-msg-type",DATA:"firebase-messaging-msg-data"},o={PUSH_MSG_RECEIVED:"push-msg-received",NOTIFICATION_CLICKED:"notification-clicked"},i=function(e,t){return n={},n[r.TYPE_OF_MSG]=e,n[r.DATA]=t,n;var n};t.a={PARAMS:r,TYPES_OF_MSG:o,createNewMsg:i}},function(e,t,n){"use strict";n.d(t,"a",function(){return r});var r;!function(e){e[e.NO_ERROR=0]="NO_ERROR",e[e.NETWORK_ERROR=1]="NETWORK_ERROR",e[e.ABORT=2]="ABORT"}(r||(r={}))},function(e,t,n){"use strict";n.d(t,"a",function(){return d});var r=n(52),o=n(115),i=n(12),a=n(39),s=n(53),u=n(19),c=n(114),l=n(116),h=n(23),f=n(10),p=n(249),d=function(){function e(e,t){this.authWrapper=e,t instanceof a.a?this.location=t:this.location=a.a.makeFromUrl(t)}return e.prototype.toString=function(){return r.g("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 s.b()},e.prototype.child=function(e){r.g("child",[r.e()],arguments);var t=c.a(this.location.path,e),n=new a.a(this.location.bucket,t);return this.newRef(this.authWrapper,n)},Object.defineProperty(e.prototype,"parent",{get:function(){var e=c.c(this.location.path);if(null===e)return null;var t=new a.a(this.location.bucket,e);return this.newRef(this.authWrapper,t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"root",{get:function(){var e=new a.a(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 c.b(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),r.g("put",[r.f(),r.b(!0)],arguments),this.throwIfRoot_("put"),new p.a(this,this.authWrapper,this.location,this.mappings(),new o.a(e),t)},e.prototype.putString=function(e,t,n){void 0===t&&(t=h.a.RAW),r.g("putString",[r.e(),r.e(h.c,!0),r.b(!0)],arguments),this.throwIfRoot_("putString");var i=h.b(t,e),a=u.a(n);return!f.a(a.contentType)&&f.a(i.contentType)&&(a.contentType=i.contentType),new p.a(this,this.authWrapper,this.location,this.mappings(),new o.a(i.data,!0),a)},e.prototype.delete=function(){r.g("delete",[],arguments),this.throwIfRoot_("delete");var e=this;return this.authWrapper.getAuthToken().then(function(t){var n=l.d(e.authWrapper,e.location);return e.authWrapper.makeRequest(n,t).getPromise()})},e.prototype.getMetadata=function(){r.g("getMetadata",[],arguments),this.throwIfRoot_("getMetadata");var e=this;return this.authWrapper.getAuthToken().then(function(t){var n=l.e(e.authWrapper,e.location,e.mappings());return e.authWrapper.makeRequest(n,t).getPromise()})},e.prototype.updateMetadata=function(e){r.g("updateMetadata",[r.b()],arguments),this.throwIfRoot_("updateMetadata");var t=this;return this.authWrapper.getAuthToken().then(function(n){var r=l.i(t.authWrapper,t.location,e,t.mappings());return t.authWrapper.makeRequest(r,n).getPromise()})},e.prototype.getDownloadURL=function(){return r.g("getDownloadURL",[],arguments),this.throwIfRoot_("getDownloadURL"),this.getMetadata().then(function(e){var t=e.downloadURLs[0];if(f.a(t))return t;throw i.l()})},e.prototype.throwIfRoot_=function(e){if(""===this.location.path)throw i.j(e)},e}()},function(e,t,n){"use strict";function r(e){if(0==e.length)return null;var t=e.lastIndexOf("/");return-1===t?"":e.slice(0,t)}function o(e,t){var n=t.split("/").filter(function(e){return e.length>0}).join("/");return 0===e.length?n:e+"/"+n}function i(e){var t=e.lastIndexOf("/",e.length-2);return-1===t?e:e.slice(t+1)}t.c=r,t.a=o,t.b=i},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(247),o=n(23),i=n(10),a=function(){function e(e,t){var n=0,r="";i.d(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(i.d(this.data_)){var o=this.data_,a=r.b(o,t,n);return null===a?null:new e(a)}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(i.e()){var a=t.map(function(t){return t instanceof e?t.data_:t});return new e(r.a.apply(null,a))}var s=t.map(function(e){return i.j(e)?o.b(o.a.RAW,e).data:e.data_}),u=0;s.forEach(function(e){u+=e.byteLength});var c=new Uint8Array(u),l=0;return s.forEach(function(e){for(var t=0;t<e.length;t++)c[l++]=e[t]}),new e(c,!0)},e.prototype.uploadData=function(){return this.data_},e}()},function(e,t,n){"use strict";function r(e){if(!e)throw _.s()}function o(e,t){function n(n,o){var i=b.a(e,o,t);return r(null!==i),i}return n}function i(e){function t(t,n){var r;return r=401===t.getStatus()?_.q():402===t.getStatus()?_.n(e.bucket):403===t.getStatus()?_.r(e.path):n,r.setServerResponseProp(n.serverResponseProp()),r}return t}function a(e){function t(t,r){var o=n(t,r);return 404===t.getStatus()&&(o=_.m(e.path)),o.setServerResponseProp(r.serverResponseProp()),o}var n=i(e);return t}function s(e,t,n){var r=t.fullServerUrl(),i=T.b(r),s=e.maxOperationRetryTime(),u=new E.a(i,"GET",o(e,n),s);return u.errorHandler=a(t),u}function u(e,t,n,r){var i=t.fullServerUrl(),s=T.b(i),u=b.d(n,r),c={"Content-Type":"application/json; charset=utf-8"},l=e.maxOperationRetryTime(),h=new E.a(s,"PATCH",o(e,r),l);return h.headers=c,h.body=u,h.errorHandler=a(t),h}function c(e,t){function n(e,t){}var r=t.fullServerUrl(),o=T.b(r),i=e.maxOperationRetryTime(),s=new E.a(o,"DELETE",n,i);return s.successCodes=[200,204],s.errorHandler=a(t),s}function l(e,t){return e&&e.contentType||t&&t.type()||"application/octet-stream"}function h(e,t,n){var r=w.a(n);return r.fullPath=e.path,r.size=t.size(),r.contentType||(r.contentType=l(null,t)),r}function f(e,t,n,r,a){var s=t.bucketOnlyServerUrl(),u={"X-Goog-Upload-Protocol":"multipart"},c=function(){for(var e="",t=0;t<2;t++)e+=Math.random().toString().slice(2);return e}();u["Content-Type"]="multipart/related; boundary="+c;var l=h(t,r,a),f=b.d(l,n),p="--"+c+"\r\nContent-Type: application/json; charset=utf-8\r\n\r\n"+f+"\r\n--"+c+"\r\nContent-Type: "+l.contentType+"\r\n\r\n",d="\r\n--"+c+"--",y=g.a.getBlob(p,r,d);if(null===y)throw _.d();var v={name:l.fullPath},m=T.d(s),w=e.maxUploadRetryTime(),C=new E.a(m,"POST",o(e,n),w);return C.urlParams=v,C.headers=u,C.body=y.uploadData(),C.errorHandler=i(t),C}function p(e,t){var n;try{n=e.getResponseHeader("X-Goog-Upload-Status")}catch(e){r(!1)}var o=t||["active"];return r(m.b(o,n)),n}function d(e,t,n,o,a){function s(e,t){p(e);var n;try{n=e.getResponseHeader("X-Goog-Upload-URL")}catch(e){r(!1)}return r(C.j(n)),n}var u=t.bucketOnlyServerUrl(),c=h(t,o,a),l={name:c.fullPath},f=T.d(u),d={"X-Goog-Upload-Protocol":"resumable","X-Goog-Upload-Command":"start","X-Goog-Upload-Header-Content-Length":o.size(),"X-Goog-Upload-Header-Content-Type":c.contentType,"Content-Type":"application/json; charset=utf-8"},y=b.d(c,n),v=e.maxUploadRetryTime(),m=new E.a(f,"POST",s,v);return m.urlParams=l,m.headers=d,m.body=y,m.errorHandler=i(t),m}function y(e,t,n,o){function a(e,t){var n,i=p(e,["active","final"]);try{n=e.getResponseHeader("X-Goog-Upload-Size-Received")}catch(e){r(!1)}var a=parseInt(n,10);return r(!isNaN(a)),new S(a,o.size(),"final"===i)}var s={"X-Goog-Upload-Command":"query"},u=e.maxUploadRetryTime(),c=new E.a(n,"POST",a,u);return c.headers=s,c.errorHandler=i(t),c}function v(e,t,n,r,a,s,u,c){function l(e,n){var i,a=p(e,["active","final"]),u=h.current+d,c=r.size();return i="final"===a?o(t,s)(e,n):null,new S(u,c,"final"===a,i)}var h=new S(0,0);if(u?(h.current=u.current,h.total=u.total):(h.current=0,h.total=r.size()),r.size()!==h.total)throw _.p();var f=h.total-h.current,d=f;a>0&&(d=Math.min(d,a));var y=h.current,v=y+d,m=d===f?"upload, finalize":"upload",g={"X-Goog-Upload-Command":m,"X-Goog-Upload-Offset":h.current},b=r.slice(y,v);if(null===b)throw _.d();var w=t.maxUploadRetryTime(),C=new E.a(n,"POST",l,w);return C.headers=g,C.body=b.uploadData(),C.progressCallback=c||null,C.errorHandler=i(e),C}t.e=s,t.i=u,t.d=c,t.g=f,n.d(t,"a",function(){return S}),t.c=d,t.f=y,n.d(t,"h",function(){return O}),t.b=v;var m=n(55),g=n(115),_=n(12),b=n(53),w=n(19),E=n(248),C=n(10),T=n(54),S=function(){function e(e,t,n,r){this.current=e,this.total=t,this.finalized=!!n,this.metadata=r||null}return e}(),O=262144},function(e,t,n){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},function(e,t,n){"use strict";var r=n(11),o=n(265),i=n(267),a=n(268),s=n(269),u=n(119),c="undefined"!==typeof window&&window.btoa&&window.btoa.bind(window)||n(270);e.exports=function(e){return new Promise(function(t,l){var h=e.data,f=e.headers;r.isFormData(h)&&delete f["Content-Type"];var p=new XMLHttpRequest,d="onreadystatechange",y=!1;if("undefined"===typeof window||!window.XDomainRequest||"withCredentials"in p||s(e.url)||(p=new window.XDomainRequest,d="onload",y=!0,p.onprogress=function(){},p.ontimeout=function(){}),e.auth){var v=e.auth.username||"",m=e.auth.password||"";f.Authorization="Basic "+c(v+":"+m)}if(p.open(e.method.toUpperCase(),i(e.url,e.params,e.paramsSerializer),!0),p.timeout=e.timeout,p[d]=function(){if(p&&(4===p.readyState||y)&&(0!==p.status||p.responseURL&&0===p.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in p?a(p.getAllResponseHeaders()):null,r=e.responseType&&"text"!==e.responseType?p.response:p.responseText,i={data:r,status:1223===p.status?204:p.status,statusText:1223===p.status?"No Content":p.statusText,headers:n,config:e,request:p};o(t,l,i),p=null}},p.onerror=function(){l(u("Network Error",e,null,p)),p=null},p.ontimeout=function(){l(u("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",p)),p=null},r.isStandardBrowserEnv()){var g=n(271),_=(e.withCredentials||s(e.url))&&e.xsrfCookieName?g.read(e.xsrfCookieName):void 0;_&&(f[e.xsrfHeaderName]=_)}if("setRequestHeader"in p&&r.forEach(f,function(e,t){"undefined"===typeof h&&"content-type"===t.toLowerCase()?delete f[t]:p.setRequestHeader(t,e)}),e.withCredentials&&(p.withCredentials=!0),e.responseType)try{p.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"===typeof e.onDownloadProgress&&p.addEventListener("progress",e.onDownloadProgress),"function"===typeof e.onUploadProgress&&p.upload&&p.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(e){p&&(p.abort(),l(e),p=null)}),void 0===h&&(h=null),p.send(h)})}},function(e,t,n){"use strict";var r=n(266);e.exports=function(e,t,n,o,i){var a=new Error(e);return r(a,t,n,o,i)}},function(e,t,n){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t,n){"use strict";function r(e){this.message=e}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,e.exports=r},function(e,t,n){"use strict";function r(e){return"/"===e.charAt(0)}function o(e,t){for(var n=t,r=n+1,o=e.length;r<o;n+=1,r+=1)e[n]=e[r];e.pop()}function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e&&e.split("/")||[],i=t&&t.split("/")||[],a=e&&r(e),s=t&&r(t),u=a||s;if(e&&r(e)?i=n:n.length&&(i.pop(),i=i.concat(n)),!i.length)return"/";var c=void 0;if(i.length){var l=i[i.length-1];c="."===l||".."===l||""===l}else c=!1;for(var h=0,f=i.length;f>=0;f--){var p=i[f];"."===p?o(i,f):".."===p?(o(i,f),h++):h&&(o(i,f),h--)}if(!u)for(;h--;h)i.unshift("..");!u||""===i[0]||i[0]&&r(i[0])||i.unshift("");var d=i.join("/");return c&&"/"!==d.substr(-1)&&(d+="/"),d}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i},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":o(e);if(n!==("undefined"===typeof t?"undefined":o(t)))return!1;if("object"===n){var i=e.valueOf(),a=t.valueOf();if(i!==e||a!==t)return r(i,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 o="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 o(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 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(2),u=n.n(s),c=n(5),l=n.n(c),h=n(8),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;o(this,t);for(var s=arguments.length,u=Array(s),c=0;c<s;c++)u[c]=arguments[c];return n=r=i(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,o=n.replace,i=n.to;o?t.replace(i):t.push(i)}},a=n,i(r,a)}return a(t,e),t.prototype.render=function(){var e=this.props,t=(e.replace,e.to),n=e.innerRef,o=r(e,["replace","to","innerRef"]);f()(this.context.router,"You should not use <Link> outside a <Router>");var i=this.context.router.history.createHref("string"===typeof t?{pathname:t}:t);return u.a.createElement("a",p({},o,{onClick:this.handleClick,href:i,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";var r=n(127);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 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 i(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(4),s=n.n(a),u=n(8),c=n.n(u),l=n(2),h=n.n(l),f=n(5),p=n.n(f),d=n(64),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,i,a;r(this,t);for(var s=arguments.length,u=Array(s),c=0;c<s;c++)u[c]=arguments[c];return n=i=o(this,e.call.apply(e,[this].concat(u))),i.state={match:i.computeMatch(i.props,i.context.router)},a=n,o(i,a)}return i(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,o=e.path,i=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 o?Object(d.a)(l,{path:o,strict:i,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,o=t.render,i=this.context.router,a=i.history,s=i.route,u=i.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:o?e?o(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";n.d(t,"b",function(){return r}),n.d(t,"a",function(){return o}),n.d(t,"e",function(){return i}),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),o=function(e,t,n){return e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent("on"+t,n)},i=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){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 i(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(2),s=n.n(a),u=(n(58),n(59)),c=(n.n(u),n(29)),l=n(306),h=n(27),f=n.n(h),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(e){r(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.showResults=function(e){e&&(n.setState({showResults:!0}),n.resultScore())},n.nextQuestion=function(){n.setState(function(e){return{questionNumber:e.questionNumber+2}})},n.nextQuestion2=function(){0==n.state.questionNumber?n.setState(function(e){return{questionNumber2:++e.questionNumber2}}):n.setState(function(e){return{questionNumber2:e.questionNumber2+2}})},n.changeZIndex=function(){1==n.state.zIndex?n.setState({zIndex:0,zIndex2:1}):n.setState({zIndex:1,zIndex2:0})},n.answer=function(e,t,r){var o=n.state.answerArray,i=n.state.selectedArray;o[e]=t,i[e]=r,n.setState({answerArray:o})},n.resultScore=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=n.state.answerArray.reduce(function(e,t){return e+t}),r=Math.floor(t/(4*n.state.testObject.questions.length)*100);n.setState({answerNumber:e}),e<r?setTimeout(function(){n.resultScore(++e)},50):setTimeout(function(){n.setState({showReadMoreControls:!0})},500)},n.readMoreDown=function(){n.refs.readMore.style.opacity="0",setTimeout(function(){n.refs.readMore.style.transition="opacity 1s, max-height 4s ease",n.refs.readMore.style.maxHeight="800px",n.setState({readMore:!0}),n.refs.readMore.style.opacity="1"},1e3),(document.documentElement.scrollTop||0==document.body.scrollTop)&&setTimeout(function(){n.scrollDown(document.documentElement.scrollTop||document.body.scrollTop)},1300)},n.readMoreUp=function(e){n.refs.readMore.style.maxHeight="90px",n.refs.readMore.style.opacity="0",setTimeout(function(){n.refs.readMore&&(n.setState({readMore:!1}),n.refs.readMore.style.opacity="1")},4e3)},n.scrollDown=function(e){window.scrollTo(0,e),e<document.body.scrollHeight&&setTimeout(function(){n.scrollDown(e+3)},1)},n.state={readMore:!1,showReadMoreControls:!1,showResults:!1,answerArray:[],selectedArray:[],answerNumber:"",questionNumber:0,zIndex:1,zIndex2:0,questionNumber2:0,testObject:n.props.tests[+n.props.match.params.id]},n}return i(t,e),p(t,[{key:"render",value:function(){var e=this;if(this.state.readMore)var t=s.a.createElement("div",{className:"read-more-text"},this.state.testObject.readMore,s.a.createElement("div",null,s.a.createElement(f.a,{name:"angle-up",onClick:function(){e.readMoreUp()}})));else var t=s.a.createElement("div",null,s.a.createElement("span",null,"Read more about ",this.state.testObject.keyword),s.a.createElement(f.a,{name:"angle-down",onClick:function(){e.readMoreDown()}}));return window.TestComponentState=this.state,this.state.showResults?s.a.createElement("div",{className:"results-block"},s.a.createElement("div",{className:"result-text"},"Your score as a percentage for ",s.a.createElement("span",null,this.state.testObject.keyword),":"),s.a.createElement("div",{className:"result-number"},this.state.answerNumber,"%",s.a.createElement(f.a,{name:"circle-thin"})),s.a.createElement("div",{className:"result-slider"},s.a.createElement("div",{className:"result-slider-line",style:{width:this.state.answerNumber+"%"}})),s.a.createElement("div",{ref:"readMore",className:"read-more",style:this.state.showReadMoreControls?{maxHeight:"90px",opacity:"1"}:{}},t)):s.a.createElement("div",{className:"test-component"},s.a.createElement(l.a,{showResults:this.showResults,questionsLength:this.state.testObject.questions.length,answerArray:this.state.selectedArray,answer:this.answer,nextQuestion:this.nextQuestion,questionNumber:this.state.questionNumber2,zIndex:this.state.zIndex2,changeZIndex:this.changeZIndex,info:this.state.testObject.questions[this.state.questionNumber2]}),s.a.createElement(l.a,{showResults:this.showResults,questionsLength:this.state.testObject.questions.length,answerArray:this.state.selectedArray,answer:this.answer,nextQuestion2:this.nextQuestion2,questionNumber:this.state.questionNumber,zIndex:this.state.zIndex,changeZIndex:this.changeZIndex,info:this.state.testObject.questions[this.state.questionNumber]}))}}]),t}(a.Component),y=function(e){return{tests:e}};t.a=Object(c.b)(y)(d)},function(e,t,n){n(131),e.exports=n(136)},function(e,t,n){"use strict";"undefined"===typeof Promise&&(n(132).enable(),window.Promise=n(134)),n(135),Object.assign=n(41)},function(e,t,n){"use strict";function r(){c=!1,s._47=null,s._71=null}function o(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,i(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 o=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=o++,h[e._56]={displayId:null,error:n,timeout:setTimeout(t.bind(null,e._56),a(n,u)?100:2e3),logged:!1})}}function i(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(66),u=[ReferenceError,TypeError,RangeError],c=!1;t.disable=r,t.enable=o},function(e,t,n){"use strict";(function(t){function n(e){a.length||(i(),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 o(e){return function(){function t(){clearTimeout(n),clearInterval(r),e()}var n=setTimeout(t,0),r=setInterval(t,50)}}e.exports=n;var i,a=[],s=!1,u=0,c=1024,l="undefined"!==typeof t?t:self,h=l.MutationObserver||l.WebKitMutationObserver;i="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):o(r),n.requestFlush=i,n.makeRequestCallFromTimer=o}).call(t,n(17))},function(e,t,n){"use strict";function r(e){var t=new o(o._44);return t._83=1,t._18=e,t}var o=n(66);e.exports=o;var i=r(!0),a=r(!1),s=r(null),u=r(void 0),c=r(0),l=r("");o.resolve=function(e){if(e instanceof o)return e;if(null===e)return s;if(void 0===e)return u;if(!0===e)return i;if(!1===e)return a;if(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 o(t.bind(e))}catch(e){return new o(function(t,n){n(e)})}return r(e)},o.all=function(e){var t=Array.prototype.slice.call(e);return new o(function(e,n){function r(a,s){if(s&&("object"===typeof s||"function"===typeof s)){if(s instanceof o&&s.then===o.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 o(u.bind(s)).then(function(e){r(a,e)},n)}}t[a]=s,0===--i&&e(t)}if(0===t.length)return e([]);for(var i=t.length,a=0;a<t.length;a++)r(a,t[a])})},o.reject=function(e){return new o(function(t,n){n(e)})},o.race=function(e){return new o(function(t,n){e.forEach(function(e){o.resolve(e).then(t,n)})})},o.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 o(e){this.map={},e instanceof o?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 i(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=i(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?i(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(s)}),this.text=function(){var e=i(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 o(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 o(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," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(o))}}),t}function y(e){var t=new o;return e.split(/\r?\n/).forEach(function(e){var n=e.split(":"),r=n.shift().trim();if(r){var o=n.join(":").trim();t.append(r,o)}}),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 o(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};o.prototype.append=function(e,r){e=t(e),r=n(r);var o=this.map[e];this.map[e]=o?o+","+r:r},o.prototype.delete=function(e){delete this.map[t(e)]},o.prototype.get=function(e){return e=t(e),this.has(e)?this.map[e]:null},o.prototype.has=function(e){return this.map.hasOwnProperty(t(e))},o.prototype.set=function(e,r){this.map[t(e)]=n(r)},o.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},o.prototype.keys=function(){var e=[];return this.forEach(function(t,n){e.push(n)}),r(e)},o.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),r(e)},o.prototype.entries=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),r(e)},m.iterable&&(o.prototype[Symbol.iterator]=o.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 o(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=o,e.Request=p,e.Response=v,e.fetch=function(e,t){return new Promise(function(n,r){var o=new p(e,t),i=new XMLHttpRequest;i.onload=function(){var e={status:i.status,statusText:i.statusText,headers:y(i.getAllResponseHeaders()||"")};e.url="responseURL"in i?i.responseURL:e.headers.get("X-Request-URL");var t="response"in i?i.response:i.responseText;n(new v(t,e))},i.onerror=function(){r(new TypeError("Network request failed"))},i.ontimeout=function(){r(new TypeError("Network request failed"))},i.open(o.method,o.url,!0),"include"===o.credentials&&(i.withCredentials=!0),"responseType"in i&&m.blob&&(i.responseType="blob"),o.headers.forEach(function(e,t){i.setRequestHeader(t,e)}),i.send("undefined"===typeof o._bodyInit?null:o._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(2),o=n.n(r),i=n(138),a=n.n(i),s=n(148),u=(n.n(s),n(149)),c=n(309),l=n(78);n.n(l);a.a.render(o.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="Minified React error #"+e+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+e,r=0;r<t;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);throw t=Error(n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."),t.name="Invariant Violation",t.framesToPop=1,t}function o(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||P}function i(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||P}function a(){}function s(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||P}function u(e,t,n){var r,o={},i=null,a=null;if(null!=t)for(r in void 0!==t.ref&&(a=t.ref),void 0!==t.key&&(i=""+t.key),t)k.call(t,r)&&!x.hasOwnProperty(r)&&(o[r]=t[r]);var s=arguments.length-2;if(1===s)o.children=n;else if(1<s){for(var u=Array(s),c=0;c<s;c++)u[c]=arguments[c+2];o.children=u}if(e&&e.defaultProps)for(r in s=e.defaultProps)void 0===o[r]&&(o[r]=s[r]);return{$$typeof:E,type:e,key:i,ref:a,props:o,_owner:A.current}}function c(e){return"object"===typeof e&&null!==e&&e.$$typeof===E}function l(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,function(e){return t[e]})}function h(e,t,n,r){if(M.length){var o=M.pop();return o.result=e,o.keyPrefix=t,o.func=n,o.context=r,o.count=0,o}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function f(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>M.length&&M.push(e)}function p(e,t,n,o){var i=typeof e;"undefined"!==i&&"boolean"!==i||(e=null);var a=!1;if(null===e)a=!0;else switch(i){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case E:case C:case T:case S:a=!0}}if(a)return n(o,e,""===t?"."+d(e,0):t),1;if(a=0,t=""===t?".":t+":",Array.isArray(e))for(var s=0;s<e.length;s++){i=e[s];var u=t+d(i,s);a+=p(i,u,n,o)}else if(null===e||"undefined"===typeof e?u=null:(u=N&&e[N]||e["@@iterator"],u="function"===typeof u?u:null),"function"===typeof u)for(e=u.call(e),s=0;!(i=e.next()).done;)i=i.value,u=t+d(i,s++),a+=p(i,u,n,o);else"object"===i&&(n=""+e,r("31","[object Object]"===n?"object with keys {"+Object.keys(e).join(", ")+"}":n,""));return a}function d(e,t){return"object"===typeof e&&null!==e&&null!=e.key?l(e.key):t.toString(36)}function y(e,t){e.func.call(e.context,t,e.count++)}function v(e,t,n){var r=e.result,o=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?m(e,r,n,b.thatReturnsArgument):null!=e&&(c(e)&&(t=o+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(D,"$&/")+"/")+n,e={$$typeof:E,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}),r.push(e))}function m(e,t,n,r,o){var i="";null!=n&&(i=(""+n).replace(D,"$&/")+"/"),t=h(t,i,r,o),null==e||p(e,"",v,t),f(t)}var g=n(41),_=n(67),b=n(28),w="function"===typeof Symbol&&Symbol.for,E=w?Symbol.for("react.element"):60103,C=w?Symbol.for("react.call"):60104,T=w?Symbol.for("react.return"):60105,S=w?Symbol.for("react.portal"):60106,O=w?Symbol.for("react.fragment"):60107,N="function"===typeof Symbol&&Symbol.iterator,P={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}};o.prototype.isReactComponent={},o.prototype.setState=function(e,t){"object"!==typeof e&&"function"!==typeof e&&null!=e&&r("85"),this.updater.enqueueSetState(this,e,t,"setState")},o.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},a.prototype=o.prototype;var I=i.prototype=new a;I.constructor=i,g(I,o.prototype),I.isPureReactComponent=!0;var R=s.prototype=new a;R.constructor=s,g(R,o.prototype),R.unstable_isAsyncReactComponent=!0,R.render=function(){return this.props.children};var A={current:null},k=Object.prototype.hasOwnProperty,x={key:!0,ref:!0,__self:!0,__source:!0},D=/\/+/g,M=[],L={Children:{map:function(e,t,n){if(null==e)return e;var r=[];return m(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;t=h(null,null,t,n),null==e||p(e,"",y,t),f(t)},count:function(e){return null==e?0:p(e,"",b.thatReturnsNull,null)},toArray:function(e){var t=[];return m(e,t,null,b.thatReturnsArgument),t},only:function(e){return c(e)||r("143"),e}},Component:o,PureComponent:i,unstable_AsyncComponent:s,Fragment:O,createElement:u,cloneElement:function(e,t,n){var r=g({},e.props),o=e.key,i=e.ref,a=e._owner;if(null!=t){if(void 0!==t.ref&&(i=t.ref,a=A.current),void 0!==t.key&&(o=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(u in t)k.call(t,u)&&!x.hasOwnProperty(u)&&(r[u]=void 0===t[u]&&void 0!==s?s[u]:t[u])}var u=arguments.length-2;if(1===u)r.children=n;else if(1<u){s=Array(u);for(var c=0;c<u;c++)s[c]=arguments[c+2];r.children=s}return{$$typeof:E,type:e.type,key:o,ref:i,props:r,_owner:a}},createFactory:function(e){var t=u.bind(null,e);return t.type=e,t},isValidElement:c,version:"16.2.0",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentOwner:A,assign:g}},j=Object.freeze({default:L}),F=j&&L||j;e.exports=F.default?F.default:F},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(139)},function(e,t,n){"use strict";function r(e){for(var t=arguments.length-1,n="Minified React error #"+e+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+e,r=0;r<t;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);throw t=Error(n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."),t.name="Invariant Violation",t.framesToPop=1,t}function o(e,t){return(e&t)===t}function i(e,t){if(In.hasOwnProperty(e)||2<e.length&&("o"===e[0]||"O"===e[0])&&("n"===e[1]||"N"===e[1]))return!1;if(null===t)return!0;switch(typeof t){case"boolean":return In.hasOwnProperty(e)?e=!0:(t=a(e))?e=t.hasBooleanValue||t.hasStringBooleanValue||t.hasOverloadedBooleanValue:(e=e.toLowerCase().slice(0,5),e="data-"===e||"aria-"===e),e;case"undefined":case"number":case"string":case"object":return!0;default:return!1}}function a(e){return An.hasOwnProperty(e)?An[e]:null}function s(e){return e[1].toUpperCase()}function u(e,t,n,r,o,i,a,s,u){Hn._hasCaughtError=!1,Hn._caughtError=null;var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(e){Hn._caughtError=e,Hn._hasCaughtError=!0}}function c(){if(Hn._hasRethrowError){var e=Hn._rethrowError;throw Hn._rethrowError=null,Hn._hasRethrowError=!1,e}}function l(){if(Kn)for(var e in Gn){var t=Gn[e],n=Kn.indexOf(e);if(-1<n||r("96",e),!zn[n]){t.extractEvents||r("97",e),zn[n]=t,n=t.eventTypes;for(var o in n){var i=void 0,a=n[o],s=t,u=o;Qn.hasOwnProperty(u)&&r("99",u),Qn[u]=a;var c=a.phasedRegistrationNames;if(c){for(i in c)c.hasOwnProperty(i)&&h(c[i],s,u);i=!0}else a.registrationName?(h(a.registrationName,s,u),i=!0):i=!1;i||r("98",o,e)}}}}function h(e,t,n){Xn[e]&&r("100",e),Xn[e]=t,Yn[e]=t.eventTypes[n].dependencies}function f(e){Kn&&r("101"),Kn=Array.prototype.slice.call(e),l()}function p(e){var t,n=!1;for(t in e)if(e.hasOwnProperty(t)){var o=e[t];Gn.hasOwnProperty(t)&&Gn[t]===o||(Gn[t]&&r("102",t),Gn[t]=o,n=!0)}n&&l()}function d(e,t,n,r){t=e.type||"unknown-event",e.currentTarget=er(r),Hn.invokeGuardedCallbackAndCatchFirstError(t,n,void 0,e),e.currentTarget=null}function y(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 v(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)}function m(e,t){if(e){var n=e._dispatchListeners,r=e._dispatchInstances;if(Array.isArray(n))for(var o=0;o<n.length&&!e.isPropagationStopped();o++)d(e,t,n[o],r[o]);else n&&d(e,t,n,r);e._dispatchListeners=null,e._dispatchInstances=null,e.isPersistent()||e.constructor.release(e)}}function g(e){return m(e,!0)}function _(e){return m(e,!1)}function b(e,t){var n=e.stateNode;if(!n)return null;var o=Jn(n);if(!o)return null;n=o[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":(o=!o.disabled)||(e=e.type,o=!("button"===e||"input"===e||"select"===e||"textarea"===e)),e=!o;break e;default:e=!1}return e?null:(n&&"function"!==typeof n&&r("231",t,typeof n),n)}function w(e,t,n,r){for(var o,i=0;i<zn.length;i++){var a=zn[i];a&&(a=a.extractEvents(e,t,n,r))&&(o=y(o,a))}return o}function E(e){e&&(tr=y(tr,e))}function C(e){var t=tr;tr=null,t&&(e?v(t,g):v(t,_),tr&&r("95"),Hn.rethrowCaughtError())}function T(e){if(e[ir])return e[ir];for(var t=[];!e[ir];){if(t.push(e),!e.parentNode)return null;e=e.parentNode}var n=void 0,r=e[ir];if(5===r.tag||6===r.tag)return r;for(;e&&(r=e[ir]);e=t.pop())n=r;return n}function S(e){if(5===e.tag||6===e.tag)return e.stateNode;r("33")}function O(e){return e[ar]||null}function N(e){do{e=e.return}while(e&&5!==e.tag);return e||null}function P(e,t,n){for(var r=[];e;)r.push(e),e=N(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 I(e,t,n){(t=b(e,n.dispatchConfig.phasedRegistrationNames[t]))&&(n._dispatchListeners=y(n._dispatchListeners,t),n._dispatchInstances=y(n._dispatchInstances,e))}function R(e){e&&e.dispatchConfig.phasedRegistrationNames&&P(e._targetInst,I,e)}function A(e){if(e&&e.dispatchConfig.phasedRegistrationNames){var t=e._targetInst;t=t?N(t):null,P(t,I,e)}}function k(e,t,n){e&&n&&n.dispatchConfig.registrationName&&(t=b(e,n.dispatchConfig.registrationName))&&(n._dispatchListeners=y(n._dispatchListeners,t),n._dispatchInstances=y(n._dispatchInstances,e))}function x(e){e&&e.dispatchConfig.registrationName&&k(e._targetInst,null,e)}function D(e){v(e,R)}function M(e,t,n,r){if(n&&r)e:{for(var o=n,i=r,a=0,s=o;s;s=N(s))a++;s=0;for(var u=i;u;u=N(u))s++;for(;0<a-s;)o=N(o),a--;for(;0<s-a;)i=N(i),s--;for(;a--;){if(o===i||o===i.alternate)break e;o=N(o),i=N(i)}o=null}else o=null;for(i=o,o=[];n&&n!==i&&(null===(a=n.alternate)||a!==i);)o.push(n),n=N(n);for(n=[];r&&r!==i&&(null===(a=r.alternate)||a!==i);)n.push(r),r=N(r);for(r=0;r<o.length;r++)k(o[r],"bubbled",e);for(e=n.length;0<e--;)k(n[e],"captured",t)}function L(){return!cr&&bn.canUseDOM&&(cr="textContent"in document.documentElement?"textContent":"innerText"),cr}function j(){if(lr._fallbackText)return lr._fallbackText;var e,t,n=lr._startText,r=n.length,o=F(),i=o.length;for(e=0;e<r&&n[e]===o[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===o[i-t];t++);return lr._fallbackText=o.slice(e,1<t?1-t:void 0),lr._fallbackText}function F(){return"value"in lr._root?lr._root.value:lr._root[L()]}function U(e,t,n,r){this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=n,e=this.constructor.Interface;for(var o in e)e.hasOwnProperty(o)&&((t=e[o])?this[o]=t(n):"target"===o?this.target=r:this[o]=n[o]);return this.isDefaultPrevented=(null!=n.defaultPrevented?n.defaultPrevented:!1===n.returnValue)?En.thatReturnsTrue:En.thatReturnsFalse,this.isPropagationStopped=En.thatReturnsFalse,this}function W(e,t,n,r){if(this.eventPool.length){var o=this.eventPool.pop();return this.call(o,e,t,n,r),o}return new this(e,t,n,r)}function B(e){e instanceof this||r("223"),e.destructor(),10>this.eventPool.length&&this.eventPool.push(e)}function V(e){e.eventPool=[],e.getPooled=W,e.release=B}function q(e,t,n,r){return U.call(this,e,t,n,r)}function H(e,t,n,r){return U.call(this,e,t,n,r)}function K(e,t){switch(e){case"topKeyUp":return-1!==pr.indexOf(t.keyCode);case"topKeyDown":return 229!==t.keyCode;case"topKeyPress":case"topMouseDown":case"topBlur":return!0;default:return!1}}function G(e){return e=e.detail,"object"===typeof e&&"data"in e?e.data:null}function z(e,t){switch(e){case"topCompositionEnd":return G(t);case"topKeyPress":return 32!==t.which?null:(Cr=!0,wr);case"topTextInput":return e=t.data,e===wr&&Cr?null:e;default:return null}}function Q(e,t){if(Tr)return"topCompositionEnd"===e||!dr&&K(e,t)?(e=j(),lr._root=null,lr._startText=null,lr._fallbackText=null,Tr=!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 br?null:t.data;default:return null}}function X(e){if(e=Zn(e)){Or&&"function"===typeof Or.restoreControlledState||r("194");var t=Jn(e.stateNode);Or.restoreControlledState(e.stateNode,e.type,t)}}function Y(e){Nr?Pr?Pr.push(e):Pr=[e]:Nr=e}function $(){if(Nr){var e=Nr,t=Pr;if(Pr=Nr=null,X(e),t)for(e=0;e<t.length;e++)X(t[e])}}function J(e,t){return e(t)}function Z(e,t){if(Ar)return J(e,t);Ar=!0;try{return J(e,t)}finally{Ar=!1,$()}}function ee(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!kr[e.type]:"textarea"===t}function te(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}function ne(e,t){if(!bn.canUseDOM||t&&!("addEventListener"in document))return!1;t="on"+e;var n=t in document;return n||(n=document.createElement("div"),n.setAttribute(t,"return;"),n="function"===typeof n[t]),!n&&gr&&"wheel"===e&&(n=document.implementation.hasFeature("Events.wheel","3.0")),n}function re(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function oe(e){var t=re(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,{enumerable:n.enumerable,configurable:!0,get:function(){return n.get.call(this)},set:function(e){r=""+e,n.set.call(this,e)}}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}function ie(e){e._valueTracker||(e._valueTracker=oe(e))}function ae(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=re(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function se(e,t,n){return e=U.getPooled(xr.change,e,t,n),e.type="change",Y(n),D(e),e}function ue(e){E(e),C(!1)}function ce(e){if(ae(S(e)))return e}function le(e,t){if("topChange"===e)return t}function he(){Dr&&(Dr.detachEvent("onpropertychange",fe),Mr=Dr=null)}function fe(e){"value"===e.propertyName&&ce(Mr)&&(e=se(Mr,e,te(e)),Z(ue,e))}function pe(e,t,n){"topFocus"===e?(he(),Dr=t,Mr=n,Dr.attachEvent("onpropertychange",fe)):"topBlur"===e&&he()}function de(e){if("topSelectionChange"===e||"topKeyUp"===e||"topKeyDown"===e)return ce(Mr)}function ye(e,t){if("topClick"===e)return ce(t)}function ve(e,t){if("topInput"===e||"topChange"===e)return ce(t)}function me(e,t,n,r){return U.call(this,e,t,n,r)}function ge(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Fr[e])&&!!t[e]}function _e(){return ge}function be(e,t,n,r){return U.call(this,e,t,n,r)}function we(e){return e=e.type,"string"===typeof e?e:"function"===typeof e?e.displayName||e.name:null}function Ee(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 Ce(e){return!!(e=e._reactInternalFiber)&&2===Ee(e)}function Te(e){2!==Ee(e)&&r("188")}function Se(e){var t=e.alternate;if(!t)return t=Ee(e),3===t&&r("188"),1===t?null:e;for(var n=e,o=t;;){var i=n.return,a=i?i.alternate:null;if(!i||!a)break;if(i.child===a.child){for(var s=i.child;s;){if(s===n)return Te(i),e;if(s===o)return Te(i),t;s=s.sibling}r("188")}if(n.return!==o.return)n=i,o=a;else{s=!1;for(var u=i.child;u;){if(u===n){s=!0,n=i,o=a;break}if(u===o){s=!0,o=i,n=a;break}u=u.sibling}if(!s){for(u=a.child;u;){if(u===n){s=!0,n=a,o=i;break}if(u===o){s=!0,o=a,n=i;break}u=u.sibling}s||r("189")}}n.alternate!==o&&r("190")}return 3!==n.tag&&r("188"),n.stateNode.current===n?e:t}function Oe(e){if(!(e=Se(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 Ne(e){if(!(e=Se(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 Pe(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=T(n)}while(t);for(n=0;n<e.ancestors.length;n++)t=e.ancestors[n],Hr(e.topLevelType,t,e.nativeEvent,te(e.nativeEvent))}function Ie(e){qr=!!e}function Re(e,t,n){return n?Cn.listen(n,t,ke.bind(null,e)):null}function Ae(e,t,n){return n?Cn.capture(n,t,ke.bind(null,e)):null}function ke(e,t){if(qr){var n=te(t);if(n=T(n),null===n||"number"!==typeof n.tag||2===Ee(n)||(n=null),Vr.length){var r=Vr.pop();r.topLevelType=e,r.nativeEvent=t,r.targetInst=n,e=r}else e={topLevelType:e,nativeEvent:t,targetInst:n,ancestors:[]};try{Z(Pe,e)}finally{e.topLevelType=null,e.nativeEvent=null,e.targetInst=null,e.ancestors.length=0,10>Vr.length&&Vr.push(e)}}}function xe(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 De(e){if(zr[e])return zr[e];if(!Gr[e])return e;var t,n=Gr[e];for(t in n)if(n.hasOwnProperty(t)&&t in Qr)return zr[e]=n[t];return""}function Me(e){return Object.prototype.hasOwnProperty.call(e,Jr)||(e[Jr]=$r++,Yr[e[Jr]]={}),Yr[e[Jr]]}function Le(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function je(e,t){var n=Le(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=Le(n)}}function Fe(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&"text"===e.type||"textarea"===t||"true"===e.contentEditable)}function Ue(e,t){if(oo||null==to||to!==Tn())return null;var n=to;return"selectionStart"in n&&Fe(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,ro&&Sn(ro,n)?null:(ro=n,e=U.getPooled(eo.select,no,e,t),e.type="select",e.target=to,D(e),e)}function We(e,t,n,r){return U.call(this,e,t,n,r)}function Be(e,t,n,r){return U.call(this,e,t,n,r)}function Ve(e,t,n,r){return U.call(this,e,t,n,r)}function qe(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,32<=e||13===e?e:0}function He(e,t,n,r){return U.call(this,e,t,n,r)}function Ke(e,t,n,r){return U.call(this,e,t,n,r)}function Ge(e,t,n,r){return U.call(this,e,t,n,r)}function ze(e,t,n,r){return U.call(this,e,t,n,r)}function Qe(e,t,n,r){return U.call(this,e,t,n,r)}function Xe(e){0>fo||(e.current=ho[fo],ho[fo]=null,fo--)}function Ye(e,t){fo++,ho[fo]=e.current,e.current=t}function $e(e){return Ze(e)?vo:po.current}function Je(e,t){var n=e.type.contextTypes;if(!n)return Pn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,i={};for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Ze(e){return 2===e.tag&&null!=e.type.childContextTypes}function et(e){Ze(e)&&(Xe(yo,e),Xe(po,e))}function tt(e,t,n){null!=po.cursor&&r("168"),Ye(po,t,e),Ye(yo,n,e)}function nt(e,t){var n=e.stateNode,o=e.type.childContextTypes;if("function"!==typeof n.getChildContext)return t;n=n.getChildContext();for(var i in n)i in o||r("108",we(e)||"Unknown",i);return wn({},t,n)}function rt(e){if(!Ze(e))return!1;var t=e.stateNode;return t=t&&t.__reactInternalMemoizedMergedChildContext||Pn,vo=po.current,Ye(po,t,e),Ye(yo,yo.current,e),!0}function ot(e,t){var n=e.stateNode;if(n||r("169"),t){var o=nt(e,vo);n.__reactInternalMemoizedMergedChildContext=o,Xe(yo,e),Xe(po,e),Ye(po,o,e)}else Xe(yo,e);Ye(yo,t,e)}function it(e,t,n){this.tag=e,this.key=t,this.stateNode=this.type=null,this.sibling=this.child=this.return=null,this.index=0,this.memoizedState=this.updateQueue=this.memoizedProps=this.pendingProps=this.ref=null,this.internalContextTag=n,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.expirationTime=0,this.alternate=null}function at(e,t,n){var r=e.alternate;return null===r?(r=new it(e.tag,e.key,e.internalContextTag),r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.effectTag=0,r.nextEffect=null,r.firstEffect=null,r.lastEffect=null),r.expirationTime=n,r.pendingProps=t,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 st(e,t,n){var o=void 0,i=e.type,a=e.key;return"function"===typeof i?(o=i.prototype&&i.prototype.isReactComponent?new it(2,a,t):new it(0,a,t),o.type=i,o.pendingProps=e.props):"string"===typeof i?(o=new it(5,a,t),o.type=i,o.pendingProps=e.props):"object"===typeof i&&null!==i&&"number"===typeof i.tag?(o=i,o.pendingProps=e.props):r("130",null==i?i:typeof i,""),o.expirationTime=n,o}function ut(e,t,n,r){return t=new it(10,r,t),t.pendingProps=e,t.expirationTime=n,t}function ct(e,t,n){return t=new it(6,null,t),t.pendingProps=e,t.expirationTime=n,t}function lt(e,t,n){return t=new it(7,e.key,t),t.type=e.handler,t.pendingProps=e,t.expirationTime=n,t}function ht(e,t,n){return e=new it(9,null,t),e.expirationTime=n,e}function ft(e,t,n){return t=new it(4,e.key,t),t.pendingProps=e.children||[],t.expirationTime=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function pt(e){return function(t){try{return e(t)}catch(e){}}}function dt(e){if("undefined"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)return!0;try{var n=t.inject(e);mo=pt(function(e){return t.onCommitFiberRoot(n,e)}),go=pt(function(e){return t.onCommitFiberUnmount(n,e)})}catch(e){}return!0}function yt(e){"function"===typeof mo&&mo(e)}function vt(e){"function"===typeof go&&go(e)}function mt(e){return{baseState:e,expirationTime:0,first:null,last:null,callbackList:null,hasForceUpdate:!1,isInitialized:!1}}function gt(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 _t(e,t){var n=e.alternate,r=e.updateQueue;null===r&&(r=e.updateQueue=mt(null)),null!==n?null===(e=n.updateQueue)&&(e=n.updateQueue=mt(null)):e=null,e=e!==r?e:null,null===e?gt(r,t):null===r.last||null===e.last?(gt(r,t),gt(e,t)):(gt(r,t),e.last=t)}function bt(e,t,n,r){return e=e.partialState,"function"===typeof e?e.call(t,n,r):e}function wt(e,t,n,r,o,i){null!==e&&e.updateQueue===n&&(n=t.updateQueue={baseState:n.baseState,expirationTime:n.expirationTime,first:n.first,last:n.last,isInitialized:n.isInitialized,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>i){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=bt(s,r,e,o),a=!0):(c=bt(s,r,e,o))&&(e=a?wn({},e,c):wn(e,c),a=!1),s.isForced&&(n.hasForceUpdate=!0),null!==s.callback&&(c=n.callbackList,null===c&&(c=n.callbackList=[]),c.push(s));s=s.next}return null!==n.callbackList?t.effectTag|=32:null!==n.first||n.hasForceUpdate||(t.updateQueue=null),u||(n.baseState=e),e}function Et(e,t){var n=e.callbackList;if(null!==n)for(e.callbackList=null,e=0;e<n.length;e++){var o=n[e],i=o.callback;o.callback=null,"function"!==typeof i&&r("191",i),i.call(t)}}function Ct(e,t,n,o){function i(e,t){t.updater=a,e.stateNode=t,t._reactInternalFiber=e}var a={isMounted:Ce,enqueueSetState:function(n,r,o){n=n._reactInternalFiber,o=void 0===o?null:o;var i=t(n);_t(n,{expirationTime:i,partialState:r,callback:o,isReplace:!1,isForced:!1,nextCallback:null,next:null}),e(n,i)},enqueueReplaceState:function(n,r,o){n=n._reactInternalFiber,o=void 0===o?null:o;var i=t(n);_t(n,{expirationTime:i,partialState:r,callback:o,isReplace:!0,isForced:!1,nextCallback:null,next:null}),e(n,i)},enqueueForceUpdate:function(n,r){n=n._reactInternalFiber,r=void 0===r?null:r;var o=t(n);_t(n,{expirationTime:o,partialState:null,callback:r,isReplace:!1,isForced:!0,nextCallback:null,next:null}),e(n,o)}};return{adoptClassInstance:i,constructClassInstance:function(e,t){var n=e.type,r=$e(e),o=2===e.tag&&null!=e.type.contextTypes,a=o?Je(e,r):Pn;return t=new n(t,a),i(e,t),o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=r,e.__reactInternalMemoizedMaskedChildContext=a),t},mountClassInstance:function(e,t){var n=e.alternate,o=e.stateNode,i=o.state||null,s=e.pendingProps;s||r("158");var u=$e(e);o.props=s,o.state=e.memoizedState=i,o.refs=Pn,o.context=Je(e,u),null!=e.type&&null!=e.type.prototype&&!0===e.type.prototype.unstable_isAsyncReactComponent&&(e.internalContextTag|=1),"function"===typeof o.componentWillMount&&(i=o.state,o.componentWillMount(),i!==o.state&&a.enqueueReplaceState(o,o.state,null),null!==(i=e.updateQueue)&&(o.state=wt(n,e,i,o,s,t))),"function"===typeof o.componentDidMount&&(e.effectTag|=4)},updateClassInstance:function(e,t,i){var s=t.stateNode;s.props=t.memoizedProps,s.state=t.memoizedState;var u=t.memoizedProps,c=t.pendingProps;c||null==(c=u)&&r("159");var l=s.context,h=$e(t);if(h=Je(t,h),"function"!==typeof s.componentWillReceiveProps||u===c&&l===h||(l=s.state,s.componentWillReceiveProps(c,h),s.state!==l&&a.enqueueReplaceState(s,s.state,null)),l=t.memoizedState,i=null!==t.updateQueue?wt(e,t,t.updateQueue,s,c,i):l,!(u!==c||l!==i||yo.current||null!==t.updateQueue&&t.updateQueue.hasForceUpdate))return"function"!==typeof s.componentDidUpdate||u===e.memoizedProps&&l===e.memoizedState||(t.effectTag|=4),!1;var f=c;if(null===u||null!==t.updateQueue&&t.updateQueue.hasForceUpdate)f=!0;else{var p=t.stateNode,d=t.type;f="function"===typeof p.shouldComponentUpdate?p.shouldComponentUpdate(f,i,h):!d.prototype||!d.prototype.isPureReactComponent||(!Sn(u,f)||!Sn(l,i))}return f?("function"===typeof s.componentWillUpdate&&s.componentWillUpdate(c,i,h),"function"===typeof s.componentDidUpdate&&(t.effectTag|=4)):("function"!==typeof s.componentDidUpdate||u===e.memoizedProps&&l===e.memoizedState||(t.effectTag|=4),n(t,c),o(t,i)),s.props=c,s.state=i,s.context=h,f}}}function Tt(e){return null===e||"undefined"===typeof e?null:(e=So&&e[So]||e["@@iterator"],"function"===typeof e?e:null)}function St(e,t){var n=t.ref;if(null!==n&&"function"!==typeof n){if(t._owner){t=t._owner;var o=void 0;t&&(2!==t.tag&&r("110"),o=t.stateNode),o||r("147",n);var i=""+n;return null!==e&&null!==e.ref&&e.ref._stringRef===i?e.ref:(e=function(e){var t=o.refs===Pn?o.refs={}:o.refs;null===e?delete t[i]:t[i]=e},e._stringRef=i,e)}"string"!==typeof n&&r("148"),t._owner||r("149",n)}return n}function Ot(e,t){"textarea"!==e.type&&r("31","[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t,"")}function Nt(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 o(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t,n){return e=at(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=ct(n,e.internalContextTag,r),t.return=e,t):(t=i(t,n,r),t.return=e,t)}function c(e,t,n,r){return null!==t&&t.type===n.type?(r=i(t,n.props,r),r.ref=St(t,n),r.return=e,r):(r=st(n,e.internalContextTag,r),r.ref=St(t,n),r.return=e,r)}function l(e,t,n,r){return null===t||7!==t.tag?(t=lt(n,e.internalContextTag,r),t.return=e,t):(t=i(t,n,r),t.return=e,t)}function h(e,t,n,r){return null===t||9!==t.tag?(t=ht(n,e.internalContextTag,r),t.type=n.value,t.return=e,t):(t=i(t,null,r),t.type=n.value,t.return=e,t)}function f(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=ft(n,e.internalContextTag,r),t.return=e,t):(t=i(t,n.children||[],r),t.return=e,t)}function p(e,t,n,r,o){return null===t||10!==t.tag?(t=ut(n,e.internalContextTag,r,o),t.return=e,t):(t=i(t,n,r),t.return=e,t)}function d(e,t,n){if("string"===typeof t||"number"===typeof t)return t=ct(""+t,e.internalContextTag,n),t.return=e,t;if("object"===typeof t&&null!==t){switch(t.$$typeof){case bo:return t.type===To?(t=ut(t.props.children,e.internalContextTag,n,t.key),t.return=e,t):(n=st(t,e.internalContextTag,n),n.ref=St(null,t),n.return=e,n);case wo:return t=lt(t,e.internalContextTag,n),t.return=e,t;case Eo:return n=ht(t,e.internalContextTag,n),n.type=t.value,n.return=e,n;case Co:return t=ft(t,e.internalContextTag,n),t.return=e,t}if(Oo(t)||Tt(t))return t=ut(t,e.internalContextTag,n,null),t.return=e,t;Ot(e,t)}return null}function y(e,t,n,r){var o=null!==t?t.key:null;if("string"===typeof n||"number"===typeof n)return null!==o?null:u(e,t,""+n,r);if("object"===typeof n&&null!==n){switch(n.$$typeof){case bo:return n.key===o?n.type===To?p(e,t,n.props.children,r,o):c(e,t,n,r):null;case wo:return n.key===o?l(e,t,n,r):null;case Eo:return null===o?h(e,t,n,r):null;case Co:return n.key===o?f(e,t,n,r):null}if(Oo(n)||Tt(n))return null!==o?null:p(e,t,n,r,null);Ot(e,n)}return null}function v(e,t,n,r,o){if("string"===typeof r||"number"===typeof r)return e=e.get(n)||null,u(t,e,""+r,o);if("object"===typeof r&&null!==r){switch(r.$$typeof){case bo:return e=e.get(null===r.key?n:r.key)||null,r.type===To?p(t,e,r.props.children,o,r.key):c(t,e,r,o);case wo:return e=e.get(null===r.key?n:r.key)||null,l(t,e,r,o);case Eo:return e=e.get(n)||null,h(t,e,r,o);case Co:return e=e.get(null===r.key?n:r.key)||null,f(t,e,r,o)}if(Oo(r)||Tt(r))return e=e.get(n)||null,p(t,e,r,o,null);Ot(t,r)}return null}function m(r,i,s,u){for(var c=null,l=null,h=i,f=i=0,p=null;null!==h&&f<s.length;f++){h.index>f?(p=h,h=null):p=h.sibling;var m=y(r,h,s[f],u);if(null===m){null===h&&(h=p);break}e&&h&&null===m.alternate&&t(r,h),i=a(m,i,f),null===l?c=m:l.sibling=m,l=m,h=p}if(f===s.length)return n(r,h),c;if(null===h){for(;f<s.length;f++)(h=d(r,s[f],u))&&(i=a(h,i,f),null===l?c=h:l.sibling=h,l=h);return c}for(h=o(r,h);f<s.length;f++)(p=v(h,r,f,s[f],u))&&(e&&null!==p.alternate&&h.delete(null===p.key?f:p.key),i=a(p,i,f),null===l?c=p:l.sibling=p,l=p);return e&&h.forEach(function(e){return t(r,e)}),c}function g(i,s,u,c){var l=Tt(u);"function"!==typeof l&&r("150"),null==(u=l.call(u))&&r("151");for(var h=l=null,f=s,p=s=0,m=null,g=u.next();null!==f&&!g.done;p++,g=u.next()){f.index>p?(m=f,f=null):m=f.sibling;var _=y(i,f,g.value,c);if(null===_){f||(f=m);break}e&&f&&null===_.alternate&&t(i,f),s=a(_,s,p),null===h?l=_:h.sibling=_,h=_,f=m}if(g.done)return n(i,f),l;if(null===f){for(;!g.done;p++,g=u.next())null!==(g=d(i,g.value,c))&&(s=a(g,s,p),null===h?l=g:h.sibling=g,h=g);return l}for(f=o(i,f);!g.done;p++,g=u.next())null!==(g=v(f,i,p,g.value,c))&&(e&&null!==g.alternate&&f.delete(null===g.key?p:g.key),s=a(g,s,p),null===h?l=g:h.sibling=g,h=g);return e&&f.forEach(function(e){return t(i,e)}),l}return function(e,o,a,u){"object"===typeof a&&null!==a&&a.type===To&&null===a.key&&(a=a.props.children);var c="object"===typeof a&&null!==a;if(c)switch(a.$$typeof){case bo:e:{var l=a.key;for(c=o;null!==c;){if(c.key===l){if(10===c.tag?a.type===To:c.type===a.type){n(e,c.sibling),o=i(c,a.type===To?a.props.children:a.props,u),o.ref=St(c,a),o.return=e,e=o;break e}n(e,c);break}t(e,c),c=c.sibling}a.type===To?(o=ut(a.props.children,e.internalContextTag,u,a.key),o.return=e,e=o):(u=st(a,e.internalContextTag,u),u.ref=St(o,a),u.return=e,e=u)}return s(e);case wo:e:{for(c=a.key;null!==o;){if(o.key===c){if(7===o.tag){n(e,o.sibling),o=i(o,a,u),o.return=e,e=o;break e}n(e,o);break}t(e,o),o=o.sibling}o=lt(a,e.internalContextTag,u),o.return=e,e=o}return s(e);case Eo:e:{if(null!==o){if(9===o.tag){n(e,o.sibling),o=i(o,null,u),o.type=a.value,o.return=e,e=o;break e}n(e,o)}o=ht(a,e.internalContextTag,u),o.type=a.value,o.return=e,e=o}return s(e);case Co:e:{for(c=a.key;null!==o;){if(o.key===c){if(4===o.tag&&o.stateNode.containerInfo===a.containerInfo&&o.stateNode.implementation===a.implementation){n(e,o.sibling),o=i(o,a.children||[],u),o.return=e,e=o;break e}n(e,o);break}t(e,o),o=o.sibling}o=ft(a,e.internalContextTag,u),o.return=e,e=o}return s(e)}if("string"===typeof a||"number"===typeof a)return a=""+a,null!==o&&6===o.tag?(n(e,o.sibling),o=i(o,a,u)):(n(e,o),o=ct(a,e.internalContextTag,u)),o.return=e,e=o,s(e);if(Oo(a))return m(e,o,a,u);if(Tt(a))return g(e,o,a,u);if(c&&Ot(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,o)}}function Pt(e,t,n,o,i){function a(e,t,n){var r=t.expirationTime;t.child=null===e?Po(t,null,n,r):No(t,e.child,n,r)}function s(e,t){var n=t.ref;null===n||e&&e.ref===n||(t.effectTag|=128)}function u(e,t,n,r){if(s(e,t),!n)return r&&ot(t,!1),l(e,t);n=t.stateNode,Br.current=t;var o=n.render();return t.effectTag|=1,a(e,t,o),t.memoizedState=n.state,t.memoizedProps=n.props,r&&ot(t,!0),t.child}function c(e){var t=e.stateNode;t.pendingContext?tt(e,t.pendingContext,t.pendingContext!==t.context):t.context&&tt(e,t.context,!1),v(e,t.containerInfo)}function l(e,t){if(null!==e&&t.child!==e.child&&r("153"),null!==t.child){e=t.child;var n=at(e,e.pendingProps,e.expirationTime);for(t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,n=n.sibling=at(e,e.pendingProps,e.expirationTime),n.return=t;n.sibling=null}return t.child}function h(e,t){switch(t.tag){case 3:c(t);break;case 2:rt(t);break;case 4:v(t,t.stateNode.containerInfo)}return null}var f=e.shouldSetTextContent,p=e.useSyncScheduling,d=e.shouldDeprioritizeSubtree,y=t.pushHostContext,v=t.pushHostContainer,m=n.enterHydrationState,g=n.resetHydrationState,_=n.tryToClaimNextHydratableInstance;e=Ct(o,i,function(e,t){e.memoizedProps=t},function(e,t){e.memoizedState=t});var b=e.adoptClassInstance,w=e.constructClassInstance,E=e.mountClassInstance,C=e.updateClassInstance;return{beginWork:function(e,t,n){if(0===t.expirationTime||t.expirationTime>n)return h(e,t);switch(t.tag){case 0:null!==e&&r("155");var o=t.type,i=t.pendingProps,T=$e(t);return T=Je(t,T),o=o(i,T),t.effectTag|=1,"object"===typeof o&&null!==o&&"function"===typeof o.render?(t.tag=2,i=rt(t),b(t,o),E(t,n),t=u(e,t,!0,i)):(t.tag=1,a(e,t,o),t.memoizedProps=i,t=t.child),t;case 1:e:{if(i=t.type,n=t.pendingProps,o=t.memoizedProps,yo.current)null===n&&(n=o);else if(null===n||o===n){t=l(e,t);break e}o=$e(t),o=Je(t,o),i=i(n,o),t.effectTag|=1,a(e,t,i),t.memoizedProps=n,t=t.child}return t;case 2:return i=rt(t),o=void 0,null===e?t.stateNode?r("153"):(w(t,t.pendingProps),E(t,n),o=!0):o=C(e,t,n),u(e,t,o,i);case 3:return c(t),i=t.updateQueue,null!==i?(o=t.memoizedState,i=wt(e,t,i,null,null,n),o===i?(g(),t=l(e,t)):(o=i.element,T=t.stateNode,(null===e||null===e.child)&&T.hydrate&&m(t)?(t.effectTag|=2,t.child=Po(t,null,o,n)):(g(),a(e,t,o)),t.memoizedState=i,t=t.child)):(g(),t=l(e,t)),t;case 5:y(t),null===e&&_(t),i=t.type;var S=t.memoizedProps;return o=t.pendingProps,null===o&&null===(o=S)&&r("154"),T=null!==e?e.memoizedProps:null,yo.current||null!==o&&S!==o?(S=o.children,f(i,o)?S=null:T&&f(i,T)&&(t.effectTag|=16),s(e,t),2147483647!==n&&!p&&d(i,o)?(t.expirationTime=2147483647,t=null):(a(e,t,S),t.memoizedProps=o,t=t.child)):t=l(e,t),t;case 6:return null===e&&_(t),e=t.pendingProps,null===e&&(e=t.memoizedProps),t.memoizedProps=e,null;case 8:t.tag=7;case 7:return i=t.pendingProps,yo.current?null===i&&null===(i=e&&e.memoizedProps)&&r("154"):null!==i&&t.memoizedProps!==i||(i=t.memoizedProps),o=i.children,t.stateNode=null===e?Po(t,t.stateNode,o,n):No(t,t.stateNode,o,n),t.memoizedProps=i,t.stateNode;case 9:return null;case 4:e:{if(v(t,t.stateNode.containerInfo),i=t.pendingProps,yo.current)null===i&&null==(i=e&&e.memoizedProps)&&r("154");else if(null===i||t.memoizedProps===i){t=l(e,t);break e}null===e?t.child=No(t,null,i,n):a(e,t,i),t.memoizedProps=i,t=t.child}return t;case 10:e:{if(n=t.pendingProps,yo.current)null===n&&(n=t.memoizedProps);else if(null===n||t.memoizedProps===n){t=l(e,t);break e}a(e,t,n),t.memoizedProps=n,t=t.child}return t;default:r("156")}},beginFailedWork:function(e,t,n){switch(t.tag){case 2:rt(t);break;case 3:c(t);break;default:r("157")}return t.effectTag|=64,null===e?t.child=null:t.child!==e.child&&(t.child=e.child),0===t.expirationTime||t.expirationTime>n?h(e,t):(t.firstEffect=null,t.lastEffect=null,t.child=null===e?Po(t,null,null,n):No(t,e.child,null,n),2===t.tag&&(e=t.stateNode,t.memoizedProps=e.props,t.memoizedState=e.state),t.child)}}}function It(e,t,n){function o(e){e.effectTag|=4}var i=e.createInstance,a=e.createTextInstance,s=e.appendInitialChild,u=e.finalizeInitialChildren,c=e.prepareUpdate,l=e.persistence,h=t.getRootHostContainer,f=t.popHostContext,p=t.getHostContext,d=t.popHostContainer,y=n.prepareToHydrateHostInstance,v=n.prepareToHydrateHostTextInstance,m=n.popHydrationState,g=void 0,_=void 0,b=void 0;return e.mutation?(g=function(){},_=function(e,t,n){(t.updateQueue=n)&&o(t)},b=function(e,t,n,r){n!==r&&o(t)}):r(l?"235":"236"),{completeWork:function(e,t,n){var l=t.pendingProps;switch(null===l?l=t.memoizedProps:2147483647===t.expirationTime&&2147483647!==n||(t.pendingProps=null),t.tag){case 1:return null;case 2:return et(t),null;case 3:return d(t),Xe(yo,t),Xe(po,t),l=t.stateNode,l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),null!==e&&null!==e.child||(m(t),t.effectTag&=-3),g(t),null;case 5:f(t),n=h();var w=t.type;if(null!==e&&null!=t.stateNode){var E=e.memoizedProps,C=t.stateNode,T=p();C=c(C,w,E,l,n,T),_(e,t,C,w,E,l,n),e.ref!==t.ref&&(t.effectTag|=128)}else{if(!l)return null===t.stateNode&&r("166"),null;if(e=p(),m(t))y(t,n,e)&&o(t);else{e=i(w,l,n,e,t);e:for(E=t.child;null!==E;){if(5===E.tag||6===E.tag)s(e,E.stateNode);else if(4!==E.tag&&null!==E.child){E.child.return=E,E=E.child;continue}if(E===t)break;for(;null===E.sibling;){if(null===E.return||E.return===t)break e;E=E.return}E.sibling.return=E.return,E=E.sibling}u(e,w,l,n)&&o(t),t.stateNode=e}null!==t.ref&&(t.effectTag|=128)}return null;case 6:if(e&&null!=t.stateNode)b(e,t,e.memoizedProps,l);else{if("string"!==typeof l)return null===t.stateNode&&r("166"),null;e=h(),n=p(),m(t)?v(t)&&o(t):t.stateNode=a(l,e,n,t)}return null;case 7:(l=t.memoizedProps)||r("165"),t.tag=8,w=[];e:for((E=t.stateNode)&&(E.return=t);null!==E;){if(5===E.tag||6===E.tag||4===E.tag)r("247");else if(9===E.tag)w.push(E.type);else if(null!==E.child){E.child.return=E,E=E.child;continue}for(;null===E.sibling;){if(null===E.return||E.return===t)break e;E=E.return}E.sibling.return=E.return,E=E.sibling}return E=l.handler,l=E(l.props,w),t.child=No(t,null!==e?e.child:null,l,n),t.child;case 8:return t.tag=7,null;case 9:case 10:return null;case 4:return d(t),g(t),null;case 0:r("167");default:r("156")}}}}function Rt(e,t){function n(e){var n=e.ref;if(null!==n)try{n(null)}catch(n){t(e,n)}}function o(e){switch("function"===typeof vt&&vt(e),e.tag){case 2:n(e);var r=e.stateNode;if("function"===typeof r.componentWillUnmount)try{r.props=e.memoizedProps,r.state=e.memoizedState,r.componentWillUnmount()}catch(n){t(e,n)}break;case 5:n(e);break;case 7:i(e.stateNode);break;case 4:c&&s(e)}}function i(e){for(var t=e;;)if(o(t),null===t.child||c&&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 a(e){return 5===e.tag||3===e.tag||4===e.tag}function s(e){for(var t=e,n=!1,a=void 0,s=void 0;;){if(!n){n=t.return;e:for(;;){switch(null===n&&r("160"),n.tag){case 5:a=n.stateNode,s=!1;break e;case 3:case 4:a=n.stateNode.containerInfo,s=!0;break e}n=n.return}n=!0}if(5===t.tag||6===t.tag)i(t),s?_(a,t.stateNode):g(a,t.stateNode);else if(4===t.tag?a=t.stateNode.containerInfo:o(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 u=e.getPublicInstance,c=e.mutation;e=e.persistence,c||r(e?"235":"236");var l=c.commitMount,h=c.commitUpdate,f=c.resetTextContent,p=c.commitTextUpdate,d=c.appendChild,y=c.appendChildToContainer,v=c.insertBefore,m=c.insertInContainerBefore,g=c.removeChild,_=c.removeChildFromContainer;return{commitResetTextContent:function(e){f(e.stateNode)},commitPlacement:function(e){e:{for(var t=e.return;null!==t;){if(a(t)){var n=t;break e}t=t.return}r("160"),n=void 0}var o=t=void 0;switch(n.tag){case 5:t=n.stateNode,o=!1;break;case 3:case 4:t=n.stateNode.containerInfo,o=!0;break;default:r("161")}16&n.effectTag&&(f(t),n.effectTag&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||a(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 i=e;;){if(5===i.tag||6===i.tag)n?o?m(t,i.stateNode,n):v(t,i.stateNode,n):o?y(t,i.stateNode):d(t,i.stateNode);else if(4!==i.tag&&null!==i.child){i.child.return=i,i=i.child;continue}if(i===e)break;for(;null===i.sibling;){if(null===i.return||i.return===e)return;i=i.return}i.sibling.return=i.return,i=i.sibling}},commitDeletion:function(e){s(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 o=t.memoizedProps;e=null!==e?e.memoizedProps:o;var i=t.type,a=t.updateQueue;t.updateQueue=null,null!==a&&h(n,a,i,e,o,t)}break;case 6:null===t.stateNode&&r("162"),n=t.memoizedProps,p(t.stateNode,null!==e?e.memoizedProps:n,n);break;case 3:break;default:r("163")}},commitLifeCycles:function(e,t){switch(t.tag){case 2:var n=t.stateNode;if(4&t.effectTag)if(null===e)n.props=t.memoizedProps,n.state=t.memoizedState,n.componentDidMount();else{var o=e.memoizedProps;e=e.memoizedState,n.props=t.memoizedProps,n.state=t.memoizedState,n.componentDidUpdate(o,e)}t=t.updateQueue,null!==t&&Et(t,n);break;case 3:n=t.updateQueue,null!==n&&Et(n,null!==t.child?t.child.stateNode:null);break;case 5:n=t.stateNode,null===e&&4&t.effectTag&&l(n,t.type,t.memoizedProps,t);break;case 6:case 4:break;default:r("163")}},commitAttachRef:function(e){var t=e.ref;if(null!==t){var n=e.stateNode;switch(e.tag){case 5:t(u(n));break;default:t(n)}}},commitDetachRef:function(e){null!==(e=e.ref)&&e(null)}}}function At(e){function t(e){return e===Io&&r("174"),e}var n=e.getChildHostContext,o=e.getRootHostContext,i={current:Io},a={current:Io},s={current:Io};return{getHostContext:function(){return t(i.current)},getRootHostContainer:function(){return t(s.current)},popHostContainer:function(e){Xe(i,e),Xe(a,e),Xe(s,e)},popHostContext:function(e){a.current===e&&(Xe(i,e),Xe(a,e))},pushHostContainer:function(e,t){Ye(s,t,e),t=o(t),Ye(a,e,e),Ye(i,t,e)},pushHostContext:function(e){var r=t(s.current),o=t(i.current);r=n(o,e.type,r),o!==r&&(Ye(a,e,e),Ye(i,r,e))},resetHostContainer:function(){i.current=Io,s.current=Io}}}function kt(e){function t(e,t){var n=new it(5,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 o(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag;)e=e.return;f=e}var i=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},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 o(e),d=!0,!1;var n=e.type;if(5!==e.tag||"head"!==n&&"body"!==n&&!i(n,e.memoizedProps))for(n=p;n;)t(e,n),n=u(n);return o(e),p=f?u(e.stateNode):null,!0}}}function xt(e){function t(e){ie=X=!0;var t=e.stateNode;if(t.current===e&&r("177"),t.isReadyForCommit=!1,Br.current=null,1<e.effectTag)if(null!==e.lastEffect){e.lastEffect.nextEffect=e;var n=e.firstEffect}else n=e;else n=e.firstEffect;for(H(),Z=n;null!==Z;){var o=!1,i=void 0;try{for(;null!==Z;){var a=Z.effectTag;if(16&a&&x(Z),128&a){var s=Z.alternate;null!==s&&U(s)}switch(-242&a){case 2:D(Z),Z.effectTag&=-3;break;case 6:D(Z),Z.effectTag&=-3,L(Z.alternate,Z);break;case 4:L(Z.alternate,Z);break;case 8:ae=!0,M(Z),ae=!1}Z=Z.nextEffect}}catch(e){o=!0,i=e}o&&(null===Z&&r("178"),u(Z,i),null!==Z&&(Z=Z.nextEffect))}for(K(),t.current=e,Z=n;null!==Z;){n=!1,o=void 0;try{for(;null!==Z;){var c=Z.effectTag;if(36&c&&j(Z.alternate,Z),128&c&&F(Z),64&c)switch(i=Z,a=void 0,null!==ee&&(a=ee.get(i),ee.delete(i),null==a&&null!==i.alternate&&(i=i.alternate,a=ee.get(i),ee.delete(i))),null==a&&r("184"),i.tag){case 2:i.stateNode.componentDidCatch(a.error,{componentStack:a.componentStack});break;case 3:null===re&&(re=a.error);break;default:r("157")}var l=Z.nextEffect;Z.nextEffect=null,Z=l}}catch(e){n=!0,o=e}n&&(null===Z&&r("178"),u(Z,o),null!==Z&&(Z=Z.nextEffect))}return X=ie=!1,"function"===typeof yt&&yt(e.stateNode),ne&&(ne.forEach(y),ne=null),null!==re&&(e=re,re=null,C(e)),t=t.current.expirationTime,0===t&&(te=ee=null),t}function n(e){for(;;){var t=k(e.alternate,e,J),n=e.return,r=e.sibling,o=e;if(2147483647===J||2147483647!==o.expirationTime){if(2!==o.tag&&3!==o.tag)var i=0;else i=o.updateQueue,i=null===i?0:i.expirationTime;for(var a=o.child;null!==a;)0!==a.expirationTime&&(0===i||i>a.expirationTime)&&(i=a.expirationTime),a=a.sibling;o.expirationTime=i}if(null!==t)return t;if(null!==n&&(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){e.stateNode.isReadyForCommit=!0;break}e=n}return null}function o(e){var t=R(e.alternate,e,J);return null===t&&(t=n(e)),Br.current=null,t}function i(e){var t=A(e.alternate,e,J);return null===t&&(t=n(e)),Br.current=null,t}function a(e){if(null!==ee){if(!(0===J||J>e))if(J<=z)for(;null!==Y;)Y=c(Y)?i(Y):o(Y);else for(;null!==Y&&!E();)Y=c(Y)?i(Y):o(Y)}else if(!(0===J||J>e))if(J<=z)for(;null!==Y;)Y=o(Y);else for(;null!==Y&&!E();)Y=o(Y)}function s(e,t){if(X&&r("243"),X=!0,e.isReadyForCommit=!1,e!==$||t!==J||null===Y){for(;-1<fo;)ho[fo]=null,fo--;vo=Pn,po.current=Pn,yo.current=!1,P(),$=e,J=t,Y=at($.current,null,t)}var n=!1,o=null;try{a(t)}catch(e){n=!0,o=e}for(;n;){if(oe){re=o;break}var s=Y;if(null===s)oe=!0;else{var c=u(s,o);if(null===c&&r("183"),!oe){try{for(n=c,o=t,c=n;null!==s;){switch(s.tag){case 2:et(s);break;case 5:N(s);break;case 3:O(s);break;case 4:O(s)}if(s===c||s.alternate===c)break;s=s.return}Y=i(n),a(o)}catch(e){n=!0,o=e;continue}break}}}return t=re,oe=X=!1,re=null,null!==t&&C(t),e.isReadyForCommit?e.current.alternate:null}function u(e,t){var n=Br.current=null,r=!1,o=!1,i=null;if(3===e.tag)n=e,l(e)&&(oe=!0);else for(var a=e.return;null!==a&&null===n;){if(2===a.tag?"function"===typeof a.stateNode.componentDidCatch&&(r=!0,i=we(a),n=a,o=!0):3===a.tag&&(n=a),l(a)){if(ae||null!==ne&&(ne.has(a)||null!==a.alternate&&ne.has(a.alternate)))return null;n=null,o=!1}a=a.return}if(null!==n){null===te&&(te=new Set),te.add(n);var s="";a=e;do{e:switch(a.tag){case 0:case 1:case 2:case 5:var u=a._debugOwner,c=a._debugSource,h=we(a),f=null;u&&(f=we(u)),u=c,h="\n in "+(h||"Unknown")+(u?" (at "+u.fileName.replace(/^.*[\\\/]/,"")+":"+u.lineNumber+")":f?" (created by "+f+")":"");break e;default:h=""}s+=h,a=a.return}while(a);a=s,e=we(e),null===ee&&(ee=new Map),t={componentName:e,componentStack:a,error:t,errorBoundary:r?n.stateNode:null,errorBoundaryFound:r,errorBoundaryName:i,willRetry:o},ee.set(n,t);try{var p=t.error;p&&p.suppressReactErrorLogging||console.error(p)}catch(e){e&&e.suppressReactErrorLogging||console.error(e)}return ie?(null===ne&&(ne=new Set),ne.add(n)):y(n),n}return null===re&&(re=t),null}function c(e){return null!==ee&&(ee.has(e)||null!==e.alternate&&ee.has(e.alternate))}function l(e){return null!==te&&(te.has(e)||null!==e.alternate&&te.has(e.alternate))}function h(){return 20*(1+((v()+100)/20|0))}function f(e){return 0!==Q?Q:X?ie?1:J:!q||1&e.internalContextTag?h():1}function p(e,t){return d(e,t,!1)}function d(e,t){for(;null!==e;){if((0===e.expirationTime||e.expirationTime>t)&&(e.expirationTime=t),null!==e.alternate&&(0===e.alternate.expirationTime||e.alternate.expirationTime>t)&&(e.alternate.expirationTime=t),null===e.return){if(3!==e.tag)break;var n=e.stateNode;!X&&n===$&&t<J&&(Y=$=null,J=0);var o=n,i=t;if(Ee>be&&r("185"),null===o.nextScheduledRoot)o.remainingExpirationTime=i,null===ue?(se=ue=o,o.nextScheduledRoot=o):(ue=ue.nextScheduledRoot=o,ue.nextScheduledRoot=se);else{var a=o.remainingExpirationTime;(0===a||i<a)&&(o.remainingExpirationTime=i)}he||(ge?_e&&(fe=o,pe=1,w(fe,pe)):1===i?b(1,null):m(i)),!X&&n===$&&t<J&&(Y=$=null,J=0)}e=e.return}}function y(e){d(e,1,!0)}function v(){return z=2+((W()-G)/10|0)}function m(e){if(0!==ce){if(e>ce)return;V(le)}var t=W()-G;ce=e,le=B(_,{timeout:10*(e-2)-t})}function g(){var e=0,t=null;if(null!==ue)for(var n=ue,o=se;null!==o;){var i=o.remainingExpirationTime;if(0===i){if((null===n||null===ue)&&r("244"),o===o.nextScheduledRoot){se=ue=o.nextScheduledRoot=null;break}if(o===se)se=i=o.nextScheduledRoot,ue.nextScheduledRoot=i,o.nextScheduledRoot=null;else{if(o===ue){ue=n,ue.nextScheduledRoot=se,o.nextScheduledRoot=null;break}n.nextScheduledRoot=o.nextScheduledRoot,o.nextScheduledRoot=null}o=n.nextScheduledRoot}else{if((0===e||i<e)&&(e=i,t=o),o===ue)break;n=o,o=o.nextScheduledRoot}}n=fe,null!==n&&n===t?Ee++:Ee=0,fe=t,pe=e}function _(e){b(0,e)}function b(e,t){for(me=t,g();null!==fe&&0!==pe&&(0===e||pe<=e)&&!de;)w(fe,pe),g();if(null!==me&&(ce=0,le=-1),0!==pe&&m(pe),me=null,de=!1,Ee=0,ye)throw e=ve,ve=null,ye=!1,e}function w(e,n){if(he&&r("245"),he=!0,n<=v()){var o=e.finishedWork;null!==o?(e.finishedWork=null,e.remainingExpirationTime=t(o)):(e.finishedWork=null,null!==(o=s(e,n))&&(e.remainingExpirationTime=t(o)))}else o=e.finishedWork,null!==o?(e.finishedWork=null,e.remainingExpirationTime=t(o)):(e.finishedWork=null,null!==(o=s(e,n))&&(E()?e.finishedWork=o:e.remainingExpirationTime=t(o)));he=!1}function E(){return!(null===me||me.timeRemaining()>Ce)&&(de=!0)}function C(e){null===fe&&r("246"),fe.remainingExpirationTime=0,ye||(ye=!0,ve=e)}var T=At(e),S=kt(e),O=T.popHostContainer,N=T.popHostContext,P=T.resetHostContainer,I=Pt(e,T,S,p,f),R=I.beginWork,A=I.beginFailedWork,k=It(e,T,S).completeWork;T=Rt(e,u);var x=T.commitResetTextContent,D=T.commitPlacement,M=T.commitDeletion,L=T.commitWork,j=T.commitLifeCycles,F=T.commitAttachRef,U=T.commitDetachRef,W=e.now,B=e.scheduleDeferredCallback,V=e.cancelDeferredCallback,q=e.useSyncScheduling,H=e.prepareForCommit,K=e.resetAfterCommit,G=W(),z=2,Q=0,X=!1,Y=null,$=null,J=0,Z=null,ee=null,te=null,ne=null,re=null,oe=!1,ie=!1,ae=!1,se=null,ue=null,ce=0,le=-1,he=!1,fe=null,pe=0,de=!1,ye=!1,ve=null,me=null,ge=!1,_e=!1,be=1e3,Ee=0,Ce=1;return{computeAsyncExpiration:h,computeExpirationForFiber:f,scheduleWork:p,batchedUpdates:function(e,t){var n=ge;ge=!0;try{return e(t)}finally{(ge=n)||he||b(1,null)}},unbatchedUpdates:function(e){if(ge&&!_e){_e=!0;try{return e()}finally{_e=!1}}return e()},flushSync:function(e){var t=ge;ge=!0;try{e:{var n=Q;Q=1;try{var o=e();break e}finally{Q=n}o=void 0}return o}finally{ge=t,he&&r("187"),b(1,null)}},deferredUpdates:function(e){var t=Q;Q=h();try{return e()}finally{Q=t}}}}function Dt(e){function t(e){return e=Oe(e),null===e?null:e.stateNode}var n=e.getPublicInstance;e=xt(e);var o=e.computeAsyncExpiration,i=e.computeExpirationForFiber,a=e.scheduleWork;return{createContainer:function(e,t){var n=new it(3,null,0);return e={current:n,containerInfo:e,pendingChildren:null,remainingExpirationTime:0,isReadyForCommit:!1,finishedWork:null,context:null,pendingContext:null,hydrate:t,nextScheduledRoot:null},n.stateNode=e},updateContainer:function(e,t,n,s){var u=t.current;if(n){n=n._reactInternalFiber;var c;e:{for(2===Ee(n)&&2===n.tag||r("170"),c=n;3!==c.tag;){if(Ze(c)){c=c.stateNode.__reactInternalMemoizedMergedChildContext;break e}(c=c.return)||r("171")}c=c.stateNode.context}n=Ze(n)?nt(n,c):c}else n=Pn;null===t.context?t.context=n:t.pendingContext=n,t=s,t=void 0===t?null:t,s=null!=e&&null!=e.type&&null!=e.type.prototype&&!0===e.type.prototype.unstable_isAsyncReactComponent?o():i(u),_t(u,{expirationTime:s,partialState:{element:e},callback:t,isReplace:!1,isForced:!1,nextCallback:null,next:null}),a(u,s)},batchedUpdates:e.batchedUpdates,unbatchedUpdates:e.unbatchedUpdates,deferredUpdates:e.deferredUpdates,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:t,findHostInstanceWithNoPortals:function(e){return e=Ne(e),null===e?null:e.stateNode},injectIntoDevTools:function(e){var n=e.findFiberByHostInstance;return dt(wn({},e,{findHostInstanceByFiber:function(e){return t(e)},findFiberByHostInstance:function(e){return n?n(e):null}}))}}}function Mt(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:Co,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function Lt(e){return!!Xo.hasOwnProperty(e)||!Qo.hasOwnProperty(e)&&(zo.test(e)?Xo[e]=!0:(Qo[e]=!0,!1))}function jt(e,t,n){var r=a(t);if(r&&i(t,n)){var o=r.mutationMethod;o?o(e,n):null==n||r.hasBooleanValue&&!n||r.hasNumericValue&&isNaN(n)||r.hasPositiveNumericValue&&1>n||r.hasOverloadedBooleanValue&&!1===n?Ut(e,t):r.mustUseProperty?e[r.propertyName]=n:(t=r.attributeName,(o=r.attributeNamespace)?e.setAttributeNS(o,t,""+n):r.hasBooleanValue||r.hasOverloadedBooleanValue&&!0===n?e.setAttribute(t,""):e.setAttribute(t,""+n))}else Ft(e,t,i(t,n)?n:null)}function Ft(e,t,n){Lt(t)&&(null==n?e.removeAttribute(t):e.setAttribute(t,""+n))}function Ut(e,t){var n=a(t);n?(t=n.mutationMethod)?t(e,void 0):n.mustUseProperty?e[n.propertyName]=!n.hasBooleanValue&&"":e.removeAttribute(n.attributeName):e.removeAttribute(t)}function Wt(e,t){var n=t.value,r=t.checked;return wn({type:void 0,step:void 0,min:void 0,max:void 0},t,{defaultChecked:void 0,defaultValue:void 0,value:null!=n?n:e._wrapperState.initialValue,checked:null!=r?r:e._wrapperState.initialChecked})}function Bt(e,t){var n=t.defaultValue;e._wrapperState={initialChecked:null!=t.checked?t.checked:t.defaultChecked,initialValue:null!=t.value?t.value:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function Vt(e,t){null!=(t=t.checked)&&jt(e,"checked",t)}function qt(e,t){Vt(e,t);var n=t.value;null!=n?0===n&&""===e.value?e.value="0":"number"===t.type?(t=parseFloat(e.value)||0,(n!=t||n==t&&e.value!=n)&&(e.value=""+n)):e.value!==""+n&&(e.value=""+n):(null==t.value&&null!=t.defaultValue&&e.defaultValue!==""+t.defaultValue&&(e.defaultValue=""+t.defaultValue),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked))}function Ht(e,t){switch(t.type){case"submit":case"reset":break;case"color":case"date":case"datetime":case"datetime-local":case"month":case"time":case"week":e.value="",e.value=e.defaultValue;break;default:e.value=e.value}t=e.name,""!==t&&(e.name=""),e.defaultChecked=!e.defaultChecked,e.defaultChecked=!e.defaultChecked,""!==t&&(e.name=t)}function Kt(e){var t="";return _n.Children.forEach(e,function(e){null==e||"string"!==typeof e&&"number"!==typeof e||(t+=e)}),t}function Gt(e,t){return e=wn({children:void 0},t),(t=Kt(t.children))&&(e.children=t),e}function zt(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+n,t=null,o=0;o<e.length;o++){if(e[o].value===n)return e[o].selected=!0,void(r&&(e[o].defaultSelected=!0));null!==t||e[o].disabled||(t=e[o])}null!==t&&(t.selected=!0)}}function Qt(e,t){var n=t.value;e._wrapperState={initialValue:null!=n?n:t.defaultValue,wasMultiple:!!t.multiple}}function Xt(e,t){return null!=t.dangerouslySetInnerHTML&&r("91"),wn({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Yt(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 $t(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 Zt(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 en(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?Zt(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}function tn(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 nn(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=n,i=t[n];o=null==i||"boolean"===typeof i||""===i?"":r||"number"!==typeof i||0===i||Zo.hasOwnProperty(o)&&Zo[o]?(""+i).trim():i+"px","float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}function rn(e,t,n){t&&(ti[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 on(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 an(e,t){e=9===e.nodeType||11===e.nodeType?e:e.ownerDocument;var n=Me(e);t=Yn[t];for(var r=0;r<t.length;r++){var o=t[r];n.hasOwnProperty(o)&&n[o]||("topScroll"===o?Ae("topScroll","scroll",e):"topFocus"===o||"topBlur"===o?(Ae("topFocus","focus",e),Ae("topBlur","blur",e),n.topBlur=!0,n.topFocus=!0):"topCancel"===o?(ne("cancel",!0)&&Ae("topCancel","cancel",e),n.topCancel=!0):"topClose"===o?(ne("close",!0)&&Ae("topClose","close",e),n.topClose=!0):Xr.hasOwnProperty(o)&&Re(o,Xr[o],e),n[o]=!0)}}function sn(e,t,n,r){return n=9===n.nodeType?n:n.ownerDocument,r===ni&&(r=Zt(e)),r===ni?"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 un(e,t){return(9===t.nodeType?t:t.ownerDocument).createTextNode(e)}function cn(e,t,n,r){var o=on(t,n);switch(t){case"iframe":case"object":Re("topLoad","load",e);var i=n;break;case"video":case"audio":for(i in oi)oi.hasOwnProperty(i)&&Re(i,oi[i],e);i=n;break;case"source":Re("topError","error",e),i=n;break;case"img":case"image":Re("topError","error",e),Re("topLoad","load",e),i=n;break;case"form":Re("topReset","reset",e),Re("topSubmit","submit",e),i=n;break;case"details":Re("topToggle","toggle",e),i=n;break;case"input":Bt(e,n),i=Wt(e,n),Re("topInvalid","invalid",e),an(r,"onChange");break;case"option":i=Gt(e,n);break;case"select":Qt(e,n),i=wn({},n,{value:void 0}),Re("topInvalid","invalid",e),an(r,"onChange");break;case"textarea":Yt(e,n),i=Xt(e,n),Re("topInvalid","invalid",e),an(r,"onChange");break;default:i=n}rn(t,i,ri);var a,s=i;for(a in s)if(s.hasOwnProperty(a)){var u=s[a];"style"===a?nn(e,u,ri):"dangerouslySetInnerHTML"===a?null!=(u=u?u.__html:void 0)&&Jo(e,u):"children"===a?"string"===typeof u?("textarea"!==t||""!==u)&&tn(e,u):"number"===typeof u&&tn(e,""+u):"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&"autoFocus"!==a&&(Xn.hasOwnProperty(a)?null!=u&&an(r,a):o?Ft(e,a,u):null!=u&&jt(e,a,u))}switch(t){case"input":ie(e),Ht(e,n);break;case"textarea":ie(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?zt(e,!!n.multiple,t,!1):null!=n.defaultValue&&zt(e,!!n.multiple,n.defaultValue,!0);break;default:"function"===typeof i.onClick&&(e.onclick=En)}}function ln(e,t,n,r,o){var i=null;switch(t){case"input":n=Wt(e,n),r=Wt(e,r),i=[];break;case"option":n=Gt(e,n),r=Gt(e,r),i=[];break;case"select":n=wn({},n,{value:void 0}),r=wn({},r,{value:void 0}),i=[];break;case"textarea":n=Xt(e,n),r=Xt(e,r),i=[];break;default:"function"!==typeof n.onClick&&"function"===typeof r.onClick&&(e.onclick=En)}rn(t,r,ri);var a,s;e=null;for(a in n)if(!r.hasOwnProperty(a)&&n.hasOwnProperty(a)&&null!=n[a])if("style"===a)for(s in t=n[a])t.hasOwnProperty(s)&&(e||(e={}),e[s]="");else"dangerouslySetInnerHTML"!==a&&"children"!==a&&"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&"autoFocus"!==a&&(Xn.hasOwnProperty(a)?i||(i=[]):(i=i||[]).push(a,null));for(a in r){var u=r[a];if(t=null!=n?n[a]:void 0,r.hasOwnProperty(a)&&u!==t&&(null!=u||null!=t))if("style"===a)if(t){for(s in t)!t.hasOwnProperty(s)||u&&u.hasOwnProperty(s)||(e||(e={}),e[s]="");for(s in u)u.hasOwnProperty(s)&&t[s]!==u[s]&&(e||(e={}),e[s]=u[s])}else e||(i||(i=[]),i.push(a,e)),e=u;else"dangerouslySetInnerHTML"===a?(u=u?u.__html:void 0,t=t?t.__html:void 0,null!=u&&t!==u&&(i=i||[]).push(a,""+u)):"children"===a?t===u||"string"!==typeof u&&"number"!==typeof u||(i=i||[]).push(a,""+u):"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&(Xn.hasOwnProperty(a)?(null!=u&&an(o,a),i||t===u||(i=[])):(i=i||[]).push(a,u))}return e&&(i=i||[]).push("style",e),i}function hn(e,t,n,r,o){"input"===n&&"radio"===o.type&&null!=o.name&&Vt(e,o),on(n,r),r=on(n,o);for(var i=0;i<t.length;i+=2){var a=t[i],s=t[i+1];"style"===a?nn(e,s,ri):"dangerouslySetInnerHTML"===a?Jo(e,s):"children"===a?tn(e,s):r?null!=s?Ft(e,a,s):e.removeAttribute(a):null!=s?jt(e,a,s):Ut(e,a)}switch(n){case"input":qt(e,o);break;case"textarea":$t(e,o);break;case"select":e._wrapperState.initialValue=void 0,t=e._wrapperState.wasMultiple,e._wrapperState.wasMultiple=!!o.multiple,n=o.value,null!=n?zt(e,!!o.multiple,n,!1):t!==!!o.multiple&&(null!=o.defaultValue?zt(e,!!o.multiple,o.defaultValue,!0):zt(e,!!o.multiple,o.multiple?[]:"",!1))}}function fn(e,t,n,r,o){switch(t){case"iframe":case"object":Re("topLoad","load",e);break;case"video":case"audio":for(var i in oi)oi.hasOwnProperty(i)&&Re(i,oi[i],e);break;case"source":Re("topError","error",e);break;case"img":case"image":Re("topError","error",e),Re("topLoad","load",e);break;case"form":Re("topReset","reset",e),Re("topSubmit","submit",e);break;case"details":Re("topToggle","toggle",e);break;case"input":Bt(e,n),Re("topInvalid","invalid",e),an(o,"onChange");break;case"select":Qt(e,n),Re("topInvalid","invalid",e),an(o,"onChange");break;case"textarea":Yt(e,n),Re("topInvalid","invalid",e),an(o,"onChange")}rn(t,n,ri),r=null;for(var a in n)n.hasOwnProperty(a)&&(i=n[a],"children"===a?"string"===typeof i?e.textContent!==i&&(r=["children",i]):"number"===typeof i&&e.textContent!==""+i&&(r=["children",""+i]):Xn.hasOwnProperty(a)&&null!=i&&an(o,a));switch(t){case"input":ie(e),Ht(e,n);break;case"textarea":ie(e),Jt(e,n);break;case"select":case"option":break;default:"function"===typeof n.onClick&&(e.onclick=En)}return r}function pn(e,t){return e.nodeValue!==t}function dn(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function yn(e){return!(!(e=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==e.nodeType||!e.hasAttribute("data-reactroot"))}function vn(e,t,n,o,i){dn(n)||r("200");var a=n._reactRootContainer;if(a)ui.updateContainer(t,a,e,i);else{if(!(o=o||yn(n)))for(a=void 0;a=n.lastChild;)n.removeChild(a);var s=ui.createContainer(n,o);a=n._reactRootContainer=s,ui.unbatchedUpdates(function(){ui.updateContainer(t,s,e,i)})}return ui.getPublicRootInstance(a)}function mn(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;return dn(t)||r("200"),Mt(e,t,null,n)}function gn(e,t){this._reactRootContainer=ui.createContainer(e,t)}var _n=n(2),bn=n(140),wn=n(41),En=n(28),Cn=n(141),Tn=n(142),Sn=n(143),On=n(144),Nn=n(147),Pn=n(67);_n||r("227");var In={children:!0,dangerouslySetInnerHTML:!0,defaultValue:!0,defaultChecked:!0,innerHTML:!0,suppressContentEditableWarning:!0,suppressHydrationWarning:!0,style:!0},Rn={MUST_USE_PROPERTY:1,HAS_BOOLEAN_VALUE:4,HAS_NUMERIC_VALUE:8,HAS_POSITIVE_NUMERIC_VALUE:24,HAS_OVERLOADED_BOOLEAN_VALUE:32,HAS_STRING_BOOLEAN_VALUE:64,injectDOMPropertyConfig:function(e){var t=Rn,n=e.Properties||{},i=e.DOMAttributeNamespaces||{},a=e.DOMAttributeNames||{};e=e.DOMMutationMethods||{};for(var s in n){An.hasOwnProperty(s)&&r("48",s);var u=s.toLowerCase(),c=n[s];u={attributeName:u,attributeNamespace:null,propertyName:s,mutationMethod:null,mustUseProperty:o(c,t.MUST_USE_PROPERTY),hasBooleanValue:o(c,t.HAS_BOOLEAN_VALUE),hasNumericValue:o(c,t.HAS_NUMERIC_VALUE),hasPositiveNumericValue:o(c,t.HAS_POSITIVE_NUMERIC_VALUE),hasOverloadedBooleanValue:o(c,t.HAS_OVERLOADED_BOOLEAN_VALUE),hasStringBooleanValue:o(c,t.HAS_STRING_BOOLEAN_VALUE)},1>=u.hasBooleanValue+u.hasNumericValue+u.hasOverloadedBooleanValue||r("50",s),a.hasOwnProperty(s)&&(u.attributeName=a[s]),i.hasOwnProperty(s)&&(u.attributeNamespace=i[s]),e.hasOwnProperty(s)&&(u.mutationMethod=e[s]),An[s]=u}}},An={},kn=Rn,xn=kn.MUST_USE_PROPERTY,Dn=kn.HAS_BOOLEAN_VALUE,Mn=kn.HAS_NUMERIC_VALUE,Ln=kn.HAS_POSITIVE_NUMERIC_VALUE,jn=kn.HAS_OVERLOADED_BOOLEAN_VALUE,Fn=kn.HAS_STRING_BOOLEAN_VALUE,Un={Properties:{allowFullScreen:Dn,async:Dn,autoFocus:Dn,autoPlay:Dn,capture:jn,checked:xn|Dn,cols:Ln,contentEditable:Fn,controls:Dn,default:Dn,defer:Dn,disabled:Dn,download:jn,draggable:Fn,formNoValidate:Dn,hidden:Dn,loop:Dn,multiple:xn|Dn,muted:xn|Dn,noValidate:Dn,open:Dn,playsInline:Dn,readOnly:Dn,required:Dn,reversed:Dn,rows:Ln,rowSpan:Mn,scoped:Dn,seamless:Dn,selected:xn|Dn,size:Ln,start:Mn,span:Ln,spellCheck:Fn,style:0,tabIndex:0,itemScope:Dn,acceptCharset:0,className:0,htmlFor:0,httpEquiv:0,value:Fn},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},DOMMutationMethods:{value:function(e,t){if(null==t)return e.removeAttribute("value");"number"!==e.type||!1===e.hasAttribute("value")?e.setAttribute("value",""+t):e.validity&&!e.validity.badInput&&e.ownerDocument.activeElement!==e&&e.setAttribute("value",""+t)}}},Wn=kn.HAS_STRING_BOOLEAN_VALUE,Bn={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},Vn={Properties:{autoReverse:Wn,externalResourcesRequired:Wn,preserveAlpha:Wn},DOMAttributeNames:{autoReverse:"autoReverse",externalResourcesRequired:"externalResourcesRequired",preserveAlpha:"preserveAlpha"},DOMAttributeNamespaces:{xlinkActuate:Bn.xlink,xlinkArcrole:Bn.xlink,xlinkHref:Bn.xlink,xlinkRole:Bn.xlink,xlinkShow:Bn.xlink,xlinkTitle:Bn.xlink,xlinkType:Bn.xlink,xmlBase:Bn.xml,xmlLang:Bn.xml,xmlSpace:Bn.xml}},qn=/[\-\:]([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-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 x-height xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type xml:base xmlns:xlink xml:lang xml:space".split(" ").forEach(function(e){var t=e.replace(qn,s);Vn.Properties[t]=0,Vn.DOMAttributeNames[t]=e}),kn.injectDOMPropertyConfig(Un),kn.injectDOMPropertyConfig(Vn);var Hn={_caughtError:null,_hasCaughtError:!1,_rethrowError:null,_hasRethrowError:!1,injection:{injectErrorUtils:function(e){"function"!==typeof e.invokeGuardedCallback&&r("197"),u=e.invokeGuardedCallback}},invokeGuardedCallback:function(e,t,n,r,o,i,a,s,c){u.apply(Hn,arguments)},invokeGuardedCallbackAndCatchFirstError:function(e,t,n,r,o,i,a,s,u){if(Hn.invokeGuardedCallback.apply(this,arguments),Hn.hasCaughtError()){var c=Hn.clearCaughtError();Hn._hasRethrowError||(Hn._hasRethrowError=!0,Hn._rethrowError=c)}},rethrowCaughtError:function(){return c.apply(Hn,arguments)},hasCaughtError:function(){return Hn._hasCaughtError},clearCaughtError:function(){if(Hn._hasCaughtError){var e=Hn._caughtError;return Hn._caughtError=null,Hn._hasCaughtError=!1,e}r("198")}},Kn=null,Gn={},zn=[],Qn={},Xn={},Yn={},$n=Object.freeze({plugins:zn,eventNameDispatchConfigs:Qn,registrationNameModules:Xn,registrationNameDependencies:Yn,possibleRegistrationNames:null,injectEventPluginOrder:f,injectEventPluginsByName:p}),Jn=null,Zn=null,er=null,tr=null,nr={injectEventPluginOrder:f,injectEventPluginsByName:p},rr=Object.freeze({injection:nr,getListener:b,extractEvents:w,enqueueEvents:E,processEventQueue:C}),or=Math.random().toString(36).slice(2),ir="__reactInternalInstance$"+or,ar="__reactEventHandlers$"+or,sr=Object.freeze({precacheFiberNode:function(e,t){t[ir]=e},getClosestInstanceFromNode:T,getInstanceFromNode:function(e){return e=e[ir],!e||5!==e.tag&&6!==e.tag?null:e},getNodeFromInstance:S,getFiberCurrentPropsFromNode:O,updateFiberProps:function(e,t){e[ar]=t}}),ur=Object.freeze({accumulateTwoPhaseDispatches:D,accumulateTwoPhaseDispatchesSkipTarget:function(e){v(e,A)},accumulateEnterLeaveDispatches:M,accumulateDirectDispatches:function(e){v(e,x)}}),cr=null,lr={_root:null,_startText:null,_fallbackText:null},hr="dispatchConfig _targetInst nativeEvent isDefaultPrevented isPropagationStopped _dispatchListeners _dispatchInstances".split(" "),fr={type:null,target:null,currentTarget:En.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};wn(U.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=En.thatReturnsTrue)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=En.thatReturnsTrue)},persist:function(){this.isPersistent=En.thatReturnsTrue},isPersistent:En.thatReturnsFalse,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;for(t=0;t<hr.length;t++)this[hr[t]]=null}}),U.Interface=fr,U.augmentClass=function(e,t){function n(){}n.prototype=this.prototype;var r=new n;wn(r,e.prototype),e.prototype=r,e.prototype.constructor=e,e.Interface=wn({},this.Interface,t),e.augmentClass=this.augmentClass,V(e)},V(U),U.augmentClass(q,{data:null}),U.augmentClass(H,{data:null});var pr=[9,13,27,32],dr=bn.canUseDOM&&"CompositionEvent"in window,yr=null;bn.canUseDOM&&"documentMode"in document&&(yr=document.documentMode);var vr;if(vr=bn.canUseDOM&&"TextEvent"in window&&!yr){var mr=window.opera;vr=!("object"===typeof mr&&"function"===typeof mr.version&&12>=parseInt(mr.version(),10))}var gr,_r=vr,br=bn.canUseDOM&&(!dr||yr&&8<yr&&11>=yr),wr=String.fromCharCode(32),Er={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(" ")}},Cr=!1,Tr=!1,Sr={eventTypes:Er,extractEvents:function(e,t,n,r){var o;if(dr)e:{switch(e){case"topCompositionStart":var i=Er.compositionStart;break e;case"topCompositionEnd":i=Er.compositionEnd;break e;case"topCompositionUpdate":i=Er.compositionUpdate;break e}i=void 0}else Tr?K(e,n)&&(i=Er.compositionEnd):"topKeyDown"===e&&229===n.keyCode&&(i=Er.compositionStart);return i?(br&&(Tr||i!==Er.compositionStart?i===Er.compositionEnd&&Tr&&(o=j()):(lr._root=r,lr._startText=F(),Tr=!0)),i=q.getPooled(i,t,n,r),o?i.data=o:null!==(o=G(n))&&(i.data=o),D(i),o=i):o=null,(e=_r?z(e,n):Q(e,n))?(t=H.getPooled(Er.beforeInput,t,n,r),t.data=e,D(t)):t=null,[o,t]}},Or=null,Nr=null,Pr=null,Ir={injectFiberControlledHostComponent:function(e){Or=e}},Rr=Object.freeze({injection:Ir,enqueueStateRestore:Y,restoreStateIfNeeded:$}),Ar=!1,kr={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};bn.canUseDOM&&(gr=document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature("",""));var xr={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"topBlur topChange topClick topFocus topInput topKeyDown topKeyUp topSelectionChange".split(" ")}},Dr=null,Mr=null,Lr=!1;bn.canUseDOM&&(Lr=ne("input")&&(!document.documentMode||9<document.documentMode));var jr={eventTypes:xr,_isInputEventSupported:Lr,extractEvents:function(e,t,n,r){var o=t?S(t):window,i=o.nodeName&&o.nodeName.toLowerCase();if("select"===i||"input"===i&&"file"===o.type)var a=le;else if(ee(o))if(Lr)a=ve;else{a=de;var s=pe}else!(i=o.nodeName)||"input"!==i.toLowerCase()||"checkbox"!==o.type&&"radio"!==o.type||(a=ye);if(a&&(a=a(e,t)))return se(a,n,r);s&&s(e,o,t),"topBlur"===e&&null!=t&&(e=t._wrapperState||o._wrapperState)&&e.controlled&&"number"===o.type&&(e=""+o.value,o.getAttribute("value")!==e&&o.setAttribute("value",e))}};U.augmentClass(me,{view:null,detail:null});var Fr={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};me.augmentClass(be,{screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:_e,button:null,buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)}});var Ur={mouseEnter:{registrationName:"onMouseEnter",dependencies:["topMouseOut","topMouseOver"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["topMouseOut","topMouseOver"]}},Wr={eventTypes:Ur,extractEvents:function(e,t,n,r){if("topMouseOver"===e&&(n.relatedTarget||n.fromElement)||"topMouseOut"!==e&&"topMouseOver"!==e)return null;var o=r.window===r?r:(o=r.ownerDocument)?o.defaultView||o.parentWindow:window;if("topMouseOut"===e?(e=t,t=(t=n.relatedTarget||n.toElement)?T(t):null):e=null,e===t)return null;var i=null==e?o:S(e);o=null==t?o:S(t);var a=be.getPooled(Ur.mouseLeave,e,n,r);return a.type="mouseleave",a.target=i,a.relatedTarget=o,n=be.getPooled(Ur.mouseEnter,t,n,r),n.type="mouseenter",n.target=o,n.relatedTarget=i,M(a,n,e,t),[a,n]}},Br=_n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Vr=[],qr=!0,Hr=void 0,Kr=Object.freeze({get _enabled(){return qr},get _handleTopLevel(){return Hr},setHandleTopLevel:function(e){Hr=e},setEnabled:Ie,isEnabled:function(){return qr},trapBubbledEvent:Re,trapCapturedEvent:Ae,dispatchEvent:ke}),Gr={animationend:xe("Animation","AnimationEnd"),animationiteration:xe("Animation","AnimationIteration"),animationstart:xe("Animation","AnimationStart"),transitionend:xe("Transition","TransitionEnd")},zr={},Qr={};bn.canUseDOM&&(Qr=document.createElement("div").style,"AnimationEvent"in window||(delete Gr.animationend.animation,delete Gr.animationiteration.animation,delete Gr.animationstart.animation),"TransitionEvent"in window||delete Gr.transitionend.transition);var Xr={topAbort:"abort",topAnimationEnd:De("animationend")||"animationend",topAnimationIteration:De("animationiteration")||"animationiteration",topAnimationStart:De("animationstart")||"animationstart",topBlur:"blur",topCancel:"cancel",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",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",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topFocus:"focus",topInput:"input",topKeyDown:"keydown",topKeyPress:"keypress",topKeyUp:"keyup",topLoadedData:"loadeddata",topLoad:"load",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topMouseDown:"mousedown",topMouseMove:"mousemove",topMouseOut:"mouseout",topMouseOver:"mouseover",topMouseUp:"mouseup",topPaste:"paste",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topScroll:"scroll",topSeeked:"seeked",topSeeking:"seeking",topSelectionChange:"selectionchange",topStalled:"stalled",topSuspend:"suspend",topTextInput:"textInput",topTimeUpdate:"timeupdate",topToggle:"toggle",topTouchCancel:"touchcancel",topTouchEnd:"touchend",topTouchMove:"touchmove",topTouchStart:"touchstart",topTransitionEnd:De("transitionend")||"transitionend",topVolumeChange:"volumechange",topWaiting:"waiting",topWheel:"wheel"},Yr={},$r=0,Jr="_reactListenersID"+(""+Math.random()).slice(2),Zr=bn.canUseDOM&&"documentMode"in document&&11>=document.documentMode,eo={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"topBlur topContextMenu topFocus topKeyDown topKeyUp topMouseDown topMouseUp topSelectionChange".split(" ")}},to=null,no=null,ro=null,oo=!1,io={eventTypes:eo,extractEvents:function(e,t,n,r){var o,i=r.window===r?r.document:9===r.nodeType?r:r.ownerDocument;if(!(o=!i)){e:{i=Me(i),o=Yn.onSelect;for(var a=0;a<o.length;a++){var s=o[a];if(!i.hasOwnProperty(s)||!i[s]){i=!1;break e}}i=!0}o=!i}if(o)return null;switch(i=t?S(t):window,e){case"topFocus":(ee(i)||"true"===i.contentEditable)&&(to=i,no=t,ro=null);break;case"topBlur":ro=no=to=null;break;case"topMouseDown":oo=!0;break;case"topContextMenu":case"topMouseUp":return oo=!1,Ue(n,r);case"topSelectionChange":if(Zr)break;case"topKeyDown":case"topKeyUp":return Ue(n,r)}return null}};U.augmentClass(We,{animationName:null,elapsedTime:null,pseudoElement:null}),U.augmentClass(Be,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),me.augmentClass(Ve,{relatedTarget:null});var ao={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},so={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"};me.augmentClass(He,{key:function(e){if(e.key){var t=ao[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?(e=qe(e),13===e?"Enter":String.fromCharCode(e)):"keydown"===e.type||"keyup"===e.type?so[e.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:_e,charCode:function(e){return"keypress"===e.type?qe(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?qe(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),be.augmentClass(Ke,{dataTransfer:null}),me.augmentClass(Ge,{touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:_e}),U.augmentClass(ze,{propertyName:null,elapsedTime:null,pseudoElement:null}),be.augmentClass(Qe,{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});var uo={},co={};"abort animationEnd animationIteration animationStart blur cancel canPlay canPlayThrough click close contextMenu copy cut doubleClick drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error focus input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing progress rateChange reset scroll seeked seeking stalled submit suspend timeUpdate toggle touchCancel touchEnd touchMove touchStart transitionEnd volumeChange waiting wheel".split(" ").forEach(function(e){var t=e[0].toUpperCase()+e.slice(1),n="on"+t;t="top"+t,n={phasedRegistrationNames:{bubbled:n,captured:n+"Capture"},dependencies:[t]},uo[e]=n,co[t]=n});var lo={eventTypes:uo,extractEvents:function(e,t,n,r){var o=co[e];if(!o)return null;switch(e){case"topKeyPress":if(0===qe(n))return null;case"topKeyDown":case"topKeyUp":e=He;break;case"topBlur":case"topFocus":e=Ve;break;case"topClick":if(2===n.button)return null;case"topDoubleClick":case"topMouseDown":case"topMouseMove":case"topMouseUp":case"topMouseOut":case"topMouseOver":case"topContextMenu":e=be;break;case"topDrag":case"topDragEnd":case"topDragEnter":case"topDragExit":case"topDragLeave":case"topDragOver":case"topDragStart":case"topDrop":e=Ke;break;case"topTouchCancel":case"topTouchEnd":case"topTouchMove":case"topTouchStart":e=Ge;break;case"topAnimationEnd":case"topAnimationIteration":case"topAnimationStart":e=We;break;case"topTransitionEnd":e=ze;break;case"topScroll":e=me;break;case"topWheel":e=Qe;break;case"topCopy":case"topCut":case"topPaste":e=Be;break;default:e=U}return t=e.getPooled(o,t,n,r),D(t),t}};Hr=function(e,t,n,r){e=w(e,t,n,r),E(e),C(!1)},nr.injectEventPluginOrder("ResponderEventPlugin SimpleEventPlugin TapEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" ")),Jn=sr.getFiberCurrentPropsFromNode,Zn=sr.getInstanceFromNode,er=sr.getNodeFromInstance,nr.injectEventPluginsByName({SimpleEventPlugin:lo,EnterLeaveEventPlugin:Wr,ChangeEventPlugin:jr,SelectEventPlugin:io,BeforeInputEventPlugin:Sr});var ho=[],fo=-1;new Set;var po={current:Pn},yo={current:!1},vo=Pn,mo=null,go=null,_o="function"===typeof Symbol&&Symbol.for,bo=_o?Symbol.for("react.element"):60103,wo=_o?Symbol.for("react.call"):60104,Eo=_o?Symbol.for("react.return"):60105,Co=_o?Symbol.for("react.portal"):60106,To=_o?Symbol.for("react.fragment"):60107,So="function"===typeof Symbol&&Symbol.iterator,Oo=Array.isArray,No=Nt(!0),Po=Nt(!1),Io={},Ro=Object.freeze({default:Dt}),Ao=Ro&&Dt||Ro,ko=Ao.default?Ao.default:Ao,xo="object"===typeof performance&&"function"===typeof performance.now,Do=void 0;Do=xo?function(){return performance.now()}:function(){return Date.now()};var Mo=void 0,Lo=void 0;if(bn.canUseDOM)if("function"!==typeof requestIdleCallback||"function"!==typeof cancelIdleCallback){var jo,Fo=null,Uo=!1,Wo=-1,Bo=!1,Vo=0,qo=33,Ho=33;jo=xo?{didTimeout:!1,timeRemaining:function(){var e=Vo-performance.now();return 0<e?e:0}}:{didTimeout:!1,timeRemaining:function(){var e=Vo-Date.now();return 0<e?e:0}};var Ko="__reactIdleCallback$"+Math.random().toString(36).slice(2);window.addEventListener("message",function(e){if(e.source===window&&e.data===Ko){if(Uo=!1,e=Do(),0>=Vo-e){if(!(-1!==Wo&&Wo<=e))return void(Bo||(Bo=!0,requestAnimationFrame(Go)));jo.didTimeout=!0}else jo.didTimeout=!1;Wo=-1,e=Fo,Fo=null,null!==e&&e(jo)}},!1);var Go=function(e){Bo=!1;var t=e-Vo+Ho;t<Ho&&qo<Ho?(8>t&&(t=8),Ho=t<qo?qo:t):qo=t,Vo=e+Ho,Uo||(Uo=!0,window.postMessage(Ko,"*"))};Mo=function(e,t){return Fo=e,null!=t&&"number"===typeof t.timeout&&(Wo=Do()+t.timeout),Bo||(Bo=!0,requestAnimationFrame(Go)),0},Lo=function(){Fo=null,Uo=!1,Wo=-1}}else Mo=window.requestIdleCallback,Lo=window.cancelIdleCallback;else Mo=function(e){return setTimeout(function(){e({timeRemaining:function(){return 1/0}})})},Lo=function(e){clearTimeout(e)};var zo=/^[: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]*$/,Qo={},Xo={},Yo={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"},$o=void 0,Jo=function(e){return"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n)})}:e}(function(e,t){if(e.namespaceURI!==Yo.svg||"innerHTML"in e)e.innerHTML=t;else{for($o=$o||document.createElement("div"),$o.innerHTML="<svg>"+t+"</svg>",t=$o.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}}),Zo={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},ei=["Webkit","ms","Moz","O"];Object.keys(Zo).forEach(function(e){ei.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Zo[t]=Zo[e]})});var ti=wn({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}),ni=Yo.html,ri=En.thatReturns(""),oi={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"},ii=Object.freeze({createElement:sn,createTextNode:un,setInitialProperties:cn,diffProperties:ln,updateProperties:hn,diffHydratedProperties:fn,diffHydratedText:pn,warnForUnmatchedText:function(){},warnForDeletedHydratableElement:function(){},warnForDeletedHydratableText:function(){},warnForInsertedHydratedElement:function(){},warnForInsertedHydratedText:function(){},restoreControlledState:function(e,t,n){switch(t){case"input":if(qt(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 o=n[t];if(o!==e&&o.form===e.form){var i=O(o);i||r("90"),ae(o),qt(o,i)}}}break;case"textarea":$t(e,n);break;case"select":null!=(t=n.value)&&zt(e,!!n.multiple,t,!1)}}});Ir.injectFiberControlledHostComponent(ii);var ai=null,si=null,ui=ko({getRootHostContext:function(e){var t=e.nodeType;switch(t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:en(null,"");break;default:t=8===t?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=en(e,t)}return e},getChildHostContext:function(e,t){return en(e,t)},getPublicInstance:function(e){return e},prepareForCommit:function(){ai=qr;var e=Tn();if(Fe(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,o=n.focusNode;n=n.focusOffset;try{t.nodeType,o.nodeType}catch(e){t=null;break e}var i=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=i+r),l!==o||0!==n&&3!==l.nodeType||(s=i+n),3===l.nodeType&&(i+=l.nodeValue.length),null!==(f=l.firstChild);)h=l,l=f;for(;;){if(l===e)break t;if(h===t&&++u===r&&(a=i),h===o&&++c===n&&(s=i),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;si={focusedElem:e,selectionRange:t},Ie(!1)},resetAfterCommit:function(){var e=si,t=Tn(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&On(document.documentElement,n)){if(Fe(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 o=n[L()].length;e=Math.min(r.start,o),r=void 0===r.end?e:Math.min(r.end,o),!t.extend&&e>r&&(o=r,r=e,e=o),o=je(n,e);var i=je(n,r);if(o&&i&&(1!==t.rangeCount||t.anchorNode!==o.node||t.anchorOffset!==o.offset||t.focusNode!==i.node||t.focusOffset!==i.offset)){var a=document.createRange();a.setStart(o.node,o.offset),t.removeAllRanges(),e>r?(t.addRange(a),t.extend(i.node,i.offset)):(a.setEnd(i.node,i.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(Nn(n),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}si=null,Ie(ai),ai=null},createInstance:function(e,t,n,r,o){return e=sn(e,t,n,r),e[ir]=o,e[ar]=t,e},appendInitialChild:function(e,t){e.appendChild(t)},finalizeInitialChildren:function(e,t,n,r){cn(e,t,n,r);e:{switch(t){case"button":case"input":case"select":case"textarea":e=!!n.autoFocus;break e}e=!1}return e},prepareUpdate:function(e,t,n,r,o){return ln(e,t,n,r,o)},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=un(e,t),e[ir]=r,e},now:Do,mutation:{commitMount:function(e){e.focus()},commitUpdate:function(e,t,n,r,o){e[ar]=o,hn(e,t,n,r,o)},resetTextContent:function(e){e.textContent=""},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,o,i){return e[ir]=i,e[ar]=n,fn(e,t,n,o,r)},hydrateTextInstance:function(e,t,n){return e[ir]=n,pn(e,t)},didNotMatchHydratedContainerTextInstance:function(){},didNotMatchHydratedTextInstance:function(){},didNotHydrateContainerInstance:function(){},didNotHydrateInstance:function(){},didNotFindHydratableContainerInstance:function(){},didNotFindHydratableContainerTextInstance:function(){},didNotFindHydratableInstance:function(){},didNotFindHydratableTextInstance:function(){}},scheduleDeferredCallback:Mo,cancelDeferredCallback:Lo,useSyncScheduling:!0});J=ui.batchedUpdates,gn.prototype.render=function(e,t){ui.updateContainer(e,this._reactRootContainer,null,t)},gn.prototype.unmount=function(e){ui.updateContainer(null,this._reactRootContainer,null,e)};var ci={createPortal:mn,findDOMNode:function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternalFiber;if(t)return ui.findHostInstance(t);"function"===typeof e.render?r("188"):r("213",Object.keys(e))},hydrate:function(e,t,n){return vn(null,e,t,!0,n)},render:function(e,t,n){return vn(null,e,t,!1,n)},unstable_renderSubtreeIntoContainer:function(e,t,n,o){return(null==e||void 0===e._reactInternalFiber)&&r("38"),vn(e,t,n,!1,o)},unmountComponentAtNode:function(e){return dn(e)||r("40"),!!e._reactRootContainer&&(ui.unbatchedUpdates(function(){vn(null,null,e,!1,function(){e._reactRootContainer=null})}),!0)},unstable_createPortal:mn,unstable_batchedUpdates:Z,unstable_deferredUpdates:ui.deferredUpdates,flushSync:ui.flushSync,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{EventPluginHub:rr,EventPluginRegistry:$n,EventPropagators:ur,ReactControlledComponent:Rr,ReactDOMComponentTree:sr,ReactDOMEventListener:Kr}};ui.injectIntoDevTools({findFiberByHostInstance:T,bundleType:0,version:"16.2.0",rendererPackageName:"react-dom"});var li=Object.freeze({default:ci}),hi=li&&ci||li;e.exports=hi.default?hi.default:hi},function(e,t,n){"use strict";var r=!("undefined"===typeof window||!window.document||!window.document.createElement),o={canUseDOM:r,canUseWorkers:"undefined"!==typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen,isInWorker:!r};e.exports=o},function(e,t,n){"use strict";var r=n(28),o={listen:function(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!1),{remove:function(){e.removeEventListener(t,n,!1)}}):e.attachEvent?(e.attachEvent("on"+t,n),{remove:function(){e.detachEvent("on"+t,n)}}):void 0},capture:function(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!0),{remove:function(){e.removeEventListener(t,n,!0)}}):{remove:r}},registerDefault:function(){}};e.exports=o},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 o(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),o=Object.keys(t);if(n.length!==o.length)return!1;for(var a=0;a<n.length;a++)if(!i.call(t,n[a])||!r(e[n[a]],t[n[a]]))return!1;return!0}var i=Object.prototype.hasOwnProperty;e.exports=o},function(e,t,n){"use strict";function r(e,t){return!(!e||!t)&&(e===t||!o(e)&&(o(t)?r(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}var o=n(145);e.exports=r},function(e,t,n){"use strict";function r(e){return o(e)&&3==e.nodeType}var o=n(146);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,n){"use strict";function r(e){try{e.focus()}catch(e){}}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 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 i(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(2),s=n.n(a),u=n(29),c=n(77),l=n(279),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),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return i(t,e),h(t,[{key:"render",value:function(){return s.a.createElement("div",null,s.a.createElement(u.a,{store:c.a},s.a.createElement(l.a,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 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 i(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(2),s=(n.n(a),n(5)),u=n.n(s),c=n(68);n(42);t.a=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"store",n=arguments[1],s=n||t+"Subscription",l=function(e){function n(i,a){r(this,n);var s=o(this,e.call(this,i,a));return s[t]=i.store,s}return i(n,e),n.prototype.getChildContext=function(){var e;return e={},e[t]=this[t],e[s]=null,e},n.prototype.render=function(){return a.Children.only(this.props.children)},n}(a.Component);return l.propTypes={store:c.a.isRequired,children:u.a.element.isRequired},l.childContextTypes=(e={},e[t]=c.a.isRequired,e[s]=c.b,e),l}()},function(e,t,n){"use strict";var r=n(28),o=n(152),i=n(153);e.exports=function(){function e(e,t,n,r,a,s){s!==i&&o(!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;var 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";function r(e,t,n,r,i,a,s,u){if(o(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,i,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 o=function(e){};e.exports=r},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,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(){var e=[],t=[];return{clear:function(){t=i,e=i},notify:function(){for(var n=e=t,r=0;r<n.length;r++)n[r]()},get:function(){return t},subscribe:function(n){var r=!0;return t===e&&(t=e.slice()),t.push(n),function(){r&&e!==i&&(r=!1,t===e&&(t=e.slice()),t.splice(t.indexOf(n),1))}}}}n.d(t,"a",function(){return s});var i=null,a={notify:function(){}},s=function(){function e(t,n,o){r(this,e),this.store=t,this.parentSub=n,this.onStateChange=o,this.unsubscribe=null,this.listeners=a}return e.prototype.addNestedSub=function(e){return this.trySubscribe(),this.listeners.subscribe(e)},e.prototype.notifyNestedSubs=function(){this.listeners.notify()},e.prototype.isSubscribed=function(){return Boolean(this.unsubscribe)},e.prototype.trySubscribe=function(){this.unsubscribe||(this.unsubscribe=this.parentSub?this.parentSub.addNestedSub(this.onStateChange):this.store.subscribe(this.onStateChange),this.listeners=o())},e.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null,this.listeners.clear(),this.listeners=a)},e}()},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 o(e,t,n){for(var r=t.length-1;r>=0;r--){var o=t[r](e);if(o)return o}return function(t,r){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+r.wrappedComponentName+".")}}function i(e,t){return e===t}var a=n(69),s=n(156),u=n(157),c=n(173),l=n(174),h=n(175),f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};t.a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.connectHOC,n=void 0===t?a.a:t,p=e.mapStateToPropsFactories,d=void 0===p?c.a:p,y=e.mapDispatchToPropsFactories,v=void 0===y?u.a:y,m=e.mergePropsFactories,g=void 0===m?l.a:m,_=e.selectorFactory,b=void 0===_?h.a:_;return function(e,t,a){var u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},c=u.pure,l=void 0===c||c,h=u.areStatesEqual,p=void 0===h?i:h,y=u.areOwnPropsEqual,m=void 0===y?s.a:y,_=u.areStatePropsEqual,w=void 0===_?s.a:_,E=u.areMergedPropsEqual,C=void 0===E?s.a:E,T=r(u,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),S=o(e,d,"mapStateToProps"),O=o(t,v,"mapDispatchToProps"),N=o(a,g,"mergeProps");return n(b,f({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:S,initMapDispatchToProps:O,initMergeProps:N,pure:l,areStatesEqual:p,areOwnPropsEqual:m,areStatePropsEqual:w,areMergedPropsEqual:C},T))}}()},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 o(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),o=Object.keys(t);if(n.length!==o.length)return!1;for(var a=0;a<n.length;a++)if(!i.call(t,n[a])||!r(e[n[a]],t[n[a]]))return!1;return!0}t.a=o;var i=Object.prototype.hasOwnProperty},function(e,t,n){"use strict";function r(e){return"function"===typeof e?Object(s.b)(e,"mapDispatchToProps"):void 0}function o(e){return e?void 0:Object(s.a)(function(e){return{dispatch:e}})}function i(e){return e&&"object"===typeof e?Object(s.a)(function(t){return Object(a.a)(e,t)}):void 0}var a=n(20),s=n(75);t.a=[r,o,i]},function(e,t,n){"use strict";function r(e){return null==e?void 0===e?u:s:c&&c in Object(e)?Object(i.a)(e):Object(a.a)(e)}var o=n(72),i=n(161),a=n(162),s="[object Null]",u="[object Undefined]",c=o.a?o.a.toStringTag:void 0;t.a=r},function(e,t,n){"use strict";var r=n(160),o="object"==typeof self&&self&&self.Object===Object&&self,i=r.a||o||Function("return this")();t.a=i},function(e,t,n){"use strict";(function(e){var n="object"==typeof e&&e&&e.Object===Object&&e;t.a=n}).call(t,n(17))},function(e,t,n){"use strict";function r(e){var t=a.call(e,u),n=e[u];try{e[u]=void 0;var r=!0}catch(e){}var o=s.call(e);return r&&(t?e[u]=n:delete e[u]),o}var o=n(72),i=Object.prototype,a=i.hasOwnProperty,s=i.toString,u=o.a?o.a.toStringTag:void 0;t.a=r},function(e,t,n){"use strict";function r(e){return i.call(e)}var o=Object.prototype,i=o.toString;t.a=r},function(e,t,n){"use strict";var r=n(164),o=Object(r.a)(Object.getPrototypeOf,Object);t.a=o},function(e,t,n){"use strict";function r(e,t){return function(n){return e(t(n))}}t.a=r},function(e,t,n){"use strict";function r(e){return null!=e&&"object"==typeof e}t.a=r},function(e,t,n){e.exports=n(167)},function(e,t,n){"use strict";(function(e,r){Object.defineProperty(t,"__esModule",{value:!0});var o,i=n(169),a=function(e){return e&&e.__esModule?e:{default:e}}(i);o="undefined"!==typeof self?self:"undefined"!==typeof window?window:"undefined"!==typeof e?e:r;var s=(0,a.default)(o);t.default=s}).call(t,n(17),n(168)(e))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){"use strict";function r(e){var t,n=e.Symbol;return"function"===typeof n?n.observable?t=n.observable:(t=n("observable"),n.observable=t):t="@@observable",t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r},function(e,t,n){"use strict";n(71),n(43),n(73)},function(e,t,n){"use strict";function r(e,t){return function(){return t(e.apply(void 0,arguments))}}function o(e,t){if("function"===typeof e)return r(e,t);if("object"!==typeof e||null===e)throw new Error("bindActionCreators expected an object or a function, instead received "+(null===e?"null":typeof e)+'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');for(var n=Object.keys(e),o={},i=0;i<n.length;i++){var a=n[i],s=e[a];"function"===typeof s&&(o[a]=r(s,t))}return o}t.a=o},function(e,t,n){"use strict";n(74),Object.assign},function(e,t,n){"use strict";function r(e){return"function"===typeof e?Object(i.b)(e,"mapStateToProps"):void 0}function o(e){return e?void 0:Object(i.a)(function(){return{}})}var i=n(75);t.a=[r,o]},function(e,t,n){"use strict";function r(e,t,n){return s({},n,e,t)}function o(e){return function(t,n){var r=(n.displayName,n.pure),o=n.areMergedPropsEqual,i=!1,a=void 0;return function(t,n,s){var u=e(t,n,s);return i?r&&o(u,a)||(a=u):(i=!0,a=u),a}}}function i(e){return"function"===typeof e?o(e):void 0}function a(e){return e?void 0:function(){return r}}var s=(n(76),Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e});t.a=[i,a]},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 o(e,t,n,r){return function(o,i){return n(e(o,i),t(r,i),i)}}function i(e,t,n,r,o){function i(o,i){return d=o,y=i,v=e(d,y),m=t(r,y),g=n(v,m,y),p=!0,g}function a(){return v=e(d,y),t.dependsOnOwnProps&&(m=t(r,y)),g=n(v,m,y)}function s(){return e.dependsOnOwnProps&&(v=e(d,y)),t.dependsOnOwnProps&&(m=t(r,y)),g=n(v,m,y)}function u(){var t=e(d,y),r=!f(t,v);return v=t,r&&(g=n(v,m,y)),g}function c(e,t){var n=!h(t,y),r=!l(e,d);return d=e,y=t,n&&r?a():n?s():r?u():g}var l=o.areStatesEqual,h=o.areOwnPropsEqual,f=o.areStatePropsEqual,p=!1,d=void 0,y=void 0,v=void 0,m=void 0,g=void 0;return function(e,t){return p?c(e,t):i(e,t)}}function a(e,t){var n=t.initMapStateToProps,a=t.initMapDispatchToProps,s=t.initMergeProps,u=r(t,["initMapStateToProps","initMapDispatchToProps","initMergeProps"]),c=n(e,u),l=a(e,u),h=s(e,u);return(u.pure?i:o)(c,l,h,e,u)}t.a=a;n(176)},function(e,t,n){"use strict";n(42)},function(e,t,n){"use strict";var r=n(78),o=n.n(r),i=n(259),a=(n(20),n(56),n(260)),s=(n.n(a),n(77)),u=o.a.initializeApp(i.a),c=u.database().ref().child("tests");c.on("value",function(e){var t=[],n=e.val();if(n)for(var r=Object.keys(n),o=0;o<r.length;o++)t[o]=n[r[o]];setTimeout(function(){s.a.dispatch({type:"REFRESH_STATE",databaseTests:t})},500)});var l=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments[1];return"ADD_NEW_TEST"===t.type?(c.push().set(t.testObject),e):"REFRESH_STATE"===t.type?t.databaseTests:e};t.a=l},function(e,t,n){n(179),e.exports=n(13).default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(180),o=(n.n(r),n(184)),i=(n.n(o),n(185));n.n(i)},function(e,t,n){(function(e){var t=function(){if("undefined"!==typeof e)return e;if("undefined"!==typeof window)return window;if("undefined"!==typeof self)return self;throw new Error("unable to locate global object")}();"undefined"===typeof Promise&&(t.Promise=Promise=n(181))}).call(t,n(17))},function(e,t,n){(function(t){!function(n){function r(){}function o(e,t){return function(){e.apply(t,arguments)}}function i(e){if(!(this instanceof i))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,i._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 i)return e._state=3,e._value=t,void c(e);if("function"===typeof n)return void h(o(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&&i._immediateFn(function(){e._handled||i._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)}}var f=setTimeout;i.prototype.catch=function(e){return this.then(null,e)},i.prototype.then=function(e,t){var n=new this.constructor(r);return a(this,new l(e,t,n)),n},i.all=function(e){return new i(function(t,n){function r(e,a){try{if(a&&("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)}o[e]=a,0===--i&&t(o)}catch(e){n(e)}}if(!e||"undefined"===typeof e.length)throw new TypeError("Promise.all accepts an array");var o=Array.prototype.slice.call(e);if(0===o.length)return t([]);for(var i=o.length,a=0;a<o.length;a++)r(a,o[a])})},i.resolve=function(e){return e&&"object"===typeof e&&e.constructor===i?e:new i(function(t){t(e)})},i.reject=function(e){return new i(function(t,n){n(e)})},i.race=function(e){return new i(function(t,n){for(var r=0,o=e.length;r<o;r++)e[r].then(t,n)})},i._immediateFn="function"===typeof t&&function(e){t(e)}||function(e){f(e,0)},i._unhandledRejectionFn=function(e){"undefined"!==typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)},i._setImmediateFn=function(e){i._immediateFn=e},i._setUnhandledRejectionFn=function(e){i._unhandledRejectionFn=e},"undefined"!==typeof e&&e.exports?e.exports=i:n.Promise||(n.Promise=i)}(this)}).call(t,n(182).setImmediate)},function(e,t,n){function r(e,t){this._id=e,this._clearFn=t}var o=Function.prototype.apply;t.setTimeout=function(){return new r(o.call(setTimeout,window,arguments),clearTimeout)},t.setInterval=function(){return new r(o.call(setInterval,window,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(window,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(183),t.setImmediate=setImmediate,t.clearImmediate=clearImmediate},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 o(e){delete c[e]}function i(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{i(t)}finally{o(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=o}}("undefined"===typeof self?"undefined"===typeof e?this:e:self)}).call(t,n(17),n(44))},function(e,t){Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(e){if(null==this)throw new TypeError('"this" is null or not defined');var t=Object(this),n=t.length>>>0;if("function"!==typeof e)throw new TypeError("predicate must be a function");for(var r=arguments[1],o=0;o<n;){var i=t[o];if(e.call(r,i,o,t))return i;o++}}})},function(e,t){Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function(e){if(null==this)throw new TypeError('"this" is null or not defined');var t=Object(this),n=t.length>>>0;if("function"!==typeof e)throw new TypeError("predicate must be a function");for(var r=arguments[1],o=0;o<n;){var i=t[o];if(e.call(r,i,o,t))return o;o++}return-1}})},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)||o("no-app",{name:e}),d[e]}function n(e,t){void 0===t?t=s:"string"===typeof t&&""!==t||o("bad-app-name",{name:t+""}),a(d,t)&&o("duplicate-app",{name:t});var n=new c(e,t,m);return d[t]=n,f(n,"create"),n}function u(){return Object.keys(d).map(function(e){return d[e]})}function l(e,n,r,a,s){y[e]&&o("duplicate-service",{name:e}),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]&&o("invalid-app-argument",{name:e}),n[e]()};return void 0!==r&&Object(i.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(i.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.8.1",INTERNAL:{registerService:l,createFirebaseNamespace:r,extendNamespace:h,createSubscribe:i.createSubscribe,ErrorFactory:i.ErrorFactory,removeApp:e,factories:y,useAsService:p,Promise:Promise,deepExtend:i.deepExtend}};return Object(i.patchProperty)(m,"default",m),Object.defineProperty(m,"apps",{get:u}),Object(i.patchProperty)(t,"App",c),m}function o(e,t){throw h.create(e,t)}t.a=r;var i=n(0),a=(n.n(i),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,this.options_=Object(i.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,"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(i.deepExtend)(this,e),e.INTERNAL&&e.INTERNAL.addAuthTokenListener&&(u.forEach(function(e){t.INTERNAL.addAuthTokenListener(e)}),u=[])},e.prototype.checkDestroyed_=function(){this.isDeleted_&&o("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 i.ErrorFactory("app","Firebase",l)},function(e,t,n){"use strict";function r(e){return o(void 0,e)}function o(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]=o(e[r],t[r]));return e}function i(e,t,n){e[t]=n}Object.defineProperty(t,"__esModule",{value:!0}),t.deepCopy=r,t.deepExtend=o,t.patchProperty=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=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}();t.Deferred=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(45);t.getUA=function(){return"undefined"!==typeof navigator&&"string"===typeof navigator.userAgent?navigator.userAgent:""},t.isMobileCordova=function(){return"undefined"!==typeof window&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(t.getUA())},t.isReactNative=function(){return"object"===typeof navigator&&"ReactNative"===navigator.product},t.isNodeSdk=function(){return!0===r.CONSTANTS.NODE_CLIENT||!0===r.CONSTANTS.NODE_ADMIN}},function(e,t,n){"use strict";function r(e){var t=i;return i=e,t}Object.defineProperty(t,"__esModule",{value:!0});var o="FirebaseError",i=Error.captureStackTrace;t.patchCapture=r;var a=function(){function e(e,t){this.code=e,this.message=t;if(i)i(this,s.prototype.create);else{var n=Error.apply(this,arguments);this.name=o,Object.defineProperty(this,"stack",{get:function(){return n.stack}})}}return e}();t.FirebaseError=a,a.prototype=Object.create(Error.prototype),a.prototype.constructor=a,a.prototype.name=o;var s=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],o=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+" ("+o+").";var i=new a(o,n);for(var s in t)t.hasOwnProperty(s)&&"_"!==s.slice(-1)&&(i[s]=t[s]);return i},e}();t.ErrorFactory=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(80),o=n(81);t.decode=function(e){var t={},n={},i={},a="";try{var s=e.split(".");t=o.jsonEval(r.base64Decode(s[0])||""),n=o.jsonEval(r.base64Decode(s[1])||""),a=s[2],i=n.d||{},delete n.d}catch(e){}return{header:t,claims:n,data:i,signature:a}},t.isValidTimestamp=function(e){var n,r,o=t.decode(e).claims,i=Math.floor((new Date).getTime()/1e3);return"object"===typeof o&&(o.hasOwnProperty("nbf")?n=o.nbf:o.hasOwnProperty("iat")&&(n=o.iat),r=o.hasOwnProperty("exp")?o.exp:n+86400),i&&n&&r&&i>=n&&i<=r},t.issuedAtTime=function(e){var n=t.decode(e).claims;return"object"===typeof n&&n.hasOwnProperty("iat")?n.iat:null},t.isValidFormat=function(e){var n=t.decode(e),r=n.claims;return!!n.signature&&!!r&&"object"===typeof r&&r.hasOwnProperty("iat")},t.isAdmin=function(e){var n=t.decode(e).claims;return"object"===typeof n&&!0===n.admin}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(82);t.querystring=function(e){var t=[];return r.forEach(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("&"):""},t.querystringDecode=function(e){var t={};return e.replace(/^\?/,"").split("&").forEach(function(e){if(e){var n=e.split("=");t[n[0]]=n[1]}}),t}},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=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])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(194),i=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 r(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 o=n[r-3]^n[r-8]^n[r-14]^n[r-16];n[r]=4294967295&(o<<1|o>>>31)}for(var i,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?(i=l^u&(c^l),a=1518500249):(i=u^c^l,a=1859775393):r<60?(i=u&c|l&(u|c),a=2400959708):(i=u^c^l,a=3395469782);var o=(s<<5|s>>>27)+i+h+a+n[r]&4294967295;h=l,l=c,c=4294967295&(u<<30|u>>>2),u=s,s=o}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,o=this.buf_,i=this.inbuf_;r<t;){if(0==i)for(;r<=n;)this.compress_(e,r),r+=this.blockSize;if("string"===typeof e){for(;r<t;)if(o[i]=e.charCodeAt(r),++i,++r,i==this.blockSize){this.compress_(o),i=0;break}}else for(;r<t;)if(o[i]=e[r],++i,++r,i==this.blockSize){this.compress_(o),i=0;break}}this.inbuf_=i,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 o=24;o>=0;o-=8)e[r]=this.chain_[n]>>o&255,++r;return e},t}(o.Hash);t.Sha1=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){this.blockSize=-1}return e}();t.Hash=r},function(e,t,n){"use strict";function r(e,t){var n=new s(e,t);return n.subscribe.bind(n)}function o(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 i(e,t){if("object"!==typeof e||null===e)return!1;for(var n=0,r=t;n<r.length;n++){var o=r[n];if(o in e&&"function"===typeof e[o])return!0}return!1}function a(){}Object.defineProperty(t,"__esModule",{value:!0}),t.createSubscribe=r;var s=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,o=this;if(void 0===e&&void 0===t&&void 0===n)throw new Error("Missing Observer.");r=i(e,["next","error","complete"])?e:{next:e,error:t,complete:n},void 0===r.next&&(r.next=a),void 0===r.error&&(r.error=a),void 0===r.complete&&(r.complete=a);var s=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(function(){try{o.finalError?r.error(o.finalError):r.complete()}catch(e){}}),this.observers.push(r),s},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}();t.async=o},function(e,t,n){"use strict";function r(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 o=e+" failed: ";return o+=r+" argument "}function o(e,t,n,o){if((!o||n)&&"string"!==typeof n)throw new Error(r(e,t,o)+"must be a valid firebase namespace.")}function i(e,t,n,o){if((!o||n)&&"function"!==typeof n)throw new Error(r(e,t,o)+"must be a valid function.")}function a(e,t,n,o){if((!o||n)&&("object"!==typeof n||null===n))throw new Error(r(e,t,o)+"must be a valid context object.")}Object.defineProperty(t,"__esModule",{value:!0}),t.validateArgCount=function(e,t,n,r){var o;if(r<t?o="at least "+t:r>n&&(o=0===n?"none":"no more than "+n),o){var i=e+" failed: Was called with "+r+(1===r?" argument.":" arguments.")+" Expects "+o+".";throw new Error(i)}},t.errorPrefix=r,t.validateNamespace=o,t.validateCallback=i,t.validateContextObject=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(79);t.stringToByteArray=function(e){for(var t=[],n=0,o=0;o<e.length;o++){var i=e.charCodeAt(o);if(i>=55296&&i<=56319){var a=i-55296;o++,r.assert(o<e.length,"Surrogate pair missing trail surrogate.");i=65536+(a<<10)+(e.charCodeAt(o)-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},t.stringLength=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}},function(e,t,n){n(199)},function(e,t,n){(function(e){(function(){function e(e){return"string"==typeof e}function t(e){return"boolean"==typeof e}function r(){}function o(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 i(e){return null===e}function a(e){return"array"==o(e)}function s(e){var t=o(e);return"array"==t||"object"==t&&"number"==typeof e.length}function u(e){return"function"==o(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)}function 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.ib=t.prototype,e.prototype=new n,e.prototype.constructor=e,e.Rc=function(e,n,r){for(var o=Array(arguments.length-2),i=2;i<arguments.length;i++)o[i-2]=arguments[i];return t.prototype[n].apply(e,o)}}function y(e){if(Error.captureStackTrace)Error.captureStackTrace(this,y);else{var t=Error().stack;t&&(this.stack=t)}e&&(this.message=String(e))}function v(e,t){for(var n=e.split("%s"),r="",o=Array.prototype.slice.call(arguments,1);o.length&&1<n.length;)r+=n.shift()+o.shift();return r+n.join("%s")}function m(e){return _u.test(e)?(-1!=e.indexOf("&")&&(e=e.replace(pu,"&amp;")),-1!=e.indexOf("<")&&(e=e.replace(du,"&lt;")),-1!=e.indexOf(">")&&(e=e.replace(yu,"&gt;")),-1!=e.indexOf('"')&&(e=e.replace(vu,"&quot;")),-1!=e.indexOf("'")&&(e=e.replace(mu,"&#39;")),-1!=e.indexOf("\0")&&(e=e.replace(gu,"&#0;")),e):e}function g(e,t){return-1!=e.indexOf(t)}function _(e,t){return e<t?-1:e>t?1:0}function b(e,t){t.unshift(e),y.call(this,v.apply(null,t)),t.shift()}function w(e,t){throw new b("Failure"+(e?": "+e:""),Array.prototype.slice.call(arguments,1))}function E(t,n){var r=t.length,o=e(t)?t.split(""):t;for(--r;0<=r;--r)r in o&&n.call(void 0,o[r],r,t)}function C(t){e:{for(var n=Cn,r=t.length,o=e(t)?t.split(""):t,i=0;i<r;i++)if(i in o&&n.call(void 0,o[i],i,t)){n=i;break e}n=-1}return 0>n?null:e(t)?t.charAt(n):t[n]}function T(e,t){return 0<=wu(e,t)}function S(e,t){t=wu(e,t);var n;return(n=0<=t)&&Array.prototype.splice.call(e,t,1),n}function O(e,t){var n=0;E(e,function(r,o){t.call(void 0,r,o,e)&&1==Array.prototype.splice.call(e,o,1).length&&n++})}function N(e){return Array.prototype.concat.apply([],arguments)}function P(e){var t=e.length;if(0<t){for(var n=Array(t),r=0;r<t;r++)n[r]=e[r];return n}return[]}function I(e){return g(bu,e)}function R(e,t){for(var n in e)t.call(void 0,e[n],n,e)}function A(e){var t,n=[],r=0;for(t in e)n[r++]=e[t];return n}function k(e){var t,n=[],r=0;for(t in e)n[r++]=t;return n}function x(e){for(var t in e)return!1;return!0}function D(e,t){for(var n in e)if(!(n in t)||e[n]!==t[n])return!1;for(n in t)if(!(n in e))return!1;return!0}function M(e){var t,n={};for(t in e)n[t]=e[t];return n}function L(e,t){for(var n,r,o=1;o<arguments.length;o++){r=arguments[o];for(n in r)e[n]=r[n];for(var i=0;i<Nu.length;i++)n=Nu[i],Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}}function j(e){return j[" "](e),e}function F(e,t){var n=Uu;return Object.prototype.hasOwnProperty.call(n,e)?n[e]:n[e]=t(e)}function U(){var e=uu.document;return e?e.documentMode:void 0}function W(e){return F(e,function(){for(var t=0,n=fu(String(Pu)).split("."),r=fu(String(e)).split("."),o=Math.max(n.length,r.length),i=0;0==t&&i<o;i++){var a=n[i]||"",s=r[i]||"";do{if(a=/(\d*)(\D*)(.*)/.exec(a)||["","","",""],s=/(\d*)(\D*)(.*)/.exec(s)||["","","",""],0==a[0].length&&0==s[0].length)break;t=_(0==a[1].length?0:parseInt(a[1],10),0==s[1].length?0:parseInt(s[1],10))||_(0==a[2].length,0==s[2].length)||_(a[2],s[2]),a=a[3],s=s[3]}while(0==t)}return 0<=t})}function B(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 q(e,t,n){this.f=n,this.c=e,this.g=t,this.b=0,this.a=null}function H(e,t){e.g(t),e.b<e.f&&(e.b++,t.next=e.a,e.a=t)}function K(){var e=Ku,t=null;return e.a&&(t=e.a,e.a=e.a.next,e.a||(e.b=null),t.next=null),t}function G(){this.next=this.b=this.a=null}function z(e){uu.setTimeout(function(){throw e},0)}function Q(){var e=uu.MessageChannel;if("undefined"===typeof e&&"undefined"!==typeof window&&window.postMessage&&window.addEventListener&&!I("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&&!I("Trident")&&!I("MSIE")){var t=new e,n={},r=n;return t.port1.onmessage=function(){if(void 0!==n.next){n=n.next;var e=n.pb;n.pb=null,e()}},function(e){r.next={pb: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){uu.setTimeout(e,0)}}function X(e,t){qu||Y(),Hu||(qu(),Hu=!0);var n=Ku,r=Bu.get();r.set(e,t),n.b?n.b.next=r:n.a=r,n.b=r}function Y(){if(-1!=String(uu.Promise).indexOf("[native code]")){var e=uu.Promise.resolve(void 0);qu=function(){e.then($)}}else qu=function(){var e=$;!u(uu.setImmediate)||uu.Window&&uu.Window.prototype&&!I("Edge")&&uu.Window.prototype.setImmediate==uu.setImmediate?(Vu||(Vu=Q()),Vu(e)):uu.setImmediate(e)}}function $(){for(var e;e=K();){try{e.a.call(e.b)}catch(e){z(e)}H(Bu,e)}Hu=!1}function J(e,t){if(this.a=Gu,this.i=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){le(n,zu,e)},function(e){if(!(e instanceof ge))try{if(e instanceof Error)throw e;throw Error("Promise rejected.")}catch(e){}le(n,Qu,e)})}catch(e){le(this,Qu,e)}}function Z(){this.next=this.f=this.b=this.g=this.a=null,this.c=!1}function ee(e,t,n){var r=Xu.get();return r.g=e,r.b=t,r.f=n,r}function te(e){if(e instanceof J)return e;var t=new J(r);return le(t,zu,e),t}function ne(e){return new J(function(t,n){n(e)})}function re(e,t,n){he(e,t,n,null)||X(p(t,e))}function oe(e){return new J(function(t,n){var r=e.length,o=[];if(r)for(var i,a=function(e,n){r--,o[e]=n,0==r&&t(o)},s=function(e){n(e)},u=0;u<e.length;u++)i=e[u],re(i,p(a,u),s);else t(o)})}function ie(e){return new J(function(t){var n=e.length,r=[];if(n)for(var o,i=function(e,o,i){n--,r[e]=o?{Ub:!0,value:i}:{Ub:!1,reason:i},0==n&&t(r)},a=0;a<e.length;a++)o=e[a],re(o,p(i,a,!0),p(i,a,!1));else t(r)})}function ae(e,t){return t=ee(t,t,void 0),t.c=!0,ue(e,t),e}function se(e,t){if(e.a==Gu)if(e.c){var n=e.c;if(n.b){for(var r=0,o=null,i=null,a=n.b;a&&(a.c||(r++,a.a==e&&(o=a),!(o&&1<r)));a=a.next)o||(i=a);o&&(n.a==Gu&&1==r?se(n,t):(i?(r=i,r.next==n.f&&(n.f=r),r.next=r.next.next):de(n),ye(n,o,Qu,t)))}e.c=null}else le(e,Qu,t)}function ue(e,t){e.b||e.a!=zu&&e.a!=Qu||pe(e),e.f?e.f.next=t:e.b=t,e.f=t}function ce(e,t,n,r){var o=ee(null,null,null);return o.a=new J(function(e,i){o.g=t?function(n){try{var o=t.call(r,n);e(o)}catch(e){i(e)}}:e,o.b=n?function(t){try{var o=n.call(r,t);void 0===o&&t instanceof ge?i(t):e(o)}catch(e){i(e)}}:i}),o.a.c=e,ue(e,o),o.a}function le(e,t,n){e.a==Gu&&(e===n&&(t=Qu,n=new TypeError("Promise cannot resolve to itself")),e.a=1,he(n,e.Ac,e.Bc,e)||(e.i=n,e.a=t,e.c=null,pe(e),t!=Qu||n instanceof ge||me(e,n)))}function he(e,t,n,o){if(e instanceof J)return ue(e,ee(t||r,n||null,o)),!0;if(V(e))return e.then(t,n,o),!0;if(c(e))try{var i=e.then;if(u(i))return fe(e,i,t,n,o),!0}catch(e){return n.call(o,e),!0}return!1}function fe(e,t,n,r,o){function i(e){s||(s=!0,r.call(o,e))}function a(e){s||(s=!0,n.call(o,e))}var s=!1;try{t.call(e,a,i)}catch(e){i(e)}}function pe(e){e.h||(e.h=!0,X(e.Qb,e))}function de(e){var t=null;return e.b&&(t=e.b,e.b=t.next,t.next=null),e.b||(e.f=null),t}function ye(e,t,n,r){if(n==Qu&&t.b&&!t.c)for(;e&&e.g;e=e.c)e.g=!1;if(t.a)t.a.c=null,ve(t,n,r);else try{t.c?t.g.call(t.f):ve(t,n,r)}catch(e){Yu.call(null,e)}H(Xu,t)}function ve(e,t,n){t==zu?e.g.call(e.f,n):e.b&&e.b.call(e.f,n)}function me(e,t){e.g=!0,X(function(){e.g&&Yu.call(null,t)})}function ge(e){y.call(this,e)}function _e(){this.a="",this.b=Ju}function be(e){return e instanceof _e&&e.constructor===_e&&e.b===Ju?e.a:(w("expected object of type Const, got '"+e+"'"),"type_error:Const")}function we(e){var t=new _e;return t.a=e,t}function Ee(){this.a="",this.b=tc}function Ce(e){return e instanceof Ee&&e.constructor===Ee&&e.b===tc?e.a:(w("expected object of type TrustedResourceUrl, got '"+e+"' of type "+o(e)),"type_error:TrustedResourceUrl")}function Te(e,t){return e=Se(e,t),t=new Ee,t.a=e,t}function Se(e,t){var n=be(e);if(!ec.test(n))throw Error("Invalid TrustedResourceUrl format: "+n);return n.replace(Zu,function(e,r){if(!Object.prototype.hasOwnProperty.call(t,r))throw Error('Found marker, "'+r+'", in format string, "'+n+'", but no valid label mapping found in args: '+JSON.stringify(t));return e=t[r],e instanceof _e?be(e):encodeURIComponent(String(e))})}function Oe(){this.a="",this.b=rc}function Ne(e){return e instanceof Oe&&e.constructor===Oe&&e.b===rc?e.a:(w("expected object of type SafeUrl, got '"+e+"' of type "+o(e)),"type_error:SafeUrl")}function Pe(e){return e instanceof Oe?e:(e=e.la?e.ja():String(e),nc.test(e)||(e="about:invalid#zClosurez"),Ie(e))}function Ie(e){var t=new Oe;return t.a=e,t}function Re(){this.a="",this.b=oc}function Ae(e){return e instanceof Re&&e.constructor===Re&&e.b===oc?e.a:(w("expected object of type SafeHtml, got '"+e+"' of type "+o(e)),"type_error:SafeHtml")}function ke(e){var t=new Re;return t.a=e,t}function xe(t){var n=document;return e(t)?n.getElementById(t):t}function De(e,t){R(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:ic.hasOwnProperty(n)?e.setAttribute(ic[n],t):0==n.lastIndexOf("aria-",0)||0==n.lastIndexOf("data-",0)?e.setAttribute(n,t):e[n]=t})}function Me(t,n,r){var o=arguments,i=document,s=String(o[0]),u=o[1];if(!$u&&u&&(u.name||u.type)){if(s=["<",s],u.name&&s.push(' name="',m(u.name),'"'),u.type){s.push(' type="',m(u.type),'"');var c={};L(c,u),delete c.type,u=c}s.push(">"),s=s.join("")}return s=i.createElement(s),u&&(e(u)?s.className=u:a(u)?s.className=u.join(" "):De(s,u)),2<o.length&&Le(i,s,o),s}function Le(t,n,r){function o(r){r&&n.appendChild(e(r)?t.createTextNode(r):r)}for(var i=2;i<r.length;i++){var a=r[i];!s(a)||c(a)&&0<a.nodeType?o(a):Eu(je(a)?P(a):a,o)}}function je(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 Fe(e){var t=[];return We(new Ue,e,t),t.join("")}function Ue(){}function We(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 o="",i=0;i<t;i++)n.push(o),We(e,r[i],n),o=",";return void n.push("]")}if(!(t instanceof String||t instanceof Number||t instanceof Boolean)){n.push("{"),o="";for(r in t)Object.prototype.hasOwnProperty.call(t,r)&&"function"!=typeof(i=t[r])&&(n.push(o),Be(r,n),n.push(":"),We(e,i,n),o=",");return void n.push("}")}t=t.valueOf()}switch(typeof t){case"string":Be(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 Be(e,t){t.push('"',e.replace(sc,function(e){var t=ac[e];return t||(t="\\u"+(65536|e.charCodeAt(0)).toString(16).substr(1),ac[e]=t),t}),'"')}function Ve(){0!=uc&&(cc[this[cu]||(this[cu]=++lu)]=this),this.oa=this.oa,this.Fa=this.Fa}function qe(e){e.oa||(e.oa=!0,e.ta(),0!=uc&&(e=e[cu]||(e[cu]=++lu),delete cc[e]))}function He(e,t){this.type=e,this.b=this.target=t,this.Bb=!0}function Ke(t,n){if(He.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.type=t.type,o=t.changedTouches?t.changedTouches[0]:null;if(this.target=t.target||t.srcElement,this.b=n,n=t.relatedTarget){if(xu){e:{try{j(n.nodeName);var i=!0;break e}catch(e){}i=!1}i||(n=null)}}else"mouseover"==r?n=t.fromElement:"mouseout"==r&&(n=t.toElement);this.relatedTarget=n,null===o?(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!==o.clientX?o.clientX:o.pageX,this.clientY=void 0!==o.clientY?o.clientY:o.pageY,this.screenX=o.screenX||0,this.screenY=o.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:dc[t.pointerType]||"",this.a=t,t.defaultPrevented&&this.c()}}function Ge(e,t,n,r,o){this.listener=e,this.a=null,this.src=t,this.type=n,this.capture=!!r,this.La=o,this.key=++vc,this.ma=this.Ha=!1}function ze(e){e.ma=!0,e.listener=null,e.a=null,e.src=null,e.La=null}function Qe(e){this.src=e,this.a={},this.b=0}function Xe(e,t,n,r,o,i){var a=t.toString();(t=e.a[a])||(t=e.a[a]=[],e.b++);var s=$e(t,n,o,i);return-1<s?(e=t[s],r||(e.Ha=!1)):(e=new Ge(n,e.src,a,!!o,i),e.Ha=r,t.push(e)),e}function Ye(e,t){var n=t.type;n in e.a&&S(e.a[n],t)&&(ze(t),0==e.a[n].length&&(delete e.a[n],e.b--))}function $e(e,t,n,r){for(var o=0;o<e.length;++o){var i=e[o];if(!i.ma&&i.listener==t&&i.capture==!!n&&i.La==r)return o}return-1}function Je(e,t,n,r,o){if(r&&r.once)tt(e,t,n,r,o);else if(a(t))for(var i=0;i<t.length;i++)Je(e,t[i],n,r,o);else n=ct(n),e&&e[yc]?ft(e,t,n,c(r)?!!r.capture:!!r,o):Ze(e,t,n,!1,r,o)}function Ze(e,t,n,r,o,i){if(!t)throw Error("Invalid event type");var a=c(o)?!!o.capture:!!o,s=ut(e);if(s||(e[mc]=s=new Qe(e)),n=Xe(s,t,n,r,a,i),!n.a){if(r=et(),n.a=r,r.src=e,r.listener=n,e.addEventListener)pc||(o=a),void 0===o&&(o=!1),e.addEventListener(t.toString(),r,o);else{if(!e.attachEvent)throw Error("addEventListener and attachEvent are unavailable.");e.attachEvent(ot(t.toString()),r)}_c++}}function et(){var e=st,t=hc?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 tt(e,t,n,r,o){if(a(t))for(var i=0;i<t.length;i++)tt(e,t[i],n,r,o);else n=ct(n),e&&e[yc]?pt(e,t,n,c(r)?!!r.capture:!!r,o):Ze(e,t,n,!0,r,o)}function nt(e,t,n,r,o){if(a(t))for(var i=0;i<t.length;i++)nt(e,t[i],n,r,o);else r=c(r)?!!r.capture:!!r,n=ct(n),e&&e[yc]?(e=e.u,(t=String(t).toString())in e.a&&(i=e.a[t],-1<(n=$e(i,n,r,o))&&(ze(i[n]),Array.prototype.splice.call(i,n,1),0==i.length&&(delete e.a[t],e.b--)))):e&&(e=ut(e))&&(t=e.a[t.toString()],e=-1,t&&(e=$e(t,n,r,o)),(n=-1<e?t[e]:null)&&rt(n))}function rt(e){if("number"!=typeof e&&e&&!e.ma){var t=e.src;if(t&&t[yc])Ye(t.u,e);else{var n=e.type,r=e.a;t.removeEventListener?t.removeEventListener(n,r,e.capture):t.detachEvent&&t.detachEvent(ot(n),r),_c--,(n=ut(t))?(Ye(n,e),0==n.b&&(n.src=null,t[mc]=null)):ze(e)}}}function ot(e){return e in gc?gc[e]:gc[e]="on"+e}function it(e,t,n,r){var o=!0;if((e=ut(e))&&(t=e.a[t.toString()]))for(t=t.concat(),e=0;e<t.length;e++){var i=t[e];i&&i.capture==n&&!i.ma&&(i=at(i,r),o=o&&!1!==i)}return o}function at(e,t){var n=e.listener,r=e.La||e.src;return e.Ha&&rt(e),n.call(r,t)}function st(e,t){if(e.ma)return!0;if(!hc){if(!t)e:{t=["window","event"];for(var n=uu,r=0;r<t.length;r++)if(null==(n=n[t[r]])){t=null;break e}t=n}if(r=t,t=new Ke(r,this),n=!0,!(0>r.keyCode||void 0!=r.returnValue)){e:{var o=!1;if(0==r.keyCode)try{r.keyCode=-1;break e}catch(e){o=!0}(o||void 0==r.returnValue)&&(r.returnValue=!0)}for(r=[],o=t.b;o;o=o.parentNode)r.push(o);for(e=e.type,o=r.length-1;0<=o;o--){t.b=r[o];var i=it(r[o],e,!0,t);n=n&&i}for(o=0;o<r.length;o++)t.b=r[o],i=it(r[o],e,!1,t),n=n&&i}return n}return at(e,new Ke(t,this))}function ut(e){return e=e[mc],e instanceof Qe?e:null}function ct(e){return u(e)?e:(e[bc]||(e[bc]=function(t){return e.handleEvent(t)}),e[bc])}function lt(){Ve.call(this),this.u=new Qe(this),this.Ib=this,this.Ra=null}function ht(t,n){var r,o=t.Ra;if(o)for(r=[];o;o=o.Ra)r.push(o);if(t=t.Ib,o=n.type||n,e(n))n=new He(n,t);else if(n instanceof He)n.target=n.target||t;else{var i=n;n=new He(o,t),L(n,i)}if(i=!0,r)for(var a=r.length-1;0<=a;a--){var s=n.b=r[a];i=dt(s,o,!0,n)&&i}if(s=n.b=t,i=dt(s,o,!0,n)&&i,i=dt(s,o,!1,n)&&i,r)for(a=0;a<r.length;a++)s=n.b=r[a],i=dt(s,o,!1,n)&&i}function ft(e,t,n,r,o){Xe(e.u,String(t),n,!1,r,o)}function pt(e,t,n,r,o){Xe(e.u,String(t),n,!0,r,o)}function dt(e,t,n,r){if(!(t=e.u.a[String(t)]))return!0;t=t.concat();for(var o=!0,i=0;i<t.length;++i){var a=t[i];if(a&&!a.ma&&a.capture==n){var s=a.listener,u=a.La||a.src;a.Ha&&Ye(e.u,a),o=!1!==s.call(u,r)&&o}}return o&&0!=r.Bb}function yt(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:uu.setTimeout(e,t||0)}function vt(e){var t=null;return new J(function(n,r){-1==(t=yt(function(){n(void 0)},e))&&r(Error("Failed to schedule timer."))}).s(function(e){throw uu.clearTimeout(t),e})}function mt(e,t,n,r,o){this.reset(e,t,n,r,o)}function gt(e){this.f=e,this.b=this.c=this.a=null}function _t(e,t){this.name=e,this.value=t}function bt(e){return e.c?e.c:e.a?bt(e.a):(w("Root logger has no level set."),null)}function wt(e){Oc||(Oc=new gt(""),Sc[""]=Oc,Oc.c=Cc);var t;if(!(t=Sc[e])){t=new gt(e);var n=e.lastIndexOf("."),r=e.substr(n+1);n=wt(e.substr(0,n)),n.b||(n.b={}),n.b[r]=t,t.a=n,Sc[e]=t}return t}function Et(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){e instanceof Et?(n=e.S(),r=e.P()):(n=k(e),r=A(e));for(var o=0;o<n.length;o++)this.set(n[o],r[o])}}function Ct(e){if(e.c!=e.a.length){for(var t=0,n=0;t<e.a.length;){var r=e.a[t];Tt(e.b,r)&&(e.a[n++]=r),t++}e.a.length=n}if(e.c!=e.a.length){var o={};for(n=t=0;t<e.a.length;)r=e.a[t],Tt(o,r)||(e.a[n++]=r,o[r]=1),t++;e.a.length=n}}function Tt(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function St(e,t){e&&e.log(Tc,t,void 0)}function Ot(e){return Cu(e,function(e){return e=e.toString(16),1<e.length?e:"0"+e}).join("")}function Nt(e){var t="";return Pt(e,function(e){t+=String.fromCharCode(e)}),t}function Pt(e,t){function n(t){for(;r<e.length;){var n=e.charAt(r++),o=Pc[n];if(null!=o)return o;if(!/^[\s\xa0]*$/.test(n))throw Error("Unknown base64 encoding at char: "+n)}return t}It();for(var r=0;;){var o=n(-1),i=n(0),a=n(64),s=n(64);if(64===s&&-1===o)break;t(o<<2|i>>4),64!=a&&(t(i<<4&240|a>>2),64!=s&&t(a<<6&192|s))}}function It(){if(!Nc){Nc={},Pc={};for(var e=0;65>e;e++)Nc[e]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(e),Pc[Nc[e]]=e,62<=e&&(Pc["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_.".charAt(e)]=e)}}function Rt(e,t){this.g=[],this.v=e,this.o=t||null,this.f=this.a=!1,this.c=void 0,this.u=this.w=this.i=!1,this.h=0,this.b=null,this.l=0}function At(e,t,n){e.a=!0,e.c=n,e.f=!t,Lt(e)}function kt(e){if(e.a){if(!e.u)throw new jt;e.u=!1}}function xt(e,t){Dt(e,null,t,void 0)}function Dt(e,t,n,r){e.g.push([t,n,r]),e.a&&Lt(e)}function Mt(e){return Tu(e.g,function(e){return u(e[1])})}function Lt(e){if(e.h&&e.a&&Mt(e)){var t=e.h,n=Rc[t];n&&(uu.clearTimeout(n.a),delete Rc[t]),e.h=0}e.b&&(e.b.l--,delete e.b),t=e.c;for(var r=n=!1;e.g.length&&!e.i;){var o=e.g.shift(),i=o[0],a=o[1];if(o=o[2],i=e.f?a:i)try{var s=i.call(o||e.o,t);void 0!==s&&(e.f=e.f&&(s==t||s instanceof Error),e.c=t=s),(V(t)||"function"===typeof uu.Promise&&t instanceof uu.Promise)&&(r=!0,e.i=!0)}catch(r){t=r,e.f=!0,Mt(e)||(n=!0)}}e.c=t,r&&(s=f(e.m,e,!0),r=f(e.m,e,!1),t instanceof Rt?(Dt(t,s,r),t.w=!0):t.then(s,r)),n&&(t=new Ut(t),Rc[t.a]=t,e.h=t.a)}function jt(){y.call(this)}function Ft(){y.call(this)}function Ut(e){this.a=uu.setTimeout(f(this.c,this),0),this.b=e}function Wt(){this.b=-1}function Bt(e,t){this.b=-1,this.b=Ac,this.f=uu.Uint8Array?new Uint8Array(this.b):Array(this.b),this.g=this.c=0,this.a=[],this.i=e,this.h=t,this.l=uu.Int32Array?new Int32Array(64):Array(64),Ic||(Ic=uu.Int32Array?new Int32Array(Lc):Lc),this.reset()}function Vt(e){for(var t=e.f,n=e.l,r=0,o=0;o<t.length;)n[r++]=t[o]<<24|t[o+1]<<16|t[o+2]<<8|t[o+3],o=4*r;for(t=16;64>t;t++){o=0|n[t-15],r=0|n[t-2];var i=(0|n[t-16])+((o>>>7|o<<25)^(o>>>18|o<<14)^o>>>3)|0,a=(0|n[t-7])+((r>>>17|r<<15)^(r>>>19|r<<13)^r>>>10)|0;n[t]=i+a|0}r=0|e.a[0],o=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(i=0|e.a[7],t=0;64>t;t++){var f=((r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10))+(r&o^r&s^o&s)|0;a=c&l^~c&h,i=i+((c>>>6|c<<26)^(c>>>11|c<<21)^(c>>>25|c<<7))|0,a=a+(0|Ic[t])|0,a=i+(a+(0|n[t])|0)|0,i=h,h=l,l=c,c=u+a|0,u=s,s=o,o=r,r=a+f|0}e.a[0]=e.a[0]+r|0,e.a[1]=e.a[1]+o|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]+i|0}function qt(t,n,r){void 0===r&&(r=n.length);var o=0,i=t.c;if(e(n))for(;o<r;)t.f[i++]=n.charCodeAt(o++),i==t.b&&(Vt(t),i=0);else{if(!s(n))throw Error("message must be string or array");for(;o<r;){var a=n[o++];if(!("number"==typeof a&&0<=a&&255>=a&&a==(0|a)))throw Error("message must be a byte array");t.f[i++]=a,i==t.b&&(Vt(t),i=0)}}t.c=i,t.g+=r}function Ht(){Bt.call(this,8,jc)}function Kt(t){if(t.P&&"function"==typeof t.P)return t.P();if(e(t))return t.split("");if(s(t)){for(var n=[],r=t.length,o=0;o<r;o++)n.push(t[o]);return n}return A(t)}function Gt(t){if(t.S&&"function"==typeof t.S)return t.S();if(!t.P||"function"!=typeof t.P){if(s(t)||e(t)){var n=[];t=t.length;for(var r=0;r<t;r++)n.push(r);return n}return k(t)}}function zt(t,n){if(t.forEach&&"function"==typeof t.forEach)t.forEach(n,void 0);else if(s(t)||e(t))Eu(t,n,void 0);else for(var r=Gt(t),o=Kt(t),i=o.length,a=0;a<i;a++)n.call(void 0,o[a],r&&r[a],t)}function Qt(e,t){if(e){e=e.split("&");for(var n=0;n<e.length;n++){var r=e[n].indexOf("="),o=null;if(0<=r){var i=e[n].substring(0,r);o=e[n].substring(r+1)}else i=e[n];t(i,o?decodeURIComponent(o.replace(/\+/g," ")):"")}}}function Xt(e,t){if(this.b=this.l=this.c="",this.i=null,this.h=this.g="",this.f=!1,e instanceof Xt){this.f=void 0!==t?t:e.f,Yt(this,e.c),this.l=e.l,this.b=e.b,$t(this,e.i),this.g=e.g,t=e.a;var n=new sn;n.c=t.c,t.a&&(n.a=new Et(t.a),n.b=t.b),Jt(this,n),this.h=e.h}else e&&(n=String(e).match(Fc))?(this.f=!!t,Yt(this,n[1]||"",!0),this.l=rn(n[2]||""),this.b=rn(n[3]||"",!0),$t(this,n[4]),this.g=rn(n[5]||"",!0),Jt(this,n[6]||"",!0),this.h=rn(n[7]||"")):(this.f=!!t,this.a=new sn(null,0,this.f))}function Yt(e,t,n){e.c=n?rn(t,!0):t,e.c&&(e.c=e.c.replace(/:$/,""))}function $t(e,t){if(t){if(t=Number(t),isNaN(t)||0>t)throw Error("Bad port number "+t);e.i=t}else e.i=null}function Jt(e,t,n){t instanceof sn?(e.a=t,yn(e.a,e.f)):(n||(t=on(t,Vc)),e.a=new sn(t,0,e.f))}function Zt(e,t,n){e.a.set(t,n)}function en(e,t){return e.a.get(t)}function tn(e){return e instanceof Xt?new Xt(e):new Xt(e,void 0)}function nn(e,t){var n=new Xt(null,void 0);return Yt(n,"https"),e&&(n.b=e),t&&(n.g=t),n}function rn(e,t){return e?t?decodeURI(e.replace(/%25/g,"%2525")):decodeURIComponent(e):""}function on(t,n,r){return e(t)?(t=encodeURI(t).replace(n,an),r&&(t=t.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),t):null}function an(e){return e=e.charCodeAt(0),"%"+(e>>4&15).toString(16)+(15&e).toString(16)}function sn(e,t,n){this.b=this.a=null,this.c=e||null,this.f=!!n}function un(e){e.a||(e.a=new Et,e.b=0,e.c&&Qt(e.c,function(t,n){ln(e,decodeURIComponent(t.replace(/\+/g," ")),n)}))}function cn(e){var t=Gt(e);if("undefined"==typeof t)throw Error("Keys are undefined");var n=new sn(null,0,void 0);e=Kt(e);for(var r=0;r<t.length;r++){var o=t[r],i=e[r];a(i)?pn(n,o,i):ln(n,o,i)}return n}function ln(e,t,n){un(e),e.c=null,t=dn(e,t);var r=e.a.get(t);r||e.a.set(t,r=[]),r.push(n),e.b+=1}function hn(e,t){un(e),t=dn(e,t),Tt(e.a.b,t)&&(e.c=null,e.b-=e.a.get(t).length,e=e.a,Tt(e.b,t)&&(delete e.b[t],e.c--,e.a.length>2*e.c&&Ct(e)))}function fn(e,t){return un(e),t=dn(e,t),Tt(e.a.b,t)}function pn(e,t,n){hn(e,t),0<n.length&&(e.c=null,e.a.set(dn(e,t),P(n)),e.b+=n.length)}function dn(e,t){return t=String(t),e.f&&(t=t.toLowerCase()),t}function yn(e,t){t&&!e.f&&(un(e),e.c=null,e.a.forEach(function(e,t){var n=t.toLowerCase();t!=n&&(hn(this,t),pn(this,n,e))},e)),e.f=t}function vn(){}function mn(e){return e.c||(e.c=e.b())}function gn(){}function _n(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 bn(e){lt.call(this),this.headers=new Et,this.w=e||null,this.b=!1,this.v=this.a=null,this.g=this.I=this.i="",this.c=this.G=this.h=this.A=!1,this.f=0,this.m=null,this.l=Kc,this.o=this.N=!1}function wn(e,t,n,r,o){if(e.a)throw Error("[goog.net.XhrIo] Object is active with another request="+e.i+"; newUri="+t);n=n?n.toUpperCase():"GET",e.i=t,e.g="",e.I=n,e.A=!1,e.b=!0,e.a=e.w?e.w.a():Hc.a(),e.v=mn(e.w?e.w:Hc),e.a.onreadystatechange=f(e.Ab,e);try{St(e.J,kn(e,"Opening Xhr")),e.G=!0,e.a.open(n,String(t),!0),e.G=!1}catch(t){return St(e.J,kn(e,"Error opening Xhr: "+t.message)),void Tn(e,t)}t=r||"";var i=new Et(e.headers);o&&zt(o,function(e,t){i.set(t,e)}),o=C(i.S()),r=uu.FormData&&t instanceof uu.FormData,!T(Xc,n)||o||r||i.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8"),i.forEach(function(e,t){this.a.setRequestHeader(t,e)},e),e.l&&(e.a.responseType=e.l),"withCredentials"in e.a&&e.a.withCredentials!==e.N&&(e.a.withCredentials=e.N);try{Pn(e),0<e.f&&(e.o=En(e.a),St(e.J,kn(e,"Will abort after "+e.f+"ms if incomplete, xhr2 "+e.o)),e.o?(e.a.timeout=e.f,e.a.ontimeout=f(e.Ea,e)):e.m=yt(e.Ea,e.f,e)),St(e.J,kn(e,"Sending request")),e.h=!0,e.a.send(t),e.h=!1}catch(t){St(e.J,kn(e,"Send error: "+t.message)),Tn(e,t)}}function En(e){return Ru&&W(9)&&"number"==typeof e.timeout&&void 0!==e.ontimeout}function Cn(e){return"content-type"==e.toLowerCase()}function Tn(e,t){e.b=!1,e.a&&(e.c=!0,e.a.abort(),e.c=!1),e.g=t,Sn(e),Nn(e)}function Sn(e){e.A||(e.A=!0,ht(e,"complete"),ht(e,"error"))}function On(e){if(e.b&&"undefined"!=typeof su)if(e.v[1]&&4==In(e)&&2==Rn(e))St(e.J,kn(e,"Local request error detected and ignored"));else if(e.h&&4==In(e))yt(e.Ab,0,e);else if(ht(e,"readystatechange"),4==In(e)){St(e.J,kn(e,"Request complete")),e.b=!1;try{var t=Rn(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 o;if(o=0===t){var i=String(e.i).match(Fc)[1]||null;if(!i&&uu.self&&uu.self.location){var a=uu.self.location.protocol;i=a.substr(0,a.length-1)}o=!Qc.test(i?i.toLowerCase():"")}r=o}if(r)ht(e,"complete"),ht(e,"success");else{try{var s=2<In(e)?e.a.statusText:""}catch(t){St(e.J,"Can not get status: "+t.message),s=""}e.g=s+" ["+Rn(e)+"]",Sn(e)}}finally{Nn(e)}}}function Nn(e,t){if(e.a){Pn(e);var n=e.a,o=e.v[0]?r:null;e.a=null,e.v=null,t||ht(e,"ready");try{n.onreadystatechange=o}catch(t){(e=e.J)&&e.log(Ec,"Problem encountered resetting onreadystatechange: "+t.message,void 0)}}}function Pn(e){e.a&&e.o&&(e.a.ontimeout=null),"number"==typeof e.m&&(uu.clearTimeout(e.m),e.m=null)}function In(e){return e.a?e.a.readyState:0}function Rn(e){try{return 2<In(e)?e.a.status:-1}catch(e){return-1}}function An(e){try{return e.a?e.a.responseText:""}catch(t){return St(e.J,"Can not get responseText: "+t.message),""}}function kn(e,t){return t+" ["+e.I+" "+e.i+" "+Rn(e)+"]"}function xn(e){var t={},n=t.document||document,r=Ce(e),o=document.createElement("SCRIPT"),i={Cb:o,Ea:void 0},a=new Rt(Mn,i),s=null,u=null!=t.timeout?t.timeout:5e3;return 0<u&&(s=window.setTimeout(function(){Ln(o,!0);var e=new jn(Jc,"Timeout reached for loading script "+r);kt(a),At(a,!1,e)},u),i.Ea=s),o.onload=o.onreadystatechange=function(){o.readyState&&"loaded"!=o.readyState&&"complete"!=o.readyState||(Ln(o,t.Sc||!1,s),a.A(null))},o.onerror=function(){Ln(o,!0,s);var e=new jn($c,"Error while loading script "+r);kt(a),At(a,!1,e)},i=t.attributes||{},L(i,{type:"text/javascript",charset:"UTF-8"}),De(o,i),o.src=Ce(e),Dn(n).appendChild(o),a}function Dn(e){var t;return(t=(e||document).getElementsByTagName("HEAD"))&&0!=t.length?t[0]:e.documentElement}function Mn(){if(this&&this.Cb){var e=this.Cb;e&&"SCRIPT"==e.tagName&&Ln(e,!0,this.Ea)}}function Ln(e,t,n){null!=n&&uu.clearTimeout(n),e.onload=r,e.onerror=r,e.onreadystatechange=r,t&&window.setTimeout(function(){e&&e.parentNode&&e.parentNode.removeChild(e)},0)}function jn(e,t){var n="Jsloader error (code #"+e+")";t&&(n+=": "+t),y.call(this,n),this.code=e}function Fn(){}function Un(){this.a=new XDomainRequest,this.readyState=0,this.onreadystatechange=null,this.responseText="",this.status=-1,this.statusText=this.responseXML=null,this.a.onload=f(this.Wb,this),this.a.onerror=f(this.xb,this),this.a.onprogress=f(this.Xb,this),this.a.ontimeout=f(this.Yb,this)}function Wn(e,t){e.readyState=t,e.onreadystatechange&&e.onreadystatechange()}function Bn(){var e=or();return Ru&&!!Fu&&11==Fu||/Edge\/\d+/.test(e)}function Vn(){return uu.window&&uu.window.location.href||""}function qn(e,t){t=t||uu.window;var n="about:blank";e&&(n=Ne(Pe(e))),t.location.href=n}function Hn(e,t){var n,r=[];for(n in e)n in t?typeof e[n]!=typeof t[n]?r.push(n):a(e[n])?D(e[n],t[n])||r.push(n):"object"==typeof e[n]&&null!=e[n]&&null!=t[n]?0<Hn(e[n],t[n]).length&&r.push(n):e[n]!==t[n]&&r.push(n):r.push(n);for(n in t)n in e||r.push(n);return r}function Kn(){var e=or();return!((e=nr(e)!=tl?null:(e=e.match(/\sChrome\/(\d+)/i))&&2==e.length?parseInt(e[1],10):null)&&30>e)&&(!Ru||!Fu||9<Fu)}function Gn(e){return e=(e||or()).toLowerCase(),!!(e.match(/android/)||e.match(/webos/)||e.match(/iphone|ipad|ipod/)||e.match(/blackberry/)||e.match(/windows phone/)||e.match(/iemobile/))}function zn(e){e=e||uu.window;try{e.close()}catch(e){}}function Qn(e,t,n){var r=Math.floor(1e9*Math.random()).toString();t=t||500,n=n||600;var o=(window.screen.availHeight-n)/2,i=(window.screen.availWidth-t)/2;t={width:t,height:n,top:0<o?o:0,left:0<i?i:0,location:!0,resizable:!0,statusbar:!0,toolbar:!1},n=or().toLowerCase(),r&&(t.target=r,g(n,"crios/")&&(t.target="_blank")),nr(or())==el&&(e=e||"http://localhost",t.scrollbars=!0),n=e||"",(r=t)||(r={}),e=window,t=n instanceof Oe?n:Pe("undefined"!=typeof n.href?n.href:String(n)),n=r.target||n.target,o=[];for(a in r)switch(a){case"width":case"height":case"top":case"left":o.push(a+"="+r[a]);break;case"target":case"noreferrer":break;default:o.push(a+"="+(r[a]?1:0))}var a=o.join(",");if((I("iPhone")&&!I("iPod")&&!I("iPad")||I("iPad")||I("iPod"))&&e.navigator&&e.navigator.standalone&&n&&"_self"!=n?(a=e.document.createElement("A"),t instanceof Oe||t instanceof Oe||(t=t.la?t.ja():String(t),nc.test(t)||(t="about:invalid#zClosurez"),t=Ie(t)),a.href=Ne(t),a.setAttribute("target",n),r.noreferrer&&a.setAttribute("rel","noreferrer"),r=document.createEvent("MouseEvent"),r.initMouseEvent("click",!0,!0,e,1),a.dispatchEvent(r),a={}):r.noreferrer?(a=e.open("",n,a),e=Ne(t),a&&(ku&&g(e,";")&&(e="'"+e.replace(/'/g,"%27")+"'"),a.opener=null,we("b/12014412, meta tag with sanitized URL"),e='<META HTTP-EQUIV="refresh" content="0; url='+m(e)+'">',e=ke(e),a.document.write(Ae(e)),a.document.close())):a=e.open(Ne(t),n,a),a)try{a.focus()}catch(e){}return a}function Xn(e){return new J(function(t){function n(){vt(2e3).then(function(){if(e&&!e.closed)return n();t()})}return n()})}function Yn(){var e=null;return new J(function(t){"complete"==uu.document.readyState?t():(e=function(){t()},tt(window,"load",e))}).s(function(t){throw nt(window,"load",e),t})}function $n(){return Jn(void 0)?Yn().then(function(){return new J(function(e,t){var n=uu.document,r=setTimeout(function(){t(Error("Cordova framework is not ready."))},1e3);n.addEventListener("deviceready",function(){clearTimeout(r),e()},!1)})}):ne(Error("Cordova must run in an Android or iOS file scheme."))}function Jn(e){return e=e||or(),!("file:"!==cr()||!e.toLowerCase().match(/iphone|ipad|ipod|android/))}function Zn(){var e=uu.window;try{return!(!e||e==e.top)}catch(e){return!1}}function er(){return au.INTERNAL.hasOwnProperty("reactNative")?"ReactNative":au.INTERNAL.hasOwnProperty("node")?"Node":"Browser"}function tr(){var e=er();return"ReactNative"===e||"Node"===e}function nr(e){var t=e.toLowerCase();return g(t,"opera/")||g(t,"opr/")||g(t,"opios/")?"Opera":g(t,"iemobile")?"IEMobile":g(t,"msie")||g(t,"trident/")?"IE":g(t,"edge/")?"Edge":g(t,"firefox/")?el:g(t,"silk/")?"Silk":g(t,"blackberry")?"Blackberry":g(t,"webos")?"Webos":!g(t,"safari/")||g(t,"chrome/")||g(t,"crios/")||g(t,"android")?!g(t,"chrome/")&&!g(t,"crios/")||g(t,"edge/")?g(t,"android")?"Android":(e=e.match(/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/))&&2==e.length?e[1]:"Other":tl:"Safari"}function rr(e,t){t=t||[];var n,r=[],o={};for(n in nl)o[nl[n]]=!0;for(n=0;n<t.length;n++)"undefined"!==typeof o[t[n]]&&(delete o[t[n]],r.push(t[n]));return r.sort(),t=r,t.length||(t=["FirebaseCore-web"]),r=er(),o="",(o="Browser"===r?nr(or()):r)+"/JsCore/"+e+"/"+t.join(",")}function or(){return uu.navigator&&uu.navigator.userAgent||""}function ir(e,t){e=e.split("."),t=t||uu;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 ar(){try{var e=uu.localStorage,t=dr();if(e)return e.setItem(t,"1"),e.removeItem(t),!Bn()||!!uu.indexedDB}catch(e){}return!1}function sr(){return(ur()||"chrome-extension:"===cr()||Jn())&&!tr()&&ar()}function ur(){return"http:"===cr()||"https:"===cr()}function cr(){return uu.location&&uu.location.protocol||null}function lr(e){return e=e||or(),!Gn(e)&&nr(e)!=el}function hr(e){return"undefined"===typeof e?null:Fe(e)}function fr(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 pr(e){if(null!==e)return JSON.parse(e)}function dr(e){return e||""+Math.floor(1e9*Math.random()).toString()}function yr(e){return e=e||or(),"Safari"!=nr(e)&&!e.toLowerCase().match(/iphone|ipad|ipod/)}function vr(){var e=uu.___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 mr(){var e=uu.navigator;return!e||"boolean"!==typeof e.onLine||!ur()&&"chrome-extension:"!==cr()&&"undefined"===typeof e.connection||e.onLine}function gr(e,t,n,r){if(e>t)throw Error("Short delay should be less than long delay!");this.c=e,this.b=t,e=n||or(),r=r||er(),this.a=Gn(e)||"ReactNative"===r}function _r(){var e=uu.document;return!e||"undefined"===typeof e.visibilityState||"visible"==e.visibilityState}function br(){var e=uu.document,t=null;return _r()||!e?te():new J(function(n){t=function(){_r()&&(e.removeEventListener("visibilitychange",t,!1),n())},e.addEventListener("visibilitychange",t,!1)}).s(function(n){throw e.removeEventListener("visibilitychange",t,!1),n})}function wr(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 Er(e,t,n){rl?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,value:n}):e[t]=n}function Cr(e,t){if(t)for(var n in t)t.hasOwnProperty(n)&&Er(e,n,t[n])}function Tr(e){var t={};return Cr(t,e),t}function Sr(e){var t,n={};for(t in e)e.hasOwnProperty(t)&&(n[t]=e[t]);return n}function Or(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 Nr(e){var t=e;if("object"==typeof e&&null!=e){t="length"in e?[]:{};for(var n in e)Er(t,n,Nr(e[n]))}return t}function Pr(e){var t={},n=e[al],r=e[sl];if(e=e[ul],!n||!e)throw Error("Invalid provider user info!");t[ll]=r||null,t[cl]=n,Er(this,fl,e),Er(this,hl,Nr(t))}function Ir(e,t){this.code=pl+e,this.message=t||dl[e]||""}function Rr(e){var t=e&&e.code;return t?new Ir(t.substring(pl.length),e.message):null}function Ar(e){var t=e[gl];if("undefined"===typeof t)throw new Ir("missing-continue-uri");if("string"!==typeof t||"string"===typeof t&&!t.length)throw new Ir("invalid-continue-uri");this.h=t,this.c=this.a=null,this.g=!1;var n=e[yl];if(n&&"object"===typeof n){t=n[wl];var r=n[_l];if(n=n[bl],"string"===typeof t&&t.length){if(this.a=t,"undefined"!==typeof r&&"boolean"!==typeof r)throw new Ir("argument-error",_l+" property must be a boolean when specified.");if(this.g=!!r,"undefined"!==typeof n&&("string"!==typeof n||"string"===typeof n&&!n.length))throw new Ir("argument-error",bl+" property must be a non empty string when specified.");this.c=n||null}else{if("undefined"!==typeof t)throw new Ir("argument-error",wl+" property must be a non empty string when specified.");if("undefined"!==typeof r||"undefined"!==typeof n)throw new Ir("missing-android-pkg-name")}}else if("undefined"!==typeof n)throw new Ir("argument-error",yl+" property must be a non null object when specified.");if(this.b=null,(t=e[ml])&&"object"===typeof t){if("string"===typeof(t=t[El])&&t.length)this.b=t;else if("undefined"!==typeof t)throw new Ir("argument-error",El+" property must be a non empty string when specified.")}else if("undefined"!==typeof t)throw new Ir("argument-error",ml+" property must be a non null object when specified.");if("undefined"!==typeof(e=e[vl])&&"boolean"!==typeof e)throw new Ir("argument-error",vl+" property must be a boolean when specified.");if((this.f=!!e)&&!this.b&&!this.a)throw new Ir("argument-error",vl+" property can't be true when no mobile application is provided.")}function kr(e){var t={};t.continueUrl=e.h,t.canHandleCodeInApp=e.f,(t.androidPackageName=e.a)&&(t.androidMinimumVersion=e.c,t.androidInstallApp=e.g),t.iOSBundleId=e.b;for(var n in t)null===t[n]&&delete t[n];return t}function xr(e){this.b=e.sub,hu(),this.a=e.provider_id||e.firebase&&e.firebase.sign_in_provider||null}function Dr(e){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{var r=JSON.parse(Nt(e));if(r.sub&&r.iss&&r.aud&&r.exp)return new xr(r)}catch(e){}return null}function Mr(e){for(var t in Sl)if(Sl[t].Na==e)return Sl[t];return null}function Lr(e){var t={};t["facebook.com"]=Ur,t["google.com"]=Br,t["github.com"]=Wr,t["twitter.com"]=Vr;var n=e&&e[Nl];try{if(n)return t[n]?new t[n](e):new Fr(e);if("undefined"!==typeof e[Ol])return new jr(e)}catch(e){}return null}function jr(e){var t=e[Nl];if(!t&&e[Ol]){var n=Dr(e[Ol]);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),Er(this,"providerId",t),Er(this,"isNewUser",n)}function Fr(e){jr.call(this,e),e=pr(e.rawUserInfo||"{}"),Er(this,"profile",Nr(e||{}))}function Ur(e){if(Fr.call(this,e),"facebook.com"!=this.providerId)throw Error("Invalid provider ID!")}function Wr(e){if(Fr.call(this,e),"github.com"!=this.providerId)throw Error("Invalid provider ID!");Er(this,"username",this.profile&&this.profile.login||null)}function Br(e){if(Fr.call(this,e),"google.com"!=this.providerId)throw Error("Invalid provider ID!")}function Vr(e){if(Fr.call(this,e),"twitter.com"!=this.providerId)throw Error("Invalid provider ID!");Er(this,"username",e.screenName||null)}function qr(e,t){return e.then(function(e){if(e[Il]){var n=Dr(e[Il]);if(!n||t!=n.b)throw new Ir("user-mismatch");return e}throw new Ir("user-mismatch")}).s(function(e){throw e&&e.code&&e.code==pl+"user-not-found"?new Ir("user-mismatch"):e})}function Hr(e,t){if(t.idToken||t.accessToken)t.idToken&&Er(this,"idToken",t.idToken),t.accessToken&&Er(this,"accessToken",t.accessToken);else{if(!t.oauthToken||!t.oauthTokenSecret)throw new Ir("internal-error","failed to construct a credential");Er(this,"accessToken",t.oauthToken),Er(this,"secret",t.oauthTokenSecret)}Er(this,"providerId",e)}function Kr(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:cn(t).toString(),requestUri:"http://localhost"}}function Gr(e,t){this.rc=t||[],Cr(this,{providerId:e,isOAuthProvider:!0}),this.rb={},this.Wa=(Mr(e)||{}).Ma||null,this.Ua=null}function zr(e){Gr.call(this,e,Tl),this.a=[]}function Qr(){zr.call(this,"facebook.com")}function Xr(e){if(!e)throw new Ir("argument-error","credential failed: expected 1 argument (the OAuth access token).");var t=e;return c(e)&&(t=e.accessToken),(new Qr).credential(null,t)}function Yr(){zr.call(this,"github.com")}function $r(e){if(!e)throw new Ir("argument-error","credential failed: expected 1 argument (the OAuth access token).");var t=e;return c(e)&&(t=e.accessToken),(new Yr).credential(null,t)}function Jr(){zr.call(this,"google.com"),this.sa("profile")}function Zr(e,t){var n=e;return c(e)&&(n=e.idToken,t=e.accessToken),(new Jr).credential(n,t)}function eo(){Gr.call(this,"twitter.com",Cl)}function to(e,t){var n=e;if(c(n)||(n={oauthToken:e,oauthTokenSecret:t}),!n.oauthToken||!n.oauthTokenSecret)throw new Ir("argument-error","credential failed: expected 2 arguments (the OAuth access token and secret).");return new Hr("twitter.com",n)}function no(e,t){this.a=e,this.f=t,Er(this,"providerId","password")}function ro(){Cr(this,{providerId:"password",isOAuthProvider:!1})}function oo(e){if(!(e.Pa&&e.Oa||e.Da&&e.Y))throw new Ir("internal-error");this.a=e,Er(this,"providerId","phone")}function io(e){return e.a.Da&&e.a.Y?{temporaryProof:e.a.Da,phoneNumber:e.a.Y}:{sessionInfo:e.a.Pa,code:e.a.Oa}}function ao(e){try{this.a=e||au.auth()}catch(e){throw new Ir("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().")}Cr(this,{providerId:"phone",isOAuthProvider:!1})}function so(e,t){if(!e)throw new Ir("missing-verification-id");if(!t)throw new Ir("missing-verification-code");return new oo({Pa:e,Oa:t})}function uo(e){if(e.temporaryProof&&e.phoneNumber)return new oo({Da:e.temporaryProof,Y: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 Zr(e,n);case"facebook.com":return Xr(n);case"github.com":return $r(n);case"twitter.com":return to(n,r);default:return new zr(t).credential(e,n)}}catch(e){return null}}function co(e){if(!e.isOAuthProvider)throw new Ir("invalid-oauth-provider")}function lo(e,t,n,r,o){if(this.b=e,this.c=t||null,this.f=n||null,this.g=r||null,this.a=o||null,!this.f&&!this.a)throw new Ir("invalid-auth-event");if(this.f&&this.a)throw new Ir("invalid-auth-event");if(this.f&&!this.g)throw new Ir("invalid-auth-event")}function ho(e){return e=e||{},e.type?new lo(e.type,e.eventId,e.urlResponse,e.sessionId,e.error&&Rr(e.error)):null}function fo(e){var t="unauthorized-domain",n=void 0,r=tn(e);e=r.b,r=r.c,"chrome-extension"==r?n=v("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=v("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",Ir.call(this,t,n)}function po(e,t,n){Ir.call(this,e,n),e=t||{},e.sb&&Er(this,"email",e.sb),e.Y&&Er(this,"phoneNumber",e.Y),e.credential&&Er(this,"credential",e.credential)}function yo(e){if(e.code){var t=e.code||"";0==t.indexOf(pl)&&(t=t.substring(pl.length));var n={credential:uo(e)};if(e.email)n.sb=e.email;else{if(!e.phoneNumber)return new Ir(t,e.message||void 0);n.Y=e.phoneNumber}return new po(t,n,e.message)}return null}function vo(e){this.f=e}function mo(e,t,n){var r="Node"==er();if(!(r=uu.XMLHttpRequest||r&&au.INTERNAL.node&&au.INTERNAL.node.XMLHttpRequest))throw new Ir("internal-error","The XMLHttpRequest compatibility library was not found.");this.b=e,e=t||{},this.i=e.secureTokenEndpoint||"https://securetoken.googleapis.com/v1/token",this.l=e.secureTokenTimeout||Rl,this.c=M(e.secureTokenHeaders||Al),this.g=e.firebaseEndpoint||"https://www.googleapis.com/identitytoolkit/v3/relyingparty/",this.h=e.firebaseTimeout||kl,this.a=M(e.firebaseHeaders||xl),n&&(this.a["X-Client-Version"]=n,this.c["X-Client-Version"]=n),this.f=new Fn,this.o=new vo(r)}function go(e,t){t?e.a["X-Firebase-Locale"]=t:delete e.a["X-Firebase-Locale"]}function _o(e,t){t?(e.a["X-Client-Version"]=t,e.c["X-Client-Version"]=t):(delete e.a["X-Client-Version"],delete e.c["X-Client-Version"])}function bo(e,t,n,r,o,i,a){mr()?(Kn()?e=f(e.m,e):(Pl||(Pl=new J(function(e,t){wo(e,t)})),e=f(e.u,e)),e(t,n,r,o,i,a)):n&&n(null)}function wo(e,t){if(((window.gapi||{}).client||{}).request)e();else{uu[Ml]=function(){((window.gapi||{}).client||{}).request?e():t(Error("CORS_UNSUPPORTED"))};xt(xn(Te(Dl,{onload:Ml})),function(){t(Error("CORS_UNSUPPORTED"))})}}function Eo(e,t){return new J(function(n,r){"refresh_token"==t.grant_type&&t.refresh_token||"authorization_code"==t.grant_type&&t.code?bo(e,e.i+"?key="+encodeURIComponent(e.b),function(e){e?e.error?r(Wo(e)):e.access_token&&e.refresh_token?n(e):r(new Ir("internal-error")):r(new Ir("network-request-failed"))},"POST",cn(t).toString(),e.c,e.l.get()):r(new Ir("internal-error"))})}function Co(e,t,n,r,o,i){var a=tn(e.g+t);Zt(a,"key",e.b),i&&Zt(a,"cb",hu().toString());var s="GET"==n;if(s)for(var u in r)r.hasOwnProperty(u)&&Zt(a,u,r[u]);return new J(function(t,i){bo(e,a.toString(),function(e){e?e.error?i(Wo(e,o||{})):t(e):i(new Ir("network-request-failed"))},n,s?void 0:Fe(fr(r)),e.a,e.h.get())})}function To(e){if(!Yc.test(e.email))throw new Ir("invalid-email")}function So(e){"email"in e&&To(e)}function Oo(e,t){return Fo(e,Bl,{identifier:t,continueUri:ur()?Vn():"http://localhost"}).then(function(e){return e.allProviders||[]})}function No(e){return Fo(e,zl,{}).then(function(e){return e.authorizedDomains||[]})}function Po(e){if(!e[Il])throw new Ir("internal-error")}function Io(e){if(e.phoneNumber||e.temporaryProof){if(!e.phoneNumber||!e.temporaryProof)throw new Ir("internal-error")}else{if(!e.sessionInfo)throw new Ir("missing-verification-id");if(!e.code)throw new Ir("missing-verification-code")}}function Ro(e,t){return Fo(e,Yl,t)}function Ao(e,t,n){return Fo(e,ql,{idToken:t,deleteProvider:n})}function ko(e){if(!e.requestUri||!e.sessionId&&!e.postBody)throw new Ir("internal-error")}function xo(e){var t=null;if(e.needConfirmation?(e.code="account-exists-with-different-credential",t=yo(e)):"FEDERATED_USER_ID_ALREADY_LINKED"==e.errorMessage?(e.code="credential-already-in-use",t=yo(e)):"EMAIL_EXISTS"==e.errorMessage?(e.code="email-already-in-use",t=yo(e)):e.errorMessage&&(t=Uo(e.errorMessage)),t)throw t;if(!e[Il])throw new Ir("internal-error")}function Do(e,t){return t.returnIdpCredential=!0,Fo(e,eh,t)}function Mo(e,t){return t.returnIdpCredential=!0,Fo(e,nh,t)}function Lo(e,t){return t.returnIdpCredential=!0,t.autoCreate=!1,Fo(e,th,t)}function jo(e){if(!e.oobCode)throw new Ir("invalid-action-code")}function Fo(e,t,n){if(!Or(n,t.ea))return ne(new Ir("internal-error"));var r,o=t.zb||"POST";return te(n).then(t.D).then(function(){return t.T&&(n.returnSecureToken=!0),Co(e,t.endpoint,o,n,t.Pb,t.nb||!1)}).then(function(e){return r=e}).then(t.O).then(function(){if(!t.ga)return r;if(!(t.ga in r))throw new Ir("internal-error");return r[t.ga]})}function Uo(e){return Wo({error:{errors:[{message:e}],code:400,message:e}})}function Wo(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 Ir(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",INVALID_IDENTIFIER:"invalid-email",MISSING_CONTINUE_URI:"internal-error",INVALID_EMAIL:"invalid-email",INVALID_PASSWORD:"wrong-password",USER_DISABLED:"user-disabled",MISSING_PASSWORD:"internal-error",EMAIL_EXISTS:"email-already-in-use",PASSWORD_LOGIN_DISABLED:"operation-not-allowed",INVALID_IDP_RESPONSE:"invalid-credential",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"},L(r,t||{}),t=(t=n.match(/^[^\s]+\s*:\s*(.*)$/))&&1<t.length?t[1]:void 0;for(var o in r)if(0===n.indexOf(o))return new Ir(r[o],t);return!t&&e&&(t=hr(e)),new Ir("internal-error",t)}function Bo(e){for(var t in uh)if(uh[t].id===e)return e=uh[t],{firebaseEndpoint:e.Va,secureTokenEndpoint:e.ab};return null}function Vo(e){this.b=e,this.a=null,this.Ya=qo(this)}function qo(e){return Go().then(function(){return new J(function(t,n){ir("gapi.iframes.getContext")().open({where:document.body,url:e.b,messageHandlersFilter:ir("gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER"),attributes:{style:{position:"absolute",top:"-100px",width:"1px",height:"1px"}},dontclear:!0},function(r){function o(){clearTimeout(i),t()}e.a=r,e.a.restyle({setHideOnLeave:!1});var i=setTimeout(function(){n(Error("Network Error"))},hh.get());r.ping(o).then(o,function(){n(Error("Network Error"))})})})})}function Ho(e,t){return e.Ya.then(function(){return new J(function(n){e.a.send(t.type,t,n,ir("gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER"))})})}function Ko(e,t){e.Ya.then(function(){e.a.register("authEvent",t,ir("gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER"))})}function Go(){return fh||(fh=new J(function(e,t){if(mr()){var n=function(){vr(),ir("gapi.load")("gapi.iframes",{callback:e,ontimeout:function(){vr(),t(Error("Network Error"))},timeout:lh.get()})};if(ir("gapi.iframes.Iframe"))e();else if(ir("gapi.load"))n();else{var r="__iframefcb"+Math.floor(1e6*Math.random()).toString();uu[r]=function(){ir("gapi.load")?n():t(Error("Network Error"))},r=Te(ch,{onload:r}),te(xn(r)).s(function(){t(Error("Network Error"))})}}else t(Error("Network Error"))}).s(function(e){throw fh=null,e}))}function zo(e,t,n){this.i=e,this.g=t,this.h=n,this.f=null,this.a=nn(this.i,"/__/auth/iframe"),Zt(this.a,"apiKey",this.g),Zt(this.a,"appName",this.h),this.b=null,this.c=[]}function Qo(e,t,n,r,o){this.m=e,this.u=t,this.c=n,this.l=r,this.i=this.g=this.h=null,this.a=o,this.f=null}function Xo(e){try{return au.app(e).auth().Ka()}catch(e){return[]}}function Yo(e,t,n,r,o){this.u=e,this.f=t,this.b=n,this.c=r||null,this.h=o||null,this.m=this.o=this.v=null,this.g=[],this.l=this.a=null}function $o(e){var t=Vn();return No(e).then(function(e){e:{var n=tn(t),r=n.c;n=n.b;for(var o=0;o<e.length;o++){var i=e[o],a=n,s=r;if(0==i.indexOf("chrome-extension://")?a=tn(i).b==a&&"chrome-extension"==s:"http"!=s&&"https"!=s?a=!1:Zc.test(i)?a=a==i:(i=i.split(".").join("\\."),a=new RegExp("^(.+\\."+i+"|"+i+")$","i").test(a)),a){e=!0;break e}}e=!1}if(!e)throw new fo(Vn())})}function Jo(e){return e.l?e.l:(e.l=Yn().then(function(){if(!e.o){var t=e.c,n=e.h,r=Xo(e.b),o=new zo(e.u,e.f,e.b);o.f=t,o.b=n,o.c=P(r||[]),e.o=o.toString()}e.i=new Vo(e.o),ti(e)}),e.l)}function Zo(e){return e.m||(e.v=e.c?rr(e.c,Xo(e.b)):null,e.m=new mo(e.f,Bo(e.h),e.v)),e.m}function ei(e,t,n,r,o,i,a,s,u,c){return e=new Qo(e,t,n,r,o),e.h=i,e.g=a,e.i=s,e.b=M(u||null),e.f=c,e.toString()}function ti(e){if(!e.i)throw Error("IfcHandler must be initialized!");Ko(e.i,function(t){var n={};if(t&&t.authEvent){var r=!1;for(t=ho(t.authEvent),n=0;n<e.g.length;n++)r=e.g[n](t)||r;return n={},n.status=r?"ACK":"ERROR",te(n)}return n.status="ERROR",te(n)})}function ni(e){var t={type:"webStorageSupport"};return Jo(e).then(function(){return Ho(e.i,t)}).then(function(e){if(e&&e.length&&"undefined"!==typeof e[0].webStorageSupport)return e[0].webStorageSupport;throw Error()})}function ri(e){if(this.a=e||au.INTERNAL.reactNative&&au.INTERNAL.reactNative.AsyncStorage,!this.a)throw new Ir("internal-error","The React Native compatibility library was not found.")}function oi(){this.a={}}function ii(e,t,n,r,o,i){try{var a=!!uu.indexedDB}catch(e){a=!1}if(!a)throw new Ir("web-storage-unsupported");this.u=e,this.h=t,this.g=n,this.l=r,this.m=o,this.f={},this.c=[],this.a=0,this.o=i||uu.indexedDB}function ai(e){return new J(function(t,n){var r=e.o.open(e.u,e.m);r.onerror=function(e){n(Error(e.target.errorCode))},r.onupgradeneeded=function(t){t=t.target.result;try{t.createObjectStore(e.h,{keyPath:e.g})}catch(e){n(e)}},r.onsuccess=function(e){t(e.target.result)}})}function si(e){return e.i||(e.i=ai(e)),e.i}function ui(e,t){return t.objectStore(e.h)}function ci(e,t,n){return t.transaction([e.h],n?"readwrite":"readonly")}function li(e){return new J(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 hi(e){function t(){return e.b=vt(800).then(f(e.zc,e)).then(function(t){0<t.length&&Eu(e.c,function(e){e(t)})}).then(t).s(function(e){"STOP_EVENT"!=e.message&&t()}),e.b}e.b&&e.b.cancel("STOP_EVENT"),t()}function fi(){if(!di()){if("Node"==er())throw new Ir("internal-error","The LocalStorage compatibility library was not found.");throw new Ir("web-storage-unsupported")}this.a=pi()||au.INTERNAL.node.localStorage}function pi(){try{var e=uu.localStorage,t=dr();return e&&(e.setItem(t,"1"),e.removeItem(t)),e}catch(e){return null}}function di(){var e="Node"==er();if(!(e=pi()||e&&au.INTERNAL.node&&au.INTERNAL.node.localStorage))return!1;try{return e.setItem("__sak","1"),e.removeItem("__sak"),!0}catch(e){return!1}}function yi(){}function vi(){if(!gi()){if("Node"==er())throw new Ir("internal-error","The SessionStorage compatibility library was not found.");throw new Ir("web-storage-unsupported")}this.a=mi()||au.INTERNAL.node.sessionStorage}function mi(){try{var e=uu.sessionStorage,t=dr();return e&&(e.setItem(t,"1"),e.removeItem(t)),e}catch(e){return null}}function gi(){var e="Node"==er();if(!(e=mi()||e&&au.INTERNAL.node&&au.INTERNAL.node.sessionStorage))return!1;try{return e.setItem("__sak","1"),e.removeItem("__sak"),!0}catch(e){return!1}}function _i(){var e={};e.Browser=vh,e.Node=mh,e.ReactNative=gh,this.a=e[er()]}function bi(e){var t=new Ir("invalid-persistence-type"),n=new Ir("unsupported-persistence-type");e:{for(r in _h)if(_h[r]==e){var r=!0;break e}r=!1}if(!r||"string"!==typeof e)throw t;switch(er()){case"ReactNative":if("session"===e)throw n;break;case"Node":if("none"!==e)throw n;break;default:if(!ar()&&"none"!==e)throw n}}function wi(e,t,n,r,o){this.i=e,this.g=t,this.A=n,this.u=r,this.v=o,this.a={},dh||(dh=new _i),e=dh;try{if(Bn()){ph||(ph=new ii("firebaseLocalStorageDb","firebaseLocalStorage","fbase_key","value",1));var i=ph}else i=new e.a.C;this.l=i}catch(e){this.l=new oi,this.u=!0}try{this.o=new e.a.jb}catch(e){this.o=new oi}this.w=new oi,this.h=f(this.m,this),this.b={}}function Ei(){return yh||(yh=new wi("firebase",":",!(yr(or())||!Zn()),lr(),ar())),yh}function Ci(e,t){switch(t){case"session":return e.o;case"none":return e.w;default:return e.l}}function Ti(e,t,n){return e.i+e.g+t.name+(n?e.g+n:"")}function Si(e,t,n){return n=Ti(e,t,n),"local"==t.C&&(e.b[n]=null),Ci(e,t.C).X(n)}function Oi(e,t,n,r){t=Ti(e,t,n),e.v&&(e.b[t]=uu.localStorage.getItem(t)),x(e.a)&&(Ci(e,"local").ia(e.h),e.u||Bn()||!e.v||Pi(e)),e.a[t]||(e.a[t]=[]),e.a[t].push(r)}function Ni(e,t,n){t=Ti(e,cs("local"),t),e.a[t]&&(O(e.a[t],function(e){return e==n}),0==e.a[t].length&&delete e.a[t]),x(e.a)&&Ri(e)}function Pi(e){Ii(e),e.f=setInterval(function(){for(var t in e.a){var n=uu.localStorage.getItem(t),r=e.b[t];n!=r&&(e.b[t]=n,n=new Ke({type:"storage",key:t,target:window,oldValue:r,newValue:n,a:!0}),e.m(n))}},1e3)}function Ii(e){e.f&&(clearInterval(e.f),e.f=null)}function Ri(e){Ci(e,"local").da(e.h),Ii(e)}function Ai(e){this.a=e,this.b=Ei()}function ki(e){return e.b.get(bh,e.a).then(function(e){return ho(e)})}function xi(){this.a=Ei()}function Di(e,t,n,r,o,i,a){this.u=e,this.i=t,this.l=n,this.m=r||null,this.o=a||null,this.h=t+":"+n,this.A=new xi,this.g=new Ai(this.h),this.f=null,this.b=[],this.v=o||500,this.w=i||2e3,this.a=this.c=null}function Mi(e){return new Ir("invalid-cordova-configuration",e)}function Li(){for(var e=20,t=[];0<e;)t.push("1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".charAt(Math.floor(62*Math.random()))),e--;return t.join("")}function ji(e){var t=new Ht;qt(t,e),e=[];var n=8*t.g;56>t.c?qt(t,Mc,56-t.c):qt(t,Mc,t.b-(t.c-56));for(var r=63;56<=r;r--)t.f[r]=255&n,n/=256;for(Vt(t),r=n=0;r<t.i;r++)for(var o=24;0<=o;o-=8)e[n++]=t.a[r]>>o&255;return Ot(e)}function Fi(e,t,n,r){var o=Li(),i=new lo(t,r,null,o,new Ir("no-auth-event")),a=ir("BuildInfo.packageName",uu);if("string"!==typeof a)throw new Ir("invalid-cordova-configuration");var s=ir("BuildInfo.displayName",uu),u={};if(or().toLowerCase().match(/iphone|ipad|ipod/))u.ibi=a;else{if(!or().toLowerCase().match(/android/))return ne(new Ir("operation-not-supported-in-this-environment"));u.apn=a}s&&(u.appDisplayName=s),o=ji(o),u.sessionId=o;var c=ei(e.u,e.i,e.l,t,n,null,r,e.m,u,e.o);return e.ba().then(function(){var t=e.h;return e.A.a.set(bh,i.B(),t)}).then(function(){var t=ir("cordova.plugins.browsertab.isAvailable",uu);if("function"!==typeof t)throw new Ir("invalid-cordova-configuration");var n=null;t(function(t){if(t){if("function"!==typeof(n=ir("cordova.plugins.browsertab.openUrl",uu)))throw new Ir("invalid-cordova-configuration");n(c)}else{if("function"!==typeof(n=ir("cordova.InAppBrowser.open",uu)))throw new Ir("invalid-cordova-configuration");t=or(),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 Ui(e,t){for(var n=0;n<e.b.length;n++)try{e.b[n](t)}catch(e){}}function Wi(e){return e.f||(e.f=e.ba().then(function(){return new J(function(t){function n(r){return t(r),e.Ja(n),!1}e.ua(n),Vi(e)})})),e.f}function Bi(e){var t=null;return ki(e.g).then(function(n){return t=n,n=e.g,Si(n.b,bh,n.a)}).then(function(){return t})}function Vi(e){function t(t){o=!0,i&&i.cancel(),Bi(e).then(function(n){var o=r;if(n&&t&&t.url){o=null;var i=t.url,a=tn(i),s=en(a,"link"),u=en(tn(s),"link");a=en(a,"deep_link_id"),i=en(tn(a),"link")||a||u||s||i,-1!=i.indexOf("/__/auth/callback")&&(o=tn(i),o=pr(en(o,"firebaseError")||null),o=(o="object"===typeof o?Rr(o):null)?new lo(n.b,n.c,null,null,o):new lo(n.b,n.c,i,n.g)),o=o||r}Ui(e,o)})}var n=ir("universalLinks.subscribe",uu);if("function"!==typeof n)throw new Ir("invalid-cordova-configuration");var r=new lo("unknown",null,null,null,new Ir("no-auth-event")),o=!1,i=vt(e.v).then(function(){return Bi(e).then(function(){o||Ui(e,r)})}),a=uu.handleOpenURL;uu.handleOpenURL=function(e){if(0==e.toLowerCase().indexOf(ir("BuildInfo.packageName",uu).toLowerCase()+"://")&&t({url:e}),"function"===typeof a)try{a(e)}catch(e){console.error(e)}},n(null,t)}function qi(e){this.a=e,this.b=Ei()}function Hi(e){return e.b.set(wh,"pending",e.a)}function Ki(e){return Si(e.b,wh,e.a)}function Gi(e){return e.b.get(wh,e.a).then(function(e){return"pending"==e})}function zi(e,t,n){this.v=e,this.l=t,this.u=n,this.h=[],this.f=!1,this.i=f(this.m,this),this.c=new ea,this.o=new sa,this.g=new qi(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.o,this.b.linkViaPopup=this.o,this.b.reauthViaPopup=this.o,this.a=Qi(this.v,this.l,this.u,jl)}function Qi(e,t,n,r){var o=au.SDK_VERSION||null;return Jn()?new Di(e,t,n,o,void 0,void 0,r):new Yo(e,t,n,o,r)}function Xi(e){e.f||(e.f=!0,e.a.ua(e.i));var t=e.a;return e.a.ba().s(function(n){throw e.a==t&&e.reset(),n})}function Yi(e){e.a.Db()&&Xi(e).s(function(t){var n=new lo("unknown",null,null,null,new Ir("operation-not-supported-in-this-environment"));Ji(t)&&e.m(n)}),e.a.yb()||ta(e.c)}function $i(e,t,n,r,o,i){return e.a.vb(t,n,r,function(){e.f||(e.f=!0,e.a.ua(e.i))},function(){e.reset()},o,i)}function Ji(e){return!(!e||"auth/cordova-not-ready"!=e.code)}function Zi(e,t,n){var r=t+":"+n;return Th[r]||(Th[r]=new zi(e,t,n)),Th[r]}function ea(){this.b=null,this.f=[],this.c=[],this.a=null,this.g=!1}function ta(e){e.g||(e.g=!0,ia(e,!1,null,null))}function na(e,t,n){n=n.va(t.b,t.c);var r=t.f,o=t.g,i=!!t.b.match(/Redirect$/);return n(r,o).then(function(t){ia(e,i,t,null)}).s(function(t){ia(e,i,null,t)})}function ra(e,t){if(e.b=function(){return ne(t)},e.c.length)for(var n=0;n<e.c.length;n++)e.c[n](t)}function oa(e,t){if(e.b=function(){return te(t)},e.f.length)for(var n=0;n<e.f.length;n++)e.f[n](t)}function ia(e,t,n,r){t?r?ra(e,r):oa(e,n):oa(e,{user:null}),e.f=[],e.c=[]}function aa(e){var t=new Ir("timeout");e.a&&e.a.cancel(),e.a=vt(Ch.get()).then(function(){e.b||ia(e,!0,null,t)})}function sa(){}function ua(e,t){var n=e.c,r=e.b;return t.va(r,n)(e.f,e.g).then(function(e){t.fa(r,e,null,n)}).s(function(e){t.fa(r,null,e,n)})}function ca(e,t){this.a=t,Er(this,"verificationId",e)}function la(e,t,n,r){return new ao(e).Qa(t,n).then(function(e){return new ca(e,r)})}function ha(e,t,n,r,o,i){if(this.h=e,this.i=t,this.g=n,this.c=r,this.f=o,this.l=!!i,this.b=null,this.a=this.c,this.f<this.c)throw Error("Proactive refresh lower bound greater than upper bound!")}function fa(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 pa(e,t){da(e),e.b=vt(fa(e,t)).then(function(){return e.l?te():br()}).then(function(){return e.h()}).then(function(){pa(e,!0)}).s(function(t){e.i(t)&&pa(e,!1)})}function da(e){e.b&&(e.b.cancel(),e.b=null)}function ya(e){this.f=e,this.b=this.a=null,this.c=0}function va(e,t){var n=t[Il],r=t.refreshToken;t=ma(t.expiresIn),e.b=n,e.c=t,e.a=r}function ma(e){return hu()+1e3*parseInt(e,10)}function ga(e,t){return Eo(e.f,t).then(function(t){return e.b=t.access_token,e.c=ma(t.expires_in),e.a=t.refresh_token,{accessToken:e.b,expirationTime:e.c,refreshToken:e.a}}).s(function(t){throw"auth/user-token-expired"==t.code&&(e.a=null),t})}function _a(e,t){this.a=e||null,this.b=t||null,Cr(this,{lastSignInTime:wr(t||null),creationTime:wr(e||null)})}function ba(e){return new _a(e.a,e.b)}function wa(e,t,n,r,o,i){Cr(this,{uid:e,displayName:r||null,photoURL:o||null,email:n||null,phoneNumber:i||null,providerId:t})}function Ea(e,t){He.call(this,e);for(var n in t)this[n]=t[n]}function Ca(e,t,n){this.A=[],this.G=e.apiKey,this.o=e.appName,this.w=e.authDomain||null,e=au.SDK_VERSION?rr(au.SDK_VERSION):null,this.c=new mo(this.G,Bo(jl),e),this.h=new ya(this.c),Aa(this,t[Il]),va(this.h,t),Er(this,"refreshToken",this.h.a),Ma(this,n||{}),lt.call(this),this.I=!1,this.w&&sr()&&(this.a=Zi(this.w,this.G,this.o)),this.N=[],this.i=null,this.l=Pa(this),this.U=f(this.Ga,this);var r=this;this.ha=null,this.ra=function(e){r.na(e.h)},this.W=null,this.R=[],this.qa=function(e){Sa(r,e.f)},this.V=null}function Ta(e,t){e.W&&nt(e.W,"languageCodeChanged",e.ra),(e.W=t)&&Je(t,"languageCodeChanged",e.ra)}function Sa(e,t){e.R=t,_o(e.c,au.SDK_VERSION?rr(au.SDK_VERSION,e.R):null)}function Oa(e,t){e.V&&nt(e.V,"frameworkChanged",e.qa),(e.V=t)&&Je(t,"frameworkChanged",e.qa)}function Na(e){try{return au.app(e.o).auth()}catch(t){throw new Ir("internal-error","No firebase.auth.Auth instance is available for the Firebase App '"+e.o+"'!")}}function Pa(e){return new ha(function(){return e.F(!0)},function(e){return!(!e||"auth/network-request-failed"!=e.code)},function(){var t=e.h.c-hu()-3e5;return 0<t?t:0},3e4,96e4,!1)}function Ia(e){e.m||e.l.b||(e.l.start(),nt(e,"tokenChanged",e.U),Je(e,"tokenChanged",e.U))}function Ra(e){nt(e,"tokenChanged",e.U),da(e.l)}function Aa(e,t){e.pa=t,Er(e,"_lat",t)}function ka(e,t){O(e.N,function(e){return e==t})}function xa(e){for(var t=[],n=0;n<e.N.length;n++)t.push(e.N[n](e));return ie(t).then(function(){return e})}function Da(e){e.a&&!e.I&&(e.I=!0,e.a.subscribe(e))}function Ma(e,t){Cr(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 _a(t.createdAt,t.lastLoginAt),providerData:[]})}function La(){}function ja(e){return te().then(function(){if(e.m)throw new Ir("app-deleted")})}function Fa(e){return Cu(e.providerData,function(e){return e.providerId})}function Ua(e,t){t&&(Wa(e,t.providerId),e.providerData.push(t))}function Wa(e,t){O(e.providerData,function(e){return e.providerId==t})}function Ba(e,t,n){("uid"!=t||n)&&e.hasOwnProperty(t)&&Er(e,t,n)}function Va(e,t){e!=t&&(Cr(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?Er(e,"metadata",ba(t.metadata)):Er(e,"metadata",new _a),Eu(t.providerData,function(t){Ua(e,t)}),e.h=t.h,Er(e,"refreshToken",e.h.a))}function qa(e){return e.F().then(function(t){var n=e.isAnonymous;return Ka(e,t).then(function(){return n||Ba(e,"isAnonymous",!1),t})})}function Ha(e,t){t[Il]&&e.pa!=t[Il]&&(va(e.h,t),ht(e,new Ea("tokenChanged")),Aa(e,t[Il]),Ba(e,"refreshToken",e.h.a))}function Ka(e,t){return Fo(e.c,Hl,{idToken:t}).then(f(e.kc,e))}function Ga(e){return(e=e.providerUserInfo)&&e.length?Cu(e,function(e){return new wa(e.rawId,e.providerId,e.email,e.displayName,e.photoUrl,e.phoneNumber)}):[]}function za(e,t){return qa(e).then(function(){if(T(Fa(e),t))return xa(e).then(function(){throw new Ir("provider-already-linked")})})}function Qa(e,t,n){var r=uo(t);return t=Lr(t),Tr({user:e,credential:r,additionalUserInfo:t,operationType:n})}function Xa(e,t){return Ha(e,t),e.reload().then(function(){return e})}function Ya(e,t,n,r,o){if(!sr())return ne(new Ir("operation-not-supported-in-this-environment"));if(e.i&&!o)return ne(e.i);var i=Mr(n.providerId),a=dr(e.uid+":::"),s=null;(!lr()||Zn())&&e.w&&n.isOAuthProvider&&(s=ei(e.w,e.G,e.o,t,n,null,a,au.SDK_VERSION||null));var u=Qn(s,i&&i.za,i&&i.ya);return r=r().then(function(){if(Ja(e),!o)return e.F().then(function(){})}).then(function(){return $i(e.a,u,t,n,a,!!s)}).then(function(){return new J(function(n,r){e.fa(t,null,new Ir("cancelled-popup-request"),e.g||null),e.f=n,e.v=r,e.g=a,e.b=e.a.Ca(e,t,u,a)})}).then(function(e){return u&&zn(u),e?Tr(e):null}).s(function(e){throw u&&zn(u),e}),Za(e,r,o)}function $a(e,t,n,r,o){if(!sr())return ne(new Ir("operation-not-supported-in-this-environment"));if(e.i&&!o)return ne(e.i);var i=null,a=dr(e.uid+":::");return r=r().then(function(){if(Ja(e),!o)return e.F().then(function(){})}).then(function(){return e.Z=a,xa(e)}).then(function(t){return e.ca&&(t=e.ca,t=t.b.set(Sh,e.B(),t.a)),t}).then(function(){return e.a.Aa(t,n,a)}).s(function(t){if(i=t,e.ca)return os(e.ca);throw i}).then(function(){if(i)throw i}),Za(e,r,o)}function Ja(e){if(!e.a||!e.I){if(e.a&&!e.I)throw new Ir("internal-error");throw new Ir("auth-domain-config-required")}}function Za(e,t,n){var r=es(e,t,n);return e.A.push(r),ae(r,function(){S(e.A,r)}),r}function es(e,t,n){return e.i&&!n?(t.cancel(),ne(e.i)):t.s(function(t){throw!t||"auth/user-disabled"!=t.code&&"auth/user-token-expired"!=t.code||(e.i||ht(e,new Ea("userInvalidated")),e.i=t),t})}function ts(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[Il]=e.stsTokenManager.accessToken,n.refreshToken=e.stsTokenManager.refreshToken||null,n.expiresIn=(e.stsTokenManager.expirationTime-hu())/1e3;var r=new Ca(t,n,e);return e.providerData&&Eu(e.providerData,function(e){e&&Ua(r,Tr(e))}),e.redirectEventId&&(r.Z=e.redirectEventId),r}function ns(e,t,n,r){var o=new Ca(e,t);return n&&(o.ca=n),r&&Sa(o,r),o.reload().then(function(){return o})}function rs(e){this.a=e,this.b=Ei()}function os(e){return Si(e.b,Sh,e.a)}function is(e,t){return e.b.get(Sh,e.a).then(function(e){return e&&t&&(e.authDomain=t),ts(e||{})})}function as(e,t){this.a=e,this.b=t||Ei(),this.c=null,this.f=us(this),Oi(this.b,cs("local"),this.a,f(this.g,this))}function ss(e,t){var n,r=[];for(n in _h)_h[n]!==t&&r.push(Si(e.b,cs(_h[n]),e.a));return r.push(Si(e.b,Oh,e.a)),oe(r)}function us(e){var t=cs("local"),n=cs("session"),r=cs("none");return e.b.get(n,e.a).then(function(o){return o?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(Oh,e.a).then(function(e){return e?cs(e):t})})})}).then(function(t){return e.c=t,ss(e,t.C)}).s(function(){e.c||(e.c=t)})}function cs(e){return{name:"authUser",C:e}}function ls(e){return ds(e,function(){return e.b.set(Oh,e.c.C,e.a)})}function hs(e,t){return ds(e,function(){return e.b.set(e.c,t.B(),e.a)})}function fs(e){return ds(e,function(){return Si(e.b,e.c,e.a)})}function ps(e,t){return ds(e,function(){return e.b.get(e.c,e.a).then(function(e){return e&&t&&(e.authDomain=t),ts(e||{})})})}function ds(e,t){return e.f=e.f.then(t,t),e.f}function ys(e){if(this.l=!1,Er(this,"app",e),!Ns(this).options||!Ns(this).options.apiKey)throw new Ir("invalid-api-key");e=au.SDK_VERSION?rr(au.SDK_VERSION):null,this.c=new mo(Ns(this).options&&Ns(this).options.apiKey,Bo(jl),e),this.N=[],this.m=[],this.I=[],this.Kb=au.INTERNAL.createSubscribe(f(this.ac,this)),this.R=void 0,this.Lb=au.INTERNAL.createSubscribe(f(this.bc,this)),Es(this,null),this.h=new as(Ns(this).options.apiKey+":"+Ns(this).name),this.G=new rs(Ns(this).options.apiKey+":"+Ns(this).name),this.U=ks(this,Ts(this)),this.i=ks(this,Ss(this)),this.W=!1,this.ha=f(this.yc,this),this.Ga=f(this.ka,this),this.pa=f(this.Tb,this),this.qa=f(this.Zb,this),this.ra=f(this.$b,this),bs(this),this.INTERNAL={},this.INTERNAL.delete=f(this.delete,this),this.INTERNAL.logFramework=f(this.gc,this),this.o=0,lt.call(this),gs(this),this.A=[]}function vs(e){He.call(this,"languageCodeChanged"),this.h=e}function ms(e){He.call(this,"frameworkChanged"),this.f=e}function gs(e){Object.defineProperty(e,"lc",{get:function(){return this.$()},set:function(e){this.na(e)},enumerable:!1}),e.V=null}function _s(e){return e.Jb||ne(new Ir("auth-domain-config-required"))}function bs(e){var t=Ns(e).options.authDomain,n=Ns(e).options.apiKey;t&&sr()&&(e.Jb=e.U.then(function(){if(!e.l){if(e.a=Zi(t,n,Ns(e).name),e.a.subscribe(e),Ps(e)&&Da(Ps(e)),e.w){Da(e.w);var r=e.w;r.na(e.$()),Ta(r,e),r=e.w,Sa(r,e.A),Oa(r,e),e.w=null}return e.a}}))}function ws(e,t){var n={};return n.apiKey=Ns(e).options.apiKey,n.authDomain=Ns(e).options.authDomain,n.appName=Ns(e).name,e.U.then(function(){return ns(n,t,e.G,e.Ka())}).then(function(t){return Ps(e)&&t.uid==Ps(e).uid?(Va(Ps(e),t),e.ka(t)):(Es(e,t),Da(t),e.ka(t))}).then(function(){Rs(e)})}function Es(e,t){Ps(e)&&(ka(Ps(e),e.Ga),nt(Ps(e),"tokenChanged",e.pa),nt(Ps(e),"userDeleted",e.qa),nt(Ps(e),"userInvalidated",e.ra),Ra(Ps(e))),t&&(t.N.push(e.Ga),Je(t,"tokenChanged",e.pa),Je(t,"userDeleted",e.qa),Je(t,"userInvalidated",e.ra),0<e.o&&Ia(t)),Er(e,"currentUser",t),t&&(t.na(e.$()),Ta(t,e),Sa(t,e.A),Oa(t,e))}function Cs(e){var t=is(e.G,Ns(e).options.authDomain).then(function(t){return(e.w=t)&&(t.ca=e.G),os(e.G)});return ks(e,t)}function Ts(e){var t=Ns(e).options.authDomain,n=Cs(e).then(function(){return ps(e.h,t)}).then(function(t){return t?(t.ca=e.G,e.w&&(e.w.Z||null)==(t.Z||null)?t:t.reload().then(function(){return hs(e.h,t).then(function(){return t})}).s(function(n){return"auth/network-request-failed"==n.code?t:fs(e.h)})):null}).then(function(t){Es(e,t||null)});return ks(e,n)}function Ss(e){return e.U.then(function(){return e.aa()}).s(function(){}).then(function(){if(!e.l)return e.ha()}).s(function(){}).then(function(){if(!e.l){e.W=!0;var t=e.h;Oi(t.b,cs("local"),t.a,e.ha)}})}function Os(e,t){var n=null,r=null;return ks(e,t.then(function(t){return n=uo(t),r=Lr(t),ws(e,t)}).then(function(){return Tr({user:Ps(e),credential:n,additionalUserInfo:r,operationType:"signIn"})}))}function Ns(e){return e.app}function Ps(e){return e.currentUser}function Is(e){return Ps(e)&&Ps(e)._lat||null}function Rs(e){if(e.W){for(var t=0;t<e.m.length;t++)e.m[t]&&e.m[t](Is(e));if(e.R!==e.getUid()&&e.I.length)for(e.R=e.getUid(),t=0;t<e.I.length;t++)e.I[t]&&e.I[t](Is(e))}}function As(e,t){e.I.push(t),ks(e,e.i.then(function(){!e.l&&T(e.I,t)&&e.R!==e.getUid()&&(e.R=e.getUid(),t(Is(e)))}))}function ks(e,t){return e.N.push(t),ae(t,function(){S(e.N,t)}),t}function xs(e,t,n,r){e:{n=Array.prototype.slice.call(n);for(var o=0,i=!1,a=0;a<t.length;a++)if(t[a].optional)i=!0;else{if(i)throw new Ir("internal-error","Argument validator encountered a required argument after an optional argument.");o++}if(i=t.length,n.length<o||i<n.length)r="Expected "+(o==i?1==o?"1 argument":o+" arguments":o+"-"+i+" arguments")+" but got "+n.length+".";else{for(o=0;o<n.length;o++)if(i=t[o].optional&&void 0===n[o],!t[o].M(n[o])&&!i){if(t=t[o],0>o||o>=Nh.length)throw new Ir("internal-error","Argument validator received an unsupported number of arguments.");n=Nh[o],r=(r?"":n+" argument ")+(t.name?'"'+t.name+'" ':"")+"must be "+t.K+".";break e}r=null}}if(r)throw new Ir("argument-error",e+" failed: "+r)}function Ds(t,n){return{name:t||"",K:"a valid string",optional:!!n,M:e}}function Ms(){return{name:"opt_forceRefresh",K:"a boolean",optional:!0,M:t}}function Ls(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 Fs(e,t){return{name:e||"",K:"null",optional:!!t,M:i}}function Us(){return{name:"",K:"an HTML element",optional:!1,M:function(e){return!!(e&&e instanceof Element)}}}function Ws(){return{name:"auth",K:"an instance of Firebase Auth",optional:!0,M:function(e){return!!(e&&e instanceof ys)}}}function Bs(){return{name:"app",K:"an instance of Firebase App",optional:!0,M:function(e){return!!(e&&e instanceof au.app.App)}}}function Vs(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.wa||!n)}}}function qs(){return{name:"authProvider",K:"a valid Auth provider",optional:!1,M:function(e){return!!(e&&e.providerId&&e.hasOwnProperty&&e.hasOwnProperty("isOAuthProvider"))}}}function Hs(){return{name:"applicationVerifier",K:"an implementation of firebase.auth.ApplicationVerifier",optional:!1,M:function(t){return!!(t&&e(t.type)&&u(t.verify))}}}function Ks(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 Gs(e,t,n,r,o,i){if(Er(this,"type","recaptcha"),this.b=this.c=null,this.m=!1,this.l=t,this.a=n||{theme:"light",type:"image"},this.g=[],this.a[Rh])throw new Ir("argument-error","sitekey should not be provided for reCAPTCHA as one is automatically provisioned for the current project.");if(this.h="invisible"===this.a[Ah],!xe(t)||!this.h&&xe(t).hasChildNodes())throw new Ir("argument-error","reCAPTCHA container is either not found or already contains inner elements!");this.u=new mo(e,i||null,o||null),this.o=r||function(){return null};var a=this;this.i=[];var s=this.a[Ph];this.a[Ph]=function(e){if(zs(a,e),"function"===typeof s)s(e);else if("string"===typeof s){var t=ir(s,uu);"function"===typeof t&&t(e)}};var u=this.a[Ih];this.a[Ih]=function(){if(zs(a,null),"function"===typeof u)u();else if("string"===typeof u){var e=ir(u,uu);"function"===typeof e&&e()}}}function zs(e,t){for(var n=0;n<e.i.length;n++)try{e.i[n](t)}catch(e){}}function Qs(e,t){O(e.i,function(e){return e==t})}function Xs(e,t){return e.g.push(t),ae(t,function(){S(e.g,t)}),t}function Ys(e){if(e.m)throw new Ir("internal-error","RecaptchaVerifier instance has been destroyed.")}function $s(){this.b=uu.grecaptcha?1/0:0,this.c=null,this.a="__rcb"+Math.floor(1e6*Math.random()).toString()}function Js(e,t){return new J(function(n,r){if(mr())if(!uu.grecaptcha||t!==e.c&&!e.b){uu[e.a]=function(){if(uu.grecaptcha){e.c=t;var o=uu.grecaptcha.render;uu.grecaptcha.render=function(t,n){return t=o(t,n),e.b++,t},n()}else r(new Ir("internal-error"));delete uu[e.a]};var o=Te(kh,{onload:e.a,hl:t||""});te(xn(o)).s(function(){r(new Ir("internal-error","Unable to load external reCAPTCHA dependencies!"))})}else n();else r(new Ir("network-request-failed"))})}function Zs(){return xh||(xh=new $s),xh}function eu(e,t,n){try{this.f=n||au.app()}catch(e){throw new Ir("argument-error","No firebase.app.App instance is currently initialized.")}if(!this.f.options||!this.f.options.apiKey)throw new Ir("invalid-api-key");n=this.f.options.apiKey;var r=this,o=null;try{o=this.f.auth().Ka()}catch(e){}o=au.SDK_VERSION?rr(au.SDK_VERSION,o):null,Gs.call(this,n,e,t,function(){try{var e=r.f.auth().$()}catch(t){e=null}return e},o,Bo(jl))}function tu(e,t){for(var n in t){var r=t[n].name;e[r]=ru(r,e[n],t[n].j)}}function nu(e,t,n,r){e[t]=ru(t,n,r)}function ru(e,t,n){function r(){var e=Array.prototype.slice.call(arguments);return xs(i,n,e),t.apply(this,e)}if(!n)return t;var o,i=ou(e);for(o in t)r[o]=t[o];for(o in t.prototype)r.prototype[o]=t.prototype[o];return r}function ou(e){return e=e.split("."),e[e.length-1]}var iu,au=n(13).default,su=su||{},uu=this,cu="closure_uid_"+(1e9*Math.random()>>>0),lu=0,hu=Date.now||function(){return+new Date};d(y,Error),y.prototype.name="CustomError";var fu=String.prototype.trim?function(e){return e.trim()}:function(e){return e.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},pu=/&/g,du=/</g,yu=/>/g,vu=/"/g,mu=/'/g,gu=/\x00/g,_u=/[\x00&<>"']/;d(b,y),b.prototype.name="AssertionError";var bu,wu=Array.prototype.indexOf?function(e,t,n){return Array.prototype.indexOf.call(e,t,n)}:function(t,n,r){if(r=null==r?0:0>r?Math.max(0,t.length+r):r,e(t))return e(n)&&1==n.length?t.indexOf(n,r):-1;for(;r<t.length;r++)if(r in t&&t[r]===n)return r;return-1},Eu=Array.prototype.forEach?function(e,t,n){Array.prototype.forEach.call(e,t,n)}:function(t,n,r){for(var o=t.length,i=e(t)?t.split(""):t,a=0;a<o;a++)a in i&&n.call(r,i[a],a,t)},Cu=Array.prototype.map?function(e,t,n){return Array.prototype.map.call(e,t,n)}:function(t,n,r){for(var o=t.length,i=Array(o),a=e(t)?t.split(""):t,s=0;s<o;s++)s in a&&(i[s]=n.call(r,a[s],s,t));return i},Tu=Array.prototype.some?function(e,t,n){return Array.prototype.some.call(e,t,n)}:function(t,n,r){for(var o=t.length,i=e(t)?t.split(""):t,a=0;a<o;a++)if(a in i&&n.call(r,i[a],a,t))return!0;return!1};e:{var Su=uu.navigator;if(Su){var Ou=Su.userAgent;if(Ou){bu=Ou;break e}}bu=""}var Nu="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");j[" "]=r;var Pu,Iu=I("Opera"),Ru=I("Trident")||I("MSIE"),Au=I("Edge"),ku=Au||Ru,xu=I("Gecko")&&!(g(bu.toLowerCase(),"webkit")&&!I("Edge"))&&!(I("Trident")||I("MSIE"))&&!I("Edge"),Du=g(bu.toLowerCase(),"webkit")&&!I("Edge");e:{var Mu="",Lu=function(){var e=bu;return xu?/rv\:([^\);]+)(\)|;)/.exec(e):Au?/Edge\/([\d\.]+)/.exec(e):Ru?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(e):Du?/WebKit\/(\S+)/.exec(e):Iu?/(?:Version)[ \/]?(\S+)/.exec(e):void 0}();if(Lu&&(Mu=Lu?Lu[1]:""),Ru){var ju=U();if(null!=ju&&ju>parseFloat(Mu)){Pu=String(ju);break e}}Pu=Mu}var Fu,Uu={},Wu=uu.document;Fu=Wu&&Ru?U()||("CSS1Compat"==Wu.compatMode?parseInt(Pu,10):5):void 0,q.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 Bu=new q(function(){return new G},function(e){e.reset()},100);G.prototype.set=function(e,t){this.a=e,this.b=t,this.next=null},G.prototype.reset=function(){this.next=this.b=this.a=null};var Vu,qu,Hu=!1,Ku=new function(){this.b=this.a=null},Gu=0,zu=2,Qu=3;Z.prototype.reset=function(){this.f=this.b=this.g=this.a=null,this.c=!1};var Xu=new q(function(){return new Z},function(e){e.reset()},100);J.prototype.then=function(e,t,n){return ce(this,u(e)?e:null,u(t)?t:null,n)},B(J),iu=J.prototype,iu.s=function(e,t){return ce(this,null,e,t)},iu.cancel=function(e){this.a==Gu&&X(function(){se(this,new ge(e))},this)},iu.Ac=function(e){this.a=Gu,le(this,zu,e)},iu.Bc=function(e){this.a=Gu,le(this,Qu,e)},iu.Qb=function(){for(var e;e=de(this);)ye(this,e,this.a,this.i);this.h=!1};var Yu=z;d(ge,y),ge.prototype.name="cancel";var $u=!Ru||9<=Number(Fu);_e.prototype.la=!0,_e.prototype.ja=function(){return this.a},_e.prototype.toString=function(){return"Const{"+this.a+"}"};var Ju={};we(""),Ee.prototype.la=!0,Ee.prototype.ja=function(){return this.a},Ee.prototype.toString=function(){return"TrustedResourceUrl{"+this.a+"}"};var Zu=/%{(\w+)}/g,ec=/^(?:https:)?\/\/[0-9a-z.:[\]-]+\/|^\/[^\/\\]|^about:blank(#|$)/i,tc={};Oe.prototype.la=!0,Oe.prototype.ja=function(){return this.a},Oe.prototype.toString=function(){return"SafeUrl{"+this.a+"}"};var nc=/^(?:(?:https?|mailto|ftp):|[^:\/?#]*(?:[\/?#]|$))/i,rc={};Ie("about:blank"),Re.prototype.la=!0,Re.prototype.ja=function(){return this.a},Re.prototype.toString=function(){return"SafeHtml{"+this.a+"}"};var oc={};ke("<!DOCTYPE html>"),ke(""),ke("<br>");var ic={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"},ac={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\u000b"},sc=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g,uc=0,cc={};Ve.prototype.oa=!1,Ve.prototype.ta=function(){if(this.Fa)for(;this.Fa.length;)this.Fa.shift()()};var lc=Object.freeze||function(e){return e},hc=!Ru||9<=Number(Fu),fc=Ru&&!W("9"),pc=function(){if(!uu.addEventListener||!Object.defineProperty)return!1;var e=!1,t=Object.defineProperty({},"passive",{get:function(){e=!0}});return uu.addEventListener("test",r,t),uu.removeEventListener("test",r,t),e}();He.prototype.c=function(){this.Bb=!1},d(Ke,He);var dc=lc({2:"touch",3:"pen",4:"mouse"});Ke.prototype.c=function(){Ke.ib.c.call(this);var e=this.a;if(e.preventDefault)e.preventDefault();else if(e.returnValue=!1,fc)try{(e.ctrlKey||112<=e.keyCode&&123>=e.keyCode)&&(e.keyCode=-1)}catch(e){}},Ke.prototype.g=function(){return this.a};var yc="closure_listenable_"+(1e6*Math.random()|0),vc=0,mc="closure_lm_"+(1e6*Math.random()|0),gc={},_c=0,bc="__closure_events_fn_"+(1e9*Math.random()>>>0);d(lt,Ve),lt.prototype[yc]=!0,lt.prototype.removeEventListener=function(e,t,n,r){nt(this,e,t,n,r)},lt.prototype.ta=function(){if(lt.ib.ta.call(this),this.u){var e,t=this.u,n=0;for(e in t.a){for(var r=t.a[e],o=0;o<r.length;o++)++n,ze(r[o]);delete t.a[e],t.b--}}this.Ra=null},mt.prototype.a=null;var wc=0;mt.prototype.reset=function(e,t,n,r,o){"number"==typeof o||wc++,r||hu(),this.b=t,delete this.a},_t.prototype.toString=function(){return this.name};var Ec=new _t("SEVERE",1e3),Cc=new _t("CONFIG",700),Tc=new _t("FINE",500);gt.prototype.log=function(e,t,n){if(e.value>=bt(this).value)for(u(t)&&(t=t()),e=new mt(e,String(t),this.f),n&&(e.a=n),n="log:"+e.b,(e=uu.console)&&e.timeStamp&&e.timeStamp(n),(e=uu.msWriteProfilerMark)&&e(n),n=this;n;)n=n.a};var Sc={},Oc=null;iu=Et.prototype,iu.P=function(){Ct(this);for(var e=[],t=0;t<this.a.length;t++)e.push(this.b[this.a[t]]);return e},iu.S=function(){return Ct(this),this.a.concat()},iu.clear=function(){this.b={},this.c=this.a.length=0},iu.get=function(e,t){return Tt(this.b,e)?this.b[e]:t},iu.set=function(e,t){Tt(this.b,e)||(this.c++,this.a.push(e)),this.b[e]=t},iu.forEach=function(e,t){for(var n=this.S(),r=0;r<n.length;r++){var o=n[r],i=this.get(o);e.call(t,i,o,this)}};var Nc=null,Pc=null;Rt.prototype.cancel=function(e){if(this.a)this.c instanceof Rt&&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.o,this):this.u=!0,this.a||(e=new Ft,kt(this),At(this,!1,e))}},Rt.prototype.m=function(e,t){this.i=!1,At(this,e,t)},Rt.prototype.A=function(e){kt(this),At(this,!0,e)},Rt.prototype.then=function(e,t,n){var r,o,i=new J(function(e,t){r=e,o=t});return Dt(this,r,function(e){e instanceof Ft?i.cancel():o(e)}),i.then(e,t,n)},B(Rt),d(jt,y),jt.prototype.message="Deferred has already fired",jt.prototype.name="AlreadyCalledError",d(Ft,y),Ft.prototype.message="Deferred was canceled",Ft.prototype.name="CanceledError",Ut.prototype.c=function(){throw delete Rc[this.a],this.b};var Ic,Rc={};d(Bt,Wt);for(var Ac=64,kc=Ac-1,xc=[],Dc=0;Dc<kc;Dc++)xc[Dc]=0;var Mc=N(128,xc);Bt.prototype.reset=function(){this.g=this.c=0,this.a=uu.Int32Array?new Int32Array(this.h):P(this.h)};var Lc=[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(Ht,Bt);var jc=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],Fc=/^(?:([^:\/?#.]+):)?(?:\/\/(?:([^\/?#]*)@)?([^\/#?]*?)(?::([0-9]+))?(?=[\/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/;Xt.prototype.toString=function(){var e=[],t=this.c;t&&e.push(on(t,Uc,!0),":");var n=this.b;return(n||"file"==t)&&(e.push("//"),(t=this.l)&&e.push(on(t,Uc,!0),"@"),e.push(encodeURIComponent(String(n)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(n=this.i)&&e.push(":",String(n))),(n=this.g)&&(this.b&&"/"!=n.charAt(0)&&e.push("/"),e.push(on(n,"/"==n.charAt(0)?Bc:Wc,!0))),(n=this.a.toString())&&e.push("?",n),(n=this.h)&&e.push("#",on(n,qc)),e.join("")};var Uc=/[#\/\?@]/g,Wc=/[\#\?:]/g,Bc=/[\#\?]/g,Vc=/[\#\?@]/g,qc=/#/g;iu=sn.prototype,iu.clear=function(){this.a=this.c=null,this.b=0},iu.forEach=function(e,t){un(this),this.a.forEach(function(n,r){Eu(n,function(n){e.call(t,n,r,this)},this)},this)},iu.S=function(){un(this);for(var e=this.a.P(),t=this.a.S(),n=[],r=0;r<t.length;r++)for(var o=e[r],i=0;i<o.length;i++)n.push(t[r]);return n},iu.P=function(t){un(this);var n=[];if(e(t))fn(this,t)&&(n=N(n,this.a.get(dn(this,t))));else{t=this.a.P();for(var r=0;r<t.length;r++)n=N(n,t[r])}return n},iu.set=function(e,t){return un(this),this.c=null,e=dn(this,e),fn(this,e)&&(this.b-=this.a.get(e).length),this.a.set(e,[t]),this.b+=1,this},iu.get=function(e,t){return e=e?this.P(e):[],0<e.length?String(e[0]):t},iu.toString=function(){if(this.c)return this.c;if(!this.a)return"";for(var e=[],t=this.a.S(),n=0;n<t.length;n++){var r=t[n],o=encodeURIComponent(String(r));r=this.P(r);for(var i=0;i<r.length;i++){var a=o;""!==r[i]&&(a+="="+encodeURIComponent(String(r[i]))),e.push(a)}}return this.c=e.join("&")},vn.prototype.c=null;var Hc;d(gn,vn),gn.prototype.a=function(){var e=_n(this);return e?new ActiveXObject(e):new XMLHttpRequest},gn.prototype.b=function(){var e={};return _n(this)&&(e[0]=!0,e[1]=!0),e},Hc=new gn,d(bn,lt);var Kc="",Gc=bn.prototype,zc=wt("goog.net.XhrIo");Gc.J=zc;var Qc=/^https?$/i,Xc=["POST","PUT"];iu=bn.prototype,iu.Ea=function(){"undefined"!=typeof su&&this.a&&(this.g="Timed out after "+this.f+"ms, aborting",St(this.J,kn(this,this.g)),ht(this,"timeout"),this.abort(8))},iu.abort=function(){this.a&&this.b&&(St(this.J,kn(this,"Aborting")),this.b=!1,this.c=!0,this.a.abort(),this.c=!1,ht(this,"complete"),ht(this,"abort"),Nn(this))},iu.ta=function(){this.a&&(this.b&&(this.b=!1,this.c=!0,this.a.abort(),this.c=!1),Nn(this,!0)),bn.ib.ta.call(this)},iu.Ab=function(){this.oa||(this.G||this.h||this.c?On(this):this.jc())},iu.jc=function(){On(this)},iu.getResponse=function(){try{if(!this.a)return null;if("response"in this.a)return this.a.response;switch(this.l){case Kc:case"text":return this.a.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in this.a)return this.a.mozResponseArrayBuffer}var e=this.J;return e&&e.log(Ec,"Response type "+this.l+" is not supported on this browser",void 0),null}catch(e){return St(this.J,"Can not get response: "+e.message),null}};var Yc=/^[+a-zA-Z0-9_.!#$%&'*\/=?^`{|}~-]+@([a-zA-Z0-9-]+\.)+[a-zA-Z0-9]{2,63}$/,$c=0,Jc=1;d(jn,y),d(Fn,vn),Fn.prototype.a=function(){var e=new XMLHttpRequest;if("withCredentials"in e)return e;if("undefined"!=typeof XDomainRequest)return new Un;throw Error("Unsupported browser")},Fn.prototype.b=function(){return{}},iu=Un.prototype,iu.open=function(e,t,n){if(null!=n&&!n)throw Error("Only async requests are supported.");this.a.open(e,t)},iu.send=function(e){if(e){if("string"!=typeof e)throw Error("Only string data is supported");this.a.send(e)}else this.a.send()},iu.abort=function(){this.a.abort()},iu.setRequestHeader=function(){},iu.getResponseHeader=function(e){return"content-type"==e.toLowerCase()?this.a.contentType:""},iu.Wb=function(){this.status=200,this.responseText=this.a.responseText,Wn(this,4)},iu.xb=function(){this.status=500,this.responseText="",Wn(this,4)},iu.Yb=function(){this.xb()},iu.Xb=function(){this.status=200,Wn(this,1)},iu.getAllResponseHeaders=function(){return"content-type: "+this.a.contentType};var Zc=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,el="Firefox",tl="Chrome",nl={Gc:"FirebaseCore-web",Ic:"FirebaseUI-web"};gr.prototype.get=function(){return this.a?this.b:this.c};var rl,ol={};try{var il={};Object.defineProperty(il,"abcd",{configurable:!0,enumerable:!0,value:1}),Object.defineProperty(il,"abcd",{configurable:!0,enumerable:!0,value:2}),rl=2==il.abcd}catch(e){rl=!1}var al="email",sl="newEmail",ul="requestType",cl="email",ll="fromEmail",hl="data",fl="operation";d(Ir,Error),Ir.prototype.B=function(){return{code:this.code,message:this.message}},Ir.prototype.toJSON=function(){return this.B()};var pl="auth/",dl={"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.","invalid-app-credential":"The phone verification request contains an invalid application verifier. The reCAPTCHA token response is either invalid or expired.","invalid-app-id":"The mobile app identifier is not registed for the current project.","invalid-user-token":"The user's credential is no longer valid. The user must sign in again.","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.","invalid-message-payload":"The email template corresponding to this action contains invalid characters in its message. Please fix by going to the Auth email templates section in the Firebase Console.","invalid-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."},yl="android",vl="handleCodeInApp",ml="iOS",gl="url",_l="installApp",bl="minimumVersion",wl="packageName",El="bundleId",Cl="oauth_consumer_key oauth_nonce oauth_signature oauth_signature_method oauth_timestamp oauth_token oauth_version".split(" "),Tl=["client_id","response_type","scope","redirect_uri","state"],Sl={Hc:{Ma:"locale",za:500,ya:600,Na:"facebook.com",$a:Tl},Jc:{Ma:null,za:500,ya:620,Na:"github.com",$a:Tl},Kc:{Ma:"hl",za:515,ya:680,Na:"google.com",$a:Tl},Qc:{Ma:"lang",za:485,ya:705,Na:"twitter.com",$a:Cl}},Ol="idToken",Nl="providerId";d(Fr,jr),d(Ur,Fr),d(Wr,Fr),d(Br,Fr),d(Vr,Fr),Hr.prototype.wa=function(e){return Do(e,Kr(this))},Hr.prototype.b=function(e,t){var n=Kr(this);return n.idToken=t,Mo(e,n)},Hr.prototype.c=function(e,t){return qr(Lo(e,Kr(this)),t)},Hr.prototype.B=function(){var e={providerId:this.providerId};return this.idToken&&(e.oauthIdToken=this.idToken),this.accessToken&&(e.oauthAccessToken=this.accessToken),this.secret&&(e.oauthTokenSecret=this.secret),e},Gr.prototype.Ba=function(e){return this.rb=M(e),this},d(zr,Gr),zr.prototype.sa=function(e){return T(this.a,e)||this.a.push(e),this},zr.prototype.wb=function(){return P(this.a)},zr.prototype.credential=function(e,t){if(!e&&!t)throw new Ir("argument-error","credential failed: must provide the ID token and/or the access token.");return new Hr(this.providerId,{idToken:e||null,accessToken:t||null})},d(Qr,zr),Er(Qr,"PROVIDER_ID","facebook.com"),d(Yr,zr),Er(Yr,"PROVIDER_ID","github.com"),d(Jr,zr),Er(Jr,"PROVIDER_ID","google.com"),d(eo,Gr),Er(eo,"PROVIDER_ID","twitter.com"),no.prototype.wa=function(e){return Fo(e,oh,{email:this.a,password:this.f})},no.prototype.b=function(e,t){return Fo(e,Jl,{idToken:t,email:this.a,password:this.f})},no.prototype.c=function(e,t){return qr(this.wa(e),t)},no.prototype.B=function(){return{email:this.a,password:this.f}},Cr(ro,{PROVIDER_ID:"password"}),oo.prototype.wa=function(e){return e.Qa(io(this))},oo.prototype.b=function(e,t){var n=io(this);return n.idToken=t,Fo(e,ah,n)},oo.prototype.c=function(e,t){var n=io(this);return n.operation="REAUTH",e=Fo(e,sh,n),qr(e,t)},oo.prototype.B=function(){var e={providerId:"phone"};return this.a.Pa&&(e.verificationId=this.a.Pa),this.a.Oa&&(e.verificationCode=this.a.Oa),this.a.Da&&(e.temporaryProof=this.a.Da),this.a.Y&&(e.phoneNumber=this.a.Y),e},ao.prototype.Qa=function(t,n){var r=this.a.c;return te(n.verify()).then(function(o){if(!e(o))throw new Ir("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 Ro(r,{phoneNumber:t,recaptchaToken:o}).then(function(e){return"function"===typeof n.reset&&n.reset(),e},function(e){throw"function"===typeof n.reset&&n.reset(),e});default:throw new Ir("argument-error",'Only firebase.auth.ApplicationVerifiers with type="recaptcha" are currently supported.')}})},Cr(ao,{PROVIDER_ID:"phone"}),lo.prototype.B=function(){return{type:this.b,eventId:this.c,urlResponse:this.f,sessionId:this.g,error:this.a&&this.a.B()}},d(fo,Ir),d(po,Ir),po.prototype.B=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.B();return t&&L(e,t),e},po.prototype.toJSON=function(){return this.B()},d(vo,vn),vo.prototype.a=function(){return new this.f},vo.prototype.b=function(){return{}};var Pl,Il="idToken",Rl=new gr(3e4,6e4),Al={"Content-Type":"application/x-www-form-urlencoded"},kl=new gr(3e4,6e4),xl={"Content-Type":"application/json"};mo.prototype.m=function(e,t,n,r,o,i){var a="Node"==er(),s=tr()?a?new bn(this.o):new bn:new bn(this.f);if(i){s.f=Math.max(0,i);var u=setTimeout(function(){ht(s,"timeout")},i)}ft(s,"complete",function(){u&&clearTimeout(u);var e=null;try{e=JSON.parse(An(this))||null}catch(t){e=null}t&&t(e)}),pt(s,"ready",function(){u&&clearTimeout(u),qe(this)}),pt(s,"timeout",function(){u&&clearTimeout(u),qe(this),t&&t(null)}),wn(s,e,n,r,o)};var Dl=we("https://apis.google.com/js/client.js?onload=%{onload}"),Ml="__fcb"+Math.floor(1e6*Math.random()).toString();mo.prototype.u=function(e,t,n,r,o){var i=this;Pl.then(function(){window.gapi.client.setApiKey(i.b);var a=window.gapi.auth.getToken();window.gapi.auth.setToken(null),window.gapi.client.request({path:e,method:n,body:r,headers:o,authType:"none",callback:function(e){window.gapi.auth.setToken(a),t&&t(e)}})}).s(function(e){t&&t({error:{message:e&&e.message||"CORS_UNSUPPORTED"}})})},mo.prototype.gb=function(){return Fo(this,Zl,{})},mo.prototype.kb=function(e,t){return Fo(this,$l,{idToken:e,email:t})},mo.prototype.lb=function(e,t){return Fo(this,Jl,{idToken:e,password:t})};var Ll={displayName:"DISPLAY_NAME",photoUrl:"PHOTO_URL"};iu=mo.prototype,iu.mb=function(e,t){var n={idToken:e},r=[];return R(Ll,function(e,o){var i=t[o];null===i?r.push(e):o in t&&(n[o]=i)}),r.length&&(n.deleteAttribute=r),Fo(this,$l,n)},iu.cb=function(e,t){return e={requestType:"PASSWORD_RESET",email:e},L(e,t),Fo(this,Gl,e)},iu.bb=function(e,t){return e={requestType:"VERIFY_EMAIL",idToken:e},L(e,t),Fo(this,Kl,e)},iu.Qa=function(e){return Fo(this,ih,e)},iu.Ta=function(e,t){return Fo(this,Xl,{oobCode:e,newPassword:t})},iu.Ia=function(e){return Fo(this,Ul,{oobCode:e})},iu.Sa=function(e){return Fo(this,Fl,{oobCode:e})};var jl,Fl={endpoint:"setAccountInfo",D:jo,ga:"email"},Ul={endpoint:"resetPassword",D:jo,O:function(e){if(!e.email||!e.requestType)throw new Ir("internal-error")}},Wl={endpoint:"signupNewUser",D:function(e){if(To(e),!e.password)throw new Ir("weak-password")},O:Po,T:!0},Bl={endpoint:"createAuthUri"},Vl={endpoint:"deleteAccount",ea:["idToken"]},ql={endpoint:"setAccountInfo",ea:["idToken","deleteProvider"],D:function(e){if(!a(e.deleteProvider))throw new Ir("internal-error")}},Hl={endpoint:"getAccountInfo"},Kl={endpoint:"getOobConfirmationCode",ea:["idToken","requestType"],D:function(e){if("VERIFY_EMAIL"!=e.requestType)throw new Ir("internal-error")},ga:"email"},Gl={endpoint:"getOobConfirmationCode",ea:["requestType"],D:function(e){if("PASSWORD_RESET"!=e.requestType)throw new Ir("internal-error");To(e)},ga:"email"},zl={nb:!0,endpoint:"getProjectConfig",zb:"GET"},Ql={nb:!0,endpoint:"getRecaptchaParam",zb:"GET",O:function(e){if(!e.recaptchaSiteKey)throw new Ir("internal-error")}},Xl={endpoint:"resetPassword",D:jo,ga:"email"},Yl={endpoint:"sendVerificationCode",ea:["phoneNumber","recaptchaToken"],ga:"sessionInfo"},$l={endpoint:"setAccountInfo",ea:["idToken"],D:So,T:!0},Jl={endpoint:"setAccountInfo",ea:["idToken"],D:function(e){if(So(e),!e.password)throw new Ir("weak-password")},O:Po,T:!0},Zl={endpoint:"signupNewUser",O:Po,T:!0},eh={endpoint:"verifyAssertion",D:ko,O:xo,T:!0},th={endpoint:"verifyAssertion",D:ko,O:function(e){if(e.errorMessage&&"USER_NOT_FOUND"==e.errorMessage)throw new Ir("user-not-found");if(e.errorMessage)throw Uo(e.errorMessage);if(!e[Il])throw new Ir("internal-error")},T:!0},nh={endpoint:"verifyAssertion",D:function(e){if(ko(e),!e.idToken)throw new Ir("internal-error")},O:xo,T:!0},rh={endpoint:"verifyCustomToken",D:function(e){if(!e.token)throw new Ir("invalid-custom-token")},O:Po,T:!0},oh={endpoint:"verifyPassword",D:function(e){if(To(e),!e.password)throw new Ir("wrong-password")},O:Po,T:!0},ih={endpoint:"verifyPhoneNumber",D:Io,O:Po},ah={endpoint:"verifyPhoneNumber",D:function(e){if(!e.idToken)throw new Ir("internal-error");Io(e)},O:function(e){if(e.temporaryProof)throw e.code="credential-already-in-use",yo(e);Po(e)}},sh={Pb:{USER_NOT_FOUND:"user-not-found"},endpoint:"verifyPhoneNumber",D:Io,O:Po},uh={Mc:{Va:"https://www.googleapis.com/identitytoolkit/v3/relyingparty/",ab:"https://securetoken.googleapis.com/v1/token",id:"p"},Oc:{Va:"https://staging-www.sandbox.googleapis.com/identitytoolkit/v3/relyingparty/",ab:"https://staging-securetoken.sandbox.googleapis.com/v1/token",id:"s"},Pc:{Va:"https://www-googleapis-test.sandbox.google.com/identitytoolkit/v3/relyingparty/",ab:"https://test-securetoken.sandbox.googleapis.com/v1/token",id:"t"}};jl=Bo("__EID__")?"__EID__":void 0;var ch=we("https://apis.google.com/js/api.js?onload=%{onload}"),lh=new gr(3e4,6e4),hh=new gr(5e3,15e3),fh=null;zo.prototype.toString=function(){return this.f?Zt(this.a,"v",this.f):hn(this.a.a,"v"),this.b?Zt(this.a,"eid",this.b):hn(this.a.a,"eid"),this.c.length?Zt(this.a,"fw",this.c.join(",")):hn(this.a.a,"fw"),this.a.toString()},Qo.prototype.toString=function(){var e=nn(this.m,"/__/auth/handler");if(Zt(e,"apiKey",this.u),Zt(e,"appName",this.c),Zt(e,"authType",this.l),this.a.isOAuthProvider){var t=this.a;try{var n=au.app(this.c).auth().$()}catch(e){n=null}t.Ua=n,Zt(e,"providerId",this.a.providerId),t=this.a,n=fr(t.rb);for(var r in n)n[r]=n[r].toString();r=t.rc,n=M(n);for(var o=0;o<r.length;o++){var i=r[o];i in n&&delete n[i]}t.Wa&&t.Ua&&!n[t.Wa]&&(n[t.Wa]=t.Ua),x(n)||Zt(e,"customParameters",hr(n))}if("function"===typeof this.a.wb&&(t=this.a.wb(),t.length&&Zt(e,"scopes",t.join(","))),this.h?Zt(e,"redirectUrl",this.h):hn(e.a,"redirectUrl"),this.g?Zt(e,"eventId",this.g):hn(e.a,"eventId"),this.i?Zt(e,"v",this.i):hn(e.a,"v"),this.b)for(var a in this.b)this.b.hasOwnProperty(a)&&!en(e,a)&&Zt(e,a,this.b[a]);return this.f?Zt(e,"eid",this.f):hn(e.a,"eid"),a=Xo(this.c),a.length&&Zt(e,"fw",a.join(",")),e.toString()},iu=Yo.prototype,iu.Ca=function(e,t,n){var r=new Ir("popup-closed-by-user"),o=new Ir("web-storage-unsupported"),i=this,a=!1;return this.ba().then(function(){ni(i).then(function(n){n||(e&&zn(e),t(o),a=!0)})}).s(function(){}).then(function(){if(!a)return Xn(e)}).then(function(){if(!a)return vt(n).then(function(){t(r)})})},iu.Db=function(){var e=or();return!lr(e)&&!yr(e)},iu.yb=function(){return!1},iu.vb=function(e,t,n,r,o,i,a){if(!e)return ne(new Ir("popup-blocked"));if(a&&!lr())return this.ba().s(function(t){zn(e),o(t)}),r(),te();this.a||(this.a=$o(Zo(this)));var s=this;return this.a.then(function(){var t=s.ba().s(function(t){throw zn(e),o(t),t});return r(),t}).then(function(){if(co(n),!a){qn(ei(s.u,s.f,s.b,t,n,null,i,s.c,void 0,s.h),e)}}).s(function(e){throw"auth/network-request-failed"==e.code&&(s.a=null),e})},iu.Aa=function(e,t,n){this.a||(this.a=$o(Zo(this)));var r=this;return this.a.then(function(){co(t),qn(ei(r.u,r.f,r.b,e,t,Vn(),n,r.c,void 0,r.h))}).s(function(e){throw"auth/network-request-failed"==e.code&&(r.a=null),e})},iu.ba=function(){var e=this;return Jo(this).then(function(){return e.i.Ya}).s(function(){throw e.a=null,new Ir("network-request-failed")})},iu.Hb=function(){return!0},iu.ua=function(e){this.g.push(e)},iu.Ja=function(e){O(this.g,function(t){return t==e})},iu=ri.prototype,iu.get=function(e){return te(this.a.getItem(e)).then(function(e){return e&&pr(e)})},iu.set=function(e,t){return te(this.a.setItem(e,hr(t)))},iu.X=function(e){return te(this.a.removeItem(e))},iu.ia=function(){},iu.da=function(){},iu=oi.prototype,iu.get=function(e){return te(this.a[e])},iu.set=function(e,t){return this.a[e]=t,te()},iu.X=function(e){return delete this.a[e],te()},iu.ia=function(){},iu.da=function(){};var ph;iu=ii.prototype,iu.set=function(e,t){var n,r=!1,o=this;return ae(si(this).then(function(t){return n=t,t=ui(o,ci(o,n,!0)),li(t.get(e))}).then(function(i){var a=ui(o,ci(o,n,!0));return i?(i.value=t,li(a.put(i))):(o.a++,r=!0,i={},i[o.g]=e,i[o.l]=t,li(a.add(i)))}).then(function(){o.f[e]=t}),function(){r&&o.a--})},iu.get=function(e){var t=this;return si(this).then(function(n){return li(ui(t,ci(t,n,!1)).get(e))}).then(function(e){return e&&e.value})},iu.X=function(e){var t=!1,n=this;return ae(si(this).then(function(r){return t=!0,n.a++,li(ui(n,ci(n,r,!0)).delete(e))}).then(function(){delete n.f[e]}),function(){t&&n.a--})},iu.zc=function(){var e=this;return si(this).then(function(t){var n=ui(e,ci(e,t,!1));return n.getAll?li(n.getAll()):new J(function(e,t){var r=[],o=n.openCursor();o.onsuccess=function(t){(t=t.target.result)?(r.push(t.value),t.continue()):e(r)},o.onerror=function(e){t(Error(e.target.errorCode))}})}).then(function(t){var n={},r=[];if(0==e.a){for(r=0;r<t.length;r++)n[t[r][e.g]]=t[r][e.l];r=Hn(e.f,n),e.f=n}return r})},iu.ia=function(e){0==this.c.length&&hi(this),this.c.push(e)},iu.da=function(e){O(this.c,function(t){return t==e}),0==this.c.length&&this.b&&this.b.cancel("STOP_EVENT")},iu=fi.prototype,iu.get=function(e){var t=this;return te().then(function(){return pr(t.a.getItem(e))})},iu.set=function(e,t){var n=this;return te().then(function(){var r=hr(t);null===r?n.X(e):n.a.setItem(e,r)})},iu.X=function(e){var t=this;return te().then(function(){t.a.removeItem(e)})},iu.ia=function(e){uu.window&&Je(uu.window,"storage",e)},iu.da=function(e){uu.window&&nt(uu.window,"storage",e)},iu=yi.prototype,iu.get=function(){return te(null)},iu.set=function(){return te()},iu.X=function(){return te()},iu.ia=function(){},iu.da=function(){},iu=vi.prototype,iu.get=function(e){var t=this;return te().then(function(){return pr(t.a.getItem(e))})},iu.set=function(e,t){var n=this;return te().then(function(){var r=hr(t);null===r?n.X(e):n.a.setItem(e,r)})},iu.X=function(e){var t=this;return te().then(function(){t.a.removeItem(e)})},iu.ia=function(){},iu.da=function(){};var dh,yh,vh={C:fi,jb:vi},mh={C:fi,jb:vi},gh={C:ri,jb:yi},_h={Lc:"local",NONE:"none",Nc:"session"};wi.prototype.get=function(e,t){return Ci(this,e.C).get(Ti(this,e,t))},wi.prototype.set=function(e,t,n){var r=Ti(this,e,n),o=this,i=Ci(this,e.C);return i.set(r,t).then(function(){return i.get(r)}).then(function(t){"local"==e.C&&(o.b[r]=t)})},wi.prototype.m=function(e){if(e&&e.g){var t=e.a.key;if(null==t)for(var n in this.a){var r=this.b[n];"undefined"===typeof r&&(r=null);var o=uu.localStorage.getItem(n);o!==r&&(this.b[n]=o,this.c(n))}else if(0==t.indexOf(this.i+this.g)&&this.a[t]){if("undefined"!==typeof e.a.a?Ci(this,"local").da(this.h):Ii(this),this.A)if(n=uu.localStorage.getItem(t),(r=e.a.newValue)!==n)null!==r?uu.localStorage.setItem(t,r):uu.localStorage.removeItem(t);else if(this.b[t]===r&&"undefined"===typeof e.a.a)return;var i=this;n=function(){"undefined"===typeof e.a.a&&i.b[t]===uu.localStorage.getItem(t)||(i.b[t]=uu.localStorage.getItem(t),i.c(t))},Ru&&Fu&&10==Fu&&uu.localStorage.getItem(t)!==e.a.newValue&&e.a.newValue!==e.a.oldValue?setTimeout(n,10):n()}}else Eu(e,f(this.c,this))},wi.prototype.c=function(e){this.a[e]&&Eu(this.a[e],function(e){e()})};var bh={name:"authEvent",C:"local"};iu=Di.prototype,iu.ba=function(){return this.xa?this.xa:this.xa=$n().then(function(){if("function"!==typeof ir("universalLinks.subscribe",uu))throw Mi("cordova-universal-links-plugin is not installed");if("undefined"===typeof ir("BuildInfo.packageName",uu))throw Mi("cordova-plugin-buildinfo is not installed");if("function"!==typeof ir("cordova.plugins.browsertab.openUrl",uu))throw Mi("cordova-plugin-browsertab is not installed");if("function"!==typeof ir("cordova.InAppBrowser.open",uu))throw Mi("cordova-plugin-inappbrowser is not installed")},function(){throw new Ir("cordova-not-ready")})},iu.Ca=function(e,t){return t(new Ir("operation-not-supported-in-this-environment")),te()},iu.vb=function(){return ne(new Ir("operation-not-supported-in-this-environment"))},iu.Hb=function(){return!1},iu.Db=function(){return!0},iu.yb=function(){return!0},iu.Aa=function(e,t,n){if(this.c)return ne(new Ir("redirect-operation-pending"));var r=this,o=uu.document,i=null,a=null,s=null,u=null;return this.c=ae(te().then(function(){return co(t),Wi(r)}).then(function(){return Fi(r,e,t,n)}).then(function(){return new J(function(e,t){a=function(){var t=ir("cordova.plugins.browsertab.close",uu);return e(),"function"===typeof t&&t(),r.a&&"function"===typeof r.a.close&&(r.a.close(),r.a=null),!1},r.ua(a),s=function(){i||(i=vt(r.w).then(function(){t(new Ir("redirect-cancelled-by-user"))}))},u=function(){_r()&&s()},o.addEventListener("resume",s,!1),or().toLowerCase().match(/android/)||o.addEventListener("visibilitychange",u,!1)}).s(function(e){return Bi(r).then(function(){throw e})})}),function(){s&&o.removeEventListener("resume",s,!1),u&&o.removeEventListener("visibilitychange",u,!1),i&&i.cancel(),a&&r.Ja(a),r.c=null})},iu.ua=function(e){this.b.push(e),Wi(this).s(function(t){"auth/invalid-cordova-configuration"===t.code&&(t=new lo("unknown",null,null,null,new Ir("no-auth-event")),e(t))})},iu.Ja=function(e){O(this.b,function(t){return t==e})};var wh={name:"pendingRedirect",C:"session"};zi.prototype.reset=function(){this.f=!1,this.a.Ja(this.i),this.a=Qi(this.v,this.l,this.u)},zi.prototype.subscribe=function(e){if(T(this.h,e)||this.h.push(e),!this.f){var t=this;Gi(this.g).then(function(e){e?Ki(t.g).then(function(){Xi(t).s(function(e){var n=new lo("unknown",null,null,null,new Ir("operation-not-supported-in-this-environment"));Ji(e)&&t.m(n)})}):Yi(t)}).s(function(){Yi(t)})}},zi.prototype.unsubscribe=function(e){O(this.h,function(t){return t==e})},zi.prototype.m=function(e){if(!e)throw new Ir("invalid-auth-event");for(var t=!1,n=0;n<this.h.length;n++){var r=this.h[n];if(r.ob(e.b,e.c)){(t=this.b[e.b])&&t.h(e,r),t=!0;break}}return ta(this.c),t};var Eh=new gr(2e3,1e4),Ch=new gr(3e4,6e4);zi.prototype.aa=function(){return this.c.aa()},zi.prototype.Aa=function(e,t,n){var r,o=this;return Hi(this.g).then(function(){return o.a.Aa(e,t,n).s(function(e){if(Ji(e))throw new Ir("operation-not-supported-in-this-environment");return r=e,Ki(o.g).then(function(){throw r})}).then(function(){return o.a.Hb()?new J(function(){}):Ki(o.g).then(function(){return o.aa()}).then(function(){}).s(function(){})})})},zi.prototype.Ca=function(e,t,n,r){return this.a.Ca(n,function(n){e.fa(t,null,n,r)},Eh.get())};var Th={};ea.prototype.reset=function(){this.b=null,this.a&&(this.a.cancel(),this.a=null)},ea.prototype.h=function(e,t){if(!e)return ne(new Ir("invalid-auth-event"));this.reset(),this.g=!0;var n=e.b,r=e.c,o=e.a&&"auth/web-storage-unsupported"==e.a.code,i=e.a&&"auth/operation-not-supported-in-this-environment"==e.a.code;return"unknown"!=n||o||i?e.a?(ia(this,!0,null,e.a),e=te()):e=t.va(n,r)?na(this,e,t):ne(new Ir("invalid-auth-event")):(ia(this,!1,null,null),e=te()),e},ea.prototype.aa=function(){var e=this;return new J(function(t,n){e.b?e.b().then(t,n):(e.f.push(t),e.c.push(n),aa(e))})},sa.prototype.h=function(e,t){if(!e)return ne(new Ir("invalid-auth-event"));var n=e.b,r=e.c;return e.a?(t.fa(e.b,null,e.a,e.c),e=te()):e=t.va(n,r)?ua(e,t):ne(new Ir("invalid-auth-event")),e},ca.prototype.confirm=function(e){return e=so(this.verificationId,e),this.a(e)},ha.prototype.start=function(){this.a=this.c,pa(this,!0)},ya.prototype.B=function(){return{apiKey:this.f.b,refreshToken:this.a,accessToken:this.b,expirationTime:this.c}},ya.prototype.getToken=function(e){return e=!!e,this.b&&!this.a?ne(new Ir("user-token-expired")):e||!this.b||hu()>this.c-3e4?this.a?ga(this,{grant_type:"refresh_token",refresh_token:this.a}):te(null):te({accessToken:this.b,expirationTime:this.c,refreshToken:this.a})},_a.prototype.B=function(){return{lastLoginAt:this.b,createdAt:this.a}},d(Ea,He),d(Ca,lt),Ca.prototype.na=function(e){this.ha=e,go(this.c,e)},Ca.prototype.$=function(){return this.ha},Ca.prototype.Ka=function(){return P(this.R)},Ca.prototype.Ga=function(){this.l.b&&(da(this.l),this.l.start())},Er(Ca.prototype,"providerId","firebase"),iu=Ca.prototype,iu.reload=function(){var e=this;return Za(this,ja(this).then(function(){return qa(e).then(function(){return xa(e)}).then(La)}))},iu.F=function(e){var t=this;return Za(this,ja(this).then(function(){return t.h.getToken(e)}).then(function(e){if(!e)throw new Ir("internal-error");return e.accessToken!=t.pa&&(Aa(t,e.accessToken),ht(t,new Ea("tokenChanged"))),Ba(t,"refreshToken",e.refreshToken),e.accessToken}))},iu.getToken=function(e){return ol["firebase.User.prototype.getToken is deprecated. Please use firebase.User.prototype.getIdToken instead."]||(ol["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)},iu.kc=function(e){if(!(e=e.users)||!e.length)throw new Ir("internal-error");e=e[0],Ma(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=Ga(e),n=0;n<t.length;n++)Ua(this,t[n]);Ba(this,"isAnonymous",!(this.email&&e.passwordHash)&&!(this.providerData&&this.providerData.length))},iu.Za=function(e){var t=this,n=null;return Za(this,e.c(this.c,this.uid).then(function(e){return Ha(t,e),n=Qa(t,e,"reauthenticate"),t.i=null,t.reload()}).then(function(){return n}),!0)},iu.mc=function(e){return this.Za(e).then(function(){})},iu.Xa=function(e){var t=this,n=null;return Za(this,za(this,e.providerId).then(function(){return t.F()}).then(function(n){return e.b(t.c,n)}).then(function(e){return n=Qa(t,e,"link"),Xa(t,e)}).then(function(){return n}))},iu.cc=function(e){return this.Xa(e).then(function(e){return e.user})},iu.dc=function(e,t){var n=this;return Za(this,za(this,"phone").then(function(){return la(Na(n),e,t,f(n.Xa,n))}))},iu.nc=function(e,t){var n=this;return Za(this,te().then(function(){return la(Na(n),e,t,f(n.Za,n))}),!0)},iu.kb=function(e){var t=this;return Za(this,this.F().then(function(n){return t.c.kb(n,e)}).then(function(e){return Ha(t,e),t.reload()}))},iu.Dc=function(e){var t=this;return Za(this,this.F().then(function(n){return e.b(t.c,n)}).then(function(e){return Ha(t,e),t.reload()}))},iu.lb=function(e){var t=this;return Za(this,this.F().then(function(n){return t.c.lb(n,e)}).then(function(e){return Ha(t,e),t.reload()}))},iu.mb=function(e){if(void 0===e.displayName&&void 0===e.photoURL)return ja(this);var t=this;return Za(this,this.F().then(function(n){return t.c.mb(n,{displayName:e.displayName,photoUrl:e.photoURL})}).then(function(e){return Ha(t,e),Ba(t,"displayName",e.displayName||null),Ba(t,"photoURL",e.photoUrl||null),Eu(t.providerData,function(e){"password"===e.providerId&&(Er(e,"displayName",t.displayName),Er(e,"photoURL",t.photoURL))}),xa(t)}).then(La))},iu.Cc=function(e){var t=this;return Za(this,qa(this).then(function(n){return T(Fa(t),e)?Ao(t.c,n,[e]).then(function(e){var n={};return Eu(e.providerUserInfo||[],function(e){n[e.providerId]=!0}),Eu(Fa(t),function(e){n[e]||Wa(t,e)}),n[ao.PROVIDER_ID]||Er(t,"phoneNumber",null),xa(t)}):xa(t).then(function(){throw new Ir("no-such-provider")})}))},iu.delete=function(){var e=this;return Za(this,this.F().then(function(t){return Fo(e.c,Vl,{idToken:t})}).then(function(){ht(e,new Ea("userDeleted"))})).then(function(){for(var t=0;t<e.A.length;t++)e.A[t].cancel("app-deleted");Ta(e,null),Oa(e,null),e.A=[],e.m=!0,Ra(e),Er(e,"refreshToken",null),e.a&&e.a.unsubscribe(e)})},iu.ob=function(e,t){return!!("linkViaPopup"==e&&(this.g||null)==t&&this.f||"reauthViaPopup"==e&&(this.g||null)==t&&this.f||"linkViaRedirect"==e&&(this.Z||null)==t||"reauthViaRedirect"==e&&(this.Z||null)==t)},iu.fa=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.b&&(this.b.cancel(),this.b=null),delete this.f,delete this.v)},iu.va=function(e,t){return"linkViaPopup"==e&&t==(this.g||null)?f(this.tb,this):"reauthViaPopup"==e&&t==(this.g||null)?f(this.ub,this):"linkViaRedirect"==e&&(this.Z||null)==t?f(this.tb,this):"reauthViaRedirect"==e&&(this.Z||null)==t?f(this.ub,this):null},iu.ec=function(e){var t=this;return Ya(this,"linkViaPopup",e,function(){return za(t,e.providerId).then(function(){return xa(t)})},!1)},iu.oc=function(e){return Ya(this,"reauthViaPopup",e,function(){return te()},!0)},iu.fc=function(e){var t=this;return $a(this,"linkViaRedirect",e,function(){return za(t,e.providerId)},!1)},iu.pc=function(e){return $a(this,"reauthViaRedirect",e,function(){return te()},!0)},iu.tb=function(e,t){var n=this;this.b&&(this.b.cancel(),this.b=null);var r=null;return Za(this,this.F().then(function(r){return Mo(n.c,{requestUri:e,sessionId:t,idToken:r})}).then(function(e){return r=Qa(n,e,"link"),Xa(n,e)}).then(function(){return r}))},iu.ub=function(e,t){var n=this;this.b&&(this.b.cancel(),this.b=null);var r=null;return Za(this,te().then(function(){return qr(Lo(n.c,{requestUri:e,sessionId:t}),n.uid)}).then(function(e){return r=Qa(n,e,"reauthenticate"),Ha(n,e),n.i=null,n.reload()}).then(function(){return r}),!0)},iu.bb=function(e){var t=this,n=null;return Za(this,this.F().then(function(t){return n=t,"undefined"===typeof e||x(e)?{}:kr(new Ar(e))}).then(function(e){return t.c.bb(n,e)}).then(function(e){if(t.email!=e)return t.reload()}).then(function(){}))},iu.toJSON=function(){return this.B()},iu.B=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.o,authDomain:this.w,stsTokenManager:this.h.B(),redirectEventId:this.Z||null};return this.metadata&&L(e,this.metadata.B()),Eu(this.providerData,function(t){e.providerData.push(Sr(t))}),e};var Sh={name:"redirectUser",C:"session"};as.prototype.g=function(){var e=this,t=cs("local");ds(this,function(){return te().then(function(){return e.c&&"local"!=e.c.C?e.b.get(t,e.a):null}).then(function(n){if(n)return ss(e,"local").then(function(){e.c=t})})})};var Oh={name:"persistence",C:"session"};as.prototype.eb=function(e){var t=null,n=this;return bi(e),ds(this,function(){return e!=n.c.C?n.b.get(n.c,n.a).then(function(r){return t=r,ss(n,e)}).then(function(){if(n.c=cs(e),t)return n.b.set(n.c,t,n.a)}):te()})},d(ys,lt),d(vs,He),d(ms,He),iu=ys.prototype,iu.eb=function(e){return e=this.h.eb(e),ks(this,e)},iu.na=function(e){this.V===e||this.l||(this.V=e,go(this.c,this.V),ht(this,new vs(this.$())))},iu.$=function(){return this.V},iu.Ec=function(){var e=uu.navigator;this.na(e?e.languages&&e.languages[0]||e.language||e.userLanguage||null:null)},iu.gc=function(e){this.A.push(e),_o(this.c,au.SDK_VERSION?rr(au.SDK_VERSION,this.A):null),ht(this,new ms(this.A))},iu.Ka=function(){return P(this.A)},iu.toJSON=function(){return{apiKey:Ns(this).options.apiKey,authDomain:Ns(this).options.authDomain,appName:Ns(this).name,currentUser:Ps(this)&&Ps(this).B()}},iu.ob=function(e,t){switch(e){case"unknown":case"signInViaRedirect":return!0;case"signInViaPopup":return this.g==t&&!!this.f;default:return!1}},iu.fa=function(e,t,n,r){"signInViaPopup"==e&&this.g==r&&(n&&this.v?this.v(n):t&&!n&&this.f&&this.f(t),this.b&&(this.b.cancel(),this.b=null),delete this.f,delete this.v)},iu.va=function(e,t){return"signInViaRedirect"==e||"signInViaPopup"==e&&this.g==t&&this.f?f(this.Sb,this):null},iu.Sb=function(e,t){var n=this;e={requestUri:e,sessionId:t},this.b&&(this.b.cancel(),this.b=null);var r=null,o=null,i=Do(n.c,e).then(function(e){return r=uo(e),o=Lr(e),e});return e=n.U.then(function(){return i}).then(function(e){return ws(n,e)}).then(function(){return Tr({user:Ps(n),credential:r,additionalUserInfo:o,operationType:"signIn"})}),ks(this,e)},iu.wc=function(e){if(!sr())return ne(new Ir("operation-not-supported-in-this-environment"));var t=this,n=Mr(e.providerId),r=dr(),o=null;(!lr()||Zn())&&Ns(this).options.authDomain&&e.isOAuthProvider&&(o=ei(Ns(this).options.authDomain,Ns(this).options.apiKey,Ns(this).name,"signInViaPopup",e,null,r,au.SDK_VERSION||null));var i=Qn(o,n&&n.za,n&&n.ya);return n=_s(this).then(function(t){return $i(t,i,"signInViaPopup",e,r,!!o)}).then(function(){return new J(function(e,n){t.fa("signInViaPopup",null,new Ir("cancelled-popup-request"),t.g),t.f=e,t.v=n,t.g=r,t.b=t.a.Ca(t,"signInViaPopup",i,r)})}).then(function(e){return i&&zn(i),e?Tr(e):null}).s(function(e){throw i&&zn(i),e}),ks(this,n)},iu.xc=function(e){if(!sr())return ne(new Ir("operation-not-supported-in-this-environment"));var t=this;return ks(this,_s(this).then(function(){return ls(t.h)}).then(function(){return t.a.Aa("signInViaRedirect",e)}))},iu.aa=function(){if(!sr())return ne(new Ir("operation-not-supported-in-this-environment"));var e=this;return ks(this,_s(this).then(function(){return e.a.aa()}).then(function(e){return e?Tr(e):null}))},iu.hb=function(){var e=this;return ks(this,this.i.then(function(){return Ps(e)?(Es(e,null),fs(e.h).then(function(){Rs(e)})):te()}))},iu.yc=function(){var e=this;return ps(this.h,Ns(this).options.authDomain).then(function(t){if(!e.l){var n;if(n=Ps(e)&&t){n=Ps(e).uid;var r=t.uid;n=void 0!==n&&null!==n&&""!==n&&void 0!==r&&null!==r&&""!==r&&n==r}if(n)return Va(Ps(e),t),Ps(e).F();(Ps(e)||t)&&(Es(e,t),t&&(Da(t),t.ca=e.G),e.a&&e.a.subscribe(e),Rs(e))}})},iu.ka=function(e){return hs(this.h,e)},iu.Tb=function(){Rs(this),this.ka(Ps(this))},iu.Zb=function(){this.hb()},iu.$b=function(){this.hb()},iu.ac=function(e){var t=this;this.addAuthTokenListener(function(){e.next(Ps(t))})},iu.bc=function(e){var t=this;As(this,function(){e.next(Ps(t))})},iu.ic=function(e,t,n){var r=this;return this.W&&au.Promise.resolve().then(function(){u(e)?e(Ps(r)):u(e.next)&&e.next(Ps(r))}),this.Kb(e,t,n)},iu.hc=function(e,t,n){var r=this;return this.W&&au.Promise.resolve().then(function(){r.R=r.getUid(),u(e)?e(Ps(r)):u(e.next)&&e.next(Ps(r))}),this.Lb(e,t,n)},iu.Vb=function(e){var t=this;return ks(this,this.i.then(function(){return Ps(t)?Ps(t).F(e).then(function(e){return{accessToken:e}}):null}))},iu.tc=function(e){return this.Eb(e).then(function(e){return e.user})},iu.Eb=function(e){var t=this;return this.i.then(function(){return Os(t,Fo(t.c,rh,{token:e}))}).then(function(e){var n=e.user;return Ba(n,"isAnonymous",!1),t.ka(n),e})},iu.Fb=function(e,t){var n=this;return this.i.then(function(){return Os(n,Fo(n.c,oh,{email:e,password:t}))})},iu.uc=function(e,t){return this.Fb(e,t).then(function(e){return e.user})},iu.Ob=function(e,t){return this.qb(e,t).then(function(e){return e.user})},iu.qb=function(e,t){var n=this;return this.i.then(function(){return Os(n,Fo(n.c,Wl,{email:e,password:t}))})},iu.sc=function(e){return this.fb(e).then(function(e){return e.user})},iu.fb=function(e){var t=this;return this.i.then(function(){return Os(t,e.wa(t.c))})},iu.gb=function(){return this.Gb().then(function(e){return e.user})},iu.Gb=function(){var e=this;return this.i.then(function(){var t=Ps(e);if(t&&t.isAnonymous){return Tr({user:t,credential:null,additionalUserInfo:Tr({providerId:null,isNewUser:!1}),operationType:"signIn"})}return Os(e,e.c.gb()).then(function(t){var n=t.user;return Ba(n,"isAnonymous",!0),e.ka(n),t})})},iu.getUid=function(){return Ps(this)&&Ps(this).uid||null},iu.Mb=function(e){this.addAuthTokenListener(e),0<++this.o&&Ps(this)&&Ia(Ps(this))},iu.qc=function(e){var t=this;Eu(this.m,function(n){n==e&&t.o--}),0>this.o&&(this.o=0),0==this.o&&Ps(this)&&Ra(Ps(this)),this.removeAuthTokenListener(e)},iu.addAuthTokenListener=function(e){var t=this;this.m.push(e),ks(this,this.i.then(function(){t.l||T(t.m,e)&&e(Is(t))}))},iu.removeAuthTokenListener=function(e){O(this.m,function(t){return t==e})},iu.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,Ni(e.b,e.a,this.ha)),this.a&&this.a.unsubscribe(this),au.Promise.resolve()},iu.Rb=function(e){return ks(this,Oo(this.c,e))},iu.Fc=function(e){return this.Ia(e).then(function(e){return e.data.email})},iu.Ta=function(e,t){return ks(this,this.c.Ta(e,t).then(function(){}))},iu.Ia=function(e){return ks(this,this.c.Ia(e).then(function(e){return new Pr(e)}))},iu.Sa=function(e){return ks(this,this.c.Sa(e).then(function(){}))},iu.cb=function(e,t){var n=this;return ks(this,te().then(function(){return"undefined"===typeof t||x(t)?{}:kr(new Ar(t))}).then(function(t){return n.c.cb(e,t)}).then(function(){}))},iu.vc=function(e,t){return ks(this,la(this,e,t,f(this.fb,this)))};var Nh="First Second Third Fourth Fifth Sixth Seventh Eighth Ninth".split(" "),Ph="callback",Ih="expired-callback",Rh="sitekey",Ah="size";iu=Gs.prototype,iu.xa=function(){var e=this;return this.c?this.c:this.c=Xs(this,te().then(function(){if(ur())return Yn();throw new Ir("operation-not-supported-in-this-environment","RecaptchaVerifier is only supported in a browser HTTP/HTTPS environment.")}).then(function(){return Js(Zs(),e.o())}).then(function(){return Fo(e.u,Ql,{})}).then(function(t){e.a[Rh]=t.recaptchaSiteKey}).s(function(t){throw e.c=null,t}))},iu.render=function(){Ys(this);var e=this;return Xs(this,this.xa().then(function(){if(null===e.b){var t=e.l;if(!e.h){var n=xe(t);t=Me("DIV"),n.appendChild(t)}e.b=grecaptcha.render(t,e.a)}return e.b}))},iu.verify=function(){Ys(this);var e=this;return Xs(this,this.render().then(function(t){return new J(function(n){var r=grecaptcha.getResponse(t);if(r)n(r);else{var o=function(t){t&&(Qs(e,o),n(t))};e.i.push(o),e.h&&grecaptcha.execute(e.b)}})}))},iu.reset=function(){Ys(this),null!==this.b&&grecaptcha.reset(this.b)},iu.clear=function(){Ys(this),this.m=!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=xe(this.l);for(var t;t=e.firstChild;)e.removeChild(t)}};var kh=we("https://www.google.com/recaptcha/api.js?onload=%{onload}&render=explicit&hl=%{hl}"),xh=null;d(eu,Gs),tu(ys.prototype,{Sa:{name:"applyActionCode",j:[Ds("code")]},Ia:{name:"checkActionCode",j:[Ds("code")]},Ta:{name:"confirmPasswordReset",j:[Ds("code"),Ds("newPassword")]},Ob:{name:"createUserWithEmailAndPassword",j:[Ds("email"),Ds("password")]},qb:{name:"createUserAndRetrieveDataWithEmailAndPassword",j:[Ds("email"),Ds("password")]},Rb:{name:"fetchProvidersForEmail",j:[Ds("email")]},aa:{name:"getRedirectResult",j:[]},hc:{name:"onAuthStateChanged",j:[Ks(Ls(),js(),"nextOrObserver"),js("opt_error",!0),js("opt_completed",!0)]},ic:{name:"onIdTokenChanged",j:[Ks(Ls(),js(),"nextOrObserver"),js("opt_error",!0),js("opt_completed",!0)]},cb:{name:"sendPasswordResetEmail",j:[Ds("email"),Ks(Ls("opt_actionCodeSettings",!0),Fs(null,!0),"opt_actionCodeSettings",!0)]},eb:{name:"setPersistence",j:[Ds("persistence")]},fb:{name:"signInAndRetrieveDataWithCredential",j:[Vs()]},gb:{name:"signInAnonymously",j:[]},Gb:{name:"signInAnonymouslyAndRetrieveData",j:[]},sc:{name:"signInWithCredential",j:[Vs()]},tc:{name:"signInWithCustomToken",j:[Ds("token")]},Eb:{name:"signInAndRetrieveDataWithCustomToken",j:[Ds("token")]},uc:{name:"signInWithEmailAndPassword",j:[Ds("email"),Ds("password")]},Fb:{name:"signInAndRetrieveDataWithEmailAndPassword",j:[Ds("email"),Ds("password")]},vc:{name:"signInWithPhoneNumber",j:[Ds("phoneNumber"),Hs()]},wc:{name:"signInWithPopup",j:[qs()]},xc:{name:"signInWithRedirect",j:[qs()]},hb:{name:"signOut",j:[]},toJSON:{name:"toJSON",j:[Ds(null,!0)]},Ec:{name:"useDeviceLanguage",j:[]},Fc:{name:"verifyPasswordResetCode",j:[Ds("code")]}}),function(e,t){for(var n in t){var r=t[n].name;if(r!==n){var o=t[n].Nb;Object.defineProperty(e,r,{get:function(){return this[n]},set:function(e){xs(r,[o],[e],!0),this[n]=e},enumerable:!0})}}}(ys.prototype,{lc:{name:"languageCode",Nb:Ks(Ds(),Fs(),"languageCode")}}),ys.Persistence=_h,ys.Persistence.LOCAL="local",ys.Persistence.SESSION="session",ys.Persistence.NONE="none",tu(Ca.prototype,{delete:{name:"delete",j:[]},F:{name:"getIdToken",j:[Ms()]},getToken:{name:"getToken",j:[Ms()]},Xa:{name:"linkAndRetrieveDataWithCredential",j:[Vs()]},cc:{name:"linkWithCredential",j:[Vs()]},dc:{name:"linkWithPhoneNumber",j:[Ds("phoneNumber"),Hs()]},ec:{name:"linkWithPopup",j:[qs()]},fc:{name:"linkWithRedirect",j:[qs()]},Za:{name:"reauthenticateAndRetrieveDataWithCredential",j:[Vs()]},mc:{name:"reauthenticateWithCredential",j:[Vs()]},nc:{name:"reauthenticateWithPhoneNumber",j:[Ds("phoneNumber"),Hs()]},oc:{name:"reauthenticateWithPopup",j:[qs()]},pc:{name:"reauthenticateWithRedirect",j:[qs()]},reload:{name:"reload",j:[]},bb:{name:"sendEmailVerification",j:[Ks(Ls("opt_actionCodeSettings",!0),Fs(null,!0),"opt_actionCodeSettings",!0)]},toJSON:{name:"toJSON",j:[Ds(null,!0)]},Cc:{name:"unlink",j:[Ds("provider")]},kb:{name:"updateEmail",j:[Ds("email")]},lb:{name:"updatePassword",j:[Ds("password")]},Dc:{name:"updatePhoneNumber",j:[Vs("phone")]},mb:{name:"updateProfile",j:[Ls("profile")]}}),tu(J.prototype,{s:{name:"catch"},then:{name:"then"}}),tu(ca.prototype,{confirm:{name:"confirm",j:[Ds("verificationCode")]}}),nu(ro,"credential",function(e,t){return new no(e,t)},[Ds("email"),Ds("password")]),tu(Qr.prototype,{sa:{name:"addScope",j:[Ds("scope")]},Ba:{name:"setCustomParameters",j:[Ls("customOAuthParameters")]}}),nu(Qr,"credential",Xr,[Ks(Ds(),Ls(),"token")]),tu(Yr.prototype,{sa:{name:"addScope",j:[Ds("scope")]},Ba:{name:"setCustomParameters",j:[Ls("customOAuthParameters")]}}),nu(Yr,"credential",$r,[Ks(Ds(),Ls(),"token")]),tu(Jr.prototype,{sa:{name:"addScope",j:[Ds("scope")]},Ba:{name:"setCustomParameters",j:[Ls("customOAuthParameters")]}}),nu(Jr,"credential",Zr,[Ks(Ds(),Ks(Ls(),Fs()),"idToken"),Ks(Ds(),Fs(),"accessToken",!0)]),tu(eo.prototype,{Ba:{name:"setCustomParameters",j:[Ls("customOAuthParameters")]}}),nu(eo,"credential",to,[Ks(Ds(),Ls(),"token"),Ds("secret",!0)]),tu(zr.prototype,{sa:{name:"addScope",j:[Ds("scope")]},credential:{name:"credential",j:[Ks(Ds(),Fs(),"idToken",!0),Ks(Ds(),Fs(),"accessToken",!0)]},Ba:{name:"setCustomParameters",j:[Ls("customOAuthParameters")]}}),nu(ao,"credential",so,[Ds("verificationId"),Ds("verificationCode")]),tu(ao.prototype,{Qa:{name:"verifyPhoneNumber",j:[Ds("phoneNumber"),Hs()]}}),tu(Ir.prototype,{toJSON:{name:"toJSON",j:[Ds(null,!0)]}}),tu(po.prototype,{toJSON:{name:"toJSON",j:[Ds(null,!0)]}}),tu(fo.prototype,{toJSON:{name:"toJSON",j:[Ds(null,!0)]}}),tu(eu.prototype,{clear:{name:"clear",j:[]},render:{name:"render",j:[]},verify:{name:"verify",j:[]}}),function(){if("undefined"===typeof au||!au.INTERNAL||!au.INTERNAL.registerService)throw Error("Cannot find the firebase namespace; be sure to include firebase-app.js before this library.");var e={Auth:ys,Error:Ir};nu(e,"EmailAuthProvider",ro,[]),nu(e,"FacebookAuthProvider",Qr,[]),nu(e,"GithubAuthProvider",Yr,[]),nu(e,"GoogleAuthProvider",Jr,[]),nu(e,"TwitterAuthProvider",eo,[]),nu(e,"OAuthProvider",zr,[Ds("providerId")]),nu(e,"PhoneAuthProvider",ao,[Ws()]),nu(e,"RecaptchaVerifier",eu,[Ks(Ds(),Us(),"recaptchaContainer"),Ls("recaptchaParameters",!0),Bs()]),au.INTERNAL.registerService("auth",function(e,t){return e=new ys(e),t({INTERNAL:{getUid:f(e.getUid,e),getToken:f(e.Vb,e),addAuthTokenListener:f(e.Mb,e),removeAuthTokenListener:f(e.qc,e)}}),e},e,function(e,t){if("create"===e)try{t.auth()}catch(e){}}),au.INTERNAL.extendNamespace({User:Ca})}()}).call("undefined"!==typeof e?e:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})}).call(t,n(17))},function(e,t,n){e.exports=n(201)},function(e,t,n){"use strict";function r(t){var n=t.INTERNAL.registerService("database",function(e,t,n){return c.RepoManager.getInstance().databaseFromApp(e,n)},{Reference:s.Reference,Query:a.Query,Database:i.Database,enableLogging:u.enableLogging,INTERNAL:l,ServerValue:p,TEST_ACCESS:h},null,!0);f.isNodeSdk()&&(e.exports=n)}Object.defineProperty(t,"__esModule",{value:!0});var o=n(13),i=n(83);t.Database=i.Database;var a=n(87);t.Query=a.Query;var s=n(46);t.Reference=s.Reference;var u=n(1);t.enableLogging=u.enableLogging;var c=n(51),l=n(233),h=n(234),f=n(0),p=i.Database.ServerValue;t.ServerValue=p,t.registerDatabase=r,r(o.default);var d=n(47);t.DataSnapshot=d.DataSnapshot;var y=n(86);t.OnDisconnect=y.OnDisconnect},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=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),r.stringify(t))},e.prototype.get=function(e){var t=this.domStorage_.getItem(this.prefixedName_(e));return null==t?null:r.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}();t.DOMStorageWrapper=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=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 r.contains(this.cache_,e)?this.cache_[e]:null},e.prototype.remove=function(e){delete this.cache_[e]},e}();t.MemoryStorage=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=function(){function e(e,t){this.committed=e,this.snapshot=t}return e.prototype.toJSON=function(){return r.validateArgCount("TransactionResult.toJSON",0,1,arguments.length),{committed:this.committed,snapshot:this.snapshot.toJSON()}},e}();t.TransactionResult=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);t.nextPushId=function(){var e="-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz",t=0,n=[];return function(o){var i=o===t;t=o;var a,s=new Array(8);for(a=7;a>=0;a--)s[a]=e.charAt(o%64),o=Math.floor(o/64);r.assert(0===o,"Cannot push at time == 0");var u=s.join("");if(i){for(a=11;a>=0&&63===n[a];a--)n[a]=0;n[a]++}else for(a=0;a<12;a++)n[a]=Math.floor(64*Math.random());for(a=0;a<12;a++)u+=e.charAt(n[a]);return r.assert(20===u.length,"nextPushId: Length should be 20."),u}}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(47),o=n(207),i=n(0),a=n(0),s=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 o.DataEvent("value",this,new r.DataSnapshot(e.snapshotNode,t.getRef(),n))},e.prototype.getEventRunner=function(e){var t=this.context_;if("cancel"===e.getEventType()){a.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 o.CancelEvent(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}();t.ValueEventRegistration=s;var u=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,i.contains(this.callbacks_,t)},e.prototype.createCancelEvent=function(e,t){return this.cancelCallback_?new o.CancelEvent(this,e,t):null},e.prototype.createEvent=function(e,t){a.assert(null!=e.childName,"Child events should have a childName.");var n=t.getRef().child(e.childName),i=t.getQueryParams().getIndex();return new o.DataEvent(e.type,this,new r.DataSnapshot(e.snapshotNode,n,i),e.prevName)},e.prototype.getEventRunner=function(e){var t=this.context_;if("cancel"===e.getEventType()){a.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;if(this.context_===t.context_){var n=i.getCount(t.callbacks_);if(n===i.getCount(this.callbacks_)){if(1===n){var r=i.getAnyKey(t.callbacks_),o=i.getAnyKey(this.callbacks_);return o===r&&(!t.callbacks_[r]||!this.callbacks_[o]||t.callbacks_[r]===this.callbacks_[o])}return i.every(this.callbacks_,function(e,n){return t.callbacks_[e]===n})}}}return!1},e.prototype.hasAnyCallback=function(){return null!==this.callbacks_},e}();t.ChildEventRegistration=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=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+":"+r.stringify(this.snapshot.exportVal())},e}();t.DataEvent=o;var i=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}();t.CancelEvent=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(1),i=n(209),a=n(7),s=n(0),u=n(48),c=n(210),l=n(211),h=n(15),f=n(97),p=n(3),d=n(98),y=n(217),v=function(){function e(e){this.listenProvider_=e,this.syncPointTree_=u.ImmutableTree.Empty,this.pendingWriteTree_=new y.WriteTree,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 f.Overwrite(h.OperationSource.User,e,t)):[]},e.prototype.applyUserMerge=function(e,t,n){this.pendingWriteTree_.addMerge(e,t,n);var r=u.ImmutableTree.fromObject(t);return this.applyOperationToSyncPoints_(new l.Merge(h.OperationSource.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=u.ImmutableTree.Empty;return null!=n.snap?r=r.set(p.Path.Empty,!0):s.forEach(n.children,function(e,t){r=r.set(new p.Path(e),t)}),this.applyOperationToSyncPoints_(new i.AckUserWrite(n.path,r,t))}return[]},e.prototype.applyServerOverwrite=function(e,t){return this.applyOperationToSyncPoints_(new f.Overwrite(h.OperationSource.Server,e,t))},e.prototype.applyServerMerge=function(e,t){var n=u.ImmutableTree.fromObject(t);return this.applyOperationToSyncPoints_(new l.Merge(h.OperationSource.Server,e,n))},e.prototype.applyListenComplete=function(e){return this.applyOperationToSyncPoints_(new c.ListenComplete(h.OperationSource.Server,e))},e.prototype.applyTaggedQueryOverwrite=function(t,n,r){var o=this.queryKeyForTag_(r);if(null!=o){var i=e.parseQueryKey_(o),a=i.path,s=i.queryId,u=p.Path.relativePath(a,t),c=new f.Overwrite(h.OperationSource.forServerTaggedQuery(s),u,n);return this.applyTaggedOperation_(a,c)}return[]},e.prototype.applyTaggedQueryMerge=function(t,n,r){var o=this.queryKeyForTag_(r);if(o){var i=e.parseQueryKey_(o),a=i.path,s=i.queryId,c=p.Path.relativePath(a,t),f=u.ImmutableTree.fromObject(n),d=new l.Merge(h.OperationSource.forServerTaggedQuery(s),c,f);return this.applyTaggedOperation_(a,d)}return[]},e.prototype.applyTaggedListenComplete=function(t,n){var r=this.queryKeyForTag_(n);if(r){var o=e.parseQueryKey_(r),i=o.path,a=o.queryId,s=p.Path.relativePath(i,t),u=new c.ListenComplete(h.OperationSource.forServerTaggedQuery(a),s);return this.applyTaggedOperation_(i,u)}return[]},e.prototype.addEventRegistration=function(t,n){var o=t.path,i=null,s=!1;this.syncPointTree_.foreachOnPath(o,function(e,t){var n=p.Path.relativePath(e,o);i=i||t.getCompleteServerCache(n),s=s||t.hasCompleteView()});var u=this.syncPointTree_.get(o);u?(s=s||u.hasCompleteView(),i=i||u.getCompleteServerCache(p.Path.Empty)):(u=new d.SyncPoint,this.syncPointTree_=this.syncPointTree_.set(o,u));var c;if(null!=i)c=!0;else{c=!1,i=a.ChildrenNode.EMPTY_NODE;this.syncPointTree_.subtree(o).foreachChild(function(e,t){var n=t.getCompleteServerCache(p.Path.Empty);n&&(i=i.updateImmediateChild(e,n))})}var l=u.viewExistsForQuery(t);if(!l&&!t.getQueryParams().loadsAllData()){var h=e.makeQueryKey_(t);r.assert(!(h in this.queryToTagMap_),"View does not exist, but we have a tag");var f=e.getNextQueryTag_();this.queryToTagMap_[h]=f,this.tagToQueryMap_["_"+f]=h}var y=this.pendingWriteTree_.childWrites(o),v=u.addEventRegistration(t,n,y,i,c);if(!l&&!s){var m=u.viewForQuery(t);v=v.concat(this.setupListener_(t,m))}return v},e.prototype.removeEventRegistration=function(t,n,r){var o=this,i=t.path,a=this.syncPointTree_.get(i),s=[];if(a&&("default"===t.queryIdentifier()||a.viewExistsForQuery(t))){var u=a.removeEventRegistration(t,n,r);a.isEmpty()&&(this.syncPointTree_=this.syncPointTree_.remove(i));var c=u.removed;s=u.events;var l=-1!==c.findIndex(function(e){return e.getQueryParams().loadsAllData()}),h=this.syncPointTree_.findOnPath(i,function(e,t){return t.hasCompleteView()});if(l&&!h){var f=this.syncPointTree_.subtree(i);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=o.queryToTagMap_[e.makeQueryKey_(t)];o.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=p.Path.relativePath(t,e),o=n.getCompleteServerCache(r);if(o)return o});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()),s.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 o=e.makeQueryKey_(r),i=this.queryToTagMap_[o];delete this.queryToTagMap_[o],delete this.tagToQueryMap_["_"+i]}}},e.queryForListening_=function(e){return e.getQueryParams().loadsAllData()&&!e.getQueryParams().isDefault()?e.getRef():e},e.prototype.setupListener_=function(t,n){var o=t.path,i=this.tagForQuery_(t),a=this.createListenerForView_(n),u=this.listenProvider_.startListening(e.queryForListening_(t),i,a.hashFn,a.onComplete),c=this.syncPointTree_.subtree(o);if(i)r.assert(!c.value.hasCompleteView(),"If we're adding a query, it shouldn't be shadowed");else for(var l=c.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()}))),s.forEach(n,function(e,t){r=r.concat(t)}),r}),h=0;h<l.length;++h){var f=l[h];this.listenProvider_.stopListening(e.queryForListening_(f),this.tagForQuery_(f))}return u},e.prototype.createListenerForView_=function(e){var t=this,n=e.getQuery(),r=this.tagForQuery_(n);return{hashFn:function(){return(e.getServerCache()||a.ChildrenNode.EMPTY_NODE).hash()},onComplete:function(e){if("ok"===e)return r?t.applyTaggedListenComplete(n.path,r):t.applyListenComplete(n.path);var i=o.errorForServerCode(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 r.assert(-1!==t&&t<e.length-1,"Bad queryKey."),{queryId:e.substr(t+1),path:new p.Path(e.substr(0,t))}},e.prototype.queryKeyForTag_=function(e){return this.tagToQueryMap_["_"+e]},e.prototype.tagForQuery_=function(t){var n=e.makeQueryKey_(t);return s.safeGet(this.queryToTagMap_,n)},e.getNextQueryTag_=function(){return e.nextQueryTag_++},e.prototype.applyTaggedOperation_=function(e,t){var n=this.syncPointTree_.get(e);r.assert(n,"Missing sync point for query tag that we're tracking");var o=this.pendingWriteTree_.childWrites(e);return n.applyOperation(t,o,null)},e.prototype.applyOperationToSyncPoints_=function(e){return this.applyOperationHelper_(e,this.syncPointTree_,null,this.pendingWriteTree_.childWrites(p.Path.Empty))},e.prototype.applyOperationHelper_=function(e,t,n,r){if(e.path.isEmpty())return this.applyOperationDescendantsHelper_(e,t,n,r);var o=t.get(p.Path.Empty);null==n&&null!=o&&(n=o.getCompleteServerCache(p.Path.Empty));var i=[],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);i=i.concat(this.applyOperationHelper_(s,u,c,l))}return o&&(i=i.concat(o.applyOperation(e,r,n))),i},e.prototype.applyOperationDescendantsHelper_=function(e,t,n,r){var o=this,i=t.get(p.Path.Empty);null==n&&null!=i&&(n=i.getCompleteServerCache(p.Path.Empty));var a=[];return t.children.inorderTraversal(function(t,i){var s=n?n.getImmediateChild(t):null,u=r.child(t),c=e.operationForChild(t);c&&(a=a.concat(o.applyOperationDescendantsHelper_(c,i,s,u)))}),i&&(a=a.concat(i.applyOperation(e,r,n))),a},e.nextQueryTag_=1,e}();t.SyncTree=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(3),i=n(15),a=function(){function e(e,t,n){this.path=e,this.affectedTree=t,this.revert=n,this.type=i.OperationType.ACK_USER_WRITE,this.source=i.OperationSource.User}return e.prototype.operationForChild=function(t){if(this.path.isEmpty()){if(null!=this.affectedTree.value)return r.assert(this.affectedTree.children.isEmpty(),"affectedTree should not have overlapping affected paths."),this;var n=this.affectedTree.subtree(new o.Path(t));return new e(o.Path.Empty,n,this.revert)}return r.assert(this.path.getFront()===t,"operationForChild called for unrelated child."),new e(this.path.popFront(),this.affectedTree,this.revert)},e}();t.AckUserWrite=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),o=n(15),i=function(){function e(e,t){this.source=e,this.path=t,this.type=o.OperationType.LISTEN_COMPLETE}return e.prototype.operationForChild=function(t){return this.path.isEmpty()?new e(this.source,r.Path.Empty):new e(this.source,this.path.popFront())},e}();t.ListenComplete=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(15),o=n(97),i=n(3),a=n(0),s=function(){function e(e,t,n){this.source=e,this.path=t,this.children=n,this.type=r.OperationType.MERGE}return e.prototype.operationForChild=function(t){if(this.path.isEmpty()){var n=this.children.subtree(new i.Path(t));return n.isEmpty()?null:n.value?new o.Overwrite(this.source,i.Path.Empty,n.value):new e(this.source,i.Path.Empty,n)}return a.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}();t.Merge=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(49),o=n(213),i=n(7),a=n(36),s=n(99),u=n(216),c=n(0),l=n(15),h=n(18),f=n(6),p=function(){function e(e,t){this.query_=e,this.eventRegistrations_=[];var n=this.query_.getQueryParams(),c=new r.IndexedFilter(n.getIndex()),l=n.getNodeFilter();this.processor_=new o.ViewProcessor(l);var h=t.getServerCache(),f=t.getEventCache(),p=c.updateFullNode(i.ChildrenNode.EMPTY_NODE,h.getNode(),null),d=l.updateFullNode(i.ChildrenNode.EMPTY_NODE,f.getNode(),null),y=new a.CacheNode(p,h.isFullyInitialized(),c.filtersNodes()),v=new a.CacheNode(d,f.isFullyInitialized(),l.filtersNodes());this.viewCache_=new s.ViewCache(v,y),this.eventGenerator_=new u.EventGenerator(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){c.assert(null==e,"A cancel should cancel all event registrations.");var r=this.query_.path;this.eventRegistrations_.forEach(function(e){t=t;var o=e.createCancelEvent(t,r);o&&n.push(o)})}if(e){for(var o=[],i=0;i<this.eventRegistrations_.length;++i){var a=this.eventRegistrations_[i];if(a.matches(e)){if(e.hasAnyCallback()){o=o.concat(this.eventRegistrations_.slice(i+1));break}}else o.push(a)}this.eventRegistrations_=o}else this.eventRegistrations_=[];return n},e.prototype.applyOperation=function(e,t,n){e.type===l.OperationType.MERGE&&null!==e.source.queryId&&(c.assert(this.viewCache_.getCompleteServerSnap(),"We should always have a full cache before handling merges"),c.assert(this.viewCache_.getCompleteEventSnap(),"Missing event cache, even though we have a server cache"));var r=this.viewCache_,o=this.processor_.applyOperation(r,e,t,n);return this.processor_.assertIndexed(o.viewCache),c.assert(o.viewCache.getServerCache().isFullyInitialized()||!r.getServerCache().isFullyInitialized(),"Once a server snap is complete, it should never go back"),this.viewCache_=o.viewCache,this.generateEventsForChanges_(o.changes,o.viewCache.getEventCache().getNode(),null)},e.prototype.getInitialEvents=function(e){var t=this.viewCache_.getEventCache(),n=[];if(!t.getNode().isLeafNode()){t.getNode().forEachChild(f.PRIORITY_INDEX,function(e,t){n.push(h.Change.childAddedChange(e,t))})}return t.isFullyInitialized()&&n.push(h.Change.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}();t.View=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(15),o=n(0),i=n(214),a=n(18),s=n(7),u=n(21),c=n(48),l=n(3),h=n(215),f=function(){function e(e,t){this.viewCache=e,this.changes=t}return e}();t.ProcessorResult=f;var p=function(){function e(e){this.filter_=e}return e.prototype.assertIndexed=function(e){o.assert(e.getEventCache().getNode().isIndexed(this.filter_.getIndex()),"Event snap not indexed"),o.assert(e.getServerCache().getNode().isIndexed(this.filter_.getIndex()),"Server snap not indexed")},e.prototype.applyOperation=function(t,n,a,s){var u,c,l=new i.ChildChangeAccumulator;if(n.type===r.OperationType.OVERWRITE){var h=n;h.source.fromUser?u=this.applyUserOverwrite_(t,h.path,h.snap,a,s,l):(o.assert(h.source.fromServer,"Unknown source."),c=h.source.tagged||t.getServerCache().isFiltered()&&!h.path.isEmpty(),u=this.applyServerOverwrite_(t,h.path,h.snap,a,s,c,l))}else if(n.type===r.OperationType.MERGE){var p=n;p.source.fromUser?u=this.applyUserMerge_(t,p.path,p.children,a,s,l):(o.assert(p.source.fromServer,"Unknown source."),c=p.source.tagged||t.getServerCache().isFiltered(),u=this.applyServerMerge_(t,p.path,p.children,a,s,c,l))}else if(n.type===r.OperationType.ACK_USER_WRITE){var d=n;u=d.revert?this.revertUserWrite_(t,d.path,a,s,l):this.ackUserWrite_(t,d.path,d.affectedTree,a,s,l)}else{if(n.type!==r.OperationType.LISTEN_COMPLETE)throw o.assertionError("Unknown operation type: "+n.type);u=this.listenComplete_(t,n.path,a,l)}var y=l.getChanges();return e.maybeAddValueEvent_(t,u,y),new f(u,y)},e.maybeAddValueEvent_=function(e,t,n){var r=t.getEventCache();if(r.isFullyInitialized()){var o=r.getNode().isLeafNode()||r.getNode().isEmpty(),i=e.getCompleteEventSnap();(n.length>0||!e.getEventCache().isFullyInitialized()||o&&!r.getNode().equals(i)||!r.getNode().getPriority().equals(i.getPriority()))&&n.push(a.Change.valueChange(t.getCompleteEventSnap()))}},e.prototype.generateEventCacheAfterServerEvent_=function(e,t,n,r,i){var a=e.getEventCache();if(null!=n.shadowingWrite(t))return e;var u=void 0,c=void 0;if(t.isEmpty())if(o.assert(e.getServerCache().isFullyInitialized(),"If change path is empty, we must have complete server data"),e.getServerCache().isFiltered()){var l=e.getCompleteServerSnap(),h=l instanceof s.ChildrenNode?l:s.ChildrenNode.EMPTY_NODE,f=n.calcCompleteEventChildren(h);u=this.filter_.updateFullNode(e.getEventCache().getNode(),f,i)}else{var p=n.calcCompleteEventCache(e.getCompleteServerSnap());u=this.filter_.updateFullNode(e.getEventCache().getNode(),p,i)}else{var d=t.getFront();if(".priority"==d){o.assert(1==t.getLength(),"Can't have a priority with additional path components");var y=a.getNode();c=e.getServerCache().getNode();var v=n.calcEventCacheAfterServerOverwrite(t,y,c);u=null!=v?this.filter_.updatePriority(y,v):a.getNode()}else{var m=t.popFront(),g=void 0;if(a.isCompleteForChild(d)){c=e.getServerCache().getNode();var _=n.calcEventCacheAfterServerOverwrite(t,a.getNode(),c);g=null!=_?a.getNode().getImmediateChild(d).updateChild(m,_):a.getNode().getImmediateChild(d)}else g=n.calcCompleteChild(d,e.getServerCache());u=null!=g?this.filter_.updateChild(a.getNode(),d,g,m,r,i):a.getNode()}}return e.updateEventSnap(u,a.isFullyInitialized()||t.isEmpty(),this.filter_.filtersNodes())},e.prototype.applyServerOverwrite_=function(e,t,n,r,o,i,a){var s,u=e.getServerCache(),c=i?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 f=t.getFront();if(!u.isCompleteForPath(t)&&t.getLength()>1)return e;var p=t.popFront(),d=u.getNode().getImmediateChild(f),y=d.updateChild(p,n);s=".priority"==f?c.updatePriority(u.getNode(),y):c.updateChild(u.getNode(),f,y,p,h.NO_COMPLETE_CHILD_SOURCE,null)}var v=e.updateServerSnap(s,u.isFullyInitialized()||t.isEmpty(),c.filtersNodes()),m=new h.WriteTreeCompleteChildSource(r,v,o);return this.generateEventCacheAfterServerEvent_(v,t,r,m,a)},e.prototype.applyUserOverwrite_=function(e,t,n,r,o,i){var a,u,c=e.getEventCache(),l=new h.WriteTreeCompleteChildSource(r,e,o);if(t.isEmpty())u=this.filter_.updateFullNode(e.getEventCache().getNode(),n,i),a=e.updateEventSnap(u,!0,this.filter_.filtersNodes());else{var f=t.getFront();if(".priority"===f)u=this.filter_.updatePriority(e.getEventCache().getNode(),n),a=e.updateEventSnap(u,c.isFullyInitialized(),c.isFiltered());else{var p=t.popFront(),d=c.getNode().getImmediateChild(f),y=void 0;if(p.isEmpty())y=n;else{var v=l.getCompleteChild(f);y=null!=v?".priority"===p.getBack()&&v.getChild(p.parent()).isEmpty()?v:v.updateChild(p,n):s.ChildrenNode.EMPTY_NODE}if(d.equals(y))a=e;else{var m=this.filter_.updateChild(c.getNode(),f,y,p,l,i);a=e.updateEventSnap(m,c.isFullyInitialized(),this.filter_.filtersNodes())}}}return a},e.cacheHasChild_=function(e,t){return e.getEventCache().isCompleteForChild(t)},e.prototype.applyUserMerge_=function(t,n,r,o,i,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,o,i,a))}),r.foreach(function(r,c){var l=n.child(r);e.cacheHasChild_(t,l.getFront())||(u=s.applyUserOverwrite_(u,l,c,o,i,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,o,i,a){var s=this;if(e.getServerCache().getNode().isEmpty()&&!e.getServerCache().isFullyInitialized())return e;var u,h=e;u=t.isEmpty()?n:c.ImmutableTree.Empty.setTree(t,n);var f=e.getServerCache().getNode();return u.children.inorderTraversal(function(t,n){if(f.hasChild(t)){var u=e.getServerCache().getNode().getImmediateChild(t),c=s.applyMerge_(u,n);h=s.applyServerOverwrite_(h,new l.Path(t),c,r,o,i,a)}}),u.children.inorderTraversal(function(t,n){var u=!e.getServerCache().isCompleteForChild(t)&&null==n.value;if(!f.hasChild(t)&&!u){var c=e.getServerCache().getNode().getImmediateChild(t),p=s.applyMerge_(c,n);h=s.applyServerOverwrite_(h,new l.Path(t),p,r,o,i,a)}}),h},e.prototype.ackUserWrite_=function(e,t,n,r,o,i){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,o,a,i);if(t.isEmpty()){var h=c.ImmutableTree.Empty;return s.getNode().forEachChild(u.KEY_INDEX,function(e,t){h=h.set(new l.Path(e),t)}),this.applyServerMerge_(e,t,h,r,o,a,i)}return e}var f=c.ImmutableTree.Empty;return n.foreach(function(e,n){var r=t.child(e);s.isCompleteForPath(r)&&(f=f.set(e,s.getNode().getChild(r)))}),this.applyServerMerge_(e,t,f,r,o,a,i)},e.prototype.listenComplete_=function(e,t,n,r){var o=e.getServerCache(),i=e.updateServerSnap(o.getNode(),o.isFullyInitialized()||t.isEmpty(),o.isFiltered());return this.generateEventCacheAfterServerEvent_(i,t,n,h.NO_COMPLETE_CHILD_SOURCE,r)},e.prototype.revertUserWrite_=function(e,t,n,r,i){var a;if(null!=n.shadowingWrite(t))return e;var u=new h.WriteTreeCompleteChildSource(n,e,r),c=e.getEventCache().getNode(),f=void 0;if(t.isEmpty()||".priority"===t.getFront()){var p=void 0;if(e.getServerCache().isFullyInitialized())p=n.calcCompleteEventCache(e.getCompleteServerSnap());else{var d=e.getServerCache().getNode();o.assert(d instanceof s.ChildrenNode,"serverChildren would be complete if leaf node"),p=n.calcCompleteEventChildren(d)}p=p,f=this.filter_.updateFullNode(c,p,i)}else{var y=t.getFront(),v=n.calcCompleteChild(y,e.getServerCache());null==v&&e.getServerCache().isCompleteForChild(y)&&(v=c.getImmediateChild(y)),f=null!=v?this.filter_.updateChild(c,y,v,t.popFront(),u,i):e.getEventCache().getNode().hasChild(y)?this.filter_.updateChild(c,y,s.ChildrenNode.EMPTY_NODE,t.popFront(),u,i):c,f.isEmpty()&&e.getServerCache().isFullyInitialized()&&(a=n.calcCompleteEventCache(e.getCompleteServerSnap()),a.isLeafNode()&&(f=this.filter_.updateFullNode(f,a,i)))}return a=e.getServerCache().isFullyInitialized()||null!=n.shadowingWrite(l.Path.Empty),e.updateEventSnap(f,a,this.filter_.filtersNodes())},e}();t.ViewProcessor=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(18),i=n(0),a=function(){function e(){this.changeMap_={}}return e.prototype.trackChildChange=function(e){var t=e.type,n=e.childName;i.assert(t==o.Change.CHILD_ADDED||t==o.Change.CHILD_CHANGED||t==o.Change.CHILD_REMOVED,"Only child changes supported for tracking"),i.assert(".priority"!==n,"Only non-priority child changes can be tracked.");var a=r.safeGet(this.changeMap_,n);if(a){var s=a.type;if(t==o.Change.CHILD_ADDED&&s==o.Change.CHILD_REMOVED)this.changeMap_[n]=o.Change.childChangedChange(n,e.snapshotNode,a.snapshotNode);else if(t==o.Change.CHILD_REMOVED&&s==o.Change.CHILD_ADDED)delete this.changeMap_[n];else if(t==o.Change.CHILD_REMOVED&&s==o.Change.CHILD_CHANGED)this.changeMap_[n]=o.Change.childRemovedChange(n,a.oldSnap);else if(t==o.Change.CHILD_CHANGED&&s==o.Change.CHILD_ADDED)this.changeMap_[n]=o.Change.childAddedChange(n,e.snapshotNode);else{if(t!=o.Change.CHILD_CHANGED||s!=o.Change.CHILD_CHANGED)throw i.assertionError("Illegal combination of changes: "+e+" occurred after "+a);this.changeMap_[n]=o.Change.childChangedChange(n,e.snapshotNode,a.oldSnap)}}else this.changeMap_[n]=e},e.prototype.getChanges=function(){return r.getValues(this.changeMap_)},e}();t.ChildChangeAccumulator=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(36),o=function(){function e(){}return e.prototype.getCompleteChild=function(e){return null},e.prototype.getChildAfterChild=function(e,t,n){return null},e}();t.NoCompleteChildSource_=o,t.NO_COMPLETE_CHILD_SOURCE=new o;var i=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 r.CacheNode(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(),o=this.writes_.calcIndexedSlice(r,t,1,n,e);return 0===o.length?null:o[0]},e}();t.WriteTreeCompleteChildSource=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9),o=n(18),i=n(0),a=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=[],a=[];return e.forEach(function(e){e.type===o.Change.CHILD_CHANGED&&r.index_.indexedValueChanged(e.oldSnap,e.snapshotNode)&&a.push(o.Change.childMovedChange(e.childName,e.snapshotNode))}),this.generateEventsForType_(i,o.Change.CHILD_REMOVED,e,n,t),this.generateEventsForType_(i,o.Change.CHILD_ADDED,e,n,t),this.generateEventsForType_(i,o.Change.CHILD_MOVED,a,n,t),this.generateEventsForType_(i,o.Change.CHILD_CHANGED,e,n,t),this.generateEventsForType_(i,o.Change.VALUE,e,n,t),i},e.prototype.generateEventsForType_=function(e,t,n,r,o){var i=this,a=n.filter(function(e){return e.type===t});a.sort(this.compareChanges_.bind(this)),a.forEach(function(t){var n=i.materializeSingleChange_(t,o);r.forEach(function(r){r.respondsTo(t.type)&&e.push(r.createEvent(n,i.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 i.assertionError("Should only compare child_ events.");var n=new r.NamedNode(e.childName,e.snapshotNode),o=new r.NamedNode(t.childName,t.snapshotNode);return this.index_.compare(n,o)},e}();t.EventGenerator=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(0),i=n(3),a=n(218),s=n(6),u=n(7),c=function(){function e(){this.visibleWrites_=a.CompoundWrite.Empty,this.allWrites_=[],this.lastWriteId_=-1}return e.prototype.childWrites=function(e){return new l(e,this)},e.prototype.addOverwrite=function(e,t,n,r){o.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){o.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});o.assert(n>=0,"removeWrite called with nonexistent writeId.");var i=this.allWrites_[n];this.allWrites_.splice(n,1);for(var a=i.visible,s=!1,u=this.allWrites_.length-1;a&&u>=0;){var c=this.allWrites_[u];c.visible&&(u>=n&&this.recordContainsPath_(c,i.path)?a=!1:i.path.contains(c.path)&&(s=!0)),u--}if(a){if(s)return this.resetTree_(),!0;if(i.snap)this.visibleWrites_=this.visibleWrites_.removeWrite(i.path);else{var l=i.children;r.forEach(l,function(e){t.visibleWrites_=t.visibleWrites_.removeWrite(i.path.child(e))})}return!0}return!1},e.prototype.getCompleteWriteData=function(e){return this.visibleWrites_.getCompleteNode(e)},e.prototype.calcCompleteEventCache=function(t,n,r,o){if(r||o){var a=this.visibleWrites_.childCompoundWrite(t);if(!o&&a.isEmpty())return n;if(o||null!=n||a.hasCompleteWrite(i.Path.Empty)){var s=function(e){return(e.visible||o)&&(!r||!~r.indexOf(e.writeId))&&(e.path.contains(t)||t.contains(e.path))},c=e.layerTree_(this.allWrites_,s,t),l=n||u.ChildrenNode.EMPTY_NODE;return c.apply(l)}return null}var h=this.visibleWrites_.getCompleteNode(t);if(null!=h)return h;var f=this.visibleWrites_.childCompoundWrite(t);if(f.isEmpty())return n;if(null!=n||f.hasCompleteWrite(i.Path.Empty)){var l=n||u.ChildrenNode.EMPTY_NODE;return f.apply(l)}return null},e.prototype.calcCompleteEventChildren=function(e,t){var n=u.ChildrenNode.EMPTY_NODE,r=this.visibleWrites_.getCompleteNode(e);if(r)return r.isLeafNode()||r.forEachChild(s.PRIORITY_INDEX,function(e,t){n=n.updateImmediateChild(e,t)}),n;if(t){var o=this.visibleWrites_.childCompoundWrite(e);return t.forEachChild(s.PRIORITY_INDEX,function(e,t){var r=o.childCompoundWrite(new i.Path(e)).apply(t);n=n.updateImmediateChild(e,r)}),o.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){o.assert(n||r,"Either existingEventSnap or existingServerSnap must exist");var i=e.child(t);if(this.visibleWrites_.hasCompleteWrite(i))return null;var a=this.visibleWrites_.childCompoundWrite(i);return a.isEmpty()?r.getChild(t):a.apply(r.getChild(t))},e.prototype.calcCompleteChild=function(e,t,n){var r=e.child(t),o=this.visibleWrites_.getCompleteNode(r);if(null!=o)return o;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,o,a){var s,u=this.visibleWrites_.childCompoundWrite(e),c=u.getCompleteNode(i.Path.Empty);if(null!=c)s=c;else{if(null==t)return[];s=u.apply(t)}if(s=s.withIndex(a),s.isEmpty()||s.isLeafNode())return[];for(var l=[],h=a.getCompare(),f=o?s.getReverseIteratorFrom(n,a):s.getIteratorFrom(n,a),p=f.getNext();p&&l.length<r;)0!==h(p,n)&&l.push(p),p=f.getNext();return l},e.prototype.recordContainsPath_=function(e,t){return e.snap?e.path.contains(t):!!r.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_,i.Path.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 s=a.CompoundWrite.Empty,u=0;u<e.length;++u){var c=e[u];if(t(c)){var l=c.path,h=void 0;if(c.snap)n.contains(l)?(h=i.Path.relativePath(n,l),s=s.addWrite(h,c.snap)):l.contains(n)&&(h=i.Path.relativePath(l,n),s=s.addWrite(i.Path.Empty,c.snap.getChild(h)));else{if(!c.children)throw o.assertionError("WriteRecord should have .snap or .children");if(n.contains(l))h=i.Path.relativePath(n,l),s=s.addWrites(h,c.children);else if(l.contains(n))if(h=i.Path.relativePath(l,n),h.isEmpty())s=s.addWrites(i.Path.Empty,c.children);else{var f=r.safeGet(c.children,h.getFront());if(f){var p=f.getChild(h.popFront());s=s.addWrite(i.Path.Empty,p)}}}}}return s},e}();t.WriteTree=c;var l=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,o){return this.writeTree_.calcIndexedSlice(this.treePath_,e,t,n,r,o)},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}();t.WriteTreeRef=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(48),o=n(3),i=n(0),a=n(9),s=n(6),u=n(0),c=function(){function e(e){this.writeTree_=e}return e.prototype.addWrite=function(t,n){if(t.isEmpty())return new e(new r.ImmutableTree(n));var i=this.writeTree_.findRootMostValueAndPath(t);if(null!=i){var a=i.path,s=i.value,u=o.Path.relativePath(a,t);return s=s.updateChild(u,n),new e(this.writeTree_.set(a,s))}var c=new r.ImmutableTree(n);return new e(this.writeTree_.setTree(t,c))},e.prototype.addWrites=function(e,t){var n=this;return i.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,r.ImmutableTree.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(o.Path.relativePath(t.path,e)):null},e.prototype.getCompleteChildren=function(){var e=[],t=this.writeTree_.value;return null!=t?t.isLeafNode()||t.forEachChild(s.PRIORITY_INDEX,function(t,n){e.push(new a.NamedNode(t,n))}):this.writeTree_.children.inorderTraversal(function(t,n){null!=n.value&&e.push(new a.NamedNode(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 r.ImmutableTree(n):this.writeTree_.subtree(t))},e.prototype.isEmpty=function(){return this.writeTree_.isEmpty()},e.prototype.apply=function(t){return e.applySubtreeWrite_(o.Path.Empty,this.writeTree_,t)},e.Empty=new e(new r.ImmutableTree(null)),e.applySubtreeWrite_=function(t,n,r){if(null!=n.value)return r.updateChild(t,n.value);var o=null;return n.children.inorderTraversal(function(n,i){".priority"===n?(u.assert(null!==i.value,"Priority writes must always be leaf nodes"),o=i.value):r=e.applySubtreeWrite_(t.child(n),i,r)}),r.getChild(t).isEmpty()||null===o||(r=r.updateChild(t.child(".priority"),o)),r},e}();t.CompoundWrite=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7),o=function(){function e(){this.rootNode_=r.ChildrenNode.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}();t.SnapshotHolder=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),o=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?(r.log("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/.',r.warn(e)},e}();t.AuthTokenProvider=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(0),i=function(){function e(){this.counters_={}}return e.prototype.incrementCounter=function(e,t){void 0===t&&(t=1),o.contains(this.counters_,e)||(this.counters_[e]=0),this.counters_[e]+=t},e.prototype.get=function(){return r.deepCopy(this.counters_)},e}();t.StatsCollection=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(1),i=n(100),a=1e4,s=3e4,u=function(){function e(e,t){this.server_=t,this.statsToReport_={},this.statsListener_=new i.StatsListener(e);var n=a+(s-a)*Math.random();o.setTimeoutNonBlocking(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={},i=!1;r.forEach(t,function(t,o){o>0&&r.contains(e.statsToReport_,t)&&(n[t]=o,i=!0)}),i&&this.server_.reportStats(n),o.setTimeoutNonBlocking(this.reportStats_.bind(this),Math.floor(2*Math.random()*3e5))},e}();t.StatsReporter=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),o=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],o=r.getPath();null===t||o.equals(t.getPath())||(this.eventLists_.push(t),t=null),null===t&&(t=new i(o)),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.EventQueue=o;var i=function(){function e(e){this.path_=e,this.events_=[]}return 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();r.logger&&r.log("event: "+t.toString()),r.exceptionGuard(n)}}},e.prototype.getPath=function(){return this.path_},e}();t.EventList=i},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=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])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(102),i=n(0),a=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 r(t,e),t.getInstance=function(){return new t},t.prototype.getInitialEvent=function(e){return i.assert("visible"===e,"Unknown event type: "+e),[this.visible_]},t}(o.EventEmitter);t.VisibilityMonitor=a},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=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])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),i=n(102),a=n(0),s=function(e){function t(){var t=e.call(this,["online"])||this;return t.online_=!0,"undefined"===typeof window||"undefined"===typeof window.addEventListener||a.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 r(t,e),t.getInstance=function(){return new t},t.prototype.getInitialEvent=function(e){return o.assert("online"===e,"Unknown event type: "+e),[this.online_]},t.prototype.currentlyOnline=function(){return this.online_},t}(i.EventEmitter);t.OnlineMonitor=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(104),o=n(105),i=n(1),a=function(){function e(e){this.initTransports_(e)}return Object.defineProperty(e,"ALL_TRANSPORTS",{get:function(){return[r.BrowserPollConnection,o.WebSocketConnection]},enumerable:!0,configurable:!0}),e.prototype.initTransports_=function(t){var n=o.WebSocketConnection&&o.WebSocketConnection.isAvailable(),r=n&&!o.WebSocketConnection.previouslyFailed();if(t.webSocketOnly&&(n||i.warn("wss:// URL used, but browser isn't known to support websockets. Trying anyway."),r=!0),r)this.transports_=[o.WebSocketConnection];else{var a=this.transports_=[];i.each(e.ALL_TRANSPORTS,function(e,t){t&&t.isAvailable()&&a.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}();t.TransportManager=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),o=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 o=this;this.pendingResponses[this.currentResponseNum];){if("break"===function(){var e=o.pendingResponses[o.currentResponseNum];delete o.pendingResponses[o.currentResponseNum];for(var t=0;t<e.length;++t)!function(t){e[t]&&r.exceptionGuard(function(){n.onMessage_(e[t])})}(t);if(o.currentResponseNum===o.closeAfterResponse)return o.onClose&&(o.onClose(),o.onClose=null),"break";o.currentResponseNum++}())break}},e}();t.PacketReceiver=o},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=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])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),i=n(1),a=n(0),s=n(0),u=n(0),c=n(106),l=function(e){function t(t,n,r){var o=e.call(this)||this;return o.repoInfo_=t,o.onDataUpdate_=n,o.authTokenProvider_=r,o.log_=i.logWrapper("p:rest:"),o.listens_={},o}return r(t,e),t.prototype.reportStats=function(e){throw new Error("Method not implemented.")},t.getListenId_=function(e,t){return void 0!==t?"tag$"+t:(o.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,o){var i=this,a=e.path.toString();this.log_("Listen called for "+a+" "+e.queryIdentifier());var u=t.getListenId_(e,r),c={};this.listens_[u]=c;var l=e.getQueryParams().toRestQueryStringParameters();this.restRequest_(a+".json",l,function(e,t){var n=t;if(404===e&&(n=null,e=null),null===e&&i.onDataUpdate_(a,n,!1,r),s.safeGet(i.listens_,u)===c){var l;l=e?401==e?"permission_denied":"rest_error:"+e:"ok",o(l,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(o){var s=o&&o.accessToken;s&&(t.auth=s);var c=(r.repoInfo_.secure?"https://":"http://")+r.repoInfo_.host+e+"?"+u.querystring(t);r.log_("Sending REST request for "+c);var l=new XMLHttpRequest;l.onreadystatechange=function(){if(n&&4===l.readyState){r.log_("REST Response for "+c+" received. status:",l.status,"response:",l.responseText);var e=null;if(l.status>=200&&l.status<300){try{e=a.jsonEval(l.responseText)}catch(e){i.warn("Failed to parse JSON response for "+c+": "+l.responseText)}n(null,e)}else 401!==l.status&&404!==l.status&&i.warn("Got unsuccessful REST response for "+c+" Status: "+l.status),n(l.status);n=null}},l.open("GET",c,!0),l.send()})},t}(c.ServerActions);t.ReadonlyRestClient=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(1),i=n(21),a=n(6),s=n(89),u=n(93),c=n(49),l=n(230),h=n(107),f=n(0),p=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_=a.PRIORITY_INDEX}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 r.assert(this.startSet_,"Only valid if start has been set"),this.indexStartValue_},e.prototype.getIndexStartName=function(){return r.assert(this.startSet_,"Only valid if start has been set"),this.startNameSet_?this.indexStartName_:o.MIN_NAME},e.prototype.hasEnd=function(){return this.endSet_},e.prototype.getIndexEndValue=function(){return r.assert(this.endSet_,"Only valid if end has been set"),this.indexEndValue_},e.prototype.getIndexEndName=function(){return r.assert(this.endSet_,"Only valid if end has been set"),this.endNameSet_?this.indexEndName_:o.MAX_NAME},e.prototype.hasLimit=function(){return this.limitSet_},e.prototype.hasAnchoredLimit=function(){return this.limitSet_&&""!==this.viewFrom_},e.prototype.getLimit=function(){return r.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_=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_!==a.PRIORITY_INDEX&&(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_==a.PRIORITY_INDEX},e.prototype.getNodeFilter=function(){return this.loadsAllData()?new c.IndexedFilter(this.getIndex()):this.hasLimit()?new l.LimitedFilter(this):new h.RangedFilter(this)},e.prototype.toRestQueryStringParameters=function(){var t=e.REST_QUERY_CONSTANTS_,n={};if(this.isDefault())return n;var o;return this.index_===a.PRIORITY_INDEX?o=t.PRIORITY_INDEX:this.index_===s.VALUE_INDEX?o=t.VALUE_INDEX:this.index_===i.KEY_INDEX?o=t.KEY_INDEX:(r.assert(this.index_ instanceof u.PathIndex,"Unrecognized index type!"),o=this.index_.toString()),n[t.ORDER_BY]=f.stringify(o),this.startSet_&&(n[t.START_AT]=f.stringify(this.indexStartValue_),this.startNameSet_&&(n[t.START_AT]+=","+f.stringify(this.indexStartName_))),this.endSet_&&(n[t.END_AT]=f.stringify(this.indexEndValue_),this.endNameSet_&&(n[t.END_AT]+=","+f.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}();t.QueryParams=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(107),o=n(7),i=n(9),a=n(0),s=n(18),u=function(){function e(e){this.rangedFilter_=new r.RangedFilter(e),this.index_=e.getIndex(),this.limit_=e.getLimit(),this.reverse_=!e.isViewFromLeft()}return e.prototype.updateChild=function(e,t,n,r,a,s){return this.rangedFilter_.matches(new i.NamedNode(t,n))||(n=o.ChildrenNode.EMPTY_NODE),e.getImmediateChild(t).equals(n)?e:e.numChildren()<this.limit_?this.rangedFilter_.getIndexedFilter().updateChild(e,t,n,r,a,s):this.fullLimitUpdateChild_(e,t,n,a,s)},e.prototype.updateFullNode=function(e,t,n){var r;if(t.isLeafNode()||t.isEmpty())r=o.ChildrenNode.EMPTY_NODE.withIndex(this.index_);else if(2*this.limit_<t.numChildren()&&t.isIndexed(this.index_)){r=o.ChildrenNode.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 a=0;i.hasNext()&&a<this.limit_;){var s=i.getNext(),u=void 0;if(!(u=this.reverse_?this.index_.compare(this.rangedFilter_.getStartPost(),s)<=0:this.index_.compare(s,this.rangedFilter_.getEndPost())<=0))break;r=r.updateImmediateChild(s.name,s.node),a++}}else{r=t.withIndex(this.index_),r=r.updatePriority(o.ChildrenNode.EMPTY_NODE);var c=void 0,l=void 0,h=void 0,i=void 0;if(this.reverse_){i=r.getReverseIterator(this.index_),c=this.rangedFilter_.getEndPost(),l=this.rangedFilter_.getStartPost();var f=this.index_.getCompare();h=function(e,t){return f(t,e)}}else i=r.getIterator(this.index_),c=this.rangedFilter_.getStartPost(),l=this.rangedFilter_.getEndPost(),h=this.index_.getCompare();for(var a=0,p=!1;i.hasNext();){var s=i.getNext();!p&&h(c,s)<=0&&(p=!0);var u=p&&a<this.limit_&&h(s,l)<=0;u?a++:r=r.updateImmediateChild(s.name,o.ChildrenNode.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,u){var c;if(this.reverse_){var l=this.index_.getCompare();c=function(e,t){return l(t,e)}}else c=this.index_.getCompare();var h=e;a.assert(h.numChildren()==this.limit_,"");var f=new i.NamedNode(t,n),p=this.reverse_?h.getFirstChild(this.index_):h.getLastChild(this.index_),d=this.rangedFilter_.matches(f);if(h.hasChild(t)){for(var y=h.getImmediateChild(t),v=r.getChildAfterChild(this.index_,p,this.reverse_);null!=v&&(v.name==t||h.hasChild(v.name));)v=r.getChildAfterChild(this.index_,v,this.reverse_);var m=null==v?1:c(v,f);if(d&&!n.isEmpty()&&m>=0)return null!=u&&u.trackChildChange(s.Change.childChangedChange(t,n,y)),h.updateImmediateChild(t,n);null!=u&&u.trackChildChange(s.Change.childRemovedChange(t,y));var g=h.updateImmediateChild(t,o.ChildrenNode.EMPTY_NODE);return null!=v&&this.rangedFilter_.matches(v)?(null!=u&&u.trackChildChange(s.Change.childAddedChange(v.name,v.node)),g.updateImmediateChild(v.name,v.node)):g}return n.isEmpty()?e:d&&c(p,f)>=0?(null!=u&&(u.trackChildChange(s.Change.childRemovedChange(p.name,p.node)),u.trackChildChange(s.Change.childAddedChange(t,n))),h.updateImmediateChild(t,n).updateImmediateChild(p.name,o.ChildrenNode.EMPTY_NODE)):e},e}();t.LimitedFilter=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=n(0),i=n(46),a=n(47),s=n(3),u=n(232),c=n(6),l=n(1),h=n(94),f=n(14),p=n(0),d=n(22),y=n(7),v=n(35);!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"}(r=t.TransactionStatus||(t.TransactionStatus={})),v.Repo.MAX_TRANSACTION_RETRIES_=25,v.Repo.prototype.transactions_init_=function(){this.transactionQueueTree_=new u.Tree},v.Repo.prototype.startTransaction=function(e,t,n,s){this.log_("transaction on "+e);var u=function(){},v=new i.Reference(this,e);v.on("value",u);var m=function(){v.off("value",u)},g={path:e,update:t,onComplete:n,status:null,order:l.LUIDGenerator(),applyLocally:s,retryCount:0,unwatcher:m,abortReason:null,currentWriteId:null,currentInputSnapshot:null,currentOutputSnapshotRaw:null,currentOutputSnapshotResolved:null},_=this.getLatestState_(e);g.currentInputSnapshot=_;var b=g.update(_.val());if(void 0===b){if(g.unwatcher(),g.currentOutputSnapshotRaw=null,g.currentOutputSnapshotResolved=null,g.onComplete){var w=new a.DataSnapshot(g.currentInputSnapshot,new i.Reference(this,g.path),c.PRIORITY_INDEX);g.onComplete(null,!1,w)}}else{f.validateFirebaseData("transaction failed: Data returned ",b,g.path),g.status=r.RUN;var E=this.transactionQueueTree_.subTree(e),C=E.getValue()||[];C.push(g),E.setValue(C);var T=void 0;if("object"===typeof b&&null!==b&&p.contains(b,".priority"))T=p.safeGet(b,".priority"),o.assert(f.isValidPriority(T),"Invalid priority returned by transaction. Priority must be a valid string, finite number, server value, or null.");else{T=(this.serverSyncTree_.calcCompleteEventCache(e)||y.ChildrenNode.EMPTY_NODE).getPriority().val()}T=T;var S=this.generateServerValues(),O=d.nodeFromJSON(b,T),N=h.resolveDeferredValueSnapshot(O,S);g.currentOutputSnapshotRaw=O,g.currentOutputSnapshotResolved=N,g.currentWriteId=this.getNextWriteId_();var P=this.serverSyncTree_.applyUserOverwrite(e,N,g.currentWriteId,g.applyLocally);this.eventQueue_.raiseEventsForChangedPath(e,P),this.sendReadyTransactions_()}},v.Repo.prototype.getLatestState_=function(e,t){return this.serverSyncTree_.calcCompleteEventCache(e,t)||y.ChildrenNode.EMPTY_NODE},v.Repo.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);o.assert(n.length>0,"Sending zero length transaction queue");n.every(function(e){return e.status===r.RUN})&&this.sendTransactionQueue_(e.path(),n)}else e.hasChildren()&&e.forEachChild(function(e){t.sendReadyTransactions_(e)})},v.Repo.prototype.sendTransactionQueue_=function(e,t){for(var n=this,u=t.map(function(e){return e.currentWriteId}),h=this.getLatestState_(e,u),f=h,p=h.hash(),d=0;d<t.length;d++){var y=t[d];o.assert(y.status===r.RUN,"tryToSendTransactionQueue_: items in queue should all be run."),y.status=r.SENT,y.retryCount++;var v=s.Path.relativePath(e,y.path);f=f.updateChild(v,y.currentOutputSnapshotRaw)}var m=f.val(!0),g=e;this.server_.put(g.toString(),m,function(o){n.log_("transaction put response",{path:g.toString(),status:o});var s=[];if("ok"===o){for(var u=[],h=0;h<t.length;h++){if(t[h].status=r.COMPLETED,s=s.concat(n.serverSyncTree_.ackUserWrite(t[h].currentWriteId)),t[h].onComplete){var f=t[h].currentOutputSnapshotResolved,p=new i.Reference(n,t[h].path),d=new a.DataSnapshot(f,p,c.PRIORITY_INDEX);u.push(t[h].onComplete.bind(null,null,!0,d))}t[h].unwatcher()}n.pruneCompletedTransactionsBelowNode_(n.transactionQueueTree_.subTree(e)),n.sendReadyTransactions_(),n.eventQueue_.raiseEventsForChangedPath(e,s);for(var h=0;h<u.length;h++)l.exceptionGuard(u[h])}else{if("datastale"===o)for(var h=0;h<t.length;h++)t[h].status===r.SENT_NEEDS_ABORT?t[h].status=r.NEEDS_ABORT:t[h].status=r.RUN;else{l.warn("transaction at "+g.toString()+" failed: "+o);for(var h=0;h<t.length;h++)t[h].status=r.NEEDS_ABORT,t[h].abortReason=o}n.rerunTransactions_(e)}},p)},v.Repo.prototype.rerunTransactions_=function(e){var t=this.getAncestorTransactionNode_(e),n=t.path(),r=this.buildTransactionQueue_(t);return this.rerunTransactionQueue_(r,n),n},v.Repo.prototype.rerunTransactionQueue_=function(e,t){if(0!==e.length){for(var n=[],u=[],y=e.filter(function(e){return e.status===r.RUN}),m=y.map(function(e){return e.currentWriteId}),g=0;g<e.length;g++){var _=e[g],b=s.Path.relativePath(t,_.path),w=!1,E=void 0;if(o.assert(null!==b,"rerunTransactionsUnderNode_: relativePath should not be null."),_.status===r.NEEDS_ABORT)w=!0,E=_.abortReason,u=u.concat(this.serverSyncTree_.ackUserWrite(_.currentWriteId,!0));else if(_.status===r.RUN)if(_.retryCount>=v.Repo.MAX_TRANSACTION_RETRIES_)w=!0,E="maxretry",u=u.concat(this.serverSyncTree_.ackUserWrite(_.currentWriteId,!0));else{var C=this.getLatestState_(_.path,m);_.currentInputSnapshot=C;var T=e[g].update(C.val());if(void 0!==T){f.validateFirebaseData("transaction failed: Data returned ",T,_.path);var S=d.nodeFromJSON(T),O="object"===typeof T&&null!=T&&p.contains(T,".priority");O||(S=S.updatePriority(C.getPriority()));var N=_.currentWriteId,P=this.generateServerValues(),I=h.resolveDeferredValueSnapshot(S,P);_.currentOutputSnapshotRaw=S,_.currentOutputSnapshotResolved=I,_.currentWriteId=this.getNextWriteId_(),m.splice(m.indexOf(N),1),u=u.concat(this.serverSyncTree_.applyUserOverwrite(_.path,I,_.currentWriteId,_.applyLocally)),u=u.concat(this.serverSyncTree_.ackUserWrite(N,!0))}else w=!0,E="nodata",u=u.concat(this.serverSyncTree_.ackUserWrite(_.currentWriteId,!0))}if(this.eventQueue_.raiseEventsForChangedPath(t,u),u=[],w&&(e[g].status=r.COMPLETED,function(e){setTimeout(e,Math.floor(0))}(e[g].unwatcher),e[g].onComplete))if("nodata"===E){var R=new i.Reference(this,e[g].path),A=e[g].currentInputSnapshot,k=new a.DataSnapshot(A,R,c.PRIORITY_INDEX);n.push(e[g].onComplete.bind(null,null,!1,k))}else n.push(e[g].onComplete.bind(null,new Error(E),!1,null))}this.pruneCompletedTransactionsBelowNode_(this.transactionQueueTree_);for(var g=0;g<n.length;g++)l.exceptionGuard(n[g]);this.sendReadyTransactions_()}},v.Repo.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},v.Repo.prototype.buildTransactionQueue_=function(e){var t=[];return this.aggregateTransactionQueuesForNode_(e,t),t.sort(function(e,t){return e.order-t.order}),t},v.Repo.prototype.aggregateTransactionQueuesForNode_=function(e,t){var n=this,r=e.getValue();if(null!==r)for(var o=0;o<r.length;o++)t.push(r[o]);e.forEachChild(function(e){n.aggregateTransactionQueuesForNode_(e,t)})},v.Repo.prototype.pruneCompletedTransactionsBelowNode_=function(e){var t=this,n=e.getValue();if(n){for(var o=0,i=0;i<n.length;i++)n[i].status!==r.COMPLETED&&(n[o]=n[i],o++);n.length=o,e.setValue(n.length>0?n:null)}e.forEachChild(function(e){t.pruneCompletedTransactionsBelowNode_(e)})},v.Repo.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},v.Repo.prototype.abortTransactionsOnNode_=function(e){var t=e.getValue();if(null!==t){for(var n=[],i=[],a=-1,s=0;s<t.length;s++)if(t[s].status===r.SENT_NEEDS_ABORT);else if(t[s].status===r.SENT)o.assert(a===s-1,"All SENT items should be at beginning of queue."),a=s,t[s].status=r.SENT_NEEDS_ABORT,t[s].abortReason="set";else if(o.assert(t[s].status===r.RUN,"Unexpected transaction status in abort"),t[s].unwatcher(),i=i.concat(this.serverSyncTree_.ackUserWrite(t[s].currentWriteId,!0)),t[s].onComplete){n.push(t[s].onComplete.bind(null,new Error("set"),!1,null))}-1===a?e.setValue(null):t.length=a+1,this.eventQueue_.raiseEventsForChangedPath(e.path(),i);for(var s=0;s<n.length;s++)l.exceptionGuard(n[s])}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(3),i=n(0),a=function(){function e(){this.children={},this.childCount=0,this.value=null}return e}();t.TreeNode=a;var s=function(){function e(e,t,n){void 0===e&&(e=""),void 0===t&&(t=null),void 0===n&&(n=new a),this.name_=e,this.parent_=t,this.node_=n}return e.prototype.subTree=function(t){for(var n,r=t instanceof o.Path?t:new o.Path(t),s=this;null!==(n=r.getFront());){s=new e(n,s,i.safeGet(s.node_.children,n)||new a),r=r.popFront()}return s},e.prototype.getValue=function(){return this.node_.value},e.prototype.setValue=function(e){r.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;i.forEach(this.node_.children,function(r,o){t(new e(r,n,o))})},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 o.Path(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=i.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}();t.Tree=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(105),o=n(104);t.forceLongPolling=function(){r.WebSocketConnection.forceDisallow(),o.BrowserPollConnection.forceAllow()},t.forceWebSockets=function(){o.BrowserPollConnection.forceDisallow()},t.isWebSocketsAvailable=function(){return r.WebSocketConnection.isAvailable()},t.setSecurityDebugCallback=function(e,t){e.repo.persistentConnection_.securityDebugCallback_=t},t.stats=function(e,t){e.repo.stats(t)},t.statsIncrementCounter=function(e,t){e.repo.statsIncrementCounter(t)},t.dataUpdateCount=function(e){return e.repo.dataUpdateCount},t.interceptServerData=function(e,t){return e.repo.interceptServerData_(t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(85),o=n(101),i=n(51),a=n(103);t.DataConnection=o.PersistentConnection,o.PersistentConnection.prototype.simpleListen=function(e,t){this.sendRequest("q",{p:e},t)},o.PersistentConnection.prototype.echo=function(e,t){this.sendRequest("echo",{d:e},t)},t.RealTimeConnection=a.Connection,t.hijackHash=function(e){var t=o.PersistentConnection.prototype.put;return o.PersistentConnection.prototype.put=function(n,r,o,i){void 0!==i&&(i=e()),t.call(this,n,r,o,i)},function(){o.PersistentConnection.prototype.put=t}},t.ConnectionTarget=r.RepoInfo,t.queryIdentifier=function(e){return e.queryIdentifier()},t.listens=function(e){return e.repo.persistentConnection_.listens_},t.forceRestClient=function(e){i.RepoManager.getInstance().forceRestClient(e)}},function(e,t,n){n(236)},function(e,t,n){"use strict";function r(e){var t=function(e){return self&&"ServiceWorkerGlobalScope"in self?new i.a(e):new o.a(e)},n={Messaging:o.a};e.INTERNAL.registerService("messaging",t,n)}Object.defineProperty(t,"__esModule",{value:!0}),t.registerMessaging=r;var o=n(237),i=n(241);r(n(13).firebase)},function(e,t,n){"use strict";var r=n(108),o=n(37),i=n(111),a=n(240),s=n(110),u=n(0),c=(n.n(u),this&&this.__extends||function(){var e=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])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),l=function(e){function t(t){var n=e.call(this,t)||this;return n.messageObserver_=null,n.onMessage_=Object(u.createSubscribe)(function(e){n.messageObserver_=e}),n.tokenRefreshObserver_=null,n.onTokenRefresh_=Object(u.createSubscribe)(function(e){n.tokenRefreshObserver_=e}),n.setupSWMessageListener_(),n}return c(t,e),t.prototype.getToken=function(){var t=this;return this.isSupported_()?this.manifestCheck_().then(function(){return e.prototype.getToken.call(t)}):Promise.reject(this.errorFactory_.create(o.a.codes.UNSUPPORTED_BROWSER))},t.prototype.manifestCheck_=function(){var e=this;if(this.manifestCheckPromise_)return this.manifestCheckPromise_;var t=document.querySelector('link[rel="manifest"]');return this.manifestCheckPromise_=t?fetch(t.href).then(function(e){return e.json()}).catch(function(){return Promise.resolve()}).then(function(t){if(t&&t.gcm_sender_id&&"103953800507"!==t.gcm_sender_id)throw e.errorFactory_.create(o.a.codes.INCORRECT_GCM_SENDER_ID)}):Promise.resolve(),this.manifestCheckPromise_},t.prototype.requestPermission=function(){var e=this;return Notification.permission===s.a.granted?Promise.resolve():new Promise(function(t,n){var r=function(r){return r===s.a.granted?t():n(r===s.a.denied?e.errorFactory_.create(o.a.codes.PERMISSION_BLOCKED):e.errorFactory_.create(o.a.codes.PERMISSION_DEFAULT))},i=Notification.requestPermission(function(e){i||r(e)});i&&i.then(r)})},t.prototype.useServiceWorker=function(e){if(!(e instanceof ServiceWorkerRegistration))throw this.errorFactory_.create(o.a.codes.SW_REGISTRATION_EXPECTED);if("undefined"!==typeof this.registrationToUse_)throw this.errorFactory_.create(o.a.codes.USE_SW_BEFORE_GET_TOKEN);this.registrationToUse_=e},t.prototype.onMessage=function(e,t,n){return this.onMessage_(e,t,n)},t.prototype.onTokenRefresh=function(e,t,n){return this.onTokenRefresh_(e,t,n)},t.prototype.waitForRegistrationToActivate_=function(e){var t=this,n=e.installing||e.waiting||e.active;return new Promise(function(r,i){if(!n)return void i(t.errorFactory_.create(o.a.codes.NO_SW_IN_REG));if("activated"===n.state)return void r(e);if("redundant"===n.state)return void i(t.errorFactory_.create(o.a.codes.SW_REG_REDUNDANT));var a=function(){if("activated"===n.state)r(e);else{if("redundant"!==n.state)return;i(t.errorFactory_.create(o.a.codes.SW_REG_REDUNDANT))}n.removeEventListener("statechange",a)};n.addEventListener("statechange",a)})},t.prototype.getSWRegistration_=function(){var e=this;return this.registrationToUse_?this.waitForRegistrationToActivate_(this.registrationToUse_):(this.registrationToUse_=null,navigator.serviceWorker.register(a.a.path,{scope:a.a.scope}).catch(function(t){throw e.errorFactory_.create(o.a.codes.FAILED_DEFAULT_REGISTRATION,{browserErrorMessage:t.message})}).then(function(t){return e.waitForRegistrationToActivate_(t).then(function(){return e.registrationToUse_=t,t.update(),t})}))},t.prototype.setupSWMessageListener_=function(){var e=this;"serviceWorker"in navigator&&navigator.serviceWorker.addEventListener("message",function(t){if(t.data&&t.data[i.a.PARAMS.TYPE_OF_MSG]){var n=t.data;switch(n[i.a.PARAMS.TYPE_OF_MSG]){case i.a.TYPES_OF_MSG.PUSH_MSG_RECEIVED:case i.a.TYPES_OF_MSG.NOTIFICATION_CLICKED:var r=n[i.a.PARAMS.DATA];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")&&PushSubscription.prototype.hasOwnProperty("getKey")},t}(r.a);t.a=l},function(e,t,n){"use strict";var r=n(0),o=(n.n(r),n(37)),i=n(239),a=n(109),s="fcm_token_object_Store",u=function(){function e(){this.errorFactory_=new r.ErrorFactory("messaging","Messaging",o.a.map),this.openDbPromise_=null}return e.prototype.openDatabase_=function(){return this.openDbPromise_?this.openDbPromise_:(this.openDbPromise_=new Promise(function(t,n){var r=indexedDB.open(e.DB_NAME,1);r.onerror=function(e){n(e.target.error)},r.onsuccess=function(e){t(e.target.result)},r.onupgradeneeded=function(e){var t=e.target.result,n=t.createObjectStore(s,{keyPath:"swScope"});n.createIndex("fcmSenderId","fcmSenderId",{unique:!1}),n.createIndex("fcmToken","fcmToken",{unique:!0})}}),this.openDbPromise_)},e.prototype.closeDatabase=function(){var e=this;return this.openDbPromise_?this.openDbPromise_.then(function(t){t.close(),e.openDbPromise_=null}):Promise.resolve()},e.prototype.getTokenDetailsFromToken=function(e){return this.openDatabase_().then(function(t){return new Promise(function(n,r){var o=t.transaction([s]),i=o.objectStore(s),a=i.index("fcmToken"),u=a.get(e);u.onerror=function(e){r(e.target.error)},u.onsuccess=function(e){n(e.target.result)}})})},e.prototype.getTokenDetailsFromSWScope_=function(e){return this.openDatabase_().then(function(t){return new Promise(function(n,r){var o=t.transaction([s]),i=o.objectStore(s),a=i.get(e);a.onerror=function(e){r(e.target.error)},a.onsuccess=function(e){n(e.target.result)}})})},e.prototype.getAllTokenDetailsForSenderId_=function(e){return this.openDatabase_().then(function(t){return new Promise(function(n,r){var o=t.transaction([s]),i=o.objectStore(s),a=[],u=i.openCursor();u.onerror=function(e){r(e.target.error)},u.onsuccess=function(t){var r=t.target.result;r?(r.value.fcmSenderId===e&&a.push(r.value),r.continue()):n(a)}})})},e.prototype.subscribeToFCM=function(e,t,n){var r=this,s=Object(i.a)(t.getKey("p256dh")),u=Object(i.a)(t.getKey("auth")),c="authorized_entity="+e+"&endpoint="+t.endpoint+"&encryption_key="+s+"&encryption_auth="+u;n&&(c+="&pushSet="+n);var l=new Headers;l.append("Content-Type","application/x-www-form-urlencoded");var h={method:"POST",headers:l,body:c};return fetch(a.a.ENDPOINT+"/fcm/connect/subscribe",h).then(function(e){return e.json()}).then(function(e){var t=e;if(t.error){var n=t.error.message;throw r.errorFactory_.create(o.a.codes.TOKEN_SUBSCRIBE_FAILED,{message:n})}if(!t.token)throw r.errorFactory_.create(o.a.codes.TOKEN_SUBSCRIBE_NO_TOKEN);if(!t.pushSet)throw r.errorFactory_.create(o.a.codes.TOKEN_SUBSCRIBE_NO_PUSH_SET);return{token:t.token,pushSet:t.pushSet}})},e.prototype.isSameSubscription_=function(e,t){return e.endpoint===t.endpoint&&Object(i.a)(e.getKey("auth"))===t.auth&&Object(i.a)(e.getKey("p256dh"))===t.p256dh},e.prototype.saveTokenDetails_=function(e,t,n,r,o){var a={swScope:t.scope,endpoint:n.endpoint,auth:Object(i.a)(n.getKey("auth")),p256dh:Object(i.a)(n.getKey("p256dh")),fcmToken:r,fcmPushSet:o,fcmSenderId:e};return this.openDatabase_().then(function(e){return new Promise(function(t,n){var r=e.transaction([s],"readwrite"),o=r.objectStore(s),i=o.put(a);i.onerror=function(e){n(e.target.error)},i.onsuccess=function(e){t()}})})},e.prototype.getSavedToken=function(e,t){var n=this;return t instanceof ServiceWorkerRegistration?"string"!==typeof e||0===e.length?Promise.reject(this.errorFactory_.create(o.a.codes.BAD_SENDER_ID)):this.getAllTokenDetailsForSenderId_(e).then(function(n){if(0!==n.length){var r=n.findIndex(function(n){return t.scope===n.swScope&&e===n.fcmSenderId});if(-1!==r)return n[r]}}).then(function(e){if(e)return t.pushManager.getSubscription().catch(function(e){throw n.errorFactory_.create(o.a.codes.GET_SUBSCRIPTION_FAILED)}).then(function(t){if(t&&n.isSameSubscription_(t,e))return e.fcmToken})}):Promise.reject(this.errorFactory_.create(o.a.codes.SW_REGISTRATION_EXPECTED))},e.prototype.createToken=function(e,t){var n=this;if("string"!==typeof e||0===e.length)return Promise.reject(this.errorFactory_.create(o.a.codes.BAD_SENDER_ID));if(!(t instanceof ServiceWorkerRegistration))return Promise.reject(this.errorFactory_.create(o.a.codes.SW_REGISTRATION_EXPECTED));var r,i;return t.pushManager.getSubscription().then(function(e){return e||t.pushManager.subscribe(a.a.SUBSCRIPTION_OPTIONS)}).then(function(t){return r=t,n.subscribeToFCM(e,r)}).then(function(o){return i=o,n.saveTokenDetails_(e,t,r,i.token,i.pushSet)}).then(function(){return i.token})},e.prototype.deleteToken=function(e){var t=this;return"string"!==typeof e||0===e.length?Promise.reject(this.errorFactory_.create(o.a.codes.INVALID_DELETE_TOKEN)):this.getTokenDetailsFromToken(e).then(function(e){if(!e)throw t.errorFactory_.create(o.a.codes.DELETE_TOKEN_NOT_FOUND);return t.openDatabase_().then(function(n){return new Promise(function(r,i){var a=n.transaction([s],"readwrite"),u=a.objectStore(s),c=u.delete(e.swScope);c.onerror=function(e){i(e.target.error)},c.onsuccess=function(n){if(0===n.target.result)return void i(t.errorFactory_.create(o.a.codes.FAILED_TO_DELETE_TOKEN));r(e)}})})})},e}();t.a=u},function(e,t,n){"use strict";function r(e){var t=new Uint8Array(e);return window.btoa(String.fromCharCode.apply(null,t))}t.a=function(e){return r(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}},function(e,t,n){"use strict";t.a={path:"/firebase-messaging-sw.js",scope:"/firebase-cloud-messaging-push-scope"}},function(e,t,n){"use strict";var r=n(108),o=n(37),i=n(111),a=n(109),s=this&&this.__extends||function(){var e=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])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),u=function(e){function t(t){var n=e.call(this,t)||this;return self.addEventListener("push",function(e){return n.onPush_(e)},!1),self.addEventListener("pushsubscriptionchange",function(e){return n.onSubChange_(e)},!1),self.addEventListener("notificationclick",function(e){return n.onNotificationClick_(e)},!1),n.bgMessageHandler_=null,n}return s(t,e),t.prototype.onPush_=function(e){var t,n=this;try{t=e.data.json()}catch(e){return}var r=this.hasVisibleClients_().then(function(e){if(e){if(t.notification||n.bgMessageHandler_)return n.sendMessageToWindowClients_(t)}else{var r=n.getNotificationData_(t);if(r){var o=r.title||"";return self.registration.showNotification(o,r)}if(n.bgMessageHandler_)return n.bgMessageHandler_(t)}});e.waitUntil(r)},t.prototype.onSubChange_=function(e){var t=this,n=this.getToken().then(function(e){if(!e)throw t.errorFactory_.create(o.a.codes.NO_FCM_TOKEN_FOR_RESUBSCRIBE);var n=null,r=t.getTokenManager();return r.getTokenDetailsFromToken(e).then(function(e){if(!(n=e))throw t.errorFactory_.create(o.a.codes.INVALID_SAVED_TOKEN);return self.registration.pushManager.subscribe(a.a.SUBSCRIPTION_OPTIONS)}).then(function(e){return r.subscribeToFCM(n.fcmSenderId,e,n.fcmPushSet)}).catch(function(e){return r.deleteToken(n.fcmToken).then(function(){throw t.errorFactory_.create(o.a.codes.UNABLE_TO_RESUBSCRIBE,{message:e})})})});e.waitUntil(n)},t.prototype.onNotificationClick_=function(e){var t=this;if(e.notification&&e.notification.data&&e.notification.data.FCM_MSG){e.stopImmediatePropagation(),e.notification.close();var n=e.notification.data.FCM_MSG,r=n.notification.click_action;if(r){var o=this.getWindowClient_(r).then(function(e){return e||self.clients.openWindow(r)}).then(function(e){if(e){n.notification;delete n.notification;var r=i.a.createNewMsg(i.a.TYPES_OF_MSG.NOTIFICATION_CLICKED,n);return t.attemptToMessageClient_(e,r)}});e.waitUntil(o)}}},t.prototype.getNotificationData_=function(e){if(e&&"object"===typeof e.notification){var t=Object.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 this.errorFactory_.create(o.a.codes.BG_HANDLER_FUNCTION_EXPECTED);this.bgMessageHandler_=e},t.prototype.getWindowClient_=function(e){var t=new URL(e).href;return self.clients.matchAll({type:"window",includeUncontrolled:!0}).then(function(e){for(var n=null,r=0;r<e.length;r++){if(new URL(e[r].url).href===t){n=e[r];break}}if(n)return n.focus(),n})},t.prototype.attemptToMessageClient_=function(e,t){var n=this;return new Promise(function(r,i){if(!e)return i(n.errorFactory_.create(o.a.codes.NO_WINDOW_CLIENT_TO_MSG));e.postMessage(t),r()})},t.prototype.hasVisibleClients_=function(){return self.clients.matchAll({type:"window",includeUncontrolled:!0}).then(function(e){return e.some(function(e){return"visible"===e.visibilityState})})},t.prototype.sendMessageToWindowClients_=function(e){var t=this;return self.clients.matchAll({type:"window",includeUncontrolled:!0}).then(function(n){var r=i.a.createNewMsg(i.a.TYPES_OF_MSG.PUSH_MSG_RECEIVED,e);return Promise.all(n.map(function(e){return t.attemptToMessageClient_(e,r)}))})},t.prototype.getSWRegistration_=function(){return Promise.resolve(self.registration)},t}(r.a);t.a=u},function(e,t,n){n(243)},function(e,t,n){"use strict";function r(e,t,n){return new l.a(e,new u.a,n)}function o(e){var t={TaskState:s.c,TaskEvent:s.b,StringFormat:a.a,Storage:l.a,Reference:c.a};e.INTERNAL.registerService(h,r,t,void 0,!0)}Object.defineProperty(t,"__esModule",{value:!0}),t.registerStorage=o;var i=n(13),a=n(23),s=n(24),u=n(244),c=n(113),l=n(253),h="storage";o(i.default)},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var r=n(245),o=function(){function e(){}return e.prototype.createXhrIo=function(){return new r.a},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return u});var r=n(12),o=n(19),i=n(16),a=n(10),s=n(112),u=function(){function e(){var e=this;this.sent_=!1,this.xhr_=new XMLHttpRequest,this.errorCode_=s.a.NO_ERROR,this.sendPromise_=i.a(function(t,n){e.xhr_.addEventListener("abort",function(n){e.errorCode_=s.a.ABORT,t(e)}),e.xhr_.addEventListener("error",function(n){e.errorCode_=s.a.NETWORK_ERROR,t(e)}),e.xhr_.addEventListener("load",function(n){t(e)})})}return e.prototype.send=function(e,t,n,i){var s=this;if(this.sent_)throw r.e("cannot .send() more than once");if(this.sent_=!0,this.xhr_.open(t,e,!0),a.a(i)){var u=i;o.b(u,function(e,t){s.xhr_.setRequestHeader(e,t.toString())})}return a.a(n)?this.xhr_.send(n):this.xhr_.send(),this.sendPromise_},e.prototype.getErrorCode=function(){if(!this.sent_)throw r.e("cannot .getErrorCode() before sending");return this.errorCode_},e.prototype.getStatus=function(){if(!this.sent_)throw r.e("cannot .getStatus() before sending");try{return this.xhr_.status}catch(e){return-1}},e.prototype.getResponseText=function(){if(!this.sent_)throw r.e("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){a.a(this.xhr_.upload)&&this.xhr_.upload.addEventListener("progress",e)},e.prototype.removeUploadProgressListener=function(e){a.a(this.xhr_.upload)&&this.xhr_.upload.removeEventListener("progress",e)},e}()},function(e,t,n){"use strict";function r(e){var t;try{t=JSON.parse(e)}catch(e){return null}return o.f(t)?t:null}t.a=r;var o=n(10)},function(e,t,n){"use strict";function r(){return"undefined"!==typeof BlobBuilder?BlobBuilder:"undefined"!==typeof WebKitBlobBuilder?WebKitBlobBuilder:void 0}function o(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=r();if(void 0!==n){for(var o=new n,i=0;i<e.length;i++)o.append(e[i]);return o.getBlob()}if(a.e())return new Blob(e);throw Error("This browser doesn't seem to support creating Blobs")}function i(e,t,n){return e.webkitSlice?e.webkitSlice(t,n):e.mozSlice?e.mozSlice(t,n):e.slice?e.slice(t,n):null}t.a=o,t.b=i;var a=n(10)},function(e,t,n){"use strict";n.d(t,"a",function(){return r});var r=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}()},function(e,t,n){"use strict";n.d(t,"a",function(){return p});var r=n(24),o=n(250),i=n(251),a=n(52),s=n(55),u=n(252),c=n(12),l=n(16),h=n(116),f=n(10),p=function(){function e(e,t,n,o,i,a){void 0===a&&(a=null);var s=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_=a,this.mappings_=o,this.resumable_=this.shouldDoResumable_(this.blob_),this.state_=r.a.RUNNING,this.errorHandler_=function(e){s.request_=null,s.chunkMultiplier_=1,e.codeEquals(c.a.CANCELED)?(s.needToFetchStatus_=!0,s.completeTransitions_()):(s.error_=e,s.transition_(r.a.ERROR))},this.metadataErrorHandler_=function(e){s.request_=null,e.codeEquals(c.a.CANCELED)?s.completeTransitions_():(s.error_=e,s.transition_(r.a.ERROR))},this.promise_=l.a(function(e,t){s.resolve_=e,s.reject_=t,s.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_===r.a.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 r.a.RUNNING:e(n);break;case r.a.CANCELING:t.transition_(r.a.CANCELED);break;case r.a.PAUSING:t.transition_(r.a.PAUSED)}})},e.prototype.createResumable_=function(){var e=this;this.resolveToken_(function(t){var n=h.c(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=h.f(e.authWrapper_,e.location_,t,e.blob_),o=e.authWrapper_.makeRequest(r,n);e.request_=o,o.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=h.h*this.chunkMultiplier_,n=new h.a(this.transferred_,this.blob_.size()),o=this.uploadUrl_;this.resolveToken_(function(i){var a;try{a=h.b(e.location_,e.authWrapper_,o,e.blob_,t,e.mappings_,n,e.makeProgressCallback_())}catch(t){return e.error_=t,void e.transition_(r.a.ERROR)}var s=e.authWrapper_.makeRequest(a,i);e.request_=s,s.getPromise().then(function(t){e.increaseMultiplier_(),e.request_=null,e.updateProgress_(t.current),t.finalized?(e.metadata_=t.metadata,e.transition_(r.a.SUCCESS)):e.completeTransitions_()},e.errorHandler_)})},e.prototype.increaseMultiplier_=function(){h.h*this.chunkMultiplier_<33554432&&(this.chunkMultiplier_*=2)},e.prototype.fetchMetadata_=function(){var e=this;this.resolveToken_(function(t){var n=h.e(e.authWrapper_,e.location_,e.mappings_),o=e.authWrapper_.makeRequest(n,t);e.request_=o,o.getPromise().then(function(t){e.request_=null,e.metadata_=t,e.transition_(r.a.SUCCESS)},e.metadataErrorHandler_)})},e.prototype.oneShotUpload_=function(){var e=this;this.resolveToken_(function(t){var n=h.g(e.authWrapper_,e.location_,e.mappings_,e.blob_,e.metadata_),o=e.authWrapper_.makeRequest(n,t);e.request_=o,o.getPromise().then(function(t){e.request_=null,e.metadata_=t,e.updateProgress_(e.blob_.size()),e.transition_(r.a.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 r.a.CANCELING:case r.a.PAUSING:this.state_=e,null!==this.request_&&this.request_.cancel();break;case r.a.RUNNING:var t=this.state_===r.a.PAUSED;this.state_=e,t&&(this.notifyObservers_(),this.start_());break;case r.a.PAUSED:this.state_=e,this.notifyObservers_();break;case r.a.CANCELED:this.error_=c.c(),this.state_=e,this.notifyObservers_();break;case r.a.ERROR:case r.a.SUCCESS:this.state_=e,this.notifyObservers_()}},e.prototype.completeTransitions_=function(){switch(this.state_){case r.a.PAUSING:this.transition_(r.a.PAUSED);break;case r.a.CANCELING:this.transition_(r.a.CANCELED);break;case r.a.RUNNING:this.start_()}},Object.defineProperty(e.prototype,"snapshot",{get:function(){var e=r.d(this.state_);return new i.a(this.transferred_,this.blob_.size(),e,this.metadata_,this,this.ref_)},enumerable:!0,configurable:!0}),e.prototype.on=function(e,t,n,i){function s(t){if(e!==r.b.STATE_CHANGED)throw"Expected one of the event types: ["+r.b.STATE_CHANGED+"]."}function u(e){try{return void p(e)}catch(e){}try{d(e);if(!(f.c(e.next)||f.c(e.error)||f.c(e.complete)))throw"";return}catch(e){throw h}}function c(e){function t(t,n,r){null!==e&&a.g("on",e,arguments);var s=new o.a(t,n,i);return v.addObserver_(s),function(){v.removeObserver_(s)}}return t}function l(e){if(null===e)throw h;u(e)}void 0===t&&(t=void 0),void 0===n&&(n=void 0),void 0===i&&(i=void 0);var h="Expected a function or an Object with one of `next`, `error`, `complete` properties.",p=a.d(!0).validator,d=a.a(null,!0).validator,y=[a.e(s),a.a(u,!0),a.d(!0),a.d(!0)];a.g("on",y,arguments);var v=this,m=[a.a(l),a.d(!0),a.d(!0)];return f.c(t)||f.c(n)||f.c(i)?c(null)(t,n,i):c(m)},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){s.c(this.observers_,e)},e.prototype.notifyObservers_=function(){var e=this;this.finishPromise_(),s.a(this.observers_).forEach(function(t){e.notifyObserver_(t)})},e.prototype.finishPromise_=function(){if(null!==this.resolve_){var e=!0;switch(r.d(this.state_)){case r.c.SUCCESS:Object(u.a)(this.resolve_.bind(null,this.snapshot))();break;case r.c.CANCELED:case r.c.ERROR:var t=this.reject_;Object(u.a)(t.bind(null,this.error_))();break;default:e=!1}e&&(this.resolve_=null,this.reject_=null)}},e.prototype.notifyObserver_=function(e){switch(r.d(this.state_)){case r.c.RUNNING:case r.c.PAUSED:null!==e.next&&Object(u.a)(e.next.bind(e,this.snapshot))();break;case r.c.SUCCESS:null!==e.complete&&Object(u.a)(e.complete.bind(e))();break;case r.c.CANCELED:case r.c.ERROR:null!==e.error&&Object(u.a)(e.error.bind(e,this.error_))();break;default:null!==e.error&&Object(u.a)(e.error.bind(e,this.error_))()}},e.prototype.resume=function(){a.g("resume",[],arguments);var e=this.state_===r.a.PAUSED||this.state_===r.a.PAUSING;return e&&this.transition_(r.a.RUNNING),e},e.prototype.pause=function(){a.g("pause",[],arguments);var e=this.state_===r.a.RUNNING;return e&&this.transition_(r.a.PAUSING),e},e.prototype.cancel=function(){a.g("cancel",[],arguments);var e=this.state_===r.a.RUNNING||this.state_===r.a.PAUSING;return e&&this.transition_(r.a.CANCELING),e},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var r=n(10),o=function(){function e(e,t,n){if(r.b(e)||r.a(t)||r.a(n))this.next=e,this.error=t||null,this.complete=n||null;else{var o=e;this.next=o.next||null,this.error=o.error||null,this.complete=o.complete||null}}return e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return r});var r=function(){function e(e,t,n,r,o,i){this.bytesTransferred=e,this.totalBytes=t,this.state=n,this.metadata=r,this.task=o,this.ref=i}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}()},function(e,t,n){"use strict";function r(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];o.c(!0).then(function(){e.apply(null,t)})}}t.a=r;var o=n(16)},function(e,t,n){"use strict";n.d(t,"a",function(){return c});var r=n(52),o=n(254),i=n(39),a=n(16),s=n(257),u=n(113),c=function(){function e(e,t,n){function r(e,t){return new u.a(e,t)}if(this.bucket_=null,this.authWrapper_=new o.a(e,r,s.a,this,t),this.app_=e,null!=n)this.bucket_=i.a.makeFromBucketSpec(n);else{var a=this.authWrapper_.bucket();null!=a&&(this.bucket_=new i.a(a,""))}this.internals_=new l(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(r.g("ref",[r.e(t,!0)],arguments),null==this.bucket_)throw new Error("No Storage Bucket defined in Firebase Options.");var n=new u.a(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{i.a.makeFromUrl(e)}catch(e){throw"Expected valid full URL but got an invalid one."}}return r.g("refFromURL",[r.e(t,!1)],arguments),new u.a(this.authWrapper_,e)},Object.defineProperty(e.prototype,"maxUploadRetryTime",{get:function(){return this.authWrapper_.maxUploadRetryTime()},enumerable:!0,configurable:!0}),e.prototype.setMaxUploadRetryTime=function(e){r.g("setMaxUploadRetryTime",[r.c()],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){r.g("setMaxOperationRetryTime",[r.c()],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}(),l=function(){function e(e){this.service_=e}return e.prototype.delete=function(){return this.service_.authWrapper_.deleteApp(),a.c(void 0)},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return l});var r=n(38),o=n(12),i=n(255),a=n(39),s=n(16),u=n(256),c=n(10),l=function(){function e(t,n,o,i,a){if(this.bucket_=null,this.deleted_=!1,this.app_=t,null!==this.app_){var s=this.app_.options;c.a(s)&&(this.bucket_=e.extractBucket_(s))}this.storageRefMaker_=n,this.requestMaker_=o,this.pool_=a,this.service_=i,this.maxOperationRetryTime_=r.d,this.maxUploadRetryTime_=r.e,this.requestMap_=new u.a}return e.extractBucket_=function(e){var t=e[r.c]||null;return null==t?null:a.a.makeFromBucketSpec(t).bucket},e.prototype.getAuthToken=function(){return null!==this.app_&&c.a(this.app_.INTERNAL)&&c.a(this.app_.INTERNAL.getToken)?this.app_.INTERNAL.getToken().then(function(e){return null!==e?e.accessToken:null},function(e){return null}):s.c(null)},e.prototype.bucket=function(){if(this.deleted_)throw o.b();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 i.a(o.b());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}()},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var r=n(16),o=function(){function e(e){this.promise_=r.b(e)}return e.prototype.getPromise=function(){return this.promise_},e.prototype.cancel=function(e){void 0===e&&(e=!1)},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var r=n(19),o=n(38),i=function(){function e(){this.map_={},this.id_=o.h}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(){r.b(this.map_,function(e,t){t&&t.cancel(!0)}),this.map_={}},e}()},function(e,t,n){"use strict";function r(e,t){null!==t&&t.length>0&&(e.Authorization="Firebase "+t)}function o(e){var t="undefined"!==typeof a.default?a.default.SDK_VERSION:"AppManager";e["X-Firebase-Storage-Version"]="webjs/"+t}function i(e,t,n){var i=p.c(e.urlParams),a=e.url+i,s=l.a(e.headers);return r(s,t),o(s),new y(a,e.method,s,e.body,e.successCodes,e.additionalRetryCodes,e.handler,e.errorHandler,e.timeout,e.progressCallback,n)}t.a=i;var a=n(13),s=n(55),u=n(258),c=n(12),l=n(19),h=n(16),f=n(10),p=n(54),d=n(112),y=function(){function e(e,t,n,r,o,i,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_=o.slice(),this.additionalRetryCodes_=i.slice(),this.callback_=a,this.errorCallback_=s,this.progressCallback_=c,this.timeout_=u,this.pool_=l;var f=this;this.promise_=h.a(function(e,t){f.resolve_=e,f.reject_=t,f.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 v(!1,null,!0));var o=n.pool_.createXhrIo();n.pendingXhr_=o,null!==n.progressCallback_&&o.addUploadProgressListener(r),o.send(n.url_,n.method_,n.body_,n.headers_).then(function(t){null!==n.progressCallback_&&t.removeUploadProgressListener(r),n.pendingXhr_=null,t=t;var o=t.getErrorCode()===d.a.NO_ERROR,i=t.getStatus();if(!o||n.isRetryStatusCode_(i)){var a=t.getErrorCode()===d.a.ABORT;return void e(!1,new v(!1,null,a))}var u=s.b(n.successCodes_,i);e(!0,new v(u,t))})}function t(e,t){var r=n.resolve_,o=n.reject_,i=t.xhr;if(t.wasSuccessCode)try{var a=n.callback_(i,i.getResponseText());f.c(a)?r(a):r()}catch(e){o(e)}else if(null!==i){var s=c.s();s.setServerResponseProp(i.getResponseText()),o(n.errorCallback_?n.errorCallback_(i,s):s)}else if(t.canceled){var s=n.appDelete_?c.b():c.c();o(s)}else{var s=c.o();o(s)}}var n=this;this.canceled_?t(!1,new v(!1,null,!0)):this.backoffId_=u.a(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_&&u.b(this.backoffId_),null!==this.pendingXhr_&&this.pendingXhr_.abort()},e.prototype.isRetryStatusCode_=function(e){var t=e>=500&&e<600,n=[408,429],r=s.b(n,e),o=s.b(this.additionalRetryCodes_,e);return t||r||o},e}(),v=function(){function e(e,t,n){this.wasSuccessCode=e,this.xhr=t,this.canceled=!!n}return e}()},function(e,t,n){"use strict";function r(e,t,n){function r(){return 2===h}function o(){f||(f=!0,t.apply(null,arguments))}function i(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 o.apply(null,arguments);if(r()||l)return void o.apply(null,arguments);u<64&&(u*=2);var a;1===h?(h=2,a=0):a=1e3*(u+Math.random()),i(a)}}function s(e){p||(p=!0,f||(null!==c?(e||(h=2),clearTimeout(c),i(0)):e||(h=1)))}var u=1,c=null,l=!1,h=0,f=!1,p=!1;return i(0),setTimeout(function(){l=!0,s(!0)},n),s}function o(e){e(!1)}t.a=r,t.b=o},function(e,t,n){"use strict";n.d(t,"a",function(){return r});var r={apiKey:"AIzaSyC78cAI3nrO_5nX-4o_O7ybWGEkv8UwwA8",authDomain:"react-project-a3c86.firebaseapp.com",databaseURL:"https://react-project-a3c86.firebaseio.com",projectId:"react-project-a3c86",storageBucket:"",messagingSenderId:"948517234045"}},function(e,t,n){e.exports=n(261)},function(e,t,n){"use strict";function r(e){var t=new a(e),n=i(a.prototype.request,t);return o.extend(n,a.prototype,t),o.extend(n,t),n}var o=n(11),i=n(117),a=n(263),s=n(57),u=r(s);u.Axios=a,u.create=function(e){return r(o.merge(s,e))},u.Cancel=n(121),u.CancelToken=n(277),u.isCancel=n(120),u.all=function(e){return Promise.all(e)},u.spread=n(278),e.exports=u,e.exports.default=u},function(e,t){function n(e){return!!e.constructor&&"function"===typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function r(e){return"function"===typeof e.readFloatLE&&"function"===typeof e.slice&&n(e.slice(0,0))}e.exports=function(e){return null!=e&&(n(e)||r(e)||!!e._isBuffer)}},function(e,t,n){"use strict";function r(e){this.defaults=e,this.interceptors={request:new a,response:new a}}var o=n(57),i=n(11),a=n(272),s=n(273);r.prototype.request=function(e){"string"===typeof e&&(e=i.merge({url:arguments[0]},arguments[1])),e=i.merge(o,this.defaults,{method:"get"},e),e.method=e.method.toLowerCase();var t=[s,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach(function(e){t.unshift(e.fulfilled,e.rejected)}),this.interceptors.response.forEach(function(e){t.push(e.fulfilled,e.rejected)});t.length;)n=n.then(t.shift(),t.shift());return n},i.forEach(["delete","get","head","options"],function(e){r.prototype[e]=function(t,n){return this.request(i.merge(n||{},{method:e,url:t}))}}),i.forEach(["post","put","patch"],function(e){r.prototype[e]=function(t,n,r){return this.request(i.merge(r||{},{method:e,url:t,data:n}))}}),e.exports=r},function(e,t,n){"use strict";var r=n(11);e.exports=function(e,t){r.forEach(e,function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])})}},function(e,t,n){"use strict";var r=n(119);e.exports=function(e,t,n){var o=n.config.validateStatus;n.status&&o&&!o(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},function(e,t,n){"use strict";e.exports=function(e,t,n,r,o){return e.config=t,n&&(e.code=n),e.request=r,e.response=o,e}},function(e,t,n){"use strict";function r(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var o=n(11);e.exports=function(e,t,n){if(!t)return e;var i;if(n)i=n(t);else if(o.isURLSearchParams(t))i=t.toString();else{var a=[];o.forEach(t,function(e,t){null!==e&&"undefined"!==typeof e&&(o.isArray(e)&&(t+="[]"),o.isArray(e)||(e=[e]),o.forEach(e,function(e){o.isDate(e)?e=e.toISOString():o.isObject(e)&&(e=JSON.stringify(e)),a.push(r(t)+"="+r(e))}))}),i=a.join("&")}return i&&(e+=(-1===e.indexOf("?")?"?":"&")+i),e}},function(e,t,n){"use strict";var r=n(11),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,i,a={};return e?(r.forEach(e.split("\n"),function(e){if(i=e.indexOf(":"),t=r.trim(e.substr(0,i)).toLowerCase(),n=r.trim(e.substr(i+1)),t){if(a[t]&&o.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([n]):a[t]?a[t]+", "+n:n}}),a):a}},function(e,t,n){"use strict";var r=n(11);e.exports=r.isStandardBrowserEnv()?function(){function e(e){var t=e;return n&&(o.setAttribute("href",t),t=o.href),o.setAttribute("href",t),{href:o.href,protocol:o.protocol?o.protocol.replace(/:$/,""):"",host:o.host,search:o.search?o.search.replace(/^\?/,""):"",hash:o.hash?o.hash.replace(/^#/,""):"",hostname:o.hostname,port:o.port,pathname:"/"===o.pathname.charAt(0)?o.pathname:"/"+o.pathname}}var t,n=/(msie|trident)/i.test(navigator.userAgent),o=document.createElement("a");return t=e(window.location.href),function(n){var o=r.isString(n)?e(n):n;return o.protocol===t.protocol&&o.host===t.host}}():function(){return function(){return!0}}()},function(e,t,n){"use strict";function r(){this.message="String contains an invalid character"}function o(e){for(var t,n,o=String(e),a="",s=0,u=i;o.charAt(0|s)||(u="=",s%1);a+=u.charAt(63&t>>8-s%1*8)){if((n=o.charCodeAt(s+=.75))>255)throw new r;t=t<<8|n}return a}var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";r.prototype=new Error,r.prototype.code=5,r.prototype.name="InvalidCharacterError",e.exports=o},function(e,t,n){"use strict";var r=n(11);e.exports=r.isStandardBrowserEnv()?function(){return{write:function(e,t,n,o,i,a){var s=[];s.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(o)&&s.push("path="+o),r.isString(i)&&s.push("domain="+i),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()},function(e,t,n){"use strict";function r(){this.handlers=[]}var o=n(11);r.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},r.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},r.prototype.forEach=function(e){o.forEach(this.handlers,function(t){null!==t&&e(t)})},e.exports=r},function(e,t,n){"use strict";function r(e){e.cancelToken&&e.cancelToken.throwIfRequested()}var o=n(11),i=n(274),a=n(120),s=n(57),u=n(275),c=n(276);e.exports=function(e){return r(e),e.baseURL&&!u(e.url)&&(e.url=c(e.baseURL,e.url)),e.headers=e.headers||{},e.data=i(e.data,e.headers,e.transformRequest),e.headers=o.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),o.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]}),(e.adapter||s.adapter)(e).then(function(t){return r(e),t.data=i(t.data,t.headers,e.transformResponse),t},function(t){return a(t)||(r(e),t&&t.response&&(t.response.data=i(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})}},function(e,t,n){"use strict";var r=n(11);e.exports=function(e,t,n){return r.forEach(n,function(n){e=n(e,t)}),e}},function(e,t,n){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,n){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,n){"use strict";function r(e){if("function"!==typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var n=this;e(function(e){n.reason||(n.reason=new o(e),t(n.reason))})}var o=n(121);r.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},r.source=function(){var e;return{token:new r(function(t){e=t}),cancel:e}},e.exports=r},function(e,t,n){"use strict";e.exports=function(e){return function(t){return e.apply(null,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 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 i(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(2),s=n.n(a),u=n(58),c=n(27),l=n.n(c),h=n(59),f=n.n(h),p=n(305),d=n(307),y=n(129),v=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}}(),m=function(e){function t(e){r(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.toggleAdaptiveMenu=function(){n.state.isAdaptiveMenuOpen?n.setState({isAdaptiveMenuOpen:!1}):n.setState({isAdaptiveMenuOpen:!0})},n.state={isAdaptiveMenuOpen:!1},n}return i(t,e),v(t,[{key:"render",value:function(){var e=this;return s.a.createElement(u.d,{history:f()()},s.a.createElement("div",{className:"main-component"},s.a.createElement("nav",null,s.a.createElement("div",{className:"container"},s.a.createElement("div",{className:"nav-adaptive-btn"},s.a.createElement(l.a,{name:"bars",onClick:this.toggleAdaptiveMenu})),s.a.createElement("div",{ref:"navLinks",className:"nav-links "+(this.state.isAdaptiveMenuOpen?"open-adaptive-menu":"")},s.a.createElement("li",{onClick:this.toggleAdaptiveMenu},s.a.createElement(u.b,{exact:!0,to:"/",activeStyle:{backgroundColor:"rgb(232,232,232)"}},"Main Page")),s.a.createElement("li",{onClick:this.toggleAdaptiveMenu},s.a.createElement(u.b,{to:"/addTest",activeStyle:{backgroundColor:"rgb(232,232,232)"}},"Add New Test"))))),s.a.createElement(u.c,{exact:!0,path:"/",render:function(t){return s.a.createElement(p.a,Object.assign({},t,{toggleAdaptiveMenu:e.toggleAdaptiveMenu}))}}),s.a.createElement(u.c,{path:"/addTest",component:d.a}),s.a.createElement(u.c,{path:"/test/:id",component:y.a})))}}]),t}(a.Component);t.a=m},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 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 i(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(4),s=n.n(a),u=n(2),c=n.n(u),l=n(5),h=n.n(l),f=n(59),p=n.n(f),d=n(62),y=function(e){function t(){var n,i,a;r(this,t);for(var s=arguments.length,u=Array(s),c=0;c<s;c++)u[c]=arguments[c];return n=i=o(this,e.call.apply(e,[this].concat(u))),i.history=p()(i.props),a=n,o(i,a)}return i(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}},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 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 i(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(4),s=n.n(a),u=n(2),c=n.n(u),l=n(5),h=n.n(l),f=n(282),p=n.n(f),d=n(62),y=function(e){function t(){var n,i,a;r(this,t);for(var s=arguments.length,u=Array(s),c=0;c<s;c++)u[c]=arguments[c];return n=i=o(this,e.call.apply(e,[this].concat(u))),i.history=p()(i.props),a=n,o(i,a)}return i(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";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var 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},i=n(4),a=r(i),s=n(8),u=r(s),c=n(60),l=n(25),h=n(61),f=r(h),p=n(124),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,i=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){o(K,e),K.length=t.length,C.notifyListeners(K.location,K.action)},S=!1,O=null,N=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(O===(0,l.createPath)(n))return;O=null,P(n)}},P=function(e){if(S)S=!1,T();else{C.confirmTransitionTo(e,"POP",i,function(t){t?T({action:"POP",location:e}):I(e)})}},I=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 o=n-r;o&&(S=!0,j(o))},R=y(),A=b(R);R!==A&&m(A);var k=E(),x=[(0,l.createPath)(k)],D=function(e){return"#"+b(g+(0,l.createPath)(e))},M=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",i,function(e){if(e){var t=(0,l.createPath)(n),r=b(g+t);if(y()!==r){O=t,v(r);var o=x.lastIndexOf((0,l.createPath)(K.location)),i=x.slice(0,-1===o?0:o+1);i.push(t),x=i,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()}})},L=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",i,function(e){if(e){var t=(0,l.createPath)(n),r=b(g+t);y()!==r&&(O=t,m(r));var o=x.indexOf((0,l.createPath)(K.location));-1!==o&&(x[o]=t),T({action:"REPLACE",location:n})}})},j=function(e){(0,a.default)(n,"Hash history go(n) causes a full page reload in this browser"),t.go(e)},F=function(){return j(-1)},U=function(){return j(1)},W=0,B=function(e){W+=e,1===W?(0,p.addEventListener)(window,"hashchange",N):0===W&&(0,p.removeEventListener)(window,"hashchange",N)},V=!1,q=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=C.setPrompt(e);return V||(B(1),V=!0),function(){return V&&(V=!1,B(-1)),t()}},H=function(e){var t=C.appendListener(e);return B(1),function(){B(-1),t()}},K={length:t.length,action:"POP",location:k,createHref:D,push:M,replace:L,go:j,goBack:F,goForward:U,block:q,listen:H};return K};t.default=g},function(e,t,n){"use strict";var r=n(284);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 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 i(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(4),s=n.n(a),u=n(2),c=n.n(u),l=n(5),h=n.n(l),f=n(285),p=n.n(f),d=n(63),y=function(e){function t(){var n,i,a;r(this,t);for(var s=arguments.length,u=Array(s),c=0;c<s;c++)u[c]=arguments[c];return n=i=o(this,e.call.apply(e,[this].concat(u))),i.history=p()(i.props),a=n,o(i,a)}return i(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";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var o="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},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},a=n(4),s=r(a),u=n(25),c=n(60),l=n(61),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){i(I,e),I.length=I.entries.length,y.notifyListeners(I.location,I.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":o(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(),I.location);y.confirmTransitionTo(r,"PUSH",t,function(e){if(e){var t=I.index,n=t+1,o=I.entries.slice(0);o.length>n?o.splice(n,o.length-n,r):o.push(r),v({action:"PUSH",location:r,index:n,entries:o})}})},E=function(e,n){(0,s.default)(!("object"===("undefined"===typeof e?"undefined":o(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(),I.location);y.confirmTransitionTo(r,"REPLACE",t,function(e){e&&(I.entries[I.index]=r,v({action:"REPLACE",location:r}))})},C=function(e){var n=f(I.index+e,0,I.entries.length-1),r=I.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)},O=function(e){var t=I.index+e;return t>=0&&t<I.entries.length},N=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return y.setPrompt(e)},P=function(e){return y.appendListener(e)},I={length:_.length,action:"POP",location:_[g],index:g,entries:_,createHref:b,push:w,replace:E,go:C,goBack:T,goForward:S,canGo:O,block:N,listen:P};return I};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 o=n(2),i=n.n(o),a=n(5),s=n.n(a),u=n(126),c=n(125),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,o=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 i.a.createElement(u.a,{path:"object"===("undefined"===typeof t?"undefined":h(t))?t.pathname:t,exact:n,strict:o,location:a,children:function(e){var n=e.location,r=e.match,o=!!(y?y(r,n):r);return i.a.createElement(c.a,l({to:t,className:o?[f,s].filter(function(e){return e}).join(" "):f,style:o?l({},d,p):d,"aria-current":o&&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"},t.a=f},function(e,t,n){function r(e,t){for(var n,r=[],o=0,i=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(i,f),i=f+l.length,h)a+=h[1];else{var p=e[i],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||o++,prefix:d||"",delimiter:T,optional:C,repeat:E,partial:w,asterisk:!!b,pattern:S?c(S):b?".*":"[^"+u(T)+"]+?"})}}return i<e.length&&(a+=e.substr(i)),a&&r.push(a),r}function o(e,t){return s(r(e,t))}function i(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 o="",s=n||{},u=r||{},c=u.pretty?i:encodeURIComponent,l=0;l<e.length;l++){var h=e[l];if("string"!==typeof h){var f,p=s[h.name];if(null==p){if(h.optional){h.partial&&(o+=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)+"`");o+=(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+'"');o+=h.prefix+f}}else o+=h}return o}}function u(e){return e.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function c(e){return e.replace(/([=!:$\/()])/g,"\\$1")}function l(e,t){return e.keys=t,e}function 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=[],o=0;o<e.length;o++)r.push(v(e[o],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,o=!1!==n.end,i="",a=0;a<e.length;a++){var s=e[a];if("string"===typeof s)i+=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+")",i+=f}}var p=u(n.delimiter||"/"),d=i.slice(-p.length)===p;return r||(i=(d?i.slice(0,-p.length):i)+"(?:"+p+"(?=$))?"),i+=o?"$":r&&d?"":"(?="+p+"|$)",l(new RegExp("^"+i,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(288);e.exports=v,e.exports.parse=r,e.exports.compile=o,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(290);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 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 i(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(2),s=n.n(a),u=n(5),c=n.n(u),l=n(8),h=n.n(l),f=function(e){function t(){return r(this,t),o(this,e.apply(this,arguments))}return i(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";var r=n(292);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 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 i(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(2),s=n.n(a),u=n(5),c=n.n(u),l=n(4),h=n.n(l),f=n(8),p=n.n(f),d=n(293),y=function(e){function t(){return r(this,t),o(this,e.apply(this,arguments))}return i(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;n?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";var r=(n(294),n(295),n(296),n(40));n.d(t,"a",function(){return r.a}),n.d(t,"b",function(){return r.b});n(26)},function(e,t,n){"use strict";var r=n(4),o=(n.n(r),n(8));n.n(o),n(40),n(26),n(65),n(128),"function"===typeof Symbol&&Symbol.iterator,Object.assign},function(e,t,n){"use strict";var r=n(4),o=(n.n(r),n(8)),i=(n.n(o),n(40),n(26));n(65),n(128),Object.assign,i.f,i.a,i.a,i.a},function(e,t,n){"use strict";var r=n(4);n.n(r),n(26),n(40),n(65),"function"===typeof Symbol&&Symbol.iterator,Object.assign},function(e,t,n){"use strict";var r=n(298);r.a},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 o(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 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(4),u=n.n(s),c=n(8),l=n.n(c),h=n(2),f=n.n(h),p=n(5),d=n.n(p),y=n(25),v=(n.n(y),n(63)),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,o=void 0===r?"":r,i=e.hash,a=void 0===i?"":i;return{pathname:n,search:"?"===o?"":o,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;o(this,t);for(var s=arguments.length,u=Array(s),c=0;c<s;c++)u[c]=arguments[c];return n=r=i(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,o=t.context;o.action="PUSH",o.location=_(n,w(e)),o.url=E(o.location)},r.handleReplace=function(e){var t=r.props,n=t.basename,o=t.context;o.action="REPLACE",o.location=_(n,w(e)),o.url=E(o.location)},r.handleListen=function(){return T},r.handleBlock=function(){return T},a=n,i(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),o=r(e,["basename","context","location"]),i={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({},o,{history:i}))},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";var r=n(300);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 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 i(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(2),s=n.n(a),u=n(5),c=n.n(u),l=n(4),h=n.n(l),f=n(8),p=n.n(f),d=n(64),y=function(e){function t(){return r(this,t),o(this,e.apply(this,arguments))}return i(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,o=void 0;return s.a.Children.forEach(t,function(t){if(s.a.isValidElement(t)){var i=t.props,a=i.path,u=i.exact,c=i.strict,l=i.sensitive,h=i.from,f=a||h;null==r&&(o=t,r=f?Object(d.a)(n.pathname,{path:f,exact:u,strict:c,sensitive:l}):e.match)}}),r?s.a.cloneElement(o,{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";var r=n(64);r.a},function(e,t,n){"use strict";var r=n(303);r.a},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 o=n(2),i=n.n(o),a=n(5),s=n.n(a),u=n(70),c=n.n(u),l=n(127),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,o=r(t,["wrappedComponentRef"]);return i.a.createElement(l.a,{render:function(t){return i.a.createElement(e,h({},o,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,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={position:"absolute",width:"1px",height:"1px",padding:"0px",margin:"-1px",overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",border:"0px"},e.exports=t.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 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 i(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(2),s=n.n(a),u=(n(20),n(56),n(129),n(29)),c=n(58),l=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}}();window.once=!0;var h=function(e){function t(e){return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return i(t,e),l(t,[{key:"render",value:function(){var e=this;return s.a.createElement("div",{className:"main-page container"},this.props.tests.map(function(t,n){return s.a.createElement("div",{onClick:function(){e.props.toggleAdaptiveMenu()},className:"main-page-item",key:n},s.a.createElement(c.a,{to:"/test/"+n},s.a.createElement("div",{className:"main-page-item-img"},s.a.createElement("img",{src:t.imageInputValue}),s.a.createElement("img",{src:"https://cdn.onlinewebfonts.com/svg/img_382094.png",className:"cover-icon"})),s.a.createElement("div",{className:"main-page-item-description"},s.a.createElement("div",{className:"main-page-item-title"},t.title),s.a.createElement("div",{className:"main-page-item-info"},t.description))))}))}}]),t}(a.Component),f=function(e){return{tests:e}},p=function(e){return{}};t.a=Object(u.b)(f,p)(h)},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 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 i(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(2),s=n.n(a),u=n(27),c=n.n(u),l=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}}(),h=function(e){function t(e){r(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.nextQuestion=function(){if(n.state.canIClick){n.setState({canIClick:!1}),setTimeout(function(){n.setState({canIClick:!0})},2e3),setTimeout(function(){n.props.changeZIndex()},960);setTimeout(function(){n.refs.TestComponentItem&&(n.refs.TestComponentItem.className="test-component-item")},2e3);n.props.questionNumber%2==0?n.props.nextQuestion2():n.props.nextQuestion(),n.refs.TestComponentItem.className="test-component-item test-component-animation"}},n.state={canIClick:!0},n}return i(t,e),l(t,[{key:"render",value:function(){var e=this;return s.a.createElement("div",{ref:"TestComponentItem",className:"test-component-item",style:{zIndex:this.props.zIndex}},s.a.createElement("div",{className:"item-component-item-header"},s.a.createElement("span",{className:"test-component-item-number"},this.props.questionNumber+1+". "),s.a.createElement("span",{className:"test-component-question"},this.props.info.question)),s.a.createElement("div",{className:"test-component-item-answers"},this.props.info.answerCount.map(function(t,n){return s.a.createElement("div",{onClick:function(){e.props.answer(e.props.questionNumber,t.rating,n)},key:n},s.a.createElement(c.a,{name:"circle-o",className:"answer-circle "+(n==e.props.answerArray[e.props.questionNumber]?"answer-circle-active":""),id:"icon"}),s.a.createElement("label",{htmlFor:"icon"},t.value))})),s.a.createElement("div",{className:"next-question"},this.props.questionsLength!=this.props.questionNumber+1?s.a.createElement("button",{onMouseUp:function(e){e.target.style.boxShadow="none"},onMouseDown:function(e){e.target.style.boxShadow="inset 0 0 10px #cacaca"},onClick:this.nextQuestion,type:"button"},"Next"):s.a.createElement("button",{onClick:function(){e.props.showResults(e.state.canIClick)},type:"button"},"Show results")))}}]),t}(a.Component);t.a=h},function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function o(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 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(2),u=n.n(s),c=n(20),l=n(56),h=n(29),f=n(308),p=n(27),d=(n.n(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}}()),y=function(e){function t(e){o(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.submitForm=function(e){e.preventDefault(),n.props.addTest(n.state.testObject)},n.updateTitle=function(e){var t=n.state.testObject;t.title=e.target.value,n.setState({testObject:t})},n.updateDescription=function(e){var t=n.state.testObject;t.description=e.target.value,n.setState({testObject:t})},n.updateKeyword=function(e){var t=n.state.testObject;t.keyword=e.target.value,n.setState({testObject:t})},n.updateReadMore=function(e){var t=n.state.testObject;t.readMore=e.target.value,n.setState({testObject:t})},n.imageInput=function(e){var t=n.state.testObject;t.imageInputValue=e.target.value,n.setState({testObject:t}),n.setState({isShowImg:!0})},n.imageError=function(){n.setState({isShowImg:!1})},n.addQuestion=function(){n.setState(function(e,t){return{itemsCount:++e.itemsCount}})},n.deleteQuestion=function(){var e=n.state.testObject;e.questions.pop(),n.setState({testObject:e}),n.setState(function(e,t){return{itemsCount:--e.itemsCount}})},n.state={itemsCount:1,testObject:{title:"",description:"",keyword:"",readMore:"",questions:[{},{}],imageInputValue:""},isShowImg:!0},n}return a(t,e),d(t,[{key:"render",value:function(){var e=this;return window.AddTestStateQuestions=this.state.testObject.questions,u.a.createElement("div",{className:"add-test-component"},u.a.createElement("div",{className:"add-test-container"},u.a.createElement("form",{onSubmit:this.submitForm,action:"#"},u.a.createElement("div",{className:"add-test-header"},u.a.createElement("span",{className:"title-text"},"Enter the name of the test:"),u.a.createElement("input",{onInput:this.updateTitle,type:"text",className:"title-input"}),u.a.createElement("span",{className:"title-text"},"Enter the keyword:"),u.a.createElement("input",{onInput:this.updateKeyword,type:"text",className:"title-input"}),u.a.createElement("span",{className:"title-text"},"Read more:"),u.a.createElement("textarea",{onInput:this.updateReadMore,type:"text",className:"title-input"}),u.a.createElement("span",{className:"title-text"},"Enter the description of the test:"),u.a.createElement("input",{onInput:this.updateDescription,type:"text",className:"description-input"})),[].concat(r(Array(this.state.itemsCount))).map(function(t,n){return u.a.createElement(f.a,{key:n,questionNumber:++n,takeInfo:e.takeInfo.bind(e)})}),u.a.createElement("div",{className:"submit-form"},u.a.createElement("div",{className:"submit-inner-wrapper"},u.a.createElement("div",{className:"question-edit-buttons"},u.a.createElement("button",{onMouseUp:function(e){e.target.style.boxShadow="none"},onMouseDown:function(e){e.target.style.boxShadow="inset 0 0 10px #cacaca"},type:"button",onClick:this.addQuestion},"Add question"),u.a.createElement("button",{onMouseUp:function(e){e.target.style.boxShadow="none"},onMouseDown:function(e){e.target.style.boxShadow="inset 0 0 10px #cacaca"},type:"button",onClick:this.deleteQuestion},"Delete question")),u.a.createElement("div",{className:"select-image"},u.a.createElement("input",{onInput:this.imageInput,type:"text",placeholder:"enter the image url.."}),this.state.isShowImg?u.a.createElement("img",{onError:this.imageError,ref:"image",className:"preview",style:{width:"75%"},src:this.state.testObject.imageInputValue}):null)),u.a.createElement("div",{className:"send-input"},u.a.createElement("input",{onMouseUp:function(e){e.target.style.boxShadow="none"},onMouseDown:function(e){e.target.style.boxShadow="inset 0 0 10px #cacaca"},ref:"submitButton",type:"submit",value:"Send"}))))))}},{key:"takeInfo",value:function(e,t){t--,console.log(e);var n=this.state.testObject;n.questions[t]=e,this.setState({testObject:n})}}]),t}(s.Component),v=function(e){return{tests:e}},m=function(e){return{addTest:Object(c.a)(l.a,e)}};t.a=Object(h.b)(v,m)(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 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 i(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(2),s=n.n(a),u=n(27),c=n.n(u),l=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}}(),h=function(e){function t(e){r(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.ratingUp=function(e){var t=n.state.answerCount;4!=t[e].rating&&(t[e].rating+=1,n.setState({answerCount:t})),setTimeout(function(){n.props.takeInfo(n.state,n.props.questionNumber)},100)},n.ratingDown=function(e){var t=n.state.answerCount;0!=t[e].rating&&(t[e].rating-=1,n.setState({answerCount:t})),setTimeout(function(){n.props.takeInfo(n.state,n.props.questionNumber)},100)},n.addAnswer=function(){n.setState(function(e,t){return{answerCount:e.answerCount.concat({value:"",rating:0})}})},n.deleteAnswer=function(e){n.setState(function(t){return{answerCount:t.answerCount.filter(function(t,n){return e!=n})}})},n.inputChange=function(e,t){var r=n.state.answerCount;r[e].value=t.target.value,n.setState({answerCount:r}),setTimeout(function(){n.props.takeInfo(n.state,n.props.questionNumber)},100)},n.questionChange=function(e){n.setState({question:e.target.value}),setTimeout(function(){n.props.takeInfo(n.state,n.props.questionNumber)},100)},n.state={question:"",answerCount:[{value:"",rating:0},{value:"",rating:0}]},n}return i(t,e),l(t,[{key:"render",value:function(){var e=this;return s.a.createElement("div",{className:"add-test-item"},s.a.createElement("div",{className:"question-input-wrapper"},s.a.createElement("span",{className:"question-counter"},this.props.questionNumber,"."),s.a.createElement("input",{className:"question-input",value:this.state.question,onInput:this.questionChange,ref:"question",type:"text",placeholder:"enter the question.."}),s.a.createElement(c.a,{name:"question",className:"question-mark"})),this.state.answerCount.map(function(t,n){return s.a.createElement("div",{className:"answer-input-wrapper",key:n},s.a.createElement(c.a,{name:"circle-o",className:"answer-circle"}),s.a.createElement("input",{onChange:e.sendData,placeholder:"",value:t.value,onInput:function(t){return e.inputChange(n,t)},className:"answer-input",type:"text"}),s.a.createElement("div",{className:"question-rating"},s.a.createElement("div",{className:"question-rating-number"},t.rating),s.a.createElement("div",{className:"question-rating-buttons"},s.a.createElement("div",{className:"question-rating-button",onClick:function(){return e.ratingUp(n)}},s.a.createElement(c.a,{name:"angle-up"})),s.a.createElement("div",{className:"question-rating-button",onClick:function(){return e.ratingDown(n)}},s.a.createElement(c.a,{name:"angle-down"})))),s.a.createElement(c.a,{onClick:function(){return e.deleteAnswer(n)},name:"times",className:"icon"}))}),s.a.createElement("button",{onMouseUp:function(e){e.target.style.boxShadow="none"},onMouseDown:function(e){e.target.style.boxShadow="inset 0 0 10px #cacaca"},type:"button",onClick:this.addAnswer},"Add answer"))}}]),t}(a.Component);t.a=h},function(e,t,n){"use strict";function r(){if("serviceWorker"in navigator){if(new URL("/build",window.location).origin!==window.location.origin)return;window.addEventListener("load",function(){var e="/build/service-worker.js";a?i(e):o(e)})}}function o(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 i(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()})}):o(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.e928c8bd.js.map