File: D:/HostingSpaces/RImmers2/portal.photomenu.nl/wwwroot/node_modules/firebase/auth.js
var firebase = require('./app');
(function(){
/*! @license Firebase v3.6.4
Build: 3.6.4-rc.2
Terms: https://firebase.google.com/terms/ */
(function(){var h,aa=aa||{},l=this,ba=function(){},m=function(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&
!a.propertyIsEnumerable("call"))return"function"}else return"null";else if("function"==b&&"undefined"==typeof a.call)return"object";return b},ca=function(a){return null===a},da=function(a){return"array"==m(a)},ea=function(a){var b=m(a);return"array"==b||"object"==b&&"number"==typeof a.length},p=function(a){return"string"==typeof a},fa=function(a){return"number"==typeof a},q=function(a){return"function"==m(a)},ga=function(a){var b=typeof a;return"object"==b&&null!=a||"function"==b},ha=function(a,b,
c){return a.call.apply(a.bind,arguments)},ia=function(a,b,c){if(!a)throw Error();if(2<arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var c=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(c,d);return a.apply(b,c)}}return function(){return a.apply(b,arguments)}},r=function(a,b,c){r=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?ha:ia;return r.apply(null,arguments)},ja=function(a,b){var c=Array.prototype.slice.call(arguments,
1);return function(){var b=c.slice();b.push.apply(b,arguments);return a.apply(this,b)}},ka=Date.now||function(){return+new Date},t=function(a,b){function c(){}c.prototype=b.prototype;a.gd=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.Af=function(a,c,f){for(var d=Array(arguments.length-2),e=2;e<arguments.length;e++)d[e-2]=arguments[e];return b.prototype[c].apply(a,d)}};var u=function(a){if(Error.captureStackTrace)Error.captureStackTrace(this,u);else{var b=Error().stack;b&&(this.stack=b)}a&&(this.message=String(a))};t(u,Error);u.prototype.name="CustomError";var la=function(a,b){for(var c=a.split("%s"),d="",e=Array.prototype.slice.call(arguments,1);e.length&&1<c.length;)d+=c.shift()+e.shift();return d+c.join("%s")},ma=String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},na=/&/g,oa=/</g,pa=/>/g,qa=/"/g,ra=/'/g,sa=/\x00/g,ta=/[\x00&<>"']/,v=function(a,b){return-1!=a.indexOf(b)},ua=function(a,b){return a<b?-1:a>b?1:0};var va=function(a,b){b.unshift(a);u.call(this,la.apply(null,b));b.shift()};t(va,u);va.prototype.name="AssertionError";
var wa=function(a,b,c,d){var e="Assertion failed";if(c)var e=e+(": "+c),f=d;else a&&(e+=": "+a,f=b);throw new va(""+e,f||[]);},w=function(a,b,c){a||wa("",null,b,Array.prototype.slice.call(arguments,2))},xa=function(a,b){throw new va("Failure"+(a?": "+a:""),Array.prototype.slice.call(arguments,1));},ya=function(a,b,c){fa(a)||wa("Expected number but got %s: %s.",[m(a),a],b,Array.prototype.slice.call(arguments,2));return a},za=function(a,b,c){p(a)||wa("Expected string but got %s: %s.",[m(a),a],b,Array.prototype.slice.call(arguments,
2))},Aa=function(a,b,c){q(a)||wa("Expected function but got %s: %s.",[m(a),a],b,Array.prototype.slice.call(arguments,2))};var Ba=Array.prototype.indexOf?function(a,b,c){w(null!=a.length);return Array.prototype.indexOf.call(a,b,c)}:function(a,b,c){c=null==c?0:0>c?Math.max(0,a.length+c):c;if(p(a))return p(b)&&1==b.length?a.indexOf(b,c):-1;for(;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1},x=Array.prototype.forEach?function(a,b,c){w(null!=a.length);Array.prototype.forEach.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=p(a)?a.split(""):a,f=0;f<d;f++)f in e&&b.call(c,e[f],f,a)},Ca=function(a,b){for(var c=p(a)?
a.split(""):a,d=a.length-1;0<=d;--d)d in c&&b.call(void 0,c[d],d,a)},Da=Array.prototype.map?function(a,b,c){w(null!=a.length);return Array.prototype.map.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=Array(d),f=p(a)?a.split(""):a,g=0;g<d;g++)g in f&&(e[g]=b.call(c,f[g],g,a));return e},Fa=Array.prototype.some?function(a,b,c){w(null!=a.length);return Array.prototype.some.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=p(a)?a.split(""):a,f=0;f<d;f++)if(f in e&&b.call(c,e[f],f,a))return!0;return!1},
Ha=function(a){var b;a:{b=Ga;for(var c=a.length,d=p(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(void 0,d[e],e,a)){b=e;break a}b=-1}return 0>b?null:p(a)?a.charAt(b):a[b]},Ia=function(a,b){return 0<=Ba(a,b)},Ka=function(a,b){b=Ba(a,b);var c;(c=0<=b)&&Ja(a,b);return c},Ja=function(a,b){w(null!=a.length);return 1==Array.prototype.splice.call(a,b,1).length},La=function(a,b){var c=0;Ca(a,function(d,e){b.call(void 0,d,e,a)&&Ja(a,e)&&c++})},Ma=function(a){return Array.prototype.concat.apply(Array.prototype,
arguments)},Na=function(a){var b=a.length;if(0<b){for(var c=Array(b),d=0;d<b;d++)c[d]=a[d];return c}return[]};var Oa=function(a,b){for(var c in a)b.call(void 0,a[c],c,a)},Pa=function(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b},Qa=function(a){var b=[],c=0,d;for(d in a)b[c++]=d;return b},Ra=function(a){for(var b in a)return!1;return!0},Sa=function(a,b){for(var c in a)if(!(c in b)||a[c]!==b[c])return!1;for(c in b)if(!(c in a))return!1;return!0},Ta=function(a){var b={},c;for(c in a)b[c]=a[c];return b},Ua="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),
Va=function(a,b){for(var c,d,e=1;e<arguments.length;e++){d=arguments[e];for(c in d)a[c]=d[c];for(var f=0;f<Ua.length;f++)c=Ua[f],Object.prototype.hasOwnProperty.call(d,c)&&(a[c]=d[c])}};var Xa;a:{var Ya=l.navigator;if(Ya){var Za=Ya.userAgent;if(Za){Xa=Za;break a}}Xa=""}var y=function(a){return v(Xa,a)};var $a=function(a){$a[" "](a);return a};$a[" "]=ba;var bb=function(a,b){var c=ab;return Object.prototype.hasOwnProperty.call(c,a)?c[a]:c[a]=b(a)};var cb=y("Opera"),A=y("Trident")||y("MSIE"),db=y("Edge"),eb=db||A,fb=y("Gecko")&&!(v(Xa.toLowerCase(),"webkit")&&!y("Edge"))&&!(y("Trident")||y("MSIE"))&&!y("Edge"),gb=v(Xa.toLowerCase(),"webkit")&&!y("Edge"),hb=function(){var a=l.document;return a?a.documentMode:void 0},ib;
a:{var jb="",kb=function(){var a=Xa;if(fb)return/rv\:([^\);]+)(\)|;)/.exec(a);if(db)return/Edge\/([\d\.]+)/.exec(a);if(A)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a);if(gb)return/WebKit\/(\S+)/.exec(a);if(cb)return/(?:Version)[ \/]?(\S+)/.exec(a)}();kb&&(jb=kb?kb[1]:"");if(A){var lb=hb();if(null!=lb&&lb>parseFloat(jb)){ib=String(lb);break a}}ib=jb}
var mb=ib,ab={},B=function(a){return bb(a,function(){for(var b=0,c=ma(String(mb)).split("."),d=ma(String(a)).split("."),e=Math.max(c.length,d.length),f=0;0==b&&f<e;f++){var g=c[f]||"",k=d[f]||"";do{g=/(\d*)(\D*)(.*)/.exec(g)||["","","",""];k=/(\d*)(\D*)(.*)/.exec(k)||["","","",""];if(0==g[0].length&&0==k[0].length)break;b=ua(0==g[1].length?0:parseInt(g[1],10),0==k[1].length?0:parseInt(k[1],10))||ua(0==g[2].length,0==k[2].length)||ua(g[2],k[2]);g=g[3];k=k[3]}while(0==b)}return 0<=b})},nb;var ob=l.document;
nb=ob&&A?hb()||("CSS1Compat"==ob.compatMode?parseInt(mb,10):5):void 0;var pb=function(a){return Da(a,function(a){a=a.toString(16);return 1<a.length?a:"0"+a}).join("")};var qb=null,rb=null,tb=function(a){var b="";sb(a,function(a){b+=String.fromCharCode(a)});return b},sb=function(a,b){function c(b){for(;d<a.length;){var c=a.charAt(d++),e=rb[c];if(null!=e)return e;if(!/^[\s\xa0]*$/.test(c))throw Error("Unknown base64 encoding at char: "+c);}return b}ub();for(var d=0;;){var e=c(-1),f=c(0),g=c(64),k=c(64);if(64===k&&-1===e)break;b(e<<2|f>>4);64!=g&&(b(f<<4&240|g>>2),64!=k&&b(g<<6&192|k))}},ub=function(){if(!qb){qb={};rb={};for(var a=0;65>a;a++)qb[a]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(a),
rb[qb[a]]=a,62<=a&&(rb["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_.".charAt(a)]=a)}};var vb=function(){this.ya=-1};var yb=function(a,b){this.ya=64;this.Pb=l.Uint8Array?new Uint8Array(this.ya):Array(this.ya);this.uc=this.Va=0;this.h=[];this.Xe=a;this.Ad=b;this.wf=l.Int32Array?new Int32Array(64):Array(64);void 0!==wb||(wb=l.Int32Array?new Int32Array(xb):xb);this.reset()},wb;t(yb,vb);for(var zb=[],Ab=0;63>Ab;Ab++)zb[Ab]=0;var Bb=Ma(128,zb);yb.prototype.reset=function(){this.uc=this.Va=0;this.h=l.Int32Array?new Int32Array(this.Ad):Na(this.Ad)};
var Cb=function(a){var b=a.Pb;w(b.length==a.ya);for(var c=a.wf,d=0,e=0;e<b.length;)c[d++]=b[e]<<24|b[e+1]<<16|b[e+2]<<8|b[e+3],e=4*d;for(b=16;64>b;b++){var e=c[b-15]|0,d=c[b-2]|0,f=(c[b-16]|0)+((e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3)|0,g=(c[b-7]|0)+((d>>>17|d<<15)^(d>>>19|d<<13)^d>>>10)|0;c[b]=f+g|0}for(var d=a.h[0]|0,e=a.h[1]|0,k=a.h[2]|0,n=a.h[3]|0,z=a.h[4]|0,Ea=a.h[5]|0,Wa=a.h[6]|0,f=a.h[7]|0,b=0;64>b;b++)var ne=((d>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10))+(d&e^d&k^e&k)|0,g=z&Ea^~z&Wa,f=f+((z>>>6|
z<<26)^(z>>>11|z<<21)^(z>>>25|z<<7))|0,g=g+(wb[b]|0)|0,g=f+(g+(c[b]|0)|0)|0,f=Wa,Wa=Ea,Ea=z,z=n+g|0,n=k,k=e,e=d,d=g+ne|0;a.h[0]=a.h[0]+d|0;a.h[1]=a.h[1]+e|0;a.h[2]=a.h[2]+k|0;a.h[3]=a.h[3]+n|0;a.h[4]=a.h[4]+z|0;a.h[5]=a.h[5]+Ea|0;a.h[6]=a.h[6]+Wa|0;a.h[7]=a.h[7]+f|0};
yb.prototype.update=function(a,b){void 0===b&&(b=a.length);var c=0,d=this.Va;if(p(a))for(;c<b;)this.Pb[d++]=a.charCodeAt(c++),d==this.ya&&(Cb(this),d=0);else if(ea(a))for(;c<b;){var e=a[c++];if(!("number"==typeof e&&0<=e&&255>=e&&e==(e|0)))throw Error("message must be a byte array");this.Pb[d++]=e;d==this.ya&&(Cb(this),d=0)}else throw Error("message must be string or array");this.Va=d;this.uc+=b};
yb.prototype.digest=function(){var a=[],b=8*this.uc;56>this.Va?this.update(Bb,56-this.Va):this.update(Bb,this.ya-(this.Va-56));for(var c=63;56<=c;c--)this.Pb[c]=b&255,b/=256;Cb(this);for(c=b=0;c<this.Xe;c++)for(var d=24;0<=d;d-=8)a[b++]=this.h[c]>>d&255;return a};
var xb=[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];var Eb=function(){yb.call(this,8,Db)};t(Eb,yb);var Db=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225];var Fb=!A||9<=Number(nb),Gb=A&&!B("9");!gb||B("528");fb&&B("1.9b")||A&&B("8")||cb&&B("9.5")||gb&&B("528");fb&&!B("8")||A&&B("9");var Hb=function(){this.Aa=this.Aa;this.fc=this.fc};Hb.prototype.Aa=!1;Hb.prototype.isDisposed=function(){return this.Aa};Hb.prototype.Ra=function(){if(this.fc)for(;this.fc.length;)this.fc.shift()()};var Ib=function(a,b){this.type=a;this.currentTarget=this.target=b;this.defaultPrevented=this.$a=!1;this.Ld=!0};Ib.prototype.preventDefault=function(){this.defaultPrevented=!0;this.Ld=!1};var Jb=function(a,b){Ib.call(this,a?a.type:"");this.relatedTarget=this.currentTarget=this.target=null;this.charCode=this.keyCode=this.button=this.screenY=this.screenX=this.clientY=this.clientX=this.offsetY=this.offsetX=0;this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1;this.qb=this.state=null;a&&this.init(a,b)};t(Jb,Ib);
Jb.prototype.init=function(a,b){var c=this.type=a.type,d=a.changedTouches?a.changedTouches[0]:null;this.target=a.target||a.srcElement;this.currentTarget=b;if(b=a.relatedTarget){if(fb){var e;a:{try{$a(b.nodeName);e=!0;break a}catch(f){}e=!1}e||(b=null)}}else"mouseover"==c?b=a.fromElement:"mouseout"==c&&(b=a.toElement);this.relatedTarget=b;null===d?(this.offsetX=gb||void 0!==a.offsetX?a.offsetX:a.layerX,this.offsetY=gb||void 0!==a.offsetY?a.offsetY:a.layerY,this.clientX=void 0!==a.clientX?a.clientX:
a.pageX,this.clientY=void 0!==a.clientY?a.clientY:a.pageY,this.screenX=a.screenX||0,this.screenY=a.screenY||0):(this.clientX=void 0!==d.clientX?d.clientX:d.pageX,this.clientY=void 0!==d.clientY?d.clientY:d.pageY,this.screenX=d.screenX||0,this.screenY=d.screenY||0);this.button=a.button;this.keyCode=a.keyCode||0;this.charCode=a.charCode||("keypress"==c?a.keyCode:0);this.ctrlKey=a.ctrlKey;this.altKey=a.altKey;this.shiftKey=a.shiftKey;this.metaKey=a.metaKey;this.state=a.state;this.qb=a;a.defaultPrevented&&
this.preventDefault()};Jb.prototype.preventDefault=function(){Jb.gd.preventDefault.call(this);var a=this.qb;if(a.preventDefault)a.preventDefault();else if(a.returnValue=!1,Gb)try{if(a.ctrlKey||112<=a.keyCode&&123>=a.keyCode)a.keyCode=-1}catch(b){}};Jb.prototype.ze=function(){return this.qb};var Kb="closure_listenable_"+(1E6*Math.random()|0),Lb=0;var Mb=function(a,b,c,d,e){this.listener=a;this.kc=null;this.src=b;this.type=c;this.capture=!!d;this.Xb=e;this.key=++Lb;this.gb=this.Ob=!1},Nb=function(a){a.gb=!0;a.listener=null;a.kc=null;a.src=null;a.Xb=null};var Ob=function(a){this.src=a;this.C={};this.Kb=0};Ob.prototype.add=function(a,b,c,d,e){var f=a.toString();a=this.C[f];a||(a=this.C[f]=[],this.Kb++);var g=Pb(a,b,d,e);-1<g?(b=a[g],c||(b.Ob=!1)):(b=new Mb(b,this.src,f,!!d,e),b.Ob=c,a.push(b));return b};Ob.prototype.remove=function(a,b,c,d){a=a.toString();if(!(a in this.C))return!1;var e=this.C[a];b=Pb(e,b,c,d);return-1<b?(Nb(e[b]),Ja(e,b),0==e.length&&(delete this.C[a],this.Kb--),!0):!1};
var Qb=function(a,b){var c=b.type;c in a.C&&Ka(a.C[c],b)&&(Nb(b),0==a.C[c].length&&(delete a.C[c],a.Kb--))};Ob.prototype.Jc=function(a,b,c,d){a=this.C[a.toString()];var e=-1;a&&(e=Pb(a,b,c,d));return-1<e?a[e]:null};var Pb=function(a,b,c,d){for(var e=0;e<a.length;++e){var f=a[e];if(!f.gb&&f.listener==b&&f.capture==!!c&&f.Xb==d)return e}return-1};var Rb="closure_lm_"+(1E6*Math.random()|0),Sb={},Tb=0,Ub=function(a,b,c,d,e){if(da(b))for(var f=0;f<b.length;f++)Ub(a,b[f],c,d,e);else c=Vb(c),a&&a[Kb]?a.listen(b,c,d,e):Wb(a,b,c,!1,d,e)},Wb=function(a,b,c,d,e,f){if(!b)throw Error("Invalid event type");var g=!!e,k=Xb(a);k||(a[Rb]=k=new Ob(a));c=k.add(b,c,d,e,f);if(!c.kc){d=Yb();c.kc=d;d.src=a;d.listener=c;if(a.addEventListener)a.addEventListener(b.toString(),d,g);else if(a.attachEvent)a.attachEvent(Zb(b.toString()),d);else throw Error("addEventListener and attachEvent are unavailable.");
Tb++}},Yb=function(){var a=$b,b=Fb?function(c){return a.call(b.src,b.listener,c)}:function(c){c=a.call(b.src,b.listener,c);if(!c)return c};return b},ac=function(a,b,c,d,e){if(da(b))for(var f=0;f<b.length;f++)ac(a,b[f],c,d,e);else c=Vb(c),a&&a[Kb]?bc(a,b,c,d,e):Wb(a,b,c,!0,d,e)},cc=function(a,b,c,d,e){if(da(b))for(var f=0;f<b.length;f++)cc(a,b[f],c,d,e);else c=Vb(c),a&&a[Kb]?a.aa.remove(String(b),c,d,e):a&&(a=Xb(a))&&(b=a.Jc(b,c,!!d,e))&&dc(b)},dc=function(a){if(!fa(a)&&a&&!a.gb){var b=a.src;if(b&&
b[Kb])Qb(b.aa,a);else{var c=a.type,d=a.kc;b.removeEventListener?b.removeEventListener(c,d,a.capture):b.detachEvent&&b.detachEvent(Zb(c),d);Tb--;(c=Xb(b))?(Qb(c,a),0==c.Kb&&(c.src=null,b[Rb]=null)):Nb(a)}}},Zb=function(a){return a in Sb?Sb[a]:Sb[a]="on"+a},fc=function(a,b,c,d){var e=!0;if(a=Xb(a))if(b=a.C[b.toString()])for(b=b.concat(),a=0;a<b.length;a++){var f=b[a];f&&f.capture==c&&!f.gb&&(f=ec(f,d),e=e&&!1!==f)}return e},ec=function(a,b){var c=a.listener,d=a.Xb||a.src;a.Ob&&dc(a);return c.call(d,
b)},$b=function(a,b){if(a.gb)return!0;if(!Fb){if(!b)a:{b=["window","event"];for(var c=l,d;d=b.shift();)if(null!=c[d])c=c[d];else{b=null;break a}b=c}d=b;b=new Jb(d,this);c=!0;if(!(0>d.keyCode||void 0!=d.returnValue)){a:{var e=!1;if(0==d.keyCode)try{d.keyCode=-1;break a}catch(g){e=!0}if(e||void 0==d.returnValue)d.returnValue=!0}d=[];for(e=b.currentTarget;e;e=e.parentNode)d.push(e);a=a.type;for(e=d.length-1;!b.$a&&0<=e;e--){b.currentTarget=d[e];var f=fc(d[e],a,!0,b),c=c&&f}for(e=0;!b.$a&&e<d.length;e++)b.currentTarget=
d[e],f=fc(d[e],a,!1,b),c=c&&f}return c}return ec(a,new Jb(b,this))},Xb=function(a){a=a[Rb];return a instanceof Ob?a:null},gc="__closure_events_fn_"+(1E9*Math.random()>>>0),Vb=function(a){w(a,"Listener can not be null.");if(q(a))return a;w(a.handleEvent,"An object listener must have handleEvent method.");a[gc]||(a[gc]=function(b){return a.handleEvent(b)});return a[gc]};var hc=/^[+a-zA-Z0-9_.!#$%&'*\/=?^`{|}~-]+@([a-zA-Z0-9-]+\.)+[a-zA-Z0-9]{2,63}$/;var jc=function(){this.rc="";this.fe=ic};jc.prototype.ac=!0;jc.prototype.Vb=function(){return this.rc};jc.prototype.toString=function(){return"Const{"+this.rc+"}"};var kc=function(a){if(a instanceof jc&&a.constructor===jc&&a.fe===ic)return a.rc;xa("expected object of type Const, got '"+a+"'");return"type_error:Const"},ic={},lc=function(a){var b=new jc;b.rc=a;return b};lc("");var nc=function(){this.ma="";this.ee=mc};nc.prototype.ac=!0;nc.prototype.Vb=function(){return this.ma};nc.prototype.toString=function(){return"SafeUrl{"+this.ma+"}"};
var oc=function(a){if(a instanceof nc&&a.constructor===nc&&a.ee===mc)return a.ma;xa("expected object of type SafeUrl, got '"+a+"' of type "+m(a));return"type_error:SafeUrl"},pc=/^(?:(?:https?|mailto|ftp):|[^&:/?#]*(?:[/?#]|$))/i,rc=function(a){if(a instanceof nc)return a;a=a.ac?a.Vb():String(a);pc.test(a)||(a="about:invalid#zClosurez");return qc(a)},mc={},qc=function(a){var b=new nc;b.ma=a;return b};qc("about:blank");var sc=function(a){return/^\s*$/.test(a)?!1:/^[\],:{}\s\u2028\u2029]*$/.test(a.replace(/\\["\\\/bfnrtu]/g,"@").replace(/(?:"[^"\\\n\r\u2028\u2029\x00-\x08\x0a-\x1f]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)[\s\u2028\u2029]*(?=:|,|]|}|$)/g,"]").replace(/(?:^|:|,)(?:[\s\u2028\u2029]*\[)+/g,""))},tc=function(a){a=String(a);if(sc(a))try{return eval("("+a+")")}catch(b){}throw Error("Invalid JSON string: "+a);},wc=function(a){var b=[];uc(new vc,a,b);return b.join("")},vc=function(){this.mc=void 0},
uc=function(a,b,c){if(null==b)c.push("null");else{if("object"==typeof b){if(da(b)){var d=b;b=d.length;c.push("[");for(var e="",f=0;f<b;f++)c.push(e),e=d[f],uc(a,a.mc?a.mc.call(d,String(f),e):e,c),e=",";c.push("]");return}if(b instanceof String||b instanceof Number||b instanceof Boolean)b=b.valueOf();else{c.push("{");f="";for(d in b)Object.prototype.hasOwnProperty.call(b,d)&&(e=b[d],"function"!=typeof e&&(c.push(f),xc(d,c),c.push(":"),uc(a,a.mc?a.mc.call(b,d,e):e,c),f=","));c.push("}");return}}switch(typeof b){case "string":xc(b,
c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?String(b):"null");break;case "boolean":c.push(String(b));break;case "function":c.push("null");break;default:throw Error("Unknown type: "+typeof b);}}},yc={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},zc=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g,xc=function(a,b){b.push('"',a.replace(zc,function(a){var b=yc[a];b||(b="\\u"+(a.charCodeAt(0)|65536).toString(16).substr(1),
yc[a]=b);return b}),'"')};var Ac=function(){};Ac.prototype.kd=null;var Bc=function(a){return a.kd||(a.kd=a.Oc())};var Cc,Dc=function(){};t(Dc,Ac);Dc.prototype.Qb=function(){var a=Ec(this);return a?new ActiveXObject(a):new XMLHttpRequest};Dc.prototype.Oc=function(){var a={};Ec(this)&&(a[0]=!0,a[1]=!0);return a};
var Ec=function(a){if(!a.zd&&"undefined"==typeof XMLHttpRequest&&"undefined"!=typeof ActiveXObject){for(var b=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],c=0;c<b.length;c++){var d=b[c];try{return new ActiveXObject(d),a.zd=d}catch(e){}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed");}return a.zd};Cc=new Dc;var Fc=function(){};t(Fc,Ac);Fc.prototype.Qb=function(){var a=new XMLHttpRequest;if("withCredentials"in a)return a;if("undefined"!=typeof XDomainRequest)return new Gc;throw Error("Unsupported browser");};Fc.prototype.Oc=function(){return{}};
var Gc=function(){this.pa=new XDomainRequest;this.readyState=0;this.onreadystatechange=null;this.responseText="";this.status=-1;this.statusText=this.responseXML=null;this.pa.onload=r(this.Ce,this);this.pa.onerror=r(this.wd,this);this.pa.onprogress=r(this.De,this);this.pa.ontimeout=r(this.Ee,this)};h=Gc.prototype;h.open=function(a,b,c){if(null!=c&&!c)throw Error("Only async requests are supported.");this.pa.open(a,b)};
h.send=function(a){if(a)if("string"==typeof a)this.pa.send(a);else throw Error("Only string data is supported");else this.pa.send()};h.abort=function(){this.pa.abort()};h.setRequestHeader=function(){};h.Ce=function(){this.status=200;this.responseText=this.pa.responseText;Hc(this,4)};h.wd=function(){this.status=500;this.responseText="";Hc(this,4)};h.Ee=function(){this.wd()};h.De=function(){this.status=200;Hc(this,1)};var Hc=function(a,b){a.readyState=b;if(a.onreadystatechange)a.onreadystatechange()};var Jc=function(){this.ic="";this.ge=Ic};Jc.prototype.ac=!0;Jc.prototype.Vb=function(){return this.ic};Jc.prototype.toString=function(){return"TrustedResourceUrl{"+this.ic+"}"};var Ic={};var Lc=function(){this.ma="";this.de=Kc};Lc.prototype.ac=!0;Lc.prototype.Vb=function(){return this.ma};Lc.prototype.toString=function(){return"SafeHtml{"+this.ma+"}"};var Mc=function(a){if(a instanceof Lc&&a.constructor===Lc&&a.de===Kc)return a.ma;xa("expected object of type SafeHtml, got '"+a+"' of type "+m(a));return"type_error:SafeHtml"},Kc={};Lc.prototype.Le=function(a){this.ma=a;return this};!fb&&!A||A&&9<=Number(nb)||fb&&B("1.9.1");A&&B("9");var Oc=function(a,b){Oa(b,function(b,d){"style"==d?a.style.cssText=b:"class"==d?a.className=b:"for"==d?a.htmlFor=b:Nc.hasOwnProperty(d)?a.setAttribute(Nc[d],b):0==d.lastIndexOf("aria-",0)||0==d.lastIndexOf("data-",0)?a.setAttribute(d,b):a[d]=b})},Nc={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"};var Pc=function(a,b,c){this.Pe=c;this.ne=a;this.cf=b;this.ec=0;this.Yb=null};Pc.prototype.get=function(){var a;0<this.ec?(this.ec--,a=this.Yb,this.Yb=a.next,a.next=null):a=this.ne();return a};Pc.prototype.put=function(a){this.cf(a);this.ec<this.Pe&&(this.ec++,a.next=this.Yb,this.Yb=a)};var Qc=function(a){l.setTimeout(function(){throw a;},0)},Rc,Sc=function(){var a=l.MessageChannel;"undefined"===typeof a&&"undefined"!==typeof window&&window.postMessage&&window.addEventListener&&!y("Presto")&&(a=function(){var a=document.createElement("IFRAME");a.style.display="none";a.src="";document.documentElement.appendChild(a);var b=a.contentWindow,a=b.document;a.open();a.write("");a.close();var c="callImmediate"+Math.random(),d="file:"==b.location.protocol?"*":b.location.protocol+"//"+b.location.host,
a=r(function(a){if(("*"==d||a.origin==d)&&a.data==c)this.port1.onmessage()},this);b.addEventListener("message",a,!1);this.port1={};this.port2={postMessage:function(){b.postMessage(c,d)}}});if("undefined"!==typeof a&&!y("Trident")&&!y("MSIE")){var b=new a,c={},d=c;b.port1.onmessage=function(){if(void 0!==c.next){c=c.next;var a=c.nd;c.nd=null;a()}};return function(a){d.next={nd:a};d=d.next;b.port2.postMessage(0)}}return"undefined"!==typeof document&&"onreadystatechange"in document.createElement("SCRIPT")?
function(a){var b=document.createElement("SCRIPT");b.onreadystatechange=function(){b.onreadystatechange=null;b.parentNode.removeChild(b);b=null;a();a=null};document.documentElement.appendChild(b)}:function(a){l.setTimeout(a,0)}};var Tc=function(){this.xc=this.La=null},Vc=new Pc(function(){return new Uc},function(a){a.reset()},100);Tc.prototype.add=function(a,b){var c=Vc.get();c.set(a,b);this.xc?this.xc.next=c:(w(!this.La),this.La=c);this.xc=c};Tc.prototype.remove=function(){var a=null;this.La&&(a=this.La,this.La=this.La.next,this.La||(this.xc=null),a.next=null);return a};var Uc=function(){this.next=this.scope=this.Ic=null};Uc.prototype.set=function(a,b){this.Ic=a;this.scope=b;this.next=null};
Uc.prototype.reset=function(){this.next=this.scope=this.Ic=null};var $c=function(a,b){Wc||Xc();Yc||(Wc(),Yc=!0);Zc.add(a,b)},Wc,Xc=function(){var a=l.Promise;if(-1!=String(a).indexOf("[native code]")){var b=a.resolve(void 0);Wc=function(){b.then(ad)}}else Wc=function(){var a=ad;!q(l.setImmediate)||l.Window&&l.Window.prototype&&!y("Edge")&&l.Window.prototype.setImmediate==l.setImmediate?(Rc||(Rc=Sc()),Rc(a)):l.setImmediate(a)}},Yc=!1,Zc=new Tc,ad=function(){for(var a;a=Zc.remove();){try{a.Ic.call(a.scope)}catch(b){Qc(b)}Vc.put(a)}Yc=!1};var bd=function(a){a.prototype.then=a.prototype.then;a.prototype.$goog_Thenable=!0},cd=function(a){if(!a)return!1;try{return!!a.$goog_Thenable}catch(b){return!1}};var C=function(a,b){this.N=0;this.na=void 0;this.Pa=this.ja=this.s=null;this.Wb=this.Hc=!1;if(a!=ba)try{var c=this;a.call(b,function(a){dd(c,2,a)},function(a){if(!(a instanceof ed))try{if(a instanceof Error)throw a;throw Error("Promise rejected.");}catch(e){}dd(c,3,a)})}catch(d){dd(this,3,d)}},fd=function(){this.next=this.context=this.Xa=this.Fa=this.child=null;this.ob=!1};fd.prototype.reset=function(){this.context=this.Xa=this.Fa=this.child=null;this.ob=!1};
var gd=new Pc(function(){return new fd},function(a){a.reset()},100),hd=function(a,b,c){var d=gd.get();d.Fa=a;d.Xa=b;d.context=c;return d},D=function(a){if(a instanceof C)return a;var b=new C(ba);dd(b,2,a);return b},E=function(a){return new C(function(b,c){c(a)})},jd=function(a,b,c){id(a,b,c,null)||$c(ja(b,a))},kd=function(a){return new C(function(b){var c=a.length,d=[];if(c)for(var e=function(a,e,f){c--;d[a]=e?{xe:!0,value:f}:{xe:!1,reason:f};0==c&&b(d)},f=0,g;f<a.length;f++)g=a[f],jd(g,ja(e,f,!0),
ja(e,f,!1));else b(d)})};C.prototype.then=function(a,b,c){null!=a&&Aa(a,"opt_onFulfilled should be a function.");null!=b&&Aa(b,"opt_onRejected should be a function. Did you pass opt_context as the second argument instead of the third?");return ld(this,q(a)?a:null,q(b)?b:null,c)};bd(C);var nd=function(a,b){b=hd(b,b,void 0);b.ob=!0;md(a,b);return a};C.prototype.c=function(a,b){return ld(this,null,a,b)};C.prototype.cancel=function(a){0==this.N&&$c(function(){var b=new ed(a);od(this,b)},this)};
var od=function(a,b){if(0==a.N)if(a.s){var c=a.s;if(c.ja){for(var d=0,e=null,f=null,g=c.ja;g&&(g.ob||(d++,g.child==a&&(e=g),!(e&&1<d)));g=g.next)e||(f=g);e&&(0==c.N&&1==d?od(c,b):(f?(d=f,w(c.ja),w(null!=d),d.next==c.Pa&&(c.Pa=d),d.next=d.next.next):pd(c),qd(c,e,3,b)))}a.s=null}else dd(a,3,b)},md=function(a,b){a.ja||2!=a.N&&3!=a.N||rd(a);w(null!=b.Fa);a.Pa?a.Pa.next=b:a.ja=b;a.Pa=b},ld=function(a,b,c,d){var e=hd(null,null,null);e.child=new C(function(a,g){e.Fa=b?function(c){try{var e=b.call(d,c);a(e)}catch(z){g(z)}}:
a;e.Xa=c?function(b){try{var e=c.call(d,b);void 0===e&&b instanceof ed?g(b):a(e)}catch(z){g(z)}}:g});e.child.s=a;md(a,e);return e.child};C.prototype.pf=function(a){w(1==this.N);this.N=0;dd(this,2,a)};C.prototype.qf=function(a){w(1==this.N);this.N=0;dd(this,3,a)};
var dd=function(a,b,c){0==a.N&&(a===c&&(b=3,c=new TypeError("Promise cannot resolve to itself")),a.N=1,id(c,a.pf,a.qf,a)||(a.na=c,a.N=b,a.s=null,rd(a),3!=b||c instanceof ed||sd(a,c)))},id=function(a,b,c,d){if(a instanceof C)return null!=b&&Aa(b,"opt_onFulfilled should be a function."),null!=c&&Aa(c,"opt_onRejected should be a function. Did you pass opt_context as the second argument instead of the third?"),md(a,hd(b||ba,c||null,d)),!0;if(cd(a))return a.then(b,c,d),!0;if(ga(a))try{var e=a.then;if(q(e))return td(a,
e,b,c,d),!0}catch(f){return c.call(d,f),!0}return!1},td=function(a,b,c,d,e){var f=!1,g=function(a){f||(f=!0,c.call(e,a))},k=function(a){f||(f=!0,d.call(e,a))};try{b.call(a,g,k)}catch(n){k(n)}},rd=function(a){a.Hc||(a.Hc=!0,$c(a.se,a))},pd=function(a){var b=null;a.ja&&(b=a.ja,a.ja=b.next,b.next=null);a.ja||(a.Pa=null);null!=b&&w(null!=b.Fa);return b};C.prototype.se=function(){for(var a;a=pd(this);)qd(this,a,this.N,this.na);this.Hc=!1};
var qd=function(a,b,c,d){if(3==c&&b.Xa&&!b.ob)for(;a&&a.Wb;a=a.s)a.Wb=!1;if(b.child)b.child.s=null,ud(b,c,d);else try{b.ob?b.Fa.call(b.context):ud(b,c,d)}catch(e){vd.call(null,e)}gd.put(b)},ud=function(a,b,c){2==b?a.Fa.call(a.context,c):a.Xa&&a.Xa.call(a.context,c)},sd=function(a,b){a.Wb=!0;$c(function(){a.Wb&&vd.call(null,b)})},vd=Qc,ed=function(a){u.call(this,a)};t(ed,u);ed.prototype.name="cancel";/*
Portions of this code are from MochiKit, received by
The Closure Authors under the MIT license. All other code is Copyright
2005-2009 The Closure Authors. All Rights Reserved.
*/
var wd=function(a,b){this.oc=[];this.Fd=a;this.qd=b||null;this.sb=this.Ta=!1;this.na=void 0;this.ed=this.jd=this.Cc=!1;this.vc=0;this.s=null;this.Dc=0};wd.prototype.cancel=function(a){if(this.Ta)this.na instanceof wd&&this.na.cancel();else{if(this.s){var b=this.s;delete this.s;a?b.cancel(a):(b.Dc--,0>=b.Dc&&b.cancel())}this.Fd?this.Fd.call(this.qd,this):this.ed=!0;this.Ta||xd(this,new yd)}};wd.prototype.od=function(a,b){this.Cc=!1;zd(this,a,b)};
var zd=function(a,b,c){a.Ta=!0;a.na=c;a.sb=!b;Ad(a)},Cd=function(a){if(a.Ta){if(!a.ed)throw new Bd;a.ed=!1}};wd.prototype.callback=function(a){Cd(this);Dd(a);zd(this,!0,a)};
var xd=function(a,b){Cd(a);Dd(b);zd(a,!1,b)},Dd=function(a){w(!(a instanceof wd),"An execution sequence may not be initiated with a blocking Deferred.")},Hd=function(a){var b=Ed("https://apis.google.com/js/client.js?onload="+Fd);Gd(b,null,a,void 0)},Gd=function(a,b,c,d){w(!a.jd,"Blocking Deferreds can not be re-used");a.oc.push([b,c,d]);a.Ta&&Ad(a)};wd.prototype.then=function(a,b,c){var d,e,f=new C(function(a,b){d=a;e=b});Gd(this,d,function(a){a instanceof yd?f.cancel():e(a)});return f.then(a,b,c)};
bd(wd);
var Id=function(a){return Fa(a.oc,function(a){return q(a[1])})},Ad=function(a){if(a.vc&&a.Ta&&Id(a)){var b=a.vc,c=Jd[b];c&&(l.clearTimeout(c.tb),delete Jd[b]);a.vc=0}a.s&&(a.s.Dc--,delete a.s);for(var b=a.na,d=c=!1;a.oc.length&&!a.Cc;){var e=a.oc.shift(),f=e[0],g=e[1],e=e[2];if(f=a.sb?g:f)try{var k=f.call(e||a.qd,b);void 0!==k&&(a.sb=a.sb&&(k==b||k instanceof Error),a.na=b=k);if(cd(b)||"function"===typeof l.Promise&&b instanceof l.Promise)d=!0,a.Cc=!0}catch(n){b=n,a.sb=!0,Id(a)||(c=!0)}}a.na=b;d&&
(k=r(a.od,a,!0),d=r(a.od,a,!1),b instanceof wd?(Gd(b,k,d),b.jd=!0):b.then(k,d));c&&(b=new Kd(b),Jd[b.tb]=b,a.vc=b.tb)},Bd=function(){u.call(this)};t(Bd,u);Bd.prototype.message="Deferred has already fired";Bd.prototype.name="AlreadyCalledError";var yd=function(){u.call(this)};t(yd,u);yd.prototype.message="Deferred was canceled";yd.prototype.name="CanceledError";var Kd=function(a){this.tb=l.setTimeout(r(this.nf,this),0);this.P=a};
Kd.prototype.nf=function(){w(Jd[this.tb],"Cannot throw an error that is not scheduled.");delete Jd[this.tb];throw this.P;};var Jd={};var Ed=function(a){var b=new Jc;b.ic=a;return Ld(b)},Ld=function(a){var b={},c=b.document||document,d;a instanceof Jc&&a.constructor===Jc&&a.ge===Ic?d=a.ic:(xa("expected object of type TrustedResourceUrl, got '"+a+"' of type "+m(a)),d="type_error:TrustedResourceUrl");var e=document.createElement("SCRIPT");a={Md:e,Jb:void 0};var f=new wd(Md,a),g=null,k=null!=b.timeout?b.timeout:5E3;0<k&&(g=window.setTimeout(function(){Nd(e,!0);xd(f,new Od(1,"Timeout reached for loading script "+d))},k),a.Jb=g);e.onload=
e.onreadystatechange=function(){e.readyState&&"loaded"!=e.readyState&&"complete"!=e.readyState||(Nd(e,b.Bf||!1,g),f.callback(null))};e.onerror=function(){Nd(e,!0,g);xd(f,new Od(0,"Error while loading script "+d))};a=b.attributes||{};Va(a,{type:"text/javascript",charset:"UTF-8",src:d});Oc(e,a);Pd(c).appendChild(e);return f},Pd=function(a){var b;return(b=(a||document).getElementsByTagName("HEAD"))&&0!=b.length?b[0]:a.documentElement},Md=function(){if(this&&this.Md){var a=this.Md;a&&"SCRIPT"==a.tagName&&
Nd(a,!0,this.Jb)}},Nd=function(a,b,c){null!=c&&l.clearTimeout(c);a.onload=ba;a.onerror=ba;a.onreadystatechange=ba;b&&window.setTimeout(function(){a&&a.parentNode&&a.parentNode.removeChild(a)},0)},Od=function(a,b){var c="Jsloader error (code #"+a+")";b&&(c+=": "+b);u.call(this,c);this.code=a};t(Od,u);var Qd=function(){Hb.call(this);this.aa=new Ob(this);this.je=this;this.Uc=null};t(Qd,Hb);Qd.prototype[Kb]=!0;h=Qd.prototype;h.addEventListener=function(a,b,c,d){Ub(this,a,b,c,d)};h.removeEventListener=function(a,b,c,d){cc(this,a,b,c,d)};
h.dispatchEvent=function(a){Rd(this);var b,c=this.Uc;if(c){b=[];for(var d=1;c;c=c.Uc)b.push(c),w(1E3>++d,"infinite loop")}c=this.je;d=a.type||a;if(p(a))a=new Ib(a,c);else if(a instanceof Ib)a.target=a.target||c;else{var e=a;a=new Ib(d,c);Va(a,e)}var e=!0,f;if(b)for(var g=b.length-1;!a.$a&&0<=g;g--)f=a.currentTarget=b[g],e=Sd(f,d,!0,a)&&e;a.$a||(f=a.currentTarget=c,e=Sd(f,d,!0,a)&&e,a.$a||(e=Sd(f,d,!1,a)&&e));if(b)for(g=0;!a.$a&&g<b.length;g++)f=a.currentTarget=b[g],e=Sd(f,d,!1,a)&&e;return e};
h.Ra=function(){Qd.gd.Ra.call(this);if(this.aa){var a=this.aa,b=0,c;for(c in a.C){for(var d=a.C[c],e=0;e<d.length;e++)++b,Nb(d[e]);delete a.C[c];a.Kb--}}this.Uc=null};h.listen=function(a,b,c,d){Rd(this);return this.aa.add(String(a),b,!1,c,d)};
var bc=function(a,b,c,d,e){a.aa.add(String(b),c,!0,d,e)},Sd=function(a,b,c,d){b=a.aa.C[String(b)];if(!b)return!0;b=b.concat();for(var e=!0,f=0;f<b.length;++f){var g=b[f];if(g&&!g.gb&&g.capture==c){var k=g.listener,n=g.Xb||g.src;g.Ob&&Qb(a.aa,g);e=!1!==k.call(n,d)&&e}}return e&&0!=d.Ld};Qd.prototype.Jc=function(a,b,c,d){return this.aa.Jc(String(a),b,c,d)};var Rd=function(a){w(a.aa,"Event target is not initialized. Did you call the superclass (goog.events.EventTarget) constructor?")};var Td="StopIteration"in l?l.StopIteration:{message:"StopIteration",stack:""},Ud=function(){};Ud.prototype.next=function(){throw Td;};Ud.prototype.ie=function(){return this};var Vd=function(a,b){this.ba={};this.w=[];this.nb=this.o=0;var c=arguments.length;if(1<c){if(c%2)throw Error("Uneven number of arguments");for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else a&&this.addAll(a)};Vd.prototype.Y=function(){Wd(this);for(var a=[],b=0;b<this.w.length;b++)a.push(this.ba[this.w[b]]);return a};Vd.prototype.ka=function(){Wd(this);return this.w.concat()};Vd.prototype.pb=function(a){return Xd(this.ba,a)};
Vd.prototype.remove=function(a){return Xd(this.ba,a)?(delete this.ba[a],this.o--,this.nb++,this.w.length>2*this.o&&Wd(this),!0):!1};var Wd=function(a){if(a.o!=a.w.length){for(var b=0,c=0;b<a.w.length;){var d=a.w[b];Xd(a.ba,d)&&(a.w[c++]=d);b++}a.w.length=c}if(a.o!=a.w.length){for(var e={},c=b=0;b<a.w.length;)d=a.w[b],Xd(e,d)||(a.w[c++]=d,e[d]=1),b++;a.w.length=c}};h=Vd.prototype;h.get=function(a,b){return Xd(this.ba,a)?this.ba[a]:b};
h.set=function(a,b){Xd(this.ba,a)||(this.o++,this.w.push(a),this.nb++);this.ba[a]=b};h.addAll=function(a){var b;a instanceof Vd?(b=a.ka(),a=a.Y()):(b=Qa(a),a=Pa(a));for(var c=0;c<b.length;c++)this.set(b[c],a[c])};h.forEach=function(a,b){for(var c=this.ka(),d=0;d<c.length;d++){var e=c[d],f=this.get(e);a.call(b,f,e,this)}};h.clone=function(){return new Vd(this)};
h.ie=function(a){Wd(this);var b=0,c=this.nb,d=this,e=new Ud;e.next=function(){if(c!=d.nb)throw Error("The map has changed since the iterator was created");if(b>=d.w.length)throw Td;var e=d.w[b++];return a?e:d.ba[e]};return e};var Xd=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)};var Yd=function(a){if(a.Y&&"function"==typeof a.Y)return a.Y();if(p(a))return a.split("");if(ea(a)){for(var b=[],c=a.length,d=0;d<c;d++)b.push(a[d]);return b}return Pa(a)},Zd=function(a){if(a.ka&&"function"==typeof a.ka)return a.ka();if(!a.Y||"function"!=typeof a.Y){if(ea(a)||p(a)){var b=[];a=a.length;for(var c=0;c<a;c++)b.push(c);return b}return Qa(a)}},$d=function(a,b){if(a.forEach&&"function"==typeof a.forEach)a.forEach(b,void 0);else if(ea(a)||p(a))x(a,b,void 0);else for(var c=Zd(a),d=Yd(a),e=
d.length,f=0;f<e;f++)b.call(void 0,d[f],c&&c[f],a)};var ae=function(a,b,c,d,e){this.reset(a,b,c,d,e)};ae.prototype.sd=null;var be=0;ae.prototype.reset=function(a,b,c,d,e){"number"==typeof e||be++;d||ka();this.wb=a;this.Ue=b;delete this.sd};ae.prototype.Pd=function(a){this.wb=a};var ce=function(a){this.Ve=a;this.xd=this.Ec=this.wb=this.s=null},de=function(a,b){this.name=a;this.value=b};de.prototype.toString=function(){return this.name};var ee=new de("SEVERE",1E3),fe=new de("CONFIG",700),ge=new de("FINE",500);ce.prototype.getParent=function(){return this.s};ce.prototype.Pd=function(a){this.wb=a};var he=function(a){if(a.wb)return a.wb;if(a.s)return he(a.s);xa("Root logger has no level set.");return null};
ce.prototype.log=function(a,b,c){if(a.value>=he(this).value)for(q(b)&&(b=b()),a=new ae(a,String(b),this.Ve),c&&(a.sd=c),c="log:"+a.Ue,l.console&&(l.console.timeStamp?l.console.timeStamp(c):l.console.markTimeline&&l.console.markTimeline(c)),l.msWriteProfilerMark&&l.msWriteProfilerMark(c),c=this;c;){var d=c,e=a;if(d.xd)for(var f=0;b=d.xd[f];f++)b(e);c=c.getParent()}};
var ie={},je=null,ke=function(a){je||(je=new ce(""),ie[""]=je,je.Pd(fe));var b;if(!(b=ie[a])){b=new ce(a);var c=a.lastIndexOf("."),d=a.substr(c+1),c=ke(a.substr(0,c));c.Ec||(c.Ec={});c.Ec[d]=b;b.s=c;ie[a]=b}return b};var F=function(a,b){a&&a.log(ge,b,void 0)};var le=function(a,b,c){if(q(a))c&&(a=r(a,c));else if(a&&"function"==typeof a.handleEvent)a=r(a.handleEvent,a);else throw Error("Invalid listener argument");return 2147483647<Number(b)?-1:l.setTimeout(a,b||0)},me=function(a){var b=null;return(new C(function(c,d){b=le(function(){c(void 0)},a);-1==b&&d(Error("Failed to schedule timer."))})).c(function(a){l.clearTimeout(b);throw a;})};var oe=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/,pe=function(a,b){if(a){a=a.split("&");for(var c=0;c<a.length;c++){var d=a[c].indexOf("="),e,f=null;0<=d?(e=a[c].substring(0,d),f=a[c].substring(d+1)):e=a[c];b(e,f?decodeURIComponent(f.replace(/\+/g," ")):"")}}};var G=function(a){Qd.call(this);this.headers=new Vd;this.zc=a||null;this.qa=!1;this.yc=this.b=null;this.vb=this.Dd=this.dc="";this.Ca=this.Mc=this.bc=this.Gc=!1;this.kb=0;this.tc=null;this.Kd="";this.wc=this.af=this.$d=!1};t(G,Qd);var qe=G.prototype,re=ke("goog.net.XhrIo");qe.V=re;var se=/^https?$/i,te=["POST","PUT"];
G.prototype.send=function(a,b,c,d){if(this.b)throw Error("[goog.net.XhrIo] Object is active with another request="+this.dc+"; newUri="+a);b=b?b.toUpperCase():"GET";this.dc=a;this.vb="";this.Dd=b;this.Gc=!1;this.qa=!0;this.b=this.zc?this.zc.Qb():Cc.Qb();this.yc=this.zc?Bc(this.zc):Bc(Cc);this.b.onreadystatechange=r(this.Hd,this);this.af&&"onprogress"in this.b&&(this.b.onprogress=r(function(a){this.Gd(a,!0)},this),this.b.upload&&(this.b.upload.onprogress=r(this.Gd,this)));try{F(this.V,ue(this,"Opening Xhr")),
this.Mc=!0,this.b.open(b,String(a),!0),this.Mc=!1}catch(f){F(this.V,ue(this,"Error opening Xhr: "+f.message));this.P(5,f);return}a=c||"";var e=this.headers.clone();d&&$d(d,function(a,b){e.set(b,a)});d=Ha(e.ka());c=l.FormData&&a instanceof l.FormData;!Ia(te,b)||d||c||e.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");e.forEach(function(a,b){this.b.setRequestHeader(b,a)},this);this.Kd&&(this.b.responseType=this.Kd);"withCredentials"in this.b&&this.b.withCredentials!==this.$d&&(this.b.withCredentials=
this.$d);try{ve(this),0<this.kb&&(this.wc=we(this.b),F(this.V,ue(this,"Will abort after "+this.kb+"ms if incomplete, xhr2 "+this.wc)),this.wc?(this.b.timeout=this.kb,this.b.ontimeout=r(this.Jb,this)):this.tc=le(this.Jb,this.kb,this)),F(this.V,ue(this,"Sending request")),this.bc=!0,this.b.send(a),this.bc=!1}catch(f){F(this.V,ue(this,"Send error: "+f.message)),this.P(5,f)}};var we=function(a){return A&&B(9)&&fa(a.timeout)&&void 0!==a.ontimeout},Ga=function(a){return"content-type"==a.toLowerCase()};
G.prototype.Jb=function(){"undefined"!=typeof aa&&this.b&&(this.vb="Timed out after "+this.kb+"ms, aborting",F(this.V,ue(this,this.vb)),this.dispatchEvent("timeout"),this.abort(8))};G.prototype.P=function(a,b){this.qa=!1;this.b&&(this.Ca=!0,this.b.abort(),this.Ca=!1);this.vb=b;xe(this);ye(this)};var xe=function(a){a.Gc||(a.Gc=!0,a.dispatchEvent("complete"),a.dispatchEvent("error"))};
G.prototype.abort=function(){this.b&&this.qa&&(F(this.V,ue(this,"Aborting")),this.qa=!1,this.Ca=!0,this.b.abort(),this.Ca=!1,this.dispatchEvent("complete"),this.dispatchEvent("abort"),ye(this))};G.prototype.Ra=function(){this.b&&(this.qa&&(this.qa=!1,this.Ca=!0,this.b.abort(),this.Ca=!1),ye(this,!0));G.gd.Ra.call(this)};G.prototype.Hd=function(){this.isDisposed()||(this.Mc||this.bc||this.Ca?ze(this):this.Ze())};G.prototype.Ze=function(){ze(this)};
var ze=function(a){if(a.qa&&"undefined"!=typeof aa)if(a.yc[1]&&4==Ae(a)&&2==Be(a))F(a.V,ue(a,"Local request error detected and ignored"));else if(a.bc&&4==Ae(a))le(a.Hd,0,a);else if(a.dispatchEvent("readystatechange"),4==Ae(a)){F(a.V,ue(a,"Request complete"));a.qa=!1;try{var b=Be(a),c;a:switch(b){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:c=!0;break a;default:c=!1}var d;if(!(d=c)){var e;if(e=0===b){var f=String(a.dc).match(oe)[1]||null;if(!f&&l.self&&l.self.location)var g=l.self.location.protocol,
f=g.substr(0,g.length-1);e=!se.test(f?f.toLowerCase():"")}d=e}if(d)a.dispatchEvent("complete"),a.dispatchEvent("success");else{var k;try{k=2<Ae(a)?a.b.statusText:""}catch(n){F(a.V,"Can not get status: "+n.message),k=""}a.vb=k+" ["+Be(a)+"]";xe(a)}}finally{ye(a)}}};G.prototype.Gd=function(a,b){w("progress"===a.type,"goog.net.EventType.PROGRESS is of the same type as raw XHR progress.");this.dispatchEvent(Ce(a,"progress"));this.dispatchEvent(Ce(a,b?"downloadprogress":"uploadprogress"))};
var Ce=function(a,b){return{type:b,lengthComputable:a.lengthComputable,loaded:a.loaded,total:a.total}},ye=function(a,b){if(a.b){ve(a);var c=a.b,d=a.yc[0]?ba:null;a.b=null;a.yc=null;b||a.dispatchEvent("ready");try{c.onreadystatechange=d}catch(e){(a=a.V)&&a.log(ee,"Problem encountered resetting onreadystatechange: "+e.message,void 0)}}},ve=function(a){a.b&&a.wc&&(a.b.ontimeout=null);fa(a.tc)&&(l.clearTimeout(a.tc),a.tc=null)},Ae=function(a){return a.b?a.b.readyState:0},Be=function(a){try{return 2<Ae(a)?
a.b.status:-1}catch(b){return-1}},De=function(a){try{return a.b?a.b.responseText:""}catch(b){return F(a.V,"Can not get responseText: "+b.message),""}},ue=function(a,b){return b+" ["+a.Dd+" "+a.dc+" "+Be(a)+"]"};var Ee=function(a,b){this.$=this.Ja=this.da="";this.Za=null;this.Ba=this.sa="";this.S=this.Oe=!1;var c;a instanceof Ee?(this.S=void 0!==b?b:a.S,Fe(this,a.da),c=a.Ja,H(this),this.Ja=c,Ge(this,a.$),He(this,a.Za),Ie(this,a.sa),Je(this,a.D.clone()),a=a.Ba,H(this),this.Ba=a):a&&(c=String(a).match(oe))?(this.S=!!b,Fe(this,c[1]||"",!0),a=c[2]||"",H(this),this.Ja=Ke(a),Ge(this,c[3]||"",!0),He(this,c[4]),Ie(this,c[5]||"",!0),Je(this,c[6]||"",!0),a=c[7]||"",H(this),this.Ba=Ke(a)):(this.S=!!b,this.D=new I(null,
0,this.S))};Ee.prototype.toString=function(){var a=[],b=this.da;b&&a.push(Le(b,Me,!0),":");var c=this.$;if(c||"file"==b)a.push("//"),(b=this.Ja)&&a.push(Le(b,Me,!0),"@"),a.push(encodeURIComponent(String(c)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),c=this.Za,null!=c&&a.push(":",String(c));if(c=this.sa)this.$&&"/"!=c.charAt(0)&&a.push("/"),a.push(Le(c,"/"==c.charAt(0)?Ne:Oe,!0));(c=this.D.toString())&&a.push("?",c);(c=this.Ba)&&a.push("#",Le(c,Pe));return a.join("")};
Ee.prototype.resolve=function(a){var b=this.clone(),c=!!a.da;c?Fe(b,a.da):c=!!a.Ja;if(c){var d=a.Ja;H(b);b.Ja=d}else c=!!a.$;c?Ge(b,a.$):c=null!=a.Za;d=a.sa;if(c)He(b,a.Za);else if(c=!!a.sa){if("/"!=d.charAt(0))if(this.$&&!this.sa)d="/"+d;else{var e=b.sa.lastIndexOf("/");-1!=e&&(d=b.sa.substr(0,e+1)+d)}e=d;if(".."==e||"."==e)d="";else if(v(e,"./")||v(e,"/.")){for(var d=0==e.lastIndexOf("/",0),e=e.split("/"),f=[],g=0;g<e.length;){var k=e[g++];"."==k?d&&g==e.length&&f.push(""):".."==k?((1<f.length||
1==f.length&&""!=f[0])&&f.pop(),d&&g==e.length&&f.push("")):(f.push(k),d=!0)}d=f.join("/")}else d=e}c?Ie(b,d):c=""!==a.D.toString();c?Je(b,a.D.clone()):c=!!a.Ba;c&&(a=a.Ba,H(b),b.Ba=a);return b};Ee.prototype.clone=function(){return new Ee(this)};
var Fe=function(a,b,c){H(a);a.da=c?Ke(b,!0):b;a.da&&(a.da=a.da.replace(/:$/,""))},Ge=function(a,b,c){H(a);a.$=c?Ke(b,!0):b},He=function(a,b){H(a);if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Za=b}else a.Za=null},Ie=function(a,b,c){H(a);a.sa=c?Ke(b,!0):b},Je=function(a,b,c){H(a);b instanceof I?(a.D=b,a.D.dd(a.S)):(c||(b=Le(b,Qe)),a.D=new I(b,0,a.S))},J=function(a,b,c){H(a);a.D.set(b,c)},Re=function(a,b){H(a);a.D.remove(b)},H=function(a){if(a.Oe)throw Error("Tried to modify a read-only Uri");
};Ee.prototype.dd=function(a){this.S=a;this.D&&this.D.dd(a);return this};
var Se=function(a){return a instanceof Ee?a.clone():new Ee(a,void 0)},Te=function(a,b){var c=new Ee(null,void 0);Fe(c,"https");a&&Ge(c,a);b&&Ie(c,b);return c},Ke=function(a,b){return a?b?decodeURI(a.replace(/%25/g,"%2525")):decodeURIComponent(a):""},Le=function(a,b,c){return p(a)?(a=encodeURI(a).replace(b,Ue),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null},Ue=function(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)},Me=/[#\/\?@]/g,Oe=/[\#\?:]/g,Ne=/[\#\?]/g,Qe=/[\#\?@]/g,
Pe=/#/g,I=function(a,b,c){this.o=this.l=null;this.O=a||null;this.S=!!c},Ve=function(a){a.l||(a.l=new Vd,a.o=0,a.O&&pe(a.O,function(b,c){a.add(decodeURIComponent(b.replace(/\+/g," ")),c)}))},Xe=function(a){var b=Zd(a);if("undefined"==typeof b)throw Error("Keys are undefined");var c=new I(null,0,void 0);a=Yd(a);for(var d=0;d<b.length;d++){var e=b[d],f=a[d];da(f)?We(c,e,f):c.add(e,f)}return c};h=I.prototype;
h.add=function(a,b){Ve(this);this.O=null;a=this.R(a);var c=this.l.get(a);c||this.l.set(a,c=[]);c.push(b);this.o=ya(this.o)+1;return this};h.remove=function(a){Ve(this);a=this.R(a);return this.l.pb(a)?(this.O=null,this.o=ya(this.o)-this.l.get(a).length,this.l.remove(a)):!1};h.pb=function(a){Ve(this);a=this.R(a);return this.l.pb(a)};h.ka=function(){Ve(this);for(var a=this.l.Y(),b=this.l.ka(),c=[],d=0;d<b.length;d++)for(var e=a[d],f=0;f<e.length;f++)c.push(b[d]);return c};
h.Y=function(a){Ve(this);var b=[];if(p(a))this.pb(a)&&(b=Ma(b,this.l.get(this.R(a))));else{a=this.l.Y();for(var c=0;c<a.length;c++)b=Ma(b,a[c])}return b};h.set=function(a,b){Ve(this);this.O=null;a=this.R(a);this.pb(a)&&(this.o=ya(this.o)-this.l.get(a).length);this.l.set(a,[b]);this.o=ya(this.o)+1;return this};h.get=function(a,b){a=a?this.Y(a):[];return 0<a.length?String(a[0]):b};var We=function(a,b,c){a.remove(b);0<c.length&&(a.O=null,a.l.set(a.R(b),Na(c)),a.o=ya(a.o)+c.length)};
I.prototype.toString=function(){if(this.O)return this.O;if(!this.l)return"";for(var a=[],b=this.l.ka(),c=0;c<b.length;c++)for(var d=b[c],e=encodeURIComponent(String(d)),d=this.Y(d),f=0;f<d.length;f++){var g=e;""!==d[f]&&(g+="="+encodeURIComponent(String(d[f])));a.push(g)}return this.O=a.join("&")};I.prototype.clone=function(){var a=new I;a.O=this.O;this.l&&(a.l=this.l.clone(),a.o=this.o);return a};I.prototype.R=function(a){a=String(a);this.S&&(a=a.toLowerCase());return a};
I.prototype.dd=function(a){a&&!this.S&&(Ve(this),this.O=null,this.l.forEach(function(a,c){var b=c.toLowerCase();c!=b&&(this.remove(c),We(this,b,a))},this));this.S=a};var Ye=function(){var a=K();return A&&!!nb&&11==nb||/Edge\/\d+/.test(a)},Ze=function(){return l.window&&l.window.location.href||""},$e=function(a,b){var c=[],d;for(d in a)d in b?typeof a[d]!=typeof b[d]?c.push(d):da(a[d])?Sa(a[d],b[d])||c.push(d):"object"==typeof a[d]&&null!=a[d]&&null!=b[d]?0<$e(a[d],b[d]).length&&c.push(d):a[d]!==b[d]&&c.push(d):c.push(d);for(d in b)d in a||c.push(d);return c},bf=function(){var a;a=K();a="Chrome"!=af(a)?null:(a=a.match(/\sChrome\/(\d+)/i))&&2==a.length?parseInt(a[1],
10):null;return a&&30>a?!1:!A||!nb||9<nb},cf=function(a){a=(a||K()).toLowerCase();return a.match(/android/)||a.match(/webos/)||a.match(/iphone|ipad|ipod/)||a.match(/blackberry/)||a.match(/windows phone/)||a.match(/iemobile/)?!0:!1},df=function(a){a=a||l.window;try{a.close()}catch(b){}},ef=function(a,b,c){var d=Math.floor(1E9*Math.random()).toString();b=b||500;c=c||600;var e=(window.screen.availHeight-c)/2,f=(window.screen.availWidth-b)/2;b={width:b,height:c,top:0<e?e:0,left:0<f?f:0,location:!0,resizable:!0,
statusbar:!0,toolbar:!1};c=K().toLowerCase();d&&(b.target=d,v(c,"crios/")&&(b.target="_blank"));"Firefox"==af(K())&&(a=a||"http://localhost",b.scrollbars=!0);var g;c=a||"about:blank";(d=b)||(d={});a=window;b=c instanceof nc?c:rc("undefined"!=typeof c.href?c.href:String(c));c=d.target||c.target;e=[];for(g in d)switch(g){case "width":case "height":case "top":case "left":e.push(g+"="+d[g]);break;case "target":case "noreferrer":break;default:e.push(g+"="+(d[g]?1:0))}g=e.join(",");(y("iPhone")&&!y("iPod")&&
!y("iPad")||y("iPad")||y("iPod"))&&a.navigator&&a.navigator.standalone&&c&&"_self"!=c?(g=a.document.createElement("A"),"undefined"!=typeof HTMLAnchorElement&&"undefined"!=typeof Location&&"undefined"!=typeof Element&&(e=g&&(g instanceof HTMLAnchorElement||!(g instanceof Location||g instanceof Element)),f=ga(g)?g.constructor.displayName||g.constructor.name||Object.prototype.toString.call(g):void 0===g?"undefined":null===g?"null":typeof g,w(e,"Argument is not a HTMLAnchorElement (or a non-Element mock); got: %s",
f)),b=b instanceof nc?b:rc(b),g.href=oc(b),g.setAttribute("target",c),d.noreferrer&&g.setAttribute("rel","noreferrer"),d=document.createEvent("MouseEvent"),d.initMouseEvent("click",!0,!0,a,1),g.dispatchEvent(d),g={}):d.noreferrer?(g=a.open("",c,g),d=oc(b),g&&(eb&&v(d,";")&&(d="'"+d.replace(/'/g,"%27")+"'"),g.opener=null,a=lc("b/12014412, meta tag with sanitized URL"),ta.test(d)&&(-1!=d.indexOf("&")&&(d=d.replace(na,"&")),-1!=d.indexOf("<")&&(d=d.replace(oa,"<")),-1!=d.indexOf(">")&&(d=d.replace(pa,
">")),-1!=d.indexOf('"')&&(d=d.replace(qa,""")),-1!=d.indexOf("'")&&(d=d.replace(ra,"'")),-1!=d.indexOf("\x00")&&(d=d.replace(sa,"�"))),d='<META HTTP-EQUIV="refresh" content="0; url='+d+'">',za(kc(a),"must provide justification"),w(!/^[\s\xa0]*$/.test(kc(a)),"must provide non-empty justification"),g.document.write(Mc((new Lc).Le(d))),g.document.close())):g=a.open(oc(b),c,g);if(g)try{g.focus()}catch(k){}return g},ff=function(a){return new C(function(b){var c=function(){me(2E3).then(function(){if(!a||
a.closed)b();else return c()})};return c()})},gf=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,hf=function(){var a=null;return(new C(function(b){"complete"==l.document.readyState?b():(a=function(){b()},ac(window,"load",a))})).c(function(b){cc(window,"load",a);throw b;})},kf=function(){return jf(void 0)?hf().then(function(){return new C(function(a,b){var c=l.document,d=setTimeout(function(){b(Error("Cordova framework is not ready."))},1E3);c.addEventListener("deviceready",function(){clearTimeout(d);a()},
!1)})}):E(Error("Cordova must run in an Android or iOS file scheme."))},jf=function(a){a=a||K();return!("file:"!==lf()||!a.toLowerCase().match(/iphone|ipad|ipod|android/))},L=function(){return firebase.INTERNAL.hasOwnProperty("reactNative")?"ReactNative":l.hasOwnProperty("process")?"Node":"Browser"},mf=function(){var a=L();return"ReactNative"===a||"Node"===a},af=function(a){var b=a.toLowerCase();if(v(b,"opera/")||v(b,"opr/")||v(b,"opios/"))return"Opera";if(v(b,"iemobile"))return"IEMobile";if(v(b,
"msie")||v(b,"trident/"))return"IE";if(v(b,"edge/"))return"Edge";if(v(b,"firefox/"))return"Firefox";if(v(b,"silk/"))return"Silk";if(v(b,"blackberry"))return"Blackberry";if(v(b,"webos"))return"Webos";if(!v(b,"safari/")||v(b,"chrome/")||v(b,"crios/")||v(b,"android"))if(!v(b,"chrome/")&&!v(b,"crios/")||v(b,"edge/")){if(v(b,"android"))return"Android";if((a=a.match(/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/))&&2==a.length)return a[1]}else return"Chrome";else return"Safari";return"Other"},nf=function(a){var b=L();
return("Browser"===b?af(K()):b)+"/JsCore/"+a},K=function(){return l.navigator&&l.navigator.userAgent||""},M=function(a,b){a=a.split(".");b=b||l;for(var c=0;c<a.length&&"object"==typeof b&&null!=b;c++)b=b[a[c]];c!=a.length&&(b=void 0);return b},pf=function(){var a;if(a=("http:"===lf()||"https:"===lf()||jf()&&!1)&&!mf())a:{try{var b=l.localStorage,c=of();if(b){b.setItem(c,"1");b.removeItem(c);a=Ye()?!!l.indexedDB:!0;break a}}catch(d){}a=!1}return a},lf=function(){return l.location&&l.location.protocol||
null},qf=function(a){a=a||K();return cf(a)||"Firefox"==af(a)?!1:!0},rf=function(a){return"undefined"===typeof a?null:wc(a)},sf=function(a){var b={},c;for(c in a)a.hasOwnProperty(c)&&null!==a[c]&&void 0!==a[c]&&(b[c]=a[c]);return b},tf=function(a){if(null!==a){var b;try{b=tc(a)}catch(c){try{b=JSON.parse(a)}catch(d){throw c;}}return b}},of=function(a){return a?a:""+Math.floor(1E9*Math.random()).toString()},uf=function(a){a=a||K();return"Safari"==af(a)||a.toLowerCase().match(/iphone|ipad|ipod/)?!1:!0},
vf=function(){var a=l.___jsl;if(a&&a.H)for(var b in a.H)if(a.H[b].r=a.H[b].r||[],a.H[b].L=a.H[b].L||[],a.H[b].r=a.H[b].L.concat(),a.CP)for(var c=0;c<a.CP.length;c++)a.CP[c]=null},wf=function(){return l.navigator&&"boolean"===typeof l.navigator.onLine?l.navigator.onLine:!0},xf=function(a,b,c,d){if(a>b)throw Error("Short delay should be less than long delay!");this.kf=a;this.Te=b;a=c||K();d=d||L();this.Ne=cf(a)||"ReactNative"===d};xf.prototype.get=function(){return this.Ne?this.Te:this.kf};var yf;try{var zf={};Object.defineProperty(zf,"abcd",{configurable:!0,enumerable:!0,value:1});Object.defineProperty(zf,"abcd",{configurable:!0,enumerable:!0,value:2});yf=2==zf.abcd}catch(a){yf=!1}
var N=function(a,b,c){yf?Object.defineProperty(a,b,{configurable:!0,enumerable:!0,value:c}):a[b]=c},Af=function(a,b){if(b)for(var c in b)b.hasOwnProperty(c)&&N(a,c,b[c])},Bf=function(a){var b={},c;for(c in a)a.hasOwnProperty(c)&&(b[c]=a[c]);return b},Cf=function(a,b){if(!b||!b.length)return!0;if(!a)return!1;for(var c=0;c<b.length;c++){var d=a[b[c]];if(void 0===d||null===d||""===d)return!1}return!0},Df=function(a){var b=a;if("object"==typeof a&&null!=a){var b="length"in a?[]:{},c;for(c in a)N(b,c,
Df(a[c]))}return b};var Ef=["client_id","response_type","scope","redirect_uri","state"],Ff={ae:{Ab:500,zb:600,providerId:"facebook.com",nc:Ef},be:{Ab:500,zb:620,providerId:"github.com",nc:Ef},ce:{Ab:515,zb:680,providerId:"google.com",nc:Ef},he:{Ab:485,zb:705,providerId:"twitter.com",nc:"oauth_consumer_key oauth_nonce oauth_signature oauth_signature_method oauth_timestamp oauth_token oauth_version".split(" ")}},Gf=function(a){for(var b in Ff)if(Ff[b].providerId==a)return Ff[b];return null},Hf=function(a){return(a=Gf(a))&&
a.nc||[]};var O=function(a,b){this.code="auth/"+a;this.message=b||If[a]||""};t(O,Error);O.prototype.F=function(){return{name:this.code,code:this.code,message:this.message}};
var Jf=function(a){var b=a&&(a.name||a.code);return b?new O(b.substring(5),a.message):null},If={"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.","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-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-cordova-configuration":"The following Cordova plugins must be installed to enable OAuth sign-in: cordova-plugin-buildinfo, cordova-universal-links-plugin and cordova-plugin-browsertab",
"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-credential":"The supplied auth credential is malformed or has expired.","invalid-message-payload":"The email template corresponding to this action contains invalid characters in its message. Please fix by going to the Auth email templates section in the Firebase Console.",
"invalid-oauth-provider":"EmailAuthProvider is not supported for this operation. This operation only supports OAuth providers.","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-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.","missing-iframe-start":"An internal error has occurred.","auth-domain-config-required":"Be sure to include authDomain when calling firebase.initializeApp(), by following the instructions in the Firebase console.","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 or https 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.","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.","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."};var P=function(a,b,c,d,e){this.ga=a;this.G=b||null;this.mb=c||null;this.cd=d||null;this.P=e||null;if(this.mb||this.P){if(this.mb&&this.P)throw new O("invalid-auth-event");if(this.mb&&!this.cd)throw new O("invalid-auth-event");}else throw new O("invalid-auth-event");};P.prototype.Ub=function(){return this.cd};P.prototype.getError=function(){return this.P};P.prototype.F=function(){return{type:this.ga,eventId:this.G,urlResponse:this.mb,sessionId:this.cd,error:this.P&&this.P.F()}};
var Kf=function(a){a=a||{};return a.type?new P(a.type,a.eventId,a.urlResponse,a.sessionId,a.error&&Jf(a.error)):null};var Lf=function(a){var b="unauthorized-domain",c=void 0,d=Se(a);a=d.$;d=d.da;"http"!=d&&"https"!=d?b="operation-not-supported-in-this-environment":c=la("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.",a);O.call(this,b,c)};t(Lf,O);var Mf=function(a){this.Se=a.sub;ka();this.Rb=a.email||null};var Nf=function(a,b,c,d){var e={};ga(c)?e=c:b&&p(c)&&p(d)?e={oauthToken:c,oauthTokenSecret:d}:!b&&p(c)&&(e={accessToken:c});if(b||!e.idToken&&!e.accessToken)if(b&&e.oauthToken&&e.oauthTokenSecret)N(this,"accessToken",e.oauthToken),N(this,"secret",e.oauthTokenSecret);else{if(b)throw new O("argument-error","credential failed: expected 2 arguments (the OAuth access token and secret).");throw new O("argument-error","credential failed: expected 1 argument (the OAuth access token).");}else e.idToken&&N(this,
"idToken",e.idToken),e.accessToken&&N(this,"accessToken",e.accessToken);N(this,"provider",a)};Nf.prototype.Tb=function(a){return Of(a,Pf(this))};Nf.prototype.Ed=function(a,b){var c=Pf(this);c.idToken=b;return Qf(a,c)};var Pf=function(a){var b={};a.idToken&&(b.id_token=a.idToken);a.accessToken&&(b.access_token=a.accessToken);a.secret&&(b.oauth_token_secret=a.secret);b.providerId=a.provider;return{postBody:Xe(b).toString(),requestUri:pf()?Ze():"http://localhost"}};
Nf.prototype.F=function(){var a={provider:this.provider};this.idToken&&(a.oauthIdToken=this.idToken);this.accessToken&&(a.oauthAccessToken=this.accessToken);this.secret&&(a.oauthTokenSecret=this.secret);return a};
var Rf=function(a,b,c){var d=!!b,e=c||[];b=function(){Af(this,{providerId:a,isOAuthProvider:!0});this.bd=[];this.pd={};"google.com"==a&&this.addScope("profile")};d||(b.prototype.addScope=function(a){Ia(this.bd,a)||this.bd.push(a)});b.prototype.setCustomParameters=function(a){this.pd=Ta(a)};b.prototype.Ae=function(){var a=sf(this.pd),b;for(b in a)a[b]=a[b].toString();a=Ta(a);for(b=0;b<e.length;b++){var c=e[b];c in a&&delete a[c]}return a};b.prototype.Be=function(){return Na(this.bd)};b.credential=
function(b,c){return new Nf(a,d,b,c)};Af(b,{PROVIDER_ID:a});return b},Sf=Rf("facebook.com",!1,Hf("facebook.com"));Sf.prototype.addScope=Sf.prototype.addScope||void 0;var Tf=Rf("github.com",!1,Hf("github.com"));Tf.prototype.addScope=Tf.prototype.addScope||void 0;var Uf=Rf("google.com",!1,Hf("google.com"));Uf.prototype.addScope=Uf.prototype.addScope||void 0;
Uf.credential=function(a,b){if(!a&&!b)throw new O("argument-error","credential failed: must provide the ID token and/or the access token.");return new Nf("google.com",!1,ga(a)?a:{idToken:a||null,accessToken:b||null})};var Vf=Rf("twitter.com",!0,Hf("twitter.com")),Wf=function(a,b){this.Rb=a;this.Vc=b;N(this,"provider","password")};Wf.prototype.Tb=function(a){return Q(a,Xf,{email:this.Rb,password:this.Vc})};Wf.prototype.Ed=function(a,b){return Q(a,Yf,{idToken:b,email:this.Rb,password:this.Vc})};
Wf.prototype.F=function(){return{email:this.Rb,password:this.Vc}};var Zf=function(){Af(this,{providerId:"password",isOAuthProvider:!1})};Af(Zf,{PROVIDER_ID:"password"});
var $f={zf:Zf,ae:Sf,ce:Uf,be:Tf,he:Vf},ag=function(a){var b=a&&a.providerId;if(!b)return null;var c=a&&a.oauthAccessToken,d=a&&a.oauthTokenSecret;a=a&&a.oauthIdToken;for(var e in $f)if($f[e].PROVIDER_ID==b)try{return $f[e].credential({accessToken:c,idToken:a,oauthToken:c,oauthTokenSecret:d})}catch(f){break}return null},bg=function(a){if(!a.isOAuthProvider)throw new O("invalid-oauth-provider");};var cg=function(a,b,c,d){O.call(this,a,d);N(this,"email",b);N(this,"credential",c)};t(cg,O);cg.prototype.F=function(){var a={code:this.code,message:this.message,email:this.email},b=this.credential&&this.credential.F();b&&(Va(a,b),a.providerId=b.provider,delete a.provider);return a};var dg=function(a){if(a.code){var b=a.code||"";0==b.indexOf("auth/")&&(b=b.substring(5));return a.email?new cg(b,a.email,ag(a),a.message):new O(b,a.message||void 0)}return null};var eg=function(a){this.yf=a};t(eg,Ac);eg.prototype.Qb=function(){return new this.yf};eg.prototype.Oc=function(){return{}};
var R=function(a,b,c){var d;d="Node"==L();d=l.XMLHttpRequest||d&&firebase.INTERNAL.node&&firebase.INTERNAL.node.XMLHttpRequest;if(!d)throw new O("internal-error","The XMLHttpRequest compatibility library was not found.");this.j=a;a=b||{};this.ff=a.secureTokenEndpoint||"https://securetoken.googleapis.com/v1/token";this.gf=a.secureTokenTimeout||fg;this.Nd=Ta(a.secureTokenHeaders||gg);this.ve=a.firebaseEndpoint||"https://www.googleapis.com/identitytoolkit/v3/relyingparty/";this.we=a.firebaseTimeout||
hg;this.ud=Ta(a.firebaseHeaders||ig);c&&(this.ud["X-Client-Version"]=c,this.Nd["X-Client-Version"]=c);this.me=new Fc;this.xf=new eg(d)},jg,fg=new xf(1E4,3E4),gg={"Content-Type":"application/x-www-form-urlencoded"},hg=new xf(1E4,3E4),ig={"Content-Type":"application/json"},lg=function(a,b,c,d,e,f,g){wf()?(bf()?a=r(a.jf,a):(jg||(jg=new C(function(a,b){kg(a,b)})),a=r(a.hf,a)),a(b,c,d,e,f,g)):c&&c(null)};
R.prototype.jf=function(a,b,c,d,e,f){var g="Node"==L(),k=mf()?g?new G(this.xf):new G:new G(this.me),n;f&&(k.kb=Math.max(0,f),n=setTimeout(function(){k.dispatchEvent("timeout")},f));k.listen("complete",function(){n&&clearTimeout(n);var a=null;try{var c;c=this.b?tc(this.b.responseText):void 0;a=c||null}catch(Wa){try{a=JSON.parse(De(this))||null}catch(ne){a=null}}b&&b(a)});bc(k,"ready",function(){n&&clearTimeout(n);this.Aa||(this.Aa=!0,this.Ra())});bc(k,"timeout",function(){n&&clearTimeout(n);this.Aa||
(this.Aa=!0,this.Ra());b&&b(null)});k.send(a,c,d,e)};var Fd="__fcb"+Math.floor(1E6*Math.random()).toString(),kg=function(a,b){((window.gapi||{}).client||{}).request?a():(l[Fd]=function(){((window.gapi||{}).client||{}).request?a():b(Error("CORS_UNSUPPORTED"))},Hd(function(){b(Error("CORS_UNSUPPORTED"))}))};
R.prototype.hf=function(a,b,c,d,e){var f=this;jg.then(function(){window.gapi.client.setApiKey(f.j);var g=window.gapi.auth.getToken();window.gapi.auth.setToken(null);window.gapi.client.request({path:a,method:c,body:d,headers:e,authType:"none",callback:function(a){window.gapi.auth.setToken(g);b&&b(a)}})}).c(function(a){b&&b({error:{message:a&&a.message||"CORS_UNSUPPORTED"}})})};
var ng=function(a,b){return new C(function(c,d){"refresh_token"==b.grant_type&&b.refresh_token||"authorization_code"==b.grant_type&&b.code?lg(a,a.ff+"?key="+encodeURIComponent(a.j),function(a){a?a.error?d(mg(a)):a.access_token&&a.refresh_token?c(a):d(new O("internal-error")):d(new O("network-request-failed"))},"POST",Xe(b).toString(),a.Nd,a.gf.get()):d(new O("internal-error"))})},og=function(a,b,c,d,e){var f=Se(a.ve+b);J(f,"key",a.j);e&&J(f,"cb",ka().toString());var g="GET"==c;if(g)for(var k in d)d.hasOwnProperty(k)&&
J(f,k,d[k]);return new C(function(b,e){lg(a,f.toString(),function(a){a?a.error?e(mg(a)):b(a):e(new O("network-request-failed"))},c,g?void 0:wc(sf(d)),a.ud,a.we.get())})},pg=function(a){if(!hc.test(a.email))throw new O("invalid-email");},qg=function(a){"email"in a&&pg(a)},sg=function(a,b){var c=pf()?Ze():"http://localhost";return Q(a,rg,{identifier:b,continueUri:c}).then(function(a){return a.allProviders||[]})},ug=function(a){return Q(a,tg,{}).then(function(a){return a.authorizedDomains||[]})},vg=
function(a){if(!a.idToken)throw new O("internal-error");};R.prototype.signInAnonymously=function(){return Q(this,wg,{})};R.prototype.updateEmail=function(a,b){return Q(this,xg,{idToken:a,email:b})};R.prototype.updatePassword=function(a,b){return Q(this,Yf,{idToken:a,password:b})};var yg={displayName:"DISPLAY_NAME",photoUrl:"PHOTO_URL"};
R.prototype.updateProfile=function(a,b){var c={idToken:a},d=[];Oa(yg,function(a,f){var e=b[f];null===e?d.push(a):f in b&&(c[f]=e)});d.length&&(c.deleteAttribute=d);return Q(this,xg,c)};R.prototype.sendPasswordResetEmail=function(a){return Q(this,zg,{requestType:"PASSWORD_RESET",email:a})};R.prototype.sendEmailVerification=function(a){return Q(this,Ag,{requestType:"VERIFY_EMAIL",idToken:a})};
var Cg=function(a,b,c){return Q(a,Bg,{idToken:b,deleteProvider:c})},Dg=function(a){if(!a.requestUri||!a.sessionId&&!a.postBody)throw new O("internal-error");},Eg=function(a){var b=null;a.needConfirmation?(a.code="account-exists-with-different-credential",b=dg(a)):"FEDERATED_USER_ID_ALREADY_LINKED"==a.errorMessage?(a.code="credential-already-in-use",b=dg(a)):"EMAIL_EXISTS"==a.errorMessage&&(a.code="email-already-in-use",b=dg(a));if(b)throw b;if(!a.idToken)throw new O("internal-error");},Of=function(a,
b){b.returnIdpCredential=!0;return Q(a,Fg,b)},Qf=function(a,b){b.returnIdpCredential=!0;return Q(a,Gg,b)},Hg=function(a){if(!a.oobCode)throw new O("invalid-action-code");};R.prototype.confirmPasswordReset=function(a,b){return Q(this,Ig,{oobCode:a,newPassword:b})};R.prototype.checkActionCode=function(a){return Q(this,Jg,{oobCode:a})};R.prototype.applyActionCode=function(a){return Q(this,Kg,{oobCode:a})};
var Kg={endpoint:"setAccountInfo",M:Hg,ib:"email"},Jg={endpoint:"resetPassword",M:Hg,va:function(a){if(!a.email||!a.requestType)throw new O("internal-error");}},Lg={endpoint:"signupNewUser",M:function(a){pg(a);if(!a.password)throw new O("weak-password");},va:vg,wa:!0},rg={endpoint:"createAuthUri"},Mg={endpoint:"deleteAccount",hb:["idToken"]},Bg={endpoint:"setAccountInfo",hb:["idToken","deleteProvider"],M:function(a){if(!da(a.deleteProvider))throw new O("internal-error");}},Ng={endpoint:"getAccountInfo"},
Ag={endpoint:"getOobConfirmationCode",hb:["idToken","requestType"],M:function(a){if("VERIFY_EMAIL"!=a.requestType)throw new O("internal-error");},ib:"email"},zg={endpoint:"getOobConfirmationCode",hb:["requestType"],M:function(a){if("PASSWORD_RESET"!=a.requestType)throw new O("internal-error");pg(a)},ib:"email"},tg={le:!0,endpoint:"getProjectConfig",He:"GET"},Ig={endpoint:"resetPassword",M:Hg,ib:"email"},xg={endpoint:"setAccountInfo",hb:["idToken"],M:qg,wa:!0},Yf={endpoint:"setAccountInfo",hb:["idToken"],
M:function(a){qg(a);if(!a.password)throw new O("weak-password");},va:vg,wa:!0},wg={endpoint:"signupNewUser",va:vg,wa:!0},Fg={endpoint:"verifyAssertion",M:Dg,va:Eg,wa:!0},Gg={endpoint:"verifyAssertion",M:function(a){Dg(a);if(!a.idToken)throw new O("internal-error");},va:Eg,wa:!0},Og={endpoint:"verifyCustomToken",M:function(a){if(!a.token)throw new O("invalid-custom-token");},va:vg,wa:!0},Xf={endpoint:"verifyPassword",M:function(a){pg(a);if(!a.password)throw new O("wrong-password");},va:vg,wa:!0},Q=
function(a,b,c){if(!Cf(c,b.hb))return E(new O("internal-error"));var d=b.He||"POST",e;return D(c).then(b.M).then(function(){b.wa&&(c.returnSecureToken=!0);return og(a,b.endpoint,d,c,b.le||!1)}).then(function(a){return e=a}).then(b.va).then(function(){if(!b.ib)return e;if(!(b.ib in e))throw new O("internal-error");return e[b.ib]})},mg=function(a){var b,c;c=(a.error&&a.error.errors&&a.error.errors[0]||{}).reason||"";var d={keyInvalid:"invalid-api-key",ipRefererBlocked:"app-not-authorized"};if(c=d[c]?
new O(d[c]):null)return c;c=a.error&&a.error.message||"";d={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_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",
TOO_MANY_ATTEMPTS_TRY_LATER:"too-many-requests",WEAK_PASSWORD:"weak-password",OPERATION_NOT_ALLOWED:"operation-not-allowed",USER_CANCELLED:"user-cancelled"};b=(b=c.match(/^[^\s]+\s*:\s*(.*)$/))&&1<b.length?b[1]:void 0;for(var e in d)if(0===c.indexOf(e))return new O(d[e],b);!b&&a&&(b=rf(a));return new O("internal-error",b)};var Pg=function(a){this.W=a};Pg.prototype.value=function(){return this.W};Pg.prototype.Qd=function(a){this.W.style=a;return this};var Qg=function(a){this.W=a||{}};Qg.prototype.value=function(){return this.W};Qg.prototype.Qd=function(a){this.W.style=a;return this};var Sg=function(a){this.vf=a;this.$b=null;this.Tc=Rg(this)},Tg=function(a){var b=new Qg;b.W.where=document.body;b.W.url=a.vf;b.W.messageHandlersFilter=M("gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER");b.W.attributes=b.W.attributes||{};(new Pg(b.W.attributes)).Qd({position:"absolute",top:"-100px",width:"1px",height:"1px"});b.W.dontclear=!0;return b},Rg=function(a){return Ug().then(function(){return new C(function(b,c){M("gapi.iframes.getContext")().open(Tg(a).value(),function(d){a.$b=d;a.$b.restyle({setHideOnLeave:!1});
var e=setTimeout(function(){c(Error("Network Error"))},Vg.get()),f=function(){clearTimeout(e);b()};d.ping(f).then(f,function(){c(Error("Network Error"))})})})})};Sg.prototype.sendMessage=function(a){var b=this;return this.Tc.then(function(){return new C(function(c){b.$b.send(a.type,a,c,M("gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER"))})})};
var Wg=function(a,b){a.Tc.then(function(){a.$b.register("authEvent",b,M("gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER"))})},Xg=new xf(3E3,15E3),Vg=new xf(5E3,15E3),Ug=function(){return new C(function(a,b){if(wf()){var c=function(){vf();M("gapi.load")("gapi.iframes",{callback:a,ontimeout:function(){vf();b(Error("Network Error"))},timeout:Xg.get()})};if(M("gapi.iframes.Iframe"))a();else if(M("gapi.load"))c();else{var d="__iframefcb"+Math.floor(1E6*Math.random()).toString();l[d]=function(){M("gapi.load")?
c():b(Error("Network Error"))};D(Ed("https://apis.google.com/js/api.js?onload="+d)).c(function(){b(Error("Network Error"))})}}else b(Error("Network Error"))})};var Yg=function(a,b,c){this.v=a;this.j=b;this.B=c;this.Ka=null;this.Lb=Te(this.v,"/__/auth/iframe");J(this.Lb,"apiKey",this.j);J(this.Lb,"appName",this.B)};Yg.prototype.setVersion=function(a){this.Ka=a;return this};Yg.prototype.toString=function(){this.Ka?J(this.Lb,"v",this.Ka):Re(this.Lb,"v");return this.Lb.toString()};var Zg=function(a,b,c,d,e){this.v=a;this.j=b;this.B=c;this.ke=d;this.Ka=this.G=this.$c=null;this.jc=e};Zg.prototype.setVersion=function(a){this.Ka=a;return this};
Zg.prototype.toString=function(){var a=Te(this.v,"/__/auth/handler");J(a,"apiKey",this.j);J(a,"appName",this.B);J(a,"authType",this.ke);if(this.jc.isOAuthProvider){J(a,"providerId",this.jc.providerId);var b=this.jc.Be();b&&b.length&&J(a,"scopes",b.join(","));b=this.jc.Ae();Ra(b)||J(a,"customParameters",rf(b))}this.$c?J(a,"redirectUrl",this.$c):Re(a,"redirectUrl");this.G?J(a,"eventId",this.G):Re(a,"eventId");this.Ka?J(a,"v",this.Ka):Re(a,"v");if(this.Mb)for(var c in this.Mb)this.Mb.hasOwnProperty(c)&&
!a.D.get(c)&&J(a,c,this.Mb[c]);return a.toString()};
var $g=function(a,b,c,d){this.v=a;this.j=b;this.B=c;this.ye=(this.za=d||null)?nf(this.za):null;d=this.za;this.Ie=(new Yg(a,b,c)).setVersion(d).toString();this.ia=[];this.g=new R(b,null,this.ye);this.cc=this.ra=null},ah=function(a){var b=Ze();return ug(a).then(function(a){a:{for(var c=Se(b),e=c.da,c=c.$,f=0;f<a.length;f++){var g;var k=a[f];g=c;var n=e;0==k.indexOf("chrome-extension://")?g=Se(k).$==g&&"chrome-extension"==n:"http"!=n&&"https"!=n?g=!1:gf.test(k)?g=g==k:(k=k.split(".").join("\\."),g=(new RegExp("^(.+\\."+
k+"|"+k+")$","i")).test(g));if(g){a=!0;break a}}a=!1}if(!a)throw new Lf(Ze());})};h=$g.prototype;h.ub=function(){if(this.cc)return this.cc;var a=this;return this.cc=hf().then(function(){a.Zb=new Sg(a.Ie);bh(a)})};h.Gb=function(a,b,c){var d=new O("popup-closed-by-user"),e=new O("web-storage-unsupported"),f=this,g=!1;return this.Da().then(function(){ch(f).then(function(c){c||(a&&df(a),b(e),g=!0)})}).c(function(){}).then(function(){if(!g)return ff(a)}).then(function(){if(!g)return me(c).then(function(){b(d)})})};
h.Rd=function(){var a=K();return!qf(a)&&!uf(a)};h.yd=function(){return!1};
h.Bb=function(a,b,c,d,e,f,g){if(!a)return E(new O("popup-blocked"));if(g)return this.Da().c(function(b){df(a);e(b)}),d(),D();this.ra||(this.ra=ah(this.g));var k=this;return this.ra.then(function(){var b=k.Da().c(function(b){df(a);e(b);throw b;});d();return b}).then(function(){bg(c);var d=dh(k.v,k.j,k.B,b,c,null,f,k.za);(a||l.window).location.href=oc(rc(d))}).c(function(a){"auth/network-request-failed"==a.code&&(k.ra=null);throw a;})};
h.Cb=function(a,b,c){this.ra||(this.ra=ah(this.g));var d=this;return this.ra.then(function(){bg(b);var e=dh(d.v,d.j,d.B,a,b,Ze(),c,d.za);l.window.location.href=oc(rc(e))})};h.Da=function(){var a=this;return this.ub().then(function(){return a.Zb.Tc}).c(function(){a.ra=null;throw new O("network-request-failed");})};h.Vd=function(){return!0};
var dh=function(a,b,c,d,e,f,g,k,n){a=new Zg(a,b,c,d,e);a.$c=f;a.G=g;f=a.setVersion(k);f.Mb=Ta(n||null);return f.toString()},bh=function(a){if(!a.Zb)throw Error("IfcHandler must be initialized!");Wg(a.Zb,function(b){var c={};if(b&&b.authEvent){var d=!1;b=Kf(b.authEvent);for(c=0;c<a.ia.length;c++)d=a.ia[c](b)||d;c={};c.status=d?"ACK":"ERROR";return D(c)}c.status="ERROR";return D(c)})},ch=function(a){var b={type:"webStorageSupport"};return a.ub().then(function(){return a.Zb.sendMessage(b)}).then(function(a){if(a&&
a.length&&"undefined"!==typeof a[0].webStorageSupport)return a[0].webStorageSupport;throw Error();})};$g.prototype.Ma=function(a){this.ia.push(a)};$g.prototype.Fb=function(a){La(this.ia,function(b){return b==a})};var eh=function(a){this.A=a||firebase.INTERNAL.reactNative&&firebase.INTERNAL.reactNative.AsyncStorage;if(!this.A)throw new O("internal-error","The React Native compatibility library was not found.");};h=eh.prototype;h.get=function(a){return D(this.A.getItem(a)).then(function(a){return a&&tf(a)})};h.set=function(a,b){return D(this.A.setItem(a,rf(b)))};h.remove=function(a){return D(this.A.removeItem(a))};h.Na=function(){};h.fb=function(){};var fh=function(){this.A={}};h=fh.prototype;h.get=function(a){return D(this.A[a])};h.set=function(a,b){this.A[a]=b;return D()};h.remove=function(a){delete this.A[a];return D()};h.Na=function(){};h.fb=function(){};var hh=function(){if(!gh()){if("Node"==L())throw new O("internal-error","The LocalStorage compatibility library was not found.");throw new O("web-storage-unsupported");}this.A=l.localStorage||firebase.INTERNAL.node.localStorage},gh=function(){var a="Node"==L(),a=l.localStorage||a&&firebase.INTERNAL.node&&firebase.INTERNAL.node.localStorage;if(!a)return!1;try{return a.setItem("__sak","1"),a.removeItem("__sak"),!0}catch(b){return!1}};h=hh.prototype;
h.get=function(a){var b=this;return D().then(function(){var c=b.A.getItem(a);return tf(c)})};h.set=function(a,b){var c=this;return D().then(function(){var d=rf(b);null===d?c.remove(a):c.A.setItem(a,d)})};h.remove=function(a){var b=this;return D().then(function(){b.A.removeItem(a)})};h.Na=function(a){l.window&&Ub(l.window,"storage",a)};h.fb=function(a){l.window&&cc(l.window,"storage",a)};var ih=function(){this.A={}};h=ih.prototype;h.get=function(){return D(null)};h.set=function(){return D()};h.remove=function(){return D()};h.Na=function(){};h.fb=function(){};var kh=function(){if(!jh()){if("Node"==L())throw new O("internal-error","The SessionStorage compatibility library was not found.");throw new O("web-storage-unsupported");}this.A=l.sessionStorage||firebase.INTERNAL.node.sessionStorage},jh=function(){var a="Node"==L(),a=l.sessionStorage||a&&firebase.INTERNAL.node&&firebase.INTERNAL.node.sessionStorage;if(!a)return!1;try{return a.setItem("__sak","1"),a.removeItem("__sak"),!0}catch(b){return!1}};h=kh.prototype;
h.get=function(a){var b=this;return D().then(function(){var c=b.A.getItem(a);return tf(c)})};h.set=function(a,b){var c=this;return D().then(function(){var d=rf(b);null===d?c.remove(a):c.A.setItem(a,d)})};h.remove=function(a){var b=this;return D().then(function(){b.A.removeItem(a)})};h.Na=function(){};h.fb=function(){};var lh=function(a,b,c,d,e,f){if(!window.indexedDB)throw new O("web-storage-unsupported");this.oe=a;this.Sc=b;this.Fc=c;this.Zd=d;this.nb=e;this.U={};this.Hb=[];this.xb=0;this.Je=f||l.indexedDB},mh,nh=function(a){return new C(function(b,c){var d=a.Je.open(a.oe,a.nb);d.onerror=function(a){c(Error(a.target.errorCode))};d.onupgradeneeded=function(b){b=b.target.result;try{b.createObjectStore(a.Sc,{keyPath:a.Fc})}catch(f){c(f)}};d.onsuccess=function(a){b(a.target.result)}})},oh=function(a){a.Bd||(a.Bd=
nh(a));return a.Bd},ph=function(a,b){return b.objectStore(a.Sc)},qh=function(a,b,c){return b.transaction([a.Sc],c?"readwrite":"readonly")},rh=function(a){return new C(function(b,c){a.onsuccess=function(a){a&&a.target?b(a.target.result):b()};a.onerror=function(a){c(Error(a.target.errorCode))}})};h=lh.prototype;
h.set=function(a,b){var c=!1,d,e=this;return nd(oh(this).then(function(b){d=b;b=ph(e,qh(e,d,!0));return rh(b.get(a))}).then(function(f){var g=ph(e,qh(e,d,!0));if(f)return f.value=b,rh(g.put(f));e.xb++;c=!0;f={};f[e.Fc]=a;f[e.Zd]=b;return rh(g.add(f))}).then(function(){e.U[a]=b}),function(){c&&e.xb--})};h.get=function(a){var b=this;return oh(this).then(function(c){return rh(ph(b,qh(b,c,!1)).get(a))}).then(function(a){return a&&a.value})};
h.remove=function(a){var b=!1,c=this;return nd(oh(this).then(function(d){b=!0;c.xb++;return rh(ph(c,qh(c,d,!0))["delete"](a))}).then(function(){delete c.U[a]}),function(){b&&c.xb--})};
h.mf=function(){var a=this;return oh(this).then(function(b){var c=ph(a,qh(a,b,!1));return c.getAll?rh(c.getAll()):new C(function(a,b){var d=[],e=c.openCursor();e.onsuccess=function(b){(b=b.target.result)?(d.push(b.value),b["continue"]()):a(d)};e.onerror=function(a){b(Error(a.target.errorCode))}})}).then(function(b){var c={},d=[];if(0==a.xb){for(d=0;d<b.length;d++)c[b[d][a.Fc]]=b[d][a.Zd];d=$e(a.U,c);a.U=c}return d})};h.Na=function(a){0==this.Hb.length&&this.fd();this.Hb.push(a)};
h.fb=function(a){La(this.Hb,function(b){return b==a});0==this.Hb.length&&this.qc()};h.fd=function(){var a=this;this.qc();var b=function(){a.Wc=me(800).then(r(a.mf,a)).then(function(b){0<b.length&&x(a.Hb,function(a){a(b)})}).then(b).c(function(a){"STOP_EVENT"!=a.message&&b()});return a.Wc};b()};h.qc=function(){this.Wc&&this.Wc.cancel("STOP_EVENT")};var vh=function(){this.rd={Browser:sh,Node:th,ReactNative:uh}[L()]},wh,sh={J:hh,hd:kh},th={J:hh,hd:kh},uh={J:eh,hd:ih};var xh=function(a){var b={},c=a.email,d=a.newEmail;a=a.requestType;if(!c||!a)throw Error("Invalid provider user info!");b.fromEmail=d||null;b.email=c;N(this,"operation",a);N(this,"data",Df(b))};var yh="First Second Third Fourth Fifth Sixth Seventh Eighth Ninth".split(" "),S=function(a,b){return{name:a||"",fa:"a valid string",optional:!!b,ha:p}},T=function(a){return{name:a||"",fa:"a valid object",optional:!1,ha:ga}},zh=function(a,b){return{name:a||"",fa:"a function",optional:!!b,ha:q}},Ah=function(){return{name:"",fa:"null",optional:!1,ha:ca}},Bh=function(){return{name:"credential",fa:"a valid credential",optional:!1,ha:function(a){return!(!a||!a.Tb)}}},Ch=function(){return{name:"authProvider",
fa:"a valid Auth provider",optional:!1,ha:function(a){return!!(a&&a.providerId&&a.hasOwnProperty&&a.hasOwnProperty("isOAuthProvider"))}}},Dh=function(a,b,c,d){return{name:c||"",fa:a.fa+" or "+b.fa,optional:!!d,ha:function(c){return a.ha(c)||b.ha(c)}}};var Fh=function(a,b){for(var c in b){var d=b[c].name;a[d]=Eh(d,a[c],b[c].a)}},U=function(a,b,c,d){a[b]=Eh(b,c,d)},Eh=function(a,b,c){if(!c)return b;var d=Gh(a);a=function(){var a=Array.prototype.slice.call(arguments),e;a:{e=Array.prototype.slice.call(a);var k;k=0;for(var n=!1,z=0;z<c.length;z++)if(c[z].optional)n=!0;else{if(n)throw new O("internal-error","Argument validator encountered a required argument after an optional argument.");k++}n=c.length;if(e.length<k||n<e.length)e="Expected "+(k==n?1==
k?"1 argument":k+" arguments":k+"-"+n+" arguments")+" but got "+e.length+".";else{for(k=0;k<e.length;k++)if(n=c[k].optional&&void 0===e[k],!c[k].ha(e[k])&&!n){e=c[k];if(0>k||k>=yh.length)throw new O("internal-error","Argument validator received an unsupported number of arguments.");e=yh[k]+" argument "+(e.name?'"'+e.name+'" ':"")+"must be "+e.fa+".";break a}e=null}}if(e)throw new O("argument-error",d+" failed: "+e);return b.apply(this,a)};for(var e in b)a[e]=b[e];for(e in b.prototype)a.prototype[e]=
b.prototype[e];return a},Gh=function(a){a=a.split(".");return a[a.length-1]};var Hh=function(a,b,c,d){this.We=a;this.Od=b;this.df=c;this.jb=d;this.T={};wh||(wh=new vh);a=wh;try{var e;Ye()?(mh||(mh=new lh("firebaseLocalStorageDb","firebaseLocalStorage","fbase_key","value",1)),e=mh):e=new a.rd.J;this.Ya=e}catch(f){this.Ya=new fh,this.jb=!0}try{this.sc=new a.rd.hd}catch(f){this.sc=new fh}this.Sd=r(this.Td,this);this.U={}},Ih,Jh=function(){Ih||(Ih=new Hh("firebase",":",!uf(K())&&l.window&&l.window!=l.window.top?!0:!1,qf()));return Ih};h=Hh.prototype;
h.R=function(a,b){return this.We+this.Od+a.name+(b?this.Od+b:"")};h.get=function(a,b){return(a.J?this.Ya:this.sc).get(this.R(a,b))};h.remove=function(a,b){b=this.R(a,b);a.J&&!this.jb&&(this.U[b]=null);return(a.J?this.Ya:this.sc).remove(b)};h.set=function(a,b,c){var d=this.R(a,c),e=this,f=a.J?this.Ya:this.sc;return f.set(d,b).then(function(){return f.get(d)}).then(function(b){a.J&&!this.jb&&(e.U[d]=b)})};
h.addListener=function(a,b,c){a=this.R(a,b);this.jb||(this.U[a]=l.localStorage.getItem(a));Ra(this.T)&&this.fd();this.T[a]||(this.T[a]=[]);this.T[a].push(c)};h.removeListener=function(a,b,c){a=this.R(a,b);this.T[a]&&(La(this.T[a],function(a){return a==c}),0==this.T[a].length&&delete this.T[a]);Ra(this.T)&&this.qc()};h.fd=function(){this.Ya.Na(this.Sd);this.jb||Kh(this)};
var Kh=function(a){Lh(a);a.Rc=setInterval(function(){for(var b in a.T){var c=l.localStorage.getItem(b);c!=a.U[b]&&(a.U[b]=c,c=new Jb({type:"storage",key:b,target:window,oldValue:a.U[b],newValue:c}),a.Td(c))}},1E3)},Lh=function(a){a.Rc&&(clearInterval(a.Rc),a.Rc=null)};Hh.prototype.qc=function(){this.Ya.fb(this.Sd);this.jb||Lh(this)};
Hh.prototype.Td=function(a){if(a&&a.ze){var b=a.qb.key;if(this.df){var c=l.localStorage.getItem(b);a=a.qb.newValue;a!=c&&(a?l.localStorage.setItem(b,a):a||l.localStorage.removeItem(b))}this.U[b]=l.localStorage.getItem(b);this.ld(b)}else x(a,r(this.ld,this))};Hh.prototype.ld=function(a){this.T[a]&&x(this.T[a],function(a){a()})};var Mh=function(a,b){this.u=a;this.i=b||Jh()},Nh={name:"authEvent",J:!0},Oh=function(a){return a.i.get(Nh,a.u).then(function(a){return Kf(a)})};Mh.prototype.Ma=function(a){this.i.addListener(Nh,this.u,a)};Mh.prototype.Fb=function(a){this.i.removeListener(Nh,this.u,a)};var Ph=function(a){this.i=a||Jh()},Qh={name:"sessionId",J:!1};Ph.prototype.Ub=function(a){return this.i.get(Qh,a)};var Rh=function(a,b,c,d,e,f){this.v=a;this.j=b;this.B=c;this.za=d||null;this.Ud=b+":"+c;this.ef=new Ph;this.vd=new Mh(this.Ud);this.Nc=null;this.ia=[];this.Me=e||500;this.bf=f||2E3;this.gc=null},Sh=function(a){return new O("invalid-cordova-configuration",a)};
Rh.prototype.Da=function(){return this.Pc?this.Pc:this.Pc=kf().then(function(){if("function"!==typeof M("universalLinks.subscribe",l))throw Sh("cordova-universal-links-plugin is not installed");if("undefined"===typeof M("BuildInfo.packageName",l))throw Sh("cordova-plugin-buildinfo is not installed");if("function"!==typeof M("cordova.plugins.browsertab.openUrl",l))throw Sh("cordova-plugin-browsertab is not installed");},function(){throw new O("cordova-not-ready");})};
var Th=function(){for(var a=20,b=[];0<a;)b.push("1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".charAt(Math.floor(62*Math.random()))),a--;return b.join("")},Uh=function(a){var b=new Eb;b.update(a);return pb(b.digest())};h=Rh.prototype;h.Gb=function(a,b){b(new O("operation-not-supported-in-this-environment"));return D()};h.Bb=function(){return E(new O("operation-not-supported-in-this-environment"))};h.Vd=function(){return!1};h.Rd=function(){return!0};h.yd=function(){return!0};
h.Cb=function(a,b,c){if(this.gc)return E(new O("redirect-operation-pending"));var d=this,e=l.document,f=null,g=null,k=null;return this.gc=nd(D().then(function(){bg(b);return Vh(d)}).then(function(){return Wh(d,a,b,c)}).then(function(){return(new C(function(a,b){g=function(){a();return!1};d.Ma(g);k=function(){f=me(d.bf).then(function(){b(new O("redirect-cancelled-by-user"))})};e.addEventListener("resume",k,!1)})).c(function(a){return Xh(d).then(function(){throw a;})})}),function(){k&&e.removeEventListener("resume",
k,!1);f&&f.cancel();g&&d.Fb(g);d.gc=null})};
var Wh=function(a,b,c,d){var e=Th(),f=new P(b,d,null,e,new O("no-auth-event")),g=M("BuildInfo.packageName",l);if("string"!==typeof g)throw new O("invalid-cordova-configuration");var k=M("BuildInfo.displayName",l),n={};if(K().toLowerCase().match(/iphone|ipad|ipod/))n.ibi=g;else if(K().toLowerCase().match(/android/))n.apn=g;else return E(new O("operation-not-supported-in-this-environment"));k&&(n.appDisplayName=k);e=Uh(e);n.sessionId=e;var z=dh(a.v,a.j,a.B,b,c,null,d,a.za,n);return a.Da().then(function(){var b=
a.Ud;return a.ef.i.set(Nh,f.F(),b)}).then(function(){var a=M("cordova.plugins.browsertab.openUrl",l);if("function"!==typeof a)throw new O("invalid-cordova-configuration");a(z)})},Yh=function(a,b){for(var c=0;c<a.ia.length;c++)a.ia[c](b)},Vh=function(a){a.Nc||(a.Nc=a.Da().then(function(){return new C(function(b){var c=function(d){b(d);a.Fb(c);return!1};a.Ma(c);Zh(a)})}));return a.Nc},Xh=function(a){var b=null;return Oh(a.vd).then(function(c){b=c;c=a.vd;return c.i.remove(Nh,c.u)}).then(function(){return b})},
Zh=function(a){var b=M("universalLinks.subscribe",l);if("function"!==typeof b)throw new O("invalid-cordova-configuration");var c=new P("unknown",null,null,null,new O("no-auth-event")),d=!1,e=me(a.Me).then(function(){return Xh(a).then(function(){d||Yh(a,c)})});b(null,function(b){d=!0;e&&e.cancel();Xh(a).then(function(d){var e=c;if(d&&b&&b.url){var f=b.url,e=null,g=Se(f),Ea=g.D.get("link"),f=g.D.get("deep_link_id")||Ea||f;-1!=f.indexOf("/__/auth/callback")&&(g=Se(f),e=tf(g.D.get("error")||null),e=(e=
"object"===typeof e?Jf(e):null)?new P(d.ga,d.G,null,null,e):new P(d.ga,d.G,f,d.Ub()));e=e||c}Yh(a,e)})})};Rh.prototype.Ma=function(a){this.ia.push(a);Vh(this).c(function(){})};Rh.prototype.Fb=function(a){La(this.ia,function(b){return b==a})};var $h=function(a){this.u=a;this.i=Jh()},ai={name:"pendingRedirect",J:!1},bi=function(a){return a.i.set(ai,"pending",a.u)},ci=function(a){return a.i.remove(ai,a.u)},di=function(a){return a.i.get(ai,a.u).then(function(a){return"pending"==a})};var V=function(a,b,c){this.v=a;this.j=b;this.B=c;this.Ib=[];this.Wa=!1;this.Bc=r(this.Lc,this);this.ab=new ei(this);this.Id=new fi(this);this.yb=new $h(this.j+":"+this.B);this.lb={};this.lb.unknown=this.ab;this.lb.signInViaRedirect=this.ab;this.lb.linkViaRedirect=this.ab;this.lb.signInViaPopup=this.Id;this.lb.linkViaPopup=this.Id;this.I=gi(this.v,this.j,this.B)},gi=function(a,b,c){var d=firebase.SDK_VERSION||null;return jf()?new Rh(a,b,c,d):new $g(a,b,c,d)};
V.prototype.reset=function(){this.Wa=!1;this.I.Fb(this.Bc);this.I=gi(this.v,this.j,this.B)};V.prototype.ub=function(){var a=this;this.Wa||(this.Wa=!0,this.I.Ma(this.Bc));var b=this.I;return this.I.Da().c(function(c){a.I==b&&a.reset();throw c;})};var ji=function(a){a.I.Rd()&&a.ub().c(function(b){var c=new P("unknown",null,null,null,new O("operation-not-supported-in-this-environment"));hi(b)&&a.Lc(c)});a.I.yd()||ii(a.ab)};
V.prototype.subscribe=function(a){Ia(this.Ib,a)||this.Ib.push(a);if(!this.Wa){var b=this;di(this.yb).then(function(a){a?ci(b.yb).then(function(){b.ub().c(function(a){var c=new P("unknown",null,null,null,new O("operation-not-supported-in-this-environment"));hi(a)&&b.Lc(c)})}):ji(b)}).c(function(){ji(b)})}};V.prototype.unsubscribe=function(a){La(this.Ib,function(b){return b==a})};
V.prototype.Lc=function(a){if(!a)throw new O("invalid-auth-event");for(var b=!1,c=0;c<this.Ib.length;c++){var d=this.Ib[c];if(d.md(a.ga,a.G)){(b=this.lb[a.ga])&&b.Jd(a,d);b=!0;break}}ii(this.ab);return b};var ki=new xf(2E3,1E4),li=new xf(1E4,3E4);V.prototype.getRedirectResult=function(){return this.ab.getRedirectResult()};V.prototype.Bb=function(a,b,c,d,e){var f=this;return this.I.Bb(a,b,c,function(){f.Wa||(f.Wa=!0,f.I.Ma(f.Bc))},function(){f.reset()},d,e)};
var hi=function(a){return a&&"auth/cordova-not-ready"==a.code?!0:!1};V.prototype.Cb=function(a,b,c){var d=this,e;return bi(this.yb).then(function(){return d.I.Cb(a,b,c).c(function(a){if(hi(a))throw new O("operation-not-supported-in-this-environment");e=a;return ci(d.yb).then(function(){throw e;})}).then(function(){return d.I.Vd()?new C(function(){}):ci(d.yb).then(function(){return d.getRedirectResult()}).then(function(){}).c(function(){})})})};
V.prototype.Gb=function(a,b,c,d){return this.I.Gb(c,function(c){a.Ia(b,null,c,d)},ki.get())};var mi={},ni=function(a,b,c){var d=b+":"+c;mi[d]||(mi[d]=new V(a,b,c));return mi[d]},ei=function(a){this.i=a;this.eb=null;this.Eb=[];this.Db=[];this.bb=null;this.Zc=!1};ei.prototype.reset=function(){this.eb=null;this.bb&&(this.bb.cancel(),this.bb=null)};
ei.prototype.Jd=function(a,b){if(!a)return E(new O("invalid-auth-event"));this.reset();this.Zc=!0;var c=a.ga,d=a.G,e=a.getError()&&"auth/web-storage-unsupported"==a.getError().code,f=a.getError()&&"auth/operation-not-supported-in-this-environment"==a.getError().code;"unknown"!=c||e||f?a=a.P?this.Xc(a,b):b.rb(c,d)?this.Yc(a,b):E(new O("invalid-auth-event")):(oi(this,!1,null,null),a=D());return a};var ii=function(a){a.Zc||(a.Zc=!0,oi(a,!1,null,null))};
ei.prototype.Xc=function(a){oi(this,!0,null,a.getError());return D()};ei.prototype.Yc=function(a,b){var c=this,d=a.ga;b=b.rb(d,a.G);var e=a.mb;a=a.Ub();var f="signInViaRedirect"==d||"linkViaRedirect"==d;return b(e,a).then(function(a){oi(c,f,a,null)}).c(function(a){oi(c,f,null,a)})};
var pi=function(a,b){a.eb=function(){return E(b)};if(a.Db.length)for(var c=0;c<a.Db.length;c++)a.Db[c](b)},qi=function(a,b){a.eb=function(){return D(b)};if(a.Eb.length)for(var c=0;c<a.Eb.length;c++)a.Eb[c](b)},oi=function(a,b,c,d){b?d?pi(a,d):qi(a,c):qi(a,{user:null});a.Eb=[];a.Db=[]};ei.prototype.getRedirectResult=function(){var a=this;return new C(function(b,c){a.eb?a.eb().then(b,c):(a.Eb.push(b),a.Db.push(c),ri(a))})};
var ri=function(a){var b=new O("timeout");a.bb&&a.bb.cancel();a.bb=me(li.get()).then(function(){a.eb||oi(a,!0,null,b)})},fi=function(a){this.i=a};fi.prototype.Jd=function(a,b){if(!a)return E(new O("invalid-auth-event"));var c=a.ga,d=a.G;return a.P?this.Xc(a,b):b.rb(c,d)?this.Yc(a,b):E(new O("invalid-auth-event"))};fi.prototype.Xc=function(a,b){b.Ia(a.ga,null,a.getError(),a.G);return D()};
fi.prototype.Yc=function(a,b){var c=a.G,d=a.ga,e=b.rb(d,c),f=a.mb;a=a.Ub();return e(f,a).then(function(a){b.Ia(d,a,null,c)}).c(function(a){b.Ia(d,null,a,c)})};var si=function(a){this.g=a;this.xa=this.X=null;this.Sa=0};si.prototype.F=function(){return{apiKey:this.g.j,refreshToken:this.X,accessToken:this.xa,expirationTime:this.Sa}};
var ui=function(a,b){var c=b.idToken,d=b.refreshToken;b=ti(b.expiresIn);a.xa=c;a.Sa=b;a.X=d},ti=function(a){return ka()+1E3*parseInt(a,10)},vi=function(a,b){return ng(a.g,b).then(function(b){a.xa=b.access_token;a.Sa=ti(b.expires_in);a.X=b.refresh_token;return{accessToken:a.xa,expirationTime:a.Sa,refreshToken:a.X}}).c(function(b){"auth/user-token-expired"==b.code&&(a.X=null);throw b;})},wi=function(a){return!(!a.xa||a.X)};
si.prototype.getToken=function(a){a=!!a;return wi(this)?E(new O("user-token-expired")):a||!this.xa||ka()>this.Sa-3E4?this.X?vi(this,{grant_type:"refresh_token",refresh_token:this.X}):D(null):D({accessToken:this.xa,expirationTime:this.Sa,refreshToken:this.X})};var xi=function(a,b,c,d,e){Af(this,{uid:a,displayName:d||null,photoURL:e||null,email:c||null,providerId:b})},yi=function(a,b){Ib.call(this,a);for(var c in b)this[c]=b[c]};t(yi,Ib);
var W=function(a,b,c){this.Z=[];this.j=a.apiKey;this.B=a.appName;this.v=a.authDomain||null;a=firebase.SDK_VERSION?nf(firebase.SDK_VERSION):null;this.g=new R(this.j,null,a);this.ea=new si(this.g);zi(this,b.idToken);ui(this.ea,b);N(this,"refreshToken",this.ea.X);Ai(this,c||{});Qd.call(this);this.hc=!1;this.v&&pf()&&(this.m=ni(this.v,this.j,this.B));this.pc=[];this.Ac=D()};t(W,Qd);
W.prototype.ta=function(a,b){var c=Array.prototype.slice.call(arguments,1),d=this;return this.Ac=this.Ac.then(function(){return a.apply(d,c)},function(){return a.apply(d,c)})};
var zi=function(a,b){a.Cd=b;N(a,"_lat",b)},Bi=function(a,b){La(a.pc,function(a){return a==b})},Ci=function(a){for(var b=[],c=0;c<a.pc.length;c++)b.push(a.pc[c](a));return kd(b).then(function(){return a})},Di=function(a){a.m&&!a.hc&&(a.hc=!0,a.m.subscribe(a))},Ai=function(a,b){Af(a,{uid:b.uid,displayName:b.displayName||null,photoURL:b.photoURL||null,email:b.email||null,emailVerified:b.emailVerified||!1,isAnonymous:b.isAnonymous||!1,providerData:[]})};N(W.prototype,"providerId","firebase");
var Ei=function(){},Fi=function(a){return D().then(function(){if(a.qe)throw new O("app-deleted");})},Gi=function(a){return Da(a.providerData,function(a){return a.providerId})},Ii=function(a,b){b&&(Hi(a,b.providerId),a.providerData.push(b))},Hi=function(a,b){La(a.providerData,function(a){return a.providerId==b})},Ji=function(a,b,c){("uid"!=b||c)&&a.hasOwnProperty(b)&&N(a,b,c)};
W.prototype.copy=function(a){var b=this;b!=a&&(Af(this,{uid:a.uid,displayName:a.displayName,photoURL:a.photoURL,email:a.email,emailVerified:a.emailVerified,isAnonymous:a.isAnonymous,providerData:[]}),x(a.providerData,function(a){Ii(b,a)}),this.ea=a.ea,N(this,"refreshToken",this.ea.X))};W.prototype.reload=function(){var a=this;return Fi(this).then(function(){return Ki(a).then(function(){return Ci(a)}).then(Ei)})};
var Ki=function(a){return a.getToken().then(function(b){var c=a.isAnonymous;return Li(a,b).then(function(){c||Ji(a,"isAnonymous",!1);return b}).c(function(b){"auth/user-token-expired"==b.code&&(a.dispatchEvent(new yi("userDeleted")),Mi(a));throw b;})})};
W.prototype.getToken=function(a){var b=this,c=wi(this.ea);return Fi(this).then(function(){return b.ea.getToken(a)}).then(function(a){if(!a)throw new O("internal-error");a.accessToken!=b.Cd&&(zi(b,a.accessToken),b.Ea());Ji(b,"refreshToken",a.refreshToken);return a.accessToken}).c(function(a){if("auth/user-token-expired"==a.code&&!c)return Ci(b).then(function(){Ji(b,"refreshToken",null);throw a;});throw a;})};
var Ni=function(a,b){b.idToken&&a.Cd!=b.idToken&&(ui(a.ea,b),a.Ea(),zi(a,b.idToken),Ji(a,"refreshToken",a.ea.X))};W.prototype.Ea=function(){this.dispatchEvent(new yi("tokenChanged"))};var Li=function(a,b){return Q(a.g,Ng,{idToken:b}).then(r(a.$e,a))};
W.prototype.$e=function(a){a=a.users;if(!a||!a.length)throw new O("internal-error");a=a[0];Ai(this,{uid:a.localId,displayName:a.displayName,photoURL:a.photoUrl,email:a.email,emailVerified:!!a.emailVerified});for(var b=Oi(a),c=0;c<b.length;c++)Ii(this,b[c]);Ji(this,"isAnonymous",!(this.email&&a.passwordHash)&&!(this.providerData&&this.providerData.length))};
var Oi=function(a){return(a=a.providerUserInfo)&&a.length?Da(a,function(a){return new xi(a.rawId,a.providerId,a.email,a.displayName,a.photoUrl)}):[]};W.prototype.reauthenticate=function(a){var b=this;return this.f(a.Tb(this.g).then(function(a){var c;a:{var e=a.idToken.split(".");if(3==e.length){for(var e=e[1],f=(4-e.length%4)%4,g=0;g<f;g++)e+=".";try{var k=tc(tb(e));if(k.sub&&k.iss&&k.aud&&k.exp){c=new Mf(k);break a}}catch(n){}}c=null}if(!c||b.uid!=c.Se)throw new O("user-mismatch");Ni(b,a);return b.reload()}))};
var Pi=function(a,b){return Ki(a).then(function(){if(Ia(Gi(a),b))return Ci(a).then(function(){throw new O("provider-already-linked");})})};h=W.prototype;h.Qe=function(a){var b=this;return this.f(Pi(this,a.provider).then(function(){return b.getToken()}).then(function(c){return a.Ed(b.g,c)}).then(r(this.td,this)))};h.link=function(a){return this.ta(this.Qe,a)};h.td=function(a){Ni(this,a);var b=this;return this.reload().then(function(){return b})};
h.sf=function(a){var b=this;return this.f(this.getToken().then(function(c){return b.g.updateEmail(c,a)}).then(function(a){Ni(b,a);return b.reload()}))};h.updateEmail=function(a){return this.ta(this.sf,a)};h.tf=function(a){var b=this;return this.f(this.getToken().then(function(c){return b.g.updatePassword(c,a)}).then(function(a){Ni(b,a);return b.reload()}))};h.updatePassword=function(a){return this.ta(this.tf,a)};
h.uf=function(a){if(void 0===a.displayName&&void 0===a.photoURL)return Fi(this);var b=this;return this.f(this.getToken().then(function(c){return b.g.updateProfile(c,{displayName:a.displayName,photoUrl:a.photoURL})}).then(function(a){Ni(b,a);Ji(b,"displayName",a.displayName||null);Ji(b,"photoURL",a.photoUrl||null);return Ci(b)}).then(Ei))};h.updateProfile=function(a){return this.ta(this.uf,a)};
h.rf=function(a){var b=this;return this.f(Ki(this).then(function(c){return Ia(Gi(b),a)?Cg(b.g,c,[a]).then(function(a){var c={};x(a.providerUserInfo||[],function(a){c[a.providerId]=!0});x(Gi(b),function(a){c[a]||Hi(b,a)});return Ci(b)}):Ci(b).then(function(){throw new O("no-such-provider");})}))};h.unlink=function(a){return this.ta(this.rf,a)};h.pe=function(){var a=this;return this.f(this.getToken().then(function(b){return Q(a.g,Mg,{idToken:b})}).then(function(){a.dispatchEvent(new yi("userDeleted"))})).then(function(){Mi(a)})};
h["delete"]=function(){return this.ta(this.pe)};h.md=function(a,b){return"linkViaPopup"==a&&(this.la||null)==b&&this.ca||"linkViaRedirect"==a&&(this.lc||null)==b?!0:!1};h.Ia=function(a,b,c,d){"linkViaPopup"==a&&d==(this.la||null)&&(c&&this.Ga?this.Ga(c):b&&!c&&this.ca&&this.ca(b),this.K&&(this.K.cancel(),this.K=null),delete this.ca,delete this.Ga)};h.rb=function(a,b){return"linkViaPopup"==a&&b==(this.la||null)||"linkViaRedirect"==a&&(this.lc||null)==b?r(this.te,this):null};
h.Sb=function(){return of(this.uid+":::")};
var Ri=function(a,b){if(!pf())return E(new O("operation-not-supported-in-this-environment"));var c=Gf(b.providerId),d=a.Sb(),e=null;!qf()&&a.v&&b.isOAuthProvider&&(e=dh(a.v,a.j,a.B,"linkViaPopup",b,null,d,firebase.SDK_VERSION||null));var f=ef(e,c&&c.Ab,c&&c.zb),c=Pi(a,b.providerId).then(function(){return Ci(a)}).then(function(){Qi(a);return a.getToken()}).then(function(){return a.m.Bb(f,"linkViaPopup",b,d,!!e)}).then(function(){return new C(function(b,c){a.Ia("linkViaPopup",null,new O("cancelled-popup-request"),
a.la||null);a.ca=b;a.Ga=c;a.la=d;a.K=a.m.Gb(a,"linkViaPopup",f,d)})}).then(function(a){f&&df(f);return a}).c(function(a){f&&df(f);throw a;});return a.f(c)};W.prototype.linkWithPopup=function(a){var b=Ri(this,a);return this.ta(function(){return b})};
W.prototype.Re=function(a){if(!pf())return E(new O("operation-not-supported-in-this-environment"));var b=this,c=null,d=this.Sb(),e=Pi(this,a.providerId).then(function(){Qi(b);return b.getToken()}).then(function(){b.lc=d;return Ci(b)}).then(function(a){b.Ha&&(a=b.Ha,a=a.i.set(Si,b.F(),a.u));return a}).then(function(){return b.m.Cb("linkViaRedirect",a,d)}).c(function(a){c=a;if(b.Ha)return Ti(b.Ha);throw c;}).then(function(){if(c)throw c;});return this.f(e)};
W.prototype.linkWithRedirect=function(a){return this.ta(this.Re,a)};var Qi=function(a){if(!a.m||!a.hc){if(a.m&&!a.hc)throw new O("internal-error");throw new O("auth-domain-config-required");}};W.prototype.te=function(a,b){var c=this;this.K&&(this.K.cancel(),this.K=null);var d=null,e=this.getToken().then(function(d){return Qf(c.g,{requestUri:a,sessionId:b,idToken:d})}).then(function(a){d=ag(a);return c.td(a)}).then(function(a){return{user:a,credential:d}});return this.f(e)};
W.prototype.sendEmailVerification=function(){var a=this;return this.f(this.getToken().then(function(b){return a.g.sendEmailVerification(b)}).then(function(b){if(a.email!=b)return a.reload()}).then(function(){}))};var Mi=function(a){for(var b=0;b<a.Z.length;b++)a.Z[b].cancel("app-deleted");a.Z=[];a.qe=!0;N(a,"refreshToken",null);a.m&&a.m.unsubscribe(a)};W.prototype.f=function(a){var b=this;this.Z.push(a);nd(a,function(){Ka(b.Z,a)});return a};W.prototype.toJSON=function(){return this.F()};
W.prototype.F=function(){var a={uid:this.uid,displayName:this.displayName,photoURL:this.photoURL,email:this.email,emailVerified:this.emailVerified,isAnonymous:this.isAnonymous,providerData:[],apiKey:this.j,appName:this.B,authDomain:this.v,stsTokenManager:this.ea.F(),redirectEventId:this.lc||null};x(this.providerData,function(b){a.providerData.push(Bf(b))});return a};
var Ui=function(a){if(!a.apiKey)return null;var b={apiKey:a.apiKey,authDomain:a.authDomain,appName:a.appName},c={};if(a.stsTokenManager&&a.stsTokenManager.accessToken&&a.stsTokenManager.expirationTime)c.idToken=a.stsTokenManager.accessToken,c.refreshToken=a.stsTokenManager.refreshToken||null,c.expiresIn=(a.stsTokenManager.expirationTime-ka())/1E3;else return null;var d=new W(b,c,a);a.providerData&&x(a.providerData,function(a){if(a){var b={};Af(b,a);Ii(d,b)}});a.redirectEventId&&(d.lc=a.redirectEventId);
return d},Vi=function(a,b,c){var d=new W(a,b);c&&(d.Ha=c);return d.reload().then(function(){return d})};var Wi=function(a){this.u=a;this.i=Jh()},Si={name:"redirectUser",J:!1},Ti=function(a){return a.i.remove(Si,a.u)},Xi=function(a,b){return a.i.get(Si,a.u).then(function(a){a&&b&&(a.authDomain=b);return Ui(a||{})})};var Yi=function(a){this.u=a;this.i=Jh()},Zi={name:"authUser",J:!0},$i=function(a,b){return a.i.set(Zi,b.F(),a.u)},aj=function(a){return a.i.remove(Zi,a.u)},bj=function(a,b){return a.i.get(Zi,a.u).then(function(a){a&&b&&(a.authDomain=b);return Ui(a||{})})};var Y=function(a){this.Qa=!1;N(this,"app",a);if(X(this).options&&X(this).options.apiKey)a=firebase.SDK_VERSION?nf(firebase.SDK_VERSION):null,this.g=new R(X(this).options&&X(this).options.apiKey,null,a);else throw new O("invalid-api-key");this.Z=[];this.Oa=[];this.Ye=firebase.INTERNAL.createSubscribe(r(this.Ke,this));cj(this,null);this.oa=new Yi(X(this).options.apiKey+":"+X(this).name);this.cb=new Wi(X(this).options.apiKey+":"+X(this).name);this.Nb=this.f(dj(this));this.ua=this.f(ej(this));this.Qc=
!1;this.Kc=r(this.lf,this);this.Xd=r(this.Ua,this);this.Yd=r(this.Ge,this);this.Wd=r(this.Fe,this);fj(this);this.INTERNAL={};this.INTERNAL["delete"]=r(this["delete"],this)};Y.prototype.toJSON=function(){return{apiKey:X(this).options.apiKey,authDomain:X(this).options.authDomain,appName:X(this).name,currentUser:Z(this)&&Z(this).F()}};
var gj=function(a){return a.re||E(new O("auth-domain-config-required"))},fj=function(a){var b=X(a).options.authDomain,c=X(a).options.apiKey;b&&pf()&&(a.re=a.Nb.then(function(){if(!a.Qa)return a.m=ni(b,c,X(a).name),a.m.subscribe(a),Z(a)&&Di(Z(a)),a.ad&&(Di(a.ad),a.ad=null),a.m}))};h=Y.prototype;h.md=function(a,b){switch(a){case "unknown":case "signInViaRedirect":return!0;case "signInViaPopup":return this.la==b&&!!this.ca;default:return!1}};
h.Ia=function(a,b,c,d){"signInViaPopup"==a&&this.la==d&&(c&&this.Ga?this.Ga(c):b&&!c&&this.ca&&this.ca(b),this.K&&(this.K.cancel(),this.K=null),delete this.ca,delete this.Ga)};h.rb=function(a,b){return"signInViaRedirect"==a||"signInViaPopup"==a&&this.la==b&&this.ca?r(this.ue,this):null};
h.ue=function(a,b){var c=this;a={requestUri:a,sessionId:b};this.K&&(this.K.cancel(),this.K=null);var d=null,e=Of(c.g,a).then(function(a){d=ag(a);return a});a=c.Nb.then(function(){return e}).then(function(a){return hj(c,a)}).then(function(){return{user:Z(c),credential:d}});return this.f(a)};h.Sb=function(){return of()};
h.signInWithPopup=function(a){if(!pf())return E(new O("operation-not-supported-in-this-environment"));var b=this,c=Gf(a.providerId),d=this.Sb(),e=null;!qf()&&X(this).options.authDomain&&a.isOAuthProvider&&(e=dh(X(this).options.authDomain,X(this).options.apiKey,X(this).name,"signInViaPopup",a,null,d,firebase.SDK_VERSION||null));var f=ef(e,c&&c.Ab,c&&c.zb),c=gj(this).then(function(b){return b.Bb(f,"signInViaPopup",a,d,!!e)}).then(function(){return new C(function(a,c){b.Ia("signInViaPopup",null,new O("cancelled-popup-request"),
b.la);b.ca=a;b.Ga=c;b.la=d;b.K=b.m.Gb(b,"signInViaPopup",f,d)})}).then(function(a){f&&df(f);return a}).c(function(a){f&&df(f);throw a;});return this.f(c)};h.signInWithRedirect=function(a){if(!pf())return E(new O("operation-not-supported-in-this-environment"));var b=this,c=gj(this).then(function(){return b.m.Cb("signInViaRedirect",a)});return this.f(c)};
h.getRedirectResult=function(){if(!pf())return E(new O("operation-not-supported-in-this-environment"));var a=this,b=gj(this).then(function(){return a.m.getRedirectResult()});return this.f(b)};
var hj=function(a,b){var c={};c.apiKey=X(a).options.apiKey;c.authDomain=X(a).options.authDomain;c.appName=X(a).name;return a.Nb.then(function(){return Vi(c,b,a.cb)}).then(function(b){if(Z(a)&&b.uid==Z(a).uid)return Z(a).copy(b),a.Ua(b);cj(a,b);Di(b);return a.Ua(b)}).then(function(){a.Ea()})},cj=function(a,b){Z(a)&&(Bi(Z(a),a.Xd),cc(Z(a),"tokenChanged",a.Yd),cc(Z(a),"userDeleted",a.Wd));b&&(b.pc.push(a.Xd),Ub(b,"tokenChanged",a.Yd),Ub(b,"userDeleted",a.Wd));N(a,"currentUser",b)};
Y.prototype.signOut=function(){var a=this,b=this.ua.then(function(){if(!Z(a))return D();cj(a,null);return aj(a.oa).then(function(){a.Ea()})});return this.f(b)};
var ij=function(a){var b=Xi(a.cb,X(a).options.authDomain).then(function(b){if(a.ad=b)b.Ha=a.cb;return Ti(a.cb)});return a.f(b)},dj=function(a){var b=X(a).options.authDomain,c=ij(a).then(function(){return bj(a.oa,b)}).then(function(b){return b?(b.Ha=a.cb,b.reload().then(function(){return $i(a.oa,b).then(function(){return b})}).c(function(c){return"auth/network-request-failed"==c.code?b:aj(a.oa)})):null}).then(function(b){cj(a,b||null)});return a.f(c)},ej=function(a){return a.Nb.then(function(){return a.getRedirectResult()}).c(function(){}).then(function(){if(!a.Qa)return a.Kc()}).c(function(){}).then(function(){if(!a.Qa){a.Qc=
!0;var b=a.oa;b.i.addListener(Zi,b.u,a.Kc)}})};Y.prototype.lf=function(){var a=this;return bj(this.oa,X(this).options.authDomain).then(function(b){if(!a.Qa){var c;if(c=Z(a)&&b){c=Z(a).uid;var d=b.uid;c=void 0===c||null===c||""===c||void 0===d||null===d||""===d?!1:c==d}if(c)return Z(a).copy(b),Z(a).getToken();if(Z(a)||b)cj(a,b),b&&(Di(b),b.Ha=a.cb),a.m&&a.m.subscribe(a),a.Ea()}})};Y.prototype.Ua=function(a){return $i(this.oa,a)};Y.prototype.Ge=function(){this.Ea();this.Ua(Z(this))};
Y.prototype.Fe=function(){this.signOut()};var jj=function(a,b){return a.f(b.then(function(b){return hj(a,b)}).then(function(){return Z(a)}))};h=Y.prototype;h.Ke=function(a){var b=this;this.addAuthTokenListener(function(){a.next(Z(b))})};h.onAuthStateChanged=function(a,b,c){var d=this;this.Qc&&firebase.Promise.resolve().then(function(){q(a)?a(Z(d)):q(a.next)&&a.next(Z(d))});return this.Ye(a,b,c)};
h.getToken=function(a){var b=this,c=this.ua.then(function(){return Z(b)?Z(b).getToken(a).then(function(a){return{accessToken:a}}):null});return this.f(c)};h.signInWithCustomToken=function(a){var b=this;return this.ua.then(function(){return jj(b,Q(b.g,Og,{token:a}))}).then(function(a){Ji(a,"isAnonymous",!1);return b.Ua(a)}).then(function(){return Z(b)})};h.signInWithEmailAndPassword=function(a,b){var c=this;return this.ua.then(function(){return jj(c,Q(c.g,Xf,{email:a,password:b}))})};
h.createUserWithEmailAndPassword=function(a,b){var c=this;return this.ua.then(function(){return jj(c,Q(c.g,Lg,{email:a,password:b}))})};h.signInWithCredential=function(a){var b=this;return this.ua.then(function(){return jj(b,a.Tb(b.g))})};h.signInAnonymously=function(){var a=Z(this),b=this;return a&&a.isAnonymous?D(a):this.ua.then(function(){return jj(b,b.g.signInAnonymously())}).then(function(a){Ji(a,"isAnonymous",!0);return b.Ua(a)}).then(function(){return Z(b)})};
var X=function(a){return a.app},Z=function(a){return a.currentUser};h=Y.prototype;h.Ea=function(){if(this.Qc)for(var a=0;a<this.Oa.length;a++)if(this.Oa[a])this.Oa[a](Z(this)&&Z(this)._lat||null)};h.addAuthTokenListener=function(a){var b=this;this.Oa.push(a);this.f(this.ua.then(function(){b.Qa||Ia(b.Oa,a)&&a(Z(b)&&Z(b)._lat||null)}))};h.removeAuthTokenListener=function(a){La(this.Oa,function(b){return b==a})};
h["delete"]=function(){this.Qa=!0;for(var a=0;a<this.Z.length;a++)this.Z[a].cancel("app-deleted");this.Z=[];this.oa&&(a=this.oa,a.i.removeListener(Zi,a.u,this.Kc));this.m&&this.m.unsubscribe(this);return firebase.Promise.resolve()};h.f=function(a){var b=this;this.Z.push(a);nd(a,function(){Ka(b.Z,a)});return a};h.fetchProvidersForEmail=function(a){return this.f(sg(this.g,a))};h.verifyPasswordResetCode=function(a){return this.checkActionCode(a).then(function(a){return a.data.email})};
h.confirmPasswordReset=function(a,b){return this.f(this.g.confirmPasswordReset(a,b).then(function(){}))};h.checkActionCode=function(a){return this.f(this.g.checkActionCode(a).then(function(a){return new xh(a)}))};h.applyActionCode=function(a){return this.f(this.g.applyActionCode(a).then(function(){}))};h.sendPasswordResetEmail=function(a){return this.f(this.g.sendPasswordResetEmail(a).then(function(){}))};Fh(Y.prototype,{applyActionCode:{name:"applyActionCode",a:[S("code")]},checkActionCode:{name:"checkActionCode",a:[S("code")]},confirmPasswordReset:{name:"confirmPasswordReset",a:[S("code"),S("newPassword")]},createUserWithEmailAndPassword:{name:"createUserWithEmailAndPassword",a:[S("email"),S("password")]},fetchProvidersForEmail:{name:"fetchProvidersForEmail",a:[S("email")]},getRedirectResult:{name:"getRedirectResult",a:[]},onAuthStateChanged:{name:"onAuthStateChanged",a:[Dh(T(),zh(),"nextOrObserver"),
zh("opt_error",!0),zh("opt_completed",!0)]},sendPasswordResetEmail:{name:"sendPasswordResetEmail",a:[S("email")]},signInAnonymously:{name:"signInAnonymously",a:[]},signInWithCredential:{name:"signInWithCredential",a:[Bh()]},signInWithCustomToken:{name:"signInWithCustomToken",a:[S("token")]},signInWithEmailAndPassword:{name:"signInWithEmailAndPassword",a:[S("email"),S("password")]},signInWithPopup:{name:"signInWithPopup",a:[Ch()]},signInWithRedirect:{name:"signInWithRedirect",a:[Ch()]},signOut:{name:"signOut",
a:[]},toJSON:{name:"toJSON",a:[S(null,!0)]},verifyPasswordResetCode:{name:"verifyPasswordResetCode",a:[S("code")]}});
Fh(W.prototype,{"delete":{name:"delete",a:[]},getToken:{name:"getToken",a:[{name:"opt_forceRefresh",fa:"a boolean",optional:!0,ha:function(a){return"boolean"==typeof a}}]},link:{name:"link",a:[Bh()]},linkWithPopup:{name:"linkWithPopup",a:[Ch()]},linkWithRedirect:{name:"linkWithRedirect",a:[Ch()]},reauthenticate:{name:"reauthenticate",a:[Bh()]},reload:{name:"reload",a:[]},sendEmailVerification:{name:"sendEmailVerification",a:[]},toJSON:{name:"toJSON",a:[S(null,!0)]},unlink:{name:"unlink",a:[S("provider")]},
updateEmail:{name:"updateEmail",a:[S("email")]},updatePassword:{name:"updatePassword",a:[S("password")]},updateProfile:{name:"updateProfile",a:[T("profile")]}});Fh(C.prototype,{c:{name:"catch"},then:{name:"then"}});U(Zf,"credential",function(a,b){return new Wf(a,b)},[S("email"),S("password")]);Fh(Sf.prototype,{addScope:{name:"addScope",a:[S("scope")]},setCustomParameters:{name:"setCustomParameters",a:[T("customOAuthParameters")]}});U(Sf,"credential",Sf.credential,[Dh(S(),T(),"token")]);
Fh(Tf.prototype,{addScope:{name:"addScope",a:[S("scope")]},setCustomParameters:{name:"setCustomParameters",a:[T("customOAuthParameters")]}});U(Tf,"credential",Tf.credential,[Dh(S(),T(),"token")]);Fh(Uf.prototype,{addScope:{name:"addScope",a:[S("scope")]},setCustomParameters:{name:"setCustomParameters",a:[T("customOAuthParameters")]}});U(Uf,"credential",Uf.credential,[Dh(S(),Dh(T(),Ah()),"idToken"),Dh(S(),Ah(),"accessToken",!0)]);Fh(Vf.prototype,{setCustomParameters:{name:"setCustomParameters",a:[T("customOAuthParameters")]}});
U(Vf,"credential",Vf.credential,[Dh(S(),T(),"token"),S("secret",!0)]);
(function(){if("undefined"!==typeof firebase&&firebase.INTERNAL&&firebase.INTERNAL.registerService){var a={Auth:Y,Error:O};U(a,"EmailAuthProvider",Zf,[]);U(a,"FacebookAuthProvider",Sf,[]);U(a,"GithubAuthProvider",Tf,[]);U(a,"GoogleAuthProvider",Uf,[]);U(a,"TwitterAuthProvider",Vf,[]);firebase.INTERNAL.registerService("auth",function(a,c){a=new Y(a);c({INTERNAL:{getToken:r(a.getToken,a),addAuthTokenListener:r(a.addAuthTokenListener,a),removeAuthTokenListener:r(a.removeAuthTokenListener,a)}});return a},
a,function(a,c){if("create"===a)try{c.auth()}catch(d){}});firebase.INTERNAL.extendNamespace({User:W})}else throw Error("Cannot find the firebase namespace; be sure to include firebase-app.js before this library.");})();}).call(this);
}).call(global);
module.exports = firebase.auth;