UNPKG

firebase

Version:

Firebase JavaScript library for web and Node.js

1 lines • 226 kB
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(require("@firebase/app")):"function"==typeof define&&define.amd?define(["@firebase/app"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).firebase)}(this,function(Hf){"use strict";try{(function(){function t(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var u,e=t(Hf),r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function n(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function y(t,s,u,a){return new(u=u||Promise)(function(n,e){function r(t){try{o(a.next(t))}catch(t){e(t)}}function i(t){try{o(a.throw(t))}catch(t){e(t)}}function o(t){var e;t.done?n(t.value):((e=t.value)instanceof u?e:new u(function(t){t(e)})).then(r,i)}o((a=a.apply(t,s||[])).next())})}function v(n,r){var i,o,s,u={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},t={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(t[Symbol.iterator]=function(){return this}),t;function e(e){return function(t){return function(e){if(i)throw new TypeError("Generator is already executing.");for(;u;)try{if(i=1,o&&(s=2&e[0]?o.return:e[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,e[1])).done)return s;switch(o=0,s&&(e=[2&e[0],s.value]),e[0]){case 0:case 1:s=e;break;case 4:return u.label++,{value:e[1],done:!1};case 5:u.label++,o=e[1],e=[0];continue;case 7:e=u.ops.pop(),u.trys.pop();continue;default:if(!(s=0<(s=u.trys).length&&s[s.length-1])&&(6===e[0]||2===e[0])){u=0;continue}if(3===e[0]&&(!s||e[1]>s[0]&&e[1]<s[3])){u.label=e[1];break}if(6===e[0]&&u.label<s[1]){u.label=s[1],s=e;break}if(s&&u.label<s[2]){u.label=s[2],u.ops.push(e);break}s[2]&&u.ops.pop(),u.trys.pop();continue}e=r.call(n,u)}catch(t){e=[6,t],o=0}finally{i=s=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,t])}}}function i(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;for(var r=Array(t),i=0,e=0;e<n;e++)for(var o=arguments[e],s=0,u=o.length;s<u;s++,i++)r[i]=o[s];return r}function s(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;for(var r=Array(t),i=0,e=0;e<n;e++)for(var o=arguments[e],s=0,u=o.length;s<u;s++,i++)r[i]=o[s];return r}(Ee=u=u||{})[Ee.DEBUG=0]="DEBUG",Ee[Ee.VERBOSE=1]="VERBOSE",Ee[Ee.INFO=2]="INFO",Ee[Ee.WARN=3]="WARN",Ee[Ee.ERROR=4]="ERROR",Ee[Ee.SILENT=5]="SILENT";function o(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(!(e<t.logLevel)){var i=(new Date).toISOString(),o=c[e];if(!o)throw new Error("Attempted to log a message with an invalid logType (value: "+e+")");console[o].apply(console,s(["["+i+"] "+t.name+":"],n))}}var a={debug:u.DEBUG,verbose:u.VERBOSE,info:u.INFO,warn:u.WARN,error:u.ERROR,silent:u.SILENT},h=u.INFO,c=((Ie={})[u.DEBUG]="log",Ie[u.VERBOSE]="log",Ie[u.INFO]="info",Ie[u.WARN]="warn",Ie[u.ERROR]="error",Ie),l=(Object.defineProperty(f.prototype,"logLevel",{get:function(){return this._logLevel},set:function(t){if(!(t in u))throw new TypeError('Invalid value "'+t+'" assigned to `logLevel`');this._logLevel=t},enumerable:!1,configurable:!0}),f.prototype.setLogLevel=function(t){this._logLevel="string"==typeof t?a[t]:t},Object.defineProperty(f.prototype,"logHandler",{get:function(){return this._logHandler},set:function(t){if("function"!=typeof t)throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=t},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"userLogHandler",{get:function(){return this._userLogHandler},set:function(t){this._userLogHandler=t},enumerable:!1,configurable:!0}),f.prototype.debug=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._userLogHandler&&this._userLogHandler.apply(this,s([this,u.DEBUG],t)),this._logHandler.apply(this,s([this,u.DEBUG],t))},f.prototype.log=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._userLogHandler&&this._userLogHandler.apply(this,s([this,u.VERBOSE],t)),this._logHandler.apply(this,s([this,u.VERBOSE],t))},f.prototype.info=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._userLogHandler&&this._userLogHandler.apply(this,s([this,u.INFO],t)),this._logHandler.apply(this,s([this,u.INFO],t))},f.prototype.warn=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._userLogHandler&&this._userLogHandler.apply(this,s([this,u.WARN],t)),this._logHandler.apply(this,s([this,u.WARN],t))},f.prototype.error=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._userLogHandler&&this._userLogHandler.apply(this,s([this,u.ERROR],t)),this._logHandler.apply(this,s([this,u.ERROR],t))},f);function f(t){this.name=t,this._logLevel=h,this._logHandler=o,this._userLogHandler=null}function p(){return"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:""}var d,g="FirebaseError",m=(n(w,d=Error),w);function w(t,e){e=d.call(this,e)||this;return e.code=t,e.name=g,Object.setPrototypeOf(e,w.prototype),Error.captureStackTrace&&Error.captureStackTrace(e,b.prototype.create),e}var b=(E.prototype.create=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r,i=e[0]||{},o=this.service+"/"+t,t=this.errors[t],t=t?(r=i,t.replace(I,function(t,e){var n=r[e];return null!=n?String(n):"<"+e+"?>"})):"Error",t=this.serviceName+": "+t+" ("+o+").",s=new m(o,t),u=0,a=Object.keys(i);u<a.length;u++){var h=a[u];"_"!==h.slice(-1)&&(h in s&&console.warn('Overwriting FirebaseError base field "'+h+'" can cause unexpected behavior.'),s[h]=i[h])}return s},E);function E(t,e,n){this.service=t,this.serviceName=e,this.errors=n}var I=/\{\$([^}]+)}/g,T=function(t,e){return(T=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function A(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}var N,R="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},S={},D=R||self;function L(){}function O(t){var e=typeof t;return"object"!=e?e:t?Array.isArray(t)?"array":e:"null"}function P(t){var e=O(t);return"array"==e||"object"==e&&"number"==typeof t.length}function k(t){var e=typeof t;return"object"==e&&null!=t||"function"==e}var U="closure_uid_"+(1e9*Math.random()>>>0),_=0;function V(t,e,n){return t.call.apply(t.bind,arguments)}function C(e,n,t){if(!e)throw Error();if(2<arguments.length){var r=Array.prototype.slice.call(arguments,2);return function(){var t=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(t,r),e.apply(n,t)}}return function(){return e.apply(n,arguments)}}function j(t,e,n){return(j=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?V:C).apply(null,arguments)}function M(e){var n=Array.prototype.slice.call(arguments,1);return function(){var t=n.slice();return t.push.apply(t,arguments),e.apply(this,t)}}var x=Date.now;function q(t,e){function n(){}n.prototype=e.prototype,t.S=e.prototype,t.prototype=new n,t.prototype.constructor=t}function F(){this.j=this.j,this.i=this.i}F.prototype.j=!1,F.prototype.ja=function(){var t;!this.j&&(this.j=!0,this.G(),0)&&(t=this,Object.prototype.hasOwnProperty.call(t,U)&&t[U]||(t[U]=++_))},F.prototype.G=function(){if(this.i)for(;this.i.length;)this.i.shift()()};var B=Array.prototype.indexOf?function(t,e){return Array.prototype.indexOf.call(t,e,void 0)}:function(t,e){if("string"==typeof t)return"string"!=typeof e||1!=e.length?-1:t.indexOf(e,0);for(var n=0;n<t.length;n++)if(n in t&&t[n]===e)return n;return-1},G=Array.prototype.forEach?function(t,e,n){Array.prototype.forEach.call(t,e,n)}:function(t,e,n){for(var r=t.length,i="string"==typeof t?t.split(""):t,o=0;o<r;o++)o in i&&e.call(n,i[o],o,t)};function Q(){return Array.prototype.concat.apply([],arguments)}function z(t){var e=t.length;if(0<e){for(var n=Array(e),r=0;r<e;r++)n[r]=t[r];return n}return[]}function W(t){return/^[\s\xa0]*$/.test(t)}var H,X=String.prototype.trim?function(t){return t.trim()}:function(t){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(t)[1]};function Y(t,e){return-1!=t.indexOf(e)}function K(t,e){return t<e?-1:e<t?1:0}t:{var J=D.navigator;if(J){J=J.userAgent;if(J){H=J;break t}}H=""}function Z(t,e,n){for(var r in t)e.call(n,t[r],r,t)}function $(t){var e,n={};for(e in t)n[e]=t[e];return n}var tt="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function et(t){for(var e,n,r=1;r<arguments.length;r++){for(e in n=arguments[r])t[e]=n[e];for(var i=0;i<tt.length;i++)e=tt[i],Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])}}function nt(t){return nt[" "](t),t}nt[" "]=L;var rt,it=Y(H,"Opera"),ot=Y(H,"Trident")||Y(H,"MSIE"),st=Y(H,"Edge"),ut=st||ot,at=Y(H,"Gecko")&&!(Y(H.toLowerCase(),"webkit")&&!Y(H,"Edge"))&&!(Y(H,"Trident")||Y(H,"MSIE"))&&!Y(H,"Edge"),ht=Y(H.toLowerCase(),"webkit")&&!Y(H,"Edge");function ct(){var t=D.document;return t?t.documentMode:void 0}t:{var lt="",ft=(ft=H,at?/rv:([^\);]+)(\)|;)/.exec(ft):st?/Edge\/([\d\.]+)/.exec(ft):ot?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(ft):ht?/WebKit\/(\S+)/.exec(ft):it?/(?:Version)[ \/]?(\S+)/.exec(ft):void 0);if(ft&&(lt=ft?ft[1]:""),ot){ft=ct();if(null!=ft&&ft>parseFloat(lt)){rt=String(ft);break t}}rt=lt}var pt={};function dt(u){return t=u,e=function(){for(var t=0,e=X(String(rt)).split("."),n=X(String(u)).split("."),r=Math.max(e.length,n.length),i=0;0==t&&i<r;i++){var o=e[i]||"",s=n[i]||"";do{if(o=/(\d*)(\D*)(.*)/.exec(o)||["","","",""],s=/(\d*)(\D*)(.*)/.exec(s)||["","","",""],0==o[0].length&&0==s[0].length)break;t=K(0==o[1].length?0:parseInt(o[1],10),0==s[1].length?0:parseInt(s[1],10))||K(0==o[2].length,0==s[2].length)||K(o[2],s[2]),o=o[3],s=s[3]}while(0==t)}return 0<=t},n=pt,Object.prototype.hasOwnProperty.call(n,t)?n[t]:n[t]=e(t);var t,e,n}var yt=D.document&&ot?ct()||(parseInt(rt,10)||void 0):void 0,vt=!ot||9<=Number(yt),gt=ot&&!dt("9"),mt=function(){if(!D.addEventListener||!Object.defineProperty)return!1;var t=!1,e=Object.defineProperty({},"passive",{get:function(){t=!0}});try{D.addEventListener("test",L,e),D.removeEventListener("test",L,e)}catch(t){}return t}();function wt(t,e){this.type=t,this.a=this.target=e,this.defaultPrevented=!1}function bt(t,e){if(wt.call(this,t?t.type:""),this.relatedTarget=this.a=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.pointerId=0,this.pointerType="",this.c=null,t){var n=this.type=t.type,r=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:null;if(this.target=t.target||t.srcElement,this.a=e,e=t.relatedTarget){if(at){t:{try{nt(e.nodeName);var i=!0;break t}catch(t){}i=!1}i||(e=null)}}else"mouseover"==n?e=t.fromElement:"mouseout"==n&&(e=t.toElement);this.relatedTarget=e,r?(this.clientX=void 0!==r.clientX?r.clientX:r.pageX,this.clientY=void 0!==r.clientY?r.clientY:r.pageY,this.screenX=r.screenX||0,this.screenY=r.screenY||0):(this.clientX=void 0!==t.clientX?t.clientX:t.pageX,this.clientY=void 0!==t.clientY?t.clientY:t.pageY,this.screenX=t.screenX||0,this.screenY=t.screenY||0),this.button=t.button,this.key=t.key||"",this.ctrlKey=t.ctrlKey,this.altKey=t.altKey,this.shiftKey=t.shiftKey,this.metaKey=t.metaKey,this.pointerId=t.pointerId||0,this.pointerType="string"==typeof t.pointerType?t.pointerType:Et[t.pointerType]||"",(this.c=t).defaultPrevented&&this.b()}}wt.prototype.b=function(){this.defaultPrevented=!0},q(bt,wt);var Et={2:"touch",3:"pen",4:"mouse"};bt.prototype.b=function(){bt.S.b.call(this);var t=this.c;if(t.preventDefault)t.preventDefault();else if(t.returnValue=!1,gt)try{(t.ctrlKey||112<=t.keyCode&&t.keyCode<=123)&&(t.keyCode=-1)}catch(t){}};var It="closure_listenable_"+(1e6*Math.random()|0),Tt=0;function At(t,e,n,r,i){this.listener=t,this.proxy=null,this.src=e,this.type=n,this.capture=!!r,this.ca=i,this.key=++Tt,this.Y=this.Z=!1}function Nt(t){t.Y=!0,t.listener=null,t.proxy=null,t.src=null,t.ca=null}function Rt(t){this.src=t,this.a={},this.b=0}function St(t,e){var n,r,i,o=e.type;o in t.a&&(n=t.a[o],(i=0<=(r=B(n,e)))&&Array.prototype.splice.call(n,r,1),i&&(Nt(e),0==t.a[o].length&&(delete t.a[o],t.b--)))}function Dt(t,e,n,r){for(var i=0;i<t.length;++i){var o=t[i];if(!o.Y&&o.listener==e&&o.capture==!!n&&o.ca==r)return i}return-1}Rt.prototype.add=function(t,e,n,r,i){var o=t.toString();(t=this.a[o])||(t=this.a[o]=[],this.b++);var s=Dt(t,e,r,i);return-1<s?(e=t[s],n||(e.Z=!1)):((e=new At(e,this.src,o,!!r,i)).Z=n,t.push(e)),e};var Lt="closure_lm_"+(1e6*Math.random()|0),Ot={};function Pt(t,e,n,r,i){if(r&&r.once)return function t(e,n,r,i,o){if(Array.isArray(n)){for(var s=0;s<n.length;s++)t(e,n[s],r,i,o);return null}r=xt(r);return e&&e[It]?e.wa(n,r,k(i)?!!i.capture:!!i,o):kt(e,n,r,!0,i,o)}(t,e,n,r,i);if(Array.isArray(e)){for(var o=0;o<e.length;o++)Pt(t,e[o],n,r,i);return null}return n=xt(n),t&&t[It]?t.va(e,n,k(r)?!!r.capture:!!r,i):kt(t,e,n,!1,r,i)}function kt(t,e,n,r,i,o){if(!e)throw Error("Invalid event type");var s=k(i)?!!i.capture:!!i;if(s&&!vt)return null;var u,a,h=jt(t);if(h||(t[Lt]=h=new Rt(t)),(n=h.add(e,n,r,s,o)).proxy)return n;if(u=Ct,r=a=vt?function(t){return u.call(a.src,a.listener,t)}:function(t){if(!(t=u.call(a.src,a.listener,t)))return t},(n.proxy=r).src=t,r.listener=n,t.addEventListener)mt||(i=s),void 0===i&&(i=!1),t.addEventListener(e.toString(),r,i);else if(t.attachEvent)t.attachEvent(_t(e.toString()),r);else{if(!t.addListener||!t.removeListener)throw Error("addEventListener and attachEvent are unavailable.");t.addListener(r)}return n}function Ut(t){var e,n,r;"number"!=typeof t&&t&&!t.Y&&((e=t.src)&&e[It]?St(e.c,t):(n=t.type,r=t.proxy,e.removeEventListener?e.removeEventListener(n,r,t.capture):e.detachEvent?e.detachEvent(_t(n),r):e.addListener&&e.removeListener&&e.removeListener(r),(n=jt(e))?(St(n,t),0==n.b&&(n.src=null,e[Lt]=null)):Nt(t)))}function _t(t){return t in Ot?Ot[t]:Ot[t]="on"+t}function Vt(t,e){var n=t.listener,r=t.ca||t.src;return t.Z&&Ut(t),n.call(r,e)}function Ct(t,e){if(t.Y)return!0;if(vt)return Vt(t,new bt(e,this));if(!e)t:{e=["window","event"];for(var n=D,r=0;r<e.length;r++)if(null==(n=n[e[r]])){e=null;break t}e=n}return Vt(t,e=new bt(e,this))}function jt(t){return(t=t[Lt])instanceof Rt?t:null}var Mt="__closure_events_fn_"+(1e9*Math.random()>>>0);function xt(e){return"function"==O(e)?e:(e[Mt]||(e[Mt]=function(t){return e.handleEvent(t)}),e[Mt])}function qt(){F.call(this),this.c=new Rt(this),(this.J=this).C=null}function Ft(t,e,n,r){if(!(e=t.c.a[String(e)]))return!0;e=e.concat();for(var i=!0,o=0;o<e.length;++o){var s,u,a=e[o];a&&!a.Y&&a.capture==n&&(s=a.listener,u=a.ca||a.src,a.Z&&St(t.c,a),i=!1!==s.call(u,r)&&i)}return i&&!r.defaultPrevented}q(qt,F),qt.prototype[It]=!0,(N=qt.prototype).addEventListener=function(t,e,n,r){Pt(this,t,e,n,r)},N.removeEventListener=function(t,e,n,r){!function t(e,n,r,i,o){if(Array.isArray(n))for(var s=0;s<n.length;s++)t(e,n[s],r,i,o);else i=k(i)?!!i.capture:!!i,r=xt(r),e&&e[It]?(e=e.c,(n=String(n).toString())in e.a&&-1<(r=Dt(s=e.a[n],r,i,o))&&(Nt(s[r]),Array.prototype.splice.call(s,r,1),0==s.length&&(delete e.a[n],e.b--))):(e=e&&jt(e))&&(n=e.a[n.toString()],e=-1,n&&(e=Dt(n,r,i,o)),(r=-1<e?n[e]:null)&&Ut(r))}(this,t,e,n,r)},N.dispatchEvent=function(t){var e,n=this.C;if(n)for(e=[];n;n=n.C)e.push(n);n=this.J;var r=t.type||t;if("string"==typeof t?t=new wt(t,n):t instanceof wt?t.target=t.target||n:(s=t,et(t=new wt(r,n),s)),s=!0,e)for(var i=e.length-1;0<=i;i--)var o=t.a=e[i],s=Ft(o,r,!0,t)&&s;if(s=Ft(o=t.a=n,r,!0,t)&&s,s=Ft(o,r,!1,t)&&s,e)for(i=0;i<e.length;i++)s=Ft(o=t.a=e[i],r,!1,t)&&s;return s},N.G=function(){if(qt.S.G.call(this),this.c){var t,e=this.c;for(t in e.a){for(var n=e.a[t],r=0;r<n.length;r++)Nt(n[r]);delete e.a[t],e.b--}}this.C=null},N.va=function(t,e,n,r){return this.c.add(String(t),e,!1,n,r)},N.wa=function(t,e,n,r){return this.c.add(String(t),e,!0,n,r)};var Bt=D.JSON.stringify;function Gt(){this.b=this.a=null}var Qt,zt=(Wt.prototype.get=function(){var t;return 0<this.b?(this.b--,t=this.a,this.a=t.next,t.next=null):t=this.c(),t},new Wt(function(){return new Ht},function(t){t.reset()},100));function Wt(t,e,n){this.f=n,this.c=t,this.g=e,this.b=0,this.a=null}function Ht(){this.next=this.b=this.a=null}function Xt(t,e){var n;Qt||(n=D.Promise.resolve(void 0),Qt=function(){n.then(Jt)}),Yt||(Qt(),Yt=!0),Kt.add(t,e)}Gt.prototype.add=function(t,e){var n=zt.get();n.set(t,e),this.b?this.b.next=n:this.a=n,this.b=n},Ht.prototype.set=function(t,e){this.a=t,this.b=e,this.next=null};var Yt=!(Ht.prototype.reset=function(){this.next=this.b=this.a=null}),Kt=new Gt;function Jt(){for(var t,e;n=e=void 0,n=null,(e=Kt).a&&(n=e.a,e.a=e.a.next,e.a||(e.b=null),n.next=null),t=n;){try{t.a.call(t.b)}catch(t){!function(t){D.setTimeout(function(){throw t},0)}(t)}var n=zt;n.g(t),n.b<n.f&&(n.b++,t.next=n.a,n.a=t)}Yt=!1}function Zt(t,e){qt.call(this),this.b=t||1,this.a=e||D,this.f=j(this.Ya,this),this.g=x()}function $t(t){t.aa=!1,t.M&&(t.a.clearTimeout(t.M),t.M=null)}function te(t,e,n){if("function"==O(t))n&&(t=j(t,n));else{if(!t||"function"!=typeof t.handleEvent)throw Error("Invalid listener argument");t=j(t.handleEvent,t)}return 2147483647<Number(e)?-1:D.setTimeout(t,e||0)}q(Zt,qt),(N=Zt.prototype).aa=!1,N.M=null,N.Ya=function(){var t;this.aa&&(0<(t=x()-this.g)&&t<.8*this.b?this.M=this.a.setTimeout(this.f,this.b-t):(this.M&&(this.a.clearTimeout(this.M),this.M=null),this.dispatchEvent("tick"),this.aa&&($t(this),this.start())))},N.start=function(){this.aa=!0,this.M||(this.M=this.a.setTimeout(this.f,this.b),this.g=x())},N.G=function(){Zt.S.G.call(this),$t(this),delete this.a};var ee,ne,re,ie=(T(ne=se,re=ee=F),ne.prototype=null===re?Object.create(re):(oe.prototype=re.prototype,new oe),se.prototype.f=function(t){this.b=arguments,this.a?this.c=!0:function t(e){e.a=te(function(){e.a=null,e.c&&(e.c=!1,t(e))},e.h);var n=e.b;e.b=null,e.g.apply(null,n)}(this)},se.prototype.G=function(){ee.prototype.G.call(this),this.a&&(D.clearTimeout(this.a),this.a=null,this.c=!1,this.b=null)},se);function oe(){this.constructor=ne}function se(t,e,n){var r=ee.call(this)||this;return r.g=null!=n?t.bind(n):t,r.h=e,r.b=null,r.c=!1,r.a=null,r}function ue(t){F.call(this),this.b=t,this.a={}}q(ue,F);var ae=[];function he(t,e,n,r){Array.isArray(n)||(n&&(ae[0]=n.toString()),n=ae);for(var i=0;i<n.length;i++){var o=Pt(e,n[i],r||t.handleEvent,!1,t.b||t);if(!o)break;t.a[o.key]=o}}function ce(t){Z(t.a,function(t,e){this.a.hasOwnProperty(e)&&Ut(t)},t),t.a={}}function le(){this.a=!0}function fe(t,e,n,r){t.info(function(){return"XMLHTTP TEXT ("+e+"): "+function(t,e){if(!t.a)return e;if(!e)return null;try{var n=JSON.parse(e);if(n)for(t=0;t<n.length;t++)if(Array.isArray(n[t])){var r=n[t];if(!(r.length<2)){var i=r[1];if(Array.isArray(i)&&!(i.length<1)){r=i[0];if("noop"!=r&&"stop"!=r&&"close"!=r)for(var o=1;o<i.length;o++)i[o]=""}}}return Bt(n)}catch(t){return e}}(t,n)+(r?" "+r:"")})}ue.prototype.G=function(){ue.S.G.call(this),ce(this)},ue.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")},le.prototype.info=function(){};var pe=null;function de(){return pe=pe||new qt}function ye(t){wt.call(this,"serverreachability",t)}function ve(t){var e=de();e.dispatchEvent(new ye(e))}function ge(t){wt.call(this,"statevent",t)}function me(t){var e=de();e.dispatchEvent(new ge(e))}function we(t){wt.call(this,"timingevent",t)}function be(t,e){if("function"!=O(t))throw Error("Fn must not be null and must be a function");return D.setTimeout(function(){t()},e)}q(ye,wt),q(ge,wt),q(we,wt);var Ee={NO_ERROR:0,Za:1,gb:2,fb:3,bb:4,eb:5,hb:6,Da:7,TIMEOUT:8,kb:9},Ie={ab:"complete",ob:"success",Ea:"error",Da:"abort",mb:"ready",nb:"readystatechange",TIMEOUT:"timeout",ib:"incrementaldata",lb:"progress",cb:"downloadprogress",pb:"uploadprogress"};function Te(){}function Ae(t){var e;return(e=t.a)||(e=t.a={}),e}function Ne(){}Te.prototype.a=null;var Re,R={OPEN:"a",$a:"b",Ea:"c",jb:"d"};function Se(){wt.call(this,"d")}function De(){wt.call(this,"c")}function Le(){}function Oe(t,e,n,r){this.g=t,this.c=e,this.f=n,this.T=r||1,this.J=new ue(this),this.P=Pe,t=ut?125:void 0,this.R=new Zt(t),this.B=null,this.b=!1,this.j=this.l=this.i=this.H=this.u=this.U=this.o=null,this.s=[],this.a=null,this.D=0,this.h=this.m=null,this.N=-1,this.A=!1,this.O=0,this.F=null,this.W=this.C=this.V=this.I=!1}q(Se,wt),q(De,wt),q(Le,Te),Re=new Le;var Pe=45e3,ke={},Ue={};function _e(t,e,n){t.H=1,t.i=en(Ye(e)),t.j=n,t.I=!0,Ve(t,null)}function Ve(t,e){t.u=x(),je(t),t.l=Ye(t.i);var s,u,a,h,c,l,n=t.l,r=t.T;Array.isArray(r)||(r=[String(r)]),yn(n.b,"t",r),t.D=0,t.a=ar(t.g,t.g.C?e:null),0<t.O&&(t.F=new ie(j(t.Ca,t,t.a),t.O)),he(t.J,t.a,"readystatechange",t.Wa),e=t.B?$(t.B):{},t.j?(t.m||(t.m="POST"),e["Content-Type"]="application/x-www-form-urlencoded",t.a.ba(t.l,t.m,t.j,e)):(t.m="GET",t.a.ba(t.l,t.m,null,e)),ve(1),s=t.c,u=t.m,a=t.l,h=t.f,c=t.T,l=t.j,s.info(function(){if(s.a)if(l)for(var t="",e=l.split("&"),n=0;n<e.length;n++){var r,i,o=e[n].split("=");1<o.length&&(r=o[0],o=o[1],t=2<=(i=r.split("_")).length&&"type"==i[1]?t+(r+"=")+o+"&":t+(r+"=redacted&"))}else t=null;else t=l;return"XMLHTTP REQ ("+h+") [attempt "+c+"]: "+u+"\n"+a+"\n"+t})}function Ce(t,e,n){for(var r,i,o,s=!0;!t.A&&t.D<n.length;){var u=(u=n,o=i=void 0,i=(r=t).D,-1==(o=u.indexOf("\n",i))?Ue:(i=Number(u.substring(i,o)),isNaN(i)?ke:(o+=1)+i>u.length?Ue:(u=u.substr(o,i),r.D=o+i,u)));if(u==Ue){4==e&&(t.h=4,me(14),s=!1),fe(t.c,t.f,null,"[Incomplete Response]");break}if(u==ke){t.h=4,me(15),fe(t.c,t.f,n,"[Invalid Chunk]"),s=!1;break}fe(t.c,t.f,u,null),Be(t,u)}4==e&&0==n.length&&(t.h=1,me(16),s=!1),t.b=t.b&&s,s?0<n.length&&!t.W&&(t.W=!0,(e=t.g).a==t&&e.V&&!e.F&&(e.c.info("Great, no buffering proxy detected. Bytes received: "+n.length),tr(e),e.F=!0)):(fe(t.c,t.f,n,"[Invalid Chunked Response]"),Fe(t),qe(t))}function je(t){t.U=x()+t.P,Me(t,t.P)}function Me(t,e){if(null!=t.o)throw Error("WatchDog timer not null");t.o=be(j(t.Ua,t),e)}function xe(t){t.o&&(D.clearTimeout(t.o),t.o=null)}function qe(t){0==t.g.v||t.A||rr(t.g,t)}function Fe(t){xe(t);var e=t.F;e&&"function"==typeof e.ja&&e.ja(),t.F=null,$t(t.R),ce(t.J),t.a&&(e=t.a,t.a=null,e.abort(),e.ja())}function Be(t,e){try{var n,r,i,o,s,u=t.g;if(0!=u.v&&(u.a==t||In(u.b,t)))if(u.I=t.N,!t.C&&In(u.b,t)&&3==u.v){try{var a=u.ka.a.parse(e)}catch(t){a=null}if(Array.isArray(a)&&3==a.length){var h=a;if(0==h[0]){t:if(!u.j){if(u.a){if(!(u.a.u+3e3<t.u))break t;nr(u),zn(u)}$n(u),me(18)}}else u.oa=h[1],0<u.oa-u.P&&h[2]<37500&&u.H&&0==u.o&&!u.m&&(u.m=be(j(u.Ra,u),6e3));if(En(u.b)<=1&&u.ea){try{u.ea()}catch(t){}u.ea=void 0}}else or(u,11)}else if(!t.C&&u.a!=t||nr(u),!W(e))for(e=a=u.ka.a.parse(e),a=0;a<e.length;a++){h=e[a],u.P=h[0],h=h[1],2==u.v?"c"==h[0]?(u.J=h[1],u.ga=h[2],null!=(r=h[3])&&(u.ha=r,u.c.info("VER="+u.ha)),null!=(o=h[4])&&(u.pa=o,u.c.info("SVER="+u.pa)),null!=(r=h[5])&&"number"==typeof r&&0<r&&(n=1.5*r,u.D=n,u.c.info("backChannelRequestTimeoutMs_="+n)),n=u,(o=t.a)&&(!(r=o.a?o.a.getResponseHeader("X-Client-Wire-Protocol"):null)||!(i=n.b).a&&(Y(r,"spdy")||Y(r,"quic")||Y(r,"h2"))&&(i.f=i.g,i.a=new Set,i.b&&(Tn(i,i.b),i.b=null)),!n.A||(s=o.a?o.a.getResponseHeader("X-HTTP-Session-Id"):null)&&(n.na=s,tn(n.B,n.A,s))),u.v=3,u.f&&u.f.ta(),u.V&&(u.N=x()-t.u,u.c.info("Handshake RTT: "+u.N+"ms")),i=t,(n=u).la=ur(n,n.C?n.ga:null,n.fa),i.C?(An(n.b,i),o=i,(s=n.D)&&o.setTimeout(s),o.o&&(xe(o),je(o)),n.a=i):Zn(n),0<u.g.length&&Xn(u)):"stop"!=h[0]&&"close"!=h[0]||or(u,7):3==u.v&&("stop"==h[0]||"close"==h[0]?"stop"==h[0]?or(u,7):Qn(u):"noop"!=h[0]&&u.f&&u.f.sa(h),u.o=0)}ve(4)}catch(t){}}function Ge(t,e){if(t.forEach&&"function"==typeof t.forEach)t.forEach(e,void 0);else if(P(t)||"string"==typeof t)G(t,e,void 0);else{if(t.L&&"function"==typeof t.L)var n=t.L();else if(t.K&&"function"==typeof t.K)n=void 0;else if(P(t)||"string"==typeof t){n=[];for(var r=t.length,i=0;i<r;i++)n.push(i)}else for(i in n=[],r=0,t)n[r++]=i;i=(r=function(t){if(t.K&&"function"==typeof t.K)return t.K();if("string"==typeof t)return t.split("");if(P(t)){for(var e=[],n=t.length,r=0;r<n;r++)e.push(t[r]);return e}for(r in e=[],n=0,t)e[n++]=t[r];return e}(t)).length;for(var o=0;o<i;o++)e.call(void 0,r[o],n&&n[o],t)}}function Qe(t,e){this.b={},this.a=[],this.c=0;var n=arguments.length;if(1<n){if(n%2)throw Error("Uneven number of arguments");for(var r=0;r<n;r+=2)this.set(arguments[r],arguments[r+1])}else if(t)if(t instanceof Qe)for(n=t.L(),r=0;r<n.length;r++)this.set(n[r],t.get(n[r]));else for(r in t)this.set(r,t[r])}function ze(t){if(t.c!=t.a.length){for(var e=0,n=0;e<t.a.length;){var r=t.a[e];We(t.b,r)&&(t.a[n++]=r),e++}t.a.length=n}if(t.c!=t.a.length){for(var i={},n=e=0;e<t.a.length;)We(i,r=t.a[e])||(i[t.a[n++]=r]=1),e++;t.a.length=n}}function We(t,e){return Object.prototype.hasOwnProperty.call(t,e)}(N=Oe.prototype).setTimeout=function(t){this.P=t},N.Wa=function(t){t=t.target;var e=this.F;e&&3==qn(t)?e.f():this.Ca(t)},N.Ca=function(t){try{if(t==this.a)t:{var e=qn(this.a),n=this.a.ua(),r=this.a.X();if(!(e<3||3==e&&!ut&&!this.a.$())){this.A||4!=e||7==n||ve(8==n||r<=0?3:2),xe(this);var i=this.a.X();this.N=i;n=this.a.$();if(this.b=200==i,r=this.c,u=this.m,a=this.l,h=this.f,c=this.T,l=e,f=i,r.info(function(){return"XMLHTTP RESP ("+h+") [ attempt "+c+"]: "+u+"\n"+a+"\n"+l+" "+f}),this.b){if(this.V&&!this.C){e:{if(this.a){var o=this.a;if((o=o.a?o.a.getResponseHeader("X-HTTP-Initial-Response"):null)&&!W(o)){var s=o;break e}}s=null}if(!s){this.b=!1,this.h=3,me(12),Fe(this),qe(this);break t}fe(this.c,this.f,s,"Initial handshake response via X-HTTP-Initial-Response"),this.C=!0,Be(this,s)}this.I?(Ce(this,e,n),ut&&this.b&&3==e&&(he(this.J,this.R,"tick",this.Va),this.R.start())):(fe(this.c,this.f,n,null),Be(this,n)),4==e&&Fe(this),this.b&&!this.A&&(4==e?rr(this.g,this):(this.b=!1,je(this)))}else 400==i&&0<n.indexOf("Unknown SID")?(this.h=3,me(12)):(this.h=0,me(13)),Fe(this),qe(this)}}}catch(t){}var u,a,h,c,l,f},N.Va=function(){var t,e;this.a&&(t=qn(this.a),e=this.a.$(),this.D<e.length&&(xe(this),Ce(this,t,e),this.b&&4!=t&&je(this)))},N.cancel=function(){this.A=!0,Fe(this)},N.Ua=function(){this.o=null;var t,e,n=x();0<=n-this.U?(t=this.c,e=this.l,t.info(function(){return"TIMEOUT: "+e}),2!=this.H&&(ve(3),me(17)),Fe(this),this.h=2,qe(this)):Me(this,this.U-n)},(N=Qe.prototype).K=function(){ze(this);for(var t=[],e=0;e<this.a.length;e++)t.push(this.b[this.a[e]]);return t},N.L=function(){return ze(this),this.a.concat()},N.get=function(t,e){return We(this.b,t)?this.b[t]:e},N.set=function(t,e){We(this.b,t)||(this.c++,this.a.push(t)),this.b[t]=e},N.forEach=function(t,e){for(var n=this.L(),r=0;r<n.length;r++){var i=n[r],o=this.get(i);t.call(e,o,i,this)}};var He=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^\\/?#]*)@)?([^\\/?#]*?)(?::([0-9]+))?(?=[\\/?#]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/;function Xe(t,e){var n;this.c=this.j=this.f="",this.h=null,this.i=this.g="",this.a=!1,t instanceof Xe?(this.a=void 0!==e?e:t.a,Ke(this,t.f),this.j=t.j,Je(this,t.c),Ze(this,t.h),this.g=t.g,e=t.b,(n=new ln).c=e.c,e.a&&(n.a=new Qe(e.a),n.b=e.b),$e(this,n),this.i=t.i):t&&(n=String(t).match(He))?(this.a=!!e,Ke(this,n[1]||"",!0),this.j=nn(n[2]||""),Je(this,n[3]||"",!0),Ze(this,n[4]),this.g=nn(n[5]||"",!0),$e(this,n[6]||"",!0),this.i=nn(n[7]||"")):(this.a=!!e,this.b=new ln(null,this.a))}function Ye(t){return new Xe(t)}function Ke(t,e,n){t.f=n?nn(e,!0):e,t.f&&(t.f=t.f.replace(/:$/,""))}function Je(t,e,n){t.c=n?nn(e,!0):e}function Ze(t,e){if(e){if(e=Number(e),isNaN(e)||e<0)throw Error("Bad port number "+e);t.h=e}else t.h=null}function $e(t,e,n){var r,i;e instanceof ln?(t.b=e,r=t.b,(i=t.a)&&!r.f&&(fn(r),r.c=null,r.a.forEach(function(t,e){var n=e.toLowerCase();e!=n&&(pn(this,e),yn(this,n,t))},r)),r.f=i):(n||(e=rn(e,hn)),t.b=new ln(e,t.a))}function tn(t,e,n){t.b.set(e,n)}function en(t){return tn(t,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^x()).toString(36)),t}function nn(t,e){return t?e?decodeURI(t.replace(/%25/g,"%2525")):decodeURIComponent(t):""}function rn(t,e,n){return"string"==typeof t?(t=encodeURI(t).replace(e,on),n&&(t=t.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),t):null}function on(t){return"%"+((t=t.charCodeAt(0))>>4&15).toString(16)+(15&t).toString(16)}Xe.prototype.toString=function(){var t=[],e=this.f;e&&t.push(rn(e,sn,!0),":");var n=this.c;return!n&&"file"!=e||(t.push("//"),(e=this.j)&&t.push(rn(e,sn,!0),"@"),t.push(encodeURIComponent(String(n)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(n=this.h)&&t.push(":",String(n))),(n=this.g)&&(this.c&&"/"!=n.charAt(0)&&t.push("/"),t.push(rn(n,"/"==n.charAt(0)?an:un,!0))),(n=this.b.toString())&&t.push("?",n),(n=this.i)&&t.push("#",rn(n,cn)),t.join("")};var sn=/[#\/\?@]/g,un=/[#\?:]/g,an=/[#\?]/g,hn=/[#\?@]/g,cn=/#/g;function ln(t,e){this.b=this.a=null,this.c=t||null,this.f=!!e}function fn(n){n.a||(n.a=new Qe,n.b=0,n.c&&function(t,e){if(t){t=t.split("&");for(var n=0;n<t.length;n++){var r,i=t[n].indexOf("="),o=null;0<=i?(r=t[n].substring(0,i),o=t[n].substring(i+1)):r=t[n],e(r,o?decodeURIComponent(o.replace(/\+/g," ")):"")}}}(n.c,function(t,e){n.add(decodeURIComponent(t.replace(/\+/g," ")),e)}))}function pn(t,e){fn(t),e=vn(t,e),We(t.a.b,e)&&(t.c=null,t.b-=t.a.get(e).length,We((t=t.a).b,e)&&(delete t.b[e],t.c--,t.a.length>2*t.c&&ze(t)))}function dn(t,e){return fn(t),e=vn(t,e),We(t.a.b,e)}function yn(t,e,n){pn(t,e),0<n.length&&(t.c=null,t.a.set(vn(t,e),z(n)),t.b+=n.length)}function vn(t,e){return e=String(e),t.f&&(e=e.toLowerCase()),e}function gn(t,e){this.b=t,this.a=e}function mn(t){this.g=t||wn,t=D.PerformanceNavigationTiming?0<(t=D.performance.getEntriesByType("navigation")).length&&("hq"==t[0].nextHopProtocol||"h2"==t[0].nextHopProtocol):!!(D.ia&&D.ia.ya&&D.ia.ya()&&D.ia.ya().qb),this.f=t?this.g:1,this.a=null,1<this.f&&(this.a=new Set),this.b=null,this.c=[]}(N=ln.prototype).add=function(t,e){fn(this),this.c=null,t=vn(this,t);var n=this.a.get(t);return n||this.a.set(t,n=[]),n.push(e),this.b+=1,this},N.forEach=function(n,r){fn(this),this.a.forEach(function(t,e){G(t,function(t){n.call(r,t,e,this)},this)},this)},N.L=function(){fn(this);for(var t=this.a.K(),e=this.a.L(),n=[],r=0;r<e.length;r++)for(var i=t[r],o=0;o<i.length;o++)n.push(e[r]);return n},N.K=function(t){fn(this);var e=[];if("string"==typeof t)dn(this,t)&&(e=Q(e,this.a.get(vn(this,t))));else{t=this.a.K();for(var n=0;n<t.length;n++)e=Q(e,t[n])}return e},N.set=function(t,e){return fn(this),this.c=null,dn(this,t=vn(this,t))&&(this.b-=this.a.get(t).length),this.a.set(t,[e]),this.b+=1,this},N.get=function(t,e){return t&&0<(t=this.K(t)).length?String(t[0]):e},N.toString=function(){if(this.c)return this.c;if(!this.a)return"";for(var t=[],e=this.a.L(),n=0;n<e.length;n++)for(var r=e[n],i=encodeURIComponent(String(r)),r=this.K(r),o=0;o<r.length;o++){var s=i;""!==r[o]&&(s+="="+encodeURIComponent(String(r[o]))),t.push(s)}return this.c=t.join("&")};var wn=10;function bn(t){return t.b||t.a&&t.a.size>=t.f}function En(t){return t.b?1:t.a?t.a.size:0}function In(t,e){return t.b?t.b==e:t.a&&t.a.has(e)}function Tn(t,e){t.a?t.a.add(e):t.b=e}function An(t,e){t.b&&t.b==e?t.b=null:t.a&&t.a.has(e)&&t.a.delete(e)}function Nn(t){var e,n;if(null!=t.b)return t.c.concat(t.b.s);if(null==t.a||0===t.a.size)return z(t.c);var r=t.c;try{for(var i=A(t.a.values()),o=i.next();!o.done;o=i.next())var s=o.value,r=r.concat(s.s)}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r}function Rn(){}function Sn(){this.a=new Rn}function Dn(t,e,n,r,i){try{e.onload=null,e.onerror=null,e.onabort=null,e.ontimeout=null,i(r)}catch(t){}}mn.prototype.cancel=function(){var e,t;if(this.c=Nn(this),this.b)this.b.cancel(),this.b=null;else if(this.a&&0!==this.a.size){try{for(var n=A(this.a.values()),r=n.next();!r.done;r=n.next()){r.value.cancel()}}catch(t){e={error:t}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}this.a.clear()}},Rn.prototype.stringify=function(t){return D.JSON.stringify(t,void 0)},Rn.prototype.parse=function(t){return D.JSON.parse(t,void 0)};var Ln=D.JSON.parse;function On(t){qt.call(this),this.headers=new Qe,this.H=t||null,this.b=!1,this.s=this.a=null,this.B="",this.h=0,this.f="",this.g=this.A=this.l=this.u=!1,this.o=0,this.m=null,this.I=Pn,this.D=this.F=!1}q(On,qt);var Pn="",kn=/^https?$/i,Un=["POST","PUT"];function _n(t){return"content-type"==t.toLowerCase()}function Vn(t,e){t.b=!1,t.a&&(t.g=!0,t.a.abort(),t.g=!1),t.f=e,t.h=5,Cn(t),Mn(t)}function Cn(t){t.u||(t.u=!0,t.dispatchEvent("complete"),t.dispatchEvent("error"))}function jn(t){if(t.b&&void 0!==S&&(!t.s[1]||4!=qn(t)||2!=t.X()))if(t.l&&4==qn(t))te(t.za,0,t);else if(t.dispatchEvent("readystatechange"),4==qn(t)){t.b=!1;try{var e,n,r,i,o=t.X();t:switch(o){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var s=!0;break t;default:s=!1}if((e=s)||((n=0===o)&&(!(i=String(t.B).match(He)[1]||null)&&D.self&&D.self.location&&(i=(r=D.self.location.protocol).substr(0,r.length-1)),n=!kn.test(i?i.toLowerCase():"")),e=n),e)t.dispatchEvent("complete"),t.dispatchEvent("success");else{t.h=6;try{var u=2<qn(t)?t.a.statusText:""}catch(t){u=""}t.f=u+" ["+t.X()+"]",Cn(t)}}finally{Mn(t)}}}function Mn(t,e){if(t.a){xn(t);var n=t.a,r=t.s[0]?L:null;t.a=null,t.s=null,e||t.dispatchEvent("ready");try{n.onreadystatechange=r}catch(t){}}}function xn(t){t.a&&t.D&&(t.a.ontimeout=null),t.m&&(D.clearTimeout(t.m),t.m=null)}function qn(t){return t.a?t.a.readyState:0}function Fn(t,e,n){t:{for(r in n){var r=!1;break t}r=!0}var i;r||(i="",Z(n,function(t,e){i+=e,i+=":",i+=t,i+="\r\n"}),n=i,"string"==typeof t?null!=n&&encodeURIComponent(String(n)):tn(t,e,n))}function Bn(t,e,n){return n&&n.internalChannelParams&&n.internalChannelParams[t]||e}function Gn(t){this.pa=0,this.g=[],this.c=new le,this.ga=this.la=this.B=this.fa=this.a=this.na=this.A=this.W=this.i=this.O=this.l=null,this.La=this.R=0,this.Ia=Bn("failFast",!1,t),this.H=this.m=this.j=this.h=this.f=null,this.T=!0,this.I=this.oa=this.P=-1,this.U=this.o=this.u=0,this.Fa=Bn("baseRetryDelayMs",5e3,t),this.Ma=Bn("retryDelaySeedMs",1e4,t),this.Ja=Bn("forwardChannelMaxRetries",2,t),this.ma=Bn("forwardChannelRequestTimeoutMs",2e4,t),this.Ka=t&&t.g||void 0,this.D=void 0,this.C=t&&t.supportsCrossDomainXhr||!1,this.J="",this.b=new mn(t&&t.concurrentRequestLimit),this.ka=new Sn,this.da=t&&t.fastHandshake||!1,this.Ga=t&&t.b||!1,t&&t.f&&(this.c.a=!1),t&&t.forceLongPolling&&(this.T=!1),this.V=!this.da&&this.T&&t&&t.c||!1,this.ea=void 0,this.N=0,this.F=!1,this.s=null}function Qn(t){var e,n;Wn(t),3==t.v&&(e=t.R++,tn(n=Ye(t.B),"SID",t.J),tn(n,"RID",e),tn(n,"TYPE","terminate"),Kn(t,n),(e=new Oe(t,t.c,e,void 0)).H=2,e.i=en(Ye(n)),n=!1,D.navigator&&D.navigator.sendBeacon&&(n=D.navigator.sendBeacon(e.i.toString(),"")),!n&&D.Image&&((new Image).src=e.i,n=!0),n||(e.a=ar(e.g,null),e.a.ba(e.i)),e.u=x(),je(e)),sr(t)}function zn(t){t.a&&(tr(t),t.a.cancel(),t.a=null)}function Wn(t){zn(t),t.j&&(D.clearTimeout(t.j),t.j=null),nr(t),t.b.cancel(),t.h&&("number"==typeof t.h&&D.clearTimeout(t.h),t.h=null)}function Hn(t,e){t.g.push(new gn(t.La++,e)),3==t.v&&Xn(t)}function Xn(t){bn(t.b)||t.h||(t.h=!0,Xt(t.Ba,t),t.u=0)}function Yn(t,e){var n=e?e.f:t.R++,r=Ye(t.B);tn(r,"SID",t.J),tn(r,"RID",n),tn(r,"AID",t.P),Kn(t,r),t.i&&t.l&&Fn(r,t.i,t.l),n=new Oe(t,t.c,n,t.u+1),null===t.i&&(n.B=t.l),e&&(t.g=e.s.concat(t.g)),e=Jn(t,n,1e3),n.setTimeout(Math.round(.5*t.ma)+Math.round(.5*t.ma*Math.random())),Tn(t.b,n),_e(n,r,e)}function Kn(t,n){t.f&&Ge({},function(t,e){tn(n,e,t)})}function Jn(t,e,n){n=Math.min(t.g.length,n);var r=t.f?j(t.f.Ha,t.f,t):null;t:for(var i=t.g,o=-1;;){var s=["count="+n];-1==o?0<n?(o=i[0].b,s.push("ofs="+o)):o=0:s.push("ofs="+o);for(var u=!0,a=0;a<n;a++){var h=i[a].b,c=i[a].a;if((h-=o)<0)o=Math.max(0,i[a].b-100),u=!1;else try{!function(t,r,e){var i=e||"";try{Ge(t,function(t,e){var n=t;k(t)&&(n=Bt(t)),r.push(i+e+"="+encodeURIComponent(n))})}catch(t){throw r.push(i+"type="+encodeURIComponent("_badmap")),t}}(c,s,"req"+h+"_")}catch(t){r&&r(c)}}if(u){r=s.join("&");break t}}return t=t.g.splice(0,n),e.s=t,r}function Zn(t){t.a||t.j||(t.U=1,Xt(t.Aa,t),t.o=0)}function $n(t){return!(t.a||t.j||3<=t.o)&&(t.U++,t.j=be(j(t.Aa,t),ir(t,t.o)),t.o++,1)}function tr(t){null!=t.s&&(D.clearTimeout(t.s),t.s=null)}function er(t){t.a=new Oe(t,t.c,"rpc",t.U),null===t.i&&(t.a.B=t.l),t.a.O=0;var e=Ye(t.la);tn(e,"RID","rpc"),tn(e,"SID",t.J),tn(e,"CI",t.H?"0":"1"),tn(e,"AID",t.P),Kn(t,e),tn(e,"TYPE","xmlhttp"),t.i&&t.l&&Fn(e,t.i,t.l),t.D&&t.a.setTimeout(t.D);var n=t.a;t=t.ga,n.H=1,n.i=en(Ye(e)),n.j=null,n.I=!0,Ve(n,t)}function nr(t){null!=t.m&&(D.clearTimeout(t.m),t.m=null)}function rr(t,e){var n,r=null;if(t.a==e){nr(t),tr(t),t.a=null;var i=2}else{if(!In(t.b,e))return;r=e.s,An(t.b,e),i=1}if(t.I=e.N,0!=t.v)if(e.b){1==i?(r=e.j?e.j.length:0,e=x()-e.u,n=t.u,(i=de()).dispatchEvent(new we(i)),Xn(t)):Zn(t)}else if(3==(n=e.h)||0==n&&0<t.I||!(1==i&&function(t,e){if(!(En(t.b)>=t.b.f-(t.h?1:0))){if(t.h)return t.g=e.s.concat(t.g),1;if(!(1==t.v||2==t.v||t.u>=(t.Ia?0:t.Ja)))return t.h=be(j(t.Ba,t,e),ir(t,t.u)),t.u++,1}}(t,e)||2==i&&$n(t)))switch(r&&0<r.length&&(e=t.b,e.c=e.c.concat(r)),n){case 1:or(t,5);break;case 4:or(t,10);break;case 3:or(t,6);break;default:or(t,2)}}function ir(t,e){var n=t.Fa+Math.floor(Math.random()*t.Ma);return t.f||(n*=2),n*e}function or(t,e){var n,r,i,o;t.c.info("Error code "+e),2==e?(r=null,t.f&&(r=null),o=j(t.Xa,t),r||(r=new Xe("//www.google.com/images/cleardot.gif"),D.location&&"http"==D.location.protocol||Ke(r,"https"),en(r)),n=r.toString(),r=o,o=new le,D.Image?((i=new Image).onload=M(Dn,o,i,"TestLoadImage: loaded",!0,r),i.onerror=M(Dn,o,i,"TestLoadImage: error",!1,r),i.onabort=M(Dn,o,i,"TestLoadImage: abort",!1,r),i.ontimeout=M(Dn,o,i,"TestLoadImage: timeout",!1,r),D.setTimeout(function(){i.ontimeout&&i.ontimeout()},1e4),i.src=n):r(!1)):me(2),t.v=0,t.f&&t.f.ra(e),sr(t),Wn(t)}function sr(t){t.v=0,t.I=-1,t.f&&(0==Nn(t.b).length&&0==t.g.length||(t.b.c.length=0,z(t.g),t.g.length=0),t.f.qa())}function ur(t,e,n){var r,i,o,s,u,a=(s=n)instanceof Xe?Ye(s):new Xe(s,void 0);return""!=a.c?(e&&Je(a,e+"."+a.c),Ze(a,a.h)):(u=D.location,r=u.protocol,i=e?e+"."+u.hostname:u.hostname,o=+u.port,s=n,u=new Xe(null,void 0),r&&Ke(u,r),i&&Je(u,i),o&&Ze(u,o),s&&(u.g=s),a=u),t.W&&Z(t.W,function(t,e){tn(a,e,t)}),e=t.A,n=t.na,e&&n&&tn(a,e,n),tn(a,"VER",t.ha),Kn(t,a),a}function ar(t,e){if(e&&!t.C)throw Error("Can't create secondary domain capable XhrIo object.");return(e=new On(t.Ka)).F=t.C,e}function hr(){}function cr(){if(ot&&!(10<=Number(yt)))throw Error("Environmental error: no available transport.")}function lr(t,e){qt.call(this),this.a=new Gn(e),this.l=t,this.b=e&&e.messageUrlParams||null,t=e&&e.messageHeaders||null,e&&e.clientProtocolHeaderRequired&&(t?t["X-Client-Protocol"]="webchannel":t={"X-Client-Protocol":"webchannel"}),this.a.l=t,t=e&&e.initMessageHeaders||null,e&&e.messageContentType&&(t?t["X-WebChannel-Content-Type"]=e.messageContentType:t={"X-WebChannel-Content-Type":e.messageContentType}),e&&e.a&&(t?t["X-WebChannel-Client-Profile"]=e.a:t={"X-WebChannel-Client-Profile":e.a}),this.a.O=t,(t=e&&e.httpHeadersOverwriteParam)&&!W(t)&&(this.a.i=t),this.h=e&&e.supportsCrossDomainXhr||!1,this.g=e&&e.sendRawJson||!1,(e=e&&e.httpSessionIdParam)&&!W(e)&&(this.a.A=e,null!==(t=this.b)&&e in t&&(e in(t=this.b)&&delete t[e])),this.f=new dr(this)}function fr(t){Se.call(this);var e=t.__sm__;if(e){t:{for(var n in e){t=n;break t}t=void 0}(this.c=t)?(t=this.c,this.data=null!==e&&t in e?e[t]:void 0):this.data=e}else this.data=t}function pr(){De.call(this),this.status=1}function dr(t){this.a=t}(N=On.prototype).ba=function(t,e,n,r){if(this.a)throw Error("[goog.net.XhrIo] Object is active with another request="+this.B+"; newUri="+t);e=e?e.toUpperCase():"GET",this.B=t,this.f="",this.h=0,this.u=!1,this.b=!0,this.a=new XMLHttpRequest,this.s=this.H?Ae(this.H):Ae(Re),this.a.onreadystatechange=j(this.za,this);try{this.A=!0,this.a.open(e,String(t),!0),this.A=!1}catch(t){return void Vn(this,t)}t=n||"";var i,o=new Qe(this.headers);r&&Ge(r,function(t,e){o.set(e,t)}),r=function(t){t:{for(var e=_n,n=t.length,r="string"==typeof t?t.split(""):t,i=0;i<n;i++)if(i in r&&e.call(void 0,r[i],i,t)){e=i;break t}e=-1}return e<0?null:"string"==typeof t?t.charAt(e):t[e]}(o.L()),n=D.FormData&&t instanceof D.FormData,0<=B(Un,e)&&!r&&!n&&o.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8"),o.forEach(function(t,e){this.a.setRequestHeader(e,t)},this),this.I&&(this.a.responseType=this.I),"withCredentials"in this.a&&this.a.withCredentials!==this.F&&(this.a.withCredentials=this.F);try{xn(this),0<this.o&&((this.D=(i=this.a,ot&&dt(9)&&"number"==typeof i.timeout&&void 0!==i.ontimeout))?(this.a.timeout=this.o,this.a.ontimeout=j(this.xa,this)):this.m=te(this.xa,this.o,this)),this.l=!0,this.a.send(t),this.l=!1}catch(t){Vn(this,t)}},N.xa=function(){void 0!==S&&this.a&&(this.f="Timed out after "+this.o+"ms, aborting",this.h=8,this.dispatchEvent("timeout"),this.abort(8))},N.abort=function(t){this.a&&this.b&&(this.b=!1,this.g=!0,this.a.abort(),this.g=!1,this.h=t||7,this.dispatchEvent("complete"),this.dispatchEvent("abort"),Mn(this))},N.G=function(){this.a&&(this.b&&(this.b=!1,this.g=!0,this.a.abort(),this.g=!1),Mn(this,!0)),On.S.G.call(this)},N.za=function(){this.j||(this.A||this.l||this.g?jn(this):this.Ta())},N.Ta=function(){jn(this)},N.X=function(){try{return 2<qn(this)?this.a.status:-1}catch(t){return-1}},N.$=function(){try{return this.a?this.a.responseText:""}catch(t){return""}},N.Na=function(t){if(this.a){var e=this.a.responseText;return t&&0==e.indexOf(t)&&(e=e.substring(t.length)),Ln(e)}},N.ua=function(){return this.h},N.Qa=function(){return"string"==typeof this.f?this.f:String(this.f)},(N=Gn.prototype).ha=8,N.v=1,N.Ba=function(t){if(this.h)if(this.h=null,1==this.v){if(!t){this.R=Math.floor(1e5*Math.random()),t=this.R++;var e,n=new Oe(this,this.c,t,void 0),r=this.l;if(this.O&&(r?et(r=$(r),this.O):r=this.O),null===this.i&&(n.B=r),this.da)t:{for(var i=e=0;i<this.g.length;i++){var o=this.g[i];if("__data__"in o.a&&"string"==typeof(o=o.a.__data__)?o=o.length:o=void 0,void 0===o)break;if(4096<(e+=o)){e=i;break t}if(4096===e||i===this.g.length-1){e=i+1;break t}}e=1e3}else e=1e3;e=Jn(this,n,e),tn(i=Ye(this.B),"RID",t),tn(i,"CVER",22),this.A&&tn(i,"X-HTTP-Session-Id",this.A),Kn(this,i),this.i&&r&&Fn(i,this.i,r),Tn(this.b,n),this.Ga&&tn(i,"TYPE","init"),this.da?(tn(i,"$req",e),tn(i,"SID","null"),n.V=!0,_e(n,i,null)):_e(n,i,e),this.v=2}}else 3==this.v&&(t?Yn(this,t):0==this.g.length||bn(this.b)||Yn(this))},N.Aa=function(){var t;this.j=null,er(this),this.V&&!(this.F||null==this.a||this.N<=0)&&(t=2*this.N,this.c.info("BP detection timer enabled: "+t),this.s=be(j(this.Sa,this),t))},N.Sa=function(){this.s&&(this.s=null,this.c.info("BP detection timeout reached."),this.c.info("Buffering proxy detected and switch to long-polling!"),this.H=!1,this.F=!0,zn(this),er(this))},N.Ra=function(){null!=this.m&&(this.m=null,zn(this),$n(this),me(19))},N.Xa=function(t){t?(this.c.info("Successfully pinged google.com"),me(2)):(this.c.info("Failed to ping google.com"),me(1))},(N=hr.prototype).ta=function(){},N.sa=function(){},N.ra=function(){},N.qa=function(){},N.Ha=function(){},cr.prototype.a=function(t,e){return new lr(t,e)},q(lr,qt),(N=lr.prototype).addEventListener=function(t,e,n,r){lr.S.addEventListener.call(this,t,e,n,r)},N.removeEventListener=function(t,e,n,r){lr.S.removeEventListener.call(this,t,e,n,r)},N.Oa=function(){this.a.f=this.f,this.h&&(this.a.C=!0);var t=this.a,e=this.l,n=this.b||void 0;me(0),t.fa=e,t.W=n||{},t.H=t.T,t.B=ur(t,null,t.fa),Xn(t)},N.close=function(){Qn(this.a)},N.Pa=function(t){var e;"string"==typeof t?((e={}).__data__=t,Hn(this.a,e)):this.g?((e={}).__data__=Bt(t),Hn(this.a,e)):Hn(this.a,t)},N.G=function(){this.a.f=null,delete this.f,Qn(this.a),delete this.a,lr.S.G.call(this)},q(fr,Se),q(pr,De),q(dr,hr),dr.prototype.ta=function(){this.a.dispatchEvent("a")},dr.prototype.sa=function(t){this.a.dispatchEvent(new fr(t))},dr.prototype.ra=function(t){this.a.dispatchEvent(new pr)},dr.prototype.qa=function(){this.a.dispatchEvent("b")},cr.prototype.createWebChannel=cr.prototype.a,lr.prototype.send=lr.prototype.Pa,lr.prototype.open=lr.prototype.Oa,Ee.NO_ERROR=0,Ee.TIMEOUT=8,Ee.HTTP_ERROR=6,Ie.COMPLETE="complete",(Ne.EventType=R).OPEN="a",R.CLOSE="b",R.ERROR="c",R.MESSAGE="d",qt.prototype.listen=qt.prototype.va,On.prototype.listenOnce=On.prototype.wa,On.prototype.getLastError=On.prototype.Qa,On.prototype.getLastErrorCode=On.prototype.ua,On.prototype.getStatus=On.prototype.X,On.prototype.getResponseJson=On.prototype.Na,On.prototype.getResponseText=On.prototype.$,On.prototype.send=On.prototype.ba;var Ie={createWebChannelTransport:function(){return new cr},ErrorCode:Ee,EventType:Ie,WebChannel:Ne,XhrIo:On},yr=Ie.createWebChannelTransport,vr=Ie.ErrorCode,gr=Ie.EventType,mr=Ie.WebChannel,wr=Ie.XhrIo,br=(Er.prototype.setInstantiationMode=function(t){return this.instantiationMode=t,this},Er.prototype.setMultipleInstances=function(t){return this.multipleInstances=t,this},Er.prototype.setServiceProps=function(t){return this.serviceProps=t,this},Er);function Er(t,e,n){this.name=t,this.instanceFactory=e,this.type=n,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY"}var Ir,Tr={OK:"ok",CANCELLED:"cancelled",UNKNOWN:"unknown",INVALID_ARGUMENT:"invalid-argument",DEADLINE_EXCEEDED:"deadline-exceeded",NOT_FOUND:"not-found",ALREADY_EXISTS:"already-exists",PERMISSION_DENIED:"permission-denied",UNAUTHENTICATED:"unauthenticated",RESOURCE_EXHAUSTED:"resource-exhausted",FAILED_PRECONDITION:"failed-precondition",ABORTED:"aborted",OUT_OF_RANGE:"out-of-range",UNIMPLEMENTED:"unimplemented",INTERNAL:"internal",UNAVAILABLE:"unavailable",DATA_LOSS:"data-loss"},Ar=(n(Rr,Ir=Error),Rr),Nr=new l("@firebase/firestore");function Rr(t,e){var n=this;return(n=Ir.call(this,e)||this).code=t,n.message=e,n.name="FirebaseError",n.toString=function(){return n.name+": [code="+n.code+"]: "+n.message},n}function Sr(){return Nr.logLevel}function Dr(t){for(var e,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];Nr.logLevel<=u.DEBUG&&(e=n.map(Pr),Nr.debug.apply(Nr,i(["Firestore (7.23.0): "+t],e)))}function Lr(t){for(var e,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];Nr.logLevel<=u.ERROR&&(e=n.map(Pr),Nr.error.apply(Nr,i(["Firestore (7.23.0): "+t],e)))}function Or(t){for(var e,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];Nr.logLevel<=u.WARN&&(e=n.map(Pr),Nr.warn.apply(Nr,i(["Firestore (7.23.0): "+t],e)))}function Pr(e){if("string"==typeof e)return e;try{return JSON.stringify(e)}catch(t){return e}}function kr(t){void 0===t&&(t="Unexpected state");t="FIRESTORE (7.23.0) INTERNAL ASSERTION FAILED: "+t;throw Lr(t),new Error(t)}function Ur(t){t||kr()}function _r(t){var e,n=0;for(e in t)Object.prototype.hasOwnProperty.call(t,e)&&n++;return n}function Vr(t,e){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e(n,t[n])}function Cr(t){for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}var jr,Mr,l=(Object.defineProperty(Wr.prototype,"length",{get:function(){return this.t},enumerable:!1,configurable:!0}),Wr.prototype.isEqual=function(t){return 0===Wr.i(this,t)},Wr.prototype.child=function(t){var e=this.segments.slice(this.offset,this.limit());return t instanceof Wr?t.forEach(function(t){e.push(t)}):e.push(t),this.o(e)},Wr.prototype.limit=function(){return this.offset+this.length},Wr.prototype.u=function(t){return t=void 0===t?1:t,this.o(this.segments,this.offset+t,this.length-t)},Wr.prototype.h=function(){return this.o(this.segments,this.offset,this.length-1)},Wr.prototype.l=function(){return this.segments[this.offset]},Wr.prototype._=function(){return this.get(this.length-1)},Wr.prototype.get=function(t){return this.segments[this.offset+t]},Wr.prototype.m=function(){return 0===this.length},Wr.prototype.T=function(t){if(t.length<this.length)return!1;for(var e=0;e<this.length;e++)if(this.get(e)!==t.get(e))return!1;return!0},Wr.prototype.I=function(t){if(this.length+1!==t.length)return!1;for(var e=0;e<this.length;e++)if(this.get(e)!==t.get(e))return!1;return!0},Wr.prototype.forEach=function(t){for(var e=this.offset,n=this.limit();e<n;e++)t(this.segments[e])},Wr.prototype.A=function(){return this.segments.slice(this.offset,this.limit())},Wr.i=function(t,e){for(var n=Math.min(t.length,e.length),r=0;r<n;r++){var i=t.get(r),o=e.get(r);if(i<o)return-1;if(o<i)return 1}return t.length<e.length?-1:t.length>e.length?1:0},Wr),xr=(n(zr,Mr=l),zr.prototype.o=function(t,e,n){return new zr(t,e,n)},zr.prototype.R=function(){return this.A().join("/")},zr.prototype.toString=function(){return this.R()},zr.P=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=[],r=0,i=t;r<i.length;r++){var o=i[r];if(0<=o.indexOf("//"))throw new Ar(Tr.INVALID_ARGUMENT,"Invalid segment ("+o+"). Paths must not contain // in them.");n.push.apply(n,o.split("/").filter(function(t){return 0<t.length}))}return new zr(n)},zr.p=function(){return new zr([])},zr),qr=/^[_a-zA-Z][_a-zA-Z0-9]*$/,Fr=(n(Qr,jr=l),Qr.prototype.o=function(t,e,n){return new Qr(t,e,n)},Qr.g=function(t){return qr.test(t)},Qr.prototype.R=function(){return this.A().map(function(t){return t=t.replace("\\","\\\\").replace("`","\\`"),Qr.g(t)||(t="`"+t+"`"),t}).join(".")},Qr.prototype.toString=function(){return this.R()},Qr.prototype.V=function(){return 1===this.length&&"__name__"===this.get(0)},Qr.v=function(){return new Qr(["__name__"])},Qr.S=function(t){for(var e=[],n="",r=0,i=function(){if(0===n.length)throw new Ar(Tr.INVALID_ARGUMENT,"Invalid field path ("+t+"). Paths must not be empty, begin with '.', end with '.', or contain '..'");e.push(n),n=""},o=!1;r<t.length;){var s=t[r];if