PageSourceSearch

https://plswiderski.github.io/main.8a3434f91ff4dc95.js

js plswiderski.github.io collected 2026-10-03 09:46:24 UTC 565,537 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunktest=self.webpackChunktest||[]).push([[179],{367:(Lo,Fr,St)=>{St.d(Fr,{Z:()=>qt});var Vt,me,qe=St(655),C=St(492),ve=St(461),Ee=St(3),Or=((Vt={})["no-app"]="No Firebase App '{$appName}' has been created - call Firebase App.initializeApp()",Vt["bad-app-name"]="Illegal App name: '{$appName}",Vt["duplicate-app"]="Firebase App named '{$appName}' already exists",Vt["app-deleted"]="Firebase App named '{$appName}' already deleted",Vt["invalid-app-argument"]="firebase.{$appName}() takes either no argument or a Firebase App instance.",Vt["invalid-log-argument"]="First argument to `onLog` must be null or a function.",Vt),rn=new C.LL("app","Firebase",Or),Br="@firebase/app",Bt="[DEFAULT]",Vo=((me={})[Br]="fire-core",me["@firebase/analytics"]="fire-analytics",me["@firebase/app-check"]="fire-app-check",me["@firebase/auth"]="fire-auth",me["@firebase/database"]="fire-rtdb",me["@firebase/functions"]="fire-fn",me["@firebase/installations"]="fire-iid",me["@firebase/messaging"]="fire-fcm",me["@firebase/performance"]="fire-perf",me["@firebase/remote-config"]="fire-rc",me["@firebase/storage"]="fire-gcs",me["@firebase/firestore"]="fire-fst",me["fire-js"]="fire-js",me["firebase-wrapper"]="fire-js-all",me),At=new Ee.Yd("@firebase/app"),jr=function(){function Pe(ge,Ue,Mt){var wn=this;this.firebase_=Mt,this.isDeleted_=!1,this.name_=Ue.name,this.automaticDataCollectionEnabled_=Ue.automaticDataCollectionEnabled||!1,this.options_=(0,C.p$)(ge),this.container=new ve.H0(Ue.name),this._addComponent(new ve.wA("app",function(){return wn},"PUBLIC")),this.firebase_.INTERNAL.components.forEach(function(Zr){return wn._addComponent(Zr)})}return Object.defineProperty(Pe.prototype,"automaticDataCollectionEnabled",{get:function(){return this.checkDestroyed_(),this.automaticDataCollectionEnabled_},set:function(ge){this.checkDestroyed_(),this.automaticDataCollectionEnabled_=ge},enumerable:!1,configurable:!0}),Object.defineProperty(Pe.prototype,"name",{get:function(){return this.checkDestroyed_(),this.name_},enumerable:!1,configurable:!0}),Object.defineProperty(Pe.prototype,"options",{get:function(){return this.checkDestroyed_(),this.options_},enumerable:!1,configurable:!0}),Pe.prototype.delete=function(){var ge=this;return new Promise(function(Ue){ge.checkDestroyed_(),Ue()}).then(function(){return ge.firebase_.INTERNAL.removeApp(ge.name_),Promise.all(ge.container.getProviders().map(function(Ue){return Ue.delete()}))}).then(function(){ge.isDeleted_=!0})},Pe.prototype._getService=function(ge,Ue){var Mt;void 0===Ue&&(Ue=Bt),this.checkDestroyed_();var wn=this.container.getProvider(ge);return!wn.isInitialized()&&"EXPLICIT"===(null===(Mt=wn.getComponent())||void 0===Mt?void 0:Mt.instantiationMode)&&wn.initialize(),wn.getImmediate({identifier:Ue})},Pe.prototype._removeServiceInstance=function(ge,Ue){void 0===Ue&&(Ue=Bt),this.container.getProvider(ge).clearInstance(Ue)},Pe.prototype._addComponent=function(ge){try{this.container.addComponent(ge)}catch(Ue){At.debug("Component "+ge.name+" failed to register with FirebaseApp "+this.name,Ue)}},Pe.prototype._addOrOverwriteComponent=function(ge){this.container.addOrOverwriteComponent(ge)},Pe.prototype.toJSON=function(){return{name:this.name,automaticDataCollectionEnabled:this.automaticDataCollectionEnabled,options:this.options}},Pe.prototype.checkDestroyed_=function(){if(this.isDeleted_)throw rn.create("app-deleted",{appName:this.name_})},Pe}();jr.prototype.name&&jr.prototype.options||jr.prototype.delete||console.log("dc");var X=function Y(){var Pe=function J(Pe){var ge={},Ue=new Map,Mt={__esModule:!0,initializeApp:function $u(ut,Je){void 0===Je&&(Je={}),("object"!=typeof Je||null===Je)&&(Je={name:Je});var Dn=Je;void 0===Dn.name&&(Dn.name=Bt);var $t=Dn.name;if("string"!=typeof $t||!$t)throw rn.create("bad-app-name",{appName:String($t)});if((0,C.r3)(ge,$t))throw rn.create("duplicate-app",{appName:$t});var Xr=new Pe(ut,Dn,Mt);return ge[$t]=Xr,Xr},app:Zr,registerVersion:function Bo(ut,Je,sr){var Dn,$t=null!==(Dn=Vo[ut])&&void 0!==Dn?Dn:ut;sr&&($t+="-"+sr);var Xr=$t.match(/\s|\//),qn=Je.match(/\s|\//);if(Xr||qn){var sn=['Unable to register library "'+$t+'" with version "'+Je+'":'];return Xr&&sn.push('library name "'+$t+'" contains illegal characters (whitespace or "/")'),Xr&&qn&&sn.push("and"),qn&&sn.push('version name "'+Je+'" contains illegal characters (whitespace or "/")'),void At.warn(sn.join(" "))}eo(new ve.wA($t+"-version",function(){return{library:$t,version:Je}},"VERSION"))},setLogLevel:Ee.Ub,onLog:function jo(ut,Je){if(null!==ut&&"function"!=typeof ut)throw rn.create("invalid-log-argument");(0,Ee.Am)(ut,Je)},apps:null,SDK_VERSION:"8.10.0",INTERNAL:{registerComponent:eo,removeApp:function wn(ut){delete ge[ut]},components:Ue,useAsService:function zu(ut,Je){return"serverAuth"===Je?null:Je}}};function Zr(ut){if(!(0,C.r3)(ge,ut=ut||Bt))throw rn.create("no-app",{appName:ut});return ge[ut]}function eo(ut){var Je=ut.name;if(Ue.has(Je))return At.debug("There were multiple attempts to register component "+Je+"."),"PUBLIC"===ut.type?Mt[Je]:null;if(Ue.set(Je,ut),"PUBLIC"===ut.type){var sr=function(qn){if(void 0===qn&&(qn=Zr()),"function"!=typeof qn[Je])throw rn.create("invalid-app-argument",{appName:Je});return qn[Je]()};void 0!==ut.serviceProps&&(0,C.ZB)(sr,ut.serviceProps),Mt[Je]=sr,Pe.prototype[Je]=function(){for(var qn=[],sn=0;sn<arguments.length;sn++)qn[sn]=arguments[sn];return this._getService.bind(this,Je).apply(this,ut.multipleInstances?qn:[])}}for(var Dn=0,$t=Object.keys(ge);Dn<$t.length;Dn++)ge[$t[Dn]]._addComponent(ut);return"PUBLIC"===ut.type?Mt[Je]:null}return Mt.default=Mt,Object.defineProperty(Mt,"apps",{get:function _i(){return Object.keys(ge).map(function(ut){return ge[ut]})}}),Zr.App=Pe,Mt}(jr);return Pe.INTERNAL=(0,qe.pi)((0,qe.pi)({},Pe.INTERNAL),{createFirebaseNamespace:Y,extendNamespace:function ge(Ue){(0,C.ZB)(Pe,Ue)},createSubscribe:C.ne,ErrorFactory:C.LL,deepExtend:C.ZB}),Pe}(),fe=function(){function Pe(ge){this.container=ge}return Pe.prototype.getPlatformInfoString=function(){return this.container.getProviders().map(function(Ue){if(function se(Pe){var ge=Pe.getComponent();return"VERSION"===(null==ge?void 0:ge.type)}(Ue)){var Mt=Ue.getImmediate();return Mt.library+"/"+Mt.version}return null}).filter(function(Ue){return Ue}).join(" ")},Pe}();if((0,C.jU)()&&void 0!==self.firebase){At.warn("\n    Warning: Firebase is already defined in the global scope. Please make sure\n    Firebase library is only loaded once.\n  ");var dt=self.firebase.SDK_VERSION;dt&&dt.indexOf("LITE")>=0&&At.warn("\n    Warning: You are trying to load Firebase while using Firebase Performance standalone script.\n    You should load Firebase Performance with this instance of Firebase to avoid loading duplicate code.\n    ")}var bt=X.initializeApp;X.initializeApp=function(){for(var Pe=[],ge=0;ge<arguments.length;ge++)Pe[ge]=arguments[ge];return(0,C.UG)()&&At.warn('\n      Warning: This is a browser-targeted Firebase bundle but it appears it is being\n      run in a Node environment.  If running in a Node environment, make sure you\n      are using the bundle specified by the "main" field in package.json.\n      \n      If you are using Webpack, you can specify "main" as the first item in\n      "resolve.mainFields":\n      https://webpack.js.org/configuration/resolve/#resolvemainfields\n      \n      If using Rollup, use the @rollup/plugin-node-resolve plugin and specify "main"\n      as the first item in "mainFields", e.g. [\'main\', \'module\'].\n      https://github.com/rollup/@rollup/plugin-node-resolve\n      '),bt.apply(void 0,Pe)};var Le=X;!function we(Pe,ge){Pe.INTERNAL.registerComponent(new ve.wA("platform-logger",function(Ue){return new fe(Ue)},"PRIVATE")),Pe.registerVersion(Br,"0.6.30",ge),Pe.registerVersion("fire-js","")}(Le);const qt=Le},461:(Lo,Fr,St)=>{St.d(Fr,{wA:()=>ve,H0:()=>Br});var qe=St(655),C=St(492),ve=function(){function q(z,Z,ie){this.name=z,this.instanceFactory=Z,this.type=ie,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}return q.prototype.setInstantiationMode=function(z){return this.instantiationMode=z,this},q.prototype.setMultipleInstances=function(z){return this.multipleInstances=z,this},q.prototype.setServiceProps=function(z){return this.serviceProps=z,this},q.prototype.setInstanceCreatedCallback=function(z){return this.onInstanceCreated=z,this},q}(),Ee="[DEFAULT]",Vt=function(){function q(z,Z){this.name=z,this.container=Z,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}return q.prototype.get=function(z){var Z=this.normalizeInstanceIdentifier(z);if(!this.instancesDeferred.has(Z)){var ie=new C.BH;if(this.instancesDeferred.set(Z,ie),this.isInitialized(Z)||this.shouldAutoInitialize())try{var re=this.getOrInitializeService({instanceIdentifier:Z});re&&ie.resolve(re)}catch(le){}}return this.instancesDeferred.get(Z).promise},q.prototype.getImmediate=function(z){var Z,ie=this.normalizeInstanceIdentifier(null==z?void 0:z.identifier),re=null!==(Z=null==z?void 0:z.optional)&&void 0!==Z&&Z;if(!this.isInitialized(ie)&&!this.shouldAutoInitialize()){if(re)return null;throw Error("Service "+this.name+" is not available")}try{return this.getOrInitializeService({instanceIdentifier:ie})}catch(le){if(re)return null;throw le}},q.prototype.getComponent=function(){return this.component},q.prototype.setComponent=function(z){var Z,ie;if(z.name!==this.name)throw Error("Mismatching Component "+z.name+" for Provider "+this.name+".");if(this.component)throw Error("Component for "+this.name+" has already been provided");
1if(this.component=z,this.shouldAutoInitialize()){if(function rn(q){return"EAGER"===q.instantiationMode}(z))try{this.getOrInitializeService({instanceIdentifier:Ee})}catch(gt){}try{for(var re=(0,qe.XA)(this.instancesDeferred.entries()),le=re.next();!le.done;le=re.next()){var Ze=(0,qe.CR)(le.value,2),It=Ze[1],_t=this.normalizeInstanceIdentifier(Ze[0]);try{var on=this.getOrInitializeService({instanceIdentifier:_t});It.resolve(on)}catch(gt){}}}catch(gt){Z={error:gt}}finally{try{le&&!le.done&&(ie=re.return)&&ie.call(re)}finally{if(Z)throw Z.error}}}},q.prototype.clearInstance=function(z){void 0===z&&(z=Ee),this.instancesDeferred.delete(z),this.instancesOptions.delete(z),this.instances.delete(z)},q.prototype.delete=function(){return(0,qe.mG)(this,void 0,void 0,function(){var z;return(0,qe.Jh)(this,function(Z){switch(Z.label){case 0:return z=Array.from(this.instances.values()),[4,Promise.all((0,qe.ev)((0,qe.ev)([],(0,qe.CR)(z.filter(function(ie){return"INTERNAL"in ie}).map(function(ie){return ie.INTERNAL.delete()}))),(0,qe.CR)(z.filter(function(ie){return"_delete"in ie}).map(function(ie){return ie._delete()}))))];case 1:return Z.sent(),[2]}})})},q.prototype.isComponentSet=function(){return null!=this.component},q.prototype.isInitialized=function(z){return void 0===z&&(z=Ee),this.instances.has(z)},q.prototype.getOptions=function(z){return void 0===z&&(z=Ee),this.instancesOptions.get(z)||{}},q.prototype.initialize=function(z){var Z,ie;void 0===z&&(z={});var re=z.options,le=void 0===re?{}:re,Ze=this.normalizeInstanceIdentifier(z.instanceIdentifier);if(this.isInitialized(Ze))throw Error(this.name+"("+Ze+") has already been initialized");if(!this.isComponentSet())throw Error("Component "+this.name+" has not been registered yet");var ft=this.getOrInitializeService({instanceIdentifier:Ze,options:le});try{for(var It=(0,qe.XA)(this.instancesDeferred.entries()),_t=It.next();!_t.done;_t=It.next()){var on=(0,qe.CR)(_t.value,2),Gn=on[1];Ze===this.normalizeInstanceIdentifier(on[0])&&Gn.resolve(ft)}}catch(Bt){Z={error:Bt}}finally{try{_t&&!_t.done&&(ie=It.return)&&ie.call(It)}finally{if(Z)throw Z.error}}return ft},q.prototype.onInit=function(z,Z){var ie,re=this.normalizeInstanceIdentifier(Z),le=null!==(ie=this.onInitCallbacks.get(re))&&void 0!==ie?ie:new Set;le.add(z),this.onInitCallbacks.set(re,le);var Ze=this.instances.get(re);return Ze&&z(Ze,re),function(){le.delete(z)}},q.prototype.invokeOnInitCallbacks=function(z,Z){var ie,re,le=this.onInitCallbacks.get(Z);if(le)try{for(var Ze=(0,qe.XA)(le),ft=Ze.next();!ft.done;ft=Ze.next()){var It=ft.value;try{It(z,Z)}catch(_t){}}}catch(_t){ie={error:_t}}finally{try{ft&&!ft.done&&(re=Ze.return)&&re.call(Ze)}finally{if(ie)throw ie.error}}},q.prototype.getOrInitializeService=function(z){var Z=z.instanceIdentifier,ie=z.options,re=void 0===ie?{}:ie,le=this.instances.get(Z);if(!le&&this.component&&(le=this.component.instanceFactory(this.container,{instanceIdentifier:Or(Z),options:re}),this.instances.set(Z,le),this.instancesOptions.set(Z,re),this.invokeOnInitCallbacks(le,Z),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,Z,le)}catch(Ze){}return le||null},q.prototype.normalizeInstanceIdentifier=function(z){return void 0===z&&(z=Ee),this.component?this.component.multipleInstances?z:Ee:z},q.prototype.shouldAutoInitialize=function(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode},q}();function Or(q){return q===Ee?void 0:q}var Br=function(){function q(z){this.name=z,this.providers=new Map}return q.prototype.addComponent=function(z){var Z=this.getProvider(z.name);if(Z.isComponentSet())throw new Error("Component "+z.name+" has already been registered with "+this.name);Z.setComponent(z)},q.prototype.addOrOverwriteComponent=function(z){this.getProvider(z.name).isComponentSet()&&this.providers.delete(z.name),this.addComponent(z)},q.prototype.getProvider=function(z){if(this.providers.has(z))return this.providers.get(z);var Z=new Vt(z,this);return this.providers.set(z,Z),Z},q.prototype.getProviders=function(){return Array.from(this.providers.values())},q}()},3:(Lo,Fr,St)=>{function qe(){for(var ie=0,re=0,le=arguments.length;re<le;re++)ie+=arguments[re].length;var Ze=Array(ie),ft=0;for(re=0;re<le;re++)for(var It=arguments[re],_t=0,on=It.length;_t<on;_t++,ft++)Ze[ft]=It[_t];return Ze}St.d(Fr,{in:()=>Ee,Yd:()=>q,Ub:()=>z,Am:()=>Z});var C,ve=[],Ee=(()=>{return(ie=Ee||(Ee={}))[ie.DEBUG=0]="DEBUG",ie[ie.VERBOSE=1]="VERBOSE",ie[ie.INFO=2]="INFO",ie[ie.WARN=3]="WARN",ie[ie.ERROR=4]="ERROR",ie[ie.SILENT=5]="SILENT",Ee;var ie})(),Vt={debug:Ee.DEBUG,verbose:Ee.VERBOSE,info:Ee.INFO,warn:Ee.WARN,error:Ee.ERROR,silent:Ee.SILENT},Or=Ee.INFO,rn=((C={})[Ee.DEBUG]="log",C[Ee.VERBOSE]="log",C[Ee.INFO]="info",C[Ee.WARN]="warn",C[Ee.ERROR]="error",C),Br=function(ie,re){for(var le=[],Ze=2;Ze<arguments.length;Ze++)le[Ze-2]=arguments[Ze];if(!(re<ie.logLevel)){var ft=(new Date).toISOString(),It=rn[re];
1if(!It)throw new Error("Attempted to log a message with an invalid logType (value: "+re+")");console[It].apply(console,qe(["["+ft+"]  "+ie.name+":"],le))}},q=function(){function ie(re){this.name=re,this._logLevel=Or,this._logHandler=Br,this._userLogHandler=null,ve.push(this)}return Object.defineProperty(ie.prototype,"logLevel",{get:function(){return this._logLevel},set:function(re){if(!(re in Ee))throw new TypeError('Invalid value "'+re+'" assigned to `logLevel`');this._logLevel=re},enumerable:!1,configurable:!0}),ie.prototype.setLogLevel=function(re){this._logLevel="string"==typeof re?Vt[re]:re},Object.defineProperty(ie.prototype,"logHandler",{get:function(){return this._logHandler},set:function(re){if("function"!=typeof re)throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=re},enumerable:!1,configurable:!0}),Object.defineProperty(ie.prototype,"userLogHandler",{get:function(){return this._userLogHandler},set:function(re){this._userLogHandler=re},enumerable:!1,configurable:!0}),ie.prototype.debug=function(){for(var re=[],le=0;le<arguments.length;le++)re[le]=arguments[le];this._userLogHandler&&this._userLogHandler.apply(this,qe([this,Ee.DEBUG],re)),this._logHandler.apply(this,qe([this,Ee.DEBUG],re))},ie.prototype.log=function(){for(var re=[],le=0;le<arguments.length;le++)re[le]=arguments[le];this._userLogHandler&&this._userLogHandler.apply(this,qe([this,Ee.VERBOSE],re)),this._logHandler.apply(this,qe([this,Ee.VERBOSE],re))},ie.prototype.info=function(){for(var re=[],le=0;le<arguments.length;le++)re[le]=arguments[le];this._userLogHandler&&this._userLogHandler.apply(this,qe([this,Ee.INFO],re)),this._logHandler.apply(this,qe([this,Ee.INFO],re))},ie.prototype.warn=function(){for(var re=[],le=0;le<arguments.length;le++)re[le]=arguments[le];this._userLogHandler&&this._userLogHandler.apply(this,qe([this,Ee.WARN],re)),this._logHandler.apply(this,qe([this,Ee.WARN],re))},ie.prototype.error=function(){for(var re=[],le=0;le<arguments.length;le++)re[le]=arguments[le];this._userLogHandler&&this._userLogHandler.apply(this,qe([this,Ee.ERROR],re)),this._logHandler.apply(this,qe([this,Ee.ERROR],re))},ie}();function z(ie){ve.forEach(function(re){re.setLogLevel(ie)})}function Z(ie,re){for(var le=function(_t){var on=null;re&&re.level&&(on=Vt[re.level]),_t.userLogHandler=null===ie?null:function(gt,Gn){for(var me=[],Bt=2;Bt<arguments.length;Bt++)me[Bt-2]=arguments[Bt];var Vo=me.map(function(At){if(null==At)return null;if("string"==typeof At)return At;if("number"==typeof At||"boolean"==typeof At)return At.toString();if(At instanceof Error)return At.message;try{return JSON.stringify(At)}catch(jr){return null}}).filter(function(At){return At}).join(" ");Gn>=(null!=on?on:gt.logLevel)&&ie({level:Ee[Gn].toLowerCase(),message:Vo,args:me,type:gt.name})}},Ze=0,ft=ve;Ze<ft.length;Ze++)le(ft[Ze])}},492:(Lo,Fr,St)=>{St.d(Fr,{BH:()=>le,LL:()=>we,r3:()=>Zr,Sg:()=>Ze,ne:()=>Dn,p$:()=>Z,ZB:()=>ie,m9:()=>Va,z$:()=>ft,jU:()=>on,ru:()=>gt,d:()=>me,w1:()=>Bt,uI:()=>It,UG:()=>_t,b$:()=>Gn,G6:()=>jr,Mn:()=>Vo});var qe=St(655),Vt=function(x){for(var N=[],R=0,L=0;L<x.length;L++){var O=x.charCodeAt(L);O<128?N[R++]=O:O<2048?(N[R++]=O>>6|192,N[R++]=63&O|128):55296==(64512&O)&&L+1<x.length&&56320==(64512&x.charCodeAt(L+1))?(O=65536+((1023&O)<<10)+(1023&x.charCodeAt(++L)),N[R++]=O>>18|240,N[R++]=O>>12&63|128,N[R++]=O>>6&63|128,N[R++]=63&O|128):(N[R++]=O>>12|224,N[R++]=O>>6&63|128,N[R++]=63&O|128)}return N},rn={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"==typeof atob,encodeByteArray:function(x,N){if(!Array.isArray(x))throw Error("encodeByteArray takes an array as a parameter");this.init_();for(var R=N?this.byteToCharMapWebSafe_:this.byteToCharMap_,L=[],O=0;O<x.length;O+=3){var W=x[O],Me=O+1<x.length,ht=Me?x[O+1]:0,Te=O+2<x.length,he=Te?x[O+2]:0,ye=(15&ht)<<2|he>>6,Ur=63&he;Te||(Ur=64,Me||(ye=64)),L.push(R[W>>2],R[(3&W)<<4|ht>>4],R[ye],R[Ur])}return L.join("")},encodeString:function(x,N){return this.HAS_NATIVE_SUPPORT&&!N?btoa(x):this.encodeByteArray(Vt(x),N)},decodeString:function(x,N){return this.HAS_NATIVE_SUPPORT&&!N?atob(x):function(x){for(var N=[],R=0,L=0;R<x.length;){var O=x[R++];if(O<128)N[L++]=String.fromCharCode(O);else if(O>191&&O<224){var W=x[R++];N[L++]=String.fromCharCode((31&O)<<6|63&W)}else if(O>239&&O<365){var Te=((7&O)<<18|(63&(W=x[R++]))<<12|(63&(Me=x[R++]))<<6|63&x[R++])-65536;N[L++]=String.fromCharCode(55296+(Te>>10)),N[L++]=String.fromCharCode(56320+(1023&Te))}else{W=x[R++];var Me=x[R++];
1N[L++]=String.fromCharCode((15&O)<<12|(63&W)<<6|63&Me)}}return N.join("")}(this.decodeStringToByteArray(x,N))},decodeStringToByteArray:function(x,N){this.init_();for(var R=N?this.charToByteMapWebSafe_:this.charToByteMap_,L=[],O=0;O<x.length;){var W=R[x.charAt(O++)],ht=O<x.length?R[x.charAt(O)]:0,he=++O<x.length?R[x.charAt(O)]:64,wt=++O<x.length?R[x.charAt(O)]:64;if(++O,null==W||null==ht||null==he||null==wt)throw Error();L.push(W<<2|ht>>4),64!==he&&(L.push(ht<<4&240|he>>2),64!==wt&&L.push(he<<6&192|wt))}return L},init_:function(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(var x=0;x<this.ENCODED_VALS.length;x++)this.byteToCharMap_[x]=this.ENCODED_VALS.charAt(x),this.charToByteMap_[this.byteToCharMap_[x]]=x,this.byteToCharMapWebSafe_[x]=this.ENCODED_VALS_WEBSAFE.charAt(x),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[x]]=x,x>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(x)]=x,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(x)]=x)}}},q=function(x){return function(x){var N=Vt(x);return rn.encodeByteArray(N,!0)}(x).replace(/\./g,"")};function Z(x){return ie(void 0,x)}function ie(x,N){if(!(N instanceof Object))return N;switch(N.constructor){case Date:return new Date(N.getTime());case Object:void 0===x&&(x={});break;case Array:x=[];break;default:return N}for(var L in N)!N.hasOwnProperty(L)||!re(L)||(x[L]=ie(x[L],N[L]));return x}function re(x){return"__proto__"!==x}var le=function(){function x(){var N=this;this.reject=function(){},this.resolve=function(){},this.promise=new Promise(function(R,L){N.resolve=R,N.reject=L})}return x.prototype.wrapCallback=function(N){var R=this;return function(L,O){L?R.reject(L):R.resolve(O),"function"==typeof N&&(R.promise.catch(function(){}),1===N.length?N(L):N(L,O))}},x}();function Ze(x,N){if(x.uid)throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');var L=N||"demo-project",O=x.iat||0,W=x.sub||x.user_id;if(!W)throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");var Me=(0,qe.pi)({iss:"https://securetoken.google.com/"+L,aud:L,iat:O,exp:O+3600,auth_time:O,sub:W,user_id:W,firebase:{sign_in_provider:"custom",identities:{}}},x);return[q(JSON.stringify({alg:"none",type:"JWT"})),q(JSON.stringify(Me)),""].join(".")}function ft(){return"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:""}function It(){return"undefined"!=typeof window&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(ft())}function _t(){try{return"[object process]"===Object.prototype.toString.call(global.process)}catch(x){return!1}}function on(){return"object"==typeof self&&self.self===self}function gt(){var x="object"==typeof chrome?chrome.runtime:"object"==typeof browser?browser.runtime:void 0;return"object"==typeof x&&void 0!==x.id}function Gn(){return"object"==typeof navigator&&"ReactNative"===navigator.product}function me(){return ft().indexOf("Electron/")>=0}function Bt(){var x=ft();return x.indexOf("MSIE ")>=0||x.indexOf("Trident/")>=0}function Vo(){return ft().indexOf("MSAppHost/")>=0}function jr(){return!_t()&&navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")}var se=function(x){function N(R,L,O){var W=x.call(this,L)||this;return W.code=R,W.customData=O,W.name="FirebaseError",Object.setPrototypeOf(W,N.prototype),Error.captureStackTrace&&Error.captureStackTrace(W,we.prototype.create),W}return(0,qe.ZT)(N,x),N}(Error),we=function(){function x(N,R,L){this.service=N,this.serviceName=R,this.errors=L}return x.prototype.create=function(N){for(var R=[],L=1;L<arguments.length;L++)R[L-1]=arguments[L];var O=R[0]||{},W=this.service+"/"+N,Me=this.errors[N],ht=Me?dt(Me,O):"Error",Te=this.serviceName+": "+ht+" ("+W+").",he=new se(W,Te,O);return he},x}();function dt(x,N){return x.replace(bt,function(R,L){var O=N[L];return null!=O?String(O):"<"+L+"?>"})}var bt=/\{\$([^}]+)}/g;function Zr(x,N){return Object.prototype.hasOwnProperty.call(x,N)}function Dn(x,N){var R=new $t(x,N);return R.subscribe.bind(R)}!function(){function x(){this.chain_=[],this.buf_=[],this.W_=[],this.pad_=[],this.inbuf_=0,this.total_=0,this.blockSize=64,this.pad_[0]=128;for(var N=1;N<this.blockSize;++N)this.pad_[N]=0;this.reset()}x.prototype.reset=function(){this.chain_[0]=1732584193,this.chain_[1]=4023233417,this.chain_[2]=2562383102,this.chain_[3]=271733878,this.chain_[4]=3285377520,this.inbuf_=0,this.total_=0},x.prototype.compress_=function(N,R){R||(R=0);var L=this.W_;if("string"==typeof N)for(var O=0;O<16;
1O++)L[O]=N.charCodeAt(R)<<24|N.charCodeAt(R+1)<<16|N.charCodeAt(R+2)<<8|N.charCodeAt(R+3),R+=4;else for(O=0;O<16;O++)L[O]=N[R]<<24|N[R+1]<<16|N[R+2]<<8|N[R+3],R+=4;for(O=16;O<80;O++)L[O]=4294967295&((W=L[O-3]^L[O-8]^L[O-14]^L[O-16])<<1|W>>>31);var wt,ye,Me=this.chain_[0],ht=this.chain_[1],Te=this.chain_[2],he=this.chain_[3],Cn=this.chain_[4];for(O=0;O<80;O++){O<40?O<20?(wt=he^ht&(Te^he),ye=1518500249):(wt=ht^Te^he,ye=1859775393):O<60?(wt=ht&Te|he&(ht|Te),ye=2400959708):(wt=ht^Te^he,ye=3395469782);var W=(Me<<5|Me>>>27)+wt+Cn+ye+L[O]&4294967295;Cn=he,he=Te,Te=4294967295&(ht<<30|ht>>>2),ht=Me,Me=W}this.chain_[0]=this.chain_[0]+Me&4294967295,this.chain_[1]=this.chain_[1]+ht&4294967295,this.chain_[2]=this.chain_[2]+Te&4294967295,this.chain_[3]=this.chain_[3]+he&4294967295,this.chain_[4]=this.chain_[4]+Cn&4294967295},x.prototype.update=function(N,R){if(null!=N){void 0===R&&(R=N.length);for(var L=R-this.blockSize,O=0,W=this.buf_,Me=this.inbuf_;O<R;){if(0===Me)for(;O<=L;)this.compress_(N,O),O+=this.blockSize;if("string"==typeof N){for(;O<R;)if(W[Me]=N.charCodeAt(O),++O,++Me===this.blockSize){this.compress_(W),Me=0;break}}else for(;O<R;)if(W[Me]=N[O],++O,++Me===this.blockSize){this.compress_(W),Me=0;break}}this.inbuf_=Me,this.total_+=R}},x.prototype.digest=function(){var N=[],R=8*this.total_;this.update(this.pad_,this.inbuf_<56?56-this.inbuf_:this.blockSize-(this.inbuf_-56));for(var L=this.blockSize-1;L>=56;L--)this.buf_[L]=255&R,R/=256;this.compress_(this.buf_);var O=0;for(L=0;L<5;L++)for(var W=24;W>=0;W-=8)N[O]=this.chain_[L]>>W&255,++O;return N}}();var $t=function(){function x(N,R){var L=this;this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=R,this.task.then(function(){N(L)}).catch(function(O){L.error(O)})}return x.prototype.next=function(N){this.forEachObserver(function(R){R.next(N)})},x.prototype.error=function(N){this.forEachObserver(function(R){R.error(N)}),this.close(N)},x.prototype.complete=function(){this.forEachObserver(function(N){N.complete()}),this.close()},x.prototype.subscribe=function(N,R,L){var W,O=this;if(void 0===N&&void 0===R&&void 0===L)throw new Error("Missing Observer.");W=function qn(x,N){if("object"!=typeof x||null===x)return!1;for(var R=0,L=N;R<L.length;R++){var O=L[R];if(O in x&&"function"==typeof x[O])return!0}return!1}(N,["next","error","complete"])?N:{next:N,error:R,complete:L},void 0===W.next&&(W.next=sn),void 0===W.error&&(W.error=sn),void 0===W.complete&&(W.complete=sn);var Me=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(function(){try{O.finalError?W.error(O.finalError):W.complete()}catch(ht){}}),this.observers.push(W),Me},x.prototype.unsubscribeOne=function(N){void 0===this.observers||void 0===this.observers[N]||(delete this.observers[N],this.observerCount-=1,0===this.observerCount&&void 0!==this.onNoObservers&&this.onNoObservers(this))},x.prototype.forEachObserver=function(N){if(!this.finalized)for(var R=0;R<this.observers.length;R++)this.sendOne(R,N)},x.prototype.sendOne=function(N,R){var L=this;this.task.then(function(){if(void 0!==L.observers&&void 0!==L.observers[N])try{R(L.observers[N])}catch(O){"undefined"!=typeof console&&console.error&&console.error(O)}})},x.prototype.close=function(N){var R=this;this.finalized||(this.finalized=!0,void 0!==N&&(this.finalError=N),this.task.then(function(){R.observers=void 0,R.onNoObservers=void 0}))},x}();function sn(){}function Va(x){return x&&x._delegate?x._delegate:x}},327:(Lo,Fr,St)=>{function qe(t){return"function"==typeof t}let C=!1;const ve={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){if(t){const e=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+e.stack)}else C&&console.log("RxJS: Back to a better error behavior. Thank you. <3");C=t},get useDeprecatedSynchronousErrorHandling(){return C}};function Ee(t){setTimeout(()=>{throw t},0)}const Vt={closed:!0,next(t){},error(t){if(ve.useDeprecatedSynchronousErrorHandling)throw t;Ee(t)},complete(){}},Or=Array.isArray||(t=>t&&"number"==typeof t.length);function rn(t){return null!==t&&"object"==typeof t}const q=(()=>{function t(e){return Error.call(this),this.message=e?`${e.length} errors occurred during unsubscription:\n${e.map((i,u)=>`${u+1}) ${i.toString()}`).join("\n  ")}`:"",this.name="UnsubscriptionError",this.errors=e,this}return t.prototype=Object.create(Error.prototype),t})();class z{constructor(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)}unsubscribe(){let e;if(this.closed)return;let{_parentOrParents:i,_ctorUnsubscribe:u,_unsubscribe:l,_subscriptions:d}=this;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,i instanceof z)i.remove(this);else if(null!==i)for(let p=0;p<i.length;++p)i[p].remove(this);if(qe(l)){u&&(this._unsubscribe=void 0);try{l.call(this)}catch(p){e=p instanceof q?Z(p.errors):[p]}}if(Or(d)){let p=-1,m=d.length;for(;++p<m;){const v=d[p];if(rn(v))try{v.unsubscribe()}catch(b){e=e||[],b instanceof q?e=e.concat(Z(b.errors)):e.push(b)}}}if(e)throw new q(e)}add(e){let i=e;if(!e)return z.EMPTY;switch(typeof e){case"function":i=new z(e);case"object":if(i===this||i.closed||"function"!=typeof i.unsubscribe)return i;if(this.closed)return i.unsubscribe(),i;if(!(i instanceof z)){const d=i;i=new z,i._subscriptions=[d]}break;default:throw new Error("unrecognized teardown "+e+" added to Subscription.")}let{_parentOrParents:u}=i;if(null===u)i._parentOrParents=this;else if(u instanceof z){if(u===this)return i;i._parentOrParents=[u,this]}else{if(-1!==u.indexOf(this))return i;u.push(this)}const l=this._subscriptions;return null===l?this._subscriptions=[i]:l.push(i),i}remove(e){const i=this._subscriptions;if(i){const u=i.indexOf(e);-1!==u&&i.splice(u,1)}}}var t;function Z(t){return t.reduce((e,i)=>e.concat(i instanceof q?i.errors:i),[])}z.EMPTY=((t=new z).closed=!0,t);const ie="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random();class le extends z{constructor(e,i,u){switch(super(),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=Vt;break;case 1:if(!e){this.destination=Vt;break}if("object"==typeof e){e instanceof le?(this.syncErrorThrowable=e.syncErrorThrowable,this.destination=e,e.add(this)):(this.syncErrorThrowable=!0,this.destination=new Ze(this,e));break}default:this.syncErrorThrowable=!0,this.destination=new Ze(this,e,i,u)}}[ie](){return this}static create(e,i,u){const l=new le(e,i,u);return l.syncErrorThrowable=!1,l}next(e){this.isStopped||this._next(e)}error(e){this.isStopped||(this.isStopped=!0,this._error(e))}complete(){this.isStopped||(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe())}_next(e){this.destination.next(e)}_error(e){this.destination.error(e),this.unsubscribe()}_complete(){this.destination.complete(),this.unsubscribe()}_unsubscribeAndRecycle(){const{_parentOrParents:e}=this;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this}}class Ze extends le{constructor(e,i,u,l){super(),this._parentSubscriber=e;let d,p=this;qe(i)?d=i:i&&(d=i.next,u=i.error,l=i.complete,i!==Vt&&(p=Object.create(i),qe(p.unsubscribe)&&this.add(p.unsubscribe.bind(p)),p.unsubscribe=this.unsubscribe.bind(this))),this._context=p,this._next=d,this._error=u,this._complete=l}next(e){if(!this.isStopped&&this._next){const{_parentSubscriber:i}=this;ve.useDeprecatedSynchronousErrorHandling&&i.syncErrorThrowable?this.__tryOrSetError(i,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}}error(e){if(!this.isStopped){const{_parentSubscriber:i}=this,{useDeprecatedSynchronousErrorHandling:u}=ve;if(this._error)u&&i.syncErrorThrowable?(this.__tryOrSetError(i,this._error,e),this.unsubscribe()):(this.__tryOrUnsub(this._error,e),this.unsubscribe());else if(i.syncErrorThrowable)u?(i.syncErrorValue=e,i.syncErrorThrown=!0):Ee(e),this.unsubscribe();else{if(this.unsubscribe(),u)throw e;Ee(e)}}}complete(){if(!this.isStopped){const{_parentSubscriber:e}=this;if(this._complete){const i=()=>this._complete.call(this._context);ve.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?(this.__tryOrSetError(e,i),this.unsubscribe()):(this.__tryOrUnsub(i),this.unsubscribe())}else this.unsubscribe()}}__tryOrUnsub(e,i){try{e.call(this._context,i)}catch(u){if(this.unsubscribe(),ve.useDeprecatedSynchronousErrorHandling)throw u;Ee(u)}}__tryOrSetError(e,i,u){if(!ve.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");
vendor: 5,189 bytes, line 1
1try{i.call(this._context,u)}catch(l){return ve.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=l,e.syncErrorThrown=!0,!0):(Ee(l),!0)}return!1}_unsubscribe(){const{_parentSubscriber:e}=this;this._context=null,this._parentSubscriber=null,e.unsubscribe()}}const _t="function"==typeof Symbol&&Symbol.observable||"@@observable";function on(t){return t}let me=(()=>{class t{constructor(i){this._isScalar=!1,i&&(this._subscribe=i)}lift(i){const u=new t;return u.source=this,u.operator=i,u}subscribe(i,u,l){const{operator:d}=this,p=function It(t,e,i){if(t){if(t instanceof le)return t;if(t[ie])return t[ie]()}return t||e||i?new le(t,e,i):new le(Vt)}(i,u,l);if(p.add(d?d.call(p,this.source):this.source||ve.useDeprecatedSynchronousErrorHandling&&!p.syncErrorThrowable?this._subscribe(p):this._trySubscribe(p)),ve.useDeprecatedSynchronousErrorHandling&&p.syncErrorThrowable&&(p.syncErrorThrowable=!1,p.syncErrorThrown))throw p.syncErrorValue;return p}_trySubscribe(i){try{return this._subscribe(i)}catch(u){ve.useDeprecatedSynchronousErrorHandling&&(i.syncErrorThrown=!0,i.syncErrorValue=u),function ft(t){for(;t;){const{closed:e,destination:i,isStopped:u}=t;if(e||u)return!1;t=i&&i instanceof le?i:null}return!0}(i)?i.error(u):console.warn(u)}}forEach(i,u){return new(u=Bt(u))((l,d)=>{let p;p=this.subscribe(m=>{try{i(m)}catch(v){d(v),p&&p.unsubscribe()}},d,l)})}_subscribe(i){const{source:u}=this;return u&&u.subscribe(i)}[_t](){return this}pipe(...i){return 0===i.length?this:function Gn(t){return 0===t.length?on:1===t.length?t[0]:function(i){return t.reduce((u,l)=>l(u),i)}}(i)(this)}toPromise(i){return new(i=Bt(i))((u,l)=>{let d;this.subscribe(p=>d=p,p=>l(p),()=>u(d))})}}return t.create=e=>new t(e),t})();function Bt(t){if(t||(t=ve.Promise||Promise),!t)throw new Error("no Promise impl found");return t}const At=(()=>{function t(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return t.prototype=Object.create(Error.prototype),t})();class jr extends z{constructor(e,i){super(),this.subject=e,this.subscriber=i,this.closed=!1}unsubscribe(){if(this.closed)return;this.closed=!0;const e=this.subject,i=e.observers;if(this.subject=null,!i||0===i.length||e.isStopped||e.closed)return;const u=i.indexOf(this.subscriber);-1!==u&&i.splice(u,1)}}class $ extends le{constructor(e){super(e),this.destination=e}}let J=(()=>{class t extends me{constructor(){super(),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}[ie](){return new $(this)}lift(i){const u=new Y(this,this);return u.operator=i,u}next(i){if(this.closed)throw new At;if(!this.isStopped){const{observers:u}=this,l=u.length,d=u.slice();for(let p=0;p<l;p++)d[p].next(i)}}error(i){if(this.closed)throw new At;this.hasError=!0,this.thrownError=i,this.isStopped=!0;const{observers:u}=this,l=u.length,d=u.slice();for(let p=0;p<l;p++)d[p].error(i);this.observers.length=0}complete(){if(this.closed)throw new At;this.isStopped=!0;const{observers:i}=this,u=i.length,l=i.slice();for(let d=0;d<u;d++)l[d].complete();this.observers.length=0}unsubscribe(){this.isStopped=!0,this.closed=!0,this.observers=null}_trySubscribe(i){if(this.closed)throw new At;return super._trySubscribe(i)}_subscribe(i){if(this.closed)throw new At;return this.hasError?(i.error(this.thrownError),z.EMPTY):this.isStopped?(i.complete(),z.EMPTY):(this.observers.push(i),new jr(this,i))}asObservable(){const i=new me;return i.source=this,i}}return t.create=(e,i)=>new Y(e,i),t})();class Y extends J{constructor(e,i){super(),this.destination=e,this.source=i}next(e){const{destination:i}=this;i&&i.next&&i.next(e)}error(e){const{destination:i}=this;i&&i.error&&this.destination.error(e)}complete(){const{destination:e}=this;e&&e.complete&&this.destination.complete()}_subscribe(e){const{source:i}=this;return i?this.source.subscribe(e):z.EMPTY}}function X(t){return t&&"function"==typeof t.schedule}function fe(t,e){return function(u){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return u.lift(new se(t,e))}}class se{constructor(e,i){this.project=e,this.thisArg=i}call(e,i){return i.subscribe(new we(e,this.project,this.thisArg))}}class we extends le{constructor(e,i,u){super(e),this.project=i,this.count=0,this.thisArg=u||this}_next(e){let i;try{i=this.project.call(this.thisArg,e,this.count++)}catch(u){return void this.destination.error(u)}this.destination.next(i)}}const dt=t=>e=>{for(let i=0,u=t.length;i<u&&!e.closed;i++)e.next(t[i]);e.complete()},qt=function Le(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}(),Mt=t=>t&&"number"==typeof t.length&&"function"!=typeof t;function wn(t){return!!t&&"function"!=typeof t.subscribe&&"function"==typeof t.then}const Zr=t=>{if(t&&"function"==typeof t[_t])return(t=>e=>{const i=t[_t]();if("function"!=typeof i.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return i.subscribe(e)})(t);if(Mt(t))return dt(t);if(wn(t))return(t=>e=>(t.then(i=>{e.closed||(e.next(i),e.complete())},i=>e.error(i)).then(null,Ee),e))(t);if(t&&"function"==typeof t[qt])return(t=>e=>{const i=t[qt]();for(;;){let u;
1try{u=i.next()}catch(l){return e.error(l),e}if(u.done){e.complete();break}if(e.next(u.value),e.closed)break}return"function"==typeof i.return&&e.add(()=>{i.return&&i.return()}),e})(t);{const i=`You provided ${rn(t)?"an invalid object":`'${t}'`} where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.`;throw new TypeError(i)}};function eo(t,e){return new me(i=>{const u=new z;let l=0;return u.add(e.schedule(function(){l!==t.length?(i.next(t[l++]),i.closed||u.add(this.schedule())):i.complete()})),u})}function Je(t,e){return e?function ut(t,e){if(null!=t){if(function jo(t){return t&&"function"==typeof t[_t]}(t))return function $u(t,e){return new me(i=>{const u=new z;return u.add(e.schedule(()=>{const l=t[_t]();u.add(l.subscribe({next(d){u.add(e.schedule(()=>i.next(d)))},error(d){u.add(e.schedule(()=>i.error(d)))},complete(){u.add(e.schedule(()=>i.complete()))}}))})),u})}(t,e);if(wn(t))return function _i(t,e){return new me(i=>{const u=new z;return u.add(e.schedule(()=>t.then(l=>{u.add(e.schedule(()=>{i.next(l),u.add(e.schedule(()=>i.complete()))}))},l=>{u.add(e.schedule(()=>i.error(l)))}))),u})}(t,e);if(Mt(t))return eo(t,e);if(function zu(t){return t&&"function"==typeof t[qt]}(t)||"string"==typeof t)return function Bo(t,e){if(!t)throw new Error("Iterable cannot be null");return new me(i=>{const u=new z;let l;return u.add(()=>{l&&"function"==typeof l.return&&l.return()}),u.add(e.schedule(()=>{l=t[qt](),u.add(e.schedule(function(){if(i.closed)return;let d,p;try{const m=l.next();d=m.value,p=m.done}catch(m){return void i.error(m)}p?i.complete():(i.next(d),this.schedule())}))})),u})}(t,e)}throw new TypeError((null!==t&&typeof t||t)+" is not observable")}(t,e):t instanceof me?t:new me(Zr(t))}class sr extends le{constructor(e){super(),this.parent=e}_next(e){this.parent.notifyNext(e)}_error(e){this.parent.notifyError(e),this.unsubscribe()}_complete(){this.parent.notifyComplete(),this.unsubscribe()}}class $t extends le{notifyNext(e){this.destination.next(e)}notifyError(e){this.destination.error(e)}notifyComplete(){this.destination.complete()}}function sn(t,e,i=Number.POSITIVE_INFINITY){return"function"==typeof e?u=>u.pipe(sn((l,d)=>Je(t(l,d)).pipe(fe((p,m)=>e(l,p,d,m))),i)):("number"==typeof e&&(i=e),u=>u.lift(new Ra(t,i)))}class Ra{constructor(e,i=Number.POSITIVE_INFINITY){this.project=e,this.concurrent=i}call(e,i){return i.subscribe(new ka(e,this.project,this.concurrent))}}class ka extends $t{constructor(e,i,u=Number.POSITIVE_INFINITY){super(e),this.project=i,this.concurrent=u,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}_next(e){this.active<this.concurrent?this._tryNext(e):this.buffer.push(e)}_tryNext(e){let i;const u=this.index++;try{i=this.project(e,u)}catch(l){return void this.destination.error(l)}this.active++,this._innerSub(i)}_innerSub(e){const i=new sr(this),u=this.destination;u.add(i);const l=function qn(t,e){if(e.closed)return;if(t instanceof me)return t.subscribe(e);let i;try{i=Zr(t)(e)}catch(u){e.error(u)}return i}(e,i);l!==i&&u.add(l)}_complete(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe()}notifyNext(e){this.destination.next(e)}notifyComplete(){const e=this.buffer;this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()}}function Uo(t,e){return e?eo(t,e):new me(dt(t))}function Ho(){return function(e){return e.lift(new Pl(e))}}class Pl{constructor(e){this.connectable=e}call(e,i){const{connectable:u}=this;u._refCount++;const l=new Rl(e,u),d=i.subscribe(l);return l.closed||(l.connection=u.connect()),d}}class Rl extends le{constructor(e,i){super(e),this.connectable=i}_unsubscribe(){const{connectable:e}=this;if(!e)return void(this.connection=null);this.connectable=null;const i=e._refCount;if(i<=0)return void(this.connection=null);if(e._refCount=i-1,i>1)return void(this.connection=null);const{connection:u}=this,l=e._connection;this.connection=null,l&&(!u||l===u)&&l.unsubscribe()}}class Ms extends me{constructor(e,i){super(),this.source=e,this.subjectFactory=i,this._refCount=0,this._isComplete=!1}
1_subscribe(e){return this.getSubject().subscribe(e)}getSubject(){const e=this._subject;return(!e||e.isStopped)&&(this._subject=this.subjectFactory()),this._subject}connect(){let e=this._connection;return e||(this._isComplete=!1,e=this._connection=new z,e.add(this.source.subscribe(new Wu(this.getSubject(),this))),e.closed&&(this._connection=null,e=z.EMPTY)),e}refCount(){return Ho()(this)}}const Ns=(()=>{const t=Ms.prototype;return{operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:t._subscribe},_isComplete:{value:t._isComplete,writable:!0},getSubject:{value:t.getSubject},connect:{value:t.connect},refCount:{value:t.refCount}}})();class Wu extends ${constructor(e,i){super(e),this.connectable=i}_error(e){this._unsubscribe(),super._error(e)}_complete(){this.connectable._isComplete=!0,this._unsubscribe(),super._complete()}_unsubscribe(){const e=this.connectable;if(e){this.connectable=null;const i=e._connection;e._refCount=0,e._subject=null,e._connection=null,i&&i.unsubscribe()}}}class x{constructor(e,i){this.subjectFactory=e,this.selector=i}call(e,i){const{selector:u}=this,l=this.subjectFactory(),d=u(l).subscribe(e);return d.add(i.subscribe(l)),d}}function N(){return new J}function L(t){for(let e in t)if(t[e]===L)return e;throw Error("Could not find renamed property on target object.")}function O(t,e){for(const i in e)e.hasOwnProperty(i)&&!t.hasOwnProperty(i)&&(t[i]=e[i])}function W(t){if("string"==typeof t)return t;if(Array.isArray(t))return"["+t.map(W).join(", ")+"]";if(null==t)return""+t;if(t.overriddenName)return`${t.overriddenName}`;if(t.name)return`${t.name}`;const e=t.toString();if(null==e)return""+e;const i=e.indexOf("\n");return-1===i?e:e.substring(0,i)}function Me(t,e){return null==t||""===t?null===e?"":e:null==e||""===e?t:t+" "+e}const ht=L({__forward_ref__:L});function Te(t){return t.__forward_ref__=Te,t.toString=function(){return W(this())},t}function he(t){return Cn(t)?t():t}function Cn(t){return"function"==typeof t&&t.hasOwnProperty(ht)&&t.__forward_ref__===Te}class ye extends Error{constructor(e,i){super(function Ur(t,e){return`NG0${Math.abs(t)}${e?": "+e:""}`}(e,i)),this.code=e}}function xe(t){return"string"==typeof t?t:null==t?"":String(t)}function $n(t){return"function"==typeof t?t.name||t.toString():"object"==typeof t&&null!=t&&"function"==typeof t.type?t.type.name||t.type.toString():xe(t)}function Ku(t,e){const i=e?` in ${e}`:"";throw new ye(-201,`No provider for ${$n(t)} found${i}`)}function ar(t,e){null==t&&function Nt(t,e,i,u){throw new Error(`ASSERTION ERROR: ${t}`+(null==u?"":` [Expected=> ${i} ${u} ${e} <=Actual]`))}(e,t,null,"!=")}function Xe(t){return{token:t.token,providedIn:t.providedIn||null,factory:t.factory,value:void 0}}function Hr(t){return{providers:t.providers||[],imports:t.imports||[]}}function bi(t){return Bl(t,ja)||Bl(t,jl)}function Bl(t,e){return t.hasOwnProperty(e)?t[e]:null}function xs(t){return t&&(t.hasOwnProperty(In)||t.hasOwnProperty(Ua))?t[In]:null}const ja=L({\u0275prov:L}),In=L({\u0275inj:L}),jl=L({ngInjectableDef:L}),Ua=L({ngInjectorDef:L});var Ve=(()=>((Ve=Ve||{})[Ve.Default=0]="Default",Ve[Ve.Host=1]="Host",Ve[Ve.Self=2]="Self",Ve[Ve.SkipSelf=4]="SkipSelf",Ve[Ve.Optional=8]="Optional",Ve))();let Ju;function wi(t){const e=Ju;return Ju=t,e}function Hl(t,e,i){const u=bi(t);return u&&"root"==u.providedIn?void 0===u.value?u.value=u.factory():u.value:i&Ve.Optional?null:void 0!==e?e:void Ku(W(t),"Injector")}function ti(t){return{toString:t}.toString()}var mr=(()=>((mr=mr||{})[mr.OnPush=0]="OnPush",mr[mr.Default=1]="Default",mr))(),ur=(()=>(function(t){t[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom"}(ur||(ur={})),ur))();const Xd="undefined"!=typeof globalThis&&globalThis,cm="undefined"!=typeof window&&window,ql="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,mt=Xd||"undefined"!=typeof global&&global||cm||ql,Go={},Tt=[],to=L({\u0275cmp:L}),Zu=L({\u0275dir:L}),Fs=L({\u0275pipe:L}),Os=L({\u0275mod:L}),Wn=L({\u0275fac:L}),qo=L({__NG_ELEMENT_ID__:L});let dm=0;function Gr(t){return ti(()=>{const i={},u={type:t.type,providersResolver:null,decls:t.decls,vars:t.vars,factory:null,template:t.template||null,consts:t.consts||null,ngContentSelectors:t.ngContentSelectors,hostBindings:t.hostBindings||null,hostVars:t.hostVars||0,hostAttrs:t.hostAttrs||null,contentQueries:t.contentQueries||null,declaredInputs:i,inputs:null,outputs:null,exportAs:t.exportAs||null,onPush:t.changeDetection===mr.OnPush,directiveDefs:null,pipeDefs:null,
1selectors:t.selectors||Tt,viewQuery:t.viewQuery||null,features:t.features||null,data:t.data||{},encapsulation:t.encapsulation||ur.Emulated,id:"c",styles:t.styles||Tt,_:null,setInput:null,schemas:t.schemas||null,tView:null},l=t.directives,d=t.features,p=t.pipes;return u.id+=dm++,u.inputs=ri(t.inputs,i),u.outputs=ri(t.outputs),d&&d.forEach(m=>m(u)),u.directiveDefs=l?()=>("function"==typeof l?l():l).map(Xu):null,u.pipeDefs=p?()=>("function"==typeof p?p():p).map(no):null,u})}function Xu(t){return an(t)||function Di(t){return t[Zu]||null}(t)}function no(t){return function yt(t){return t[Fs]||null}(t)}const zl={};function ni(t){return ti(()=>{const e={type:t.type,bootstrap:t.bootstrap||Tt,declarations:t.declarations||Tt,imports:t.imports||Tt,exports:t.exports||Tt,transitiveCompileScopes:null,schemas:t.schemas||null,id:t.id||null};return null!=t.id&&(zl[t.id]=t.type),e})}function ri(t,e){if(null==t)return Go;const i={};for(const u in t)if(t.hasOwnProperty(u)){let l=t[u],d=l;Array.isArray(l)&&(d=l[1],l=l[0]),i[l]=u,e&&(e[l]=d)}return i}const Re=Gr;function an(t){return t[to]||null}function Kn(t,e){const i=t[Os]||null;if(!i&&!0===e)throw new Error(`Type ${W(t)} does not have '\u0275mod' property.`);return i}function vr(t){return Array.isArray(t)&&"object"==typeof t[1]}function Qn(t){return Array.isArray(t)&&!0===t[1]}function Ls(t){return 0!=(8&t.flags)}function Vs(t){return 2==(2&t.flags)}function Ga(t){return 1==(1&t.flags)}function Jn(t){return null!==t.template}function qa(t){return 0!=(512&t[2])}function ii(t,e){return t.hasOwnProperty(Wn)?t[Wn]:null}class Dm{constructor(e,i,u){this.previousValue=e,this.currentValue=i,this.firstChange=u}isFirstChange(){return this.firstChange}}function qr(){return Bs}function Bs(t){return t.type.prototype.ngOnChanges&&(t.setInput=ih),rh}function rh(){const t=oc(this),e=null==t?void 0:t.current;if(e){const i=t.previous;if(i===Go)t.previous=e;else for(let u in e)i[u]=e[u];t.current=null,this.ngOnChanges(e)}}function ih(t,e,i,u){const l=oc(t)||function oh(t,e){return t[ic]=e}(t,{previous:Go,current:null}),d=l.current||(l.current={}),p=l.previous,m=this.declaredInputs[i],v=p[m];d[m]=new Dm(v&&v.currentValue,e,p===Go),t[u]=e}qr.ngInherit=!0;const ic="__ngSimpleChanges__";function oc(t){return t[ic]||null}let sc;function ac(){return void 0!==sc?sc:"undefined"!=typeof document?document:void 0}function it(t){return!!t.listen}const Xl={createRenderer:(t,e)=>ac()};function Rt(t){for(;Array.isArray(t);)t=t[0];return t}function Qo(t,e){return Rt(e[t])}function br(t,e){return Rt(e[t.index])}function za(t,e){return t.data[e]}function An(t,e){const i=e[t];return vr(i)?i:i[0]}function fh(t){return 128==(128&t[2])}function Zt(t,e){return null==e?null:t[e]}function U(t){t[18]=0}function K(t,e){t[5]+=e;let i=t,u=t[3];for(;null!==u&&(1===e&&1===i[5]||-1===e&&0===i[5]);)u[5]+=e,i=u,u=u[3]}const Ce={lFrame:$s(null),bindingsEnabled:!0,isInCheckNoChangesMode:!1};function uc(){return Ce.bindingsEnabled}function F(){return Ce.lFrame.lView}function ot(){return Ce.lFrame.tView}function Ci(t){return Ce.lFrame.contextLView=t,t[8]}function Se(){let t=Yo();for(;null!==t&&64===t.type;)t=t.parent;return t}function Yo(){return Ce.lFrame.currentTNode}function Ht(t,e){const i=Ce.lFrame;i.currentTNode=t,i.isParent=e}function He(){return Ce.lFrame.isParent}function Ka(){return Ce.isInCheckNoChangesMode}function tt(t){Ce.isInCheckNoChangesMode=t}function en(){return Ce.lFrame.bindingIndex++}function Ii(t){const e=Ce.lFrame,i=e.bindingIndex;return e.bindingIndex=e.bindingIndex+t,i}function Gs(t,e){const i=Ce.lFrame;i.bindingIndex=i.bindingRootIndex=t,lc(e)}function lc(t){Ce.lFrame.currentDirectiveIndex=t}function qs(t){Ce.lFrame.currentQueryIndex=t}function ph(t){const e=t[1];return 2===e.type?e.declTNode:1===e.type?t[6]:null}function De(t,e,i){if(i&Ve.SkipSelf){let l=e,d=t;for(;!(l=l.parent,null!==l||i&Ve.Host||(l=ph(d),null===l||(d=d[15],10&l.type))););if(null===l)return!1;e=l,t=d}const u=Ce.lFrame=$r();return u.currentTNode=e,u.lView=t,!0}function oi(t){const e=$r(),i=t[1];Ce.lFrame=e,e.currentTNode=i.firstChild,e.lView=t,e.tView=i,e.contextLView=t,e.bindingIndex=i.bindingStartIndex,e.inI18n=!1}function $r(){const t=Ce.lFrame,e=null===t?null:t.child;return null===e?$s(t):e}function $s(t){const e={currentTNode:null,isParent:!0,lView:null,tView:null,
vendor: 6,056 bytes, line 1
1selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:t,child:null,inI18n:!1};return null!==t&&(t.child=e),e}function es(){const t=Ce.lFrame;return Ce.lFrame=t.parent,t.currentTNode=null,t.lView=null,t}const nf=es;function zs(){const t=es();t.isParent=!0,t.tView=null,t.selectedIndex=-1,t.contextLView=null,t.elementDepthCount=0,t.currentDirectiveIndex=-1,t.currentNamespace=null,t.bindingRootIndex=-1,t.bindingIndex=-1,t.currentQueryIndex=0}function Mn(){return Ce.lFrame.selectedIndex}function si(t){Ce.lFrame.selectedIndex=t}function Gt(){const t=Ce.lFrame;return za(t.tView,t.selectedIndex)}function hc(t,e){for(let i=e.directiveStart,u=e.directiveEnd;i<u;i++){const d=t.data[i].type.prototype,{ngAfterContentInit:p,ngAfterContentChecked:m,ngAfterViewInit:v,ngAfterViewChecked:b,ngOnDestroy:w}=d;p&&(t.contentHooks||(t.contentHooks=[])).push(-i,p),m&&((t.contentHooks||(t.contentHooks=[])).push(i,m),(t.contentCheckHooks||(t.contentCheckHooks=[])).push(i,m)),v&&(t.viewHooks||(t.viewHooks=[])).push(-i,v),b&&((t.viewHooks||(t.viewHooks=[])).push(i,b),(t.viewCheckHooks||(t.viewCheckHooks=[])).push(i,b)),null!=w&&(t.destroyHooks||(t.destroyHooks=[])).push(i,w)}}function Ja(t,e,i){Ya(t,e,3,i)}function fo(t,e,i,u){(3&t[2])===i&&Ya(t,e,i,u)}function Ws(t,e){let i=t[2];(3&i)===e&&(i&=2047,i+=1,t[2]=i)}function Ya(t,e,i,u){const d=null!=u?u:-1,p=e.length-1;let m=0;for(let v=void 0!==u?65535&t[18]:0;v<p;v++)if("number"==typeof e[v+1]){if(m=e[v],null!=u&&m>=u)break}else e[v]<0&&(t[18]+=65536),(m<d||-1==d)&&(Dr(t,i,e,v),t[18]=(4294901760&t[18])+v+2),v++}function Dr(t,e,i,u){const l=i[u]<0,d=i[u+1],m=t[l?-i[u]:i[u]];if(l){if(t[2]>>11<t[18]>>16&&(3&t[2])===e){t[2]+=2048;try{d.call(m)}finally{}}}else try{d.call(m)}finally{}}class Za{constructor(e,i,u){this.factory=e,this.resolving=!1,this.canSeeViewProviders=i,this.injectImpl=u}}function Ti(t,e,i){const u=it(t);let l=0;for(;l<i.length;){const d=i[l];if("number"==typeof d){if(0!==d)break;l++;const p=i[l++],m=i[l++],v=i[l++];u?t.setAttribute(e,m,v,p):e.setAttributeNS(p,m,v)}else{const p=d,m=i[++l];gc(p)?u&&t.setProperty(e,p,m):u?t.setAttribute(e,p,m):e.setAttribute(p,m),l++}}return l}function vh(t){return 3===t||4===t||6===t}function gc(t){return 64===t.charCodeAt(0)}function eu(t,e){if(null!==e&&0!==e.length)if(null===t||0===t.length)t=e.slice();else{let i=-1;for(let u=0;u<e.length;u++){const l=e[u];"number"==typeof l?i=l:0===i||ai(t,i,l,null,-1===i||2===i?e[++u]:null)}}return t}function ai(t,e,i,u,l){let d=0,p=t.length;if(-1===e)p=-1;else for(;d<t.length;){const m=t[d++];if("number"==typeof m){if(m===e){p=-1;break}if(m>e){p=d-1;break}}}for(;d<t.length;){const m=t[d];if("number"==typeof m)break;if(m===i){if(null===u)return void(null!==l&&(t[d+1]=l));if(u===t[d+1])return void(t[d+2]=l)}d++,null!==u&&d++,null!==l&&d++}-1!==p&&(t.splice(p,0,e),d=p+1),t.splice(d++,0,i),null!==u&&t.splice(d++,0,u),null!==l&&t.splice(d++,0,l)}function af(t){return-1!==t}function zr(t){return 32767&t}function Si(t,e){let i=function mc(t){return t>>16}(t),u=e;for(;i>0;)u=u[15],i--;return u}let tu=!0;function Ks(t){const e=tu;return tu=t,e}let bh=0;function Qs(t,e){const i=ns(t,e);if(-1!==i)return i;const u=e[1];u.firstCreatePass&&(t.injectorIndex=e.length,ru(u.data,t),ru(e,null),ru(u.blueprint,null));const l=iu(t,e),d=t.injectorIndex;if(af(l)){const p=zr(l),m=Si(l,e),v=m[1].data;for(let b=0;b<8;b++)e[d+b]=m[p+b]|v[p+b]}return e[d+8]=l,d}function ru(t,e){t.push(0,0,0,0,0,0,0,0,e)}function ns(t,e){return-1===t.injectorIndex||t.parent&&t.parent.injectorIndex===t.injectorIndex||null===e[t.injectorIndex+8]?-1:t.injectorIndex}function iu(t,e){if(t.parent&&-1!==t.parent.injectorIndex)return t.parent.injectorIndex;let i=0,u=null,l=e;for(;null!==l;){const d=l[1],p=d.type;if(u=2===p?d.declTNode:1===p?l[6]:null,null===u)return-1;if(i++,l=l[15],-1!==u.injectorIndex)return u.injectorIndex|i<<16}return-1}function yc(t,e,i){!function nu(t,e,i){let u;"string"==typeof i?u=i.charCodeAt(0)||0:i.hasOwnProperty(qo)&&(u=i[qo]),null==u&&(u=i[qo]=bh++);const l=255&u;e.data[t+(l>>5)]|=1<<l}(t,e,i)}function uf(t,e,i){if(i&Ve.Optional)return t;Ku(e,"NodeInjector")}function cf(t,e,i,u){if(i&Ve.Optional&&void 0===u&&(u=null),0==(i&(Ve.Self|Ve.Host))){const l=t[9],d=wi(void 0);try{return l?l.get(e,u,i&Ve.Optional):Hl(e,u,i&Ve.Optional)}finally{wi(d)}}return uf(u,e,i)}function ou(t,e,i,u=Ve.Default,l){if(null!==t){const d=function Ch(t){if("string"==typeof t)return t.charCodeAt(0)||0;const e=t.hasOwnProperty(qo)?t[qo]:void 0;return"number"==typeof e?e>=0?255&e:Sm:e}(i);if("function"==typeof d){if(!De(e,t,u))return u&Ve.Host?uf(l,i,u):cf(e,i,u,l);try{const p=d(u);if(null!=p||u&Ve.Optional)return p;Ku(i)}finally{nf()}}else if("number"==typeof d){let p=null,m=ns(t,e),v=-1,b=u&Ve.Host?e[16][6]:null;for((-1===m||u&Ve.SkipSelf)&&(v=-1===m?iu(t,e):e[m+8],-1!==v&&lf(u,!1)?(p=e[1],m=zr(v),e=Si(v,e)):m=-1);-1!==m;){const w=e[1];if(po(d,m,w.data)){const I=Eh(m,e,i,p,u,b);if(I!==Dh)return I}v=e[m+8],-1!==v&&lf(u,e[1].data[m+8]===b)&&po(d,m,e)?(p=w,m=zr(v),e=Si(v,e)):m=-1}}}return cf(e,i,u,l)}const Dh={};function Sm(){return new Kr(Se(),F())}function Eh(t,e,i,u,l,d){const p=e[1],m=p.data[t+8],w=function Ai(t,e,i,u,l){const d=t.providerIndexes,p=e.data,m=1048575&d,v=t.directiveStart,w=d>>20,A=l?m+w:t.directiveEnd;for(let M=u?m:m+w;M<A;M++){const V=p[M];if(M<v&&i===V||M>=v&&V.type===i)return M}if(l){const M=p[v];if(M&&Jn(M)&&M.type===i)return v}return null}(m,p,i,null==u?Vs(m)&&tu:u!=p&&0!=(3&m.type),l&Ve.Host&&d===m);return null!==w?Wr(e,p,w,m):Dh}function Wr(t,e,i,u){let l=t[i];const d=e.data;if(function Cm(t){return t instanceof Za}(l)){const p=l;p.resolving&&function om(t,e){const i=e?`. Dependency path: ${e.join(" > ")} > ${t}`:"";throw new ye(-200,`Circular dependency in DI detected for ${t}${i}`)}($n(d[i]));const m=Ks(p.canSeeViewProviders);p.resolving=!0;const v=p.injectImpl?wi(p.injectImpl):null;De(t,u,Ve.Default);try{l=t[i]=p.factory(void 0,d,t,u),e.firstCreatePass&&i>
1=u.directiveStart&&function Nn(t,e,i){const{ngOnChanges:u,ngOnInit:l,ngDoCheck:d}=e.type.prototype;if(u){const p=Bs(e);(i.preOrderHooks||(i.preOrderHooks=[])).push(t,p),(i.preOrderCheckHooks||(i.preOrderCheckHooks=[])).push(t,p)}l&&(i.preOrderHooks||(i.preOrderHooks=[])).push(0-t,l),d&&((i.preOrderHooks||(i.preOrderHooks=[])).push(t,d),(i.preOrderCheckHooks||(i.preOrderCheckHooks=[])).push(t,d))}(i,d[i],e)}finally{null!==v&&wi(v),Ks(m),p.resolving=!1,nf()}}return l}function po(t,e,i){return!!(i[e+(t>>5)]&1<<t)}function lf(t,e){return!(t&Ve.Self||t&Ve.Host&&e)}class Kr{constructor(e,i){this._tNode=e,this._lView=i}get(e,i,u){return ou(this._tNode,this._lView,e,u,i)}}function vc(t){return Cn(t)?()=>{const e=vc(he(t));return e&&e()}:ii(t)}const Wt="__parameters__";function go(t,e,i){return ti(()=>{const u=function ff(t){return function(...i){if(t){const u=t(...i);for(const l in u)this[l]=u[l]}}}(e);function l(...d){if(this instanceof l)return u.apply(this,d),this;const p=new l(...d);return m.annotation=p,m;function m(v,b,w){const I=v.hasOwnProperty(Wt)?v[Wt]:Object.defineProperty(v,Wt,{value:[]})[Wt];for(;I.length<=w;)I.push(null);return(I[w]=I[w]||[]).push(p),v}}return i&&(l.prototype=Object.create(i.prototype)),l.prototype.ngMetadataName=t,l.annotationCls=l,l})}class We{constructor(e,i){this._desc=e,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof i?this.__NG_ELEMENT_ID__=i:void 0!==i&&(this.\u0275prov=Xe({token:this,providedIn:i.providedIn||"root",factory:i.factory}))}toString(){return`InjectionToken ${this._desc}`}}function Et(t,e){t.forEach(i=>Array.isArray(i)?Et(i,e):e(i))}function df(t,e,i){e>=t.length?t.push(i):t.splice(e,0,i)}function Dc(t,e){return e>=t.length-1?t.pop():t.splice(e,1)[0]}function Cr(t,e,i){let u=mo(t,e);return u>=0?t[1|u]=i:(u=~u,function xm(t,e,i,u){let l=t.length;if(l==e)t.push(i,u);else if(1===l)t.push(u,t[0]),t[0]=i;else{for(l--,t.push(t[l-1],t[l]);l>e;)t[l]=t[l-2],l--;t[e]=i,t[e+1]=u}}(t,u,e,i)),u}function Zs(t,e){const i=mo(t,e);if(i>=0)return t[1|i]}function mo(t,e){return function au(t,e,i){let u=0,l=t.length>>i;for(;l!==u;){const d=u+(l-u>>1),p=t[d<<i];if(e===p)return d<<i;p>e?l=d:u=d+1}return~(l<<i)}(t,e,1)}const xi={},Cc="__NG_DI_FLAG__",Ic="ngTempTokenPath",mf=/\n/gm,Xs="__source",ui=L({provide:String,useValue:L});let os;function yf(t){const e=os;return os=t,e}function uu(t,e=Ve.Default){if(void 0===os)throw new ye(203,"");return null===os?Hl(t,void 0,e):os.get(t,e&Ve.Optional?null:void 0,e)}function Ke(t,e=Ve.Default){return(function Ul(){return Ju}()||uu)(he(t),e)}function ea(t){const e=[];for(let i=0;i<t.length;i++){const u=he(t[i]);if(Array.isArray(u)){if(0===u.length)throw new ye(900,"");let l,d=Ve.Default;for(let p=0;p<u.length;p++){const m=u[p],v=Ph(m);"number"==typeof v?-1===v?l=m.token:d|=v:l=m}e.push(Ke(l,d))}else e.push(Ke(u))}return e}function ta(t,e){return t[Cc]=e,t.prototype[Cc]=e,t}function Ph(t){return t[Cc]}const cu=ta(go("Inject",t=>({token:t})),-1),ss=ta(go("Optional"),8),lu=ta(go("SkipSelf"),4);let Sc,ci;function er(t){var e;return(null===(e=function jt(){if(void 0===Sc&&(Sc=null,mt.trustedTypes))try{Sc=mt.trustedTypes.createPolicy("angular",{createHTML:t=>t,createScript:t=>t,createScriptURL:t=>t})}catch(t){}return Sc}())||void 0===e?void 0:e.createHTML(t))||t}function cs(t){var e;return(null===(e=function Qr(){if(void 0===ci&&(ci=null,mt.trustedTypes))try{ci=mt.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:t=>t,createScript:t=>t,createScriptURL:t=>t})}catch(t){}return ci}())||void 0===e?void 0:e.createHTML(t))||t}class bf{constructor(e){this.changingThisBreaksApplicationSecurity=e}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see https://g.co/ng/security#xss)`}}function _o(t){return t instanceof bf?t.changingThisBreaksApplicationSecurity:t}function Fi(t,e){const i=function fs(t){return t instanceof bf&&t.getTypeName()||null}(t);if(null!=i&&i!==e){if("ResourceURL"===i&&"URL"===e)return!0;throw new Error(`Required a safe ${e}, got a ${i} (see https://g.co/ng/security#xss)`)}return i===e}class wf{constructor(e){this.inertDocumentHelper=e}
vendor: 4,597 bytes, line 1
1getInertBodyElement(e){e="<body><remove></remove>"+e;try{const i=(new window.DOMParser).parseFromString(er(e),"text/html").body;return null===i?this.inertDocumentHelper.getInertBodyElement(e):(i.removeChild(i.firstChild),i)}catch(i){return null}}}class jm{constructor(e){if(this.defaultDoc=e,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert"),null==this.inertDocument.body){const i=this.inertDocument.createElement("html");this.inertDocument.appendChild(i);const u=this.inertDocument.createElement("body");i.appendChild(u)}}getInertBodyElement(e){const i=this.inertDocument.createElement("template");if("content"in i)return i.innerHTML=er(e),i;const u=this.inertDocument.createElement("body");return u.innerHTML=er(e),this.defaultDoc.documentMode&&this.stripCustomNsAttrs(u),u}stripCustomNsAttrs(e){const i=e.attributes;for(let l=i.length-1;0<l;l--){const p=i.item(l).name;("xmlns:ns1"===p||0===p.indexOf("ns1:"))&&e.removeAttribute(p)}let u=e.firstChild;for(;u;)u.nodeType===Node.ELEMENT_NODE&&this.stripCustomNsAttrs(u),u=u.nextSibling}}const $h=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^&:/?#]*(?:[/?#]|$))/gi,Wh=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+\/]+=*$/i;function ia(t){return(t=String(t)).match($h)||t.match(Wh)?t:"unsafe:"+t}function Df(t){return(t=String(t)).split(",").map(e=>ia(e.trim())).join(", ")}function nr(t){const e={};for(const i of t.split(","))e[i]=!0;return e}function li(...t){const e={};for(const i of t)for(const u in i)i.hasOwnProperty(u)&&(e[u]=!0);return e}const ds=nr("area,br,col,hr,img,wbr"),oa=nr("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),Ef=nr("rp,rt"),Mc=li(ds,li(oa,nr("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),li(Ef,nr("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),li(Ef,oa)),Cf=nr("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),du=nr("srcset"),If=li(Cf,du,nr("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),nr("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext")),fi=nr("script,style,template");class Qh{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(e){let i=e.firstChild,u=!0;for(;i;)if(i.nodeType===Node.ELEMENT_NODE?u=this.startElement(i):i.nodeType===Node.TEXT_NODE?this.chars(i.nodeValue):this.sanitizedSomething=!0,u&&i.firstChild)i=i.firstChild;else for(;i;){i.nodeType===Node.ELEMENT_NODE&&this.endElement(i);let l=this.checkClobberedElement(i,i.nextSibling);if(l){i=l;break}i=this.checkClobberedElement(i,i.parentNode)}return this.buf.join("")}startElement(e){const i=e.nodeName.toLowerCase();if(!Mc.hasOwnProperty(i))return this.sanitizedSomething=!0,!fi.hasOwnProperty(i);this.buf.push("<"),this.buf.push(i);const u=e.attributes;for(let l=0;l<u.length;l++){const d=u.item(l),p=d.name,m=p.toLowerCase();if(!If.hasOwnProperty(m)){this.sanitizedSomething=!0;continue}let v=d.value;Cf[m]&&(v=ia(v)),du[m]&&(v=Df(v)),this.buf.push(" ",p,'="',Tf(v),'"')}return this.buf.push(">"),!0}endElement(e){const i=e.nodeName.toLowerCase();Mc.hasOwnProperty(i)&&!ds.hasOwnProperty(i)&&(this.buf.push("</"),this.buf.push(i),this.buf.push(">"))}chars(e){this.buf.push(Tf(e))}checkClobberedElement(e,i){if(i&&(e.compareDocumentPosition(i)&No
1de.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error(`Failed to sanitize html because the element is clobbered: ${e.outerHTML}`);return i}}const Nc=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Gm=/([^\#-~ |!])/g;function Tf(t){return t.replace(/&/g,"&amp;").replace(Nc,function(e){return"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";"}).replace(Gm,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}let Jr;function xc(t){return"content"in t&&function Fc(t){return t.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===t.nodeName}(t)?t.content:null}var tn=(()=>((tn=tn||{})[tn.NONE=0]="NONE",tn[tn.HTML=1]="HTML",tn[tn.STYLE=2]="STYLE",tn[tn.SCRIPT=3]="SCRIPT",tn[tn.URL=4]="URL",tn[tn.RESOURCE_URL=5]="RESOURCE_URL",tn))();function Oi(t){const e=aa();return e?cs(e.sanitize(tn.HTML,t)||""):Fi(t,"HTML")?cs(_o(t)):function sa(t,e){let i=null;try{Jr=Jr||function tr(t){const e=new jm(t);return function Ac(){try{return!!(new window.DOMParser).parseFromString(er(""),"text/html")}catch(t){return!1}}()?new wf(e):e}(t);let u=e?String(e):"";i=Jr.getInertBodyElement(u);let l=5,d=u;do{if(0===l)throw new Error("Failed to sanitize html because the input is unstable");l--,u=d,d=i.innerHTML,i=Jr.getInertBodyElement(u)}while(u!==d);return er((new Qh).sanitizeChildren(xc(i)||i))}finally{if(i){const u=xc(i)||i;for(;u.firstChild;)u.removeChild(u.firstChild)}}}(ac(),xe(t))}function rr(t){const e=aa();return e?e.sanitize(tn.URL,t)||"":Fi(t,"URL")?_o(t):ia(xe(t))}function aa(){const t=F();return t&&t[12]}const Pi="__ngContext__";function hn(t,e){t[Pi]=e}function Oc(t){const e=function pu(t){return t[Pi]||null}(t);return e?Array.isArray(e)?e:e.lView:null}function Of(t){return t.ngOriginalError}function Ym(t,...e){t.error(...e)}class hs{constructor(){this._console=console}handleError(e){const i=this._findOriginalError(e),u=function tp(t){return t&&t.ngErrorLogger||Ym}(e);u(this._console,"ERROR",e),i&&u(this._console,"ORIGINAL ERROR",i)}_findOriginalError(e){let i=e&&Of(e);for(;i&&Of(i);)i=Of(i);return i||null}}const Lc=(()=>("undefined"!=typeof requestAnimationFrame&&requestAnimationFrame||setTimeout).bind(mt))();function di(t){return t instanceof Function?t():t}var lr=(()=>((lr=lr||{})[lr.Important=1]="Important",lr[lr.DashCase=2]="DashCase",lr))();function gu(t,e){return undefined(t,e)}function da(t){const e=t[3];return Qn(e)?e[3]:e}function mu(t){return sp(t[13])}function Uc(t){return sp(t[4])}function sp(t){for(;null!==t&&!Qn(t);)t=t[4];return t}function ha(t,e,i,u,l){if(null!=u){let d,p=!1;Qn(u)?d=u:vr(u)&&(p=!0,u=u[0]);const m=Rt(u);0===t&&null!==i?null==l?qc(e,i,m):Ri(e,i,m,l||null,!0):1===t&&null!==i?Ri(e,i,m,l||null,!0):2===t?function pp(t,e,i){const u=$c(t,e);u&&function fp(t,e,i,u){it(t)?t.removeChild(e,i,u):e.removeChild(i)}(t,u,e,i)}(e,m,p):3===t&&e.destroyNode(m),null!=d&&function ma(t,e,i,u,l){const d=i[7];d!==Rt(i)&&ha(e,t,u,d,l);for(let m=10;m<i.length;m++){const v=i[m];hi(v[1],v,t,e,u,d)}}(e,t,d,i,l)}}function pa(t,e,i){return it(t)?t.createElement(e,i):null===i?t.createElement(e):t.createElementNS(i,e)}function lp(t,e){const i=t[9],u=i.indexOf(e),l=e[3];1024&e[2]&&(e[2]&=-1025,K(l,-1)),i.splice(u,1)}function Lf(t,e){if(t.length<=10)return;const i=10+e,u=t[i];if(u){const l=u[17];null!==l&&l!==t&&lp(l,u),e>0&&(t[i-1][4]=u[4]);const d=Dc(t,10+e);!function yu(t,e){hi(t,e,e[11],2,null,null),e[0]=null,e[6]=null}(u[1],u);const p=d[19];null!==p&&p.detachView(d[1]),u[3]=null,u[4]=null,u[2]&=-129}return u}function ga(t,e){if(!(256&e[2])){const i=e[11];it(i)&&i.destroyNode&&hi(t,e,i,3,null,null),function sy(t){let e=t[13];if(!e)return wo(t[1],t);for(;e;){let i=null;if(vr(e))i=e[13];else{const u=e[10];u&&(i=u)}if(!i){for(;e&&!e[4]&&e!==t;)vr(e)&&wo(e[1],e),e=e[3];null===e&&(e=t),vr(e)&&wo(e[1],e),i=e&&e[4]}e=i}}(e)}}function wo(t,e){if(!(256&e[2])){e[2]&=-129,e[2]|=256,function vu(t,e){let i;if(null!=t&&null!=(i=t.destroyHooks))for(let u=0;u<i.length;u+=2){const l=e[i[u]];if(!(l instanceof Za)){const d=i[u+1];if(Array.isArray(d))for(let p=0;p<d.length;p+=2){const m=l[d[p]],v=d[p+1];try{v.call(m)}finally{}}else try{d.call(l)}finally{}}}}(t,e),function Hc(t,e){const i=t.cleanup,u=e[7];let l=-1;if(null!==i)for(let d=0;d<i.length-1;d+=2)if("string"==typeof i[d]){const p=i[d+1],m="function"==typeof p?p(e):Rt(e[p]),v=u[l=i[d+2]],b=i[d+3];"boolean"==typeof b?m.removeEventListener(i[d],v,b):b>=0?u[l=b]():u[l=-b].unsubscribe(),d+=2}else{const p=u[l=i[d+1]];i[d].call(p)}if(null!==u){for(let d=l+1;d<u.length;d++)u[d]();e[7]=null}}(t,e),1===e[1].type&&it(e[11])&&e[11].destroy();const i=e[17];if(null!==i&&Qn(e[3])){i!==e[3]&&lp(i,e);const u=e[19];null!==u&&u.detachView(t)}}}function Gc(t,e,i){return function Vf(t,e,i){let u=e;for(;null!==u&&40&u.type;)u=(e=u).parent;if(null===u)return i[0];if(2&u.flags){const l=t.data[u.directiveStart].encapsulation;if(l===ur.None||l===ur.Emulated)return null}return br(u,i)}(t,e.parent,i)}function Ri(t,e,i,u,l){it(t)?t.insertBefore(e,i,u,l):e.insertBefore(i,u,l)}function qc(t,e,i){it(t)?t.appendChild(e,i):e.appendChild(i)}function ki(t,e,i,u,l){null!==u?Ri(t,e,i,u,l):qc(t,e,i)}function $c(t,e){return it(t)?t.parentNode(e):e.parentNode}let Bf=function _u(t,e,i){return 40&t.type?br(t,i):null};function bu(t,e,i,u){const l=Gc(t,u,e),d=e[11],m=function dp(t,e,i){return Bf(t,e,i)}(u.parent||e[6],u,e);if(null!=l)if(Array.isArray(i))for(let v=0;v<i.length;v++)ki(d,l,i[v],m,!1);else ki(d,l,i,m,!1)}function zc(t,e){if(null!==e){const i=e.type;if(3&i)return br(e,t);if(4&i)return Uf(-1,t[e.index]);if(8&i){const u=e.child;if(null!==u)return zc(t,u);{const l=t[e.index];return Qn(l)?Uf(-1,l):Rt(l)}}if(32&i)return gu(e,t)()||Rt(t[e.index]);{const u=hp(t,e);return null!==u?Array.isArray(u)?u[0]:zc(da(t[16]),u):zc(t,e.next)}}return null}function hp(t,e){return null!==e?t[16][6].projection[e.projection]:null}function Uf(t,e){const i=10+t+1;if(i<e.length){const u=e[i],l=u[1].firstChild;if(null!==l)return zc(u,l)}return e[7]}function wu(t,e,i,u,l,d,p){for(;null!=i;){const m=u[i.index],v=i.type;if(p&&0===e&&(m&&hn(Rt(m),u),i.flags|=4),64!=(64&i.flags))if(8&v)wu(t,e,i.child,u,l,d,!1),ha(e,t,l,m,d);else if(32&v){const b=gu(i,u);let w;for(;w=b();)ha(e,t,l,w,d);ha(e,t,l,m,d)}else 16&v?gp(t,e,u,i,l,d):ha(e,t,l,m,d);i=p?i.projectionNext:i.next}}function hi(t,e,i,u,l,d){wu(i,u,t.firstChild,e,l,d,!1)}
vendor: 4,302 bytes, line 1
1function gp(t,e,i,u,l,d){const p=i[16],v=p[6].projection[u.projection];if(Array.isArray(v))for(let b=0;b<v.length;b++)ha(e,t,l,v[b],d);else wu(t,e,v,p[3],l,d,!0)}function Hf(t,e,i){it(t)?t.setAttribute(e,"style",i):e.style.cssText=i}function ya(t,e,i){it(t)?""===i?t.removeAttribute(e,"class"):t.setAttribute(e,"class",i):e.className=i}function yp(t,e,i){let u=t.length;for(;;){const l=t.indexOf(e,i);if(-1===l)return l;if(0===l||t.charCodeAt(l-1)<=32){const d=e.length;if(l+d===u||t.charCodeAt(l+d)<=32)return l}i=l+1}}const Wc="ng-template";function Gf(t,e,i){let u=0;for(;u<t.length;){let l=t[u++];if(i&&"class"===l){if(l=t[u],-1!==yp(l.toLowerCase(),e,0))return!0}else if(1===l){for(;u<t.length&&"string"==typeof(l=t[u++]);)if(l.toLowerCase()===e)return!0;return!1}}return!1}function vp(t){return 4===t.type&&t.value!==Wc}function ly(t,e,i){return e===(4!==t.type||i?t.value:Wc)}function qf(t,e,i){let u=4;const l=t.attrs||[],d=function _p(t){for(let e=0;e<t.length;e++)if(vh(t[e]))return e;return t.length}(l);let p=!1;for(let m=0;m<e.length;m++){const v=e[m];if("number"!=typeof v){if(!p)if(4&u){if(u=2|1&u,""!==v&&!ly(t,v,i)||""===v&&1===e.length){if(Tr(u))return!1;p=!0}}else{const b=8&u?v:e[++m];if(8&u&&null!==t.attrs){if(!Gf(t.attrs,b,i)){if(Tr(u))return!1;p=!0}continue}const I=fy(8&u?"class":v,l,vp(t),i);if(-1===I){if(Tr(u))return!1;p=!0;continue}if(""!==b){let A;A=I>d?"":l[I+1].toLowerCase();const M=8&u?A:null;if(M&&-1!==yp(M,b,0)||2&u&&b!==A){if(Tr(u))return!1;p=!0}}}}else{if(!p&&!Tr(u)&&!Tr(v))return!1;if(p&&Tr(v))continue;p=!1,u=v|1&u}}return Tr(u)||p}function Tr(t){return 0==(1&t)}function fy(t,e,i,u){if(null===e)return-1;let l=0;if(u||!i){let d=!1;for(;l<e.length;){const p=e[l];if(p===t)return l;if(3===p||6===p)d=!0;else{if(1===p||2===p){let m=e[++l];for(;"string"==typeof m;)m=e[++l];continue}if(4===p)break;if(0===p){l+=4;continue}}l+=d?1:2}return-1}return function bp(t,e){let i=t.indexOf(4);if(i>-1)for(i++;i<t.length;){const u=t[i];if("number"==typeof u)return-1;if(u===e)return i;i++}return-1}(e,t)}function $f(t,e,i=!1){for(let u=0;u<e.length;u++)if(qf(t,e[u],i))return!0;return!1}function zf(t,e){return t?":not("+e.trim()+")":e}function hy(t){let e=t[0],i=1,u=2,l="",d=!1;for(;i<t.length;){let p=t[i];if("string"==typeof p)if(2&u){const m=t[++i];l+="["+p+(m.length>0?'="'+m+'"':"")+"]"}else 8&u?l+="."+p:4&u&&(l+=" "+p);else""!==l&&!Tr(p)&&(e+=zf(d,l),l=""),u=p,d=d||!Tr(u);i++}return""!==l&&(e+=zf(d,l)),e}const Be={};function Oe(t){Dp(ot(),F(),Mn()+t,Ka())}function Dp(t,e,i,u){if(!u)if(3==(3&e[2])){const d=t.preOrderCheckHooks;null!==d&&Ja(e,d,i)}else{const d=t.preOrderHooks;null!==d&&fo(e,d,0,i)}si(i)}function Du(t,e){return t<<17|e<<2}function kr(t){return t>>17&32767}function Wf(t){return 2|t}function Li(t){return(131068&t)>>2}function Eu(t,e){return-131069&t|e<<2}function Co(t){return 1|t}function Zf(t,e){const i=t.contentQueries;if(null!==i)for(let u=0;u<i.length;u+=2){const l=i[u],d=i[u+1];if(-1!==d){const p=t.data[d];qs(l),p.contentQueries(2,e[d],d)}}}function Cu(t,e,i,u,l,d,p,m,v,b){const w=e.blueprint.slice();return w[0]=l,w[2]=140|u,U(w),w[3]=w[15]=t,w[8]=i,w[10]=p||t&&t[10],w[11]=m||t&&t[11],w[12]=v||t&&t[12]||null,w[9]=b||t&&t[9]||null,w[6]=d,w[16]=2==e.type?t[16]:w,w}function ba(t,e,i,u,l){let d=t.data[e];if(null===d)d=function Iu(t,e,i,u,l){const d=Yo(),p=He(),v=t.data[e]=function Lp(t,e,i,u,l,d){return{type:i,index:u,insertBeforeIndex:null,injectorIndex:e?e.injectorIndex:-1,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,propertyBindings:null,flags:0,providerIndexes:0,value:l,attrs:d,mergedAttrs:null,localNames:null,initialInputs:void 0,inputs:null,outputs:null,tViews:null,next:null,projectionNext:null,child:null,parent:e,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}(0,p?d:d&&d.parent,i,e,u,l);return null===t.firstChild&&(t.firstChild=v),null!==d&&(p?null==d.child&&null!==v.parent&&(d.child=v):null===d.next&&(d.next=v)),v}(t,e,i,u,l),function co(){return Ce.lFrame.inI18n}()&&(d.flags|=64);else if(64&d.type){d.type=i,d.value=u,d.attrs=l;const p=function Us(){const t=Ce.lFrame,e=t.currentTNode;return t.isParent?e:e.parent}();d.injectorIndex=null===p?-1:p.injectorIndex}return Ht(d,!0),d}
1function To(t,e,i,u){if(0===i)return-1;const l=e.length;for(let d=0;d<i;d++)e.push(u),t.blueprint.push(u),t.data.push(null);return l}function wa(t,e,i){oi(e);try{const u=t.viewQuery;null!==u&&bs(1,u,i);const l=t.template;null!==l&&Tu(t,e,l,1,i),t.firstCreatePass&&(t.firstCreatePass=!1),t.staticContentQueries&&Zf(t,e),t.staticViewQueries&&bs(2,t.viewQuery,i);const d=t.components;null!==d&&function Iy(t,e){for(let i=0;i<e.length;i++)sd(t,e[i])}(e,d)}catch(u){throw t.firstCreatePass&&(t.incompleteFirstPass=!0,t.firstCreatePass=!1),u}finally{e[2]&=-5,zs()}}function ps(t,e,i,u){const l=e[2];if(256==(256&l))return;oi(e);const d=Ka();try{U(e),function Zo(t){return Ce.lFrame.bindingIndex=t}(t.bindingStartIndex),null!==i&&Tu(t,e,i,2,u);const p=3==(3&l);if(!d)if(p){const b=t.preOrderCheckHooks;null!==b&&Ja(e,b,null)}else{const b=t.preOrderHooks;null!==b&&fo(e,b,0,null),Ws(e,0)}if(function Gp(t){for(let e=mu(t);null!==e;e=Uc(e)){if(!e[2])continue;const i=e[9];for(let u=0;u<i.length;u++){const l=i[u],d=l[3];0==(1024&l[2])&&K(d,1),l[2]|=1024}}}(e),function ys(t){for(let e=mu(t);null!==e;e=Uc(e))for(let i=10;i<e.length;i++){const u=e[i],l=u[1];fh(u)&&ps(l,u,l.template,u[8])}}(e),null!==t.contentQueries&&Zf(t,e),!d)if(p){const b=t.contentCheckHooks;null!==b&&Ja(e,b)}else{const b=t.contentHooks;null!==b&&fo(e,b,1),Ws(e,1)}!function Rp(t,e){const i=t.hostBindingOpCodes;if(null!==i)try{for(let u=0;u<i.length;u++){const l=i[u];if(l<0)si(~l);else{const d=l,p=i[++u],m=i[++u];Gs(p,d),m(2,e[d])}}}finally{si(-1)}}(t,e);const m=t.components;null!==m&&function Cy(t,e){for(let i=0;i<e.length;i++)qp(t,e[i])}(e,m);const v=t.viewQuery;if(null!==v&&bs(2,v,u),!d)if(p){const b=t.viewCheckHooks;null!==b&&Ja(e,b)}else{const b=t.viewHooks;null!==b&&fo(e,b,2),Ws(e,2)}!0===t.firstUpdatePass&&(t.firstUpdatePass=!1),d||(e[2]&=-73),1024&e[2]&&(e[2]&=-1025,K(e[3],-1))}finally{zs()}}function kp(t,e,i,u){const l=e[10],d=!Ka(),p=function ef(t){return 4==(4&t[2])}(e);try{d&&!p&&l.begin&&l.begin(),p&&wa(t,e,u),ps(t,e,i,u)}finally{d&&!p&&l.end&&l.end()}}function Tu(t,e,i,u,l){const d=Mn(),p=2&u;try{si(-1),p&&e.length>20&&Dp(t,e,20,Ka()),i(u,l)}finally{si(d)}}function rl(t,e,i){!uc()||(function xy(t,e,i,u){const l=i.directiveStart,d=i.directiveEnd;t.firstCreatePass||Qs(i,e),hn(u,e);const p=i.initialInputs;for(let m=l;m<d;m++){const v=t.data[m],b=Jn(v);b&&Fy(e,i,v);const w=Wr(e,t,m,i);hn(w,e),null!==p&&Oy(0,m-l,w,v,0,p),b&&(An(i.index,e)[8]=w)}}(t,e,i,br(i,e)),128==(128&i.flags)&&function Bp(t,e,i){const u=i.directiveStart,l=i.directiveEnd,p=i.index,m=function tf(){return Ce.lFrame.currentDirectiveIndex}();try{si(p);for(let v=u;v<l;v++){const b=t.data[v],w=e[v];lc(v),(null!==b.hostBindings||0!==b.hostVars||null!==b.hostAttrs)&&td(b,w)}}finally{si(-1),lc(m)}}(t,e,i))}function il(t,e,i=br){const u=e.localNames;if(null!==u){let l=e.index+1;for(let d=0;d<u.length;d+=2){const p=u[d+1],m=-1===p?i(e,t):t[p];t[l++]=m}}}function Da(t){const e=t.tView;return null===e||e.incompleteFirstPass?t.tView=Ot(1,null,t.template,t.decls,t.vars,t.directiveDefs,t.pipeDefs,t.viewQuery,t.schemas,t.consts):e}function Ot(t,e,i,u,l,d,p,m,v,b){const w=20+u,I=w+l,A=function fr(t,e){const i=[];for(let u=0;u<e;u++)i.push(u<t?null:Be);return i}(w,I),M="function"==typeof b?b():b;return A[1]={type:t,blueprint:A,template:i,queries:null,viewQuery:m,declTNode:e,data:A.slice().fill(null,w),bindingStartIndex:w,expandoStartIndex:I,hostBindingOpCodes:null,firstCreatePass:!0,firstUpdatePass:!0,staticViewQueries:!1,staticContentQueries:!1,preOrderHooks:null,preOrderCheckHooks:null,contentHooks:null,contentCheckHooks:null,viewHooks:null,viewCheckHooks:null,destroyHooks:null,cleanup:null,contentQueries:null,components:null,directiveRegistry:"function"==typeof d?d():d,pipeRegistry:"function"==typeof p?p():p,firstChild:null,schemas:v,consts:M,incompleteFirstPass:!1}}function Vp(t,e,i){for(let u in t)if(t.hasOwnProperty(u)){const l=t[u];(i=null===i?{}:i).hasOwnProperty(u)?i[u].push(e,l):i[u]=[e,l]}return i}function Sr(t,e,i,u,l,d,p,m){const v=br(e,i);let w,b=e.inputs;!m&&null!=b&&(w=b[u])?(zp(t,i,w,u,l),Vs(e)&&function Kt(t,e){const i=An(e,t);16&i[2]||(i[2]|=64)}(i,e.index)):3&e.type&&(u=function Sy(t){return"class"===t?"className":"for"===t?"htmlFor":"formaction"===t?"formAction":"innerHtml"===t?"innerHTML":"readonly"===t?"readOnly":"tabindex"===t?"tabIndex":t}(u),l=null!=p?p(l,e.value||"",u):l,it(d)?d.setProperty(v,u,l):gc(u)||(v.setProperty?v.setProperty(u,l):v[u]=l))}
1function Ui(t,e,i,u){let l=!1;if(uc()){const d=function jp(t,e,i){const u=t.directiveRegistry;let l=null;if(u)for(let d=0;d<u.length;d++){const p=u[d];$f(i,p.selectors,!1)&&(l||(l=[]),yc(Qs(i,e),t,p.type),Jn(p)?(Up(t,i),l.unshift(p)):l.push(p))}return l}(t,e,i),p=null===u?null:{"":-1};if(null!==d){l=!0,sl(i,t.data.length,d.length);for(let w=0;w<d.length;w++){const I=d[w];I.providersResolver&&I.providersResolver(I)}let m=!1,v=!1,b=To(t,e,d.length,null);for(let w=0;w<d.length;w++){const I=d[w];i.mergedAttrs=eu(i.mergedAttrs,I.hostAttrs),nd(t,i,e,b,I),ol(b,I,p),null!==I.contentQueries&&(i.flags|=8),(null!==I.hostBindings||null!==I.hostAttrs||0!==I.hostVars)&&(i.flags|=128);const A=I.type.prototype;!m&&(A.ngOnChanges||A.ngOnInit||A.ngDoCheck)&&((t.preOrderHooks||(t.preOrderHooks=[])).push(i.index),m=!0),!v&&(A.ngOnChanges||A.ngDoCheck)&&((t.preOrderCheckHooks||(t.preOrderCheckHooks=[])).push(i.index),v=!0),b++}!function Ea(t,e){const u=e.directiveEnd,l=t.data,d=e.attrs,p=[];let m=null,v=null;for(let b=e.directiveStart;b<u;b++){const w=l[b],I=w.inputs,A=null===d||vp(e)?null:id(I,d);p.push(A),m=Vp(I,b,m),v=Vp(w.outputs,b,v)}null!==m&&(m.hasOwnProperty("class")&&(e.flags|=16),m.hasOwnProperty("style")&&(e.flags|=32)),e.initialInputs=p,e.inputs=m,e.outputs=v}(t,i)}p&&function ms(t,e,i){if(e){const u=t.localNames=[];for(let l=0;l<e.length;l+=2){const d=i[e[l+1]];if(null==d)throw new ye(-301,`Export of name '${e[l+1]}' not found!`);u.push(e[l],d)}}}(i,u,p)}return i.mergedAttrs=eu(i.mergedAttrs,i.attrs),l}function Au(t,e,i,u,l,d){const p=d.hostBindings;if(p){let m=t.hostBindingOpCodes;null===m&&(m=t.hostBindingOpCodes=[]);const v=~e.index;(function Ny(t){let e=t.length;for(;e>0;){const i=t[--e];if("number"==typeof i&&i<0)return i}return 0})(m)!=v&&m.push(v),m.push(u,l,p)}}function td(t,e){null!==t.hostBindings&&t.hostBindings(1,e)}function Up(t,e){e.flags|=2,(t.components||(t.components=[])).push(e.index)}function ol(t,e,i){if(i){if(e.exportAs)for(let u=0;u<e.exportAs.length;u++)i[e.exportAs[u]]=t;Jn(e)&&(i[""]=t)}}function sl(t,e,i){t.flags|=1,t.directiveStart=e,t.directiveEnd=e+i,t.providerIndexes=e}function nd(t,e,i,u,l){t.data[u]=l;const d=l.factory||(l.factory=ii(l.type)),p=new Za(d,Jn(l),null);t.blueprint[u]=p,i[u]=p,Au(t,e,0,u,To(t,i,l.hostVars,Be),l)}function Fy(t,e,i){const u=br(e,t),l=Da(i),d=t[10],p=Ca(t,Cu(t,l,null,i.onPush?64:16,u,e,d,d.createRenderer(u,i),null,null));t[e.index]=p}function gi(t,e,i,u,l,d){const p=br(t,e);!function rd(t,e,i,u,l,d,p){if(null==d)it(t)?t.removeAttribute(e,l,i):e.removeAttribute(l);else{const m=null==p?xe(d):p(d,u||"",l);it(t)?t.setAttribute(e,l,m,i):i?e.setAttributeNS(i,l,m):e.setAttribute(l,m)}}(e[11],p,d,t.value,i,u,l)}function Oy(t,e,i,u,l,d){const p=d[e];if(null!==p){const m=u.setInput;for(let v=0;v<p.length;){const b=p[v++],w=p[v++],I=p[v++];null!==m?u.setInput(i,I,b,w):i[w]=I}}}function id(t,e){let i=null,u=0;for(;u<e.length;){const l=e[u];if(0!==l)if(5!==l){if("number"==typeof l)break;t.hasOwnProperty(l)&&(null===i&&(i=[]),i.push(l,t[l],e[u+1])),u+=2}else u+=2;else u+=4}return i}function od(t,e,i,u){return new Array(t,!0,!1,e,null,0,u,i,null,null)}function qp(t,e){const i=An(e,t);if(fh(i)){const u=i[1];80&i[2]?ps(u,i,u.template,i[8]):i[5]>0&&Mu(i)}}function Mu(t){for(let u=mu(t);null!==u;u=Uc(u))for(let l=10;l<u.length;l++){const d=u[l];if(1024&d[2]){const p=d[1];ps(p,d,p.template,d[8])}else d[5]>0&&Mu(d)}const i=t[1].components;if(null!==i)for(let u=0;u<i.length;u++){const l=An(i[u],t);fh(l)&&l[5]>0&&Mu(l)}}function sd(t,e){const i=An(e,t),u=i[1];(function Py(t,e){for(let i=e.length;i<t.blueprint.length;i++)e.push(t.blueprint[i])})(u,i),wa(u,i,i[8])}function Ca(t,e){return t[13]?t[14][4]=e:t[13]=e,t[14]=e,e}function Ia(t){for(;t;){t[2]|=64;const e=da(t);if(qa(t)&&!e)return t;t=e}return null}function ad(t,e,i){const u=e[10];u.begin&&u.begin();try{ps(t,e,t.template,i)}catch(l){throw Gi(e,l),l}finally{u.end&&u.end()}}function Nu(t){!function vs(t){for(let e=0;e<t.components.length;e++){const i=t.components[e],u=Oc(i),l=u[1];kp(l,u,l.template,i)}}(t[8])}function bs(t,e,i){qs(0),e(t,i)}const Ry=(()=>Promise.resolve(null))();function ud(t){return t[7]||(t[7]=[])}function cd(t){return t.cleanup||(t.cleanup=[])}function Gi(t,e){const i=t[9],u=i?i.get(hs,null):null;u&&u.handleError(e)}
1function zp(t,e,i,u,l){for(let d=0;d<i.length;){const p=i[d++],m=i[d++],v=e[p],b=t.data[p];null!==b.setInput?b.setInput(v,l,u,m):v[m]=l}}function qi(t,e,i){const u=Qo(e,t);!function ap(t,e,i){it(t)?t.setValue(e,i):e.textContent=i}(t[11],u,i)}function xu(t,e,i){let u=i?t.styles:null,l=i?t.classes:null,d=0;if(null!==e)for(let p=0;p<e.length;p++){const m=e[p];"number"==typeof m?d=m:1==d?l=Me(l,m):2==d&&(u=Me(u,m+": "+e[++p]+";"))}i?t.styles=u:t.stylesWithoutHost=u,i?t.classes=l:t.classesWithoutHost=l}const al=new We("INJECTOR",-1);class ld{get(e,i=xi){if(i===xi){const u=new Error(`NullInjectorError: No provider for ${W(e)}!`);throw u.name="NullInjectorError",u}return i}}const ul=new We("Set Injector scope."),Ds={},cl={};let fd;function Qp(){return void 0===fd&&(fd=new ld),fd}function $i(t,e=null,i=null,u){const l=So(t,e,i,u);return l._resolveInjectorDefTypes(),l}function So(t,e=null,i=null,u){return new Jp(t,i,e||Qp(),u)}class Jp{constructor(e,i,u,l=null){this.parent=u,this.records=new Map,this.injectorDefTypes=new Set,this.onDestroy=new Set,this._destroyed=!1;const d=[];i&&Et(i,m=>this.processProvider(m,e,i)),Et([e],m=>this.processInjectorType(m,[],d)),this.records.set(al,Es(void 0,this));const p=this.records.get(ul);this.scope=null!=p?p.value:null,this.source=l||("object"==typeof e?null:W(e))}get destroyed(){return this._destroyed}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{this.onDestroy.forEach(e=>e.ngOnDestroy())}finally{this.records.clear(),this.onDestroy.clear(),this.injectorDefTypes.clear()}}get(e,i=xi,u=Ve.Default){this.assertNotDestroyed();const l=yf(this),d=wi(void 0);try{if(!(u&Ve.SkipSelf)){let m=this.records.get(e);if(void 0===m){const v=function eg(t){return"function"==typeof t||"object"==typeof t&&t instanceof We}(e)&&bi(e);m=v&&this.injectableDefInScope(v)?Es(ll(e),Ds):null,this.records.set(e,m)}if(null!=m)return this.hydrate(e,m)}return(u&Ve.Self?Qp():this.parent).get(e,i=u&Ve.Optional&&i===xi?null:i)}catch(p){if("NullInjectorError"===p.name){if((p[Ic]=p[Ic]||[]).unshift(W(e)),l)throw p;return function Rh(t,e,i,u){const l=t[Ic];throw e[Xs]&&l.unshift(e[Xs]),t.message=function kh(t,e,i,u=null){t=t&&"\n"===t.charAt(0)&&"\u0275"==t.charAt(1)?t.substr(2):t;let l=W(e);if(Array.isArray(e))l=e.map(W).join(" -> ");else if("object"==typeof e){let d=[];for(let p in e)if(e.hasOwnProperty(p)){let m=e[p];d.push(p+":"+("string"==typeof m?JSON.stringify(m):W(m)))}l=`{${d.join(", ")}}`}return`${i}${u?"("+u+")":""}[${l}]: ${t.replace(mf,"\n  ")}`}("\n"+t.message,l,i,u),t.ngTokenPath=l,t[Ic]=null,t}(p,e,"R3InjectorError",this.source)}throw p}finally{wi(d),yf(l)}}_resolveInjectorDefTypes(){this.injectorDefTypes.forEach(e=>this.get(e))}toString(){const e=[];return this.records.forEach((u,l)=>e.push(W(l))),`R3Injector[${e.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new ye(205,"")}processInjectorType(e,i,u){if(!(e=he(e)))return!1;let l=xs(e);const d=null==l&&e.ngModule||void 0,p=void 0===d?e:d,m=-1!==u.indexOf(p);if(void 0!==d&&(l=xs(d)),null==l)return!1;if(null!=l.imports&&!m){let w;u.push(p);try{Et(l.imports,I=>{this.processInjectorType(I,i,u)&&(void 0===w&&(w=[]),w.push(I))})}finally{}if(void 0!==w)for(let I=0;I<w.length;I++){const{ngModule:A,providers:M}=w[I];Et(M,V=>this.processProvider(V,A,M||Tt))}}this.injectorDefTypes.add(p);const v=ii(p)||(()=>new p);this.records.set(p,Es(v,Ds));const b=l.providers;if(null!=b&&!m){const w=e;Et(b,I=>this.processProvider(I,w,b))}return void 0!==d&&void 0!==e.providers}processProvider(e,i,u){let l=Cs(e=he(e))?e:he(e&&e.provide);const d=function dd(t,e,i){return hd(t)?Es(void 0,t.useValue):Es(Yp(t),Ds)}(e);if(Cs(e)||!0!==e.multi)this.records.get(l);else{let p=this.records.get(l);p||(p=Es(void 0,Ds,!0),p.factory=()=>ea(p.multi),this.records.set(l,p)),l=e,p.multi.push(e)}this.records.set(l,d)}hydrate(e,i){return i.value===Ds&&(i.value=cl,i.value=i.factory()),"object"==typeof i.value&&i.value&&function Xp(t){return null!==t&&"object"==typeof t&&"function"==typeof t.ngOnDestroy}(i.value)&&this.onDestroy.add(i.value),i.value}injectableDefInScope(e){if(!e.providedIn)return!1;const i=he(e.providedIn);return"string"==typeof i?"any"===i||i===this.scope:this.injectorDefTypes.has(i)}}function ll(t){const e=bi(t),i=null!==e?e.factory:ii(t);if(null!==i)return i;if(t instanceof We)throw new ye(204,"");if(t instanceof Function)return function Fu(t){const e=t.length;if(e>0)throw function Ln(t,e){const i=[];for(let u=0;u<t;u++)i.push(e);return i}(e,"?"),new ye(204,"");const i=function Qu(t){const e=t&&(t[ja]||t[jl]);if(e){const i=function Yd(t){if(t.hasOwnProperty("name"))return t.name;const e=(""+t).match(/^function\s*([^\s(]+)/);return null===e?"":e[1]}(t);return console.warn(`DEPRECATED: DI is instantiating a token "${i}" that inherits its @Injectable decorator but does not provide one itself.\nThis will become an error in a future version of Angular. Please add @Injectable() to the "${i}" class.`),e}return null}(t);return null!==i?()=>i.factory(t):()=>new t}(t);throw new ye(204,"")}function Yp(t,e,i){let u;if(Cs(t)){const l=he(t);return ii(l)||ll(l)}if(hd(t))u=()=>he(t.useValue);else if(function Ly(t){return!(!t||!t.useFactory)}(t))u=()=>t.useFactory(...ea(t.deps||[]));else if(function Zp(t){return!(!t||!t.useExisting)}(t))u=()=>Ke(he(t.useExisting));else{const l=he(t&&(t.useClass||t.provide));if(!function Vy(t){return!!t.deps}(t))return ii(l)||ll(l);u=()=>new l(...ea(t.deps))}return u}
1function Es(t,e,i=!1){return{factory:t,value:e,multi:i?[]:void 0}}function hd(t){return null!==t&&"object"==typeof t&&ui in t}function Cs(t){return"function"==typeof t}let Fn=(()=>{class t{static create(i,u){var l;if(Array.isArray(i))return $i({name:""},u,i,"");{const d=null!==(l=i.name)&&void 0!==l?l:"";return $i({name:d},i.parent,i.providers,d)}}}return t.THROW_IF_NOT_FOUND=xi,t.NULL=new ld,t.\u0275prov=Xe({token:t,providedIn:"any",factory:()=>Ke(al)}),t.__NG_ELEMENT_ID__=-1,t})();function D(t,e){hc(Oc(t)[1],Se())}function S(t){let e=function T(t){return Object.getPrototypeOf(t.prototype).constructor}(t.type),i=!0;const u=[t];for(;e;){let l;if(Jn(t))l=e.\u0275cmp||e.\u0275dir;else{if(e.\u0275cmp)throw new ye(903,"");l=e.\u0275dir}if(l){if(i){u.push(l);const p=t;p.inputs=P(t.inputs),p.declaredInputs=P(t.declaredInputs),p.outputs=P(t.outputs);const m=l.hostBindings;m&&ce(t,m);const v=l.viewQuery,b=l.contentQueries;if(v&&H(t,v),b&&te(t,b),O(t.inputs,l.inputs),O(t.declaredInputs,l.declaredInputs),O(t.outputs,l.outputs),Jn(l)&&l.data.animation){const w=t.data;w.animation=(w.animation||[]).concat(l.data.animation)}}const d=l.features;if(d)for(let p=0;p<d.length;p++){const m=d[p];m&&m.ngInherit&&m(t),m===S&&(i=!1)}}e=Object.getPrototypeOf(e)}!function k(t){let e=0,i=null;for(let u=t.length-1;u>=0;u--){const l=t[u];l.hostVars=e+=l.hostVars,l.hostAttrs=eu(l.hostAttrs,i=eu(i,l.hostAttrs))}}(u)}function P(t){return t===Go?{}:t===Tt?[]:t}function H(t,e){const i=t.viewQuery;t.viewQuery=i?(u,l)=>{e(u,l),i(u,l)}:e}function te(t,e){const i=t.contentQueries;t.contentQueries=i?(u,l,d)=>{e(u,l,d),i(u,l,d)}:e}function ce(t,e){const i=t.hostBindings;t.hostBindings=i?(u,l)=>{e(u,l),i(u,l)}:e}let Ye=null;function st(){if(!Ye){const t=mt.Symbol;if(t&&t.iterator)Ye=t.iterator;else{const e=Object.getOwnPropertyNames(Map.prototype);for(let i=0;i<e.length;++i){const u=e[i];"entries"!==u&&"size"!==u&&Map.prototype[u]===Map.prototype.entries&&(Ye=u)}}}return Ye}function Is(t){return!!dl(t)&&(Array.isArray(t)||!(t instanceof Map)&&st()in t)}function dl(t){return null!==t&&("function"==typeof t||"object"==typeof t)}function dr(t,e,i){return!Object.is(t[e],i)&&(t[e]=i,!0)}function Mo(t,e,i,u){const l=F();return dr(l,en(),e)&&(ot(),gi(Gt(),l,t,e,i,u)),Mo}function pl(t,e,i,u){return dr(t,en(),i)?e+xe(i)+u:Be}function Lt(t,e,i,u,l,d,p,m){const v=F(),b=ot(),w=t+20,I=b.firstCreatePass?function mC(t,e,i,u,l,d,p,m,v){const b=e.consts,w=ba(e,t,4,p||null,Zt(b,m));Ui(e,i,w,Zt(b,v)),hc(e,w);const I=w.tViews=Ot(2,w,u,l,d,e.directiveRegistry,e.pipeRegistry,null,e.schemas,b);return null!==e.queries&&(e.queries.template(e,w),I.queries=e.queries.embeddedTView(w)),w}(w,b,v,e,i,u,l,d,p):b.data[w];Ht(I,!1);const A=v[11].createComment("");bu(b,v,A,I),hn(A,v),Ca(v,v[w]=od(A,v,A,I)),Ga(I)&&rl(b,v,I),null!=p&&il(v,I,m)}function ae(t,e=Ve.Default){const i=F();return null===i?Ke(t,e):ou(Se(),i,he(t),e)}function nt(t,e,i){const u=F();return dr(u,en(),e)&&Sr(ot(),Gt(),u,t,e,u[11],i,!1),nt}function zy(t,e,i,u,l){const p=l?"class":"style";zp(t,i,e.inputs[p],p,u)}function B(t,e,i,u){const l=F(),d=ot(),p=20+t,m=l[11],v=l[p]=pa(m,e,function mh(){return Ce.lFrame.currentNamespace}()),b=d.firstCreatePass?function BC(t,e,i,u,l,d,p){const m=e.consts,b=ba(e,t,2,l,Zt(m,d));return Ui(e,i,b,Zt(m,p)),null!==b.attrs&&xu(b,b.attrs,!1),null!==b.mergedAttrs&&xu(b,b.mergedAttrs,!0),null!==e.queries&&e.queries.elementStart(e,b),b}(p,d,l,0,e,i,u):d.data[p];Ht(b,!0);const w=b.mergedAttrs;null!==w&&Ti(m,v,w);const I=b.classes;null!==I&&ya(m,v,I);const A=b.styles;null!==A&&Hf(m,v,A),64!=(64&b.flags)&&bu(d,l,v,b),0===function oe(){return Ce.lFrame.elementDepthCount}()&&hn(v,l),function Xt(){Ce.lFrame.elementDepthCount++}(),Ga(b)&&(rl(d,l,b),function lt(t,e,i){if(Ls(e)){const l=e.directiveEnd;for(let d=e.directiveStart;d<l;d++){const p=t.data[d];p.contentQueries&&p.contentQueries(1,i[d],d)}}}(d,b,l)),null!==u&&il(l,b)}function j(){let t=Se();He()?function cc(){Ce.lFrame.isParent=!1}():(t=t.parent,Ht(t,!1));const e=t;!function Wa(){Ce.lFrame.elementDepthCount--}();const i=ot();i.firstCreatePass&&(hc(i,t),Ls(t)&&i.queries.elementEnd(t)),null!=e.classesWithoutHost&&function Im(t){return 0!=(16&t.flags)}(e)&&zy(i,e,F(),e.classesWithoutHost,!0),null!=e.stylesWithoutHost&&function Tm(t){return 0!=(32&t.flags)}(e)&&zy(i,e,F(),e.stylesWithoutHost,!1)}function at(t,e,i,u){B(t,e,i,u),j()}function og(t){return!!t&&"function"==typeof t.then}const R0=function P0(t){return!!t&&"function"==typeof t.subscribe};function Ar(t,e,i,u){const l=F(),d=ot(),p=Se();return function L0(t,e,i,u,l,d,p,m){const v=Ga(u),w=t.firstCreatePass&&cd(t),I=e[8],A=ud(e);let M=!0;if(3&u.type||m){const ne=br(u,e),ue=m?m(ne):ne,G=A.length,be=m?Ge=>m(Rt(Ge[u.index])):u.index;if(it(i)){let Ge=null;if(!m&&v&&(Ge=function HC(t,e,i,u){const l=t.cleanup;if(null!=l)for(let d=0;d<l.length-1;d+=2){const p=l[d];if(p===i&&l[d+1]===u){const m=e[7],v=l[d+2];return m.length>v?m[v]:null}"string"==typeof p&&(d+=2)}return null}(t,e,l,u.index)),null!==Ge)(Ge.__ngLastListenerFn__||Ge).__ngNextListenerFn__=d,Ge.__ngLastListenerFn__=d,M=!1;else{d=Wy(u,e,I,d,!1);const pt=i.listen(ue,l,d);A.push(d,pt),w&&w.push(l,be,G,G+1)}}else d=Wy(u,e,I,d,!0),ue.addEventListener(l,d,p),A.push(d),w&&w.push(l,be,G,p)}else d=Wy(u,e,I,d,!1);const V=u.outputs;let Q;if(M&&null!==V&&(Q=V[l])){const ne=Q.length;if(ne)for(let ue=0;ue<ne;ue+=2){const Yr=e[Q[ue]][Q[ue+1]].subscribe(d),qu=A.length;A.push(d,Yr),w&&w.push(l,u.index,qu,-(qu+1))}}}
1(d,l,l[11],p,t,e,!!i,u),Ar}function V0(t,e,i,u){try{return!1!==i(u)}catch(l){return Gi(t,l),!1}}function Wy(t,e,i,u,l){return function d(p){if(p===Function)return u;const m=2&t.flags?An(t.index,e):e;0==(32&e[2])&&Ia(m);let v=V0(e,0,u,p),b=d.__ngNextListenerFn__;for(;b;)v=V0(e,0,b,p)&&v,b=b.__ngNextListenerFn__;return l&&!1===v&&(p.preventDefault(),p.returnValue=!1),v}}function Pt(t=1){return function rf(t){return(Ce.lFrame.contextLView=function fc(t,e){for(;t>0;)e=e[15],t--;return e}(t,Ce.lFrame.contextLView))[8]}(t)}function sg(t,e,i){return _d(t,"",e,"",i),sg}function _d(t,e,i,u,l){const d=F(),p=pl(d,e,i,u);return p!==Be&&Sr(ot(),Gt(),d,t,p,d[11],l,!1),_d}function W0(t,e,i,u,l){const d=t[i+1],p=null===e;let m=u?kr(d):Li(d),v=!1;for(;0!==m&&(!1===v||p);){const w=t[m+1];KC(t[m],e)&&(v=!0,t[m+1]=u?Co(w):Wf(w)),m=u?kr(w):Li(w)}v&&(t[i+1]=u?Wf(d):Co(d))}function KC(t,e){return null===t||null==e||(Array.isArray(t)?t[1]:t)===e||!(!Array.isArray(t)||"string"!=typeof e)&&mo(t,e)>=0}const Pn={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function K0(t){return t.substring(Pn.key,Pn.keyEnd)}function Q0(t,e){const i=Pn.textEnd;return i===e?-1:(e=Pn.keyEnd=function ZC(t,e,i){for(;e<i&&t.charCodeAt(e)>32;)e++;return e}(t,Pn.key=e,i),El(t,e,i))}function El(t,e,i){for(;e<i&&t.charCodeAt(e)<=32;)e++;return e}function ag(t,e){return function Wi(t,e,i,u){const l=F(),d=ot(),p=Ii(2);d.firstUpdatePass&&rb(d,t,p,u),e!==Be&&dr(l,p,e)&&ob(d,d.data[Mn()],l,l[11],t,l[p+1]=function uI(t,e){return null==t||("string"==typeof e?t+=e:"object"==typeof t&&(t=W(_o(t)))),t}(e,i),u,p)}(t,e,null,!0),ag}function tb(t){!function Ki(t,e,i,u){const l=ot(),d=Ii(2);l.firstUpdatePass&&rb(l,null,d,u);const p=F();if(i!==Be&&dr(p,d,i)){const m=l.data[Mn()];if(ab(m,u)&&!nb(l,d)){let v=u?m.classesWithoutHost:m.stylesWithoutHost;null!==v&&(i=Me(v,i||"")),zy(l,m,p,i,u)}else!function aI(t,e,i,u,l,d,p,m){l===Be&&(l=Tt);let v=0,b=0,w=0<l.length?l[0]:null,I=0<d.length?d[0]:null;for(;null!==w||null!==I;){const A=v<l.length?l[v+1]:void 0,M=b<d.length?d[b+1]:void 0;let Q,V=null;w===I?(v+=2,b+=2,A!==M&&(V=I,Q=M)):null===I||null!==w&&w<I?(v+=2,V=w):(b+=2,V=I,Q=M),null!==V&&ob(t,e,i,u,V,Q,p,m),w=v<l.length?l[v]:null,I=b<d.length?d[b]:null}}(l,m,p,p[11],p[d+1],p[d+1]=function sI(t,e,i){if(null==i||""===i)return Tt;const u=[],l=_o(i);if(Array.isArray(l))for(let d=0;d<l.length;d++)t(u,l[d],!0);else if("object"==typeof l)for(const d in l)l.hasOwnProperty(d)&&t(u,d,l[d]);else"string"==typeof l&&e(u,l);return u}(t,e,i),u,d)}}(Cr,xo,t,!0)}function xo(t,e){for(let i=function JC(t){return function Y0(t){Pn.key=0,Pn.keyEnd=0,Pn.value=0,Pn.valueEnd=0,Pn.textEnd=t.length}(t),Q0(t,El(t,0,Pn.textEnd))}(e);i>=0;i=Q0(e,i))Cr(t,K0(e),!0)}function nb(t,e){return e>=t.expandoStartIndex}function rb(t,e,i,u){const l=t.data;if(null===l[i+1]){const d=l[Mn()],p=nb(t,i);ab(d,u)&&null===e&&!p&&(e=!1),e=function nI(t,e,i,u){const l=function Xo(t){const e=Ce.lFrame.currentDirectiveIndex;return-1===e?null:t[e]}(t);let d=u?e.residualClasses:e.residualStyles;if(null===l)0===(u?e.classBindings:e.styleBindings)&&(i=bd(i=Ky(null,t,e,i,u),e.attrs,u),d=null);else{const p=e.directiveStylingLast;if(-1===p||t[p]!==l)if(i=Ky(l,t,e,i,u),null===d){let v=function rI(t,e,i){const u=i?e.classBindings:e.styleBindings;if(0!==Li(u))return t[kr(u)]}(t,e,u);void 0!==v&&Array.isArray(v)&&(v=Ky(null,t,e,v[1],u),v=bd(v,e.attrs,u),function iI(t,e,i,u){t[kr(i?e.classBindings:e.styleBindings)]=u}(t,e,u,v))}else d=function oI(t,e,i){let u;const l=e.directiveEnd;for(let d=1+e.directiveStylingLast;d<l;d++)u=bd(u,t[d].hostAttrs,i);return bd(u,e.attrs,i)}(t,e,u)}return void 0!==d&&(u?e.residualClasses=d:e.residualStyles=d),i}(l,d,e,u),function zC(t,e,i,u,l,d){let p=d?e.classBindings:e.styleBindings,m=kr(p),v=Li(p);t[u]=i;let w,b=!1;if(Array.isArray(i)){const I=i;w=I[1],(null===w||mo(I,w)>0)&&(b=!0)}else w=i;if(l)if(0!==v){const A=kr(t[m+1]);t[u+1]=Du(A,m),0!==A&&(t[A+1]=Eu(t[A+1],u)),t[m+1]=function my(t,e){return 131071&t|e<<17}(t[m+1],u)}else t[u+1]=Du(m,0),0!==m&&(t[m+1]=Eu(t[m+1],u)),m=u;else t[u+1]=Du(v,0),0===m?m=u:t[v+1]=Eu(t[v+1],u),v=u;b&&(t[u+1]=Wf(t[u+1])),W0(t,w,u,!0),W0(t,w,u,!1),function WC(t,e,i,u,l){const d=l?t.residualClasses:t.residualStyles;null!=d&&"string"==typeof e&&mo(d,e)>=0&&(i[u+1]=Co(i[u+1]))}(e,w,t,u,d),p=Du(m,v),d?e.classBindings=p:e.styleBindings=p}(l,d,e,i,p,u)}}function Ky(t,e,i,u,l){let d=null;const p=i.directiveEnd;let m=i.directiveStylingLast;
1for(-1===m?m=i.directiveStart:m++;m<p&&(d=e[m],u=bd(u,d.hostAttrs,l),d!==t);)m++;return null!==t&&(i.directiveStylingLast=m),u}function bd(t,e,i){const u=i?1:2;let l=-1;if(null!==e)for(let d=0;d<e.length;d++){const p=e[d];"number"==typeof p?l=p:l===u&&(Array.isArray(t)||(t=void 0===t?[]:["",t]),Cr(t,p,!!i||e[++d]))}return void 0===t?null:t}function ob(t,e,i,u,l,d,p,m){if(!(3&e.type))return;const v=t.data,b=v[m+1];ug(function Kc(t){return 1==(1&t)}(b)?sb(v,e,i,l,Li(b),p):void 0)||(ug(d)||function Cp(t){return 2==(2&t)}(b)&&(d=sb(v,null,i,l,m,p)),function mp(t,e,i,u,l){const d=it(t);if(e)l?d?t.addClass(i,u):i.classList.add(u):d?t.removeClass(i,u):i.classList.remove(u);else{let p=-1===u.indexOf("-")?void 0:lr.DashCase;if(null==l)d?t.removeStyle(i,u,p):i.style.removeProperty(u);else{const m="string"==typeof l&&l.endsWith("!important");m&&(l=l.slice(0,-10),p|=lr.Important),d?t.setStyle(i,u,l,p):i.style.setProperty(u,l,m?"important":"")}}}(u,p,Qo(Mn(),i),l,d))}function sb(t,e,i,u,l,d){const p=null===e;let m;for(;l>0;){const v=t[l],b=Array.isArray(v),w=b?v[1]:v,I=null===w;let A=i[l+1];A===Be&&(A=I?Tt:void 0);let M=I?Zs(A,u):w===u?A:void 0;if(b&&!ug(M)&&(M=Zs(v,u)),ug(M)&&(m=M,p))return m;const V=t[l+1];l=p?kr(V):Li(V)}if(null!==e){let v=d?e.residualClasses:e.residualStyles;null!=v&&(m=Zs(v,u))}return m}function ug(t){return void 0!==t}function ab(t,e){return 0!=(t.flags&(e?16:32))}function et(t,e=""){const i=F(),u=ot(),l=t+20,d=u.firstCreatePass?ba(u,l,1,e,null):u.data[l],p=i[l]=function Rf(t,e){return it(t)?t.createText(e):t.createTextNode(e)}(i[11],e);bu(u,i,p,d),Ht(d,!1)}function or(t){return cg("",t,""),or}function cg(t,e,i){const u=F(),l=pl(u,t,e,i);return l!==Be&&qi(u,Mn(),l),cg}const Vu=void 0;var AI=["en",[["a","p"],["AM","PM"],Vu],[["AM","PM"],Vu,Vu],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],Vu,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],Vu,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",Vu,"{1} 'at' {0}",Vu],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function SI(t){const i=Math.floor(Math.abs(t)),u=t.toString().replace(/^[^.]*\.?/,"").length;return 1===i&&0===u?1:5}];let Cl={};function Ab(t){return t in Cl||(Cl[t]=mt.ng&&mt.ng.common&&mt.ng.common.locales&&mt.ng.common.locales[t]),Cl[t]}var pe=(()=>((pe=pe||{})[pe.LocaleId=0]="LocaleId",pe[pe.DayPeriodsFormat=1]="DayPeriodsFormat",pe[pe.DayPeriodsStandalone=2]="DayPeriodsStandalone",pe[pe.DaysFormat=3]="DaysFormat",pe[pe.DaysStandalone=4]="DaysStandalone",pe[pe.MonthsFormat=5]="MonthsFormat",pe[pe.MonthsStandalone=6]="MonthsStandalone",pe[pe.Eras=7]="Eras",pe[pe.FirstDayOfWeek=8]="FirstDayOfWeek",pe[pe.WeekendRange=9]="WeekendRange",pe[pe.DateFormat=10]="DateFormat",pe[pe.TimeFormat=11]="TimeFormat",pe[pe.DateTimeFormat=12]="DateTimeFormat",pe[pe.NumberSymbols=13]="NumberSymbols",pe[pe.NumberFormats=14]="NumberFormats",pe[pe.CurrencyCode=15]="CurrencyCode",pe[pe.CurrencySymbol=16]="CurrencySymbol",pe[pe.CurrencyName=17]="CurrencyName",pe[pe.Currencies=18]="Currencies",pe[pe.Directionality=19]="Directionality",pe[pe.PluralCase=20]="PluralCase",pe[pe.ExtraData=21]="ExtraData",pe))();const lg="en-US";let Mb=lg;function Yy(t,e,i,u,l){if(t=he(t),Array.isArray(t))for(let d=0;d<t.length;d++)Yy(t[d],e,i,u,l);else{const d=ot(),p=F();let m=Cs(t)?t:he(t.provide),v=Yp(t);const b=Se(),w=1048575&b.providerIndexes,I=b.directiveStart,A=b.providerIndexes>>20;if(Cs(t)||!t.multi){const M=new Za(v,l,ae),V=Xy(m,e,l?w:w+A,I);-1===V?(yc(Qs(b,p),d,m),Zy(d,t,e.length),e.push(m),b.directiveStart++,b.directiveEnd++,l&&(b.providerIndexes+=1048576),i.push(M),p.push(M)):(i[V]=M,p[V]=M)}else{const M=Xy(m,e,w+A,I),V=Xy(m,e,w,w+A),Q=M>=0&&i[M],ne=V>=0&&i[V];if(l&&!ne||!l&&!Q){yc(Qs(b,p),d,m);const ue=function ST(t,e,i,u,l){const d=new Za(t,i,ae);return d.multi=[],d.index=e,d.componentProviders=0,Xb(d,l,u&&!i),d}(l?TT:IT,i.length,l,u,v);!l&&ne&&(i[V].providerFactory=ue),Zy(d,t,e.length,0),e.push(m),b.directiveStart++,b.directiveEnd++,l&&(b.providerIndexes+=1048576),i.push(ue),p.push(ue)}else Zy(d,t,M>-1?M:V,Xb(i[l?V:M],v,!l&&u));
1!l&&u&&ne&&i[V].componentProviders++}}}function Zy(t,e,i,u){const l=Cs(e),d=function fl(t){return!!t.useClass}(e);if(l||d){const v=(d?he(e.useClass):e).prototype.ngOnDestroy;if(v){const b=t.destroyHooks||(t.destroyHooks=[]);if(!l&&e.multi){const w=b.indexOf(i);-1===w?b.push(i,[u,v]):b[w+1].push(u,v)}else b.push(i,v)}}}function Xb(t,e,i){return i&&t.componentProviders++,t.multi.push(e)-1}function Xy(t,e,i,u){for(let l=i;l<u;l++)if(e[l]===t)return l;return-1}function IT(t,e,i,u){return ev(this.multi,[])}function TT(t,e,i,u){const l=this.multi;let d;if(this.providerFactory){const p=this.providerFactory.componentProviders,m=Wr(i,i[1],this.providerFactory.index,u);d=m.slice(0,p),ev(l,d);for(let v=p;v<m.length;v++)d.push(m[v])}else d=[],ev(l,d);return d}function ev(t,e){for(let i=0;i<t.length;i++)e.push((0,t[i])());return e}function Ct(t,e=[]){return i=>{i.providersResolver=(u,l)=>function CT(t,e,i){const u=ot();if(u.firstCreatePass){const l=Jn(t);Yy(i,u.data,u.blueprint,l,!0),Yy(e,u.data,u.blueprint,l,!1)}}(u,l?l(t):t,e)}}class ew{}class NT{resolveComponentFactory(e){throw function MT(t){const e=Error(`No component factory found for ${W(t)}. Did you add it to @NgModule.entryComponents?`);return e.ngComponent=t,e}(e)}}let Id=(()=>{class t{}return t.NULL=new NT,t})();function xT(){return Tl(Se(),F())}function Tl(t,e){return new Qi(br(t,e))}let Qi=(()=>{class t{constructor(i){this.nativeElement=i}}return t.__NG_ELEMENT_ID__=xT,t})();class nw{}let Bu=(()=>{class t{}return t.__NG_ELEMENT_ID__=()=>function PT(){const t=F(),i=An(Se().index,t);return function OT(t){return t[11]}(vr(i)?i:t)}(),t})(),RT=(()=>{class t{}return t.\u0275prov=Xe({token:t,providedIn:"root",factory:()=>null}),t})();class gg{constructor(e){this.full=e,this.major=e.split(".")[0],this.minor=e.split(".")[1],this.patch=e.split(".").slice(2).join(".")}}const kT=new gg("13.1.3"),tv={};function mg(t,e,i,u,l=!1){for(;null!==i;){const d=e[i.index];if(null!==d&&u.push(Rt(d)),Qn(d))for(let m=10;m<d.length;m++){const v=d[m],b=v[1].firstChild;null!==b&&mg(v[1],v,b,u)}const p=i.type;if(8&p)mg(t,e,i.child,u);else if(32&p){const m=gu(i,e);let v;for(;v=m();)u.push(v)}else if(16&p){const m=hp(e,i);if(Array.isArray(m))u.push(...m);else{const v=da(e[16]);mg(v[1],v,m,u,!0)}}i=l?i.projectionNext:i.next}return u}class Td{constructor(e,i){this._lView=e,this._cdRefInjectingView=i,this._appRef=null,this._attachedToViewContainer=!1}get rootNodes(){const e=this._lView,i=e[1];return mg(i,e,i.firstChild,[])}get context(){return this._lView[8]}set context(e){this._lView[8]=e}get destroyed(){return 256==(256&this._lView[2])}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._attachedToViewContainer){const e=this._lView[3];if(Qn(e)){const i=e[8],u=i?i.indexOf(this):-1;u>-1&&(Lf(e,u),Dc(i,u))}this._attachedToViewContainer=!1}ga(this._lView[1],this._lView)}onDestroy(e){!function Xf(t,e,i,u){const l=ud(e);null===i?l.push(u):(l.push(i),t.firstCreatePass&&cd(t).push(u,l.length-1))}(this._lView[1],this._lView,null,e)}markForCheck(){Ia(this._cdRefInjectingView||this._lView)}detach(){this._lView[2]&=-129}reattach(){this._lView[2]|=128}detectChanges(){ad(this._lView[1],this._lView,this.context)}checkNoChanges(){!function _s(t,e,i){tt(!0);try{ad(t,e,i)}finally{tt(!1)}}(this._lView[1],this._lView,this.context)}attachToViewContainerRef(){if(this._appRef)throw new ye(902,"");this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,function cp(t,e){hi(t,e,e[11],2,null,null)}(this._lView[1],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new ye(902,"");this._appRef=e}}class LT extends Td{constructor(e){super(e),this._view=e}detectChanges(){Nu(this._view)}checkNoChanges(){!function Hi(t){tt(!0);try{Nu(t)}finally{tt(!1)}}(this._view)}get context(){return null}}class rw extends Id{constructor(e){super(),this.ngModule=e}resolveComponentFactory(e){const i=an(e);return new nv(i,this.ngModule)}}function iw(t){const e=[];for(let i in t)t.hasOwnProperty(i)&&e.push({propName:t[i],templateName:i});return e}const BT=new We("SCHEDULER_TOKEN",{providedIn:"root",factory:()=>Lc});
1class nv extends ew{constructor(e,i){super(),this.componentDef=e,this.ngModule=i,this.componentType=e.type,this.selector=function py(t){return t.map(hy).join(",")}(e.selectors),this.ngContentSelectors=e.ngContentSelectors?e.ngContentSelectors:[],this.isBoundToModule=!!i}get inputs(){return iw(this.componentDef.inputs)}get outputs(){return iw(this.componentDef.outputs)}create(e,i,u,l){const d=(l=l||this.ngModule)?function jT(t,e){return{get:(i,u,l)=>{const d=t.get(i,tv,l);return d!==tv||u===tv?d:e.get(i,u,l)}}}(e,l.injector):e,p=d.get(nw,Xl),m=d.get(RT,null),v=p.createRenderer(null,this.componentDef),b=this.componentDef.selectors[0][0]||"div",w=u?function Su(t,e,i){if(it(t))return t.selectRootElement(e,i===ur.ShadowDom);let u="string"==typeof e?t.querySelector(e):e;return u.textContent="",u}(v,u,this.componentDef.encapsulation):pa(p.createRenderer(null,this.componentDef),b,function VT(t){const e=t.toLowerCase();return"svg"===e?"http://www.w3.org/2000/svg":"math"===e?"http://www.w3.org/1998/MathML/":null}(b)),I=this.componentDef.onPush?576:528,A=function _(t,e){return{components:[],scheduler:t||Lc,clean:Ry,playerHandler:e||null,flags:0}}(),M=Ot(0,null,null,1,0,null,null,null,null,null),V=Cu(null,M,A,I,null,null,p,v,m,d);let Q,ne;oi(V);try{const ue=function g(t,e,i,u,l,d){const p=i[1];i[20]=t;const v=ba(p,20,2,"#host",null),b=v.mergedAttrs=e.hostAttrs;null!==b&&(xu(v,b,!0),null!==t&&(Ti(l,t,b),null!==v.classes&&ya(l,t,v.classes),null!==v.styles&&Hf(l,t,v.styles)));const w=u.createRenderer(t,e),I=Cu(i,Da(e),null,e.onPush?64:16,i[20],v,u,w,d||null,null);return p.firstCreatePass&&(yc(Qs(v,i),p,e.type),Up(p,v),sl(v,i.length,1)),Ca(i,I),i[20]=I}(w,this.componentDef,V,p,v);if(w)if(u)Ti(v,w,["ng-version",kT.full]);else{const{attrs:G,classes:be}=function gy(t){const e=[],i=[];let u=1,l=2;for(;u<t.length;){let d=t[u];if("string"==typeof d)2===l?""!==d&&e.push(d,t[++u]):8===l&&i.push(d);else{if(!Tr(l))break;l=d}u++}return{attrs:e,classes:i}}(this.componentDef.selectors[0]);G&&Ti(v,w,G),be&&be.length>0&&ya(v,w,be.join(" "))}if(ne=za(M,20),void 0!==i){const G=ne.projection=[];for(let be=0;be<this.ngContentSelectors.length;be++){const Ge=i[be];G.push(null!=Ge?Array.from(Ge):null)}}Q=function y(t,e,i,u,l){const d=i[1],p=function gs(t,e,i){const u=Se();t.firstCreatePass&&(i.providersResolver&&i.providersResolver(i),nd(t,u,e,To(t,e,1,null),i));const l=Wr(e,t,u.directiveStart,u);hn(l,e);const d=br(u,e);return d&&hn(d,e),l}(d,i,e);if(u.components.push(p),t[8]=p,l&&l.forEach(v=>v(p,e)),e.contentQueries){const v=Se();e.contentQueries(1,p,v.directiveStart)}const m=Se();return!d.firstCreatePass||null===e.hostBindings&&null===e.hostAttrs||(si(m.index),Au(i[1],m,0,m.directiveStart,m.directiveEnd,e),td(e,p)),p}(ue,this.componentDef,V,A,[D]),wa(M,V,null)}finally{zs()}return new HT(this.componentType,Q,Tl(ne,V),V,ne)}}class HT extends class AT{}{constructor(e,i,u,l,d){super(),this.location=u,this._rootLView=l,this._tNode=d,this.instance=i,this.hostView=this.changeDetectorRef=new LT(l),this.componentType=e}get injector(){return new Kr(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(e){this.hostView.onDestroy(e)}}class Sl{}const Al=new Map;class aw extends Sl{constructor(e,i){super(),this._parent=i,this._bootstrapComponents=[],this.injector=this,this.destroyCbs=[],this.componentFactoryResolver=new rw(this);const u=Kn(e);this._bootstrapComponents=di(u.bootstrap),this._r3Injector=So(e,i,[{provide:Sl,useValue:this},{provide:Id,useValue:this.componentFactoryResolver}],W(e)),this._r3Injector._resolveInjectorDefTypes(),this.instance=this.get(e)}get(e,i=Fn.THROW_IF_NOT_FOUND,u=Ve.Default){return e===Fn||e===Sl||e===al?this:this._r3Injector.get(e,i,u)}destroy(){const e=this._r3Injector;!e.destroyed&&e.destroy(),this.destroyCbs.forEach(i=>i()),this.destroyCbs=null}onDestroy(e){this.destroyCbs.push(e)}}class rv extends class qT{}{constructor(e){super(),this.moduleType=e,null!==Kn(e)&&function $T(t){const e=new Set;!function i(u){const l=Kn(u,!0),d=l.id;null!==d&&(function ow(t,e,i){if(e&&e!==i)throw new Error(`Duplicate module registered for ${t} - ${W(e)} vs ${W(e.name)}
1`)}(d,Al.get(d),u),Al.set(d,u));const p=di(l.imports);for(const m of p)e.has(m)||(e.add(m),i(m))}(t)}(e)}create(e){return new aw(this.moduleType,e)}}function iv(t){return e=>{setTimeout(t,void 0,e)}}const hr=class cS extends J{constructor(e=!1){super(),this.__isAsync=e}emit(e){super.next(e)}subscribe(e,i,u){var l,d,p;let m=e,v=i||(()=>null),b=u;if(e&&"object"==typeof e){const I=e;m=null===(l=I.next)||void 0===l?void 0:l.bind(I),v=null===(d=I.error)||void 0===d?void 0:d.bind(I),b=null===(p=I.complete)||void 0===p?void 0:p.bind(I)}this.__isAsync&&(v=iv(v),m&&(m=iv(m)),b&&(b=iv(b)));const w=super.subscribe({next:m,error:v,complete:b});return e instanceof z&&e.add(w),w}};Symbol;let Ts=(()=>{class t{}return t.__NG_ELEMENT_ID__=hS,t})();const fS=Ts,dS=class extends fS{constructor(e,i,u){super(),this._declarationLView=e,this._declarationTContainer=i,this.elementRef=u}createEmbeddedView(e){const i=this._declarationTContainer.tViews,u=Cu(this._declarationLView,i,e,16,null,i.declTNode,null,null,null,null);u[17]=this._declarationLView[this._declarationTContainer.index];const d=this._declarationLView[19];return null!==d&&(u[19]=d.createEmbeddedView(i)),wa(i,u,e),new Td(u)}};function hS(){return function yg(t,e){return 4&t.type?new dS(e,t,Tl(t,e)):null}(Se(),F())}let Fo=(()=>{class t{}return t.__NG_ELEMENT_ID__=pS,t})();function pS(){return function gw(t,e){let i;const u=e[t.index];if(Qn(u))i=u;else{let l;if(8&t.type)l=Rt(u);else{const d=e[11];l=d.createComment("");const p=br(t,e);Ri(d,$c(d,p),l,function cy(t,e){return it(t)?t.nextSibling(e):e.nextSibling}(d,p),!1)}e[t.index]=i=od(u,e,l,t),Ca(e,i)}return new hw(i,t,e)}(Se(),F())}const gS=Fo,hw=class extends gS{constructor(e,i,u){super(),this._lContainer=e,this._hostTNode=i,this._hostLView=u}get element(){return Tl(this._hostTNode,this._hostLView)}get injector(){return new Kr(this._hostTNode,this._hostLView)}get parentInjector(){const e=iu(this._hostTNode,this._hostLView);if(af(e)){const i=Si(e,this._hostLView),u=zr(e);return new Kr(i[1].data[u+8],i)}return new Kr(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){const i=pw(this._lContainer);return null!==i&&i[e]||null}get length(){return this._lContainer.length-10}createEmbeddedView(e,i,u){const l=e.createEmbeddedView(i||{});return this.insert(l,u),l}createComponent(e,i,u,l,d){const p=e&&!function Ys(t){return"function"==typeof t}(e);let m;if(p)m=i;else{const I=i||{};m=I.index,u=I.injector,l=I.projectableNodes,d=I.ngModuleRef}const v=p?e:new nv(an(e)),b=u||this.parentInjector;if(!d&&null==v.ngModule&&b){const I=b.get(Sl,null);I&&(d=I)}const w=v.create(b,l,void 0,d);return this.insert(w.hostView,m),w}insert(e,i){const u=e._lView,l=u[1];if(function $_(t){return Qn(t[3])}(u)){const w=this.indexOf(e);if(-1!==w)this.detach(w);else{const I=u[3],A=new hw(I,I[6],I[3]);A.detach(A.indexOf(e))}}const d=this._adjustIndex(i),p=this._lContainer;!function ay(t,e,i,u){const l=10+u,d=i.length;u>0&&(i[l-1][4]=e),u<d-10?(e[4]=i[l],df(i,10+u,e)):(i.push(e),e[4]=null),e[3]=i;const p=e[17];null!==p&&i!==p&&function uy(t,e){const i=t[9];e[16]!==e[3][3][16]&&(t[2]=!0),null===i?t[9]=[e]:i.push(e)}(p,e);const m=e[19];null!==m&&m.insertView(t),e[2]|=128}(l,u,p,d);const m=Uf(d,p),v=u[11],b=$c(v,p[7]);return null!==b&&function kf(t,e,i,u,l,d){u[0]=l,u[6]=e,hi(t,u,i,1,l,d)}(l,p[6],v,u,b,m),e.attachToViewContainerRef(),df(sv(p),d,e),e}move(e,i){return this.insert(e,i)}indexOf(e){const i=pw(this._lContainer);return null!==i?i.indexOf(e):-1}remove(e){const i=this._adjustIndex(e,-1),u=Lf(this._lContainer,i);u&&(Dc(sv(this._lContainer),i),ga(u[1],u))}detach(e){const i=this._adjustIndex(e,-1),u=Lf(this._lContainer,i);return u&&null!=Dc(sv(this._lContainer),i)?new Td(u):null}_adjustIndex(e,i=0){return null==e?this.length+i:e}};function pw(t){return t[8]}function sv(t){return t[8]||(t[8]=[])}function bg(...t){}const yv=new We("Application Initializer");let Nl=(()=>{class t{constructor(i){this.appInits=i,this.resolve=bg,this.reject=bg,this.initialized=!1,this.done=!1,this.donePromise=new Promise((u,l)=>{this.resolve=u,this.reject=l})}
1runInitializers(){if(this.initialized)return;const i=[],u=()=>{this.done=!0,this.resolve()};if(this.appInits)for(let l=0;l<this.appInits.length;l++){const d=this.appInits[l]();if(og(d))i.push(d);else if(R0(d)){const p=new Promise((m,v)=>{d.subscribe({complete:m,error:v})});i.push(p)}}Promise.all(i).then(()=>{u()}).catch(l=>{this.reject(l)}),0===i.length&&u(),this.initialized=!0}}return t.\u0275fac=function(i){return new(i||t)(Ke(yv,8))},t.\u0275prov=Xe({token:t,factory:t.\u0275fac}),t})();const Nd=new We("AppId"),zS={provide:Nd,useFactory:function $S(){return`${vv()}${vv()}${vv()}`},deps:[]};function vv(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const Lw=new We("Platform Initializer"),wg=new We("Platform ID"),WS=new We("appBootstrapListener");let KS=(()=>{class t{log(i){console.log(i)}warn(i){console.warn(i)}}return t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=Xe({token:t,factory:t.\u0275fac}),t})();const Ma=new We("LocaleId"),Vw=new We("DefaultCurrencyCode");class QS{constructor(e,i){this.ngModuleFactory=e,this.componentFactories=i}}let Bw=(()=>{class t{compileModuleSync(i){return new rv(i)}compileModuleAsync(i){return Promise.resolve(this.compileModuleSync(i))}compileModuleAndAllComponentsSync(i){const u=this.compileModuleSync(i),d=di(Kn(i).declarations).reduce((p,m)=>{const v=an(m);return v&&p.push(new nv(v)),p},[]);return new QS(u,d)}compileModuleAndAllComponentsAsync(i){return Promise.resolve(this.compileModuleAndAllComponentsSync(i))}clearCache(){}clearCacheFor(i){}getModuleId(i){}}return t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=Xe({token:t,factory:t.\u0275fac}),t})();const YS=(()=>Promise.resolve(0))();function _v(t){"undefined"==typeof Zone?YS.then(()=>{t&&t.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",t)}class pr{constructor({enableLongStackTrace:e=!1,shouldCoalesceEventChangeDetection:i=!1,shouldCoalesceRunChangeDetection:u=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new hr(!1),this.onMicrotaskEmpty=new hr(!1),this.onStable=new hr(!1),this.onError=new hr(!1),"undefined"==typeof Zone)throw new Error("In this configuration Angular requires Zone.js");Zone.assertZonePatched();const l=this;l._nesting=0,l._outer=l._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(l._inner=l._inner.fork(new Zone.TaskTrackingZoneSpec)),e&&Zone.longStackTraceZoneSpec&&(l._inner=l._inner.fork(Zone.longStackTraceZoneSpec)),l.shouldCoalesceEventChangeDetection=!u&&i,l.shouldCoalesceRunChangeDetection=u,l.lastRequestAnimationFrameId=-1,l.nativeRequestAnimationFrame=function ZS(){let t=mt.requestAnimationFrame,e=mt.cancelAnimationFrame;if("undefined"!=typeof Zone&&t&&e){const i=t[Zone.__symbol__("OriginalDelegate")];i&&(t=i);const u=e[Zone.__symbol__("OriginalDelegate")];u&&(e=u)}return{nativeRequestAnimationFrame:t,nativeCancelAnimationFrame:e}}().nativeRequestAnimationFrame,function tA(t){const e=()=>{!function eA(t){t.isCheckStableRunning||-1!==t.lastRequestAnimationFrameId||(t.lastRequestAnimationFrameId=t.nativeRequestAnimationFrame.call(mt,()=>{t.fakeTopEventTask||(t.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{t.lastRequestAnimationFrameId=-1,wv(t),t.isCheckStableRunning=!0,bv(t),t.isCheckStableRunning=!1},void 0,()=>{},()=>{})),t.fakeTopEventTask.invoke()}),wv(t))}(t)};t._inner=t._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(i,u,l,d,p,m)=>{try{return jw(t),i.invokeTask(l,d,p,m)}finally{(t.shouldCoalesceEventChangeDetection&&"eventTask"===d.type||t.shouldCoalesceRunChangeDetection)&&e(),Uw(t)}},onInvoke:(i,u,l,d,p,m,v)=>{try{return jw(t),i.invoke(l,d,p,m,v)}finally{t.shouldCoalesceRunChangeDetection&&e(),Uw(t)}},onHasTask:(i,u,l,d)=>{i.hasTask(l,d),u===l&&("microTask"==d.change?(t._hasPendingMicrotasks=d.microTask,wv(t),bv(t)):"macroTask"==d.change&&(t.hasPendingMacrotasks=d.macroTask))},onHandleError:(i,u,l,d)=>(i.handleError(l,d),t.runOutsideAngular(()=>t.onError.emit(d)),!1)})}(l)}static isInAngularZone(){return!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!pr.isInAngularZone())throw new Error("Expected to be in Angular Zone, but it is not!")}static assertNotInAngularZone(){if(pr.isInAngularZone())throw new Error("Expected to not be in Angular Zone, but it is!")}run(e,i,u){return this._inner.run(e,i,u)}runTask(e,i,u,l){const d=this._inner,p=d.scheduleEventTask("NgZoneEvent: "+l,e,XS,bg,bg);try{return d.runTask(p,i,u)}finally{d.cancelTask(p)}}runGuarded(e,i,u){return this._inner.runGuarded(e,i,u)}runOutsideAngular(e){return this._outer.run(e)}}const XS={};function bv(t){if(0==t._nesting&&!t.hasPendingMicrotasks&&!t.isStable)try{t._nesting++,t.onMicrotaskEmpty.emit(null)}finally{if(t._nesting--,!t.hasPendingMicrotasks)try{t.runOutsideAngular(()=>t.onStable.emit(null))}finally{t.isStable=!0}}}function wv(t){t.hasPendingMicrotasks=!!(t._hasPendingMicrotasks||(t.shouldCoalesceEventChangeDetection||t.shouldCoalesceRunChangeDetection)&&-1!==t.lastRequestAnimationFrameId)}function jw(t){t._nesting++,t.isStable&&(t.isStable=!1,t.onUnstable.emit(null))}function Uw(t){t._nesting--,bv(t)}class nA{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new hr,this.onMicrotaskEmpty=new hr,this.onStable=new hr,this.onError=ne
1w hr}run(e,i,u){return e.apply(i,u)}runGuarded(e,i,u){return e.apply(i,u)}runOutsideAngular(e){return e()}runTask(e,i,u,l){return e.apply(i,u)}}let Dv=(()=>{class t{constructor(i){this._ngZone=i,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,this._watchAngularEvents(),i.run(()=>{this.taskTrackingZone="undefined"==typeof Zone?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._didWork=!0,this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{pr.assertNotInAngularZone(),_v(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())_v(()=>{for(;0!==this._callbacks.length;){let i=this._callbacks.pop();clearTimeout(i.timeoutId),i.doneCb(this._didWork)}this._didWork=!1});else{let i=this.getPendingTasks();this._callbacks=this._callbacks.filter(u=>!u.updateCb||!u.updateCb(i)||(clearTimeout(u.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(i=>({source:i.source,creationLocation:i.creationLocation,data:i.data})):[]}addCallback(i,u,l){let d=-1;u&&u>0&&(d=setTimeout(()=>{this._callbacks=this._callbacks.filter(p=>p.timeoutId!==d),i(this._didWork,this.getPendingTasks())},u)),this._callbacks.push({doneCb:i,timeoutId:d,updateCb:l})}whenStable(i,u,l){if(l&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/plugins/task-tracking" loaded?');this.addCallback(i,u,l),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}findProviders(i,u,l){return[]}}return t.\u0275fac=function(i){return new(i||t)(Ke(pr))},t.\u0275prov=Xe({token:t,factory:t.\u0275fac}),t})(),Hw=(()=>{class t{constructor(){this._applications=new Map,Ev.addToWindow(this)}registerApplication(i,u){this._applications.set(i,u)}unregisterApplication(i){this._applications.delete(i)}unregisterAllApplications(){this._applications.clear()}getTestability(i){return this._applications.get(i)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(i,u=!0){return Ev.findTestabilityInTree(this,i,u)}}return t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=Xe({token:t,factory:t.\u0275fac}),t})();class rA{addToWindow(e){}findTestabilityInTree(e,i,u){return null}}let Ji,Ev=new rA;const Gw=new We("AllowMultipleToken");function qw(t,e,i=[]){const u=`Platform: ${e}`,l=new We(u);return(d=[])=>{let p=$w();if(!p||p.injector.get(Gw,!1))if(t)t(i.concat(d).concat({provide:l,useValue:!0}));else{const m=i.concat(d).concat({provide:l,useValue:!0},{provide:ul,useValue:"platform"});!function aA(t){if(Ji&&!Ji.destroyed&&!Ji.injector.get(Gw,!1))throw new ye(400,"");Ji=t.get(zw);const e=t.get(Lw,null);e&&e.forEach(i=>i())}(Fn.create({providers:m,name:u}))}return function uA(t){const e=$w();if(!e)throw new ye(401,"");return e}()}}function $w(){return Ji&&!Ji.destroyed?Ji:null}let zw=(()=>{class t{constructor(i){this._injector=i,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(i,u){const m=function cA(t,e){let i;return i="noop"===t?new nA:("zone.js"===t?void 0:t)||new pr({enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:!!(null==e?void 0:e.ngZoneEventCoalescing),shouldCoalesceRunChangeDetection:!!(null==e?void 0:e.ngZoneRunCoalescing)}),i}(u?u.ngZone:void 0,{ngZoneEventCoalescing:u&&u.ngZoneEventCoalescing||!1,ngZoneRunCoalescing:u&&u.ngZoneRunCoalescing||!1}),v=[{provide:pr,useValue:m}];return m.run(()=>{const b=Fn.create({providers:v,parent:this.injector,name:i.moduleType.name}),w=i.create(b),I=w.injector.get(hs,null);if(!I)throw new ye(402,"");return m.runOutsideAngular(()=>{const A=m.onError.subscribe({next:M=>{I.handleError(M)}});w.onDestroy(()=>{Cv(this._modules,w),A.unsubscribe()})}),function lA(t,e,i){try{const u=i();return og(u)?u.catch(l=>{throw e.runOutsideAngular(()=>t.handleError(l)),l}):u}catch(u){throw e.runOutsideAngular(()=>t.handleError(u)),u}}(I,m,()=>{const A=w.injector.get(Nl);
vendor: 11,980 bytes, line 1
1return A.runInitializers(),A.donePromise.then(()=>(function OI(t){ar(t,"Expected localeId to be defined"),"string"==typeof t&&(Mb=t.toLowerCase().replace(/_/g,"-"))}(w.injector.get(Ma,lg)||lg),this._moduleDoBootstrap(w),w))})})}bootstrapModule(i,u=[]){const l=Ww({},u);return function oA(t,e,i){const u=new rv(i);return Promise.resolve(u)}(0,0,i).then(d=>this.bootstrapModuleFactory(d,l))}_moduleDoBootstrap(i){const u=i.injector.get(Dg);if(i._bootstrapComponents.length>0)i._bootstrapComponents.forEach(l=>u.bootstrap(l));else{if(!i.instance.ngDoBootstrap)throw new ye(403,"");i.instance.ngDoBootstrap(u)}this._modules.push(i)}onDestroy(i){this._destroyListeners.push(i)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new ye(404,"");this._modules.slice().forEach(i=>i.destroy()),this._destroyListeners.forEach(i=>i()),this._destroyed=!0}get destroyed(){return this._destroyed}}return t.\u0275fac=function(i){return new(i||t)(Ke(Fn))},t.\u0275prov=Xe({token:t,factory:t.\u0275fac}),t})();function Ww(t,e){return Array.isArray(e)?e.reduce(Ww,t):Object.assign(Object.assign({},t),e)}let Dg=(()=>{class t{constructor(i,u,l,d,p){this._zone=i,this._injector=u,this._exceptionHandler=l,this._componentFactoryResolver=d,this._initStatus=p,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._stable=!0,this.componentTypes=[],this.components=[],this._onMicrotaskEmptySubscription=this._zone.onMicrotaskEmpty.subscribe({next:()=>{this._zone.run(()=>{this.tick()})}});const m=new me(b=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{b.next(this._stable),b.complete()})}),v=new me(b=>{let w;this._zone.runOutsideAngular(()=>{w=this._zone.onStable.subscribe(()=>{pr.assertNotInAngularZone(),_v(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,b.next(!0))})})});const I=this._zone.onUnstable.subscribe(()=>{pr.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{b.next(!1)}))});return()=>{w.unsubscribe(),I.unsubscribe()}});this.isStable=function $d(...t){let e=Number.POSITIVE_INFINITY,i=null,u=t[t.length-1];return X(u)?(i=t.pop(),t.length>1&&"number"==typeof t[t.length-1]&&(e=t.pop())):"number"==typeof u&&(e=t.pop()),null===i&&1===t.length&&t[0]instanceof me?t[0]:function En(t=Number.POSITIVE_INFINITY){return sn(on,t)}(e)(Uo(t,i))}(m,v.pipe(function R(){return t=>Ho()(function Va(t,e){return function(u){let l;if(l="function"==typeof t?t:function(){return t},"function"==typeof e)return u.lift(new x(l,e));const d=Object.create(u,Ns);return d.source=u,d.subjectFactory=l,d}}(N)(t))}()))}bootstrap(i,u){if(!this._initStatus.done)throw new ye(405,"");let l;l=i instanceof ew?i:this._componentFactoryResolver.resolveComponentFactory(i),this.componentTypes.push(l.componentType);const d=function sA(t){return t.isBoundToModule}(l)?void 0:this._injector.get(Sl),m=l.create(Fn.NULL,[],u||l.selector,d),v=m.location.nativeElement,b=m.injector.get(Dv,null),w=b&&m.injector.get(Hw);return b&&w&&w.registerApplication(v,b),m.onDestroy(()=>{this.detachView(m.hostView),Cv(this.components,m),w&&w.unregisterApplication(v)}),this._loadComponent(m),m}tick(){if(this._runningTick)throw new ye(101,"");try{this._runningTick=!0;for(let i of this._views)i.detectChanges()}catch(i){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(i))}finally{this._runningTick=!1}}attachView(i){const u=i;this._views.push(u),u.attachToAppRef(this)}detachView(i){const u=i;Cv(this._views,u),u.detachFromAppRef()}_loadComponent(i){this.attachView(i.hostView),this.tick(),this.components.push(i),this._injector.get(WS,[]).concat(this._bootstrapListeners).forEach(l=>l(i))}ngOnDestroy(){this._views.slice().forEach(i=>i.destroy()),this._onMicrotaskEmptySubscription.unsubscribe()}get viewCount(){return this._views.length}}return t.\u0275fac=function(i){return new(i||t)(Ke(pr),Ke(Fn),Ke(hs),Ke(Id),Ke(Nl))},t.\u0275prov=Xe({token:t,factory:t.\u0275fac}),t})();function Cv(t,e){const i=t.indexOf(e);i>-1&&t.splice(i,1)}let Qw=!0,Jw=!1;function Yw(){return Jw=!0,Qw}class rD{constructor(){}supports(e){return Is(e)}create(e){return new wA(e)}}const bA=(t,e)=>e;class wA{constructor(e){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=e||bA}forEachItem(e){let i;for(i=this._itHead;null!==i;i=i._next)e(i)}forEachOperation(e){let i=this._itHead,u=this._removalsHead,l=0,d=null;for(;i||u;){const p=!u||i&&i.currentIndex<oD(u,l,d)?i:u,m=oD(p,l,d),v=p.currentIndex;if(p===u)l--,u=u._nextRemoved;else if(i=i._next,null==p.previousIndex)l++;else{d||(d=[]);const b=m-l,w=v-l;if(b!=w){for(let A=0;A<b;A++){const M=A<d.length?d[A]:d[A]=0,V=M+A;w<=V&&V<b&&(d[A]=M+1)}d[p.previousIndex]=w-b}}m!==v&&e(p,m,v)}}forEachPreviousItem(e){let i;for(i=this._previousItHead;null!==i;i=i._nextPrevious)e(i)}forEachAddedItem(e){let i;for(i=this._additionsHead;null!==i;i=i._nextAdded)e(i)}forEachMovedItem(e){let i;for(i=this._movesHead;null!==i;i=i._nextMoved)e(i)}forEachRemovedItem(e){let i;for(i=this._removalsHead;null!==i;i=i._nextRemoved)e(i)}forEachIdentityChange(e){let i;for(i=this._identityChangesHead;null!==i;i=i._nextIdentityChange)e(i)}diff(e){if(null==e&&(e=[]),!Is(e))throw new ye(900,"");return this.check(e)?this:null}onDestroy(){}check(e){this._reset();let l,d,p,i=this._itHead,u=!1;if(Array.isArray(e)){this.length=e.length;for(let m=0;m<this.length;m++)d=e[m],p=this._trackByFn(m,d),null!==i&&Object.is(i.trackById,p)?(u&&(i=this._verifyReinsertion(i,d,p,m)),Object.is(i.item,d)||this._addIdentityChange(i,d)):(i=this._mismatch(i,d,p,m),u=!0),i=i._next}else l=0,function ng(t,e){if(Array.isArray(t))for(let i=0;i<t.length;i++)e(t[i]);else{const i=t[st()]();let u;for(;!(u=i.next()).done;)e(u.value)}}(e,m=>{p=this._trackByFn(l,m),null!==i&&Object.is(i.trackById,p)?(u&&(i=this._verifyReinsertion(i,m,p,l)),Object.is(i.item,m)||this._addIdentityChange(i,m)):(i=this._mismatch(i,m,p,l),u=!0),i=i._next,l++}),this.length=l;return this._truncate(i),this.collection=e,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let e;for(e=this._previousItHead=this._itHead;null!==e;e=e._next)e._nextPrevious=e._next;for(e=this._additionsHead;null!==e;e=e._nextAdded)e.previousIndex=e.currentIndex;for(this._additionsHead=this._additionsTail=null,e=this._movesHead;null!==e;e=e._nextMoved)e.previousIndex=e.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(e,i,u,l){let d;return null===e?d=this._itTail:(d=e._prev,this._remove(e)),null!==(e=null===this._unlinkedRecords?null:this._unlinkedRecords.get(u,null))?(Object.is(e.item,i)||this._addIdentityChange(e,i),this._reinsertAfter(e,d,l)):null!==(e=null===this._linkedRecords?null:this._linkedRecords.get(u,l))?(Object.is(e.item,i)||this._addIdentityChange(e,i),this._moveAfter(e,d,l)):e=this._addAfter(new DA(i,u),d,l),e}_verifyReinsertion(e,i,u,l){let d=null===this._unlinkedRecords?null:this._unlinkedRecords.get(u,null);return null!==d?e=this._reinsertAfter(d,e._prev,l):e.currentIndex!=l&&(e.currentIndex=l,this._addToMoves(e,l)),e}_truncate(e){for(;null!==e;){const i=e._next;this._addToRemovals(this._unlink(e)),e=i}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(e,i,u){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(e);const l=e._prevRemoved,d=e._nextRemoved;return null===l?this._removalsHead=d:l._nextRemoved=d,null===d?this._removalsTail=l:d._prevRemoved=l,this._insertAfter(e,i,u),this._addToMoves(e,u),e}_moveAfter(e,i,u){return this._unlink(e),this._insertAfter(e,i,u),this._addToMoves(e,u),e}_addAfter(e,i,u){return this._insertAfter(e,i,u),this._additionsTail=null===this._additionsTail?this._additionsHead=e:this._additionsTail._nextAdded=e,e}_insertAfter(e,i,u){const l=null===i?this._itHead:i._next;return e._next=l,e._prev=i,null===l?this._itTail=e:l._prev=e,null===i?this._itHead=e:i._next=e,null===this._linkedRecords&&(this._linkedRecords=new iD),this._linkedRecords.put(e),e.currentIndex=u,e}_remove(e){return this._addToRemovals(this._unlink(e))}_unlink(e){null!==this._linkedRecords&&this._linkedRecords.remove(e);const i=e._prev,u=e._next;return null===i?this._itHead=u:i._next=u,null===u?this._itTail=i:u._prev=i,e}_addToMoves(e,i){return e.previousIndex===i||(this._movesTail=null===this._movesTail?this._movesHead=e:this._movesTail._nextMoved=e),e}_addToRemovals(e){return null===this._unlinkedRecords&&(this._unlinkedRecords=new iD),this._unlinkedRecords.put(e),e.currentIndex=null,e._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=e,e._prevRemoved=null):(e._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=e),e}_addIdentityChange(e,i){return e.item=i,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=e:this._identityChangesTail._nextIdentityChange=e,e}}class DA{constructor(e,i){this.item=e,this.trackById=i,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}}class EA{constructor(){this._head=null,this._tail=null}add(e){null===this._head?(this._head=this._tail=e,e._nextDup=null,e._prevDup=null):(this._tail._nextDup=e,e._prevDup=this._tail,e._nextDup=null,this._tail=e)}get(e,i){let u;for(u=this._head;null!==u;u=u._nextDup)if((null===i||i<=u.currentIndex)&&Object.is(u.trackById,e))return u;return null}remove(e){const i=e._prevDup,u=e._nextDup;return null===i?this._head=u:i._nextDup=u,null===u?this._tail=i:u._prevDup=i,null===this._head}}class iD{constructor(){this.map=new Map}put(e){const i=e.trackById;let u=this.map.get(i);u||(u=new EA,this.map.set(i,u)),u.add(e)}get(e,i){const l=this.map.get(e);return l?l.get(e,i):null}remove(e){const i=e.trackById;return this.map.get(i).remove(e)&&this.map.delete(i),e}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function oD(t,e,i){const u=t.previousIndex;if(null===u)return u;let l=0;return i&&u<i.length&&(l=i[u]),u+e+l}class sD{constructor(){}supports(e){return e instanceof Map||dl(e)}create(){return new CA}}class CA{constructor(){this._records=new Map,this._mapHead=null,this._appendAfter=null,this._previousMapHead=null,this._changesHead=null,this._changesTail=null,this._additionsHead=null,this._additionsTail=null,this._removalsHead=null,this._removalsTail=null}get isDirty(){return null!==this._additionsHead||null!==this._changesHead||null!==this._removalsHead}forEachItem(e){let i;for(i=this._mapHead;null!==i;i=i._next)e(i)}forEachPreviousItem(e){let i;for(i=this._previousMapHead;null!==i;i=i._nextPrevious)e(i)}forEachChangedItem(e){let i;for(i=this._changesHead;null!==i;i=i._nextChanged)e(i)}forEachAddedItem(e){let i;for(i=this._additionsHead;null!==i;i=i._nextAdded)e(i)}forEachRemovedItem(e){let i;for(i=this._removalsHead;null!==i;i=i._nextRemoved)e(i)}diff(e){if(e){if(!(e instanceof Map||dl(e)))throw new ye(900,"")}else e=new Map;return this.check(e)?this:null}onDestroy(){}check(e){this._reset();let i=this._mapHead;
vendor: 3,143 bytes, line 1
1if(this._appendAfter=null,this._forEach(e,(u,l)=>{if(i&&i.key===l)this._maybeAddToChanges(i,u),this._appendAfter=i,i=i._next;else{const d=this._getOrCreateRecordForKey(l,u);i=this._insertBeforeOrAppend(i,d)}}),i){i._prev&&(i._prev._next=null),this._removalsHead=i;for(let u=i;null!==u;u=u._nextRemoved)u===this._mapHead&&(this._mapHead=null),this._records.delete(u.key),u._nextRemoved=u._next,u.previousValue=u.currentValue,u.currentValue=null,u._prev=null,u._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(e,i){if(e){const u=e._prev;return i._next=e,i._prev=u,e._prev=i,u&&(u._next=i),e===this._mapHead&&(this._mapHead=i),this._appendAfter=e,e}return this._appendAfter?(this._appendAfter._next=i,i._prev=this._appendAfter):this._mapHead=i,this._appendAfter=i,null}_getOrCreateRecordForKey(e,i){if(this._records.has(e)){const l=this._records.get(e);this._maybeAddToChanges(l,i);const d=l._prev,p=l._next;return d&&(d._next=p),p&&(p._prev=d),l._next=null,l._prev=null,l}const u=new IA(e);return this._records.set(e,u),u.currentValue=i,this._addToAdditions(u),u}_reset(){if(this.isDirty){let e;for(this._previousMapHead=this._mapHead,e=this._previousMapHead;null!==e;e=e._next)e._nextPrevious=e._next;for(e=this._changesHead;null!==e;e=e._nextChanged)e.previousValue=e.currentValue;for(e=this._additionsHead;null!=e;e=e._nextAdded)e.previousValue=e.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(e,i){Object.is(i,e.currentValue)||(e.previousValue=e.currentValue,e.currentValue=i,this._addToChanges(e))}_addToAdditions(e){null===this._additionsHead?this._additionsHead=this._additionsTail=e:(this._additionsTail._nextAdded=e,this._additionsTail=e)}_addToChanges(e){null===this._changesHead?this._changesHead=this._changesTail=e:(this._changesTail._nextChanged=e,this._changesTail=e)}_forEach(e,i){e instanceof Map?e.forEach(i):Object.keys(e).forEach(u=>i(e[u],u))}}class IA{constructor(e){this.key=e,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}}function aD(){return new xd([new rD])}let xd=(()=>{class t{constructor(i){this.factories=i}static create(i,u){if(null!=u){const l=u.factories.slice();i=i.concat(l)}return new t(i)}static extend(i){return{provide:t,useFactory:u=>t.create(i,u||aD()),deps:[[t,new lu,new ss]]}}find(i){const u=this.factories.find(l=>l.supports(i));if(null!=u)return u;throw new ye(901,"")}}return t.\u0275prov=Xe({token:t,providedIn:"root",factory:aD}),t})();function uD(){return new xl([new sD])}let xl=(()=>{class t{constructor(i){this.factories=i}static create(i,u){if(u){const l=u.factories.slice();i=i.concat(l)}return new t(i)}static extend(i){return{provide:t,useFactory:u=>t.create(i,u||uD()),deps:[[t,new lu,new ss]]}}find(i){const u=this.factories.find(d=>d.supports(i));if(u)return u;throw new ye(901,"")}}return t.\u0275prov=Xe({token:t,providedIn:"root",factory:uD}
1),t})();const TA=[new sD],AA=new xd([new rD]),MA=new xl(TA),NA=qw(null,"core",[{provide:wg,useValue:"unknown"},{provide:zw,deps:[Fn]},{provide:Hw,deps:[]},{provide:KS,deps:[]}]),RA=[{provide:Dg,useClass:Dg,deps:[pr,Fn,hs,Id,Nl]},{provide:BT,deps:[pr],useFactory:function kA(t){let e=[];return t.onStable.subscribe(()=>{for(;e.length;)e.pop()()}),function(i){e.push(i)}}},{provide:Nl,useClass:Nl,deps:[[new ss,yv]]},{provide:Bw,useClass:Bw,deps:[]},zS,{provide:xd,useFactory:function xA(){return AA},deps:[]},{provide:xl,useFactory:function FA(){return MA},deps:[]},{provide:Ma,useFactory:function OA(t){return t||function PA(){return"undefined"!=typeof $localize&&$localize.locale||lg}()},deps:[[new cu(Ma),new ss,new lu]]},{provide:Vw,useValue:"USD"}];let LA=(()=>{class t{constructor(i){}}return t.\u0275fac=function(i){return new(i||t)(Ke(Dg))},t.\u0275mod=ni({type:t}),t.\u0275inj=Hr({providers:RA}),t})(),Cg=null;function Uu(){return Cg}const Yi=new We("DocumentToken");var vn=(()=>((vn=vn||{})[vn.Zero=0]="Zero",vn[vn.One=1]="One",vn[vn.Two=2]="Two",vn[vn.Few=3]="Few",vn[vn.Many=4]="Many",vn[vn.Other=5]="Other",vn))();const JA=function Sb(t){return function Mr(t){const e=function MI(t){return t.toLowerCase().replace(/_/g,"-")}(t);let i=Ab(e);if(i)return i;const u=e.split("-")[0];if(i=Ab(u),i)return i;if("en"===u)return AI;throw new Error(`Missing locale data for the locale "${t}".`)}(t)[pe.PluralCase]};class Pg{}let IM=(()=>{class t extends Pg{constructor(i){super(),this.locale=i}getPluralCategory(i,u){switch(JA(u||this.locale)(i)){case vn.Zero:return"zero";case vn.One:return"one";case vn.Two:return"two";case vn.Few:return"few";case vn.Many:return"many";default:return"other"}}}return t.\u0275fac=function(i){return new(i||t)(Ke(Ma))},t.\u0275prov=Xe({token:t,factory:t.\u0275fac}),t})();function _D(t,e){e=encodeURIComponent(e);for(const i of t.split(";")){const u=i.indexOf("="),[l,d]=-1==u?[i,""]:[i.slice(0,u),i.slice(u+1)];if(l.trim()===e)return decodeURIComponent(d)}return null}class AM{constructor(e,i,u,l){this.$implicit=e,this.ngForOf=i,this.index=u,this.count=l}get first(){return 0===this.index}get last(){return this.index===this.count-1}get even(){return this.index%2==0}get odd(){return!this.even}}let Rg=(()=>{class t{constructor(i,u,l){this._viewContainer=i,this._template=u,this._differs=l,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForOf(i){this._ngForOf=i,this._ngForOfDirty=!0}set ngForTrackBy(i){this._trackByFn=i}get ngForTrackBy(){return this._trackByFn}set ngForTemplate(i){i&&(this._template=i)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const i=this._ngForOf;!this._differ&&i&&(this._differ=this._differs.find(i).create(this.ngForTrackBy))}if(this._differ){const i=this._differ.diff(this._ngForOf);i&&this._applyChanges(i)}}_applyChanges(i){const u=this._viewContainer;i.forEachOperation((l,d,p)=>{if(null==l.previousIndex)u.createEmbeddedView(this._template,new AM(l.item,this._ngForOf,-1,-1),null===p?void 0:p);else if(null==p)u.remove(null===d?void 0:d);else if(null!==d){const m=u.get(d);u.move(m,p),bD(m,l)}});for(let l=0,d=u.length;l<d;l++){const m=u.get(l).context;m.index=l,m.count=d,m.ngForOf=this._ngForOf}i.forEachIdentityChange(l=>{bD(u.get(l.currentIndex),l)})}static ngTemplateContextGuard(i,u){return!0}}return t.\u0275fac=function(i){return new(i||t)(ae(Fo),ae(Ts),ae(xd))},t.\u0275dir=Re({type:t,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"}}),t})();function bD(t,e){t.context.$implicit=e.item}let Hu=(()=>{class t{constructor(i,u){this._viewContainer=i,this._context=new MM,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=u}set ngIf(i){this._context.$implicit=this._context.ngIf=i,this._updateView()}set ngIfThen(i){wD("ngIfThen",i),this._thenTemplateRef=i,this._thenViewRef=null,this._updateView()}set ngIfElse(i){wD("ngIfElse",i),this._elseTemplateRef=i,this._elseViewRef=null,this._updateView()}
1_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(i,u){return!0}}return t.\u0275fac=function(i){return new(i||t)(ae(Fo),ae(Ts))},t.\u0275dir=Re({type:t,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"}}),t})();class MM{constructor(){this.$implicit=null,this.ngIf=null}}function wD(t,e){if(e&&!e.createEmbeddedView)throw new Error(`${t} must be a TemplateRef, but received '${W(e)}'.`)}let n1=(()=>{class t{}return t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=ni({type:t}),t.\u0275inj=Hr({providers:[{provide:Pg,useClass:IM}]}),t})();class TD{}class Uv extends class a1 extends class jA{}{constructor(){super(...arguments),this.supportsDOMEvents=!0}}{static makeCurrent(){!function BA(t){Cg||(Cg=t)}(new Uv)}onAndCancel(e,i,u){return e.addEventListener(i,u,!1),()=>{e.removeEventListener(i,u,!1)}}dispatchEvent(e,i){e.dispatchEvent(i)}remove(e){e.parentNode&&e.parentNode.removeChild(e)}createElement(e,i){return(i=i||this.getDefaultDocument()).createElement(e)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(e){return e.nodeType===Node.ELEMENT_NODE}isShadowRoot(e){return e instanceof DocumentFragment}getGlobalEventTarget(e,i){return"window"===i?window:"document"===i?e:"body"===i?e.body:null}getBaseHref(e){const i=function u1(){return Pd=Pd||document.querySelector("base"),Pd?Pd.getAttribute("href"):null}();return null==i?null:function c1(t){kg=kg||document.createElement("a"),kg.setAttribute("href",t);const e=kg.pathname;return"/"===e.charAt(0)?e:`/${e}`}(i)}resetBaseElement(){Pd=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return _D(document.cookie,e)}}let kg,Pd=null;const SD=new We("TRANSITION_ID"),f1=[{provide:yv,useFactory:function l1(t,e,i){return()=>{i.get(Nl).donePromise.then(()=>{const u=Uu(),l=e.querySelectorAll(`style[ng-transition="${t}"]`);for(let d=0;d<l.length;d++)u.remove(l[d])})}},deps:[SD,Yi,Fn],multi:!0}];class Hv{static init(){!function iA(t){Ev=t}(new Hv)}addToWindow(e){mt.getAngularTestability=(u,l=!0)=>{const d=e.findTestabilityInTree(u,l);if(null==d)throw new Error("Could not find testability for element.");return d},mt.getAllAngularTestabilities=()=>e.getAllTestabilities(),mt.getAllAngularRootElements=()=>e.getAllRootElements(),mt.frameworkStabilizers||(mt.frameworkStabilizers=[]),mt.frameworkStabilizers.push(u=>{const l=mt.getAllAngularTestabilities();let d=l.length,p=!1;const m=function(v){p=p||v,d--,0==d&&u(p)};l.forEach(function(v){v.whenStable(m)})})}findTestabilityInTree(e,i,u){if(null==i)return null;const l=e.getTestability(i);return null!=l?l:u?Uu().isShadowRoot(i)?this.findTestabilityInTree(e,i.host,!0):this.findTestabilityInTree(e,i.parentElement,!0):null}}let d1=(()=>{class t{build(){return new XMLHttpRequest}}return t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=Xe({token:t,factory:t.\u0275fac}),t})();const Lg=new We("EventManagerPlugins");let Vg=(()=>{class t{constructor(i,u){this._zone=u,this._eventNameToPlugin=new Map,i.forEach(l=>l.manager=this),this._plugins=i.slice().reverse()}addEventListener(i,u,l){return this._findPluginFor(u).addEventListener(i,u,l)}addGlobalEventListener(i,u,l){return this._findPluginFor(u).addGlobalEventListener(i,u,l)}getZone(){return this._zone}_findPluginFor(i){const u=this._eventNameToPlugin.get(i);if(u)return u;const l=this._plugins;for(let d=0;d<l.length;d++){const p=l[d];if(p.supports(i))return this._eventNameToPlugin.set(i,p),p}throw new Error(`No event manager plugin found for event ${i}`)}}return t.\u0275fac=function(i){return new(i||t)(Ke(Lg),Ke(pr))},t.\u0275prov=Xe({token:t,factory:t.\u0275fac}),t})();class AD{constructor(e){this._doc=e}addGlobalEventListener(e,i,u){const l=Uu().getGlobalEventTarget(this._doc,e);if(!l)throw new Error(`Unsupported event target ${l} for event ${i}`);return this.addEventListener(l,i,u)}}let MD=(()=>{class t{constructor(){this._stylesSet=new Set}addStyles(i){const u=new Set;
vendor: 6,552 bytes, line 1
1i.forEach(l=>{this._stylesSet.has(l)||(this._stylesSet.add(l),u.add(l))}),this.onStylesAdded(u)}onStylesAdded(i){}getAllStyles(){return Array.from(this._stylesSet)}}return t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=Xe({token:t,factory:t.\u0275fac}),t})(),Rd=(()=>{class t extends MD{constructor(i){super(),this._doc=i,this._hostNodes=new Map,this._hostNodes.set(i.head,[])}_addStylesToHost(i,u,l){i.forEach(d=>{const p=this._doc.createElement("style");p.textContent=d,l.push(u.appendChild(p))})}addHost(i){const u=[];this._addStylesToHost(this._stylesSet,i,u),this._hostNodes.set(i,u)}removeHost(i){const u=this._hostNodes.get(i);u&&u.forEach(ND),this._hostNodes.delete(i)}onStylesAdded(i){this._hostNodes.forEach((u,l)=>{this._addStylesToHost(i,l,u)})}ngOnDestroy(){this._hostNodes.forEach(i=>i.forEach(ND))}}return t.\u0275fac=function(i){return new(i||t)(Ke(Yi))},t.\u0275prov=Xe({token:t,factory:t.\u0275fac}),t})();function ND(t){Uu().remove(t)}const Gv={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},qv=/%COMP%/g;function Bg(t,e,i){for(let u=0;u<e.length;u++){let l=e[u];Array.isArray(l)?Bg(t,l,i):(l=l.replace(qv,t),i.push(l))}return i}function OD(t){return e=>{if("__ngUnwrap__"===e)return t;!1===t(e)&&(e.preventDefault(),e.returnValue=!1)}}let $v=(()=>{class t{constructor(i,u,l){this.eventManager=i,this.sharedStylesHost=u,this.appId=l,this.rendererByCompId=new Map,this.defaultRenderer=new zv(i)}createRenderer(i,u){if(!i||!u)return this.defaultRenderer;switch(u.encapsulation){case ur.Emulated:{let l=this.rendererByCompId.get(u.id);return l||(l=new v1(this.eventManager,this.sharedStylesHost,u,this.appId),this.rendererByCompId.set(u.id,l)),l.applyToHost(i),l}case 1:case ur.ShadowDom:return new _1(this.eventManager,this.sharedStylesHost,i,u);default:if(!this.rendererByCompId.has(u.id)){const l=Bg(u.id,u.styles,[]);this.sharedStylesHost.addStyles(l),this.rendererByCompId.set(u.id,this.defaultRenderer)}return this.defaultRenderer}}begin(){}end(){}}return t.\u0275fac=function(i){return new(i||t)(Ke(Vg),Ke(Rd),Ke(Nd))},t.\u0275prov=Xe({token:t,factory:t.\u0275fac}),t})();class zv{constructor(e){this.eventManager=e,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(e,i){return i?document.createElementNS(Gv[i]||i,e):document.createElement(e)}createComment(e){return document.createComment(e)}createText(e){return document.createTextNode(e)}appendChild(e,i){e.appendChild(i)}insertBefore(e,i,u){e&&e.insertBefore(i,u)}removeChild(e,i){e&&e.removeChild(i)}selectRootElement(e,i){let u="string"==typeof e?document.querySelector(e):e;if(!u)throw new Error(`The selector "${e}" did not match any elements`);return i||(u.textContent=""),u}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,i,u,l){if(l){i=l+":"+i;const d=Gv[l];d?e.setAttributeNS(d,i,u):e.setAttribute(i,u)}else e.setAttribute(i,u)}removeAttribute(e,i,u){if(u){const l=Gv[u];l?e.removeAttributeNS(l,i):e.removeAttribute(`${u}:${i}`)}else e.removeAttribute(i)}addClass(e,i){e.classList.add(i)}removeClass(e,i){e.classList.remove(i)}setStyle(e,i,u,l){l&(lr.DashCase|lr.Important)?e.style.setProperty(i,u,l&lr.Important?"important":""):e.style[i]=u}removeStyle(e,i,u){u&lr.DashCase?e.style.removeProperty(i):e.style[i]=""}setProperty(e,i,u){e[i]=u}setValue(e,i){e.nodeValue=i}listen(e,i,u){return"string"==typeof e?this.eventManager.addGlobalEventListener(e,i,OD(u)):this.eventManager.addEventListener(e,i,OD(u))}}class v1 extends zv{constructor(e,i,u,l){super(e),this.component=u;const d=Bg(l+"-"+u.id,u.styles,[]);i.addStyles(d),this.contentAttr=function g1(t){return"_ngcontent-%COMP%".replace(qv,t)}(l+"-"+u.id),this.hostAttr=function m1(t){return"_nghost-%COMP%".replace(qv,t)}(l+"-"+u.id)}applyToHost(e){super.setAttribute(e,this.hostAttr,"")}createElement(e,i){const u=super.createElement(e,i);return super.setAttribute(u,this.contentAttr,""),u}}class _1 extends zv{constructor(e,i,u,l){super(e),this.sharedStylesHost=i,this.hostEl=u,this.shadowRoot=u.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const d=Bg(l.id,l.styles,[]);for(let p=0;p<d.length;p++){const m=document.createElement("style");m.textContent=d[p],this.shadowRoot.appendChild(m)}}nodeOrShadowRoot(e){return e===this.hostEl?this.shadowRoot:e}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}appendChild(e,i){return super.appendChild(this.nodeOrShadowRoot(e),i)}insertBefore(e,i,u){return super.insertBefore(this.nodeOrShadowRoot(e),i,u)}removeChild(e,i){return super.removeChild(this.nodeOrShadowRoot(e),i)}parentNode(e){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(e)))}}let b1=(()=>{class t extends AD{constructor(i){super(i)}supports(i){return!0}addEventListener(i,u,l){return i.addEventListener(u,l,!1),()=>this.removeEventListener(i,u,l)}removeEventListener(i,u,l){return i.removeEventListener(u,l)}}return t.\u0275fac=function(i){return new(i||t)(Ke(Yi))},t.\u0275prov=Xe({token:t,factory:t.\u0275fac}),t})();const RD=["alt","control","meta","shift"],D1={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},kD={A:"1",B:"2",C:"3",D:"4",E:"5",F:"6",G:"7",H:"8",I:"9",J:"*",K:"+",M:"-",N:".",O:"/","`":"0","\x90":"NumLock"},E1={alt:t=>t.altKey,control:t=>t.ctrlKey,meta:t=>t.metaKey,shift:t=>t.shiftKey};let C1=(()=>{class t extends AD{constructor(i){super(i)}supports(i){return null!=t.parseEventName(i)}addEventListener(i,u,l){const d=t.parseEventName(u),p=t.eventCallback(d.fullKey,l,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Uu().onAndCancel(i,d.domEventName,p))}static parseEventName(i){const u=i.toLowerCase().split("."),l=u.shift();if(0===u.length||"keydown"!==l&&"keyup"!==l)return null;const d=t._normalizeKey(u.pop());let p="";if(RD.forEach(v=>{const b=u.indexOf(v);b>-1&&(u.splice(b,1),p+=v+".")}),p+=d,0!=u.length||0===d.length)return null;const m={};return m.domEventName=l,m.fullKey=p,m}static getEventFullKey(i){let u="",l=function I1(t){let e=t.key;if(null==e){if(e=t.keyIdentifier,null==e)return"Unidentified";e.startsWith("U+")&&(e=String.fromCharCode(parseInt(e.substring(2),16)),3===t.location&&kD.hasOwnProperty(e)&&(e=kD[e]))}return D1[e]||e}(i);return l=l.toLowerCase()," "===l?l="space":"."===l&&(l="dot"),RD.forEac
1h(d=>{d!=l&&E1[d](i)&&(u+=d+".")}),u+=l,u}static eventCallback(i,u,l){return d=>{t.getEventFullKey(d)===i&&l.runGuarded(()=>u(d))}}static _normalizeKey(i){return"esc"===i?"escape":i}}return t.\u0275fac=function(i){return new(i||t)(Ke(Yi))},t.\u0275prov=Xe({token:t,factory:t.\u0275fac}),t})();const M1=qw(NA,"browser",[{provide:wg,useValue:"browser"},{provide:Lw,useValue:function T1(){Uv.makeCurrent(),Hv.init()},multi:!0},{provide:Yi,useFactory:function A1(){return function ah(t){sc=t}(document),document},deps:[]}]),N1=[{provide:ul,useValue:"root"},{provide:hs,useFactory:function S1(){return new hs},deps:[]},{provide:Lg,useClass:b1,multi:!0,deps:[Yi,pr,wg]},{provide:Lg,useClass:C1,multi:!0,deps:[Yi]},{provide:$v,useClass:$v,deps:[Vg,Rd,Nd]},{provide:nw,useExisting:$v},{provide:MD,useExisting:Rd},{provide:Rd,useClass:Rd,deps:[Yi]},{provide:Dv,useClass:Dv,deps:[pr]},{provide:Vg,useClass:Vg,deps:[Lg,pr]},{provide:TD,useClass:d1,deps:[]}];let x1=(()=>{class t{constructor(i){if(i)throw new Error("BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module, import CommonModule instead.")}static withServerTransition(i){return{ngModule:t,providers:[{provide:Nd,useValue:i.appId},{provide:SD,useExisting:Nd},f1]}}}return t.\u0275fac=function(i){return new(i||t)(Ke(t,12))},t.\u0275mod=ni({type:t}),t.\u0275inj=Hr({providers:N1,imports:[n1,LA]}),t})();"undefined"!=typeof window&&window;class z1{constructor(e,i){this.predicate=e,this.thisArg=i}call(e,i){return i.subscribe(new W1(e,this.predicate,this.thisArg))}}class W1 extends le{constructor(e,i,u){super(e),this.predicate=i,this.thisArg=u,this.count=0}_next(e){let i;try{i=this.predicate.call(this.thisArg,e,this.count++)}catch(u){return void this.destination.error(u)}i&&this.destination.next(e)}}class BD{}class jD{}class As{constructor(e){this.normalizedNames=new Map,this.lazyUpdate=null,e?this.lazyInit="string"==typeof e?()=>{this.headers=new Map,e.split("\n").forEach(i=>{const u=i.indexOf(":");if(u>0){const l=i.slice(0,u),d=l.toLowerCase(),p=i.slice(u+1).trim();this.maybeSetNormalizedName(l,d),this.headers.has(d)?this.headers.get(d).push(p):this.headers.set(d,[p])}})}:()=>{this.headers=new Map,Object.keys(e).forEach(i=>{let u=e[i];const l=i.toLowerCase();"string"==typeof u&&(u=[u]),u.length>0&&(this.headers.set(l,u),this.maybeSetNormalizedName(i,l))})}:this.headers=new Map}has(e){return this.init(),this.headers.has(e.toLowerCase())}get(e){this.init();const i=this.headers.get(e.toLowerCase());return i&&i.length>0?i[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(e){return this.init(),this.headers.get(e.toLowerCase())||null}append(e,i){return this.clone({name:e,value:i,op:"a"})}set(e,i){return this.clone({name:e,value:i,op:"s"})}delete(e,i){return this.clone({name:e,value:i,op:"d"})}maybeSetNormalizedName(e,i){this.normalizedNames.has(i)||this.normalizedNames.set(i,e)}init(){this.lazyInit&&(this.lazyInit instanceof As?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(e=>this.applyUpdate(e)),this.lazyUpdate=null))}copyFrom(e){e.init(),Array.from(e.headers.keys()).forEach(i=>{this.headers.set(i,e.headers.get(i)),this.normalizedNames.set(i,e.normalizedNames.get(i))})}clone(e){const i=new As;return i.lazyInit=this.lazyInit&&this.lazyInit instanceof As?this.lazyInit:this,i.lazyUpdate=(this.lazyUpdate||[]).concat([e]),i}applyUpdate(e){const i=e.name.toLowerCase();switch(e.op){case"a":case"s":let u=e.value;if("string"==typeof u&&(u=[u]),0===u.length)return;this.maybeSetNormalizedName(e.name,i);const l=("a"===e.op?this.headers.get(i):void 0)||[];l.push(...u),this.headers.set(i,l);break;case"d":const d=e.value;if(d){let p=this.headers.get(i);if(!p)return;p=p.filter(m=>-1===d.indexOf(m)),0===p.length?(this.headers.delete(i),this.normalizedNames.delete(i)):this.headers.set(i,p)}else this.headers.delete(i),this.normalizedNames.delete(i)}}forEach(e){this.init(),Array.from(this.normalizedNames.keys()).forEach(i=>e(this.normalizedNames.get(i),this.headers.get(i)))}}class K1{encodeKey(e){return UD(e)}encodeValue(e){return UD(e)}decodeKey(e){return decodeURIComponent(e)}decodeValue(e){return decodeURIComponent(e)}}const J1=/%(\d[a-f0-9])/gi,Y1={40:"@","3A":":",24:"$","2C":",","3B":";","2B":"+","3D":"=","3F":"?","2F":"/"};function UD(t){return encodeURIComponent(t).replace(J1,(e,i)=>{var u;return null!==(u=Y1[i])&&void 0!==u?u:e})}function HD(t){return`${t}`}class xa{constructor(e={}){if(this.updates=null,this.cloneFrom=null,this.encoder=e.encoder||new K1,e.fromString){if(e.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function Q1(t,e){const i=new Map;return t.length>0&&t.replace(/^\?/,"").split("&").forEach(l=>{const d=l.indexOf("="),[p,m]=-1==d?[e.decodeKey(l),""]:[e.decodeKey(l.slice(0,d)),e.decodeValue(l.slice(d+1))],v=i.get(p)||[];v.push(m),i.set(p,v)}),i}(e.fromString,this.encoder)}else e.fromObject?(this.map=new Map,Object.keys(e.fromObject).forEach(i=>
1{const u=e.fromObject[i];this.map.set(i,Array.isArray(u)?u:[u])})):this.map=null}has(e){return this.init(),this.map.has(e)}get(e){this.init();const i=this.map.get(e);return i?i[0]:null}getAll(e){return this.init(),this.map.get(e)||null}keys(){return this.init(),Array.from(this.map.keys())}append(e,i){return this.clone({param:e,value:i,op:"a"})}appendAll(e){const i=[];return Object.keys(e).forEach(u=>{const l=e[u];Array.isArray(l)?l.forEach(d=>{i.push({param:u,value:d,op:"a"})}):i.push({param:u,value:l,op:"a"})}),this.clone(i)}set(e,i){return this.clone({param:e,value:i,op:"s"})}delete(e,i){return this.clone({param:e,value:i,op:"d"})}toString(){return this.init(),this.keys().map(e=>{const i=this.encoder.encodeKey(e);return this.map.get(e).map(u=>i+"="+this.encoder.encodeValue(u)).join("&")}).filter(e=>""!==e).join("&")}clone(e){const i=new xa({encoder:this.encoder});return i.cloneFrom=this.cloneFrom||this,i.updates=(this.updates||[]).concat(e),i}init(){null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(e=>this.map.set(e,this.cloneFrom.map.get(e))),this.updates.forEach(e=>{switch(e.op){case"a":case"s":const i=("a"===e.op?this.map.get(e.param):void 0)||[];i.push(HD(e.value)),this.map.set(e.param,i);break;case"d":if(void 0===e.value){this.map.delete(e.param);break}{let u=this.map.get(e.param)||[];const l=u.indexOf(HD(e.value));-1!==l&&u.splice(l,1),u.length>0?this.map.set(e.param,u):this.map.delete(e.param)}}}),this.cloneFrom=this.updates=null)}}class Z1{constructor(){this.map=new Map}set(e,i){return this.map.set(e,i),this}get(e){return this.map.has(e)||this.map.set(e,e.defaultValue()),this.map.get(e)}delete(e){return this.map.delete(e),this}has(e){return this.map.has(e)}keys(){return this.map.keys()}}function GD(t){return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer}function qD(t){return"undefined"!=typeof Blob&&t instanceof Blob}function $D(t){return"undefined"!=typeof FormData&&t instanceof FormData}class kd{constructor(e,i,u,l){let d;if(this.url=i,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=e.toUpperCase(),function X1(t){switch(t){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||l?(this.body=void 0!==u?u:null,d=l):d=u,d&&(this.reportProgress=!!d.reportProgress,this.withCredentials=!!d.withCredentials,d.responseType&&(this.responseType=d.responseType),d.headers&&(this.headers=d.headers),d.context&&(this.context=d.context),d.params&&(this.params=d.params)),this.headers||(this.headers=new As),this.context||(this.context=new Z1),this.params){const p=this.params.toString();if(0===p.length)this.urlWithParams=i;else{const m=i.indexOf("?");this.urlWithParams=i+(-1===m?"?":m<i.length-1?"&":"")+p}}else this.params=new xa,this.urlWithParams=i}serializeBody(){return null===this.body?null:GD(this.body)||qD(this.body)||$D(this.body)||function eN(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams}(this.body)||"string"==typeof this.body?this.body:this.body instanceof xa?this.body.toString():"object"==typeof this.body||"boolean"==typeof this.body||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()}detectContentTypeHeader(){return null===this.body||$D(this.body)?null:qD(this.body)?this.body.type||null:GD(this.body)?null:"string"==typeof this.body?"text/plain":this.body instanceof xa?"application/x-www-form-urlencoded;charset=UTF-8":"object"==typeof this.body||"number"==typeof this.body||"boolean"==typeof this.body?"application/json":null}clone(e={}){var i;const u=e.method||this.method,l=e.url||this.url,d=e.responseType||this.responseType,p=void 0!==e.body?e.body:this.body,m=void 0!==e.withCredentials?e.withCredentials:this.withCredentials,v=void 0!==e.reportProgress?e.reportProgress:this.reportProgress;let b=e.headers||this.headers,w=e.params||this.params;const I=null!==(i=e.context)&&void 0!==i?i:this.context;return void 0!==e.setHeaders&&(b=Object.keys(e.setHeaders).reduce((A,M)=>A.set(M,e.setHeaders[M]),b)),e.setParams&&(w=Object.keys(e.setParams).reduce((A,M)=>A.set(M,e.setParams[M]),w)),new kd(u,l,p,{params:w,headers:b,context:I,reportProgress:v,responseType:d,withCredentials:m})}}var bn=(()=>((bn=bn||{})[bn.Sent=0]="Sent",bn[bn.UploadProgress=1]="UploadProgress",bn[bn.ResponseHeader=2]="ResponseHeader",bn[bn.DownloadProgress=3]="DownloadProgress",bn[bn.Response=4]="Response",bn[bn.User=5]="User",bn))();class Kv{constructor(e,i=200,u="OK"){this.headers=e.headers||new As,this.status=void 0!==e.status?e.status:i,this.statusText=e.statusText||u,this.url=e.url||null,this.ok=this.status>=200&&this.status<300}}
vendor: 7,939 bytes, line 1
1class Qv extends Kv{constructor(e={}){super(e),this.type=bn.ResponseHeader}clone(e={}){return new Qv({headers:e.headers||this.headers,status:void 0!==e.status?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}}class jg extends Kv{constructor(e={}){super(e),this.type=bn.Response,this.body=void 0!==e.body?e.body:null}clone(e={}){return new jg({body:void 0!==e.body?e.body:this.body,headers:e.headers||this.headers,status:void 0!==e.status?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}}class zD extends Kv{constructor(e){super(e,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.message=this.status>=200&&this.status<300?`Http failure during parsing for ${e.url||"(unknown url)"}`:`Http failure response for ${e.url||"(unknown url)"}: ${e.status} ${e.statusText}`,this.error=e.error||null}}function Jv(t,e){return{body:e,headers:t.headers,context:t.context,observe:t.observe,params:t.params,reportProgress:t.reportProgress,responseType:t.responseType,withCredentials:t.withCredentials}}let Yv=(()=>{class t{constructor(i){this.handler=i}request(i,u,l={}){let d;if(i instanceof kd)d=i;else{let v,b;v=l.headers instanceof As?l.headers:new As(l.headers),l.params&&(b=l.params instanceof xa?l.params:new xa({fromObject:l.params})),d=new kd(i,u,void 0!==l.body?l.body:null,{headers:v,context:l.context,params:b,reportProgress:l.reportProgress,responseType:l.responseType||"json",withCredentials:l.withCredentials})}const p=function G1(...t){let e=t[t.length-1];return X(e)?(t.pop(),eo(t,e)):Uo(t)}(d).pipe(function q1(t,e){return sn(t,e,1)}(v=>this.handler.handle(v)));if(i instanceof kd||"events"===l.observe)return p;const m=p.pipe(function $1(t,e){return function(u){return u.lift(new z1(t,e))}}(v=>v instanceof jg));switch(l.observe||"body"){case"body":switch(d.responseType){case"arraybuffer":return m.pipe(fe(v=>{if(null!==v.body&&!(v.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return v.body}));case"blob":return m.pipe(fe(v=>{if(null!==v.body&&!(v.body instanceof Blob))throw new Error("Response is not a Blob.");return v.body}));case"text":return m.pipe(fe(v=>{if(null!==v.body&&"string"!=typeof v.body)throw new Error("Response is not a string.");return v.body}));default:return m.pipe(fe(v=>v.body))}case"response":return m;default:throw new Error(`Unreachable: unhandled observe type ${l.observe}}`)}}delete(i,u={}){return this.request("DELETE",i,u)}get(i,u={}){return this.request("GET",i,u)}head(i,u={}){return this.request("HEAD",i,u)}jsonp(i,u){return this.request("JSONP",i,{params:(new xa).append(u,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(i,u={}){return this.request("OPTIONS",i,u)}patch(i,u,l={}){return this.request("PATCH",i,Jv(l,u))}post(i,u,l={}){return this.request("POST",i,Jv(l,u))}put(i,u,l={}){return this.request("PUT",i,Jv(l,u))}}return t.\u0275fac=function(i){return new(i||t)(Ke(BD))},t.\u0275prov=Xe({token:t,factory:t.\u0275fac}),t})();class WD{constructor(e,i){this.next=e,this.interceptor=i}handle(e){return this.interceptor.intercept(e,this.next)}}const KD=new We("HTTP_INTERCEPTORS");let tN=(()=>{class t{intercept(i,u){return u.handle(i)}}return t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=Xe({token:t,factory:t.\u0275fac}),t})();const nN=/^\)\]\}',?\n/;let QD=(()=>{class t{constructor(i){this.xhrFactory=i}handle(i){if("JSONP"===i.method)throw new Error("Attempted to construct Jsonp request without HttpClientJsonpModule installed.");return new me(u=>{const l=this.xhrFactory.build();if(l.open(i.method,i.urlWithParams),i.withCredentials&&(l.withCredentials=!0),i.headers.forEach((M,V)=>l.setRequestHeader(M,V.join(","))),i.headers.has("Accept")||l.setRequestHeader("Accept","application/json, text/plain, */*"),!i.headers.has("Content-Type")){const M=i.detectContentTypeHeader();null!==M&&l.setRequestHeader("Content-Type",M)}if(i.responseType){const M=i.responseType.toLowerCase();l.responseType="json"!==M?M:"text"}const d=i.serializeBody();let p=null;const m=()=>{if(null!==p)return p;const M=1223===l.status?204:l.status,V=l.statusText||"OK",Q=new As(l.getAllResponseHeaders()),ne=function rN(t){return"responseURL"in t&&t.responseURL?t.responseURL:/^X-Request-URL:/m.test(t.getAllResponseHeaders())?t.getResponseHeader("X-Request-URL"):null}(l)||i.url;return p=new Qv({headers:Q,status:M,statusText:V,url:ne}),p},v=()=>{let{headers:M,status:V,statusText:Q,url:ne}=m(),ue=null;204!==V&&(ue=void 0===l.response?l.responseText:l.response),0===V&&(V=ue?200:0);let G=V>=200&&V<300;if("json"===i.responseType&&"string"==typeof ue){const be=ue;ue=ue.replace(nN,"");try{ue=""!==ue?JSON.parse(ue):null}catch(Ge){ue=be,G&&(G=!1,ue={error:Ge,text:ue})}}G?(u.next(new jg({body:ue,headers:M,status:V,statusText:Q,url:ne||void 0})),u.complete()):u.error(new zD({error:ue,headers:M,status:V,statusText:Q,url:ne||void 0}))},b=M=>{const{url:V}=m(),Q=new zD({error:M,status:l.status||0,statusText:l.statusText||"Unknown Error",url:V||void 0});u.error(Q)};let w=!1;const I=M=>{w||(u.next(m()),w=!0);let V={type:bn.DownloadProgress,loaded:M.loaded};M.lengthComputable&&(V.total=M.total),"text"===i.responseType&&!!l.responseText&&(V.partialText=l.responseText),u.next(V)},A=M=>{let V={type:bn.UploadProgress,loaded:M.loaded};M.lengthComputable&&(V.total=M.total),u.next(V)};return l.addEventListener("load",v),l.addEventListener("error",b),l.addEventListener("timeout",b),l.addEventListener("abort",b),i.reportProgress&&(l.addEventListener("progress",I),null!==d&&l.upload&&l.upload.addEventListener("progress",A)),l.send(d),u.next({type:bn.Sent}),()=>{l.removeEventListener("error",b),l.removeEventListener("abort",b),l.removeEventListener("load",v),l.removeEventListener("timeout",b),i.reportProgress&&(l.removeEventListener("progress",I),null!==d&&l.upload&&l.upload.removeEventListener("progress",A)),l.readyState!==l.DONE&&l.abort()}})}}return t.\u0275fac=function(i){return new(i||t)(Ke(TD))},t.\u0275prov=Xe({token:t,factory:t.\u0275fac}),t})();const Zv=new We("XSRF_COOKIE_NAME"),Xv=new We("XSRF_HEADER_NAME");class JD{}let iN=(()=>{class t{constructor(i,u,l){this.doc=i,this.platform=u,this.cookieName=l,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if("server"===this.platform)return null;const i=this.doc.cookie||"";return i!==this.lastCookieString&&(this.parseCount++,this.lastToken=_D(i,this.cookieName),this.lastCookieString=i),this.lastToken}}return t.\u0275fac=function(i){return new(i||t)(Ke(Yi),Ke(wg),Ke(Zv))},t.\u0275prov=Xe({token:t,factory:t.\u0275fac}),t})(),e_=(()=>{class t{constructor(i,u){this.tokenService=i,this.headerName=u}intercept(i,u){const l=i.url.toLowerCase();if("GET"===i.method||"HEAD"===i.method||l.startsWith("http://")||l.startsWith("https://"))return u.handle(i);const d=this.tokenService.getToken();return null!==d&&!i.headers.has(this.headerName)&&(i=i.clone({headers:i.headers.set(this.headerName,d)})),u.handle(i)}}return t.\u0275fac=function(i){return new(i||t)(Ke(JD),Ke(Xv))},t.\u0275prov=Xe({token:t,factory:t.\u0275fac}),t})(),oN=(()=>{class t{constructor(i,u){this.backend=i,this.injector=u,this.chain=null}handle(i){if(null===this.chain){const u=this.injector.get(KD,[]);this.chain=u.reduceRight((l,d)=>new WD(l,d),this.backend)}return this.chain.handle(i)}}return t.\u0275fac=function(i){return new(i||t)(Ke(jD),Ke(Fn))},t.\u0275prov=Xe({token:t,factory:t.\u0275fac}),t})(),sN=(()=>{class t{static disable(){return{ngModule:t,providers:[{provide:e_,useClass:tN}]}}static withOptions(i={}){return{ngModule:t,providers:[i.cookieName?{provide:Zv,useValue:i.cookieName}:[],i.headerName?{provide:Xv,useValue:i.headerName}:[]]}}}return t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=ni({type:t}),t.\u0275inj=Hr({providers:[e_,{provide:KD,useExisting:e_,multi:!0},{provide:JD,useClass:iN},{provide:Zv,useValue:"XSRF-TOKEN"},{provide:Xv,useValue:"X-XSRF-TOKEN"}
1]}),t})(),aN=(()=>{class t{}return t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=ni({type:t}),t.\u0275inj=Hr({providers:[Yv,{provide:BD,useClass:oN},QD,{provide:jD,useExisting:QD}],imports:[[sN.withOptions({cookieName:"XSRF-TOKEN",headerName:"X-XSRF-TOKEN"})]]}),t})();function Ug(t,e){return new me(i=>{const u=t.length;if(0===u)return void i.complete();const l=new Array(u);let d=0,p=0;for(let m=0;m<u;m++){const v=Je(t[m]);let b=!1;i.add(v.subscribe({next:w=>{b||(b=!0,p++),l[m]=w},error:w=>i.error(w),complete:()=>{d++,(d===u||!b)&&(p===u&&i.next(e?e.reduce((w,I,A)=>(w[I]=l[A],w),{}):l),i.complete())}}))}})}let YD=(()=>{class t{constructor(i,u){this._renderer=i,this._elementRef=u,this.onChange=l=>{},this.onTouched=()=>{}}setProperty(i,u){this._renderer.setProperty(this._elementRef.nativeElement,i,u)}registerOnTouched(i){this.onTouched=i}registerOnChange(i){this.onChange=i}setDisabledState(i){this.setProperty("disabled",i)}}return t.\u0275fac=function(i){return new(i||t)(ae(Bu),ae(Qi))},t.\u0275dir=Re({type:t}),t})(),Gu=(()=>{class t extends YD{}return t.\u0275fac=function(){let e;return function(u){return(e||(e=function Zn(t){return ti(()=>{const e=t.prototype.constructor,i=e[Wn]||vc(e),u=Object.prototype;let l=Object.getPrototypeOf(t.prototype).constructor;for(;l&&l!==u;){const d=l[Wn]||vc(l);if(d&&d!==i)return d;l=Object.getPrototypeOf(l)}return d=>new d})}(t)))(u||t)}}(),t.\u0275dir=Re({type:t,features:[S]}),t})();const Oo=new We("NgValueAccessor"),lN={provide:Oo,useExisting:Te(()=>Hg),multi:!0},dN=new We("CompositionEventMode");let Hg=(()=>{class t extends YD{constructor(i,u,l){super(i,u),this._compositionMode=l,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function fN(){const t=Uu()?Uu().getUserAgent():"";return/android (\d+)/.test(t.toLowerCase())}())}writeValue(i){this.setProperty("value",null==i?"":i)}_handleInput(i){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(i)}_compositionStart(){this._composing=!0}_compositionEnd(i){this._composing=!1,this._compositionMode&&this.onChange(i)}}return t.\u0275fac=function(i){return new(i||t)(ae(Bu),ae(Qi),ae(dN,8))},t.\u0275dir=Re({type:t,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(i,u){1&i&&Ar("input",function(d){return u._handleInput(d.target.value)})("blur",function(){return u.onTouched()})("compositionstart",function(){return u._compositionStart()})("compositionend",function(d){return u._compositionEnd(d.target.value)})},features:[Ct([lN]),S]}),t})();const gr=new We("NgValidators"),Oa=new We("NgAsyncValidators");function uE(t){return null!=t}function cE(t){const e=og(t)?Je(t):t;return R0(e),e}function lE(t){let e={};return t.forEach(i=>{e=null!=i?Object.assign(Object.assign({},e),i):e}),0===Object.keys(e).length?null:e}function fE(t,e){return e.map(i=>i(t))}function dE(t){return t.map(e=>function pN(t){return!t.validate}(e)?e:i=>e.validate(i))}function t_(t){return null!=t?function hE(t){if(!t)return null;const e=t.filter(uE);return 0==e.length?null:function(i){return lE(fE(i,e))}}(dE(t)):null}function n_(t){return null!=t?function pE(t){if(!t)return null;const e=t.filter(uE);return 0==e.length?null:function(i){return function uN(...t){if(1===t.length){const e=t[0];if(Or(e))return Ug(e,null);if(rn(e)&&Object.getPrototypeOf(e)===Object.prototype){const i=Object.keys(e);
1return Ug(i.map(u=>e[u]),i)}}if("function"==typeof t[t.length-1]){const e=t.pop();return Ug(t=1===t.length&&Or(t[0])?t[0]:t,null).pipe(fe(i=>e(...i)))}return Ug(t,null)}(fE(i,e).map(cE)).pipe(fe(lE))}}(dE(t)):null}function gE(t,e){return null===t?[e]:Array.isArray(t)?[...t,e]:[t,e]}function r_(t){return t?Array.isArray(t)?t:[t]:[]}function Gg(t,e){return Array.isArray(t)?t.includes(e):t===e}function vE(t,e){const i=r_(e);return r_(t).forEach(l=>{Gg(i,l)||i.push(l)}),i}function _E(t,e){return r_(e).filter(i=>!Gg(t,i))}class bE{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(e){this._rawValidators=e||[],this._composedValidatorFn=t_(this._rawValidators)}_setAsyncValidators(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=n_(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(e){this._onDestroyCallbacks.push(e)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(e=>e()),this._onDestroyCallbacks=[]}reset(e){this.control&&this.control.reset(e)}hasError(e,i){return!!this.control&&this.control.hasError(e,i)}getError(e,i){return this.control?this.control.getError(e,i):null}}class Pa extends bE{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class xr extends bE{get formDirective(){return null}get path(){return null}}class wE{constructor(e){this._cd=e}is(e){var i,u,l;return"submitted"===e?!!(null===(i=this._cd)||void 0===i?void 0:i.submitted):!!(null===(l=null===(u=this._cd)||void 0===u?void 0:u.control)||void 0===l?void 0:l[e])}}let DE=(()=>{class t extends wE{constructor(i){super(i)}}return t.\u0275fac=function(i){return new(i||t)(ae(Pa,2))},t.\u0275dir=Re({type:t,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(i,u){2&i&&ag("ng-untouched",u.is("untouched"))("ng-touched",u.is("touched"))("ng-pristine",u.is("pristine"))("ng-dirty",u.is("dirty"))("ng-valid",u.is("valid"))("ng-invalid",u.is("invalid"))("ng-pending",u.is("pending"))},features:[S]}),t})(),EE=(()=>{class t extends wE{constructor(i){super(i)}}return t.\u0275fac=function(i){return new(i||t)(ae(xr,10))},t.\u0275dir=Re({type:t,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(i,u){2&i&&ag("ng-untouched",u.is("untouched"))("ng-touched",u.is("touched"))("ng-pristine",u.is("pristine"))("ng-dirty",u.is("dirty"))("ng-valid",u.is("valid"))("ng-invalid",u.is("invalid"))("ng-pending",u.is("pending"))("ng-submitted",u.is("submitted"))},features:[S]}),t})();function Vd(t,e){s_(t,e),e.valueAccessor.writeValue(t.value),function DN(t,e){e.valueAccessor.registerOnChange(i=>{t._pendingValue=i,t._pendingChange=!0,t._pendingDirty=!0,"change"===t.updateOn&&IE(t,e)})}(t,e),function CN(t,e){const i=(u,l)=>{e.valueAccessor.writeValue(u),l&&e.viewToModelUpdate(u)};t.registerOnChange(i),e._registerOnDestroy(()=>{t._unregisterOnChange(i)})}(t,e),function EN(t,e){e.valueAccessor.registerOnTouched(()=>{t._pendingTouched=!0,"blur"===t.updateOn&&t._pendingChange&&IE(t,e),"submit"!==t.updateOn&&t.markAsTouched()})}(t,e),function wN(t,e){if(e.valueAccessor.setDisabledState){const i=u=>{e.valueAccessor.setDisabledState(u)};t.registerOnDisabledChange(i),e._registerOnDestroy(()=>{t._unregisterOnDisabledChange(i)})}}(t,e)}function Wg(t,e){t.forEach(i=>
1{i.registerOnValidatorChange&&i.registerOnValidatorChange(e)})}function s_(t,e){const i=function mE(t){return t._rawValidators}(t);null!==e.validator?t.setValidators(gE(i,e.validator)):"function"==typeof i&&t.setValidators([i]);const u=function yE(t){return t._rawAsyncValidators}(t);null!==e.asyncValidator?t.setAsyncValidators(gE(u,e.asyncValidator)):"function"==typeof u&&t.setAsyncValidators([u]);const l=()=>t.updateValueAndValidity();Wg(e._rawValidators,l),Wg(e._rawAsyncValidators,l)}function IE(t,e){t._pendingDirty&&t.markAsDirty(),t.setValue(t._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(t._pendingValue),t._pendingChange=!1}function Qg(t,e){const i=t.indexOf(e);i>-1&&t.splice(i,1)}const Bd="VALID",Jg="INVALID",Fl="PENDING",jd="DISABLED";function l_(t){return(d_(t)?t.validators:t)||null}function AE(t){return Array.isArray(t)?t_(t):t||null}function f_(t,e){return(d_(e)?e.asyncValidators:t)||null}function ME(t){return Array.isArray(t)?n_(t):t||null}function d_(t){return null!=t&&!Array.isArray(t)&&"object"==typeof t}const h_=t=>t instanceof g_;function xE(t){return(t=>t instanceof PE)(t)?t.value:t.getRawValue()}function FE(t,e){const i=h_(t),u=t.controls;if(!(i?Object.keys(u):u).length)throw new ye(1e3,"");if(!u[e])throw new ye(1001,"")}function OE(t,e){h_(t),t._forEachChild((u,l)=>{if(void 0===e[l])throw new ye(1002,"")})}class p_{constructor(e,i){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=!1,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._rawValidators=e,this._rawAsyncValidators=i,this._composedValidatorFn=AE(this._rawValidators),this._composedAsyncValidatorFn=ME(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn}set validator(e){this._rawValidators=this._composedValidatorFn=e}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(e){this._rawAsyncValidators=this._composedAsyncValidatorFn=e}get parent(){return this._parent}get valid(){return this.status===Bd}get invalid(){return this.status===Jg}get pending(){return this.status==Fl}get disabled(){return this.status===jd}get enabled(){return this.status!==jd}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(e){this._rawValidators=e,this._composedValidatorFn=AE(e)}setAsyncValidators(e){this._rawAsyncValidators=e,this._composedAsyncValidatorFn=ME(e)}addValidators(e){this.setValidators(vE(e,this._rawValidators))}addAsyncValidators(e){this.setAsyncValidators(vE(e,this._rawAsyncValidators))}removeValidators(e){this.setValidators(_E(e,this._rawValidators))}removeAsyncValidators(e){this.setAsyncValidators(_E(e,this._rawAsyncValidators))}hasValidator(e){return Gg(this._rawValidators,e)}hasAsyncValidator(e){return Gg(this._rawAsyncValidators,e)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(e={}){this.touched=!0,this._parent&&!e.onlySelf&&this._parent.markAsTouched(e)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(e=>e.markAllAsTouched())}markAsUntouched(e={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(i=>{i.markAsUntouched({onlySelf:!0})}),this._parent&&!e.onlySelf&&this._parent._updateTouched(e)}
1markAsDirty(e={}){this.pristine=!1,this._parent&&!e.onlySelf&&this._parent.markAsDirty(e)}markAsPristine(e={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(i=>{i.markAsPristine({onlySelf:!0})}),this._parent&&!e.onlySelf&&this._parent._updatePristine(e)}markAsPending(e={}){this.status=Fl,!1!==e.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!e.onlySelf&&this._parent.markAsPending(e)}disable(e={}){const i=this._parentMarkedDirty(e.onlySelf);this.status=jd,this.errors=null,this._forEachChild(u=>{u.disable(Object.assign(Object.assign({},e),{onlySelf:!0}))}),this._updateValue(),!1!==e.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(Object.assign(Object.assign({},e),{skipPristineCheck:i})),this._onDisabledChange.forEach(u=>u(!0))}enable(e={}){const i=this._parentMarkedDirty(e.onlySelf);this.status=Bd,this._forEachChild(u=>{u.enable(Object.assign(Object.assign({},e),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors(Object.assign(Object.assign({},e),{skipPristineCheck:i})),this._onDisabledChange.forEach(u=>u(!1))}_updateAncestors(e){this._parent&&!e.onlySelf&&(this._parent.updateValueAndValidity(e),e.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(e){this._parent=e}updateValueAndValidity(e={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===Bd||this.status===Fl)&&this._runAsyncValidator(e.emitEvent)),!1!==e.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.updateValueAndValidity(e)}_updateTreeValidity(e={emitEvent:!0}){this._forEachChild(i=>i._updateTreeValidity(e)),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?jd:Bd}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e){if(this.asyncValidator){this.status=Fl,this._hasOwnPendingAsyncValidator=!0;const i=cE(this.asyncValidator(this));this._asyncValidationSubscription=i.subscribe(u=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(u,{emitEvent:e})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(e,i={}){this.errors=e,this._updateControlsErrors(!1!==i.emitEvent)}get(e){return function AN(t,e,i){if(null==e||(Array.isArray(e)||(e=e.split(i)),Array.isArray(e)&&0===e.length))return null;let u=t;return e.forEach(l=>{u=h_(u)?u.controls.hasOwnProperty(l)?u.controls[l]:null:(t=>t instanceof NN)(u)&&u.at(l)||null}),u}(this,e,".")}getError(e,i){const u=i?this.get(i):this;return u&&u.errors?u.errors[e]:null}hasError(e,i){return!!this.getError(e,i)}get root(){let e=this;for(;e._parent;)e=e._parent;return e}_updateControlsErrors(e){this.status=this._calculateStatus(),e&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(e)}_initObservables(){this.valueChanges=new hr,this.statusChanges=new hr}_calculateStatus(){return this._allControlsDisabled()?jd:this.errors?Jg:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Fl)?Fl:this._anyControlsHaveStatus(Jg)?Jg:Bd}_anyControlsHaveStatus(e){return this._anyControls(i=>i.status===e)}_anyControlsDirty(){return this._anyControls(e=>e.dirty)}_anyControlsTouched(){return this._anyControls(e=>e.touched)}_updatePristine(e={}){this.pristine=!this._anyControlsDirty(),this._parent&&!e.onlySelf&&this._parent._updatePristine(e)}_updateTouched(e={}){this.touched=this._anyControlsTouched(),this._parent&&!e.onlySelf&&this._parent._updateTouched(e)}_isBoxedValue(e){return"object"==typeof e&&null!==e&&2===Object.keys(e).length&&"value"in e&&"disabled"in e}_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){d_(e)&&null!=e.updateOn&&(this._updateOn=e.updateOn)}_parentMarkedDirty(e){return!e&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}}class PE extends p_{constructor(e=null,i,u){super(l_(i),f_(u,i)),this._onChange=[],this._pendingChange=!1,this._applyFormState(e),this._setUpdateStrategy(i),this._initOb
1servables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}setValue(e,i={}){this.value=this._pendingValue=e,this._onChange.length&&!1!==i.emitModelToViewChange&&this._onChange.forEach(u=>u(this.value,!1!==i.emitViewToModelChange)),this.updateValueAndValidity(i)}patchValue(e,i={}){this.setValue(e,i)}reset(e=null,i={}){this._applyFormState(e),this.markAsPristine(i),this.markAsUntouched(i),this.setValue(this.value,i),this._pendingChange=!1}_updateValue(){}_anyControls(e){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(e){this._onChange.push(e)}_unregisterOnChange(e){Qg(this._onChange,e)}registerOnDisabledChange(e){this._onDisabledChange.push(e)}_unregisterOnDisabledChange(e){Qg(this._onDisabledChange,e)}_forEachChild(e){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))}_applyFormState(e){this._isBoxedValue(e)?(this.value=this._pendingValue=e.value,e.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=e}}class g_ extends p_{constructor(e,i,u){super(l_(i),f_(u,i)),this.controls=e,this._initObservables(),this._setUpdateStrategy(i),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(e,i){return this.controls[e]?this.controls[e]:(this.controls[e]=i,i.setParent(this),i._registerOnCollectionChange(this._onCollectionChange),i)}addControl(e,i,u={}){this.registerControl(e,i),this.updateValueAndValidity({emitEvent:u.emitEvent}),this._onCollectionChange()}removeControl(e,i={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}setControl(e,i,u={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],i&&this.registerControl(e,i),this.updateValueAndValidity({emitEvent:u.emitEvent}),this._onCollectionChange()}contains(e){return this.controls.hasOwnProperty(e)&&this.controls[e].enabled}setValue(e,i={}){OE(this,e),Object.keys(e).forEach(u=>{FE(this,u),this.controls[u].setValue(e[u],{onlySelf:!0,emitEvent:i.emitEvent})}),this.updateValueAndValidity(i)}patchValue(e,i={}){null!=e&&(Object.keys(e).forEach(u=>{this.controls[u]&&this.controls[u].patchValue(e[u],{onlySelf:!0,emitEvent:i.emitEvent})}),this.updateValueAndValidity(i))}reset(e={},i={}){this._forEachChild((u,l)=>{u.reset(e[l],{onlySelf:!0,emitEvent:i.emitEvent})}),this._updatePristine(i),this._updateTouched(i),this.updateValueAndValidity(i)}getRawValue(){return this._reduceChildren({},(e,i,u)=>(e[u]=xE(i),e))}_syncPendingControls(){let e=this._reduceChildren(!1,(i,u)=>!!u._syncPendingControls()||i);return e&&this.updateValueAndValidity({onlySelf:!0}),e}_forEachChild(e){Object.keys(this.controls).forEach(i=>{const u=this.controls[i];u&&e(u,i)})}_setUpControls(){this._forEachChild(e=>{e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(e){for(const i of Object.keys(this.controls)){const u=this.controls[i];if(this.contains(i)&&e(u))return!0}return!1}_reduceValue(){return this._reduceChildren({},(e,i,u)=>((i.enabled||this.disabled)&&(e[u]=i.value),e))}_reduceChildren(e,i){let u=e;return this._forEachChild((l,d)=>{u=i(u,l,d)}),u}_allControlsDisabled(){for(const e of Object.keys(this.controls))if(this.controls[e].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}}class NN extends p_{constructor(e,i,u){super(l_(i),f_(u,i)),this.controls=e,this._initObservables(),this._setUpdateStrategy(i),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}at(e){return this.controls[e]}push(e,i={}){this.controls.push(e),this._registerControl(e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}insert(e,i,u={}){this.controls.splice(e,0,i),this._registerControl(i),this.updateV
1alueAndValidity({emitEvent:u.emitEvent})}removeAt(e,i={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),this.controls.splice(e,1),this.updateValueAndValidity({emitEvent:i.emitEvent})}setControl(e,i,u={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),this.controls.splice(e,1),i&&(this.controls.splice(e,0,i),this._registerControl(i)),this.updateValueAndValidity({emitEvent:u.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(e,i={}){OE(this,e),e.forEach((u,l)=>{FE(this,l),this.at(l).setValue(u,{onlySelf:!0,emitEvent:i.emitEvent})}),this.updateValueAndValidity(i)}patchValue(e,i={}){null!=e&&(e.forEach((u,l)=>{this.at(l)&&this.at(l).patchValue(u,{onlySelf:!0,emitEvent:i.emitEvent})}),this.updateValueAndValidity(i))}reset(e=[],i={}){this._forEachChild((u,l)=>{u.reset(e[l],{onlySelf:!0,emitEvent:i.emitEvent})}),this._updatePristine(i),this._updateTouched(i),this.updateValueAndValidity(i)}getRawValue(){return this.controls.map(e=>xE(e))}clear(e={}){this.controls.length<1||(this._forEachChild(i=>i._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:e.emitEvent}))}_syncPendingControls(){let e=this.controls.reduce((i,u)=>!!u._syncPendingControls()||i,!1);return e&&this.updateValueAndValidity({onlySelf:!0}),e}_forEachChild(e){this.controls.forEach((i,u)=>{e(i,u)})}_updateValue(){this.value=this.controls.filter(e=>e.enabled||this.disabled).map(e=>e.value)}_anyControls(e){return this.controls.some(i=>i.enabled&&e(i))}_setUpControls(){this._forEachChild(e=>this._registerControl(e))}_allControlsDisabled(){for(const e of this.controls)if(e.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(e){e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)}}const xN={provide:xr,useExisting:Te(()=>Yg)},Ud=(()=>Promise.resolve(null))();let Yg=(()=>{class t extends xr{constructor(i,u){super(),this.submitted=!1,this._directives=[],this.ngSubmit=new hr,this.form=new g_({},t_(i),n_(u))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(i){Ud.then(()=>{const u=this._findContainer(i.path);i.control=u.registerControl(i.name,i.control),Vd(i.control,i),i.control.updateValueAndValidity({emitEvent:!1}),this._directives.push(i)})}getControl(i){return this.form.get(i.path)}
1removeControl(i){Ud.then(()=>{const u=this._findContainer(i.path);u&&u.removeControl(i.name),Qg(this._directives,i)})}addFormGroup(i){Ud.then(()=>{const u=this._findContainer(i.path),l=new g_({});(function TE(t,e){s_(t,e)})(l,i),u.registerControl(i.name,l),l.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(i){Ud.then(()=>{const u=this._findContainer(i.path);u&&u.removeControl(i.name)})}getFormGroup(i){return this.form.get(i.path)}updateModel(i,u){Ud.then(()=>{this.form.get(i.path).setValue(u)})}setValue(i){this.control.setValue(i)}onSubmit(i){return this.submitted=!0,function SE(t,e){t._syncPendingControls(),e.forEach(i=>{const u=i.control;"submit"===u.updateOn&&u._pendingChange&&(i.viewToModelUpdate(u._pendingValue),u._pendingChange=!1)})}(this.form,this._directives),this.ngSubmit.emit(i),!1}onReset(){this.resetForm()}resetForm(i){this.form.reset(i),this.submitted=!1}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)}_findContainer(i){return i.pop(),i.length?this.form.get(i):this.form}}return t.\u0275fac=function(i){return new(i||t)(ae(gr,10),ae(Oa,10))},t.\u0275dir=Re({type:t,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(i,u){1&i&&Ar("submit",function(d){return u.onSubmit(d)})("reset",function(){return u.onReset()})},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Ct([xN]),S]}),t})();const ON={provide:Pa,useExisting:Te(()=>m_)},LE=(()=>Promise.resolve(null))();let m_=(()=>{class t extends Pa{constructor(i,u,l,d){super(),this.control=new PE,this._registered=!1,this.update=new hr,this._parent=i,this._setValidators(u),this._setAsyncValidators(l),this.valueAccessor=function u_(t,e){if(!e)return null;let i,u,l;return Array.isArray(e),e.forEach(d=>{d.constructor===Hg?i=d:function SN(t){return Object.getPrototypeOf(t.constructor)===Gu}(d)?u=d:l=d}),l||u||i||null}(0,d)}ngOnChanges(i){this._checkForErrors(),this._registered||this._setUpControl(),"isDisabled"in i&&this._updateDisabled(i),function a_(t,e){if(!t.hasOwnProperty("model"))return!1;const i=t.model;return!!i.isFirstChange()||!Object.is(e,i.currentValue)}(i,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._parent?function $g(t,e){return[...e.path,t]}(this.name,this._parent):[this.name]}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(i){this.viewModel=i,this.update.emit(i)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!(!this.options||!this.options.standalone)}_setUpStandalone(){Vd(this.control,this),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),this._isStandalone()}_updateValue(i){LE.then(()=>{this.control.setValue(i,{emitViewToModelChange:!1})})}_updateDisabled(i){const u=i.isDisabled.currentValue,l=""===u||u&&"false"!==u;LE.then(()=>{l&&!this.control.disabled?this.control.disable():!l&&this.control.disabled&&this.control.enable()})}}return t.\u0275fac=function(i){return new(i||t)(ae(xr,9),ae(gr,10),ae(Oa,10),ae(Oo,10))},t.\u0275dir=Re({type:t,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:["disabled","isDisabled"],model:["ngModel","model"],options:["ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[Ct([ON]),S,qr]}),t})(),VE=(()=>{class t{}return t.\u0275fac=function(i){return new(i||t)},t.\u0275dir=Re({type:t,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),t})(),jE=(()=>{class t{}return t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=ni({type:t}),t.\u0275inj=Hr({}),t})();const YN={provide:gr,useExisting:Te(()=>Zg),multi:!0};let Zg=(()=>{class t{constructor(){this._required=!1}get required(){return this._required}set required(i){this._required=null!=i&&!1!==i&&"false"!=`${i}`,this._onChange&&this._onChange()}validate(i){return this.required?function nE(t){return function Fa(t){return null==t||0===t.length}(t.value)?{required:!0}:null}(i):null}registerOnValidatorChange(i){this._onChange=i}}return t.\u0275fac=function(i){return new(i||t)},t.\u0275dir=Re({type:t,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(i,u){2&i&&Mo("required",u.required?"":null)},inputs:{required:"required"},features:[Ct([YN])]}),t})(),rx=(()=>{class t{}return t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=ni({type:t}),t.\u0275inj=Hr({imports:[[jE]]}),t})(),ix=(()=>{class t{}return t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=ni({type:t}),t.\u0275inj=Hr({imports:[rx]}),t})();var Po=St(655);class Gd{Messages(){}static handleServiceError(e){return console.error("An error occurred",e),Promise.reject(e.message||e)}static getContentUnavailableMessage(){return"Sorry! Content is unavailable now. Please, try again later."}}class Ol{static getAboutUuid(){return"287be8ac-5f09-40a8-ace3-bac12e2612ed"}static getFooterInformationUuid(){return"e56cf37f-9648-4df6-a584-21c326a757da"}static getAuthorUuid(){return"0d2e9d39-e119-446f-8115-a8af5108e279"}static getContactReceiverUuid(){return"a0cd7bcb-847a-416a-aaa7-5c9e9a780b3c"}
1static getPortfolioCategoryUuid(){return"0140d241-4eea-41c0-a843-55b1bfdba75a"}static getPortfolioJsonUuid(){return"cbf0d66a-bab5-45eb-8455-208eee89d7ad"}static getMediumServiceHostUuid(){return"3034b230-04e8-495a-add6-5ba7a1dad624"}}class iC{AssetsService(){}static getDefaultPortfolioImagePath(){return"/assets/portfolio/portfolio_default.png"}}class Ro{constructor(e){this.obj=e}static of(e){if(null==e)throw new Error("Object inserted to optional is NULL");return new Ro(e)}static fromNullable(e){return new Ro(e)}static absent(){return Ro.ABSENT}isPresent(){return null!=this.obj}get(){if(null==this.obj)throw new Error("Object in optional is NULL. Cannot get it.");return this.obj}}Ro.ABSENT=new Ro(null);class D_{constructor(e){this.contentDaos=e}findContentFileByContentUuidAndContentFileKey(e,i){const u=this.contentDaos.map(l=>l.findContentFileByContentUuidAndContentFileKey(e,i)).find(l=>l.isPresent());return null==u?Ro.absent():u}getContentDtos(){return this.contentDaos.flatMap(e=>e.getContentDtos())}}class Xg{constructor(e){this.contentDtos=e}findContentFileByContentUuidAndContentFileKey(e,i){const u=this.findByUuid(e);return u.isPresent()&&null!=u.get().contentFileDtos?Ro.fromNullable(u.get().contentFileDtos.find(l=>l.key===i)):Ro.absent()}getContentDtos(){return this.contentDtos}findByUuid(e){return Ro.fromNullable(this.contentDtos.find(i=>i.uuid===e))}}class ox{}class oC{}class sC{}class aC{}class sx{convert(e){return e.portfolioElements.sort((i,u)=>i.orderInContentCategory-u.orderInContentCategory).map(i=>{let u=new oC;return u.uuid=i.uuid,u.title=i.title,u.text=i.text,u.author=this.createAuthorDto(i.author),u.categoryUuid=i.category,u.contentFileDtos=this.createfileDtos(i.files),u.contentPropertyDtos=this.createPropertyDtos(i.properties),u})}createPropertyDtos(e){return e.sort((i,u)=>i.order-u.order).map(i=>{let u=new aC;return u.key=i.key,u.value=i.value,u.isLink=i.value.includes("http"),u})}createfileDtos(e){let i=[];return this.addFileDto("imageMax",e.imageMax,i),this.addFileDto("imageMin",e.imageMin,i),i}addFileDto(e,i,u){if(null!=i){let l=new sC;l.key=e,l.url=i,u.push(l)}}createAuthorDto(e){const i=new ox;return i.uuid=e,i}}class ax{constructor(e){let i=(new sx).convert(e);this.contentDao=new Xg(i)}findContentFileByContentUuidAndContentFileKey(e,i){return this.contentDao.findContentFileByContentUuidAndContentFileKey(e,i)}getContentDtos(){return this.contentDao.getContentDtos()}}var em=St(367);em.Z.registerVersion("firebase","8.10.0","app"),em.Z.SDK_VERSION="8.10.0",St(713);let tm=(()=>{class t{constructor(){t.initialized||(this.init(),t.initialized=!0)}init(){t.app=em.Z.initializeApp(t.FIREBASE_CONFIG)}getApp(){return t.app}getDatabase(){return em.Z.database(t.app)}getFirestore(){return null==t.firestore&&(t.firestore=t.app.firestore()),t.firestore}}return t.FIREBASE_CONFIG={apiKey:"AIzaSyAND2J26ZUIPZtISLZ1u9MSPbkgk6MybCQ",authDomain:"pablo127-webpage.firebaseapp.com",databaseURL:"https://pablo127-webpage.firebaseio.com",projectId:"pablo127-webpage",storageBucket:"pablo127-webpage.appspot.com",messagingSenderId:"435581750034",appId:"1:435581750034:web:64da6535838666209b41cb",measurementId:"G-18Y434T6L8"},t})();class cx{constructor(){const e=new tm;this.firestore=e.getFirestore()}getContent(e){return(0,Po.mG)(this,void 0,void 0,function*(){let i=yield this.firestore.doc("contentsJson/"+e).get();return yield this.toProperType(i)})}toProperType(e){let i=e.data().json;return JSON.parse(i)}}class cC{}let lx={provide:cC,useFactory:()=>new cx};class nm{}class fx{}class dx{createOrdered(e,i,u,l){let d=this.create(e,i,u,l),p=new fx;return p.contentDto=d,p.order=e.orderInContentCategory,p}create(e,i,u,l){const d=new oC;return d.uuid=l,d.title=e.title,d.text=e.text,d.categoryUuid=e.category,d.contentFileDtos=i,d.contentPropertyDtos=u,d}}class hx{create(e){let i=new sC;return i.key=e.key,i.url=e.url,i}}class px{constructor(){this.firestore=(new tm).getFirestore()}getFiles(e){return(0,Po.mG)(this,void 0,void 0,function*(){let i=yield this.firestore.collection("contents/"+e+"/files").get(),u=new hx,l=[];for(let d of i.docs){let p=d.data();l.push(u.create(p))}return l})}}class gx{create(e){return e.sort((u,l)=>u.order-l.order).map(u=>{let l=new aC;return l.key=u.key,l.value=u.value,l.isLink=u.value.includes("http"),l})}}class mx{constructor(){this.firestore=(new tm).getFirestore()}getProperties(e){return(0,Po.mG)(this,void 0,void 0,function*(){let u=(yield this.firestore.collection("contents/"+e+"/properties").get()).docs.map(l=>l.data());return(new gx).create(u)})}}class yx{constructor(){this.contentDtoMapper=new dx;const e=new tm;this.app=e.getApp(),this.firestore=e.getFirestore()}getListByAuthor(e){return(0,Po.mG)(this,void 0,void 0,function*(){let u=[];const l=(yield this.firestore.collection("contents").where("author","==",e).get()).docs;for(let d of l)u.push(yield this.toContentDto(d));return this.sortOrderedContentDtos(u)})}getListByCategory(e){return(0,Po.mG)(this,void 0,void 0,function*(){let i=yield this.app.firestore().collection("contents").where("category","==",e).get(),u=[];for(let l of i.docs)u.push(yield this.toContentDto(l));return this.sortOrderedContentDtos(u)})}getContent(e){return(0,Po.mG)(this,void 0,void 0,function*(){let i=yield this.firestore.doc("contents/"+e).get();return(yield this.toContentDto(i)).contentDto})}sortOrderedContentDtos(e){return e.sort((i,u)=>i.order-u.order).map(i=>i.contentDto)}toContentDto(e){return(0,Po.mG)(this,void 0,void 0,function*(){var i=e.data();let u=yield(new px).getFiles(e.id),l=yield(new mx).getProperties(e.id);return this.contentDtoMapper.createOrdered(i,u,l,e.id)})}}let rm={provide:nm,useFactory:()=>new yx};function vx(t,e){if(1&t&&(B(0,"div",5),B(1,"a",6),B(2,"div",7),B(3,"div",8),at(4,"i",9),j(),j(),at(5,"img",10),j(),j()),2&t){const i=e.$implicit,u=Pt(2);Oe(1),_d("href","#portfolio",i.uuid,"",rr),Oe(4),nt("src",u.getImageUrlForContentDto(i.uuid),rr)}}function _x(t,e){if(1&t&&(B(0,"div"),B(1,"section",1),B(2,"div",2),B(3,"div",3),Lt(4,vx,6,2,"div",4),j(),j(),j(),j()),2&t){const i=Pt();Oe(4),nt("ngForOf",i.contentDao.getContentDtos())}}function bx(t,e){if(1&t&&(B(0,"div"),B(1,"div",11),B(2,"div",12),B(3,"p"),et(4),j(),j(),j(),j()),2&t){const i=Pt();Oe(4),or(i.getContentUnavailableMessage())}}let lC=(()=>{class t{constructor(i,u){this.contentService=i,this.contentJsonService=u,this.contentDao=new Xg([])}static registerPortfolioContentListener(i){t.portfolioContentListeners[t.portfolioContentListeners.length]=i}ngOnInit(){console.info("Portfolio component start"),this.getContent()}isNoError(){return null==this.error}getContentUnavailableMessage(){return Gd.getContentUnavailableMessage()}getImageUrlForContentDto(i){const u=this.contentDao.findContentFileByContentUuidAndContentFileKey(i,t.IMAGE_KEY);return u.isPresent()?u.get().url:(console.warn("ContentFile was not found for Content with uuid "+i),iC.getDefaultPortfolioImagePath())}getContent(){return(0,Po.mG)(this,void 0,void 0,function*(){this.contentService.getListByCategory(Ol.getPortfolioCategoryUuid()).then(i=>this.refreshContentDtos(i)).catch(i=>this.error=i),this.contentJsonService.getContent(Ol.getPortfolioJsonUuid()).then(i=>this.refreshPortfolioElementsDto(i)).catch(i=>this.error=i)})}refreshPortfolioElementsDto(i){const u=new ax(i);this.contentDao=new D_([this.contentDao,u]),this.sendNewPortfolioContent()}refreshContentDtos(i){this.contentDao=new D_([this.contentDao,new Xg(i)]),this.sendNewPortfolioContent()}sendNewPortfolioContent(){console.info("Send dataChanged to  "+t.portfolioContentListeners.length+" listeners");for(let i=0;i<t.portfolioContentListeners.length;i++)t.portfolioContentListeners[i].dataChanged(this.contentDao)}}return t.IMAGE_KEY="imageMin",t.portfolioContentListeners=[],t.\u0275fac=function(i){return new(i||t)(ae(nm),ae(cC))},t.\u0275cmp=Gr({type:t,selectors:[["portfolio-component"]],features:[Ct([rm,lx])],decls:2,vars:2,consts:[[4,"ngIf"],["id","portfolio"],[1,"container"],[1,"row"],["class","col-sm-3 portfolio-item",4,"ngFor","ngForOf"],[1,"col-sm-3","portfolio-item"],["data-toggle","modal",1,"portfolio-link",3,"href"],[1,"caption"],[1,"caption-content"],[1,"fa","fa-search-plus","fa-3x"],["alt","",1,"img-fluid",3,"src"],[1,"center"],[1,"errorMessage"]],template:function(i,u){1&i&&(Lt(0,_x,5,1,"div",0),Lt(1,bx,5,1,"div",0)),2&i&&(nt("ngIf",u.isNoError()),Oe(1),nt("ngIf",!u.isNoError()))},directives:[Hu,Rg],encapsulation:2}),t})();function wx(t,e){if(1&t&&(B(0,"div",2),B(1,"div",3),B(2,"p"),et(3),j(),j(),B(4,"div",4),B(5,"p"),et(6),j(),j(),j()),2&t){const i=Pt();
1Oe(3),or(i.leftColumn),Oe(3),or(i.rightColumn)}}function Dx(t,e){if(1&t&&(B(0,"div",5),B(1,"div",6),B(2,"p"),et(3),j(),j(),j()),2&t){const i=Pt();Oe(3),or(i.getContentUnavailableMessage())}}let Ex=(()=>{class t{constructor(i){this.contentService=i}ngOnInit(){console.info("AboutComponent start"),this.getContent()}getContentUnavailableMessage(){return Gd.getContentUnavailableMessage()}isNoError(){return null==this.error}getContent(){return(0,Po.mG)(this,void 0,void 0,function*(){let i=yield this.contentService.getContent(Ol.getAboutUuid()).catch(u=>console.info("err2"+u));this.divideIntoColumns(i.text)})}divideIntoColumns(i){const u=i.indexOf(".",.4*i.length)+1;this.leftColumn=i.substring(0,u),this.rightColumn=i.substring(u)}}return t.\u0275fac=function(i){return new(i||t)(ae(nm))},t.\u0275cmp=Gr({type:t,selectors:[["about-component"]],features:[Ct([rm])],decls:2,vars:2,consts:[["class","row",4,"ngIf"],["class","center",4,"ngIf"],[1,"row"],[1,"col-lg-4","ml-auto"],[1,"col-lg-4","mr-auto"],[1,"center"],[1,"errorMessage"]],template:function(i,u){1&i&&(Lt(0,wx,7,2,"div",0),Lt(1,Dx,4,1,"div",1)),2&i&&(nt("ngIf",u.isNoError()),Oe(1),nt("ngIf",!u.isNoError()))},directives:[Hu],encapsulation:2}),t})();class fC{createPath(e){return this.getHostInfo().getHost()+this.getHostInfo().getModule()+this.getHostInfo().getController()+e}}class Cx{getHost(){return"http://medium.com/@pablo127?format=json"}getModule(){return""}getController(){return""}}let dC=(()=>{class t extends fC{constructor(i){super(),this.http=i,this.contentService=rm.useFactory()}getContent(i){return new me(u=>{this.http.post(this.createPath(""),'{"username":"'+i+'"}').subscribe(function(l){u.next(l),u.complete()},l=>{console.error(l),u.error(l),u.complete()})})}getPosts(i){let u=this.http;return new me(l=>{this.getMediumServiceHost().then(function(d){u.get(d+"/medium-service/blog-posts").subscribe(p=>{l.next(p.posts),l.complete()},p=>{console.error(p),l.error(p),l.complete()})}).catch(d=>{l.error(d),l.complete()})})}getHostInfo(){return new Cx}getMediumServiceHost(){return(0,Po.mG)(this,void 0,void 0,function*(){return(yield this.contentService.getContent(Ol.getMediumServiceHostUuid())).text})}}return t.\u0275fac=function(i){return new(i||t)(Ke(Yv))},t.\u0275prov=Xe({token:t,factory:t.\u0275fac}),t})();function Ix(t,e){if(1&t&&(B(0,"div"),B(1,"div",1),B(2,"div",2),B(3,"p"),et(4),j(),j(),j(),j()),2&t){const i=Pt();Oe(4),or(i.getContentUnavailableMessage())}}function Tx(t,e){1&t&&at(0,"li",12),2&t&&Mo("data-slide-to",e.index)}function Sx(t,e){if(1&t&&at(0,"img",18),2&t){const i=Pt().$implicit;sg("src",Pt(2).createPathToImage(i),rr)}}function Ax(t,e){if(1&t&&(B(0,"div"),B(1,"div",13),Lt(2,Sx,1,1,"img",14),j(),B(3,"div",15),B(4,"div",16),B(5,"h1"),et(6),j(),B(7,"p"),et(8),j(),B(9,"p"),B(10,"a",17),et(11,"Read more"),j(),j(),j(),j(),j()),2&t){const i=e.$implicit,u=Pt(2);tb(u.getClassesForPostDisplay(i)),Oe(2),nt("ngIf",null!=u.createPathToImage(i)),Oe(4),or(i.title),Oe(2),or(i.virtuals.subtitle),Oe(2),sg("href",u.createPathToPost(i),rr)}}function Mx(t,e){if(1&t&&(B(0,"div"),B(1,"div",3),B(2,"ol",4),Lt(3,Tx,1,1,"li",5),j(),Lt(4,Ax,12,6,"div",6),B(5,"a",7),at(6,"span",8),B(7,"span",9),et(8,"Previous"),j(),j(),B(9,"a",10),at(10,"span",11),B(11,"span",9),et(12,"Next"),j(),j(),j(),j()),2&t){const i=Pt();Oe(3),nt("ngForOf",i.posts),Oe(1),nt("ngForOf",i.posts)}}let Nx=(()=>{class t{constructor(i){this.mediumService=i,this.posts=new Array}ngOnInit(){console.info("BlogComponent start"),this.getContent()}getClassesForPostDisplay(i){return 0==this.posts.indexOf(i)?"carousel-item active":"carousel-item"}createPathToPost(i){return"https://plswiderski.medium.com/"+i.uniqueSlug}createPathToImage(i){const u=i.virtuals.previewImage.imageId;return null==u||void 0===u||0===u.length?null:u}isError(){return null!=this.error}getContentUnavailableMessage(){return console.error("Error "+this.error),Gd.getContentUnavailableMessage()}getContent(){this.mediumService.getPosts("pablo127").subscribe(i=>this.posts=i,i=>this.error=i)}}return t.\u0275fac=function(i){return new(i||t)(ae(dC))},t.\u0275cmp=Gr({type:t,selectors:[["blog-component"]],features:[Ct([dC])],decls:2,vars:2,consts:[[4,"ngIf"],[1,"center"],[1,"errorMessage"],["id","myCarousel","data-ride","carousel",1,"carousel","slide"],[1,"carousel-indicators"],["data-target","#myCarousel",4,"ngFor","ngForOf"],[3,"class",4,"ngFor","ngForOf"],["href","#myCarousel","role","button","data-sli
1de","prev",1,"carousel-control-prev"],["aria-hidden","true",1,"carousel-control-prev-icon"],[1,"sr-only"],["href","#myCarousel","role","button","data-slide","next",1,"carousel-control-next"],["aria-hidden","true",1,"carousel-control-next-icon"],["data-target","#myCarousel"],[2,"text-align","center"],["class","second-slide","style","opacity: 0.4; width:auto; height: 533px;",3,"src",4,"ngIf"],[1,"container"],[1,"carousel-caption","text-left"],["target","_blank","role","button",1,"btn","btn-lg","btn-primary",3,"href"],[1,"second-slide",2,"opacity","0.4","width","auto","height","533px",3,"src"]],template:function(i,u){1&i&&(Lt(0,Ix,5,1,"div",0),Lt(1,Mx,13,2,"div",0)),2&i&&(nt("ngIf",u.isError()),Oe(1),nt("ngIf",!u.isError()))},directives:[Hu,Rg],encapsulation:2}),t})();class E_{constructor(e,i){this.fieldName=e,this.preconditions=i}validate(e){let i="";for(let u=0;u<this.preconditions.length;u++)i+=this.preconditions[u].getErrorMessage(e,this.fieldName);return i}isCorrect(e){let i=!0;for(let u=0;u<this.preconditions.length;u++){const l=this.preconditions[u];i=i&&l.check(e)}return i}}class xx{constructor(e,i){this.minLength=e,this.maxLength=i}check(e){return null!=e&&e.length>=this.minLength&&e.length<=this.maxLength}getErrorMessage(e,i){return this.check(e)?"":i+" have to be at least "+this.minLength+" characters long and at most "+this.maxLength+" long."}}class hC{static isNullOrEmpty(e){return null==e||0===e.length}}class Fx{constructor(){this.emailRegExp=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/}check(e){return!hC.isNullOrEmpty(e)&&this.emailRegExp.test(e)}getErrorMessage(e,i){return this.check(e)?"":"It is not a valid email address."}}class Ox{constructor(e){this.minLength=e}check(e){return null!=e&&e.length>=this.minLength}getErrorMessage(e,i){return this.check(e)?"":i+" have to be at least "+this.minLength+" characters long."}}var qd=(()=>(function(t){t[t.GENERAL=0]="GENERAL"}(qd||(qd={})),qd))();class Px{constructor(e,i){this.module=e,this.controllerName=i,this.modules={},this.registerModules()}registerModules(){this.modules[qd.GENERAL]="/general/v1"}getModule(){return this.modules[this.module]}getHost(){return console.info("Dev mode: "+Yw()),Yw()?"http://localhost:8080":"https://webserver-pablo127.herokuapp.com"}getController(){return this.controllerName}}let pC=(()=>{class t extends fC{constructor(i){super(),this.http=i}contact(i){return this.http.post(this.createPath(""),i).toPromise().then(u=>u).catch(Gd.handleServiceError)}getHostInfo(){return new Px(qd.GENERAL,"/contact")}}return t.\u0275fac=function(i){return new(i||t)(Ke(Yv))},t.\u0275prov=Xe({token:t,factory:t.\u0275fac}),t})();class Rx{}function kx(t,e){1&t&&(B(0,"label"),et(1,"Name"),j())}function Lx(t,e){if(1&t&&(B(0,"label"),B(1,"div",2),et(2),j(),j()),2&t){const i=Pt(2);Oe(2),or(i.nameValidationErrorMessage)}}function Vx(t,e){1&t&&(B(0,"label"),et(1,"Email Address"),j())}function Bx(t,e){if(1&t&&(B(0,"label"),B(1,"div",2),et(2),j(),j()),2&t){const i=Pt(2);Oe(2),or(i.emailValidationErrorMessage)}}function jx(t,e){1&t&&(B(0,"label"),et(1,"Message"),j())}function Ux(t,e){if(1&t&&(B(0,"label"),B(1,"div",2),et(2),j(),j()),2&t){const i=Pt(2);Oe(2),or(i.messageValidationErrorMessage)}}function Hx(t,e){if(1&t){const i=function O0(){return F()}();B(0,"div"),B(1,"div",1),B(2,"div",2),et(3),j(),j(),B(4,"form",3),B(5,"div",4),B(6,"div",5),Lt(7,kx,2,0,"label",0),Lt(8,Lx,3,1,"label",0),B(9,"input",6),Ar("ngModelChange",function(l){return Ci(i),Pt().contactForm.name=l})("change",function(){return Ci(i),Pt().onValidateName()}),j(),at(10,"p",7),j(),j(),B(11,"div",4),B(12,"div",5),Lt(13,Vx,2,0,"label",0),Lt(14,Bx,3,1,"label",0),B(15,"input",8),Ar("ngModelChange",function(l){return Ci(i),Pt().contactForm.email=l})("change",function(){return Ci(i),Pt().onValidateEmail()}),j(),at(16,"p",7),j(),j(),B(17,"div",4),B(18,"div",5),Lt(19,jx,2,0,"label",0),Lt(20,Ux,3,1,"label",0),B(21,"textarea",9),Ar("ngModelChange",function(l){return Ci(i),Pt().contactForm.message=l})("change",function(){return Ci(i),Pt().onValidateMessage()}),j(),at(22,"p",7),j(),j(),at(23,"br"),at(24,"div",10),B(25,"div",11),B(26,"div",12),B(27,"button",13),Ar("click",function(){return Ci(i),Pt().onSendMessage()}),et(28,"Send"),j(),j(),j(),j(),j()}if(2&t){const i=Pt();Oe(3),or(i.contactErrorMessage),Oe(4),nt("ngIf",i.isNullOrEmpty(i.nameValidationErrorMessage)),Oe(1),nt("ngIf",!i.isNullOrEmpty(i.nameValidationErrorMessage)),Oe(1),nt("ngModel",i.contactForm.name),Oe(4),nt("ngIf",i.isNullOrEmpty(i.emailValidationErrorMessage)),Oe(1),nt("ngIf",!i.isNullOrEmpty(i.emailValidationErrorMessage)),Oe(1),nt("ngModel",i.contactForm.email),Oe(4),nt("ngIf",i.isNullOrEmpty(i.messageValidationErrorMessage)),Oe(1),nt("ngIf",!i.isNullOrEmpty(i.messageValidationErrorMessage)),Oe(1),nt("ngModel",i.contactForm.message)}}function Gx(t,e){1&t&&(B(0,"div"),B(1,"div",1),at(2,"img",14),at(3,"br"),B(4,"p"),et(5,"Sending..."),j(),j(),j())}function qx(t,e){1&t&&(B(0,"div"),B(1,"div",1),B(2,"p"),et(3,"Message was sent."),j(),B(4,"p"),et(5,"Thank you for your message. I will answer as soon as possible."),j(),j(),j())}class $x{}var ko=(()=>(function(t){t[t.FILLING=0]="FILLING",t[t.SENDING=1]="SENDING",t[t.SENT=2]="SENT"}(ko||(ko={})),ko))();let zx=(()=>{class t{constructor(i){this.contactService=i,this.contactForm=new $x,this.nameValidator=new E_("Name",[new xx(3,15)]),this.emailValidator=new E_("Email",[new Fx]),this.messageValidator=new E_("Message",[new Ox(3)]),this.state=ko.FILLING}ngOnInit(){console.info("ContactComponent start")}isNullOrEmpty(i){return hC.isNullOrEmpty(i)}isFillingState(){return ko.FILLING===this.state}isSendingState(){return ko.SENDING===this.state}isSentState(){return ko.SENT===this.state}onSendMessage(){this.areAllFieldsCorrect()?(this.contactErrorMessage="",this.state=ko.SENDING,this.sendContactMessage()):this.contactErrorMessage="Some fields in the form are not valid."}sendContactMessage(){this.contactService.contact(this.createContactDto()).then(i=>{this.state=ko.SENT}).catch(i=>{this.state=ko.FILLING,this.contactErrorMessage="Error occurred during sending message. Try again or try again later."})}areAllFieldsCorrect(){return this.nameValidator.isCorrect(this.contactForm.name)&&this.emailValidator.isCorrect(this.contactForm.email)&&this.messageValidator.isCorrect(this.contactForm.message)}onValidateName(){this.nameValidationErrorMessage=this.nameValidator.validate(this.contactForm.name)}onValidateEmail(){this.emailValidationErrorMessage=this.emailValidator.validate(this.contactForm.email)}onValidateMessage(){this.messageValidationErrorMessage=this.messageValidator.validate(this.contactForm.message)}handleError(i){console.error("An error occurred while contacting.",i),this.contactErrorMessage="Error occurred while sending email."}createContactDto(){const i=new Rx;return i.text=this.contactForm.message,i.senderEmail=this.contactForm.email,i.contactFormUuid=Ol.getContactReceiverUuid(),i.title=this.contactForm.name+" write to you.",i}}return t.\u0275fac=function(i){return new(i||t)(ae(pC))},t.\u0275cmp=Gr({type:t,selectors:[["contact-component"]],features:[Ct([pC])],decls:3,vars:3,consts:[[4,"ngIf"],[1,"center"],[1,"errorMessage"],["name","sentMessage","id","contactForm","novalidate",""],[1,"control-group"],[1,"form-group","floating-label-form-group","controls"],["name","name","type","text","placeholder","Name","id","name","required","","data-validation-required-message","Please enter your name.",1,"form-control",3,"ngModel","ngModelChange","change"],[1,"help-block","text-danger"],["name","email","type","email","placeholder","Email Address","id","email","required","","data-validation-required-message","Please enter your email address.",1,"form-control",3,"ngModel","ngModelChange","change"],["name","message","rows","5","placeholder","Message","id","message","required","","data-validation-required-message","Please enter a message.",1,"form-control",3,"ngModel","ngModelChange","change"],["id","success"],[1,"row"],[1,"form-group","col-xs-12"],["type","submit",1,"btn","btn-success","btn-lg",3,"click"],["src","assets/progress.png","alt",""]],template:function(i,u){1&i&&(Lt(0,Hx,29,10,"div",0),Lt(1,Gx,6,0,"div",0),Lt(2,qx,6,0,"div",0)),2&i&&(nt("ngIf",u.is
1FillingState()),Oe(1),nt("ngIf",u.isSendingState()),Oe(1),nt("ngIf",u.isSentState()))},directives:[Hu,VE,EE,Yg,Hg,Zg,DE,m_],encapsulation:2}),t})();function Wx(t,e){if(1&t&&(B(0,"div"),B(1,"h3"),et(2),j(),B(3,"p"),et(4),j(),j()),2&t){const i=Pt();Oe(2),or(i.title),Oe(2),or(i.text)}}function Kx(t,e){if(1&t&&(B(0,"div"),B(1,"div",1),et(2),j(),j()),2&t){const i=Pt();Oe(2),or(i.getContentUnavailableMessage())}}let Qx=(()=>{class t{constructor(i){this.contentService=i}ngOnInit(){console.info("Footer information component start"),this.getContent()}getContentUnavailableMessage(){return Gd.getContentUnavailableMessage()}isNoError(){return null==this.error}getContent(){this.contentService.getContent(Ol.getFooterInformationUuid()).then(i=>{const u=i;this.text=u.text,this.title=u.title}).catch(i=>this.error=i)}}return t.\u0275fac=function(i){return new(i||t)(ae(nm))},t.\u0275cmp=Gr({type:t,selectors:[["footer-information-component"]],features:[Ct([rm])],decls:2,vars:2,consts:[[4,"ngIf"],[1,"errorMessage"]],template:function(i,u){1&i&&(Lt(0,Wx,5,2,"div",0),Lt(1,Kx,3,1,"div",0)),2&i&&(nt("ngIf",u.isNoError()),Oe(1),nt("ngIf",!u.isNoError()))},directives:[Hu],encapsulation:2}),t})();function Jx(t,e){1&t&&at(0,"strong",13),2&t&&nt("innerHtml",Pt(2).$implicit.value,Oi)}function Yx(t,e){if(1&t&&(B(0,"a",19),Lt(1,Jx,1,1,"strong",18),j()),2&t){const i=Pt().$implicit;nt("href",i.value,rr),Oe(1),nt("ngIf",i.isLink)}}function Zx(t,e){1&t&&at(0,"strong",13),2&t&&nt("innerHtml",Pt().$implicit.value,Oi)}function Xx(t,e){if(1&t&&(B(0,"li"),et(1),Lt(2,Yx,2,2,"a",17),Lt(3,Zx,1,1,"strong",18),j()),2&t){const i=e.$implicit;Oe(1),cg(" ",i.key," "),Oe(1),nt("ngIf",1==i.isLink),Oe(1),nt("ngIf",0==i.isLink)}}function eF(t,e){if(1&t&&(B(0,"div"),B(1,"div",1),B(2,"div",2),B(3,"div",3),B(4,"div",4),B(5,"div",5),at(6,"div",6),j(),j(),B(7,"div",7),B(8,"div",8),B(9,"div",9),B(10,"div",10),B(11,"h2"),et(12),j(),at(13,"hr",11),at(14,"img",12),at(15,"p",13),B(16,"ul",14),Lt(17,Xx,4,3,"li",0),j(),B(18,"button",15),at(19,"i",16),et(20," Close"),j(),j(),j(),j(),j(),j(),j(),j(),j()),2&t){const i=e.$implicit,u=Pt();Oe(1),_d("id","portfolio",i.uuid,""),Oe(11),or(i.title),Oe(2),nt("src",u.getImageUrlForContentDto(i.uuid),rr),Oe(1),nt("innerHtml",i.text,Oi),Oe(2),nt("ngForOf",i.contentPropertyDtos)}}let tF=(()=>{class t{constructor(){this.contentDao=new Xg([]),lC.registerPortfolioContentListener(this)}ngOnInit(){console.info("Portfolio details component start")}dataChanged(i){this.contentDao=new D_([this.contentDao,i]),console.info("Portfolio details data was changed.")}getImageUrlForContentDto(i){const u=this.contentDao.findContentFileByContentUuidAndContentFileKey(i,t.IMAGE_KEY);return u.isPresent()?u.get().url:(console.warn("ContentFile was not found for Content with uuid "+i),iC.getDefaultPortfolioImagePath())}}return t.IMAGE_KEY="imageMax",t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=Gr({type:t,selectors:[["portfolio-details-component"]],features:[Ct([])],decls:1,vars:1,consts:[[4,"ngFor","ngForOf"],["tabindex","-1","role","dialog","aria-hidden","true",1,"portfolio-modal","modal","fade","show",3,"id"],["role","document",1,"modal-dialog"],[1,"modal-content"],["data-dismiss","modal",1,"close-modal"],[1,"lr"],[1,"rl"],[1,"container"],[1,"row"],[1,"col-lg-8","mx-auto"],[1,"modal-body"],[1,"star-primary"],["alt","",1,"img-fluid","img-centered",3,"src"],[3,"innerHtml"],[1,"list-inline","item-details"],["type","button","data-dismiss","modal",1,"btn","btn-success"],[1,"fa","fa-times"],["target","_blank",3,"href",4,"ngIf"],[3,"innerHtml",4,"ngIf"],["target","_blank",3,"href"]],template:function(i,u){1&i&&Lt(0,eF,21,5,"div",0),2&i&&nt("ngForOf",u.contentDao.getContentDtos())},directives:[Rg,Hu],encapsulation:2}),t})(),nF=(()=>{class t{ngOnInit(){console.info("AppBootstrap start")}}return t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=Gr({type:t,selectors:[["app-bootstrap"]],decls:85,vars:0,consts:[["id","portfolio"],[1,"container"],[1,"row"],[1,"col-lg-12","text-center"],[1,"star-primary"],[1,"col-lg-8","mx-auto",2,"min-width","100%"],[1,"center"],["src","assets/progress.png","alt",""],["id","about",1,"success"],[1,"star-light"],["id","blog",1,"success"],["id","contact"],[1,"col-lg-8","mx-auto"],[1,"text-center"],[1,"footer-above"],[1,"footer-col","col-md-4"],[1,"list-inline"],[1,"list-inline-item"],["href","https://pl.linkedin.com/in/pawe%C5%82-%C5%9Bwiderski-04859978","target","_blank",1,"btn-social","btn-outline"],[1,"fa","fa-fw","fa-linkedin"],["href","https://github.com/plswiderski","target","_blank",1,"btn-social","btn-outline"],[1,"fa","fa-fw","fa-github"],["href","https://bitbucket.org/plswiderski/","target","_blank",1,"btn-social","btn-outline"],[1,"fa","fa-fw","fa-bitbucket"],["href","https://plswiderski.medium.com/","target","_blank",1,"btn-social","btn-outline"],[1,"fa","fa-fw","fa-medium"],["href","https://play.google.com/store/apps/developer?id=Pawe\u0142+\u015awiderski","target","_blank",1,"btn-social","btn-outline"],[1,"fa","fa-fw","fa-play"],["src","assets/progressBright.png","alt",""],[1,"footer-below"],[1,"col-lg-12"],["href","http://startbootstrap.com","target","_blank"]],template:function(i,u){1&i&&(B(0,"section",0),B(1,"div",1),B(2,"div",2),B(3,"div",3),B(4,"h2"),et(5,"Portfolio"),j(),at(6,"hr",4),j(),j(),B(7,"div",2),B(8,"div",5),B(9,"portfolio-component"),B(10,"div",6),at(11,"img",7),j(),j(),j(),j(),j(),j(),B(12,"section",8),B(13,"div",1),B(14,"div",2),B(15,"div",3),B(16,"h2"),et(17,"About"),j(),at(18,"hr",9),j(),j(),B(19,"div",2),B(20,"div",5),B(21,"about-component"),B(22,"div",6),at(23,"img",7),j(),j(),j(),j(),j(),j(),B(24,"section",10),B(25,"div",3),B(26,"h2"),et(27,"Blog"),j(),at(28,"hr",9),j(),B(29,"blog-component"),B(30,"div",6),at(31,"img",7),j(),j(),j(),B(32,"section",11),B(33,"div",1),B(34,"div",2),B(35,"div",3),B(36,"h2"),et(37,"Contact"),j(),at(38,"hr",4),j(),j(),B(39,"div",2),B(40,"div",12),B(41,"contact-component"),B(42,"div",6),at(43,"img",7),j(),j(),j(),j(),j(),j(),B(44,"footer",13),B(45,"div",14),B(46,"div",1),B(47,"div",2),B(48,"div",15),B(49,"h3"),et(50,"Location"),j(),B(51,"p"),et(52,"Pozna\u0144, Poland"),j(),j(),B(53,"div",15),B(54,"h3"),et(55,"Around the Web"),j(),B(56,"ul",16),B(57,"li",17),B(58,"a",18),at(59,"i",19),j(),j(),B(60,"li",17),B(61,"a",20),at(62,"i",21),j(),j(),B(63,"li",17),B(64,"a",22),at(65,"i",23),j(),j(),B(66,"li",17),B(67,"a",24),at(68,"i",25),j(),j(),B(69,"li",17),B(70,"a",26),at(71,"i",27),j(),j(),j(),j(),B(72,"div",15),B(73,"footer-information-component"),B(74,"div",6),at(75,"img",28),j(),j(),j(),j(),j(),j(),B(76,"div",29),B(77,"div",1),B(78,"div",2),B(79,"div",30),et(80," Copyright \xa9 2016-2022 Pawe\u0142 \u015awiderski. Website is based on Freelancer Bootstrap theme created by "),B(81,"a",31),et(82,"Start Bootstrap"),j(),et(83,". "),j(),j(),j(),j(),j(),at(84,"portfolio-details-component"))},directives:[lC,Ex,Nx,zx,Qx,tF],encapsulation:2}),t})(),rF=(()=>{class t{}return t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=ni({type:t,bootstrap:[nF]}),t.\u0275inj=Hr({imports:[[x1,ix,aN]]}),t})();(function dA(){if(Jw)throw new Error("Cannot enable prod mode after platform setup.");Qw=!1})(),M1().bootstrapModule(rF)},713:(Lo,Fr,St)=>{St.r(Fr);var qe=St(367),C=St(655),ve=St(492),Ee=St(3),Vt=function(s,o){return(Vt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,c){a.__proto__=c}||function(a,c){for(var f in c)Object.prototype.hasOwnProperty.call(c,f)&&(a[f]=c[f])})(s,o)};function rn(s){var o="function"==typeof Symbol&&Symbol.iterator,a=o&&s[o],c=0;if(a)return a.call(s);if(s&&"number"==typeof s.length)return{next:function(){return s&&c>=s.length&&(s=void 0),{value:s&&s[c++],done:!s}}};throw new TypeError(o?"Object is not iterable.":"Symbol.iterator is not defined.")}var q,Br="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},z=z||{},Z=Br||self;function ie(){}function re(s){var o=typeof s;return"array"==(o="object"!=o?o:s?Array.isArray(s)?"array":o:"null")||"object"==o&&"number"==typeof s.length}function le(s){var o=typeof s;return"object"==o&&null!=s||"function"==o}var ft="closure_uid_"+(1e9*Math.random()>>>0),It=0;function _t(s,o,a){return s.call.apply(s.bind,arguments)}function on(s,o,a){if(!s)throw Error();if(2<arguments.length){var c=Array.prototype.slice.call(arguments,2);return function(){var f=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(f,c),s.apply(o,f)}}return function(){return s.apply(o,arguments)}}function gt(s,o,a){return(gt=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?_t:on).apply(null,arguments)}
vendor: 4,729 bytes, line 1
1function Gn(s,o){var a=Array.prototype.slice.call(arguments,1);return function(){var c=a.slice();return c.push.apply(c,arguments),s.apply(this,c)}}function me(s,o){function a(){}a.prototype=o.prototype,s.Z=o.prototype,s.prototype=new a,s.prototype.constructor=s,s.Vb=function(c,f,h){for(var g=Array(arguments.length-2),y=2;y<arguments.length;y++)g[y-2]=arguments[y];return o.prototype[f].apply(c,g)}}function Bt(){this.s=this.s,this.o=this.o}var At={};Bt.prototype.s=!1,Bt.prototype.na=function(){if(!this.s&&(this.s=!0,this.M(),0)){var s=function Ze(s){return Object.prototype.hasOwnProperty.call(s,ft)&&s[ft]||(s[ft]=++It)}(this);delete At[s]}},Bt.prototype.M=function(){if(this.o)for(;this.o.length;)this.o.shift()()};var jr=Array.prototype.indexOf?function(s,o){return Array.prototype.indexOf.call(s,o,void 0)}:function(s,o){if("string"==typeof s)return"string"!=typeof o||1!=o.length?-1:s.indexOf(o,0);for(var a=0;a<s.length;a++)if(a in s&&s[a]===o)return a;return-1},$=Array.prototype.forEach?function(s,o,a){Array.prototype.forEach.call(s,o,a)}:function(s,o,a){for(var c=s.length,f="string"==typeof s?s.split(""):s,h=0;h<c;h++)h in f&&o.call(a,f[h],h,s)};function Y(s){return Array.prototype.concat.apply([],arguments)}function X(s){var o=s.length;if(0<o){for(var a=Array(o),c=0;c<o;c++)a[c]=s[c];return a}return[]}function fe(s){return/^[\s\xa0]*$/.test(s)}var bt,se=String.prototype.trim?function(s){return s.trim()}:function(s){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(s)[1]};function we(s,o){return-1!=s.indexOf(o)}function dt(s,o){return s<o?-1:s>o?1:0}e:{var Le=Z.navigator;if(Le){var qt=Le.userAgent;if(qt){bt=qt;break e}}bt=""}function Pe(s,o,a){for(var c in s)o.call(a,s[c],c,s)}function ge(s){var o={};for(var a in s)o[a]=s[a];return o}var Ue="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function Mt(s,o){for(var a,c,f=1;f<arguments.length;f++){for(a in c=arguments[f])s[a]=c[a];for(var h=0;h<Ue.length;h++)a=Ue[h],Object.prototype.hasOwnProperty.call(c,a)&&(s[a]=c[a])}}function wn(s){return wn[" "](s),s}wn[" "]=ie;var Je,s,$u=we(bt,"Opera"),_i=we(bt,"Trident")||we(bt,"MSIE"),eo=we(bt,"Edge"),Bo=eo||_i,jo=we(bt,"Gecko")&&!(we(bt.toLowerCase(),"webkit")&&!we(bt,"Edge"))&&!(we(bt,"Trident")||we(bt,"MSIE"))&&!we(bt,"Edge"),zu=we(bt.toLowerCase(),"webkit")&&!we(bt,"Edge");function ut(){var s=Z.document;return s?s.documentMode:void 0}e:{var sr="",Dn=(s=bt,jo?/rv:([^\);]+)(\)|;)/.exec(s):eo?/Edge\/([\d\.]+)/.exec(s):_i?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(s):zu?/WebKit\/(\S+)/.exec(s):$u?/(?:Version)[ \/]?(\S+)/.exec(s):void 0);if(Dn&&(sr=Dn?Dn[1]:""),_i){var $t=ut();if(null!=$t&&$t>parseFloat(sr)){Je=String($t);break e}}Je=sr}var Xr={};var ka=Z.document&&_i&&(ut()||parseInt(Je,10))||void 0,im=function(){if(!Z.addEventListener||!Object.defineProperty)return!1;var s=!1,o=Object.defineProperty({},"passive",{get:function(){s=!0}});try{Z.addEventListener("test",ie,o),Z.removeEventListener("test",ie,o)}catch(a){}return s}();function En(s,o){this.type=s,this.g=this.target=o,this.defaultPrevented=!1}function Uo(s,o){if(En.call(this,s?s.type:""),this.relatedTarget=this.g=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.state=null,this.pointerId=0,this.pointerType="",this.i=null,s){var a=this.type=s.type,c=s.changedTouches&&s.changedTouches.length?s.changedTouches[0]:null;if(this.target=s.target||s.srcElement,this.g=o,o=s.relatedTarget){if(jo){e:{try{wn(o.nodeName);var f=!0;break e}catch(h){}f=!1}f||(o=null)}}else"mouseover"==a?o=s.fromElement:"mouseout"==a&&(o=s.toElement);this.relatedTarget=o,c?(this.clientX=void 0!==c.clientX?c.clientX:c.pageX,this.clientY=void 0!==c.clientY?c.clientY:c.pageY,this.screenX=c.screenX||0,this.screenY=c.screenY||0):(this.clientX=void 0!==s.clientX?s.clientX:s.pageX,this.clientY=void 0!==s.clientY?s.clientY:s.pageY,this.screenX=s.screenX||0,this.screenY=s.screenY||0),this.button=s.button,this.key=s.key||"",this.ctrlKey=s.ctrlKey,this.altKey=s.altKey,this.shiftKey=s.shiftKey,this.metaKey=s.metaKey,this.pointerId=s.pointerId||0,this.pointerType="string"==typeof s.pointerType?s.pointerType:$d[s.pointerType]||"",this.state=s.state,this.i=s,s.defaultPrevented&&Uo.Z.h.call(this)}}En.prototype.h=function(){this.defaultPrevented=!0},me(Uo,En);var $d={2:"touch",3:"pen",4:"mouse"};Uo.prototype.h=function(){Uo.Z.h.call(this);var s=this.i;s.preventDefault?s.preventDefault():s.returnValue=!1};var Ho="closure_listenable_"+(1e6*Math.random()|0),Pl=0;function Rl(s,o,a,c,f){this.listener=s,this.proxy=null,this.src=o,this.type=a,this.capture=!!c,this.ia=f,this.key=++Pl,this.ca=this.fa=!1}
1function Ms(s){s.ca=!0,s.listener=null,s.proxy=null,s.src=null,s.ia=null}function Ns(s){this.src=s,this.g={},this.h=0}function Wu(s,o){var a=o.type;if(a in s.g){var h,c=s.g[a],f=jr(c,o);(h=0<=f)&&Array.prototype.splice.call(c,f,1),h&&(Ms(o),0==s.g[a].length&&(delete s.g[a],s.h--))}}function kl(s,o,a,c){for(var f=0;f<s.length;++f){var h=s[f];if(!h.ca&&h.listener==o&&h.capture==!!a&&h.ia==c)return f}return-1}Ns.prototype.add=function(s,o,a,c,f){var h=s.toString();(s=this.g[h])||(s=this.g[h]=[],this.h++);var g=kl(s,o,c,f);return-1<g?(o=s[g],a||(o.fa=!1)):((o=new Rl(o,this.src,h,!!c,f)).fa=a,s.push(o)),o};var La="closure_lm_"+(1e6*Math.random()|0),Va={};function x(s,o,a,c,f){if(c&&c.once)return L(s,o,a,c,f);if(Array.isArray(o)){for(var h=0;h<o.length;h++)x(s,o[h],a,c,f);return null}return a=Cn(a),s&&s[Ho]?s.N(o,a,le(c)?!!c.capture:!!c,f):N(s,o,a,!1,c,f)}function N(s,o,a,c,f,h){if(!o)throw Error("Invalid event type");var g=le(f)?!!f.capture:!!f,y=Te(s);if(y||(s[La]=y=new Ns(s)),(a=y.add(o,a,c,g,h)).proxy)return a;if(c=function R(){var o=ht;return function s(a){return o.call(s.src,s.listener,a)}}(),a.proxy=c,c.src=s,c.listener=a,s.addEventListener)im||(f=g),void 0===f&&(f=!1),s.addEventListener(o.toString(),c,f);else if(s.attachEvent)s.attachEvent(Me(o.toString()),c);else{if(!s.addListener||!s.removeListener)throw Error("addEventListener and attachEvent are unavailable.");s.addListener(c)}return a}function L(s,o,a,c,f){if(Array.isArray(o)){for(var h=0;h<o.length;h++)L(s,o[h],a,c,f);return null}return a=Cn(a),s&&s[Ho]?s.O(o,a,le(c)?!!c.capture:!!c,f):N(s,o,a,!0,c,f)}function O(s,o,a,c,f){if(Array.isArray(o))for(var h=0;h<o.length;h++)O(s,o[h],a,c,f);else c=le(c)?!!c.capture:!!c,a=Cn(a),s&&s[Ho]?(s=s.i,(o=String(o).toString())in s.g&&-1<(a=kl(h=s.g[o],a,c,f))&&(Ms(h[a]),Array.prototype.splice.call(h,a,1),0==h.length&&(delete s.g[o],s.h--))):s&&(s=Te(s))&&(o=s.g[o.toString()],s=-1,o&&(s=kl(o,a,c,f)),(a=-1<s?o[s]:null)&&W(a))}function W(s){if("number"!=typeof s&&s&&!s.ca){var o=s.src;if(o&&o[Ho])Wu(o.i,s);else{var a=s.type,c=s.proxy;o.removeEventListener?o.removeEventListener(a,c,s.capture):o.detachEvent?o.detachEvent(Me(a),c):o.addListener&&o.removeListener&&o.removeListener(c),(a=Te(o))?(Wu(a,s),0==a.h&&(a.src=null,o[La]=null)):Ms(s)}}}function Me(s){return s in Va?Va[s]:Va[s]="on"+s}function ht(s,o){if(s.ca)s=!0;else{o=new Uo(o,this);var a=s.listener,c=s.ia||s.src;s.fa&&W(s),s=a.call(c,o)}return s}function Te(s){return(s=s[La])instanceof Ns?s:null}var he="__closure_events_fn_"+(1e9*Math.random()>>>0);function Cn(s){return"function"==typeof s?s:(s[he]||(s[he]=function(o){return s.handleEvent(o)}),s[he])}function wt(){Bt.call(this),this.i=new Ns(this),this.P=this,this.I=null}function ye(s,o){var a,c=s.I;if(c)for(a=[];c;c=c.I)a.push(c);if(s=s.P,c=o.type||o,"string"==typeof o)o=new En(o,s);else if(o instanceof En)o.target=o.target||s;else{var f=o;Mt(o=new En(c,s),f)}if(f=!0,a)for(var h=a.length-1;0<=h;h--){var g=o.g=a[h];f=Ur(g,c,!0,o)&&f}if(f=Ur(g=o.g=s,c,!0,o)&&f,f=Ur(g,c,!1,o)&&f,a)for(h=0;h<a.length;h++)f=Ur(g=o.g=a[h],c,!1,o)&&f}function Ur(s,o,a,c){if(!(o=s.i.g[String(o)]))return!0;o=o.concat();for(var f=!0,h=0;h<o.length;++h){var g=o[h];if(g&&!g.ca&&g.capture==a){var y=g.listener,_=g.ia||g.src;g.fa&&Wu(s.i,g),f=!1!==y.call(_,c)&&f}}return f&&!c.defaultPrevented}me(wt,Bt),wt.prototype[Ho]=!0,wt.prototype.removeEventListener=function(s,o,a,c){O(this,s,o,a,c)},wt.prototype.M=function(){if(wt.Z.M.call(this),this.i){var o,s=this.i;for(o in s.g){for(var a=s.g[o],c=0;c<a.length;c++)Ms(a[c]);delete s.g[o],s.h--}}this.I=null},wt.prototype.N=function(s,o,a,c){return this.i.add(String(s),o,!1,a,c)},wt.prototype.O=function(s,o,a,c){return this.i.add(String(s),o,!0,a,c)};var xe=Z.JSON.stringify;function $n(){var s=ei,o=null;return s.g&&(o=s.g,s.g=s.g.next,s.g||(s.h=null),o.next=null),o}var zd,om=function(){function s(){this.h=this.g=null}return s.prototype.add=function(o,a){var c=sm.get();c.set(o,a),this.h?this.h.next=c:this.g=c,this.h=c},s}(),sm=new(function(){function s(o,a){this.i=o,this.j=a,this.h=0,this.g=null}return s.prototype.get=function(){var o;return 0<this.h?(this.h--,this.g=(o=this.g).next,o.next=null):o=this.i(),o},s}())(function(){return new O_},function(s){return s.reset()}),O_=function(){function s(){this.next=this.g=this.h=null}return s.prototype.set=function(o,a){this.h=o,this.g=a,this.next=null},s.prototype.reset=function(){this.next=this.g=this.h=null},s}();function Ku(s){Z.setTimeout(function(){throw s},0)}function zn(s,o){zd||function am(){var s=Z.Promise.resolve(void 0);zd=function(){s.then(P_)}}(),Wd||(zd(),Wd=!0),ei.add(s,o)}var Wd=!1,ei=new om;function P_(){for(var s;s=$n();){try{s.h.call(s.g)}catch(a){Ku(a)}var o=sm;o.j(s),100>o.h&&(o.h++,s.next=o.g,o.g=s)}Wd=!1}function Ll(s,o){wt.call(this),this.h=s||1,this.g=o||Z,this.j=gt(this.kb,this),this.l=Date.now()}function Kd(s){s.da=!1,s.S&&(s.g.clearTimeout(s.S),s.S=null)}
1function Qd(s,o,a){if("function"==typeof s)a&&(s=gt(s,a));else{if(!s||"function"!=typeof s.handleEvent)throw Error("Invalid listener argument");s=gt(s.handleEvent,s)}return 2147483647<Number(o)?-1:Z.setTimeout(s,o||0)}function Jd(s){s.g=Qd(function(){s.g=null,s.i&&(s.i=!1,Jd(s))},s.j);var o=s.h;s.h=null,s.m.apply(null,o)}me(Ll,wt),(q=Ll.prototype).da=!1,q.S=null,q.kb=function(){if(this.da){var s=Date.now()-this.l;0<s&&s<.8*this.h?this.S=this.g.setTimeout(this.j,this.h-s):(this.S&&(this.g.clearTimeout(this.S),this.S=null),ye(this,"tick"),this.da&&(Kd(this),this.start()))}},q.start=function(){this.da=!0,this.S||(this.S=this.g.setTimeout(this.j,this.h),this.l=Date.now())},q.M=function(){Ll.Z.M.call(this),Kd(this),delete this.g};var R_=function(s){function o(a,c){var f=s.call(this)||this;return f.m=a,f.j=c,f.h=null,f.i=!1,f.g=null,f}return function Or(s,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function a(){this.constructor=s}Vt(s,o),s.prototype=null===o?Object.create(o):(a.prototype=o.prototype,new a)}(o,s),o.prototype.l=function(a){this.h=arguments,this.g?this.i=!0:Jd(this)},o.prototype.M=function(){s.prototype.M.call(this),this.g&&(Z.clearTimeout(this.g),this.g=null,this.i=!1,this.h=null)},o}(Bt);function Ba(s){Bt.call(this),this.h=s,this.g={}}me(Ba,Bt);var um=[];function ar(s,o,a,c){Array.isArray(a)||(a&&(um[0]=a.toString()),a=um);for(var f=0;f<a.length;f++){var h=x(o,a[f],c||s.handleEvent,!1,s.h||s);if(!h)break;s.g[h.key]=h}}function Nt(s){Pe(s.g,function(o,a){this.g.hasOwnProperty(a)&&W(o)},s),s.g={}}function Vl(){this.g=!0}function Xe(s,o,a,c){s.info(function(){return"XMLHTTP TEXT ("+o+"): "+function Hr(s,o){if(!s.g)return o;if(!o)return null;try{var a=JSON.parse(o);if(a)for(s=0;s<a.length;s++)if(Array.isArray(a[s])){var c=a[s];if(!(2>c.length)){var f=c[1];if(Array.isArray(f)&&!(1>f.length)){var h=f[0];if("noop"!=h&&"stop"!=h&&"close"!=h)for(var g=1;g<f.length;g++)f[g]=""}}}return xe(a)}catch(y){return o}}(s,a)+(c?" "+c:"")})}Ba.prototype.M=function(){Ba.Z.M.call(this),Nt(this)},Ba.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")},Vl.prototype.Aa=function(){this.g=!1},Vl.prototype.info=function(){};var bi={},Bl=null;function Qu(){return Bl=Bl||new wt}function Yd(s){En.call(this,bi.Ma,s)}function xs(s){var o=Qu();ye(o,new Yd(o,s))}function ja(s,o){En.call(this,bi.STAT_EVENT,s),this.stat=o}function In(s){var o=Qu();ye(o,new ja(o,s))}function jl(s,o){En.call(this,bi.Na,s),this.size=o}function Ua(s,o){if("function"!=typeof s)throw Error("Fn must not be null and must be a function");return Z.setTimeout(function(){s()},o)}bi.Ma="serverreachability",me(Yd,En),bi.STAT_EVENT="statevent",me(ja,En),bi.Na="timingevent",me(jl,En);var Ve={NO_ERROR:0,lb:1,yb:2,xb:3,sb:4,wb:5,zb:6,Ja:7,TIMEOUT:8,Cb:9},Ju={qb:"complete",Mb:"success",Ka:"error",Ja:"abort",Eb:"ready",Fb:"readystatechange",TIMEOUT:"timeout",Ab:"incrementaldata",Db:"progress",tb:"downloadprogress",Ub:"uploadprogress"};function Ul(){}function Hl(){}Ul.prototype.h=null;var Zd,Yu={OPEN:"a",pb:"b",Ka:"c",Bb:"d"};function ti(){En.call(this,"d")}function mr(){En.call(this,"c")}function Gl(){}function ur(s,o,a,c){this.l=s,this.j=o,this.m=a,this.X=c||1,this.V=new Ba(this),this.P=cm,this.W=new Ll(s=Bo?125:void 0),this.H=null,this.i=!1,this.s=this.A=this.v=this.K=this.F=this.Y=this.B=null,this.D=[],this.g=null,this.C=0,this.o=this.u=null,this.N=-1,this.I=!1,this.O=0,this.L=null,this.aa=this.J=this.$=this.U=!1,this.h=new Xd}function Xd(){this.i=null,this.g="",this.h=!1}me(ti,En),me(mr,En),me(Gl,Ul),Gl.prototype.g=function(){return new XMLHttpRequest},Gl.prototype.i=function(){return{}},Zd=new Gl;var cm=45e3,ql={},$l={};function mt(s,o,a){s.K=1,s.v=Kn(ri(o)),s.s=a,s.U=!0,lm(s,null)}function lm(s,o){s.F=Date.now(),to(s),s.A=ri(s.v);var a=s.A,c=s.X;Array.isArray(c)||(c=[String(c)]),oo(a.h,"t",c),s.C=0,a=s.l.H,s.h=new Xd,s.g=ah(s.l,a?o:null,!s.s),0<s.O&&(s.L=new R_(gt(s.Ia,s,s.g),s.O)),ar(s.V,s.g,"readystatechange",s.gb),o=s.H?ge(s.H):{},s.s?(s.u||(s.u="POST"),o["Content-Type"]="application/x-www-form-urlencoded",s.g.ea(s.A,s.u,s.s,o)):(s.u="GET",s.g.ea(s.A,s.u,null,o)),xs(1),function k_(s,o,a,c,f,h){s.info(function(){if(s.g)if(h)for(var g="",y=h.split("&"),_=0;_<y.length;_++){var D=y[_].split("=");if(1<D.length){var E=D[0];D=D[1];var T=E.split("_");g=2<=T.length&&"type"==T[1]?g+(E+"=")+D+"&":g+(E+"=redacted&")}}else g=null;else g=h;return"XMLHTTP REQ ("+c+") [attempt "+f+"]: "+o+"\n"+a+"\n"+g})}(s.j,s.u,s.A,s.m,s.X,s.s)}function fm(s){return!!s.g&&"GET"==s.u&&2!=s.K&&s.l.Ba}function Go(s,o,a){for(var f,c=!0;!s.I&&s.C<a.length;){if((f=Tt(s,a))==$l){4==o&&(s.o=4,In(14),c=!1),Xe(s.j,s.m,null,"[Incomplete Response]");break}if(f==ql){s.o=4,In(15),Xe(s.j,s.m,a,"[Invalid Chunk]"),c=!1;break}Xe(s.j,s.m,f,null),qo(s,f)}fm(s)&&f!=$l&&f!=ql&&(s.h.g="",s.C=0),4!=o||0!=a.length||s.h.h||(s.o=1,In(16),c=!1),s.i=s.i&&c,c?0<a.length&&!s.aa&&(s.aa=!0,(o=s.l).g==s&&o.$&&!o.L&&(o.h.info("Great, no buffering proxy detected. Bytes received: "+a.length),oc(o),o.L=!0,In(11))):(Xe(s.j,s.m,a,"[Invalid Chunked Response]"),Wn(s),Os(s))}function Tt(s,o){var a=s.C,c=o.indexOf("\n",a);return-1==c?$l:(a=Number(o.substring(a,c)),isNaN(a)?ql:(c+=1)+a>o.length?$l:(o=o.substr(c,a),s.C=c+a,o))}function to(s){s.Y=Date.now()+s.P,Zu(s,s.P)}function Zu(s,o){if(null!=s.B)throw Error("WatchDog timer not null");s.B=Ua(gt(s.eb,s),o)}function Fs(s){s.B&&(Z.clearTimeout(s.B),s.B=null)}function Os(s){0==s.l.G||s.I||sh(s.l,s)}function Wn(s){Fs(s);var o=s.L;
vendor: 6,267 bytes, line 1
1o&&"function"==typeof o.na&&o.na(),s.L=null,Kd(s.W),Nt(s.V),s.g&&(o=s.g,s.g=null,o.abort(),o.na())}function qo(s,o){try{var a=s.l;if(0!=a.G&&(a.g==s||so(a.i,s)))if(a.I=s.N,!s.J&&so(a.i,s)&&3==a.G){try{var c=a.Ca.g.parse(o)}catch(te){c=null}if(Array.isArray(c)&&3==c.length){var f=c;if(0==f[0])e:if(a.u)a.ta=f[1],0<a.ta-a.U&&37500>f[2]&&a.N&&0==a.A&&!a.v&&(a.v=Ua(gt(a.ab,a),6e3));else{if(a.g){if(!(a.g.F+3e3<s.F))break e;js(a),Jl(a)}ic(a),In(18)}if(1>=nc(a.i)&&a.ka){try{a.ka()}catch(te){}a.ka=void 0}}else uo(a,11)}else if((s.J||a.g==s)&&js(a),!fe(o))for(f=a.Ca.g.parse(o),o=0;o<f.length;o++){var h=f[o];if(a.U=h[0],h=h[1],2==a.G)if("c"==h[0]){a.J=h[1],a.la=h[2];var g=h[3];null!=g&&(a.ma=g,a.h.info("VER="+a.ma));var y=h[4];null!=y&&(a.za=y,a.h.info("SVER="+a.za));var _=h[5];null!=_&&"number"==typeof _&&0<_&&(a.K=c=1.5*_,a.h.info("backChannelRequestTimeoutMs_="+c)),c=a;var D=s.g;if(D){var E=D.g?D.g.getResponseHeader("X-Client-Wire-Protocol"):null;if(E){var T=c.i;!T.g&&(we(E,"spdy")||we(E,"quic")||we(E,"h2"))&&(T.j=T.l,T.g=new Set,T.h&&(kn(T,T.h),T.h=null))}if(c.D){var S=D.g?D.g.getResponseHeader("X-HTTP-Session-Id"):null;S&&(c.sa=S,yt(c.F,c.D,S))}}a.G=3,a.j&&a.j.xa(),a.$&&(a.O=Date.now()-s.F,a.h.info("Handshake RTT: "+a.O+"ms"));var k=s;if((c=a).oa=sc(c,c.H?c.la:null,c.W),k.J){ks(c.i,k);var P=k,H=c.K;H&&P.setTimeout(H),P.B&&(Fs(P),to(P)),c.g=k}else ih(c);0<a.l.length&&ii(a)}else"stop"!=h[0]&&"close"!=h[0]||uo(a,7);else 3==a.G&&("stop"==h[0]||"close"==h[0]?"stop"==h[0]?uo(a,7):$a(a):"noop"!=h[0]&&a.j&&a.j.wa(h),a.A=0)}xs(4)}catch(te){}}function Gr(s,o){if(s.forEach&&"function"==typeof s.forEach)s.forEach(o,void 0);else if(re(s)||"string"==typeof s)$(s,o,void 0);else{if(s.T&&"function"==typeof s.T)var a=s.T();else if(s.R&&"function"==typeof s.R)a=void 0;else if(re(s)||"string"==typeof s){a=[];for(var c=s.length,f=0;f<c;f++)a.push(f)}else for(f in a=[],c=0,s)a[c++]=f;c=function dm(s){if(s.R&&"function"==typeof s.R)return s.R();if("string"==typeof s)return s.split("");if(re(s)){for(var o=[],a=s.length,c=0;c<a;c++)o.push(s[c]);return o}for(c in o=[],a=0,s)o[a++]=s[c];return o}(s),f=c.length;for(var h=0;h<f;h++)o.call(void 0,c[h],a&&a[h],s)}}function Ps(s,o){this.h={},this.g=[],this.i=0;var a=arguments.length;if(1<a){if(a%2)throw Error("Uneven number of arguments");for(var c=0;c<a;c+=2)this.set(arguments[c],arguments[c+1])}else if(s)if(s instanceof Ps)for(a=s.T(),c=0;c<a.length;c++)this.set(a[c],s.get(a[c]));else for(c in s)this.set(c,s[c])}function Xu(s){if(s.i!=s.g.length){for(var o=0,a=0;o<s.g.length;){var c=s.g[o];no(s.h,c)&&(s.g[a++]=c),o++}s.g.length=a}if(s.i!=s.g.length){var f={};for(a=o=0;o<s.g.length;)no(f,c=s.g[o])||(s.g[a++]=c,f[c]=1),o++;s.g.length=a}}function no(s,o){return Object.prototype.hasOwnProperty.call(s,o)}(q=ur.prototype).setTimeout=function(s){this.P=s},q.gb=function(s){s=s.target;var o=this.L;o&&3==ao(s)?o.l():this.Ia(s)},q.Ia=function(s){try{if(s==this.g)e:{var o=ao(this.g),a=this.g.Da(),c=this.g.ba();if(!(3>o)&&(3!=o||Bo||this.g&&(this.h.h||this.g.ga()||bm(this.g)))){this.I||4!=o||7==a||xs(8==a||0>=c?3:2),Fs(this);var f=this.g.ba();this.N=f;t:if(fm(this)){var h=bm(this.g);s="";var g=h.length,y=4==ao(this.g);if(!this.h.i){if("undefined"==typeof TextDecoder){Wn(this),Os(this);var _="";break t}this.h.i=new Z.TextDecoder}for(a=0;a<g;a++)this.h.h=!0,s+=this.h.i.decode(h[a],{stream:y&&a==g-1});h.splice(0,g),this.h.g+=s,this.C=0,_=this.h.g}else _=this.g.ga();if(this.i=200==f,function L_(s,o,a,c,f,h,g){s.info(function(){return"XMLHTTP RESP ("+c+") [ attempt "+f+"]: "+o+"\n"+a+"\n"+h+" "+g})}(this.j,this.u,this.A,this.m,this.X,o,f),this.i){if(this.$&&!this.J){t:{if(this.g){var D,E=this.g;if((D=E.g?E.g.getResponseHeader("X-HTTP-Initial-Response"):null)&&!fe(D)){var T=D;break t}}T=null}if(!(f=T)){this.i=!1,this.o=3,In(12),Wn(this),Os(this);break e}Xe(this.j,this.m,f,"Initial handshake response via X-HTTP-Initial-Response"),this.J=!0,qo(this,f)}this.U?(Go(this,o,_),Bo&&this.i&&3==o&&(ar(this.V,this.W,"tick",this.fb),this.W.start())):(Xe(this.j,this.m,_,null),qo(this,_)),4==o&&Wn(this),this.i&&!this.I&&(4==o?sh(this.l,this):(this.i=!1,to(this)))}else 400==f&&0<_.indexOf("Unknown SID")?(this.o=3,In(12)):(this.o=0,In(13)),Wn(this),Os(this)}}}catch(S){}},q.fb=function(){if(this.g){var s=ao(this.g),o=this.g.ga();this.C<o.length&&(Fs(this),Go(this,s,o),this.i&&4!=s&&to(this))}},q.cancel=function(){this.I=!0,Wn(this)},q.eb=function(){this.B=null;var s=Date.now();0<=s-this.Y?(function V_(s,o){s.info(function(){return"TIMEOUT: "+o})}(this.j,this.A),2!=this.K&&(xs(3),In(17)),Wn(this),this.o=2,Os(this)):Zu(this,this.Y-s)},(q=Ps.prototype).R=function(){Xu(this);for(var s=[],o=0;o<this.g.length;o++)s.push(this.h[this.g[o]]);return s},q.T=function(){return Xu(this),this.g.concat()},q.get=function(s,o){return no(this.h,s)?this.h[s]:o},q.set=function(s,o){no(this.h,s)||(this.i++,this.g.push(s)),this.h[s]=o},q.forEach=function(s,o){for(var a=this.T(),c=0;c<a.length;c++){var f=a[c],h=this.get(f);s.call(o,h,f,this)}};var zl=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^\\/?#]*)@)?([^\\/?#]*?)(?::([0-9]+))?(?=[\\/?#]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/;function $o(s,o){if(this.i=this.s=this.j="",this.m=null,this.o=this.l="",this.g=!1,s instanceof $o){this.g=void 0!==o?o:s.g,Re(this,s.j),this.s=s.s,Tn(this,s.i),an(this,s.m),this.l=s.l,o=s.h;var a=new Dt;a.i=o.i,o.g&&(a.g=new Ps(o.g),a.h=o.h),Di(this,a),this.o=s.o}else s&&(a=String(s).match(zl))?(this.g=!!o,Re(this,a[1]||"",!0),this.s=Ei(a[2]||""),Tn(this,a[3]||"",!0),an(this,a[4]),this.l=Ei(a[5]||"",!0),Di(this,a[6]||"",!0),this.o=Ei(a[7]||"")):(this.g=!!o,this.h=new Dt(null,this.g))}function ri(s){return new $o(s)}function Re(s,o,a){s.j=a?Ei(o,!0):o,s.j&&(s.j=s.j.replace(/:$/,""))}function Tn(s,o,a){s.i=a?Ei(o,!0):o}function an(s,o){if(o){if(o=Number(o),isNaN(o)||0>o)throw Error("Bad port number "+o);s.m=o}else s.m=null}function Di(s,o,a){o instanceof Dt?(s.h=o,function Ha(s,o){o&&!s.j&&(Jt(s),s.i=null,s.g.forEach(function(a,c){var f=c.toLowerCase();c!=f&&(io(this,c),oo(this,f,a))},s)),s.j=o}(s.h,s.g)):(a||(o=ro(o,de)),s.h=new Dt(o,s.g))}function yt(s,o,a){s.h.set(o,a)}function Kn(s){return yt(s,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^Date.now()).toString(36)),s}
1function Ei(s,o){return s?o?decodeURI(s.replace(/%25/g,"%2525")):decodeURIComponent(s):""}function ro(s,o,a){return"string"==typeof s?(s=encodeURI(s).replace(o,zo),a&&(s=s.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),s):null}function zo(s){return"%"+((s=s.charCodeAt(0))>>4&15).toString(16)+(15&s).toString(16)}$o.prototype.toString=function(){var s=[],o=this.j;o&&s.push(ro(o,Sn,!0),":");var a=this.i;return(a||"file"==o)&&(s.push("//"),(o=this.s)&&s.push(ro(o,Sn,!0),"@"),s.push(encodeURIComponent(String(a)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(a=this.m)&&s.push(":",String(a))),(a=this.l)&&(this.i&&"/"!=a.charAt(0)&&s.push("/"),s.push(ro(a,"/"==a.charAt(0)?Pr:hm,!0))),(a=this.h.toString())&&s.push("?",a),(a=this.o)&&s.push("#",ro(a,ze)),s.join("")};var Sn=/[#\/\?@]/g,hm=/[#\?:]/g,Pr=/[#\?]/g,de=/[#\?@]/g,ze=/#/g;function Dt(s,o){this.h=this.g=null,this.i=s||null,this.j=!!o}function Jt(s){s.g||(s.g=new Ps,s.h=0,s.i&&function ni(s,o){if(s){s=s.split("&");for(var a=0;a<s.length;a++){var c=s[a].indexOf("="),f=null;if(0<=c){var h=s[a].substring(0,c);f=s[a].substring(c+1)}else h=s[a];o(h,f?decodeURIComponent(f.replace(/\+/g," ")):"")}}}(s.i,function(o,a){s.add(decodeURIComponent(o.replace(/\+/g," ")),a)}))}function io(s,o){Jt(s),o=xt(s,o),no(s.g.h,o)&&(s.i=null,s.h-=s.g.get(o).length,no((s=s.g).h,o)&&(delete s.h[o],s.i--,s.g.length>2*s.i&&Xu(s)))}function un(s,o){return Jt(s),o=xt(s,o),no(s.g.h,o)}function oo(s,o,a){io(s,o),0<a.length&&(s.i=null,s.g.set(xt(s,o),X(a)),s.h+=a.length)}function xt(s,o){return o=String(o),s.j&&(o=o.toLowerCase()),o}(q=Dt.prototype).add=function(s,o){Jt(this),this.i=null,s=xt(this,s);var a=this.g.get(s);return a||this.g.set(s,a=[]),a.push(o),this.h+=1,this},q.forEach=function(s,o){Jt(this),this.g.forEach(function(a,c){$(a,function(f){s.call(o,f,c,this)},this)},this)},q.T=function(){Jt(this);for(var s=this.g.R(),o=this.g.T(),a=[],c=0;c<o.length;c++)for(var f=s[c],h=0;h<f.length;h++)a.push(o[c]);return a},q.R=function(s){Jt(this);var o=[];if("string"==typeof s)un(this,s)&&(o=Y(o,this.g.get(xt(this,s))));else{s=this.g.R();for(var a=0;a<s.length;a++)o=Y(o,s[a])}return o},q.set=function(s,o){return Jt(this),this.i=null,un(this,s=xt(this,s))&&(this.h-=this.g.get(s).length),this.g.set(s,[o]),this.h+=1,this},q.get=function(s,o){return s&&0<(s=this.R(s)).length?String(s[0]):o},q.toString=function(){if(this.i)return this.i;if(!this.g)return"";for(var s=[],o=this.g.T(),a=0;a<o.length;a++){var c=o[a],f=encodeURIComponent(String(c));c=this.R(c);for(var h=0;h<c.length;h++){var g=f;""!==c[h]&&(g+="="+encodeURIComponent(String(c[h]))),s.push(g)}}return this.i=s.join("&")};var Rs=function s(o,a){this.h=o,this.g=a};function je(s){this.l=s||tc,s=Z.PerformanceNavigationTiming?0<(s=Z.performance.getEntriesByType("navigation")).length&&("hq"==s[0].nextHopProtocol||"h2"==s[0].nextHopProtocol):!!(Z.g&&Z.g.Ea&&Z.g.Ea()&&Z.g.Ea().Zb),this.j=s?this.l:1,this.g=null,1<this.j&&(this.g=new Set),this.h=null,this.i=[]}var tc=10;function Wo(s){return!!s.h||!!s.g&&s.g.size>=s.j}function nc(s){return s.h?1:s.g?s.g.size:0}function so(s,o){return s.h?s.h==o:!!s.g&&s.g.has(o)}function kn(s,o){s.g?s.g.add(o):s.h=o}function ks(s,o){s.h&&s.h==o?s.h=null:s.g&&s.g.has(o)&&s.g.delete(o)}function Ko(s){var o,a;if(null!=s.h)return s.i.concat(s.h.D);if(null!=s.g&&0!==s.g.size){var c=s.i;try{for(var f=rn(s.g.values()),h=f.next();!h.done;h=f.next())c=c.concat(h.value.D)}catch(y){o={error:y}}finally{try{h&&!h.done&&(a=f.return)&&a.call(f)}finally{if(o)throw o.error}}return c}return X(s.i)}function yr(){}function Ft(){this.g=new yr}function pm(s,o,a){var c=a||"";try{Gr(s,function(f,h){var g=f;le(f)&&(g=xe(f)),o.push(c+h+"="+encodeURIComponent(g))})}catch(f){throw o.push(c+"type="+encodeURIComponent("_badmap")),f}}function vr(s,o,a,c,f){try{o.onload=null,o.onerror=null,o.onabort=null,o.ontimeout=null,f(c)}catch(h){}}function Qn(s){this.l=s.$b||null,this.j=s.ib||!1}function Ls(s,o){wt.call(this),this.D=s,this.u=o,this.m=void 0,this.readyState=Vs,this.status=0,this.responseType=this.responseText=this.response=this.statusText="",this.onreadystatechange=null,this.v=new Headers,this.h=null,this.C="GET",this.B="",this.g=!1,this.A=this.j=this.l=null}je.prototype.cancel=function(){var s,o;if(this.i=Ko(this),this.h)this.h.cancel(),this.h=null;else if(this.g&&0!==this.g.size){try{for(var a=rn(this.g.values()),c=a.next();!c.done;c=a.next())c.value.cancel()}catch(h){s={error:h}}
vendor: 4,531 bytes, line 1
1finally{try{c&&!c.done&&(o=a.return)&&o.call(a)}finally{if(s)throw s.error}}this.g.clear()}},yr.prototype.stringify=function(s){return Z.JSON.stringify(s,void 0)},yr.prototype.parse=function(s){return Z.JSON.parse(s,void 0)},me(Qn,Ul),Qn.prototype.g=function(){return new Ls(this.l,this.j)},Qn.prototype.i=function(s){return function(){return s}}({}),me(Ls,wt);var Vs=0;function Ga(s){s.j.read().then(s.Sa.bind(s)).catch(s.ha.bind(s))}function Jn(s){s.readyState=4,s.l=null,s.j=null,s.A=null,qa(s)}function qa(s){s.onreadystatechange&&s.onreadystatechange.call(s)}(q=Ls.prototype).open=function(s,o){if(this.readyState!=Vs)throw this.abort(),Error("Error reopening a connection");this.C=s,this.B=o,this.readyState=1,qa(this)},q.send=function(s){if(1!=this.readyState)throw this.abort(),Error("need to call open() first. ");this.g=!0;var o={headers:this.v,method:this.C,credentials:this.m,cache:void 0};s&&(o.body=s),(this.D||Z).fetch(new Request(this.B,o)).then(this.Va.bind(this),this.ha.bind(this))},q.abort=function(){this.response=this.responseText="",this.v=new Headers,this.status=0,this.j&&this.j.cancel("Request was aborted."),1<=this.readyState&&this.g&&4!=this.readyState&&(this.g=!1,Jn(this)),this.readyState=Vs},q.Va=function(s){if(this.g&&(this.l=s,this.h||(this.status=this.l.status,this.statusText=this.l.statusText,this.h=s.headers,this.readyState=2,qa(this)),this.g&&(this.readyState=3,qa(this),this.g)))if("arraybuffer"===this.responseType)s.arrayBuffer().then(this.Ta.bind(this),this.ha.bind(this));else if(void 0!==Z.ReadableStream&&"body"in s){if(this.j=s.body.getReader(),this.u){if(this.responseType)throw Error('responseType must be empty for "streamBinaryChunks" mode responses.');this.response=[]}else this.response=this.responseText="",this.A=new TextDecoder;Ga(this)}else s.text().then(this.Ua.bind(this),this.ha.bind(this))},q.Sa=function(s){if(this.g){if(this.u&&s.value)this.response.push(s.value);else if(!this.u){var o=s.value?s.value:new Uint8Array(0);(o=this.A.decode(o,{stream:!s.done}))&&(this.response=this.responseText+=o)}s.done?Jn(this):qa(this),3==this.readyState&&Ga(this)}},q.Ua=function(s){this.g&&(this.response=this.responseText=s,Jn(this))},q.Ta=function(s){this.g&&(this.response=s,Jn(this))},q.ha=function(){this.g&&Jn(this)},q.setRequestHeader=function(s,o){this.v.append(s,o)},q.getResponseHeader=function(s){return this.h&&this.h.get(s.toLowerCase())||""},q.getAllResponseHeaders=function(){if(!this.h)return"";for(var s=[],o=this.h.entries(),a=o.next();!a.done;)s.push((a=a.value)[0]+": "+a[1]),a=o.next();return s.join("\r\n")},Object.defineProperty(Ls.prototype,"withCredentials",{get:function(){return"include"===this.m},set:function(s){this.m=s?"include":"same-origin"}});var B_=Z.JSON.parse;function Yt(s){wt.call(this),this.headers=new Ps,this.u=s||null,this.h=!1,this.C=this.g=null,this.H="",this.m=0,this.j="",this.l=this.F=this.v=this.D=!1,this.B=0,this.A=null,this.J=eh,this.K=this.L=!1}me(Yt,wt);var eh="",j_=/^https?$/i,U_=["POST","PUT"];function G_(s){return"content-type"==s.toLowerCase()}function mm(s,o){s.h=!1,s.g&&(s.l=!0,s.g.abort(),s.l=!1),s.j=o,s.m=5,ym(s),Kl(s)}function ym(s){s.D||(s.D=!0,ye(s,"complete"),ye(s,"error"))}function vm(s){if(s.h&&void 0!==z&&(!s.C[1]||4!=ao(s)||2!=s.ba()))if(s.v&&4==ao(s))Qd(s.Fa,0,s);else if(ye(s,"readystatechange"),4==ao(s)){s.h=!1;try{var c,o=s.ba();e:switch(o){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var a=!0;break e;default:a=!1}if(!(c=a)){var f;if(f=0===o){var h=String(s.H).match(zl)[1]||null;if(!h&&Z.self&&Z.self.location){var g=Z.self.location.protocol;h=g.substr(0,g.length-1)}f=!j_.test(h?h.toLowerCase():"")}c=f}if(c)ye(s,"complete"),ye(s,"success");else{s.m=6;try{var y=2<ao(s)?s.g.statusText:""}catch(_){y=""}s.j=y+" ["+s.ba()+"]",ym(s)}}finally{Kl(s)}}}function Kl(s,o){if(s.g){_m(s);var a=s.g,c=s.C[0]?ie:null;s.g=null,s.C=null,o||ye(s,"ready");try{a.onreadystatechange=c}catch(f){}}}function _m(s){s.g&&s.K&&(s.g.ontimeout=null),s.A&&(Z.clearTimeout(s.A),s.A=null)}function ao(s){return s.g?s.g.readyState:0}function bm(s){try{if(!s.g)return null;if("response"in s.g)return s.g.response;switch(s.J){case eh:case"text":return s.g.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in s.g)return s.g.mozResponseArrayBuffer}return null}catch(o){return null}}function th(s,o,a){e:{for(c in a){var c=!1;break e}c=!0}c||(a=function q_(s){var o="";return Pe(s,function(a,c){o+=c,o+=":",o+=a,o+="\r\n"}),o}(a),"string"==typeof s?null!=a&&encodeURIComponent(String(a)):yt(s,o,a))}
1function rc(s,o,a){return a&&a.internalChannelParams&&a.internalChannelParams[s]||o}function Ql(s){this.za=0,this.l=[],this.h=new Vl,this.la=this.oa=this.F=this.W=this.g=this.sa=this.D=this.aa=this.o=this.P=this.s=null,this.Za=this.V=0,this.Xa=rc("failFast",!1,s),this.N=this.v=this.u=this.m=this.j=null,this.X=!0,this.I=this.ta=this.U=-1,this.Y=this.A=this.C=0,this.Pa=rc("baseRetryDelayMs",5e3,s),this.$a=rc("retryDelaySeedMs",1e4,s),this.Ya=rc("forwardChannelMaxRetries",2,s),this.ra=rc("forwardChannelRequestTimeoutMs",2e4,s),this.qa=s&&s.xmlHttpFactory||void 0,this.Ba=s&&s.Yb||!1,this.K=void 0,this.H=s&&s.supportsCrossDomainXhr||!1,this.J="",this.i=new je(s&&s.concurrentRequestLimit),this.Ca=new Ft,this.ja=s&&s.fastHandshake||!1,this.Ra=s&&s.Wb||!1,s&&s.Aa&&this.h.Aa(),s&&s.forceLongPolling&&(this.X=!1),this.$=!this.ja&&this.X&&s&&s.detectBufferingProxy||!1,this.ka=void 0,this.O=0,this.L=!1,this.B=null,this.Wa=!s||!1!==s.Xb}function $a(s){if(wm(s),3==s.G){var o=s.V++,a=ri(s.F);yt(a,"SID",s.J),yt(a,"RID",o),yt(a,"TYPE","terminate"),Bs(s,a),(o=new ur(s,s.h,o,void 0)).K=2,o.v=Kn(ri(a)),a=!1,Z.navigator&&Z.navigator.sendBeacon&&(a=Z.navigator.sendBeacon(o.v.toString(),"")),!a&&Z.Image&&((new Image).src=o.v,a=!0),a||(o.g=ah(o.l,null),o.g.ea(o.v)),o.F=Date.now(),to(o)}Yl(s)}function Jl(s){s.g&&(oc(s),s.g.cancel(),s.g=null)}function wm(s){Jl(s),s.u&&(Z.clearTimeout(s.u),s.u=null),js(s),s.i.cancel(),s.m&&("number"==typeof s.m&&Z.clearTimeout(s.m),s.m=null)}function nh(s,o){s.l.push(new Rs(s.Za++,o)),3==s.G&&ii(s)}function ii(s){Wo(s.i)||s.m||(s.m=!0,zn(s.Ha,s),s.C=0)}function qr(s,o){var a;a=o?o.m:s.V++;var c=ri(s.F);yt(c,"SID",s.J),yt(c,"RID",a),yt(c,"AID",s.U),Bs(s,c),s.o&&s.s&&th(c,s.o,s.s),a=new ur(s,s.h,a,s.C+1),null===s.o&&(a.H=s.s),o&&(s.l=o.D.concat(s.l)),o=rh(s,a,1e3),a.setTimeout(Math.round(.5*s.ra)+Math.round(.5*s.ra*Math.random())),kn(s.i,a),mt(a,c,o)}function Bs(s,o){s.j&&Gr({},function(a,c){yt(o,c,a)})}function rh(s,o,a){a=Math.min(s.l.length,a);var c=s.j?gt(s.j.Oa,s.j,s):null;e:for(var f=s.l,h=-1;;){var g=["count="+a];-1==h?0<a?g.push("ofs="+(h=f[0].h)):h=0:g.push("ofs="+h);for(var y=!0,_=0;_<a;_++){var D=f[_].h,E=f[_].g;if(0>(D-=h))h=Math.max(0,f[_].h-100),y=!1;else try{pm(E,g,"req"+D+"_")}catch(T){c&&c(E)}}if(y){c=g.join("&");break e}}return s=s.l.splice(0,a),o.D=s,c}function ih(s){s.g||s.u||(s.Y=1,zn(s.Ga,s),s.A=0)}function ic(s){return!(s.g||s.u||3<=s.A||(s.Y++,s.u=Ua(gt(s.Ga,s),_r(s,s.A)),s.A++,0))}function oc(s){null!=s.B&&(Z.clearTimeout(s.B),s.B=null)}function oh(s){s.g=new ur(s,s.h,"rpc",s.Y),null===s.o&&(s.g.H=s.s),s.g.O=0;var o=ri(s.oa);yt(o,"RID","rpc"),yt(o,"SID",s.J),yt(o,"CI",s.N?"0":"1"),yt(o,"AID",s.U),Bs(s,o),yt(o,"TYPE","xmlhttp"),s.o&&s.s&&th(o,s.o,s.s),s.K&&s.g.setTimeout(s.K);var a=s.g;s=s.la,a.K=1,a.v=Kn(ri(o)),a.s=null,a.U=!0,lm(a,s)}function js(s){null!=s.v&&(Z.clearTimeout(s.v),s.v=null)}function sh(s,o){var a=null;if(s.g==o){js(s),oc(s),s.g=null;var c=2}else{if(!so(s.i,o))return;a=o.D,ks(s.i,o),c=1}if(s.I=o.N,0!=s.G)if(o.i)if(1==c){a=o.s?o.s.length:0,o=Date.now()-o.F;var f=s.C;ye(c=Qu(),new jl(c,a,o,f)),ii(s)}else ih(s);else if(3==(f=o.o)||0==f&&0<s.I||!(1==c&&function Dm(s,o){return!(nc(s.i)>=s.i.j-(s.m?1:0)||(s.m?(s.l=o.D.concat(s.l),0):1==s.G||2==s.G||s.C>=(s.Xa?0:s.Ya)||(s.m=Ua(gt(s.Ha,s,o),_r(s,s.C)),s.C++,0)))}(s,o)||2==c&&ic(s)))switch(a&&0<a.length&&(o=s.i,o.i=o.i.concat(a)),f){case 1:uo(s,5);break;case 4:uo(s,10);break;case 3:uo(s,6);break;default:uo(s,2)}}function _r(s,o){var a=s.Pa+Math.floor(Math.random()*s.$a);return s.j||(a*=2),a*o}function uo(s,o){if(s.h.info("Error code "+o),2==o){var a=null;s.j&&(a=null);var c=gt(s.jb,s);a||(a=new $o("//www.google.com/images/cleardot.gif"),Z.location&&"http"==Z.location.protocol||Re(a,"https"),Kn(a)),function gm(s,o){var a=new Vl;if(Z.Image){var c=new Image;c.onload=Gn(vr,a,c,"TestLoadImage: loaded",!0,o),c.onerror=Gn(vr,a,c,"TestLoadImage: error",!1,o),c.onabort=Gn(vr,a,c,"TestLoadImage: abort",!1,o),c.ontimeout=Gn(vr,a,c,"TestLoadImage: timeout",!1,o),Z.setTimeout(function(){c.ontimeout&&c.ontimeout()},1e4),c.src=s}else o(!1)}(a.toString(),c)}else In(2);s.G=0,s.j&&s.j.va(o),Yl(s),wm(s)}function Yl(s){s.G=0,s.I=-1,s.j&&((0!=Ko(s.i).length||0!=s.l.length)&&(s.i.i.length=0,X(s.l),s.l.length=0),s.j.ua())}function sc(s,o,a){var c=function ec(s){return s instanceof $o?ri(s):new $o(s,void 0)}(a);if(""!=c.i)o&&Tn(c,o+"."+c.i),an(c,c.m);else{var f=Z.location;c=function Wl(s,o,a,c){var f=new $o(null,void 0);return s&&Re(f,s),o&&Tn(f,o),a&&an(f,a),c&&(f.l=c),f}(f.protocol,o?o+"."+f.hostname:f.hostname,+f.port,a)}return s.aa&&Pe(s.aa,function(h,g){yt(c,g,h)}),a=s.sa,(o=s.D)&&a&&yt(c,o,a),yt(c,"VER",s.ma),Bs(s,c),c}function ah(s,o,a){if(o&&!s.H)throw Error("Can't create secondary domain capable XhrIo object.");return(o=new Yt(a&&s.Ba&&!s.qa?new Qn({ib:!0}):s.qa)).L=s.H,o}function ac(){}function Zl(){if(_i&&!(10<=Number(ka)))throw Error("Environmental error: no available transport.")}function it(s,o){wt.call(this),this.g=new Ql(o),this.l=s,this.h=o&&o.messageUrlParams||null,s=o&&o.messageHeaders||null,o&&o.clientProtocolHeaderRequired&&(s?s["X-Client-Protocol"]="webchannel":s={"X-Client-Protocol":"webchannel"}),this.g.s=s,s=o&&o.initMessageHeaders||null,o&&o.messageContentType&&(s?s["X-WebChannel-Content-Type"]=o.messageContentType:s={"X-WebChannel-Content-Type":o.messageContentType}),o&&o.ya&&(s?s["X-WebChannel-Client-Profile"]=o.ya:s={"X-WebChannel-Client-Profile":o.ya}),this.g.P=s,(s=o&&o.httpHeadersOverwriteParam)&&!fe(s)&&(this.g.o=s),this.A=o&&o.supportsCrossDomainXhr||!1,this.v=o&&o.send
1RawJson||!1,(o=o&&o.httpSessionIdParam)&&!fe(o)&&(this.g.D=o,null!==(s=this.h)&&o in s&&o in(s=this.h)&&delete s[o]),this.j=new Rt(this)}function Xl(s){ti.call(this);var o=s.__sm__;if(o){e:{for(var a in o){s=a;break e}s=void 0}(this.i=s)&&(s=this.i,o=null!==o&&s in o?o[s]:void 0),this.data=o}else this.data=s}function uh(){mr.call(this),this.status=1}function Rt(s){this.g=s}(q=Yt.prototype).ea=function(s,o,a,c){if(this.g)throw Error("[goog.net.XhrIo] Object is active with another request="+this.H+"; newUri="+s);o=o?o.toUpperCase():"GET",this.H=s,this.j="",this.m=0,this.D=!1,this.h=!0,this.g=this.u?this.u.g():Zd.g(),this.C=function wi(s){return s.h||(s.h=s.i())}(this.u?this.u:Zd),this.g.onreadystatechange=gt(this.Fa,this);try{this.F=!0,this.g.open(o,String(s),!0),this.F=!1}catch(h){return void mm(this,h)}s=a||"";var f=new Ps(this.headers);c&&Gr(c,function(h,g){f.set(g,h)}),c=function J(s){e:{for(var o=G_,a=s.length,c="string"==typeof s?s.split(""):s,f=0;f<a;f++)if(f in c&&o.call(void 0,c[f],f,s)){o=f;break e}o=-1}return 0>o?null:"string"==typeof s?s.charAt(o):s[o]}(f.T()),a=Z.FormData&&s instanceof Z.FormData,!(0<=jr(U_,o))||c||a||f.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8"),f.forEach(function(h,g){this.g.setRequestHeader(g,h)},this),this.J&&(this.g.responseType=this.J),"withCredentials"in this.g&&this.g.withCredentials!==this.L&&(this.g.withCredentials=this.L);try{_m(this),0<this.B&&((this.K=function H_(s){return _i&&function qn(){return function Zr(s){var o=Xr;return Object.prototype.hasOwnProperty.call(o,9)?o[9]:o[9]=s(9)}(function(){for(var s=0,o=se(String(Je)).split("."),a=se("9").split("."),c=Math.max(o.length,a.length),f=0;0==s&&f<c;f++){var h=o[f]||"",g=a[f]||"";do{if(h=/(\d*)(\D*)(.*)/.exec(h)||["","","",""],g=/(\d*)(\D*)(.*)/.exec(g)||["","","",""],0==h[0].length&&0==g[0].length)break;s=dt(0==h[1].length?0:parseInt(h[1],10),0==g[1].length?0:parseInt(g[1],10))||dt(0==h[2].length,0==g[2].length)||dt(h[2],g[2]),h=h[3],g=g[3]}while(0==s)}return 0<=s})}()&&"number"==typeof s.timeout&&void 0!==s.ontimeout}(this.g))?(this.g.timeout=this.B,this.g.ontimeout=gt(this.pa,this)):this.A=Qd(this.pa,this.B,this)),this.v=!0,this.g.send(s),this.v=!1}catch(h){mm(this,h)}},q.pa=function(){void 0!==z&&this.g&&(this.j="Timed out after "+this.B+"ms, aborting",this.m=8,ye(this,"timeout"),this.abort(8))},q.abort=function(s){this.g&&this.h&&(this.h=!1,this.l=!0,this.g.abort(),this.l=!1,this.m=s||7,ye(this,"complete"),ye(this,"abort"),Kl(this))},q.M=function(){this.g&&(this.h&&(this.h=!1,this.l=!0,this.g.abort(),this.l=!1),Kl(this,!0)),Yt.Z.M.call(this)},q.Fa=function(){this.s||(this.F||this.v||this.l?vm(this):this.cb())},q.cb=function(){vm(this)},q.ba=function(){try{return 2<ao(this)?this.g.status:-1}catch(s){return-1}},q.ga=function(){try{return this.g?this.g.responseText:""}catch(s){return""}},q.Qa=function(s){if(this.g){var o=this.g.responseText;return s&&0==o.indexOf(s)&&(o=o.substring(s.length)),B_(o)}},q.Da=function(){return this.m},q.La=function(){return"string"==typeof this.j?this.j:String(this.j)},(q=Ql.prototype).ma=8,q.G=1,q.hb=function(s){try{this.h.info("Origin Trials invoked: "+s)}catch(o){}},q.Ha=function(s){if(this.m)if(this.m=null,1==this.G){if(!s){this.V=Math.floor(1e5*Math.random()),s=this.V++;var o=new ur(this,this.h,s,void 0),a=this.s;if(this.P&&(a?Mt(a=ge(a),this.P):a=this.P),null===this.o&&(o.H=a),this.ja)e:{for(var c=0,f=0;f<this.l.length;f++){var h=this.l[f];if(void 0===(h="__data__"in h.g&&"string"==typeof(h=h.g.__data__)?h.length:void 0))break;if(4096<(c+=h)){c=f;break e}if(4096===c||f===this.l.length-1){c=f+1;break e}}c=1e3}else c=1e3;c=rh(this,o,c),yt(f=ri(this.F),"RID",s),yt(f,"CVER",22),this.D&&yt(f,"X-HTTP-Session-Id",this.D),Bs(this,f),this.o&&a&&th(f,this.o,a),kn(this.i,o),this.Ra&&yt(f,"TYPE","init"),this.ja?(yt(f,"$req",c),yt(f,"SID","null"),o.$=!0,mt(o,f,null)):mt(o,f,c),this.G=2}}else 3==this.G&&(s?qr(this,s):0==this.l.length||Wo(this.i)||qr(this))},q.Ga=function(){if(this.u=null,oh(this),this.$&&!(this.L||null==this.g||0>=this.O)){var s=2*this.O;this.h.info("BP detection timer enabled: "+s),this.B=Ua(gt(this.bb,this),s)}},q.bb=function(){this.B&&(this.B=null,this.h.info("BP detection timeout reached."),this.h.info("Buffering proxy detected and switch to long-polling!"),this.N=!1,this.L=!0,In(10),Jl(this),oh(this))},q.ab=function(){null!=this.v&&(this.v=null,Jl(this),ic(this),In(19))},q.jb=function(s){s?(this.h.info("Successfully pinged google.com"),In(2)):(this.h.info("Failed to ping google.com"),In(1))},(q=ac.prototype).xa=function(){},q.wa=function(){},q.va=function(){},q.ua=function(){},q.Oa=function(){},Zl.prototype.g=function(s,o){return new it(s,o)},me(it,wt),it.prototype.m=function(){this.g.j=this.j,this.A&&(this.g.H=!0);var s=this.g,o=this.l,a=this.h||void 0;s.Wa&&(s.h.info("Origin Trials enabled."),zn(gt(s.hb,s,o))),In(0),s.W=o,s.aa=a||{},s.N=s.X,s.F=sc(s,null,s.W),ii(s)},it.prototype.close=function(){$a(this.g)},it.prototype.u=function(s){if("string"==typeof s){var o={};o.__data__=s,nh(this.g,o)}else this.v?((o={}).__data__=xe(s),nh(this.g,o)):nh(this.g,s)},it.prototype.M=function(){this.g.j=null,delete this.j,$a(this.g),delete this.g,it.Z.M.call(this)},me(Xl,ti),me(uh,mr),me(Rt,ac),Rt.prototype.xa=function(){ye(this.g,"a")},Rt.prototype.wa=function(s){ye(this.g,new Xl(s))},Rt.prototype.va=function(s){ye(this.g,new uh(s))},Rt.prototype.ua=function(){ye(this.g,"b")},Zl.prototype.createWebChannel=Zl.prototype.g,it.prototype.send=it.prototype.u,it.prototype.open=it.prototype.m,it.prototype.close=it.prototype.close,Ve.NO_ERROR=0,Ve.TIMEOUT=8,Ve.HTTP_ERROR=6,Ju.COMPLETE="complete",Hl.EventType=Yu,Yu.OPEN="a",Yu.CLOSE="b",Yu.ERROR="c",Yu.MESSAGE="d",wt.prototype.listen=wt.prototype.N,Yt.prototype.listenOnce=Yt.prototype.O,Yt.prototype.getLastError=Yt.prototype.La,Yt.prototype.getLastErrorCode=Yt.prototype.Da,Yt.prototype.getStatus=Yt.prototype.ba,Yt.prototype.getResponseJson=Yt.prototype.Qa,Yt.prototype.getResponseText=Yt.prototype.ga,Yt.prototype.send=Yt.prototype.ea;var Qo=Ve,br=Ju,lh=bi,za_PROXY=10,za_NOPROXY=11,Jo=Qn,An=Hl,ef=Yt,Zt=function(){function s(o,a){var c=this;this.previousValue=o,a&&(a.sequenceNumberHandler=function(f){return c.t(f)},this.i=function(f){return a.writeSequenceNumber(f)})}return s.prototype.t=function(o){return this.previousValue=Math.max(o,this.previousValue),this.previousValue},s.prototype.next=function(){var o=++this.previousValue;return this.i&&this.i(o),o},s}();Zt.o=-1;var U={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",UNIMPLEMENT
1ED:"unimplemented",INTERNAL:"internal",UNAVAILABLE:"unavailable",DATA_LOSS:"data-loss"},K=function(s){function o(a,c){var f=this;return(f=s.call(this,c)||this).code=a,f.message=c,f.name="FirebaseError",f.toString=function(){return f.name+": [code="+f.code+"]: "+f.message},f}return(0,C.ZT)(o,s),o}(Error),Ce=new Ee.Yd("@firebase/firestore");function dh(){return Ce.logLevel}function oe(s){for(var o=[],a=1;a<arguments.length;a++)o[a-1]=arguments[a];if(Ce.logLevel<=Ee.in.DEBUG){var c=o.map(uc);Ce.debug.apply(Ce,(0,C.ev)(["Firestore (8.10.0): "+s],c))}}function Xt(s){for(var o=[],a=1;a<arguments.length;a++)o[a-1]=arguments[a];if(Ce.logLevel<=Ee.in.ERROR){var c=o.map(uc);Ce.error.apply(Ce,(0,C.ev)(["Firestore (8.10.0): "+s],c))}}function Wa(s){for(var o=[],a=1;a<arguments.length;a++)o[a-1]=arguments[a];if(Ce.logLevel<=Ee.in.WARN){var c=o.map(uc);Ce.warn.apply(Ce,(0,C.ev)(["Firestore (8.10.0): "+s],c))}}function uc(s){if("string"==typeof s)return s;try{return JSON.stringify(s)}catch(a){return s}}function _e(s){void 0===s&&(s="Unexpected state");var o="FIRESTORE (8.10.0) INTERNAL ASSERTION FAILED: "+s;throw Xt(o),new Error(o)}function Fe(s,o){s||_e()}function F(s,o){return s}function ot(s){var o="undefined"!=typeof self&&(self.crypto||self.msCrypto),a=new Uint8Array(s);if(o&&"function"==typeof o.getRandomValues)o.getRandomValues(a);else for(var c=0;c<s;c++)a[c]=Math.floor(256*Math.random());return a}var Ci=function(){function s(){}return s.u=function(){for(var o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",a=Math.floor(256/o.length)*o.length,c="";c.length<20;
1)for(var f=ot(40),h=0;h<f.length;++h)c.length<20&&f[h]<a&&(c+=o.charAt(f[h]%o.length));return c},s}();function Se(s,o){return s<o?-1:s>o?1:0}function Yo(s,o,a){return s.length===o.length&&s.every(function(c,f){return a(c,o[f])})}function Us(s){return s+"\0"}var Ht=function(){function s(o,a){if(this.seconds=o,this.nanoseconds=a,a<0)throw new K(U.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+a);if(a>=1e9)throw new K(U.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+a);if(o<-62135596800)throw new K(U.INVALID_ARGUMENT,"Timestamp seconds out of range: "+o);if(o>=253402300800)throw new K(U.INVALID_ARGUMENT,"Timestamp seconds out of range: "+o)}return s.now=function(){return s.fromMillis(Date.now())},s.fromDate=function(o){return s.fromMillis(o.getTime())},s.fromMillis=function(o){var a=Math.floor(o/1e3);return new s(a,Math.floor(1e6*(o-1e3*a)))},s.prototype.toDate=function(){return new Date(this.toMillis())},s.prototype.toMillis=function(){return 1e3*this.seconds+this.nanoseconds/1e6},s.prototype._compareTo=function(o){return this.seconds===o.seconds?Se(this.nanoseconds,o.nanoseconds):Se(this.seconds,o.seconds)},s.prototype.isEqual=function(o){return o.seconds===this.seconds&&o.nanoseconds===this.nanoseconds},s.prototype.toString=function(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"},s.prototype.toJSON=function(){return{seconds:this.seconds,nanoseconds:this.nanoseconds}},s.prototype.valueOf=function(){return String(this.seconds- -62135596800).padStart(12,"0")+"."+String(this.nanoseconds).padStart(9,"0")},s}(),He=function(){function s(o){this.timestamp=o}return s.fromTimestamp=function(o){return new s(o)},s.min=function(){return new s(new Ht(0,0))},s.prototype.compareTo=function(o){return this.timestamp._compareTo(o.timestamp)},s.prototype.isEqual=function(o){return this.timestamp.isEqual(o.timestamp)},s.prototype.toMicroseconds=function(){return 1e6*this.timestamp.seconds+this.timestamp.nanoseconds/1e3},s.prototype.toString=function(){return"SnapshotVersion("+this.timestamp.toString()+")"},s.prototype.toTimestamp=function(){return this.timestamp},s}();function cc(s){var o=0;for(var a in s)Object.prototype.hasOwnProperty.call(s,a)&&o++;return o}function Hs(s,o){for(var a in s)Object.prototype.hasOwnProperty.call(s,a)&&o(a,s[a])}function hh(s){for(var o in s)if(Object.prototype.hasOwnProperty.call(s,o))return!1;return!0}var Ka=function(){function s(o,a,c){void 0===a?a=0:a>o.length&&_e(),void 0===c?c=o.length-a:c>o.length-a&&_e(),this.segments=o,this.offset=a,this.len=c}return Object.defineProperty(s.prototype,"length",{get:function(){return this.len},enumerable:!1,configurable:!0}),s.prototype.isEqual=function(o){return 0===s.comparator(this,o)},s.prototype.child=function(o){var a=this.segments.slice(this.offset,this.limit());return o instanceof s?o.forEach(function(c){a.push(c)}):a.push(o),this.construct(a)},s.prototype.limit=function(){return this.offset+this.length},s.prototype.popFirst=function(o){return this.construct(this.segments,this.offset+(o=void 0===o?1:o),this.length-o)},s.prototype.popLast=function(){return this.construct(this.segments,this.offset,this.length-1)},s.prototype.firstSegment=function(){return this.segments[this.offset]},s.prototype.lastSegment=function(){return this.get(this.length-1)},s.prototype.get=function(o){return this.segments[this.offset+o]},s.prototype.isEmpty=function(){return 0===this.length},s.prototype.isPrefixOf=function(o){if(o.length<this.length)return!1;for(var a=0;a<this.length;a++)if(this.get(a)!==o.get(a))return!1;return!0},s.prototype.isImmediateParentOf=function(o){if(this.length+1!==o.length)return!1;for(var a=0;a<this.length;a++)if(this.get(a)!==o.get(a))return!1;return!0},s.prototype.forEach=function(o){for(var a=this.offset,c=this.limit();a<c;a++)o(this.segments[a])},s.prototype.toArray=function(){return this.segments.slice(this.offset,this.limit())},s.comparator=function(o,a){for(var c=Math.min(o.length,a.length),f=0;f<c;f++){var h=o.get(f),g=a.get(f);if(h<g)return-1;if(h>g)return 1}return o.length<a.length?-1:o.length>a.length?1:0},s}(),tt=function(s){function o(){return null!==s&&s.apply(this,arguments)||this}return(0,C.ZT)(o,s),o.prototype.construct=function(a,c,f){return new o(a,c,f)},o.prototype.canonicalString=function(){return this.toArray().join("/")},o.prototype.toString=function(){return this.canonicalString()},o.fromString=function(){for(var a=[],c=0;c<arguments.length;c++)a[c]=arguments[c];for(var f=[],h=0,g=a;h<g.length;h++){var y=g[h];if(y.indexOf("//")>=0)throw new K(U.INVALID_ARGUMENT,"Invalid segment ("+y+"). Paths must not contain // in them.");f.push.apply(f,y.split("/").filter(function(_){return _.length>0}))}return new o(f)},o.emptyPath=function(){return new o([])},o}(Ka),Yn=/^[_a-zA-Z][_a-zA-Z0-9]*$/,cn=function(s){function o(){return null!==s&&s.apply(this,arguments)||this}return(0,C.ZT)(o,s),o.prototype.construct=function(a,c,f){return new o(a,c,f)},o.isValidIdentifier=function(a){return Yn.test(a)},o.prototype.canonicalString=function(){return this.toArray().map(function(a){return a=a.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),o.isValidIdentifier(a)||(a="`"+a+"`"),a}).join(".")},o.prototype.toString=function(){return this.canonicalString()},o.prototype.isKeyField=function(){return 1===this.length&&"__name__"===this.get(0)},o.keyField=function(){return new o(["__name__"])},o.fromServerFormat=function(a){for(var c=[],f="",h=0,g=function(){if(0===f.length)throw new K(U.INVALID_ARGUMENT,"Invalid field path ("+a+"). Paths must not be empty, begin with '.', end with '.', or contain '..'");c.push(f),f=""},y=!1;h<a.length;){var _=a[h];if("\\"===_){if(h+1===a.length)throw new K(U.INVALID_ARGUMENT,"Path has trailing escape character: "+a);var D=a[h+1];if("\\"!==D&&"."!==D&&"`"!==D)throw new K(U.INVALID_ARGUMENT,"Path has invali
1d escape sequence: "+a);f+=D,h+=2}else"`"===_?(y=!y,h++):"."!==_||y?(f+=_,h++):(g(),h++)}if(g(),y)throw new K(U.INVALID_ARGUMENT,"Unterminated ` in path: "+a);return new o(c)},o.emptyPath=function(){return new o([])},o}(Ka),Zo=function(){function s(o){this.fields=o,o.sort(cn.comparator)}return s.prototype.covers=function(o){for(var a=0,c=this.fields;a<c.length;a++)if(c[a].isPrefixOf(o))return!0;return!1},s.prototype.isEqual=function(o){return Yo(this.fields,o.fields,function(a,c){return a.isEqual(c)})},s}(),en=function(){function s(o){this.binaryString=o}return s.fromBase64String=function(o){return new s(atob(o))},s.fromUint8Array=function(o){return new s(function(a){for(var c="",f=0;f<a.length;++f)c+=String.fromCharCode(a[f]);return c}(o))},s.prototype.toBase64=function(){return btoa(this.binaryString)},s.prototype.toUint8Array=function(){return function(o){for(var a=new Uint8Array(o.length),c=0;c<o.length;c++)a[c]=o.charCodeAt(c);return a}(this.binaryString)},s.prototype.approximateByteSize=function(){return 2*this.binaryString.length},s.prototype.compareTo=function(o){return Se(this.binaryString,o.binaryString)},s.prototype.isEqual=function(o){return this.binaryString===o.binaryString},s}();en.EMPTY_BYTE_STRING=new en("");var Ii=new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);function co(s){if(Fe(!!s),"string"==typeof s){var o=0,a=Ii.exec(s);if(Fe(!!a),a[1]){var c=a[1];c=(c+"000000000").substr(0,9),o=Number(c)}var f=new Date(s);return{seconds:Math.floor(f.getTime()/1e3),nanos:o}}return{seconds:zt(s.seconds),nanos:zt(s.nanos)}}function zt(s){return"number"==typeof s?s:"string"==typeof s?Number(s):0}function Gs(s){return"string"==typeof s?en.fromBase64String(s):en.fromUint8Array(s)}function tf(s){var o,a;return"server_timestamp"===(null===(a=((null===(o=null==s?void 0:s.mapValue)||void 0===o?void 0:o.fields)||{}).__type__)||void 0===a?void 0:a.stringValue)}function lc(s){var o=s.mapValue.fields.__previous_value__;return tf(o)?lc(o):o}function Xo(s){var o=co(s.mapValue.fields.__local_write_time__.timestampValue);return new Ht(o.seconds,o.nanos)}function lo(s){return null==s}function qs(s){return 0===s&&1/s==-1/0}function ph(s){return"number"==typeof s&&Number.isInteger(s)&&!qs(s)&&s<=Number.MAX_SAFE_INTEGER&&s>=Number.MIN_SAFE_INTEGER}var De=function(){function s(o){this.path=o}return s.fromPath=function(o){return new s(tt.fromString(o))},s.fromName=function(o){return new s(tt.fromString(o).popFirst(5))},s.prototype.hasCollectionId=function(o){return this.path.length>=2&&this.path.get(this.path.length-2)===o},s.prototype.isEqual=function(o){return null!==o&&0===tt.comparator(this.path,o.path)},s.prototype.toString=function(){return this.path.toString()},s.comparator=function(o,a){return tt.comparator(o.path,a.path)},s.isDocumentKey=function(o){return o.length%2==0},s.fromSegments=function(o){return new s(new tt(o.slice()))},s}();function oi(s){return"nullValue"in s?0:"booleanValue"in s?1:"integerValue"in s||"doubleValue"in s?2:"timestampValue"in s?3:"stringValue"in s?5:"bytesValue"in s?6:"referenceValue"in s?7:"geoPointValue"in s?8:"arrayValue"in s?9:"mapValue"in s?tf(s)?4:10:_e()}function $r(s,o){var f,a=oi(s);if(a!==oi(o))return!1;switch(a){case 0:return!0;case 1:return s.booleanValue===o.booleanValue;case 4:return Xo(s).isEqual(Xo(o));case 3:return function(c,f){if("string"==typeof c.timestampValue&&"string"==typeof f.timestampValue&&c.timestampValue.length===f.timestampValue.length)return c.timestampValue===f.timestampValue;var h=co(c.timestampValue),g=co(f.timestampValue);return h.seconds===g.seconds&&h.nanos===g.nanos}(s,o);case 5:return s.stringValue===o.stringValue;case 6:return f=o,Gs(s.bytesValue).isEqual(Gs(f.bytesValue));case 7:return s.referenceValue===o.referenceValue;case 8:return function(c,f){return zt(c.geoPointValue.latitude)===zt(f.geoPointValue.latitude)&&zt(c.geoPointValue.longitude)===zt(f.geoPointValue.longitude)}(s,o);case 2:return function(c,f){if("integerValue"in c&&"integerValue"in f)return zt(c.integerValue)===zt(f.integerValue);if("doubleValue"in c&&"doubleValue"in f){var h=zt(c.doubleValue),g=zt(f.doubleValue);return h===g?qs(h)===qs(g):isNaN(h)&&isNaN(g)}return!1}(s,o);case 9:return Yo(s.arrayValue.values||[],o.arrayValue.values||[],$r);case 10:return function(c,f){var h=c.mapValue.fields||{},g=f.mapValue.fields||{};if(cc(h)!==cc(g))return!1;for(var y in h)if(h.hasOwnProperty(y)&&(void 0===g[y]||!$r(h[y],g[y])))return!1;return!0}(s,o);default:return _e()}}function $s(s,o){return void 0!==(s.values||[]).find(function(a){return $r(a,o)})}function es(s,o){var f,h,g,y,a=oi(s),c=oi(o);if(a!==c)return Se(a,c);switch(a){case 0:return 0;case 1:return Se(s.booleanValue,o.booleanValue);case 2:return h=o,(g=zt((f=s).integerValue||f.doubleValue))<(y=zt(h.integerValue||h.doubleValue))?-1:g>y?1:g===y?0:isNaN(g)?isNaN(y)?0:-1:1;case 3:return nf(s.timestampValue,o.timestampValue);case 4:return nf(Xo(s),Xo(o));case 5:return Se(s.stringValue,o.stringValue);case 6:return function(f,h){var g=Gs(f),y=Gs(h);return g.compareTo(y)}(s.bytesValue,o.bytesValue);case 7:return function(f,h){for(var g=f.split("/"),y=h.split("/"),_=0;_<g.length&&_<y.length;_++){var D=Se(g[_],y[_]);if(0!==D)return D}return Se(g.length,y.length)}(s.referenceValue,o.referenceValue);case 8:return function(f,h){var g=Se(zt(f.latitude),zt(h.latitude));return 0!==g?g:Se(zt(f.longitude),zt(h.longitude))}(s.geoPointValue,o.geoPointValue);case 9:return function(f,h){for(var g=f.values||[],y=h.values||[],_=0;_<g.length&&_<y.length;++_){var D=es(g[_],y[_]);if(D)return D}return Se(g.length,y.length)}(s.arrayValue,o.arrayValue);case 10:return function(f,h){var g=f.fields||{},y=Object.keys(g),_=h.fields||{},D=Object.keys(_);y.sort(),D.sort();for(var E=0;E<y.length&&E<D.length;++E){var T=Se(y[E],D[E]);if(0!==T)return T;var S=es(g[y[E]],_[D[E]]);if(0!==S)return S}return Se(y.length,D.length)}(s.mapValue,o.mapValue);default:throw _e()}}function nf(s,o){if("string"==typeof s&&"string"==typeof o&&s.length===o.length)return Se(s,o);var a=co(s),c=co(o),f=Se(a.seconds,c.seconds);return 0!==f?f:Se(a.nanos,c.nanos)}function zs(s){return rf(s)}function rf(s){return"nullValue"in s?"null":"booleanValue"in s?""+s.booleanValue:"integerValue"in s?""+s.integerValue:"doubleValue"in s?""+s.doubleValue:"timestampValue"in s?"time("+(f=co(s.timestampValue)).seconds+","+f.nanos+")":"stringValue"in s?s.stringValue:"bytesValue"in s?Gs(s.bytesValue).toBase64():"referenceValue"in s?De.fromName(s.referenceValue).toString():"geoPointValue"in s?"geo("+(o=s.geoPointValue).latitude+","+o.longitude+")":"arrayValue"in s?function(c){for(var f="[",h=!0,g=0,y=c.values||[];g<y.length;g++)h?h=!1:f+=",",f+=rf(y[g]);return f+"]"}(s.arrayValue):"mapValue"in s?function(c){for(var f="{",h=!0,g=0,y=Object.keys(c.fields||{}).sort();g<y.length;g++){var _=y[g];h?h=!1:f+=",",f+=_+":"+rf(c.fields[_])}return f+"}"}(s.mapValue):_e();var f,o}function fc(s,o){return{referenceValue:"projects/"+s.projectId+"/databases/"+s.database+"/documents/"+o.path.
1canonicalString()}}function Mn(s){return!!s&&"integerValue"in s}function si(s){return!!s&&"arrayValue"in s}function Gt(s){return!!s&&"nullValue"in s}function gh(s){return!!s&&"doubleValue"in s&&isNaN(Number(s.doubleValue))}function dc(s){return!!s&&"mapValue"in s}function Qa(s){if(s.geoPointValue)return{geoPointValue:Object.assign({},s.geoPointValue)};if(s.timestampValue&&"object"==typeof s.timestampValue)return{timestampValue:Object.assign({},s.timestampValue)};if(s.mapValue){var o={mapValue:{fields:{}}};return Hs(s.mapValue.fields,function(f,h){return o.mapValue.fields[f]=Qa(h)}),o}if(s.arrayValue){for(var a={arrayValue:{values:[]}},c=0;c<(s.arrayValue.values||[]).length;++c)a.arrayValue.values[c]=Qa(s.arrayValue.values[c]);return a}return Object.assign({},s)}var wr=function(){function s(o){this.value=o}return s.empty=function(){return new s({mapValue:{}})},s.prototype.field=function(o){if(o.isEmpty())return this.value;for(var a=this.value,c=0;c<o.length-1;++c)if(!dc(a=(a.mapValue.fields||{})[o.get(c)]))return null;return(a=(a.mapValue.fields||{})[o.lastSegment()])||null},s.prototype.set=function(o,a){this.getFieldsMap(o.popLast())[o.lastSegment()]=Qa(a)},s.prototype.setAll=function(o){var a=this,c=cn.emptyPath(),f={},h=[];o.forEach(function(y,_){if(!c.isImmediateParentOf(_)){var D=a.getFieldsMap(c);a.applyChanges(D,f,h),f={},h=[],c=_.popLast()}y?f[_.lastSegment()]=Qa(y):h.push(_.lastSegment())});var g=this.getFieldsMap(c);this.applyChanges(g,f,h)},s.prototype.delete=function(o){var a=this.field(o.popLast());dc(a)&&a.mapValue.fields&&delete a.mapValue.fields[o.lastSegment()]},s.prototype.isEqual=function(o){return $r(this.value,o.value)},s.prototype.getFieldsMap=function(o){var a=this.value;a.mapValue.fields||(a.mapValue={fields:{}});for(var c=0;c<o.length;++c){var f=a.mapValue.fields[o.get(c)];dc(f)&&f.mapValue.fields||(f={mapValue:{fields:{}}},a.mapValue.fields[o.get(c)]=f),a=f}return a.mapValue.fields},s.prototype.applyChanges=function(o,a,c){Hs(a,function(y,_){return o[y]=_});for(var f=0,h=c;f<h.length;f++)delete o[h[f]]},s.prototype.clone=function(){return new s(Qa(this.value))},s}();function mh(s){var o=[];return Hs(s.fields,function(a,c){var f=new cn([a]);if(dc(c)){var h=mh(c.mapValue).fields;if(0===h.length)o.push(f);else for(var g=0,y=h;g<y.length;g++)o.push(f.child(y[g]))}else o.push(f)}),new Zo(o)}var Nn=function(){function s(o,a,c,f,h){this.key=o,this.documentType=a,this.version=c,this.data=f,this.documentState=h}return s.newInvalidDocument=function(o){return new s(o,0,He.min(),wr.empty(),0)},s.newFoundDocument=function(o,a,c){return new s(o,1,a,c,0)},s.newNoDocument=function(o,a){return new s(o,2,a,wr.empty(),0)},s.newUnknownDocument=function(o,a){return new s(o,3,a,wr.empty(),2)},s.prototype.convertToFoundDocument=function(o,a){return this.version=o,this.documentType=1,this.data=a,this.documentState=0,this},s.prototype.convertToNoDocument=function(o){return this.version=o,this.documentType=2,this.data=wr.empty(),this.documentState=0,this},s.prototype.convertToUnknownDocument=function(o){return this.version=o,this.documentType=3,this.data=wr.empty(),this.documentState=2,this},s.prototype.setHasCommittedMutations=function(){return this.documentState=2,this},s.prototype.setHasLocalMutations=function(){return this.documentState=1,this},Object.defineProperty(s.prototype,"hasLocalMutations",{get:function(){return 1===this.documentState},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"hasCommittedMutations",{get:function(){return 2===this.documentState},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"hasPendingWrites",{get:function(){return this.hasLocalMutations||this.hasCommittedMutations},enumerable:!1,configurable:!0}),s.prototype.isValidDocument=function(){return 0!==this.documentType},s.prototype.isFoundDocument=function(){return 1===this.documentType},s.prototype.isNoDocument=function(){return 2===this.documentType},s.prototype.isUnknownDocument=function(){return 3===this.documentType},s.prototype.isEqual=function(o){return o instanceof s&&this.key.isEqual(o.key)&&this.version.isEqual(o.version)&&this.documentType===o.documentType&&this.documentState===o.documentState&&this.data.isEqual(o.data)},s.prototype.clone=function(){return new s(this.key,this.documentType,this.version,this.data.clone(),this.documentState)},s.prototype.toString=function(){return"Document("+this.key+", "+this.version+", "+JSON.stringify(this.data.value)+", {documentType: "+this.documentType+"}
1), {documentState: "+this.documentState+"})"},s}(),hc=function(s,o,a,c,f,h,g){void 0===o&&(o=null),void 0===a&&(a=[]),void 0===c&&(c=[]),void 0===f&&(f=null),void 0===h&&(h=null),void 0===g&&(g=null),this.path=s,this.collectionGroup=o,this.orderBy=a,this.filters=c,this.limit=f,this.startAt=h,this.endAt=g,this.h=null};function Ja(s,o,a,c,f,h,g){return void 0===o&&(o=null),void 0===a&&(a=[]),void 0===c&&(c=[]),void 0===f&&(f=null),void 0===h&&(h=null),void 0===g&&(g=null),new hc(s,o,a,c,f,h,g)}function fo(s){var o=F(s);if(null===o.h){var a=o.path.canonicalString();null!==o.collectionGroup&&(a+="|cg:"+o.collectionGroup),a+="|f:",a+=o.filters.map(function(c){return(f=c).field.canonicalString()+f.op.toString()+zs(f.value);var f}).join(","),a+="|ob:",a+=o.orderBy.map(function(c){return(f=c).field.canonicalString()+f.dir;var f}).join(","),lo(o.limit)||(a+="|l:",a+=o.limit),o.startAt&&(a+="|lb:",a+=sf(o.startAt)),o.endAt&&(a+="|ub:",a+=sf(o.endAt)),o.h=a}return o.h}function Ws(s,o){if(s.limit!==o.limit||s.orderBy.length!==o.orderBy.length)return!1;for(var a=0;a<s.orderBy.length;a++)if(!vh(s.orderBy[a],o.orderBy[a]))return!1;if(s.filters.length!==o.filters.length)return!1;for(var c=0;c<s.filters.length;c++)if((f=s.filters[c]).op!==(h=o.filters[c]).op||!f.field.isEqual(h.field)||!$r(f.value,h.value))return!1;var f,h;return s.collectionGroup===o.collectionGroup&&!!s.path.isEqual(o.path)&&!!eu(s.startAt,o.startAt)&&eu(s.endAt,o.endAt)}function Ya(s){return De.isDocumentKey(s.path)&&null===s.collectionGroup&&0===s.filters.length}var Dr=function(s){function o(a,c,f){var h=this;return(h=s.call(this)||this).field=a,h.op=c,h.value=f,h}return(0,C.ZT)(o,s),o.create=function(a,c,f){return a.isKeyField()?"in"===c||"not-in"===c?this.l(a,c,f):new ho(a,c,f):"array-contains"===c?new Xa(a,f):"in"===c?new of(a,f):"not-in"===c?new Im(a,f):"array-contains-any"===c?new Tm(a,f):new o(a,c,f)},o.l=function(a,c,f){return"in"===c?new Za(a,f):new Cm(a,f)},o.prototype.matches=function(a){var c=a.data.field(this.field);return"!="===this.op?null!==c&&this.m(es(c,this.value)):null!==c&&oi(this.value)===oi(c)&&this.m(es(c,this.value))},o.prototype.m=function(a){switch(this.op){case"<":return a<0;case"<=":return a<=0;case"==":return 0===a;case"!=":return 0!==a;case">":return a>0;case">=":return a>=0;default:return _e()}},o.prototype.g=function(){return["<","<=",">",">=","!=","not-in"].indexOf(this.op)>=0},o}(function(){}),ho=function(s){function o(a,c,f){var h=this;return(h=s.call(this,a,c,f)||this).key=De.fromName(f.referenceValue),h}return(0,C.ZT)(o,s),o.prototype.matches=function(a){var c=De.comparator(a.key,this.key);return this.m(c)},o}(Dr),Za=function(s){function o(a,c){var f=this;return(f=s.call(this,a,"in",c)||this).keys=yh(0,c),f}return(0,C.ZT)(o,s),o.prototype.matches=function(a){return this.keys.some(function(c){return c.isEqual(a.key)})},o}(Dr),Cm=function(s){function o(a,c){var f=this;return(f=s.call(this,a,"not-in",c)||this).keys=yh(0,c),f}return(0,C.ZT)(o,s),o.prototype.matches=function(a){return!this.keys.some(function(c){return c.isEqual(a.key)})},o}(Dr);function yh(s,o){var a;return((null===(a=o.arrayValue)||void 0===a?void 0:a.values)||[]).map(function(c){return De.fromName(c.referenceValue)})}var Xa=function(s){function o(a,c){return s.call(this,a,"array-contains",c)||this}return(0,C.ZT)(o,s),o.prototype.matches=function(a){var c=a.data.field(this.field);return si(c)&&$s(c.arrayValue,this.value)},o}(Dr),of=function(s){function o(a,c){return s.call(this,a,"in",c)||this}return(0,C.ZT)(o,s),o.prototype.matches=function(a){var c=a.data.field(this.field);return null!==c&&$s(this.value.arrayValue,c)},o}(Dr),Im=function(s){function o(a,c){return s.call(this,a,"not-in",c)||this}return(0,C.ZT)(o,s),o.prototype.matches=function(a){if($s(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;var c=a.data.field(this.field);return null!==c&&!$s(this.value.arrayValue,c)},o}(Dr),Tm=function(s){function o(a,c){return s.call(this,a,"array-contains-any",c)||this}return(0,C.ZT)(o,s),o.prototype.matches=function(a){var c=this,f=a.data.field(this.field);return!(!si(f)||!f.arrayValue.values)&&f.arrayValue.values.some(function(h){return $s(c.value.arrayValue,h)})},o}(Dr),pc=function(s,o){this.position=s,this.before=o};function sf(s){return(s.before?"b":"a")+":"+s.position.map(function(o){return zs(o)}).join(",")}var Ti=function(s,o){void 0===o&&(o="asc"),this.field=s,this.dir=o};function vh(s,o){return s.dir===o.dir&&s.field.isEqual(o.field)}function gc(s,o,a){for(var c=0,f=0;f<s.position.length;f++){var h=o[f],g=s.position[f];
1if(c=h.field.isKeyField()?De.comparator(De.fromName(g.referenceValue),a.key):es(g,a.data.field(h.field)),"desc"===h.dir&&(c*=-1),0!==c)break}return s.before?c<=0:c<0}function eu(s,o){if(null===s)return null===o;if(null===o||s.before!==o.before||s.position.length!==o.position.length)return!1;for(var a=0;a<s.position.length;a++)if(!$r(s.position[a],o.position[a]))return!1;return!0}var ai=function(s,o,a,c,f,h,g,y){void 0===o&&(o=null),void 0===a&&(a=[]),void 0===c&&(c=[]),void 0===f&&(f=null),void 0===h&&(h="F"),void 0===g&&(g=null),void 0===y&&(y=null),this.path=s,this.collectionGroup=o,this.explicitOrderBy=a,this.filters=c,this.limit=f,this.limitType=h,this.startAt=g,this.endAt=y,this.p=null,this.T=null};function af(s,o,a,c,f,h,g,y){return new ai(s,o,a,c,f,h,g,y)}function zr(s){return new ai(s)}function mc(s){return!lo(s.limit)&&"F"===s.limitType}function Si(s){return!lo(s.limit)&&"L"===s.limitType}function tu(s){return s.explicitOrderBy.length>0?s.explicitOrderBy[0].field:null}function Ks(s){for(var o=0,a=s.filters;o<a.length;o++){var c=a[o];if(c.g())return c.field}return null}function _h(s){return null!==s.collectionGroup}function ts(s){var o=F(s);if(null===o.p){o.p=[];var a=Ks(o),c=tu(o);if(null!==a&&null===c)a.isKeyField()||o.p.push(new Ti(a)),o.p.push(new Ti(cn.keyField(),"asc"));else{for(var f=!1,h=0,g=o.explicitOrderBy;h<g.length;h++){var y=g[h];o.p.push(y),y.field.isKeyField()&&(f=!0)}if(!f){var _=o.explicitOrderBy.length>0?o.explicitOrderBy[o.explicitOrderBy.length-1].dir:"asc";o.p.push(new Ti(cn.keyField(),_))}}}return o.p}function Er(s){var o=F(s);if(!o.T)if("F"===o.limitType)o.T=Ja(o.path,o.collectionGroup,ts(o),o.filters,o.limit,o.startAt,o.endAt);else{for(var a=[],c=0,f=ts(o);c<f.length;c++){var h=f[c];a.push(new Ti(h.field,"desc"===h.dir?"asc":"desc"))}var y=o.endAt?new pc(o.endAt.position,!o.endAt.before):null,_=o.startAt?new pc(o.startAt.position,!o.startAt.before):null;o.T=Ja(o.path,o.collectionGroup,a,o.filters,o.limit,y,_)}return o.T}function bh(s,o,a){return new ai(s.path,s.collectionGroup,s.explicitOrderBy.slice(),s.filters.slice(),o,a,s.startAt,s.endAt)}function nu(s,o){return Ws(Er(s),Er(o))&&s.limitType===o.limitType}function Qs(s){return fo(Er(s))+"|lt:"+s.limitType}function ru(s){return"Query(target="+(a=(o=Er(s)).path.canonicalString(),null!==o.collectionGroup&&(a+=" collectionGroup="+o.collectionGroup),o.filters.length>0&&(a+=", filters: ["+o.filters.map(function(c){return(f=c).field.canonicalString()+" "+f.op+" "+zs(f.value);var f}).join(", ")+"]"),lo(o.limit)||(a+=", limit: "+o.limit),o.orderBy.length>0&&(a+=", orderBy: ["+o.orderBy.map(function(c){return(f=c).field.canonicalString()+" ("+f.dir+")";var f}).join(", ")+"]"),o.startAt&&(a+=", startAt: "+sf(o.startAt)),o.endAt&&(a+=", endAt: "+sf(o.endAt)),"Target("+a+"); limitType=")+s.limitType+")";var o,a}function ns(s,o){return o.isFoundDocument()&&(f=(c=o).key.path,null!==(a=s).collectionGroup?c.key.hasCollectionId(a.collectionGroup)&&a.path.isPrefixOf(f):De.isDocumentKey(a.path)?a.path.isEqual(f):a.path.isImmediateParentOf(f))&&function(a,c){for(var f=0,h=a.explicitOrderBy;f<h.length;f++){var g=h[f];if(!g.field.isKeyField()&&null===c.data.field(g.field))return!1}return!0}(s,o)&&function(a,c){for(var f=0,h=a.filters;f<h.length;f++)if(!h[f].matches(c))return!1;return!0}(s,o)&&function(a,c){return!(a.startAt&&!gc(a.startAt,ts(a),c)||a.endAt&&gc(a.endAt,ts(a),c))}(s,o);var a,c,f}function iu(s){return function(o,a){for(var c=!1,f=0,h=ts(s);f<h.length;f++){var g=h[f],y=yc(g,o,a);if(0!==y)return y;c=c||g.field.isKeyField()}return 0}}function yc(s,o,a){var f,g,y,_,c=s.field.isKeyField()?De.comparator(o.key,a.key):(g=a,y=o.data.field(f=s.field),_=g.data.field(f),null!==y&&null!==_?es(y,_):_e());switch(s.dir){case"asc":return c;
1case"desc":return-1*c;default:return _e()}}function wh(s,o){if(s.I){if(isNaN(o))return{doubleValue:"NaN"};if(o===1/0)return{doubleValue:"Infinity"};if(o===-1/0)return{doubleValue:"-Infinity"}}return{doubleValue:qs(o)?"-0":o}}function uf(s){return{integerValue:""+s}}function cf(s,o){return ph(o)?uf(o):wh(s,o)}var ou=function(){this._=void 0};function Dh(s,o,a){return s instanceof Ai?(h={fields:{__type__:{stringValue:"server_timestamp"},__local_write_time__:{timestampValue:{seconds:(c=a).seconds,nanos:c.nanoseconds}}}},(f=o)&&(h.fields.__previous_value__=f),{mapValue:h}):s instanceof Wr?Ch(s,o):s instanceof po?lf(s,o):function(c,f){var h=Eh(c,f),g=Zn(h)+Zn(c.A);return Mn(h)&&Mn(c.A)?uf(g):wh(c.R,g)}(s,o);var c,f,h}function Sm(s,o,a){return s instanceof Wr?Ch(s,o):s instanceof po?lf(s,o):a}function Eh(s,o){return s instanceof Kr?Mn(a=o)||(c=a)&&"doubleValue"in c?o:{integerValue:0}:null;var c,a}var Ai=function(s){function o(){return null!==s&&s.apply(this,arguments)||this}return(0,C.ZT)(o,s),o}(ou),Wr=function(s){function o(a){var c=this;return(c=s.call(this)||this).elements=a,c}return(0,C.ZT)(o,s),o}(ou);function Ch(s,o){for(var a=vc(o),c=function(g){a.some(function(y){return $r(y,g)})||a.push(g)},f=0,h=s.elements;f<h.length;f++)c(h[f]);return{arrayValue:{values:a}}}var po=function(s){function o(a){var c=this;return(c=s.call(this)||this).elements=a,c}return(0,C.ZT)(o,s),o}(ou);function lf(s,o){for(var a=vc(o),c=function(g){a=a.filter(function(y){return!$r(y,g)}
1)},f=0,h=s.elements;f<h.length;f++)c(h[f]);return{arrayValue:{values:a}}}var Kr=function(s){function o(a,c){var f=this;return(f=s.call(this)||this).R=a,f.A=c,f}return(0,C.ZT)(o,s),o}(ou);function Zn(s){return zt(s.integerValue||s.doubleValue)}function vc(s){return si(s)&&s.arrayValue.values?s.arrayValue.values.slice():[]}var rs=function(s,o){this.field=s,this.transform=o},Js=function(s,o){this.version=s,this.transformResults=o},Wt=function(){function s(o,a){this.updateTime=o,this.exists=a}return s.none=function(){return new s},s.exists=function(o){return new s(void 0,o)},s.updateTime=function(o){return new s(o)},Object.defineProperty(s.prototype,"isNone",{get:function(){return void 0===this.updateTime&&void 0===this.exists},enumerable:!1,configurable:!0}),s.prototype.isEqual=function(o){return this.exists===o.exists&&(this.updateTime?!!o.updateTime&&this.updateTime.isEqual(o.updateTime):!o.updateTime)},s}();function Mi(s,o){return void 0!==s.updateTime?o.isFoundDocument()&&o.version.isEqual(s.updateTime):void 0===s.exists||s.exists===o.isFoundDocument()}var su=function(){};function ff(s,o,a){var c,f,h,g,y;s instanceof _c?(f=o,h=a,g=(c=s).value.clone(),y=Mm(c.fieldTransforms,f,h.transformResults),g.setAll(y),f.convertToFoundDocument(h.version,g).setHasCommittedMutations()):s instanceof is?function(c,f,h){if(Mi(c.precondition,f)){var g=Mm(c.fieldTransforms,f,h.transformResults),y=f.data;y.setAll(Am(c)),y.setAll(g),f.convertToFoundDocument(h.version,y).setHasCommittedMutations()}else f.convertToUnknownDocument(h.version)}(s,o,a):function(c,f,h){f.convertToNoDocument(h.version).setHasCommittedMutations()}(0,o,a)}function go(s,o,a){var f;s instanceof _c?function(c,f,h){if(Mi(c.precondition,f)){var g=c.value.clone(),y=Nm(c.fieldTransforms,h,f);g.setAll(y),f.convertToFoundDocument(We(f),g).setHasLocalMutations()}}(s,o,a):s instanceof is?function(c,f,h){if(Mi(c.precondition,f)){var g=Nm(c.fieldTransforms,h,f),y=f.data;y.setAll(Am(c)),y.setAll(g),f.convertToFoundDocument(We(f),y).setHasLocalMutations()}}(s,o,a):Mi(s.precondition,f=o)&&f.convertToNoDocument(He.min())}function z_(s,o){for(var a=null,c=0,f=s.fieldTransforms;c<f.length;c++){var h=f[c],g=o.data.field(h.field),y=Eh(h.transform,g||null);null!=y&&(null==a&&(a=wr.empty()),a.set(h.field,y))}return a||null}function Ih(s,o){return s.type===o.type&&!!s.key.isEqual(o.key)&&!!s.precondition.isEqual(o.precondition)&&(c=o.fieldTransforms,!!(void 0===(a=s.fieldTransforms)&&void 0===c||a&&c&&Yo(a,c,function(f,h){return(g=f).field.isEqual((y=h).field)&&(D=y.transform,(_=g.transform)instanceof Wr&&D instanceof Wr||_ instanceof po&&D instanceof po?Yo(_.elements,D.elements,$r):_ instanceof Kr&&D instanceof Kr?$r(_.A,D.A):_ instanceof Ai&&D instanceof Ai);var g,y,_,D})))&&(0===s.type?s.value.isEqual(o.value):1!==s.type||s.data.isEqual(o.data)&&s.fieldMask.isEqual(o.fieldMask));var a,c}function We(s){return s.isFoundDocument()?s.version:He.min()}var _c=function(s){function o(a,c,f,h){void 0===h&&(h=[]);var g=this;return(g=s.call(this)||this).key=a,g.value=c,g.precondition=f,g.fieldTransforms=h,g.type=0,g}return(0,C.ZT)(o,s),o}(su),is=function(s){function o(a,c,f,h,g){void 0===g&&(g=[]);var y=this;return(y=s.call(this)||this).key=a,y.data=c,y.fieldMask=f,y.precondition=h,y.fieldTransforms=g,y.type=1,y}return(0,C.ZT)(o,s),o}(su);function Am(s){var o=new Map;return s.fieldMask.fields.forEach(function(a){if(!a.isEmpty()){var c=s.data.field(a);o.set(a,c)}}),o}function Mm(s,o,a){var c=new Map;Fe(s.length===a.length);for(var f=0;f<a.length;f++){var h=s[f],g=h.transform,y=o.data.field(h.field);c.set(h.field,Sm(g,y,a[f]))}return c}function Nm(s,o,a){for(var c=new Map,f=0,h=s;f<h.length;f++){var g=h[f],y=g.transform,_=a.data.field(g.field);c.set(g.field,Dh(y,_,o))}return c}var ln,ct,Ni=function(s){function o(a,c){var f=this;return(f=s.call(this)||this).key=a,f.precondition=c,f.type=2,f.fieldTransforms=[],f}return(0,C.ZT)(o,s),o}(su),Th=function(s){function o(a,c){var f=this;return(f=s.call(this)||this).key=a,f.precondition=c,f.type=3,f.fieldTransforms=[],f}return(0,C.ZT)(o,s),o}(su),fn=function(s){this.count=s};function bc(s){switch(s){case U.OK:return _e();case U.CANCELLED:case U.UNKNOWN:case U.DEADLINE_EXCEEDED:case U.RESOURCE_EXHAUSTED:case U.INTERNAL:case U.UNAVAILABLE:case U.UNAUTHENTICATED:return!1;case U.INVALID_ARGUMENT:case U.NOT_FOUND:case U.ALREADY_EXISTS:case U.PERMISSION_DENIED:case U.FAILED_PRECONDITION:case U.ABORTED:case U.OUT_OF_RANGE:case U.UNIMPLEMENT
1ED:case U.DATA_LOSS:return!0;default:return _e()}}function Ys(s){if(void 0===s)return Xt("GRPC error has no .code"),U.UNKNOWN;switch(s){case ln.OK:return U.OK;case ln.CANCELLED:return U.CANCELLED;case ln.UNKNOWN:return U.UNKNOWN;case ln.DEADLINE_EXCEEDED:return U.DEADLINE_EXCEEDED;case ln.RESOURCE_EXHAUSTED:return U.RESOURCE_EXHAUSTED;case ln.INTERNAL:return U.INTERNAL;case ln.UNAVAILABLE:return U.UNAVAILABLE;case ln.UNAUTHENTICATED:return U.UNAUTHENTICATED;case ln.INVALID_ARGUMENT:return U.INVALID_ARGUMENT;case ln.NOT_FOUND:return U.NOT_FOUND;case ln.ALREADY_EXISTS:return U.ALREADY_EXISTS;case ln.PERMISSION_DENIED:return U.PERMISSION_DENIED;case ln.FAILED_PRECONDITION:return U.FAILED_PRECONDITION;case ln.ABORTED:return U.ABORTED;case ln.OUT_OF_RANGE:return U.OUT_OF_RANGE;case ln.UNIMPLEMENTED:return U.UNIMPLEMENTED;case ln.DATA_LOSS:return U.DATA_LOSS;default:return _e()}}(ct=ln||(ln={}))[ct.OK=0]="OK",ct[ct.CANCELLED=1]="CANCELLED",ct[ct.UNKNOWN=2]="UNKNOWN",ct[ct.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",ct[ct.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",ct[ct.NOT_FOUND=5]="NOT_FOUND",ct[ct.ALREADY_EXISTS=6]="ALREADY_EXISTS",ct[ct.PERMISSION_DENIED=7]="PERMISSION_DENIED",ct[ct.UNAUTHENTICATED=16]="UNAUTHENTICATED",ct[ct.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",ct[ct.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",ct[ct.ABORTED=10]="ABORTED",ct[ct.OUT_OF_RANGE=11]="OUT_OF_RANGE",ct[ct.UNIMPLEMENTED=12]="UNIMPLEMENTED",ct[ct.INTERNAL=13]="INTERNAL",ct[ct.UNAVAILABLE=14]="UNAVAILABLE",ct[ct.DATA_LOSS=15]="DATA_LOSS";var Xn=function(){function s(o,a){this.comparator=o,this.root=a||dn.EMPTY}return s.prototype.insert=function(o,a){return new s(this.comparator,this.root.insert(o,a,this.comparator).copy(null,null,dn.BLACK,null,null))},s.prototype.remove=function(o){return new s(this.comparator,this.root.remove(o,this.comparator).copy(null,null,dn.BLACK,null,null))},s.prototype.get=function(o){for(var a=this.root;!a.isEmpty();){var c=this.comparator(o,a.key);if(0===c)return a.value;c<0?a=a.left:c>0&&(a=a.right)}return null},s.prototype.indexOf=function(o){for(var a=0,c=this.root;!c.isEmpty();){var f=this.comparator(o,c.key);if(0===f)return a+c.left.size;f<0?c=c.left:(a+=c.left.size+1,c=c.right)}return-1},s.prototype.isEmpty=function(){return this.root.isEmpty()},Object.defineProperty(s.prototype,"size",{get:function(){return this.root.size},enumerable:!1,configurable:!0}),s.prototype.minKey=function(){return this.root.minKey()},s.prototype.maxKey=function(){return this.root.maxKey()},s.prototype.inorderTraversal=function(o){return this.root.inorderTraversal(o)},s.prototype.forEach=function(o){this.inorderTraversal(function(a,c){return o(a,c),!1})},s.prototype.toString=function(){var o=[];return this.inorderTraversal(function(a,c){return o.push(a+":"+c),!1}),"{"+o.join(", ")+"}"},s.prototype.reverseTraversal=function(o){return this.root.reverseTraversal(o)},s.prototype.getIterator=function(){return new wc(this.root,null,this.comparator,!1)},s.prototype.getIteratorFrom=function(o){return new wc(this.root,o,this.comparator,!1)},s.prototype.getReverseIterator=function(){return new wc(this.root,null,this.comparator,!0)},s.prototype.getReverseIteratorFrom=function(o){return new wc(this.root,o,this.comparator,!0)},s}(),wc=function(){function s(o,a,c,f){this.isReverse=f,this.nodeStack=[];for(var h=1;!o.isEmpty();)if(h=a?c(o.key,a):1,f&&(h*=-1),h<0)o=this.isReverse?o.left:o.right;else{if(0===h){this.nodeStack.push(o);break}this.nodeStack.push(o),o=this.isReverse?o.right:o.left}}return s.prototype.getNext=function(){var o=this.nodeStack.pop(),a={key:o.key,value:o.value};if(this.isReverse)for(o=o.left;!o.isEmpty();)this.nodeStack.push(o),o=o.right;else for(o=o.right;!o.isEmpty();)this.nodeStack.push(o),o=o.left;return a},s.prototype.hasNext=function(){return this.nodeStack.length>0},s.prototype.peek=function(){if(0===this.nodeStack.length)return null;var o=this.nodeStack[this.nodeStack.length-1];return{key:o.key,value:o.value}},s}(),dn=function(){function s(o,a,c,f,h){this.key=o,this.value=a,this.color=null!=c?c:s.RED,this.left=null!=f?f:s.EMPTY,this.right=null!=h?h:s.EMPTY,this.size=this.left.size+1+this.right.size}return s.prototype.copy=function(o,a,c,f,h){return new s(null!=o?o:this.key,null!=a?a:this.value,
1null!=c?c:this.color,null!=f?f:this.left,null!=h?h:this.right)},s.prototype.isEmpty=function(){return!1},s.prototype.inorderTraversal=function(o){return this.left.inorderTraversal(o)||o(this.key,this.value)||this.right.inorderTraversal(o)},s.prototype.reverseTraversal=function(o){return this.right.reverseTraversal(o)||o(this.key,this.value)||this.left.reverseTraversal(o)},s.prototype.min=function(){return this.left.isEmpty()?this:this.left.min()},s.prototype.minKey=function(){return this.min().key},s.prototype.maxKey=function(){return this.right.isEmpty()?this.key:this.right.maxKey()},s.prototype.insert=function(o,a,c){var f=this,h=c(o,f.key);return(f=h<0?f.copy(null,null,null,f.left.insert(o,a,c),null):0===h?f.copy(null,a,null,null,null):f.copy(null,null,null,null,f.right.insert(o,a,c))).fixUp()},s.prototype.removeMin=function(){if(this.left.isEmpty())return s.EMPTY;var o=this;return o.left.isRed()||o.left.left.isRed()||(o=o.moveRedLeft()),(o=o.copy(null,null,null,o.left.removeMin(),null)).fixUp()},s.prototype.remove=function(o,a){var c,f=this;if(a(o,f.key)<0)f.left.isEmpty()||f.left.isRed()||f.left.left.isRed()||(f=f.moveRedLeft()),f=f.copy(null,null,null,f.left.remove(o,a),null);else{if(f.left.isRed()&&(f=f.rotateRight()),f.right.isEmpty()||f.right.isRed()||f.right.left.isRed()||(f=f.moveRedRight()),0===a(o,f.key)){if(f.right.isEmpty())return s.EMPTY;c=f.right.min(),f=f.copy(c.key,c.value,null,null,f.right.removeMin())}f=f.copy(null,null,null,null,f.right.remove(o,a))}return f.fixUp()},s.prototype.isRed=function(){return this.color},s.prototype.fixUp=function(){var o=this;return o.right.isRed()&&!o.left.isRed()&&(o=o.rotateLeft()),o.left.isRed()&&o.left.left.isRed()&&(o=o.rotateRight()),o.left.isRed()&&o.right.isRed()&&(o=o.colorFlip()),o},s.prototype.moveRedLeft=function(){var o=this.colorFlip();return o.right.left.isRed()&&(o=(o=(o=o.copy(null,null,null,null,o.right.rotateRight())).rotateLeft()).colorFlip()),o},s.prototype.moveRedRight=function(){var o=this.colorFlip();return o.left.left.isRed()&&(o=(o=o.rotateRight()).colorFlip()),o},s.prototype.rotateLeft=function(){var o=this.copy(null,null,s.RED,null,this.right.left);return this.right.copy(null,null,this.color,o,null)},s.prototype.rotateRight=function(){var o=this.copy(null,null,s.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,o)},s.prototype.colorFlip=function(){var o=this.left.copy(null,null,!this.left.color,null,null),a=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,o,a)},s.prototype.checkMaxDepth=function(){var o=this.check();return Math.pow(2,o)<=this.size+1},s.prototype.check=function(){if(this.isRed()&&this.left.isRed()||this.right.isRed())throw _e();var o=this.left.check();if(o!==this.right.check())throw _e();return o+(this.isRed()?0:1)},s}();dn.EMPTY=null,dn.RED=!0,dn.BLACK=!1,dn.EMPTY=new(function(){function s(){this.size=0}return Object.defineProperty(s.prototype,"key",{get:function(){throw _e()},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"value",{get:function(){throw _e()},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"color",{get:function(){throw _e()},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"left",{get:function(){throw _e()},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"right",{get:function(){throw _e()},enumerable:!1,configurable:!0}),s.prototype.copy=function(o,a,c,f,h){return this},s.prototype.insert=function(o,a,c){return new dn(o,a)},s.prototype.remove=function(o,a){return this},s.prototype.isEmpty=function(){return!0},s.prototype.inorderTraversal=function(o){return!1},s.prototype.reverseTraversal=function(o){return!1},s.prototype.minKey=function(){return null},s.prototype.maxKey=function(){return null},s.prototype.isRed=function(){return!1},s.prototype.checkMaxDepth=function(){return!0},s.prototype.check=function(){return 0},s}());var Et=function(){function s(o){this.comparator=o,this.data=new Xn(this.comparator)}return s.prototype.has=function(o){return null!==this.data.get(o)},s.prototype.first=function(){return this.data.minKey()},s.prototype.last=function(){return this.data.maxKey()},Object.defineProperty(s.prototype,"size",{get:function(){return this.data.size}
1,enumerable:!1,configurable:!0}),s.prototype.indexOf=function(o){return this.data.indexOf(o)},s.prototype.forEach=function(o){this.data.inorderTraversal(function(a,c){return o(a),!1})},s.prototype.forEachInRange=function(o,a){for(var c=this.data.getIteratorFrom(o[0]);c.hasNext();){var f=c.getNext();if(this.comparator(f.key,o[1])>=0)return;a(f.key)}},s.prototype.forEachWhile=function(o,a){var c;for(c=void 0!==a?this.data.getIteratorFrom(a):this.data.getIterator();c.hasNext();)if(!o(c.getNext().key))return},s.prototype.firstAfterOrEqual=function(o){var a=this.data.getIteratorFrom(o);return a.hasNext()?a.getNext().key:null},s.prototype.getIterator=function(){return new df(this.data.getIterator())},s.prototype.getIteratorFrom=function(o){return new df(this.data.getIteratorFrom(o))},s.prototype.add=function(o){return this.copy(this.data.remove(o).insert(o,!0))},s.prototype.delete=function(o){return this.has(o)?this.copy(this.data.remove(o)):this},s.prototype.isEmpty=function(){return this.data.isEmpty()},s.prototype.unionWith=function(o){var a=this;return a.size<o.size&&(a=o,o=this),o.forEach(function(c){a=a.add(c)}),a},s.prototype.isEqual=function(o){if(!(o instanceof s)||this.size!==o.size)return!1;for(var a=this.data.getIterator(),c=o.data.getIterator();a.hasNext();){var f=a.getNext().key,h=c.getNext().key;if(0!==this.comparator(f,h))return!1}return!0},s.prototype.toArray=function(){var o=[];return this.forEach(function(a){o.push(a)}),o},s.prototype.toString=function(){var o=[];return this.forEach(function(a){return o.push(a)}),"SortedSet("+o.toString()+")"},s.prototype.copy=function(o){var a=new s(this.comparator);return a.data=o,a},s}
1(),df=function(){function s(o){this.iter=o}return s.prototype.getNext=function(){return this.iter.getNext().key},s.prototype.hasNext=function(){return this.iter.hasNext()},s}(),Dc=new Xn(De.comparator);function Ln(){return Dc}var Sh=new Xn(De.comparator);function hf(){return Sh}var xm=new Xn(De.comparator);function Fm(){return xm}var W_=new Et(De.comparator);function vt(){for(var s=[],o=0;o<arguments.length;o++)s[o]=arguments[o];for(var a=W_,c=0,f=s;c<f.length;c++){var h=f[c];a=a.add(h)}return a}var Cr=new Et(Se);function Zs(){return Cr}var mo=function(){function s(o,a,c,f,h){this.snapshotVersion=o,this.targetChanges=a,this.targetMismatches=c,this.documentUpdates=f,this.resolvedLimboDocuments=h}return s.createSynthesizedRemoteEventForCurrentChange=function(o,a){var c=new Map;return c.set(o,Ah.createSynthesizedTargetChangeForCurrentChange(o,a)),new s(He.min(),c,Zs(),Ln(),vt())},s}(),Ah=function(){function s(o,a,c,f,h){this.resumeToken=o,this.current=a,this.addedDocuments=c,this.modifiedDocuments=f,this.removedDocuments=h}return s.createSynthesizedTargetChangeForCurrentChange=function(o,a){return new s(en.EMPTY_BYTE_STRING,a,vt(),vt(),vt())},s}(),au=function(s,o,a,c){this.v=s,this.removedTargetIds=o,this.key=a,this.P=c},Mh=function(s,o){this.targetId=s,this.V=o},Nh=function(s,o,a,c){void 0===a&&(a=en.EMPTY_BYTE_STRING),void 0===c&&(c=null),this.state=s,this.targetIds=o,this.resumeToken=a,this.cause=c},xh=function(){function s(){this.S=0,this.D=pf(),this.C=en.EMPTY_BYTE_STRING,this.N=!1,this.k=!0}return Object.defineProperty(s.prototype,"current",{get:function(){return this.N},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"resumeToken",{get:function(){return this.C},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"F",{get:function(){return 0!==this.S},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"$",{get:function(){return this.k},enumerable:!1,configurable:!0}),s.prototype.O=function(o){o.approximateByteSize()>0&&(this.k=!0,this.C=o)},s.prototype.M=function(){var o=vt(),a=vt(),c=vt();return this.D.forEach(function(f,h){switch(h){case 0:o=o.add(f);break;case 2:a=a.add(f);break;case 1:c=c.add(f);break;default:_e()}}),new Ah(this.C,this.N,o,a,c)},s.prototype.L=function(){this.k=!1,this.D=pf()},s.prototype.B=function(o,a){this.k=!0,this.D=this.D.insert(o,a)},s.prototype.q=function(o){this.k=!0,this.D=this.D.remove(o)},s.prototype.U=function(){this.S+=1},s.prototype.K=function(){this.S-=1},s.prototype.j=function(){this.k=!0,this.N=!0},s}(),Om=function(){function s(o){this.W=o,this.G=new Map,this.H=Ln(),this.J=Fh(),this.Y=new Et(Se)}return s.prototype.X=function(o){for(var a=0,c=o.v;a<c.length;a++){var f=c[a];o.P&&o.P.isFoundDocument()?this.Z(f,o.P):this.tt(f,o.key,o.P)}for(var h=0,g=o.removedTargetIds;h<g.length;h++)this.tt(f=g[h],o.key,o.P)},s.prototype.et=function(o){var a=this;this.forEachTarget(o,function(c){var f=a.nt(c);switch(o.state){case 0:a.st(c)&&f.O(o.resumeToken);break;case 1:f.K(),f.F||f.L(),f.O(o.resumeToken);break;case 2:f.K(),f.F||a.removeTarget(c);break;case 3:a.st(c)&&(f.j(),f.O(o.resumeToken));break;case 4:a.st(c)&&(a.it(c),f.O(o.resumeToken));break;default:_e()}})},s.prototype.forEachTarget=function(o,a){var c=this;o.targetIds.length>0?o.targetIds.forEach(a):this.G.forEach(function(f,h){c.st(h)&&a(h)})},s.prototype.rt=function(o){var a=o.targetId,c=o.V.count,f=this.ot(a);if(f){var h=f.target;if(Ya(h))if(0===c){var g=new De(h.path);this.tt(a,g,Nn.newNoDocument(g,He.min()))}else Fe(1===c);else this.ct(a)!==c&&(this.it(a),this.Y=this.Y.add(a))}},s.prototype.ut=function(o){var a=this,c=new Map;this.G.forEach(function(g,y){var _=a.ot(y);if(_){if(g.current&&Ya(_.target)){var D=new De(_.target.path);null!==a.H.get(D)||a.at(y,D)||a.tt(y,D,Nn.newNoDocument(D,o))}g.$&&(c.set(y,g.M()),g.L())}});var f=vt();this.J.forEach(function(g,y){var _=!0;y.forEachWhile(function(D){var E=a.ot(D);return!E||2===E.purpose||(_=!1,!1)}),_&&(f=f.add(g))});var h=new mo(o,c,this.Y,this.H,f);return this.H=Ln(),this.J=Fh(),this.Y=new Et(Se),h},s.prototype.Z=function(o,a){if(this.st(o)){var c=this.at(o,a.key)?2:0;this.nt(o).B(a.key,c),this.H=this.H.insert(a.key,a),this.J=this.J.insert(a.key,this.ht(a.key).add(o))}},s.prototype.tt=function(o,a,c){if(this.st(o)){var f=this.nt(o);this.at(o,a)?f.B(a,1):f.q(a),this.J=this.J.insert(a,this.ht(a).delete(o)),c&&(this.H=this.H.insert(a,c))}},s.prototype.removeTarget=function(o){this.G.delete(o)},s.prototype.ct=function(o){var a=this.nt(o).M();return this.W.getRemoteKeysForTarget(o).size+a.addedDocuments.size-a.removedDocuments.size},s.prototype.U=function(o){this.nt(o).U()},s.prototype.nt=function(o){var a=this.G.get(o);return a||(a=new xh,this.G.set(o,a)),a},s.prototype.ht=function(o){var a=this.J.get(o);return a||(a=new Et(Se),this.J=this.J.insert(o,a)),a},s.prototype.st=function(o){var a=null!==this.ot(o);return a||oe("WatchChangeAggregator","Detected inactive target",o),a},s.prototype.ot=function(o){var a=this.G.get(o);return a&&a.F?null:this.W.lt(o)},s.prototype.it=function(o){var a=this;
1this.G.set(o,new xh),this.W.getRemoteKeysForTarget(o).forEach(function(c){a.tt(o,c,null)})},s.prototype.at=function(o,a){return this.W.getRemoteKeysForTarget(o).has(a)},s}();function Fh(){return new Xn(De.comparator)}function pf(){return new Xn(De.comparator)}var gf={asc:"ASCENDING",desc:"DESCENDING"},Ec={"<":"LESS_THAN","<=":"LESS_THAN_OR_EQUAL",">":"GREATER_THAN",">=":"GREATER_THAN_OR_EQUAL","==":"EQUAL","!=":"NOT_EQUAL","array-contains":"ARRAY_CONTAINS",in:"IN","not-in":"NOT_IN","array-contains-any":"ARRAY_CONTAINS_ANY"},K_=function(s,o){this.databaseId=s,this.I=o};function xi(s,o){return s.I?new Date(1e3*o.seconds).toISOString().replace(/\.\d*/,"").replace("Z","")+"."+("000000000"+o.nanoseconds).slice(-9)+"Z":{seconds:""+o.seconds,nanos:o.nanoseconds}}function Cc(s,o){return s.I?o.toBase64():o.toUint8Array()}function Ic(s,o){return xi(s,o.toTimestamp())}function gn(s){return Fe(!!s),He.fromTimestamp((a=co(s),new Ht(a.seconds,a.nanos)));var a}function mf(s,o){return(a=s,new tt(["projects",a.projectId,"databases",a.database])).child("documents").child(o).canonicalString();var a}function Oh(s){var o=tt.fromString(s);return Fe(Vh(o)),o}function Xs(s,o){return mf(s.databaseId,o.path)}function ui(s,o){var a=Oh(o);if(a.get(1)!==s.databaseId.projectId)throw new K(U.INVALID_ARGUMENT,"Tried to deserialize key from different project: "+a.get(1)+" vs "+s.databaseId.projectId);if(a.get(3)!==s.databaseId.database)throw new K(U.INVALID_ARGUMENT,"Tried to deserialize key from different database: "+a.get(3)+" vs "+s.databaseId.database);return new De(Ke(a))}function os(s,o){return mf(s.databaseId,o)}function yf(s){var o=Oh(s);return 4===o.length?tt.emptyPath():Ke(o)}function uu(s){return new tt(["projects",s.databaseId.projectId,"databases",s.databaseId.database]).canonicalString()}function Ke(s){return Fe(s.length>4&&"documents"===s.get(4)),s.popFirst(5)}function vf(s,o,a){return{name:Xs(s,o),fields:a.value.mapValue.fields}}function Pm(s,o,a){var c=ui(s,o.name),f=gn(o.updateTime),h=new wr({mapValue:{fields:o.fields}}),g=Nn.newFoundDocument(c,f,h);return a&&g.setHasCommittedMutations(),a?g.setHasCommittedMutations():g}function ea(s,o){var a,f;if(o instanceof _c)a={update:vf(s,o.key,o.value)};else if(o instanceof Ni)a={delete:Xs(s,o.key)};else if(o instanceof is)a={update:vf(s,o.key,o.data),updateMask:km(o.fieldMask)};else{if(!(o instanceof Th))return _e();a={verify:Xs(s,o.key)}}return o.fieldTransforms.length>0&&(a.updateTransforms=o.fieldTransforms.map(function(c){return function(f,h){var g=h.transform;if(g instanceof Ai)return{fieldPath:h.field.canonicalString(),setToServerValue:"REQUEST_TIME"};if(g instanceof Wr)return{fieldPath:h.field.canonicalString(),appendMissingElements:{values:g.elements}};if(g instanceof po)return{fieldPath:h.field.canonicalString(),removeAllFromArray:{values:g.elements}};if(g instanceof Kr)return{fieldPath:h.field.canonicalString(),increment:g.A};throw _e()}(0,c)})),o.precondition.isNone||(a.currentDocument=void 0!==(f=o.precondition).updateTime?{updateTime:Ic(s,f.updateTime)}:void 0!==f.exists?{exists:f.exists}:_e()),a}function ta(s,o){var D,a=o.currentDocument?void 0!==(D=o.currentDocument).updateTime?Wt.updateTime(gn(D.updateTime)):void 0!==D.exists?Wt.exists(D.exists):Wt.none():Wt.none(),c=o.updateTransforms?o.updateTransforms.map(function(D){return function(E,T){var S=null;"setToServerValue"in T?(Fe("REQUEST_TIME"===T.setToServerValue),S=new Ai):"appendMissingElements"in T?S=new Wr(T.appendMissingElements.values||[]):"removeAllFromArray"in T?S=new po(T.removeAllFromArray.values||[]):"increment"in T?S=new Kr(E,T.increment):_e();var H=cn.fromServerFormat(T.fieldPath);return new rs(H,S)}(s,D)}):[];if(o.update){var f=ui(s,o.update.name),h=new wr({mapValue:{fields:o.update.fields}});if(o.updateMask){var g=function(D){return new Zo((D.fieldPaths||[]).map(function(T){return cn.fromServerFormat(T)}))}(o.updateMask);return new is(f,h,g,a,c)}return new _c(f,h,a,c)}if(o.delete){var y=ui(s,o.delete);return new Ni(y,a)}if(o.verify){var _=ui(s,o.verify);return new Th(_,a)}return _e()}function Ph(s,o){return{documents:[os(s,o.path)]}}function Rh(s,o){var a={structuredQuery:{}},c=o.path;null!==o.collectionGroup?(a.parent=os(s,c),a.structuredQuery.from=[{collectionId:o.collectionGroup,allDescendants:!0}]):(a.parent=os(s,c.popLast()),a.structuredQuery.from=[{collectionId:c.lastSegment()}]);var f=function(y){if(0!==y.length){var _=y.map(function(D){return function(E){if("=="===E.op){if(gh(E.value))return{unaryFilter:{field:as(E.field),op:"IS_NAN"}};if(Gt(E.value))return{unaryFilter:{field:as(E.field),op:"IS_NULL"}}}else if("!="===E.op){if(gh(E.value))return{unaryFilter:{field:as(E.field),op:"IS_NOT_NA
1N"}};if(Gt(E.value))return{unaryFilter:{field:as(E.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:as(E.field),op:Rm(E.op),value:E.value}}}(D)});return 1===_.length?_[0]:{compositeFilter:{op:"AND",filters:_}}}}(o.filters);f&&(a.structuredQuery.where=f);var h=function(y){if(0!==y.length)return y.map(function(_){return{field:as((D=_).field),direction:lu(D.dir)};var D})}(o.orderBy);h&&(a.structuredQuery.orderBy=h);var _,g=(_=o.limit,s.I||lo(_)?_:{value:_});return null!==g&&(a.structuredQuery.limit=g),o.startAt&&(a.structuredQuery.startAt=ss(o.startAt)),o.endAt&&(a.structuredQuery.endAt=ss(o.endAt)),a}function kh(s){var o=yf(s.parent),a=s.structuredQuery,c=a.from?a.from.length:0,f=null;if(c>0){Fe(1===c);var h=a.from[0];h.allDescendants?f=h.collectionId:o=o.child(h.collectionId)}var g=[];a.where&&(g=cu(a.where));var y=[];a.orderBy&&(y=a.orderBy.map(function(T){return new Ti(yo((S=T).field),function(k){switch(k){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}}(S.direction));var S}));var T,S,_=null;a.limit&&(_=lo(S="object"==typeof(T=a.limit)?T.value:T)?null:S);var D=null;a.startAt&&(D=_f(a.startAt));var E=null;return a.endAt&&(E=_f(a.endAt)),af(o,f,y,g,_,"F",D,E)}function cu(s){return s?void 0!==s.unaryFilter?[Lh(s)]:void 0!==s.fieldFilter?[Tc(s)]:void 0!==s.compositeFilter?s.compositeFilter.filters.map(function(o){return cu(o)}).reduce(function(o,a){return o.concat(a)}):_e():[]}function ss(s){return{before:s.before,values:s.position}}function _f(s){return new pc(s.values||[],!!s.before)}function lu(s){return gf[s]}function Rm(s){return Ec[s]}function as(s){return{fieldPath:s.canonicalString()}}function yo(s){return cn.fromServerFormat(s.fieldPath)}function Tc(s){return Dr.create(yo(s.fieldFilter.field),function(o){switch(o){case"EQUAL":return"==";case"NOT_EQUAL":return"!=";case"GREATER_THAN":return">";case"GREATER_THAN_OR_EQUAL":return">=";case"LESS_THAN":return"<";case"LESS_THAN_OR_EQUAL":return"<=";case"ARRAY_CONTAINS":return"array-contains";case"IN":return"in";case"NOT_IN":return"not-in";case"ARRAY_CONTAINS_ANY":return"array-contains-any";default:return _e()}}(s.fieldFilter.op),s.fieldFilter.value)}function Lh(s){switch(s.unaryFilter.op){case"IS_NAN":var o=yo(s.unaryFilter.field);return Dr.create(o,"==",{doubleValue:NaN});case"IS_NULL":var a=yo(s.unaryFilter.field);return Dr.create(a,"==",{nullValue:"NULL_VALUE"});case"IS_NOT_NAN":var c=yo(s.unaryFilter.field);return Dr.create(c,"!=",{doubleValue:NaN});case"IS_NOT_NULL":var f=yo(s.unaryFilter.field);return Dr.create(f,"!=",{nullValue:"NULL_VALUE"});default:return _e()}}function km(s){var o=[];return s.fields.forEach(function(a){return o.push(a.canonicalString())}),{fieldPaths:o}}function Vh(s){return s.length>=4&&"projects"===s.get(0)&&"databases"===s.get(2)}function Vn(s){for(var o="",a=0;a<s.length;a++)o.length>0&&(o=Bh(o)),o=fu(s.get(a),o);return Bh(o)}function fu(s,o){for(var a=o,c=s.length,f=0;f<c;f++){var h=s.charAt(f);switch(h){case"\0":a+="\x01\x10";break;case"\x01":a+="\x01\x11";break;default:a+=h}}return a}function Bh(s){return s+"\x01\x01"}function vo(s){var o=s.length;if(Fe(o>=2),2===o)return Fe("\x01"===s.charAt(0)&&"\x01"===s.charAt(1)),tt.emptyPath();for(var a=o-2,c=[],f="",h=0;h<o;){var g=s.indexOf("\x01",h);switch((g<0||g>a)&&_e(),s.charAt(g+1)){case"\x01":var y=s.substring(h,g),_=void 0;0===f.length?_=y:(_=f+=y,f=""),c.push(_);break;case"\x10":f+=s.substring(h,g),f+="\0";break;case"\x11":f+=s.substring(h,g+1);break;default:_e()}h=g+2}return new tt(c)}var jh=function(s,o){this.seconds=s,this.nanoseconds=o},Ir=function(s,o,a){this.ownerId=s,this.allowTabSynchronization=o,this.leaseTimestampMs=a};Ir.store="owner",Ir.key="owner";var us=function(s,o,a){this.userId=s,this.lastAcknowledgedBatchId=o,this.lastStreamToken=a};us.store="mutationQueues",us.keyPath="userId";var kt=function(s,o,a,c,f){this.userId=s,this.batchId=o,this.localWriteTimeMs=a,this.baseMutations=c,this.mutations=f};kt.store="mutations",kt.keyPath="batchId",kt.userMutationsIndex="userMutationsIndex",kt.userMutationsKeyPath=["userId","batchId"];var Bn=function(){function s(){}return s.prefixForUser=function(o){return[o]},s.prefixForPath=function(o,a){return[o,Vn(a)]},s.key=function(o,a,c){return[o,Vn(a),c]},s}();Bn.store="documentMutations",Bn.PLACEHOLDER=new Bn;var Lm=function(s,o){this.path=s,this.readTime=o},Sc=function(s,o){this.path=s,this.version=o},jt=function(s,o,a,c,f,h){this.unknownDocument=s,this.noDocument=o,this.document=a,this.hasCommittedMutations=c,this.readTime=f,this.parentPath=
1h};jt.store="remoteDocuments",jt.readTimeIndex="readTimeIndex",jt.readTimeIndexPath="readTime",jt.collectionReadTimeIndex="collectionReadTimeIndex",jt.collectionReadTimeIndexPath=["parentPath","readTime"];var er=function(s){this.byteSize=s};er.store="remoteDocumentGlobal",er.key="remoteDocumentGlobalKey";var cr=function(s,o,a,c,f,h,g){this.targetId=s,this.canonicalId=o,this.readTime=a,this.resumeToken=c,this.lastListenSequenceNumber=f,this.lastLimboFreeSnapshotVersion=h,this.query=g};cr.store="targets",cr.keyPath="targetId",cr.queryTargetsIndexName="queryTargetsIndex",cr.queryTargetsKeyPath=["canonicalId","targetId"];var xn=function(s,o,a){this.targetId=s,this.path=o,this.sequenceNumber=a};xn.store="targetDocuments",xn.keyPath=["targetId","path"],xn.documentTargetsIndex="documentTargetsIndex",xn.documentTargetsKeyPath=["path","targetId"];var Rr=function(s,o,a,c){this.highestTargetId=s,this.highestListenSequenceNumber=o,this.lastRemoteSnapshotVersion=a,this.targetCount=c};Rr.key="targetGlobalKey",Rr.store="targetGlobal";var ci=function(s,o){this.collectionId=s,this.parent=o};ci.store="collectionParents",ci.keyPath=["collectionId","parent"];var Qr=function(s,o,a,c){this.clientId=s,this.updateTimeMs=o,this.networkEnabled=a,this.inForeground=c};Qr.store="clientMetadata",Qr.keyPath="clientId";var cs=function(s,o,a){this.bundleId=s,this.createTime=o,this.version=a};cs.store="bundles",cs.keyPath="bundleId";var ls=function(s,o,a){this.name=s,this.readTime=o,this.bundledQuery=a};ls.store="namedQueries",ls.keyPath="name";var Uh=(0,C.ev)((0,C.ev)([],(0,C.ev)((0,C.ev)([],(0,C.ev)((0,C.ev)([],(0,C.ev)((0,C.ev)([],[us.store,kt.store,Bn.store,jt.store,cr.store,Ir.store,Rr.store,xn.store]),[Qr.store])),[er.store])),[ci.store])),[cs.store,ls.store]),bf="The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.",Hh=function(){function s(){this.onCommittedListeners=[]}return s.prototype.addOnCommittedListener=function(o){this.onCommittedListeners.push(o)},s.prototype.raiseOnCommittedEvent=function(){this.onCommittedListeners.forEach(function(o){return o()})},s}(),jn=function(){var s=this;this.promise=new Promise(function(o,a){s.resolve=o,s.reject=a})},ee=function(){function s(o){var a=this;this.nextCallback=null,this.catchCallback=null,this.result=void 0,this.error=void 0,this.isDone=!1,this.callbackAttached=!1,o(function(c){a.isDone=!0,a.result=c,a.nextCallback&&a.nextCallback(c)},function(c){a.isDone=!0,a.error=c,a.catchCallback&&a.catchCallback(c)})}return s.prototype.catch=function(o){return this.next(void 0,o)},s.prototype.next=function(o,a){var c=this;return this.callbackAttached&&_e(),this.callbackAttached=!0,this.isDone?this.error?this.wrapFailure(a,this.error):this.wrapSuccess(o,this.result):new s(function(f,h){c.nextCallback=function(g){c.wrapSuccess(o,g).next(f,h)},c.catchCallback=function(g){c.wrapFailure(a,g).next(f,h)}})},s.prototype.toPromise=function(){var o=this;return new Promise(function(a,c){o.next(a,c)})},s.prototype.wrapUserFunction=function(o){try{var a=o();return a instanceof s?a:s.resolve(a)}catch(c){return s.reject(c)}},s.prototype.wrapSuccess=function(o,a){return o?this.wrapUserFunction(function(){return o(a)}):s.resolve(a)},s.prototype.wrapFailure=function(o,a){return o?this.wrapUserFunction(function(){return o(a)}):s.reject(a)},s.resolve=function(o){return new s(function(a,c){a(o)})},s.reject=function(o){return new s(function(a,c){c(o)})},s.waitFor=function(o){return new s(function(a,c){var f=0,h=0,g=!1;o.forEach(function(y){++f,y.next(function(){++h,g&&h===f&&a()},function(_){return c(_)})}),g=!0,h===f&&a()})},s.or=function(o){for(var a=s.resolve(!1),c=function(g){a=a.next(function(y){return y?s.resolve(y):g()})},f=0,h=o;f<h.length;f++)c(h[f]);return a},s.forEach=function(o,a){var c=this,f=[];return o.forEach(function(h,g){f.push(a.call(c,h,g))}),this.waitFor(f)},s}(),Gh=function(){function s(o,a){var c=this;this.action=o,this.transaction=a,this.aborted=!1,this.ft=new jn,this.transaction.oncomplete=function(){c.ft.resolve()},this.transaction.onabort=function(){a.error?c.ft.reject(new Fi(o,a.error)):c.ft.resolve()},this.transaction.onerror=function(f){var h=qh(f.target.error);c.ft.reject(new Fi(o,h))}}return s.open=function(o,a,c,f){try{return new s(a,o.transaction(f,c))}catch(h){throw new Fi(a,h)}},Object.defineProperty(s.prototype,"dt",{get:function(){return this.ft.promise}
1,enumerable:!1,configurable:!0}),s.prototype.abort=function(o){o&&this.ft.reject(o),this.aborted||(oe("SimpleDb","Aborting transaction:",o?o.message:"Client-initiated abort"),this.aborted=!0,this.transaction.abort())},s.prototype.store=function(o){var a=this.transaction.objectStore(o);return new Q_(a)},s}(),na=function(){function s(o,a,c){this.name=o,this.version=a,this.wt=c,12.2===s._t((0,ve.z$)())&&Xt("Firestore persistence suffers from a bug in iOS 12.2 Safari that may cause your app to stop working. See https://stackoverflow.com/q/56496296/110915 for details and a potential workaround.")}return s.delete=function(o){return oe("SimpleDb","Removing database:",o),ra(window.indexedDB.deleteDatabase(o)).toPromise()},s.yt=function(){if("undefined"==typeof indexedDB)return!1;if(s.gt())return!0;var o=(0,ve.z$)(),a=s._t(o),c=0<a&&a<10,f=s.Et(o),h=0<f&&f<4.5;return!(o.indexOf("MSIE ")>0||o.indexOf("Trident/")>0||o.indexOf("Edge/")>0||c||h)},s.gt=function(){var o;return"undefined"!=typeof process&&"YES"===(null===(o=process.env)||void 0===o?void 0:o.Tt)},s.It=function(o,a){return o.store(a)},s._t=function(o){var a=o.match(/i(?:phone|pad|pod) os ([\d_]+)/i),c=a?a[1].split("_").slice(0,2).join("."):"-1";return Number(c)},s.Et=function(o){var a=o.match(/Android ([\d.]+)/i),c=a?a[1].split(".").slice(0,2).join("."):"-1";return Number(c)},s.prototype.At=function(o){return(0,C.mG)(this,void 0,void 0,function(){var a,c=this;return(0,C.Jh)(this,function(f){switch(f.label){case 0:return this.db?[3,2]:(oe("SimpleDb","Opening database:",this.name),a=this,[4,new Promise(function(h,g){var y=indexedDB.open(c.name,c.version);y.onsuccess=function(_){h(_.target.result)},y.onblocked=function(){g(new Fi(o,"Cannot upgrade IndexedDB schema while another tab is open. Close all tabs that access Firestore and reload this page to proceed."))},y.onerror=function(_){var D=_.target.error;g("VersionError"===D.name?new K(U.FAILED_PRECONDITION,"A newer version of the Firestore SDK was previously used and so the persisted data is not compatible with the version of the SDK you are now using. The SDK will operate with persistence disabled. If you need persistence, please re-upgrade to a newer version of the SDK or else clear the persisted IndexedDB data for your app to start fresh."):new Fi(o,D))},y.onupgradeneeded=function(_){oe("SimpleDb",'Database "'+c.name+'" requires upgrade from version:',_.oldVersion),c.wt.Rt(_.target.result,y.transaction,_.oldVersion,c.version).next(function(){oe("SimpleDb","Database upgrade to version "+c.version+" complete")})}})]);case 1:a.db=f.sent(),f.label=2;case 2:return[2,(this.bt&&(this.db.onversionchange=function(h){return c.bt(h)}),this.db)]}})})},s.prototype.vt=function(o){this.bt=o,this.db&&(this.db.onversionchange=function(a){return o(a)})},s.prototype.runTransaction=function(o,a,c,f){return(0,C.mG)(this,void 0,void 0,function(){var h,g,y,_,D;return(0,C.Jh)(this,function(E){switch(E.label){case 0:h="readonly"===a,g=0,y=function(){var T,S,k,P,H;return(0,C.Jh)(this,function(te){switch(te.label){case 0:++g,te.label=1;case 1:return te.trys.push([1,4,,5]),[4,_.At(o)];case 2:return _.db=te.sent(),T=Gh.open(_.db,o,h?"readonly":"readwrite",c),S=f(T).catch(function(ce){return T.abort(ce),ee.reject(ce)}).toPromise(),k={},S.catch(function(){}),[4,T.dt];case 3:return[2,(k.value=(te.sent(),S),k)];case 4:return oe("SimpleDb","Transaction failed with error:",(P=te.sent()).message,"Retrying:",H="FirebaseError"!==P.name&&g<3),_.close(),H?[3,5]:[2,{value:Promise.reject(P)}];case 5:return[2]}})},_=this,E.label=1;case 1:return[5,y()];case 2:if("object"==typeof(D=E.sent()))return[2,D.value];E.label=3;case 3:return[3,1];case 4:return[2]}})})},s.prototype.close=function(){this.db&&this.db.close(),this.db=void 0},s}(),_o=function(){function s(o){this.Pt=o,this.Vt=!1,this.St=null}return Object.defineProperty(s.prototype,"isDone",{get:function(){return this.Vt},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"Dt",{get:function(){return this.St},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"cursor",{set:function(o){this.Pt=o}
1,enumerable:!1,configurable:!0}),s.prototype.done=function(){this.Vt=!0},s.prototype.Ct=function(o){this.St=o},s.prototype.delete=function(){return ra(this.Pt.delete())},s}(),Fi=function(s){function o(a,c){var f=this;return(f=s.call(this,U.UNAVAILABLE,"IndexedDB transaction '"+a+"' failed: "+c)||this).name="IndexedDbTransactionError",f}return(0,C.ZT)(o,s),o}(K);function fs(s){return"IndexedDbTransactionError"===s.name}var Q_=function(){function s(o){this.store=o}return s.prototype.put=function(o,a){var c;return void 0!==a?(oe("SimpleDb","PUT",this.store.name,o,a),c=this.store.put(a,o)):(oe("SimpleDb","PUT",this.store.name,"<auto-key>",o),c=this.store.put(o)),ra(c)},s.prototype.add=function(o){return oe("SimpleDb","ADD",this.store.name,o,o),ra(this.store.add(o))},s.prototype.get=function(o){var a=this;return ra(this.store.get(o)).next(function(c){return void 0===c&&(c=null),oe("SimpleDb","GET",a.store.name,o,c),c})},s.prototype.delete=function(o){return oe("SimpleDb","DELETE",this.store.name,o),ra(this.store.delete(o))},s.prototype.count=function(){return oe("SimpleDb","COUNT",this.store.name),ra(this.store.count())},s.prototype.Nt=function(o,a){var c=this.cursor(this.options(o,a)),f=[];return this.xt(c,function(h,g){f.push(g)}).next(function(){return f})},s.prototype.kt=function(o,a){oe("SimpleDb","DELETE ALL",this.store.name);var c=this.options(o,a);c.Ft=!1;var f=this.cursor(c);return this.xt(f,function(h,g,y){return y.delete()})},s.prototype.$t=function(o,a){var c;a?c=o:(c={},a=o);var f=this.cursor(c);return this.xt(f,a)},s.prototype.Ot=function(o){var a=this.cursor({});return new ee(function(c,f){a.onerror=function(h){var g=qh(h.target.error);f(g)},a.onsuccess=function(h){var g=h.target.result;g?o(g.primaryKey,g.value).next(function(y){y?g.continue():c()}):c()}})},s.prototype.xt=function(o,a){var c=[];return new ee(function(f,h){o.onerror=function(g){h(g.target.error)},o.onsuccess=function(g){var y=g.target.result;if(y){var _=new _o(y),D=a(y.primaryKey,y.value,_);if(D instanceof ee){var E=D.catch(function(T){return _.done(),ee.reject(T)});c.push(E)}_.isDone?f():null===_.Dt?y.continue():y.continue(_.Dt)}else f()}}).next(function(){return ee.waitFor(c)})},s.prototype.options=function(o,a){var c;return void 0!==o&&("string"==typeof o?c=o:a=o),{index:c,range:a}},s.prototype.cursor=function(o){var a="next";if(o.reverse&&(a="prev"),o.index){var c=this.store.index(o.index);return o.Ft?c.openKeyCursor(o.range,a):c.openCursor(o.range,a)}return this.store.openCursor(o.range,a)},s}();function ra(s){return new ee(function(o,a){s.onsuccess=function(c){o(c.target.result)},s.onerror=function(c){var f=qh(c.target.error);a(f)}})}var Vm=!1;function qh(s){var o=na._t((0,ve.z$)());if(o>=12.2&&o<13){var a="An internal error was encountered in the Indexed Database server";if(s.message.indexOf(a)>=0){var c=new K("internal","IOS_INDEXEDDB_BUG1: IndexedDb has thrown '"+a+"'. This is likely due to an unavoidable bug in iOS. See https://stackoverflow.com/q/56496296/110915 for details and a potential workaround.");return Vm||(Vm=!0,setTimeout(function(){throw c},0)),c}}return s}var Bm=function(s){function o(a,c){var f=this;return(f=s.call(this)||this).Mt=a,f.currentSequenceNumber=c,f}return(0,C.ZT)(o,s),o}(Hh);function tr(s,o){var a=F(s);return na.It(a.Mt,o)}var wf=function(){function s(o,a,c,f){this.batchId=o,this.localWriteTime=a,this.baseMutations=c,this.mutations=f}return s.prototype.applyToRemoteDocument=function(o,a){for(var c=a.mutationResults,f=0;f<this.mutations.length;f++){var h=this.mutations[f];h.key.isEqual(o.key)&&ff(h,o,c[f])}},s.prototype.applyToLocalView=function(o){for(var a=0,c=this.baseMutations;a<c.length;a++)(g=c[a]).key.isEqual(o.key)&&go(g,o,this.localWriteTime);for(var f=0,h=this.mutations;f<h.length;f++){var g;(g=h[f]).key.isEqual(o.key)&&go(g,o,this.localWriteTime)}},s.prototype.applyToLocalDocumentSet=function(o){var a=this;this.mutations.forEach(function(c){var f=o.get(c.key),h=f;a.applyToLocalView(h),f.isValidDocument()||h.convertToNoDocument(He.min())})},s.prototype.keys=function(){return this.mutations.reduce(function(o,a){return o.add(a.key)},vt())},s.prototype.isEqual=function(o){return this.batchId===o.batchId&&Yo(this.mutations,o.mutations,function(a,c){return Ih(a,c)})&&Yo(this.baseMutations,o.baseMutations,function(a,c){return Ih(a,c)})},s}(),jm=function(){function s(o,a,c,f){this.batch=o,this.commitVersion=a,this.mutationResults=c,this.docVersions=f}return s.from=function(o,a,c){Fe(o.mutations.length===c.length);for(var f=Fm(),h=o.mutations,g=0;g<h.length;g++)f=f.insert(h[g].key,c[g].version);return new s(o,a,c,f)},s}(),Ac=function(){function s(o,a,c,f,h,g,y){void 0===h&&(h=He.min()),void 0===g&&(g=He.min()),void 0===y&&(y=en.EMPTY_BYTE_STRING),this.target=o,this.targetId=a,this.purpose=c,this.sequenceNumber=f,this.snapshotVersion=h,this.lastLimboFreeSnapshotVersion=g,this.resumeToken=y}return s.prototype.withSequenceNumber=function(o){return new s(this.target,this.targetId,this.purpose,o,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken)},s.prototype.withResumeToken=function(o,a){return new s(this.target,this.targetId,this.purpose,this.sequenceNumber,a,this.lastLimboFreeSnapshotVersion,o)},s.prototype.withLastLimboFreeSnapshotVersion=function(o){return new s(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,o,this.resumeToken)},s}(),$h=function(s){this.Lt=s};function zh(s,o){if(o.document)return Pm(s.Lt,o.document,!!o.hasCommittedMutations);if(o.noDocument){var a=De.fromSegments(o.noDocument.path),c=li(o.noDocument.readTime),f=Nn.newNoDocument(a,c);return o.hasCommittedMutations?f.setHasCommittedMutations():f}if(o.unknownDocument){var h=De.fromSegments(o.unknownDocument.path);return c=li(o.unknownDocument.version),Nn.newUnknownDocument(h,c)}return _e()}function Wh(s,o,a){var T,S,c=ia(a),f=o.key.path.popLast().toArray();if(o.isFoundDocument()){var h={name:Xs(T=s.Lt,(S=o).key),fields:S.data.value.mapValue.fields,updateTime:xi(T,S.version.toTimestamp())},g=o.hasCommittedMutations;return new jt(null,null,h,g,c,f)}if(o.isNoDocument()){var y=o.key.path.toArray(),_=nr(o.version);return g=o.hasCommittedMutations,new jt(null,new Lm(y,_),null,g,c,f)}if(o.isUnknownDocument()){var D=o.key.path.toArray(),E=nr(o.version);return new jt(new Sc(D,E),null,null,!0,c,f)}return _e()}function ia(s){var o=s.toTimestamp();return[o.seconds,o.nanoseconds]}function Df(s){var o=new Ht(s[0],s[1]);return He.fromTimestamp(o)}function nr(s){var o=s.toTimestamp();return new jh(o.seconds,o.nanoseconds)}function li(s){var o=new Ht(s.seconds,s.nanoseconds);return He.fromTimestamp(o)}function ds(s,o){for(var a=(o.baseMutations||[]).map(function(_){return ta(s.Lt,_)}),c=0;c<o.mutations.length-1;++c)c+1<o.mutations.length&&void 0!==o.mutations[c+1].transform&&(o.mutations[c].updateTransforms=o.mutations[c+1].transform.fieldTransforms,o.mutations.splice(c+1,1),++c);var g=o.mutations.map(function(_){return ta(s.Lt,_)}),y=Ht.fromMillis(o.localWriteTimeMs);return new wf(o.batchId,y,a,g)}function oa(s){var o,a,c=li(s.readTime),f=void 0!==s.lastLimboFreeSnapshotVersion?li(s.lastLimboFreeSnapshotVersion):He.min();return void 0!==s.query.documents?(Fe(1===(a=s.query).documents.length),o=Er(zr(yf(a.documents[0])))):o=Er
1(kh(s.query)),new Ac(o,s.targetId,0,s.lastListenSequenceNumber,c,f,en.fromBase64String(s.resumeToken))}function Ef(s,o){var a,c=nr(o.snapshotVersion),f=nr(o.lastLimboFreeSnapshotVersion);a=Ya(o.target)?Ph(s.Lt,o.target):Rh(s.Lt,o.target);var h=o.resumeToken.toBase64();return new cr(o.targetId,fo(o.target),c,h,o.sequenceNumber,f,a)}function Kh(s){var o=kh({parent:s.parent,structuredQuery:s.structuredQuery});return"LAST"===s.limitType?bh(o,o.limit,"L"):o}var J_=function(){function s(){}return s.prototype.getBundleMetadata=function(o,a){return Um(o).get(a).next(function(c){if(c)return{id:(f=c).bundleId,createTime:li(f.createTime),version:f.version};var f})},s.prototype.saveBundleMetadata=function(o,a){return Um(o).put({bundleId:(c=a).id,createTime:nr(gn(c.createTime)),version:c.version});var c},s.prototype.getNamedQuery=function(o,a){return Mc(o).get(a).next(function(c){if(c)return{name:(f=c).name,query:Kh(f.bundledQuery),readTime:li(f.readTime)};var f})},s.prototype.saveNamedQuery=function(o,a){return Mc(o).put({name:(c=a).name,readTime:nr(gn(c.readTime)),bundledQuery:c.bundledQuery});var c},s}();function Um(s){return tr(s,cs.store)}function Mc(s){return tr(s,ls.store)}var Cf=function(){function s(){this.Bt=new du}return s.prototype.addToCollectionParentIndex=function(o,a){return this.Bt.add(a),ee.resolve()},s.prototype.getCollectionParents=function(o,a){return ee.resolve(this.Bt.getEntries(a))},s}(),du=function(){function s(){this.index={}}return s.prototype.add=function(o){var a=o.lastSegment(),c=o.popLast(),f=this.index[a]||new Et(tt.comparator),h=!f.has(c);return this.index[a]=f.add(c),h},s.prototype.has=function(o){var a=o.lastSegment(),c=o.popLast(),f=this.index[a];return f&&f.has(c)},s.prototype.getEntries=function(o){return(this.index[o]||new Et(tt.comparator)).toArray()},s}(),Y_=function(){function s(){this.qt=new du}return s.prototype.addToCollectionParentIndex=function(o,a){var c=this;if(!this.qt.has(a)){var f=a.lastSegment(),h=a.popLast();o.addOnCommittedListener(function(){c.qt.add(a)});var g={collectionId:f,parent:Vn(h)};return Hm(o).put(g)}return ee.resolve()},s.prototype.getCollectionParents=function(o,a){var c=[],f=IDBKeyRange.bound([a,""],[Us(a),""],!1,!0);return Hm(o).Nt(f).next(function(h){for(var g=0,y=h;g<y.length;g++){var _=y[g];if(_.collectionId!==a)break;c.push(vo(_.parent))}return c})},s}();function Hm(s){return tr(s,ci.store)}var If={didRun:!1,sequenceNumbersCollected:0,targetsRemoved:0,documentsRemoved:0},fi=function(){function s(o,a,c){this.cacheSizeCollectionThreshold=o,this.percentileToCollect=a,this.maximumSequenceNumbersToCollect=c}return s.withCacheSize=function(o){return new s(o,s.DEFAULT_COLLECTION_PERCENTILE,s.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT)},s}();function Qh(s,o,a){var c=s.store(kt.store),f=s.store(Bn.store),h=[],g=IDBKeyRange.only(a.batchId),y=0,_=c.$t({range:g},function(P,H,te){return y++,te.delete()});h.push(_.next(function(){Fe(1===y)}));for(var D=[],E=0,T=a.mutations;E<T.length;E++){var S=T[E],k=Bn.key(o,S.key.path,a.batchId);h.push(f.delete(k)),D.push(S.key)}return ee.waitFor(h).next(function(){return D})}function Nc(s){if(!s)return 0;var o;if(s.document)o=s.document;else if(s.unknownDocument)o=s.unknownDocument;else{if(!s.noDocument)throw _e();o=s.noDocument}return JSON.stringify(o).length}fi.DEFAULT_COLLECTION_PERCENTILE=10,fi.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT=1e3,fi.DEFAULT=new fi(41943040,fi.DEFAULT_COLLECTION_PERCENTILE,fi.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT),fi.DISABLED=new fi(-1,0,0);var Gm=function(){function s(o,a,c,f){this.userId=o,this.R=a,this.Ut=c,this.referenceDelegate=f,this.Kt={}}return s.Qt=function(o,a,c,f){return Fe(""!==o.uid),new s(o.isAuthenticated()?o.uid:"",a,c,f)},s.prototype.checkEmpty=function(o){var a=!0,c=IDBKeyRange.bound([this.userId,Number.NEGATIVE_INFINITY],[this.userId,Number.POSITIVE_INFINITY]);return Jr(o).$t({index:kt.userMutationsIndex,range:c},function(f,h,g){a=!1,g.done()}).next(function(){return a})},s.prototype.addMutationBatch=function(o,a,c,f){var h=this,g=sa(o),y=Jr(o);return y.add({}).next(function(_){Fe("number"==typeof _);for(var D=new wf(_,a,c,f),E=function(ce,Ie,Ae){var Qe=Ae.baseMutations.map(function(st){return ea(ce.Lt,st)}),Ye=Ae.mutations.map(function(st){return ea(ce.Lt,st)});return new kt(Ie,Ae.batchId,Ae.localWriteTime.toMillis(),Qe,Ye)}(h.R,h.userId,D),T=[],S=new Et(function(ce,Ie){return Se(ce.canonicalString(),Ie.canonicalString())}),k=0,P=f;k<P.length;
1k++){var H=P[k],te=Bn.key(h.userId,H.key.path,_);S=S.add(H.key.path.popLast()),T.push(y.put(E)),T.push(g.put(te,Bn.PLACEHOLDER))}return S.forEach(function(ce){T.push(h.Ut.addToCollectionParentIndex(o,ce))}),o.addOnCommittedListener(function(){h.Kt[_]=D.keys()}),ee.waitFor(T).next(function(){return D})})},s.prototype.lookupMutationBatch=function(o,a){var c=this;return Jr(o).get(a).next(function(f){return f?(Fe(f.userId===c.userId),ds(c.R,f)):null})},s.prototype.jt=function(o,a){var c=this;return this.Kt[a]?ee.resolve(this.Kt[a]):this.lookupMutationBatch(o,a).next(function(f){if(f){var h=f.keys();return c.Kt[a]=h,h}return null})},s.prototype.getNextMutationBatchAfterBatchId=function(o,a){var c=this,f=a+1,h=IDBKeyRange.lowerBound([this.userId,f]),g=null;return Jr(o).$t({index:kt.userMutationsIndex,range:h},function(y,_,D){_.userId===c.userId&&(Fe(_.batchId>=f),g=ds(c.R,_)),D.done()}).next(function(){return g})},s.prototype.getHighestUnacknowledgedBatchId=function(o){var a=IDBKeyRange.upperBound([this.userId,Number.POSITIVE_INFINITY]),c=-1;return Jr(o).$t({index:kt.userMutationsIndex,range:a,reverse:!0},function(f,h,g){c=h.batchId,g.done()}).next(function(){return c})},s.prototype.getAllMutationBatches=function(o){var a=this,c=IDBKeyRange.bound([this.userId,-1],[this.userId,Number.POSITIVE_INFINITY]);return Jr(o).Nt(kt.userMutationsIndex,c).next(function(f){return f.map(function(h){return ds(a.R,h)})})},s.prototype.getAllMutationBatchesAffectingDocumentKey=function(o,a){var c=this,f=Bn.prefixForPath(this.userId,a.path),h=IDBKeyRange.lowerBound(f),g=[];return sa(o).$t({range:h},function(y,_,D){var E=y[0],S=y[2],k=vo(y[1]);if(E===c.userId&&a.path.isEqual(k))return Jr(o).get(S).next(function(P){if(!P)throw _e();Fe(P.userId===c.userId),g.push(ds(c.R,P))});D.done()}).next(function(){return g})},s.prototype.getAllMutationBatchesAffectingDocumentKeys=function(o,a){var c=this,f=new Et(Se),h=[];return a.forEach(function(g){var y=Bn.prefixForPath(c.userId,g.path),_=IDBKeyRange.lowerBound(y),D=sa(o).$t({range:_},function(E,T,S){var k=E[0],H=E[2],te=vo(E[1]);k===c.userId&&g.path.isEqual(te)?f=f.add(H):S.done()});h.push(D)}),ee.waitFor(h).next(function(){return c.Wt(o,f)})},s.prototype.getAllMutationBatchesAffectingQuery=function(o,a){var c=this,f=a.path,h=f.length+1,g=Bn.prefixForPath(this.userId,f),y=IDBKeyRange.lowerBound(g),_=new Et(Se);return sa(o).$t({range:y},function(D,E,T){var S=D[0],P=D[2],H=vo(D[1]);S===c.userId&&f.isPrefixOf(H)?H.length===h&&(_=_.add(P)):T.done()}).next(function(){return c.Wt(o,_)})},s.prototype.Wt=function(o,a){var c=this,f=[],h=[];return a.forEach(function(g){h.push(Jr(o).get(g).next(function(y){if(null===y)throw _e();Fe(y.userId===c.userId),f.push(ds(c.R,y))}))}),ee.waitFor(h).next(function(){return f})},s.prototype.removeMutationBatch=function(o,a){var c=this;return Qh(o.Mt,this.userId,a).next(function(f){return o.addOnCommittedListener(function(){c.Gt(a.batchId)}),ee.forEach(f,function(h){return c.referenceDelegate.markPotentiallyOrphaned(o,h)})})},s.prototype.Gt=function(o){delete this.Kt[o]},s.prototype.performConsistencyCheck=function(o){var a=this;return this.checkEmpty(o).next(function(c){if(!c)return ee.resolve();var f=IDBKeyRange.lowerBound(Bn.prefixForUser(a.userId)),h=[];return sa(o).$t({range:f},function(g,y,_){if(g[0]===a.userId){var D=vo(g[1]);h.push(D)}else _.done()}).next(function(){Fe(0===h.length)})})},s.prototype.containsKey=function(o,a){return Tf(o,this.userId,a)},s.prototype.zt=function(o){var a=this;return xc(o).get(this.userId).next(function(c){return c||new us(a.userId,-1,"")})},s}();function Tf(s,o,a){var c=Bn.prefixForPath(o,a.path),f=c[1],h=IDBKeyRange.lowerBound(c),g=!1;return sa(s).$t({range:h,Ft:!0},function(y,_,D){y[0]===o&&y[1]===f&&(g=!0),D.done()}).next(function(){return g})}function Jr(s){return tr(s,kt.store)}function sa(s){return tr(s,Bn.store)}function xc(s){return tr(s,us.store)}var Fc=function(){function s(o){this.Ht=o}return s.prototype.next=function(){return this.Ht+=2,this.Ht},s.Jt=function(){return new s(0)},s.Yt=function(){return new s(-1)},s}(),tn=function(){function s(o,a){this.referenceDelegate=o,this.R=a}return s.prototype.allocateTargetId=function(o){var a=this;return this.Xt(o).next(function(c){var f=new Fc(c.highestTargetId);return c.highestTargetId=f.next(),a.Zt(o,c).next(function(){return c.highestTargetId})})},s.prototype.getLastRemoteSnapshotVersion=function(o){return this.Xt(o).next(function(a){return He.fromTimestamp(new Ht(a.lastRemoteSnapshotVersion.seconds,a.lastRemoteSnapshotVersion.nanoseconds))})},s.prototype.getHighestSequenceNumber=function(o){return this.Xt(o).next(function(a){return a.highestListenSequenceNumber})},s.prototype.setTargetsMetadata=function(o,a,c){var f=this;return this.Xt(o).next(function(h){return h.highestListenSequenceNumber=a,c&&(h.lastRemoteSnapshotVersion=c.toTimestamp()),a>h.highestListenSequenceNumber&&(h.highestListenSequenceNumber=a),f.Zt(o,h)})},s.prototype.addTargetData=function(o,a){var c=this;return this.te(o,a).next(function(){return c.Xt(o).next(function(f){return f.targetCount+=1,c.ee(a,f),c.Zt(o,f)})})},s.prototype.updateTargetData=function(o,a){return this.te(o,a)},s.prototype.removeTargetData=function(o,a){var c=this;return this.removeMatchingKeysForTargetId(o,a.targetId).next(function(){return Oi(o).delete(a.targetId)}).next(function(){return c.Xt(o)}).next(function(f){return Fe(f.targetCount>0),f.targetCount-=1,c.Zt(o,f)})},s.prototype.removeTargets=function(o,a,c){var f=this,h=0,g=[];return Oi(o).$t(function(y,_){var D=oa(_);D.sequenceNumber<=a&&null===c.get(D.targetId)&&(h++,g.push(f.removeTargetData(o,D)))}).next(function(){return ee.waitFor(g)}).next(function(){return h})},s.prototype.forEachTarget=function(o,a){return Oi(o).$t(function(c,f){var h=oa(f);a(h)})},s.prototype.Xt=function(o){return Jh(o).get(Rr.key).next(function(a){return Fe(null!==a),a})},s.prototype.Zt=function(o,a){return Jh(o).put(Rr.key,a)},s.prototype.te=function(o,a){return Oi(o).put(Ef(this.R,a))},s.prototype.ee=function(o,a){var c=!1;return o.targetId>
1a.highestTargetId&&(a.highestTargetId=o.targetId,c=!0),o.sequenceNumber>a.highestListenSequenceNumber&&(a.highestListenSequenceNumber=o.sequenceNumber,c=!0),c},s.prototype.getTargetCount=function(o){return this.Xt(o).next(function(a){return a.targetCount})},s.prototype.getTargetData=function(o,a){var c=fo(a),f=IDBKeyRange.bound([c,Number.NEGATIVE_INFINITY],[c,Number.POSITIVE_INFINITY]),h=null;return Oi(o).$t({range:f,index:cr.queryTargetsIndexName},function(g,y,_){var D=oa(y);Ws(a,D.target)&&(h=D,_.done())}).next(function(){return h})},s.prototype.addMatchingKeys=function(o,a,c){var f=this,h=[],g=rr(o);return a.forEach(function(y){var _=Vn(y.path);h.push(g.put(new xn(c,_))),h.push(f.referenceDelegate.addReference(o,c,y))}),ee.waitFor(h)},s.prototype.removeMatchingKeys=function(o,a,c){var f=this,h=rr(o);return ee.forEach(a,function(g){var y=Vn(g.path);return ee.waitFor([h.delete([c,y]),f.referenceDelegate.removeReference(o,c,g)])})},s.prototype.removeMatchingKeysForTargetId=function(o,a){var c=rr(o),f=IDBKeyRange.bound([a],[a+1],!1,!0);return c.delete(f)},s.prototype.getMatchingKeysForTargetId=function(o,a){var c=IDBKeyRange.bound([a],[a+1],!1,!0),f=rr(o),h=vt();return f.$t({range:c,Ft:!0},function(g,y,_){var D=vo(g[1]),E=new De(D);h=h.add(E)}).next(function(){return h})},s.prototype.containsKey=function(o,a){var c=Vn(a.path),f=IDBKeyRange.bound([c],[Us(c)],!1,!0),h=0;return rr(o).$t({index:xn.documentTargetsIndex,Ft:!0,range:f},function(g,y,_){0!==g[0]&&(h++,_.done())}).next(function(){return h>0})},s.prototype.lt=function(o,a){return Oi(o).get(a).next(function(c){return c?oa(c):null})},s}();function Oi(s){return tr(s,cr.store)}function Jh(s){return tr(s,Rr.store)}function rr(s){return tr(s,xn.store)}function bo(s){return(0,C.mG)(this,void 0,void 0,function(){return(0,C.Jh)(this,function(o){if(s.code!==U.FAILED_PRECONDITION||s.message!==bf)throw s;return oe("LocalStore","Unexpectedly lost primary lease"),[2]})})}function Yh(s,o){var c=s[1],h=o[1],g=Se(s[0],o[0]);return 0===g?Se(c,h):g}var qm=function(){function s(o){this.ne=o,this.buffer=new Et(Yh),this.se=0}return s.prototype.ie=function(){return++this.se},s.prototype.re=function(o){var a=[o,this.ie()];if(this.buffer.size<this.ne)this.buffer=this.buffer.add(a);else{var c=this.buffer.last();Yh(a,c)<0&&(this.buffer=this.buffer.delete(c).add(a))}},Object.defineProperty(s.prototype,"maxValue",{get:function(){return this.buffer.last()[0]},enumerable:!1,configurable:!0}),s}(),$m=function(){function s(o,a){this.garbageCollector=o,this.asyncQueue=a,this.oe=!1,this.ce=null}return s.prototype.start=function(o){-1!==this.garbageCollector.params.cacheSizeCollectionThreshold&&this.ue(o)},s.prototype.stop=function(){this.ce&&(this.ce.cancel(),this.ce=null)},Object.defineProperty(s.prototype,"started",{get:function(){return null!==this.ce},enumerable:!1,configurable:!0}),s.prototype.ue=function(o){var a=this,c=this.oe?3e5:6e4;oe("LruGarbageCollector","Garbage collection scheduled in "+c+"ms"),this.ce=this.asyncQueue.enqueueAfterDelay("lru_garbage_collection",c,function(){return(0,C.mG)(a,void 0,void 0,function(){var f;return(0,C.Jh)(this,function(h){switch(h.label){case 0:this.ce=null,this.oe=!0,h.label=1;case 1:return h.trys.push([1,3,,7]),[4,o.collectGarbage(this.garbageCollector)];case 2:return h.sent(),[3,7];case 3:return fs(f=h.sent())?(oe("LruGarbageCollector","Ignoring IndexedDB error during garbage collection: ",f),[3,6]):[3,4];case 4:return[4,bo(f)];case 5:h.sent(),h.label=6;case 6:return[3,7];case 7:return[4,this.ue(o)];case 8:return h.sent(),[2]}})})})},s}(),zm=function(){function s(o,a){this.ae=o,this.params=a}return s.prototype.calculateTargetCount=function(o,a){return this.ae.he(o).next(function(c){return Math.floor(a/100*c)})},s.prototype.nthSequenceNumber=function(o,a){var c=this;if(0===a)return ee.resolve(Zt.o);var f=new qm(a);return this.ae.forEachTarget(o,function(h){return f.re(h.sequenceNumber)}).next(function(){return c.ae.le(o,function(h){return f.re(h)})}).next(function(){return f.maxValue})},s.prototype.removeTargets=function(o,a,c){return this.ae.removeTargets(o,a,c)},s.prototype.removeOrphanedDocuments=function(o,a){return this.ae.removeOrphanedDocuments(o,a)},s.prototype.collect=function(o,a){var c=this;return-1===this.params.cacheSizeCollectionThreshold?(oe("LruGarbageCollector","Garbage collection skipped; disabled"),ee.resolve(If)):this.getCacheSize(o).next(function(f){return f<c.params.cacheSizeCollectionThreshold?(oe("LruGarbageCollector","Garbage collection skipped; Cache size "+f+" is lower than threshold "+c.params.cacheSizeCollectionThreshold),If):c.fe(o,a)})},s.prototype.getCacheSize=function(o){return this.ae.getCacheSize(o)},s.prototype.fe=function(o,a){var c,f,h,g,y,_,D,E=this,T=Date.now();return this.calculateTargetCount(o,this.params.percentileToCollect).next(function(S){return S>E.params.maximumSequenceNumbersToCollect?(oe("LruGarbageCollector","Capping sequence numbers to collect down to the maximum of "+E.params.maximumSequenceNumbersToCollect+" from "+S),f=E.params.maximumSequenceNumbersToCollect):f=S,g=Date.now(),E.nthSequenceNumber(o,f)}).next(function(S){return c=S,y=Date.now(),E.removeTargets(o,c,a)}).next(function(S){return h=S,_=Date.now(),E.removeOrphanedDocuments(o,c)}).next(function(S){return D=Date.now(),dh()<=Ee.in.DEBUG&&oe("LruGarbageCollector","LRU Garbage Collection\n\tCounted targets in "+(g-T)+"ms\n\tDetermined least recently used "+f+" in "+(y-g)+"ms\n\tRemoved "+h+" targets in "+(_-y)+"ms\n\tRemoved "+S+" documents in "+(D-_)+"ms\nTotal Duration: "+(D-T)+"ms"),ee.resolve({didRun:!0,sequenceNumbersCollected:f,targetsRemoved:h,documentsRemoved:S})})},s}(),Wm=function(){function s(o,a){this.db=o,this.garbageCollector=new zm(this,a)}return s.prototype.he=function(o){var a=this.de(o);return this.db.getTargetCache().getTargetCount(o).next(function(c){return a.next(function(f){return c+f})})},s.prototype.de=function(o){var a=0;return this.le(o,function(c){a++}).next(function(){return a})},s.prototype.forEachTarget=function(o,a){return this.db.getTargetCache().forEac
1hTarget(o,a)},s.prototype.le=function(o,a){return this.we(o,function(c,f){return a(f)})},s.prototype.addReference=function(o,a,c){return Sf(o,c)},s.prototype.removeReference=function(o,a,c){return Sf(o,c)},s.prototype.removeTargets=function(o,a,c){return this.db.getTargetCache().removeTargets(o,a,c)},s.prototype.markPotentiallyOrphaned=function(o,a){return Sf(o,a)},s.prototype._e=function(o,a){return f=a,h=!1,xc(c=o).Ot(function(g){return Tf(c,g,f).next(function(y){return y&&(h=!0),ee.resolve(!y)})}).next(function(){return h});var c,f,h},s.prototype.removeOrphanedDocuments=function(o,a){var c=this,f=this.db.getRemoteDocumentCache().newChangeBuffer(),h=[],g=0;return this.we(o,function(y,_){if(_<=a){var D=c._e(o,y).next(function(E){if(!E)return g++,f.getEntry(o,y).next(function(){return f.removeEntry(y),rr(o).delete([0,Vn(y.path)])})});h.push(D)}}).next(function(){return ee.waitFor(h)}).next(function(){return f.apply(o)}).next(function(){return g})},s.prototype.removeTarget=function(o,a){var c=a.withSequenceNumber(o.currentSequenceNumber);return this.db.getTargetCache().updateTargetData(o,c)},s.prototype.updateLimboDocument=function(o,a){return Sf(o,a)},s.prototype.we=function(o,a){var c,f=rr(o),h=Zt.o;return f.$t({index:xn.documentTargetsIndex},function(g,y){var D=y.path,E=y.sequenceNumber;0===g[0]?(h!==Zt.o&&a(new De(vo(c)),h),h=E,c=D):h=Zt.o}).next(function(){h!==Zt.o&&a(new De(vo(c)),h)})},s.prototype.getCacheSize=function(o){return this.db.getRemoteDocumentCache().getSize(o)},s}();function Sf(s,o){return rr(s).put((c=s.currentSequenceNumber,new xn(0,Vn(o.path),c)));var c}var hu=function(){function s(o,a){this.mapKeyFn=o,this.equalsFn=a,this.inner={}}return s.prototype.get=function(o){var a=this.mapKeyFn(o),c=this.inner[a];if(void 0!==c)for(var f=0,h=c;f<h.length;f++){var g=h[f],_=g[1];if(this.equalsFn(g[0],o))return _}},s.prototype.has=function(o){return void 0!==this.get(o)},s.prototype.set=function(o,a){var c=this.mapKeyFn(o),f=this.inner[c];if(void 0!==f){for(var h=0;h<f.length;h++)if(this.equalsFn(f[h][0],o))return void(f[h]=[o,a]);f.push([o,a])}else this.inner[c]=[[o,a]]},s.prototype.delete=function(o){var a=this.mapKeyFn(o),c=this.inner[a];if(void 0===c)return!1;for(var f=0;f<c.length;f++)if(this.equalsFn(c[f][0],o))return 1===c.length?delete this.inner[a]:c.splice(f,1),!0;return!1},s.prototype.forEach=function(o){Hs(this.inner,function(a,c){for(var f=0,h=c;f<h.length;f++){var g=h[f];o(g[0],g[1])}})},s.prototype.isEmpty=function(){return hh(this.inner)},s}(),aa=function(){function s(){this.changes=new hu(function(o){return o.toString()},function(o,a){return o.isEqual(a)}),this.changesApplied=!1}return s.prototype.getReadTime=function(o){var a=this.changes.get(o);return a?a.readTime:He.min()},s.prototype.addEntry=function(o,a){this.assertNotApplied(),this.changes.set(o.key,{document:o,readTime:a})},s.prototype.removeEntry=function(o,a){void 0===a&&(a=null),this.assertNotApplied(),this.changes.set(o,{document:Nn.newInvalidDocument(o),readTime:a})},s.prototype.getEntry=function(o,a){this.assertNotApplied();var c=this.changes.get(a);return void 0!==c?ee.resolve(c.document):this.getFromCache(o,a)},s.prototype.getEntries=function(o,a){return this.getAllFromCache(o,a)},s.prototype.apply=function(o){return this.assertNotApplied(),this.changesApplied=!0,this.applyChanges(o)},s.prototype.assertNotApplied=function(){},s}(),ir=function(){function s(o,a){this.R=o,this.Ut=a}return s.prototype.addEntry=function(o,a,c){return Pi(o).put(hn(a),c)},s.prototype.removeEntry=function(o,a){var c=Pi(o),f=hn(a);return c.delete(f)},s.prototype.updateMetadata=function(o,a){var c=this;return this.getMetadata(o).next(function(f){return f.byteSize+=a,c.me(o,f)})},s.prototype.getEntry=function(o,a){var c=this;return Pi(o).get(hn(a)).next(function(f){return c.ye(a,f)})},s.prototype.ge=function(o,a){var c=this;return Pi(o).get(hn(a)).next(function(f){return{document:c.ye(a,f),size:Nc(f)}})},s.prototype.getEntries=function(o,a){var c=this,f=Ln();return this.pe(o,a,function(h,g){var y=c.ye(h,g);f=f.insert(h,y)}).next(function(){return f})},s.prototype.Ee=function(o,a){var c=this,f=Ln(),h=new Xn(De.comparator);return this.pe(o,a,function(g,y){var _=c.ye(g,y);f=f.insert(g,_),h=h.insert(g,Nc(y))}).next(function(){return{documents:f,Te:h}})},s.prototype.pe=function(o,a,c){if(a.isEmpty())return ee.resolve();var f=IDBKeyRange.bound(a.first().path.toArray(),a.last().path.toArray()),h=a.getIterator(),g=h.getNext();return Pi(o).$t({range:f},function(y,_,D){for(var E=De.fromSegments(y);g&&De.comparator(g,E)<0;)c(g,null),g=h.getNext();g&&g.isEqual(E)&&(c(g,_),g=h.hasNext()?h.getNext():null),g?D.Ct(g.path.toArray()):D.done()}).next(function(){for(;g;)c(g,null),g=h.hasNext()?h.getNext():null})},s.prototype.getDocumentsMatchingQuery=function(o,a,c){var f=this,h=Ln(),g=a.path.length+1,y={};if(c.isEqual(He.min())){var _=a.path.toArray();y.range=IDBKeyRange.lowerBound(_)}else{var D=a.path.toArray(),E=ia(c);y.range=IDBKeyRange.lowerBound([D,E],!0),y.index=jt.collectionReadTimeIndex}return Pi(o).$t(y,function(T,S,k){if(T.length===g){var P=zh(f.R,S);a.path.isPrefixOf(P.key.path)?ns(a,P)&&(h=h.insert(P.key,P)):k.done()}}).next(function(){return h})},s.prototype.newChangeBuffer=function(o){return new Af(this,!!o&&o.trackRemovals)},s.prototype.getSize=function(o){return this.getMetadata(o).next(function(a){return a.byteSize})},s.prototype.getMetadata=function(o){return Mf(o).get(er.key).next(function(a){return Fe(!!a),a})},s.prototype.me=function(o,a){return Mf(o).put(er.key,a)},s.prototype.ye=function(o,a){if(a){var c=zh(this.R,a);if(!c.isNoDocument()||!c.version.isEqual(He.min()))return c}return Nn.newInvalidDocument(o)},s}(),Af=function(s){function o(a,c){var f=this;return(f=s.call(this)||this).Ie=a,f.trackRemovals=c,f.Ae=new hu(function(h){return h.toString()},function(h,g){return h.isEqual(g)}),f}return(0,C.ZT)(o,s),o.prototype.applyChanges=function(a){var c=this,f=[],h=0,g=new Et(function(y,_){return Se(y.canonicalString(),_.canonicalString())});
1return this.changes.forEach(function(y,_){var D=c.Ae.get(y);if(_.document.isValidDocument()){var E=Wh(c.Ie.R,_.document,c.getReadTime(y));g=g.add(y.path.popLast());var T=Nc(E);h+=T-D,f.push(c.Ie.addEntry(a,y,E))}else if(h-=D,c.trackRemovals){var S=Wh(c.Ie.R,Nn.newNoDocument(y,He.min()),c.getReadTime(y));f.push(c.Ie.addEntry(a,y,S))}else f.push(c.Ie.removeEntry(a,y))}),g.forEach(function(y){f.push(c.Ie.Ut.addToCollectionParentIndex(a,y))}),f.push(this.Ie.updateMetadata(a,h)),ee.waitFor(f)},o.prototype.getFromCache=function(a,c){var f=this;return this.Ie.ge(a,c).next(function(h){return f.Ae.set(c,h.size),h.document})},o.prototype.getAllFromCache=function(a,c){var f=this;return this.Ie.Ee(a,c).next(function(h){var g=h.documents;return h.Te.forEach(function(y,_){f.Ae.set(y,_)}),g})},o}(aa);function Mf(s){return tr(s,er.store)}function Pi(s){return tr(s,jt.store)}function hn(s){return s.path.toArray()}var pu=function(){function s(o){this.R=o}return s.prototype.Rt=function(o,a,c,f){var h=this;Fe(c<f&&c>=0&&f<=11);var _,g=new Gh("createOrUpgrade",a);c<1&&f>=1&&(o.createObjectStore(Ir.store),(_=o).createObjectStore(us.store,{keyPath:us.keyPath}),_.createObjectStore(kt.store,{keyPath:kt.keyPath,autoIncrement:!0}).createIndex(kt.userMutationsIndex,kt.userMutationsKeyPath,{unique:!0}),_.createObjectStore(Bn.store),Oc(o),function(_){_.createObjectStore(jt.store)}(o));var y=ee.resolve();return c<3&&f>=3&&(0!==c&&(function(_){_.deleteObjectStore(xn.store),_.deleteObjectStore(cr.store),_.deleteObjectStore(Rr.store)}(o),Oc(o)),y=y.next(function(){return function(_){var D=_.store(Rr.store),E=new Rr(0,0,He.min().toTimestamp(),0);return D.put(Rr.key,E)}(g)})),c<4&&f>=4&&(0!==c&&(y=y.next(function(){return function(_,D){return D.store(kt.store).Nt().next(function(E){_.deleteObjectStore(kt.store),_.createObjectStore(kt.store,{keyPath:kt.keyPath,autoIncrement:!0}).createIndex(kt.userMutationsIndex,kt.userMutationsKeyPath,{unique:!0});var T=D.store(kt.store),S=E.map(function(k){return T.put(k)});return ee.waitFor(S)})}(o,g)})),y=y.next(function(){!function(_){_.createObjectStore(Qr.store,{keyPath:Qr.keyPath})}(o)})),c<5&&f>=5&&(y=y.next(function(){return h.Re(g)})),c<6&&f>=6&&(y=y.next(function(){return function(_){_.createObjectStore(er.store)}(o),h.be(g)})),c<7&&f>=7&&(y=y.next(function(){return h.ve(g)})),c<8&&f>=8&&(y=y.next(function(){return h.Pe(o,g)})),c<9&&f>=9&&(y=y.next(function(){(function(_){_.objectStoreNames.contains("remoteDocumentChanges")&&_.deleteObjectStore("remoteDocumentChanges")})(o),function(_){var D=_.objectStore(jt.store);D.createIndex(jt.readTimeIndex,jt.readTimeIndexPath,{unique:!1}),D.createIndex(jt.collectionReadTimeIndex,jt.collectionReadTimeIndexPath,{unique:!1})}(a)})),c<10&&f>=10&&(y=y.next(function(){return h.Ve(g)})),c<11&&f>=11&&(y=y.next(function(){(function(_){_.createObjectStore(cs.store,{keyPath:cs.keyPath})})(o),function(_){_.createObjectStore(ls.store,{keyPath:ls.keyPath})}(o)})),y},s.prototype.be=function(o){var a=0;return o.store(jt.store).$t(function(c,f){a+=Nc(f)}).next(function(){var c=new er(a);return o.store(er.store).put(er.key,c)})},s.prototype.Re=function(o){var a=this,c=o.store(us.store),f=o.store(kt.store);return c.Nt().next(function(h){return ee.forEach(h,function(g){var y=IDBKeyRange.bound([g.userId,-1],[g.userId,g.lastAcknowledgedBatchId]);return f.Nt(kt.userMutationsIndex,y).next(function(_){return ee.forEach(_,function(D){Fe(D.userId===g.userId);var E=ds(a.R,D);return Qh(o,g.userId,E).next(function(){})})})})})}
1,s.prototype.ve=function(o){var a=o.store(xn.store),c=o.store(jt.store);return o.store(Rr.store).get(Rr.key).next(function(f){var h=[];return c.$t(function(g,y){var _=new tt(g),D=[0,Vn(_)];h.push(a.get(D).next(function(E){return E?ee.resolve():a.put(new xn(0,Vn(_),f.highestListenSequenceNumber))}))}).next(function(){return ee.waitFor(h)})})},s.prototype.Pe=function(o,a){o.createObjectStore(ci.store,{keyPath:ci.keyPath});var c=a.store(ci.store),f=new du,h=function(g){if(f.add(g)){var y=g.lastSegment(),_=g.popLast();return c.put({collectionId:y,parent:Vn(_)})}};return a.store(jt.store).$t({Ft:!0},function(g,y){var _=new tt(g);return h(_.popLast())}).next(function(){return a.store(Bn.store).$t({Ft:!0},function(g,y){var D=vo(g[1]);return h(D.popLast())})})},s.prototype.Ve=function(o){var a=this,c=o.store(cr.store);return c.$t(function(f,h){var g=oa(h),y=Ef(a.R,g);return c.put(y)})},s}();function Oc(s){s.createObjectStore(xn.store,{keyPath:xn.keyPath}).createIndex(xn.documentTargetsIndex,xn.documentTargetsKeyPath,{unique:!0}),s.createObjectStore(cr.store,{keyPath:cr.keyPath}).createIndex(cr.queryTargetsIndexName,cr.queryTargetsKeyPath,{unique:!0}),s.createObjectStore(Rr.store)}var Nf="Failed to obtain exclusive access to the persistence layer. To allow shared access, multi-tab synchronization has to be enabled in all tabs. If you are using `experimentalForceOwningTab:true`, make sure that only one tab has persistence enabled at any given time.",Km=function(){function s(o,a,c,f,h,g,y,_,D,E){if(this.allowTabSynchronization=o,this.persistenceKey=a,this.clientId=c,this.Se=h,this.window=g,this.document=y,this.De=D,this.Ce=E,this.Ne=null,this.xe=!1,this.isPrimary=!1,this.networkEnabled=!0,this.ke=null,this.inForeground=!1,this.Fe=null,this.$e=null,this.Oe=Number.NEGATIVE_INFINITY,this.Me=function(T){return Promise.resolve()},!s.yt())throw new K(U.UNIMPLEMENTED,"This platform is either missing IndexedDB or is known to have an incomplete implementation. Offline persistence has been disabled.");this.referenceDelegate=new Wm(this,f),this.Le=a+"main",this.R=new $h(_),this.Be=new na(this.Le,11,new pu(this.R)),this.qe=new tn(this.referenceDelegate,this.R),this.Ut=new Y_,this.Ue=new ir(this.R,this.Ut),this.Ke=new J_,this.window&&this.window.localStorage?this.Qe=this.window.localStorage:(this.Qe=null,!1===E&&Xt("IndexedDbPersistence","LocalStorage is unavailable. As a result, persistence may not work reliably. In particular enablePersistence() could fail immediately after refreshing the page."))}return s.prototype.start=function(){var o=this;return this.je().then(function(){if(!o.isPrimary&&!o.allowTabSynchronization)throw new K(U.FAILED_PRECONDITION,Nf);return o.We(),o.Ge(),o.ze(),o.runTransaction("getHighestListenSequenceNumber","readonly",function(a){return o.qe.getHighestSequenceNumber(a)})}).then(function(a){o.Ne=new Zt(a,o.De)}).then(function(){o.xe=!0}).catch(function(a){return o.Be&&o.Be.close(),Promise.reject(a)})},s.prototype.He=function(o){var a=this;return this.Me=function(c){return(0,C.mG)(a,void 0,void 0,function(){return(0,C.Jh)(this,function(f){return this.started?[2,o(c)]:[2]})})},o(this.isPrimary)},s.prototype.setDatabaseDeletedListener=function(o){var a=this;this.Be.vt(function(c){return(0,C.mG)(a,void 0,void 0,function(){return(0,C.Jh)(this,function(f){switch(f.label){case 0:return null===c.newVersion?[4,o()]:[3,2];case 1:f.sent(),f.label=2;case 2:return[2]}})})})},s.prototype.setNetworkEnabled=function(o){var a=this;this.networkEnabled!==o&&(this.networkEnabled=o,this.Se.enqueueAndForget(function(){return(0,C.mG)(a,void 0,void 0,function(){return(0,C.Jh)(this,function(c){switch(c.label){case 0:return this.started?[4,this.je()]:[3,2];case 1:c.sent(),c.label=2;case 2:return[2]}})})}))},s.prototype.je=function(){var o=this;return this.runTransaction("updateClientMetadataAndTryBecomePrimary","readwrite",function(a){return Pc(a).put(new Qr(o.clientId,Date.now(),o.networkEnabled,o.inForeground)).next(function(){if(o.isPrimary)return o.Je(a).next(function(c){c||(o.isPrimary=!1,o.Se.enqueueRetryable(function(){return o.Me(!1)}))})}).next(function(){return o.Ye(a)}).next(function(c){return o.isPrimary&&!c?o.Xe(a).next(function(){return!1}):!!c&&o.Ze(a).next(function(){return!0})})}
1).catch(function(a){if(fs(a))return oe("IndexedDbPersistence","Failed to extend owner lease: ",a),o.isPrimary;if(!o.allowTabSynchronization)throw a;return oe("IndexedDbPersistence","Releasing owner lease after error during lease refresh",a),!1}).then(function(a){o.isPrimary!==a&&o.Se.enqueueRetryable(function(){return o.Me(a)}),o.isPrimary=a})},s.prototype.Je=function(o){var a=this;return ua(o).get(Ir.key).next(function(c){return ee.resolve(a.tn(c))})},s.prototype.en=function(o){return Pc(o).delete(this.clientId)},s.prototype.nn=function(){return(0,C.mG)(this,void 0,void 0,function(){var o,a,c,h=this;return(0,C.Jh)(this,function(g){switch(g.label){case 0:return!this.isPrimary||this.sn(this.Oe,18e5)?[3,2]:(this.Oe=Date.now(),[4,this.runTransaction("maybeGarbageCollectMultiClientState","readwrite-primary",function(y){var _=tr(y,Qr.store);return _.Nt().next(function(D){var E=h.rn(D,18e5),T=D.filter(function(S){return-1===E.indexOf(S)});return ee.forEach(T,function(S){return _.delete(S.clientId)}).next(function(){return T})})}).catch(function(){return[]})]);case 1:if(o=g.sent(),this.Qe)for(a=0,c=o;a<c.length;a++)this.Qe.removeItem(this.on(c[a].clientId));g.label=2;case 2:return[2]}})})},s.prototype.ze=function(){var o=this;this.$e=this.Se.enqueueAfterDelay("client_metadata_refresh",4e3,function(){return o.je().then(function(){return o.nn()}).then(function(){return o.ze()})})},s.prototype.tn=function(o){return!!o&&o.ownerId===this.clientId},s.prototype.Ye=function(o){var a=this;return this.Ce?ee.resolve(!0):ua(o).get(Ir.key).next(function(c){if(null!==c&&a.sn(c.leaseTimestampMs,5e3)&&!a.cn(c.ownerId)){if(a.tn(c)&&a.networkEnabled)return!0;if(!a.tn(c)){if(!c.allowTabSynchronization)throw new K(U.FAILED_PRECONDITION,Nf);return!1}}return!(!a.networkEnabled||!a.inForeground)||Pc(o).Nt().next(function(f){return void 0===a.rn(f,5e3).find(function(h){return!(a.clientId===h.clientId||!(!a.networkEnabled&&h.networkEnabled||!a.inForeground&&h.inForeground&&a.networkEnabled===h.networkEnabled))})})}).next(function(c){return a.isPrimary!==c&&oe("IndexedDbPersistence","Client "+(c?"is":"is not")+" eligible for a primary lease."),c})},s.prototype.shutdown=function(){return(0,C.mG)(this,void 0,void 0,function(){var o=this;return(0,C.Jh)(this,function(a){switch(a.label){case 0:return this.xe=!1,this.un(),this.$e&&(this.$e.cancel(),this.$e=null),this.an(),this.hn(),[4,this.Be.runTransaction("shutdown","readwrite",[Ir.store,Qr.store],function(c){var f=new Bm(c,Zt.o);return o.Xe(f).next(function(){return o.en(f)})})];case 1:return a.sent(),this.Be.close(),this.ln(),[2]}})})},s.prototype.rn=function(o,a){var c=this;return o.filter(function(f){return c.sn(f.updateTimeMs,a)&&!c.cn(f.clientId)})},s.prototype.fn=function(){var o=this;return this.runTransaction("getActiveClients","readonly",function(a){return Pc(a).Nt().next(function(c){return o.rn(c,18e5).map(function(f){return f.clientId})})})},Object.defineProperty(s.prototype,"started",{get:function(){return this.xe},enumerable:!1,configurable:!0}),s.prototype.getMutationQueue=function(o){return Gm.Qt(o,this.R,this.Ut,this.referenceDelegate)},s.prototype.getTargetCache=function(){return this.qe},s.prototype.getRemoteDocumentCache=function(){return this.Ue},s.prototype.getIndexManager=function(){return this.Ut},s.prototype.getBundleCache=function(){return this.Ke},s.prototype.runTransaction=function(o,a,c){var h,f=this;return oe("IndexedDbPersistence","Starting transaction:",o),this.Be.runTransaction(o,"readonly"===a?"readonly":"readwrite",Uh,function(y){return h=new Bm(y,f.Ne?f.Ne.next():Zt.o),"readwrite-primary"===a?f.Je(h).next(function(_){return!!_||f.Ye(h)}).next(function(_){if(!_)throw Xt("Failed to obtain primary lease for action '"+o+"'."),f.isPrimary=!1,f.Se.enqueueRetryable(function(){return f.Me(!1)}),new K(U.FAILED_PRECONDITION,bf);return c(h)}).next(function(_){return f.Ze(h).next(function(){return _})}):f.dn(h).next(function(){return c(h)})}).then(function(y){return h.raiseOnCommittedEvent(),y})},s.prototype.dn=function(o){var a=this;return ua(o).get(Ir.key).next(function(c){if(null!==c&&a.sn(c.leaseTimestampMs,5e3)&&!a.cn(c.ownerId)&&!a.tn(c)&&!(a.Ce||a.allowTabSynchronization&&c.allowTabSynchronization))throw new K(U.FAILED_PRECONDITION,Nf)})},s.prototype.Ze=function(o){var a=new Ir(this.clientId,this.allowTabSynchronization,Date.now());return ua(o).put(Ir.key,a)},s.yt=function(){return na.yt()},s.prototype.Xe=function(o){var a=this,c=ua(o);return c.get(Ir.key).next(function(f){return a.tn(f)?(oe("IndexedDbPersistence","Releasing primary lease."),c.delete(Ir.key)):ee.resolve()})},s.prototype.sn=function(o,a){var c=Date.now();return!(o<c-a||o>c&&(Xt("Detected an update time that is in the future: "+o+" > "+c),1))},s.prototype.We=function(){var o=this;null!==this.document&&"function"==typeof this.document.addEventListener&&(this.Fe=function(){o.Se.enqueueAndForget(function(){return o.inForeground="visible"===o.document.visibilityState,o.je()})},this.document.addEventListener("visibilitychange",this.Fe),this.inForeground="visible"===this.document.visibilityState)},s.prototype.an=function(){this.Fe&&(this.document.removeEventListener("visibilitychange",this.Fe),this.Fe=null)},s.prototype.Ge=function(){var o,a=this;"function"==typeof(null===(o=this.window)||void 0===o?void 0:o.addEventListener)&&(this.ke=function(){a.un(),(0,ve.G6)()&&navigator.appVersion.match("Version/14")&&a.Se.enterRestrictedMode(!0),a.Se.enqueueAndForget(function(){return a.shutdown()})},this.window.addEventListener("pagehide",this.ke))},s.prototype.hn=function(){this.ke&&(this.window.removeEventListener("pagehide",this.ke),this.ke=null)},s.prototype.cn=function(o){var a;try{var c=null!==(null===(a=this.Qe)||void 0===a?void 0:a.getItem(this.on(o)));return oe("IndexedDbPersistence","Client '"+o+"' "+(c?"is":"is not")+" zombied in LocalStorage"),c}catch(f){return Xt("IndexedDbPersistence","Failed to get zombied client id.",f),!1}},s.prototype.un=function(){if(this.Qe)try{this.Qe.setItem(this.on(this.clientId),String(Date.now()))}catch(o){Xt("Failed to set zombie client id.",o)}},s.prototype.ln=function(){if(this.Qe)try{this.Qe.removeItem(this.on(this.clientId))}catch(o){}},s.prototype.on=function(o){return"firestore_zombie_"+this.persistenceKey+"_"+o},s}();function ua(s){return tr(s,Ir.store)}function Pc(s){return tr(s,Qr.store)}function Rc(s,o){var a=s.projectId;return s.isDefaultDatabase||(a+="."+s.database),"firestore/"+o+"/"+a+"/"}var Qm=function(s,o){this.progress=s,this.wn=o},xf=function(){function s(o,a,c){this.Ue=o,this._n=a,this.Ut=c}return s.prototype.mn=function(o,a){var c=this;return this._n.getAllMutationBatchesAffectingDocumentKey(o,a).next(function(f){return c.yn(o,a,f)})},s.prototype.yn=function(o,a,c){return this.Ue.getEntry(o,a).next(function(f){for(var h=0,g=c;h<g.length;h++)g[h].applyToLocalView(f);return f})},s.prototype.gn=function(o,a){o.forEach(function(c,f){for(var h=0,g=a;h<g.length;h++)g[h].applyToLocalView(f)})},s.prototype.pn=function(o,a){var c=this;return this.Ue.getEntries(o,a).next(function(f){return c.En(o,f).next(function(){return f})})},s.prototype.En=function(o,a){var c=this;return this._n.getAllMutationBatchesAffectingDocumentKeys(o,a).next(function(f){return c.gn(a,f)})},s.prototype.getDocumentsMatchingQuery=function(o,a,c){return De.isDocumentKey((f=a).path)&&null===f.collectionGroup&&0===f.filters.length?this.Tn(o,a.path):_h(a)?this.In(o,a,c):this.An(o,a,c);var f},s.prototype.Tn=function(o,a){return this.mn(o,new De(a)).next(function(c){var f=hf();
1return c.isFoundDocument()&&(f=f.insert(c.key,c)),f})},s.prototype.In=function(o,a,c){var f=this,h=a.collectionGroup,g=hf();return this.Ut.getCollectionParents(o,h).next(function(y){return ee.forEach(y,function(_){var E,T,D=(E=a,T=_.child(h),new ai(T,null,E.explicitOrderBy.slice(),E.filters.slice(),E.limit,E.limitType,E.startAt,E.endAt));return f.An(o,D,c).next(function(E){E.forEach(function(T,S){g=g.insert(T,S)})})}).next(function(){return g})})},s.prototype.An=function(o,a,c){var f,h,g=this;return this.Ue.getDocumentsMatchingQuery(o,a,c).next(function(y){return f=y,g._n.getAllMutationBatchesAffectingQuery(o,a)}).next(function(y){return g.Rn(o,h=y,f).next(function(_){f=_;for(var D=0,E=h;D<E.length;D++)for(var T=E[D],S=0,k=T.mutations;S<k.length;S++){var P=k[S],H=P.key,te=f.get(H);null==te&&(te=Nn.newInvalidDocument(H),f=f.insert(H,te)),go(P,te,T.localWriteTime),te.isFoundDocument()||(f=f.remove(H))}})}).next(function(){return f.forEach(function(y,_){ns(a,_)||(f=f.remove(y))}),f})},s.prototype.Rn=function(o,a,c){for(var f=vt(),h=0,g=a;h<g.length;h++)for(var y=0,_=g[h].mutations;y<_.length;y++){var D=_[y];D instanceof is&&null===c.get(D.key)&&(f=f.add(D.key))}var E=c;return this.Ue.getEntries(o,f).next(function(T){return T.forEach(function(S,k){k.isFoundDocument()&&(E=E.insert(S,k))}),E})},s}(),Jm=function(){function s(o,a,c,f){this.targetId=o,this.fromCache=a,this.bn=c,this.vn=f}return s.Pn=function(o,a){for(var c=vt(),f=vt(),h=0,g=a.docChanges;h<g.length;h++){var y=g[h];switch(y.type){case 0:c=c.add(y.doc.key);break;case 1:f=f.add(y.doc.key)}}return new s(o,a.fromCache,c,f)},s}(),Zh=function(){function s(){}return s.prototype.Vn=function(o){this.Sn=o},s.prototype.getDocumentsMatchingQuery=function(o,a,c,f){var g,h=this;return 0===(g=a).filters.length&&null===g.limit&&null==g.startAt&&null==g.endAt&&(0===g.explicitOrderBy.length||1===g.explicitOrderBy.length&&g.explicitOrderBy[0].field.isKeyField())||c.isEqual(He.min())?this.Dn(o,a):this.Sn.pn(o,f).next(function(g){var y=h.Cn(a,g);return(mc(a)||Si(a))&&h.Nn(a.limitType,y,f,c)?h.Dn(o,a):(dh()<=Ee.in.DEBUG&&oe("QueryEngine","Re-using previous result from %s to execute query: %s",c.toString(),ru(a)),h.Sn.getDocumentsMatchingQuery(o,a,c).next(function(_){return y.forEach(function(D){_=_.insert(D.key,D)}),_}))})},s.prototype.Cn=function(o,a){var c=new Et(iu(o));return a.forEach(function(f,h){ns(o,h)&&(c=c.add(h))}),c},s.prototype.Nn=function(o,a,c,f){if(c.size!==a.size)return!0;var h="F"===o?a.last():a.first();return!!h&&(h.hasPendingWrites||h.version.compareTo(f)>0)},s.prototype.Dn=function(o,a){return dh()<=Ee.in.DEBUG&&oe("QueryEngine","Using full collection scan to execute query:",ru(a)),this.Sn.getDocumentsMatchingQuery(o,a,He.min())},s}(),Ff=function(){function s(o,a,c,f){this.persistence=o,this.xn=a,this.R=f,this.kn=new Xn(Se),this.Fn=new hu(function(h){return fo(h)},Ws),this.$n=He.min(),this._n=o.getMutationQueue(c),this.On=o.getRemoteDocumentCache(),this.qe=o.getTargetCache(),this.Mn=new xf(this.On,this._n,this.persistence.getIndexManager()),this.Ke=o.getBundleCache(),this.xn.Vn(this.Mn)}return s.prototype.collectGarbage=function(o){var a=this;return this.persistence.runTransaction("Collect garbage","readwrite-primary",function(c){return o.collect(c,a.kn)})},s}();function Xh(s,o,a,c){return new Ff(s,o,a,c)}function ep(s,o){return(0,C.mG)(this,void 0,void 0,function(){var a,c,f,h;return(0,C.Jh)(this,function(g){switch(g.label){case 0:return a=F(s),c=a._n,f=a.Mn,[4,a.persistence.runTransaction("Handle user change","readonly",function(y){var _;return a._n.getAllMutationBatches(y).next(function(D){return _=D,c=a.persistence.getMutationQueue(o),f=new xf(a.On,c,a.persistence.getIndexManager()),c.getAllMutationBatches(y)}).next(function(D){for(var E=[],T=[],S=vt(),k=0,P=_;k<P.length;k++){var H=P[k];E.push(H.batchId);for(var te=0,ce=H.mutations;te<ce.length;te++)S=S.add(ce[te].key)}for(var Ae=0,Qe=D;Ae<Qe.length;Ae++){var Ye=Qe[Ae];T.push(Ye.batchId);for(var st=0,On=Ye.mutations;st<On.length;st++)S=S.add(On[st].key)}return f.pn(y,S).next(function(ku){return{Ln:ku,removedBatchIds:E,addedBatchIds:T}})})})];case 1:return h=g.sent(),[2,(a._n=c,a.Mn=f,a.xn.Vn(a.Mn),h)]}})})}function Of(s,o){var a=F(s);return a.persistence.runTransaction("Acknowledge batch","readwrite-primary",function(c){var g,y,_,D,E,T,S,f=o.batch.keys(),h=a.On.newChangeBuffer({trackRemovals:!0});return(g=a,y=c,_=o,D=h,E=_.batch,T=E.keys(),S=ee.resolve(),T.forEach(function(k){S=S.next(function(){return D.getEntry(y,k
1)}).next(function(P){var H=_.docVersions.get(k);Fe(null!==H),P.version.compareTo(H)<0&&(E.applyToRemoteDocument(P,_),P.isValidDocument()&&D.addEntry(P,_.commitVersion))})}),S.next(function(){return g._n.removeMutationBatch(y,E)})).next(function(){return h.apply(c)}).next(function(){return a._n.performConsistencyCheck(c)}).next(function(){return a.Mn.pn(c,f)})})}function tp(s){var o=F(s);return o.persistence.runTransaction("Get last remote snapshot version","readonly",function(a){return o.qe.getLastRemoteSnapshotVersion(a)})}function Ym(s,o){var a=F(s),c=o.snapshotVersion,f=a.kn;return a.persistence.runTransaction("Apply remote event","readwrite-primary",function(h){var g=a.On.newChangeBuffer({trackRemovals:!0});f=a.kn;var y=[];o.targetChanges.forEach(function(E,T){var H,te,ce,S=f.get(T);if(S){y.push(a.qe.removeMatchingKeys(h,E.removedDocuments,T).next(function(){return a.qe.addMatchingKeys(h,E.addedDocuments,T)}));var k=E.resumeToken;if(k.approximateByteSize()>0){var P=S.withResumeToken(k,c).withSequenceNumber(h.currentSequenceNumber);f=f.insert(T,P),H=S,ce=E,Fe((te=P).resumeToken.approximateByteSize()>0),(0===H.resumeToken.approximateByteSize()||te.snapshotVersion.toMicroseconds()-H.snapshotVersion.toMicroseconds()>=3e8||ce.addedDocuments.size+ce.modifiedDocuments.size+ce.removedDocuments.size>0)&&y.push(a.qe.updateTargetData(h,P))}}});var _=Ln();if(o.documentUpdates.forEach(function(E,T){o.resolvedLimboDocuments.has(E)&&y.push(a.persistence.referenceDelegate.updateLimboDocument(h,E))}),y.push(hs(h,g,o.documentUpdates,c,void 0).next(function(E){_=E})),!c.isEqual(He.min())){var D=a.qe.getLastRemoteSnapshotVersion(h).next(function(E){return a.qe.setTargetsMetadata(h,h.currentSequenceNumber,c)});y.push(D)}return ee.waitFor(y).next(function(){return g.apply(h)}).next(function(){return a.Mn.En(h,_)}).next(function(){return _})}).then(function(h){return a.kn=f,h})}function hs(s,o,a,c,f){var h=vt();return a.forEach(function(g){return h=h.add(g)}),o.getEntries(s,h).next(function(g){var y=Ln();return a.forEach(function(_,D){var E=g.get(_),T=(null==f?void 0:f.get(_))||c;D.isNoDocument()&&D.version.isEqual(He.min())?(o.removeEntry(_,T),y=y.insert(_,D)):!E.isValidDocument()||D.version.compareTo(E.version)>0||0===D.version.compareTo(E.version)&&E.hasPendingWrites?(o.addEntry(D,T),y=y.insert(_,D)):oe("LocalStore","Ignoring outdated watch update for ",_,". Current version:",E.version," Watch version:",D.version)}),y})}function Zm(s,o){var a=F(s);return a.persistence.runTransaction("Get next mutation batch","readonly",function(c){return void 0===o&&(o=-1),a._n.getNextMutationBatchAfterBatchId(c,o)})}function ca(s,o){var a=F(s);return a.persistence.runTransaction("Allocate target","readwrite",function(c){var f;return a.qe.getTargetData(c,o).next(function(h){return h?ee.resolve(f=h):a.qe.allocateTargetId(c).next(function(g){return f=new Ac(o,g,0,c.currentSequenceNumber),a.qe.addTargetData(c,f).next(function(){return f})})})}).then(function(c){var f=a.kn.get(c.targetId);return(null===f||c.snapshotVersion.compareTo(f.snapshotVersion)>0)&&(a.kn=a.kn.insert(c.targetId,c),a.Fn.set(o,c.targetId)),c})}function la(s,o,a){return(0,C.mG)(this,void 0,void 0,function(){var c,f,h,g;return(0,C.Jh)(this,function(y){switch(y.label){case 0:c=F(s),f=c.kn.get(o),h=a?"readwrite":"readwrite-primary",y.label=1;case 1:return y.trys.push([1,4,,5]),a?[3,3]:[4,c.persistence.runTransaction("Release target",h,function(_){return c.persistence.referenceDelegate.removeTarget(_,f)})];case 2:y.sent(),y.label=3;case 3:return[3,5];case 4:if(!fs(g=y.sent()))throw g;return oe("LocalStore","Failed to update sequence numbers for target "+o+": "+g),[3,5];case 5:return c.kn=c.kn.remove(o),c.Fn.delete(f.target),[2]}})})}function kc(s,o,a){var c=F(s),f=He.min(),h=vt();return c.persistence.runTransaction("Execute query","readonly",function(g){return(y=c,_=g,D=Er(o),E=F(y),T=E.Fn.get(D),void 0!==T?ee.resolve(E.kn.get(T)):E.qe.getTargetData(_,D)).next(function(y){if(y)return f=y.lastLimboFreeSnapshotVersion,c.qe.getMatchingKeysForTargetId(g,y.targetId).next(function(_){h=_})}).next(function(){return c.xn.getDocumentsMatchingQuery(g,o,a?f:He.min(),a?h:vt())}).next(function(y){return{documents:y,Bn:h}});var y,_,D,E,T})}function np(s,o){var a=F(s),c=F(a.qe),f=a.kn.get(o);return f?Promise.resolve(f.target):a.persistence.runTransaction("Get target data","readonly",function(h){return c.lt(h,o).next(function(g){return g?g.target:null})})}function Pf(s){var o=F(s);return o.persistence.runTransaction("Get new document changes","readonly",function(a){return f=a,h=o.$n,g=F(o.On),y=Ln(),_=ia(h),D=Pi(f),E=IDBKeyRange.lowerBound(_,!0),D.$t({index:jt.readTimeIndex,range:E},function(T,S){var k=zh(g.R,S);y=y.insert(k.key,k),_=S.readTime}).next(function(){return{wn:y,readTime:Df(_)}});var f,h,g,y,_,D,E}).then(function(a){var c=a.wn;return o.$n=a.readTime,c})}function Xm(s){return(0,C.mG)(this,void 0,void 0,function(){var o;return(0,C.Jh)(this,function(a){return[2,(o=F(s)).persistence.runTransaction("Synchronize last document change read time","readonly",function(c){return h=Pi(c),g=He.min(),h.$t({index:jt.readTimeIndex,reverse:!0},function(y,_,D){_.readTime&&(g=Df(_.readTime)),D.done()}).next(function(){return g});var h,g}).then(function(c){o.$n=c})]})})}function ey(s,o,a,c){return(0,C.mG)(this,void 0,void 0,function(){var f,h,g,y,_,D,E,T,S,k;return(0,C.Jh)(this,function(P){switch(P.label){case 0:for(f=F(s),h=vt(),g=Ln(),y=Fm(),_=0,D=a;_<D.length;_++)T=o.qn((E=D[_]).metadata.name),E.document&&(h=h.add(T)),g=g.insert(T,o.Un(E)),y=y.insert(T,o.Kn(E.metadata.readTime));return S=f.On.newChangeBuffer({trackRemovals:!0}),[4,ca(f,(H=c,Er(zr(tt.fromString("__bundle__/docs/"+H)))))];case 1:return k=P.sent(),[2,f.persistence.runTransaction("Apply bundle documents","readwrite",function(H){return hs(H,S,g,He.min(),y).next(function(te){return S.apply(H),te}).next(function(te){return f.qe.removeMatchingKeysForTargetId(H,k.targetId).next(function(){return f.qe.addMatchingKeys(H,h,k.targetId)}).next(function(){return f.Mn.En(H,te)}).next(function(){return te})})})]}var H})})}function ty(s,o,a){return void 0===a&&(a=vt()),(0,C.mG)(this,void 0,void 0,function(){var c,f;return(0,C.Jh)(this,function(h){switch(h.label){case 0:return[4,ca(s,Er(Kh(o.bundledQuery)))];case 1:return c=h.sent(),[2,(f=F(s)).persistence.runTransaction("Save named query","readwrite",function(g){var y=gn(o.readTime);if(c.snapshotVersion.compareTo(y)>=0)return f.Ke.saveNamedQuery(g,o);var _=c.withResumeToken(en.EMPTY_BYTE_STRING,y);return f.kn=f.kn.insert(_.targetId,_),f.qe.updateTargetData(g,_).next(function(){return f.qe.removeMatchingKeysForTargetId(g,c.targetId)}).next(function(){return f.qe.addMatchingKeys(g,a,c.targetId)}).next(function(){return f.Ke.saveNamedQuery(g,o)})})]}})})}var ny=function(){function s(o){this.R=o,this.Qn=new Map,this.jn=new Map}return s.prototype.getBundleMetadata=function(o,a){return ee.resolve(this.Qn.get(a))},s.prototype.saveBundleMetadata=function(o,a){var c;return this.Qn.set(a.id,{id:(c=a).id,version:c.version,createTime:gn(c.createTime)}),ee.resolve()}
1,s.prototype.getNamedQuery=function(o,a){return ee.resolve(this.jn.get(a))},s.prototype.saveNamedQuery=function(o,a){return this.jn.set(a.name,{name:(c=a).name,query:Kh(c.bundledQuery),readTime:gn(c.readTime)}),ee.resolve();var c},s}(),Lc=function(){function s(){this.Wn=new Et(mn.Gn),this.zn=new Et(mn.Hn)}return s.prototype.isEmpty=function(){return this.Wn.isEmpty()},s.prototype.addReference=function(o,a){var c=new mn(o,a);this.Wn=this.Wn.add(c),this.zn=this.zn.add(c)},s.prototype.Jn=function(o,a){var c=this;o.forEach(function(f){return c.addReference(f,a)})},s.prototype.removeReference=function(o,a){this.Yn(new mn(o,a))},s.prototype.Xn=function(o,a){var c=this;o.forEach(function(f){return c.removeReference(f,a)})},s.prototype.Zn=function(o){var a=this,c=new De(new tt([])),f=new mn(c,o),h=new mn(c,o+1),g=[];return this.zn.forEachInRange([f,h],function(y){a.Yn(y),g.push(y.key)}),g},s.prototype.ts=function(){var o=this;this.Wn.forEach(function(a){return o.Yn(a)})},s.prototype.Yn=function(o){this.Wn=this.Wn.delete(o),this.zn=this.zn.delete(o)},s.prototype.es=function(o){var a=new De(new tt([])),c=new mn(a,o),f=new mn(a,o+1),h=vt();return this.zn.forEachInRange([c,f],function(g){h=h.add(g.key)}),h},s.prototype.containsKey=function(o){var a=new mn(o,0),c=this.Wn.firstAfterOrEqual(a);return null!==c&&o.isEqual(c.key)},s}(),mn=function(){function s(o,a){this.key=o,this.ns=a}return s.Gn=function(o,a){return De.comparator(o.key,a.key)||Se(o.ns,a.ns)},s.Hn=function(o,a){return Se(o.ns,a.ns)||De.comparator(o.key,a.key)},s}(),ry=function(){function s(o,a){this.Ut=o,this.referenceDelegate=a,this._n=[],this.ss=1,this.rs=new Et(mn.Gn)}return s.prototype.checkEmpty=function(o){return ee.resolve(0===this._n.length)},s.prototype.addMutationBatch=function(o,a,c,f){var h=this.ss;this.ss++;var g=new wf(h,a,c,f);this._n.push(g);for(var y=0,_=f;y<_.length;y++){var D=_[y];this.rs=this.rs.add(new mn(D.key,h)),this.Ut.addToCollectionParentIndex(o,D.key.path.popLast())}return ee.resolve(g)},s.prototype.lookupMutationBatch=function(o,a){return ee.resolve(this.os(a))},s.prototype.getNextMutationBatchAfterBatchId=function(o,a){var f=this.cs(a+1),h=f<0?0:f;return ee.resolve(this._n.length>h?this._n[h]:null)},s.prototype.getHighestUnacknowledgedBatchId=function(){return ee.resolve(0===this._n.length?-1:this.ss-1)},s.prototype.getAllMutationBatches=function(o){return ee.resolve(this._n.slice())},s.prototype.getAllMutationBatchesAffectingDocumentKey=function(o,a){var c=this,f=new mn(a,0),h=new mn(a,Number.POSITIVE_INFINITY),g=[];return this.rs.forEachInRange([f,h],function(y){var _=c.os(y.ns);g.push(_)}),ee.resolve(g)},s.prototype.getAllMutationBatchesAffectingDocumentKeys=function(o,a){var c=this,f=new Et(Se);return a.forEach(function(h){var g=new mn(h,0),y=new mn(h,Number.POSITIVE_INFINITY);c.rs.forEachInRange([g,y],function(_){f=f.add(_.ns)})}),ee.resolve(this.us(f))},s.prototype.getAllMutationBatchesAffectingQuery=function(o,a){var c=a.path,f=c.length+1,h=c;De.isDocumentKey(h)||(h=h.child(""));var g=new mn(new De(h),0),y=new Et(Se);return this.rs.forEachWhile(function(_){var D=_.key.path;return!!c.isPrefixOf(D)&&(D.length===f&&(y=y.add(_.ns)),!0)},g),ee.resolve(this.us(y))},s.prototype.us=function(o){var a=this,c=[];return o.forEach(function(f){var h=a.os(f);null!==h&&c.push(h)}),c},s.prototype.removeMutationBatch=function(o,a){var c=this;Fe(0===this.hs(a.batchId,"removed")),this._n.shift();var f=this.rs;return ee.forEach(a.mutations,function(h){var g=new mn(h.key,a.batchId);return f=f.delete(g),c.referenceDelegate.markPotentiallyOrphaned(o,h.key)}).next(function(){c.rs=f})},s.prototype.Gt=function(o){},s.prototype.containsKey=function(o,a){var c=new mn(a,0),f=this.rs.firstAfterOrEqual(c);return ee.resolve(a.isEqual(f&&f.key))},s.prototype.performConsistencyCheck=function(o){return ee.resolve()},s.prototype.hs=function(o,a){return this.cs(o)},s.prototype.cs=function(o){return 0===this._n.length?0:o-this._n[0].batchId},s.prototype.os=function(o){var a=this.cs(o);return a<0||a>=this._n.length?null:this._n[a]},s}(),iy=function(){function s(o,a){this.Ut=o,this.ls=a,this.docs=new Xn(De.comparator),this.size=0}return s.prototype.addEntry=function(o,a,c){var f=a.key,h=this.docs.get(f),g=h?h.size:0,y=this.ls(a);return this.docs=this.docs.insert(f,{document:a.clone(),size:y,readTime:c}),this.size+=y-g,this.Ut.addToCollectionParentIndex(o,f.path.popLast())},s.prototype.removeEntry=function(o){var a=this.docs.get(o);a&&(this.docs=this.docs.remove(o),this.size-=a.size)},s.prototype.getEntry=function(o,a){var c=this.docs.get(a);return ee.resolve(c?c.document.clone():Nn.newInvalidDocument(a))},s.prototype.getEntries=function(o,a){var c=this,f=Ln();return a.forEach(function(h){var g=c.docs.get(h);f=f.insert(h,g?g.document.clone():Nn.newInvalidDocument(h))}),ee.resolve(f)},s.prototype.getDocumentsMatchingQuery=function(o,a,c){for(var f=Ln(),h=new De(a.path.
1child("")),g=this.docs.getIteratorFrom(h);g.hasNext();){var y=g.getNext(),D=y.value,E=D.document,T=D.readTime;if(!a.path.isPrefixOf(y.key.path))break;T.compareTo(c)<=0||ns(a,E)&&(f=f.insert(E.key,E.clone()))}return ee.resolve(f)},s.prototype.fs=function(o,a){return ee.forEach(this.docs,function(c){return a(c)})},s.prototype.newChangeBuffer=function(o){return new fa(this)},s.prototype.getSize=function(o){return ee.resolve(this.size)},s}(),fa=function(s){function o(a){var c=this;return(c=s.call(this)||this).Ie=a,c}return(0,C.ZT)(o,s),o.prototype.applyChanges=function(a){var c=this,f=[];return this.changes.forEach(function(h,g){g.document.isValidDocument()?f.push(c.Ie.addEntry(a,g.document,c.getReadTime(h))):c.Ie.removeEntry(h)}),ee.waitFor(f)},o.prototype.getFromCache=function(a,c){return this.Ie.getEntry(a,c)},o.prototype.getAllFromCache=function(a,c){return this.Ie.getEntries(a,c)},o}(aa),di=function(){function s(o){this.persistence=o,this.ds=new hu(function(a){return fo(a)},Ws),this.lastRemoteSnapshotVersion=He.min(),this.highestTargetId=0,this.ws=0,this._s=new Lc,this.targetCount=0,this.ys=Fc.Jt()}return s.prototype.forEachTarget=function(o,a){return this.ds.forEach(function(c,f){return a(f)}),ee.resolve()},s.prototype.getLastRemoteSnapshotVersion=function(o){return ee.resolve(this.lastRemoteSnapshotVersion)},s.prototype.getHighestSequenceNumber=function(o){return ee.resolve(this.ws)},s.prototype.allocateTargetId=function(o){return this.highestTargetId=this.ys.next(),ee.resolve(this.highestTargetId)},s.prototype.setTargetsMetadata=function(o,a,c){return c&&(this.lastRemoteSnapshotVersion=c),a>this.ws&&(this.ws=a),ee.resolve()},s.prototype.te=function(o){this.ds.set(o.target,o);var a=o.targetId;a>this.highestTargetId&&(this.ys=new Fc(a),this.highestTargetId=a),o.sequenceNumber>this.ws&&(this.ws=o.sequenceNumber)},s.prototype.addTargetData=function(o,a){return this.te(a),this.targetCount+=1,ee.resolve()},s.prototype.updateTargetData=function(o,a){return this.te(a),ee.resolve()},s.prototype.removeTargetData=function(o,a){return this.ds.delete(a.target),this._s.Zn(a.targetId),this.targetCount-=1,ee.resolve()},s.prototype.removeTargets=function(o,a,c){var f=this,h=0,g=[];return this.ds.forEach(function(y,_){_.sequenceNumber<=a&&null===c.get(_.targetId)&&(f.ds.delete(y),g.push(f.removeMatchingKeysForTargetId(o,_.targetId)),h++)}),ee.waitFor(g).next(function(){return h})},s.prototype.getTargetCount=function(o){return ee.resolve(this.targetCount)},s.prototype.getTargetData=function(o,a){var c=this.ds.get(a)||null;return ee.resolve(c)},s.prototype.addMatchingKeys=function(o,a,c){return this._s.Jn(a,c),ee.resolve()},s.prototype.removeMatchingKeys=function(o,a,c){this._s.Xn(a,c);var f=this.persistence.referenceDelegate,h=[];return f&&a.forEach(function(g){h.push(f.markPotentiallyOrphaned(o,g))}),ee.waitFor(h)},s.prototype.removeMatchingKeysForTargetId=function(o,a){return this._s.Zn(a),ee.resolve()},s.prototype.getMatchingKeysForTargetId=function(o,a){var c=this._s.es(a);return ee.resolve(c)},s.prototype.containsKey=function(o,a){return ee.resolve(this._s.containsKey(a))},s}(),Z_=function(){function s(o,a){var c=this;this.gs={},this.Ne=new Zt(0),this.xe=!1,this.xe=!0,this.referenceDelegate=o(this),this.qe=new di(this),this.Ut=new Cf,this.Ue=new iy(this.Ut,function(g){return c.referenceDelegate.ps(g)}),this.R=new $h(a),this.Ke=new ny(this.R)}return s.prototype.start=function(){return Promise.resolve()},s.prototype.shutdown=function(){return this.xe=!1,Promise.resolve()},Object.defineProperty(s.prototype,"started",{get:function(){return this.xe},enumerable:!1,configurable:!0}),s.prototype.setDatabaseDeletedListener=function(){},s.prototype.setNetworkEnabled=function(){},s.prototype.getIndexManager=function(){return this.Ut},s.prototype.getMutationQueue=function(o){var a=this.gs[o.toKey()];return a||(a=new ry(this.Ut,this.referenceDelegate),this.gs[o.toKey()]=a),a},s.prototype.getTargetCache=function(){return this.qe},s.prototype.getRemoteDocumentCache=function(){return this.Ue},s.prototype.getBundleCache=function(){return this.Ke},s.prototype.runTransaction=function(o,a,c){var f=this;oe("MemoryPersistence","Starting transaction:",o);var h=new X_(this.Ne.next());return this.referenceDelegate.Es(),c(h).next(function(g){return f.referenceDelegate.Ts(h).next(function(){return g})}).toPromise().then(function(g){return h.raiseOnCommittedEvent(),g})},s.prototype.Is=function(o,a){return ee.or(Object.values(this.gs).map(function(c){return function(){return c.containsKey(o,a)}}))},s}(),X_=function(s){function o(a){var c=this;return(c=s.call(this)||this).currentSequenceNumber=a,c}return(0,C.ZT)(o,s),o}(Hh),rp=function(){function s(o){this.persistence=o,this.As=new Lc,this.Rs=null}return s.bs=function(o){return new s(o)},Object.defineProperty(s.prototype,"vs",{get:function(){if(this.Rs)return this.Rs;throw _e()}
1,enumerable:!1,configurable:!0}),s.prototype.addReference=function(o,a,c){return this.As.addReference(c,a),this.vs.delete(c.toString()),ee.resolve()},s.prototype.removeReference=function(o,a,c){return this.As.removeReference(c,a),this.vs.add(c.toString()),ee.resolve()},s.prototype.markPotentiallyOrphaned=function(o,a){return this.vs.add(a.toString()),ee.resolve()},s.prototype.removeTarget=function(o,a){var c=this;this.As.Zn(a.targetId).forEach(function(h){return c.vs.add(h.toString())});var f=this.persistence.getTargetCache();return f.getMatchingKeysForTargetId(o,a.targetId).next(function(h){h.forEach(function(g){return c.vs.add(g.toString())})}).next(function(){return f.removeTargetData(o,a)})},s.prototype.Es=function(){this.Rs=new Set},s.prototype.Ts=function(o){var a=this,c=this.persistence.getRemoteDocumentCache().newChangeBuffer();return ee.forEach(this.vs,function(f){var h=De.fromPath(f);return a.Ps(o,h).next(function(g){g||c.removeEntry(h)})}).next(function(){return a.Rs=null,c.apply(o)})},s.prototype.updateLimboDocument=function(o,a){var c=this;return this.Ps(o,a).next(function(f){f?c.vs.delete(a.toString()):c.vs.add(a.toString())})},s.prototype.ps=function(o){return 0},s.prototype.Ps=function(o,a){var c=this;return ee.or([function(){return ee.resolve(c.As.containsKey(a))},function(){return c.persistence.getTargetCache().containsKey(o,a)},function(){return c.persistence.Is(o,a)}])},s}(),Un=function(){function s(o){this.uid=o}return s.prototype.isAuthenticated=function(){return null!=this.uid},s.prototype.toKey=function(){return this.isAuthenticated()?"uid:"+this.uid:"anonymous-user"},s.prototype.isEqual=function(o){return o.uid===this.uid},s}();function lr(s,o){return"firestore_clients_"+s+"_"+o}function Vc(s,o,a){var c="firestore_mutations_"+s+"_"+a;return o.isAuthenticated()&&(c+="_"+o.uid),c}function gu(s,o){return"firestore_targets_"+s+"_"+o}Un.UNAUTHENTICATED=new Un(null),Un.GOOGLE_CREDENTIALS=new Un("google-credentials-uid"),Un.FIRST_PARTY=new Un("first-party-uid"),Un.MOCK_USER=new Un("mock-user");var ip=function(){function s(o,a,c,f){this.user=o,this.batchId=a,this.state=c,this.error=f}return s.Vs=function(o,a,c){var f,h=JSON.parse(c),g="object"==typeof h&&-1!==["pending","acknowledged","rejected"].indexOf(h.state)&&(void 0===h.error||"object"==typeof h.error);return g&&h.error&&(g="string"==typeof h.error.message&&"string"==typeof h.error.code)&&(f=new K(h.error.code,h.error.message)),g?new s(o,a,h.state,f):(Xt("SharedClientState","Failed to parse mutation state for ID '"+a+"': "+c),null)},s.prototype.Ss=function(){var o={state:this.state,updateTimeMs:Date.now()};return this.error&&(o.error={code:this.error.code,message:this.error.message}),JSON.stringify(o)},s}(),Bc=function(){function s(o,a,c){this.targetId=o,this.state=a,this.error=c}return s.Vs=function(o,a){var c,f=JSON.parse(a),h="object"==typeof f&&-1!==["not-current","current","rejected"].indexOf(f.state)&&(void 0===f.error||"object"==typeof f.error);return h&&f.error&&(h="string"==typeof f.error.message&&"string"==typeof f.error.code)&&(c=new K(f.error.code,f.error.message)),h?new s(o,f.state,c):(Xt("SharedClientState","Failed to parse target state for ID '"+o+"': "+a),null)},s.prototype.Ss=function(){var o={state:this.state,updateTimeMs:Date.now()};return this.error&&(o.error={code:this.error.code,message:this.error.message}),JSON.stringify(o)},s}(),da=function(){function s(o,a){this.clientId=o,this.activeTargetIds=a}return s.Vs=function(o,a){for(var c=JSON.parse(a),f="object"==typeof c&&c.activeTargetIds instanceof Array,h=Zs(),g=0;f&&g<c.activeTargetIds.length;++g)f=ph(c.activeTargetIds[g]),h=h.add(c.activeTargetIds[g]);return f?new s(o,h):(Xt("SharedClientState","Failed to parse client data for instance '"+o+"': "+a),null)},s}(),op=function(){function s(o,a){this.clientId=o,this.onlineState=a}return s.Vs=function(o){var a=JSON.parse(o);return"object"==typeof a&&-1!==["Unknown","Online","Offline"].indexOf(a.onlineState)&&"string"==typeof a.clientId?new s(a.clientId,a.onlineState):(Xt("SharedClientState","Failed to parse online state: "+o),null)},s}(),jc=function(){function s(){this.activeTargetIds=Zs()}return s.prototype.Ds=function(o){this.activeTargetIds=this.activeTargetIds.add(o)},s.prototype.Cs=function(o){this.activeTargetIds=this.activeTargetIds.delete(o)},s.prototype.Ss=function(){var o={activeTargetIds:this.activeTargetIds.toArray(),updateTimeMs:Date.now()};return JSON.stringify(o)},s}(),mu=function(){function s(o,a,c,f,h){this.window=o,this.Se=a,this.persistenceKey=c,this.Ns=f,this.syncEngine=null,this.onlineStateHandler=null,this.sequenceNumberHandler=null,this.xs=this.ks.bind(this),this.Fs=new Xn(Se),this.started=!1,this.$s=[];var g=c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");this.storage=this.window.localStorage,this.currentUser=h,this.Os=lr(this.persistenceKey,this.Ns),this.Ms="firestore_sequence_number_"+this.persistenceKey,this.Fs=this.Fs.insert(this.Ns,new jc),this.Ls=new RegExp("^firestore_clients_"+g+"_([^_]*)$"),this.Bs=new RegExp("^firestore_mutations_"+g+"_(\\d+)(?:_(.*))?$"),this.qs=new RegExp("^firestore_targets_"+g+"_(\\d+)$"),this.Us="firestore_online_state_"+this.persistenceKey,this.Ks=function(y){return"firestore_bundle_loaded_"+y}(this.persistenceKey),this.window.addEventListener("storage",this.xs)}return s.yt=function(o){return!(!o||!o.localStorage)},s.prototype.start=function(){return(0,C.mG)(this,void 0,void 0,function(){var o,a,c,f,h,g,y,_,D,E,S=this;return(0,C.Jh)(this,function(k){switch(k.label){case 0:return[4,this.syncEngine.fn()];case 1:for(o=k.sent(),a=0,c=o;a<c.length;a++)(f=c[a])!==this.Ns&&(h=this.getItem(lr(this.persistenceKey,f)))&&(g=da.Vs(f,h))&&(this.Fs=this.Fs.insert(g.clientId,g));for(this.Qs(),(y=this.storage.getItem(this.Us))&&(_=this.js(y))&&this.Ws(_),D=0,E=this.$s;D<E.length;D++)this.ks(E[D]);return this.$s=[],this.window.addEventListener("pagehide",function(){return S.shutdown()}),this.started=!0,[2]}})})},s.prototype.writeSequenceNumber=function(o){this.setItem(this.Ms,JSON.stringify(o))},s.prototype.getAllActiveQueryTargets=function(){return this.Gs(this.Fs)},s.prototype.isActiveQueryTarget=function(o){var a=!1;return this.Fs.forEach(function(c,f){f.activeTargetIds.has(o)&&(a=!0)}),a},s.prototype.addPendingMutation=function(o){this.zs(o,"pending")},s.prototype.updateMutationState=function(o,a,c){this.zs(o,a,c),this.Hs(o)},s.prototype.addLocalQueryTarget=function(o){var a="not-current";if(this.isActiveQueryTarget(o)){var c=this.storage.getItem(gu(this.persistenceKey,o));
1if(c){var f=Bc.Vs(o,c);f&&(a=f.state)}}return this.Js.Ds(o),this.Qs(),a},s.prototype.removeLocalQueryTarget=function(o){this.Js.Cs(o),this.Qs()},s.prototype.isLocalQueryTarget=function(o){return this.Js.activeTargetIds.has(o)},s.prototype.clearQueryState=function(o){this.removeItem(gu(this.persistenceKey,o))},s.prototype.updateQueryState=function(o,a,c){this.Ys(o,a,c)},s.prototype.handleUserChange=function(o,a,c){var f=this;a.forEach(function(h){f.Hs(h)}),this.currentUser=o,c.forEach(function(h){f.addPendingMutation(h)})},s.prototype.setOnlineState=function(o){this.Xs(o)},s.prototype.notifyBundleLoaded=function(){this.Zs()},s.prototype.shutdown=function(){this.started&&(this.window.removeEventListener("storage",this.xs),this.removeItem(this.Os),this.started=!1)},s.prototype.getItem=function(o){var a=this.storage.getItem(o);return oe("SharedClientState","READ",o,a),a},s.prototype.setItem=function(o,a){oe("SharedClientState","SET",o,a),this.storage.setItem(o,a)},s.prototype.removeItem=function(o){oe("SharedClientState","REMOVE",o),this.storage.removeItem(o)},s.prototype.ks=function(o){var a=this,c=o;if(c.storageArea===this.storage){if(oe("SharedClientState","EVENT",c.key,c.newValue),c.key===this.Os)return void Xt("Received WebStorage notification for local change. Another client might have garbage-collected our state");this.Se.enqueueRetryable(function(){return(0,C.mG)(a,void 0,void 0,function(){var f,h,g,y,_,D;return(0,C.Jh)(this,function(E){if(this.started){if(null!==c.key)if(this.Ls.test(c.key)){if(null==c.newValue)return f=this.ti(c.key),[2,this.ei(f,null)];if(h=this.ni(c.key,c.newValue))return[2,this.ei(h.clientId,h)]}else if(this.Bs.test(c.key)){if(null!==c.newValue&&(g=this.si(c.key,c.newValue)))return[2,this.ii(g)]}else if(this.qs.test(c.key)){if(null!==c.newValue&&(y=this.ri(c.key,c.newValue)))return[2,this.oi(y)]}else if(c.key===this.Us){if(null!==c.newValue&&(_=this.js(c.newValue)))return[2,this.Ws(_)]}else if(c.key===this.Ms)(D=function(T){var S=Zt.o;if(null!=T)try{var k=JSON.parse(T);Fe("number"==typeof k),S=k}catch(P){Xt("SharedClientState","Failed to read sequence number from WebStorage",P)}return S}(c.newValue))!==Zt.o&&this.sequenceNumberHandler(D);else if(c.key===this.Ks)return[2,this.syncEngine.ci()]}else this.$s.push(c);return[2]})})})}},Object.defineProperty(s.prototype,"Js",{get:function(){return this.Fs.get(this.Ns)},enumerable:!1,configurable:!0}),s.prototype.Qs=function(){this.setItem(this.Os,this.Js.Ss())},s.prototype.zs=function(o,a,c){var f=new ip(this.currentUser,o,a,c),h=Vc(this.persistenceKey,this.currentUser,o);this.setItem(h,f.Ss())},s.prototype.Hs=function(o){var a=Vc(this.persistenceKey,this.currentUser,o);this.removeItem(a)},s.prototype.Xs=function(o){this.storage.setItem(this.Us,JSON.stringify({clientId:this.Ns,onlineState:o}))},s.prototype.Ys=function(o,a,c){var f=gu(this.persistenceKey,o),h=new Bc(o,a,c);this.setItem(f,h.Ss())},s.prototype.Zs=function(){this.setItem(this.Ks,"value-not-used")},s.prototype.ti=function(o){var a=this.Ls.exec(o);return a?a[1]:null},s.prototype.ni=function(o,a){var c=this.ti(o);return da.Vs(c,a)},s.prototype.si=function(o,a){var c=this.Bs.exec(o),f=Number(c[1]);return ip.Vs(new Un(void 0!==c[2]?c[2]:null),f,a)},s.prototype.ri=function(o,a){var c=this.qs.exec(o),f=Number(c[1]);return Bc.Vs(f,a)},s.prototype.js=function(o){return op.Vs(o)},s.prototype.ii=function(o){return(0,C.mG)(this,void 0,void 0,function(){return(0,C.Jh)(this,function(a){return o.user.uid===this.currentUser.uid?[2,this.syncEngine.ui(o.batchId,o.state,o.error)]:(oe("SharedClientState","Ignoring mutation for non-active user "+o.user.uid),[2])})})},s.prototype.oi=function(o){return this.syncEngine.ai(o.targetId,o.state,o.error)},s.prototype.ei=function(o,a){var c=this,f=a?this.Fs.insert(o,a):this.Fs.remove(o),h=this.Gs(this.Fs),g=this.Gs(f),y=[],_=[];return g.forEach(function(D){h.has(D)||y.push(D)}),h.forEach(function(D){g.has(D)||_.push(D)}),this.syncEngine.hi(y,_).then(function(){c.Fs=f})},s.prototype.Ws=function(o){this.Fs.get(o.clientId)&&this.onlineStateHandler(o.onlineState)},s.prototype.Gs=function(o){var a=Zs();return o.forEach(function(c,f){a=a.unionWith(f.activeTargetIds)}),a},s}(),Uc=function(){function s(){this.li=new jc,this.fi={},this.onlineStateHandler=null,this.sequenceNumberHandler=null}return s.prototype.addPendingMutation=function(o){},s.prototype.updateMutationState=function(o,a,c){},s.prototype.addLocalQueryTarget=function(o){return this.li.Ds(o),this.fi[o]||"not-current"},s.prototype.updateQueryState=function(o,a,c){this.fi[o]=a},s.prototype.removeLocalQueryTarget=function(o){this.li.Cs(o)},s.prototype.isLocalQueryTarget=function(o){return this.li.activeTargetIds.has(o)},s.prototype.clearQueryState=function(o){delete this.fi[o]},s.prototype.getAllActiveQueryTargets=function(){return this.li.activeTargetIds},s.prototype.isActiveQueryTarget=function(o){return this.li.activeTargetIds.has(o)},s.prototype.start=function(){return this.li=new jc,Promise.resolve()},s.prototype.handleUserChange=function(o,a,c){},s.prototype.setOnlineState=function(o){},s.prototype.shutdown=function(){},s.prototype.writeSequenceNumber=function(o){},s.prototype.notifyBundleLoaded=function(){},s}(),sp=function(){function s(){}return s.prototype.di=function(o){},s.prototype.shutdown=function(){},s}(),oy=function(){function s(){var o=this;this.wi=function(){return o._i()},this.mi=function(){return o.yi()},this.gi=[],this.pi()}return s.prototype.di=function(o){this.gi.push(o)},s.prototype.shutdown=function(){window.removeEventListener("online",this.wi),window.removeEventListener("offline",this.mi)},s.prototype.pi=function(){window.addEventListener("online",this.wi),window.addEventListener("offline",this.mi)},s.prototype._i=function(){oe("ConnectivityMonitor","Network connectivity changed: AVAILABLE");for(var o=0,a=this.gi;o<a.length;o++)(0,a[o])(0)},s.prototype.yi=function(){oe("ConnectivityMonitor","Network connectivity changed: UNAVAILABLE");for(var o=0,a=this.gi;o<a.length;o++)(0,a[o])(1)},s.yt=function(){return"undefined"!=typeof window&&void 0!==window.addEventListener&&void 0!==window.removeEventListener},s}(),ha={BatchGetDocuments:"batchGet",Commit:"commit",RunQuery:"runQuery"},Rf=function(){function s(o){this.Ei=o.Ei,this.Ti=o.Ti}return s.prototype.Ii=function(o){this.Ai=o},s.prototype.Ri=function(o){this.bi=o},s.prototype.onMessage=function(o){this.vi=o},s.prototype.close=function(){this.Ti()},s.prototype.send=function(o){this.Ei(o)},s.prototype.Pi=function(){this.Ai()},s.prototype.Vi=function(o){this.bi(o)},s.prototype.Si=function(o){this.vi(o)},s}(),ap=function(s){function o(a){var c=this;return(c=s.call(this,a)||this).forceLongPolling=a.forceLongPolling,c.autoDetectLongPolling=a.autoDetectLongPolling,c.useFetchStreams=a.useFetchStreams,c}return(0,C.ZT)(o,s),o.prototype.Fi=function(a,c,f,h){return new Promise(function(g,y){var _=new ef;
1_.listenOnce(br.COMPLETE,function(){try{switch(_.getLastErrorCode()){case Qo.NO_ERROR:var E=_.getResponseJson();oe("Connection","XHR received:",JSON.stringify(E)),g(E);break;case Qo.TIMEOUT:oe("Connection",'RPC "'+a+'" timed out'),y(new K(U.DEADLINE_EXCEEDED,"Request time out"));break;case Qo.HTTP_ERROR:var T=_.getStatus();if(oe("Connection",'RPC "'+a+'" failed with status:',T,"response text:",_.getResponseText()),T>0){var S=_.getResponseJson().error;if(S&&S.status&&S.message){var k=(H=S.status.toLowerCase().replace(/_/g,"-"),Object.values(U).indexOf(H)>=0?H:U.UNKNOWN);y(new K(k,S.message))}else y(new K(U.UNKNOWN,"Server responded with status "+_.getStatus()))}else y(new K(U.UNAVAILABLE,"Connection failed."));break;default:_e()}}finally{oe("Connection",'RPC "'+a+'" completed.')}var H});var D=JSON.stringify(h);_.send(c,"POST",D,f,15)})},o.prototype.Oi=function(a,c){var f=[this.Di,"/","google.firestore.v1.Firestore","/",a,"/channel"],h=new Zl,g=Qu(),y={httpSessionIdParam:"gsessionid",initMessageHeaders:{},messageUrlParams:{database:"projects/"+this.databaseId.projectId+"/databases/"+this.databaseId.database},sendRawJson:!0,supportsCrossDomainXhr:!0,internalChannelParams:{forwardChannelRequestTimeoutMs:6e5},forceLongPolling:this.forceLongPolling,detectBufferingProxy:this.autoDetectLongPolling};this.useFetchStreams&&(y.xmlHttpFactory=new Jo({})),this.ki(y.initMessageHeaders,c),(0,ve.uI)()||(0,ve.b$)()||(0,ve.d)()||(0,ve.w1)()||(0,ve.Mn)()||(0,ve.ru)()||(y.httpHeadersOverwriteParam="$httpHeaders");var _=f.join("");oe("Connection","Creating WebChannel: "+_,y);var D=h.createWebChannel(_,y),E=!1,T=!1,S=new Rf({Ei:function(P){T?oe("Connection","Not sending because WebChannel is closed:",P):(E||(oe("Connection","Opening WebChannel transport."),D.open(),E=!0),oe("Connection","WebChannel sending:",P),D.send(P))},Ti:function(){return D.close()}}),k=function(P,H,te){P.listen(H,function(ce){try{te(ce)}catch(Ie){setTimeout(function(){throw Ie},0)}})};return k(D,An.EventType.OPEN,function(){T||oe("Connection","WebChannel transport opened.")}),k(D,An.EventType.CLOSE,function(){T||(T=!0,oe("Connection","WebChannel transport closed"),S.Vi())}),k(D,An.EventType.ERROR,function(P){T||(T=!0,Wa("Connection","WebChannel transport errored:",P),S.Vi(new K(U.UNAVAILABLE,"The operation could not be completed")))}),k(D,An.EventType.MESSAGE,function(P){var H;if(!T){var te=P.data[0];Fe(!!te);var Ie=te.error||(null===(H=te[0])||void 0===H?void 0:H.error);if(Ie){oe("Connection","WebChannel received error:",Ie);var Ae=Ie.status,Qe=function(st){var On=ln[st];if(void 0!==On)return Ys(On)}(Ae),Ye=Ie.message;void 0===Qe&&(Qe=U.INTERNAL,Ye="Unknown error status: "+Ae+" with message "+Ie.message),T=!0,S.Vi(new K(Qe,Ye)),D.close()}else oe("Connection","WebChannel received:",te),S.Si(te)}}),k(g,lh.STAT_EVENT,function(P){P.stat===za_PROXY?oe("Connection","Detected buffering proxy"):P.stat===za_NOPROXY&&oe("Connection","Detected no buffering proxy")}),setTimeout(function(){S.Pi()},0),S},o}(function(){function s(o){this.databaseInfo=o,this.databaseId=o.databaseId,this.Di=(o.ssl?"https":"http")+"://"+o.host,this.Ci="projects/"+this.databaseId.projectId+"/databases/"+this.databaseId.database+"/documents"}return s.prototype.Ni=function(o,a,c,f){var h=this.xi(o,a);oe("RestConnection","Sending: ",h,c);var g={};return this.ki(g,f),this.Fi(o,h,g,c).then(function(y){return oe("RestConnection","Received: ",y),y},function(y){throw Wa("RestConnection",o+" failed with error: ",y,"url: ",h,"request:",c),y})},s.prototype.$i=function(o,a,c,f){return this.Ni(o,a,c,f)},s.prototype.ki=function(o,a){if(o["X-Goog-Api-Client"]="gl-js/ fire/8.10.0",o["Content-Type"]="text/plain",this.databaseInfo.appId&&(o["X-Firebase-GMPID"]=this.databaseInfo.appId),a)for(var c in a.authHeaders)a.authHeaders.hasOwnProperty(c)&&(o[c]=a.authHeaders[c])},s.prototype.xi=function(o,a){return this.Di+"/v1/"+a+":"+ha[o]},s}());function up(){return"undefined"!=typeof window?window:null}function pa(){return"undefined"!=typeof document?document:null}function yu(s){return new K_(s,!0)}var kf=function(){function s(o,a,c,f,h){void 0===c&&(c=1e3),void 0===f&&(f=1.5),void 0===h&&(h=6e4),this.Se=o,this.timerId=a,this.Mi=c,this.Li=f,this.Bi=h,this.qi=0,this.Ui=null,this.Ki=Date.now(),this.reset()}return s.prototype.reset=function(){this.qi=0},s.prototype.Qi=function(){this.qi=this.Bi},s.prototype.ji=function(o){var a=this;this.cancel();var c=Math.floor(this.qi+this.Wi()),f=Math.max(0,Date.now()-this.Ki),h=Math.max(0,c-f);h>0&&oe("ExponentialBackoff","Backing off for "+h+" ms (base delay: "+this.qi+" ms, delay with 
1jitter: "+c+" ms, last attempt: "+f+" ms ago)"),this.Ui=this.Se.enqueueAfterDelay(this.timerId,h,function(){return a.Ki=Date.now(),o()}),this.qi*=this.Li,this.qi<this.Mi&&(this.qi=this.Mi),this.qi>this.Bi&&(this.qi=this.Bi)},s.prototype.Gi=function(){null!==this.Ui&&(this.Ui.skipDelay(),this.Ui=null)},s.prototype.cancel=function(){null!==this.Ui&&(this.Ui.cancel(),this.Ui=null)},s.prototype.Wi=function(){return(Math.random()-.5)*this.qi},s}(),cp=function(){function s(o,a,c,f,h,g){this.Se=o,this.zi=c,this.Hi=f,this.Ji=h,this.listener=g,this.state=0,this.Yi=0,this.Xi=null,this.stream=null,this.Zi=new kf(o,a)}return s.prototype.tr=function(){return 1===this.state||2===this.state||4===this.state},s.prototype.er=function(){return 2===this.state},s.prototype.start=function(){3!==this.state?this.auth():this.nr()},s.prototype.stop=function(){return(0,C.mG)(this,void 0,void 0,function(){return(0,C.Jh)(this,function(o){switch(o.label){case 0:return this.tr()?[4,this.close(0)]:[3,2];case 1:o.sent(),o.label=2;case 2:return[2]}})})},s.prototype.sr=function(){this.state=0,this.Zi.reset()},s.prototype.ir=function(){var o=this;this.er()&&null===this.Xi&&(this.Xi=this.Se.enqueueAfterDelay(this.zi,6e4,function(){return o.rr()}))},s.prototype.cr=function(o){this.ur(),this.stream.send(o)},s.prototype.rr=function(){return(0,C.mG)(this,void 0,void 0,function(){return(0,C.Jh)(this,function(o){return this.er()?[2,this.close(0)]:[2]})})},s.prototype.ur=function(){this.Xi&&(this.Xi.cancel(),this.Xi=null)},s.prototype.close=function(o,a){return(0,C.mG)(this,void 0,void 0,function(){return(0,C.Jh)(this,function(c){switch(c.label){case 0:return this.ur(),this.Zi.cancel(),this.Yi++,3!==o?this.Zi.reset():a&&a.code===U.RESOURCE_EXHAUSTED?(Xt(a.toString()),Xt("Using maximum backoff delay to prevent overloading the backend."),this.Zi.Qi()):a&&a.code===U.UNAUTHENTICATED&&this.Ji.invalidateToken(),null!==this.stream&&(this.ar(),this.stream.close(),this.stream=null),this.state=o,[4,this.listener.Ri(a)];case 1:return c.sent(),[2]}})})},s.prototype.ar=function(){},s.prototype.auth=function(){var o=this;this.state=1;var a=this.hr(this.Yi),c=this.Yi;this.Ji.getToken().then(function(f){o.Yi===c&&o.lr(f)},function(f){a(function(){var h=new K(U.UNKNOWN,"Fetching auth token failed: "+f.message);return o.dr(h)})})},s.prototype.lr=function(o){var a=this,c=this.hr(this.Yi);this.stream=this.wr(o),this.stream.Ii(function(){c(function(){return a.state=2,a.listener.Ii()})}),this.stream.Ri(function(f){c(function(){return a.dr(f)})}),this.stream.onMessage(function(f){c(function(){return a.onMessage(f)})})},s.prototype.nr=function(){var o=this;this.state=4,this.Zi.ji(function(){return(0,C.mG)(o,void 0,void 0,function(){return(0,C.Jh)(this,function(a){return this.state=0,this.start(),[2]})})})},s.prototype.dr=function(o){return oe("PersistentStream","close with error: "+o),this.stream=null,this.close(3,o)},s.prototype.hr=function(o){var a=this;return function(c){a.Se.enqueueAndForget(function(){return a.Yi===o?c():(oe("PersistentStream","stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve())})}},s}(),sy=function(s){function o(a,c,f,h,g){var y=this;return(y=s.call(this,a,"listen_stream_connection_backoff","listen_stream_idle",c,f,g)||this).R=h,y}return(0,C.ZT)(o,s),o.prototype.wr=function(a){return this.Hi.Oi("Listen",a)},o.prototype.onMessage=function(a){this.Zi.reset();var c=function(h,g){var y,te;if("targetChange"in g){var _="NO_CHANGE"===(te=g.targetChange.targetChangeType||"NO_CHANGE")?0:"ADD"===te?1:"REMOVE"===te?2:"CURRENT"===te?3:"RESET"===te?4:_e(),D=g.targetChange.targetIds||[],E=function(te,ce){return te.I?(Fe(void 0===ce||"string"==typeof ce),en.fromBase64String(ce||"")):(Fe(void 0===ce||ce instanceof Uint8Array),en.fromUint8Array(ce||new Uint8Array))}(h,g.targetChange.resumeToken),T=(S=g.targetChange.cause)&&function(te){var ce=void 0===te.code?U.UNKNOWN:Ys(te.code);return new K(ce,te.message||"")}(S);y=new Nh(_,D,E,T||null)}else if("documentChange"in g){D=ui(h,(_=g.documentChange).document.name),E=gn(_.document.updateTime);var S=new wr({mapValue:{fields:_.document.fields}}),k=(T=Nn.newFoundDocument(D,E,S),_.targetIds||[]);y=new au(k,_.removedTargetIds||[],T.key,T)}else if("documentDelete"in g)D=ui(h,(_=g.documentDelete).document),E=_.readTime?gn(_.readTime):He.min(),S=Nn.newNoDocument(D,E),y=new au([],T=_.removedTargetIds||[],S.key,S);else if("documentRemove"in g)D=ui(h,(_=g.documentRemove).document),y=new au([],E=_.removedTargetIds||[],D,null);else{if(!("filter"in g))return _e();var H=g.filter;D=new fn(_=H.count||0),y=new Mh(E=H.targetId,D)}return y}(this.R,a),f=function(h){if(!("targetChange"in h))return He.min();var g=h.targetChange;return g.targetIds&&g.targetIds.length?He.min():g.readTime?gn(g.readTime):He.min()}(a);return this.listener._r(c,f)},o.prototype.mr=function(a){var h,g,y,_,c={};c.database=uu(this.R),c.addTarget=(h=this.R,(y=Ya(_=(g=a).target)?{documents:Ph(h,_)}:{query:Rh(h,_)}).targetId=g.targetId,g.resumeToken.approximateByteSize()>0?y.resumeToken=Cc(h,g.resumeToken):g.snapshotVersion.compareTo(He.min())>0&&(y.readTime=xi(h,g.snapshotVersion.toTimestamp())),y);var f=function(h,g){var y=function(_,D){switch(D){case 0:return null;case 1:return"existence-filter-mismatch";case 2:return"limbo-document";default:return _e()}}(0,g.purpose);return null==y?null:{"goog-listen-tags":y}}(0,a);f&&(c.labels=f),this.cr(c)},o.prototype.yr=function(a){var c={};c.database=uu(this.R),c.removeTarget=a,this.cr(c)},o}(cp),ay=function(s){function o(a,c,f,h,g){var y=this;return(y=s.call(this,a,"write_stream_connection_backoff","write_stream_idle",c,f,g)||this).R=h,y.gr=!1,y}return(0,C.ZT)(o,s),Object.defineProperty(o.prototype,"pr",{get:function(){return this.gr}
1,enumerable:!1,configurable:!0}),o.prototype.start=function(){this.gr=!1,this.lastStreamToken=void 0,s.prototype.start.call(this)},o.prototype.ar=function(){this.gr&&this.Er([])},o.prototype.wr=function(a){return this.Hi.Oi("Write",a)},o.prototype.onMessage=function(a){if(Fe(!!a.streamToken),this.lastStreamToken=a.streamToken,this.gr){this.Zi.reset();var c=(g=a.commitTime,(h=a.writeResults)&&h.length>0?(Fe(void 0!==g),h.map(function(y){return D=g,(E=gn((_=y).updateTime?_.updateTime:D)).isEqual(He.min())&&(E=gn(D)),new Js(E,_.transformResults||[]);var _,D,E})):[]),f=gn(a.commitTime);return this.listener.Tr(f,c)}var h,g;return Fe(!a.writeResults||0===a.writeResults.length),this.gr=!0,this.listener.Ir()},o.prototype.Ar=function(){var a={};a.database=uu(this.R),this.cr(a)},o.prototype.Er=function(a){var c=this,f={streamToken:this.lastStreamToken,writes:a.map(function(h){return ea(c.R,h)})};this.cr(f)},o}(cp),uy=function(s){function o(a,c,f){var h=this;return(h=s.call(this)||this).credentials=a,h.Hi=c,h.R=f,h.Rr=!1,h}return(0,C.ZT)(o,s),o.prototype.br=function(){if(this.Rr)throw new K(U.FAILED_PRECONDITION,"The client has already been terminated.")},o.prototype.Ni=function(a,c,f){var h=this;return this.br(),this.credentials.getToken().then(function(g){return h.Hi.Ni(a,c,f,g)}).catch(function(g){throw"FirebaseError"===g.name?(g.code===U.UNAUTHENTICATED&&h.credentials.invalidateToken(),g):new K(U.UNKNOWN,g.toString())})},o.prototype.$i=function(a,c,f){var h=this;return this.br(),this.credentials.getToken().then(function(g){return h.Hi.$i(a,c,f,g)}).catch(function(g){throw"FirebaseError"===g.name?(g.code===U.UNAUTHENTICATED&&h.credentials.invalidateToken(),g):new K(U.UNKNOWN,g.toString())})},o.prototype.terminate=function(){this.Rr=!0},o}(function(){}),lp=function(){function s(o,a){this.asyncQueue=o,this.onlineStateHandler=a,this.state="Unknown",this.vr=0,this.Pr=null,this.Vr=!0}return s.prototype.Sr=function(){var o=this;0===this.vr&&(this.Dr("Unknown"),this.Pr=this.asyncQueue.enqueueAfterDelay("online_state_timeout",1e4,function(){return o.Pr=null,o.Cr("Backend didn't respond within 10 seconds."),o.Dr("Offline"),Promise.resolve()}))},s.prototype.Nr=function(o){"Online"===this.state?this.Dr("Unknown"):(this.vr++,this.vr>=1&&(this.kr(),this.Cr("Connection failed 1 times. Most recent error: "+o.toString()),this.Dr("Offline")))},s.prototype.set=function(o){this.kr(),this.vr=0,"Online"===o&&(this.Vr=!1),this.Dr(o)},s.prototype.Dr=function(o){o!==this.state&&(this.state=o,this.onlineStateHandler(o))},s.prototype.Cr=function(o){var a="Could not reach Cloud Firestore backend. "+o+"\nThis typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.";this.Vr?(Xt(a),this.Vr=!1):oe("OnlineStateTracker",a)},s.prototype.kr=function(){null!==this.Pr&&(this.Pr.cancel(),this.Pr=null)},s}(),Lf=function(s,o,a,c,f){var h=this;this.localStore=s,this.datastore=o,this.asyncQueue=a,this.remoteSyncer={},this.Fr=[],this.$r=new Map,this.Or=new Set,this.Mr=[],this.Lr=f,this.Lr.di(function(g){a.enqueueAndForget(function(){return(0,C.mG)(h,void 0,void 0,function(){return(0,C.Jh)(this,function(y){switch(y.label){case 0:return ki(this)?(oe("RemoteStore","Restarting streams for network reachability change."),[4,function(_){return(0,C.mG)(this,void 0,void 0,function(){var D;return(0,C.Jh)(this,function(E){switch(E.label){case 0:return(D=F(_)).Or.add(4),[4,wo(D)];case 1:return E.sent(),D.Br.set("Unknown"),D.Or.delete(4),[4,ga(D)];case 2:return E.sent(),[2]}})})}(this)]):[3,2];case 1:y.sent(),y.label=2;case 2:return[2]}})})})}),this.Br=new lp(a,c)};function ga(s){return(0,C.mG)(this,void 0,void 0,function(){var o,a;return(0,C.Jh)(this,function(c){switch(c.label){case 0:if(!ki(s))return[3,4];o=0,a=s.Mr,c.label=1;case 1:return o<a.length?[4,(0,a[o])(!0)]:[3,4];case 2:c.sent(),c.label=3;case 3:return o++,[3,1];case 4:return[2]}})})}function wo(s){return(0,C.mG)(this,void 0,void 0,function(){var o,a;return(0,C.Jh)(this,function(c){switch(c.label){case 0:o=0,a=s.Mr,c.label=1;case 1:return o<a.length?[4,(0,a[o])(!1)]:[3,4];case 2:c.sent(),c.label=3;case 3:return o++,[3,1];case 4:return[2]}})})}function Hc(s,o){var a=F(s);a.$r.has(o.targetId)||(a.$r.set(o.targetId,o),qc(a)?Ri(a):hi(a).er()&&Gc(a,o))}function vu(s,o){var a=F(s),c=hi(a);a.$r.delete(o),c.er()&&Vf(a,o),0===a.$r.size&&(c.er()?c.ir():ki(a)&&a.Br.set("Unknown"))}function Gc(s,o){s.qr.U(o.targetId),hi(s).mr(o)}function Vf(s,o){s.qr.U(o),hi(s).yr(o)}function Ri(s){s.qr=new Om({getRemoteKeysForTarget:function(o){return s.remoteSyncer.getRemoteKeysForTarget(o)},lt:function(o){return s.$r.get(o)||null}}),hi(s).start(),s.Br.Sr()}function qc(s){return ki(s)&&!hi(s).tr()&&s.$r.size>0}function ki(s){return 0===F(s).Or.size}function fp(s){s.qr=void 0}function $c(s){return(0,C.mG)(this,void 0,void 0,function(){return(0,C.Jh)(this,function(o){return s.$r.forEach(function(a,c){Gc(s,a)}),[2]})})}function cy(s,o){return(0,C.mG)(this,void 0,void 0,function(){return(0,C.Jh)(this,function(a){return fp(s),qc(s)?(s.Br.Nr(o),Ri(s)):s.Br.set("Unknown"),[2]})})}function dp(s,o,a){return(0,C.mG)(this,void 0,void 0,function(){var c,f,h;return(0,C.Jh)(this,function(g){switch(g.label){case 0:if(s.Br.set("Online"),!(o instanceof Nh&&2===o.state&&o.cause))return[3,6];g.label=1;case 1:return g.trys.push([1,3,,5]),[4,function(y,_){return(0,C.mG)(this,void 0,void 0,function(){var D,E,T,S;return(0,C.Jh)(this,function(k){switch(k.label){case 0:D=_.cause,E=0,T=_.targetIds,k.label=1;case 1:return E<T.length?y.$r.has(S=T[E])?[4,y.remoteSyncer.rejectListen(S,D)]:[3,3]:[3,5];case 2:k.sent(),y.$r.delete(S),y.qr.removeTarget(S),k.label=3;case 3:k.label=4;case 4:return E++,[3,1];case 5:return[2]}})})}(s,o)];case 2:return g.sent(),[3,5];case 3:return c=g.sent(),oe("RemoteStore","Failed to remove targets %s: %s ",o.targetIds.join(","),c),[4,_u(s,c)];case 4:return g.sent(),[3,5];case 5:return[3,13];case 6:if(o instanceof au?s.qr.X(o):o instanceof Mh?s.qr.rt(o):s.qr.et(o),a.isEqual(He.min()))return[3,13];g.label=7;case 7:return g.trys.push([7,11,,13]),[4,tp(s.localStore)];case 8:return f=g.sent(),a.compareTo(f)>
1=0?[4,(y=s,_=a,D=y.qr.ut(_),D.targetChanges.forEach(function(E,T){if(E.resumeToken.approximateByteSize()>0){var S=y.$r.get(T);S&&y.$r.set(T,S.withResumeToken(E.resumeToken,_))}}),D.targetMismatches.forEach(function(E){var T=y.$r.get(E);if(T){y.$r.set(E,T.withResumeToken(en.EMPTY_BYTE_STRING,T.snapshotVersion)),Vf(y,E);var S=new Ac(T.target,E,1,T.sequenceNumber);Gc(y,S)}}),y.remoteSyncer.applyRemoteEvent(D))]:[3,10];case 9:g.sent(),g.label=10;case 10:return[3,13];case 11:return oe("RemoteStore","Failed to raise snapshot:",h=g.sent()),[4,_u(s,h)];case 12:return g.sent(),[3,13];case 13:return[2]}var y,_,D})})}function _u(s,o,a){return(0,C.mG)(this,void 0,void 0,function(){var c=this;return(0,C.Jh)(this,function(f){switch(f.label){case 0:if(!fs(o))throw o;return s.Or.add(1),[4,wo(s)];case 1:return f.sent(),s.Br.set("Offline"),a||(a=function(){return tp(s.localStore)}),s.asyncQueue.enqueueRetryable(function(){return(0,C.mG)(c,void 0,void 0,function(){return(0,C.Jh)(this,function(h){switch(h.label){case 0:return oe("RemoteStore","Retrying IndexedDB access"),[4,a()];case 1:return h.sent(),s.Or.delete(1),[4,ga(s)];case 2:return h.sent(),[2]}})})}),[2]}})})}function Bf(s,o){return o().catch(function(a){return _u(s,a,o)})}function Do(s){return(0,C.mG)(this,void 0,void 0,function(){var o,a,c,f,h;return(0,C.Jh)(this,function(g){switch(g.label){case 0:o=F(s),a=Eo(o),c=o.Fr.length>0?o.Fr[o.Fr.length-1].batchId:-1,g.label=1;case 1:if(!(ki(y=o)&&y.Fr.length<10))return[3,7];g.label=2;case 2:return g.trys.push([2,4,,6]),[4,Zm(o.localStore,c)];case 3:return null===(f=g.sent())?(0===o.Fr.length&&a.ir(),[3,7]):(c=f.batchId,function(y,_){y.Fr.push(_);var D=Eo(y);D.er()&&D.pr&&D.Er(_.mutations)}(o,f),[3,6]);case 4:return h=g.sent(),[4,_u(o,h)];case 5:return g.sent(),[3,6];case 6:return[3,1];case 7:return jf(o)&&bu(o),[2]}var y})})}function jf(s){return ki(s)&&!Eo(s).tr()&&s.Fr.length>0}function bu(s){Eo(s).start()}function zc(s){return(0,C.mG)(this,void 0,void 0,function(){return(0,C.Jh)(this,function(o){return Eo(s).Ar(),[2]})})}function hp(s){return(0,C.mG)(this,void 0,void 0,function(){var o,a,c;return(0,C.Jh)(this,function(h){for(o=Eo(s),a=0,c=s.Fr;a<c.length;a++)o.Er(c[a].mutations);return[2]})})}function Uf(s,o,a){return(0,C.mG)(this,void 0,void 0,function(){var c,f;return(0,C.Jh)(this,function(h){switch(h.label){case 0:return c=s.Fr.shift(),f=jm.from(c,o,a),[4,Bf(s,function(){return s.remoteSyncer.applySuccessfulWrite(f)})];case 1:return h.sent(),[4,Do(s)];case 2:return h.sent(),[2]}})})}function pp(s,o){return(0,C.mG)(this,void 0,void 0,function(){return(0,C.Jh)(this,function(a){switch(a.label){case 0:return o&&Eo(s).pr?[4,function(c,f){return(0,C.mG)(this,void 0,void 0,function(){var h,g;return(0,C.Jh)(this,function(y){switch(y.label){case 0:return bc(g=f.code)&&g!==U.ABORTED?(h=c.Fr.shift(),Eo(c).sr(),[4,Bf(c,function(){return c.remoteSyncer.rejectFailedWrite(h.batchId,f)})]):[3,3];case 1:return y.sent(),[4,Do(c)];case 2:y.sent(),y.label=3;case 3:return[2]}})})}(s,o)]:[3,2];case 1:a.sent(),a.label=2;case 2:return jf(s)&&bu(s),[2]}})})}function wu(s,o){return(0,C.mG)(this,void 0,void 0,function(){var a;return(0,C.Jh)(this,function(c){switch(c.label){case 0:return a=F(s),o?(a.Or.delete(2),[4,ga(a)]):[3,2];case 1:return c.sent(),[3,5];case 2:return o?[3,4]:(a.Or.add(2),[4,wo(a)]);case 3:c.sent(),a.Br.set("Unknown"),c.label=4;case 4:c.label=5;case 5:return[2]}})})}function hi(s){var a,c,f,h,o=this;return s.Ur||(s.Ur=(a=s.datastore,c=s.asyncQueue,f={Ii:$c.bind(null,s),Ri:cy.bind(null,s),_r:dp.bind(null,s)},(h=F(a)).br(),new sy(c,h.Hi,h.credentials,h.R,f)),s.Mr.push(function(a){return(0,C.mG)(o,void 0,void 0,function(){return(0,C.Jh)(this,function(c){switch(c.label){case 0:return a?(s.Ur.sr(),qc(s)?Ri(s):s.Br.set("Unknown"),[3,3]):[3,1];case 1:return[4,s.Ur.stop()];case 2:c.sent(),fp(s),c.label=3;case 3:return[2]}})})})),s.Ur}function Eo(s){var a,c,f,h,o=this;return s.Kr||(s.Kr=(a=s.datastore,c=s.asyncQueue,f={Ii:zc.bind(null,s),Ri:pp.bind(null,s),Ir:hp.bind(null,s),Tr:Uf.bind(null,s)},(h=F(a)).br(),new ay(c,h.Hi,h.credentials,h.R,f)),s.Mr.push(function(a){return(0,C.mG)(o,void 0,void 0,function(){return(0,C.Jh)(this,function(c){switch(c.label){case 0:return a?(s.Kr.sr(),[4,Do(s)]):[3,2];case 1:return c.sent(),[3,4];case 2:return[4,s.Kr.stop()];case 3:c.sent(),s.Fr.length>0&&(oe("RemoteStore","Stopping write stream with "+s.Fr.length+" pending writes"),s.Fr=[]),c.label=4;case 4:return[2]}})})})),s.Kr}var gp=function(){function s(o,a,c,f,h){this.asyncQueue=o,this.timerId=a,this.targetTimeMs=c,this.op=f,this.removalCallback=h,this.deferred=new jn,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.deferred.promise.catch(function(g){})}return s.createAndSchedule=function(o,a,c,f,h){var g=new s(o,a,Date.now()+c,f,h);return g.start(c),g},s.prototype.start=function(o){var a=this;this.timerHandle=setTimeout(function(){return a.handleDelayElapsed()},o)},s.prototype.skipDelay=function(){return this.handleDelayElapsed()},s.prototype.cancel=function(o){null!==this.timerHandle&&(this.clearTimeout(),this.deferred.reject(new K(U.CANCELLED,"Operation cancelled"+(o?": "+o:""))))},s.prototype.handleDelayElapsed=function(){var o=this;this.asyncQueue.enqueueAndForget(function(){return null!==o.timerHandle?(o.clearTimeout(),o.op().then(function(a){return o.deferred.resolve(a)})):Promise.resolve()})},s.prototype.clearTimeout=function(){null!==this.timerHandle&&(this.removalCallback(this),clearTimeout(this.timerHandle),this.timerHandle=null)},s}();function ma(s,o){if(Xt("AsyncQueue",o+": "+s),fs(s))return new K(U.UNAVAILABLE,o+": "+s);throw s}var mp=function(){function s(o){this.comparator=o?function(a,c){return o(a,c)||De.comparator(a.key,c.key)}:function(a,c){return De.comparator(a.key,c.key)},this.keyedMap=hf(),this.sortedSet=new Xn(this.comparator)}return s.emptySet=function(o){return new s(o.comparator)},s.prototype.has=function(o){return null!=this.keyedMap.get(o)},s.prototype.get=function(o){return this.keyedMap.get(o)},s.prototype.first=function(){return this.sortedSet.minKey()},s.prototype.last=function(){return this.sortedSet.maxKey()},s.prototype.isEmpty=function(){return this.sortedSet.isEmpty()},s.prototype.indexOf=function(o){var a=this.keyedMap.get(o);return a?this.sortedSet.indexOf(a):-1},Object.defineProperty(s.prototype,"size",{get:function(){return this.sortedSet.size}
1,enumerable:!1,configurable:!0}),s.prototype.forEach=function(o){this.sortedSet.inorderTraversal(function(a,c){return o(a),!1})},s.prototype.add=function(o){var a=this.delete(o.key);return a.copy(a.keyedMap.insert(o.key,o),a.sortedSet.insert(o,null))},s.prototype.delete=function(o){var a=this.get(o);return a?this.copy(this.keyedMap.remove(o),this.sortedSet.remove(a)):this},s.prototype.isEqual=function(o){if(!(o instanceof s)||this.size!==o.size)return!1;for(var a=this.sortedSet.getIterator(),c=o.sortedSet.getIterator();a.hasNext();){var f=a.getNext().key,h=c.getNext().key;if(!f.isEqual(h))return!1}return!0},s.prototype.toString=function(){var o=[];return this.forEach(function(a){o.push(a.toString())}),0===o.length?"DocumentSet ()":"DocumentSet (\n  "+o.join("  \n")+"\n)"},s.prototype.copy=function(o,a){var c=new s;return c.comparator=this.comparator,c.keyedMap=o,c.sortedSet=a,c},s}(),Hf=function(){function s(){this.Qr=new Xn(De.comparator)}return s.prototype.track=function(o){var a=o.doc.key,c=this.Qr.get(a);c?0!==o.type&&3===c.type?this.Qr=this.Qr.insert(a,o):3===o.type&&1!==c.type?this.Qr=this.Qr.insert(a,{type:c.type,doc:o.doc}):2===o.type&&2===c.type?this.Qr=this.Qr.insert(a,{type:2,doc:o.doc}):2===o.type&&0===c.type?this.Qr=this.Qr.insert(a,{type:0,doc:o.doc}):1===o.type&&0===c.type?this.Qr=this.Qr.remove(a):1===o.type&&2===c.type?this.Qr=this.Qr.insert(a,{type:1,doc:c.doc}):0===o.type&&1===c.type?this.Qr=this.Qr.insert(a,{type:2,doc:o.doc}):_e():this.Qr=this.Qr.insert(a,o)},s.prototype.jr=function(){var o=[];return this.Qr.inorderTraversal(function(a,c){o.push(c)}),o},s}(),ya=function(){function s(o,a,c,f,h,g,y,_){this.query=o,this.docs=a,this.oldDocs=c,this.docChanges=f,this.mutatedKeys=h,this.fromCache=g,this.syncStateChanged=y,this.excludesMetadataChanges=_}return s.fromInitialDocuments=function(o,a,c,f){var h=[];return a.forEach(function(g){h.push({type:0,doc:g})}),new s(o,a,mp.emptySet(a),h,c,f,!0,!1)},Object.defineProperty(s.prototype,"hasPendingWrites",{get:function(){return!this.mutatedKeys.isEmpty()},enumerable:!1,configurable:!0}),s.prototype.isEqual=function(o){if(!(this.fromCache===o.fromCache&&this.syncStateChanged===o.syncStateChanged&&this.mutatedKeys.isEqual(o.mutatedKeys)&&nu(this.query,o.query)&&this.docs.isEqual(o.docs)&&this.oldDocs.isEqual(o.oldDocs)))return!1;var a=this.docChanges,c=o.docChanges;if(a.length!==c.length)return!1;for(var f=0;f<a.length;f++)if(a[f].type!==c[f].type||!a[f].doc.isEqual(c[f].doc))return!1;return!0},s}(),yp=function(){this.Wr=void 0,this.listeners=[]},e0=function(){this.queries=new hu(function(s){return Qs(s)},nu),this.onlineState="Unknown",this.Gr=new Set};function Wc(s,o){return(0,C.mG)(this,void 0,void 0,function(){var a,c,f,h,g,y,_;return(0,C.Jh)(this,function(D){switch(D.label){case 0:if(a=F(s),f=!1,(h=a.queries.get(c=o.query))||(f=!0,h=new yp),!f)return[3,4];D.label=1;case 1:return D.trys.push([1,3,,4]),g=h,[4,a.onListen(c)];case 2:return g.Wr=D.sent(),[3,4];case 3:return y=D.sent(),_=ma(y,"Initialization of query '"+ru(o.query)+"' failed"),[2,void o.onError(_)];case 4:return a.queries.set(c,h),h.listeners.push(o),o.zr(a.onlineState),h.Wr&&o.Hr(h.Wr)&&qf(a),[2]}})})}function Gf(s,o){return(0,C.mG)(this,void 0,void 0,function(){var a,c,f,h,g;return(0,C.Jh)(this,function(y){return a=F(s),f=!1,(h=a.queries.get(c=o.query))&&(g=h.listeners.indexOf(o))>=0&&(h.listeners.splice(g,1),f=0===h.listeners.length),f?[2,(a.queries.delete(c),a.onUnlisten(c))]:[2]})})}function vp(s,o){for(var a=F(s),c=!1,f=0,h=o;f<h.length;f++){var g=h[f],_=a.queries.get(g.query);if(_){for(var D=0,E=_.listeners;D<E.length;D++)E[D].Hr(g)&&(c=!0);_.Wr=g}}c&&qf(a)}function ly(s,o,a){var c=F(s),f=c.queries.get(o);if(f)for(var h=0,g=f.listeners;h<g.length;h++)g[h].onError(a);c.queries.delete(o)}function qf(s){s.Gr.forEach(function(o){o.next()})}var Tr=function(){function s(o,a,c){this.query=o,this.Jr=a,this.Yr=!1,this.Xr=null,this.onlineState="Unknown",this.options=c||{}}return s.prototype.Hr=function(o){if(!this.options.includeMetadataChanges){for(var a=[],c=0,f=o.docChanges;c<f.length;c++){var h=f[c];3!==h.type&&a.push(h)}o=new ya(o.query,o.docs,o.oldDocs,a,o.mutatedKeys,o.fromCache,o.syncStateChanged,!0)}var g=!1;return this.Yr?this.Zr(o)&&(this.Jr.next(o),g=!0):this.eo(o,this.onlineState)&&(this.no(o),g=!0),this.Xr=o,g},s.prototype.onError=function(o){this.Jr.error(o)},s.prototype.zr=function(o){this.onlineState=o;var a=!1;return this.Xr&&!this.Yr&&this.eo(this.Xr,o)&&(this.no(this.Xr),a=!0),a},s.prototype.eo=function(o,a){return!o.fromCache||!(this.options.so&&"Offline"!==a||o.docs.isEmpty()&&"Offline"!==a)},s.prototype.Zr=function(o){return o.docChanges.length>0||!!(o.syncStateChanged||this.Xr&&this.Xr.hasPendingWrites!==o.hasPendingWrites)&&!0===this.options.includeMetadataChanges},s.prototype.no=function(o){o=ya.fromInitialDocuments(o.query,o.docs,o.mutatedKeys,o.fromCache),this.Yr=!0,this.Jr.next(o)},s}(),fy=function(){function s(o,a){this.payload=o,this.byteLength=a}return s.prototype.io=function(){return"metadata"in this.payload},s}(),$f=function(){function s(o){this.R=o}return s.prototype.qn=function(o){return ui(this.R,o)},s.prototype.Un=function(o){return o.metadata.exists?Pm(this.R,o.document,!1):Nn.newNoDocument(this.qn(o.metadata.name),this.Kn(o.metadata.readTime))},s.prototype.Kn=function(o){return gn(o)},s}();!function(){function s(o,a,c){this.ro=o,this.localStore=a,this.R=c,this.queries=[],this.documents=[],this.progress=function _p(s){return{taskState:"Running",documentsLoaded:0,bytesLoaded:0,totalDocuments:s.totalDocuments,totalBytes:s.totalBytes}}(o)}s.prototype.oo=function(o){this.progress.bytesLoaded+=o.byteLength;var a=this.progress.documentsLoaded;return o.payload.namedQuery?this.queries.push(o.payload.namedQuery):o.payload.documentMetadata?(this.documents.push({metadata:o.payload.documentMetadata}),o.payload.documentMetadata.exists||++a):o.payload.document&&(this.documents[this.documents.length-1].document=o.payload.document,++a),a!==this.progress.documentsLoaded?(this.progress.documentsLoaded=a,Object.assign({},this.progress)):null},s.prototype.co=function(o){for(var a=new Map,c=new $f(this.R),f=0,h=o;f<h.length;f++){var g=h[f];if(g.metadata.queries)for(var y=c.qn(g.metadata.name),_=0,D=g.metadata.queries;_<D.length;_++){var E=D[_],T=(a.get(E)||vt()).add(y);a.set(E,T)}}return a},s.prototype.complete=function(){return(0,C.mG)(this,void 0,void 0,function(){var o,a,c,f,h;return(0,C.Jh)(this,function(g){switch(g.label){case 0:return[4,ey(this.localStore,new $f(this.R),this.documents,this.ro.id)];case 1:o=g.sent(),a=this.co(this.documents),c=0,f=this.queries,g.label=2;case 2:return c<f.length?[4,ty(this.localStore,h=f[c],a.get(h.name))]:[3,5];case 3:g.sent(),g.label=4;case 4:return c++,[3,2];case 5:return[2,(this.progress.taskState="Success",new Qm(Object.assign({},this.progress),o))]}})})}}();var bp=function(s){this.key=s},wp=function(s){this.key=s},zf=function(){function s(o,a){this.query=o,this.uo=a,this.ao=null,this.current=!1,this.ho=vt(),this.mutatedKeys=vt(),this.lo=iu(o),this.fo=new mp(this.lo)}return Object.defineProperty(s.prototype,"wo",{get:function(){return this.uo}
1,enumerable:!1,configurable:!0}),s.prototype._o=function(o,a){var c=this,f=a?a.mo:new Hf,h=a?a.fo:this.fo,g=a?a.mutatedKeys:this.mutatedKeys,y=h,_=!1,D=mc(this.query)&&h.size===this.query.limit?h.last():null,E=Si(this.query)&&h.size===this.query.limit?h.first():null;if(o.inorderTraversal(function(S,k){var P=h.get(S),H=ns(c.query,k)?k:null,te=!!P&&c.mutatedKeys.has(P.key),ce=!!H&&(H.hasLocalMutations||c.mutatedKeys.has(H.key)&&H.hasCommittedMutations),Ie=!1;P&&H?P.data.isEqual(H.data)?te!==ce&&(f.track({type:3,doc:H}),Ie=!0):c.yo(P,H)||(f.track({type:2,doc:H}),Ie=!0,(D&&c.lo(H,D)>0||E&&c.lo(H,E)<0)&&(_=!0)):!P&&H?(f.track({type:0,doc:H}),Ie=!0):P&&!H&&(f.track({type:1,doc:P}),Ie=!0,(D||E)&&(_=!0)),Ie&&(H?(y=y.add(H),g=ce?g.add(S):g.delete(S)):(y=y.delete(S),g=g.delete(S)))}),mc(this.query)||Si(this.query))for(;y.size>this.query.limit;){var T=mc(this.query)?y.last():y.first();y=y.delete(T.key),g=g.delete(T.key),f.track({type:1,doc:T})}return{fo:y,mo:f,Nn:_,mutatedKeys:g}},s.prototype.yo=function(o,a){return o.hasLocalMutations&&a.hasCommittedMutations&&!a.hasLocalMutations},s.prototype.applyChanges=function(o,a,c){var f=this,h=this.fo;this.fo=o.fo,this.mutatedKeys=o.mutatedKeys;var g=o.mo.jr();g.sort(function(E,T){return k=T.type,(P=function(H){switch(H){case 0:return 1;case 2:case 3:return 2;case 1:return 0;default:return _e()}})(E.type)-P(k)||f.lo(E.doc,T.doc);var k,P}),this.po(c);var y=a?this.Eo():[],_=0===this.ho.size&&this.current?1:0,D=_!==this.ao;return this.ao=_,0!==g.length||D?{snapshot:new ya(this.query,o.fo,h,g,o.mutatedKeys,0===_,D,!1),To:y}:{To:y}},s.prototype.zr=function(o){return this.current&&"Offline"===o?(this.current=!1,this.applyChanges({fo:this.fo,mo:new Hf,mutatedKeys:this.mutatedKeys,Nn:!1},!1)):{To:[]}},s.prototype.Io=function(o){return!this.uo.has(o)&&!!this.fo.has(o)&&!this.fo.get(o).hasLocalMutations},s.prototype.po=function(o){var a=this;o&&(o.addedDocuments.forEach(function(c){return a.uo=a.uo.add(c)}),o.modifiedDocuments.forEach(function(c){}),o.removedDocuments.forEach(function(c){return a.uo=a.uo.delete(c)}),this.current=o.current)},s.prototype.Eo=function(){var o=this;if(!this.current)return[];var a=this.ho;this.ho=vt(),this.fo.forEach(function(f){o.Io(f.key)&&(o.ho=o.ho.add(f.key))});var c=[];return a.forEach(function(f){o.ho.has(f)||c.push(new wp(f))}),this.ho.forEach(function(f){a.has(f)||c.push(new bp(f))}),c},s.prototype.Ao=function(o){this.uo=o.Bn,this.ho=vt();var a=this._o(o.documents);return this.applyChanges(a,!0)},s.prototype.Ro=function(){return ya.fromInitialDocuments(this.query,this.fo,this.mutatedKeys,0===this.ao)},s}(),hy=function(s,o,a){this.query=s,this.targetId=o,this.view=a},py=function(s){this.key=s,this.bo=!1},gy=function(){function s(o,a,c,f,h,g){this.localStore=o,this.remoteStore=a,this.eventManager=c,this.sharedClientState=f,this.currentUser=h,this.maxConcurrentLimboResolutions=g,this.vo={},this.Po=new hu(function(y){return Qs(y)},nu),this.Vo=new Map,this.So=new Set,this.Do=new Xn(De.comparator),this.Co=new Map,this.No=new Lc,this.xo={},this.ko=new Map,this.Fo=Fc.Yt(),this.onlineState="Unknown",this.$o=void 0}return Object.defineProperty(s.prototype,"isPrimaryClient",{get:function(){return!0===this.$o},enumerable:!1,configurable:!0}),s}();function Be(s,o){return(0,C.mG)(this,void 0,void 0,function(){var a,f,h,g,y;return(0,C.Jh)(this,function(_){switch(_.label){case 0:return a=Ap(s),(h=a.Po.get(o))?(a.sharedClientState.addLocalQueryTarget(h.targetId),f=h.view.Ro(),[3,4]):[3,1];case 1:return[4,ca(a.localStore,Er(o))];case 2:return g=_.sent(),y=a.sharedClientState.addLocalQueryTarget(g.targetId),[4,Oe(a,o,g.targetId,"current"===y)];case 3:f=_.sent(),a.isPrimaryClient&&Hc(a.remoteStore,g),_.label=4;case 4:return[2,f]}})})}function Oe(s,o,a,c){return(0,C.mG)(this,void 0,void 0,function(){var f,h,g,y,_,D;return(0,C.Jh)(this,function(E){switch(E.label){case 0:return s.Oo=function(T,S,k){return function(P,H,te,ce){return(0,C.mG)(this,void 0,void 0,function(){var Ie,Ae,Qe;return(0,C.Jh)(this,function(Ye){switch(Ye.label){case 0:return(Ie=H.view._o(te)).Nn?[4,kc(P.localStore,H.query,!1).then(function(st){return H.view._o(st.documents,Ie)})]:[3,2];case 1:Ie=Ye.sent(),Ye.label=2;case 2:return Ae=ce&&ce.targetChanges.get(H.targetId),Qe=H.view.applyChanges(Ie,P.isPrimaryClient,Ae),[2,(Qc(P,H.targetId,Qe.To),Qe.snapshot)]}})})}(s,T,S,k)},[4,kc(s.localStore,o,!0)];case 1:return f=E.sent(),h=new zf(o,f.Bn),g=h._o(f.documents),y=Ah.createSynthesizedTargetChangeForCurrentChange(a,c&&"Offline"!==s.onlineState),_=h.applyChanges(g,s.isPrimaryClient,y),Qc(s,a,_.To),D=new hy(o,a,h),[2,(s.Po.set(o,D),s.Vo.has(a)?s.Vo.get(a).push(o):s.Vo.set(a,[o]),_.snapshot)]}})})}function Dp(s,o){return(0,C.mG)(this,void 0,void 0,function(){var a,c,f;return(0,C.Jh)(this,function(h){switch(h.label){case 0:return a=F(s),c=a.Po.get(o),(f=a.Vo.get(c.targetId)).length>1?[2,(a.Vo.set(c.targetId,f.filter(function(g){return!nu(g,o)}
1)),void a.Po.delete(o))]:a.isPrimaryClient?(a.sharedClientState.removeLocalQueryTarget(c.targetId),a.sharedClientState.isActiveQueryTarget(c.targetId)?[3,2]:[4,la(a.localStore,c.targetId,!1).then(function(){a.sharedClientState.clearQueryState(c.targetId),vu(a.remoteStore,c.targetId),Co(a,c.targetId)}).catch(bo)]):[3,3];case 1:h.sent(),h.label=2;case 2:return[3,5];case 3:return Co(a,c.targetId),[4,la(a.localStore,c.targetId,!0)];case 4:h.sent(),h.label=5;case 5:return[2]}})})}function Ep(s,o,a){return(0,C.mG)(this,void 0,void 0,function(){var c,f,h,g;return(0,C.Jh)(this,function(y){switch(y.label){case 0:c=Jc(s),y.label=1;case 1:return y.trys.push([1,5,,6]),[4,(_=c.localStore,D=o,T=F(_),S=Ht.now(),k=D.reduce(function(P,H){return P.add(H.key)},vt()),T.persistence.runTransaction("Locally write mutations","readwrite",function(P){return T.Mn.pn(P,k).next(function(H){E=H;for(var te=[],ce=0,Ie=D;ce<Ie.length;ce++){var Ae=Ie[ce],Qe=z_(Ae,E.get(Ae.key));null!=Qe&&te.push(new is(Ae.key,Qe,mh(Qe.value.mapValue),Wt.exists(!0)))}return T._n.addMutationBatch(P,S,te,D)})}).then(function(P){return P.applyToLocalDocumentSet(E),{batchId:P.batchId,changes:E}}))];case 2:return f=y.sent(),c.sharedClientState.addPendingMutation(f.batchId),function(_,D,E){var T=_.xo[_.currentUser.toKey()];T||(T=new Xn(Se)),T=T.insert(D,E),_.xo[_.currentUser.toKey()]=T}(c,f.batchId,a),[4,Lr(c,f.changes)];case 3:return y.sent(),[4,Do(c.remoteStore)];case 4:return y.sent(),[3,6];case 5:return h=y.sent(),g=ma(h,"Failed to persist write"),a.reject(g),[3,6];case 6:return[2]}var _,D,E,T,S,k})})}function Du(s,o){return(0,C.mG)(this,void 0,void 0,function(){var a,c;return(0,C.Jh)(this,function(f){switch(f.label){case 0:a=F(s),f.label=1;case 1:return f.trys.push([1,4,,6]),[4,Ym(a.localStore,o)];
1case 2:return c=f.sent(),o.targetChanges.forEach(function(h,g){var y=a.Co.get(g);y&&(Fe(h.addedDocuments.size+h.modifiedDocuments.size+h.removedDocuments.size<=1),h.addedDocuments.size>0?y.bo=!0:h.modifiedDocuments.size>0?Fe(y.bo):h.removedDocuments.size>0&&(Fe(y.bo),y.bo=!1))}),[4,Lr(a,c,o)];case 3:return f.sent(),[3,6];case 4:return[4,bo(f.sent())];case 5:return f.sent(),[3,6];case 6:return[2]}})})}function kr(s,o,a){var c=F(s);if(c.isPrimaryClient&&0===a||!c.isPrimaryClient&&1===a){var f=[];c.Po.forEach(function(h,g){var y=g.view.zr(o);y.snapshot&&f.push(y.snapshot)}),function(h,g){var y=F(h);y.onlineState=g;var _=!1;y.queries.forEach(function(D,E){for(var T=0,S=E.listeners;T<S.length;T++)S[T].zr(g)&&(_=!0)}),_&&qf(y)}(c.eventManager,o),f.length&&c.vo._r(f),c.onlineState=o,c.isPrimaryClient&&c.sharedClientState.setOnlineState(o)}}function Cp(s,o,a){return(0,C.mG)(this,void 0,void 0,function(){var c,f,h,g,y,_;return(0,C.Jh)(this,function(D){switch(D.label){case 0:return(c=F(s)).sharedClientState.updateQueryState(o,"rejected",a),f=c.Co.get(o),(h=f&&f.key)?(g=(g=new Xn(De.comparator)).insert(h,Nn.newNoDocument(h,He.min())),y=vt().add(h),_=new mo(He.min(),new Map,new Et(Se),g,y),[4,Du(c,_)]):[3,2];case 1:return D.sent(),c.Do=c.Do.remove(h),c.Co.delete(o),va(c),[3,4];case 2:return[4,la(c.localStore,o,!1).then(function(){return Co(c,o,a)}).catch(bo)];case 3:D.sent(),D.label=4;case 4:return[2]}})})}function my(s,o){return(0,C.mG)(this,void 0,void 0,function(){var a,c,f;return(0,C.Jh)(this,function(h){switch(h.label){case 0:a=F(s),c=o.batch.batchId,h.label=1;case 1:return h.trys.push([1,4,,6]),[4,Of(a.localStore,o)];case 2:return f=h.sent(),Kc(a,c,null),Eu(a,c),a.sharedClientState.updateMutationState(c,"acknowledged"),[4,Lr(a,f)];case 3:return h.sent(),[3,6];case 4:return[4,bo(h.sent())];case 5:return h.sent(),[3,6];case 6:return[2]}})})}function Wf(s,o,a){return(0,C.mG)(this,void 0,void 0,function(){var c,f;return(0,C.Jh)(this,function(h){switch(h.label){case 0:c=F(s),h.label=1;case 1:return h.trys.push([1,4,,6]),[4,(g=c.localStore,y=o,_=F(g),_.persistence.runTransaction("Reject batch","readwrite-primary",function(D){var E;return _._n.lookupMutationBatch(D,y).next(function(T){return Fe(null!==T),E=T.keys(),_._n.removeMutationBatch(D,T)}).next(function(){return _._n.performConsistencyCheck(D)}).next(function(){return _.Mn.pn(D,E)})}))];case 2:return f=h.sent(),Kc(c,o,a),Eu(c,o),c.sharedClientState.updateMutationState(o,"rejected",a),[4,Lr(c,f)];case 3:return h.sent(),[3,6];case 4:return[4,bo(h.sent())];case 5:return h.sent(),[3,6];case 6:return[2]}var g,y,_})})}function Li(s,o){return(0,C.mG)(this,void 0,void 0,function(){var a,c,f,h,g;return(0,C.Jh)(this,function(y){switch(y.label){case 0:ki((a=F(s)).remoteStore)||oe("SyncEngine","The network is disabled. The task returned by 'awaitPendingWrites()' will not complete until the network is enabled."),y.label=1;case 1:return y.trys.push([1,3,,4]),[4,(_=a.localStore,D=F(_),D.persistence.runTransaction("Get highest unacknowledged batch id","readonly",function(E){return D._n.getHighestUnacknowledgedBatchId(E)}))];case 2:return-1===(c=y.sent())?[2,void o.resolve()]:((f=a.ko.get(c)||[]).push(o),a.ko.set(c,f),[3,4]);case 3:return h=y.sent(),g=ma(h,"Initialization of waitForPendingWrites() operation failed"),o.reject(g),[3,4];case 4:return[2]}var _,D})})}function Eu(s,o){(s.ko.get(o)||[]).forEach(function(a){a.resolve()}),s.ko.delete(o)}function Kc(s,o,a){var c=F(s),f=c.xo[c.currentUser.toKey()];if(f){var h=f.get(o);h&&(a?h.reject(a):h.resolve(),f=f.remove(o)),c.xo[c.currentUser.toKey()]=f}}function Co(s,o,a){void 0===a&&(a=null),s.sharedClientState.removeLocalQueryTarget(o);for(var c=0,f=s.Vo.get(o);c<f.length;c++){var h=f[c];s.Po.delete(h),a&&s.vo.Mo(h,a)}s.Vo.delete(o),s.isPrimaryClient&&s.No.Zn(o).forEach(function(g){s.No.containsKey(g)||yy(s,g)})}function yy(s,o){s.So.delete(o.path.canonicalString());var a=s.Do.get(o);null!==a&&(vu(s.remoteStore,a),s.Do=s.Do.remove(o),s.Co.delete(a),va(s))}function Qc(s,o,a){for(var c=0,f=a;c<f.length;c++){var h=f[c];h instanceof bp?(s.No.addReference(h.key,o),t0(s,h)):h instanceof wp?(oe("SyncEngine","Document no longer in limbo: "+h.key),s.No.removeReference(h.key,o),s.No.containsKey(h.key)||yy(s,h.key)):_e()}}function t0(s,o){var a=o.key,c=a.path.canonicalString();s.Do.get(a)||s.So.has(c)||(oe("SyncEngine","New document in limbo: "+a),s.So.add(c),va(s))}function va(s){for(;s.So.size>0&&s.Do.size<s.maxConcurrentLimboResolutions;){var o=s.So.values().next().value;s.So.delete(o);var a=new De(tt.fromString(o)),c=s.Fo.next();s.Co.set(c,new py(a)),s.Do=s.Do.insert(a,c),Hc(s.remoteStore,new Ac(Er(zr(a.path)),c,2,Zt.o))}}function Lr(s,o,a){return(0,C.mG)(this,void 0,void 0,function(){var c,f,h,g;return(0,C.Jh)(this,function(y){switch(y.label){case 0:return c=F(s),f=[],h=[],g=[],c.Po.isEmpty()?[3,3]:(c.Po.forEach(function(_,D){g.push(c.Oo(D,o,a).then(function(E){if(E){c.isPrimaryClient&&c.sharedCl
1ientState.updateQueryState(D.targetId,E.fromCache?"not-current":"current"),f.push(E);var T=Jm.Pn(D.targetId,E);h.push(T)}}))}),[4,Promise.all(g)]);case 1:return y.sent(),c.vo._r(f),[4,function(_,D){return(0,C.mG)(this,void 0,void 0,function(){var E,T,S,k,P,H,te,Ie;return(0,C.Jh)(this,function(Ae){switch(Ae.label){case 0:E=F(_),Ae.label=1;case 1:return Ae.trys.push([1,3,,4]),[4,E.persistence.runTransaction("notifyLocalViewChanges","readwrite",function(Qe){return ee.forEach(D,function(Ye){return ee.forEach(Ye.bn,function(st){return E.persistence.referenceDelegate.addReference(Qe,Ye.targetId,st)}).next(function(){return ee.forEach(Ye.vn,function(st){return E.persistence.referenceDelegate.removeReference(Qe,Ye.targetId,st)})})})})];case 2:return Ae.sent(),[3,4];case 3:if(!fs(T=Ae.sent()))throw T;return oe("LocalStore","Failed to update sequence numbers: "+T),[3,4];case 4:for(S=0,k=D;S<k.length;S++)H=(P=k[S]).targetId,P.fromCache||(te=E.kn.get(H),Ie=te.withLastLimboFreeSnapshotVersion(te.snapshotVersion),E.kn=E.kn.insert(H,Ie));return[2]}})})}(c.localStore,h)];case 2:y.sent(),y.label=3;case 3:return[2]}})})}function Kf(s,o){return(0,C.mG)(this,void 0,void 0,function(){var a,c;return(0,C.Jh)(this,function(f){switch(f.label){case 0:return(a=F(s)).currentUser.isEqual(o)?[3,3]:(oe("SyncEngine","User change. New user:",o.toKey()),[4,ep(a.localStore,o)]);case 1:return c=f.sent(),a.currentUser=o,(h=a).ko.forEach(function(y){y.forEach(function(_){_.reject(new K(U.CANCELLED,"'waitForPendingWrites' promise is rejected due to a user change."))})}),h.ko.clear(),a.sharedClientState.handleUserChange(o,c.removedBatchIds,c.addedBatchIds),[4,Lr(a,c.Ln)];case 2:f.sent(),f.label=3;case 3:return[2]}var h})})}function Qf(s,o){var a=F(s),c=a.Co.get(o);if(c&&c.bo)return vt().add(c.key);var f=vt(),h=a.Vo.get(o);if(!h)return f;for(var g=0,y=h;g<y.length;g++){var D=a.Po.get(y[g]);f=f.unionWith(D.view.wo)}return f}function Jf(s,o){return(0,C.mG)(this,void 0,void 0,function(){var a,c,f;return(0,C.Jh)(this,function(h){switch(h.label){case 0:return[4,kc((a=F(s)).localStore,o.query,!0)];case 1:return c=h.sent(),f=o.view.Ao(c),[2,(a.isPrimaryClient&&Qc(a,o.targetId,f.To),f)]}})})}function n0(s){return(0,C.mG)(this,void 0,void 0,function(){var o;return(0,C.Jh)(this,function(a){return[2,Pf((o=F(s)).localStore).then(function(c){return Lr(o,c)})]})})}function vy(s,o,a,c){return(0,C.mG)(this,void 0,void 0,function(){var f,h;return(0,C.Jh)(this,function(g){switch(g.label){case 0:return[4,(y=(f=F(s)).localStore,_=o,D=F(y),E=F(D._n),D.persistence.runTransaction("Lookup mutation documents","readonly",function(T){return E.jt(T,_).next(function(S){return S?D.Mn.pn(T,S):ee.resolve(null)})}))];case 1:return null===(h=g.sent())?[3,6]:"pending"!==a?[3,3]:[4,Do(f.remoteStore)];case 2:return g.sent(),[3,4];case 3:"acknowledged"===a||"rejected"===a?(Kc(f,o,c||null),Eu(f,o),function(y,_){F(F(y)._n).Gt(_)}(f.localStore,o)):_e(),g.label=4;case 4:return[4,Lr(f,h)];case 5:return g.sent(),[3,7];case 6:oe("SyncEngine","Cannot apply mutation batch with id: "+o),g.label=7;case 7:return[2]}var y,_,D,E})})}function _y(s,o){return(0,C.mG)(this,void 0,void 0,function(){var a,c,f,h,g,_,D;return(0,C.Jh)(this,function(E){switch(E.label){case 0:return Ap(a=F(s)),Jc(a),!0!==o||!0===a.$o?[3,3]:(c=a.sharedClientState.getAllActiveQueryTargets(),[4,Ip(a,c.toArray())]);case 1:return f=E.sent(),a.$o=!0,[4,wu(a.remoteStore,!0)];case 2:for(E.sent(),h=0,g=f;h<g.length;h++)Hc(a.remoteStore,g[h]);return[3,7];case 3:return!1!==o||!1===a.$o?[3,7]:(_=[],D=Promise.resolve(),a.Vo.forEach(function(T,S){a.sharedClientState.isLocalQueryTarget(S)?_.push(S):D=D.then(function(){return Co(a,S),la(a.localStore,S,!0)}),vu(a.remoteStore,S)}),[4,D]);case 4:return E.sent(),[4,Ip(a,_)];case 5:return E.sent(),(S=F(a)).Co.forEach(function(k,P){vu(S.remoteStore,P)}),S.No.ts(),S.Co=new Map,S.Do=new Xn(De.comparator),a.$o=!1,[4,wu(a.remoteStore,!1)];case 6:E.sent(),E.label=7;case 7:return[2]}var S})})}function Ip(s,o,a){return(0,C.mG)(this,void 0,void 0,function(){var c,f,h,g,y,_,D,E,T,S,P,H,te;return(0,C.Jh)(this,function(ce){switch(ce.label){case 0:c=F(s),f=[],h=[],g=0,y=o,ce.label=1;case 1:return g<y.length?(D=void 0,(E=c.Vo.get(_=y[g]))&&0!==E.length?[4,ca(c.localStore,Er(E[0]))]:[3,7]):[3,13];case 2:D=ce.sent(),T=0,S=E,ce.label=3;case 3:return T<S.length?(P=c.Po.get(S[T]),[4,Jf(c,P)]):[3,6];case 4:(H=ce.sent()).snapshot&&h.push(H.snapshot),ce.label=5;case 5:return T++,[3,3];case 6:return[3,11];case 7:return[4,np(c.localStore,_)];case 8:return te=ce.sent(),[4,ca(c.localStore,te)];case 9:return D=ce.sent(),[4,Oe(c,Tp(te),_,!1)];case 10:ce.sent(),ce.label=11;case 11:f.push(D),ce.label=12;case 12:return g++,[3,1];case 13:return[2,(c.vo._r(h),f)]}})})}function Tp(s){return af(s.path,s.collectionGroup,s.orderBy,s.filters,s.limit,"F",s.startAt,s.endAt)}function Sp(s){var o=F(s);return F(F(o.localStore).persistence).fn()}function r0(s,o,a,c){return(0,C.mG)(this,void 0,void 0,function(){var f,h,g;return(0,C.Jh)(this,function(y){switch(y.label){case 0:return(f=F(s)).$o?(oe("SyncEngine","Ignoring unexpected query state notification."),[3,8]):[3,1];case 1:if(!f.Vo.has(o))return[3,8];switch(a){case"current":case"not-current":return[3,2];case"rejected":return[3,5]}return[3,7];case 2:return[4,Pf(f.localStore)];case 3:return h=y.sent(),g=mo.createSynthesizedRemoteEventForCurrentChange(o,"current"===a),[4,Lr(f,h,g)];case 4:return y.sent(),[3,8];case 5:return[4,la(f.localStore,o,!0)];
1case 6:return y.sent(),Co(f,o,c),[3,8];case 7:_e(),y.label=8;case 8:return[2]}})})}function by(s,o,a){return(0,C.mG)(this,void 0,void 0,function(){var c,f,h,g,y,_,D,E,T;return(0,C.Jh)(this,function(k){switch(k.label){case 0:if(!(c=Ap(s)).$o)return[3,10];f=0,h=o,k.label=1;case 1:return f<h.length?c.Vo.has(g=h[f])?(oe("SyncEngine","Adding an already active target "+g),[3,5]):[4,np(c.localStore,g)]:[3,6];case 2:return y=k.sent(),[4,ca(c.localStore,y)];case 3:return _=k.sent(),[4,Oe(c,Tp(y),_.targetId,!1)];case 4:k.sent(),Hc(c.remoteStore,_),k.label=5;case 5:return f++,[3,1];case 6:D=function(P){return(0,C.Jh)(this,function(H){switch(H.label){case 0:return c.Vo.has(P)?[4,la(c.localStore,P,!1).then(function(){vu(c.remoteStore,P),Co(c,P)}).catch(bo)]:[3,2];case 1:H.sent(),H.label=2;case 2:return[2]}})},E=0,T=a,k.label=7;case 7:return E<T.length?[5,D(T[E])]:[3,10];case 8:k.sent(),k.label=9;case 9:return E++,[3,7];case 10:return[2]}})})}function Ap(s){var o=F(s);return o.remoteStore.remoteSyncer.applyRemoteEvent=Du.bind(null,o),o.remoteStore.remoteSyncer.getRemoteKeysForTarget=Qf.bind(null,o),o.remoteStore.remoteSyncer.rejectListen=Cp.bind(null,o),o.vo._r=vp.bind(null,o.eventManager),o.vo.Mo=ly.bind(null,o.eventManager),o}function Jc(s){var o=F(s);return o.remoteStore.remoteSyncer.applySuccessfulWrite=my.bind(null,o),o.remoteStore.remoteSyncer.rejectFailedWrite=Wf.bind(null,o),o}var Np=function(){function s(){this.synchronizeTabs=!1}return s.prototype.initialize=function(o){return(0,C.mG)(this,void 0,void 0,function(){return(0,C.Jh)(this,function(a){switch(a.label){case 0:return this.R=yu(o.databaseInfo.databaseId),this.sharedClientState=this.Bo(o),this.persistence=this.qo(o),[4,this.persistence.start()];case 1:return a.sent(),this.gcScheduler=this.Uo(o),this.localStore=this.Ko(o),[2]}})})},s.prototype.Uo=function(o){return null},s.prototype.Ko=function(o){return Xh(this.persistence,new Zh,o.initialUser,this.R)},s.prototype.qo=function(o){return new Z_(rp.bs,this.R)},s.prototype.Bo=function(o){return new Uc},s.prototype.terminate=function(){return(0,C.mG)(this,void 0,void 0,function(){return(0,C.Jh)(this,function(o){switch(o.label){case 0:return this.gcScheduler&&this.gcScheduler.stop(),[4,this.sharedClientState.shutdown()];case 1:return o.sent(),[4,this.persistence.shutdown()];case 2:return o.sent(),[2]}})})},s}(),Yc=function(s){function o(a,c,f){var h=this;return(h=s.call(this)||this).Qo=a,h.cacheSizeBytes=c,h.forceOwnership=f,h.synchronizeTabs=!1,h}return(0,C.ZT)(o,s),o.prototype.initialize=function(a){return(0,C.mG)(this,void 0,void 0,function(){var c=this;return(0,C.Jh)(this,function(f){switch(f.label){case 0:return[4,s.prototype.initialize.call(this,a)];case 1:return f.sent(),[4,Xm(this.localStore)];case 2:return f.sent(),[4,this.Qo.initialize(this,a)];case 3:return f.sent(),[4,Jc(this.Qo.syncEngine)];case 4:return f.sent(),[4,Do(this.Qo.remoteStore)];case 5:return f.sent(),[4,this.persistence.He(function(){return c.gcScheduler&&!c.gcScheduler.started&&c.gcScheduler.start(c.localStore),Promise.resolve()})];case 6:return f.sent(),[2]}})})},o.prototype.Ko=function(a){return Xh(this.persistence,new Zh,a.initialUser,this.R)},o.prototype.Uo=function(a){return new $m(this.persistence.referenceDelegate.garbageCollector,a.asyncQueue)},o.prototype.qo=function(a){var c=Rc(a.databaseInfo.databaseId,a.databaseInfo.persistenceKey),f=void 0!==this.cacheSizeBytes?fi.withCacheSize(this.cacheSizeBytes):fi.DEFAULT;return new Km(this.synchronizeTabs,c,a.clientId,f,a.asyncQueue,up(),pa(),this.R,this.sharedClientState,!!this.forceOwnership)},o.prototype.Bo=function(a){return new Uc},o}(Np),o0=function(s){function o(a,c){var f=this;return(f=s.call(this,a,c,!1)||this).Qo=a,f.cacheSizeBytes=c,f.synchronizeTabs=!0,f}return(0,C.ZT)(o,s),o.prototype.initialize=function(a){return(0,C.mG)(this,void 0,void 0,function(){var c,f=this;return(0,C.Jh)(this,function(h){switch(h.label){case 0:return[4,s.prototype.initialize.call(this,a)];case 1:return h.sent(),c=this.Qo.syncEngine,this.sharedClientState instanceof mu?(this.sharedClientState.syncEngine={ui:vy.bind(null,c),ai:r0.bind(null,c),hi:by.bind(null,c),fn:Sp.bind(null,c),ci:n0.bind(null,c)}
1,[4,this.sharedClientState.start()]):[3,3];case 2:h.sent(),h.label=3;case 3:return[4,this.persistence.He(function(g){return(0,C.mG)(f,void 0,void 0,function(){return(0,C.Jh)(this,function(y){switch(y.label){case 0:return[4,_y(this.Qo.syncEngine,g)];case 1:return y.sent(),this.gcScheduler&&(g&&!this.gcScheduler.started?this.gcScheduler.start(this.localStore):g||this.gcScheduler.stop()),[2]}})})})];case 4:return h.sent(),[2]}})})},o.prototype.Bo=function(a){var c=up();if(!mu.yt(c))throw new K(U.UNIMPLEMENTED,"IndexedDB persistence is only available on platforms that support LocalStorage.");var f=Rc(a.databaseInfo.databaseId,a.databaseInfo.persistenceKey);return new mu(c,a.asyncQueue,f,a.clientId,a.initialUser)},o}(Yc),xp=function(){function s(){}return s.prototype.initialize=function(o,a){return(0,C.mG)(this,void 0,void 0,function(){var c=this;return(0,C.Jh)(this,function(f){switch(f.label){case 0:return this.localStore?[3,2]:(this.localStore=o.localStore,this.sharedClientState=o.sharedClientState,this.datastore=this.createDatastore(a),this.remoteStore=this.createRemoteStore(a),this.eventManager=this.createEventManager(a),this.syncEngine=this.createSyncEngine(a,!o.synchronizeTabs),this.sharedClientState.onlineStateHandler=function(h){return kr(c.syncEngine,h,1)},this.remoteStore.remoteSyncer.handleCredentialChange=Kf.bind(null,this.syncEngine),[4,wu(this.remoteStore,this.syncEngine.isPrimaryClient)]);case 1:f.sent(),f.label=2;case 2:return[2]}})})},s.prototype.createEventManager=function(o){return new e0},s.prototype.createDatastore=function(o){var c=yu(o.databaseInfo.databaseId),f=new ap(o.databaseInfo);return new uy(o.credentials,f,c)},s.prototype.createRemoteStore=function(o){var a,c,f,h,g,y=this;return a=this.localStore,c=this.datastore,f=o.asyncQueue,h=function(_){return kr(y.syncEngine,_,0)},g=oy.yt()?new oy:new sp,new Lf(a,c,f,h,g)},s.prototype.createSyncEngine=function(o,a){return D=a,E=new gy(this.localStore,this.remoteStore,this.eventManager,this.sharedClientState,o.initialUser,o.maxConcurrentLimboResolutions),D&&(E.$o=!0),E;var D,E},s.prototype.terminate=function(){return function(o){return(0,C.mG)(this,void 0,void 0,function(){var a;return(0,C.Jh)(this,function(c){switch(c.label){case 0:return a=F(o),oe("RemoteStore","RemoteStore shutting down."),a.Or.add(5),[4,wo(a)];case 1:return c.sent(),a.Lr.shutdown(),a.Br.set("Unknown"),[2]}})})}(this.remoteStore)},s}(),Yf=function(){function s(o){this.observer=o,this.muted=!1}return s.prototype.next=function(o){this.observer.next&&this.jo(this.observer.next,o)},s.prototype.error=function(o){this.observer.error?this.jo(this.observer.error,o):console.error("Uncaught Error in snapshot listener:",o)},s.prototype.Wo=function(){this.muted=!0},s.prototype.jo=function(o,a){var c=this;this.muted||setTimeout(function(){c.muted||o(a)},0)},s}(),a0=(function(){function s(o,a){var c=this;this.Go=o,this.R=a,this.metadata=new jn,this.buffer=new Uint8Array,this.zo=new TextDecoder("utf-8"),this.Ho().then(function(f){f&&f.io()?c.metadata.resolve(f.payload.metadata):c.metadata.reject(new Error("The first element of the bundle is not a metadata, it is\n             "+JSON.stringify(null==f?void 0:f.payload)))},function(f){return c.metadata.reject(f)})}s.prototype.close=function(){return this.Go.cancel()},s.prototype.getMetadata=function(){return(0,C.mG)(this,void 0,void 0,function(){return(0,C.Jh)(this,function(o){return[2,this.metadata.promise]})})},s.prototype.Lo=function(){return(0,C.mG)(this,void 0,void 0,function(){return(0,C.Jh)(this,function(o){switch(o.label){case 0:return[4,this.getMetadata()];case 1:return[2,(o.sent(),this.Ho())]}})})},s.prototype.Ho=function(){return(0,C.mG)(this,void 0,void 0,function(){var o,a,c,f;return(0,C.Jh)(this,function(h){switch(h.label){case 0:return[4,this.Jo()];case 1:return null===(o=h.sent())?[2,null]:(a=this.zo.decode(o),c=Number(a),isNaN(c)&&this.Yo("length string ("+a+") is not valid number"),[4,this.Xo(c)]);case 2:return f=h.sent(),[2,new fy(JSON.parse(f),o.length+c)]}})})},s.prototype.Zo=function(){return this.buffer.findIndex(function(o){return o==="{".charCodeAt(0)})},s.prototype.Jo=function(){return(0,C.mG)(this,void 0,void 0,function(){var o,a;return(0,C.Jh)(this,function(c){switch(c.label){case 0:return this.Zo()<0?[4,this.tc()]:[3,3];case 1:if(c.sent())return[3,3];c.label=2;case 2:return[3,0];case 3:return 0===this.buffer.length?[2,null]:((o=this.Zo())<0&&this.Yo("Reached the end of bundle when a length string is expected."),a=this.buffer.slice(0,o),[2,(this.buffer=this.buffer.slice(o),a)])}})})},s.prototype.Xo=function(o){return(0,C.mG)(this,void 0,void 0,function(){var a;return(0,C.Jh)(this,function(c){switch(c.label){case 0:return this.buffer.length<o?[4,this.tc()]:[3,3];case 1:c.sent()&&this.Yo("Reached the end of bundle when more is expected."),c.label=2;case 2:return[3,0];case 3:return a=this.zo.decode(this.buffer.slice(0,o)),[2,(this.buffer=this.buffer.slice(o),a)]}})})},s.prototype.Yo=function(o){throw this.Go.cancel(),new Error("Invalid bundle format: "+o)},s.prototype.tc=function(){return(0,C.mG)(this,void 0,void 0,function(){var o,a;return(0,C.Jh)(this,function(c){switch(c.label){case 0:return[4,this.Go.read()];case 1:return(o=c.sent()).done||((a=new Uint8Array(this.buffer.length+o.value.length)).set(this.buffer),a.set(o.value,this.buffer.length),this.buffer=a),[2,o.done]}})})}}(),function(){function s(o){this.datastore=o,this.readVersions=new Map,this.mutations=[],this.committed=!1,this.lastWriteError=null,this.writtenDocs=new Set}return s.prototype.lookup=function(o){return(0,C.mG)(this,void 0,void 0,function(){var a,c=this;return(0,C.Jh)(this,function(f){switch(f.label){case 0:if(this.ensureCommitNotCalled(),this.mutations.length>0)throw new K(U.INVALID_ARGUMENT,"Firestore transactions require all reads to be executed before all writes.");return[4,function(h,g){return(0,C.mG)(this,void 0,void 0,function(){var y,_,D,E,T,S;return(0,C.Jh)(this,function(k){switch(k.label){case 0:return y=F(h),_=uu(y.R)+"/documents",D={documents:g.map(function(P){return Xs(y.R,P)})},[4,y.$i("BatchGetDocuments",_,D)];
1case 1:return E=k.sent(),T=new Map,E.forEach(function(P){var te,ce,H=(te=y.R,"found"in(ce=P)?function(Ie,Ae){Fe(!!Ae.found);var Qe=ui(Ie,Ae.found.name),Ye=gn(Ae.found.updateTime),st=new wr({mapValue:{fields:Ae.found.fields}});return Nn.newFoundDocument(Qe,Ye,st)}(te,ce):"missing"in ce?function(Ie,Ae){Fe(!!Ae.missing),Fe(!!Ae.readTime);var Qe=ui(Ie,Ae.missing),Ye=gn(Ae.readTime);return Nn.newNoDocument(Qe,Ye)}(te,ce):_e());T.set(H.key.toString(),H)}),S=[],[2,(g.forEach(function(P){var H=T.get(P.toString());Fe(!!H),S.push(H)}),S)]}})})}(this.datastore,o)];case 1:return[2,((a=f.sent()).forEach(function(h){return c.recordVersion(h)}),a)]}})})},s.prototype.set=function(o,a){this.write(a.toMutation(o,this.precondition(o))),this.writtenDocs.add(o.toString())},s.prototype.update=function(o,a){try{this.write(a.toMutation(o,this.preconditionForUpdate(o)))}catch(c){this.lastWriteError=c}this.writtenDocs.add(o.toString())},s.prototype.delete=function(o){this.write(new Ni(o,this.precondition(o))),this.writtenDocs.add(o.toString())},s.prototype.commit=function(){return(0,C.mG)(this,void 0,void 0,function(){var o,a=this;return(0,C.Jh)(this,function(c){switch(c.label){case 0:if(this.ensureCommitNotCalled(),this.lastWriteError)throw this.lastWriteError;return o=this.readVersions,this.mutations.forEach(function(f){o.delete(f.key.toString())}),o.forEach(function(f,h){var g=De.fromPath(h);a.mutations.push(new Th(g,a.precondition(g)))}),[4,function(f,h){return(0,C.mG)(this,void 0,void 0,function(){var g,y,_;return(0,C.Jh)(this,function(D){switch(D.label){case 0:return g=F(f),y=uu(g.R)+"/documents",_={writes:h.map(function(E){return ea(g.R,E)})},[4,g.Ni("Commit",y,_)];case 1:return D.sent(),[2]}})})}(this.datastore,this.mutations)];case 1:return c.sent(),this.committed=!0,[2]}})})},s.prototype.recordVersion=function(o){var a;if(o.isFoundDocument())a=o.version;else{if(!o.isNoDocument())throw _e();a=He.min()}var c=this.readVersions.get(o.key.toString());if(c){if(!a.isEqual(c))throw new K(U.ABORTED,"Document version changed between two reads.")}else this.readVersions.set(o.key.toString(),a)},s.prototype.precondition=function(o){var a=this.readVersions.get(o.toString());return!this.writtenDocs.has(o.toString())&&a?Wt.updateTime(a):Wt.none()},s.prototype.preconditionForUpdate=function(o){var a=this.readVersions.get(o.toString());if(!this.writtenDocs.has(o.toString())&&a){if(a.isEqual(He.min()))throw new K(U.INVALID_ARGUMENT,"Can't update a document that doesn't exist.");return Wt.updateTime(a)}return Wt.exists(!0)},s.prototype.write=function(o){this.ensureCommitNotCalled(),this.mutations.push(o)},s.prototype.ensureCommitNotCalled=function(){},s}()),u0=function(){function s(o,a,c,f){this.asyncQueue=o,this.datastore=a,this.updateFunction=c,this.deferred=f,this.ec=5,this.Zi=new kf(this.asyncQueue,"transaction_retry")}return s.prototype.run=function(){this.ec-=1,this.nc()},s.prototype.nc=function(){var o=this;this.Zi.ji(function(){return(0,C.mG)(o,void 0,void 0,function(){var a,c,f=this;return(0,C.Jh)(this,function(h){return a=new a0(this.datastore),(c=this.sc(a))&&c.then(function(g){f.asyncQueue.enqueueAndForget(function(){return a.commit().then(function(){f.deferred.resolve(g)}).catch(function(y){f.ic(y)})})}).catch(function(g){f.ic(g)}),[2]})})})},s.prototype.sc=function(o){try{var a=this.updateFunction(o);return!lo(a)&&a.catch&&a.then?a:(this.deferred.reject(Error("Transaction callback must return a Promise")),null)}catch(c){return this.deferred.reject(c),null}},s.prototype.ic=function(o){var a=this;this.ec>0&&this.rc(o)?(this.ec-=1,this.asyncQueue.enqueueAndForget(function(){return a.nc(),Promise.resolve()})):this.deferred.reject(o)},s.prototype.rc=function(o){if("FirebaseError"===o.name){var a=o.code;return"aborted"===a||"failed-precondition"===a||!bc(a)}return!1},s}(),c0=function(){function s(o,a,c){var f=this;this.credentials=o,this.asyncQueue=a,this.databaseInfo=c,this.user=Un.UNAUTHENTICATED,this.clientId=Ci.u(),this.credentialListener=function(){return Promise.resolve()},this.credentials.setChangeListener(a,function(h){return(0,C.mG)(f,void 0,void 0,function(){return(0,C.Jh)(this,function(g){switch(g.label){case 0:return oe("FirestoreClient","Received user=",h.uid),[4,this.credentialListener(h)];case 1:return g.sent(),this.user=h,[2]}})})})}return s.prototype.getConfiguration=function(){return(0,C.mG)(this,void 0,void 0,function(){return(0,C.Jh)(this,function(o){return[2,{asyncQueue:this.asyncQueue,databaseInfo:this.databaseInfo,clientId:this.clientId,credentials:this.credentials,initialUser:this.user,maxConcurrentLimboResolutions:100}]})})},s.prototype.setCredentialChangeListener=function(o){this.credentialListener=o},s.prototype.verifyNotTerminated=function(){if(this.asyncQueue.isShuttingDown)throw new K(U.FAILED_PRECONDITION,"The client has already been terminated.")},s.prototype.terminate=function(){var o=this;this.asyncQueue.enterRestrictedMode();var a=new jn;return this.asyncQueue.enqueueAndForgetEvenWhileRestricted(function(){return(0,C.mG)(o,void 0,void 0,function(){var c,f;return(0,C.Jh)(this,function(h){switch(h.label){case 0:return h.trys.push([0,5,,6]),this.onlineComponents?[4,this.onlineComponents.terminate()]:[3,2];case 1:h.sent(),h.label=2;case 2:return this.offlineComponents?[4,this.offlineComponents.terminate()]:[3,4];case 3:h.sent(),h.label=4;case 4:return this.credentials.removeChangeListener(),a.resolve(),[3,6];case 5:return c=h.sent(),f=ma(c,"Failed to shutdown persistence"),a.reject(f),[3,6];case 6:return[2]}})})}),a.promise},s}();function Dy(s,o){return(0,C.mG)(this,void 0,void 0,function(){var a,c,f=this;return(0,C.Jh)(this,function(h){switch(h.label){case 0:return s.asyncQueue.verifyOperationInProgress(),oe("FirestoreClient","Initializing OfflineComponentProvider"),[4,s.getConfiguration()];case 1:return a=h.sent(),[4,o.initialize(a)];case 2:return h.sent(),c=a.initialUser,s.setCredentialChangeListener(function(g){return(0,C.mG)(f,void 0,void 0,function(){return(0,C.Jh)(this,function(y){switch(y.label){case 0:return c.isEqual(g)?[3,2]:[4,ep(o.localStore,g)];case 1:y.sent(),c=g,y.label=2;case 2:return[2]}})})}),o.persistence.setDatabaseDeletedListener(function(){return s.terminate()}),s.offlineComponents=o,[2]}})})}function Ey(s,o){return(0,C.mG)(this,void 0,void 0,function(){var a,c;return(0,C.Jh)(this,function(f){switch(f.label){case 0:return s.asyncQueue.verifyOperationInProgress(),[4,pi(s)];case 1:return a=f.sent(),oe("FirestoreClient","Initializing OnlineComponentProvider"),[4,s.getConfiguration()];case 2:return c=f.sent(),[4,o.initialize(a,c)];case 3:return f.sent(),s.setCredentialChangeListener(function(h){return function(g,y){return(0,C.mG)(this,void 0,void 0,function(){var _,D;return(0,C.Jh)(this,function(E){switch(E.label){case 0:return(_=F(g)).asyncQueue.verifyOperationInProgress(),oe("RemoteStore","RemoteStore received new credentials"),D=ki(_),_.Or.add(3),[4,wo(_)];case 1:return E.sent(),D&&_.Br.set("Unknown"),[4,_.remoteSyncer.handleCredentialChange(y)];case 2:return E.sent(),_.Or.delete(3),[4,ga(_)];case 3:return E.sent(),[2]}})})}(o.remoteStore,h)}),s.onlineComponents=o,[2]}})})}function pi(s){return(0,C.mG)(this,void 0,void 0,function(){return(0,C.Jh)(this,function(o){switch(o.label){case 0:return s.offlineComponents?[3,2]:(oe("FirestoreClient","Using default OfflineComponentProvider"),[4,Dy(s,new Np)]);case 1:o.sent(),o.label=2;case 2:return[2,s.offlineComponents]}})})}function _a(s){return(0,C.mG)(this,void 0,void 0,function(){return(0,C.Jh)(this,function(o){switch(o.label){case 0:return s.onlineComponents?[3,2]:(oe("FirestoreClient","Using default OnlineComponentProvider"),[4,Ey(s,new xp)]);case 1:o.sent(),o.label=2;case 2:return[2,s.onlineComponents]}})})}function Fp(s){return pi(s).then(function(o){return o.persistence})}function Zc(s){return pi(s).then(function(o){return o.localStore})}function Xc(s){return _a(s).then(function(o){return o.remoteStore})}function el(s){return _a(s).then(function(o){return o.syncEngine})}function Io(s){return(0,C.mG)(this,void 0,void 0,function(){var o,a;return(0,C.Jh)(this,function(c){switch(c.label){case 0:return[4,_a(s)];case 1:return o=c.sent(),[2,((a=o.eventManager).onListen=Be.bind(null,o.syncEngine),a.onUnlisten=Dp.bind(null,o.syncEngine),a)]}})})}function Op(s,o,a){var c=this;void 0===a&&(a={});var f=new jn;return s.asyncQueue.enqueueAndForget(function(){return(0,C.mG)(c,void 0,void 0,function(){var h;return(0,C.Jh)(this,function(g){switch(g.label){case 0:return h=function(y,_,D,E,T){var S=new Yf({next:function(P){_.enqueueAndForget(function(){return Gf(y,k)});var H=P.docs.has(D);!H&&P.fromCache?T.reject(new K(U.UNAVAILABLE,"Failed to get document because the client is offline.")):H&&P.fromCache&&E&&"server"===E.source?T.reject(new K(U.UNAVAILABLE,'Failed to get document from server. (However, this document does exist in the local cache. Run again without setting source to "server" to retrieve the cached document.)')):T.resolve(P)},error:function(P){return T.reject(P)}}),k=new Tr(zr(D.path),S,{includeMetadataChanges:!0,so:!0});return Wc(y,k)},[4,Io(s)];case 1:return[2,h.apply(void 0,[g.sent(),s.asyncQueue,o,a,f])]}})})}),f.promise}function Vi(s,o,a){var c=this;void 0===a&&(a={});var f=new jn;return s.asyncQueue.enqueueAndForget(function(){return(0,C.mG)(c,void 0,void 0,function(){var h;return(0,C.Jh)(this,function(g){switch(g.label){case 0:return h=function(y,_,D,E,T){var S=new Yf({next:function(P){_.enqueueAndForget(function(){return Gf(y,k)}),P.fromCache&&"server"===E.source?T.reject(new K(U.UNAVAILABLE,'Failed to get documents from server. (However, these documents may exist in the local cache. Run again without setting source to "server" to retrieve the cached documents.)')):T.resolve(P)},error:function(P){return T.reject(P)}}),k=new Tr(D,S,{includeMetadataChanges:!0,so:!0});return Wc(y,k)},[4,Io(s)];case 1:return[2,h.apply(void 0,[g.sent(),s.asyncQueue,o,a,f])]}})})}),f.promise}var Pp=function(s,o,a,c,f,h,g,y){this.databaseId=s,this.appId=o,this.persistenceKey=a,this.host=c,this.ssl=f,this.forceLongPolling=h,this.autoDetectLongPolling=g,this.useFetchStreams=y},tl=function(){function s(o,a){this.projectId=o,this.database=a||"(default)"}return Object.defineProperty(s.prototype,"isDefaultDatabase",{get:function(){return"(default)"===this.database}
1,enumerable:!1,configurable:!0}),s.prototype.isEqual=function(o){return o instanceof s&&o.projectId===this.projectId&&o.database===this.database},s}(),nl=new Map,Rp=function(s,o){this.user=o,this.type="OAuth",this.authHeaders={},this.authHeaders.Authorization="Bearer "+s},Zf=function(){function s(){this.changeListener=null}return s.prototype.getToken=function(){return Promise.resolve(null)},s.prototype.invalidateToken=function(){},s.prototype.setChangeListener=function(o,a){this.changeListener=a,o.enqueueRetryable(function(){return a(Un.UNAUTHENTICATED)})},s.prototype.removeChangeListener=function(){this.changeListener=null},s}(),Cy=function(){function s(o){this.token=o,this.changeListener=null}return s.prototype.getToken=function(){return Promise.resolve(this.token)},s.prototype.invalidateToken=function(){},s.prototype.setChangeListener=function(o,a){var c=this;this.changeListener=a,o.enqueueRetryable(function(){return a(c.token.user)})},s.prototype.removeChangeListener=function(){this.changeListener=null},s}(),Iy=function(){function s(o){var a=this;this.currentUser=Un.UNAUTHENTICATED,this.oc=new jn,this.cc=0,this.forceRefresh=!1,this.auth=null,this.asyncQueue=null,this.uc=function(){a.cc++,a.currentUser=a.ac(),a.oc.resolve(),a.changeListener&&a.asyncQueue.enqueueRetryable(function(){return a.changeListener(a.currentUser)})};var c=function(f){oe("FirebaseCredentialsProvider","Auth detected"),a.auth=f,a.auth.addAuthTokenListener(a.uc)};o.onInit(function(f){return c(f)}),setTimeout(function(){if(!a.auth){var f=o.getImmediate({optional:!0});f?c(f):(oe("FirebaseCredentialsProvider","Auth not yet detected"),a.oc.resolve())}},0)}return s.prototype.getToken=function(){var o=this,a=this.cc,c=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(c).then(function(f){return o.cc!==a?(oe("FirebaseCredentialsProvider","getToken aborted due to token change."),o.getToken()):f?(Fe("string"==typeof f.accessToken),new Rp(f.accessToken,o.currentUser)):null}):Promise.resolve(null)},s.prototype.invalidateToken=function(){this.forceRefresh=!0},s.prototype.setChangeListener=function(o,a){var c=this;this.asyncQueue=o,this.asyncQueue.enqueueRetryable(function(){return(0,C.mG)(c,void 0,void 0,function(){return(0,C.Jh)(this,function(f){switch(f.label){case 0:return[4,this.oc.promise];case 1:return f.sent(),[4,a(this.currentUser)];case 2:return f.sent(),this.changeListener=a,[2]}})})})},s.prototype.removeChangeListener=function(){this.auth&&this.auth.removeAuthTokenListener(this.uc),this.changeListener=function(){return Promise.resolve()}},s.prototype.ac=function(){var o=this.auth&&this.auth.getUid();return Fe(null===o||"string"==typeof o),new Un(o)},s}(),Cu=function(){function s(o,a,c){this.hc=o,this.lc=a,this.fc=c,this.type="FirstParty",this.user=Un.FIRST_PARTY}return Object.defineProperty(s.prototype,"authHeaders",{get:function(){var o={"X-Goog-AuthUser":this.lc},a=this.hc.auth.getAuthHeaderValueForFirstParty([]);return a&&(o.Authorization=a),this.fc&&(o["X-Goog-Iam-Authorization-Token"]=this.fc),o},enumerable:!1,configurable:!0}),s}(),ba=function(){function s(o,a,c){this.hc=o,this.lc=a,this.fc=c}return s.prototype.getToken=function(){return Promise.resolve(new Cu(this.hc,this.lc,this.fc))},s.prototype.setChangeListener=function(o,a){o.enqueueRetryable(function(){return a(Un.FIRST_PARTY)})},s.prototype.removeChangeListener=function(){},s.prototype.invalidateToken=function(){},s}();function Iu(s,o,a){if(!a)throw new K(U.INVALID_ARGUMENT,"Function "+s+"() cannot be called with an empty "+o+".")}function To(s,o){if(void 0===o)return{merge:!1};if(void 0!==o.mergeFields&&void 0!==o.merge)throw new K(U.INVALID_ARGUMENT,"Invalid options passed to function "+s+'(): You cannot specify both "merge" and "mergeFields".');return o}function wa(s,o,a,c){if(!0===o&&!0===c)throw new K(U.INVALID_ARGUMENT,s+" and "+a+" cannot be used together.")}function ps(s){if(!De.isDocumentKey(s))throw new K(U.INVALID_ARGUMENT,"Invalid document reference. Document references must have an even number of segments, but "+s+" has "+s.length+".")}function kp(s){if(De.isDocumentKey(s))throw new K(U.INVALID_ARGUMENT,"Invalid collection reference. Collection references must have an odd number of segments, but "+s+" has "+s.length+".")}function Tu(s){if(void 0===s)return"undefined";if(null===s)return"null";if("string"==typeof s)return s.length>20&&(s=s.substring(0,20)+"..."),JSON.stringify(s);if("number"==typeof s||"boolean"==typeof s)return""+s;if("object"==typeof s){if(s instanceof Array)return"an array";
1var o=function(a){if(a.constructor){var c=/function\s+([^\s(]+)\s*\(/.exec(a.constructor.toString());if(c&&c.length>1)return c[1]}return null}(s);return o?"a custom "+o+" object":"an object"}return"function"==typeof s?"a function":_e()}function lt(s,o){if("_delegate"in s&&(s=s._delegate),!(s instanceof o)){if(o.name===s.constructor.name)throw new K(U.INVALID_ARGUMENT,"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");var a=Tu(s);throw new K(U.INVALID_ARGUMENT,"Expected type '"+o.name+"', but it was: "+a)}return s}function rl(s,o){if(o<=0)throw new K(U.INVALID_ARGUMENT,"Function "+s+"() requires a positive number, but it was: "+o+".")}var il=function(){function s(o){var a;if(void 0===o.host){if(void 0!==o.ssl)throw new K(U.INVALID_ARGUMENT,"Can't provide ssl option if host option is not set");this.host="firestore.googleapis.com",this.ssl=!0}else this.host=o.host,this.ssl=null===(a=o.ssl)||void 0===a||a;if(this.credentials=o.credentials,this.ignoreUndefinedProperties=!!o.ignoreUndefinedProperties,void 0===o.cacheSizeBytes)this.cacheSizeBytes=41943040;else{if(-1!==o.cacheSizeBytes&&o.cacheSizeBytes<1048576)throw new K(U.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=o.cacheSizeBytes}this.experimentalForceLongPolling=!!o.experimentalForceLongPolling,this.experimentalAutoDetectLongPolling=!!o.experimentalAutoDetectLongPolling,this.useFetchStreams=!!o.useFetchStreams,wa("experimentalForceLongPolling",o.experimentalForceLongPolling,"experimentalAutoDetectLongPolling",o.experimentalAutoDetectLongPolling)}return s.prototype.isEqual=function(o){return this.host===o.host&&this.ssl===o.ssl&&this.credentials===o.credentials&&this.cacheSizeBytes===o.cacheSizeBytes&&this.experimentalForceLongPolling===o.experimentalForceLongPolling&&this.experimentalAutoDetectLongPolling===o.experimentalAutoDetectLongPolling&&this.ignoreUndefinedProperties===o.ignoreUndefinedProperties&&this.useFetchStreams===o.useFetchStreams},s}(),Da=function(){function s(o,a){this.type="firestore-lite",this._persistenceKey="(lite)",this._settings=new il({}),this._settingsFrozen=!1,o instanceof tl?(this._databaseId=o,this._credentials=new Zf):(this._app=o,this._databaseId=function(c){if(!Object.prototype.hasOwnProperty.apply(c.options,["projectId"]))throw new K(U.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new tl(c.options.projectId)}(o),this._credentials=new Iy(a))}return Object.defineProperty(s.prototype,"app",{get:function(){if(!this._app)throw new K(U.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this._app},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"_initialized",{get:function(){return this._settingsFrozen},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"_terminated",{get:function(){return void 0!==this._terminateTask},enumerable:!1,configurable:!0}),s.prototype._setSettings=function(o){if(this._settingsFrozen)throw new K(U.FAILED_PRECONDITION,"Firestore has already been started and its settings can no longer be changed. You can only modify settings before calling any other methods on a Firestore object.");this._settings=new il(o),void 0!==o.credentials&&(this._credentials=function(a){if(!a)return new Zf;switch(a.type){case"gapi":var c=a.client;return Fe(!("object"!=typeof c||null===c||!c.auth||!c.auth.getAuthHeaderValueForFirstParty)),new ba(c,a.sessionIndex||"0",a.iamToken||null);case"provider":return a.client;default:throw new K(U.INVALID_ARGUMENT,"makeCredentialsProvider failed due to invalid credential type")}}(o.credentials))},s.prototype._getSettings=function(){return this._settings},s.prototype._freezeSettings=function(){return this._settingsFrozen=!0,this._settings},s.prototype._delete=function(){return this._terminateTask||(this._terminateTask=this._terminate()),this._terminateTask},s.prototype.toJSON=function(){return{app:this._app,databaseId:this._databaseId,settings:this._settings}},s.prototype._terminate=function(){return(a=nl.get(this))&&(oe("ComponentProvider","Removing Datastore"),nl.delete(this),a.terminate()),Promise.resolve();var a},s}(),Ot=function(){function s(o,a,c){this.converter=a,this._key=c,this.type="document",this.firestore=o}return Object.defineProperty(s.prototype,"_path",{get:function(){return this._key.path}
1,enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"id",{get:function(){return this._key.path.lastSegment()},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"path",{get:function(){return this._key.path.canonicalString()},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"parent",{get:function(){return new Bi(this.firestore,this.converter,this._key.path.popLast())},enumerable:!1,configurable:!0}),s.prototype.withConverter=function(o){return new s(this.firestore,o,this._key)},s}(),fr=function(){function s(o,a,c){this.converter=a,this._query=c,this.type="query",this.firestore=o}return s.prototype.withConverter=function(o){return new s(this.firestore,o,this._query)},s}(),Bi=function(s){function o(a,c,f){var h=this;return(h=s.call(this,a,c,zr(f))||this)._path=f,h.type="collection",h}return(0,C.ZT)(o,s),Object.defineProperty(o.prototype,"id",{get:function(){return this._query.path.lastSegment()},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"path",{get:function(){return this._query.path.canonicalString()},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"parent",{get:function(){var a=this._path.popLast();return a.isEmpty()?null:new Ot(this.firestore,null,new De(a))},enumerable:!1,configurable:!0}),o.prototype.withConverter=function(a){return new o(this.firestore,a,this._path)},o}(fr);function Ty(s,o){for(var a,c=[],f=2;f<arguments.length;f++)c[f-2]=arguments[f];if(s=(0,ve.m9)(s),Iu("collection","path",o),s instanceof Da)return kp(a=tt.fromString.apply(tt,(0,C.ev)([o],c))),new Bi(s,null,a);if(!(s instanceof Ot||s instanceof Bi))throw new K(U.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");return kp(a=tt.fromString.apply(tt,(0,C.ev)([s.path],c)).child(tt.fromString(o))),new Bi(s.firestore,null,a)}function Su(s,o){for(var a,c=[],f=2;f<arguments.length;f++)c[f-2]=arguments[f];if(s=(0,ve.m9)(s),1===arguments.length&&(o=Ci.u()),Iu("doc","path",o),s instanceof Da)return ps(a=tt.fromString.apply(tt,(0,C.ev)([o],c))),new Ot(s,null,new De(a));if(!(s instanceof Ot||s instanceof Bi))throw new K(U.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");return ps(a=s._path.child(tt.fromString.apply(tt,(0,C.ev)([o],c)))),new Ot(s.firestore,s instanceof Bi?s.converter:null,new De(a))}function Xf(s,o){return s=(0,ve.m9)(s),o=(0,ve.m9)(o),(s instanceof Ot||s instanceof Bi)&&(o instanceof Ot||o instanceof Bi)&&s.firestore===o.firestore&&s.path===o.path&&s.converter===o.converter}function Lp(s,o){return s=(0,ve.m9)(s),o=(0,ve.m9)(o),s instanceof fr&&o instanceof fr&&s.firestore===o.firestore&&nu(s._query,o._query)&&s.converter===o.converter}var Vp=function(){function s(){var o=this;this.dc=Promise.resolve(),this.wc=[],this._c=!1,this.mc=[],this.yc=null,this.gc=!1,this.Ec=!1,this.Tc=[],this.Zi=new kf(this,"async_queue_retry"),this.Ic=function(){var c=pa();c&&oe("AsyncQueue","Visibility state changed to "+c.visibilityState),o.Zi.Gi()};var a=pa();a&&"function"==typeof a.addEventListener&&a.addEventListener("visibilitychange",this.Ic)}return Object.defineProperty(s.prototype,"isShuttingDown",{get:function(){return this._c},enumerable:!1,configurable:!0}),s.prototype.enqueueAndForget=function(o){this.enqueue(o)},s.prototype.enqueueAndForgetEvenWhileRestricted=function(o){this.Ac(),this.Rc(o)},s.prototype.enterRestrictedMode=function(o){if(!this._c){this._c=!0,this.Ec=o||!1;var a=pa();a&&"function"==typeof a.removeEventListener&&a.removeEventListener("visibilitychange",this.Ic)}},s.prototype.enqueue=function(o){var a=this;if(this.Ac(),this._c)return new Promise(function(){});var c=new jn;return this.Rc(function(){return a._c&&a.Ec?Promise.resolve():(o().then(c.resolve,c.reject),c.promise)}).then(function(){return c.promise})},s.prototype.enqueueRetryable=function(o){var a=this;this.enqueueAndForget(function(){return a.wc.push(o),a.bc()})},s.prototype.bc=function(){return(0,C.mG)(this,void 0,void 0,function(){var o,a=this;return(0,C.Jh)(this,function(c){switch(c.label){case 0:if(0===this.wc.length)return[3,5];c.label=1;case 1:return c.trys.push([1,3,,4]),[4,this.wc[0]()];case 2:return c.sent(),this.wc.shift(),this.Zi.reset(),[3,4];case 3:if(!fs(o=c.sent()))throw o;return oe("AsyncQueue","Operation failed with retryable error: "+o),[3,4];case 4:this.wc.length>0&&this.Zi.ji(function(){return a.bc()}),c.label=5;case 5:return[2]}})})},s.prototype.Rc=function(o){var a=this,c=this.dc.then(function(){return a.gc=!0,o().catch(function(f){throw a.yc=f,a.gc=!1,
1Xt("INTERNAL UNHANDLED ERROR: ",(g=(h=f).message||"",h.stack&&(g=h.stack.includes(h.message)?h.stack:h.message+"\n"+h.stack),g)),f;var h,g}).then(function(f){return a.gc=!1,f})});return this.dc=c,c},s.prototype.enqueueAfterDelay=function(o,a,c){var f=this;this.Ac(),this.Tc.indexOf(o)>-1&&(a=0);var h=gp.createAndSchedule(this,o,a,c,function(g){return f.vc(g)});return this.mc.push(h),h},s.prototype.Ac=function(){this.yc&&_e()},s.prototype.verifyOperationInProgress=function(){},s.prototype.Pc=function(){return(0,C.mG)(this,void 0,void 0,function(){var o;return(0,C.Jh)(this,function(a){switch(a.label){case 0:return[4,o=this.dc];case 1:a.sent(),a.label=2;case 2:if(o!==this.dc)return[3,0];a.label=3;case 3:return[2]}})})},s.prototype.Vc=function(o){for(var a=0,c=this.mc;a<c.length;a++)if(c[a].timerId===o)return!0;return!1},s.prototype.Sc=function(o){var a=this;return this.Pc().then(function(){a.mc.sort(function(g,y){return g.targetTimeMs-y.targetTimeMs});for(var c=0,f=a.mc;c<f.length;c++){var h=f[c];if(h.skipDelay(),"all"!==o&&h.timerId===o)break}return a.Pc()})},s.prototype.Dc=function(o){this.Tc.push(o)},s.prototype.vc=function(o){var a=this.mc.indexOf(o);this.mc.splice(a,1)},s}();function Ea(s){return function(o,a){if("object"!=typeof o||null===o)return!1;for(var c=o,f=0,h=["next","error","complete"];f<h.length;f++){var g=h[f];if(g in c&&"function"==typeof c[g])return!0}return!1}(s)}!function(){function s(){this._progressObserver={},this._taskCompletionResolver=new jn,this._lastProgress={taskState:"Running",totalBytes:0,totalDocuments:0,bytesLoaded:0,documentsLoaded:0}}s.prototype.onProgress=function(o,a,c){this._progressObserver={next:o,error:a,complete:c}},s.prototype.catch=function(o){return this._taskCompletionResolver.promise.catch(o)},s.prototype.then=function(o,a){return this._taskCompletionResolver.promise.then(o,a)},s.prototype._completeWith=function(o){this._updateProgress(o),this._progressObserver.complete&&this._progressObserver.complete(),this._taskCompletionResolver.resolve(o)},s.prototype._failWith=function(o){this._lastProgress.taskState="Error",this._progressObserver.next&&this._progressObserver.next(this._lastProgress),this._progressObserver.error&&this._progressObserver.error(o),this._taskCompletionResolver.reject(o)},s.prototype._updateProgress=function(o){this._lastProgress=o,this._progressObserver.next&&this._progressObserver.next(o)}}();var Kt=function(s){function o(a,c){var f=this;return(f=s.call(this,a,c)||this).type="firestore",f._queue=new Vp,f._persistenceKey="name"in a?a.name:"[DEFAULT]",f}return(0,C.ZT)(o,s),o.prototype._terminate=function(){return this._firestoreClient||Ay(this),this._firestoreClient.terminate()},o}(Da);function yn(s){return s._firestoreClient||Ay(s),s._firestoreClient.verifyNotTerminated(),s._firestoreClient}function Ay(s){var o,h,y,a=s._freezeSettings(),c=(h=(null===(o=s._app)||void 0===o?void 0:o.options.appId)||"",new Pp(s._databaseId,h,s._persistenceKey,(y=a).host,y.ssl,y.experimentalForceLongPolling,y.experimentalAutoDetectLongPolling,y.useFetchStreams));s._firestoreClient=new c0(s._credentials,s._queue,c)}function My(s,o,a){var c=this,f=new jn;return s.asyncQueue.enqueue(function(){return(0,C.mG)(c,void 0,void 0,function(){var h;return(0,C.Jh)(this,function(g){switch(g.label){case 0:return g.trys.push([0,3,,4]),[4,Dy(s,a)];case 1:return g.sent(),[4,Ey(s,o)];case 2:return g.sent(),f.resolve(),[3,4];case 3:if(!("FirebaseError"===(y=h=g.sent()).name?y.code===U.FAILED_PRECONDITION||y.code===U.UNIMPLEMENTED:!("undefined"!=typeof DOMException&&y instanceof DOMException)||22===y.code||20===y.code||11===y.code))throw h;return console.warn("Error enabling offline persistence. Falling back to persistence disabled: "+h),f.reject(h),[3,4];case 4:return[2]}var y})})}).then(function(){return f.promise})}function ed(s){if(s._initialized||s._terminated)throw new K(U.FAILED_PRECONDITION,"Firestore has already been started and persistence can no longer be enabled. You can only enable persistence before calling any other methods on a Firestore object.")}var ji=function(){function s(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];for(var c=0;c<o.length;++c)if(0===o[c].length)throw new K(U.INVALID_ARGUMENT,"Invalid field name at argument $(i + 1). Field names must not be empty.");this._internalPath=new cn(o)}return s.prototype.isEqual=function(o){return this._internalPath.isEqual(o._internalPath)},s}(),gs=function(){function s(o){this._byteString=o}return s.fromBase64String=function(o){try{return new s(en.fromBase64String(o))}catch(a){throw new K(U.INVALID_ARGUMENT,"Failed to construct data from Base64 string: "+a)}},s.fromUint8Array=function(o){return new s(en.fromUint8Array(o))},s.prototype.toBase64=function(){return this._byteString.toBase64()},s.prototype.toUint8Array=function(){return this._byteString.toUint8Array()},s.prototype.toString=function(){return"Bytes(base64: "+this.toBase64()+")"},s.prototype.isEqual=function(o){return this._byteString.isEqual(o._byteString)},s}(),Ui=function(s){this._methodName=s},Au=function(){function s(o,a){if(!isFinite(o)||o<-90||o>90)throw new K(U.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+o);if(!isFinite(a)||a<-180||a>180)throw new K(U.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+a);this._lat=o,this._long=a}return Object.defineProperty(s.prototype,"latitude",{get:function(){return this._lat}
1,enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"longitude",{get:function(){return this._long},enumerable:!1,configurable:!0}),s.prototype.isEqual=function(o){return this._lat===o._lat&&this._long===o._long},s.prototype.toJSON=function(){return{latitude:this._lat,longitude:this._long}},s.prototype._compareTo=function(o){return Se(this._lat,o._lat)||Se(this._long,o._long)},s}(),Ny=/^__.*__$/,xy=function(){function s(o,a,c){this.data=o,this.fieldMask=a,this.fieldTransforms=c}return s.prototype.toMutation=function(o,a){return null!==this.fieldMask?new is(o,this.data,this.fieldMask,a,this.fieldTransforms):new _c(o,this.data,a,this.fieldTransforms)},s}(),Bp=function(){function s(o,a,c){this.data=o,this.fieldMask=a,this.fieldTransforms=c}return s.prototype.toMutation=function(o,a){return new is(o,this.data,this.fieldMask,a,this.fieldTransforms)},s}();function td(s){switch(s){case 0:case 2:case 1:return!0;case 3:case 4:return!1;default:throw _e()}}var jp=function(){function s(o,a,c,f,h,g){this.settings=o,this.databaseId=a,this.R=c,this.ignoreUndefinedProperties=f,void 0===h&&this.Cc(),this.fieldTransforms=h||[],this.fieldMask=g||[]}return Object.defineProperty(s.prototype,"path",{get:function(){return this.settings.path},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"Nc",{get:function(){return this.settings.Nc},enumerable:!1,configurable:!0}),s.prototype.xc=function(o){return new s(Object.assign(Object.assign({},this.settings),o),this.databaseId,this.R,this.ignoreUndefinedProperties,this.fieldTransforms,this.fieldMask)},s.prototype.kc=function(o){var a,c=null===(a=this.path)||void 0===a?void 0:a.child(o),f=this.xc({path:c,Fc:!1});return f.$c(o),f},s.prototype.Oc=function(o){var a,c=null===(a=this.path)||void 0===a?void 0:a.child(o),f=this.xc({path:c,Fc:!1});return f.Cc(),f},s.prototype.Mc=function(o){return this.xc({path:void 0,Fc:!0})},s.prototype.Lc=function(o){return Ia(o,this.settings.methodName,this.settings.Bc||!1,this.path,this.settings.qc)},s.prototype.contains=function(o){return void 0!==this.fieldMask.find(function(a){return o.isPrefixOf(a)})||void 0!==this.fieldTransforms.find(function(a){return o.isPrefixOf(a.field)})},s.prototype.Cc=function(){if(this.path)for(var o=0;o<this.path.length;o++)this.$c(this.path.get(o))},s.prototype.$c=function(o){if(0===o.length)throw this.Lc("Document fields must not be empty");if(td(this.Nc)&&Ny.test(o))throw this.Lc('Document fields cannot begin and end with "__"')},s}(),Up=function(){function s(o,a,c){this.databaseId=o,this.ignoreUndefinedProperties=a,this.R=c||yu(o)}return s.prototype.Uc=function(o,a,c,f){return void 0===f&&(f=!1),new jp({Nc:o,methodName:a,qc:c,path:cn.emptyPath(),Fc:!1,Bc:f},this.databaseId,this.R,this.ignoreUndefinedProperties)},s}();function ms(s){var o=s._freezeSettings(),a=yu(s._databaseId);return new Up(s._databaseId,!!o.ignoreUndefinedProperties,a)}function ol(s,o,a,c,f,h){void 0===h&&(h={});var g=s.Uc(h.merge||h.mergeFields?2:0,o,a,f);Mu("Data must be an object, but it was:",g,c);var y,_,D=Gp(c,g);if(h.merge)y=new Zo(g.fieldMask),_=g.fieldTransforms;else if(h.mergeFields){for(var E=[],T=0,S=h.mergeFields;T<S.length;T++){var k=sd(o,S[T],a);if(!g.contains(k))throw new K(U.INVALID_ARGUMENT,"Field '"+k+"' is specified in your field mask but missing from your input data.");$p(E,k)||E.push(k)}y=new Zo(E),_=g.fieldTransforms.filter(function(P){return y.covers(P.field)})}else y=null,_=g.fieldTransforms;return new xy(new wr(D),y,_)}var sl=function(s){function o(){return null!==s&&s.apply(this,arguments)||this}return(0,C.ZT)(o,s),o.prototype._toFieldTransform=function(a){if(2!==a.Nc)throw a.Lc(1===a.Nc?this._methodName+"() can only appear at the top level of your update data":this._methodName+"() cannot be used with set() unless you pass {merge:true}");return a.fieldMask.push(a.path),null},o.prototype.isEqual=function(a){return a instanceof o},o}(Ui);function nd(s,o,a){return new jp({Nc:3,qc:o.settings.qc,methodName:s._methodName,Fc:a},o.databaseId,o.R,o.ignoreUndefinedProperties)}var Fy=function(s){function o(){return null!==s&&s.apply(this,arguments)||this}return(0,C.ZT)(o,s),o.prototype._toFieldTransform=function(a){return new rs(a.path,new Ai)},o.prototype.isEqual=function(a){return a instanceof o},o}(Ui),gi=function(s){function o(a,c){var f=this;return(f=s.call(this,a)||this).Kc=c,f}return(0,C.ZT)(o,s),o.prototype._toFieldTransform=function(a){var c=nd(this,a,!0),f=this.Kc.map(function(g){return ys(g,c)}),h=new Wr(f);return new rs(a.path,h)},o.prototype.isEqual=function(a){return this===a},o}(Ui),rd=function(s){function o(a,c){var f=this;return(f=s.call(this,a)||this).Kc=c,f}return(0,C.ZT)(o,s),o.prototype._toFieldTransform=function(a){var c=nd(this,a,!0),f=this.Kc.map(function(g){return ys(g,c)}),h=new po(f);return new rs(a.path,h)},o.prototype.isEqual=function(a){return this===a},o}(Ui),Oy=function(s){function o(a,c){var f=this;return(f=s.call(this,a)||this).Qc=c,f}return(0,C.ZT)(o,s),o.prototype._toFieldTransform=function(a){var c=new Kr(a.R,cf(a.R,this.Qc));return new rs(a.path,c)},o.prototype.isEqual=function(a){return this===a},o}(Ui);function id(s,o,a,c){var f=s.Uc(1,o,a);Mu("Data must be an object, but it was:",f,c);var h=[],g=wr.empty();Hs(c,function(_,D){var E=Ca(o,_,a);D=(0,ve.m9)(D);var T=f.Oc(E);if(D instanceof sl)h.push(E);else{var S=ys(D,T);
1null!=S&&(h.push(E),g.set(E,S))}});var y=new Zo(h);return new Bp(g,y,f.fieldTransforms)}function Hp(s,o,a,c,f,h){var g=s.Uc(1,o,a),y=[sd(o,c,a)],_=[f];if(h.length%2!=0)throw new K(U.INVALID_ARGUMENT,"Function "+o+"() needs to be called with an even number of arguments that alternate between field names and values.");for(var D=0;D<h.length;D+=2)y.push(sd(o,h[D])),_.push(h[D+1]);for(var E=[],T=wr.empty(),S=y.length-1;S>=0;--S)if(!$p(E,y[S])){var k=y[S],P=_[S];P=(0,ve.m9)(P);var H=g.Oc(k);if(P instanceof sl)E.push(k);else{var te=ys(P,H);null!=te&&(E.push(k),T.set(k,te))}}var ce=new Zo(E);return new Bp(T,ce,g.fieldTransforms)}function od(s,o,a,c){return void 0===c&&(c=!1),ys(a,s.Uc(c?4:3,o))}function ys(s,o){if(qp(s=(0,ve.m9)(s)))return Mu("Unsupported field value:",o,s),Gp(s,o);if(s instanceof Ui)return function(a,c){if(!td(c.Nc))throw c.Lc(a._methodName+"() can only be used with update() and set()");if(!c.path)throw c.Lc(a._methodName+"() is not currently supported inside arrays");var f=a._toFieldTransform(c);f&&c.fieldTransforms.push(f)}(s,o),null;if(void 0===s&&o.ignoreUndefinedProperties)return null;if(o.path&&o.fieldMask.push(o.path),s instanceof Array){if(o.settings.Fc&&4!==o.Nc)throw o.Lc("Nested arrays are not supported");return function(a,c){for(var f=[],h=0,g=0,y=a;g<y.length;g++){var _=ys(y[g],c.Mc(h));null==_&&(_={nullValue:"NULL_VALUE"}),f.push(_),h++}return{arrayValue:{values:f}}}(s,o)}return function(a,c){if(null===(a=(0,ve.m9)(a)))return{nullValue:"NULL_VALUE"};if("number"==typeof a)return cf(c.R,a);if("boolean"==typeof a)return{booleanValue:a};if("string"==typeof a)return{stringValue:a};if(a instanceof Date){var f=Ht.fromDate(a);return{timestampValue:xi(c.R,f)}}if(a instanceof Ht)return f=new Ht(a.seconds,1e3*Math.floor(a.nanoseconds/1e3)),{timestampValue:xi(c.R,f)};if(a instanceof Au)return{geoPointValue:{latitude:a.latitude,longitude:a.longitude}};if(a instanceof gs)return{bytesValue:Cc(c.R,a._byteString)};if(a instanceof Ot){var h=a.firestore._databaseId;if(!h.isEqual(f=c.databaseId))throw c.Lc("Document reference is for database "+h.projectId+"/"+h.database+" but should be for database "+f.projectId+"/"+f.database);return{referenceValue:mf(a.firestore._databaseId||c.databaseId,a._key.path)}}throw c.Lc("Unsupported field value: "+Tu(a))}(s,o)}function Gp(s,o){var a={};return hh(s)?o.path&&o.path.length>0&&o.fieldMask.push(o.path):Hs(s,function(c,f){var h=ys(f,o.kc(c));null!=h&&(a[c]=h)}),{mapValue:{fields:a}}}function qp(s){return!("object"!=typeof s||null===s||s instanceof Array||s instanceof Date||s instanceof Ht||s instanceof Au||s instanceof gs||s instanceof Ot||s instanceof Ui)}function Mu(s,o,a){if(!qp(a)||"object"!=typeof(f=a)||null===f||Object.getPrototypeOf(f)!==Object.prototype&&null!==Object.getPrototypeOf(f)){var c=Tu(a);throw o.Lc("an object"===c?s+" a custom object":s+" "+c)}var f}function sd(s,o,a){if((o=(0,ve.m9)(o))instanceof ji)return o._internalPath;if("string"==typeof o)return Ca(s,o);throw Ia("Field path arguments must be of type string or FieldPath.",s,!1,void 0,a)}var Py=new RegExp("[~\\*/\\[\\]]");function Ca(s,o,a){if(o.search(Py)>=0)throw Ia("Invalid field path ("+o+"). Paths must not contain '~', '*', '/', '[', or ']'",s,!1,void 0,a);try{return(new(ji.bind.apply(ji,(0,C.ev)([void 0],o.split(".")))))._internalPath}catch(c){throw Ia("Invalid field path ("+o+"). Paths must not be empty, begin with '.', end with '.', or contain '..'",s,!1,void 0,a)}}function Ia(s,o,a,c,f){var h=c&&!c.isEmpty(),g=void 0!==f,y="Function "+o+"() called with invalid data";a&&(y+=" (via `toFirestore()`)");var _="";return(h||g)&&(_+=" (found",h&&(_+=" in field "+c),g&&(_+=" in document "+f),_+=")"),new K(U.INVALID_ARGUMENT,(y+=". ")+s+_)}function $p(s,o){return s.some(function(a){return a.isEqual(o)})}var vs=function(){function s(o,a,c,f,h){this._firestore=o,this._userDataWriter=a,this._key=c,this._document=f,this._converter=h}return Object.defineProperty(s.prototype,"id",{get:function(){return this._key.path.lastSegment()},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"ref",{get:function(){return new Ot(this._firestore,this._converter,this._key)}
1,enumerable:!1,configurable:!0}),s.prototype.exists=function(){return null!==this._document},s.prototype.data=function(){if(this._document){if(this._converter){var o=new ad(this._firestore,this._userDataWriter,this._key,this._document,null);return this._converter.fromFirestore(o)}return this._userDataWriter.convertValue(this._document.data.value)}},s.prototype.get=function(o){if(this._document){var a=this._document.data.field(Nu("DocumentSnapshot.get",o));if(null!==a)return this._userDataWriter.convertValue(a)}},s}(),ad=function(s){function o(){return null!==s&&s.apply(this,arguments)||this}return(0,C.ZT)(o,s),o.prototype.data=function(){return s.prototype.data.call(this)},o}(vs);function Nu(s,o){return"string"==typeof o?Ca(s,o):o instanceof ji?o._internalPath:o._delegate._internalPath}var _s=function(){function s(o,a){this.hasPendingWrites=o,this.fromCache=a}return s.prototype.isEqual=function(o){return this.hasPendingWrites===o.hasPendingWrites&&this.fromCache===o.fromCache},s}(),Hi=function(s){function o(a,c,f,h,g,y){var _=this;return(_=s.call(this,a,c,f,h,y)||this)._firestore=a,_._firestoreImpl=a,_.metadata=g,_}return(0,C.ZT)(o,s),o.prototype.exists=function(){return s.prototype.exists.call(this)},o.prototype.data=function(a){if(void 0===a&&(a={}),this._document){if(this._converter){var c=new bs(this._firestore,this._userDataWriter,this._key,this._document,this.metadata,null);return this._converter.fromFirestore(c,a)}return this._userDataWriter.convertValue(this._document.data.value,a.serverTimestamps)}},o.prototype.get=function(a,c){if(void 0===c&&(c={}),this._document){var f=this._document.data.field(Nu("DocumentSnapshot.get",a));if(null!==f)return this._userDataWriter.convertValue(f,c.serverTimestamps)}},o}(vs),bs=function(s){function o(){return null!==s&&s.apply(this,arguments)||this}return(0,C.ZT)(o,s),o.prototype.data=function(a){return void 0===a&&(a={}),s.prototype.data.call(this,a)},o}(Hi),ws=function(){function s(o,a,c,f){this._firestore=o,this._userDataWriter=a,this._snapshot=f,this.metadata=new _s(f.hasPendingWrites,f.fromCache),this.query=c}return Object.defineProperty(s.prototype,"docs",{get:function(){var o=[];return this.forEach(function(a){return o.push(a)}),o},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"size",{get:function(){return this._snapshot.docs.size},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"empty",{get:function(){return 0===this.size},enumerable:!1,configurable:!0}),s.prototype.forEach=function(o,a){var c=this;this._snapshot.docs.forEach(function(f){o.call(a,new bs(c._firestore,c._userDataWriter,f.key,f,new _s(c._snapshot.mutatedKeys.has(f.key),c._snapshot.fromCache),c.query.converter))})},s.prototype.docChanges=function(o){void 0===o&&(o={});var a=!!o.includeMetadataChanges;if(a&&this._snapshot.excludesMetadataChanges)throw new K(U.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this._cachedChanges&&this._cachedChangesIncludeMetadataChanges===a||(this._cachedChanges=function(c,f){if(c._snapshot.oldDocs.isEmpty()){var h=0;return c._snapshot.docChanges.map(function(y){return{type:"added",doc:new bs(c._firestore,c._userDataWriter,y.doc.key,y.doc,new _s(c._snapshot.mutatedKeys.has(y.doc.key),c._snapshot.fromCache),c.query.converter),oldIndex:-1,newIndex:h++}})}var g=c._snapshot.oldDocs;return c._snapshot.docChanges.filter(function(y){return f||3!==y.type}).map(function(y){var _=new bs(c._firestore,c._userDataWriter,y.doc.key,y.doc,new _s(c._snapshot.mutatedKeys.has(y.doc.key),c._snapshot.fromCache),c.query.converter),D=-1,E=-1;return 0!==y.type&&(D=g.indexOf(y.doc.key),g=g.delete(y.doc.key)),1!==y.type&&(E=(g=g.add(y.doc)).indexOf(y.doc.key)),{type:Ry(y.type),doc:_,oldIndex:D,newIndex:E}})}(this,a),this._cachedChangesIncludeMetadataChanges=a),this._cachedChanges},s}();function Ry(s){switch(s){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return _e()}}function ud(s,o){return s instanceof Hi&&o instanceof Hi?s._firestore===o._firestore&&s._key.isEqual(o._key)&&(null===s._document?null===o._document:s._document.isEqual(o._document))&&s._converter===o._converter:s instanceof ws&&o instanceof ws&&s._firestore===o._firestore&&Lp(s.query,o.query)&&s.metadata.isEqual(o.metadata)&&s._snapshot.isEqual(o._snapshot)}function cd(s){if(Si(s)&&0===s.explicitOrderBy.length)throw new K(U.UNIMPLEMENT
1ED,"limitToLast() queries require specifying at least one orderBy() clause")}var Ta=function(){};function Gi(s){for(var o=[],a=1;a<arguments.length;a++)o[a-1]=arguments[a];for(var c=0,f=o;c<f.length;c++){var h=f[c];s=h._apply(s)}return s}var zp=function(s){function o(a,c,f){var h=this;return(h=s.call(this)||this).jc=a,h.Wc=c,h.Gc=f,h.type="where",h}return(0,C.ZT)(o,s),o.prototype._apply=function(a){var h,y,c=ms(a.firestore),f=function(h,g,y,_,D,E,T){var S;if(D.isKeyField()){if("array-contains"===E||"array-contains-any"===E)throw new K(U.INVALID_ARGUMENT,"Invalid Query. You can't perform '"+E+"' queries on FieldPath.documentId().");if("in"===E||"not-in"===E){ld(T,E);for(var k=[],P=0,H=T;P<H.length;P++)k.push(al(_,h,H[P]));S={arrayValue:{values:k}}}else S=al(_,h,T)}else"in"!==E&&"not-in"!==E&&"array-contains-any"!==E||ld(T,E),S=od(y,"where",T,"in"===E||"not-in"===E);var ce=Dr.create(D,E,S);return function(Ie,Ae){if(Ae.g()){var Qe=Ks(Ie);if(null!==Qe&&!Qe.isEqual(Ae.field))throw new K(U.INVALID_ARGUMENT,"Invalid query. All where filters with an inequality (<, <=, !=, not-in, >, or >=) must be on the same field. But you have inequality filters on '"+Qe.toString()+"' and '"+Ae.field.toString()+"'");var Ye=tu(Ie);null!==Ye&&ul(0,Ae.field,Ye)}var st=function(On,Is){for(var ku=0,ng=On.filters;ku<ng.length;ku++){var dl=ng[ku];if(Is.indexOf(dl.op)>=0)return dl.op}return null}(Ie,function(On){switch(On){case"!=":return["!=","not-in"];case"array-contains":return["array-contains","array-contains-any","not-in"];case"in":return["array-contains-any","in","not-in"];case"array-contains-any":return["array-contains","array-contains-any","in","not-in"];case"not-in":return["array-contains","array-contains-any","in","not-in","!="];default:return[]}}(Ae.op));if(null!==st)throw new K(U.INVALID_ARGUMENT,st===Ae.op?"Invalid query. You cannot use more than one '"+Ae.op.toString()+"' filter.":"Invalid query. You cannot use '"+Ae.op.toString()+"' filters with '"+st.toString()+"' filters.")}(h,ce),ce}(a._query,0,c,a.firestore._databaseId,this.jc,this.Wc,this.Gc);return new fr(a.firestore,a.converter,(y=(h=a._query).filters.concat([f]),new ai(h.path,h.collectionGroup,h.explicitOrderBy.slice(),y,h.limit,h.limitType,h.startAt,h.endAt)))},o}(Ta),qi=function(s){function o(a,c){var f=this;return(f=s.call(this)||this).jc=a,f.zc=c,f.type="orderBy",f}return(0,C.ZT)(o,s),o.prototype._apply=function(a){var f,g,c=function(f,h,g){if(null!==f.startAt)throw new K(U.INVALID_ARGUMENT,"Invalid query. You must not call startAt() or startAfter() before calling orderBy().");if(null!==f.endAt)throw new K(U.INVALID_ARGUMENT,"Invalid query. You must not call endAt() or endBefore() before calling orderBy().");var y=new Ti(h,g);return function(_,D){if(null===tu(_)){var E=Ks(_);null!==E&&ul(0,E,D.field)}}(f,y),y}(a._query,this.jc,this.zc);return new fr(a.firestore,a.converter,(g=(f=a._query).explicitOrderBy.concat([c]),new ai(f.path,f.collectionGroup,g,f.filters.slice(),f.limit,f.limitType,f.startAt,f.endAt)))},o}(Ta),xu=function(s){function o(a,c,f){var h=this;return(h=s.call(this)||this).type=a,h.Hc=c,h.Jc=f,h}return(0,C.ZT)(o,s),o.prototype._apply=function(a){return new fr(a.firestore,a.converter,bh(a._query,this.Hc,this.Jc))},o}(Ta),Wp=function(s){function o(a,c,f){var h=this;return(h=s.call(this)||this).type=a,h.Yc=c,h.Xc=f,h}return(0,C.ZT)(o,s),o.prototype._apply=function(a){var f,h,c=ky(a,this.type,this.Yc,this.Xc);return new fr(a.firestore,a.converter,(h=c,new ai((f=a._query).path,f.collectionGroup,f.explicitOrderBy.slice(),f.filters.slice(),f.limit,f.limitType,h,f.endAt)))},o}(Ta),Kp=function(s){function o(a,c,f){var h=this;return(h=s.call(this)||this).type=a,h.Yc=c,h.Xc=f,h}return(0,C.ZT)(o,s),o.prototype._apply=function(a){var f,h,c=ky(a,this.type,this.Yc,this.Xc);return new fr(a.firestore,a.converter,(h=c,new ai((f=a._query).path,f.collectionGroup,f.explicitOrderBy.slice(),f.filters.slice(),f.limit,f.limitType,f.startAt,h)))},o}(Ta);function ky(s,o,a,c){if(a[0]=(0,ve.m9)(a[0]),a[0]instanceof vs)return function(h,g,y,_,D){if(!_)throw new K(U.NOT_FOUND,"Can't use a DocumentSnapshot that doesn't exist for "+y+"().");for(var E=[],T=0,S=ts(h);T<S.length;T++){var k=S[T];if(k.field.isKeyField())E.push(fc(g,_.key));else{var P=_.data.field(k.field);if(tf(P))throw new K(U.INVALID_ARGUMENT,'Invalid query. You are trying to start or end a query using a document for which the field "'+k.field+'" is an uncommitted server timestamp. (Since the value of this field is unknown, you cannot start/end a query with it.)');if(null===P){var H=k.field.canonicalString();throw new K(U.INVALID_ARGUMENT,"Invalid query. You are trying to start or end a query using a document for which the field '"+H+"' (used as the orderBy) does not exist.")}E.push(P)}}return new pc(E,D)}(s._query,s.firestore._databaseId,o,a[0]._document,c);var f=ms(s.firestore);return function(h,g,y,_,D,E){var T=h.explicitOrderBy;if(D.length>T.length)throw new K(U.INVALID_ARGUMENT,"Too many arguments provided to "+_+"(). The number of arguments must be less than or equal to the number of orderBy() clauses");for(var S=[],k=0;k<D.length;k++){var P=D[k];
1if(T[k].field.isKeyField()){if("string"!=typeof P)throw new K(U.INVALID_ARGUMENT,"Invalid query. Expected a string for document ID in "+_+"(), but got a "+typeof P);if(!_h(h)&&-1!==P.indexOf("/"))throw new K(U.INVALID_ARGUMENT,"Invalid query. When querying a collection and ordering by FieldPath.documentId(), the value passed to "+_+"() must be a plain document ID, but '"+P+"' contains a slash.");var H=h.path.child(tt.fromString(P));if(!De.isDocumentKey(H))throw new K(U.INVALID_ARGUMENT,"Invalid query. When querying a collection group and ordering by FieldPath.documentId(), the value passed to "+_+"() must result in a valid document path, but '"+H+"' is not because it contains an odd number of segments.");var te=new De(H);S.push(fc(g,te))}else{var ce=od(y,_,P);S.push(ce)}}return new pc(S,E)}(s._query,s.firestore._databaseId,f,o,a,c)}function al(s,o,a){if("string"==typeof(a=(0,ve.m9)(a))){if(""===a)throw new K(U.INVALID_ARGUMENT,"Invalid query. When querying with FieldPath.documentId(), you must provide a valid document ID, but it was an empty string.");if(!_h(o)&&-1!==a.indexOf("/"))throw new K(U.INVALID_ARGUMENT,"Invalid query. When querying a collection by FieldPath.documentId(), you must provide a plain document ID, but '"+a+"' contains a '/' character.");var c=o.path.child(tt.fromString(a));if(!De.isDocumentKey(c))throw new K(U.INVALID_ARGUMENT,"Invalid query. When querying a collection group by FieldPath.documentId(), the value provided must result in a valid document path, but '"+c+"' is not because it has an odd number of segments ("+c.length+").");return fc(s,new De(c))}if(a instanceof Ot)return fc(s,a._key);throw new K(U.INVALID_ARGUMENT,"Invalid query. When querying with FieldPath.documentId(), you must provide a valid string or a DocumentReference, but it was: "+Tu(a)+".")}function ld(s,o){if(!Array.isArray(s)||0===s.length)throw new K(U.INVALID_ARGUMENT,"Invalid Query. A non-empty array is required for '"+o.toString()+"' filters.");if(s.length>10)throw new K(U.INVALID_ARGUMENT,"Invalid Query. '"+o.toString()+"' filters support a maximum of 10 elements in the value array.")}function ul(s,o,a){if(!a.isEqual(o))throw new K(U.INVALID_ARGUMENT,"Invalid query. You have a where filter with an inequality (<, <=, !=, not-in, >, or >=) on field '"+o.toString()+"' and so you must also use '"+o.toString()+"' as your first argument to orderBy(), but your first orderBy() is on field '"+a.toString()+"' instead.")}var Ds=function(){function s(){}return s.prototype.convertValue=function(o,a){switch(void 0===a&&(a="none"),oi(o)){case 0:return null;case 1:return o.booleanValue;case 2:return zt(o.integerValue||o.doubleValue);case 3:return this.convertTimestamp(o.timestampValue);case 4:return this.convertServerTimestamp(o,a);case 5:return o.stringValue;case 6:return this.convertBytes(Gs(o.bytesValue));case 7:return this.convertReference(o.referenceValue);case 8:return this.convertGeoPoint(o.geoPointValue);case 9:return this.convertArray(o.arrayValue,a);case 10:return this.convertObject(o.mapValue,a);default:throw _e()}},s.prototype.convertObject=function(o,a){var c=this,f={};return Hs(o.fields,function(h,g){f[h]=c.convertValue(g,a)}),f},s.prototype.convertGeoPoint=function(o){return new Au(zt(o.latitude),zt(o.longitude))},s.prototype.convertArray=function(o,a){var c=this;return(o.values||[]).map(function(f){return c.convertValue(f,a)})},s.prototype.convertServerTimestamp=function(o,a){switch(a){case"previous":var c=lc(o);return null==c?null:this.convertValue(c,a);case"estimate":return this.convertTimestamp(Xo(o));default:return null}},s.prototype.convertTimestamp=function(o){var a=co(o);return new Ht(a.seconds,a.nanos)},s.prototype.convertDocumentKey=function(o,a){var c=tt.fromString(o);Fe(Vh(c));var f=new tl(c.get(1),c.get(3)),h=new De(c.popFirst(5));return f.isEqual(a)||Xt("Document "+h+" contains a document reference within a different database ("+f.projectId+"/"+f.database+") which is not supported. It will be treated as a reference in the current database ("+a.projectId+"/"+a.database+") instead."),h},s}();function cl(s,o,a){return s?a&&(a.merge||a.mergeFields)?s.toFirestore(o,a):s.toFirestore(o):o}var fd=function(s){function o(a){var c=this;return(c=s.call(this)||this).firestore=a,c}return(0,C.ZT)(o,s),o.prototype.convertBytes=function(a){return new gs(a)},o.prototype.convertReference=function(a){var c=this.convertDocumentKey(a,this.firestore._databaseId);
1return new Ot(this.firestore,null,c)},o}(Ds),Qp=function(){function s(o,a){this._firestore=o,this._commitHandler=a,this._mutations=[],this._committed=!1,this._dataReader=ms(o)}return s.prototype.set=function(o,a,c){this._verifyNotCommitted();var f=$i(o,this._firestore),h=cl(f.converter,a,c),g=ol(this._dataReader,"WriteBatch.set",f._key,h,null!==f.converter,c);return this._mutations.push(g.toMutation(f._key,Wt.none())),this},s.prototype.update=function(o,a,c){for(var f=[],h=3;h<arguments.length;h++)f[h-3]=arguments[h];this._verifyNotCommitted();var g,y=$i(o,this._firestore);return g="string"==typeof(a=(0,ve.m9)(a))||a instanceof ji?Hp(this._dataReader,"WriteBatch.update",y._key,a,c,f):id(this._dataReader,"WriteBatch.update",y._key,a),this._mutations.push(g.toMutation(y._key,Wt.exists(!0))),this},s.prototype.delete=function(o){this._verifyNotCommitted();var a=$i(o,this._firestore);return this._mutations=this._mutations.concat(new Ni(a._key,Wt.none())),this},s.prototype.commit=function(){return this._verifyNotCommitted(),this._committed=!0,this._mutations.length>0?this._commitHandler(this._mutations):Promise.resolve()},s.prototype._verifyNotCommitted=function(){if(this._committed)throw new K(U.FAILED_PRECONDITION,"A write batch can no longer be used after commit() has been called.")},s}();function $i(s,o){if((s=(0,ve.m9)(s)).firestore!==o)throw new K(U.INVALID_ARGUMENT,"Provided document reference is from a different Firestore instance.");return s}var So=function(s){function o(a){var c=this;return(c=s.call(this)||this).firestore=a,c}return(0,C.ZT)(o,s),o.prototype.convertBytes=function(a){return new gs(a)},o.prototype.convertReference=function(a){var c=this.convertDocumentKey(a,this.firestore._databaseId);return new Ot(this.firestore,null,c)},o}(Ds);function Jp(s,o,a){for(var c=[],f=3;f<arguments.length;f++)c[f-3]=arguments[f];s=lt(s,Ot);var h=lt(s.firestore,Kt),g=ms(h);return Fu(h,[("string"==typeof(o=(0,ve.m9)(o))||o instanceof ji?Hp(g,"updateDoc",s._key,o,a,c):id(g,"updateDoc",s._key,o)).toMutation(s._key,Wt.exists(!0))])}function ll(s){for(var o,a,c,f=[],h=1;h<arguments.length;h++)f[h-1]=arguments[h];s=(0,ve.m9)(s);var g={includeMetadataChanges:!1},y=0;"object"!=typeof f[y]||Ea(f[y])||(g=f[y],y++);var _,D,E,T={includeMetadataChanges:g.includeMetadataChanges};if(Ea(f[y])){var S=f[y];f[y]=null===(o=S.next)||void 0===o?void 0:o.bind(S),f[y+1]=null===(a=S.error)||void 0===a?void 0:a.bind(S),f[y+2]=null===(c=S.complete)||void 0===c?void 0:c.bind(S)}if(s instanceof Ot)D=lt(s.firestore,Kt),E=zr(s._key.path),_={next:function(H){f[y]&&f[y](dd(D,s,H))},error:f[y+1],complete:f[y+2]};else{var k=lt(s,fr);D=lt(k.firestore,Kt),E=k._query;var P=new So(D);_={next:function(H){f[y]&&f[y](new ws(D,P,k,H))},error:f[y+1],complete:f[y+2]},cd(s._query)}return function(H,te,ce,Ie){var Ae=this,Qe=new Yf(Ie),Ye=new Tr(te,Qe,ce);return H.asyncQueue.enqueueAndForget(function(){return(0,C.mG)(Ae,void 0,void 0,function(){var st;return(0,C.Jh)(this,function(On){switch(On.label){case 0:return st=Wc,[4,Io(H)];case 1:return[2,st.apply(void 0,[On.sent(),Ye])]}})})}),function(){Qe.Wo(),H.asyncQueue.enqueueAndForget(function(){return(0,C.mG)(Ae,void 0,void 0,function(){var st;return(0,C.Jh)(this,function(On){switch(On.label){case 0:return st=Gf,[4,Io(H)];case 1:return[2,st.apply(void 0,[On.sent(),Ye])]}})})})}}(yn(D),E,T,_)}function Fu(s,o){return function(a,c){var f=this,h=new jn;return a.asyncQueue.enqueueAndForget(function(){return(0,C.mG)(f,void 0,void 0,function(){var g;return(0,C.Jh)(this,function(y){switch(y.label){case 0:return g=Ep,[4,el(a)];case 1:return[2,g.apply(void 0,[y.sent(),c,h])]}})})}),h.promise}(yn(s),o)}function dd(s,o,a){var c=a.docs.get(o._key),f=new So(s);return new Hi(s,f,o._key,c,new _s(a.hasPendingWrites,a.fromCache),o.converter)}var Yp=function(s){function o(a,c){var f=this;return(f=s.call(this,a,c)||this)._firestore=a,f}return(0,C.ZT)(o,s),o.prototype.get=function(a){var c=this,f=$i(a,this._firestore),h=new So(this._firestore);return s.prototype.get.call(this,a).then(function(g){return new Hi(c._firestore,h,f._key,g._document,new _s(!1,!1),f.converter)})},o}(function(){function s(o,a){this._firestore=o,this._transaction=a,this._dataReader=ms(o)}return s.prototype.get=function(o){var a=this,c=$i(o,this._firestore),f=new fd(this._firestore);return this._transaction.lookup([c._key]).then(function(h){if(!h||1!==h.length)return _e();var g=h[0];
1if(g.isFoundDocument())return new vs(a._firestore,f,g.key,g,c.converter);if(g.isNoDocument())return new vs(a._firestore,f,c._key,null,c.converter);throw _e()})},s.prototype.set=function(o,a,c){var f=$i(o,this._firestore),h=cl(f.converter,a,c),g=ol(this._dataReader,"Transaction.set",f._key,h,null!==f.converter,c);return this._transaction.set(f._key,g),this},s.prototype.update=function(o,a,c){for(var f=[],h=3;h<arguments.length;h++)f[h-3]=arguments[h];var g,y=$i(o,this._firestore);return g="string"==typeof(a=(0,ve.m9)(a))||a instanceof ji?Hp(this._dataReader,"Transaction.update",y._key,a,c,f):id(this._dataReader,"Transaction.update",y._key,a),this._transaction.update(y._key,g),this},s.prototype.delete=function(o){var a=$i(o,this._firestore);return this._transaction.delete(a._key),this},s}());function Es(){if("undefined"==typeof Uint8Array)throw new K(U.UNIMPLEMENTED,"Uint8Arrays are not available in this environment.")}function hd(){if("undefined"==typeof atob)throw new K(U.UNIMPLEMENTED,"Blobs are unavailable in Firestore in this environment.")}var Zp=function(){function s(o){this._delegate=o}return s.fromBase64String=function(o){return hd(),new s(gs.fromBase64String(o))},s.fromUint8Array=function(o){return Es(),new s(gs.fromUint8Array(o))},s.prototype.toBase64=function(){return hd(),this._delegate.toBase64()},s.prototype.toUint8Array=function(){return Es(),this._delegate.toUint8Array()},s.prototype.isEqual=function(o){return this._delegate.isEqual(o._delegate)},s.prototype.toString=function(){return"Blob(base64: "+this.toBase64()+")"},s}(),Ly=function(){function s(){}return s.prototype.enableIndexedDbPersistence=function(o,a){return function(c,f){ed(c=lt(c,Kt));var h=yn(c),g=c._freezeSettings(),y=new xp;return My(h,y,new Yc(y,g.cacheSizeBytes,null==f?void 0:f.forceOwnership))}(o._delegate,{forceOwnership:a})},s.prototype.enableMultiTabIndexedDbPersistence=function(o){return function(a){ed(a=lt(a,Kt));var c=yn(a),f=a._freezeSettings(),h=new xp;return My(c,h,new o0(h,f.cacheSizeBytes))}(o._delegate)},s.prototype.clearIndexedDbPersistence=function(o){return function(a){var c=this;if(a._initialized&&!a._terminated)throw new K(U.FAILED_PRECONDITION,"Persistence can only be cleared before a Firestore instance is initialized or after it is terminated.");var f=new jn;return a._queue.enqueueAndForgetEvenWhileRestricted(function(){return(0,C.mG)(c,void 0,void 0,function(){var h;return(0,C.Jh)(this,function(g){switch(g.label){case 0:return g.trys.push([0,2,,3]),[4,function(y){return(0,C.mG)(this,void 0,void 0,function(){return(0,C.Jh)(this,function(D){switch(D.label){case 0:return na.yt()?[4,na.delete(y+"main")]:[2,Promise.resolve()];case 1:return D.sent(),[2]}})})}(Rc(a._databaseId,a._persistenceKey))];case 1:return g.sent(),f.resolve(),[3,3];case 2:return h=g.sent(),f.reject(h),[3,3];case 3:return[2]}})})}),f.promise}(o._delegate)},s}(),Cs=function(){function s(o,a,c){var f=this;this._delegate=a,this.Zc=c,this.INTERNAL={delete:function(){return f.terminate()}},o instanceof tl||(this.tu=o)}return Object.defineProperty(s.prototype,"_databaseId",{get:function(){return this._delegate._databaseId},enumerable:!1,configurable:!0}),s.prototype.settings=function(o){var a=this._delegate._getSettings();o.merge||a.host===o.host||Wa("You are overriding the original host. If you did not intend to override your settings, use {merge: true}."),o.merge&&delete(o=Object.assign(Object.assign({},a),o)).merge,this._delegate._setSettings(o)},s.prototype.useEmulator=function(o,a,c){void 0===c&&(c={}),function(f,h,g,y){var _;void 0===y&&(y={});var D=(f=lt(f,Da))._getSettings();if("firestore.googleapis.com"!==D.host&&D.host!==h&&Wa("Host has been set in both settings() and useEmulator(), emulator host will be used"),f._setSettings(Object.assign(Object.assign({},D),{host:h+":"+g,ssl:!1})),y.mockUserToken){var E,T;if("string"==typeof y.mockUserToken)E=y.mockUserToken,T=Un.MOCK_USER;else{E=(0,ve.Sg)(y.mockUserToken,null===(_=f._app)||void 0===_?void 0:_.options.projectId);var S=y.mockUserToken.sub||y.mockUserToken.user_id;if(!S)throw new K(U.INVALID_ARGUMENT,"mockUserToken must contain 'sub' or 'user_id' field!");T=new Un(S)}f._credentials=new Cy(new Rp(E,T))}}(this._delegate,o,a,c)},s.prototype.enableNetwork=function(){return function(o){var a=this;return o.asyncQueue.enqueue(function(){return(0,C.mG)(a,void 0,void 0,function(){var c,f;return(0,C.Jh)(this,function(h){switch(h.label){case 0:return[4,Fp(o)];case 1:return c=h.sent(),[4,Xc(o)];case 2:return f=h.sent(),[2,(c.setNetworkEnabled(!0),g=f,y=F(g),y.Or.delete(0),ga(y))]}var g,y})})})}(yn(lt(this._delegate,Kt)))},s.prototype.disableNetwork=function(){return function(o){var a=this;return o.asyncQueue.enqueue(function(){return(0,C.mG)(a,void 0,void 0,function(){var c,f;return(0,C.Jh)(this,function(h){switch(h.label){case 0:return[4,Fp(o)];case 1:return c=h.sent(),[4,Xc(o)];case 2:return f=h.sent(),[2,(c.setNetworkEnabled(!1),function(g){return(0,C.mG)(this,void 0,void 0,function(){var y;return(0,C.Jh)(this,function(_){switch(_.label){case 0:return(y=F(g)).Or.add(0),[4,wo(y)];case 1:return _.sent(),y.Br.set("Offline"),[2]}})})}(f))]}})})})}(yn(lt(this._delegate,Kt)))},s.prototype.enablePersistence=function(o){var a=!1,c=!1;return o&&wa("synchronizeTabs",a=!!o.synchronizeTabs,"experimentalForceOwningTab",c=!!o.experimentalForceOwningTab),a?this.Zc.enableMultiTabIndexedDbPersistence(this):this.Zc.enableIndexedDbPersistence(this,c)},s.prototype.clearPersistence=function(){return this.Zc.clearIndexedDbPersistence(this)},s.prototype.terminate=function(){return this.tu&&(this.tu._removeServiceInstance("firestore"),this.tu._removeServiceInstance("firestore-exp")),this._delegate._delete()},s.prototype.waitForPendingWrites=function(){return function(o){var a=this,c=new jn;return o.asyncQueue.enqueueAndForget(function(){return(0,C.mG)(a,void 0,void 0,function(){var f;return(0,C.Jh)(this,function(h){switch(h.label){case 0:return f=Li,[4,el(o)];case 1:return[2,f.apply(void 0,[h.sent(),c])]}})})}),c.promise}(yn(lt(this._delegate,Kt)))},s.prototype.onSnapshotsInSync=function(o){return c=o,function(f,h){var g=this,y=new Yf(h);return f.asyncQueue.enqueueAndForget(function(){return(0,C.mG)(g,void 0,void 0,function(){var _;return(0,C.Jh)(this,function(D){switch(D.label){case 0:return _=function(E,T){F(E).Gr.add(T),T.next()},[4,Io(f)];case 1:return[2,_.apply(void 0,[D.sent(),y])]}})})}),function(){y.Wo(),f.asyncQueue.enqueueAndForget(function(){return(0,C.mG)(g,void 0,void 0,function(){var _;return(0,C.Jh)(this,function(D){switch(D.label){case 0:return _=function(E,T){F(E).Gr.delete(T)},[4,Io(f)];case 1:return[2,_.apply(void 0,[D.sent(),y])]}})})})}}(yn(lt(this._delegate,Kt)),Ea(c)?c:{next:c});var c}
1,Object.defineProperty(s.prototype,"app",{get:function(){if(!this.tu)throw new K(U.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this.tu},enumerable:!1,configurable:!0}),s.prototype.collection=function(o){try{return new Ru(this,Ty(this._delegate,o))}catch(a){throw Hn(a,"collection()","Firestore.collection()")}},s.prototype.doc=function(o){try{return new zi(this,Su(this._delegate,o))}catch(a){throw Hn(a,"doc()","Firestore.doc()")}},s.prototype.collectionGroup=function(o){try{return new Pu(this,function(a,c){if(a=lt(a,Da),Iu("collectionGroup","collection id",c),c.indexOf("/")>=0)throw new K(U.INVALID_ARGUMENT,"Invalid collection ID '"+c+"' passed to function collectionGroup(). Collection IDs must not contain '/'.");return new fr(a,null,(f=c,new ai(tt.emptyPath(),f)));var f}(this._delegate,o))}catch(a){throw Hn(a,"collectionGroup()","Firestore.collectionGroup()")}},s.prototype.runTransaction=function(o){var c,a=this;return function(h,g){var y=this,_=new jn;return h.asyncQueue.enqueueAndForget(function(){return(0,C.mG)(y,void 0,void 0,function(){var D;return(0,C.Jh)(this,function(E){switch(E.label){case 0:return[4,(T=h,_a(T).then(function(S){return S.datastore}))];case 1:return D=E.sent(),new u0(h.asyncQueue,D,g,_).run(),[2]}var T})})}),_.promise}(yn(c=this._delegate),function(h){return function(c){return o(new Xp(a,c))}(new Yp(c,h))})},s.prototype.batch=function(){var o=this;return yn(this._delegate),new eg(new Qp(this._delegate,function(a){return Fu(o._delegate,a)}))},s.prototype.loadBundle=function(o){throw new K(U.FAILED_PRECONDITION,'"loadBundle()" does not exist, have you imported "firebase/firestore/bundle"?')},s.prototype.namedQuery=function(o){throw new K(U.FAILED_PRECONDITION,'"namedQuery()" does not exist, have you imported "firebase/firestore/bundle"?')},s}(),fl=function(s){function o(a){var c=this;return(c=s.call(this)||this).firestore=a,c}return(0,C.ZT)(o,s),o.prototype.convertBytes=function(a){return new Zp(new gs(a))},o.prototype.convertReference=function(a){var c=this.convertDocumentKey(a,this.firestore._databaseId);return zi.eu(c,this.firestore,null)},o}(Ds),Xp=function(){function s(o,a){this._firestore=o,this._delegate=a,this._userDataWriter=new fl(o)}return s.prototype.get=function(o){var a=this,c=Aa(o);return this._delegate.get(c).then(function(f){return new Sa(a._firestore,new Hi(a._firestore._delegate,a._userDataWriter,f._key,f._document,f.metadata,c.converter))})},s.prototype.set=function(o,a,c){var f=Aa(o);return c?(To("Transaction.set",c),this._delegate.set(f,a,c)):this._delegate.set(f,a),this},s.prototype.update=function(o,a,c){for(var f,h=[],g=3;g<arguments.length;g++)h[g-3]=arguments[g];var y=Aa(o);return 2===arguments.length?this._delegate.update(y,a):(f=this._delegate).update.apply(f,(0,C.ev)([y,a,c],h)),this},s.prototype.delete=function(o){var a=Aa(o);return this._delegate.delete(a),this},s}(),eg=function(){function s(o){this._delegate=o}return s.prototype.set=function(o,a,c){var f=Aa(o);return c?(To("WriteBatch.set",c),this._delegate.set(f,a,c)):this._delegate.set(f,a),this},s.prototype.update=function(o,a,c){for(var f,h=[],g=3;g<arguments.length;g++)h[g-3]=arguments[g];var y=Aa(o);return 2===arguments.length?this._delegate.update(y,a):(f=this._delegate).update.apply(f,(0,C.ev)([y,a,c],h)),this},s.prototype.delete=function(o){var a=Aa(o);return this._delegate.delete(a),this},s.prototype.commit=function(){return this._delegate.commit()},s}(),Fn=function(){function s(o,a,c){this._firestore=o,this._userDataWriter=a,this._delegate=c}return s.prototype.fromFirestore=function(o,a){var c=new bs(this._firestore._delegate,this._userDataWriter,o._key,o._document,o.metadata,null);return this._delegate.fromFirestore(new Ou(this._firestore,c),null!=a?a:{})},s.prototype.toFirestore=function(o,a){return a?this._delegate.toFirestore(o,a):this._delegate.toFirestore(o)},s.nu=function(o,a){var c=s.su,f=c.get(o);f||c.set(o,f=new WeakMap);var h=f.get(a);return h||(h=new s(o,new fl(o),a),f.set(a,h)),h},s}();Fn.su=new WeakMap;var zi=function(){function s(o,a){this.firestore=o,this._delegate=a,this._userDataWriter=new fl(o)}return s.iu=function(o,a,c){if(o.length%2!=0)throw new K(U.INVALID_ARGUMENT,"Invalid document reference. Document references must have an even number of segments, but "+o.canonicalString()+" has "+o.length);return new s(a,new Ot(a._delegate,c,new De(o)))},s.eu=function(o,a,c){return new s(a,new Ot(a._delegate,c,o))}
1,Object.defineProperty(s.prototype,"id",{get:function(){return this._delegate.id},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"parent",{get:function(){return new Ru(this.firestore,this._delegate.parent)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"path",{get:function(){return this._delegate.path},enumerable:!1,configurable:!0}),s.prototype.collection=function(o){try{return new Ru(this.firestore,Ty(this._delegate,o))}catch(a){throw Hn(a,"collection()","DocumentReference.collection()")}},s.prototype.isEqual=function(o){return(o=(0,ve.m9)(o))instanceof Ot&&Xf(this._delegate,o)},s.prototype.set=function(o,a){a=To("DocumentReference.set",a);try{return function(c,f,h){c=lt(c,Ot);var g=lt(c.firestore,Kt),y=cl(c.converter,f,h);return Fu(g,[ol(ms(g),"setDoc",c._key,y,null!==c.converter,h).toMutation(c._key,Wt.none())])}(this._delegate,o,a)}catch(c){throw Hn(c,"setDoc()","DocumentReference.set()")}},s.prototype.update=function(o,a){for(var c=[],f=2;f<arguments.length;f++)c[f-2]=arguments[f];try{return 1===arguments.length?Jp(this._delegate,o):Jp.apply(void 0,(0,C.ev)([this._delegate,o,a],c))}catch(h){throw Hn(h,"updateDoc()","DocumentReference.update()")}},s.prototype.delete=function(){return Fu(lt((o=this._delegate).firestore,Kt),[new Ni(o._key,Wt.none())]);var o},s.prototype.onSnapshot=function(){for(var o=this,a=[],c=0;c<arguments.length;c++)a[c]=arguments[c];var f=pd(a),h=gd(a,function(g){return new Sa(o.firestore,new Hi(o.firestore._delegate,o._userDataWriter,g._key,g._document,g.metadata,o._delegate.converter))});return ll(this._delegate,f,h)},s.prototype.get=function(o){var a=this;return("cache"===(null==o?void 0:o.source)?function(c){c=lt(c,Ot);var f=lt(c.firestore,Kt),h=yn(f),g=new So(f);return function(y,_){var D=this,E=new jn;return y.asyncQueue.enqueueAndForget(function(){return(0,C.mG)(D,void 0,void 0,function(){var T;return(0,C.Jh)(this,function(S){switch(S.label){case 0:return T=function(k,P,H){return(0,C.mG)(this,void 0,void 0,function(){var te,ce;return(0,C.Jh)(this,function(Ie){switch(Ie.label){case 0:return Ie.trys.push([0,2,,3]),[4,(Ae=k,Qe
1=P,Ye=F(Ae),Ye.persistence.runTransaction("read document","readonly",function(st){return Ye.Mn.mn(st,Qe)}))];case 1:return(ce=Ie.sent()).isFoundDocument()?H.resolve(ce):ce.isNoDocument()?H.resolve(null):H.reject(new K(U.UNAVAILABLE,"Failed to get document from cache. (However, this document may exist on the server. Run again without setting 'source' in the GetOptions to attempt to retrieve the document from the server.)")),[3,3];case 2:return te=Ie.sent(),ce=ma(te,"Failed to get document '"+P+" from cache"),H.reject(ce),[3,3];case 3:return[2]}var Ae,Qe,Ye})})},[4,Zc(y)];case 1:return[2,T.apply(void 0,[S.sent(),_,E])]}})})}),E.promise}(h,c._key).then(function(y){return new Hi(f,g,c._key,y,new _s(null!==y&&y.hasLocalMutations,!0),c.converter)})}(this._delegate):"server"===(null==o?void 0:o.source)?function(c){c=lt(c,Ot);var f=lt(c.firestore,Kt);return Op(yn(f),c._key,{source:"server"}).then(function(h){return dd(f,c,h)})}(this._delegate):function(c){c=lt(c,Ot);var f=lt(c.firestore,Kt);return Op(yn(f),c._key).then(function(h){return dd(f,c,h)})}(this._delegate)).then(function(c){return new Sa(a.firestore,new Hi(a.firestore._delegate,a._userDataWriter,c._key,c._document,c.metadata,a._delegate.converter))})},s.prototype.withConverter=function(o){return new s(this.firestore,this._delegate.withConverter(o?Fn.nu(this.firestore,o):null))},s}();function Hn(s,o,a){return s.message=s.message.replace(o,a),s}function pd(s){for(var o=0,a=s;o<a.length;o++){var c=a[o];if("object"==typeof c&&!Ea(c))return c}return{}}function gd(s,o){var a,c,f;return{next:function(h){f.next&&f.next(o(h))},error:null===(a=(f=Ea(s[0])?s[0]:Ea(s[1])?s[1]:"function"==typeof s[0]?{next:s[0],error:s[1],complete:s[2]}:{next:s[1],error:s[2],complete:s[3]}).error)||void 0===a?void 0:a.bind(f),complete:null===(c=f.complete)||void 0===c?void 0:c.bind(f)}}var Sa=function(){function s(o,a){this._firestore=o,this._delegate=a}return Object.defineProperty(s.prototype,"ref",{get:function(){return new zi(this._firestore,this._delegate.ref)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"id",{get:function(){return this._delegate.id},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"metadata",{get:function(){return this._delegate.metadata},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"exists",{get:function(){return this._delegate.exists()},enumerable:!1,configurable:!0}),s.prototype.data=function(o){return this._delegate.data(o)},s.prototype.get=function(o,a){return this._delegate.get(o,a)},s.prototype.isEqual=function(o){return ud(this._delegate,o._delegate)},s}(),Ou=function(s){function o(){return null!==s&&s.apply(this,arguments)||this}return(0,C.ZT)(o,s),o.prototype.data=function(a){return this._delegate.data(a)},o}(Sa),Pu=function(){function s(o,a){this.firestore=o,this._delegate=a,this._userDataWriter=new fl(o)}return s.prototype.where=function(o,a,c){try{return new s(this.firestore,Gi(this._delegate,(g=c,y=a,_=Nu("where",f=o),new zp(_,y,g))))}catch(f){throw Hn(f,/(orderBy|where)\(\)/,"Query.$1()")}var f,g,y,_},s.prototype.orderBy=function(o,a){try{return new s(this.firestore,Gi(this._delegate,function(c,f){void 0===f&&(f="asc");var h=f,g=Nu("orderBy",c);return new qi(g,h)}(o,a)))}catch(c){throw Hn(c,/(orderBy|where)\(\)/,"Query.$1()")}},s.prototype.limit=function(o){try{return new s(this.firestore,Gi(this._delegate,(rl("limit",a=o),new xu("limit",a,"F"))))}catch(a){throw Hn(a,"limit()","Query.limit()")}var a},s.prototype.limitToLast=function(o){try{return new s(this.firestore,Gi(this._delegate,(rl("limitToLast",a=o),new xu("limitToLast",a,"L"))))}catch(a){throw Hn(a,"limitToLast()","Query.limitToLast()")}var a},s.prototype.startAt=function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];try{return new s(this.firestore,Gi(this._delegate,function(){for(var c=[],f=0;f<arguments.length;f++)c[f]=arguments[f];return new Wp("startAt",c,!0)}.apply(void 0,o)))}catch(c){throw Hn(c,"startAt()","Query.startAt()")}},s.prototype.startAfter=function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];try{return new s(this.firestore,Gi(this._delegate,function(){for(var c=[],f=0;f<arguments.length;f++)c[f]=arguments[f];return new Wp("startAfter",c,!1)}.apply(void 0,o)))}catch(c){throw Hn(c,"startAfter()","Query.startAfter()")}},s.prototype.endBefore=function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];try{return new s(this.firestore,Gi(this._delegate,function(){for(var c=[],f=0;f<arguments.length;f++)c[f]=arguments[f];return new Kp("endBefore",c,!0)}.apply(void 0,o)))}catch(c){throw Hn(c,"endBefore()","Query.endBefore()")}},s.prototype.endAt=function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];try{return new s(this.firestore,Gi(this._delegate,function(){for(var c=[],f=0;f<arguments.length;f++)c[f]=arguments[f];return new Kp("endAt",c,!1)}.apply(void 0,o)))}catch(c){throw Hn(c,"endAt()","Query.endAt()")}},s.prototype.isEqual=function(o){return Lp(this._delegate,o._delegate)},s.prototype.get=function(o){var a=this;
1return("cache"===(null==o?void 0:o.source)?function(c){c=lt(c,fr);var f=lt(c.firestore,Kt),h=yn(f),g=new So(f);return function(y,_){var D=this,E=new jn;return y.asyncQueue.enqueueAndForget(function(){return(0,C.mG)(D,void 0,void 0,function(){var T;return(0,C.Jh)(this,function(S){switch(S.label){case 0:return T=function(k,P,H){return(0,C.mG)(this,void 0,void 0,function(){var te,ce,Ie,Ae,Qe;return(0,C.Jh)(this,function(Ye){switch(Ye.label){case 0:return Ye.trys.push([0,2,,3]),[4,kc(k,P,!0)];case 1:return Qe=Ye.sent(),te=new zf(P,Qe.Bn),ce=te._o(Qe.documents),Ie=te.applyChanges(ce,!1),H.resolve(Ie.snapshot),[3,3];case 2:return Ae=Ye.sent(),Qe=ma(Ae,"Failed to execute query '"+P+" against cache"),H.reject(Qe),[3,3];case 3:return[2]}})})},[4,Zc(y)];case 1:return[2,T.apply(void 0,[S.sent(),_,E])]}})})}),E.promise}(h,c._query).then(function(y){return new ws(f,g,c,y)})}(this._delegate):"server"===(null==o?void 0:o.source)?function(c){c=lt(c,fr);var f=lt(c.firestore,Kt),h=yn(f),g=new So(f);return Vi(h,c._query,{source:"server"}).then(function(y){return new ws(f,g,c,y)})}(this._delegate):function(c){c=lt(c,fr);var f=lt(c.firestore,Kt),h=yn(f),g=new So(f);return cd(c._query),Vi(h,c._query).then(function(y){return new ws(f,g,c,y)})}(this._delegate)).then(function(c){return new md(a.firestore,new ws(a.firestore._delegate,a._userDataWriter,a._delegate,c._snapshot))})},s.prototype.onSnapshot=function(){for(var o=this,a=[],c=0;c<arguments.length;c++)a[c]=arguments[c];var f=pd(a),h=gd(a,function(g){return new md(o.firestore,new ws(o.firestore._delegate,o._userDataWriter,o._delegate,g._snapshot))});return ll(this._delegate,f,h)},s.prototype.withConverter=function(o){return new s(this.firestore,this._delegate.withConverter(o?Fn.nu(this.firestore,o):null))},s}(),By=function(){function s(o,a){this._firestore=o,this._delegate=a}return Object.defineProperty(s.prototype,"type",{get:function(){return this._delegate.type},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"doc",{get:function(){return new Ou(this._firestore,this._delegate.doc)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"oldIndex",{get:function(){return this._delegate.oldIndex},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"newIndex",{get:function(){return this._delegate.newIndex},enumerable:!1,configurable:!0}),s}(),md=function(){function s(o,a){this._firestore=o,this._delegate=a}return Object.defineProperty(s.prototype,"query",{get:function(){return new Pu(this._firestore,this._delegate.query)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"metadata",{get:function(){return this._delegate.metadata},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"size",{get:function(){return this._delegate.size},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"empty",{get:function(){return this._delegate.empty},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"docs",{get:function(){var o=this;return this._delegate.docs.map(function(a){return new Ou(o._firestore,a)})},enumerable:!1,configurable:!0}),s.prototype.docChanges=function(o){var a=this;return this._delegate.docChanges(o).map(function(c){return new By(a._firestore,c)})},s.prototype.forEach=function(o,a){var c=this;this._delegate.forEach(function(f){o.call(a,new Ou(c._firestore,f))})},s.prototype.isEqual=function(o){return ud(this._delegate,o._delegate)},s}(),Ru=function(s){function o(a,c){var f=this;return(f=s.call(this,a,c)||this).firestore=a,f._delegate=c,f}return(0,C.ZT)(o,s),Object.defineProperty(o.prototype,"id",{get:function(){return this._delegate.id},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"path",{get:function(){return this._delegate.path},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"parent",{get:function(){var a=this._delegate.parent;return a?new zi(this.firestore,a):null},enumerable:!1,configurable:!0}),o.prototype.doc=function(a){try{return new zi(this.firestore,void 0===a?Su(this._delegate):Su(this._delegate,a))}catch(c){throw Hn(c,"doc()","CollectionReference.doc()")}},o.prototype.add=function(a){var f,h,g,y,_,c=this;return(f=this._delegate,h=a,g=lt(f.firestore,Kt),y=Su(f),_=cl(f.converter,h),Fu(g,[ol(ms(f.firestore),"addDoc",y._key,_,null!==f.converter,{}).toMutation(y._key,Wt.exists(!1))]).then(function(){return y}
1)).then(function(f){return new zi(c.firestore,f)})},o.prototype.isEqual=function(a){return Xf(this._delegate,a._delegate)},o.prototype.withConverter=function(a){return new o(this.firestore,this._delegate.withConverter(a?Fn.nu(this.firestore,a):null))},o}(Pu);function Aa(s){return lt(s,Ot)}var tg=function(){function s(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];this._delegate=new(ji.bind.apply(ji,(0,C.ev)([void 0],o)))}return s.documentId=function(){return new s(cn.keyField().canonicalString())},s.prototype.isEqual=function(o){return(o=(0,ve.m9)(o))instanceof ji&&this._delegate._internalPath.isEqual(o._internalPath)},s}(),jy=function(){function s(o){this._delegate=o}return s.serverTimestamp=function(){var o=new Fy("serverTimestamp");return o._methodName="FieldValue.serverTimestamp",new s(o)},s.delete=function(){var o=new sl("deleteField");return o._methodName="FieldValue.delete",new s(o)},s.arrayUnion=function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];var c=function(){for(var f=[],h=0;h<arguments.length;h++)f[h]=arguments[h];return new gi("arrayUnion",f)}.apply(void 0,o);return c._methodName="FieldValue.arrayUnion",new s(c)},s.arrayRemove=function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];var c=function(){for(var f=[],h=0;h<arguments.length;h++)f[h]=arguments[h];return new rd("arrayRemove",f)}.apply(void 0,o);return c._methodName="FieldValue.arrayRemove",new s(c)},s.increment=function(o){var a=new Oy("increment",o);return a._methodName="FieldValue.increment",new s(a)},s.prototype.isEqual=function(o){return this._delegate.isEqual(o._delegate)},s}(),f0=St(461),yd={Firestore:Cs,GeoPoint:Au,Timestamp:Ht,Blob:Zp,Transaction:Xp,WriteBatch:eg,DocumentReference:zi,DocumentSnapshot:Sa,Query:Pu,QueryDocumentSnapshot:Ou,QuerySnapshot:md,CollectionReference:Ru,FieldPath:tg,FieldValue:jy,setLogLevel:function Vy(s){Ce.setLogLevel(s)},CACHE_SIZE_UNLIMITED:-1};!function Uy(s){s.INTERNAL.registerComponent(new f0.wA("firestore",function(c){return o=c.getProvider("app").getImmediate(),a=c.getProvider("auth-internal"),new Cs(o,new Kt(o,a),new Ly);var o,a},"PUBLIC").setServiceProps(Object.assign({},yd))),s.registerVersion("@firebase/firestore","2.4.0")}(qe.Z)},655:(Lo,Fr,St)=>{St.d(Fr,{ZT:()=>C,pi:()=>ve,mG:()=>Br,Jh:()=>q,XA:()=>ie,CR:()=>re,ev:()=>ft});var qe=function($,J){return(qe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Y,X){Y.__proto__=X}||function(Y,X){for(var fe in X)Object.prototype.hasOwnProperty.call(X,fe)&&(Y[fe]=X[fe])})($,J)};function C($,J){if("function"!=typeof J&&null!==J)throw new TypeError("Class extends value "+String(J)+" is not a constructor or null");function Y(){this.constructor=$}qe($,J),$.prototype=null===J?Object.create(J):(Y.prototype=J.prototype,new Y)}var ve=function(){return ve=Object.assign||function(J){for(var Y,X=1,fe=arguments.length;X<fe;X++)for(var se in Y=arguments[X])Object.prototype.hasOwnProperty.call(Y,se)&&(J[se]=Y[se]);return J},ve.apply(this,arguments)};function Br($,J,Y,X){return new(Y||(Y=Promise))(function(se,we){function dt(qt){try{Le(X.next(qt))}catch(Pe){we(Pe)}}function bt(qt){try{Le(X.throw(qt))}catch(Pe){we(Pe)}}function Le(qt){qt.done?se(qt.value):function fe(se){return se instanceof Y?se:new Y(function(we){we(se)})}(qt.value).then(dt,bt)}Le((X=X.apply($,J||[])).next())})}function q($,J){var X,fe,se,we,Y={label:0,sent:function(){if(1&se[0])throw se[1];return se[1]},trys:[],ops:[]};return we={next:dt(0),throw:dt(1),return:dt(2)},"function"==typeof Symbol&&(we[Symbol.iterator]=function(){return this}),we;function dt(Le){return function(qt){return function bt(Le){if(X)throw new TypeError("Generator is already executing.");for(;Y;)try{if(X=1,fe&&(se=2&Le[0]?fe.return:Le[0]?fe.throw||((se=fe.return)&&se.call(fe),0):fe.next)&&!(se=se.call(fe,Le[1])).done)return se;switch(fe=0,se&&(Le=[2&Le[0],se.value]),Le[0]){case 0:case 1:se=Le;break;case 4:return Y.label++,{value:Le[1],done:!1};case 5:Y.label++,fe=Le[1],Le=[0];continue;case 7:Le=Y.ops.pop(),Y.trys.pop();continue;default:if(!(se=(se=Y.trys).length>0&&se[se.length-1])&&(6===Le[0]||2===Le[0])){Y=0;continue}if(3===Le[0]&&(!se||Le[1]>se[0]&&Le[1]<se[3])){Y.label=Le[1];break}if(6===Le[0]&&Y.label<se[1]){Y.label=se[1],se=Le;break}if(se&&Y.label<se[2]){Y.label=se[2],Y.ops.push(Le);break}se[2]&&Y.ops.pop(),Y.trys.pop();continue}
1Le=J.call($,Y)}catch(qt){Le=[6,qt],fe=0}finally{X=se=0}if(5&Le[0])throw Le[1];return{value:Le[0]?Le[1]:void 0,done:!0}}([Le,qt])}}}function ie($){var J="function"==typeof Symbol&&Symbol.iterator,Y=J&&$[J],X=0;if(Y)return Y.call($);if($&&"number"==typeof $.length)return{next:function(){return $&&X>=$.length&&($=void 0),{value:$&&$[X++],done:!$}}};throw new TypeError(J?"Object is not iterable.":"Symbol.iterator is not defined.")}function re($,J){var Y="function"==typeof Symbol&&$[Symbol.iterator];if(!Y)return $;var fe,we,X=Y.call($),se=[];try{for(;(void 0===J||J-- >0)&&!(fe=X.next()).done;)se.push(fe.value)}catch(dt){we={error:dt}}finally{try{fe&&!fe.done&&(Y=X.return)&&Y.call(X)}finally{if(we)throw we.error}}return se}function ft($,J,Y){if(Y||2===arguments.length)for(var se,X=0,fe=J.length;X<fe;X++)(se||!(X in J))&&(se||(se=Array.prototype.slice.call(J,0,X)),se[X]=J[X]);return $.concat(se||Array.prototype.slice.call(J))}}},Lo=>{Lo(Lo.s=327)}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.