UNPKG

@google-cloud/firestore

Version:
1 lines 306 kB
(e=>{"function"==typeof define&&define.amd?define(["protobufjs/minimal"],e):"function"==typeof require&&"object"==typeof module&&module&&module.exports&&(module.exports=e(require("protobufjs/minimal")))})(function(r){var e,t,o,n,C,i=r.util,a=r.roots.firestore_v1||(r.roots.firestore_v1={});function V(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function L(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function U(e){if(this.queries=[],e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function B(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function J(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function Q(e){if(this.aggregateFields={},e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function M(e){if(this.fields={},e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function s(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function G(e){if(this.values=[],e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function q(e){if(this.fields={},e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function Y(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function W(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function z(e){if(this.fieldPaths=[],e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function H(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function K(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function X(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function Z(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function l(e,t,o){r.rpc.Service.call(this,e,t,o)}function $(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function u(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function ee(e){if(this.documents=[],e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function te(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function oe(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function re(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function p(e){if(this.documents=[],e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function ne(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function ie(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function ae(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function se(e){if(this.writes=[],e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function le(e){if(this.writeResults=[],e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function ue(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function c(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function g(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function f(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function pe(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function d(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function ce(e){if(this.partitions=[],e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function ge(e){if(this.writes=[],this.labels={},e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function fe(e){if(this.writeResults=[],e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function de(e){if(this.labels={},e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function y(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function m(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function ye(e){if(this.documents=[],e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function me(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function be(e){if(this.targetIds=[],e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function Oe(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function he(e){if(this.collectionIds=[],e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function ve(e){if(this.writes=[],this.labels={},e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function Te(e){if(this.writeResults=[],this.status=[],e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function b(e){if(this.from=[],this.orderBy=[],e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function Se(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function je(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function Ee(e){if(this.filters=[],e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function we(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function Ne(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function Pe(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function Re(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function De(e){if(this.fields=[],e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function O(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function Ie(e){if(this.aggregations=[],e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function h(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function Ae(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function ke(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function xe(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function Fe(e){if(this.values=[],e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function _e(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function Ce(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function Ve(e){if(this.indexesUsed=[],e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function Le(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function v(e){if(this.updateTransforms=[],e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function Ue(e){if(this.fieldTransforms=[],e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function T(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function Be(e){if(this.transformResults=[],e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function Je(e){if(this.targetIds=[],this.removedTargetIds=[],e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function Qe(e){if(this.removedTargetIds=[],e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function Me(e){if(this.removedTargetIds=[],e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function Ge(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function qe(e){if(this.rules=[],e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function S(e){if(this.additionalBindings=[],e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function Ye(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function We(e){if(this.destinations=[],e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function j(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function E(e){if(this.methodSettings=[],this.codeownerGithubTeams=[],this.librarySettings=[],e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function ze(e){if(this.serviceClassNames={},e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function He(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function Ke(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function Xe(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function Ze(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function $e(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function et(e){if(this.renamedServices={},this.renamedResources={},this.ignoredResources=[],this.forcedNamespaceAliases=[],this.handwrittenSignatures=[],e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function tt(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function ot(e){if(this.renamedServices={},e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function rt(e){if(this.autoPopulatedFields=[],e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function nt(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function it(e){if(this.methods=[],e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function w(e){if(this.pattern=[],this.style=[],e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function at(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function st(e){if(this.file=[],e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function N(e){if(this.dependency=[],this.publicDependency=[],this.weakDependency=[],this.messageType=[],this.enumType=[],this.service=[],this.extension=[],e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function P(e){if(this.field=[],this.extension=[],this.nestedType=[],this.enumType=[],this.extensionRange=[],this.oneofDecl=[],this.reservedRange=[],this.reservedName=[],e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function lt(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function ut(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function pt(e){if(this.uninterpretedOption=[],this.declaration=[],e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function ct(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function R(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function gt(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function ft(e){if(this.value=[],this.reservedRange=[],this.reservedName=[],e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function dt(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function yt(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function mt(e){if(this.method=[],e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function bt(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function D(e){if(this.uninterpretedOption=[],this[".google.api.resourceDefinition"]=[],e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function I(e){if(this.uninterpretedOption=[],e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function A(e){if(this.targets=[],this.editionDefaults=[],this.uninterpretedOption=[],this[".google.api.fieldBehavior"]=[],e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function Ot(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function ht(e){if(this.uninterpretedOption=[],e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function vt(e){if(this.uninterpretedOption=[],e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function Tt(e){if(this.uninterpretedOption=[],e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function St(e){if(this.uninterpretedOption=[],e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function k(e){if(this.uninterpretedOption=[],this[".google.api.methodSignature"]=[],e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function x(e){if(this.name=[],e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function jt(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function F(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function Et(e){if(this.defaults=[],e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function wt(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function Nt(e){if(this.location=[],e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function Pt(e){if(this.path=[],this.span=[],this.leadingDetachedComments=[],e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function Rt(e){if(this.annotation=[],e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function Dt(e){if(this.path=[],e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function It(e){if(this.fields={},e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function _(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function At(e){if(this.values=[],e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function kt(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function xt(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function Ft(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function _t(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function Ct(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function Vt(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function Lt(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function Ut(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function Bt(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function Jt(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function Qt(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function Mt(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function Gt(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function qt(e){if(this.paths=[],e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function Yt(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function Wt(e){if(this.details=[],e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function zt(e,t,o){r.rpc.Service.call(this,e,t,o)}function Ht(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function Kt(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function Xt(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function Zt(e){if(this.operations=[],e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function $t(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function eo(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function to(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}function oo(e){if(e)for(var t=Object.keys(e),o=0;o<t.length;++o)null!=e[t[o]]&&(this[t[o]]=e[t[o]])}return a.firestore=((o={}).BundledQuery=(V.prototype.parent="",V.prototype.structuredQuery=null,V.prototype.limitType=0,Object.defineProperty(V.prototype,"queryType",{get:i.oneOfGetter(t=["structuredQuery"]),set:i.oneOfSetter(t)}),V.fromObject=function(e){if(e instanceof a.firestore.BundledQuery)return e;var t=new a.firestore.BundledQuery;if(null!=e.parent&&(t.parent=String(e.parent)),null!=e.structuredQuery){if("object"!=typeof e.structuredQuery)throw TypeError(".firestore.BundledQuery.structuredQuery: object expected");t.structuredQuery=a.google.firestore.v1.StructuredQuery.fromObject(e.structuredQuery)}switch(e.limitType){default:"number"==typeof e.limitType&&(t.limitType=e.limitType);break;case"FIRST":case 0:t.limitType=0;break;case"LAST":case 1:t.limitType=1}return t},V.toObject=function(e,t){var o={};return(t=t||{}).defaults&&(o.parent="",o.limitType=t.enums===String?"FIRST":0),null!=e.parent&&e.hasOwnProperty("parent")&&(o.parent=e.parent),null!=e.structuredQuery&&e.hasOwnProperty("structuredQuery")&&(o.structuredQuery=a.google.firestore.v1.StructuredQuery.toObject(e.structuredQuery,t),t.oneofs)&&(o.queryType="structuredQuery"),null!=e.limitType&&e.hasOwnProperty("limitType")&&(o.limitType=t.enums!==String||void 0===a.firestore.BundledQuery.LimitType[e.limitType]?e.limitType:a.firestore.BundledQuery.LimitType[e.limitType]),o},V.prototype.toJSON=function(){return this.constructor.toObject(this,r.util.toJSONOptions)},V.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/firestore.BundledQuery"},V.LimitType=(t={},(C=Object.create(t))[t[0]="FIRST"]="FIRST",C[t[1]="LAST"]="LAST",C),V),o.NamedQuery=(L.prototype.name="",L.prototype.bundledQuery=null,L.prototype.readTime=null,L.fromObject=function(e){if(e instanceof a.firestore.NamedQuery)return e;var t=new a.firestore.NamedQuery;if(null!=e.name&&(t.name=String(e.name)),null!=e.bundledQuery){if("object"!=typeof e.bundledQuery)throw TypeError(".firestore.NamedQuery.bundledQuery: object expected");t.bundledQuery=a.firestore.BundledQuery.fromObject(e.bundledQuery)}if(null!=e.readTime){if("object"!=typeof e.readTime)throw TypeError(".firestore.NamedQuery.readTime: object expected");t.readTime=a.google.protobuf.Timestamp.fromObject(e.readTime)}return t},L.toObject=function(e,t){var o={};return(t=t||{}).defaults&&(o.name="",o.bundledQuery=null,o.readTime=null),null!=e.name&&e.hasOwnProperty("name")&&(o.name=e.name),null!=e.bundledQuery&&e.hasOwnProperty("bundledQuery")&&(o.bundledQuery=a.firestore.BundledQuery.toObject(e.bundledQuery,t)),null!=e.readTime&&e.hasOwnProperty("readTime")&&(o.readTime=a.google.protobuf.Timestamp.toObject(e.readTime,t)),o},L.prototype.toJSON=function(){return this.constructor.toObject(this,r.util.toJSONOptions)},L.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/firestore.NamedQuery"},L),o.BundledDocumentMetadata=(U.prototype.name="",U.prototype.readTime=null,U.prototype.exists=!1,U.prototype.queries=i.emptyArray,U.fromObject=function(e){if(e instanceof a.firestore.BundledDocumentMetadata)return e;var t=new a.firestore.BundledDocumentMetadata;if(null!=e.name&&(t.name=String(e.name)),null!=e.readTime){if("object"!=typeof e.readTime)throw TypeError(".firestore.BundledDocumentMetadata.readTime: object expected");t.readTime=a.google.protobuf.Timestamp.fromObject(e.readTime)}if(null!=e.exists&&(t.exists=Boolean(e.exists)),e.queries){if(!Array.isArray(e.queries))throw TypeError(".firestore.BundledDocumentMetadata.queries: array expected");t.queries=[];for(var o=0;o<e.queries.length;++o)t.queries[o]=String(e.queries[o])}return t},U.toObject=function(e,t){var o={};if(((t=t||{}).arrays||t.defaults)&&(o.queries=[]),t.defaults&&(o.name="",o.readTime=null,o.exists=!1),null!=e.name&&e.hasOwnProperty("name")&&(o.name=e.name),null!=e.readTime&&e.hasOwnProperty("readTime")&&(o.readTime=a.google.protobuf.Timestamp.toObject(e.readTime,t)),null!=e.exists&&e.hasOwnProperty("exists")&&(o.exists=e.exists),e.queries&&e.queries.length){o.queries=[];for(var r=0;r<e.queries.length;++r)o.queries[r]=e.queries[r]}return o},U.prototype.toJSON=function(){return this.constructor.toObject(this,r.util.toJSONOptions)},U.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/firestore.BundledDocumentMetadata"},U),o.BundleMetadata=(B.prototype.id="",B.prototype.createTime=null,B.prototype.version=0,B.prototype.totalDocuments=0,B.prototype.totalBytes=i.Long?i.Long.fromBits(0,0,!0):0,B.fromObject=function(e){if(e instanceof a.firestore.BundleMetadata)return e;var t=new a.firestore.BundleMetadata;if(null!=e.id&&(t.id=String(e.id)),null!=e.createTime){if("object"!=typeof e.createTime)throw TypeError(".firestore.BundleMetadata.createTime: object expected");t.createTime=a.google.protobuf.Timestamp.fromObject(e.createTime)}return null!=e.version&&(t.version=e.version>>>0),null!=e.totalDocuments&&(t.totalDocuments=e.totalDocuments>>>0),null!=e.totalBytes&&(i.Long?(t.totalBytes=i.Long.fromValue(e.totalBytes)).unsigned=!0:"string"==typeof e.totalBytes?t.totalBytes=parseInt(e.totalBytes,10):"number"==typeof e.totalBytes?t.totalBytes=e.totalBytes:"object"==typeof e.totalBytes&&(t.totalBytes=new i.LongBits(e.totalBytes.low>>>0,e.totalBytes.high>>>0).toNumber(!0))),t},B.toObject=function(e,t){var o,r={};return(t=t||{}).defaults&&(r.id="",r.createTime=null,r.version=0,r.totalDocuments=0,i.Long?(o=new i.Long(0,0,!0),r.totalBytes=t.longs===String?o.toString():t.longs===Number?o.toNumber():o):r.totalBytes=t.longs===String?"0":0),null!=e.id&&e.hasOwnProperty("id")&&(r.id=e.id),null!=e.createTime&&e.hasOwnProperty("createTime")&&(r.createTime=a.google.protobuf.Timestamp.toObject(e.createTime,t)),null!=e.version&&e.hasOwnProperty("version")&&(r.version=e.version),null!=e.totalDocuments&&e.hasOwnProperty("totalDocuments")&&(r.totalDocuments=e.totalDocuments),null!=e.totalBytes&&e.hasOwnProperty("totalBytes")&&("number"==typeof e.totalBytes?r.totalBytes=t.longs===String?String(e.totalBytes):e.totalBytes:r.totalBytes=t.longs===String?i.Long.prototype.toString.call(e.totalBytes):t.longs===Number?new i.LongBits(e.totalBytes.low>>>0,e.totalBytes.high>>>0).toNumber(!0):e.totalBytes),r},B.prototype.toJSON=function(){return this.constructor.toObject(this,r.util.toJSONOptions)},B.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/firestore.BundleMetadata"},B),o.BundleElement=(J.prototype.metadata=null,J.prototype.namedQuery=null,J.prototype.documentMetadata=null,J.prototype.document=null,Object.defineProperty(J.prototype,"elementType",{get:i.oneOfGetter(t=["metadata","namedQuery","documentMetadata","document"]),set:i.oneOfSetter(t)}),J.fromObject=function(e){if(e instanceof a.firestore.BundleElement)return e;var t=new a.firestore.BundleElement;if(null!=e.metadata){if("object"!=typeof e.metadata)throw TypeError(".firestore.BundleElement.metadata: object expected");t.metadata=a.firestore.BundleMetadata.fromObject(e.metadata)}if(null!=e.namedQuery){if("object"!=typeof e.namedQuery)throw TypeError(".firestore.BundleElement.namedQuery: object expected");t.namedQuery=a.firestore.NamedQuery.fromObject(e.namedQuery)}if(null!=e.documentMetadata){if("object"!=typeof e.documentMetadata)throw TypeError(".firestore.BundleElement.documentMetadata: object expected");t.documentMetadata=a.firestore.BundledDocumentMetadata.fromObject(e.documentMetadata)}if(null!=e.document){if("object"!=typeof e.document)throw TypeError(".firestore.BundleElement.document: object expected");t.document=a.google.firestore.v1.Document.fromObject(e.document)}return t},J.toObject=function(e,t){t=t||{};var o={};return null!=e.metadata&&e.hasOwnProperty("metadata")&&(o.metadata=a.firestore.BundleMetadata.toObject(e.metadata,t),t.oneofs)&&(o.elementType="metadata"),null!=e.namedQuery&&e.hasOwnProperty("namedQuery")&&(o.namedQuery=a.firestore.NamedQuery.toObject(e.namedQuery,t),t.oneofs)&&(o.elementType="namedQuery"),null!=e.documentMetadata&&e.hasOwnProperty("documentMetadata")&&(o.documentMetadata=a.firestore.BundledDocumentMetadata.toObject(e.documentMetadata,t),t.oneofs)&&(o.elementType="documentMetadata"),null!=e.document&&e.hasOwnProperty("document")&&(o.document=a.google.firestore.v1.Document.toObject(e.document,t),t.oneofs)&&(o.elementType="document"),o},J.prototype.toJSON=function(){return this.constructor.toObject(this,r.util.toJSONOptions)},J.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/firestore.BundleElement"},J),o),a.google=((C={}).firestore=((t={}).v1=((o={}).AggregationResult=(Q.prototype.aggregateFields=i.emptyObject,Q.fromObject=function(e){if(e instanceof a.google.firestore.v1.AggregationResult)return e;var t=new a.google.firestore.v1.AggregationResult;if(e.aggregateFields){if("object"!=typeof e.aggregateFields)throw TypeError(".google.firestore.v1.AggregationResult.aggregateFields: object expected");t.aggregateFields={};for(var o=Object.keys(e.aggregateFields),r=0;r<o.length;++r){if("object"!=typeof e.aggregateFields[o[r]])throw TypeError(".google.firestore.v1.AggregationResult.aggregateFields: object expected");t.aggregateFields[o[r]]=a.google.firestore.v1.Value.fromObject(e.aggregateFields[o[r]])}}return t},Q.toObject=function(e,t){var o,r={};if(((t=t||{}).objects||t.defaults)&&(r.aggregateFields={}),e.aggregateFields&&(o=Object.keys(e.aggregateFields)).length){r.aggregateFields={};for(var n=0;n<o.length;++n)r.aggregateFields[o[n]]=a.google.firestore.v1.Value.toObject(e.aggregateFields[o[n]],t)}return r},Q.prototype.toJSON=function(){return this.constructor.toObject(this,r.util.toJSONOptions)},Q.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.AggregationResult"},Q),o.Document=(M.prototype.name="",M.prototype.fields=i.emptyObject,M.prototype.createTime=null,M.prototype.updateTime=null,M.fromObject=function(e){if(e instanceof a.google.firestore.v1.Document)return e;var t=new a.google.firestore.v1.Document;if(null!=e.name&&(t.name=String(e.name)),e.fields){if("object"!=typeof e.fields)throw TypeError(".google.firestore.v1.Document.fields: object expected");t.fields={};for(var o=Object.keys(e.fields),r=0;r<o.length;++r){if("object"!=typeof e.fields[o[r]])throw TypeError(".google.firestore.v1.Document.fields: object expected");t.fields[o[r]]=a.google.firestore.v1.Value.fromObject(e.fields[o[r]])}}if(null!=e.createTime){if("object"!=typeof e.createTime)throw TypeError(".google.firestore.v1.Document.createTime: object expected");t.createTime=a.google.protobuf.Timestamp.fromObject(e.createTime)}if(null!=e.updateTime){if("object"!=typeof e.updateTime)throw TypeError(".google.firestore.v1.Document.updateTime: object expected");t.updateTime=a.google.protobuf.Timestamp.fromObject(e.updateTime)}return t},M.toObject=function(e,t){var o,r={};if(((t=t||{}).objects||t.defaults)&&(r.fields={}),t.defaults&&(r.name="",r.createTime=null,r.updateTime=null),null!=e.name&&e.hasOwnProperty("name")&&(r.name=e.name),e.fields&&(o=Object.keys(e.fields)).length){r.fields={};for(var n=0;n<o.length;++n)r.fields[o[n]]=a.google.firestore.v1.Value.toObject(e.fields[o[n]],t)}return null!=e.createTime&&e.hasOwnProperty("createTime")&&(r.createTime=a.google.protobuf.Timestamp.toObject(e.createTime,t)),null!=e.updateTime&&e.hasOwnProperty("updateTime")&&(r.updateTime=a.google.protobuf.Timestamp.toObject(e.updateTime,t)),r},M.prototype.toJSON=function(){return this.constructor.toObject(this,r.util.toJSONOptions)},M.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.Document"},M),o.Value=(s.prototype.nullValue=null,s.prototype.booleanValue=null,s.prototype.integerValue=null,s.prototype.doubleValue=null,s.prototype.timestampValue=null,s.prototype.stringValue=null,s.prototype.bytesValue=null,s.prototype.referenceValue=null,s.prototype.geoPointValue=null,s.prototype.arrayValue=null,s.prototype.mapValue=null,Object.defineProperty(s.prototype,"valueType",{get:i.oneOfGetter(n=["nullValue","booleanValue","integerValue","doubleValue","timestampValue","stringValue","bytesValue","referenceValue","geoPointValue","arrayValue","mapValue"]),set:i.oneOfSetter(n)}),s.fromObject=function(e){if(e instanceof a.google.firestore.v1.Value)return e;var t=new a.google.firestore.v1.Value;switch(e.nullValue){default:"number"==typeof e.nullValue&&(t.nullValue=e.nullValue);break;case"NULL_VALUE":case 0:t.nullValue=0}if(null!=e.booleanValue&&(t.booleanValue=Boolean(e.booleanValue)),null!=e.integerValue&&(i.Long?(t.integerValue=i.Long.fromValue(e.integerValue)).unsigned=!1:"string"==typeof e.integerValue?t.integerValue=parseInt(e.integerValue,10):"number"==typeof e.integerValue?t.integerValue=e.integerValue:"object"==typeof e.integerValue&&(t.integerValue=new i.LongBits(e.integerValue.low>>>0,e.integerValue.high>>>0).toNumber())),null!=e.doubleValue&&(t.doubleValue=Number(e.doubleValue)),null!=e.timestampValue){if("object"!=typeof e.timestampValue)throw TypeError(".google.firestore.v1.Value.timestampValue: object expected");t.timestampValue=a.google.protobuf.Timestamp.fromObject(e.timestampValue)}if(null!=e.stringValue&&(t.stringValue=String(e.stringValue)),null!=e.bytesValue&&("string"==typeof e.bytesValue?i.base64.decode(e.bytesValue,t.bytesValue=i.newBuffer(i.base64.length(e.bytesValue)),0):0<=e.bytesValue.length&&(t.bytesValue=e.bytesValue)),null!=e.referenceValue&&(t.referenceValue=String(e.referenceValue)),null!=e.geoPointValue){if("object"!=typeof e.geoPointValue)throw TypeError(".google.firestore.v1.Value.geoPointValue: object expected");t.geoPointValue=a.google.type.LatLng.fromObject(e.geoPointValue)}if(null!=e.arrayValue){if("object"!=typeof e.arrayValue)throw TypeError(".google.firestore.v1.Value.arrayValue: object expected");t.arrayValue=a.google.firestore.v1.ArrayValue.fromObject(e.arrayValue)}if(null!=e.mapValue){if("object"!=typeof e.mapValue)throw TypeError(".google.firestore.v1.Value.mapValue: object expected");t.mapValue=a.google.firestore.v1.MapValue.fromObject(e.mapValue)}return t},s.toObject=function(e,t){t=t||{};var o={};return null!=e.booleanValue&&e.hasOwnProperty("booleanValue")&&(o.booleanValue=e.booleanValue,t.oneofs)&&(o.valueType="booleanValue"),null!=e.integerValue&&e.hasOwnProperty("integerValue")&&("number"==typeof e.integerValue?o.integerValue=t.longs===String?String(e.integerValue):e.integerValue:o.integerValue=t.longs===String?i.Long.prototype.toString.call(e.integerValue):t.longs===Number?new i.LongBits(e.integerValue.low>>>0,e.integerValue.high>>>0).toNumber():e.integerValue,t.oneofs)&&(o.valueType="integerValue"),null!=e.doubleValue&&e.hasOwnProperty("doubleValue")&&(o.doubleValue=t.json&&!isFinite(e.doubleValue)?String(e.doubleValue):e.doubleValue,t.oneofs)&&(o.valueType="doubleValue"),null!=e.referenceValue&&e.hasOwnProperty("referenceValue")&&(o.referenceValue=e.referenceValue,t.oneofs)&&(o.valueType="referenceValue"),null!=e.mapValue&&e.hasOwnProperty("mapValue")&&(o.mapValue=a.google.firestore.v1.MapValue.toObject(e.mapValue,t),t.oneofs)&&(o.valueType="mapValue"),null!=e.geoPointValue&&e.hasOwnProperty("geoPointValue")&&(o.geoPointValue=a.google.type.LatLng.toObject(e.geoPointValue,t),t.oneofs)&&(o.valueType="geoPointValue"),null!=e.arrayValue&&e.hasOwnProperty("arrayValue")&&(o.arrayValue=a.google.firestore.v1.ArrayValue.toObject(e.arrayValue,t),t.oneofs)&&(o.valueType="arrayValue"),null!=e.timestampValue&&e.hasOwnProperty("timestampValue")&&(o.timestampValue=a.google.protobuf.Timestamp.toObject(e.timestampValue,t),t.oneofs)&&(o.valueType="timestampValue"),null!=e.nullValue&&e.hasOwnProperty("nullValue")&&(o.nullValue=t.enums!==String||void 0===a.google.protobuf.NullValue[e.nullValue]?e.nullValue:a.google.protobuf.NullValue[e.nullValue],t.oneofs)&&(o.valueType="nullValue"),null!=e.stringValue&&e.hasOwnProperty("stringValue")&&(o.stringValue=e.stringValue,t.oneofs)&&(o.valueType="stringValue"),null!=e.bytesValue&&e.hasOwnProperty("bytesValue")&&(o.bytesValue=t.bytes===String?i.base64.encode(e.bytesValue,0,e.bytesValue.length):t.bytes===Array?Array.prototype.slice.call(e.bytesValue):e.bytesValue,t.oneofs)&&(o.valueType="bytesValue"),o},s.prototype.toJSON=function(){return this.constructor.toObject(this,r.util.toJSONOptions)},s.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.Value"},s),o.ArrayValue=(G.prototype.values=i.emptyArray,G.fromObject=function(e){if(e instanceof a.google.firestore.v1.ArrayValue)return e;var t=new a.google.firestore.v1.ArrayValue;if(e.values){if(!Array.isArray(e.values))throw TypeError(".google.firestore.v1.ArrayValue.values: array expected");t.values=[];for(var o=0;o<e.values.length;++o){if("object"!=typeof e.values[o])throw TypeError(".google.firestore.v1.ArrayValue.values: object expected");t.values[o]=a.google.firestore.v1.Value.fromObject(e.values[o])}}return t},G.toObject=function(e,t){var o={};if(((t=t||{}).arrays||t.defaults)&&(o.values=[]),e.values&&e.values.length){o.values=[];for(var r=0;r<e.values.length;++r)o.values[r]=a.google.firestore.v1.Value.toObject(e.values[r],t)}return o},G.prototype.toJSON=function(){return this.constructor.toObject(this,r.util.toJSONOptions)},G.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.ArrayValue"},G),o.MapValue=(q.prototype.fields=i.emptyObject,q.fromObject=function(e){if(e instanceof a.google.firestore.v1.MapValue)return e;var t=new a.google.firestore.v1.MapValue;if(e.fields){if("object"!=typeof e.fields)throw TypeError(".google.firestore.v1.MapValue.fields: object expected");t.fields={};for(var o=Object.keys(e.fields),r=0;r<o.length;++r){if("object"!=typeof e.fields[o[r]])throw TypeError(".google.firestore.v1.MapValue.fields: object expected");t.fields[o[r]]=a.google.firestore.v1.Value.fromObject(e.fields[o[r]])}}return t},q.toObject=function(e,t){var o,r={};if(((t=t||{}).objects||t.defaults)&&(r.fields={}),e.fields&&(o=Object.keys(e.fields)).length){r.fields={};for(var n=0;n<o.length;++n)r.fields[o[n]]=a.google.firestore.v1.Value.toObject(e.fields[o[n]],t)}return r},q.prototype.toJSON=function(){return this.constructor.toObject(this,r.util.toJSONOptions)},q.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.MapValue"},q),o.BitSequence=(Y.prototype.bitmap=i.newBuffer([]),Y.prototype.padding=0,Y.fromObject=function(e){var t;return e instanceof a.google.firestore.v1.BitSequence?e:(t=new a.google.firestore.v1.BitSequence,null!=e.bitmap&&("string"==typeof e.bitmap?i.base64.decode(e.bitmap,t.bitmap=i.newBuffer(i.base64.length(e.bitmap)),0):0<=e.bitmap.length&&(t.bitmap=e.bitmap)),null!=e.padding&&(t.padding=0|e.padding),t)},Y.toObject=function(e,t){var o={};return(t=t||{}).defaults&&(t.bytes===String?o.bitmap="":(o.bitmap=[],t.bytes!==Array&&(o.bitmap=i.newBuffer(o.bitmap))),o.padding=0),null!=e.bitmap&&e.hasOwnProperty("bitmap")&&(o.bitmap=t.bytes===String?i.base64.encode(e.bitmap,0,e.bitmap.length):t.bytes===Array?Array.prototype.slice.call(e.bitmap):e.bitmap),null!=e.padding&&e.hasOwnProperty("padding")&&(o.padding=e.padding),o},Y.prototype.toJSON=function(){return this.constructor.toObject(this,r.util.toJSONOptions)},Y.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.BitSequence"},Y),o.BloomFilter=(W.prototype.bits=null,W.prototype.hashCount=0,W.fromObject=function(e){if(e instanceof a.google.firestore.v1.BloomFilter)return e;var t=new a.google.firestore.v1.BloomFilter;if(null!=e.bits){if("object"!=typeof e.bits)throw TypeError(".google.firestore.v1.BloomFilter.bits: object expected");t.bits=a.google.firestore.v1.BitSequence.fromObject(e.bits)}return null!=e.hashCount&&(t.hashCount=0|e.hashCount),t},W.toObject=function(e,t){var o={};return(t=t||{}).defaults&&(o.bits=null,o.hashCount=0),null!=e.bits&&e.hasOwnProperty("bits")&&(o.bits=a.google.firestore.v1.BitSequence.toObject(e.bits,t)),null!=e.hashCount&&e.hasOwnProperty("hashCount")&&(o.hashCount=e.hashCount),o},W.prototype.toJSON=function(){return this.constructor.toObject(this,r.util.toJSONOptions)},W.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.BloomFilter"},W),o.DocumentMask=(z.prototype.fieldPaths=i.emptyArray,z.fromObject=function(e){if(e instanceof a.google.firestore.v1.DocumentMask)return e;var t=new a.google.firestore.v1.DocumentMask;if(e.fieldPaths){if(!Array.isArray(e.fieldPaths))throw TypeError(".google.firestore.v1.DocumentMask.fieldPaths: array expected");t.fieldPaths=[];for(var o=0;o<e.fieldPaths.length;++o)t.fieldPaths[o]=String(e.fieldPaths[o])}return t},z.toObject=function(e,t){var o={};if(((t=t||{}).arrays||t.defaults)&&(o.fieldPaths=[]),e.fieldPaths&&e.fieldPaths.length){o.fieldPaths=[];for(var r=0;r<e.fieldPaths.length;++r)o.fieldPaths[r]=e.fieldPaths[r]}return o},z.prototype.toJSON=function(){return this.constructor.toObject(this,r.util.toJSONOptions)},z.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.DocumentMask"},z),o.Precondition=(H.prototype.exists=null,H.prototype.updateTime=null,Object.defineProperty(H.prototype,"conditionType",{get:i.oneOfGetter(n=["exists","updateTime"]),set:i.oneOfSetter(n)}),H.fromObject=function(e){if(e instanceof a.google.firestore.v1.Precondition)return e;var t=new a.google.firestore.v1.Precondition;if(null!=e.exists&&(t.exists=Boolean(e.exists)),null!=e.updateTime){if("object"!=typeof e.updateTime)throw TypeError(".google.firestore.v1.Precondition.updateTime: object expected");t.updateTime=a.google.protobuf.Timestamp.fromObject(e.updateTime)}return t},H.toObject=function(e,t){t=t||{};var o={};return null!=e.exists&&e.hasOwnProperty("exists")&&(o.exists=e.exists,t.oneofs)&&(o.conditionType="exists"),null!=e.updateTime&&e.hasOwnProperty("updateTime")&&(o.updateTime=a.google.protobuf.Timestamp.toObject(e.updateTime,t),t.oneofs)&&(o.conditionType="updateTime"),o},H.prototype.toJSON=function(){return this.constructor.toObject(this,r.util.toJSONOptions)},H.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.Precondition"},H),o.TransactionOptions=(K.prototype.readOnly=null,K.prototype.readWrite=null,Object.defineProperty(K.prototype,"mode",{get:i.oneOfGetter(n=["readOnly","readWrite"]),set:i.oneOfSetter(n)}),K.fromObject=function(e){if(e instanceof a.google.firestore.v1.TransactionOptions)return e;var t=new a.google.firestore.v1.TransactionOptions;if(null!=e.readOnly){if("object"!=typeof e.readOnly)throw TypeError(".google.firestore.v1.TransactionOptions.readOnly: object expected");t.readOnly=a.google.firestore.v1.TransactionOptions.ReadOnly.fromObject(e.readOnly)}if(null!=e.readWrite){if("object"!=typeof e.readWrite)throw TypeError(".google.firestore.v1.TransactionOptions.readWrite: object expected");t.readWrite=a.google.firestore.v1.TransactionOptions.ReadWrite.fromObject(e.readWrite)}return t},K.toObject=function(e,t){t=t||{};var o={};return null!=e.readOnly&&e.hasOwnProperty("readOnly")&&(o.readOnly=a.google.firestore.v1.TransactionOptions.ReadOnly.toObject(e.readOnly,t),t.oneofs)&&(o.mode="readOnly"),null!=e.readWrite&&e.hasOwnProperty("readWrite")&&(o.readWrite=a.google.firestore.v1.TransactionOptions.ReadWrite.toObject(e.readWrite,t),t.oneofs)&&(o.mode="readWrite"),o},K.prototype.toJSON=function(){return this.constructor.toObject(this,r.util.toJSONOptions)},K.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.TransactionOptions"},K.ReadWrite=(X.prototype.retryTransaction=i.newBuffer([]),X.fromObject=function(e){var t;return e instanceof a.google.firestore.v1.TransactionOptions.ReadWrite?e:(t=new a.google.firestore.v1.TransactionOptions.ReadWrite,null!=e.retryTransaction&&("string"==typeof e.retryTransaction?i.base64.decode(e.retryTransaction,t.retryTransaction=i.newBuffer(i.base64.length(e.retryTransaction)),0):0<=e.retryTransaction.length&&(t.retryTransaction=e.retryTransaction)),t)},X.toObject=function(e,t){var o={};return(t=t||{}).defaults&&(t.bytes===String?o.retryTransaction="":(o.retryTransaction=[],t.bytes!==Array&&(o.retryTransaction=i.newBuffer(o.retryTransaction)))),null!=e.retryTransaction&&e.hasOwnProperty("retryTransaction")&&(o.retryTransaction=t.bytes===String?i.base64.encode(e.retryTransaction,0,e.retryTransaction.length):t.bytes===Array?Array.prototype.slice.call(e.retryTransaction):e.retryTransaction),o},X.prototype.toJSON=function(){return this.constructor.toObject(this,r.util.toJSONOptions)},X.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.TransactionOptions.ReadWrite"},X),K.ReadOnly=(Z.prototype.readTime=null,Object.defineProperty(Z.prototype,"consistencySelector",{get:i.oneOfGetter(n=["readTime"]),set:i.oneOfSetter(n)}),Z.fromObject=function(e){if(e instanceof a.google.firestore.v1.TransactionOptions.ReadOnly)return e;var t=new a.google.firestore.v1.TransactionOptions.ReadOnly;if(null!=e.readTime){if("object"!=typeof e.readTime)throw TypeError(".google.firestore.v1.TransactionOptions.ReadOnly.readTime: object expected");t.readTime=a.google.protobuf.Timestamp.fromObject(e.readTime)}return t},Z.toObject=function(e,t){t=t||{};var o={};return null!=e.readTime&&e.hasOwnProperty("readTime")&&(o.readTime=a.google.protobuf.Timestamp.toObject(e.readTime,t),t.oneofs)&&(o.consistencySelector="readTime"),o},Z.prototype.toJSON=function(){return this.constructor.toObject(this,r.util.toJSONOptions)},Z.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.TransactionOptions.ReadOnly"},Z),K),o.Firestore=((l.prototype=Object.create(r.rpc.Service.prototype)).constructor=l,Object.defineProperty(l.prototype.getDocument=function e(t,o){return this.rpcCall(e,a.google.firestore.v1.GetDocumentRequest,a.google.firestore.v1.Document,t,o)},"name",{value:"GetDocument"}),Object.defineProperty(l.prototype.listDocuments=function e(t,o){return this.rpcCall(e,a.google.firestore.v1.ListDocumentsRequest,a.google.firestore.v1.ListDocumentsResponse,t,o)},"name",{value:"ListDocuments"}),Object.defineProperty(l.prototype.updateDocument=function e(t,o){return this.rpcCall(e,a.google.firestore.v1.UpdateDocumentRequest,a.google.firestore.v1.Document,t,o)},"name",{value:"UpdateDocument"}),Object.defineProperty(l.prototype.deleteDocument=function e(t,o){return this.rpcCall(e,a.google.firestore.v1.DeleteDocumentRequest,a.google.protobuf.Empty,t,o)},"name",{value:"DeleteDocument"}),Object.defineProperty(l.prototype.batchGetDocuments=function e(t,o){return this.rpcCall(e,a.google.firestore.v1.BatchGetDocumentsRequest,a.google.firestore.v1.BatchGetDocumentsResponse,t,o)},"name",{value:"BatchGetDocuments"}),Object.defineProperty(l.prototype.beginTransaction=function e(t,o){return this.rpcCall(e,a.google.firestore.v1.BeginTransactionRequest,a.google.firestore.v1.BeginTransactionResponse,t,o)},"name",{value:"BeginTransaction"}),Object.defineProperty(l.prototype.commit=function e(t,o){return this.rpcCall(e,a.google.firestore.v1.CommitRequest,a.google.firestore.v1.CommitResponse,t,o)},"name",{value:"Commit"}),Object.defineProperty(l.prototype.rollback=function e(t,o){return this.rpcCall(e,a.google.firestore.v1.RollbackRequest,a.google.protobuf.Empty,t,o)},"name",{value:"Rollback"}),Object.defineProperty(l.prototype.runQuery=function e(t,o){return this.rpcCall(e,a.google.firestore.v1.RunQueryRequest,a.google.firestore.v1.RunQueryResponse,t,o)},"name",{value:"RunQuery"}),Object.defineProperty(l.prototype.runAggregationQuery=function e(t,o){return this.rpcCall(e,a.google.firestore.v1.RunAggregationQueryRequest,a.google.firestore.v1.RunAggregationQueryResponse,t,o)},"name",{value:"RunAggregationQuery"}),Object.defineProperty(l.prototype.partitionQuery=function e(t,o){return this.rpcCall(e,a.google.firestore.v1.PartitionQueryRequest,a.google.firestore.v1.PartitionQueryResponse,t,o)},"name",{value:"PartitionQuery"}),Object.defineProperty(l.prototype.write=function e(t,o){return this.rpcCall(e,a.google.firestore.v1.WriteRequest,a.google.firestore.v1.WriteResponse,t,o)},"name",{value:"Write"}),Object.defineProperty(l.prototype.listen=function e(t,o){return this.rpcCall(e,a.google.firestore.v1.ListenRequest,a.google.firestore.v1.ListenResponse,t,o)},"name",{value:"Listen"}),Object.defineProperty(l.prototype.listCollectionIds=function e(t,o){return this.rpcCall(e,a.google.firestore.v1.ListCollectionIdsRequest,a.google.firestore.v1.ListCollectionIdsResponse,t,o)},"name",{value:"ListCollectionIds"}),Object.defineProperty(l.prototype.batchWrite=function e(t,o){return this.rpcCall(e,a.google.firestore.v1.BatchWriteRequest,a.google.firestore.v1.BatchWriteResponse,t,o)},"name",{value:"BatchWrite"}),Object.defineProperty(l.prototype.createDocument=function e(t,o){return this.rpcCall(e,a.google.firestore.v1.CreateDocumentRequest,a.google.firestore.v1.Document,t,o)},"name",{value:"CreateDocument"}),l),o.GetDocumentRequest=($.prototype.name="",$.prototype.mask=null,$.prototype.transaction=null,$.prototype.readTime=null,Object.defineProperty($.prototype,"consistencySelector",{get:i.oneOfGetter(n=["transaction","readTime"]),set:i.oneOfSetter(n)}),$.fromObject=function(e){if(e instanceof a.google.firestore.v1.GetDocumentRequest)return e;var t=new a.google.firestore.v1.GetDocumentRequest;if(null!=e.name&&(t.name=String(e.name)),null!=e.mask){if("object"!=typeof e.mask)throw TypeError(".google.firestore.v1.GetDocumentRequest.mask: object expected");t.mask=a.google.firestore.v1.DocumentMask.fromObject(e.mask)}if(null!=e.transaction&&("string"==typeof e.transaction?i.base64.decode(e.transaction,t.transaction=i.newBuffer(i.base64.length(e.transaction)),0):0<=e.transaction.length&&(t.transaction=e.transaction)),null!=e.readTime){if("object"!=typeof e.readTime)throw TypeError(".google.firestore.v1.GetDocumentRequest.readTime: object expected");t.readTime=a.google.protobuf.Timestamp.fromObject(e.readTime)}return t},$.toObject=function(e,t){var o={};return(t=t||{}).defaults&&(o.name="",o.mask=null),null!=e.name&&e.hasOwnProperty("name")&&(o.name=e.name),null!=e.mask&&e.hasOwnProperty("mask")&&(o.mask=a.google.firestore.v1.DocumentMask.toObject(e.mask,t)),null!=e.transaction&&e.hasOwnProperty("transaction")&&(o.transaction=t.bytes===String?i.base64.encode(e.transaction,0,e.transaction.length):t.bytes===Array?Array.prototype.slice.call(e.transaction):e.transaction,t.oneofs)&&(o.consistencySelector="transaction"),null!=e.readTime&&e.hasOwnProperty("readTime")&&(o.readTime=a.google.protobuf.Timestamp.toObject(e.readTime,t),t.oneofs)&&(o.consistencySelector="readTime"),o},$.prototype.toJSON=function(){return this.constructor.toObject(this,r.util.toJSONOptions)},$.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.GetDocumentRequest"},$),o.ListDocumentsRequest=(u.prototype.parent="",u.prototype.collectionId="",u.prototype.pageSize=0,u.prototype.pageToken="",u.prototype.orderBy="",u.prototype.mask=null,u.prototype.transaction=null,u.prototype.readTime=null,u.prototype.showMissing=!1,Object.defineProperty(u.prototype,"consistencySelector",{get:i.oneOfGetter(n=["transaction","readTime"]),set:i.oneOfSetter(n)}),u.fromObject=function(e){if(e instanceof a.google.firestore.v1.ListDocumentsRequest)return e;var t=new a.google.firestore.v1.ListDocumentsRequest;if(null!=e.parent&&(t.parent=String(e.parent)),null!=e.collectionId&&(t.collectionId=String(e.collectionId)),null!=e.pageSize&&(t.pageSize=0|e.pageSize),null!=e.pageToken&&(t.pageToken=String(e.pageToken)),null!=e.orderBy&&(t.orderBy=String(e.orderBy)),null!=e.mask){if("object"!=typeof e.mask)throw TypeError(".google.firestore.v1.ListDocumentsRequest.mask: object expected");t.mask=a.google.firestore.v1.DocumentMask.fromObject(e.mask)}if(null!=e.transaction&&("string"==typeof e.transaction?i.base64.decode(e.transaction,t.transaction=i.newBuffer(i.base64.length(e.transaction)),0):0<=e.transaction.length&&(t.transaction=e.transaction)),null!=e.readTime){if("object"!=typeof e.readTime)throw TypeError(".google.firestore.v1.ListDocumentsRequest.readTime: object expected");t.readTime=a.google.protobuf.Timestamp.fromObject(e.readTime)}r