firebase 2.4.1 → 2.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/firebase-node.js +49 -48
- package/lib/firebase-web.js +46 -45
- package/npm-shrinkwrap.json +1 -1
- package/package.json +1 -1
package/lib/firebase-node.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/*! @license Firebase v2.4.
|
|
1
|
+
/*! @license Firebase v2.4.2
|
|
2
2
|
License: https://www.firebase.com/terms/terms-of-service.html */
|
|
3
3
|
(function() {
|
|
4
4
|
var h,n=this;function p(a){return void 0!==a}function aa(){}function ba(a){a.wb=function(){return a.wf?a.wf:a.wf=new a}}
|
|
5
5
|
function ca(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";
|
|
6
6
|
else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function da(a){return"array"==ca(a)}function ea(a){var b=ca(a);return"array"==b||"object"==b&&"number"==typeof a.length}function q(a){return"string"==typeof a}function fa(a){return"number"==typeof a}function t(a){return"function"==ca(a)}function ga(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}function ha(a,b,c){return a.call.apply(a.bind,arguments)}
|
|
7
7
|
function ia(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)}}function u(a,b,c){u=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?ha:ia;return u.apply(null,arguments)}var ja=Date.now||function(){return+new Date};
|
|
8
|
-
function ka(a,b){function c(){}c.prototype=b.prototype;a.
|
|
8
|
+
function ka(a,b){function c(){}c.prototype=b.prototype;a.sh=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.mh=function(a,c,f){for(var g=Array(arguments.length-2),k=2;k<arguments.length;k++)g[k-2]=arguments[k];return b.prototype[c].apply(a,g)}};function la(a){if(Error.captureStackTrace)Error.captureStackTrace(this,la);else{var b=Error().stack;b&&(this.stack=b)}a&&(this.message=String(a))}ka(la,Error);la.prototype.name="CustomError";function v(a,b){for(var c in a)b.call(void 0,a[c],c,a)}function ma(a,b){var c={},d;for(d in a)c[d]=b.call(void 0,a[d],d,a);return c}function na(a,b){for(var c in a)if(!b.call(void 0,a[c],c,a))return!1;return!0}function oa(a){var b=0,c;for(c in a)b++;return b}function pa(a){for(var b in a)return b}function qa(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b}function ra(a){var b=[],c=0,d;for(d in a)b[c++]=d;return b}function sa(a,b){for(var c in a)if(a[c]==b)return!0;return!1}
|
|
9
9
|
function ta(a,b,c){for(var d in a)if(b.call(c,a[d],d,a))return d}function ua(a,b){var c=ta(a,b,void 0);return c&&a[c]}function va(a){for(var b in a)return!1;return!0}function wa(a){var b={},c;for(c in a)b[c]=a[c];return b}var xa="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");
|
|
10
10
|
function ya(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<xa.length;f++)c=xa[f],Object.prototype.hasOwnProperty.call(d,c)&&(a[c]=d[c])}};function za(a){a=String(a);if(/^\s*$/.test(a)?0:/^[\],:{}\s\u2028\u2029]*$/.test(a.replace(/\\["\\\/bfnrtu]/g,"@").replace(/"[^"\\\n\r\u2028\u2029\x00-\x08\x0a-\x1f]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:[\s\u2028\u2029]*\[)+/g,"")))try{return eval("("+a+")")}catch(b){}throw Error("Invalid JSON string: "+a);}function Aa(){this.Td=void 0}
|
|
11
11
|
function Ba(a,b,c){switch(typeof b){case "string":Ca(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(null==b){c.push("null");break}if(da(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],Ba(a,a.Td?a.Td.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d),Ca(f,c),
|
|
@@ -23,10 +23,10 @@ function fb(){for(;db.length;){var a=db;db=[];for(var b=0;b<a.length;b++){var c=
|
|
|
23
23
|
(function(){var a="",b;if(gb&&n.opera)return a=n.opera.version,t(a)?a():a;ib?b=/rv\:([^\);]+)(\)|;)/:hb?b=/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/:jb&&(b=/WebKit\/(\S+)/);b&&(a=(a=b.exec(w))?a[1]:"");return hb&&(b=(b=n.document)?b.documentMode:void 0,b>parseFloat(a))?String(b):a})();var kb=null,lb=null;
|
|
24
24
|
function mb(a,b){if(!ea(a))throw Error("encodeByteArray takes an array as a parameter");if(!kb){kb={};lb={};for(var c=0;65>c;c++)kb[c]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(c),lb[c]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_.".charAt(c)}for(var c=b?lb:kb,d=[],e=0;e<a.length;e+=3){var f=a[e],g=e+1<a.length,k=g?a[e+1]:0,m=e+2<a.length,l=m?a[e+2]:0,r=f>>2,f=(f&3)<<4|k>>4,k=(k&15)<<2|l>>6,l=l&63;m||(l=64,g||(k=64));d.push(c[r],c[f],c[k],c[l])}return d.join("")}
|
|
25
25
|
;function nb(a,b){this.N=ob;this.Pf=void 0;this.Ba=this.Ga=null;this.vd=this.ue=!1;if(a==pb)qb(this,rb,b);else try{var c=this;a.call(b,function(a){qb(c,rb,a)},function(a){if(!(a instanceof sb))try{if(a instanceof Error)throw a;throw Error("Promise rejected.");}catch(b){}qb(c,tb,a)})}catch(d){qb(this,tb,d)}}var ob=0,rb=2,tb=3;function pb(){}nb.prototype.then=function(a,b,c){return ub(this,t(a)?a:null,t(b)?b:null,c)};nb.prototype.then=nb.prototype.then;nb.prototype.$goog_Thenable=!0;h=nb.prototype;
|
|
26
|
-
h.
|
|
26
|
+
h.gh=function(a,b){return ub(this,null,a,b)};h.cancel=function(a){this.N==ob&&$a(function(){var b=new sb(a);vb(this,b)},this)};function vb(a,b){if(a.N==ob)if(a.Ga){var c=a.Ga;if(c.Ba){for(var d=0,e=-1,f=0,g;g=c.Ba[f];f++)if(g=g.o)if(d++,g==a&&(e=f),0<=e&&1<d)break;0<=e&&(c.N==ob&&1==d?vb(c,b):(d=c.Ba.splice(e,1)[0],wb(c,d,tb,b)))}a.Ga=null}else qb(a,tb,b)}function xb(a,b){a.Ba&&a.Ba.length||a.N!=rb&&a.N!=tb||yb(a);a.Ba||(a.Ba=[]);a.Ba.push(b)}
|
|
27
27
|
function ub(a,b,c,d){var e={o:null,Gf:null,If:null};e.o=new nb(function(a,g){e.Gf=b?function(c){try{var e=b.call(d,c);a(e)}catch(l){g(l)}}:a;e.If=c?function(b){try{var e=c.call(d,b);!p(e)&&b instanceof sb?g(b):a(e)}catch(l){g(l)}}:g});e.o.Ga=a;xb(a,e);return e.o}h.Xf=function(a){this.N=ob;qb(this,rb,a)};h.Yf=function(a){this.N=ob;qb(this,tb,a)};
|
|
28
28
|
function qb(a,b,c){if(a.N==ob){if(a==c)b=tb,c=new TypeError("Promise cannot resolve to itself");else{var d;if(c)try{d=!!c.$goog_Thenable}catch(e){d=!1}else d=!1;if(d){a.N=1;c.then(a.Xf,a.Yf,a);return}if(ga(c))try{var f=c.then;if(t(f)){zb(a,c,f);return}}catch(g){b=tb,c=g}}a.Pf=c;a.N=b;a.Ga=null;yb(a);b!=tb||c instanceof sb||Ab(a,c)}}function zb(a,b,c){function d(b){f||(f=!0,a.Yf(b))}function e(b){f||(f=!0,a.Xf(b))}a.N=1;var f=!1;try{c.call(b,e,d)}catch(g){d(g)}}
|
|
29
|
-
function yb(a){a.ue||(a.ue=!0,$a(a.wg,a))}h.wg=function(){for(;this.Ba&&this.Ba.length;){var a=this.Ba;this.Ba=null;for(var b=0;b<a.length;b++)wb(this,a[b],this.N,this.Pf)}this.ue=!1};function wb(a,b,c,d){if(c==rb)b.Gf(d);else{if(b.o)for(;a&&a.vd;a=a.Ga)a.vd=!1;b.If(d)}}function Ab(a,b){a.vd=!0;$a(function(){a.vd&&Bb.call(null,b)})}var Bb=Xa;function sb(a){la.call(this,a)}ka(sb,la);sb.prototype.name="cancel";var Cb=Cb||"2.4.
|
|
29
|
+
function yb(a){a.ue||(a.ue=!0,$a(a.wg,a))}h.wg=function(){for(;this.Ba&&this.Ba.length;){var a=this.Ba;this.Ba=null;for(var b=0;b<a.length;b++)wb(this,a[b],this.N,this.Pf)}this.ue=!1};function wb(a,b,c,d){if(c==rb)b.Gf(d);else{if(b.o)for(;a&&a.vd;a=a.Ga)a.vd=!1;b.If(d)}}function Ab(a,b){a.vd=!0;$a(function(){a.vd&&Bb.call(null,b)})}var Bb=Xa;function sb(a){la.call(this,a)}ka(sb,la);sb.prototype.name="cancel";var Cb=Cb||"2.4.2";function y(a,b){return Object.prototype.hasOwnProperty.call(a,b)}function z(a,b){if(Object.prototype.hasOwnProperty.call(a,b))return a[b]}function Db(a,b){for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&b(c,a[c])}function Eb(a){var b={};Db(a,function(a,d){b[a]=d});return b}function Fb(a){return"object"===typeof a&&null!==a};function Gb(a){var b=[];Db(a,function(a,d){da(d)?Na(d,function(d){b.push(encodeURIComponent(a)+"="+encodeURIComponent(d))}):b.push(encodeURIComponent(a)+"="+encodeURIComponent(d))});return b.length?"&"+b.join("&"):""}function Hb(a){var b={};a=a.replace(/^\?/,"").split("&");Na(a,function(a){a&&(a=a.split("="),b[a[0]]=a[1])});return b};function Ib(a,b){if(!a)throw Jb(b);}function Jb(a){return Error("Firebase ("+Cb+") INTERNAL ASSERT FAILED: "+a)};var Kb=n.Promise||nb;nb.prototype["catch"]=nb.prototype.gh;function A(){var a=this;this.reject=this.resolve=null;this.D=new Kb(function(b,c){a.resolve=b;a.reject=c})}function B(a,b){return function(c,d){c?a.reject(c):a.resolve(d);t(b)&&(Lb(a.D),1===b.length?b(c):b(c,d))}}function Lb(a){a.then(void 0,aa)};function Mb(a){for(var b=[],c=0,d=0;d<a.length;d++){var e=a.charCodeAt(d);55296<=e&&56319>=e&&(e-=55296,d++,Ib(d<a.length,"Surrogate pair missing trail surrogate."),e=65536+(e<<10)+(a.charCodeAt(d)-56320));128>e?b[c++]=e:(2048>e?b[c++]=e>>6|192:(65536>e?b[c++]=e>>12|224:(b[c++]=e>>18|240,b[c++]=e>>12&63|128),b[c++]=e>>6&63|128),b[c++]=e&63|128)}return b}function Nb(a){for(var b=0,c=0;c<a.length;c++){var d=a.charCodeAt(c);128>d?b++:2048>d?b+=2:55296<=d&&56319>=d?(b+=4,c++):b+=3}return b};function C(a,b,c,d){var e;d<b?e="at least "+b:d>c&&(e=0===c?"none":"no more than "+c);if(e)throw Error(a+" failed: Was called with "+d+(1===d?" argument.":" arguments.")+" Expects "+e+".");}function D(a,b,c){var d="";switch(b){case 1:d=c?"first":"First";break;case 2:d=c?"second":"Second";break;case 3:d=c?"third":"Third";break;case 4:d=c?"fourth":"Fourth";break;default:throw Error("errorPrefix called with argumentNumber > 4. Need to update it?");}return a=a+" failed: "+(d+" argument ")}
|
|
30
30
|
function E(a,b,c,d){if((!d||p(c))&&!t(c))throw Error(D(a,b,d)+"must be a valid function.");}function Ob(a,b,c){if(p(c)&&(!ga(c)||null===c))throw Error(D(a,b,!0)+"must be a valid context object.");};function Pb(a){return"undefined"!==typeof JSON&&p(JSON.parse)?JSON.parse(a):za(a)}function F(a){if("undefined"!==typeof JSON&&p(JSON.stringify))a=JSON.stringify(a);else{var b=[];Ba(new Aa,a,b);a=b.join("")}return a};function Qb(){this.Xd=G}Qb.prototype.j=function(a){return this.Xd.S(a)};Qb.prototype.toString=function(){return this.Xd.toString()};function Rb(){}Rb.prototype.rf=function(){return null};Rb.prototype.ye=function(){return null};var Sb=new Rb;function Tb(a,b,c){this.ag=a;this.Na=b;this.Ld=c}Tb.prototype.rf=function(a){var b=this.Na.Q;if(Ub(b,a))return b.j().T(a);b=null!=this.Ld?new Vb(this.Ld,!0,!1):this.Na.w();return this.ag.Ac(a,b)};Tb.prototype.ye=function(a,b,c){var d=null!=this.Ld?this.Ld:Wb(this.Na);a=this.ag.me(d,b,1,c,a);return 0===a.length?null:a[0]};function Xb(){this.vb=[]}function Yb(a,b){for(var c=null,d=0;d<b.length;d++){var e=b[d],f=e.bc();null===c||f.ea(c.bc())||(a.vb.push(c),c=null);null===c&&(c=new Zb(f));c.add(e)}c&&a.vb.push(c)}function $b(a,b,c){Yb(a,c);ac(a,function(a){return a.ea(b)})}function bc(a,b,c){Yb(a,c);ac(a,function(a){return a.contains(b)||b.contains(a)})}
|
|
31
31
|
function ac(a,b){for(var c=!0,d=0;d<a.vb.length;d++){var e=a.vb[d];if(e)if(e=e.bc(),b(e)){for(var e=a.vb[d],f=0;f<e.ud.length;f++){var g=e.ud[f];if(null!==g){e.ud[f]=null;var k=g.Yb();cc&&dc("event: "+g.toString());ec(k)}}a.vb[d]=null}else c=!1}c&&(a.vb=[])}function Zb(a){this.ta=a;this.ud=[]}Zb.prototype.add=function(a){this.ud.push(a)};Zb.prototype.bc=function(){return this.ta};function H(a,b,c,d){this.type=a;this.Ma=b;this.Ya=c;this.Le=d;this.Rd=void 0}function fc(a){return new H(gc,a)}var gc="value";function hc(a,b,c,d){this.te=b;this.Zd=c;this.Rd=d;this.td=a}hc.prototype.bc=function(){var a=this.Zd.Kb();return"value"===this.td?a.path:a.parent().path};hc.prototype.ze=function(){return this.td};hc.prototype.Yb=function(){return this.te.Yb(this)};hc.prototype.toString=function(){return this.bc().toString()+":"+this.td+":"+F(this.Zd.nf())};function ic(a,b,c){this.te=a;this.error=b;this.path=c}ic.prototype.bc=function(){return this.path};ic.prototype.ze=function(){return"cancel"};
|
|
32
32
|
ic.prototype.Yb=function(){return this.te.Yb(this)};ic.prototype.toString=function(){return this.path.toString()+":cancel"};function Vb(a,b,c){this.A=a;this.ga=b;this.Xb=c}function jc(a){return a.ga}function kc(a){return a.Xb}function lc(a,b){return b.e()?a.ga&&!a.Xb:Ub(a,I(b))}function Ub(a,b){return a.ga&&!a.Xb||a.A.Fa(b)}Vb.prototype.j=function(){return this.A};function mc(a){this.og=a;this.Dd=null}mc.prototype.get=function(){var a=this.og.get(),b=wa(a);if(this.Dd)for(var c in this.Dd)b[c]-=this.Dd[c];this.Dd=a;return b};function nc(a,b){this.Uf={};this.ed=new mc(a);this.da=b;var c=1E4+2E4*Math.random();setTimeout(u(this.Mf,this),Math.floor(c))}nc.prototype.Mf=function(){var a=this.ed.get(),b={},c=!1,d;for(d in a)0<a[d]&&y(this.Uf,d)&&(b[d]=a[d],c=!0);c&&this.da.Ve(b);setTimeout(u(this.Mf,this),Math.floor(6E5*Math.random()))};function oc(){this.Fc={}}function pc(a,b,c){p(c)||(c=1);y(a.Fc,b)||(a.Fc[b]=0);a.Fc[b]+=c}oc.prototype.get=function(){return wa(this.Fc)};var qc={},rc={};function sc(a){a=a.toString();qc[a]||(qc[a]=new oc);return qc[a]}function tc(a,b){var c=a.toString();rc[c]||(rc[c]=b());return rc[c]};function K(a,b){this.name=a;this.U=b}function uc(a,b){return new K(a,b)};function vc(a,b){return wc(a.name,b.name)}function xc(a,b){return wc(a,b)};function yc(a,b,c){this.type=zc;this.source=a;this.path=b;this.Ia=c}yc.prototype.Yc=function(a){return this.path.e()?new yc(this.source,L,this.Ia.T(a)):new yc(this.source,M(this.path),this.Ia)};yc.prototype.toString=function(){return"Operation("+this.path+": "+this.source.toString()+" overwrite: "+this.Ia.toString()+")"};function Ac(a,b){this.type=Bc;this.source=a;this.path=b}Ac.prototype.Yc=function(){return this.path.e()?new Ac(this.source,L):new Ac(this.source,M(this.path))};Ac.prototype.toString=function(){return"Operation("+this.path+": "+this.source.toString()+" listen_complete)"};function Cc(a,b){this.Oa=a;this.xa=b?b:Dc}h=Cc.prototype;h.Ra=function(a,b){return new Cc(this.Oa,this.xa.Ra(a,b,this.Oa).$(null,null,!1,null,null))};h.remove=function(a){return new Cc(this.Oa,this.xa.remove(a,this.Oa).$(null,null,!1,null,null))};h.get=function(a){for(var b,c=this.xa;!c.e();){b=this.Oa(a,c.key);if(0===b)return c.value;0>b?c=c.left:0<b&&(c=c.right)}return null};
|
|
@@ -39,17 +39,17 @@ h.remove=function(a,b){var c,d;c=this;if(0>b(a,c.key))c.left.e()||c.left.ha()||c
|
|
|
39
39
|
function Kc(a){a.right.ha()&&!a.left.ha()&&(a=Pc(a));a.left.ha()&&a.left.left.ha()&&(a=Nc(a));a.left.ha()&&a.right.ha()&&(a=Oc(a));return a}function Mc(a){a=Oc(a);a.right.left.ha()&&(a=a.$(null,null,null,null,Nc(a.right)),a=Pc(a),a=Oc(a));return a}function Pc(a){return a.right.$(null,null,a.color,a.$(null,null,!0,null,a.right.left),null)}function Nc(a){return a.left.$(null,null,a.color,null,a.$(null,null,!0,a.left.right,null))}
|
|
40
40
|
function Oc(a){return a.$(null,null,!a.color,a.left.$(null,null,!a.left.color,null,null),a.right.$(null,null,!a.right.color,null,null))}function Qc(){}h=Qc.prototype;h.$=function(){return this};h.Ra=function(a,b){return new Ic(a,b,null)};h.remove=function(){return this};h.count=function(){return 0};h.e=function(){return!0};h.ka=function(){return!1};h.Tc=function(){return null};h.ic=function(){return null};h.ha=function(){return!1};var Dc=new Qc;(function(){var a=process.version;if("v0.10.22"===a||"v0.10.23"===a||"v0.10.24"===a){var b=function(a,b,c){this.chunk=a;this.encoding=b;this.callback=c},c=function(a,c,d,e,l){c.objectMode||!1===c.decodeStrings||"string"!==typeof d||(d=new Buffer(d,e));Buffer.isBuffer(d)&&(e="buffer");var r=c.objectMode?1:d.length;c.length+=r;var x=c.length<c.highWaterMark;x||(c.needDrain=!0);c.writing?c.buffer.push(new b(d,e,l)):(c.writelen=r,c.writecb=l,c.writing=!0,c.sync=!0,a._write(d,e,c.onwrite),c.sync=!1);return x},
|
|
41
41
|
d=function(a,b,c,d){var e=!0;if(!Buffer.isBuffer(c)&&"string"!==typeof c&&null!==c&&void 0!==c&&!b.objectMode){var r=new TypeError("Invalid non-string/buffer chunk");a.emit("error",r);process.nextTick(function(){d(r)});e=!1}return e},e=function(a,b){var c=Error("write after end");a.emit("error",c);process.nextTick(function(){b(c)})},a=require("_stream_writable");a.prototype.write=function(a,b,k){var m=this._writableState,l=!1;"function"===typeof b&&(k=b,b=null);Buffer.isBuffer(a)?b="buffer":b||(b=
|
|
42
|
-
m.defaultEncoding);"function"!==typeof k&&(k=function(){});m.ended?e(this,k):d(this,m,a,k)&&(l=c(this,m,a,b,k));return l};require("_stream_duplex").prototype.write=a.prototype.write}})();function Rc(a,b){return a&&"object"===typeof a?(N(".sv"in a,"Unexpected leaf node or priority contents"),b[a[".sv"]]):a}function Sc(a,b){var c=new Tc;Uc(a,new O(""),function(a,e){c.qc(a,Vc(e,b))});return c}function Vc(a,b){var c=a.C().J(),c=Rc(c,b),d;if(a.L()){var e=Rc(a.Ea(),b);return e!==a.Ea()||c!==a.C().J()?new Wc(e,P(c)):a}d=a;c!==a.C().J()&&(d=d.ia(new Wc(c)));a.R(Q,function(a,c){var e=Vc(c,b);e!==c&&(d=d.W(a,e))});return d};function Xc(){this.zc={}}Xc.prototype.set=function(a,b){null==b?delete this.zc[a]:this.zc[a]=b};Xc.prototype.get=function(a){return y(this.zc,a)?this.zc[a]:null};Xc.prototype.remove=function(a){delete this.zc[a]};Xc.prototype.xf=!0;function Yc(a){this.Gc=a;this.Qd="firebase:"}h=Yc.prototype;h.set=function(a,b){null==b?this.Gc.removeItem(this.Qd+a):this.Gc.setItem(this.Qd+a,F(b))};h.get=function(a){a=this.Gc.getItem(this.Qd+a);return null==a?null:Pb(a)};h.remove=function(a){this.Gc.removeItem(this.Qd+a)};h.xf=!1;h.toString=function(){return this.Gc.toString()};function Zc(a){try{if("undefined"!==typeof window&&"undefined"!==typeof window[a]){var b=window[a];b.setItem("firebase:sentinel","cache");b.removeItem("firebase:sentinel");return new Yc(b)}}catch(c){}return new Xc}var $c=Zc("localStorage"),ad=Zc("sessionStorage");function bd(a,b,c,d,e){this.host=a.toLowerCase();this.domain=this.host.substr(this.host.indexOf(".")+1);this.mb=b;this.jc=c;this.
|
|
42
|
+
m.defaultEncoding);"function"!==typeof k&&(k=function(){});m.ended?e(this,k):d(this,m,a,k)&&(l=c(this,m,a,b,k));return l};require("_stream_duplex").prototype.write=a.prototype.write}})();function Rc(a,b){return a&&"object"===typeof a?(N(".sv"in a,"Unexpected leaf node or priority contents"),b[a[".sv"]]):a}function Sc(a,b){var c=new Tc;Uc(a,new O(""),function(a,e){c.qc(a,Vc(e,b))});return c}function Vc(a,b){var c=a.C().J(),c=Rc(c,b),d;if(a.L()){var e=Rc(a.Ea(),b);return e!==a.Ea()||c!==a.C().J()?new Wc(e,P(c)):a}d=a;c!==a.C().J()&&(d=d.ia(new Wc(c)));a.R(Q,function(a,c){var e=Vc(c,b);e!==c&&(d=d.W(a,e))});return d};function Xc(){this.zc={}}Xc.prototype.set=function(a,b){null==b?delete this.zc[a]:this.zc[a]=b};Xc.prototype.get=function(a){return y(this.zc,a)?this.zc[a]:null};Xc.prototype.remove=function(a){delete this.zc[a]};Xc.prototype.xf=!0;function Yc(a){this.Gc=a;this.Qd="firebase:"}h=Yc.prototype;h.set=function(a,b){null==b?this.Gc.removeItem(this.Qd+a):this.Gc.setItem(this.Qd+a,F(b))};h.get=function(a){a=this.Gc.getItem(this.Qd+a);return null==a?null:Pb(a)};h.remove=function(a){this.Gc.removeItem(this.Qd+a)};h.xf=!1;h.toString=function(){return this.Gc.toString()};function Zc(a){try{if("undefined"!==typeof window&&"undefined"!==typeof window[a]){var b=window[a];b.setItem("firebase:sentinel","cache");b.removeItem("firebase:sentinel");return new Yc(b)}}catch(c){}return new Xc}var $c=Zc("localStorage"),ad=Zc("sessionStorage");function bd(a,b,c,d,e){this.host=a.toLowerCase();this.domain=this.host.substr(this.host.indexOf(".")+1);this.mb=b;this.jc=c;this.kh=d;this.Pd=e||"";this.$a=$c.get("host:"+a)||this.host}function cd(a,b){b!==a.$a&&(a.$a=b,"s-"===a.$a.substr(0,2)&&$c.set("host:"+a.host,a.$a))}
|
|
43
43
|
function dd(a,b,c){N("string"===typeof b,"typeof type must == string");N("object"===typeof c,"typeof params must == object");if(b===ed)b=(a.mb?"wss://":"ws://")+a.$a+"/.ws?";else if(b===fd)b=(a.mb?"https://":"http://")+a.$a+"/.lp?";else throw Error("Unknown connection type: "+b);a.host!==a.$a&&(c.ns=a.jc);var d=[];v(c,function(a,b){d.push(b+"="+a)});return b+d.join("&")}bd.prototype.toString=function(){var a=(this.mb?"https://":"http://")+this.host;this.Pd&&(a+="<"+this.Pd+">");return a};var gd=function(){var a=1;return function(){return a++}}(),N=Ib,hd=Jb;function id(a){try{return(new Buffer(a,"base64")).toString("utf8")}catch(b){dc("base64Decode failed: ",b)}return null}function jd(a){var b=Mb(a);a=new Ja;a.update(b);var b=[],c=8*a.de;56>a.dc?a.update(a.Md,56-a.dc):a.update(a.Md,a.Xa-(a.dc-56));for(var d=a.Xa-1;56<=d;d--)a.le[d]=c&255,c/=256;Ka(a,a.le);for(d=c=0;5>d;d++)for(var e=24;0<=e;e-=8)b[c]=a.P[d]>>e&255,++c;return mb(b)}
|
|
44
44
|
function kd(a){for(var b="",c=0;c<arguments.length;c++)b=ea(arguments[c])?b+kd.apply(null,arguments[c]):"object"===typeof arguments[c]?b+F(arguments[c]):b+arguments[c],b+=" ";return b}var cc=null,ld=!0;
|
|
45
45
|
function md(a,b){Ib(!b||!0===a||!1===a,"Can't turn on custom loggers persistently.");!0===a?("undefined"!==typeof console&&("function"===typeof console.log?cc=u(console.log,console):"object"===typeof console.log&&(cc=function(a){console.log(a)})),b&&ad.set("logging_enabled",!0)):t(a)?cc=a:(cc=null,ad.remove("logging_enabled"))}function dc(a){!0===ld&&(ld=!1,null===cc&&!0===ad.get("logging_enabled")&&md(!0));if(cc){var b=kd.apply(null,arguments);cc(b)}}
|
|
46
46
|
function nd(a){return function(){dc(a,arguments)}}function od(a){if("undefined"!==typeof console){var b="FIREBASE INTERNAL ERROR: "+kd.apply(null,arguments);"undefined"!==typeof console.error?console.error(b):console.log(b)}}function pd(a){var b=kd.apply(null,arguments);throw Error("FIREBASE FATAL ERROR: "+b);}function R(a){if("undefined"!==typeof console){var b="FIREBASE WARNING: "+kd.apply(null,arguments);"undefined"!==typeof console.warn?console.warn(b):console.log(b)}}
|
|
47
47
|
function qd(a){var b="",c="",d="",e="",f=!0,g="https",k=443;if(q(a)){var m=a.indexOf("//");0<=m&&(g=a.substring(0,m-1),a=a.substring(m+2));m=a.indexOf("/");-1===m&&(m=a.length);b=a.substring(0,m);e="";a=a.substring(m).split("/");for(m=0;m<a.length;m++)if(0<a[m].length){var l=a[m];try{l=decodeURIComponent(l.replace(/\+/g," "))}catch(r){}e+="/"+l}a=b.split(".");3===a.length?(c=a[1],d=a[0].toLowerCase()):2===a.length&&(c=a[0]);m=b.indexOf(":");0<=m&&(f="https"===g||"wss"===g,k=b.substring(m+1),isFinite(k)&&
|
|
48
|
-
(k=String(k)),k=q(k)?/^\s*-?0x/i.test(k)?parseInt(k,16):parseInt(k,10):NaN)}return{host:b,port:k,domain:c,
|
|
48
|
+
(k=String(k)),k=q(k)?/^\s*-?0x/i.test(k)?parseInt(k,16):parseInt(k,10):NaN)}return{host:b,port:k,domain:c,fh:d,mb:f,scheme:g,oc:e}}function rd(a){return fa(a)&&(a!=a||a==Number.POSITIVE_INFINITY||a==Number.NEGATIVE_INFINITY)}function sd(a){a()}function wc(a,b){if(a===b)return 0;if("[MIN_NAME]"===a||"[MAX_NAME]"===b)return-1;if("[MIN_NAME]"===b||"[MAX_NAME]"===a)return 1;var c=td(a),d=td(b);return null!==c?null!==d?0==c-d?a.length-b.length:c-d:-1:null!==d?1:a<b?-1:1}
|
|
49
49
|
function ud(a,b){if(b&&a in b)return b[a];throw Error("Missing required key ("+a+") in object: "+F(b));}function vd(a){if("object"!==typeof a||null===a)return F(a);var b=[],c;for(c in a)b.push(c);b.sort();c="{";for(var d=0;d<b.length;d++)0!==d&&(c+=","),c+=F(b[d]),c+=":",c+=vd(a[b[d]]);return c+"}"}function wd(a,b){if(a.length<=b)return[a];for(var c=[],d=0;d<a.length;d+=b)d+b>a?c.push(a.substring(d,a.length)):c.push(a.substring(d,d+b));return c}
|
|
50
50
|
function xd(a,b){if(da(a))for(var c=0;c<a.length;++c)b(c,a[c]);else v(a,b)}
|
|
51
51
|
function yd(a){N(!rd(a),"Invalid JSON number");var b,c,d,e;0===a?(d=c=0,b=-Infinity===1/a?1:0):(b=0>a,a=Math.abs(a),a>=Math.pow(2,-1022)?(d=Math.min(Math.floor(Math.log(a)/Math.LN2),1023),c=d+1023,d=Math.round(a*Math.pow(2,52-d)-Math.pow(2,52))):(c=0,d=Math.round(a/Math.pow(2,-1074))));e=[];for(a=52;a;--a)e.push(d%2?1:0),d=Math.floor(d/2);for(a=11;a;--a)e.push(c%2?1:0),c=Math.floor(c/2);e.push(b?1:0);e.reverse();b=e.join("");c="";for(a=0;64>a;a+=8)d=parseInt(b.substr(a,8),2).toString(16),1===d.length&&
|
|
52
|
-
(d="0"+d),c+=d;return c.toLowerCase()}var zd=/^-?\d{1,10}$/;function td(a){return zd.test(a)&&(a=Number(a),-2147483648<=a&&2147483647>=a)?a:null}function ec(a){try{a()}catch(b){setTimeout(function(){R("Exception was thrown by user callback.",b.stack||"");throw b;},Math.floor(0))}}function S(a,b){if(t(a)){var c=Array.prototype.slice.call(arguments,1).slice();ec(function(){a.apply(null,c)})}};function Ad(a){var b={},c={},d={},e="";try{var f=a.split("."),b=Pb(id(f[0])||""),c=Pb(id(f[1])||""),e=f[2],d=c.d||{};delete c.d}catch(g){}return{
|
|
52
|
+
(d="0"+d),c+=d;return c.toLowerCase()}var zd=/^-?\d{1,10}$/;function td(a){return zd.test(a)&&(a=Number(a),-2147483648<=a&&2147483647>=a)?a:null}function ec(a){try{a()}catch(b){setTimeout(function(){R("Exception was thrown by user callback.",b.stack||"");throw b;},Math.floor(0))}}function S(a,b){if(t(a)){var c=Array.prototype.slice.call(arguments,1).slice();ec(function(){a.apply(null,c)})}};function Ad(a){var b={},c={},d={},e="";try{var f=a.split("."),b=Pb(id(f[0])||""),c=Pb(id(f[1])||""),e=f[2],d=c.d||{};delete c.d}catch(g){}return{ph:b,Dc:c,data:d,bh:e}}function Bd(a){a=Ad(a).Dc;return"object"===typeof a&&a.hasOwnProperty("iat")?z(a,"iat"):null}function Cd(a){a=Ad(a);var b=a.Dc;return!!a.bh&&!!b&&"object"===typeof b&&b.hasOwnProperty("iat")};function Dd(a){this.Y=a;this.g=a.n.g}function Ed(a,b,c,d){var e=[],f=[];Na(b,function(b){"child_changed"===b.type&&a.g.Ad(b.Le,b.Ma)&&f.push(new H("child_moved",b.Ma,b.Ya))});Fd(a,e,"child_removed",b,d,c);Fd(a,e,"child_added",b,d,c);Fd(a,e,"child_moved",f,d,c);Fd(a,e,"child_changed",b,d,c);Fd(a,e,gc,b,d,c);return e}function Fd(a,b,c,d,e,f){d=Oa(d,function(a){return a.type===c});Va(d,u(a.qg,a));Na(d,function(c){var d=Gd(a,c,f);Na(e,function(e){e.Of(c.type)&&b.push(e.createEvent(d,a.Y))})})}
|
|
53
53
|
function Gd(a,b,c){"value"!==b.type&&"child_removed"!==b.type&&(b.Rd=c.sf(b.Ya,b.Ma,a.g));return b}Dd.prototype.qg=function(a,b){if(null==a.Ya||null==b.Ya)throw hd("Should only compare child_ events.");return this.g.compare(new K(a.Ya,a.Ma),new K(b.Ya,b.Ma))};function Hd(){this.hb={}}
|
|
54
54
|
function Id(a,b){var c=b.type,d=b.Ya;N("child_added"==c||"child_changed"==c||"child_removed"==c,"Only child changes supported for tracking");N(".priority"!==d,"Only non-priority child changes can be tracked.");var e=z(a.hb,d);if(e){var f=e.type;if("child_added"==c&&"child_removed"==f)a.hb[d]=new H("child_changed",b.Ma,d,e.Ma);else if("child_removed"==c&&"child_added"==f)delete a.hb[d];else if("child_removed"==c&&"child_changed"==f)a.hb[d]=new H("child_removed",e.Le,d);else if("child_changed"==c&&
|
|
55
55
|
"child_added"==f)a.hb[d]=new H("child_added",b.Ma,d);else if("child_changed"==c&&"child_changed"==f)a.hb[d]=new H("child_changed",b.Ma,d,e.Le);else throw hd("Illegal combination of changes: "+b+" occurred after "+e);}else a.hb[d]=b};function Jd(a){this.g=a}h=Jd.prototype;h.H=function(a,b,c,d,e,f){N(a.Kc(this.g),"A node must be indexed if only a child is updated");e=a.T(b);if(e.S(d).ea(c.S(d))&&e.e()==c.e())return a;null!=f&&(c.e()?a.Fa(b)?Id(f,new H("child_removed",e,b)):N(a.L(),"A child remove without an old child only makes sense on a leaf node"):e.e()?Id(f,new H("child_added",c,b)):Id(f,new H("child_changed",c,b,e)));return a.L()&&c.e()?a:a.W(b,c).nb(this.g)};
|
|
@@ -72,7 +72,7 @@ h.Qc=function(a,b){var c=P(a),c=G.H(this.fc,c);return new K(b,c)};h.Rc=function(
|
|
|
72
72
|
h.Qc=function(a,b){var c=P(a);return new K(b,new Wc("[PRIORITY-POST]",c))};h.toString=function(){return".priority"};var Q=new ve;function we(){}ka(we,qe);h=we.prototype;h.compare=function(a,b){return wc(a.name,b.name)};h.Jc=function(){throw hd("KeyIndex.isDefinedOn not expected to be called.");};h.Ad=function(){return!1};h.Uc=function(){return se};h.Rc=function(){return new K("[MAX_NAME]",G)};h.Qc=function(a){N(q(a),"KeyIndex indexValue must always be a string.");return new K(a,G)};h.toString=function(){return".key"};
|
|
73
73
|
var pe=new we;function xe(){}ka(xe,qe);h=xe.prototype;h.compare=function(a,b){var c=a.U.Ec(b.U);return 0===c?wc(a.name,b.name):c};h.Jc=function(){return!0};h.Ad=function(a,b){return!a.ea(b)};h.Uc=function(){return se};h.Rc=function(){return ye};h.Qc=function(a,b){var c=P(a);return new K(b,c)};h.toString=function(){return".value"};var ze=new xe;function Ae(){this.Wb=this.ra=this.Nb=this.oa=this.la=!1;this.ma=0;this.Pb="";this.hc=null;this.zb="";this.ec=null;this.xb="";this.g=Q}var Be=new Ae;function Rd(a){return""===a.Pb?a.oa:"l"===a.Pb}function Nd(a){N(a.oa,"Only valid if start has been set");return a.hc}function Ld(a){N(a.oa,"Only valid if start has been set");return a.Nb?a.zb:"[MIN_NAME]"}function Pd(a){N(a.ra,"Only valid if end has been set");return a.ec}
|
|
74
74
|
function Od(a){N(a.ra,"Only valid if end has been set");return a.Wb?a.xb:"[MAX_NAME]"}function Ce(a){var b=new Ae;b.la=a.la;b.ma=a.ma;b.oa=a.oa;b.hc=a.hc;b.Nb=a.Nb;b.zb=a.zb;b.ra=a.ra;b.ec=a.ec;b.Wb=a.Wb;b.xb=a.xb;b.g=a.g;return b}h=Ae.prototype;h.He=function(a){var b=Ce(this);b.la=!0;b.ma=a;b.Pb="";return b};h.Ie=function(a){var b=Ce(this);b.la=!0;b.ma=a;b.Pb="l";return b};h.Je=function(a){var b=Ce(this);b.la=!0;b.ma=a;b.Pb="r";return b};
|
|
75
|
-
h.$d=function(a,b){var c=Ce(this);c.oa=!0;p(a)||(a=null);c.hc=a;null!=b?(c.Nb=!0,c.zb=b):(c.Nb=!1,c.zb="");return c};h.sd=function(a,b){var c=Ce(this);c.ra=!0;p(a)||(a=null);c.ec=a;p(b)?(c.Wb=!0,c.xb=b):(c.
|
|
75
|
+
h.$d=function(a,b){var c=Ce(this);c.oa=!0;p(a)||(a=null);c.hc=a;null!=b?(c.Nb=!0,c.zb=b):(c.Nb=!1,c.zb="");return c};h.sd=function(a,b){var c=Ce(this);c.ra=!0;p(a)||(a=null);c.ec=a;p(b)?(c.Wb=!0,c.xb=b):(c.rh=!1,c.xb="");return c};function De(a,b){var c=Ce(a);c.g=b;return c}function Ee(a){var b={};a.oa&&(b.sp=a.hc,a.Nb&&(b.sn=a.zb));a.ra&&(b.ep=a.ec,a.Wb&&(b.en=a.xb));if(a.la){b.l=a.ma;var c=a.Pb;""===c&&(c=Rd(a)?"l":"r");b.vf=c}a.g!==Q&&(b.i=a.g.toString());return b}
|
|
76
76
|
function Fe(a){return!(a.oa||a.ra||a.la)}function Ge(a){return Fe(a)&&a.g==Q}function He(a){var b={};if(Ge(a))return b;var c;a.g===Q?c="$priority":a.g===ze?c="$value":a.g===pe?c="$key":(N(a.g instanceof te,"Unrecognized index type!"),c=a.g.toString());b.orderBy=F(c);a.oa&&(b.startAt=F(a.hc),a.Nb&&(b.startAt+=","+F(a.zb)));a.ra&&(b.endAt=F(a.ec),a.Wb&&(b.endAt+=","+F(a.xb)));a.la&&(Rd(a)?b.limitToFirst=a.ma:b.limitToLast=a.ma);return b}h.toString=function(){return F(Ee(this))};function Ie(a,b){this.Bd=a;this.gc=b}Ie.prototype.get=function(a){var b=z(this.Bd,a);if(!b)throw Error("No index defined for "+a);return b===re?null:b};function Je(a,b,c){var d=ma(a.Bd,function(d,f){var g=z(a.gc,f);N(g,"Missing index implementation for "+f);if(d===re){if(g.Jc(b.U)){for(var k=[],m=c.$b(uc),l=Gc(m);l;)l.name!=b.name&&k.push(l),l=Gc(m);k.push(b);return Ke(k,Td(g))}return re}g=c.get(b.name);k=d;g&&(k=k.remove(new K(b.name,g)));return k.Ra(b,b.U)});return new Ie(d,a.gc)}
|
|
77
77
|
function Le(a,b,c){var d=ma(a.Bd,function(a){if(a===re)return a;var d=c.get(b.name);return d?a.remove(new K(b.name,d)):a});return new Ie(d,a.gc)}var Me=new Ie({".priority":re},{".priority":Q});function Wc(a,b){this.B=a;N(p(this.B)&&null!==this.B,"LeafNode shouldn't be created with null/undefined value.");this.ca=b||G;Ne(this.ca);this.Eb=null}var Oe=["object","boolean","number","string"];h=Wc.prototype;h.L=function(){return!0};h.C=function(){return this.ca};h.ia=function(a){return new Wc(this.B,a)};h.T=function(a){return".priority"===a?this.ca:G};h.S=function(a){return a.e()?this:".priority"===I(a)?this.ca:G};h.Fa=function(){return!1};h.sf=function(){return null};
|
|
78
78
|
h.W=function(a,b){return".priority"===a?this.ia(b):b.e()&&".priority"!==a?this:G.W(a,b).ia(this.ca)};h.H=function(a,b){var c=I(a);if(null===c)return b;if(b.e()&&".priority"!==c)return this;N(".priority"!==c||1===je(a),".priority must be the last token in a path");return this.W(c,G.H(M(a),b))};h.e=function(){return!1};h.Fb=function(){return 0};h.R=function(){return!1};h.J=function(a){return a&&!this.C().e()?{".value":this.Ea(),".priority":this.C().J()}:this.Ea()};
|
|
@@ -131,8 +131,8 @@ function pg(a,b){og(a,1,b);if(!bg.test(b))throw Error(D(a,1,!1)+"'"+b+"' is not
|
|
|
131
131
|
function ug(a,b){if(b.e())return a.B=null,a.m=null,!0;if(null!==a.B){if(a.B.L())return!1;var c=a.B;a.B=null;c.R(Q,function(b,c){a.qc(new O(b),c)});return ug(a,b)}return null!==a.m?(c=I(b),b=M(b),a.m.contains(c)&&ug(a.m.get(c),b)&&a.m.remove(c),a.m.e()?(a.m=null,!0):!1):!0}function Uc(a,b,c){null!==a.B?c(b,a.B):a.R(function(a,e){var f=new O(b.toString()+"/"+a);Uc(e,f,c)})}Tc.prototype.R=function(a){null!==this.m&&tg(this.m,function(b,c){a(b,c)})};var vg="auth.firebase.com";function wg(a,b,c){this.nd=a||{};this.ee=b||{};this.eb=c||{};this.nd.remember||(this.nd.remember="default")}var xg=["remember","redirectTo"];function yg(a){var b={},c={};Db(a||{},function(a,e){0<=Ma(xg,a)?b[a]=e:c[a]=e});return new wg(b,{},c)};function zg(a,b){this.Re=["session",a.Pd,a.jc].join(":");this.be=b}zg.prototype.set=function(a,b){if(!b)if(this.be.length)b=this.be[0];else throw Error("fb.login.SessionManager : No storage options available!");b.set(this.Re,a)};zg.prototype.get=function(){var a=Pa(this.be,u(this.Bg,this)),a=Oa(a,function(a){return null!==a});Va(a,function(a,c){return Bd(c.token)-Bd(a.token)});return 0<a.length?a.shift():null};zg.prototype.Bg=function(a){try{var b=a.get(this.Re);if(b&&b.token)return b}catch(c){}return null};
|
|
132
132
|
zg.prototype.clear=function(){var a=this;Na(this.be,function(b){b.remove(a.Re)})};function Ag(){return"undefined"!==typeof navigator&&"string"===typeof navigator.userAgent?navigator.userAgent:""}function Bg(){var a=Ag();if(""===a)return!1;if("Microsoft Internet Explorer"===navigator.appName){if((a=a.match(/MSIE ([0-9]{1,}[\.0-9]{0,})/))&&1<a.length)return 8<=parseFloat(a[1])}else if(-1<a.indexOf("Trident")&&(a=a.match(/rv:([0-9]{2,2}[\.0-9]{0,})/))&&1<a.length)return 8<=parseFloat(a[1]);return!1};function Cg(){var a=window.opener.frames,b;for(b=a.length-1;0<=b;b--)try{if(a[b].location.protocol===window.location.protocol&&a[b].location.host===window.location.host&&"__winchan_relay_frame"===a[b].name)return a[b]}catch(c){}return null}function Dg(a,b,c){a.attachEvent?a.attachEvent("on"+b,c):a.addEventListener&&a.addEventListener(b,c,!1)}function Eg(a,b,c){a.detachEvent?a.detachEvent("on"+b,c):a.removeEventListener&&a.removeEventListener(b,c,!1)}
|
|
133
133
|
function Fg(a){/^https?:\/\//.test(a)||(a=window.location.href);var b=/^(https?:\/\/[\-_a-zA-Z\.0-9:]+)/.exec(a);return b?b[1]:a}function Gg(a){var b="";try{a=a.replace(/.*\?/,"");var c=Hb(a);c&&y(c,"__firebase_request_key")&&(b=z(c,"__firebase_request_key"))}catch(d){}return b}function Hg(){try{var a=document.location.hash.replace(/&__firebase_request_key=([a-zA-z0-9]*)/,""),a=a.replace(/\?$/,""),a=a.replace(/^#+$/,"");document.location.hash=a}catch(b){}}
|
|
134
|
-
function Ig(){var a=qd(vg);return a.scheme+"://"+a.host+"/v2"}function Jg(a){return Ig()+"/"+a+"/auth/channel"};function Kg(a){var b=this;this.gb=a;this.ce="*";Bg()?this.Sc=this.zd=Cg():(this.Sc=window.opener,this.zd=window);if(!b.Sc)throw"Unable to find relay frame";Dg(this.zd,"message",u(this.lc,this));Dg(this.zd,"message",u(this.Ef,this));try{Lg(this,{a:"ready"})}catch(c){Dg(this.Sc,"load",function(){Lg(b,{a:"ready"})})}Dg(window,"unload",u(this.
|
|
135
|
-
Kg.prototype.lc=function(a){var b=this,c;try{c=Pb(a.data)}catch(d){}c&&"request"===c.a&&(Eg(window,"message",this.lc),this.ce=a.origin,this.gb&&setTimeout(function(){b.gb(b.ce,c.d,function(a,c){b.lg=!c;b.gb=void 0;Lg(b,{a:"response",d:a,forceKeepWindowOpen:c})})},0))};Kg.prototype.
|
|
134
|
+
function Ig(){var a=qd(vg);return a.scheme+"://"+a.host+"/v2"}function Jg(a){return Ig()+"/"+a+"/auth/channel"};function Kg(a){var b=this;this.gb=a;this.ce="*";Bg()?this.Sc=this.zd=Cg():(this.Sc=window.opener,this.zd=window);if(!b.Sc)throw"Unable to find relay frame";Dg(this.zd,"message",u(this.lc,this));Dg(this.zd,"message",u(this.Ef,this));try{Lg(this,{a:"ready"})}catch(c){Dg(this.Sc,"load",function(){Lg(b,{a:"ready"})})}Dg(window,"unload",u(this.Mg,this))}function Lg(a,b){b=F(b);Bg()?a.Sc.doPost(b,a.ce):a.Sc.postMessage(b,a.ce)}
|
|
135
|
+
Kg.prototype.lc=function(a){var b=this,c;try{c=Pb(a.data)}catch(d){}c&&"request"===c.a&&(Eg(window,"message",this.lc),this.ce=a.origin,this.gb&&setTimeout(function(){b.gb(b.ce,c.d,function(a,c){b.lg=!c;b.gb=void 0;Lg(b,{a:"response",d:a,forceKeepWindowOpen:c})})},0))};Kg.prototype.Mg=function(){try{Eg(this.zd,"message",this.Ef)}catch(a){}this.gb&&(Lg(this,{a:"error",d:"unknown closed window"}),this.gb=void 0);try{window.close()}catch(b){}};Kg.prototype.Ef=function(a){if(this.lg&&"die"===a.data)try{window.close()}catch(b){}};function Mg(a){this.sc=Fa()+Fa()+Fa();this.Jf=a}Mg.prototype.open=function(a,b){ad.set("redirect_request_id",this.sc);ad.set("redirect_request_id",this.sc);b.requestId=this.sc;b.redirectTo=b.redirectTo||window.location.href;a+=(/\?/.test(a)?"":"?")+Gb(b);window.location=a};Mg.isAvailable=function(){return!1};Mg.prototype.Ub=function(){return"redirect"};var Ng={NETWORK_ERROR:"Unable to contact the Firebase server.",SERVER_ERROR:"An unknown server error occurred.",TRANSPORT_UNAVAILABLE:"There are no login transports available for the requested method.",REQUEST_INTERRUPTED:"The browser redirected the page before the login request could complete.",USER_CANCELLED:"The user cancelled authentication."};function T(a){var b=Error(z(Ng,a),a);b.code=a;return b};function Og(a){var b;(b=!a.window_features)||(b=Ag(),b=-1!==b.indexOf("Fennec/")||-1!==b.indexOf("Firefox/")&&-1!==b.indexOf("Android"));b&&(a.window_features=void 0);a.window_name||(a.window_name="_blank");this.options=a}
|
|
136
136
|
Og.prototype.open=function(a,b,c){function d(a){g&&(document.body.removeChild(g),g=void 0);r&&(r=clearInterval(r));Eg(window,"message",e);Eg(window,"unload",d);if(l&&!a)try{l.close()}catch(b){k.postMessage("die",m)}l=k=void 0}function e(a){if(a.origin===m)try{var b=Pb(a.data);"ready"===b.a?k.postMessage(x,m):"error"===b.a?(d(!1),c&&(c(b.d),c=null)):"response"===b.a&&(d(b.forceKeepWindowOpen),c&&(c(null,b.d),c=null))}catch(e){}}var f=Bg(),g,k;if(!this.options.relay_url)return c(Error("invalid arguments: origin of url and relay_url must match"));
|
|
137
137
|
var m=Fg(a);if(m!==Fg(this.options.relay_url))c&&setTimeout(function(){c(Error("invalid arguments: origin of url and relay_url must match"))},0);else{f&&(g=document.createElement("iframe"),g.setAttribute("src",this.options.relay_url),g.style.display="none",g.setAttribute("name","__winchan_relay_frame"),document.body.appendChild(g),k=g.contentWindow);a+=(/\?/.test(a)?"":"?")+Gb(b);var l=window.open(a,this.options.window_name,this.options.window_features);k||(k=l);var r=setInterval(function(){l&&l.closed&&
|
|
138
138
|
(d(!1),c&&(c(T("USER_CANCELLED")),c=null))},500),x=F({a:"request",d:b});Dg(window,"unload",d);Dg(window,"message",e)}};Og.isAvailable=function(){return!1};Og.prototype.Ub=function(){return"popup"};function Pg(a){a.method||(a.method="GET");a.headers||(a.headers={});a.headers.content_type||(a.headers.content_type="application/json");a.headers.content_type=a.headers.content_type.toLowerCase();this.options=a}
|
|
@@ -145,29 +145,29 @@ d),g.close(),a=new wg(null,null,{requestId:e.sc,requestKey:a}),e.Jf.requestWithC
|
|
|
145
145
|
Sg.prototype.open=function(a,b,c){function d(){c&&(c(T("REQUEST_INTERRUPTED")),c=null)}function e(){setTimeout(function(){window.__firebase_auth_jsonp[f]=void 0;va(window.__firebase_auth_jsonp)&&(window.__firebase_auth_jsonp=void 0);try{var a=document.getElementById(f);a&&a.parentNode.removeChild(a)}catch(b){}},1);Eg(window,"beforeunload",d)}var f="fn"+(new Date).getTime()+Math.floor(99999*Math.random());b[this.options.callback_parameter]="__firebase_auth_jsonp."+f;a+=(/\?/.test(a)?"":"?")+Gb(b);
|
|
146
146
|
Dg(window,"beforeunload",d);window.__firebase_auth_jsonp[f]=function(a){c&&(c(null,a),c=null);e()};Tg(f,a,c)};
|
|
147
147
|
function Tg(a,b,c){setTimeout(function(){try{var d=document.createElement("script");d.type="text/javascript";d.id=a;d.async=!0;d.src=b;d.onerror=function(){var b=document.getElementById(a);null!==b&&b.parentNode.removeChild(b);c&&c(T("NETWORK_ERROR"))};var e=document.getElementsByTagName("head");(e&&0!=e.length?e[0]:document.documentElement).appendChild(d)}catch(f){c&&c(T("NETWORK_ERROR"))}},0)}Sg.isAvailable=function(){return"undefined"!==typeof document&&null!=document.createElement};
|
|
148
|
-
Sg.prototype.Ub=function(){return"json"};function Ug(a,b,c,d){df.call(this,["auth_status"]);this.G=a;this.ef=b;this.
|
|
149
|
-
function $g(a,b,c,d,e,f){"firebaseio-demo.com"===a.G.domain&&R("Firebase authentication is not supported on demo Firebases (*.firebaseio-demo.com). To secure your Firebase, create a production Firebase at https://www.firebase.com.");a.ef(b,function(f,k){Yg(a,f,k,!0,b,c,d||{},e)},function(b,c){Zg(a,"auth()",b,c,f)})}function ah(a,b){a.vc.clear();Xg(a,null);a.
|
|
148
|
+
Sg.prototype.Ub=function(){return"json"};function Ug(a,b,c,d){df.call(this,["auth_status"]);this.G=a;this.ef=b;this.ih=c;this.Me=d;this.vc=new zg(a,[$c,ad]);this.ob=null;this.Te=!1;Vg(this)}ka(Ug,df);h=Ug.prototype;h.xe=function(){return this.ob||null};function Vg(a){ad.get("redirect_request_id")&&Wg(a);var b=a.vc.get();b&&b.token?(Xg(a,b),a.ef(b.token,function(c,d){Yg(a,c,d,!1,b.token,b)},function(b,d){Zg(a,"resumeSession()",b,d)})):Xg(a,null)}
|
|
149
|
+
function $g(a,b,c,d,e,f){"firebaseio-demo.com"===a.G.domain&&R("Firebase authentication is not supported on demo Firebases (*.firebaseio-demo.com). To secure your Firebase, create a production Firebase at https://www.firebase.com.");a.ef(b,function(f,k){Yg(a,f,k,!0,b,c,d||{},e)},function(b,c){Zg(a,"auth()",b,c,f)})}function ah(a,b){a.vc.clear();Xg(a,null);a.ih(function(a,d){if("ok"===a)S(b,null);else{var e=(a||"error").toUpperCase(),f=e;d&&(f+=": "+d);f=Error(f);f.code=e;S(b,f)}})}
|
|
150
150
|
function Yg(a,b,c,d,e,f,g,k){"ok"===b?(d&&(b=c.auth,f.auth=b,f.expires=c.expires,f.token=Cd(e)?e:"",c=null,b&&y(b,"uid")?c=z(b,"uid"):y(f,"uid")&&(c=z(f,"uid")),f.uid=c,c="custom",b&&y(b,"provider")?c=z(b,"provider"):y(f,"provider")&&(c=z(f,"provider")),f.provider=c,a.vc.clear(),Cd(e)&&(g=g||{},c=$c,"sessionOnly"===g.remember&&(c=ad),"none"!==g.remember&&a.vc.set(f,c)),Xg(a,f)),S(k,null,f)):(a.vc.clear(),Xg(a,null),f=a=(b||"error").toUpperCase(),c&&(f+=": "+c),f=Error(f),f.code=a,S(k,f))}
|
|
151
151
|
function Zg(a,b,c,d,e){R(b+" was canceled: "+d);a.vc.clear();Xg(a,null);a=Error(d);a.code=c.toUpperCase();S(e,a)}function bh(a,b,c,d,e){ch(a);c=new wg(d||{},{},c||{});dh(a,[Pg],"/auth/"+b,c,e)}
|
|
152
|
-
function eh(a,b,c,d){ch(a);var e=[Og,Rg];c=yg(c);"anonymous"===b||"password"===b?setTimeout(function(){S(d,T("TRANSPORT_UNAVAILABLE"))},0):(c.ee.window_features="menubar=yes,modal=yes,alwaysRaised=yeslocation=yes,resizable=yes,scrollbars=yes,status=yes,height=625,width=
|
|
153
|
-
function Wg(a){var b=ad.get("redirect_request_id");if(b){var c=ad.get("redirect_client_options");ad.remove("redirect_request_id");ad.remove("redirect_client_options");var d=[Qg,Sg],b={requestId:b,requestKey:Gg(document.location.hash)},c=new wg(c,{},b);a.Te=!0;Hg();dh(a,d,"/auth/session",c,function(){this.Te=!1}.bind(a))}}h.re=function(a,b){ch(this);var c=yg(a);c.eb._method="POST";this.tc("/users",c,function(a,c){a?S(b,a):S(b,a,c)})};
|
|
152
|
+
function eh(a,b,c,d){ch(a);var e=[Og,Rg];c=yg(c);var f=625;"anonymous"===b||"password"===b?setTimeout(function(){S(d,T("TRANSPORT_UNAVAILABLE"))},0):("github"===b&&(f=1025),c.ee.window_features="menubar=yes,modal=yes,alwaysRaised=yeslocation=yes,resizable=yes,scrollbars=yes,status=yes,height=625,width="+f+",top="+("object"===typeof screen?.5*(screen.height-625):0)+",left="+("object"===typeof screen?.5*(screen.width-f):0),c.ee.relay_url=Jg(a.G.jc),c.ee.requestWithCredential=u(a.tc,a),dh(a,e,"/auth/"+
|
|
153
|
+
b,c,d))}function Wg(a){var b=ad.get("redirect_request_id");if(b){var c=ad.get("redirect_client_options");ad.remove("redirect_request_id");ad.remove("redirect_client_options");var d=[Qg,Sg],b={requestId:b,requestKey:Gg(document.location.hash)},c=new wg(c,{},b);a.Te=!0;Hg();dh(a,d,"/auth/session",c,function(){this.Te=!1}.bind(a))}}h.re=function(a,b){ch(this);var c=yg(a);c.eb._method="POST";this.tc("/users",c,function(a,c){a?S(b,a):S(b,a,c)})};
|
|
154
154
|
h.Ue=function(a,b){var c=this;ch(this);var d="/users/"+encodeURIComponent(a.email),e=yg(a);e.eb._method="DELETE";this.tc(d,e,function(a,d){!a&&d&&d.uid&&c.ob&&c.ob.uid&&c.ob.uid===d.uid&&ah(c);S(b,a)})};h.oe=function(a,b){ch(this);var c="/users/"+encodeURIComponent(a.email)+"/password",d=yg(a);d.eb._method="PUT";d.eb.password=a.newPassword;this.tc(c,d,function(a){S(b,a)})};
|
|
155
155
|
h.ne=function(a,b){ch(this);var c="/users/"+encodeURIComponent(a.oldEmail)+"/email",d=yg(a);d.eb._method="PUT";d.eb.email=a.newEmail;d.eb.password=a.password;this.tc(c,d,function(a){S(b,a)})};h.We=function(a,b){ch(this);var c="/users/"+encodeURIComponent(a.email)+"/password",d=yg(a);d.eb._method="POST";this.tc(c,d,function(a){S(b,a)})};h.tc=function(a,b,c){fh(this,[Pg],a,b,c)};
|
|
156
156
|
function dh(a,b,c,d,e){fh(a,b,c,d,function(b,c){!b&&c&&c.token&&c.uid?$g(a,c.token,c,d.nd,function(a,b){a?S(e,a):S(e,null,b)}):S(e,b||T("UNKNOWN_ERROR"))})}
|
|
157
157
|
function fh(a,b,c,d,e){b=Oa(b,function(a){return"function"===typeof a.isAvailable&&a.isAvailable()});0===b.length?setTimeout(function(){S(e,T("TRANSPORT_UNAVAILABLE"))},0):(b=new (b.shift())(d.ee),d=Eb(d.eb),d.v="node-"+Cb,d.transport=b.Ub(),d.suppress_status_codes=!0,a=Ig()+"/"+a.G.jc+c,b.open(a,d,function(a,b){if(a)S(e,a);else if(b&&b.error){var c=Error(b.error.message);c.code=b.error.code;c.details=b.error.details;S(e,c)}else S(e,null,b)}))}
|
|
158
158
|
function Xg(a,b){var c=null!==a.ob||null!==b;a.ob=b;c&&a.fe("auth_status",b);a.Me(null!==b)}h.Ae=function(a){N("auth_status"===a,'initial event must be of type "auth_status"');return this.Te?null:[this.ob]};function ch(a){var b=a.G;if("firebaseio.com"!==b.domain&&"firebaseio-demo.com"!==b.domain&&"auth.firebase.com"===vg)throw Error("This custom Firebase server ('"+a.G.domain+"') does not support delegated login.");};var ed="websocket",fd="long_polling";function gh(a){this.lc=a;this.Od=[];this.Vb=0;this.pe=-1;this.Hb=null}function hh(a,b,c){a.pe=b;a.Hb=c;a.pe<a.Vb&&(a.Hb(),a.Hb=null)}function ih(a,b,c){for(a.Od[b]=c;a.Od[a.Vb];){var d=a.Od[a.Vb];delete a.Od[a.Vb];for(var e=0;e<d.length;++e)if(d[e]){var f=a;ec(function(){f.lc(d[e])})}if(a.Vb===a.pe){a.Hb&&(clearTimeout(a.Hb),a.Hb(),a.Hb=null);break}a.Vb++}};function jh(a,b,c,d){this.qe=a;this.f=nd(a);this.pb=this.qb=0;this.Wa=sc(b);this.Wf=c;this.Ic=!1;this.Db=d;this.hd=function(a){return dd(b,fd,a)}}var kh,lh;
|
|
159
|
-
jh.prototype.open=function(a,b){this.jf=0;this.na=b;this.Df=new gh(a);this.Bb=!1;var c=this;this.sb=setTimeout(function(){c.f("Timed out trying to connect.");c.ab();c.sb=null},Math.floor(3E4));sd(function(){if(!c.Bb){c.Va=new mh(function(a,b,d,k,m){nh(c,arguments);if(c.Va)if(c.sb&&(clearTimeout(c.sb),c.sb=null),c.Ic=!0,"start"==a)c.id=b,c.
|
|
160
|
-
ih(c.Df,a,b)},function(){c.ab()},c.hd);var a={start:"t"};a.ser=Math.floor(1E8*Math.random());c.Va.
|
|
161
|
-
jh.isAvailable=function(){return kh||!lh&&"undefined"!==typeof document&&null!=document.createElement&&!("object"===typeof window&&window.chrome&&window.chrome.extension&&!/^chrome/.test(window.location.href))&&!("object"===typeof Windows&&"object"===typeof Windows.
|
|
162
|
-
h.ab=function(){this.Bb||(this.f("Longpoll is closing itself"),this.cd(),this.na&&(this.na(this.Ic),this.na=null))};h.close=function(){this.Bb||(this.f("Longpoll is being closed."),this.cd())};h.send=function(a){a=F(a);this.qb+=a.length;pc(this.Wa,"bytes_sent",a.length);a=Mb(a);a=mb(a,!0);a=wd(a,1840);for(var b=0;b<a.length;b++){var c=this.Va;c.$c.push({
|
|
163
|
-
function mh(a,b,c,d){this.hd=d;this.jb=c;this.Qe=new sg;this.$c=[];this.se=Math.floor(1E8*Math.random());this.Sf=!0;this.pg=a;this.
|
|
164
|
-
function ph(a){if(a.ke&&a.Sf&&a.Qe.count()<(0<a.$c.length?2:1)){a.se++;var b={};b.id=a.Ke;b.pw=a.Cf;b.ser=a.se;for(var b=a.hd(b),c="",d=0;0<a.$c.length;)if(1870>=a.$c[0].lf.length+30+c.length){var e=a.$c.shift(),c=c+"&seg"+d+"="+e.
|
|
165
|
-
function qh(a,b){th||(th=require("request"));th(a,function(c,d,e){if(c)throw"Rest request for "+a.url+" failed.";b&&b(e)})}function sh(a,b,c){qh({url:b,
|
|
166
|
-
wh.prototype.open=function(a,b){this.jb=b;this.
|
|
159
|
+
jh.prototype.open=function(a,b){this.jf=0;this.na=b;this.Df=new gh(a);this.Bb=!1;var c=this;this.sb=setTimeout(function(){c.f("Timed out trying to connect.");c.ab();c.sb=null},Math.floor(3E4));sd(function(){if(!c.Bb){c.Va=new mh(function(a,b,d,k,m){nh(c,arguments);if(c.Va)if(c.sb&&(clearTimeout(c.sb),c.sb=null),c.Ic=!0,"start"==a)c.id=b,c.Tg=d;else if("close"===a)b?(c.Va.Sf=!1,hh(c.Df,b,function(){c.ab()})):c.ab();else throw Error("Unrecognized command received: "+a);},function(a,b){nh(c,arguments);
|
|
160
|
+
ih(c.Df,a,b)},function(){c.ab()},c.hd);var a={start:"t"};a.ser=Math.floor(1E8*Math.random());c.Va.jh&&(a.cb=c.Va.jh);a.v="5";c.Wf&&(a.s=c.Wf);c.Db&&(a.ls=c.Db);a=c.hd(a);c.f("Connecting via long-poll to "+a);oh(c.Va,a,function(){})}})};jh.prototype.start=function(){var a=this.Va,b=this.Tg;a.Ke=this.id;a.Cf=b;for(a.ke=!0;ph(a););};
|
|
161
|
+
jh.isAvailable=function(){return kh||!lh&&"undefined"!==typeof document&&null!=document.createElement&&!("object"===typeof window&&window.chrome&&window.chrome.extension&&!/^chrome/.test(window.location.href))&&!("object"===typeof Windows&&"object"===typeof Windows.lh)&&!1};h=jh.prototype;h.Ed=function(){};h.cd=function(){this.Bb=!0;this.Va&&(this.Va.close(),this.Va=null);this.Bf&&(document.body.removeChild(this.Bf),this.Bf=null);this.sb&&(clearTimeout(this.sb),this.sb=null)};
|
|
162
|
+
h.ab=function(){this.Bb||(this.f("Longpoll is closing itself"),this.cd(),this.na&&(this.na(this.Ic),this.na=null))};h.close=function(){this.Bb||(this.f("Longpoll is being closed."),this.cd())};h.send=function(a){a=F(a);this.qb+=a.length;pc(this.Wa,"bytes_sent",a.length);a=Mb(a);a=mb(a,!0);a=wd(a,1840);for(var b=0;b<a.length;b++){var c=this.Va;c.$c.push({Yg:this.jf,hh:a.length,lf:a[b]});c.ke&&ph(c);this.jf++}};function nh(a,b){var c=F(b).length;a.pb+=c;pc(a.Wa,"bytes_received",c)}
|
|
163
|
+
function mh(a,b,c,d){this.hd=d;this.jb=c;this.Qe=new sg;this.$c=[];this.se=Math.floor(1E8*Math.random());this.Sf=!0;this.pg=a;this.Kg=b}mh.prototype.close=function(){this.ke=!1;if(this.Gd){this.Gd.nh.body.innerHTML="";var a=this;setTimeout(function(){null!==a.Gd&&(document.body.removeChild(a.Gd),a.Gd=null)},Math.floor(0))}if(this.Ke){var b={disconn:"t"};b.id=this.Ke;b.pw=this.Cf;b=this.hd(b);qh(b)}if(b=this.jb)this.jb=null,b()};
|
|
164
|
+
function ph(a){if(a.ke&&a.Sf&&a.Qe.count()<(0<a.$c.length?2:1)){a.se++;var b={};b.id=a.Ke;b.pw=a.Cf;b.ser=a.se;for(var b=a.hd(b),c="",d=0;0<a.$c.length;)if(1870>=a.$c[0].lf.length+30+c.length){var e=a.$c.shift(),c=c+"&seg"+d+"="+e.Yg+"&ts"+d+"="+e.hh+"&d"+d+"="+e.lf;d++}else break;rh(a,b+c,a.se);return!0}return!1}function rh(a,b,c){function d(){a.Qe.remove(c);ph(a)}a.Qe.add(c,1);var e=setTimeout(d,Math.floor(25E3));oh(a,b,function(){clearTimeout(e);d()})}function oh(a,b,c){sh(a,b,c)}var th=null;
|
|
165
|
+
function qh(a,b){th||(th=require("request"));th(a,function(c,d,e){if(c)throw"Rest request for "+a.url+" failed.";b&&b(e)})}function sh(a,b,c){qh({url:b,oh:!0},function(b){uh(a,b);c()})}function uh(a,b){eval("var jsonpCB = function(pLPCommand, pRTLPCB) {"+b+"}");jsonpCB(a.pg,a.Kg)};var vh=null,vh=require("faye-websocket").Client;function wh(a,b,c,d){this.qe=a;this.f=nd(this.qe);this.frames=this.Lc=null;this.pb=this.qb=this.cf=0;this.Wa=sc(b);a={v:"5"};c&&(a.s=c);d&&(a.ls=d);this.ff=dd(b,ed,a)}var xh;
|
|
166
|
+
wh.prototype.open=function(a,b){this.jb=b;this.Jg=a;this.f("Websocket connecting to "+this.ff);this.Ic=!1;$c.set("previous_websocket_failure",!0);try{this.Ka=new vh(this.ff,[],{headers:{"User-Agent":"Firebase/5/"+Cb+"/"+process.platform+"/Node"}})}catch(c){this.f("Error instantiating WebSocket.");var d=c.message||c.data;d&&this.f(d);this.ab();return}var e=this;this.Ka.onopen=function(){e.f("Websocket connected.");e.Ic=!0};this.Ka.onclose=function(){e.f("Websocket connection was disconnected.");e.Ka=
|
|
167
167
|
null;e.ab()};this.Ka.onmessage=function(a){if(null!==e.Ka)if(a=a.data,e.pb+=a.length,pc(e.Wa,"bytes_received",a.length),yh(e),null!==e.frames)zh(e,a);else{a:{N(null===e.frames,"We already have a frame buffer");if(6>=a.length){var b=Number(a);if(!isNaN(b)){e.cf=b;e.frames=[];a=null;break a}}e.cf=1;e.frames=[]}null!==a&&zh(e,a)}};this.Ka.onerror=function(a){e.f("WebSocket error. Closing connection.");(a=a.message||a.data)&&e.f(a);e.ab()}};wh.prototype.start=function(){};
|
|
168
|
-
wh.isAvailable=function(){var a=!1;if("undefined"!==typeof navigator&&navigator.userAgent){var b=navigator.userAgent.match(/Android ([0-9]{0,}\.[0-9]{0,})/);b&&1<b.length&&4.4>parseFloat(b[1])&&(a=!0)}return!a&&null!==vh&&!xh};wh.responsesRequiredToBeHealthy=2;wh.healthyTimeout=3E4;h=wh.prototype;h.Ed=function(){$c.remove("previous_websocket_failure")};function zh(a,b){a.frames.push(b);if(a.frames.length==a.cf){var c=a.frames.join("");a.frames=null;c=Pb(c);a.
|
|
168
|
+
wh.isAvailable=function(){var a=!1;if("undefined"!==typeof navigator&&navigator.userAgent){var b=navigator.userAgent.match(/Android ([0-9]{0,}\.[0-9]{0,})/);b&&1<b.length&&4.4>parseFloat(b[1])&&(a=!0)}return!a&&null!==vh&&!xh};wh.responsesRequiredToBeHealthy=2;wh.healthyTimeout=3E4;h=wh.prototype;h.Ed=function(){$c.remove("previous_websocket_failure")};function zh(a,b){a.frames.push(b);if(a.frames.length==a.cf){var c=a.frames.join("");a.frames=null;c=Pb(c);a.Jg(c)}}
|
|
169
169
|
h.send=function(a){yh(this);a=F(a);this.qb+=a.length;pc(this.Wa,"bytes_sent",a.length);a=wd(a,16384);1<a.length&&Ah(this,String(a.length));for(var b=0;b<a.length;b++)Ah(this,a[b])};h.cd=function(){this.Bb=!0;this.Lc&&(clearInterval(this.Lc),this.Lc=null);this.Ka&&(this.Ka.close(),this.Ka=null)};h.ab=function(){this.Bb||(this.f("WebSocket is closing itself"),this.cd(),this.jb&&(this.jb(this.Ic),this.jb=null))};h.close=function(){this.Bb||(this.f("WebSocket is being closed"),this.cd())};
|
|
170
|
-
function yh(a){clearInterval(a.Lc);a.Lc=setInterval(function(){a.Ka&&Ah(a,"0");yh(a)},Math.floor(45E3))}function Ah(a,b){try{a.Ka.send(b)}catch(c){a.f("Exception thrown from WebSocket.send():",c.message||c.data,"Closing connection."),setTimeout(u(a.ab,a),0)}};function Bh(a){Ch(this,a)}var Dh=[jh,wh];function Ch(a,b){var c=wh&&wh.isAvailable(),d=c&&!($c.xf||!0===$c.get("previous_websocket_failure"));b.
|
|
170
|
+
function yh(a){clearInterval(a.Lc);a.Lc=setInterval(function(){a.Ka&&Ah(a,"0");yh(a)},Math.floor(45E3))}function Ah(a,b){try{a.Ka.send(b)}catch(c){a.f("Exception thrown from WebSocket.send():",c.message||c.data,"Closing connection."),setTimeout(u(a.ab,a),0)}};function Bh(a){Ch(this,a)}var Dh=[jh,wh];function Ch(a,b){var c=wh&&wh.isAvailable(),d=c&&!($c.xf||!0===$c.get("previous_websocket_failure"));b.kh&&(c||R("wss:// URL used, but browser isn't known to support websockets. Trying anyway."),d=!0);if(d)a.fd=[wh];else{var e=a.fd=[];xd(Dh,function(a,b){b&&b.isAvailable()&&e.push(b)})}}function Eh(a){if(0<a.fd.length)return a.fd[0];throw Error("No transports available");};function Fh(a,b,c,d,e,f,g){this.id=a;this.f=nd("c:"+this.id+":");this.lc=c;this.Xc=d;this.na=e;this.Oe=f;this.G=b;this.Nd=[];this.gf=0;this.Vf=new Bh(b);this.N=0;this.Db=g;this.f("Connection created");Gh(this)}
|
|
171
171
|
function Gh(a){var b=Eh(a.Vf);a.K=new b("c:"+a.id+":"+a.gf++,a.G,void 0,a.Db);a.Se=b.responsesRequiredToBeHealthy||0;var c=Hh(a,a.K),d=Ih(a,a.K);a.gd=a.K;a.bd=a.K;a.F=null;a.Cb=!1;setTimeout(function(){a.K&&a.K.open(c,d)},Math.floor(0));b=b.healthyTimeout||0;0<b&&(a.yd=setTimeout(function(){a.yd=null;a.Cb||(a.K&&102400<a.K.pb?(a.f("Connection exceeded healthy timeout but has received "+a.K.pb+" bytes. Marking connection healthy."),a.Cb=!0,a.K.Ed()):a.K&&10240<a.K.qb?a.f("Connection exceeded healthy timeout but has sent "+
|
|
172
172
|
a.K.qb+" bytes. Leaving connection alive."):(a.f("Closing unhealthy connection after timeout."),a.close()))},Math.floor(b)))}function Ih(a,b){return function(c){b===a.K?(a.K=null,c||0!==a.N?1===a.N&&a.f("Realtime connection lost."):(a.f("Realtime connection failed."),"s-"===a.G.$a.substr(0,2)&&($c.remove("host:"+a.G.host),a.G.$a=a.G.host)),a.close()):b===a.F?(a.f("Secondary connection lost."),c=a.F,a.F=null,a.gd!==c&&a.bd!==c||a.close()):a.f("closing an old connection")}}
|
|
173
173
|
function Hh(a,b){return function(c){if(2!=a.N)if(b===a.bd){var d=ud("t",c);c=ud("d",c);if("c"==d){if(d=ud("t",c),"d"in c)if(c=c.d,"h"===d){var d=c.ts,e=c.v,f=c.h;a.Tf=c.s;cd(a.G,f);0==a.N&&(a.K.start(),Jh(a,a.K,d),"5"!==e&&R("Protocol version mismatch detected"),c=a.Vf,(c=1<c.fd.length?c.fd[1]:null)&&Kh(a,c))}else if("n"===d){a.f("recvd end transmission on primary");a.bd=a.F;for(c=0;c<a.Nd.length;++c)a.Jd(a.Nd[c]);a.Nd=[];Lh(a)}else"s"===d?(a.f("Connection shutdown command received. Shutting down..."),
|
|
@@ -175,21 +175,22 @@ a.Oe&&(a.Oe(c),a.Oe=null),a.na=null,a.close()):"r"===d?(a.f("Reset packet receiv
|
|
|
175
175
|
a.Rf--,Ph(a)));else if("d"==d)a.Nd.push(c);else throw Error("Unknown protocol layer: "+d);else a.f("message on old connection")}}Fh.prototype.Ha=function(a){Qh(this,{t:"d",d:a})};function Lh(a){a.gd===a.F&&a.bd===a.F&&(a.f("cleaning up and promoting a connection: "+a.F.qe),a.K=a.F,a.F=null)}
|
|
176
176
|
function Ph(a){0>=a.Rf?(a.f("Secondary connection is healthy."),a.Cb=!0,a.F.Ed(),a.F.start(),a.f("sending client ack on secondary"),a.F.send({t:"c",d:{t:"a",d:{}}}),a.f("Ending transmission on primary"),a.K.send({t:"c",d:{t:"n",d:{}}}),a.gd=a.F,Lh(a)):(a.f("sending ping on secondary."),a.F.send({t:"c",d:{t:"p",d:{}}}))}Fh.prototype.Jd=function(a){Nh(this);this.lc(a)};function Nh(a){a.Cb||(a.Se--,0>=a.Se&&(a.f("Primary connection is healthy."),a.Cb=!0,a.K.Ed()))}
|
|
177
177
|
function Kh(a,b){a.F=new b("c:"+a.id+":"+a.gf++,a.G,a.Tf);a.Rf=b.responsesRequiredToBeHealthy||0;a.F.open(Hh(a,a.F),Ih(a,a.F));setTimeout(function(){a.F&&(a.f("Timed out trying to upgrade."),a.F.close())},Math.floor(6E4))}function Jh(a,b,c){a.f("Realtime connection established.");a.K=b;a.N=1;a.Xc&&(a.Xc(c,a.Tf),a.Xc=null);0===a.Se?(a.f("Primary connection is healthy."),a.Cb=!0):setTimeout(function(){Oh(a)},Math.floor(5E3))}
|
|
178
|
-
function Oh(a){a.Cb||1!==a.N||(a.f("sending ping on primary."),Qh(a,{t:"c",d:{t:"p",d:{}}}))}function Qh(a,b){if(1!==a.N)throw"Connection is not connected";a.gd.send(b)}Fh.prototype.close=function(){2!==this.N&&(this.f("Closing realtime connection."),this.N=2,Mh(this),this.na&&(this.na(),this.na=null))};function Mh(a){a.f("Shutting down all connections");a.K&&(a.K.close(),a.K=null);a.F&&(a.F.close(),a.F=null);a.yd&&(clearTimeout(a.yd),a.yd=null)};function Rh(a,b,c,d){this.id=Sh++;this.f=nd("p:"+this.id+":");this.yf=this.Ee=!1;this.ba={};this.sa=[];this.Zc=0;this.Wc=[];this.qa=!1;this.bb=1E3;this.Fd=3E5;this.Ib=b;this.Vc=c;this.Pe=d;this.G=a;this.ub=this.Ca=this.La=this.Db=this.Xe=null;this.Qb=!1;this.Ud={};this.
|
|
179
|
-
h.Ha=function(a,b,c){var d=++this.
|
|
180
|
-
function Vh(a,b){var c=b.
|
|
178
|
+
function Oh(a){a.Cb||1!==a.N||(a.f("sending ping on primary."),Qh(a,{t:"c",d:{t:"p",d:{}}}))}function Qh(a,b){if(1!==a.N)throw"Connection is not connected";a.gd.send(b)}Fh.prototype.close=function(){2!==this.N&&(this.f("Closing realtime connection."),this.N=2,Mh(this),this.na&&(this.na(),this.na=null))};function Mh(a){a.f("Shutting down all connections");a.K&&(a.K.close(),a.K=null);a.F&&(a.F.close(),a.F=null);a.yd&&(clearTimeout(a.yd),a.yd=null)};function Rh(a,b,c,d){this.id=Sh++;this.f=nd("p:"+this.id+":");this.yf=this.Ee=!1;this.ba={};this.sa=[];this.Zc=0;this.Wc=[];this.qa=!1;this.bb=1E3;this.Fd=3E5;this.Ib=b;this.Vc=c;this.Pe=d;this.G=a;this.ub=this.Ca=this.La=this.Db=this.Xe=null;this.Qb=!1;this.Ud={};this.Xg=0;this.of=!0;this.Mc=this.Ge=null;Th(this,0);hf.wb().Gb("visible",this.Ng,this);-1===a.host.indexOf("fblocal")&&gf.wb().Gb("online",this.Lg,this)}var Sh=0,Uh=0;h=Rh.prototype;
|
|
179
|
+
h.Ha=function(a,b,c){var d=++this.Xg;a={r:d,a:a,b:b};this.f(F(a));N(this.qa,"sendRequest call when we're not connected not allowed.");this.La.Ha(a);c&&(this.Ud[d]=c)};h.zf=function(a,b,c,d){var e=a.wa(),f=a.path.toString();this.f("Listen called for "+f+" "+e);this.ba[f]=this.ba[f]||{};N(Ge(a.n)||!Fe(a.n),"listen() called for non-default but complete query");N(!this.ba[f][e],"listen() called twice for same path/queryId.");a={I:d,xd:b,Ug:a,tag:c};this.ba[f][e]=a;this.qa&&Vh(this,a)};
|
|
180
|
+
function Vh(a,b){var c=b.Ug,d=c.path.toString(),e=c.wa();a.f("Listen on "+d+" for "+e);var f={p:d};b.tag&&(f.q=Ee(c.n),f.t=b.tag);f.h=b.xd();a.Ha("q",f,function(f){var k=f.d,m=f.s;if(k&&"object"===typeof k&&y(k,"w")){var l=z(k,"w");da(l)&&0<=Ma(l,"no_index")&&R("Using an unspecified index. Consider adding "+('".indexOn": "'+c.n.g.toString()+'"')+" at "+c.path.toString()+" to your security rules for better performance")}(a.ba[d]&&a.ba[d][e])===b&&(a.f("listen response",f),"ok"!==m&&Wh(a,d,e),b.I&&
|
|
181
181
|
b.I(m,k))})}h.O=function(a,b,c){this.Ca={rg:a,pf:!1,Cc:b,ld:c};this.f("Authenticating using credential: "+a);Xh(this);(b=40==a.length)||(a=Ad(a).Dc,b="object"===typeof a&&!0===z(a,"admin"));b&&(this.f("Admin auth credential detected. Reducing max reconnect time."),this.Fd=3E4)};h.ge=function(a){this.Ca=null;this.qa&&this.Ha("unauth",{},function(b){a(b.s,b.d)})};
|
|
182
182
|
function Xh(a){var b=a.Ca;a.qa&&b&&a.Ha("auth",{cred:b.rg},function(c){var d=c.s;c=c.d||"error";"ok"!==d&&a.Ca===b&&(a.Ca=null);b.pf?"ok"!==d&&b.ld&&b.ld(d,c):(b.pf=!0,b.Cc&&b.Cc(d,c))})}h.Zf=function(a,b){var c=a.path.toString(),d=a.wa();this.f("Unlisten called for "+c+" "+d);N(Ge(a.n)||!Fe(a.n),"unlisten() called for non-default but complete query");if(Wh(this,c,d)&&this.qa){var e=Ee(a.n);this.f("Unlisten on "+c+" for "+d);c={p:c};b&&(c.q=e,c.t=b);this.Ha("n",c)}};
|
|
183
183
|
h.Ne=function(a,b,c){this.qa?Yh(this,"o",a,b,c):this.Wc.push({oc:a,action:"o",data:b,I:c})};h.Ff=function(a,b,c){this.qa?Yh(this,"om",a,b,c):this.Wc.push({oc:a,action:"om",data:b,I:c})};h.Kd=function(a,b){this.qa?Yh(this,"oc",a,null,b):this.Wc.push({oc:a,action:"oc",data:null,I:b})};function Yh(a,b,c,d,e){c={p:c,d:d};a.f("onDisconnect "+b,c);a.Ha(b,c,function(a){e&&setTimeout(function(){e(a.s,a.d)},Math.floor(0))})}h.put=function(a,b,c,d){Zh(this,"p",a,b,c,d)};
|
|
184
|
-
h.Af=function(a,b,c,d){Zh(this,"m",a,b,c,d)};function Zh(a,b,c,d,e,f){d={p:c,d:d};p(f)&&(d.h=f);a.sa.push({action:b,Nf:d,I:e});a.Zc++;b=a.sa.length-1;a.qa?$h(a,b):a.f("Buffering put: "+c)}function $h(a,b){var c=a.sa[b].action,d=a.sa[b].Nf,e=a.sa[b].I;a.sa[b].
|
|
184
|
+
h.Af=function(a,b,c,d){Zh(this,"m",a,b,c,d)};function Zh(a,b,c,d,e,f){d={p:c,d:d};p(f)&&(d.h=f);a.sa.push({action:b,Nf:d,I:e});a.Zc++;b=a.sa.length-1;a.qa?$h(a,b):a.f("Buffering put: "+c)}function $h(a,b){var c=a.sa[b].action,d=a.sa[b].Nf,e=a.sa[b].I;a.sa[b].Vg=a.qa;a.Ha(c,d,function(d){a.f(c+" response",d);delete a.sa[b];a.Zc--;0===a.Zc&&(a.sa=[]);e&&e(d.s,d.d)})}
|
|
185
185
|
h.Ve=function(a){this.qa&&(a={c:a},this.f("reportStats",a),this.Ha("s",a,function(a){"ok"!==a.s&&this.f("reportStats","Error sending stats: "+a.d)}))};
|
|
186
186
|
h.Jd=function(a){if("r"in a){this.f("from server: "+F(a));var b=a.r,c=this.Ud[b];c&&(delete this.Ud[b],c(a.b))}else{if("error"in a)throw"A server-side error has occurred: "+a.error;"a"in a&&(b=a.a,c=a.b,this.f("handleServerMessage",b,c),"d"===b?this.Ib(c.p,c.d,!1,c.t):"m"===b?this.Ib(c.p,c.d,!0,c.t):"c"===b?ai(this,c.p,c.q):"ac"===b?(a=c.s,b=c.d,c=this.Ca,this.Ca=null,c&&c.ld&&c.ld(a,b)):"sd"===b?this.Xe?this.Xe(c):"msg"in c&&"undefined"!==typeof console&&console.log("FIREBASE: "+c.msg.replace("\n",
|
|
187
187
|
"\nFIREBASE: ")):od("Unrecognized action received from server: "+F(b)+"\nAre you using the latest client?"))}};
|
|
188
188
|
h.Xc=function(a,b){this.f("connection ready");this.qa=!0;this.Mc=(new Date).getTime();this.Pe({serverTimeOffset:a-(new Date).getTime()});this.Db=b;if(this.of){var c={};c["sdk.js."+Cb.replace(/\./g,"-")]=1;"undefined"!==typeof window&&(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(Ag())?c["framework.cordova"]=1:"object"===typeof navigator&&"ReactNative"===navigator.product&&(c["framework.reactnative"]=1);this.Ve(c)}bi(this);this.of=!1;this.Vc(!0)};
|
|
189
|
-
function Th(a,b){N(!a.La,"Scheduling a connect when we're already connected/ing?");a.ub&&clearTimeout(a.ub);a.ub=setTimeout(function(){a.ub=null;ci(a)},Math.floor(b))}h.
|
|
190
|
-
h.Hf=function(){this.f("data client disconnected");this.qa=!1;this.La=null;for(var a=0;a<this.sa.length;a++){var b=this.sa[a];b&&"h"in b.Nf&&b.
|
|
189
|
+
function Th(a,b){N(!a.La,"Scheduling a connect when we're already connected/ing?");a.ub&&clearTimeout(a.ub);a.ub=setTimeout(function(){a.ub=null;ci(a)},Math.floor(b))}h.Ng=function(a){a&&!this.Qb&&this.bb===this.Fd&&(this.f("Window became visible. Reducing delay."),this.bb=1E3,this.La||Th(this,0));this.Qb=a};h.Lg=function(a){a?(this.f("Browser went online."),this.bb=1E3,this.La||Th(this,0)):(this.f("Browser went offline. Killing connection."),this.La&&this.La.close())};
|
|
190
|
+
h.Hf=function(){this.f("data client disconnected");this.qa=!1;this.La=null;for(var a=0;a<this.sa.length;a++){var b=this.sa[a];b&&"h"in b.Nf&&b.Vg&&(b.I&&b.I("disconnect"),delete this.sa[a],this.Zc--)}0===this.Zc&&(this.sa=[]);this.Ud={};di(this)&&(this.Qb?this.Mc&&(3E4<(new Date).getTime()-this.Mc&&(this.bb=1E3),this.Mc=null):(this.f("Window isn't visible. Delaying reconnect."),this.bb=this.Fd,this.Ge=(new Date).getTime()),a=Math.max(0,this.bb-((new Date).getTime()-this.Ge)),a*=Math.random(),this.f("Trying to reconnect in "+
|
|
191
191
|
a+"ms"),Th(this,a),this.bb=Math.min(this.Fd,1.3*this.bb));this.Vc(!1)};function ci(a){if(di(a)){a.f("Making a connection attempt");a.Ge=(new Date).getTime();a.Mc=null;var b=u(a.Jd,a),c=u(a.Xc,a),d=u(a.Hf,a),e=a.id+":"+Uh++;a.La=new Fh(e,a.G,b,c,d,function(b){R(b+" ("+a.G.toString()+")");a.yf=!0},a.Db)}}h.Ab=function(){this.Ee=!0;this.La?this.La.close():(this.ub&&(clearTimeout(this.ub),this.ub=null),this.qa&&this.Hf())};h.uc=function(){this.Ee=!1;this.bb=1E3;this.La||Th(this,0)};
|
|
192
|
-
function ai(a,b,c){c=c?Pa(c,function(a){return vd(a)}).join("$"):"default";(a=Wh(a,b,c))&&a.I&&a.I("permission_denied")}function Wh(a,b,c){b=(new O(b)).toString();var d;p(a.ba[b])?(d=a.ba[b][c],delete a.ba[b][c],0===oa(a.ba[b])&&delete a.ba[b]):d=void 0;return d}function bi(a){Xh(a);v(a.ba,function(b){v(b,function(b){Vh(a,b)})});for(var b=0;b<a.sa.length;b++)a.sa[b]&&$h(a,b);for(;a.Wc.length;)b=a.Wc.shift(),Yh(a,b.action,b.oc,b.data,b.I)}function di(a){var b;b=gf.wb().mc;return!a.yf&&!a.Ee&&b};var U={zg:function(){kh=xh=!0}};U.forceLongPolling=U.zg;U.Ag=function(){lh=!0};U.forceWebSockets=U.Ag;U
|
|
192
|
+
function ai(a,b,c){c=c?Pa(c,function(a){return vd(a)}).join("$"):"default";(a=Wh(a,b,c))&&a.I&&a.I("permission_denied")}function Wh(a,b,c){b=(new O(b)).toString();var d;p(a.ba[b])?(d=a.ba[b][c],delete a.ba[b][c],0===oa(a.ba[b])&&delete a.ba[b]):d=void 0;return d}function bi(a){Xh(a);v(a.ba,function(b){v(b,function(b){Vh(a,b)})});for(var b=0;b<a.sa.length;b++)a.sa[b]&&$h(a,b);for(;a.Wc.length;)b=a.Wc.shift(),Yh(a,b.action,b.oc,b.data,b.I)}function di(a){var b;b=gf.wb().mc;return!a.yf&&!a.Ee&&b};var U={zg:function(){kh=xh=!0}};U.forceLongPolling=U.zg;U.Ag=function(){lh=!0};U.forceWebSockets=U.Ag;U.Eg=function(){return wh.isAvailable()};U.isWebSocketsAvailable=U.Eg;U.ah=function(a,b){a.k.Ua.Xe=b};U.setSecurityDebugCallback=U.ah;U.Ze=function(a,b){a.k.Ze(b)};U.stats=U.Ze;U.$e=function(a,b){a.k.$e(b)};U.statsIncrementCounter=U.$e;U.rd=function(a){return a.k.rd};U.dataUpdateCount=U.rd;U.Dg=function(a,b){a.k.De=b};U.interceptServerData=U.Dg;U.Ig=function(a){new Kg(a)};U.onPopupOpen=U.Ig;
|
|
193
|
+
U.Zg=function(a){vg=a};U.setAuthenticationServer=U.Zg;function ei(a,b){this.committed=a;this.snapshot=b};function V(a,b){this.ad=a;this.ta=b}V.prototype.cancel=function(a){C("Firebase.onDisconnect().cancel",0,1,arguments.length);E("Firebase.onDisconnect().cancel",1,a,!0);var b=new A;this.ad.Kd(this.ta,B(b,a));return b.D};V.prototype.cancel=V.prototype.cancel;V.prototype.remove=function(a){C("Firebase.onDisconnect().remove",0,1,arguments.length);mg("Firebase.onDisconnect().remove",this.ta);E("Firebase.onDisconnect().remove",1,a,!0);var b=new A;fi(this.ad,this.ta,null,B(b,a));return b.D};
|
|
193
194
|
V.prototype.remove=V.prototype.remove;V.prototype.set=function(a,b){C("Firebase.onDisconnect().set",1,2,arguments.length);mg("Firebase.onDisconnect().set",this.ta);eg("Firebase.onDisconnect().set",a,this.ta,!1);E("Firebase.onDisconnect().set",2,b,!0);var c=new A;fi(this.ad,this.ta,a,B(c,b));return c.D};V.prototype.set=V.prototype.set;
|
|
194
195
|
V.prototype.Mb=function(a,b,c){C("Firebase.onDisconnect().setWithPriority",2,3,arguments.length);mg("Firebase.onDisconnect().setWithPriority",this.ta);eg("Firebase.onDisconnect().setWithPriority",a,this.ta,!1);ig("Firebase.onDisconnect().setWithPriority",2,b);E("Firebase.onDisconnect().setWithPriority",3,c,!0);var d=new A;gi(this.ad,this.ta,a,b,B(d,c));return d.D};V.prototype.setWithPriority=V.prototype.Mb;
|
|
195
196
|
V.prototype.update=function(a,b){C("Firebase.onDisconnect().update",1,2,arguments.length);mg("Firebase.onDisconnect().update",this.ta);if(da(a)){for(var c={},d=0;d<a.length;++d)c[""+d]=a[d];a=c;R("Passing an Array to Firebase.onDisconnect().update() is deprecated. Use set() if you want to overwrite the existing data, or an Object with integer keys if you really do want to only update some of the children.")}hg("Firebase.onDisconnect().update",a,this.ta);E("Firebase.onDisconnect().update",2,b,!0);
|
|
@@ -201,34 +202,34 @@ W.prototype.key=W.prototype.key;W.prototype.Fb=function(){C("Firebase.DataSnapsh
|
|
|
201
202
|
h.matches=function(a){return a instanceof ii?a.Tb&&this.Tb?a.Tb===this.Tb&&a.tb===this.tb:!0:!1};h.uf=function(){return null!==this.Tb};function ji(a,b,c){this.ja=a;this.rb=b;this.tb=c}h=ji.prototype;h.Of=function(a){a="children_added"===a?"child_added":a;return("children_removed"===a?"child_removed":a)in this.ja};h.hf=function(a,b){return this.rb?new ic(this,a,b):null};
|
|
202
203
|
h.createEvent=function(a,b){N(null!=a.Ya,"Child events should have a childName.");var c=b.Kb().o(a.Ya);return new hc(a.type,this,new W(a.Ma,c,b.n.g),a.Rd)};h.Yb=function(a){var b=this.tb;if("cancel"===a.ze()){N(this.rb,"Raising a cancel event on a listener with no cancel callback");var c=this.rb;return function(){c.call(b,a.error)}}var d=this.ja[a.td];return function(){d.call(b,a.Zd,a.Rd)}};
|
|
203
204
|
h.matches=function(a){if(a instanceof ji){if(!this.ja||!a.ja)return!0;if(this.tb===a.tb){var b=oa(a.ja);if(b===oa(this.ja)){if(1===b){var b=pa(a.ja),c=pa(this.ja);return c===b&&(!a.ja[b]||!this.ja[c]||a.ja[b]===this.ja[c])}return na(this.ja,function(b,c){return a.ja[c]===b})}}}return!1};h.uf=function(){return null!==this.ja};function ki(){this.za={}}h=ki.prototype;h.e=function(){return va(this.za)};h.fb=function(a,b,c){var d=a.source.Jb;if(null!==d)return d=z(this.za,d),N(null!=d,"SyncTree gave us an op for an invalid query."),d.fb(a,b,c);var e=[];v(this.za,function(d){e=e.concat(d.fb(a,b,c))});return e};h.Rb=function(a,b,c,d,e){var f=a.wa(),g=z(this.za,f);if(!g){var g=c.Aa(e?d:null),k=!1;g?k=!0:(g=d instanceof de?c.Bc(d):G,k=!1);g=new We(a,new he(new Vb(g,k,!1),new Vb(d,e,!1)));this.za[f]=g}g.Rb(b);return Ze(g,b)};
|
|
204
|
-
h.lb=function(a,b,c){var d=a.wa(),e=[],f=[],g=null!=li(this);if("default"===d){var k=this;v(this.za,function(a,d){f=f.concat(a.lb(b,c));a.e()&&(delete k.za[d],Fe(a.Y.n)||e.push(a.Y))})}else{var m=z(this.za,d);m&&(f=f.concat(m.lb(b,c)),m.e()&&(delete this.za[d],Fe(m.Y.n)||e.push(m.Y)))}g&&null==li(this)&&e.push(new X(a.k,a.path));return{
|
|
205
|
+
h.lb=function(a,b,c){var d=a.wa(),e=[],f=[],g=null!=li(this);if("default"===d){var k=this;v(this.za,function(a,d){f=f.concat(a.lb(b,c));a.e()&&(delete k.za[d],Fe(a.Y.n)||e.push(a.Y))})}else{var m=z(this.za,d);m&&(f=f.concat(m.lb(b,c)),m.e()&&(delete this.za[d],Fe(m.Y.n)||e.push(m.Y)))}g&&null==li(this)&&e.push(new X(a.k,a.path));return{Wg:e,vg:f}};function mi(a){return Oa(qa(a.za),function(a){return!Fe(a.Y.n)})}h.ib=function(a){var b=null;v(this.za,function(c){b=b||c.ib(a)});return b};
|
|
205
206
|
function ni(a,b){if(Fe(b.n))return li(a);var c=b.wa();return z(a.za,c)}function li(a){return ua(a.za,function(a){return Fe(a.Y.n)})||null};function oi(a){this.va=oe;this.kb=new Nf;this.af={};this.pc={};this.Oc=a}function pi(a,b,c,d,e){var f=a.kb,g=e;N(d>f.Nc,"Stacking an older write on top of newer ones");p(g)||(g=!0);f.pa.push({path:b,Ia:c,jd:d,visible:g});g&&(f.V=Hf(f.V,b,c));f.Nc=d;return e?qi(a,new yc(Cf,b,c)):[]}function ri(a,b,c,d){var e=a.kb;N(d>e.Nc,"Stacking an older merge on top of newer ones");e.pa.push({path:b,children:c,jd:d,visible:!0});e.V=If(e.V,b,c);e.Nc=d;c=qf(c);return qi(a,new $e(Cf,b,c))}
|
|
206
207
|
function si(a,b,c){c=c||!1;var d=Of(a.kb,b);if(a.kb.Sd(b)){var e=oe;null!=d.Ia?e=e.set(L,!0):Db(d.children,function(a,b){e=e.set(new O(a),b)});return qi(a,new Bf(d.path,e,c))}return[]}function ti(a,b,c){c=qf(c);return qi(a,new $e(Ef,b,c))}function ui(a,b,c,d){d=vi(a,d);if(null!=d){var e=wi(d);d=e.path;e=e.Jb;b=jf(d,b);c=new yc(new Df(!1,!0,e,!0),b,c);return xi(a,d,c)}return[]}
|
|
207
208
|
function yi(a,b,c,d){if(d=vi(a,d)){var e=wi(d);d=e.path;e=e.Jb;b=jf(d,b);c=qf(c);c=new $e(new Df(!1,!0,e,!0),b,c);return xi(a,d,c)}return[]}
|
|
208
209
|
oi.prototype.Rb=function(a,b){var c=a.path,d=null,e=!1;xf(this.va,c,function(a,b){var f=jf(a,c);d=d||b.ib(f);e=e||null!=li(b)});var f=this.va.get(c);f?(e=e||null!=li(f),d=d||f.ib(L)):(f=new ki,this.va=this.va.set(c,f));var g;null!=d?g=!0:(g=!1,d=G,Af(this.va.subtree(c),function(a,b){var c=b.ib(L);c&&(d=d.W(a,c))}));var k=null!=ni(f,a);if(!k&&!Fe(a.n)){var m=zi(a);N(!(m in this.pc),"View does not exist, but we have a tag");var l=Ai++;this.pc[m]=l;this.af["_"+l]=m}g=f.Rb(a,b,new Sf(c,this.kb),d,g);
|
|
209
210
|
k||e||(f=ni(f,a),g=g.concat(Bi(this,a,f)));return g};
|
|
210
|
-
oi.prototype.lb=function(a,b,c){var d=a.path,e=this.va.get(d),f=[];if(e&&("default"===a.wa()||null!=ni(e,a))){f=e.lb(a,b,c);e.e()&&(this.va=this.va.remove(d));e=f.
|
|
211
|
+
oi.prototype.lb=function(a,b,c){var d=a.path,e=this.va.get(d),f=[];if(e&&("default"===a.wa()||null!=ni(e,a))){f=e.lb(a,b,c);e.e()&&(this.va=this.va.remove(d));e=f.Wg;f=f.vg;b=-1!==Ta(e,function(a){return Fe(a.n)});var g=vf(this.va,d,function(a,b){return null!=li(b)});if(b&&!g&&(d=this.va.subtree(d),!d.e()))for(var d=Ci(d),k=0;k<d.length;++k){var m=d[k],l=m.Y,m=Di(this,m);this.Oc.Ye(Ei(l),Fi(this,l),m.xd,m.I)}if(!g&&0<e.length&&!c)if(b)this.Oc.ae(Ei(a),null);else{var r=this;Na(e,function(a){a.wa();
|
|
211
212
|
var b=r.pc[zi(a)];r.Oc.ae(Ei(a),b)})}Gi(this,e)}return f};oi.prototype.Aa=function(a,b){var c=this.kb,d=vf(this.va,a,function(b,c){var d=jf(b,a);if(d=c.ib(d))return d});return c.Aa(a,d,b,!0)};function Ci(a){return tf(a,function(a,c,d){if(c&&null!=li(c))return[li(c)];var e=[];c&&(e=mi(c));v(d,function(a){e=e.concat(a)});return e})}function Gi(a,b){for(var c=0;c<b.length;++c){var d=b[c];if(!Fe(d.n)){var d=zi(d),e=a.pc[d];delete a.pc[d];delete a.af["_"+e]}}}
|
|
212
213
|
function Ei(a){return Fe(a.n)&&!Ge(a.n)?a.Kb():a}function Bi(a,b,c){var d=b.path,e=Fi(a,b);c=Di(a,c);b=a.Oc.Ye(Ei(b),e,c.xd,c.I);d=a.va.subtree(d);if(e)N(null==li(d.value),"If we're adding a query, it shouldn't be shadowed");else for(e=tf(d,function(a,b,c){if(!a.e()&&b&&null!=li(b))return[Xe(li(b))];var d=[];b&&(d=d.concat(Pa(mi(b),function(a){return a.Y})));v(c,function(a){d=d.concat(a)});return d}),d=0;d<e.length;++d)c=e[d],a.Oc.ae(Ei(c),Fi(a,c));return b}
|
|
213
214
|
function Di(a,b){var c=b.Y,d=Fi(a,c);return{xd:function(){return(b.w()||G).hash()},I:function(b){if("ok"===b){if(d){var f=c.path;if(b=vi(a,d)){var g=wi(b);b=g.path;g=g.Jb;f=jf(b,f);f=new Ac(new Df(!1,!0,g,!0),f);b=xi(a,b,f)}else b=[]}else b=qi(a,new Ac(Ef,c.path));return b}f="Unknown Error";"too_big"===b?f="The data requested exceeds the maximum size that can be accessed with a single request.":"permission_denied"==b?f="Client doesn't have permission to access the desired data.":"unavailable"==b&&
|
|
214
215
|
(f="The service is unavailable");f=Error(b+" at "+c.path.toString()+": "+f);f.code=b.toUpperCase();return a.lb(c,null,f)}}}function zi(a){return a.path.toString()+"$"+a.wa()}function wi(a){var b=a.indexOf("$");N(-1!==b&&b<a.length-1,"Bad queryKey.");return{Jb:a.substr(b+1),path:new O(a.substr(0,b))}}function vi(a,b){var c=a.af,d="_"+b;return d in c?c[d]:void 0}function Fi(a,b){var c=zi(b);return z(a.pc,c)}var Ai=1;
|
|
215
216
|
function xi(a,b,c){var d=a.va.get(b);N(d,"Missing sync point for query tag that we're tracking");return d.fb(c,new Sf(b,a.kb),null)}function qi(a,b){return Hi(a,b,a.va,null,new Sf(L,a.kb))}function Hi(a,b,c,d,e){if(b.path.e())return Ii(a,b,c,d,e);var f=c.get(L);null==d&&null!=f&&(d=f.ib(L));var g=[],k=I(b.path),m=b.Yc(k);if((c=c.children.get(k))&&m)var l=d?d.T(k):null,k=e.o(k),g=g.concat(Hi(a,m,c,l,k));f&&(g=g.concat(f.fb(b,e,d)));return g}
|
|
216
|
-
function Ii(a,b,c,d,e){var f=c.get(L);null==d&&null!=f&&(d=f.ib(L));var g=[];c.children.ka(function(c,f){var l=d?d.T(c):null,r=e.o(c),x=b.Yc(c);x&&(g=g.concat(Ii(a,x,f,l,r)))});f&&(g=g.concat(f.fb(b,e,d)));return g};function Ji(a,b){this.G=a;this.Wa=sc(a);this.ed=null;this.fa=new Xb;this.Id=1;this.Ua=null;b||0<=("object"===typeof window&&window.navigator&&window.navigator.userAgent||"").search(/googlebot|google webmaster tools|bingbot|yahoo! slurp|baiduspider|yandexbot|duckduckbot/i)?(this.da=new af(this.G,u(this.Ib,this)),setTimeout(u(this.Vc,this,!0),0)):this.da=this.Ua=new Rh(this.G,u(this.Ib,this),u(this.Vc,this),u(this.Pe,this));this.
|
|
217
|
+
function Ii(a,b,c,d,e){var f=c.get(L);null==d&&null!=f&&(d=f.ib(L));var g=[];c.children.ka(function(c,f){var l=d?d.T(c):null,r=e.o(c),x=b.Yc(c);x&&(g=g.concat(Ii(a,x,f,l,r)))});f&&(g=g.concat(f.fb(b,e,d)));return g};function Ji(a,b){this.G=a;this.Wa=sc(a);this.ed=null;this.fa=new Xb;this.Id=1;this.Ua=null;b||0<=("object"===typeof window&&window.navigator&&window.navigator.userAgent||"").search(/googlebot|google webmaster tools|bingbot|yahoo! slurp|baiduspider|yandexbot|duckduckbot/i)?(this.da=new af(this.G,u(this.Ib,this)),setTimeout(u(this.Vc,this,!0),0)):this.da=this.Ua=new Rh(this.G,u(this.Ib,this),u(this.Vc,this),u(this.Pe,this));this.eh=tc(a,u(function(){return new nc(this.Wa,this.da)},this));this.xc=new Uf;
|
|
217
218
|
this.Ce=new Qb;var c=this;this.Cd=new oi({Ye:function(a,b,f,g){b=[];f=c.Ce.j(a.path);f.e()||(b=qi(c.Cd,new yc(Ef,a.path,f)),setTimeout(function(){g("ok")},0));return b},ae:aa});Ki(this,"connected",!1);this.na=new Tc;this.O=new Ug(a,u(this.da.O,this.da),u(this.da.ge,this.da),u(this.Me,this));this.rd=0;this.De=null;this.M=new oi({Ye:function(a,b,f,g){c.da.zf(a,f,b,function(b,e){var f=g(b,e);bc(c.fa,a.path,f)});return[]},ae:function(a,b){c.da.Zf(a,b)}})}h=Ji.prototype;
|
|
218
219
|
h.toString=function(){return(this.G.mb?"https://":"http://")+this.G.host};h.name=function(){return this.G.jc};function Li(a){a=a.Ce.j(new O(".info/serverTimeOffset")).J()||0;return(new Date).getTime()+a}function Mi(a){a=a={timestamp:Li(a)};a.timestamp=a.timestamp||(new Date).getTime();return a}
|
|
219
220
|
h.Ib=function(a,b,c,d){this.rd++;var e=new O(a);b=this.De?this.De(a,b):b;a=[];d?c?(b=ma(b,function(a){return P(a)}),a=yi(this.M,e,b,d)):(b=P(b),a=ui(this.M,e,b,d)):c?(d=ma(b,function(a){return P(a)}),a=ti(this.M,e,d)):(d=P(b),a=qi(this.M,new yc(Ef,e,d)));d=e;0<a.length&&(d=Ni(this,e));bc(this.fa,d,a)};h.Vc=function(a){Ki(this,"connected",a);!1===a&&Oi(this)};h.Pe=function(a){var b=this;xd(a,function(a,d){Ki(b,d,a)})};h.Me=function(a){Ki(this,"authenticated",a)};
|
|
220
|
-
function Ki(a,b,c){b=new O("/.info/"+b);c=P(c);var d=a.Ce;d.Xd=d.Xd.H(b,c);c=qi(a.Cd,new yc(Ef,b,c));bc(a.fa,b,c)}h.Mb=function(a,b,c,d){this.f("set",{path:a.toString(),value:b,
|
|
221
|
+
function Ki(a,b,c){b=new O("/.info/"+b);c=P(c);var d=a.Ce;d.Xd=d.Xd.H(b,c);c=qi(a.Cd,new yc(Ef,b,c));bc(a.fa,b,c)}h.Mb=function(a,b,c,d){this.f("set",{path:a.toString(),value:b,qh:c});var e=Mi(this);b=P(b,c);var e=Vc(b,e),f=this.Id++,e=pi(this.M,a,e,f,!0);Yb(this.fa,e);var g=this;this.da.put(a.toString(),b.J(!0),function(b,c){var e="ok"===b;e||R("set at "+a+" failed: "+b);e=si(g.M,f,!e);bc(g.fa,a,e);Pi(d,b,c)});e=Qi(this,a);Ni(this,e);bc(this.fa,e,[])};
|
|
221
222
|
h.update=function(a,b,c){this.f("update",{path:a.toString(),value:b});var d=!0,e=Mi(this),f={};v(b,function(a,b){d=!1;var c=P(a);f[b]=Vc(c,e)});if(d)dc("update() called with empty data. Don't do anything."),Pi(c,"ok");else{var g=this.Id++,k=ri(this.M,a,f,g);Yb(this.fa,k);var m=this;this.da.Af(a.toString(),b,function(b,d){var e="ok"===b;e||R("update at "+a+" failed: "+b);var e=si(m.M,g,!e),f=a;0<e.length&&(f=Ni(m,a));bc(m.fa,f,e);Pi(c,b,d)});b=Qi(this,a);Ni(this,b);bc(this.fa,a,[])}};
|
|
222
223
|
function Oi(a){a.f("onDisconnectEvents");var b=Mi(a),c=[];Uc(Sc(a.na,b),L,function(b,e){c=c.concat(qi(a.M,new yc(Ef,b,e)));var f=Qi(a,b);Ni(a,f)});a.na=new Tc;bc(a.fa,L,c)}h.Kd=function(a,b){var c=this;this.da.Kd(a.toString(),function(d,e){"ok"===d&&ug(c.na,a);Pi(b,d,e)})};function fi(a,b,c,d){var e=P(c);a.da.Ne(b.toString(),e.J(!0),function(c,g){"ok"===c&&a.na.qc(b,e);Pi(d,c,g)})}function gi(a,b,c,d,e){var f=P(c,d);a.da.Ne(b.toString(),f.J(!0),function(c,d){"ok"===c&&a.na.qc(b,f);Pi(e,c,d)})}
|
|
223
224
|
function hi(a,b,c,d){var e=!0,f;for(f in c)e=!1;e?(dc("onDisconnect().update() called with empty data. Don't do anything."),Pi(d,"ok")):a.da.Ff(b.toString(),c,function(e,f){if("ok"===e)for(var m in c){var l=P(c[m]);a.na.qc(b.o(m),l)}Pi(d,e,f)})}function Ri(a,b,c){c=".info"===I(b.path)?a.Cd.Rb(b,c):a.M.Rb(b,c);$b(a.fa,b.path,c)}h.Ab=function(){this.Ua&&this.Ua.Ab()};h.uc=function(){this.Ua&&this.Ua.uc()};
|
|
224
|
-
h.Ze=function(a){if("undefined"!==typeof console){a?(this.ed||(this.ed=new mc(this.Wa)),a=this.ed.get()):a=this.Wa.get();var b=Qa(ra(a),function(a,b){return Math.max(b.length,a)},0),c;for(c in a){for(var d=a[c],e=c.length;e<b+2;e++)c+=" ";console.log(c+d)}}};h.$e=function(a){pc(this.Wa,a);this.
|
|
225
|
+
h.Ze=function(a){if("undefined"!==typeof console){a?(this.ed||(this.ed=new mc(this.Wa)),a=this.ed.get()):a=this.Wa.get();var b=Qa(ra(a),function(a,b){return Math.max(b.length,a)},0),c;for(c in a){for(var d=a[c],e=c.length;e<b+2;e++)c+=" ";console.log(c+d)}}};h.$e=function(a){pc(this.Wa,a);this.eh.Uf[a]=!0};h.f=function(a){var b="";this.Ua&&(b=this.Ua.id+":");dc(b,arguments)};
|
|
225
226
|
function Pi(a,b,c){a&&ec(function(){if("ok"==b)a(null);else{var d=(b||"error").toUpperCase(),e=d;c&&(e+=": "+c);e=Error(e);e.code=d;a(e)}})};function Si(a,b,c,d,e){function f(){}a.f("transaction on "+b);var g=new X(a,b);g.Gb("value",f);c={path:b,update:c,I:d,status:null,Kf:gd(),df:e,Qf:0,he:function(){g.kc("value",f)},je:null,Da:null,od:null,pd:null,qd:null};d=a.M.Aa(b,void 0)||G;c.od=d;d=c.update(d.J());if(p(d)){fg("transaction failed: Data returned ",d,c.path);c.status=1;e=Vf(a.xc,b);var k=e.Ea()||[];k.push(c);Wf(e,k);"object"===typeof d&&null!==d&&y(d,".priority")?(k=z(d,".priority"),N(dg(k),"Invalid priority returned by transaction. Priority must be a valid string, finite number, server value, or null.")):
|
|
226
227
|
k=(a.M.Aa(b)||G).C().J();e=Mi(a);d=P(d,k);e=Vc(d,e);c.pd=d;c.qd=e;c.Da=a.Id++;c=pi(a.M,b,e,c.Da,c.df);bc(a.fa,b,c);Ti(a)}else c.he(),c.pd=null,c.qd=null,c.I&&(a=new W(c.od,new X(a,c.path),Q),c.I(null,!1,a))}function Ti(a,b){var c=b||a.xc;b||Ui(a,c);if(null!==c.Ea()){var d=Vi(a,c);N(0<d.length,"Sending zero length transaction queue");Ra(d,function(a){return 1===a.status})&&Wi(a,c.path(),d)}else c.wd()&&c.R(function(b){Ti(a,b)})}
|
|
227
228
|
function Wi(a,b,c){for(var d=Pa(c,function(a){return a.Da}),e=a.M.Aa(b,d)||G,d=e,e=e.hash(),f=0;f<c.length;f++){var g=c[f];N(1===g.status,"tryToSendTransactionQueue_: items in queue should all be run.");g.status=2;g.Qf++;var k=jf(b,g.path),d=d.H(k,g.pd)}d=d.J(!0);a.da.put(b.toString(),d,function(d){a.f("transaction put response",{path:b.toString(),status:d});var e=[];if("ok"===d){d=[];for(f=0;f<c.length;f++){c[f].status=3;e=e.concat(si(a.M,c[f].Da));if(c[f].I){var g=c[f].qd,k=new X(a,c[f].path);d.push(u(c[f].I,
|
|
228
229
|
null,null,!0,new W(g,k,Q)))}c[f].he()}Ui(a,Vf(a.xc,b));Ti(a);bc(a.fa,b,e);for(f=0;f<d.length;f++)ec(d[f])}else{if("datastale"===d)for(f=0;f<c.length;f++)c[f].status=4===c[f].status?5:1;else for(R("transaction at "+b.toString()+" failed: "+d),f=0;f<c.length;f++)c[f].status=5,c[f].je=d;Ni(a,b)}},e)}function Ni(a,b){var c=Xi(a,b),d=c.path(),c=Vi(a,c);Yi(a,c,d);return d}
|
|
229
|
-
function Yi(a,b,c){if(0!==b.length){for(var d=[],e=[],f=
|
|
230
|
-
J&&y(J,".priority")||(m=m.ia(x.C())),x=k.Da,J=Mi(a),J=Vc(m,J),k.pd=m,k.qd=J,k.Da=a.Id++,Ua(f,x),e=e.concat(pi(a.M,k.path,J,k.Da,k.df)),e=e.concat(si(a.M,x,!0))):(l=!0,r="nodata",e=e.concat(si(a.M,k.Da,!0)))}bc(a.fa,c,e);e=[];l&&(b[g].status=3,setTimeout(b[g].he,Math.floor(0)),b[g].I&&("nodata"===r?(k=new X(a,b[g].path),d.push(u(b[g].I,null,null,!1,new W(b[g].od,k,Q)))):d.push(u(b[g].I,null,Error(r),!1,null))))}Ui(a,a.xc);for(g=0;g<d.length;g++)ec(d[g]);
|
|
231
|
-
function Xi(a,b){for(var c,d=a.xc;null!==(c=I(b))&&null===d.Ea();)d=Vf(d,c),b=M(b);return d}function Vi(a,b){var c=[];Zi(a,b,c);c.sort(function(a,b){return a.Kf-b.Kf});return c}function Zi(a,b,c){var d=b.Ea();if(null!==d)for(var e=0;e<d.length;e++)c.push(d[e]);b.R(function(b){Zi(a,b,c)})}function Ui(a,b){var c=b.Ea();if(c){for(var d=0,e=0;e<c.length;e++)3!==c[e].status&&(c[d]=c[e],d++);c.length=d;Wf(b,0<c.length?c:null)}b.R(function(b){Ui(a,b)})}
|
|
230
|
+
function Yi(a,b,c){if(0!==b.length){for(var d=[],e=[],f=Oa(b,function(a){return 1===a.status}),f=Pa(f,function(a){return a.Da}),g=0;g<b.length;g++){var k=b[g],m=jf(c,k.path),l=!1,r;N(null!==m,"rerunTransactionsUnderNode_: relativePath should not be null.");if(5===k.status)l=!0,r=k.je,e=e.concat(si(a.M,k.Da,!0));else if(1===k.status)if(25<=k.Qf)l=!0,r="maxretry",e=e.concat(si(a.M,k.Da,!0));else{var x=a.M.Aa(k.path,f)||G;k.od=x;var J=b[g].update(x.J());p(J)?(fg("transaction failed: Data returned ",
|
|
231
|
+
J,k.path),m=P(J),"object"===typeof J&&null!=J&&y(J,".priority")||(m=m.ia(x.C())),x=k.Da,J=Mi(a),J=Vc(m,J),k.pd=m,k.qd=J,k.Da=a.Id++,Ua(f,x),e=e.concat(pi(a.M,k.path,J,k.Da,k.df)),e=e.concat(si(a.M,x,!0))):(l=!0,r="nodata",e=e.concat(si(a.M,k.Da,!0)))}bc(a.fa,c,e);e=[];l&&(b[g].status=3,setTimeout(b[g].he,Math.floor(0)),b[g].I&&("nodata"===r?(k=new X(a,b[g].path),d.push(u(b[g].I,null,null,!1,new W(b[g].od,k,Q)))):d.push(u(b[g].I,null,Error(r),!1,null))))}Ui(a,a.xc);for(g=0;g<d.length;g++)ec(d[g]);
|
|
232
|
+
Ti(a)}}function Xi(a,b){for(var c,d=a.xc;null!==(c=I(b))&&null===d.Ea();)d=Vf(d,c),b=M(b);return d}function Vi(a,b){var c=[];Zi(a,b,c);c.sort(function(a,b){return a.Kf-b.Kf});return c}function Zi(a,b,c){var d=b.Ea();if(null!==d)for(var e=0;e<d.length;e++)c.push(d[e]);b.R(function(b){Zi(a,b,c)})}function Ui(a,b){var c=b.Ea();if(c){for(var d=0,e=0;e<c.length;e++)3!==c[e].status&&(c[d]=c[e],d++);c.length=d;Wf(b,0<c.length?c:null)}b.R(function(b){Ui(a,b)})}
|
|
232
233
|
function Qi(a,b){var c=Xi(a,b).path(),d=Vf(a.xc,b);Zf(d,function(b){$i(a,b)});$i(a,d);Yf(d,function(b){$i(a,b)});return c}
|
|
233
234
|
function $i(a,b){var c=b.Ea();if(null!==c){for(var d=[],e=[],f=-1,g=0;g<c.length;g++)4!==c[g].status&&(2===c[g].status?(N(f===g-1,"All SENT items should be at beginning of queue."),f=g,c[g].status=4,c[g].je="set"):(N(1===c[g].status,"Unexpected transaction status in abort"),c[g].he(),e=e.concat(si(a.M,c[g].Da,!0)),c[g].I&&d.push(u(c[g].I,null,Error("set"),!1,null))));-1===f?Wf(b,null):c.length=f+1;bc(a.fa,b.path(),e);for(g=0;g<d.length;g++)ec(d[g])}};function aj(){this.rc={};this.$f=!1}aj.prototype.Ab=function(){for(var a in this.rc)this.rc[a].Ab()};aj.prototype.uc=function(){for(var a in this.rc)this.rc[a].uc()};aj.prototype.ve=function(){this.$f=!0};ba(aj);aj.prototype.interrupt=aj.prototype.Ab;aj.prototype.resume=aj.prototype.uc;function Y(a,b,c,d){this.k=a;this.path=b;this.n=c;this.nc=d}
|
|
234
235
|
function bj(a){var b=null,c=null;a.oa&&(b=Nd(a));a.ra&&(c=Pd(a));if(a.g===pe){if(a.oa){if("[MIN_NAME]"!=Ld(a))throw Error("Query: When ordering by key, you may only pass one argument to startAt(), endAt(), or equalTo().");if("string"!==typeof b)throw Error("Query: When ordering by key, the argument passed to startAt(), endAt(),or equalTo() must be a string.");}if(a.ra){if("[MAX_NAME]"!=Od(a))throw Error("Query: When ordering by key, you may only pass one argument to startAt(), endAt(), or equalTo().");if("string"!==
|
|
@@ -236,19 +237,19 @@ typeof c)throw Error("Query: When ordering by key, the argument passed to startA
|
|
|
236
237
|
}function cj(a){if(a.oa&&a.ra&&a.la&&(!a.la||""===a.Pb))throw Error("Query: Can't combine startAt(), endAt(), and limit(). Use limitToFirst() or limitToLast() instead.");}function dj(a,b){if(!0===a.nc)throw Error(b+": You can't combine multiple orderBy calls.");}h=Y.prototype;h.Kb=function(){C("Query.ref",0,0,arguments.length);return new X(this.k,this.path)};
|
|
237
238
|
h.Gb=function(a,b,c,d){C("Query.on",2,4,arguments.length);jg("Query.on",a,!1);E("Query.on",2,b,!1);var e=ej("Query.on",c,d);if("value"===a)Ri(this.k,this,new ii(b,e.cancel||null,e.Pa||null));else{var f={};f[a]=b;Ri(this.k,this,new ji(f,e.cancel,e.Pa))}return b};
|
|
238
239
|
h.kc=function(a,b,c){C("Query.off",0,3,arguments.length);jg("Query.off",a,!0);E("Query.off",2,b,!0);Ob("Query.off",3,c);var d=null,e=null;"value"===a?d=new ii(b||null,null,c||null):a&&(b&&(e={},e[a]=b),d=new ji(e,null,c||null));e=this.k;d=".info"===I(this.path)?e.Cd.lb(this,d):e.M.lb(this,d);$b(e.fa,this.path,d)};
|
|
239
|
-
h.
|
|
240
|
+
h.Og=function(a,b){function c(k){f&&(f=!1,e.kc(a,c),b&&b.call(d.Pa,k),g.resolve(k))}C("Query.once",1,4,arguments.length);jg("Query.once",a,!1);E("Query.once",2,b,!0);var d=ej("Query.once",arguments[2],arguments[3]),e=this,f=!0,g=new A;Lb(g.D);this.Gb(a,c,function(b){e.kc(a,c);d.cancel&&d.cancel.call(d.Pa,b);g.reject(b)});return g.D};
|
|
240
241
|
h.He=function(a){R("Query.limit() being deprecated. Please use Query.limitToFirst() or Query.limitToLast() instead.");C("Query.limit",1,1,arguments.length);if(!fa(a)||Math.floor(a)!==a||0>=a)throw Error("Query.limit: First argument must be a positive integer.");if(this.n.la)throw Error("Query.limit: Limit was already set (by another call to limit, limitToFirst, orlimitToLast.");var b=this.n.He(a);cj(b);return new Y(this.k,this.path,b,this.nc)};
|
|
241
242
|
h.Ie=function(a){C("Query.limitToFirst",1,1,arguments.length);if(!fa(a)||Math.floor(a)!==a||0>=a)throw Error("Query.limitToFirst: First argument must be a positive integer.");if(this.n.la)throw Error("Query.limitToFirst: Limit was already set (by another call to limit, limitToFirst, or limitToLast).");return new Y(this.k,this.path,this.n.Ie(a),this.nc)};
|
|
242
243
|
h.Je=function(a){C("Query.limitToLast",1,1,arguments.length);if(!fa(a)||Math.floor(a)!==a||0>=a)throw Error("Query.limitToLast: First argument must be a positive integer.");if(this.n.la)throw Error("Query.limitToLast: Limit was already set (by another call to limit, limitToFirst, or limitToLast).");return new Y(this.k,this.path,this.n.Je(a),this.nc)};
|
|
243
|
-
h.
|
|
244
|
-
b=new te(b);b=De(this.n,b);bj(b);return new Y(this.k,this.path,b,!0)};h.
|
|
245
|
-
h.
|
|
244
|
+
h.Pg=function(a){C("Query.orderByChild",1,1,arguments.length);if("$key"===a)throw Error('Query.orderByChild: "$key" is invalid. Use Query.orderByKey() instead.');if("$priority"===a)throw Error('Query.orderByChild: "$priority" is invalid. Use Query.orderByPriority() instead.');if("$value"===a)throw Error('Query.orderByChild: "$value" is invalid. Use Query.orderByValue() instead.');lg("Query.orderByChild",a);dj(this,"Query.orderByChild");var b=new O(a);if(b.e())throw Error("Query.orderByChild: cannot pass in empty path. Use Query.orderByValue() instead.");
|
|
245
|
+
b=new te(b);b=De(this.n,b);bj(b);return new Y(this.k,this.path,b,!0)};h.Qg=function(){C("Query.orderByKey",0,0,arguments.length);dj(this,"Query.orderByKey");var a=De(this.n,pe);bj(a);return new Y(this.k,this.path,a,!0)};h.Rg=function(){C("Query.orderByPriority",0,0,arguments.length);dj(this,"Query.orderByPriority");var a=De(this.n,Q);bj(a);return new Y(this.k,this.path,a,!0)};
|
|
246
|
+
h.Sg=function(){C("Query.orderByValue",0,0,arguments.length);dj(this,"Query.orderByValue");var a=De(this.n,ze);bj(a);return new Y(this.k,this.path,a,!0)};h.$d=function(a,b){C("Query.startAt",0,2,arguments.length);eg("Query.startAt",a,this.path,!0);kg("Query.startAt",b);var c=this.n.$d(a,b);cj(c);bj(c);if(this.n.oa)throw Error("Query.startAt: Starting point was already set (by another call to startAt or equalTo).");p(a)||(b=a=null);return new Y(this.k,this.path,c,this.nc)};
|
|
246
247
|
h.sd=function(a,b){C("Query.endAt",0,2,arguments.length);eg("Query.endAt",a,this.path,!0);kg("Query.endAt",b);var c=this.n.sd(a,b);cj(c);bj(c);if(this.n.ra)throw Error("Query.endAt: Ending point was already set (by another call to endAt or equalTo).");return new Y(this.k,this.path,c,this.nc)};
|
|
247
248
|
h.tg=function(a,b){C("Query.equalTo",1,2,arguments.length);eg("Query.equalTo",a,this.path,!1);kg("Query.equalTo",b);if(this.n.oa)throw Error("Query.equalTo: Starting point was already set (by another call to endAt or equalTo).");if(this.n.ra)throw Error("Query.equalTo: Ending point was already set (by another call to endAt or equalTo).");return this.$d(a,b).sd(a,b)};
|
|
248
249
|
h.toString=function(){C("Query.toString",0,0,arguments.length);for(var a=this.path,b="",c=a.aa;c<a.u.length;c++)""!==a.u[c]&&(b+="/"+encodeURIComponent(String(a.u[c])));return this.k.toString()+(b||"/")};h.wa=function(){var a=vd(Ee(this.n));return"{}"===a?"default":a};
|
|
249
|
-
function ej(a,b,c){var d={cancel:null,Pa:null};if(b&&c)d.cancel=b,E(a,3,d.cancel,!0),d.Pa=c,Ob(a,4,d.Pa);else if(b)if("object"===typeof b&&null!==b)d.Pa=b;else if("function"===typeof b)d.cancel=b;else throw Error(D(a,3,!0)+" must either be a cancel callback or a context object.");return d}Y.prototype.ref=Y.prototype.Kb;Y.prototype.on=Y.prototype.Gb;Y.prototype.off=Y.prototype.kc;Y.prototype.once=Y.prototype.
|
|
250
|
-
Y.prototype.limitToLast=Y.prototype.Je;Y.prototype.orderByChild=Y.prototype.
|
|
251
|
-
Z.Cg=function(a){var b=Rh.prototype.put;Rh.prototype.put=function(c,d,e,f){p(f)&&(f=a());b.call(this,c,d,e,f)};return function(){Rh.prototype.put=b}};Z.hijackHash=Z.Cg;Z.bg=bd;Z.ConnectionTarget=Z.bg;Z.wa=function(a){return a.wa()};Z.queryIdentifier=Z.wa;Z.
|
|
250
|
+
function ej(a,b,c){var d={cancel:null,Pa:null};if(b&&c)d.cancel=b,E(a,3,d.cancel,!0),d.Pa=c,Ob(a,4,d.Pa);else if(b)if("object"===typeof b&&null!==b)d.Pa=b;else if("function"===typeof b)d.cancel=b;else throw Error(D(a,3,!0)+" must either be a cancel callback or a context object.");return d}Y.prototype.ref=Y.prototype.Kb;Y.prototype.on=Y.prototype.Gb;Y.prototype.off=Y.prototype.kc;Y.prototype.once=Y.prototype.Og;Y.prototype.limit=Y.prototype.He;Y.prototype.limitToFirst=Y.prototype.Ie;
|
|
251
|
+
Y.prototype.limitToLast=Y.prototype.Je;Y.prototype.orderByChild=Y.prototype.Pg;Y.prototype.orderByKey=Y.prototype.Qg;Y.prototype.orderByPriority=Y.prototype.Rg;Y.prototype.orderByValue=Y.prototype.Sg;Y.prototype.startAt=Y.prototype.$d;Y.prototype.endAt=Y.prototype.sd;Y.prototype.equalTo=Y.prototype.tg;Y.prototype.toString=Y.prototype.toString;var Z={};Z.yc=Rh;Z.DataConnection=Z.yc;Rh.prototype.dh=function(a,b){this.Ha("q",{p:a},b)};Z.yc.prototype.simpleListen=Z.yc.prototype.dh;Rh.prototype.sg=function(a,b){this.Ha("echo",{d:a},b)};Z.yc.prototype.echo=Z.yc.prototype.sg;Rh.prototype.interrupt=Rh.prototype.Ab;Z.cg=Fh;Z.RealTimeConnection=Z.cg;Fh.prototype.sendRequest=Fh.prototype.Ha;Fh.prototype.close=Fh.prototype.close;
|
|
252
|
+
Z.Cg=function(a){var b=Rh.prototype.put;Rh.prototype.put=function(c,d,e,f){p(f)&&(f=a());b.call(this,c,d,e,f)};return function(){Rh.prototype.put=b}};Z.hijackHash=Z.Cg;Z.bg=bd;Z.ConnectionTarget=Z.bg;Z.wa=function(a){return a.wa()};Z.queryIdentifier=Z.wa;Z.Fg=function(a){return a.k.Ua.ba};Z.listens=Z.Fg;Z.ve=function(a){a.ve()};Z.forceRestClient=Z.ve;function X(a,b){var c,d,e;if(a instanceof Ji)c=a,d=b;else{C("new Firebase",1,2,arguments.length);d=qd(arguments[0]);c=d.fh;"firebase"===d.domain&&pd(d.host+" is no longer supported. Please use <YOUR FIREBASE>.firebaseio.com instead");c&&"undefined"!=c||pd("Cannot parse Firebase url. Please use https://<YOUR FIREBASE>.firebaseio.com");d.mb||"undefined"!==typeof window&&window.location&&window.location.protocol&&-1!==window.location.protocol.indexOf("https:")&&R("Insecure Firebase access from a secure page. Please use https in calls to new Firebase().");
|
|
252
253
|
c=new bd(d.host,d.mb,c,"ws"===d.scheme||"wss"===d.scheme);d=new O(d.oc);e=d.toString();var f;!(f=!q(c.host)||0===c.host.length||!cg(c.jc))&&(f=0!==e.length)&&(e&&(e=e.replace(/^\/*\.info(\/|$)/,"/")),f=!(q(e)&&0!==e.length&&!ag.test(e)));if(f)throw Error(D("new Firebase",1,!1)+'must be a valid firebase URL and the path can\'t contain ".", "#", "$", "[", or "]".');if(b)if(b instanceof aj)e=b;else if(q(b))e=aj.wb(),c.Pd=b;else throw Error("Expected a valid Firebase.Context for second argument to new Firebase()");
|
|
253
254
|
else e=aj.wb();f=c.toString();var g=z(e.rc,f);g||(g=new Ji(c,e.$f),e.rc[f]=g);c=g}Y.call(this,c,d,Be,!1);this.then=void 0;this["catch"]=void 0}ka(X,Y);var fj=X,gj=["Firebase"],hj=n;gj[0]in hj||!hj.execScript||hj.execScript("var "+gj[0]);for(var ij;gj.length&&(ij=gj.shift());)!gj.length&&p(fj)?hj[ij]=fj:hj=hj[ij]?hj[ij]:hj[ij]={};X.goOffline=function(){C("Firebase.goOffline",0,0,arguments.length);aj.wb().Ab()};X.goOnline=function(){C("Firebase.goOnline",0,0,arguments.length);aj.wb().uc()};
|
|
254
255
|
X.enableLogging=md;X.ServerValue={TIMESTAMP:{".sv":"timestamp"}};X.SDK_VERSION=Cb;X.INTERNAL=U;X.Context=aj;X.TEST_ACCESS=Z;X.prototype.name=function(){R("Firebase.name() being deprecated. Please use Firebase.key() instead.");C("Firebase.name",0,0,arguments.length);return this.key()};X.prototype.name=X.prototype.name;X.prototype.key=function(){C("Firebase.key",0,0,arguments.length);return this.path.e()?null:ke(this.path)};X.prototype.key=X.prototype.key;
|
|
@@ -258,10 +259,10 @@ X.prototype.update=function(a,b){C("Firebase.update",1,2,arguments.length);mg("F
|
|
|
258
259
|
X.prototype.update=X.prototype.update;X.prototype.Mb=function(a,b,c){C("Firebase.setWithPriority",2,3,arguments.length);mg("Firebase.setWithPriority",this.path);eg("Firebase.setWithPriority",a,this.path,!1);ig("Firebase.setWithPriority",2,b);E("Firebase.setWithPriority",3,c,!0);if(".length"===this.key()||".keys"===this.key())throw"Firebase.setWithPriority failed: "+this.key()+" is a read-only object.";var d=new A;this.k.Mb(this.path,a,b,B(d,c));return d.D};X.prototype.setWithPriority=X.prototype.Mb;
|
|
259
260
|
X.prototype.remove=function(a){C("Firebase.remove",0,1,arguments.length);mg("Firebase.remove",this.path);E("Firebase.remove",1,a,!0);return this.set(null,a)};X.prototype.remove=X.prototype.remove;
|
|
260
261
|
X.prototype.transaction=function(a,b,c){C("Firebase.transaction",1,3,arguments.length);mg("Firebase.transaction",this.path);E("Firebase.transaction",1,a,!1);E("Firebase.transaction",2,b,!0);if(p(c)&&"boolean"!=typeof c)throw Error(D("Firebase.transaction",3,!0)+"must be a boolean.");if(".length"===this.key()||".keys"===this.key())throw"Firebase.transaction failed: "+this.key()+" is a read-only object.";"undefined"===typeof c&&(c=!0);var d=new A;t(b)&&Lb(d.D);Si(this.k,this.path,a,function(a,c,g){a?
|
|
261
|
-
d.reject(a):d.resolve(new ei(c,g));t(b)&&b(a,c,g)},c);return d.D};X.prototype.transaction=X.prototype.transaction;X.prototype
|
|
262
|
+
d.reject(a):d.resolve(new ei(c,g));t(b)&&b(a,c,g)},c);return d.D};X.prototype.transaction=X.prototype.transaction;X.prototype.$g=function(a,b){C("Firebase.setPriority",1,2,arguments.length);mg("Firebase.setPriority",this.path);ig("Firebase.setPriority",1,a);E("Firebase.setPriority",2,b,!0);var c=new A;this.k.Mb(this.path.o(".priority"),a,null,B(c,b));return c.D};X.prototype.setPriority=X.prototype.$g;
|
|
262
263
|
X.prototype.push=function(a,b){C("Firebase.push",0,2,arguments.length);mg("Firebase.push",this.path);eg("Firebase.push",a,this.path,!0);E("Firebase.push",2,b,!0);var c=Li(this.k),d=ff(c),c=this.o(d);if(null!=a){var e=this,f=c.set(a,b).then(function(){return e.o(d)});c.then=u(f.then,f);c["catch"]=u(f.then,f,void 0);t(b)&&Lb(f)}return c};X.prototype.push=X.prototype.push;X.prototype.jb=function(){mg("Firebase.onDisconnect",this.path);return new V(this.k,this.path)};X.prototype.onDisconnect=X.prototype.jb;
|
|
263
264
|
X.prototype.O=function(a,b,c){R("FirebaseRef.auth() being deprecated. Please use FirebaseRef.authWithCustomToken() instead.");C("Firebase.auth",1,3,arguments.length);ng("Firebase.auth",a);E("Firebase.auth",2,b,!0);E("Firebase.auth",3,b,!0);var d=new A;$g(this.k.O,a,{},{remember:"none"},B(d,b),c);return d.D};X.prototype.auth=X.prototype.O;X.prototype.ge=function(a){C("Firebase.unauth",0,1,arguments.length);E("Firebase.unauth",1,a,!0);var b=new A;ah(this.k.O,B(b,a));return b.D};X.prototype.unauth=X.prototype.ge;
|
|
264
|
-
X.prototype.xe=function(){C("Firebase.getAuth",0,0,arguments.length);return this.k.O.xe()};X.prototype.getAuth=X.prototype.xe;X.prototype.
|
|
265
|
+
X.prototype.xe=function(){C("Firebase.getAuth",0,0,arguments.length);return this.k.O.xe()};X.prototype.getAuth=X.prototype.xe;X.prototype.Hg=function(a,b){C("Firebase.onAuth",1,2,arguments.length);E("Firebase.onAuth",1,a,!1);Ob("Firebase.onAuth",2,b);this.k.O.Gb("auth_status",a,b)};X.prototype.onAuth=X.prototype.Hg;X.prototype.Gg=function(a,b){C("Firebase.offAuth",1,2,arguments.length);E("Firebase.offAuth",1,a,!1);Ob("Firebase.offAuth",2,b);this.k.O.kc("auth_status",a,b)};X.prototype.offAuth=X.prototype.Gg;
|
|
265
266
|
X.prototype.gg=function(a,b,c){C("Firebase.authWithCustomToken",1,3,arguments.length);2===arguments.length&&Fb(b)&&(c=b,b=void 0);ng("Firebase.authWithCustomToken",a);E("Firebase.authWithCustomToken",2,b,!0);qg("Firebase.authWithCustomToken",3,c,!0);var d=new A;$g(this.k.O,a,{},c||{},B(d,b));return d.D};X.prototype.authWithCustomToken=X.prototype.gg;
|
|
266
267
|
X.prototype.hg=function(a,b,c){C("Firebase.authWithOAuthPopup",1,3,arguments.length);2===arguments.length&&Fb(b)&&(c=b,b=void 0);pg("Firebase.authWithOAuthPopup",a);E("Firebase.authWithOAuthPopup",2,b,!0);qg("Firebase.authWithOAuthPopup",3,c,!0);var d=new A;eh(this.k.O,a,c,B(d,b));return d.D};X.prototype.authWithOAuthPopup=X.prototype.hg;
|
|
267
268
|
X.prototype.ig=function(a,b,c){C("Firebase.authWithOAuthRedirect",1,3,arguments.length);2===arguments.length&&Fb(b)&&(c=b,b=void 0);pg("Firebase.authWithOAuthRedirect",a);E("Firebase.authWithOAuthRedirect",2,b,!1);qg("Firebase.authWithOAuthRedirect",3,c,!0);var d=new A,e=this.k.O,f=c,g=B(d,b);ch(e);var k=[Mg],f=yg(f);"anonymous"===a||"firebase"===a?S(g,T("TRANSPORT_UNAVAILABLE")):(ad.set("redirect_client_options",f.nd),dh(e,k,"/auth/"+a,f,g));return d.D};X.prototype.authWithOAuthRedirect=X.prototype.ig;
|
package/lib/firebase-web.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/*! @license Firebase v2.4.
|
|
1
|
+
/*! @license Firebase v2.4.2
|
|
2
2
|
License: https://www.firebase.com/terms/terms-of-service.html */
|
|
3
3
|
(function() {var h,n=this;function p(a){return void 0!==a}function aa(){}function ba(a){a.yb=function(){return a.zf?a.zf:a.zf=new a}}
|
|
4
4
|
function ca(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";
|
|
5
5
|
else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function da(a){return"array"==ca(a)}function ea(a){var b=ca(a);return"array"==b||"object"==b&&"number"==typeof a.length}function q(a){return"string"==typeof a}function fa(a){return"number"==typeof a}function r(a){return"function"==ca(a)}function ga(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}function ha(a,b,c){return a.call.apply(a.bind,arguments)}
|
|
6
6
|
function ia(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)}}function u(a,b,c){u=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?ha:ia;return u.apply(null,arguments)}var ja=Date.now||function(){return+new Date};
|
|
7
|
-
function ka(a,b){function c(){}c.prototype=b.prototype;a.
|
|
7
|
+
function ka(a,b){function c(){}c.prototype=b.prototype;a.ph=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.lh=function(a,c,f){for(var g=Array(arguments.length-2),k=2;k<arguments.length;k++)g[k-2]=arguments[k];return b.prototype[c].apply(a,g)}};function la(a){if(Error.captureStackTrace)Error.captureStackTrace(this,la);else{var b=Error().stack;b&&(this.stack=b)}a&&(this.message=String(a))}ka(la,Error);la.prototype.name="CustomError";function v(a,b){for(var c in a)b.call(void 0,a[c],c,a)}function ma(a,b){var c={},d;for(d in a)c[d]=b.call(void 0,a[d],d,a);return c}function na(a,b){for(var c in a)if(!b.call(void 0,a[c],c,a))return!1;return!0}function oa(a){var b=0,c;for(c in a)b++;return b}function pa(a){for(var b in a)return b}function qa(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b}function ra(a){var b=[],c=0,d;for(d in a)b[c++]=d;return b}function sa(a,b){for(var c in a)if(a[c]==b)return!0;return!1}
|
|
8
8
|
function ta(a,b,c){for(var d in a)if(b.call(c,a[d],d,a))return d}function ua(a,b){var c=ta(a,b,void 0);return c&&a[c]}function va(a){for(var b in a)return!1;return!0}function wa(a){var b={},c;for(c in a)b[c]=a[c];return b}var xa="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");
|
|
9
9
|
function ya(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<xa.length;f++)c=xa[f],Object.prototype.hasOwnProperty.call(d,c)&&(a[c]=d[c])}};function za(a){a=String(a);if(/^\s*$/.test(a)?0:/^[\],:{}\s\u2028\u2029]*$/.test(a.replace(/\\["\\\/bfnrtu]/g,"@").replace(/"[^"\\\n\r\u2028\u2029\x00-\x08\x0a-\x1f]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:[\s\u2028\u2029]*\[)+/g,"")))try{return eval("("+a+")")}catch(b){}throw Error("Invalid JSON string: "+a);}function Aa(){this.Vd=void 0}
|
|
10
10
|
function Ba(a,b,c){switch(typeof b){case "string":Ca(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(null==b){c.push("null");break}if(da(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],Ba(a,a.Vd?a.Vd.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d),Ca(f,c),
|
|
@@ -22,10 +22,10 @@ document.createElement("script");b.onreadystatechange=function(){b.onreadystatec
|
|
|
22
22
|
function fb(){for(;db.length;){var a=db;db=[];for(var b=0;b<a.length;b++){var c=a[b];try{c.yg.call(c.scope)}catch(d){Xa(d)}}}cb=!1}function eb(a,b){this.yg=a;this.scope=b};var gb=-1!=w.indexOf("Opera")||-1!=w.indexOf("OPR"),hb=-1!=w.indexOf("Trident")||-1!=w.indexOf("MSIE"),ib=-1!=w.indexOf("Gecko")&&-1==w.toLowerCase().indexOf("webkit")&&!(-1!=w.indexOf("Trident")||-1!=w.indexOf("MSIE")),jb=-1!=w.toLowerCase().indexOf("webkit");
|
|
23
23
|
(function(){var a="",b;if(gb&&n.opera)return a=n.opera.version,r(a)?a():a;ib?b=/rv\:([^\);]+)(\)|;)/:hb?b=/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/:jb&&(b=/WebKit\/(\S+)/);b&&(a=(a=b.exec(w))?a[1]:"");return hb&&(b=(b=n.document)?b.documentMode:void 0,b>parseFloat(a))?String(b):a})();var kb=null,lb=null,mb=null;function nb(a,b){if(!ea(a))throw Error("encodeByteArray takes an array as a parameter");ob();for(var c=b?lb:kb,d=[],e=0;e<a.length;e+=3){var f=a[e],g=e+1<a.length,k=g?a[e+1]:0,m=e+2<a.length,l=m?a[e+2]:0,t=f>>2,f=(f&3)<<4|k>>4,k=(k&15)<<2|l>>6,l=l&63;m||(l=64,g||(k=64));d.push(c[t],c[f],c[k],c[l])}return d.join("")}
|
|
24
24
|
function ob(){if(!kb){kb={};lb={};mb={};for(var a=0;65>a;a++)kb[a]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(a),lb[a]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_.".charAt(a),mb[lb[a]]=a,62<=a&&(mb["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(a)]=a)}};function pb(a,b){this.N=qb;this.Rf=void 0;this.Ba=this.Ha=null;this.yd=this.ye=!1;if(a==rb)sb(this,tb,b);else try{var c=this;a.call(b,function(a){sb(c,tb,a)},function(a){if(!(a instanceof ub))try{if(a instanceof Error)throw a;throw Error("Promise rejected.");}catch(b){}sb(c,vb,a)})}catch(d){sb(this,vb,d)}}var qb=0,tb=2,vb=3;function rb(){}pb.prototype.then=function(a,b,c){return wb(this,r(a)?a:null,r(b)?b:null,c)};pb.prototype.then=pb.prototype.then;pb.prototype.$goog_Thenable=!0;h=pb.prototype;
|
|
25
|
-
h.
|
|
25
|
+
h.gh=function(a,b){return wb(this,null,a,b)};h.cancel=function(a){this.N==qb&&$a(function(){var b=new ub(a);xb(this,b)},this)};function xb(a,b){if(a.N==qb)if(a.Ha){var c=a.Ha;if(c.Ba){for(var d=0,e=-1,f=0,g;g=c.Ba[f];f++)if(g=g.o)if(d++,g==a&&(e=f),0<=e&&1<d)break;0<=e&&(c.N==qb&&1==d?xb(c,b):(d=c.Ba.splice(e,1)[0],yb(c,d,vb,b)))}a.Ha=null}else sb(a,vb,b)}function zb(a,b){a.Ba&&a.Ba.length||a.N!=tb&&a.N!=vb||Ab(a);a.Ba||(a.Ba=[]);a.Ba.push(b)}
|
|
26
26
|
function wb(a,b,c,d){var e={o:null,Hf:null,Jf:null};e.o=new pb(function(a,g){e.Hf=b?function(c){try{var e=b.call(d,c);a(e)}catch(l){g(l)}}:a;e.Jf=c?function(b){try{var e=c.call(d,b);!p(e)&&b instanceof ub?g(b):a(e)}catch(l){g(l)}}:g});e.o.Ha=a;zb(a,e);return e.o}h.Yf=function(a){this.N=qb;sb(this,tb,a)};h.Zf=function(a){this.N=qb;sb(this,vb,a)};
|
|
27
27
|
function sb(a,b,c){if(a.N==qb){if(a==c)b=vb,c=new TypeError("Promise cannot resolve to itself");else{var d;if(c)try{d=!!c.$goog_Thenable}catch(e){d=!1}else d=!1;if(d){a.N=1;c.then(a.Yf,a.Zf,a);return}if(ga(c))try{var f=c.then;if(r(f)){Bb(a,c,f);return}}catch(g){b=vb,c=g}}a.Rf=c;a.N=b;a.Ha=null;Ab(a);b!=vb||c instanceof ub||Cb(a,c)}}function Bb(a,b,c){function d(b){f||(f=!0,a.Zf(b))}function e(b){f||(f=!0,a.Yf(b))}a.N=1;var f=!1;try{c.call(b,e,d)}catch(g){d(g)}}
|
|
28
|
-
function Ab(a){a.ye||(a.ye=!0,$a(a.wg,a))}h.wg=function(){for(;this.Ba&&this.Ba.length;){var a=this.Ba;this.Ba=null;for(var b=0;b<a.length;b++)yb(this,a[b],this.N,this.Rf)}this.ye=!1};function yb(a,b,c,d){if(c==tb)b.Hf(d);else{if(b.o)for(;a&&a.yd;a=a.Ha)a.yd=!1;b.Jf(d)}}function Cb(a,b){a.yd=!0;$a(function(){a.yd&&Db.call(null,b)})}var Db=Xa;function ub(a){la.call(this,a)}ka(ub,la);ub.prototype.name="cancel";var Eb=Eb||"2.4.
|
|
28
|
+
function Ab(a){a.ye||(a.ye=!0,$a(a.wg,a))}h.wg=function(){for(;this.Ba&&this.Ba.length;){var a=this.Ba;this.Ba=null;for(var b=0;b<a.length;b++)yb(this,a[b],this.N,this.Rf)}this.ye=!1};function yb(a,b,c,d){if(c==tb)b.Hf(d);else{if(b.o)for(;a&&a.yd;a=a.Ha)a.yd=!1;b.Jf(d)}}function Cb(a,b){a.yd=!0;$a(function(){a.yd&&Db.call(null,b)})}var Db=Xa;function ub(a){la.call(this,a)}ka(ub,la);ub.prototype.name="cancel";var Eb=Eb||"2.4.2";function y(a,b){return Object.prototype.hasOwnProperty.call(a,b)}function z(a,b){if(Object.prototype.hasOwnProperty.call(a,b))return a[b]}function Fb(a,b){for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&b(c,a[c])}function Gb(a){var b={};Fb(a,function(a,d){b[a]=d});return b}function Hb(a){return"object"===typeof a&&null!==a};function Ib(a){var b=[];Fb(a,function(a,d){da(d)?Ma(d,function(d){b.push(encodeURIComponent(a)+"="+encodeURIComponent(d))}):b.push(encodeURIComponent(a)+"="+encodeURIComponent(d))});return b.length?"&"+b.join("&"):""}function Jb(a){var b={};a=a.replace(/^\?/,"").split("&");Ma(a,function(a){a&&(a=a.split("="),b[a[0]]=a[1])});return b};function Kb(a,b){if(!a)throw Lb(b);}function Lb(a){return Error("Firebase ("+Eb+") INTERNAL ASSERT FAILED: "+a)};var Mb=n.Promise||pb;pb.prototype["catch"]=pb.prototype.gh;function B(){var a=this;this.reject=this.resolve=null;this.D=new Mb(function(b,c){a.resolve=b;a.reject=c})}function C(a,b){return function(c,d){c?a.reject(c):a.resolve(d);r(b)&&(Nb(a.D),1===b.length?b(c):b(c,d))}}function Nb(a){a.then(void 0,aa)};function Ob(a){for(var b=[],c=0,d=0;d<a.length;d++){var e=a.charCodeAt(d);55296<=e&&56319>=e&&(e-=55296,d++,Kb(d<a.length,"Surrogate pair missing trail surrogate."),e=65536+(e<<10)+(a.charCodeAt(d)-56320));128>e?b[c++]=e:(2048>e?b[c++]=e>>6|192:(65536>e?b[c++]=e>>12|224:(b[c++]=e>>18|240,b[c++]=e>>12&63|128),b[c++]=e>>6&63|128),b[c++]=e&63|128)}return b}function Pb(a){for(var b=0,c=0;c<a.length;c++){var d=a.charCodeAt(c);128>d?b++:2048>d?b+=2:55296<=d&&56319>=d?(b+=4,c++):b+=3}return b};function D(a,b,c,d){var e;d<b?e="at least "+b:d>c&&(e=0===c?"none":"no more than "+c);if(e)throw Error(a+" failed: Was called with "+d+(1===d?" argument.":" arguments.")+" Expects "+e+".");}function E(a,b,c){var d="";switch(b){case 1:d=c?"first":"First";break;case 2:d=c?"second":"Second";break;case 3:d=c?"third":"Third";break;case 4:d=c?"fourth":"Fourth";break;default:throw Error("errorPrefix called with argumentNumber > 4. Need to update it?");}return a=a+" failed: "+(d+" argument ")}
|
|
29
29
|
function F(a,b,c,d){if((!d||p(c))&&!r(c))throw Error(E(a,b,d)+"must be a valid function.");}function Qb(a,b,c){if(p(c)&&(!ga(c)||null===c))throw Error(E(a,b,!0)+"must be a valid context object.");};function Rb(a){return"undefined"!==typeof JSON&&p(JSON.parse)?JSON.parse(a):za(a)}function G(a){if("undefined"!==typeof JSON&&p(JSON.stringify))a=JSON.stringify(a);else{var b=[];Ba(new Aa,a,b);a=b.join("")}return a};function Sb(){this.Zd=H}Sb.prototype.j=function(a){return this.Zd.S(a)};Sb.prototype.toString=function(){return this.Zd.toString()};function Tb(){}Tb.prototype.uf=function(){return null};Tb.prototype.Ce=function(){return null};var Ub=new Tb;function Vb(a,b,c){this.bg=a;this.Oa=b;this.Nd=c}Vb.prototype.uf=function(a){var b=this.Oa.Q;if(Wb(b,a))return b.j().T(a);b=null!=this.Nd?new Xb(this.Nd,!0,!1):this.Oa.w();return this.bg.Bc(a,b)};Vb.prototype.Ce=function(a,b,c){var d=null!=this.Nd?this.Nd:Yb(this.Oa);a=this.bg.qe(d,b,1,c,a);return 0===a.length?null:a[0]};function Zb(){this.xb=[]}function $b(a,b){for(var c=null,d=0;d<b.length;d++){var e=b[d],f=e.cc();null===c||f.ea(c.cc())||(a.xb.push(c),c=null);null===c&&(c=new ac(f));c.add(e)}c&&a.xb.push(c)}function bc(a,b,c){$b(a,c);cc(a,function(a){return a.ea(b)})}function dc(a,b,c){$b(a,c);cc(a,function(a){return a.contains(b)||b.contains(a)})}
|
|
30
30
|
function cc(a,b){for(var c=!0,d=0;d<a.xb.length;d++){var e=a.xb[d];if(e)if(e=e.cc(),b(e)){for(var e=a.xb[d],f=0;f<e.xd.length;f++){var g=e.xd[f];if(null!==g){e.xd[f]=null;var k=g.Zb();ec&&fc("event: "+g.toString());gc(k)}}a.xb[d]=null}else c=!1}c&&(a.xb=[])}function ac(a){this.ta=a;this.xd=[]}ac.prototype.add=function(a){this.xd.push(a)};ac.prototype.cc=function(){return this.ta};function J(a,b,c,d){this.type=a;this.Na=b;this.Za=c;this.Oe=d;this.Td=void 0}function hc(a){return new J(ic,a)}var ic="value";function jc(a,b,c,d){this.xe=b;this.be=c;this.Td=d;this.wd=a}jc.prototype.cc=function(){var a=this.be.Mb();return"value"===this.wd?a.path:a.parent().path};jc.prototype.De=function(){return this.wd};jc.prototype.Zb=function(){return this.xe.Zb(this)};jc.prototype.toString=function(){return this.cc().toString()+":"+this.wd+":"+G(this.be.qf())};function kc(a,b,c){this.xe=a;this.error=b;this.path=c}kc.prototype.cc=function(){return this.path};kc.prototype.De=function(){return"cancel"};
|
|
31
31
|
kc.prototype.Zb=function(){return this.xe.Zb(this)};kc.prototype.toString=function(){return this.path.toString()+":cancel"};function Xb(a,b,c){this.A=a;this.ga=b;this.Yb=c}function lc(a){return a.ga}function mc(a){return a.Yb}function nc(a,b){return b.e()?a.ga&&!a.Yb:Wb(a,K(b))}function Wb(a,b){return a.ga&&!a.Yb||a.A.Fa(b)}Xb.prototype.j=function(){return this.A};function oc(a){this.pg=a;this.Gd=null}oc.prototype.get=function(){var a=this.pg.get(),b=wa(a);if(this.Gd)for(var c in this.Gd)b[c]-=this.Gd[c];this.Gd=a;return b};function pc(a,b){this.Vf={};this.hd=new oc(a);this.da=b;var c=1E4+2E4*Math.random();setTimeout(u(this.Of,this),Math.floor(c))}pc.prototype.Of=function(){var a=this.hd.get(),b={},c=!1,d;for(d in a)0<a[d]&&y(this.Vf,d)&&(b[d]=a[d],c=!0);c&&this.da.Ye(b);setTimeout(u(this.Of,this),Math.floor(6E5*Math.random()))};function qc(){this.Hc={}}function rc(a,b,c){p(c)||(c=1);y(a.Hc,b)||(a.Hc[b]=0);a.Hc[b]+=c}qc.prototype.get=function(){return wa(this.Hc)};var sc={},tc={};function uc(a){a=a.toString();sc[a]||(sc[a]=new qc);return sc[a]}function vc(a,b){var c=a.toString();tc[c]||(tc[c]=b());return tc[c]};function L(a,b){this.name=a;this.U=b}function wc(a,b){return new L(a,b)};function xc(a,b){return yc(a.name,b.name)}function zc(a,b){return yc(a,b)};function Ac(a,b,c){this.type=Bc;this.source=a;this.path=b;this.Ja=c}Ac.prototype.$c=function(a){return this.path.e()?new Ac(this.source,M,this.Ja.T(a)):new Ac(this.source,N(this.path),this.Ja)};Ac.prototype.toString=function(){return"Operation("+this.path+": "+this.source.toString()+" overwrite: "+this.Ja.toString()+")"};function Cc(a,b){this.type=Dc;this.source=a;this.path=b}Cc.prototype.$c=function(){return this.path.e()?new Cc(this.source,M):new Cc(this.source,N(this.path))};Cc.prototype.toString=function(){return"Operation("+this.path+": "+this.source.toString()+" listen_complete)"};function Ec(a,b){this.Pa=a;this.xa=b?b:Fc}h=Ec.prototype;h.Sa=function(a,b){return new Ec(this.Pa,this.xa.Sa(a,b,this.Pa).$(null,null,!1,null,null))};h.remove=function(a){return new Ec(this.Pa,this.xa.remove(a,this.Pa).$(null,null,!1,null,null))};h.get=function(a){for(var b,c=this.xa;!c.e();){b=this.Pa(a,c.key);if(0===b)return c.value;0>b?c=c.left:0<b&&(c=c.right)}return null};
|
|
@@ -36,7 +36,7 @@ h.$=function(a,b,c,d,e){return new Kc(null!=a?a:this.key,null!=b?b:this.value,nu
|
|
|
36
36
|
h.Sa=function(a,b,c){var d,e;e=this;d=c(a,e.key);e=0>d?e.$(null,null,null,e.left.Sa(a,b,c),null):0===d?e.$(null,b,null,null,null):e.$(null,null,null,null,e.right.Sa(a,b,c));return Mc(e)};function Nc(a){if(a.left.e())return Fc;a.left.ha()||a.left.left.ha()||(a=Oc(a));a=a.$(null,null,null,Nc(a.left),null);return Mc(a)}
|
|
37
37
|
h.remove=function(a,b){var c,d;c=this;if(0>b(a,c.key))c.left.e()||c.left.ha()||c.left.left.ha()||(c=Oc(c)),c=c.$(null,null,null,c.left.remove(a,b),null);else{c.left.ha()&&(c=Pc(c));c.right.e()||c.right.ha()||c.right.left.ha()||(c=Qc(c),c.left.left.ha()&&(c=Pc(c),c=Qc(c)));if(0===b(a,c.key)){if(c.right.e())return Fc;d=Lc(c.right);c=c.$(d.key,d.value,null,null,Nc(c.right))}c=c.$(null,null,null,null,c.right.remove(a,b))}return Mc(c)};h.ha=function(){return this.color};
|
|
38
38
|
function Mc(a){a.right.ha()&&!a.left.ha()&&(a=Rc(a));a.left.ha()&&a.left.left.ha()&&(a=Pc(a));a.left.ha()&&a.right.ha()&&(a=Qc(a));return a}function Oc(a){a=Qc(a);a.right.left.ha()&&(a=a.$(null,null,null,null,Pc(a.right)),a=Rc(a),a=Qc(a));return a}function Rc(a){return a.right.$(null,null,a.color,a.$(null,null,!0,null,a.right.left),null)}function Pc(a){return a.left.$(null,null,a.color,null,a.$(null,null,!0,a.left.right,null))}
|
|
39
|
-
function Qc(a){return a.$(null,null,!a.color,a.left.$(null,null,!a.left.color,null,null),a.right.$(null,null,!a.right.color,null,null))}function Sc(){}h=Sc.prototype;h.$=function(){return this};h.Sa=function(a,b){return new Kc(a,b,null)};h.remove=function(){return this};h.count=function(){return 0};h.e=function(){return!0};h.ka=function(){return!1};h.Vc=function(){return null};h.jc=function(){return null};h.ha=function(){return!1};var Fc=new Sc;function Tc(a,b){return a&&"object"===typeof a?(O(".sv"in a,"Unexpected leaf node or priority contents"),b[a[".sv"]]):a}function Uc(a,b){var c=new Vc;Wc(a,new P(""),function(a,e){c.rc(a,Xc(e,b))});return c}function Xc(a,b){var c=a.C().J(),c=Tc(c,b),d;if(a.L()){var e=Tc(a.Ea(),b);return e!==a.Ea()||c!==a.C().J()?new Yc(e,Q(c)):a}d=a;c!==a.C().J()&&(d=d.ia(new Yc(c)));a.R(R,function(a,c){var e=Xc(c,b);e!==c&&(d=d.W(a,e))});return d};function Zc(){this.Ac={}}Zc.prototype.set=function(a,b){null==b?delete this.Ac[a]:this.Ac[a]=b};Zc.prototype.get=function(a){return y(this.Ac,a)?this.Ac[a]:null};Zc.prototype.remove=function(a){delete this.Ac[a]};Zc.prototype.Af=!0;function $c(a){this.Ic=a;this.Sd="firebase:"}h=$c.prototype;h.set=function(a,b){null==b?this.Ic.removeItem(this.Sd+a):this.Ic.setItem(this.Sd+a,G(b))};h.get=function(a){a=this.Ic.getItem(this.Sd+a);return null==a?null:Rb(a)};h.remove=function(a){this.Ic.removeItem(this.Sd+a)};h.Af=!1;h.toString=function(){return this.Ic.toString()};function ad(a){try{if("undefined"!==typeof window&&"undefined"!==typeof window[a]){var b=window[a];b.setItem("firebase:sentinel","cache");b.removeItem("firebase:sentinel");return new $c(b)}}catch(c){}return new Zc}var bd=ad("localStorage"),cd=ad("sessionStorage");function dd(a,b,c,d,e){this.host=a.toLowerCase();this.domain=this.host.substr(this.host.indexOf(".")+1);this.ob=b;this.lc=c;this.
|
|
39
|
+
function Qc(a){return a.$(null,null,!a.color,a.left.$(null,null,!a.left.color,null,null),a.right.$(null,null,!a.right.color,null,null))}function Sc(){}h=Sc.prototype;h.$=function(){return this};h.Sa=function(a,b){return new Kc(a,b,null)};h.remove=function(){return this};h.count=function(){return 0};h.e=function(){return!0};h.ka=function(){return!1};h.Vc=function(){return null};h.jc=function(){return null};h.ha=function(){return!1};var Fc=new Sc;function Tc(a,b){return a&&"object"===typeof a?(O(".sv"in a,"Unexpected leaf node or priority contents"),b[a[".sv"]]):a}function Uc(a,b){var c=new Vc;Wc(a,new P(""),function(a,e){c.rc(a,Xc(e,b))});return c}function Xc(a,b){var c=a.C().J(),c=Tc(c,b),d;if(a.L()){var e=Tc(a.Ea(),b);return e!==a.Ea()||c!==a.C().J()?new Yc(e,Q(c)):a}d=a;c!==a.C().J()&&(d=d.ia(new Yc(c)));a.R(R,function(a,c){var e=Xc(c,b);e!==c&&(d=d.W(a,e))});return d};function Zc(){this.Ac={}}Zc.prototype.set=function(a,b){null==b?delete this.Ac[a]:this.Ac[a]=b};Zc.prototype.get=function(a){return y(this.Ac,a)?this.Ac[a]:null};Zc.prototype.remove=function(a){delete this.Ac[a]};Zc.prototype.Af=!0;function $c(a){this.Ic=a;this.Sd="firebase:"}h=$c.prototype;h.set=function(a,b){null==b?this.Ic.removeItem(this.Sd+a):this.Ic.setItem(this.Sd+a,G(b))};h.get=function(a){a=this.Ic.getItem(this.Sd+a);return null==a?null:Rb(a)};h.remove=function(a){this.Ic.removeItem(this.Sd+a)};h.Af=!1;h.toString=function(){return this.Ic.toString()};function ad(a){try{if("undefined"!==typeof window&&"undefined"!==typeof window[a]){var b=window[a];b.setItem("firebase:sentinel","cache");b.removeItem("firebase:sentinel");return new $c(b)}}catch(c){}return new Zc}var bd=ad("localStorage"),cd=ad("sessionStorage");function dd(a,b,c,d,e){this.host=a.toLowerCase();this.domain=this.host.substr(this.host.indexOf(".")+1);this.ob=b;this.lc=c;this.jh=d;this.Rd=e||"";this.ab=bd.get("host:"+a)||this.host}function ed(a,b){b!==a.ab&&(a.ab=b,"s-"===a.ab.substr(0,2)&&bd.set("host:"+a.host,a.ab))}
|
|
40
40
|
function fd(a,b,c){O("string"===typeof b,"typeof type must == string");O("object"===typeof c,"typeof params must == object");if(b===gd)b=(a.ob?"wss://":"ws://")+a.ab+"/.ws?";else if(b===hd)b=(a.ob?"https://":"http://")+a.ab+"/.lp?";else throw Error("Unknown connection type: "+b);a.host!==a.ab&&(c.ns=a.lc);var d=[];v(c,function(a,b){d.push(b+"="+a)});return b+d.join("&")}dd.prototype.toString=function(){var a=(this.ob?"https://":"http://")+this.host;this.Rd&&(a+="<"+this.Rd+">");return a};var id=function(){var a=1;return function(){return a++}}(),O=Kb,jd=Lb;
|
|
41
41
|
function kd(a){try{var b;if("undefined"!==typeof atob)b=atob(a);else{ob();for(var c=mb,d=[],e=0;e<a.length;){var f=c[a.charAt(e++)],g=e<a.length?c[a.charAt(e)]:0;++e;var k=e<a.length?c[a.charAt(e)]:64;++e;var m=e<a.length?c[a.charAt(e)]:64;++e;if(null==f||null==g||null==k||null==m)throw Error();d.push(f<<2|g>>4);64!=k&&(d.push(g<<4&240|k>>2),64!=m&&d.push(k<<6&192|m))}if(8192>d.length)b=String.fromCharCode.apply(null,d);else{a="";for(c=0;c<d.length;c+=8192)a+=String.fromCharCode.apply(null,Ua(d,c,
|
|
42
42
|
c+8192));b=a}}return b}catch(l){fc("base64Decode failed: ",l)}return null}function ld(a){var b=Ob(a);a=new Ja;a.update(b);var b=[],c=8*a.ge;56>a.ec?a.update(a.Od,56-a.ec):a.update(a.Od,a.Ya-(a.ec-56));for(var d=a.Ya-1;56<=d;d--)a.pe[d]=c&255,c/=256;Ka(a,a.pe);for(d=c=0;5>d;d++)for(var e=24;0<=e;e-=8)b[c]=a.P[d]>>e&255,++c;return nb(b)}
|
|
@@ -44,12 +44,12 @@ function md(a){for(var b="",c=0;c<arguments.length;c++)b=ea(arguments[c])?b+md.a
|
|
|
44
44
|
function od(a,b){Kb(!b||!0===a||!1===a,"Can't turn on custom loggers persistently.");!0===a?("undefined"!==typeof console&&("function"===typeof console.log?ec=u(console.log,console):"object"===typeof console.log&&(ec=function(a){console.log(a)})),b&&cd.set("logging_enabled",!0)):r(a)?ec=a:(ec=null,cd.remove("logging_enabled"))}function fc(a){!0===nd&&(nd=!1,null===ec&&!0===cd.get("logging_enabled")&&od(!0));if(ec){var b=md.apply(null,arguments);ec(b)}}
|
|
45
45
|
function pd(a){return function(){fc(a,arguments)}}function qd(a){if("undefined"!==typeof console){var b="FIREBASE INTERNAL ERROR: "+md.apply(null,arguments);"undefined"!==typeof console.error?console.error(b):console.log(b)}}function rd(a){var b=md.apply(null,arguments);throw Error("FIREBASE FATAL ERROR: "+b);}function S(a){if("undefined"!==typeof console){var b="FIREBASE WARNING: "+md.apply(null,arguments);"undefined"!==typeof console.warn?console.warn(b):console.log(b)}}
|
|
46
46
|
function sd(a){var b="",c="",d="",e="",f=!0,g="https",k=443;if(q(a)){var m=a.indexOf("//");0<=m&&(g=a.substring(0,m-1),a=a.substring(m+2));m=a.indexOf("/");-1===m&&(m=a.length);b=a.substring(0,m);e="";a=a.substring(m).split("/");for(m=0;m<a.length;m++)if(0<a[m].length){var l=a[m];try{l=decodeURIComponent(l.replace(/\+/g," "))}catch(t){}e+="/"+l}a=b.split(".");3===a.length?(c=a[1],d=a[0].toLowerCase()):2===a.length&&(c=a[0]);m=b.indexOf(":");0<=m&&(f="https"===g||"wss"===g,k=b.substring(m+1),isFinite(k)&&
|
|
47
|
-
(k=String(k)),k=q(k)?/^\s*-?0x/i.test(k)?parseInt(k,16):parseInt(k,10):NaN)}return{host:b,port:k,domain:c,
|
|
47
|
+
(k=String(k)),k=q(k)?/^\s*-?0x/i.test(k)?parseInt(k,16):parseInt(k,10):NaN)}return{host:b,port:k,domain:c,fh:d,ob:f,scheme:g,bd:e}}function td(a){return fa(a)&&(a!=a||a==Number.POSITIVE_INFINITY||a==Number.NEGATIVE_INFINITY)}
|
|
48
48
|
function ud(a){if("complete"===document.readyState)a();else{var b=!1,c=function(){document.body?b||(b=!0,a()):setTimeout(c,Math.floor(10))};document.addEventListener?(document.addEventListener("DOMContentLoaded",c,!1),window.addEventListener("load",c,!1)):document.attachEvent&&(document.attachEvent("onreadystatechange",function(){"complete"===document.readyState&&c()}),window.attachEvent("onload",c))}}
|
|
49
49
|
function yc(a,b){if(a===b)return 0;if("[MIN_NAME]"===a||"[MAX_NAME]"===b)return-1;if("[MIN_NAME]"===b||"[MAX_NAME]"===a)return 1;var c=vd(a),d=vd(b);return null!==c?null!==d?0==c-d?a.length-b.length:c-d:-1:null!==d?1:a<b?-1:1}function wd(a,b){if(b&&a in b)return b[a];throw Error("Missing required key ("+a+") in object: "+G(b));}
|
|
50
50
|
function xd(a){if("object"!==typeof a||null===a)return G(a);var b=[],c;for(c in a)b.push(c);b.sort();c="{";for(var d=0;d<b.length;d++)0!==d&&(c+=","),c+=G(b[d]),c+=":",c+=xd(a[b[d]]);return c+"}"}function yd(a,b){if(a.length<=b)return[a];for(var c=[],d=0;d<a.length;d+=b)d+b>a?c.push(a.substring(d,a.length)):c.push(a.substring(d,d+b));return c}function zd(a,b){if(da(a))for(var c=0;c<a.length;++c)b(c,a[c]);else v(a,b)}
|
|
51
51
|
function Ad(a){O(!td(a),"Invalid JSON number");var b,c,d,e;0===a?(d=c=0,b=-Infinity===1/a?1:0):(b=0>a,a=Math.abs(a),a>=Math.pow(2,-1022)?(d=Math.min(Math.floor(Math.log(a)/Math.LN2),1023),c=d+1023,d=Math.round(a*Math.pow(2,52-d)-Math.pow(2,52))):(c=0,d=Math.round(a/Math.pow(2,-1074))));e=[];for(a=52;a;--a)e.push(d%2?1:0),d=Math.floor(d/2);for(a=11;a;--a)e.push(c%2?1:0),c=Math.floor(c/2);e.push(b?1:0);e.reverse();b=e.join("");c="";for(a=0;64>a;a+=8)d=parseInt(b.substr(a,8),2).toString(16),1===d.length&&
|
|
52
|
-
(d="0"+d),c+=d;return c.toLowerCase()}var Bd=/^-?\d{1,10}$/;function vd(a){return Bd.test(a)&&(a=Number(a),-2147483648<=a&&2147483647>=a)?a:null}function gc(a){try{a()}catch(b){setTimeout(function(){S("Exception was thrown by user callback.",b.stack||"");throw b;},Math.floor(0))}}function T(a,b){if(r(a)){var c=Array.prototype.slice.call(arguments,1).slice();gc(function(){a.apply(null,c)})}};function Cd(a){var b={},c={},d={},e="";try{var f=a.split("."),b=Rb(kd(f[0])||""),c=Rb(kd(f[1])||""),e=f[2],d=c.d||{};delete c.d}catch(g){}return{
|
|
52
|
+
(d="0"+d),c+=d;return c.toLowerCase()}var Bd=/^-?\d{1,10}$/;function vd(a){return Bd.test(a)&&(a=Number(a),-2147483648<=a&&2147483647>=a)?a:null}function gc(a){try{a()}catch(b){setTimeout(function(){S("Exception was thrown by user callback.",b.stack||"");throw b;},Math.floor(0))}}function T(a,b){if(r(a)){var c=Array.prototype.slice.call(arguments,1).slice();gc(function(){a.apply(null,c)})}};function Cd(a){var b={},c={},d={},e="";try{var f=a.split("."),b=Rb(kd(f[0])||""),c=Rb(kd(f[1])||""),e=f[2],d=c.d||{};delete c.d}catch(g){}return{mh:b,Ec:c,data:d,bh:e}}function Dd(a){a=Cd(a).Ec;return"object"===typeof a&&a.hasOwnProperty("iat")?z(a,"iat"):null}function Ed(a){a=Cd(a);var b=a.Ec;return!!a.bh&&!!b&&"object"===typeof b&&b.hasOwnProperty("iat")};function Fd(a){this.Y=a;this.g=a.n.g}function Gd(a,b,c,d){var e=[],f=[];Ma(b,function(b){"child_changed"===b.type&&a.g.Dd(b.Oe,b.Na)&&f.push(new J("child_moved",b.Na,b.Za))});Hd(a,e,"child_removed",b,d,c);Hd(a,e,"child_added",b,d,c);Hd(a,e,"child_moved",f,d,c);Hd(a,e,"child_changed",b,d,c);Hd(a,e,ic,b,d,c);return e}function Hd(a,b,c,d,e,f){d=Na(d,function(a){return a.type===c});Va(d,u(a.qg,a));Ma(d,function(c){var d=Id(a,c,f);Ma(e,function(e){e.Qf(c.type)&&b.push(e.createEvent(d,a.Y))})})}
|
|
53
53
|
function Id(a,b,c){"value"!==b.type&&"child_removed"!==b.type&&(b.Td=c.wf(b.Za,b.Na,a.g));return b}Fd.prototype.qg=function(a,b){if(null==a.Za||null==b.Za)throw jd("Should only compare child_ events.");return this.g.compare(new L(a.Za,a.Na),new L(b.Za,b.Na))};function Jd(){this.ib={}}
|
|
54
54
|
function Kd(a,b){var c=b.type,d=b.Za;O("child_added"==c||"child_changed"==c||"child_removed"==c,"Only child changes supported for tracking");O(".priority"!==d,"Only non-priority child changes can be tracked.");var e=z(a.ib,d);if(e){var f=e.type;if("child_added"==c&&"child_removed"==f)a.ib[d]=new J("child_changed",b.Na,d,e.Na);else if("child_removed"==c&&"child_added"==f)delete a.ib[d];else if("child_removed"==c&&"child_changed"==f)a.ib[d]=new J("child_removed",e.Oe,d);else if("child_changed"==c&&
|
|
55
55
|
"child_added"==f)a.ib[d]=new J("child_added",b.Na,d);else if("child_changed"==c&&"child_changed"==f)a.ib[d]=new J("child_changed",b.Na,d,e.Oe);else throw jd("Illegal combination of changes: "+b+" occurred after "+e);}else a.ib[d]=b};function Ld(a){this.g=a}h=Ld.prototype;h.H=function(a,b,c,d,e,f){O(a.Mc(this.g),"A node must be indexed if only a child is updated");e=a.T(b);if(e.S(d).ea(c.S(d))&&e.e()==c.e())return a;null!=f&&(c.e()?a.Fa(b)?Kd(f,new J("child_removed",e,b)):O(a.L(),"A child remove without an old child only makes sense on a leaf node"):e.e()?Kd(f,new J("child_added",c,b)):Kd(f,new J("child_changed",c,b,e)));return a.L()&&c.e()?a:a.W(b,c).pb(this.g)};
|
|
@@ -72,7 +72,7 @@ h.Sc=function(a,b){var c=Q(a),c=H.H(this.gc,c);return new L(b,c)};h.Tc=function(
|
|
|
72
72
|
h.Sc=function(a,b){var c=Q(a);return new L(b,new Yc("[PRIORITY-POST]",c))};h.toString=function(){return".priority"};var R=new xe;function ye(){}ka(ye,se);h=ye.prototype;h.compare=function(a,b){return yc(a.name,b.name)};h.Lc=function(){throw jd("KeyIndex.isDefinedOn not expected to be called.");};h.Dd=function(){return!1};h.Wc=function(){return ue};h.Tc=function(){return new L("[MAX_NAME]",H)};h.Sc=function(a){O(q(a),"KeyIndex indexValue must always be a string.");return new L(a,H)};h.toString=function(){return".key"};
|
|
73
73
|
var re=new ye;function ze(){}ka(ze,se);h=ze.prototype;h.compare=function(a,b){var c=a.U.Gc(b.U);return 0===c?yc(a.name,b.name):c};h.Lc=function(){return!0};h.Dd=function(a,b){return!a.ea(b)};h.Wc=function(){return ue};h.Tc=function(){return Ae};h.Sc=function(a,b){var c=Q(a);return new L(b,c)};h.toString=function(){return".value"};var Be=new ze;function Ce(){this.Xb=this.ra=this.Pb=this.oa=this.la=!1;this.ma=0;this.Rb="";this.ic=null;this.Bb="";this.fc=null;this.zb="";this.g=R}var De=new Ce;function Td(a){return""===a.Rb?a.oa:"l"===a.Rb}function Od(a){O(a.oa,"Only valid if start has been set");return a.ic}function Nd(a){O(a.oa,"Only valid if start has been set");return a.Pb?a.Bb:"[MIN_NAME]"}function Rd(a){O(a.ra,"Only valid if end has been set");return a.fc}
|
|
74
74
|
function Pd(a){O(a.ra,"Only valid if end has been set");return a.Xb?a.zb:"[MAX_NAME]"}function Ee(a){var b=new Ce;b.la=a.la;b.ma=a.ma;b.oa=a.oa;b.ic=a.ic;b.Pb=a.Pb;b.Bb=a.Bb;b.ra=a.ra;b.fc=a.fc;b.Xb=a.Xb;b.zb=a.zb;b.g=a.g;return b}h=Ce.prototype;h.Le=function(a){var b=Ee(this);b.la=!0;b.ma=a;b.Rb="";return b};h.Me=function(a){var b=Ee(this);b.la=!0;b.ma=a;b.Rb="l";return b};h.Ne=function(a){var b=Ee(this);b.la=!0;b.ma=a;b.Rb="r";return b};
|
|
75
|
-
h.ce=function(a,b){var c=Ee(this);c.oa=!0;p(a)||(a=null);c.ic=a;null!=b?(c.Pb=!0,c.Bb=b):(c.Pb=!1,c.Bb="");return c};h.vd=function(a,b){var c=Ee(this);c.ra=!0;p(a)||(a=null);c.fc=a;p(b)?(c.Xb=!0,c.zb=b):(c.
|
|
75
|
+
h.ce=function(a,b){var c=Ee(this);c.oa=!0;p(a)||(a=null);c.ic=a;null!=b?(c.Pb=!0,c.Bb=b):(c.Pb=!1,c.Bb="");return c};h.vd=function(a,b){var c=Ee(this);c.ra=!0;p(a)||(a=null);c.fc=a;p(b)?(c.Xb=!0,c.zb=b):(c.oh=!1,c.zb="");return c};function Fe(a,b){var c=Ee(a);c.g=b;return c}function Ge(a){var b={};a.oa&&(b.sp=a.ic,a.Pb&&(b.sn=a.Bb));a.ra&&(b.ep=a.fc,a.Xb&&(b.en=a.zb));if(a.la){b.l=a.ma;var c=a.Rb;""===c&&(c=Td(a)?"l":"r");b.vf=c}a.g!==R&&(b.i=a.g.toString());return b}
|
|
76
76
|
function He(a){return!(a.oa||a.ra||a.la)}function Ie(a){return He(a)&&a.g==R}function Je(a){var b={};if(Ie(a))return b;var c;a.g===R?c="$priority":a.g===Be?c="$value":a.g===re?c="$key":(O(a.g instanceof ve,"Unrecognized index type!"),c=a.g.toString());b.orderBy=G(c);a.oa&&(b.startAt=G(a.ic),a.Pb&&(b.startAt+=","+G(a.Bb)));a.ra&&(b.endAt=G(a.fc),a.Xb&&(b.endAt+=","+G(a.zb)));a.la&&(Td(a)?b.limitToFirst=a.ma:b.limitToLast=a.ma);return b}h.toString=function(){return G(Ge(this))};function Ke(a,b){this.Ed=a;this.hc=b}Ke.prototype.get=function(a){var b=z(this.Ed,a);if(!b)throw Error("No index defined for "+a);return b===te?null:b};function Le(a,b,c){var d=ma(a.Ed,function(d,f){var g=z(a.hc,f);O(g,"Missing index implementation for "+f);if(d===te){if(g.Lc(b.U)){for(var k=[],m=c.ac(wc),l=Ic(m);l;)l.name!=b.name&&k.push(l),l=Ic(m);k.push(b);return Me(k,Vd(g))}return te}g=c.get(b.name);k=d;g&&(k=k.remove(new L(b.name,g)));return k.Sa(b,b.U)});return new Ke(d,a.hc)}
|
|
77
77
|
function Ne(a,b,c){var d=ma(a.Ed,function(a){if(a===te)return a;var d=c.get(b.name);return d?a.remove(new L(b.name,d)):a});return new Ke(d,a.hc)}var Oe=new Ke({".priority":te},{".priority":R});function Yc(a,b){this.B=a;O(p(this.B)&&null!==this.B,"LeafNode shouldn't be created with null/undefined value.");this.ca=b||H;Pe(this.ca);this.Gb=null}var Qe=["object","boolean","number","string"];h=Yc.prototype;h.L=function(){return!0};h.C=function(){return this.ca};h.ia=function(a){return new Yc(this.B,a)};h.T=function(a){return".priority"===a?this.ca:H};h.S=function(a){return a.e()?this:".priority"===K(a)?this.ca:H};h.Fa=function(){return!1};h.wf=function(){return null};
|
|
78
78
|
h.W=function(a,b){return".priority"===a?this.ia(b):b.e()&&".priority"!==a?this:H.W(a,b).ia(this.ca)};h.H=function(a,b){var c=K(a);if(null===c)return b;if(b.e()&&".priority"!==c)return this;O(".priority"!==c||1===le(a),".priority must be the last token in a path");return this.W(c,H.H(N(a),b))};h.e=function(){return!1};h.Hb=function(){return 0};h.R=function(){return!1};h.J=function(a){return a&&!this.C().e()?{".value":this.Ea(),".priority":this.C().J()}:this.Ea()};
|
|
@@ -132,8 +132,8 @@ function wg(a,b){if(b.e())return a.B=null,a.m=null,!0;if(null!==a.B){if(a.B.L())
|
|
|
132
132
|
Bg.prototype.clear=function(){var a=this;Ma(this.ee,function(b){b.remove(a.Ue)})};function Cg(){return"undefined"!==typeof navigator&&"string"===typeof navigator.userAgent?navigator.userAgent:""}function Dg(){return"undefined"!==typeof window&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(Cg())}function Eg(){return"undefined"!==typeof location&&/^file:\//.test(location.href)}
|
|
133
133
|
function Fg(a){var b=Cg();if(""===b)return!1;if("Microsoft Internet Explorer"===navigator.appName){if((b=b.match(/MSIE ([0-9]{1,}[\.0-9]{0,})/))&&1<b.length)return parseFloat(b[1])>=a}else if(-1<b.indexOf("Trident")&&(b=b.match(/rv:([0-9]{2,2}[\.0-9]{0,})/))&&1<b.length)return parseFloat(b[1])>=a;return!1};function Gg(){var a=window.opener.frames,b;for(b=a.length-1;0<=b;b--)try{if(a[b].location.protocol===window.location.protocol&&a[b].location.host===window.location.host&&"__winchan_relay_frame"===a[b].name)return a[b]}catch(c){}return null}function Hg(a,b,c){a.attachEvent?a.attachEvent("on"+b,c):a.addEventListener&&a.addEventListener(b,c,!1)}function Ig(a,b,c){a.detachEvent?a.detachEvent("on"+b,c):a.removeEventListener&&a.removeEventListener(b,c,!1)}
|
|
134
134
|
function Jg(a){/^https?:\/\//.test(a)||(a=window.location.href);var b=/^(https?:\/\/[\-_a-zA-Z\.0-9:]+)/.exec(a);return b?b[1]:a}function Kg(a){var b="";try{a=a.replace(/.*\?/,"");var c=Jb(a);c&&y(c,"__firebase_request_key")&&(b=z(c,"__firebase_request_key"))}catch(d){}return b}function Lg(){try{var a=document.location.hash.replace(/&__firebase_request_key=([a-zA-z0-9]*)/,""),a=a.replace(/\?$/,""),a=a.replace(/^#+$/,"");document.location.hash=a}catch(b){}}
|
|
135
|
-
function Mg(){var a=sd(xg);return a.scheme+"://"+a.host+"/v2"}function Ng(a){return Mg()+"/"+a+"/auth/channel"};function Og(a){var b=this;this.hb=a;this.fe="*";Fg(8)?this.Uc=this.Cd=Gg():(this.Uc=window.opener,this.Cd=window);if(!b.Uc)throw"Unable to find relay frame";Hg(this.Cd,"message",u(this.nc,this));Hg(this.Cd,"message",u(this.Ff,this));try{Pg(this,{a:"ready"})}catch(c){Hg(this.Uc,"load",function(){Pg(b,{a:"ready"})})}Hg(window,"unload",u(this.
|
|
136
|
-
Og.prototype.nc=function(a){var b=this,c;try{c=Rb(a.data)}catch(d){}c&&"request"===c.a&&(Ig(window,"message",this.nc),this.fe=a.origin,this.hb&&setTimeout(function(){b.hb(b.fe,c.d,function(a,c){b.mg=!c;b.hb=void 0;Pg(b,{a:"response",d:a,forceKeepWindowOpen:c})})},0))};Og.prototype.
|
|
135
|
+
function Mg(){var a=sd(xg);return a.scheme+"://"+a.host+"/v2"}function Ng(a){return Mg()+"/"+a+"/auth/channel"};function Og(a){var b=this;this.hb=a;this.fe="*";Fg(8)?this.Uc=this.Cd=Gg():(this.Uc=window.opener,this.Cd=window);if(!b.Uc)throw"Unable to find relay frame";Hg(this.Cd,"message",u(this.nc,this));Hg(this.Cd,"message",u(this.Ff,this));try{Pg(this,{a:"ready"})}catch(c){Hg(this.Uc,"load",function(){Pg(b,{a:"ready"})})}Hg(window,"unload",u(this.Ng,this))}function Pg(a,b){b=G(b);Fg(8)?a.Uc.doPost(b,a.fe):a.Uc.postMessage(b,a.fe)}
|
|
136
|
+
Og.prototype.nc=function(a){var b=this,c;try{c=Rb(a.data)}catch(d){}c&&"request"===c.a&&(Ig(window,"message",this.nc),this.fe=a.origin,this.hb&&setTimeout(function(){b.hb(b.fe,c.d,function(a,c){b.mg=!c;b.hb=void 0;Pg(b,{a:"response",d:a,forceKeepWindowOpen:c})})},0))};Og.prototype.Ng=function(){try{Ig(this.Cd,"message",this.Ff)}catch(a){}this.hb&&(Pg(this,{a:"error",d:"unknown closed window"}),this.hb=void 0);try{window.close()}catch(b){}};Og.prototype.Ff=function(a){if(this.mg&&"die"===a.data)try{window.close()}catch(b){}};function Qg(a){this.tc=Fa()+Fa()+Fa();this.Kf=a}Qg.prototype.open=function(a,b){cd.set("redirect_request_id",this.tc);cd.set("redirect_request_id",this.tc);b.requestId=this.tc;b.redirectTo=b.redirectTo||window.location.href;a+=(/\?/.test(a)?"":"?")+Ib(b);window.location=a};Qg.isAvailable=function(){return!Eg()&&!Dg()};Qg.prototype.Fc=function(){return"redirect"};var Rg={NETWORK_ERROR:"Unable to contact the Firebase server.",SERVER_ERROR:"An unknown server error occurred.",TRANSPORT_UNAVAILABLE:"There are no login transports available for the requested method.",REQUEST_INTERRUPTED:"The browser redirected the page before the login request could complete.",USER_CANCELLED:"The user cancelled authentication."};function Sg(a){var b=Error(z(Rg,a),a);b.code=a;return b};function Tg(a){var b;(b=!a.window_features)||(b=Cg(),b=-1!==b.indexOf("Fennec/")||-1!==b.indexOf("Firefox/")&&-1!==b.indexOf("Android"));b&&(a.window_features=void 0);a.window_name||(a.window_name="_blank");this.options=a}
|
|
137
137
|
Tg.prototype.open=function(a,b,c){function d(a){g&&(document.body.removeChild(g),g=void 0);t&&(t=clearInterval(t));Ig(window,"message",e);Ig(window,"unload",d);if(l&&!a)try{l.close()}catch(b){k.postMessage("die",m)}l=k=void 0}function e(a){if(a.origin===m)try{var b=Rb(a.data);"ready"===b.a?k.postMessage(A,m):"error"===b.a?(d(!1),c&&(c(b.d),c=null)):"response"===b.a&&(d(b.forceKeepWindowOpen),c&&(c(null,b.d),c=null))}catch(e){}}var f=Fg(8),g,k;if(!this.options.relay_url)return c(Error("invalid arguments: origin of url and relay_url must match"));
|
|
138
138
|
var m=Jg(a);if(m!==Jg(this.options.relay_url))c&&setTimeout(function(){c(Error("invalid arguments: origin of url and relay_url must match"))},0);else{f&&(g=document.createElement("iframe"),g.setAttribute("src",this.options.relay_url),g.style.display="none",g.setAttribute("name","__winchan_relay_frame"),document.body.appendChild(g),k=g.contentWindow);a+=(/\?/.test(a)?"":"?")+Ib(b);var l=window.open(a,this.options.window_name,this.options.window_features);k||(k=l);var t=setInterval(function(){l&&l.closed&&
|
|
139
139
|
(d(!1),c&&(c(Sg("USER_CANCELLED")),c=null))},500),A=G({a:"request",d:b});Hg(window,"unload",d);Hg(window,"message",e)}};
|
|
@@ -145,12 +145,12 @@ d),g.close(),a=new yg(null,null,{requestId:e.tc,requestKey:a}),e.Kf.requestWithC
|
|
|
145
145
|
Wg.prototype.open=function(a,b,c){function d(){c&&(c(Sg("REQUEST_INTERRUPTED")),c=null)}function e(){setTimeout(function(){window.__firebase_auth_jsonp[f]=void 0;va(window.__firebase_auth_jsonp)&&(window.__firebase_auth_jsonp=void 0);try{var a=document.getElementById(f);a&&a.parentNode.removeChild(a)}catch(b){}},1);Ig(window,"beforeunload",d)}var f="fn"+(new Date).getTime()+Math.floor(99999*Math.random());b[this.options.callback_parameter]="__firebase_auth_jsonp."+f;a+=(/\?/.test(a)?"":"?")+Ib(b);
|
|
146
146
|
Hg(window,"beforeunload",d);window.__firebase_auth_jsonp[f]=function(a){c&&(c(null,a),c=null);e()};Xg(f,a,c)};
|
|
147
147
|
function Xg(a,b,c){setTimeout(function(){try{var d=document.createElement("script");d.type="text/javascript";d.id=a;d.async=!0;d.src=b;d.onerror=function(){var b=document.getElementById(a);null!==b&&b.parentNode.removeChild(b);c&&c(Sg("NETWORK_ERROR"))};var e=document.getElementsByTagName("head");(e&&0!=e.length?e[0]:document.documentElement).appendChild(d)}catch(f){c&&c(Sg("NETWORK_ERROR"))}},0)}Wg.isAvailable=function(){return"undefined"!==typeof document&&null!=document.createElement};
|
|
148
|
-
Wg.prototype.Fc=function(){return"json"};function Yg(a,b,c,d){ff.call(this,["auth_status"]);this.G=a;this.hf=b;this.
|
|
149
|
-
function dh(a,b,c,d,e,f){"firebaseio-demo.com"===a.G.domain&&S("Firebase authentication is not supported on demo Firebases (*.firebaseio-demo.com). To secure your Firebase, create a production Firebase at https://www.firebase.com.");a.hf(b,function(f,k){bh(a,f,k,!0,b,c,d||{},e)},function(b,c){ch(a,"auth()",b,c,f)})}function eh(a,b){a.wc.clear();ah(a,null);a.
|
|
148
|
+
Wg.prototype.Fc=function(){return"json"};function Yg(a,b,c,d){ff.call(this,["auth_status"]);this.G=a;this.hf=b;this.ih=c;this.Pe=d;this.wc=new Bg(a,[bd,cd]);this.qb=null;this.We=!1;Zg(this)}ka(Yg,ff);h=Yg.prototype;h.Be=function(){return this.qb||null};function Zg(a){cd.get("redirect_request_id")&&$g(a);var b=a.wc.get();b&&b.token?(ah(a,b),a.hf(b.token,function(c,d){bh(a,c,d,!1,b.token,b)},function(b,d){ch(a,"resumeSession()",b,d)})):ah(a,null)}
|
|
149
|
+
function dh(a,b,c,d,e,f){"firebaseio-demo.com"===a.G.domain&&S("Firebase authentication is not supported on demo Firebases (*.firebaseio-demo.com). To secure your Firebase, create a production Firebase at https://www.firebase.com.");a.hf(b,function(f,k){bh(a,f,k,!0,b,c,d||{},e)},function(b,c){ch(a,"auth()",b,c,f)})}function eh(a,b){a.wc.clear();ah(a,null);a.ih(function(a,d){if("ok"===a)T(b,null);else{var e=(a||"error").toUpperCase(),f=e;d&&(f+=": "+d);f=Error(f);f.code=e;T(b,f)}})}
|
|
150
150
|
function bh(a,b,c,d,e,f,g,k){"ok"===b?(d&&(b=c.auth,f.auth=b,f.expires=c.expires,f.token=Ed(e)?e:"",c=null,b&&y(b,"uid")?c=z(b,"uid"):y(f,"uid")&&(c=z(f,"uid")),f.uid=c,c="custom",b&&y(b,"provider")?c=z(b,"provider"):y(f,"provider")&&(c=z(f,"provider")),f.provider=c,a.wc.clear(),Ed(e)&&(g=g||{},c=bd,"sessionOnly"===g.remember&&(c=cd),"none"!==g.remember&&a.wc.set(f,c)),ah(a,f)),T(k,null,f)):(a.wc.clear(),ah(a,null),f=a=(b||"error").toUpperCase(),c&&(f+=": "+c),f=Error(f),f.code=a,T(k,f))}
|
|
151
151
|
function ch(a,b,c,d,e){S(b+" was canceled: "+d);a.wc.clear();ah(a,null);a=Error(d);a.code=c.toUpperCase();T(e,a)}function fh(a,b,c,d,e){gh(a);c=new yg(d||{},{},c||{});hh(a,[Ug,Wg],"/auth/"+b,c,e)}
|
|
152
|
-
function ih(a,b,c,d){gh(a);var e=[Tg,Vg];c=Ag(c);"anonymous"===b||"password"===b?setTimeout(function(){T(d,Sg("TRANSPORT_UNAVAILABLE"))},0):(c.he.window_features="menubar=yes,modal=yes,alwaysRaised=yeslocation=yes,resizable=yes,scrollbars=yes,status=yes,height=625,width=
|
|
153
|
-
function $g(a){var b=cd.get("redirect_request_id");if(b){var c=cd.get("redirect_client_options");cd.remove("redirect_request_id");cd.remove("redirect_client_options");var d=[Ug,Wg],b={requestId:b,requestKey:Kg(document.location.hash)},c=new yg(c,{},b);a.We=!0;Lg();hh(a,d,"/auth/session",c,function(){this.We=!1}.bind(a))}}h.ve=function(a,b){gh(this);var c=Ag(a);c.fb._method="POST";this.uc("/users",c,function(a,c){a?T(b,a):T(b,a,c)})};
|
|
152
|
+
function ih(a,b,c,d){gh(a);var e=[Tg,Vg];c=Ag(c);var f=625;"anonymous"===b||"password"===b?setTimeout(function(){T(d,Sg("TRANSPORT_UNAVAILABLE"))},0):("github"===b&&(f=1025),c.he.window_features="menubar=yes,modal=yes,alwaysRaised=yeslocation=yes,resizable=yes,scrollbars=yes,status=yes,height=625,width="+f+",top="+("object"===typeof screen?.5*(screen.height-625):0)+",left="+("object"===typeof screen?.5*(screen.width-f):0),c.he.relay_url=Ng(a.G.lc),c.he.requestWithCredential=u(a.uc,a),hh(a,e,"/auth/"+
|
|
153
|
+
b,c,d))}function $g(a){var b=cd.get("redirect_request_id");if(b){var c=cd.get("redirect_client_options");cd.remove("redirect_request_id");cd.remove("redirect_client_options");var d=[Ug,Wg],b={requestId:b,requestKey:Kg(document.location.hash)},c=new yg(c,{},b);a.We=!0;Lg();hh(a,d,"/auth/session",c,function(){this.We=!1}.bind(a))}}h.ve=function(a,b){gh(this);var c=Ag(a);c.fb._method="POST";this.uc("/users",c,function(a,c){a?T(b,a):T(b,a,c)})};
|
|
154
154
|
h.Xe=function(a,b){var c=this;gh(this);var d="/users/"+encodeURIComponent(a.email),e=Ag(a);e.fb._method="DELETE";this.uc(d,e,function(a,d){!a&&d&&d.uid&&c.qb&&c.qb.uid&&c.qb.uid===d.uid&&eh(c);T(b,a)})};h.se=function(a,b){gh(this);var c="/users/"+encodeURIComponent(a.email)+"/password",d=Ag(a);d.fb._method="PUT";d.fb.password=a.newPassword;this.uc(c,d,function(a){T(b,a)})};
|
|
155
155
|
h.re=function(a,b){gh(this);var c="/users/"+encodeURIComponent(a.oldEmail)+"/email",d=Ag(a);d.fb._method="PUT";d.fb.email=a.newEmail;d.fb.password=a.password;this.uc(c,d,function(a){T(b,a)})};h.Ze=function(a,b){gh(this);var c="/users/"+encodeURIComponent(a.email)+"/password",d=Ag(a);d.fb._method="POST";this.uc(c,d,function(a){T(b,a)})};h.uc=function(a,b,c){jh(this,[Ug,Wg],a,b,c)};
|
|
156
156
|
function hh(a,b,c,d,e){jh(a,b,c,d,function(b,c){!b&&c&&c.token&&c.uid?dh(a,c.token,c,d.qd,function(a,b){a?T(e,a):T(e,null,b)}):T(e,b||Sg("UNKNOWN_ERROR"))})}
|
|
@@ -158,19 +158,19 @@ function jh(a,b,c,d,e){b=Na(b,function(a){return"function"===typeof a.isAvailabl
|
|
|
158
158
|
function ah(a,b){var c=null!==a.qb||null!==b;a.qb=b;c&&a.ie("auth_status",b);a.Pe(null!==b)}h.Ee=function(a){O("auth_status"===a,'initial event must be of type "auth_status"');return this.We?null:[this.qb]};function gh(a){var b=a.G;if("firebaseio.com"!==b.domain&&"firebaseio-demo.com"!==b.domain&&"auth.firebase.com"===xg)throw Error("This custom Firebase server ('"+a.G.domain+"') does not support delegated login.");};var gd="websocket",hd="long_polling";function kh(a){this.nc=a;this.Qd=[];this.Wb=0;this.te=-1;this.Jb=null}function lh(a,b,c){a.te=b;a.Jb=c;a.te<a.Wb&&(a.Jb(),a.Jb=null)}function mh(a,b,c){for(a.Qd[b]=c;a.Qd[a.Wb];){var d=a.Qd[a.Wb];delete a.Qd[a.Wb];for(var e=0;e<d.length;++e)if(d[e]){var f=a;gc(function(){f.nc(d[e])})}if(a.Wb===a.te){a.Jb&&(clearTimeout(a.Jb),a.Jb(),a.Jb=null);break}a.Wb++}};function nh(a,b,c,d){this.ue=a;this.f=pd(a);this.rb=this.sb=0;this.Xa=uc(b);this.Xf=c;this.Kc=!1;this.Fb=d;this.ld=function(a){return fd(b,hd,a)}}var oh,ph;
|
|
159
159
|
nh.prototype.open=function(a,b){this.mf=0;this.na=b;this.Ef=new kh(a);this.Db=!1;var c=this;this.ub=setTimeout(function(){c.f("Timed out trying to connect.");c.bb();c.ub=null},Math.floor(3E4));ud(function(){if(!c.Db){c.Wa=new qh(function(a,b,d,k,m){rh(c,arguments);if(c.Wa)if(c.ub&&(clearTimeout(c.ub),c.ub=null),c.Kc=!0,"start"==a)c.id=b,c.Mf=d;else if("close"===a)b?(c.Wa.$d=!1,lh(c.Ef,b,function(){c.bb()})):c.bb();else throw Error("Unrecognized command received: "+a);},function(a,b){rh(c,arguments);
|
|
160
160
|
mh(c.Ef,a,b)},function(){c.bb()},c.ld);var a={start:"t"};a.ser=Math.floor(1E8*Math.random());c.Wa.ke&&(a.cb=c.Wa.ke);a.v="5";c.Xf&&(a.s=c.Xf);c.Fb&&(a.ls=c.Fb);"undefined"!==typeof location&&location.href&&-1!==location.href.indexOf("firebaseio.com")&&(a.r="f");a=c.ld(a);c.f("Connecting via long-poll to "+a);sh(c.Wa,a,function(){})}})};
|
|
161
|
-
nh.prototype.start=function(){var a=this.Wa,b=this.Mf;a.
|
|
162
|
-
nh.isAvailable=function(){return oh||!ph&&"undefined"!==typeof document&&null!=document.createElement&&!("object"===typeof window&&window.chrome&&window.chrome.extension&&!/^chrome/.test(window.location.href))&&!("object"===typeof Windows&&"object"===typeof Windows.
|
|
163
|
-
h.bb=function(){this.Db||(this.f("Longpoll is closing itself"),this.fd(),this.na&&(this.na(this.Kc),this.na=null))};h.close=function(){this.Db||(this.f("Longpoll is being closed."),this.fd())};h.send=function(a){a=G(a);this.sb+=a.length;rc(this.Xa,"bytes_sent",a.length);a=Ob(a);a=nb(a,!0);a=yd(a,1840);for(var b=0;b<a.length;b++){var c=this.Wa;c.cd.push({
|
|
161
|
+
nh.prototype.start=function(){var a=this.Wa,b=this.Mf;a.Gg=this.id;a.Hg=b;for(a.oe=!0;th(a););a=this.id;b=this.Mf;this.kc=document.createElement("iframe");var c={dframe:"t"};c.id=a;c.pw=b;this.kc.src=this.ld(c);this.kc.style.display="none";document.body.appendChild(this.kc)};
|
|
162
|
+
nh.isAvailable=function(){return oh||!ph&&"undefined"!==typeof document&&null!=document.createElement&&!("object"===typeof window&&window.chrome&&window.chrome.extension&&!/^chrome/.test(window.location.href))&&!("object"===typeof Windows&&"object"===typeof Windows.kh)&&!0};h=nh.prototype;h.Hd=function(){};h.fd=function(){this.Db=!0;this.Wa&&(this.Wa.close(),this.Wa=null);this.kc&&(document.body.removeChild(this.kc),this.kc=null);this.ub&&(clearTimeout(this.ub),this.ub=null)};
|
|
163
|
+
h.bb=function(){this.Db||(this.f("Longpoll is closing itself"),this.fd(),this.na&&(this.na(this.Kc),this.na=null))};h.close=function(){this.Db||(this.f("Longpoll is being closed."),this.fd())};h.send=function(a){a=G(a);this.sb+=a.length;rc(this.Xa,"bytes_sent",a.length);a=Ob(a);a=nb(a,!0);a=yd(a,1840);for(var b=0;b<a.length;b++){var c=this.Wa;c.cd.push({Yg:this.mf,hh:a.length,of:a[b]});c.oe&&th(c);this.mf++}};function rh(a,b){var c=G(b).length;a.rb+=c;rc(a.Xa,"bytes_received",c)}
|
|
164
164
|
function qh(a,b,c,d){this.ld=d;this.lb=c;this.Te=new ug;this.cd=[];this.we=Math.floor(1E8*Math.random());this.$d=!0;this.ke=id();window["pLPCommand"+this.ke]=a;window["pRTLPCB"+this.ke]=b;a=document.createElement("iframe");a.style.display="none";if(document.body){document.body.appendChild(a);try{a.contentWindow.document||fc("No IE domain setting required")}catch(e){a.src="javascript:void((function(){document.open();document.domain='"+document.domain+"';document.close();})())"}}else throw"Document body has not initialized. Wait to initialize Firebase until after the document is ready.";
|
|
165
165
|
a.contentDocument?a.jb=a.contentDocument:a.contentWindow?a.jb=a.contentWindow.document:a.document&&(a.jb=a.document);this.Ga=a;a="";this.Ga.src&&"javascript:"===this.Ga.src.substr(0,11)&&(a='<script>document.domain="'+document.domain+'";\x3c/script>');a="<html><body>"+a+"</body></html>";try{this.Ga.jb.open(),this.Ga.jb.write(a),this.Ga.jb.close()}catch(f){fc("frame writing exception"),f.stack&&fc(f.stack),fc(f)}}
|
|
166
166
|
qh.prototype.close=function(){this.oe=!1;if(this.Ga){this.Ga.jb.body.innerHTML="";var a=this;setTimeout(function(){null!==a.Ga&&(document.body.removeChild(a.Ga),a.Ga=null)},Math.floor(0))}var b=this.lb;b&&(this.lb=null,b())};
|
|
167
|
-
function th(a){if(a.oe&&a.$d&&a.Te.count()<(0<a.cd.length?2:1)){a.we++;var b={};b.id=a.
|
|
167
|
+
function th(a){if(a.oe&&a.$d&&a.Te.count()<(0<a.cd.length?2:1)){a.we++;var b={};b.id=a.Gg;b.pw=a.Hg;b.ser=a.we;for(var b=a.ld(b),c="",d=0;0<a.cd.length;)if(1870>=a.cd[0].of.length+30+c.length){var e=a.cd.shift(),c=c+"&seg"+d+"="+e.Yg+"&ts"+d+"="+e.hh+"&d"+d+"="+e.of;d++}else break;uh(a,b+c,a.we);return!0}return!1}function uh(a,b,c){function d(){a.Te.remove(c);th(a)}a.Te.add(c,1);var e=setTimeout(d,Math.floor(25E3));sh(a,b,function(){clearTimeout(e);d()})}
|
|
168
168
|
function sh(a,b,c){setTimeout(function(){try{if(a.$d){var d=a.Ga.jb.createElement("script");d.type="text/javascript";d.async=!0;d.src=b;d.onload=d.onreadystatechange=function(){var a=d.readyState;a&&"loaded"!==a&&"complete"!==a||(d.onload=d.onreadystatechange=null,d.parentNode&&d.parentNode.removeChild(d),c())};d.onerror=function(){fc("Long-poll script failed to load: "+b);a.$d=!1;a.close()};a.Ga.jb.body.appendChild(d)}}catch(e){}},Math.floor(1))};var vh=null;"undefined"!==typeof MozWebSocket?vh=MozWebSocket:"undefined"!==typeof WebSocket&&(vh=WebSocket);function wh(a,b,c,d){this.ue=a;this.f=pd(this.ue);this.frames=this.Nc=null;this.rb=this.sb=this.ff=0;this.Xa=uc(b);a={v:"5"};"undefined"!==typeof location&&location.href&&-1!==location.href.indexOf("firebaseio.com")&&(a.r="f");c&&(a.s=c);d&&(a.ls=d);this.jf=fd(b,gd,a)}var xh;
|
|
169
|
-
wh.prototype.open=function(a,b){this.lb=b;this.
|
|
169
|
+
wh.prototype.open=function(a,b){this.lb=b;this.Lg=a;this.f("Websocket connecting to "+this.jf);this.Kc=!1;bd.set("previous_websocket_failure",!0);try{this.La=new vh(this.jf)}catch(c){this.f("Error instantiating WebSocket.");var d=c.message||c.data;d&&this.f(d);this.bb();return}var e=this;this.La.onopen=function(){e.f("Websocket connected.");e.Kc=!0};this.La.onclose=function(){e.f("Websocket connection was disconnected.");e.La=null;e.bb()};this.La.onmessage=function(a){if(null!==e.La)if(a=a.data,e.rb+=
|
|
170
170
|
a.length,rc(e.Xa,"bytes_received",a.length),yh(e),null!==e.frames)zh(e,a);else{a:{O(null===e.frames,"We already have a frame buffer");if(6>=a.length){var b=Number(a);if(!isNaN(b)){e.ff=b;e.frames=[];a=null;break a}}e.ff=1;e.frames=[]}null!==a&&zh(e,a)}};this.La.onerror=function(a){e.f("WebSocket error. Closing connection.");(a=a.message||a.data)&&e.f(a);e.bb()}};wh.prototype.start=function(){};
|
|
171
|
-
wh.isAvailable=function(){var a=!1;if("undefined"!==typeof navigator&&navigator.userAgent){var b=navigator.userAgent.match(/Android ([0-9]{0,}\.[0-9]{0,})/);b&&1<b.length&&4.4>parseFloat(b[1])&&(a=!0)}return!a&&null!==vh&&!xh};wh.responsesRequiredToBeHealthy=2;wh.healthyTimeout=3E4;h=wh.prototype;h.Hd=function(){bd.remove("previous_websocket_failure")};function zh(a,b){a.frames.push(b);if(a.frames.length==a.ff){var c=a.frames.join("");a.frames=null;c=Rb(c);a.
|
|
171
|
+
wh.isAvailable=function(){var a=!1;if("undefined"!==typeof navigator&&navigator.userAgent){var b=navigator.userAgent.match(/Android ([0-9]{0,}\.[0-9]{0,})/);b&&1<b.length&&4.4>parseFloat(b[1])&&(a=!0)}return!a&&null!==vh&&!xh};wh.responsesRequiredToBeHealthy=2;wh.healthyTimeout=3E4;h=wh.prototype;h.Hd=function(){bd.remove("previous_websocket_failure")};function zh(a,b){a.frames.push(b);if(a.frames.length==a.ff){var c=a.frames.join("");a.frames=null;c=Rb(c);a.Lg(c)}}
|
|
172
172
|
h.send=function(a){yh(this);a=G(a);this.sb+=a.length;rc(this.Xa,"bytes_sent",a.length);a=yd(a,16384);1<a.length&&Ah(this,String(a.length));for(var b=0;b<a.length;b++)Ah(this,a[b])};h.fd=function(){this.Db=!0;this.Nc&&(clearInterval(this.Nc),this.Nc=null);this.La&&(this.La.close(),this.La=null)};h.bb=function(){this.Db||(this.f("WebSocket is closing itself"),this.fd(),this.lb&&(this.lb(this.Kc),this.lb=null))};h.close=function(){this.Db||(this.f("WebSocket is being closed"),this.fd())};
|
|
173
|
-
function yh(a){clearInterval(a.Nc);a.Nc=setInterval(function(){a.La&&Ah(a,"0");yh(a)},Math.floor(45E3))}function Ah(a,b){try{a.La.send(b)}catch(c){a.f("Exception thrown from WebSocket.send():",c.message||c.data,"Closing connection."),setTimeout(u(a.bb,a),0)}};function Bh(a){Ch(this,a)}var Dh=[nh,wh];function Ch(a,b){var c=wh&&wh.isAvailable(),d=c&&!(bd.Af||!0===bd.get("previous_websocket_failure"));b.
|
|
173
|
+
function yh(a){clearInterval(a.Nc);a.Nc=setInterval(function(){a.La&&Ah(a,"0");yh(a)},Math.floor(45E3))}function Ah(a,b){try{a.La.send(b)}catch(c){a.f("Exception thrown from WebSocket.send():",c.message||c.data,"Closing connection."),setTimeout(u(a.bb,a),0)}};function Bh(a){Ch(this,a)}var Dh=[nh,wh];function Ch(a,b){var c=wh&&wh.isAvailable(),d=c&&!(bd.Af||!0===bd.get("previous_websocket_failure"));b.jh&&(c||S("wss:// URL used, but browser isn't known to support websockets. Trying anyway."),d=!0);if(d)a.jd=[wh];else{var e=a.jd=[];zd(Dh,function(a,b){b&&b.isAvailable()&&e.push(b)})}}function Eh(a){if(0<a.jd.length)return a.jd[0];throw Error("No transports available");};function Fh(a,b,c,d,e,f,g){this.id=a;this.f=pd("c:"+this.id+":");this.nc=c;this.Zc=d;this.na=e;this.Re=f;this.G=b;this.Pd=[];this.kf=0;this.Wf=new Bh(b);this.N=0;this.Fb=g;this.f("Connection created");Gh(this)}
|
|
174
174
|
function Gh(a){var b=Eh(a.Wf);a.K=new b("c:"+a.id+":"+a.kf++,a.G,void 0,a.Fb);a.Ve=b.responsesRequiredToBeHealthy||0;var c=Hh(a,a.K),d=Ih(a,a.K);a.kd=a.K;a.ed=a.K;a.F=null;a.Eb=!1;setTimeout(function(){a.K&&a.K.open(c,d)},Math.floor(0));b=b.healthyTimeout||0;0<b&&(a.Bd=setTimeout(function(){a.Bd=null;a.Eb||(a.K&&102400<a.K.rb?(a.f("Connection exceeded healthy timeout but has received "+a.K.rb+" bytes. Marking connection healthy."),a.Eb=!0,a.K.Hd()):a.K&&10240<a.K.sb?a.f("Connection exceeded healthy timeout but has sent "+
|
|
175
175
|
a.K.sb+" bytes. Leaving connection alive."):(a.f("Closing unhealthy connection after timeout."),a.close()))},Math.floor(b)))}function Ih(a,b){return function(c){b===a.K?(a.K=null,c||0!==a.N?1===a.N&&a.f("Realtime connection lost."):(a.f("Realtime connection failed."),"s-"===a.G.ab.substr(0,2)&&(bd.remove("host:"+a.G.host),a.G.ab=a.G.host)),a.close()):b===a.F?(a.f("Secondary connection lost."),c=a.F,a.F=null,a.kd!==c&&a.ed!==c||a.close()):a.f("closing an old connection")}}
|
|
176
176
|
function Hh(a,b){return function(c){if(2!=a.N)if(b===a.ed){var d=wd("t",c);c=wd("d",c);if("c"==d){if(d=wd("t",c),"d"in c)if(c=c.d,"h"===d){var d=c.ts,e=c.v,f=c.h;a.Uf=c.s;ed(a.G,f);0==a.N&&(a.K.start(),Jh(a,a.K,d),"5"!==e&&S("Protocol version mismatch detected"),c=a.Wf,(c=1<c.jd.length?c.jd[1]:null)&&Kh(a,c))}else if("n"===d){a.f("recvd end transmission on primary");a.ed=a.F;for(c=0;c<a.Pd.length;++c)a.Ld(a.Pd[c]);a.Pd=[];Lh(a)}else"s"===d?(a.f("Connection shutdown command received. Shutting down..."),
|
|
@@ -178,20 +178,21 @@ a.Re&&(a.Re(c),a.Re=null),a.na=null,a.close()):"r"===d?(a.f("Reset packet receiv
|
|
|
178
178
|
a.Tf--,Ph(a)));else if("d"==d)a.Pd.push(c);else throw Error("Unknown protocol layer: "+d);else a.f("message on old connection")}}Fh.prototype.Ia=function(a){Qh(this,{t:"d",d:a})};function Lh(a){a.kd===a.F&&a.ed===a.F&&(a.f("cleaning up and promoting a connection: "+a.F.ue),a.K=a.F,a.F=null)}
|
|
179
179
|
function Ph(a){0>=a.Tf?(a.f("Secondary connection is healthy."),a.Eb=!0,a.F.Hd(),a.F.start(),a.f("sending client ack on secondary"),a.F.send({t:"c",d:{t:"a",d:{}}}),a.f("Ending transmission on primary"),a.K.send({t:"c",d:{t:"n",d:{}}}),a.kd=a.F,Lh(a)):(a.f("sending ping on secondary."),a.F.send({t:"c",d:{t:"p",d:{}}}))}Fh.prototype.Ld=function(a){Nh(this);this.nc(a)};function Nh(a){a.Eb||(a.Ve--,0>=a.Ve&&(a.f("Primary connection is healthy."),a.Eb=!0,a.K.Hd()))}
|
|
180
180
|
function Kh(a,b){a.F=new b("c:"+a.id+":"+a.kf++,a.G,a.Uf);a.Tf=b.responsesRequiredToBeHealthy||0;a.F.open(Hh(a,a.F),Ih(a,a.F));setTimeout(function(){a.F&&(a.f("Timed out trying to upgrade."),a.F.close())},Math.floor(6E4))}function Jh(a,b,c){a.f("Realtime connection established.");a.K=b;a.N=1;a.Zc&&(a.Zc(c,a.Uf),a.Zc=null);0===a.Ve?(a.f("Primary connection is healthy."),a.Eb=!0):setTimeout(function(){Oh(a)},Math.floor(5E3))}
|
|
181
|
-
function Oh(a){a.Eb||1!==a.N||(a.f("sending ping on primary."),Qh(a,{t:"c",d:{t:"p",d:{}}}))}function Qh(a,b){if(1!==a.N)throw"Connection is not connected";a.kd.send(b)}Fh.prototype.close=function(){2!==this.N&&(this.f("Closing realtime connection."),this.N=2,Mh(this),this.na&&(this.na(),this.na=null))};function Mh(a){a.f("Shutting down all connections");a.K&&(a.K.close(),a.K=null);a.F&&(a.F.close(),a.F=null);a.Bd&&(clearTimeout(a.Bd),a.Bd=null)};function Rh(a,b,c,d){this.id=Sh++;this.f=pd("p:"+this.id+":");this.Bf=this.Ie=!1;this.ba={};this.sa=[];this.ad=0;this.Yc=[];this.qa=!1;this.eb=1E3;this.Id=3E5;this.Kb=b;this.Xc=c;this.Se=d;this.G=a;this.wb=this.Ca=this.Ma=this.Fb=this.$e=null;this.Sb=!1;this.Wd={};this.
|
|
182
|
-
h.Ia=function(a,b,c){var d=++this.
|
|
183
|
-
function Vh(a,b){var c=b.
|
|
181
|
+
function Oh(a){a.Eb||1!==a.N||(a.f("sending ping on primary."),Qh(a,{t:"c",d:{t:"p",d:{}}}))}function Qh(a,b){if(1!==a.N)throw"Connection is not connected";a.kd.send(b)}Fh.prototype.close=function(){2!==this.N&&(this.f("Closing realtime connection."),this.N=2,Mh(this),this.na&&(this.na(),this.na=null))};function Mh(a){a.f("Shutting down all connections");a.K&&(a.K.close(),a.K=null);a.F&&(a.F.close(),a.F=null);a.Bd&&(clearTimeout(a.Bd),a.Bd=null)};function Rh(a,b,c,d){this.id=Sh++;this.f=pd("p:"+this.id+":");this.Bf=this.Ie=!1;this.ba={};this.sa=[];this.ad=0;this.Yc=[];this.qa=!1;this.eb=1E3;this.Id=3E5;this.Kb=b;this.Xc=c;this.Se=d;this.G=a;this.wb=this.Ca=this.Ma=this.Fb=this.$e=null;this.Sb=!1;this.Wd={};this.Xg=0;this.rf=!0;this.Oc=this.Ke=null;Th(this,0);kf.yb().Ib("visible",this.Og,this);-1===a.host.indexOf("fblocal")&&jf.yb().Ib("online",this.Mg,this)}var Sh=0,Uh=0;h=Rh.prototype;
|
|
182
|
+
h.Ia=function(a,b,c){var d=++this.Xg;a={r:d,a:a,b:b};this.f(G(a));O(this.qa,"sendRequest call when we're not connected not allowed.");this.Ma.Ia(a);c&&(this.Wd[d]=c)};h.Cf=function(a,b,c,d){var e=a.wa(),f=a.path.toString();this.f("Listen called for "+f+" "+e);this.ba[f]=this.ba[f]||{};O(Ie(a.n)||!He(a.n),"listen() called for non-default but complete query");O(!this.ba[f][e],"listen() called twice for same path/queryId.");a={I:d,Ad:b,Ug:a,tag:c};this.ba[f][e]=a;this.qa&&Vh(this,a)};
|
|
183
|
+
function Vh(a,b){var c=b.Ug,d=c.path.toString(),e=c.wa();a.f("Listen on "+d+" for "+e);var f={p:d};b.tag&&(f.q=Ge(c.n),f.t=b.tag);f.h=b.Ad();a.Ia("q",f,function(f){var k=f.d,m=f.s;if(k&&"object"===typeof k&&y(k,"w")){var l=z(k,"w");da(l)&&0<=La(l,"no_index")&&S("Using an unspecified index. Consider adding "+('".indexOn": "'+c.n.g.toString()+'"')+" at "+c.path.toString()+" to your security rules for better performance")}(a.ba[d]&&a.ba[d][e])===b&&(a.f("listen response",f),"ok"!==m&&Wh(a,d,e),b.I&&
|
|
184
184
|
b.I(m,k))})}h.O=function(a,b,c){this.Ca={rg:a,sf:!1,Dc:b,od:c};this.f("Authenticating using credential: "+a);Xh(this);(b=40==a.length)||(a=Cd(a).Ec,b="object"===typeof a&&!0===z(a,"admin"));b&&(this.f("Admin auth credential detected. Reducing max reconnect time."),this.Id=3E4)};h.je=function(a){this.Ca=null;this.qa&&this.Ia("unauth",{},function(b){a(b.s,b.d)})};
|
|
185
185
|
function Xh(a){var b=a.Ca;a.qa&&b&&a.Ia("auth",{cred:b.rg},function(c){var d=c.s;c=c.d||"error";"ok"!==d&&a.Ca===b&&(a.Ca=null);b.sf?"ok"!==d&&b.od&&b.od(d,c):(b.sf=!0,b.Dc&&b.Dc(d,c))})}h.$f=function(a,b){var c=a.path.toString(),d=a.wa();this.f("Unlisten called for "+c+" "+d);O(Ie(a.n)||!He(a.n),"unlisten() called for non-default but complete query");if(Wh(this,c,d)&&this.qa){var e=Ge(a.n);this.f("Unlisten on "+c+" for "+d);c={p:c};b&&(c.q=e,c.t=b);this.Ia("n",c)}};
|
|
186
186
|
h.Qe=function(a,b,c){this.qa?Yh(this,"o",a,b,c):this.Yc.push({bd:a,action:"o",data:b,I:c})};h.Gf=function(a,b,c){this.qa?Yh(this,"om",a,b,c):this.Yc.push({bd:a,action:"om",data:b,I:c})};h.Md=function(a,b){this.qa?Yh(this,"oc",a,null,b):this.Yc.push({bd:a,action:"oc",data:null,I:b})};function Yh(a,b,c,d,e){c={p:c,d:d};a.f("onDisconnect "+b,c);a.Ia(b,c,function(a){e&&setTimeout(function(){e(a.s,a.d)},Math.floor(0))})}h.put=function(a,b,c,d){Zh(this,"p",a,b,c,d)};
|
|
187
|
-
h.Df=function(a,b,c,d){Zh(this,"m",a,b,c,d)};function Zh(a,b,c,d,e,f){d={p:c,d:d};p(f)&&(d.h=f);a.sa.push({action:b,Pf:d,I:e});a.ad++;b=a.sa.length-1;a.qa?$h(a,b):a.f("Buffering put: "+c)}function $h(a,b){var c=a.sa[b].action,d=a.sa[b].Pf,e=a.sa[b].I;a.sa[b].
|
|
187
|
+
h.Df=function(a,b,c,d){Zh(this,"m",a,b,c,d)};function Zh(a,b,c,d,e,f){d={p:c,d:d};p(f)&&(d.h=f);a.sa.push({action:b,Pf:d,I:e});a.ad++;b=a.sa.length-1;a.qa?$h(a,b):a.f("Buffering put: "+c)}function $h(a,b){var c=a.sa[b].action,d=a.sa[b].Pf,e=a.sa[b].I;a.sa[b].Vg=a.qa;a.Ia(c,d,function(d){a.f(c+" response",d);delete a.sa[b];a.ad--;0===a.ad&&(a.sa=[]);e&&e(d.s,d.d)})}
|
|
188
188
|
h.Ye=function(a){this.qa&&(a={c:a},this.f("reportStats",a),this.Ia("s",a,function(a){"ok"!==a.s&&this.f("reportStats","Error sending stats: "+a.d)}))};
|
|
189
189
|
h.Ld=function(a){if("r"in a){this.f("from server: "+G(a));var b=a.r,c=this.Wd[b];c&&(delete this.Wd[b],c(a.b))}else{if("error"in a)throw"A server-side error has occurred: "+a.error;"a"in a&&(b=a.a,c=a.b,this.f("handleServerMessage",b,c),"d"===b?this.Kb(c.p,c.d,!1,c.t):"m"===b?this.Kb(c.p,c.d,!0,c.t):"c"===b?ai(this,c.p,c.q):"ac"===b?(a=c.s,b=c.d,c=this.Ca,this.Ca=null,c&&c.od&&c.od(a,b)):"sd"===b?this.$e?this.$e(c):"msg"in c&&"undefined"!==typeof console&&console.log("FIREBASE: "+c.msg.replace("\n",
|
|
190
190
|
"\nFIREBASE: ")):qd("Unrecognized action received from server: "+G(b)+"\nAre you using the latest client?"))}};h.Zc=function(a,b){this.f("connection ready");this.qa=!0;this.Oc=(new Date).getTime();this.Se({serverTimeOffset:a-(new Date).getTime()});this.Fb=b;if(this.rf){var c={};c["sdk.js."+Eb.replace(/\./g,"-")]=1;Dg()?c["framework.cordova"]=1:"object"===typeof navigator&&"ReactNative"===navigator.product&&(c["framework.reactnative"]=1);this.Ye(c)}bi(this);this.rf=!1;this.Xc(!0)};
|
|
191
|
-
function Th(a,b){O(!a.Ma,"Scheduling a connect when we're already connected/ing?");a.wb&&clearTimeout(a.wb);a.wb=setTimeout(function(){a.wb=null;ci(a)},Math.floor(b))}h.
|
|
192
|
-
h.If=function(){this.f("data client disconnected");this.qa=!1;this.Ma=null;for(var a=0;a<this.sa.length;a++){var b=this.sa[a];b&&"h"in b.Pf&&b.
|
|
191
|
+
function Th(a,b){O(!a.Ma,"Scheduling a connect when we're already connected/ing?");a.wb&&clearTimeout(a.wb);a.wb=setTimeout(function(){a.wb=null;ci(a)},Math.floor(b))}h.Og=function(a){a&&!this.Sb&&this.eb===this.Id&&(this.f("Window became visible. Reducing delay."),this.eb=1E3,this.Ma||Th(this,0));this.Sb=a};h.Mg=function(a){a?(this.f("Browser went online."),this.eb=1E3,this.Ma||Th(this,0)):(this.f("Browser went offline. Killing connection."),this.Ma&&this.Ma.close())};
|
|
192
|
+
h.If=function(){this.f("data client disconnected");this.qa=!1;this.Ma=null;for(var a=0;a<this.sa.length;a++){var b=this.sa[a];b&&"h"in b.Pf&&b.Vg&&(b.I&&b.I("disconnect"),delete this.sa[a],this.ad--)}0===this.ad&&(this.sa=[]);this.Wd={};di(this)&&(this.Sb?this.Oc&&(3E4<(new Date).getTime()-this.Oc&&(this.eb=1E3),this.Oc=null):(this.f("Window isn't visible. Delaying reconnect."),this.eb=this.Id,this.Ke=(new Date).getTime()),a=Math.max(0,this.eb-((new Date).getTime()-this.Ke)),a*=Math.random(),this.f("Trying to reconnect in "+
|
|
193
193
|
a+"ms"),Th(this,a),this.eb=Math.min(this.Id,1.3*this.eb));this.Xc(!1)};function ci(a){if(di(a)){a.f("Making a connection attempt");a.Ke=(new Date).getTime();a.Oc=null;var b=u(a.Ld,a),c=u(a.Zc,a),d=u(a.If,a),e=a.id+":"+Uh++;a.Ma=new Fh(e,a.G,b,c,d,function(b){S(b+" ("+a.G.toString()+")");a.Bf=!0},a.Fb)}}h.Cb=function(){this.Ie=!0;this.Ma?this.Ma.close():(this.wb&&(clearTimeout(this.wb),this.wb=null),this.qa&&this.If())};h.vc=function(){this.Ie=!1;this.eb=1E3;this.Ma||Th(this,0)};
|
|
194
|
-
function ai(a,b,c){c=c?Oa(c,function(a){return xd(a)}).join("$"):"default";(a=Wh(a,b,c))&&a.I&&a.I("permission_denied")}function Wh(a,b,c){b=(new P(b)).toString();var d;p(a.ba[b])?(d=a.ba[b][c],delete a.ba[b][c],0===oa(a.ba[b])&&delete a.ba[b]):d=void 0;return d}function bi(a){Xh(a);v(a.ba,function(b){v(b,function(b){Vh(a,b)})});for(var b=0;b<a.sa.length;b++)a.sa[b]&&$h(a,b);for(;a.Yc.length;)b=a.Yc.shift(),Yh(a,b.action,b.bd,b.data,b.I)}function di(a){var b;b=jf.yb().oc;return!a.Bf&&!a.Ie&&b};var U={zg:function(){oh=xh=!0}};U.forceLongPolling=U.zg;U.Ag=function(){ph=!0};U.forceWebSockets=U.Ag;U
|
|
194
|
+
function ai(a,b,c){c=c?Oa(c,function(a){return xd(a)}).join("$"):"default";(a=Wh(a,b,c))&&a.I&&a.I("permission_denied")}function Wh(a,b,c){b=(new P(b)).toString();var d;p(a.ba[b])?(d=a.ba[b][c],delete a.ba[b][c],0===oa(a.ba[b])&&delete a.ba[b]):d=void 0;return d}function bi(a){Xh(a);v(a.ba,function(b){v(b,function(b){Vh(a,b)})});for(var b=0;b<a.sa.length;b++)a.sa[b]&&$h(a,b);for(;a.Yc.length;)b=a.Yc.shift(),Yh(a,b.action,b.bd,b.data,b.I)}function di(a){var b;b=jf.yb().oc;return!a.Bf&&!a.Ie&&b};var U={zg:function(){oh=xh=!0}};U.forceLongPolling=U.zg;U.Ag=function(){ph=!0};U.forceWebSockets=U.Ag;U.Eg=function(){return wh.isAvailable()};U.isWebSocketsAvailable=U.Eg;U.ah=function(a,b){a.k.Va.$e=b};U.setSecurityDebugCallback=U.ah;U.bf=function(a,b){a.k.bf(b)};U.stats=U.bf;U.cf=function(a,b){a.k.cf(b)};U.statsIncrementCounter=U.cf;U.ud=function(a){return a.k.ud};U.dataUpdateCount=U.ud;U.Dg=function(a,b){a.k.He=b};U.interceptServerData=U.Dg;U.Kg=function(a){new Og(a)};U.onPopupOpen=U.Kg;
|
|
195
|
+
U.Zg=function(a){xg=a};U.setAuthenticationServer=U.Zg;function ei(a,b){this.committed=a;this.snapshot=b};function V(a,b){this.dd=a;this.ta=b}V.prototype.cancel=function(a){D("Firebase.onDisconnect().cancel",0,1,arguments.length);F("Firebase.onDisconnect().cancel",1,a,!0);var b=new B;this.dd.Md(this.ta,C(b,a));return b.D};V.prototype.cancel=V.prototype.cancel;V.prototype.remove=function(a){D("Firebase.onDisconnect().remove",0,1,arguments.length);og("Firebase.onDisconnect().remove",this.ta);F("Firebase.onDisconnect().remove",1,a,!0);var b=new B;fi(this.dd,this.ta,null,C(b,a));return b.D};
|
|
195
196
|
V.prototype.remove=V.prototype.remove;V.prototype.set=function(a,b){D("Firebase.onDisconnect().set",1,2,arguments.length);og("Firebase.onDisconnect().set",this.ta);gg("Firebase.onDisconnect().set",a,this.ta,!1);F("Firebase.onDisconnect().set",2,b,!0);var c=new B;fi(this.dd,this.ta,a,C(c,b));return c.D};V.prototype.set=V.prototype.set;
|
|
196
197
|
V.prototype.Ob=function(a,b,c){D("Firebase.onDisconnect().setWithPriority",2,3,arguments.length);og("Firebase.onDisconnect().setWithPriority",this.ta);gg("Firebase.onDisconnect().setWithPriority",a,this.ta,!1);kg("Firebase.onDisconnect().setWithPriority",2,b);F("Firebase.onDisconnect().setWithPriority",3,c,!0);var d=new B;gi(this.dd,this.ta,a,b,C(d,c));return d.D};V.prototype.setWithPriority=V.prototype.Ob;
|
|
197
198
|
V.prototype.update=function(a,b){D("Firebase.onDisconnect().update",1,2,arguments.length);og("Firebase.onDisconnect().update",this.ta);if(da(a)){for(var c={},d=0;d<a.length;++d)c[""+d]=a[d];a=c;S("Passing an Array to Firebase.onDisconnect().update() is deprecated. Use set() if you want to overwrite the existing data, or an Object with integer keys if you really do want to only update some of the children.")}jg("Firebase.onDisconnect().update",a,this.ta);F("Firebase.onDisconnect().update",2,b,!0);
|
|
@@ -203,34 +204,34 @@ W.prototype.key=W.prototype.key;W.prototype.Hb=function(){D("Firebase.DataSnapsh
|
|
|
203
204
|
h.matches=function(a){return a instanceof ii?a.Vb&&this.Vb?a.Vb===this.Vb&&a.vb===this.vb:!0:!1};h.yf=function(){return null!==this.Vb};function ji(a,b,c){this.ja=a;this.tb=b;this.vb=c}h=ji.prototype;h.Qf=function(a){a="children_added"===a?"child_added":a;return("children_removed"===a?"child_removed":a)in this.ja};h.lf=function(a,b){return this.tb?new kc(this,a,b):null};
|
|
204
205
|
h.createEvent=function(a,b){O(null!=a.Za,"Child events should have a childName.");var c=b.Mb().o(a.Za);return new jc(a.type,this,new W(a.Na,c,b.n.g),a.Td)};h.Zb=function(a){var b=this.vb;if("cancel"===a.De()){O(this.tb,"Raising a cancel event on a listener with no cancel callback");var c=this.tb;return function(){c.call(b,a.error)}}var d=this.ja[a.wd];return function(){d.call(b,a.be,a.Td)}};
|
|
205
206
|
h.matches=function(a){if(a instanceof ji){if(!this.ja||!a.ja)return!0;if(this.vb===a.vb){var b=oa(a.ja);if(b===oa(this.ja)){if(1===b){var b=pa(a.ja),c=pa(this.ja);return c===b&&(!a.ja[b]||!this.ja[c]||a.ja[b]===this.ja[c])}return na(this.ja,function(b,c){return a.ja[c]===b})}}}return!1};h.yf=function(){return null!==this.ja};function ki(){this.za={}}h=ki.prototype;h.e=function(){return va(this.za)};h.gb=function(a,b,c){var d=a.source.Lb;if(null!==d)return d=z(this.za,d),O(null!=d,"SyncTree gave us an op for an invalid query."),d.gb(a,b,c);var e=[];v(this.za,function(d){e=e.concat(d.gb(a,b,c))});return e};h.Tb=function(a,b,c,d,e){var f=a.wa(),g=z(this.za,f);if(!g){var g=c.Aa(e?d:null),k=!1;g?k=!0:(g=d instanceof fe?c.Cc(d):H,k=!1);g=new Ye(a,new je(new Xb(g,k,!1),new Xb(d,e,!1)));this.za[f]=g}g.Tb(b);return af(g,b)};
|
|
206
|
-
h.nb=function(a,b,c){var d=a.wa(),e=[],f=[],g=null!=li(this);if("default"===d){var k=this;v(this.za,function(a,d){f=f.concat(a.nb(b,c));a.e()&&(delete k.za[d],He(a.Y.n)||e.push(a.Y))})}else{var m=z(this.za,d);m&&(f=f.concat(m.nb(b,c)),m.e()&&(delete this.za[d],He(m.Y.n)||e.push(m.Y)))}g&&null==li(this)&&e.push(new X(a.k,a.path));return{
|
|
207
|
+
h.nb=function(a,b,c){var d=a.wa(),e=[],f=[],g=null!=li(this);if("default"===d){var k=this;v(this.za,function(a,d){f=f.concat(a.nb(b,c));a.e()&&(delete k.za[d],He(a.Y.n)||e.push(a.Y))})}else{var m=z(this.za,d);m&&(f=f.concat(m.nb(b,c)),m.e()&&(delete this.za[d],He(m.Y.n)||e.push(m.Y)))}g&&null==li(this)&&e.push(new X(a.k,a.path));return{Wg:e,vg:f}};function mi(a){return Na(qa(a.za),function(a){return!He(a.Y.n)})}h.kb=function(a){var b=null;v(this.za,function(c){b=b||c.kb(a)});return b};
|
|
207
208
|
function ni(a,b){if(He(b.n))return li(a);var c=b.wa();return z(a.za,c)}function li(a){return ua(a.za,function(a){return He(a.Y.n)})||null};function oi(a){this.va=qe;this.mb=new Pf;this.df={};this.qc={};this.Qc=a}function pi(a,b,c,d,e){var f=a.mb,g=e;O(d>f.Pc,"Stacking an older write on top of newer ones");p(g)||(g=!0);f.pa.push({path:b,Ja:c,md:d,visible:g});g&&(f.V=Jf(f.V,b,c));f.Pc=d;return e?qi(a,new Ac(Ef,b,c)):[]}function ri(a,b,c,d){var e=a.mb;O(d>e.Pc,"Stacking an older merge on top of newer ones");e.pa.push({path:b,children:c,md:d,visible:!0});e.V=Kf(e.V,b,c);e.Pc=d;c=sf(c);return qi(a,new bf(Ef,b,c))}
|
|
208
209
|
function si(a,b,c){c=c||!1;var d=Qf(a.mb,b);if(a.mb.Ud(b)){var e=qe;null!=d.Ja?e=e.set(M,!0):Fb(d.children,function(a,b){e=e.set(new P(a),b)});return qi(a,new Df(d.path,e,c))}return[]}function ti(a,b,c){c=sf(c);return qi(a,new bf(Gf,b,c))}function ui(a,b,c,d){d=vi(a,d);if(null!=d){var e=wi(d);d=e.path;e=e.Lb;b=lf(d,b);c=new Ac(new Ff(!1,!0,e,!0),b,c);return xi(a,d,c)}return[]}
|
|
209
210
|
function yi(a,b,c,d){if(d=vi(a,d)){var e=wi(d);d=e.path;e=e.Lb;b=lf(d,b);c=sf(c);c=new bf(new Ff(!1,!0,e,!0),b,c);return xi(a,d,c)}return[]}
|
|
210
211
|
oi.prototype.Tb=function(a,b){var c=a.path,d=null,e=!1;zf(this.va,c,function(a,b){var f=lf(a,c);d=d||b.kb(f);e=e||null!=li(b)});var f=this.va.get(c);f?(e=e||null!=li(f),d=d||f.kb(M)):(f=new ki,this.va=this.va.set(c,f));var g;null!=d?g=!0:(g=!1,d=H,Cf(this.va.subtree(c),function(a,b){var c=b.kb(M);c&&(d=d.W(a,c))}));var k=null!=ni(f,a);if(!k&&!He(a.n)){var m=zi(a);O(!(m in this.qc),"View does not exist, but we have a tag");var l=Ai++;this.qc[m]=l;this.df["_"+l]=m}g=f.Tb(a,b,new Uf(c,this.mb),d,g);
|
|
211
212
|
k||e||(f=ni(f,a),g=g.concat(Bi(this,a,f)));return g};
|
|
212
|
-
oi.prototype.nb=function(a,b,c){var d=a.path,e=this.va.get(d),f=[];if(e&&("default"===a.wa()||null!=ni(e,a))){f=e.nb(a,b,c);e.e()&&(this.va=this.va.remove(d));e=f.
|
|
213
|
+
oi.prototype.nb=function(a,b,c){var d=a.path,e=this.va.get(d),f=[];if(e&&("default"===a.wa()||null!=ni(e,a))){f=e.nb(a,b,c);e.e()&&(this.va=this.va.remove(d));e=f.Wg;f=f.vg;b=-1!==Sa(e,function(a){return He(a.n)});var g=xf(this.va,d,function(a,b){return null!=li(b)});if(b&&!g&&(d=this.va.subtree(d),!d.e()))for(var d=Ci(d),k=0;k<d.length;++k){var m=d[k],l=m.Y,m=Di(this,m);this.Qc.af(Ei(l),Fi(this,l),m.Ad,m.I)}if(!g&&0<e.length&&!c)if(b)this.Qc.de(Ei(a),null);else{var t=this;Ma(e,function(a){a.wa();
|
|
213
214
|
var b=t.qc[zi(a)];t.Qc.de(Ei(a),b)})}Gi(this,e)}return f};oi.prototype.Aa=function(a,b){var c=this.mb,d=xf(this.va,a,function(b,c){var d=lf(b,a);if(d=c.kb(d))return d});return c.Aa(a,d,b,!0)};function Ci(a){return vf(a,function(a,c,d){if(c&&null!=li(c))return[li(c)];var e=[];c&&(e=mi(c));v(d,function(a){e=e.concat(a)});return e})}function Gi(a,b){for(var c=0;c<b.length;++c){var d=b[c];if(!He(d.n)){var d=zi(d),e=a.qc[d];delete a.qc[d];delete a.df["_"+e]}}}
|
|
214
215
|
function Ei(a){return He(a.n)&&!Ie(a.n)?a.Mb():a}function Bi(a,b,c){var d=b.path,e=Fi(a,b);c=Di(a,c);b=a.Qc.af(Ei(b),e,c.Ad,c.I);d=a.va.subtree(d);if(e)O(null==li(d.value),"If we're adding a query, it shouldn't be shadowed");else for(e=vf(d,function(a,b,c){if(!a.e()&&b&&null!=li(b))return[Ze(li(b))];var d=[];b&&(d=d.concat(Oa(mi(b),function(a){return a.Y})));v(c,function(a){d=d.concat(a)});return d}),d=0;d<e.length;++d)c=e[d],a.Qc.de(Ei(c),Fi(a,c));return b}
|
|
215
216
|
function Di(a,b){var c=b.Y,d=Fi(a,c);return{Ad:function(){return(b.w()||H).hash()},I:function(b){if("ok"===b){if(d){var f=c.path;if(b=vi(a,d)){var g=wi(b);b=g.path;g=g.Lb;f=lf(b,f);f=new Cc(new Ff(!1,!0,g,!0),f);b=xi(a,b,f)}else b=[]}else b=qi(a,new Cc(Gf,c.path));return b}f="Unknown Error";"too_big"===b?f="The data requested exceeds the maximum size that can be accessed with a single request.":"permission_denied"==b?f="Client doesn't have permission to access the desired data.":"unavailable"==b&&
|
|
216
217
|
(f="The service is unavailable");f=Error(b+" at "+c.path.toString()+": "+f);f.code=b.toUpperCase();return a.nb(c,null,f)}}}function zi(a){return a.path.toString()+"$"+a.wa()}function wi(a){var b=a.indexOf("$");O(-1!==b&&b<a.length-1,"Bad queryKey.");return{Lb:a.substr(b+1),path:new P(a.substr(0,b))}}function vi(a,b){var c=a.df,d="_"+b;return d in c?c[d]:void 0}function Fi(a,b){var c=zi(b);return z(a.qc,c)}var Ai=1;
|
|
217
218
|
function xi(a,b,c){var d=a.va.get(b);O(d,"Missing sync point for query tag that we're tracking");return d.gb(c,new Uf(b,a.mb),null)}function qi(a,b){return Hi(a,b,a.va,null,new Uf(M,a.mb))}function Hi(a,b,c,d,e){if(b.path.e())return Ii(a,b,c,d,e);var f=c.get(M);null==d&&null!=f&&(d=f.kb(M));var g=[],k=K(b.path),m=b.$c(k);if((c=c.children.get(k))&&m)var l=d?d.T(k):null,k=e.o(k),g=g.concat(Hi(a,m,c,l,k));f&&(g=g.concat(f.gb(b,e,d)));return g}
|
|
218
|
-
function Ii(a,b,c,d,e){var f=c.get(M);null==d&&null!=f&&(d=f.kb(M));var g=[];c.children.ka(function(c,f){var l=d?d.T(c):null,t=e.o(c),A=b.$c(c);A&&(g=g.concat(Ii(a,A,f,l,t)))});f&&(g=g.concat(f.gb(b,e,d)));return g};function Ji(a,b){this.G=a;this.Xa=uc(a);this.hd=null;this.fa=new Zb;this.Kd=1;this.Va=null;b||0<=("object"===typeof window&&window.navigator&&window.navigator.userAgent||"").search(/googlebot|google webmaster tools|bingbot|yahoo! slurp|baiduspider|yandexbot|duckduckbot/i)?(this.da=new cf(this.G,u(this.Kb,this)),setTimeout(u(this.Xc,this,!0),0)):this.da=this.Va=new Rh(this.G,u(this.Kb,this),u(this.Xc,this),u(this.Se,this));this.
|
|
219
|
+
function Ii(a,b,c,d,e){var f=c.get(M);null==d&&null!=f&&(d=f.kb(M));var g=[];c.children.ka(function(c,f){var l=d?d.T(c):null,t=e.o(c),A=b.$c(c);A&&(g=g.concat(Ii(a,A,f,l,t)))});f&&(g=g.concat(f.gb(b,e,d)));return g};function Ji(a,b){this.G=a;this.Xa=uc(a);this.hd=null;this.fa=new Zb;this.Kd=1;this.Va=null;b||0<=("object"===typeof window&&window.navigator&&window.navigator.userAgent||"").search(/googlebot|google webmaster tools|bingbot|yahoo! slurp|baiduspider|yandexbot|duckduckbot/i)?(this.da=new cf(this.G,u(this.Kb,this)),setTimeout(u(this.Xc,this,!0),0)):this.da=this.Va=new Rh(this.G,u(this.Kb,this),u(this.Xc,this),u(this.Se,this));this.eh=vc(a,u(function(){return new pc(this.Xa,this.da)},this));this.yc=new Wf;
|
|
219
220
|
this.Ge=new Sb;var c=this;this.Fd=new oi({af:function(a,b,f,g){b=[];f=c.Ge.j(a.path);f.e()||(b=qi(c.Fd,new Ac(Gf,a.path,f)),setTimeout(function(){g("ok")},0));return b},de:aa});Ki(this,"connected",!1);this.na=new Vc;this.O=new Yg(a,u(this.da.O,this.da),u(this.da.je,this.da),u(this.Pe,this));this.ud=0;this.He=null;this.M=new oi({af:function(a,b,f,g){c.da.Cf(a,f,b,function(b,e){var f=g(b,e);dc(c.fa,a.path,f)});return[]},de:function(a,b){c.da.$f(a,b)}})}h=Ji.prototype;
|
|
220
221
|
h.toString=function(){return(this.G.ob?"https://":"http://")+this.G.host};h.name=function(){return this.G.lc};function Li(a){a=a.Ge.j(new P(".info/serverTimeOffset")).J()||0;return(new Date).getTime()+a}function Mi(a){a=a={timestamp:Li(a)};a.timestamp=a.timestamp||(new Date).getTime();return a}
|
|
221
222
|
h.Kb=function(a,b,c,d){this.ud++;var e=new P(a);b=this.He?this.He(a,b):b;a=[];d?c?(b=ma(b,function(a){return Q(a)}),a=yi(this.M,e,b,d)):(b=Q(b),a=ui(this.M,e,b,d)):c?(d=ma(b,function(a){return Q(a)}),a=ti(this.M,e,d)):(d=Q(b),a=qi(this.M,new Ac(Gf,e,d)));d=e;0<a.length&&(d=Ni(this,e));dc(this.fa,d,a)};h.Xc=function(a){Ki(this,"connected",a);!1===a&&Oi(this)};h.Se=function(a){var b=this;zd(a,function(a,d){Ki(b,d,a)})};h.Pe=function(a){Ki(this,"authenticated",a)};
|
|
222
|
-
function Ki(a,b,c){b=new P("/.info/"+b);c=Q(c);var d=a.Ge;d.Zd=d.Zd.H(b,c);c=qi(a.Fd,new Ac(Gf,b,c));dc(a.fa,b,c)}h.Ob=function(a,b,c,d){this.f("set",{path:a.toString(),value:b,
|
|
223
|
+
function Ki(a,b,c){b=new P("/.info/"+b);c=Q(c);var d=a.Ge;d.Zd=d.Zd.H(b,c);c=qi(a.Fd,new Ac(Gf,b,c));dc(a.fa,b,c)}h.Ob=function(a,b,c,d){this.f("set",{path:a.toString(),value:b,nh:c});var e=Mi(this);b=Q(b,c);var e=Xc(b,e),f=this.Kd++,e=pi(this.M,a,e,f,!0);$b(this.fa,e);var g=this;this.da.put(a.toString(),b.J(!0),function(b,c){var e="ok"===b;e||S("set at "+a+" failed: "+b);e=si(g.M,f,!e);dc(g.fa,a,e);Pi(d,b,c)});e=Qi(this,a);Ni(this,e);dc(this.fa,e,[])};
|
|
223
224
|
h.update=function(a,b,c){this.f("update",{path:a.toString(),value:b});var d=!0,e=Mi(this),f={};v(b,function(a,b){d=!1;var c=Q(a);f[b]=Xc(c,e)});if(d)fc("update() called with empty data. Don't do anything."),Pi(c,"ok");else{var g=this.Kd++,k=ri(this.M,a,f,g);$b(this.fa,k);var m=this;this.da.Df(a.toString(),b,function(b,d){var e="ok"===b;e||S("update at "+a+" failed: "+b);var e=si(m.M,g,!e),f=a;0<e.length&&(f=Ni(m,a));dc(m.fa,f,e);Pi(c,b,d)});b=Qi(this,a);Ni(this,b);dc(this.fa,a,[])}};
|
|
224
225
|
function Oi(a){a.f("onDisconnectEvents");var b=Mi(a),c=[];Wc(Uc(a.na,b),M,function(b,e){c=c.concat(qi(a.M,new Ac(Gf,b,e)));var f=Qi(a,b);Ni(a,f)});a.na=new Vc;dc(a.fa,M,c)}h.Md=function(a,b){var c=this;this.da.Md(a.toString(),function(d,e){"ok"===d&&wg(c.na,a);Pi(b,d,e)})};function fi(a,b,c,d){var e=Q(c);a.da.Qe(b.toString(),e.J(!0),function(c,g){"ok"===c&&a.na.rc(b,e);Pi(d,c,g)})}function gi(a,b,c,d,e){var f=Q(c,d);a.da.Qe(b.toString(),f.J(!0),function(c,d){"ok"===c&&a.na.rc(b,f);Pi(e,c,d)})}
|
|
225
226
|
function hi(a,b,c,d){var e=!0,f;for(f in c)e=!1;e?(fc("onDisconnect().update() called with empty data. Don't do anything."),Pi(d,"ok")):a.da.Gf(b.toString(),c,function(e,f){if("ok"===e)for(var m in c){var l=Q(c[m]);a.na.rc(b.o(m),l)}Pi(d,e,f)})}function Ri(a,b,c){c=".info"===K(b.path)?a.Fd.Tb(b,c):a.M.Tb(b,c);bc(a.fa,b.path,c)}h.Cb=function(){this.Va&&this.Va.Cb()};h.vc=function(){this.Va&&this.Va.vc()};
|
|
226
|
-
h.bf=function(a){if("undefined"!==typeof console){a?(this.hd||(this.hd=new oc(this.Xa)),a=this.hd.get()):a=this.Xa.get();var b=Pa(ra(a),function(a,b){return Math.max(b.length,a)},0),c;for(c in a){for(var d=a[c],e=c.length;e<b+2;e++)c+=" ";console.log(c+d)}}};h.cf=function(a){rc(this.Xa,a);this.
|
|
227
|
+
h.bf=function(a){if("undefined"!==typeof console){a?(this.hd||(this.hd=new oc(this.Xa)),a=this.hd.get()):a=this.Xa.get();var b=Pa(ra(a),function(a,b){return Math.max(b.length,a)},0),c;for(c in a){for(var d=a[c],e=c.length;e<b+2;e++)c+=" ";console.log(c+d)}}};h.cf=function(a){rc(this.Xa,a);this.eh.Vf[a]=!0};h.f=function(a){var b="";this.Va&&(b=this.Va.id+":");fc(b,arguments)};
|
|
227
228
|
function Pi(a,b,c){a&&gc(function(){if("ok"==b)a(null);else{var d=(b||"error").toUpperCase(),e=d;c&&(e+=": "+c);e=Error(e);e.code=d;a(e)}})};function Si(a,b,c,d,e){function f(){}a.f("transaction on "+b);var g=new X(a,b);g.Ib("value",f);c={path:b,update:c,I:d,status:null,Lf:id(),gf:e,Sf:0,le:function(){g.mc("value",f)},ne:null,Da:null,rd:null,sd:null,td:null};d=a.M.Aa(b,void 0)||H;c.rd=d;d=c.update(d.J());if(p(d)){hg("transaction failed: Data returned ",d,c.path);c.status=1;e=Xf(a.yc,b);var k=e.Ea()||[];k.push(c);Yf(e,k);"object"===typeof d&&null!==d&&y(d,".priority")?(k=z(d,".priority"),O(fg(k),"Invalid priority returned by transaction. Priority must be a valid string, finite number, server value, or null.")):
|
|
228
229
|
k=(a.M.Aa(b)||H).C().J();e=Mi(a);d=Q(d,k);e=Xc(d,e);c.sd=d;c.td=e;c.Da=a.Kd++;c=pi(a.M,b,e,c.Da,c.gf);dc(a.fa,b,c);Ti(a)}else c.le(),c.sd=null,c.td=null,c.I&&(a=new W(c.rd,new X(a,c.path),R),c.I(null,!1,a))}function Ti(a,b){var c=b||a.yc;b||Ui(a,c);if(null!==c.Ea()){var d=Vi(a,c);O(0<d.length,"Sending zero length transaction queue");Qa(d,function(a){return 1===a.status})&&Wi(a,c.path(),d)}else c.zd()&&c.R(function(b){Ti(a,b)})}
|
|
229
230
|
function Wi(a,b,c){for(var d=Oa(c,function(a){return a.Da}),e=a.M.Aa(b,d)||H,d=e,e=e.hash(),f=0;f<c.length;f++){var g=c[f];O(1===g.status,"tryToSendTransactionQueue_: items in queue should all be run.");g.status=2;g.Sf++;var k=lf(b,g.path),d=d.H(k,g.sd)}d=d.J(!0);a.da.put(b.toString(),d,function(d){a.f("transaction put response",{path:b.toString(),status:d});var e=[];if("ok"===d){d=[];for(f=0;f<c.length;f++){c[f].status=3;e=e.concat(si(a.M,c[f].Da));if(c[f].I){var g=c[f].td,k=new X(a,c[f].path);d.push(u(c[f].I,
|
|
230
231
|
null,null,!0,new W(g,k,R)))}c[f].le()}Ui(a,Xf(a.yc,b));Ti(a);dc(a.fa,b,e);for(f=0;f<d.length;f++)gc(d[f])}else{if("datastale"===d)for(f=0;f<c.length;f++)c[f].status=4===c[f].status?5:1;else for(S("transaction at "+b.toString()+" failed: "+d),f=0;f<c.length;f++)c[f].status=5,c[f].ne=d;Ni(a,b)}},e)}function Ni(a,b){var c=Xi(a,b),d=c.path(),c=Vi(a,c);Yi(a,c,d);return d}
|
|
231
|
-
function Yi(a,b,c){if(0!==b.length){for(var d=[],e=[],f=
|
|
232
|
-
I&&y(I,".priority")||(m=m.ia(A.C())),A=k.Da,I=Mi(a),I=Xc(m,I),k.sd=m,k.td=I,k.Da=a.Kd++,Ta(f,A),e=e.concat(pi(a.M,k.path,I,k.Da,k.gf)),e=e.concat(si(a.M,A,!0))):(l=!0,t="nodata",e=e.concat(si(a.M,k.Da,!0)))}dc(a.fa,c,e);e=[];l&&(b[g].status=3,setTimeout(b[g].le,Math.floor(0)),b[g].I&&("nodata"===t?(k=new X(a,b[g].path),d.push(u(b[g].I,null,null,!1,new W(b[g].rd,k,R)))):d.push(u(b[g].I,null,Error(t),!1,null))))}Ui(a,a.yc);for(g=0;g<d.length;g++)gc(d[g]);
|
|
233
|
-
function Xi(a,b){for(var c,d=a.yc;null!==(c=K(b))&&null===d.Ea();)d=Xf(d,c),b=N(b);return d}function Vi(a,b){var c=[];Zi(a,b,c);c.sort(function(a,b){return a.Lf-b.Lf});return c}function Zi(a,b,c){var d=b.Ea();if(null!==d)for(var e=0;e<d.length;e++)c.push(d[e]);b.R(function(b){Zi(a,b,c)})}function Ui(a,b){var c=b.Ea();if(c){for(var d=0,e=0;e<c.length;e++)3!==c[e].status&&(c[d]=c[e],d++);c.length=d;Yf(b,0<c.length?c:null)}b.R(function(b){Ui(a,b)})}
|
|
232
|
+
function Yi(a,b,c){if(0!==b.length){for(var d=[],e=[],f=Na(b,function(a){return 1===a.status}),f=Oa(f,function(a){return a.Da}),g=0;g<b.length;g++){var k=b[g],m=lf(c,k.path),l=!1,t;O(null!==m,"rerunTransactionsUnderNode_: relativePath should not be null.");if(5===k.status)l=!0,t=k.ne,e=e.concat(si(a.M,k.Da,!0));else if(1===k.status)if(25<=k.Sf)l=!0,t="maxretry",e=e.concat(si(a.M,k.Da,!0));else{var A=a.M.Aa(k.path,f)||H;k.rd=A;var I=b[g].update(A.J());p(I)?(hg("transaction failed: Data returned ",
|
|
233
|
+
I,k.path),m=Q(I),"object"===typeof I&&null!=I&&y(I,".priority")||(m=m.ia(A.C())),A=k.Da,I=Mi(a),I=Xc(m,I),k.sd=m,k.td=I,k.Da=a.Kd++,Ta(f,A),e=e.concat(pi(a.M,k.path,I,k.Da,k.gf)),e=e.concat(si(a.M,A,!0))):(l=!0,t="nodata",e=e.concat(si(a.M,k.Da,!0)))}dc(a.fa,c,e);e=[];l&&(b[g].status=3,setTimeout(b[g].le,Math.floor(0)),b[g].I&&("nodata"===t?(k=new X(a,b[g].path),d.push(u(b[g].I,null,null,!1,new W(b[g].rd,k,R)))):d.push(u(b[g].I,null,Error(t),!1,null))))}Ui(a,a.yc);for(g=0;g<d.length;g++)gc(d[g]);
|
|
234
|
+
Ti(a)}}function Xi(a,b){for(var c,d=a.yc;null!==(c=K(b))&&null===d.Ea();)d=Xf(d,c),b=N(b);return d}function Vi(a,b){var c=[];Zi(a,b,c);c.sort(function(a,b){return a.Lf-b.Lf});return c}function Zi(a,b,c){var d=b.Ea();if(null!==d)for(var e=0;e<d.length;e++)c.push(d[e]);b.R(function(b){Zi(a,b,c)})}function Ui(a,b){var c=b.Ea();if(c){for(var d=0,e=0;e<c.length;e++)3!==c[e].status&&(c[d]=c[e],d++);c.length=d;Yf(b,0<c.length?c:null)}b.R(function(b){Ui(a,b)})}
|
|
234
235
|
function Qi(a,b){var c=Xi(a,b).path(),d=Xf(a.yc,b);ag(d,function(b){$i(a,b)});$i(a,d);$f(d,function(b){$i(a,b)});return c}
|
|
235
236
|
function $i(a,b){var c=b.Ea();if(null!==c){for(var d=[],e=[],f=-1,g=0;g<c.length;g++)4!==c[g].status&&(2===c[g].status?(O(f===g-1,"All SENT items should be at beginning of queue."),f=g,c[g].status=4,c[g].ne="set"):(O(1===c[g].status,"Unexpected transaction status in abort"),c[g].le(),e=e.concat(si(a.M,c[g].Da,!0)),c[g].I&&d.push(u(c[g].I,null,Error("set"),!1,null))));-1===f?Yf(b,null):c.length=f+1;dc(a.fa,b.path(),e);for(g=0;g<d.length;g++)gc(d[g])}};function aj(){this.sc={};this.ag=!1}aj.prototype.Cb=function(){for(var a in this.sc)this.sc[a].Cb()};aj.prototype.vc=function(){for(var a in this.sc)this.sc[a].vc()};aj.prototype.ze=function(){this.ag=!0};ba(aj);aj.prototype.interrupt=aj.prototype.Cb;aj.prototype.resume=aj.prototype.vc;function Y(a,b,c,d){this.k=a;this.path=b;this.n=c;this.pc=d}
|
|
236
237
|
function bj(a){var b=null,c=null;a.oa&&(b=Od(a));a.ra&&(c=Rd(a));if(a.g===re){if(a.oa){if("[MIN_NAME]"!=Nd(a))throw Error("Query: When ordering by key, you may only pass one argument to startAt(), endAt(), or equalTo().");if("string"!==typeof b)throw Error("Query: When ordering by key, the argument passed to startAt(), endAt(),or equalTo() must be a string.");}if(a.ra){if("[MAX_NAME]"!=Pd(a))throw Error("Query: When ordering by key, you may only pass one argument to startAt(), endAt(), or equalTo().");if("string"!==
|
|
@@ -238,19 +239,19 @@ typeof c)throw Error("Query: When ordering by key, the argument passed to startA
|
|
|
238
239
|
}function cj(a){if(a.oa&&a.ra&&a.la&&(!a.la||""===a.Rb))throw Error("Query: Can't combine startAt(), endAt(), and limit(). Use limitToFirst() or limitToLast() instead.");}function dj(a,b){if(!0===a.pc)throw Error(b+": You can't combine multiple orderBy calls.");}h=Y.prototype;h.Mb=function(){D("Query.ref",0,0,arguments.length);return new X(this.k,this.path)};
|
|
239
240
|
h.Ib=function(a,b,c,d){D("Query.on",2,4,arguments.length);lg("Query.on",a,!1);F("Query.on",2,b,!1);var e=ej("Query.on",c,d);if("value"===a)Ri(this.k,this,new ii(b,e.cancel||null,e.Qa||null));else{var f={};f[a]=b;Ri(this.k,this,new ji(f,e.cancel,e.Qa))}return b};
|
|
240
241
|
h.mc=function(a,b,c){D("Query.off",0,3,arguments.length);lg("Query.off",a,!0);F("Query.off",2,b,!0);Qb("Query.off",3,c);var d=null,e=null;"value"===a?d=new ii(b||null,null,c||null):a&&(b&&(e={},e[a]=b),d=new ji(e,null,c||null));e=this.k;d=".info"===K(this.path)?e.Fd.nb(this,d):e.M.nb(this,d);bc(e.fa,this.path,d)};
|
|
241
|
-
h.
|
|
242
|
+
h.Pg=function(a,b){function c(k){f&&(f=!1,e.mc(a,c),b&&b.call(d.Qa,k),g.resolve(k))}D("Query.once",1,4,arguments.length);lg("Query.once",a,!1);F("Query.once",2,b,!0);var d=ej("Query.once",arguments[2],arguments[3]),e=this,f=!0,g=new B;Nb(g.D);this.Ib(a,c,function(b){e.mc(a,c);d.cancel&&d.cancel.call(d.Qa,b);g.reject(b)});return g.D};
|
|
242
243
|
h.Le=function(a){S("Query.limit() being deprecated. Please use Query.limitToFirst() or Query.limitToLast() instead.");D("Query.limit",1,1,arguments.length);if(!fa(a)||Math.floor(a)!==a||0>=a)throw Error("Query.limit: First argument must be a positive integer.");if(this.n.la)throw Error("Query.limit: Limit was already set (by another call to limit, limitToFirst, orlimitToLast.");var b=this.n.Le(a);cj(b);return new Y(this.k,this.path,b,this.pc)};
|
|
243
244
|
h.Me=function(a){D("Query.limitToFirst",1,1,arguments.length);if(!fa(a)||Math.floor(a)!==a||0>=a)throw Error("Query.limitToFirst: First argument must be a positive integer.");if(this.n.la)throw Error("Query.limitToFirst: Limit was already set (by another call to limit, limitToFirst, or limitToLast).");return new Y(this.k,this.path,this.n.Me(a),this.pc)};
|
|
244
245
|
h.Ne=function(a){D("Query.limitToLast",1,1,arguments.length);if(!fa(a)||Math.floor(a)!==a||0>=a)throw Error("Query.limitToLast: First argument must be a positive integer.");if(this.n.la)throw Error("Query.limitToLast: Limit was already set (by another call to limit, limitToFirst, or limitToLast).");return new Y(this.k,this.path,this.n.Ne(a),this.pc)};
|
|
245
|
-
h.
|
|
246
|
-
b=new ve(b);b=Fe(this.n,b);bj(b);return new Y(this.k,this.path,b,!0)};h.
|
|
247
|
-
h.
|
|
246
|
+
h.Qg=function(a){D("Query.orderByChild",1,1,arguments.length);if("$key"===a)throw Error('Query.orderByChild: "$key" is invalid. Use Query.orderByKey() instead.');if("$priority"===a)throw Error('Query.orderByChild: "$priority" is invalid. Use Query.orderByPriority() instead.');if("$value"===a)throw Error('Query.orderByChild: "$value" is invalid. Use Query.orderByValue() instead.');ng("Query.orderByChild",a);dj(this,"Query.orderByChild");var b=new P(a);if(b.e())throw Error("Query.orderByChild: cannot pass in empty path. Use Query.orderByValue() instead.");
|
|
247
|
+
b=new ve(b);b=Fe(this.n,b);bj(b);return new Y(this.k,this.path,b,!0)};h.Rg=function(){D("Query.orderByKey",0,0,arguments.length);dj(this,"Query.orderByKey");var a=Fe(this.n,re);bj(a);return new Y(this.k,this.path,a,!0)};h.Sg=function(){D("Query.orderByPriority",0,0,arguments.length);dj(this,"Query.orderByPriority");var a=Fe(this.n,R);bj(a);return new Y(this.k,this.path,a,!0)};
|
|
248
|
+
h.Tg=function(){D("Query.orderByValue",0,0,arguments.length);dj(this,"Query.orderByValue");var a=Fe(this.n,Be);bj(a);return new Y(this.k,this.path,a,!0)};h.ce=function(a,b){D("Query.startAt",0,2,arguments.length);gg("Query.startAt",a,this.path,!0);mg("Query.startAt",b);var c=this.n.ce(a,b);cj(c);bj(c);if(this.n.oa)throw Error("Query.startAt: Starting point was already set (by another call to startAt or equalTo).");p(a)||(b=a=null);return new Y(this.k,this.path,c,this.pc)};
|
|
248
249
|
h.vd=function(a,b){D("Query.endAt",0,2,arguments.length);gg("Query.endAt",a,this.path,!0);mg("Query.endAt",b);var c=this.n.vd(a,b);cj(c);bj(c);if(this.n.ra)throw Error("Query.endAt: Ending point was already set (by another call to endAt or equalTo).");return new Y(this.k,this.path,c,this.pc)};
|
|
249
250
|
h.tg=function(a,b){D("Query.equalTo",1,2,arguments.length);gg("Query.equalTo",a,this.path,!1);mg("Query.equalTo",b);if(this.n.oa)throw Error("Query.equalTo: Starting point was already set (by another call to endAt or equalTo).");if(this.n.ra)throw Error("Query.equalTo: Ending point was already set (by another call to endAt or equalTo).");return this.ce(a,b).vd(a,b)};
|
|
250
251
|
h.toString=function(){D("Query.toString",0,0,arguments.length);for(var a=this.path,b="",c=a.aa;c<a.u.length;c++)""!==a.u[c]&&(b+="/"+encodeURIComponent(String(a.u[c])));return this.k.toString()+(b||"/")};h.wa=function(){var a=xd(Ge(this.n));return"{}"===a?"default":a};
|
|
251
|
-
function ej(a,b,c){var d={cancel:null,Qa:null};if(b&&c)d.cancel=b,F(a,3,d.cancel,!0),d.Qa=c,Qb(a,4,d.Qa);else if(b)if("object"===typeof b&&null!==b)d.Qa=b;else if("function"===typeof b)d.cancel=b;else throw Error(E(a,3,!0)+" must either be a cancel callback or a context object.");return d}Y.prototype.ref=Y.prototype.Mb;Y.prototype.on=Y.prototype.Ib;Y.prototype.off=Y.prototype.mc;Y.prototype.once=Y.prototype.
|
|
252
|
-
Y.prototype.limitToLast=Y.prototype.Ne;Y.prototype.orderByChild=Y.prototype.
|
|
253
|
-
Z.Cg=function(a){var b=Rh.prototype.put;Rh.prototype.put=function(c,d,e,f){p(f)&&(f=a());b.call(this,c,d,e,f)};return function(){Rh.prototype.put=b}};Z.hijackHash=Z.Cg;Z.cg=dd;Z.ConnectionTarget=Z.cg;Z.wa=function(a){return a.wa()};Z.queryIdentifier=Z.wa;Z.
|
|
252
|
+
function ej(a,b,c){var d={cancel:null,Qa:null};if(b&&c)d.cancel=b,F(a,3,d.cancel,!0),d.Qa=c,Qb(a,4,d.Qa);else if(b)if("object"===typeof b&&null!==b)d.Qa=b;else if("function"===typeof b)d.cancel=b;else throw Error(E(a,3,!0)+" must either be a cancel callback or a context object.");return d}Y.prototype.ref=Y.prototype.Mb;Y.prototype.on=Y.prototype.Ib;Y.prototype.off=Y.prototype.mc;Y.prototype.once=Y.prototype.Pg;Y.prototype.limit=Y.prototype.Le;Y.prototype.limitToFirst=Y.prototype.Me;
|
|
253
|
+
Y.prototype.limitToLast=Y.prototype.Ne;Y.prototype.orderByChild=Y.prototype.Qg;Y.prototype.orderByKey=Y.prototype.Rg;Y.prototype.orderByPriority=Y.prototype.Sg;Y.prototype.orderByValue=Y.prototype.Tg;Y.prototype.startAt=Y.prototype.ce;Y.prototype.endAt=Y.prototype.vd;Y.prototype.equalTo=Y.prototype.tg;Y.prototype.toString=Y.prototype.toString;var Z={};Z.zc=Rh;Z.DataConnection=Z.zc;Rh.prototype.dh=function(a,b){this.Ia("q",{p:a},b)};Z.zc.prototype.simpleListen=Z.zc.prototype.dh;Rh.prototype.sg=function(a,b){this.Ia("echo",{d:a},b)};Z.zc.prototype.echo=Z.zc.prototype.sg;Rh.prototype.interrupt=Rh.prototype.Cb;Z.dg=Fh;Z.RealTimeConnection=Z.dg;Fh.prototype.sendRequest=Fh.prototype.Ia;Fh.prototype.close=Fh.prototype.close;
|
|
254
|
+
Z.Cg=function(a){var b=Rh.prototype.put;Rh.prototype.put=function(c,d,e,f){p(f)&&(f=a());b.call(this,c,d,e,f)};return function(){Rh.prototype.put=b}};Z.hijackHash=Z.Cg;Z.cg=dd;Z.ConnectionTarget=Z.cg;Z.wa=function(a){return a.wa()};Z.queryIdentifier=Z.wa;Z.Fg=function(a){return a.k.Va.ba};Z.listens=Z.Fg;Z.ze=function(a){a.ze()};Z.forceRestClient=Z.ze;function X(a,b){var c,d,e;if(a instanceof Ji)c=a,d=b;else{D("new Firebase",1,2,arguments.length);d=sd(arguments[0]);c=d.fh;"firebase"===d.domain&&rd(d.host+" is no longer supported. Please use <YOUR FIREBASE>.firebaseio.com instead");c&&"undefined"!=c||rd("Cannot parse Firebase url. Please use https://<YOUR FIREBASE>.firebaseio.com");d.ob||"undefined"!==typeof window&&window.location&&window.location.protocol&&-1!==window.location.protocol.indexOf("https:")&&S("Insecure Firebase access from a secure page. Please use https in calls to new Firebase().");
|
|
254
255
|
c=new dd(d.host,d.ob,c,"ws"===d.scheme||"wss"===d.scheme);d=new P(d.bd);e=d.toString();var f;!(f=!q(c.host)||0===c.host.length||!eg(c.lc))&&(f=0!==e.length)&&(e&&(e=e.replace(/^\/*\.info(\/|$)/,"/")),f=!(q(e)&&0!==e.length&&!cg.test(e)));if(f)throw Error(E("new Firebase",1,!1)+'must be a valid firebase URL and the path can\'t contain ".", "#", "$", "[", or "]".');if(b)if(b instanceof aj)e=b;else if(q(b))e=aj.yb(),c.Rd=b;else throw Error("Expected a valid Firebase.Context for second argument to new Firebase()");
|
|
255
256
|
else e=aj.yb();f=c.toString();var g=z(e.sc,f);g||(g=new Ji(c,e.ag),e.sc[f]=g);c=g}Y.call(this,c,d,De,!1);this.then=void 0;this["catch"]=void 0}ka(X,Y);var fj=X,gj=["Firebase"],hj=n;gj[0]in hj||!hj.execScript||hj.execScript("var "+gj[0]);for(var ij;gj.length&&(ij=gj.shift());)!gj.length&&p(fj)?hj[ij]=fj:hj=hj[ij]?hj[ij]:hj[ij]={};X.goOffline=function(){D("Firebase.goOffline",0,0,arguments.length);aj.yb().Cb()};X.goOnline=function(){D("Firebase.goOnline",0,0,arguments.length);aj.yb().vc()};
|
|
256
257
|
X.enableLogging=od;X.ServerValue={TIMESTAMP:{".sv":"timestamp"}};X.SDK_VERSION=Eb;X.INTERNAL=U;X.Context=aj;X.TEST_ACCESS=Z;X.prototype.name=function(){S("Firebase.name() being deprecated. Please use Firebase.key() instead.");D("Firebase.name",0,0,arguments.length);return this.key()};X.prototype.name=X.prototype.name;X.prototype.key=function(){D("Firebase.key",0,0,arguments.length);return this.path.e()?null:me(this.path)};X.prototype.key=X.prototype.key;
|
|
@@ -260,10 +261,10 @@ X.prototype.update=function(a,b){D("Firebase.update",1,2,arguments.length);og("F
|
|
|
260
261
|
X.prototype.update=X.prototype.update;X.prototype.Ob=function(a,b,c){D("Firebase.setWithPriority",2,3,arguments.length);og("Firebase.setWithPriority",this.path);gg("Firebase.setWithPriority",a,this.path,!1);kg("Firebase.setWithPriority",2,b);F("Firebase.setWithPriority",3,c,!0);if(".length"===this.key()||".keys"===this.key())throw"Firebase.setWithPriority failed: "+this.key()+" is a read-only object.";var d=new B;this.k.Ob(this.path,a,b,C(d,c));return d.D};X.prototype.setWithPriority=X.prototype.Ob;
|
|
261
262
|
X.prototype.remove=function(a){D("Firebase.remove",0,1,arguments.length);og("Firebase.remove",this.path);F("Firebase.remove",1,a,!0);return this.set(null,a)};X.prototype.remove=X.prototype.remove;
|
|
262
263
|
X.prototype.transaction=function(a,b,c){D("Firebase.transaction",1,3,arguments.length);og("Firebase.transaction",this.path);F("Firebase.transaction",1,a,!1);F("Firebase.transaction",2,b,!0);if(p(c)&&"boolean"!=typeof c)throw Error(E("Firebase.transaction",3,!0)+"must be a boolean.");if(".length"===this.key()||".keys"===this.key())throw"Firebase.transaction failed: "+this.key()+" is a read-only object.";"undefined"===typeof c&&(c=!0);var d=new B;r(b)&&Nb(d.D);Si(this.k,this.path,a,function(a,c,g){a?
|
|
263
|
-
d.reject(a):d.resolve(new ei(c,g));r(b)&&b(a,c,g)},c);return d.D};X.prototype.transaction=X.prototype.transaction;X.prototype
|
|
264
|
+
d.reject(a):d.resolve(new ei(c,g));r(b)&&b(a,c,g)},c);return d.D};X.prototype.transaction=X.prototype.transaction;X.prototype.$g=function(a,b){D("Firebase.setPriority",1,2,arguments.length);og("Firebase.setPriority",this.path);kg("Firebase.setPriority",1,a);F("Firebase.setPriority",2,b,!0);var c=new B;this.k.Ob(this.path.o(".priority"),a,null,C(c,b));return c.D};X.prototype.setPriority=X.prototype.$g;
|
|
264
265
|
X.prototype.push=function(a,b){D("Firebase.push",0,2,arguments.length);og("Firebase.push",this.path);gg("Firebase.push",a,this.path,!0);F("Firebase.push",2,b,!0);var c=Li(this.k),d=hf(c),c=this.o(d);if(null!=a){var e=this,f=c.set(a,b).then(function(){return e.o(d)});c.then=u(f.then,f);c["catch"]=u(f.then,f,void 0);r(b)&&Nb(f)}return c};X.prototype.push=X.prototype.push;X.prototype.lb=function(){og("Firebase.onDisconnect",this.path);return new V(this.k,this.path)};X.prototype.onDisconnect=X.prototype.lb;
|
|
265
266
|
X.prototype.O=function(a,b,c){S("FirebaseRef.auth() being deprecated. Please use FirebaseRef.authWithCustomToken() instead.");D("Firebase.auth",1,3,arguments.length);pg("Firebase.auth",a);F("Firebase.auth",2,b,!0);F("Firebase.auth",3,b,!0);var d=new B;dh(this.k.O,a,{},{remember:"none"},C(d,b),c);return d.D};X.prototype.auth=X.prototype.O;X.prototype.je=function(a){D("Firebase.unauth",0,1,arguments.length);F("Firebase.unauth",1,a,!0);var b=new B;eh(this.k.O,C(b,a));return b.D};X.prototype.unauth=X.prototype.je;
|
|
266
|
-
X.prototype.Be=function(){D("Firebase.getAuth",0,0,arguments.length);return this.k.O.Be()};X.prototype.getAuth=X.prototype.Be;X.prototype.
|
|
267
|
+
X.prototype.Be=function(){D("Firebase.getAuth",0,0,arguments.length);return this.k.O.Be()};X.prototype.getAuth=X.prototype.Be;X.prototype.Jg=function(a,b){D("Firebase.onAuth",1,2,arguments.length);F("Firebase.onAuth",1,a,!1);Qb("Firebase.onAuth",2,b);this.k.O.Ib("auth_status",a,b)};X.prototype.onAuth=X.prototype.Jg;X.prototype.Ig=function(a,b){D("Firebase.offAuth",1,2,arguments.length);F("Firebase.offAuth",1,a,!1);Qb("Firebase.offAuth",2,b);this.k.O.mc("auth_status",a,b)};X.prototype.offAuth=X.prototype.Ig;
|
|
267
268
|
X.prototype.hg=function(a,b,c){D("Firebase.authWithCustomToken",1,3,arguments.length);2===arguments.length&&Hb(b)&&(c=b,b=void 0);pg("Firebase.authWithCustomToken",a);F("Firebase.authWithCustomToken",2,b,!0);sg("Firebase.authWithCustomToken",3,c,!0);var d=new B;dh(this.k.O,a,{},c||{},C(d,b));return d.D};X.prototype.authWithCustomToken=X.prototype.hg;
|
|
268
269
|
X.prototype.ig=function(a,b,c){D("Firebase.authWithOAuthPopup",1,3,arguments.length);2===arguments.length&&Hb(b)&&(c=b,b=void 0);rg("Firebase.authWithOAuthPopup",a);F("Firebase.authWithOAuthPopup",2,b,!0);sg("Firebase.authWithOAuthPopup",3,c,!0);var d=new B;ih(this.k.O,a,c,C(d,b));return d.D};X.prototype.authWithOAuthPopup=X.prototype.ig;
|
|
269
270
|
X.prototype.jg=function(a,b,c){D("Firebase.authWithOAuthRedirect",1,3,arguments.length);2===arguments.length&&Hb(b)&&(c=b,b=void 0);rg("Firebase.authWithOAuthRedirect",a);F("Firebase.authWithOAuthRedirect",2,b,!1);sg("Firebase.authWithOAuthRedirect",3,c,!0);var d=new B,e=this.k.O,f=c,g=C(d,b);gh(e);var k=[Qg],f=Ag(f);"anonymous"===a||"firebase"===a?T(g,Sg("TRANSPORT_UNAVAILABLE")):(cd.set("redirect_client_options",f.qd),hh(e,k,"/auth/"+a,f,g));return d.D};X.prototype.authWithOAuthRedirect=X.prototype.jg;
|
package/npm-shrinkwrap.json
CHANGED
package/package.json
CHANGED