@ckeditor/ckeditor5-real-time-collaboration 41.2.0 → 41.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,4 +2,4 @@
2
2
  /*!
3
3
  * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
4
4
  * For licensing, see LICENSE.md.
5
- */(()=>{var __webpack_modules__={8934:(e,t,n)=>{"use strict";e.exports=n(8577)},8577:(e,t,n)=>{"use strict";var r=t;function s(){r.util._configure(),r.Writer._configure(r.BufferWriter),r.Reader._configure(r.BufferReader)}r.build="minimal",r.Writer=n(4196),r.BufferWriter=n(341),r.Reader=n(6040),r.BufferReader=n(9385),r.util=n(8107),r.rpc=n(7352),r.roots=n(5042),r.configure=s,s()},6040:(e,t,n)=>{"use strict";e.exports=c;var r,s=n(8107),o=s.LongBits,i=s.utf8;function a(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function c(e){this.buf=e,this.pos=0,this.len=e.length}var u,d="undefined"!=typeof Uint8Array?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new c(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new c(e);throw Error("illegal buffer")},l=function(){return s.Buffer?function(e){return(c.create=function(e){return s.Buffer.isBuffer(e)?new r(e):d(e)})(e)}:d};function p(){var e=new o(0,0),t=0;if(!(this.len-this.pos>4)){for(;t<3;++t){if(this.pos>=this.len)throw a(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(127&this.buf[this.pos++])<<7*t)>>>0,e}for(;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e;if(t=0,this.len-this.pos>4){for(;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw a(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function h(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function f(){if(this.pos+8>this.len)throw a(this,8);return new o(h(this.buf,this.pos+=4),h(this.buf,this.pos+=4))}c.create=l(),c.prototype._slice=s.Array.prototype.subarray||s.Array.prototype.slice,c.prototype.uint32=(u=4294967295,function(){if(u=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return u;if((this.pos+=5)>this.len)throw this.pos=this.len,a(this,10);return u}),c.prototype.int32=function(){return 0|this.uint32()},c.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)|0},c.prototype.bool=function(){return 0!==this.uint32()},c.prototype.fixed32=function(){if(this.pos+4>this.len)throw a(this,4);return h(this.buf,this.pos+=4)},c.prototype.sfixed32=function(){if(this.pos+4>this.len)throw a(this,4);return 0|h(this.buf,this.pos+=4)},c.prototype.float=function(){if(this.pos+4>this.len)throw a(this,4);var e=s.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},c.prototype.double=function(){if(this.pos+8>this.len)throw a(this,4);var e=s.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},c.prototype.bytes=function(){var e=this.uint32(),t=this.pos,n=this.pos+e;if(n>this.len)throw a(this,e);if(this.pos+=e,Array.isArray(this.buf))return this.buf.slice(t,n);if(t===n){var r=s.Buffer;return r?r.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,t,n)},c.prototype.string=function(){var e=this.bytes();return i.read(e,0,e.length)},c.prototype.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw a(this,e);this.pos+=e}else do{if(this.pos>=this.len)throw a(this)}while(128&this.buf[this.pos++]);return this},c.prototype.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(e=7&this.uint32());)this.skipType(e);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},c._configure=function(e){r=e,c.create=l(),r._configure();var t=s.Long?"toLong":"toNumber";s.merge(c.prototype,{int64:function(){return p.call(this)[t](!1)},uint64:function(){return p.call(this)[t](!0)},sint64:function(){return p.call(this).zzDecode()[t](!1)},fixed64:function(){return f.call(this)[t](!0)},sfixed64:function(){return f.call(this)[t](!1)}})}},9385:(e,t,n)=>{"use strict";e.exports=o;var r=n(6040);(o.prototype=Object.create(r.prototype)).constructor=o;var s=n(8107);function o(e){r.call(this,e)}o._configure=function(){s.Buffer&&(o.prototype._slice=s.Buffer.prototype.slice)},o.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+e,this.len))},o._configure()},5042:e=>{"use strict";e.exports={}},7352:(e,t,n)=>{"use strict";t.Service=n(756)},756:(e,t,n)=>{"use strict";e.exports=s;var r=n(8107);function s(e,t,n){if("function"!=typeof e)throw TypeError("rpcImpl must be a function");r.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=Boolean(t),this.responseDelimited=Boolean(n)}(s.prototype=Object.create(r.EventEmitter.prototype)).constructor=s,s.prototype.rpcCall=function e(t,n,s,o,i){if(!o)throw TypeError("request must be specified");var a=this;if(!i)return r.asPromise(e,a,t,n,s,o);if(a.rpcImpl)try{return a.rpcImpl(t,n[a.requestDelimited?"encodeDelimited":"encode"](o).finish(),(function(e,n){if(e)return a.emit("error",e,t),i(e);if(null!==n){if(!(n instanceof s))try{n=s[a.responseDelimited?"decodeDelimited":"decode"](n)}catch(e){return a.emit("error",e,t),i(e)}return a.emit("data",n,t),i(null,n)}a.end(!0)}))}catch(e){return a.emit("error",e,t),void setTimeout((function(){i(e)}),0)}else setTimeout((function(){i(Error("already ended"))}),0)},s.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},2576:(e,t,n)=>{"use strict";e.exports=s;var r=n(8107);function s(e,t){this.lo=e>>>0,this.hi=t>>>0}var o=s.zero=new s(0,0);o.toNumber=function(){return 0},o.zzEncode=o.zzDecode=function(){return this},o.length=function(){return 1};var i=s.zeroHash="\0\0\0\0\0\0\0\0";s.fromNumber=function(e){if(0===e)return o;var t=e<0;t&&(e=-e);var n=e>>>0,r=(e-n)/4294967296>>>0;return t&&(r=~r>>>0,n=~n>>>0,++n>4294967295&&(n=0,++r>4294967295&&(r=0))),new s(n,r)},s.from=function(e){if("number"==typeof e)return s.fromNumber(e);if(r.isString(e)){if(!r.Long)return s.fromNumber(parseInt(e,10));e=r.Long.fromString(e)}return e.low||e.high?new s(e.low>>>0,e.high>>>0):o},s.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=1+~this.lo>>>0,n=~this.hi>>>0;return t||(n=n+1>>>0),-(t+4294967296*n)}return this.lo+4294967296*this.hi},s.prototype.toLong=function(e){return r.Long?new r.Long(0|this.lo,0|this.hi,Boolean(e)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(e)}};var a=String.prototype.charCodeAt;s.fromHash=function(e){return e===i?o:new s((a.call(e,0)|a.call(e,1)<<8|a.call(e,2)<<16|a.call(e,3)<<24)>>>0,(a.call(e,4)|a.call(e,5)<<8|a.call(e,6)<<16|a.call(e,7)<<24)>>>0)},s.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},s.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},s.prototype.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},s.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,n=this.hi>>>24;return 0===n?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:n<128?9:10}},8107:function(e,t,n){"use strict";var r=t;function s(e,t,n){for(var r=Object.keys(t),s=0;s<r.length;++s)void 0!==e[r[s]]&&n||(e[r[s]]=t[r[s]]);return e}function o(e){function t(e,n){if(!(this instanceof t))return new t(e,n);Object.defineProperty(this,"message",{get:function(){return e}}),Error.captureStackTrace?Error.captureStackTrace(this,t):Object.defineProperty(this,"stack",{value:(new Error).stack||""}),n&&s(this,n)}return t.prototype=Object.create(Error.prototype,{constructor:{value:t,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return e},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),t}r.asPromise=n(9310),r.base64=n(6662),r.EventEmitter=n(5707),r.float=n(9365),r.inquire=n(230),r.utf8=n(1742),r.pool=n(319),r.LongBits=n(2576),r.isNode=Boolean(void 0!==n.g&&n.g&&n.g.process&&n.g.process.versions&&n.g.process.versions.node),r.global=r.isNode&&n.g||"undefined"!=typeof window&&window||"undefined"!=typeof self&&self||this,r.emptyArray=Object.freeze?Object.freeze([]):[],r.emptyObject=Object.freeze?Object.freeze({}):{},r.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},r.isString=function(e){return"string"==typeof e||e instanceof String},r.isObject=function(e){return e&&"object"==typeof e},r.isset=r.isSet=function(e,t){var n=e[t];return!(null==n||!e.hasOwnProperty(t))&&("object"!=typeof n||(Array.isArray(n)?n.length:Object.keys(n).length)>0)},r.Buffer=function(){try{var e=r.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch(e){return null}}(),r._Buffer_from=null,r._Buffer_allocUnsafe=null,r.newBuffer=function(e){return"number"==typeof e?r.Buffer?r._Buffer_allocUnsafe(e):new r.Array(e):r.Buffer?r._Buffer_from(e):"undefined"==typeof Uint8Array?e:new Uint8Array(e)},r.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,r.Long=r.global.dcodeIO&&r.global.dcodeIO.Long||r.global.Long||r.inquire("long"),r.key2Re=/^true|false|0|1$/,r.key32Re=/^-?(?:0|[1-9][0-9]*)$/,r.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,r.longToHash=function(e){return e?r.LongBits.from(e).toHash():r.LongBits.zeroHash},r.longFromHash=function(e,t){var n=r.LongBits.fromHash(e);return r.Long?r.Long.fromBits(n.lo,n.hi,t):n.toNumber(Boolean(t))},r.merge=s,r.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},r.newError=o,r.ProtocolError=o("ProtocolError"),r.oneOfGetter=function(e){for(var t={},n=0;n<e.length;++n)t[e[n]]=1;return function(){for(var e=Object.keys(this),n=e.length-1;n>-1;--n)if(1===t[e[n]]&&void 0!==this[e[n]]&&null!==this[e[n]])return e[n]}},r.oneOfSetter=function(e){return function(t){for(var n=0;n<e.length;++n)e[n]!==t&&delete this[e[n]]}},r.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},r._configure=function(){var e=r.Buffer;e?(r._Buffer_from=e.from!==Uint8Array.from&&e.from||function(t,n){return new e(t,n)},r._Buffer_allocUnsafe=e.allocUnsafe||function(t){return new e(t)}):r._Buffer_from=r._Buffer_allocUnsafe=null}},4196:(e,t,n)=>{"use strict";e.exports=l;var r,s=n(8107),o=s.LongBits,i=s.base64,a=s.utf8;function c(e,t,n){this.fn=e,this.len=t,this.next=void 0,this.val=n}function u(){}function d(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function l(){this.len=0,this.head=new c(u,0,0),this.tail=this.head,this.states=null}var p=function(){return s.Buffer?function(){return(l.create=function(){return new r})()}:function(){return new l}};function h(e,t,n){t[n]=255&e}function f(e,t){this.len=e,this.next=void 0,this.val=t}function m(e,t,n){for(;e.hi;)t[n++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[n++]=127&e.lo|128,e.lo=e.lo>>>7;t[n++]=e.lo}function y(e,t,n){t[n]=255&e,t[n+1]=e>>>8&255,t[n+2]=e>>>16&255,t[n+3]=e>>>24}l.create=p(),l.alloc=function(e){return new s.Array(e)},s.Array!==Array&&(l.alloc=s.pool(l.alloc,s.Array.prototype.subarray)),l.prototype._push=function(e,t,n){return this.tail=this.tail.next=new c(e,t,n),this.len+=t,this},f.prototype=Object.create(c.prototype),f.prototype.fn=function(e,t,n){for(;e>127;)t[n++]=127&e|128,e>>>=7;t[n]=e},l.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new f((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},l.prototype.int32=function(e){return e<0?this._push(m,10,o.fromNumber(e)):this.uint32(e)},l.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},l.prototype.uint64=function(e){var t=o.from(e);return this._push(m,t.length(),t)},l.prototype.int64=l.prototype.uint64,l.prototype.sint64=function(e){var t=o.from(e).zzEncode();return this._push(m,t.length(),t)},l.prototype.bool=function(e){return this._push(h,1,e?1:0)},l.prototype.fixed32=function(e){return this._push(y,4,e>>>0)},l.prototype.sfixed32=l.prototype.fixed32,l.prototype.fixed64=function(e){var t=o.from(e);return this._push(y,4,t.lo)._push(y,4,t.hi)},l.prototype.sfixed64=l.prototype.fixed64,l.prototype.float=function(e){return this._push(s.float.writeFloatLE,4,e)},l.prototype.double=function(e){return this._push(s.float.writeDoubleLE,8,e)};var g=s.Array.prototype.set?function(e,t,n){t.set(e,n)}:function(e,t,n){for(var r=0;r<e.length;++r)t[n+r]=e[r]};l.prototype.bytes=function(e){var t=e.length>>>0;if(!t)return this._push(h,1,0);if(s.isString(e)){var n=l.alloc(t=i.length(e));i.decode(e,n,0),e=n}return this.uint32(t)._push(g,t,e)},l.prototype.string=function(e){var t=a.length(e);return t?this.uint32(t)._push(a.write,t,e):this._push(h,1,0)},l.prototype.fork=function(){return this.states=new d(this),this.head=this.tail=new c(u,0,0),this.len=0,this},l.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new c(u,0,0),this.len=0),this},l.prototype.ldelim=function(){var e=this.head,t=this.tail,n=this.len;return this.reset().uint32(n),n&&(this.tail.next=e.next,this.tail=t,this.len+=n),this},l.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),n=0;e;)e.fn(e.val,t,n),n+=e.len,e=e.next;return t},l._configure=function(e){r=e,l.create=p(),r._configure()}},341:(e,t,n)=>{"use strict";e.exports=o;var r=n(4196);(o.prototype=Object.create(r.prototype)).constructor=o;var s=n(8107);function o(){r.call(this)}function i(e,t,n){e.length<40?s.utf8.write(e,t,n):t.utf8Write?t.utf8Write(e,n):t.write(e,n)}o._configure=function(){o.alloc=s._Buffer_allocUnsafe,o.writeBytesBuffer=s.Buffer&&s.Buffer.prototype instanceof Uint8Array&&"set"===s.Buffer.prototype.set.name?function(e,t,n){t.set(e,n)}:function(e,t,n){if(e.copy)e.copy(t,n,0,e.length);else for(var r=0;r<e.length;)t[n++]=e[r++]}},o.prototype.bytes=function(e){s.isString(e)&&(e=s._Buffer_from(e,"base64"));var t=e.length>>>0;return this.uint32(t),t&&this._push(o.writeBytesBuffer,t,e),this},o.prototype.string=function(e){var t=s.Buffer.byteLength(e);return this.uint32(t),t&&this._push(i,t,e),this},o._configure()},7477:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n extends Error{constructor(e,t,n=null,r={}){super("cloud-services-internal-error: "+e),this.context=t,this.code=n,this.data=r,this.name="CKEditorError"}static fromPublicError(e){return new n(function(e){let t="cloud-services-error: "+e.message;return e.data&&(t+="\nError data: "+JSON.stringify(e.data)),e.explanation&&(t+="\nExplanation: "+e.explanation),e.action&&(t+="\nAction: "+e.action),e.traceId&&(t+="\nTraceId: "+e.traceId),e.code&&(t+="\nCode: "+e.code),t}(e),e)}}t.default=n},556:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n extends Error{constructor(e,t){super(),this.name="CKEditorCloudServicesServerError",this.stack=void 0,this.message=e,this.code=t.code,this.traceId=t.traceId,this.data=t.data}static fromPublicError(e){return new n(function(e){let t="cloud-services-server-error: "+e.message;return e.explanation&&(t+="\nExplanation: "+e.explanation),e.action&&(t+="\nAction: "+e.action),e.traceId&&(t+="\nTraceId: "+e.traceId),e.code&&(t+="\nCode: "+e.code),t}(e),e)}}t.default=n},44:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t._SERVICE=void 0;const s=n(9662),o=n(4584),i=r(n(1774)),a=r(n(4096)),c=r(n(7261)),u=r(n(4766)),d=r(n(9168)),l=r(n(3049)),p=r(n(242)),h=r(n(1244)),f=r(n(7477)),m=r(n(2352)),y=r(n(8359)),g=r(n(9031));t._SERVICE=1;class b extends((0,o.EmitterMixin)()){constructor(e,t){if(super(),!e)throw new TypeError('Param "bundleVersion" must be provided.');this._id=null!=t?t:(0,s.v4)(),this._isConnected=!1,this._bundleVersion=e}getId(){return this._id}isConnected(){return this._isConnected}connect(e,t={buffers:[],types:[]},n){const r=new c.default(this.getId(),t.buffers,t.types,this._bundleVersion,n);return this._connect(e,r)}reconnect(e,t){if(this.isConnected())throw new f.default("Cannot reconnect to already connected service.",e);return this._connect(e,new d.default(this.getId(),t,this._bundleVersion))}disconnect(){this._isConnected&&(this._isConnected=!1,this._wsGateway&&(this.stopListening(this._wsGateway),this._wsGateway=void 0),this._channel&&(this.stopListening(this._channel),this._channel=void 0),this._connectedSessions&&(this._connectedSessions.disconnect(),this._connectedSessions=void 0),this.fire("disconnected"),this.stopListening())}async getDocumentDetails(){const e=new g.default(this.getId());if(!this._wsGateway)throw new m.default("Collaborative Editing",this);const n=await this._wsGateway._sendRequest(t._SERVICE,g.default.TYPE,i.default.encode(e));return i.default.decode(n,y.default)}async sendOperations(e,n,r){if(!e||!e.types||!e.types.length)throw new f.default("Cannot send empty update.",this._wsGateway);const s="number"==typeof n?n:parseInt(n);if(!Number.isInteger(s)||s<0)throw new f.default("Base version not provided.",this._wsGateway);const o=new u.default(this.getId(),e.buffers,e.types,s,[],r);if(!this._wsGateway||!this._isConnected)throw new m.default("Collaborative Editing",this);const a=await this._wsGateway._sendRequest(t._SERVICE,u.default.TYPE,i.default.encode(o));return i.default.decode(a,l.default)}async getConnectedSessions(){if(!this._isConnected)throw new m.default("Collaborative Editing",this);return this._connectedSessions||(this._connectedSessions=await a.default.getConnectedSessions(this._wsGateway,this._id,t._SERVICE)),this._connectedSessions}static getConnectedSessions(e,n){return a.default.getConnectedSessions(e,n,t._SERVICE)}async _connect(e,n){if(this.isConnected())return;if(e.state!==h.default.STATE_CONNECTED)throw new f.default("WebSocket Gateway is not connected.",e);this._wsGateway=e,this.stopListening(e,"change:state");const r=await e._sendRequest(t._SERVICE,n.constructor.TYPE,i.default.encode(n)),s=i.default.decode(r,p.default);return this.listenTo(e,"change:state",((e,t,n)=>this._onWsGatewayStateChange(n)),{priority:h.default._CHANGE_STATE_EVENT_PRIORITY}),this._connectToChannel(e,s.channel),this._isConnected=!0,this.fire("connected"),s}_connectToChannel(e,n){this._channel=e._getChannel(t._SERVICE,n),this.listenTo(this._channel,this._channel.getEventName(u.default.TYPE),((e,t)=>{const n=i.default.decode(t,u.default);this.fire("operationsReceived",n.baseVersion,n.data,n.metadata)}))}_onWsGatewayStateChange(e){e===h.default.STATE_DISCONNECTED&&this.disconnect()}}b._SERVICE=t._SERVICE,t.default=b},1074:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(3130));class o extends s.default{static toJSON({createdAt:e,...t}){const n={...t};return(null==e?void 0:e.toISOString)&&(n.createdAt=e.toISOString()),n}static fromJSON({createdAt:e,...t}){const n={...t};return e&&(n.createdAt=new Date(e)),n}}t.default=o,o.DESCRIPTOR_NAME="OperationMetadataDescriptor",o.DESCRIPTOR={fields:{userId:{type:"string",id:1},type:{type:"string",id:2},createdAt:{type:"string",id:3}}}},2895:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=class{static prepareMetadataForOperations(e,t){if(!(e&&e.length&&t&&t.length))return[];const n=[];let r=0;for(const s of e)if(0!==s){if(!t[r])throw new Error("Missing metadata for a operation");n.push(t[r]),r++}else n.push(n[n.length-1]);return n}static removeUnnecessaryMetadata(e,t){if(!(e&&e.length&&t&&t.length))return[];const n=[];for(let r=0;r<e.length;r++)if(0!==e[r]){if(!t[r])throw new Error("Missing metadata for a operation");n.push(t[r])}return n}}},7261:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e,t,n,r,s=""){super(),this.id=e,this.buffers=t,this.types=n,this.bundleVersion=r,this.lastOperationId=s}toJSON(){return{id:this.id,buffers:this.buffers,types:this.types,bundleVersion:this.bundleVersion,lastOperationId:this.lastOperationId}}static fromJSON(e){return new o(e.id,e.buffers,e.types,e.bundleVersion,e.lastOperationId)}}t.default=o,o.TYPE="11",o.READABLE_TYPE_NAME="connectToDocument",o.DESCRIPTOR_NAME="CollaborativeEditingConnectMessage",o.DESCRIPTOR={fields:{id:{type:"string",id:1},bundleVersion:{type:"string",id:2},buffers:{rule:"repeated",type:"bytes",id:3},types:{rule:"repeated",type:"uint32",id:4},lastOperationId:{type:"string",id:5}}}},9168:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e,t,n){super(),this.id=e,this.lastKnowVersion=t,this.bundleVersion=n}toJSON(){return{id:this.id,bundleVersion:this.bundleVersion,lastKnowVersion:this.lastKnowVersion}}static fromJSON(e){return new o(e.id,e.lastKnowVersion,e.bundleVersion)}}t.default=o,o.TYPE="12",o.READABLE_TYPE_NAME="reconnectToDocument",o.DESCRIPTOR_NAME="CollaborativeEditingReconnectMessage",o.DESCRIPTOR={fields:{id:{type:"string",id:1},bundleVersion:{type:"string",id:2},lastKnowVersion:{type:"uint32",id:3}}}},4766:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844)),o=r(n(2895)),i=r(n(1074));class a extends s.default{constructor(e,t,n,r,s=[],o=""){super(),this.id=e,this.buffers=t,this.types=n,this.baseVersion=r,this.metadata=s,this.lastOperationId=o}get data(){return{buffers:this.buffers,types:this.types,baseVersion:this.baseVersion,lastOperationId:this.lastOperationId}}toJSON(){return{id:this.id,buffers:this.buffers,types:this.types,baseVersion:this.baseVersion,metadata:o.default.removeUnnecessaryMetadata(this.types,this.metadata).map(i.default.toJSON),lastOperationId:this.lastOperationId}}static fromJSON(e){return new a(e.id,e.buffers,e.types,e.baseVersion,o.default.prepareMetadataForOperations(e.types,e.metadata).map(i.default.fromJSON),e.lastOperationId)}}t.default=a,a.TYPE="13",a.READABLE_TYPE_NAME="updateDocument",a.DESCRIPTOR_NAME="CollaborativeEditingUpdateMessage",a.DESCRIPTOR={fields:{id:{type:"string",id:1},baseVersion:{type:"uint32",id:2},buffers:{rule:"repeated",type:"bytes",id:3},types:{rule:"repeated",type:"uint32",id:4},metadata:{rule:"repeated",type:"OperationMetadataDescriptor",id:6},lastOperationId:{type:"string",id:7}}}},9031:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e){super(),this.documentId=e}get data(){return{documentId:this.documentId}}toJSON(){return{documentId:this.documentId}}static fromJSON(e){return new o(e.documentId)}}t.default=o,o.TYPE="14",o.READABLE_TYPE_NAME="getDocumentDetails",o.DESCRIPTOR_NAME="GetDocumentDetailsMessage",o.DESCRIPTOR={fields:{documentId:{type:"string",id:1},environmentId:{type:"string",id:2}}}},242:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844)),o=r(n(2895)),i=r(n(1074));class a extends s.default{constructor(e,t,n=[],r=[],s=0,o=[],i=null,a="",c="",u=null){super(),this.channel=e,this.version=t,this.buffers=n,this.types=r,this.offset=s,this.metadata=o,this.initData=i,this.sessionId=a,this.lastOperationId=c,this.sessionCreatedAt=u}get data(){return{buffers:this.buffers,types:this.types,baseVersion:this.version-this.types.length,lastOperationId:this.lastOperationId,sessionCreatedAt:this.sessionCreatedAt}}get wereChangesApplied(){var e;return!(null===(e=this.types)||void 0===e?void 0:e.length)&&null===this.initData}toJSON(){var e;return{channel:this.channel,version:this.version,sessionId:this.sessionId,buffers:this.buffers,types:this.types,offset:this.offset,metadata:o.default.removeUnnecessaryMetadata(this.types,this.metadata).map(i.default.toJSON),initData:null!==(e=this.initData)&&void 0!==e?e:"",isInitialized:"string"==typeof this.initData,lastOperationId:this.lastOperationId,sessionCreatedAt:this.sessionCreatedAt?this.sessionCreatedAt.toISOString():null}}static create(e){return new a(e.channel,e.version,e.buffers,e.types,e.offset,e.metadata,e.initData,e.sessionId,e.lastOperationId,e.sessionCreatedAt)}static fromJSON(e){var t;let n=null;return!0===e.isInitialized?n=null!==(t=e.initData)&&void 0!==t?t:"":"boolean"!=typeof e.isInitialized&&e.initData&&(n=e.initData),a.create({channel:e.channel,version:e.version,buffers:e.buffers,types:e.types,offset:e.offset,metadata:o.default.prepareMetadataForOperations(e.types,e.metadata).map(i.default.fromJSON),initData:n,sessionId:e.sessionId,lastOperationId:e.lastOperationId,sessionCreatedAt:e.sessionCreatedAt?new Date(e.sessionCreatedAt):null})}}t.default=a,a.DESCRIPTOR_NAME="CollaborativeEditingConnectResponse",a.DESCRIPTOR={fields:{channel:{type:"string",id:1},offset:{type:"uint32",id:2},version:{type:"uint32",id:3},buffers:{rule:"repeated",type:"bytes",id:4},types:{rule:"repeated",type:"uint32",id:5},metadata:{rule:"repeated",type:i.default.DESCRIPTOR_NAME,id:7},initData:{type:"string",id:8},isInitialized:{type:"bool",id:9},sessionId:{type:"string",id:10},lastOperationId:{type:"string",id:11},sessionCreatedAt:{type:"string",id:12}}}},3049:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844)),o=r(n(2895)),i=r(n(1074));class a extends s.default{constructor(e,t=[],n=[],r=[],s="",o=null){super(),this.version=e,this.buffers=t,this.types=n,this.metadata=r,this.lastOperationId=s,this.lastOperationAcceptedAt=o}get data(){return{buffers:this.buffers,types:this.types,baseVersion:this.version-this.types.length,lastOperationId:this.lastOperationId,lastOperationAcceptedAt:this.lastOperationAcceptedAt}}get wereChangesApplied(){var e;return!(null===(e=this.types)||void 0===e?void 0:e.length)}toJSON(){return{version:this.version,buffers:this.buffers,types:this.types,metadata:o.default.removeUnnecessaryMetadata(this.types,this.metadata).map(i.default.toJSON),lastOperationId:this.lastOperationId,lastOperationAcceptedAt:this.lastOperationAcceptedAt instanceof Date?this.lastOperationAcceptedAt.toISOString():this.lastOperationAcceptedAt}}static fromJSON(e){return new a(e.version,e.buffers,e.types,o.default.prepareMetadataForOperations(e.types,e.metadata).map(i.default.fromJSON),e.lastOperationId,e.lastOperationAcceptedAt?new Date(e.lastOperationAcceptedAt):null)}static create(e){return new a(e.version,e.buffers,e.types,e.metadata,e.lastOperationId,e.lastOperationAcceptedAt?new Date(e.lastOperationAcceptedAt):null)}}t.default=a,a.DESCRIPTOR_NAME="CollaborativeEditingResponse",a.DESCRIPTOR={fields:{version:{type:"uint32",id:1},buffers:{rule:"repeated",type:"bytes",id:2},types:{rule:"repeated",type:"uint32",id:3},metadata:{rule:"repeated",type:"OperationMetadataDescriptor",id:5},lastOperationId:{type:"string",id:6},lastOperationAcceptedAt:{type:"string",id:7}}}},8359:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e,t){super(),this.lastDocumentSession=e,this.currentDocumentSession=t}get data(){var e,t,n,r,s;return{lastDocumentSessionId:null===(e=this.lastDocumentSession)||void 0===e?void 0:e.id,lastDocumentSessionOperationId:null===(t=this.lastDocumentSession)||void 0===t?void 0:t.lastOperationId,currentDocumentSessionId:null===(n=this.currentDocumentSession)||void 0===n?void 0:n.id,currentDocumentSessionVersion:null===(r=this.currentDocumentSession)||void 0===r?void 0:r.version,currentDocumentSessionOperationId:null===(s=this.currentDocumentSession)||void 0===s?void 0:s.lastOperationId}}toJSON(){var e,t,n,r,s;return{lastDocumentSessionId:null===(e=this.lastDocumentSession)||void 0===e?void 0:e.id,lastDocumentSessionOperationId:null===(t=this.lastDocumentSession)||void 0===t?void 0:t.lastOperationId,currentDocumentSessionId:null===(n=this.currentDocumentSession)||void 0===n?void 0:n.id,currentDocumentSessionVersion:null===(r=this.currentDocumentSession)||void 0===r?void 0:r.version,currentDocumentSessionOperationId:null===(s=this.currentDocumentSession)||void 0===s?void 0:s.lastOperationId}}static fromJSON(e){const t=e.lastDocumentSessionId?{id:e.lastDocumentSessionId,lastOperationId:e.lastDocumentSessionOperationId}:void 0,n=e.currentDocumentSessionId?{lastOperationId:e.currentDocumentSessionOperationId,version:e.currentDocumentSessionVersion,id:e.currentDocumentSessionId}:void 0;return new o(t,n)}}t.default=o,o.DESCRIPTOR_NAME="GetDocumentDetailsResponse",o.DESCRIPTOR={fields:{lastDocumentSessionId:{type:"string",id:1},lastDocumentSessionOperationId:{type:"string",id:2},currentDocumentSessionId:{type:"string",id:3},currentDocumentSessionVersion:{type:"uint32",id:4},currentDocumentSessionOperationId:{type:"string",id:5}}}},2924:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return s(t,e),t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t._SERVICE=void 0;const a=n(4584),c=i(n(1774)),u=i(n(8741)),d=i(n(1763)),l=i(n(6033)),p=i(n(6599)),h=i(n(1452)),f=i(n(8852)),m=i(n(2481)),y=i(n(8610)),g=i(n(8994)),b=i(n(4451)),O=i(n(1973)),v=o(n(1244)),w=i(n(7477)),I=i(n(4096)),_=i(n(2352)),S=i(n(556)),P=i(n(8477)),A=i(n(9811)),T=i(n(5632)),k=i(n(2015)),C=i(n(2603)),E=i(n(7140));t._SERVICE=9;class j extends((0,a.EmitterMixin)()){constructor(e){super(),this._documentId=e,this._isConnected=!1}get isConnected(){return this._isConnected}async connect(e){if(this._isConnected)return;if(e.state!==v.WEB_SOCKET_GATEWAY_STATES.CONNECTED)throw new w.default("WebSocket Gateway is not connected.",e);const n=new l.default(this._documentId);this._wsGateway=e,this.stopListening(e,"change:state");const r=await e._sendRequest(t._SERVICE,l.default.TYPE,c.default.encode(n)),{channel:s,threads:o}=c.default.decode(r,p.default);return this.listenTo(e,"change:state",((e,t,n)=>this._onWsGatewayStateChange(n)),{priority:v.default._CHANGE_STATE_EVENT_PRIORITY}),this._connectToChannel(e,s),this._isConnected=!0,this.fire("connected"),o}disconnect(){this._isConnected&&(this._isConnected=!1,this._wsGateway&&(this.stopListening(this._wsGateway),this._wsGateway=void 0),this._channel&&(this.stopListening(this._channel),this._channel=void 0),this._connectedSessions&&(this._connectedSessions.disconnect(),this._connectedSessions=void 0),this.fire("disconnected"),this.stopListening())}async addComment(e,t,n,r){const s=new u.default(this._documentId,e,n,t,void 0,void 0,r),o=await this._sendRequest(u.default.TYPE,s);return c.default.decode(o,d.default)}async updateComment(e,t,n,r){const s=void 0!==r,o=new m.default(this._documentId,e,t,n,r,s);await this._sendRequest(m.default.TYPE,o)}async removeComment(e,t){const n=new h.default(this._documentId,e,t);await this._sendRequest(h.default.TYPE,n)}async removeCommentThread(e){const t=new f.default(this._documentId,e);await this._sendRequest(f.default.TYPE,t)}async addCommentThread(e){var t;const n=new A.default(this._documentId,e.commentThreadId,null===(t=e.comments)||void 0===t?void 0:t.map((t=>({...t,documentId:this._documentId,commentThreadId:e.commentThreadId}))),e.context,e.resolvedBy,e.createdAt,e.resolvedAt,e.deletedAt,e.attributes),r=await this._sendRequest(A.default.TYPE,n);return c.default.decode(r,P.default)}async resolveCommentThread(e){const t=new T.default(e,this._documentId),n=await this._sendRequest(T.default.TYPE,t);return c.default.decode(n,E.default)}async reopenCommentThread(e){const t=new k.default(e,this._documentId);await this._sendRequest(k.default.TYPE,t)}async updateCommentThread(e){const t=new C.default(e.commentThreadId,this._documentId,e.context,e.attributes,e.unlinkedAt);await this._sendRequest(C.default.TYPE,t)}async getCommentThread(e,t=1){const n=new y.default(e,this._documentId);try{const e=await this._sendRequest(y.default.TYPE,n),t=c.default.decode(e,g.default);return{commentThreadId:t.commentThreadId,comments:t.comments,attributes:t.attributes,context:t.context,resolvedAt:t.resolvedAt,resolvedBy:t.resolvedBy,deletedAt:t.deletedAt,unlinkedAt:t.unlinkedAt}}catch(n){if("CKEditorCloudServicesServerError"===n.name&&"404"===n.code&&t<5)return await(r=100*t,new Promise((e=>{setTimeout(e,r)}))),this.getCommentThread(e,t+1);if("CKEditorCloudServicesServerError"===n.name)throw n;throw S.default.fromPublicError(n)}var r}async getDocumentThreads(){const e=new b.default(this._documentId),t=await this._sendRequest(b.default.TYPE,e),{threads:n}=c.default.decode(t,O.default);return{threads:n}}async getConnectedSessions(){if(!this._isConnected)throw new _.default("Comments",this);return this._connectedSessions||(this._connectedSessions=await I.default.getConnectedSessions(this._wsGateway,this._documentId,t._SERVICE)),this._connectedSessions}_connectToChannel(e,t){this._channel=e._getChannel(j._SERVICE,t),this._channel&&(this.listenTo(this._channel,this._channel.getEventName(u.default.TYPE),((e,t)=>{const n=c.default.decode(t,u.default);this.fire("commentAdded",n)})),this.listenTo(this._channel,this._channel.getEventName(h.default.TYPE),((e,t)=>{const n=c.default.decode(t,h.default);this.fire("commentRemoved",n)})),this.listenTo(this._channel,this._channel.getEventName(m.default.TYPE),((e,t)=>{const n=c.default.decode(t,m.default);this.fire("commentUpdated",n)})),this.listenTo(this._channel,this._channel.getEventName(f.default.TYPE),((e,t)=>{const n=c.default.decode(t,f.default);this.fire("commentThreadRemoved",n)})),this.listenTo(this._channel,this._channel.getEventName(A.default.TYPE),((e,t)=>{const n=c.default.decode(t,A.default);this.fire("commentThreadAdded",n)})),this.listenTo(this._channel,this._channel.getEventName(C.default.TYPE),((e,t)=>{const n=c.default.decode(t,C.default);this.fire("commentThreadUpdated",n)})),this.listenTo(this._channel,this._channel.getEventName(T.default.TYPE),((e,t)=>{const n=c.default.decode(t,T.default);this.fire("commentThreadResolved",n)})),this.listenTo(this._channel,this._channel.getEventName(k.default.TYPE),((e,t)=>{const n=c.default.decode(t,k.default);this.fire("commentThreadReopened",n)})))}_onWsGatewayStateChange(e){e===v.WEB_SOCKET_GATEWAY_STATES.DISCONNECTED&&this.disconnect()}_sendRequest(e,n){if(!this._wsGateway||!this._isConnected)throw new _.default("Comments",this);return this._wsGateway._sendRequest(t._SERVICE,e,c.default.encode(n))}}j._SERVICE=t._SERVICE,t.default=j},3748:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(3130));class o extends s.default{static toJSON(e){var t;return{...e,createdAt:null===(t=e.createdAt)||void 0===t?void 0:t.toISOString(),attributes:e.attributes?JSON.stringify(e.attributes):null}}static fromJSON(e){return{...e,createdAt:new Date(e.createdAt),attributes:e.attributes?JSON.parse(e.attributes):null}}}t.default=o,o.DESCRIPTOR_NAME="CommentDescriptor",o.DESCRIPTOR={fields:{commentId:{id:1,type:"string"},commentThreadId:{id:2,type:"string"},userId:{id:3,type:"string"},content:{id:4,type:"string"},documentId:{id:5,type:"string"},createdAt:{id:6,type:"string"},attributes:{id:7,type:"string"}}}},5597:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(3130)),o=r(n(3748));class i extends s.default{static toJSON(e){var t,n,r,s,i;return{...e,createdAt:null===(t=e.createdAt)||void 0===t?void 0:t.toISOString(),deletedAt:null===(n=e.deletedAt)||void 0===n?void 0:n.toISOString(),resolvedAt:null===(r=e.resolvedAt)||void 0===r?void 0:r.toISOString(),attributes:e.attributes?JSON.stringify(e.attributes):null,context:e.context?JSON.stringify(e.context):e.context,comments:null===(s=e.comments)||void 0===s?void 0:s.map(o.default.toJSON),unlinkedAt:null===(i=e.unlinkedAt)||void 0===i?void 0:i.toISOString()}}static fromJSON(e){var t;return{...e,createdAt:e.createdAt?new Date(e.createdAt):void 0,deletedAt:e.deletedAt?new Date(e.deletedAt):void 0,resolvedAt:e.resolvedAt?new Date(e.resolvedAt):void 0,attributes:e.attributes?JSON.parse(e.attributes):null,context:e.context?JSON.parse(e.context):void 0,comments:null===(t=e.comments)||void 0===t?void 0:t.map(o.default.fromJSON),unlinkedAt:e.unlinkedAt?new Date(e.unlinkedAt):void 0}}}t.default=i,i.DESCRIPTOR_NAME="CommentsThreadDescriptor",i.DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},comments:{type:"CommentDescriptor",rule:"repeated",id:2},resolvedAt:{type:"string",id:3},resolvedBy:{type:"string",id:4},context:{type:"string",id:5},createdAt:{type:"string",id:6},deletedAt:{type:"string",id:7},attributes:{type:"string",id:8},unlinkedAt:{type:"string",id:9}}}},1866:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(3130));class o extends s.default{static toJSON(e){var t;return{commentId:e.commentId,createdAt:null===(t=e.createdAt)||void 0===t?void 0:t.toISOString()}}static fromJSON(e){return{commentId:e.commentId,createdAt:new Date(e.createdAt)}}}t.default=o,o.DESCRIPTOR_NAME="CommentThreadAddedCommentDescriptor",o.DESCRIPTOR={fields:{commentId:{id:1,type:"string"},createdAt:{id:2,type:"string"}}}},8741:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844)),o=r(n(5597));class i extends s.default{constructor(e,t,n,r="",s,o="",i=null,a){super(),this.documentId=e,this.commentThreadId=t,this.content=n,this.commentId=r,this.userId=o,this.attributes=i,this.commentThread=a,this.createdAt=s?new Date(s):""}toJSON(){return{commentThreadId:this.commentThreadId,content:this.content,documentId:this.documentId,commentId:this.commentId,createdAt:this.createdAt instanceof Date?this.createdAt.toISOString():this.createdAt,userId:this.userId,attributes:JSON.stringify(this.attributes),commentThread:this.commentThread?o.default.toJSON(this.commentThread):void 0}}static fromJSON(e){return new i(e.documentId,e.commentThreadId,e.content,e.commentId?e.commentId:void 0,e.createdAt?new Date(e.createdAt):void 0,e.userId?e.userId:void 0,e.attributes?JSON.parse(e.attributes):{},e.commentThread?o.default.fromJSON(e.commentThread):void 0)}}t.default=i,i.TYPE="91",i.READABLE_TYPE_NAME="addComment",i.DESCRIPTOR_NAME="CommentsV2AddCommentMessage",i.DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},content:{type:"string",id:2},documentId:{type:"string",id:3},commentId:{type:"string",id:4},createdAt:{type:"string",id:5},userId:{type:"string",id:6},attributes:{type:"string",id:7},commentThread:{type:"CommentsThreadDescriptor",id:8}}}},9811:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844)),o=r(n(3748));class i extends s.default{constructor(e,t,n=[],r,s=null,o=null,i=null,a=null,c=null){super(),this.documentId=e,this.commentThreadId=t,this.comments=n,this.context=r,this.resolvedBy=s,this.attributes=c,this.createdAt=o?new Date(o):"",this.resolvedAt=i?new Date(i):"",this.deletedAt=a?new Date(a):""}toJSON(){var e;return{commentThreadId:this.commentThreadId,context:this.context?JSON.stringify(this.context):this.context,documentId:this.documentId,resolvedBy:this.resolvedBy,resolvedAt:this.resolvedAt instanceof Date?this.resolvedAt.toISOString():this.resolvedAt,deletedAt:this.deletedAt instanceof Date?this.deletedAt.toISOString():this.deletedAt,createdAt:this.createdAt instanceof Date?this.createdAt.toISOString():this.createdAt,attributes:this.attributes?JSON.stringify(this.attributes):this.attributes,comments:null===(e=this.comments)||void 0===e?void 0:e.map((e=>o.default.toJSON(e)))}}static fromJSON(e){var t;return new i(e.documentId,e.commentThreadId,null===(t=e.comments)||void 0===t?void 0:t.map((t=>o.default.fromJSON({...t,documentId:e.documentId,commentThreadId:e.commentThreadId}))),e.context?JSON.parse(e.context):e.context,e.resolvedBy,e.createdAt?new Date(e.createdAt):void 0,e.resolvedAt?new Date(e.resolvedAt):void 0,e.deletedAt?new Date(e.deletedAt):void 0,e.attributes?JSON.parse(e.attributes):e.attributes)}}t.default=i,i.TYPE="140",i.READABLE_TYPE_NAME="addCommentThread",i.DESCRIPTOR_NAME="CommentsV2AddCommentThreadMessage",i.DESCRIPTOR={fields:{documentId:{type:"string",id:1},commentThreadId:{type:"string",id:2},context:{type:"string",id:3},createdAt:{type:"string",id:4},resolvedAt:{type:"string",id:5},resolvedBy:{type:"string",id:6},attributes:{type:"string",id:7},deletedAt:{type:"string",id:8},comments:{type:"CommentDescriptor",rule:"repeated",id:9}}}},2015:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e,t){super(),this.commentThreadId=e,this.documentId=t}toJSON(){return{documentId:this.documentId,commentThreadId:this.commentThreadId}}static fromJSON(e){return new o(e.commentThreadId,e.documentId)}}t.default=o,o.TYPE="141",o.READABLE_TYPE_NAME="reopenCommentThread",o.DESCRIPTOR_NAME="CommentsV2ReopenCommentThreadMessage",o.DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},documentId:{type:"string",id:2}}}},5632:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e,t,n,r){super(),this.commentThreadId=e,this.documentId=t,this.resolvedBy=n,this.resolvedAt=r?new Date(r):void 0}toJSON(){var e;return{documentId:this.documentId,commentThreadId:this.commentThreadId,resolvedBy:this.resolvedBy,resolvedAt:null===(e=this.resolvedAt)||void 0===e?void 0:e.toISOString()}}static fromJSON(e){return new o(e.commentThreadId,e.documentId,e.resolvedBy,e.resolvedAt)}}t.default=o,o.TYPE="142",o.READABLE_TYPE_NAME="resolveCommentThread",o.DESCRIPTOR_NAME="CommentsV2ResolveCommentThreadMessage",o.DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},documentId:{type:"string",id:2},resolvedBy:{type:"string",id:3},resolvedAt:{type:"string",id:4}}}},2603:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e,t,n,r=null,s=null){super(),this.commentThreadId=e,this.documentId=t,this.context=n,this.attributes=r,this.unlinkedAt=s?new Date(s):""}toJSON(){return{documentId:this.documentId,commentThreadId:this.commentThreadId,context:this.context?JSON.stringify(this.context):this.context,attributes:this.attributes?JSON.stringify(this.attributes):null,unlinkedAt:this.unlinkedAt instanceof Date?this.unlinkedAt.toISOString():this.unlinkedAt}}static fromJSON(e){return new o(e.commentThreadId,e.documentId,e.context?JSON.parse(e.context):e.context,e.attributes?JSON.parse(e.attributes):null,e.unlinkedAt?new Date(e.unlinkedAt):null)}}t.default=o,o.TYPE="143",o.READABLE_TYPE_NAME="updateCommentThread",o.DESCRIPTOR_NAME="CommentsV2UpdateCommentThreadMessage",o.DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},documentId:{type:"string",id:2},context:{type:"string",id:3},attributes:{type:"string",id:4},unlinkedAt:{type:"string",id:5}}}},6033:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e){super(),this.documentId=e}toJSON(){return{documentId:this.documentId}}static fromJSON(e){return new o(e.documentId)}}t.default=o,o.TYPE="92",o.READABLE_TYPE_NAME="connectToComment",o.DESCRIPTOR_NAME="CommentsV2ConnectMessage",o.DESCRIPTOR={fields:{documentId:{type:"string",id:1}}}},8610:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e,t){super(),this.commentThreadId=e,this.documentId=t}toJSON(){return{commentThreadId:this.commentThreadId,documentId:this.documentId}}static fromJSON(e){return new o(e.commentThreadId,e.documentId)}}t.default=o,o.TYPE="93",o.READABLE_TYPE_NAME="getComment",o.DESCRIPTOR_NAME="CommentsV2GetCommentThreadMessage",o.DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},documentId:{type:"string",id:2}}}},4451:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e){super(),this.documentId=e}toJSON(){return{documentId:this.documentId}}static fromJSON(e){return new o(e.documentId)}}t.default=o,o.TYPE="94",o.READABLE_TYPE_NAME="getDocumentThreads",o.DESCRIPTOR_NAME="CommentsV2GetDocumentThreadsMessage",o.DESCRIPTOR={fields:{documentId:{type:"string",id:1}}}},1452:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e,t,n){super(),this.documentId=e,this.commentThreadId=t,this.commentId=n}toJSON(){return{documentId:this.documentId,commentThreadId:this.commentThreadId,commentId:this.commentId}}static fromJSON(e){return new o(e.documentId,e.commentThreadId,e.commentId)}}t.default=o,o.TYPE="95",o.READABLE_TYPE_NAME="removeComment",o.DESCRIPTOR_NAME="CommentsV2RemoveCommentMessage",o.DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},commentId:{type:"string",id:2},documentId:{type:"string",id:3}}}},8852:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e,t){super(),this.documentId=e,this.commentThreadId=t}toJSON(){return{documentId:this.documentId,commentThreadId:this.commentThreadId}}static fromJSON(e){return new o(e.documentId,e.commentThreadId)}}t.default=o,o.TYPE="97",o.READABLE_TYPE_NAME="removeCommentThread",o.DESCRIPTOR_NAME="CommentsV2RemoveCommentThreadMessage",o.DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},documentId:{type:"string",id:2}}}},2481:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844)),o=r(n(5597));class i extends s.default{constructor(e,t,n,r,s=null,o=!1,i){super(),this.documentId=e,this.commentThreadId=t,this.commentId=n,this.content=r,this.attributes=s,this.isAttributesUpdated=o,this.commentThread=i}toJSON(){return{documentId:this.documentId,commentThreadId:this.commentThreadId,commentId:this.commentId,content:this.content,attributes:this.attributes?JSON.stringify(this.attributes):null,isAttributesUpdated:this.isAttributesUpdated,commentThread:this.commentThread?o.default.toJSON(this.commentThread):void 0}}static fromJSON(e){return new i(e.documentId,e.commentThreadId,e.commentId,e.content,e.attributes?JSON.parse(e.attributes):null,e.isAttributesUpdated,e.commentThread?o.default.fromJSON(e.commentThread):void 0)}}t.default=i,i.TYPE="96",i.READABLE_TYPE_NAME="updateComment",i.DESCRIPTOR_NAME="CommentsV2UpdateCommentMessage",i.DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},commentId:{type:"string",id:2},content:{type:"string",id:3},documentId:{type:"string",id:4},attributes:{type:"string",id:5},isAttributesUpdated:{type:"bool",id:6},commentThread:{type:"CommentsThreadDescriptor",id:7}}}},1763:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e,t,n){super(),this.commentThreadId=e,this.commentId=t,this.createdAt=new Date(n)}toJSON(){return{commentThreadId:this.commentThreadId,commentId:this.commentId,createdAt:this.createdAt.toISOString()}}static fromJSON(e){return new o(e.commentThreadId,e.commentId,e.createdAt)}}t.default=o,o.DESCRIPTOR_NAME="CommentsV2AddCommentResponse",o.DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},commentId:{type:"string",id:2},createdAt:{type:"string",id:3}}}},8477:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844)),o=r(n(1866));class i extends s.default{constructor(e,t,n=[]){super(),this.commentThreadId=e,this.comments=n,this.createdAt=new Date(t)}toJSON(){return{commentThreadId:this.commentThreadId,createdAt:this.createdAt.toISOString(),comments:this.comments.map((e=>o.default.toJSON(e)))}}static fromJSON(e){return new i(e.commentThreadId,e.createdAt,e.comments.map((e=>o.default.fromJSON(e))))}}t.default=i,i.DESCRIPTOR_NAME="CommentsV2AddCommentThreadResponse",i.DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},createdAt:{type:"string",id:2},comments:{type:"CommentThreadAddedCommentDescriptor",rule:"repeated",id:3}}}},7140:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e,t,n,r){super(),this.commentThreadId=e,this.documentId=t,this.resolvedBy=n,this.resolvedAt=new Date(r)}toJSON(){return{commentThreadId:this.commentThreadId,documentId:this.documentId,resolvedBy:this.resolvedBy,resolvedAt:this.resolvedAt.toISOString()}}static fromJSON(e){return new o(e.commentThreadId,e.documentId,e.resolvedBy,e.resolvedAt)}}t.default=o,o.DESCRIPTOR_NAME="CommentsV2ResolveCommentThreadResponse",o.DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},documentId:{type:"string",id:2},resolvedAt:{type:"string",id:3},resolvedBy:{type:"string",id:4}}}},6599:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844)),o=r(n(5597));class i extends s.default{constructor(e,t,n){super(),this.channel=e,this._threads=t,this._threadsV2=n,this.threads=(null==n?void 0:n.length)?n:t}toJSON(){var e,t;return{channel:this.channel,threads:null===(e=this._threads)||void 0===e?void 0:e.map((e=>JSON.stringify(e))),threadsV2:null===(t=this._threadsV2)||void 0===t?void 0:t.map(o.default.toJSON)}}static fromJSON(e){var t,n;return new i(e.channel,null===(t=e.threads)||void 0===t?void 0:t.map((e=>JSON.parse(e))),null===(n=e.threadsV2)||void 0===n?void 0:n.map(o.default.fromJSON))}}t.default=i,i.DESCRIPTOR_NAME="CommentsV2ConnectResponse",i.DESCRIPTOR={fields:{channel:{type:"string",id:1},threads:{type:"string",rule:"repeated",id:2},threadsV2:{type:"CommentsThreadDescriptor",rule:"repeated",id:3}}}},8994:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844)),o=r(n(3748));class i extends s.default{constructor(e,t,n,r,s,o,i,a,c,u){super(),this.commentThreadId=e,this._comments=t,this._commentsV2=n,this.resolvedBy=s,this.comments=(null==n?void 0:n.length)?n:t,this.createdAt=i?new Date(i):void 0,this.deletedAt="string"==typeof a?new Date(a):a,this.resolvedAt="string"==typeof c?new Date(c):c,this.unlinkedAt="string"==typeof u?new Date(u):u,this.attributes="string"==typeof r?JSON.parse(r):r,this.context="string"==typeof o?JSON.parse(o):o}toJSON(){var e,t,n,r,s,i;return{commentThreadId:this.commentThreadId,comments:null===(e=this._comments)||void 0===e?void 0:e.map((e=>JSON.stringify(e))),commentsV2:null===(t=this._commentsV2)||void 0===t?void 0:t.map(o.default.toJSON),attributes:this.attributes?JSON.stringify(this.attributes):this.attributes,context:this.context?JSON.stringify(this.context):this.context,resolvedBy:this.resolvedBy,createdAt:null===(n=this.createdAt)||void 0===n?void 0:n.toISOString(),deletedAt:null===(r=this.deletedAt)||void 0===r?void 0:r.toISOString(),resolvedAt:null===(s=this.resolvedAt)||void 0===s?void 0:s.toISOString(),unlinkedAt:null===(i=this.unlinkedAt)||void 0===i?void 0:i.toISOString()}}static fromJSON(e){var t,n;return new i(e.commentThreadId,null===(t=e.comments)||void 0===t?void 0:t.map((e=>function(e){const t=JSON.parse(e);return{...t,createdAt:new Date(t.createdAt)}}(e))),null===(n=e.commentsV2)||void 0===n?void 0:n.map(o.default.fromJSON),e.attributes?JSON.parse(e.attributes):e.attributes,e.resolvedBy,e.context?JSON.parse(e.context):e.context,e.createdAt,e.deletedAt,e.resolvedAt,e.unlinkedAt)}}t.default=i,i.DESCRIPTOR_NAME="CommentsV2GetCommentThreadResponse",i.DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},comments:{type:"string",rule:"repeated",id:2},commentsV2:{type:"CommentDescriptor",rule:"repeated",id:3},resolvedAt:{type:"string",id:4},resolvedBy:{type:"string",id:5},context:{type:"string",id:6},createdAt:{type:"string",id:7},deletedAt:{type:"string",id:8},attributes:{type:"string",id:9},unlinkedAt:{type:"string",id:10}}}},1973:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844)),o=r(n(5597));class i extends s.default{constructor(e,t){super(),this._threads=e,this._threadsV2=t,this.threads=(null==t?void 0:t.length)?t:e}toJSON(){var e,t;return{threads:null===(e=this._threads)||void 0===e?void 0:e.map((e=>JSON.stringify(e))),threadsV2:null===(t=this._threadsV2)||void 0===t?void 0:t.map(o.default.toJSON)}}static fromJSON(e){var t,n;return new i(null===(t=e.threads)||void 0===t?void 0:t.map((e=>function(e){var t;const n=JSON.parse(e),r={...n};return n.comments&&(r.comments=null===(t=n.comments)||void 0===t?void 0:t.map((e=>({...e,createdAt:new Date(e.createdAt)})))),r}(e))),null===(n=e.threadsV2)||void 0===n?void 0:n.map(o.default.fromJSON))}}t.default=i,i.DESCRIPTOR_NAME="CommentsV2GetDocumentThreadsResponse",i.DESCRIPTOR={fields:{threads:{type:"string",rule:"repeated",id:1},threadsV2:{type:"CommentsThreadDescriptor",rule:"repeated",id:2}}}},6504:(e,t,n)=>{var r,s,o,i;i=function(e){"use strict";var t=e.Reader,n=e.Writer,r=e.util,s=e.roots.default||(e.roots.default={});return s.OperationMetadataDescriptor=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.userId="",o.prototype.type="",o.prototype.createdAt="",o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.userId&&Object.hasOwnProperty.call(e,"userId")&&t.uint32(10).string(e.userId),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(18).string(e.type),null!=e.createdAt&&Object.hasOwnProperty.call(e,"createdAt")&&t.uint32(26).string(e.createdAt),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.OperationMetadataDescriptor;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.userId=e.string();break;case 2:o.type=e.string();break;case 3:o.createdAt=e.string();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.userId&&e.hasOwnProperty("userId")&&!r.isString(e.userId)?"userId: string expected":null!=e.type&&e.hasOwnProperty("type")&&!r.isString(e.type)?"type: string expected":null!=e.createdAt&&e.hasOwnProperty("createdAt")&&!r.isString(e.createdAt)?"createdAt: string expected":null},o.fromObject=function(e){if(e instanceof s.OperationMetadataDescriptor)return e;var t=new s.OperationMetadataDescriptor;return null!=e.userId&&(t.userId=String(e.userId)),null!=e.type&&(t.type=String(e.type)),null!=e.createdAt&&(t.createdAt=String(e.createdAt)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.userId="",n.type="",n.createdAt=""),null!=e.userId&&e.hasOwnProperty("userId")&&(n.userId=e.userId),null!=e.type&&e.hasOwnProperty("type")&&(n.type=e.type),null!=e.createdAt&&e.hasOwnProperty("createdAt")&&(n.createdAt=e.createdAt),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/OperationMetadataDescriptor"},o}(),s.CollaborativeEditingConnectMessage=function(){function o(e){if(this.buffers=[],this.types=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.id="",o.prototype.bundleVersion="",o.prototype.buffers=r.emptyArray,o.prototype.types=r.emptyArray,o.prototype.lastOperationId="",o.create=function(e){return new o(e)},o.encode=function(e,t){if(t||(t=n.create()),null!=e.id&&Object.hasOwnProperty.call(e,"id")&&t.uint32(10).string(e.id),null!=e.bundleVersion&&Object.hasOwnProperty.call(e,"bundleVersion")&&t.uint32(18).string(e.bundleVersion),null!=e.buffers&&e.buffers.length)for(var r=0;r<e.buffers.length;++r)t.uint32(26).bytes(e.buffers[r]);if(null!=e.types&&e.types.length){for(t.uint32(34).fork(),r=0;r<e.types.length;++r)t.uint32(e.types[r]);t.ldelim()}return null!=e.lastOperationId&&Object.hasOwnProperty.call(e,"lastOperationId")&&t.uint32(42).string(e.lastOperationId),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.CollaborativeEditingConnectMessage;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.id=e.string();break;case 2:o.bundleVersion=e.string();break;case 3:o.buffers&&o.buffers.length||(o.buffers=[]),o.buffers.push(e.bytes());break;case 4:if(o.types&&o.types.length||(o.types=[]),2==(7&i))for(var a=e.uint32()+e.pos;e.pos<a;)o.types.push(e.uint32());else o.types.push(e.uint32());break;case 5:o.lastOperationId=e.string();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.id&&e.hasOwnProperty("id")&&!r.isString(e.id))return"id: string expected";if(null!=e.bundleVersion&&e.hasOwnProperty("bundleVersion")&&!r.isString(e.bundleVersion))return"bundleVersion: string expected";if(null!=e.buffers&&e.hasOwnProperty("buffers")){if(!Array.isArray(e.buffers))return"buffers: array expected";for(var t=0;t<e.buffers.length;++t)if(!(e.buffers[t]&&"number"==typeof e.buffers[t].length||r.isString(e.buffers[t])))return"buffers: buffer[] expected"}if(null!=e.types&&e.hasOwnProperty("types")){if(!Array.isArray(e.types))return"types: array expected";for(t=0;t<e.types.length;++t)if(!r.isInteger(e.types[t]))return"types: integer[] expected"}return null!=e.lastOperationId&&e.hasOwnProperty("lastOperationId")&&!r.isString(e.lastOperationId)?"lastOperationId: string expected":null},o.fromObject=function(e){if(e instanceof s.CollaborativeEditingConnectMessage)return e;var t=new s.CollaborativeEditingConnectMessage;if(null!=e.id&&(t.id=String(e.id)),null!=e.bundleVersion&&(t.bundleVersion=String(e.bundleVersion)),e.buffers){if(!Array.isArray(e.buffers))throw TypeError(".CollaborativeEditingConnectMessage.buffers: array expected");t.buffers=[];for(var n=0;n<e.buffers.length;++n)"string"==typeof e.buffers[n]?r.base64.decode(e.buffers[n],t.buffers[n]=r.newBuffer(r.base64.length(e.buffers[n])),0):e.buffers[n].length>=0&&(t.buffers[n]=e.buffers[n])}if(e.types){if(!Array.isArray(e.types))throw TypeError(".CollaborativeEditingConnectMessage.types: array expected");for(t.types=[],n=0;n<e.types.length;++n)t.types[n]=e.types[n]>>>0}return null!=e.lastOperationId&&(t.lastOperationId=String(e.lastOperationId)),t},o.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.buffers=[],n.types=[]),t.defaults&&(n.id="",n.bundleVersion="",n.lastOperationId=""),null!=e.id&&e.hasOwnProperty("id")&&(n.id=e.id),null!=e.bundleVersion&&e.hasOwnProperty("bundleVersion")&&(n.bundleVersion=e.bundleVersion),e.buffers&&e.buffers.length){n.buffers=[];for(var s=0;s<e.buffers.length;++s)n.buffers[s]=t.bytes===String?r.base64.encode(e.buffers[s],0,e.buffers[s].length):t.bytes===Array?Array.prototype.slice.call(e.buffers[s]):e.buffers[s]}if(e.types&&e.types.length)for(n.types=[],s=0;s<e.types.length;++s)n.types[s]=e.types[s];return null!=e.lastOperationId&&e.hasOwnProperty("lastOperationId")&&(n.lastOperationId=e.lastOperationId),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/CollaborativeEditingConnectMessage"},o}(),s.CollaborativeEditingReconnectMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.id="",o.prototype.bundleVersion="",o.prototype.lastKnowVersion=0,o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.id&&Object.hasOwnProperty.call(e,"id")&&t.uint32(10).string(e.id),null!=e.bundleVersion&&Object.hasOwnProperty.call(e,"bundleVersion")&&t.uint32(18).string(e.bundleVersion),null!=e.lastKnowVersion&&Object.hasOwnProperty.call(e,"lastKnowVersion")&&t.uint32(24).uint32(e.lastKnowVersion),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.CollaborativeEditingReconnectMessage;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.id=e.string();break;case 2:o.bundleVersion=e.string();break;case 3:o.lastKnowVersion=e.uint32();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.id&&e.hasOwnProperty("id")&&!r.isString(e.id)?"id: string expected":null!=e.bundleVersion&&e.hasOwnProperty("bundleVersion")&&!r.isString(e.bundleVersion)?"bundleVersion: string expected":null!=e.lastKnowVersion&&e.hasOwnProperty("lastKnowVersion")&&!r.isInteger(e.lastKnowVersion)?"lastKnowVersion: integer expected":null},o.fromObject=function(e){if(e instanceof s.CollaborativeEditingReconnectMessage)return e;var t=new s.CollaborativeEditingReconnectMessage;return null!=e.id&&(t.id=String(e.id)),null!=e.bundleVersion&&(t.bundleVersion=String(e.bundleVersion)),null!=e.lastKnowVersion&&(t.lastKnowVersion=e.lastKnowVersion>>>0),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.id="",n.bundleVersion="",n.lastKnowVersion=0),null!=e.id&&e.hasOwnProperty("id")&&(n.id=e.id),null!=e.bundleVersion&&e.hasOwnProperty("bundleVersion")&&(n.bundleVersion=e.bundleVersion),null!=e.lastKnowVersion&&e.hasOwnProperty("lastKnowVersion")&&(n.lastKnowVersion=e.lastKnowVersion),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/CollaborativeEditingReconnectMessage"},o}(),s.CollaborativeEditingUpdateMessage=function(){function o(e){if(this.buffers=[],this.types=[],this.metadata=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.id="",o.prototype.baseVersion=0,o.prototype.buffers=r.emptyArray,o.prototype.types=r.emptyArray,o.prototype.metadata=r.emptyArray,o.prototype.lastOperationId="",o.create=function(e){return new o(e)},o.encode=function(e,t){if(t||(t=n.create()),null!=e.id&&Object.hasOwnProperty.call(e,"id")&&t.uint32(10).string(e.id),null!=e.baseVersion&&Object.hasOwnProperty.call(e,"baseVersion")&&t.uint32(16).uint32(e.baseVersion),null!=e.buffers&&e.buffers.length)for(var r=0;r<e.buffers.length;++r)t.uint32(26).bytes(e.buffers[r]);if(null!=e.types&&e.types.length){for(t.uint32(34).fork(),r=0;r<e.types.length;++r)t.uint32(e.types[r]);t.ldelim()}if(null!=e.metadata&&e.metadata.length)for(r=0;r<e.metadata.length;++r)s.OperationMetadataDescriptor.encode(e.metadata[r],t.uint32(50).fork()).ldelim();return null!=e.lastOperationId&&Object.hasOwnProperty.call(e,"lastOperationId")&&t.uint32(58).string(e.lastOperationId),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.CollaborativeEditingUpdateMessage;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.id=e.string();break;case 2:o.baseVersion=e.uint32();break;case 3:o.buffers&&o.buffers.length||(o.buffers=[]),o.buffers.push(e.bytes());break;case 4:if(o.types&&o.types.length||(o.types=[]),2==(7&i))for(var a=e.uint32()+e.pos;e.pos<a;)o.types.push(e.uint32());else o.types.push(e.uint32());break;case 6:o.metadata&&o.metadata.length||(o.metadata=[]),o.metadata.push(s.OperationMetadataDescriptor.decode(e,e.uint32()));break;case 7:o.lastOperationId=e.string();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.id&&e.hasOwnProperty("id")&&!r.isString(e.id))return"id: string expected";if(null!=e.baseVersion&&e.hasOwnProperty("baseVersion")&&!r.isInteger(e.baseVersion))return"baseVersion: integer expected";if(null!=e.buffers&&e.hasOwnProperty("buffers")){if(!Array.isArray(e.buffers))return"buffers: array expected";for(var t=0;t<e.buffers.length;++t)if(!(e.buffers[t]&&"number"==typeof e.buffers[t].length||r.isString(e.buffers[t])))return"buffers: buffer[] expected"}if(null!=e.types&&e.hasOwnProperty("types")){if(!Array.isArray(e.types))return"types: array expected";for(t=0;t<e.types.length;++t)if(!r.isInteger(e.types[t]))return"types: integer[] expected"}if(null!=e.metadata&&e.hasOwnProperty("metadata")){if(!Array.isArray(e.metadata))return"metadata: array expected";for(t=0;t<e.metadata.length;++t){var n=s.OperationMetadataDescriptor.verify(e.metadata[t]);if(n)return"metadata."+n}}return null!=e.lastOperationId&&e.hasOwnProperty("lastOperationId")&&!r.isString(e.lastOperationId)?"lastOperationId: string expected":null},o.fromObject=function(e){if(e instanceof s.CollaborativeEditingUpdateMessage)return e;var t=new s.CollaborativeEditingUpdateMessage;if(null!=e.id&&(t.id=String(e.id)),null!=e.baseVersion&&(t.baseVersion=e.baseVersion>>>0),e.buffers){if(!Array.isArray(e.buffers))throw TypeError(".CollaborativeEditingUpdateMessage.buffers: array expected");t.buffers=[];for(var n=0;n<e.buffers.length;++n)"string"==typeof e.buffers[n]?r.base64.decode(e.buffers[n],t.buffers[n]=r.newBuffer(r.base64.length(e.buffers[n])),0):e.buffers[n].length>=0&&(t.buffers[n]=e.buffers[n])}if(e.types){if(!Array.isArray(e.types))throw TypeError(".CollaborativeEditingUpdateMessage.types: array expected");for(t.types=[],n=0;n<e.types.length;++n)t.types[n]=e.types[n]>>>0}if(e.metadata){if(!Array.isArray(e.metadata))throw TypeError(".CollaborativeEditingUpdateMessage.metadata: array expected");for(t.metadata=[],n=0;n<e.metadata.length;++n){if("object"!=typeof e.metadata[n])throw TypeError(".CollaborativeEditingUpdateMessage.metadata: object expected");t.metadata[n]=s.OperationMetadataDescriptor.fromObject(e.metadata[n])}}return null!=e.lastOperationId&&(t.lastOperationId=String(e.lastOperationId)),t},o.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.buffers=[],n.types=[],n.metadata=[]),t.defaults&&(n.id="",n.baseVersion=0,n.lastOperationId=""),null!=e.id&&e.hasOwnProperty("id")&&(n.id=e.id),null!=e.baseVersion&&e.hasOwnProperty("baseVersion")&&(n.baseVersion=e.baseVersion),e.buffers&&e.buffers.length){n.buffers=[];for(var o=0;o<e.buffers.length;++o)n.buffers[o]=t.bytes===String?r.base64.encode(e.buffers[o],0,e.buffers[o].length):t.bytes===Array?Array.prototype.slice.call(e.buffers[o]):e.buffers[o]}if(e.types&&e.types.length)for(n.types=[],o=0;o<e.types.length;++o)n.types[o]=e.types[o];if(e.metadata&&e.metadata.length)for(n.metadata=[],o=0;o<e.metadata.length;++o)n.metadata[o]=s.OperationMetadataDescriptor.toObject(e.metadata[o],t);return null!=e.lastOperationId&&e.hasOwnProperty("lastOperationId")&&(n.lastOperationId=e.lastOperationId),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/CollaborativeEditingUpdateMessage"},o}(),s.GetDocumentDetailsMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.documentId="",o.prototype.environmentId="",o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.documentId&&Object.hasOwnProperty.call(e,"documentId")&&t.uint32(10).string(e.documentId),null!=e.environmentId&&Object.hasOwnProperty.call(e,"environmentId")&&t.uint32(18).string(e.environmentId),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.GetDocumentDetailsMessage;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.documentId=e.string();break;case 2:o.environmentId=e.string();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.documentId&&e.hasOwnProperty("documentId")&&!r.isString(e.documentId)?"documentId: string expected":null!=e.environmentId&&e.hasOwnProperty("environmentId")&&!r.isString(e.environmentId)?"environmentId: string expected":null},o.fromObject=function(e){if(e instanceof s.GetDocumentDetailsMessage)return e;var t=new s.GetDocumentDetailsMessage;return null!=e.documentId&&(t.documentId=String(e.documentId)),null!=e.environmentId&&(t.environmentId=String(e.environmentId)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.documentId="",n.environmentId=""),null!=e.documentId&&e.hasOwnProperty("documentId")&&(n.documentId=e.documentId),null!=e.environmentId&&e.hasOwnProperty("environmentId")&&(n.environmentId=e.environmentId),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/GetDocumentDetailsMessage"},o}(),s.CollaborativeEditingConnectResponse=function(){function o(e){if(this.buffers=[],this.types=[],this.metadata=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.channel="",o.prototype.offset=0,o.prototype.version=0,o.prototype.buffers=r.emptyArray,o.prototype.types=r.emptyArray,o.prototype.metadata=r.emptyArray,o.prototype.initData="",o.prototype.isInitialized=!1,o.prototype.sessionId="",o.prototype.lastOperationId="",o.prototype.sessionCreatedAt="",o.create=function(e){return new o(e)},o.encode=function(e,t){if(t||(t=n.create()),null!=e.channel&&Object.hasOwnProperty.call(e,"channel")&&t.uint32(10).string(e.channel),null!=e.offset&&Object.hasOwnProperty.call(e,"offset")&&t.uint32(16).uint32(e.offset),null!=e.version&&Object.hasOwnProperty.call(e,"version")&&t.uint32(24).uint32(e.version),null!=e.buffers&&e.buffers.length)for(var r=0;r<e.buffers.length;++r)t.uint32(34).bytes(e.buffers[r]);if(null!=e.types&&e.types.length){for(t.uint32(42).fork(),r=0;r<e.types.length;++r)t.uint32(e.types[r]);t.ldelim()}if(null!=e.metadata&&e.metadata.length)for(r=0;r<e.metadata.length;++r)s.OperationMetadataDescriptor.encode(e.metadata[r],t.uint32(58).fork()).ldelim();return null!=e.initData&&Object.hasOwnProperty.call(e,"initData")&&t.uint32(66).string(e.initData),null!=e.isInitialized&&Object.hasOwnProperty.call(e,"isInitialized")&&t.uint32(72).bool(e.isInitialized),null!=e.sessionId&&Object.hasOwnProperty.call(e,"sessionId")&&t.uint32(82).string(e.sessionId),null!=e.lastOperationId&&Object.hasOwnProperty.call(e,"lastOperationId")&&t.uint32(90).string(e.lastOperationId),null!=e.sessionCreatedAt&&Object.hasOwnProperty.call(e,"sessionCreatedAt")&&t.uint32(98).string(e.sessionCreatedAt),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.CollaborativeEditingConnectResponse;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.channel=e.string();break;case 2:o.offset=e.uint32();break;case 3:o.version=e.uint32();break;case 4:o.buffers&&o.buffers.length||(o.buffers=[]),o.buffers.push(e.bytes());break;case 5:if(o.types&&o.types.length||(o.types=[]),2==(7&i))for(var a=e.uint32()+e.pos;e.pos<a;)o.types.push(e.uint32());else o.types.push(e.uint32());break;case 7:o.metadata&&o.metadata.length||(o.metadata=[]),o.metadata.push(s.OperationMetadataDescriptor.decode(e,e.uint32()));break;case 8:o.initData=e.string();break;case 9:o.isInitialized=e.bool();break;case 10:o.sessionId=e.string();break;case 11:o.lastOperationId=e.string();break;case 12:o.sessionCreatedAt=e.string();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.channel&&e.hasOwnProperty("channel")&&!r.isString(e.channel))return"channel: string expected";if(null!=e.offset&&e.hasOwnProperty("offset")&&!r.isInteger(e.offset))return"offset: integer expected";if(null!=e.version&&e.hasOwnProperty("version")&&!r.isInteger(e.version))return"version: integer expected";if(null!=e.buffers&&e.hasOwnProperty("buffers")){if(!Array.isArray(e.buffers))return"buffers: array expected";for(var t=0;t<e.buffers.length;++t)if(!(e.buffers[t]&&"number"==typeof e.buffers[t].length||r.isString(e.buffers[t])))return"buffers: buffer[] expected"}if(null!=e.types&&e.hasOwnProperty("types")){if(!Array.isArray(e.types))return"types: array expected";for(t=0;t<e.types.length;++t)if(!r.isInteger(e.types[t]))return"types: integer[] expected"}if(null!=e.metadata&&e.hasOwnProperty("metadata")){if(!Array.isArray(e.metadata))return"metadata: array expected";for(t=0;t<e.metadata.length;++t){var n=s.OperationMetadataDescriptor.verify(e.metadata[t]);if(n)return"metadata."+n}}return null!=e.initData&&e.hasOwnProperty("initData")&&!r.isString(e.initData)?"initData: string expected":null!=e.isInitialized&&e.hasOwnProperty("isInitialized")&&"boolean"!=typeof e.isInitialized?"isInitialized: boolean expected":null!=e.sessionId&&e.hasOwnProperty("sessionId")&&!r.isString(e.sessionId)?"sessionId: string expected":null!=e.lastOperationId&&e.hasOwnProperty("lastOperationId")&&!r.isString(e.lastOperationId)?"lastOperationId: string expected":null!=e.sessionCreatedAt&&e.hasOwnProperty("sessionCreatedAt")&&!r.isString(e.sessionCreatedAt)?"sessionCreatedAt: string expected":null},o.fromObject=function(e){if(e instanceof s.CollaborativeEditingConnectResponse)return e;var t=new s.CollaborativeEditingConnectResponse;if(null!=e.channel&&(t.channel=String(e.channel)),null!=e.offset&&(t.offset=e.offset>>>0),null!=e.version&&(t.version=e.version>>>0),e.buffers){if(!Array.isArray(e.buffers))throw TypeError(".CollaborativeEditingConnectResponse.buffers: array expected");t.buffers=[];for(var n=0;n<e.buffers.length;++n)"string"==typeof e.buffers[n]?r.base64.decode(e.buffers[n],t.buffers[n]=r.newBuffer(r.base64.length(e.buffers[n])),0):e.buffers[n].length>=0&&(t.buffers[n]=e.buffers[n])}if(e.types){if(!Array.isArray(e.types))throw TypeError(".CollaborativeEditingConnectResponse.types: array expected");for(t.types=[],n=0;n<e.types.length;++n)t.types[n]=e.types[n]>>>0}if(e.metadata){if(!Array.isArray(e.metadata))throw TypeError(".CollaborativeEditingConnectResponse.metadata: array expected");for(t.metadata=[],n=0;n<e.metadata.length;++n){if("object"!=typeof e.metadata[n])throw TypeError(".CollaborativeEditingConnectResponse.metadata: object expected");t.metadata[n]=s.OperationMetadataDescriptor.fromObject(e.metadata[n])}}return null!=e.initData&&(t.initData=String(e.initData)),null!=e.isInitialized&&(t.isInitialized=Boolean(e.isInitialized)),null!=e.sessionId&&(t.sessionId=String(e.sessionId)),null!=e.lastOperationId&&(t.lastOperationId=String(e.lastOperationId)),null!=e.sessionCreatedAt&&(t.sessionCreatedAt=String(e.sessionCreatedAt)),t},o.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.buffers=[],n.types=[],n.metadata=[]),t.defaults&&(n.channel="",n.offset=0,n.version=0,n.initData="",n.isInitialized=!1,n.sessionId="",n.lastOperationId="",n.sessionCreatedAt=""),null!=e.channel&&e.hasOwnProperty("channel")&&(n.channel=e.channel),null!=e.offset&&e.hasOwnProperty("offset")&&(n.offset=e.offset),null!=e.version&&e.hasOwnProperty("version")&&(n.version=e.version),e.buffers&&e.buffers.length){n.buffers=[];for(var o=0;o<e.buffers.length;++o)n.buffers[o]=t.bytes===String?r.base64.encode(e.buffers[o],0,e.buffers[o].length):t.bytes===Array?Array.prototype.slice.call(e.buffers[o]):e.buffers[o]}if(e.types&&e.types.length)for(n.types=[],o=0;o<e.types.length;++o)n.types[o]=e.types[o];if(e.metadata&&e.metadata.length)for(n.metadata=[],o=0;o<e.metadata.length;++o)n.metadata[o]=s.OperationMetadataDescriptor.toObject(e.metadata[o],t);return null!=e.initData&&e.hasOwnProperty("initData")&&(n.initData=e.initData),null!=e.isInitialized&&e.hasOwnProperty("isInitialized")&&(n.isInitialized=e.isInitialized),null!=e.sessionId&&e.hasOwnProperty("sessionId")&&(n.sessionId=e.sessionId),null!=e.lastOperationId&&e.hasOwnProperty("lastOperationId")&&(n.lastOperationId=e.lastOperationId),null!=e.sessionCreatedAt&&e.hasOwnProperty("sessionCreatedAt")&&(n.sessionCreatedAt=e.sessionCreatedAt),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/CollaborativeEditingConnectResponse"},o}(),s.CollaborativeEditingResponse=function(){function o(e){if(this.buffers=[],this.types=[],this.metadata=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.version=0,o.prototype.buffers=r.emptyArray,o.prototype.types=r.emptyArray,o.prototype.metadata=r.emptyArray,o.prototype.lastOperationId="",o.prototype.lastOperationAcceptedAt="",o.create=function(e){return new o(e)},o.encode=function(e,t){if(t||(t=n.create()),null!=e.version&&Object.hasOwnProperty.call(e,"version")&&t.uint32(8).uint32(e.version),null!=e.buffers&&e.buffers.length)for(var r=0;r<e.buffers.length;++r)t.uint32(18).bytes(e.buffers[r]);if(null!=e.types&&e.types.length){for(t.uint32(26).fork(),r=0;r<e.types.length;++r)t.uint32(e.types[r]);t.ldelim()}if(null!=e.metadata&&e.metadata.length)for(r=0;r<e.metadata.length;++r)s.OperationMetadataDescriptor.encode(e.metadata[r],t.uint32(42).fork()).ldelim();return null!=e.lastOperationId&&Object.hasOwnProperty.call(e,"lastOperationId")&&t.uint32(50).string(e.lastOperationId),null!=e.lastOperationAcceptedAt&&Object.hasOwnProperty.call(e,"lastOperationAcceptedAt")&&t.uint32(58).string(e.lastOperationAcceptedAt),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.CollaborativeEditingResponse;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.version=e.uint32();break;case 2:o.buffers&&o.buffers.length||(o.buffers=[]),o.buffers.push(e.bytes());break;case 3:if(o.types&&o.types.length||(o.types=[]),2==(7&i))for(var a=e.uint32()+e.pos;e.pos<a;)o.types.push(e.uint32());else o.types.push(e.uint32());break;case 5:o.metadata&&o.metadata.length||(o.metadata=[]),o.metadata.push(s.OperationMetadataDescriptor.decode(e,e.uint32()));break;case 6:o.lastOperationId=e.string();break;case 7:o.lastOperationAcceptedAt=e.string();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.version&&e.hasOwnProperty("version")&&!r.isInteger(e.version))return"version: integer expected";if(null!=e.buffers&&e.hasOwnProperty("buffers")){if(!Array.isArray(e.buffers))return"buffers: array expected";for(var t=0;t<e.buffers.length;++t)if(!(e.buffers[t]&&"number"==typeof e.buffers[t].length||r.isString(e.buffers[t])))return"buffers: buffer[] expected"}if(null!=e.types&&e.hasOwnProperty("types")){if(!Array.isArray(e.types))return"types: array expected";for(t=0;t<e.types.length;++t)if(!r.isInteger(e.types[t]))return"types: integer[] expected"}if(null!=e.metadata&&e.hasOwnProperty("metadata")){if(!Array.isArray(e.metadata))return"metadata: array expected";for(t=0;t<e.metadata.length;++t){var n=s.OperationMetadataDescriptor.verify(e.metadata[t]);if(n)return"metadata."+n}}return null!=e.lastOperationId&&e.hasOwnProperty("lastOperationId")&&!r.isString(e.lastOperationId)?"lastOperationId: string expected":null!=e.lastOperationAcceptedAt&&e.hasOwnProperty("lastOperationAcceptedAt")&&!r.isString(e.lastOperationAcceptedAt)?"lastOperationAcceptedAt: string expected":null},o.fromObject=function(e){if(e instanceof s.CollaborativeEditingResponse)return e;var t=new s.CollaborativeEditingResponse;if(null!=e.version&&(t.version=e.version>>>0),e.buffers){if(!Array.isArray(e.buffers))throw TypeError(".CollaborativeEditingResponse.buffers: array expected");t.buffers=[];for(var n=0;n<e.buffers.length;++n)"string"==typeof e.buffers[n]?r.base64.decode(e.buffers[n],t.buffers[n]=r.newBuffer(r.base64.length(e.buffers[n])),0):e.buffers[n].length>=0&&(t.buffers[n]=e.buffers[n])}if(e.types){if(!Array.isArray(e.types))throw TypeError(".CollaborativeEditingResponse.types: array expected");for(t.types=[],n=0;n<e.types.length;++n)t.types[n]=e.types[n]>>>0}if(e.metadata){if(!Array.isArray(e.metadata))throw TypeError(".CollaborativeEditingResponse.metadata: array expected");for(t.metadata=[],n=0;n<e.metadata.length;++n){if("object"!=typeof e.metadata[n])throw TypeError(".CollaborativeEditingResponse.metadata: object expected");t.metadata[n]=s.OperationMetadataDescriptor.fromObject(e.metadata[n])}}return null!=e.lastOperationId&&(t.lastOperationId=String(e.lastOperationId)),null!=e.lastOperationAcceptedAt&&(t.lastOperationAcceptedAt=String(e.lastOperationAcceptedAt)),t},o.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.buffers=[],n.types=[],n.metadata=[]),t.defaults&&(n.version=0,n.lastOperationId="",n.lastOperationAcceptedAt=""),null!=e.version&&e.hasOwnProperty("version")&&(n.version=e.version),e.buffers&&e.buffers.length){n.buffers=[];for(var o=0;o<e.buffers.length;++o)n.buffers[o]=t.bytes===String?r.base64.encode(e.buffers[o],0,e.buffers[o].length):t.bytes===Array?Array.prototype.slice.call(e.buffers[o]):e.buffers[o]}if(e.types&&e.types.length)for(n.types=[],o=0;o<e.types.length;++o)n.types[o]=e.types[o];if(e.metadata&&e.metadata.length)for(n.metadata=[],o=0;o<e.metadata.length;++o)n.metadata[o]=s.OperationMetadataDescriptor.toObject(e.metadata[o],t);return null!=e.lastOperationId&&e.hasOwnProperty("lastOperationId")&&(n.lastOperationId=e.lastOperationId),null!=e.lastOperationAcceptedAt&&e.hasOwnProperty("lastOperationAcceptedAt")&&(n.lastOperationAcceptedAt=e.lastOperationAcceptedAt),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/CollaborativeEditingResponse"},o}(),s.GetDocumentDetailsResponse=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.lastDocumentSessionId="",o.prototype.lastDocumentSessionOperationId="",o.prototype.currentDocumentSessionId="",o.prototype.currentDocumentSessionVersion=0,o.prototype.currentDocumentSessionOperationId="",o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.lastDocumentSessionId&&Object.hasOwnProperty.call(e,"lastDocumentSessionId")&&t.uint32(10).string(e.lastDocumentSessionId),null!=e.lastDocumentSessionOperationId&&Object.hasOwnProperty.call(e,"lastDocumentSessionOperationId")&&t.uint32(18).string(e.lastDocumentSessionOperationId),null!=e.currentDocumentSessionId&&Object.hasOwnProperty.call(e,"currentDocumentSessionId")&&t.uint32(26).string(e.currentDocumentSessionId),null!=e.currentDocumentSessionVersion&&Object.hasOwnProperty.call(e,"currentDocumentSessionVersion")&&t.uint32(32).uint32(e.currentDocumentSessionVersion),null!=e.currentDocumentSessionOperationId&&Object.hasOwnProperty.call(e,"currentDocumentSessionOperationId")&&t.uint32(42).string(e.currentDocumentSessionOperationId),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.GetDocumentDetailsResponse;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.lastDocumentSessionId=e.string();break;case 2:o.lastDocumentSessionOperationId=e.string();break;case 3:o.currentDocumentSessionId=e.string();break;case 4:o.currentDocumentSessionVersion=e.uint32();break;case 5:o.currentDocumentSessionOperationId=e.string();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.lastDocumentSessionId&&e.hasOwnProperty("lastDocumentSessionId")&&!r.isString(e.lastDocumentSessionId)?"lastDocumentSessionId: string expected":null!=e.lastDocumentSessionOperationId&&e.hasOwnProperty("lastDocumentSessionOperationId")&&!r.isString(e.lastDocumentSessionOperationId)?"lastDocumentSessionOperationId: string expected":null!=e.currentDocumentSessionId&&e.hasOwnProperty("currentDocumentSessionId")&&!r.isString(e.currentDocumentSessionId)?"currentDocumentSessionId: string expected":null!=e.currentDocumentSessionVersion&&e.hasOwnProperty("currentDocumentSessionVersion")&&!r.isInteger(e.currentDocumentSessionVersion)?"currentDocumentSessionVersion: integer expected":null!=e.currentDocumentSessionOperationId&&e.hasOwnProperty("currentDocumentSessionOperationId")&&!r.isString(e.currentDocumentSessionOperationId)?"currentDocumentSessionOperationId: string expected":null},o.fromObject=function(e){if(e instanceof s.GetDocumentDetailsResponse)return e;var t=new s.GetDocumentDetailsResponse;return null!=e.lastDocumentSessionId&&(t.lastDocumentSessionId=String(e.lastDocumentSessionId)),null!=e.lastDocumentSessionOperationId&&(t.lastDocumentSessionOperationId=String(e.lastDocumentSessionOperationId)),null!=e.currentDocumentSessionId&&(t.currentDocumentSessionId=String(e.currentDocumentSessionId)),null!=e.currentDocumentSessionVersion&&(t.currentDocumentSessionVersion=e.currentDocumentSessionVersion>>>0),null!=e.currentDocumentSessionOperationId&&(t.currentDocumentSessionOperationId=String(e.currentDocumentSessionOperationId)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.lastDocumentSessionId="",n.lastDocumentSessionOperationId="",n.currentDocumentSessionId="",n.currentDocumentSessionVersion=0,n.currentDocumentSessionOperationId=""),null!=e.lastDocumentSessionId&&e.hasOwnProperty("lastDocumentSessionId")&&(n.lastDocumentSessionId=e.lastDocumentSessionId),null!=e.lastDocumentSessionOperationId&&e.hasOwnProperty("lastDocumentSessionOperationId")&&(n.lastDocumentSessionOperationId=e.lastDocumentSessionOperationId),null!=e.currentDocumentSessionId&&e.hasOwnProperty("currentDocumentSessionId")&&(n.currentDocumentSessionId=e.currentDocumentSessionId),null!=e.currentDocumentSessionVersion&&e.hasOwnProperty("currentDocumentSessionVersion")&&(n.currentDocumentSessionVersion=e.currentDocumentSessionVersion),null!=e.currentDocumentSessionOperationId&&e.hasOwnProperty("currentDocumentSessionOperationId")&&(n.currentDocumentSessionOperationId=e.currentDocumentSessionOperationId),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/GetDocumentDetailsResponse"},o}(),s.CommentDescriptor=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.commentId="",o.prototype.commentThreadId="",o.prototype.userId="",o.prototype.content="",o.prototype.documentId="",o.prototype.createdAt="",o.prototype.attributes="",o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.commentId&&Object.hasOwnProperty.call(e,"commentId")&&t.uint32(10).string(e.commentId),null!=e.commentThreadId&&Object.hasOwnProperty.call(e,"commentThreadId")&&t.uint32(18).string(e.commentThreadId),null!=e.userId&&Object.hasOwnProperty.call(e,"userId")&&t.uint32(26).string(e.userId),null!=e.content&&Object.hasOwnProperty.call(e,"content")&&t.uint32(34).string(e.content),null!=e.documentId&&Object.hasOwnProperty.call(e,"documentId")&&t.uint32(42).string(e.documentId),null!=e.createdAt&&Object.hasOwnProperty.call(e,"createdAt")&&t.uint32(50).string(e.createdAt),null!=e.attributes&&Object.hasOwnProperty.call(e,"attributes")&&t.uint32(58).string(e.attributes),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.CommentDescriptor;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.commentId=e.string();break;case 2:o.commentThreadId=e.string();break;case 3:o.userId=e.string();break;case 4:o.content=e.string();break;case 5:o.documentId=e.string();break;case 6:o.createdAt=e.string();break;case 7:o.attributes=e.string();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.commentId&&e.hasOwnProperty("commentId")&&!r.isString(e.commentId)?"commentId: string expected":null!=e.commentThreadId&&e.hasOwnProperty("commentThreadId")&&!r.isString(e.commentThreadId)?"commentThreadId: string expected":null!=e.userId&&e.hasOwnProperty("userId")&&!r.isString(e.userId)?"userId: string expected":null!=e.content&&e.hasOwnProperty("content")&&!r.isString(e.content)?"content: string expected":null!=e.documentId&&e.hasOwnProperty("documentId")&&!r.isString(e.documentId)?"documentId: string expected":null!=e.createdAt&&e.hasOwnProperty("createdAt")&&!r.isString(e.createdAt)?"createdAt: string expected":null!=e.attributes&&e.hasOwnProperty("attributes")&&!r.isString(e.attributes)?"attributes: string expected":null},o.fromObject=function(e){if(e instanceof s.CommentDescriptor)return e;var t=new s.CommentDescriptor;return null!=e.commentId&&(t.commentId=String(e.commentId)),null!=e.commentThreadId&&(t.commentThreadId=String(e.commentThreadId)),null!=e.userId&&(t.userId=String(e.userId)),null!=e.content&&(t.content=String(e.content)),null!=e.documentId&&(t.documentId=String(e.documentId)),null!=e.createdAt&&(t.createdAt=String(e.createdAt)),null!=e.attributes&&(t.attributes=String(e.attributes)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.commentId="",n.commentThreadId="",n.userId="",n.content="",n.documentId="",n.createdAt="",n.attributes=""),null!=e.commentId&&e.hasOwnProperty("commentId")&&(n.commentId=e.commentId),null!=e.commentThreadId&&e.hasOwnProperty("commentThreadId")&&(n.commentThreadId=e.commentThreadId),null!=e.userId&&e.hasOwnProperty("userId")&&(n.userId=e.userId),null!=e.content&&e.hasOwnProperty("content")&&(n.content=e.content),null!=e.documentId&&e.hasOwnProperty("documentId")&&(n.documentId=e.documentId),null!=e.createdAt&&e.hasOwnProperty("createdAt")&&(n.createdAt=e.createdAt),null!=e.attributes&&e.hasOwnProperty("attributes")&&(n.attributes=e.attributes),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/CommentDescriptor"},o}(),s.CommentsThreadDescriptor=function(){function o(e){if(this.comments=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.commentThreadId="",o.prototype.comments=r.emptyArray,o.prototype.resolvedAt="",o.prototype.resolvedBy="",o.prototype.context="",o.prototype.createdAt="",o.prototype.deletedAt="",o.prototype.attributes="",o.prototype.unlinkedAt="",o.create=function(e){return new o(e)},o.encode=function(e,t){if(t||(t=n.create()),null!=e.commentThreadId&&Object.hasOwnProperty.call(e,"commentThreadId")&&t.uint32(10).string(e.commentThreadId),null!=e.comments&&e.comments.length)for(var r=0;r<e.comments.length;++r)s.CommentDescriptor.encode(e.comments[r],t.uint32(18).fork()).ldelim();return null!=e.resolvedAt&&Object.hasOwnProperty.call(e,"resolvedAt")&&t.uint32(26).string(e.resolvedAt),null!=e.resolvedBy&&Object.hasOwnProperty.call(e,"resolvedBy")&&t.uint32(34).string(e.resolvedBy),null!=e.context&&Object.hasOwnProperty.call(e,"context")&&t.uint32(42).string(e.context),null!=e.createdAt&&Object.hasOwnProperty.call(e,"createdAt")&&t.uint32(50).string(e.createdAt),null!=e.deletedAt&&Object.hasOwnProperty.call(e,"deletedAt")&&t.uint32(58).string(e.deletedAt),null!=e.attributes&&Object.hasOwnProperty.call(e,"attributes")&&t.uint32(66).string(e.attributes),null!=e.unlinkedAt&&Object.hasOwnProperty.call(e,"unlinkedAt")&&t.uint32(74).string(e.unlinkedAt),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.CommentsThreadDescriptor;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.commentThreadId=e.string();break;case 2:o.comments&&o.comments.length||(o.comments=[]),o.comments.push(s.CommentDescriptor.decode(e,e.uint32()));break;case 3:o.resolvedAt=e.string();break;case 4:o.resolvedBy=e.string();break;case 5:o.context=e.string();break;case 6:o.createdAt=e.string();break;case 7:o.deletedAt=e.string();break;case 8:o.attributes=e.string();break;case 9:o.unlinkedAt=e.string();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.commentThreadId&&e.hasOwnProperty("commentThreadId")&&!r.isString(e.commentThreadId))return"commentThreadId: string expected";if(null!=e.comments&&e.hasOwnProperty("comments")){if(!Array.isArray(e.comments))return"comments: array expected";for(var t=0;t<e.comments.length;++t){var n=s.CommentDescriptor.verify(e.comments[t]);if(n)return"comments."+n}}return null!=e.resolvedAt&&e.hasOwnProperty("resolvedAt")&&!r.isString(e.resolvedAt)?"resolvedAt: string expected":null!=e.resolvedBy&&e.hasOwnProperty("resolvedBy")&&!r.isString(e.resolvedBy)?"resolvedBy: string expected":null!=e.context&&e.hasOwnProperty("context")&&!r.isString(e.context)?"context: string expected":null!=e.createdAt&&e.hasOwnProperty("createdAt")&&!r.isString(e.createdAt)?"createdAt: string expected":null!=e.deletedAt&&e.hasOwnProperty("deletedAt")&&!r.isString(e.deletedAt)?"deletedAt: string expected":null!=e.attributes&&e.hasOwnProperty("attributes")&&!r.isString(e.attributes)?"attributes: string expected":null!=e.unlinkedAt&&e.hasOwnProperty("unlinkedAt")&&!r.isString(e.unlinkedAt)?"unlinkedAt: string expected":null},o.fromObject=function(e){if(e instanceof s.CommentsThreadDescriptor)return e;var t=new s.CommentsThreadDescriptor;if(null!=e.commentThreadId&&(t.commentThreadId=String(e.commentThreadId)),e.comments){if(!Array.isArray(e.comments))throw TypeError(".CommentsThreadDescriptor.comments: array expected");t.comments=[];for(var n=0;n<e.comments.length;++n){if("object"!=typeof e.comments[n])throw TypeError(".CommentsThreadDescriptor.comments: object expected");t.comments[n]=s.CommentDescriptor.fromObject(e.comments[n])}}return null!=e.resolvedAt&&(t.resolvedAt=String(e.resolvedAt)),null!=e.resolvedBy&&(t.resolvedBy=String(e.resolvedBy)),null!=e.context&&(t.context=String(e.context)),null!=e.createdAt&&(t.createdAt=String(e.createdAt)),null!=e.deletedAt&&(t.deletedAt=String(e.deletedAt)),null!=e.attributes&&(t.attributes=String(e.attributes)),null!=e.unlinkedAt&&(t.unlinkedAt=String(e.unlinkedAt)),t},o.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.comments=[]),t.defaults&&(n.commentThreadId="",n.resolvedAt="",n.resolvedBy="",n.context="",n.createdAt="",n.deletedAt="",n.attributes="",n.unlinkedAt=""),null!=e.commentThreadId&&e.hasOwnProperty("commentThreadId")&&(n.commentThreadId=e.commentThreadId),e.comments&&e.comments.length){n.comments=[];for(var r=0;r<e.comments.length;++r)n.comments[r]=s.CommentDescriptor.toObject(e.comments[r],t)}return null!=e.resolvedAt&&e.hasOwnProperty("resolvedAt")&&(n.resolvedAt=e.resolvedAt),null!=e.resolvedBy&&e.hasOwnProperty("resolvedBy")&&(n.resolvedBy=e.resolvedBy),null!=e.context&&e.hasOwnProperty("context")&&(n.context=e.context),null!=e.createdAt&&e.hasOwnProperty("createdAt")&&(n.createdAt=e.createdAt),null!=e.deletedAt&&e.hasOwnProperty("deletedAt")&&(n.deletedAt=e.deletedAt),null!=e.attributes&&e.hasOwnProperty("attributes")&&(n.attributes=e.attributes),null!=e.unlinkedAt&&e.hasOwnProperty("unlinkedAt")&&(n.unlinkedAt=e.unlinkedAt),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/CommentsThreadDescriptor"},o}(),s.CommentThreadAddedCommentDescriptor=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.commentId="",o.prototype.createdAt="",o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.commentId&&Object.hasOwnProperty.call(e,"commentId")&&t.uint32(10).string(e.commentId),null!=e.createdAt&&Object.hasOwnProperty.call(e,"createdAt")&&t.uint32(18).string(e.createdAt),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.CommentThreadAddedCommentDescriptor;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.commentId=e.string();break;case 2:o.createdAt=e.string();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.commentId&&e.hasOwnProperty("commentId")&&!r.isString(e.commentId)?"commentId: string expected":null!=e.createdAt&&e.hasOwnProperty("createdAt")&&!r.isString(e.createdAt)?"createdAt: string expected":null},o.fromObject=function(e){if(e instanceof s.CommentThreadAddedCommentDescriptor)return e;var t=new s.CommentThreadAddedCommentDescriptor;return null!=e.commentId&&(t.commentId=String(e.commentId)),null!=e.createdAt&&(t.createdAt=String(e.createdAt)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.commentId="",n.createdAt=""),null!=e.commentId&&e.hasOwnProperty("commentId")&&(n.commentId=e.commentId),null!=e.createdAt&&e.hasOwnProperty("createdAt")&&(n.createdAt=e.createdAt),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/CommentThreadAddedCommentDescriptor"},o}(),s.CommentsV2AddCommentMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.commentThreadId="",o.prototype.content="",o.prototype.documentId="",o.prototype.commentId="",o.prototype.createdAt="",o.prototype.userId="",o.prototype.attributes="",o.prototype.commentThread=null,o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.commentThreadId&&Object.hasOwnProperty.call(e,"commentThreadId")&&t.uint32(10).string(e.commentThreadId),null!=e.content&&Object.hasOwnProperty.call(e,"content")&&t.uint32(18).string(e.content),null!=e.documentId&&Object.hasOwnProperty.call(e,"documentId")&&t.uint32(26).string(e.documentId),null!=e.commentId&&Object.hasOwnProperty.call(e,"commentId")&&t.uint32(34).string(e.commentId),null!=e.createdAt&&Object.hasOwnProperty.call(e,"createdAt")&&t.uint32(42).string(e.createdAt),null!=e.userId&&Object.hasOwnProperty.call(e,"userId")&&t.uint32(50).string(e.userId),null!=e.attributes&&Object.hasOwnProperty.call(e,"attributes")&&t.uint32(58).string(e.attributes),null!=e.commentThread&&Object.hasOwnProperty.call(e,"commentThread")&&s.CommentsThreadDescriptor.encode(e.commentThread,t.uint32(66).fork()).ldelim(),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.CommentsV2AddCommentMessage;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.commentThreadId=e.string();break;case 2:o.content=e.string();break;case 3:o.documentId=e.string();break;case 4:o.commentId=e.string();break;case 5:o.createdAt=e.string();break;case 6:o.userId=e.string();break;case 7:o.attributes=e.string();break;case 8:o.commentThread=s.CommentsThreadDescriptor.decode(e,e.uint32());break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.commentThreadId&&e.hasOwnProperty("commentThreadId")&&!r.isString(e.commentThreadId))return"commentThreadId: string expected";if(null!=e.content&&e.hasOwnProperty("content")&&!r.isString(e.content))return"content: string expected";if(null!=e.documentId&&e.hasOwnProperty("documentId")&&!r.isString(e.documentId))return"documentId: string expected";if(null!=e.commentId&&e.hasOwnProperty("commentId")&&!r.isString(e.commentId))return"commentId: string expected";if(null!=e.createdAt&&e.hasOwnProperty("createdAt")&&!r.isString(e.createdAt))return"createdAt: string expected";if(null!=e.userId&&e.hasOwnProperty("userId")&&!r.isString(e.userId))return"userId: string expected";if(null!=e.attributes&&e.hasOwnProperty("attributes")&&!r.isString(e.attributes))return"attributes: string expected";if(null!=e.commentThread&&e.hasOwnProperty("commentThread")){var t=s.CommentsThreadDescriptor.verify(e.commentThread);if(t)return"commentThread."+t}return null},o.fromObject=function(e){if(e instanceof s.CommentsV2AddCommentMessage)return e;var t=new s.CommentsV2AddCommentMessage;if(null!=e.commentThreadId&&(t.commentThreadId=String(e.commentThreadId)),null!=e.content&&(t.content=String(e.content)),null!=e.documentId&&(t.documentId=String(e.documentId)),null!=e.commentId&&(t.commentId=String(e.commentId)),null!=e.createdAt&&(t.createdAt=String(e.createdAt)),null!=e.userId&&(t.userId=String(e.userId)),null!=e.attributes&&(t.attributes=String(e.attributes)),null!=e.commentThread){if("object"!=typeof e.commentThread)throw TypeError(".CommentsV2AddCommentMessage.commentThread: object expected");t.commentThread=s.CommentsThreadDescriptor.fromObject(e.commentThread)}return t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.commentThreadId="",n.content="",n.documentId="",n.commentId="",n.createdAt="",n.userId="",n.attributes="",n.commentThread=null),null!=e.commentThreadId&&e.hasOwnProperty("commentThreadId")&&(n.commentThreadId=e.commentThreadId),null!=e.content&&e.hasOwnProperty("content")&&(n.content=e.content),null!=e.documentId&&e.hasOwnProperty("documentId")&&(n.documentId=e.documentId),null!=e.commentId&&e.hasOwnProperty("commentId")&&(n.commentId=e.commentId),null!=e.createdAt&&e.hasOwnProperty("createdAt")&&(n.createdAt=e.createdAt),null!=e.userId&&e.hasOwnProperty("userId")&&(n.userId=e.userId),null!=e.attributes&&e.hasOwnProperty("attributes")&&(n.attributes=e.attributes),null!=e.commentThread&&e.hasOwnProperty("commentThread")&&(n.commentThread=s.CommentsThreadDescriptor.toObject(e.commentThread,t)),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/CommentsV2AddCommentMessage"},o}(),s.CommentsV2AddCommentThreadMessage=function(){function o(e){if(this.comments=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.documentId="",o.prototype.commentThreadId="",o.prototype.context="",o.prototype.createdAt="",o.prototype.resolvedAt="",o.prototype.resolvedBy="",o.prototype.attributes="",o.prototype.deletedAt="",o.prototype.comments=r.emptyArray,o.create=function(e){return new o(e)},o.encode=function(e,t){if(t||(t=n.create()),null!=e.documentId&&Object.hasOwnProperty.call(e,"documentId")&&t.uint32(10).string(e.documentId),null!=e.commentThreadId&&Object.hasOwnProperty.call(e,"commentThreadId")&&t.uint32(18).string(e.commentThreadId),null!=e.context&&Object.hasOwnProperty.call(e,"context")&&t.uint32(26).string(e.context),null!=e.createdAt&&Object.hasOwnProperty.call(e,"createdAt")&&t.uint32(34).string(e.createdAt),null!=e.resolvedAt&&Object.hasOwnProperty.call(e,"resolvedAt")&&t.uint32(42).string(e.resolvedAt),null!=e.resolvedBy&&Object.hasOwnProperty.call(e,"resolvedBy")&&t.uint32(50).string(e.resolvedBy),null!=e.attributes&&Object.hasOwnProperty.call(e,"attributes")&&t.uint32(58).string(e.attributes),null!=e.deletedAt&&Object.hasOwnProperty.call(e,"deletedAt")&&t.uint32(66).string(e.deletedAt),null!=e.comments&&e.comments.length)for(var r=0;r<e.comments.length;++r)s.CommentDescriptor.encode(e.comments[r],t.uint32(74).fork()).ldelim();return t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.CommentsV2AddCommentThreadMessage;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.documentId=e.string();break;case 2:o.commentThreadId=e.string();break;case 3:o.context=e.string();break;case 4:o.createdAt=e.string();break;case 5:o.resolvedAt=e.string();break;case 6:o.resolvedBy=e.string();break;case 7:o.attributes=e.string();break;case 8:o.deletedAt=e.string();break;case 9:o.comments&&o.comments.length||(o.comments=[]),o.comments.push(s.CommentDescriptor.decode(e,e.uint32()));break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.documentId&&e.hasOwnProperty("documentId")&&!r.isString(e.documentId))return"documentId: string expected";if(null!=e.commentThreadId&&e.hasOwnProperty("commentThreadId")&&!r.isString(e.commentThreadId))return"commentThreadId: string expected";if(null!=e.context&&e.hasOwnProperty("context")&&!r.isString(e.context))return"context: string expected";if(null!=e.createdAt&&e.hasOwnProperty("createdAt")&&!r.isString(e.createdAt))return"createdAt: string expected";if(null!=e.resolvedAt&&e.hasOwnProperty("resolvedAt")&&!r.isString(e.resolvedAt))return"resolvedAt: string expected";if(null!=e.resolvedBy&&e.hasOwnProperty("resolvedBy")&&!r.isString(e.resolvedBy))return"resolvedBy: string expected";if(null!=e.attributes&&e.hasOwnProperty("attributes")&&!r.isString(e.attributes))return"attributes: string expected";if(null!=e.deletedAt&&e.hasOwnProperty("deletedAt")&&!r.isString(e.deletedAt))return"deletedAt: string expected";if(null!=e.comments&&e.hasOwnProperty("comments")){if(!Array.isArray(e.comments))return"comments: array expected";for(var t=0;t<e.comments.length;++t){var n=s.CommentDescriptor.verify(e.comments[t]);if(n)return"comments."+n}}return null},o.fromObject=function(e){if(e instanceof s.CommentsV2AddCommentThreadMessage)return e;var t=new s.CommentsV2AddCommentThreadMessage;if(null!=e.documentId&&(t.documentId=String(e.documentId)),null!=e.commentThreadId&&(t.commentThreadId=String(e.commentThreadId)),null!=e.context&&(t.context=String(e.context)),null!=e.createdAt&&(t.createdAt=String(e.createdAt)),null!=e.resolvedAt&&(t.resolvedAt=String(e.resolvedAt)),null!=e.resolvedBy&&(t.resolvedBy=String(e.resolvedBy)),null!=e.attributes&&(t.attributes=String(e.attributes)),null!=e.deletedAt&&(t.deletedAt=String(e.deletedAt)),e.comments){if(!Array.isArray(e.comments))throw TypeError(".CommentsV2AddCommentThreadMessage.comments: array expected");t.comments=[];for(var n=0;n<e.comments.length;++n){if("object"!=typeof e.comments[n])throw TypeError(".CommentsV2AddCommentThreadMessage.comments: object expected");t.comments[n]=s.CommentDescriptor.fromObject(e.comments[n])}}return t},o.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.comments=[]),t.defaults&&(n.documentId="",n.commentThreadId="",n.context="",n.createdAt="",n.resolvedAt="",n.resolvedBy="",n.attributes="",n.deletedAt=""),null!=e.documentId&&e.hasOwnProperty("documentId")&&(n.documentId=e.documentId),null!=e.commentThreadId&&e.hasOwnProperty("commentThreadId")&&(n.commentThreadId=e.commentThreadId),null!=e.context&&e.hasOwnProperty("context")&&(n.context=e.context),null!=e.createdAt&&e.hasOwnProperty("createdAt")&&(n.createdAt=e.createdAt),null!=e.resolvedAt&&e.hasOwnProperty("resolvedAt")&&(n.resolvedAt=e.resolvedAt),null!=e.resolvedBy&&e.hasOwnProperty("resolvedBy")&&(n.resolvedBy=e.resolvedBy),null!=e.attributes&&e.hasOwnProperty("attributes")&&(n.attributes=e.attributes),null!=e.deletedAt&&e.hasOwnProperty("deletedAt")&&(n.deletedAt=e.deletedAt),e.comments&&e.comments.length){n.comments=[];for(var r=0;r<e.comments.length;++r)n.comments[r]=s.CommentDescriptor.toObject(e.comments[r],t)}return n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/CommentsV2AddCommentThreadMessage"},o}(),s.CommentsV2ReopenCommentThreadMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.commentThreadId="",o.prototype.documentId="",o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.commentThreadId&&Object.hasOwnProperty.call(e,"commentThreadId")&&t.uint32(10).string(e.commentThreadId),null!=e.documentId&&Object.hasOwnProperty.call(e,"documentId")&&t.uint32(18).string(e.documentId),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.CommentsV2ReopenCommentThreadMessage;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.commentThreadId=e.string();break;case 2:o.documentId=e.string();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.commentThreadId&&e.hasOwnProperty("commentThreadId")&&!r.isString(e.commentThreadId)?"commentThreadId: string expected":null!=e.documentId&&e.hasOwnProperty("documentId")&&!r.isString(e.documentId)?"documentId: string expected":null},o.fromObject=function(e){if(e instanceof s.CommentsV2ReopenCommentThreadMessage)return e;var t=new s.CommentsV2ReopenCommentThreadMessage;return null!=e.commentThreadId&&(t.commentThreadId=String(e.commentThreadId)),null!=e.documentId&&(t.documentId=String(e.documentId)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.commentThreadId="",n.documentId=""),null!=e.commentThreadId&&e.hasOwnProperty("commentThreadId")&&(n.commentThreadId=e.commentThreadId),null!=e.documentId&&e.hasOwnProperty("documentId")&&(n.documentId=e.documentId),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/CommentsV2ReopenCommentThreadMessage"},o}(),s.CommentsV2ResolveCommentThreadMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.commentThreadId="",o.prototype.documentId="",o.prototype.resolvedBy="",o.prototype.resolvedAt="",o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.commentThreadId&&Object.hasOwnProperty.call(e,"commentThreadId")&&t.uint32(10).string(e.commentThreadId),null!=e.documentId&&Object.hasOwnProperty.call(e,"documentId")&&t.uint32(18).string(e.documentId),null!=e.resolvedBy&&Object.hasOwnProperty.call(e,"resolvedBy")&&t.uint32(26).string(e.resolvedBy),null!=e.resolvedAt&&Object.hasOwnProperty.call(e,"resolvedAt")&&t.uint32(34).string(e.resolvedAt),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.CommentsV2ResolveCommentThreadMessage;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.commentThreadId=e.string();break;case 2:o.documentId=e.string();break;case 3:o.resolvedBy=e.string();break;case 4:o.resolvedAt=e.string();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.commentThreadId&&e.hasOwnProperty("commentThreadId")&&!r.isString(e.commentThreadId)?"commentThreadId: string expected":null!=e.documentId&&e.hasOwnProperty("documentId")&&!r.isString(e.documentId)?"documentId: string expected":null!=e.resolvedBy&&e.hasOwnProperty("resolvedBy")&&!r.isString(e.resolvedBy)?"resolvedBy: string expected":null!=e.resolvedAt&&e.hasOwnProperty("resolvedAt")&&!r.isString(e.resolvedAt)?"resolvedAt: string expected":null},o.fromObject=function(e){if(e instanceof s.CommentsV2ResolveCommentThreadMessage)return e;var t=new s.CommentsV2ResolveCommentThreadMessage;return null!=e.commentThreadId&&(t.commentThreadId=String(e.commentThreadId)),null!=e.documentId&&(t.documentId=String(e.documentId)),null!=e.resolvedBy&&(t.resolvedBy=String(e.resolvedBy)),null!=e.resolvedAt&&(t.resolvedAt=String(e.resolvedAt)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.commentThreadId="",n.documentId="",n.resolvedBy="",n.resolvedAt=""),null!=e.commentThreadId&&e.hasOwnProperty("commentThreadId")&&(n.commentThreadId=e.commentThreadId),null!=e.documentId&&e.hasOwnProperty("documentId")&&(n.documentId=e.documentId),null!=e.resolvedBy&&e.hasOwnProperty("resolvedBy")&&(n.resolvedBy=e.resolvedBy),null!=e.resolvedAt&&e.hasOwnProperty("resolvedAt")&&(n.resolvedAt=e.resolvedAt),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/CommentsV2ResolveCommentThreadMessage"},o}(),s.CommentsV2UpdateCommentThreadMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.commentThreadId="",o.prototype.documentId="",o.prototype.context="",o.prototype.attributes="",o.prototype.unlinkedAt="",o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.commentThreadId&&Object.hasOwnProperty.call(e,"commentThreadId")&&t.uint32(10).string(e.commentThreadId),null!=e.documentId&&Object.hasOwnProperty.call(e,"documentId")&&t.uint32(18).string(e.documentId),null!=e.context&&Object.hasOwnProperty.call(e,"context")&&t.uint32(26).string(e.context),null!=e.attributes&&Object.hasOwnProperty.call(e,"attributes")&&t.uint32(34).string(e.attributes),null!=e.unlinkedAt&&Object.hasOwnProperty.call(e,"unlinkedAt")&&t.uint32(42).string(e.unlinkedAt),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.CommentsV2UpdateCommentThreadMessage;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.commentThreadId=e.string();break;case 2:o.documentId=e.string();break;case 3:o.context=e.string();break;case 4:o.attributes=e.string();break;case 5:o.unlinkedAt=e.string();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.commentThreadId&&e.hasOwnProperty("commentThreadId")&&!r.isString(e.commentThreadId)?"commentThreadId: string expected":null!=e.documentId&&e.hasOwnProperty("documentId")&&!r.isString(e.documentId)?"documentId: string expected":null!=e.context&&e.hasOwnProperty("context")&&!r.isString(e.context)?"context: string expected":null!=e.attributes&&e.hasOwnProperty("attributes")&&!r.isString(e.attributes)?"attributes: string expected":null!=e.unlinkedAt&&e.hasOwnProperty("unlinkedAt")&&!r.isString(e.unlinkedAt)?"unlinkedAt: string expected":null},o.fromObject=function(e){if(e instanceof s.CommentsV2UpdateCommentThreadMessage)return e;var t=new s.CommentsV2UpdateCommentThreadMessage;return null!=e.commentThreadId&&(t.commentThreadId=String(e.commentThreadId)),null!=e.documentId&&(t.documentId=String(e.documentId)),null!=e.context&&(t.context=String(e.context)),null!=e.attributes&&(t.attributes=String(e.attributes)),null!=e.unlinkedAt&&(t.unlinkedAt=String(e.unlinkedAt)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.commentThreadId="",n.documentId="",n.context="",n.attributes="",n.unlinkedAt=""),null!=e.commentThreadId&&e.hasOwnProperty("commentThreadId")&&(n.commentThreadId=e.commentThreadId),null!=e.documentId&&e.hasOwnProperty("documentId")&&(n.documentId=e.documentId),null!=e.context&&e.hasOwnProperty("context")&&(n.context=e.context),null!=e.attributes&&e.hasOwnProperty("attributes")&&(n.attributes=e.attributes),null!=e.unlinkedAt&&e.hasOwnProperty("unlinkedAt")&&(n.unlinkedAt=e.unlinkedAt),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/CommentsV2UpdateCommentThreadMessage"},o}(),s.CommentsV2ConnectMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.documentId="",o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.documentId&&Object.hasOwnProperty.call(e,"documentId")&&t.uint32(10).string(e.documentId),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.CommentsV2ConnectMessage;e.pos<r;){var i=e.uint32();i>>>3==1?o.documentId=e.string():e.skipType(7&i)}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.documentId&&e.hasOwnProperty("documentId")&&!r.isString(e.documentId)?"documentId: string expected":null},o.fromObject=function(e){if(e instanceof s.CommentsV2ConnectMessage)return e;var t=new s.CommentsV2ConnectMessage;return null!=e.documentId&&(t.documentId=String(e.documentId)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.documentId=""),null!=e.documentId&&e.hasOwnProperty("documentId")&&(n.documentId=e.documentId),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/CommentsV2ConnectMessage"},o}(),s.CommentsV2GetCommentThreadMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.commentThreadId="",o.prototype.documentId="",o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.commentThreadId&&Object.hasOwnProperty.call(e,"commentThreadId")&&t.uint32(10).string(e.commentThreadId),null!=e.documentId&&Object.hasOwnProperty.call(e,"documentId")&&t.uint32(18).string(e.documentId),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.CommentsV2GetCommentThreadMessage;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.commentThreadId=e.string();break;case 2:o.documentId=e.string();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.commentThreadId&&e.hasOwnProperty("commentThreadId")&&!r.isString(e.commentThreadId)?"commentThreadId: string expected":null!=e.documentId&&e.hasOwnProperty("documentId")&&!r.isString(e.documentId)?"documentId: string expected":null},o.fromObject=function(e){if(e instanceof s.CommentsV2GetCommentThreadMessage)return e;var t=new s.CommentsV2GetCommentThreadMessage;return null!=e.commentThreadId&&(t.commentThreadId=String(e.commentThreadId)),null!=e.documentId&&(t.documentId=String(e.documentId)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.commentThreadId="",n.documentId=""),null!=e.commentThreadId&&e.hasOwnProperty("commentThreadId")&&(n.commentThreadId=e.commentThreadId),null!=e.documentId&&e.hasOwnProperty("documentId")&&(n.documentId=e.documentId),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/CommentsV2GetCommentThreadMessage"},o}(),s.CommentsV2GetDocumentThreadsMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.documentId="",o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.documentId&&Object.hasOwnProperty.call(e,"documentId")&&t.uint32(10).string(e.documentId),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.CommentsV2GetDocumentThreadsMessage;e.pos<r;){var i=e.uint32();i>>>3==1?o.documentId=e.string():e.skipType(7&i)}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.documentId&&e.hasOwnProperty("documentId")&&!r.isString(e.documentId)?"documentId: string expected":null},o.fromObject=function(e){if(e instanceof s.CommentsV2GetDocumentThreadsMessage)return e;var t=new s.CommentsV2GetDocumentThreadsMessage;return null!=e.documentId&&(t.documentId=String(e.documentId)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.documentId=""),null!=e.documentId&&e.hasOwnProperty("documentId")&&(n.documentId=e.documentId),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/CommentsV2GetDocumentThreadsMessage"},o}(),s.CommentsV2RemoveCommentMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.commentThreadId="",o.prototype.commentId="",o.prototype.documentId="",o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.commentThreadId&&Object.hasOwnProperty.call(e,"commentThreadId")&&t.uint32(10).string(e.commentThreadId),null!=e.commentId&&Object.hasOwnProperty.call(e,"commentId")&&t.uint32(18).string(e.commentId),null!=e.documentId&&Object.hasOwnProperty.call(e,"documentId")&&t.uint32(26).string(e.documentId),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.CommentsV2RemoveCommentMessage;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.commentThreadId=e.string();break;case 2:o.commentId=e.string();break;case 3:o.documentId=e.string();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.commentThreadId&&e.hasOwnProperty("commentThreadId")&&!r.isString(e.commentThreadId)?"commentThreadId: string expected":null!=e.commentId&&e.hasOwnProperty("commentId")&&!r.isString(e.commentId)?"commentId: string expected":null!=e.documentId&&e.hasOwnProperty("documentId")&&!r.isString(e.documentId)?"documentId: string expected":null},o.fromObject=function(e){if(e instanceof s.CommentsV2RemoveCommentMessage)return e;var t=new s.CommentsV2RemoveCommentMessage;return null!=e.commentThreadId&&(t.commentThreadId=String(e.commentThreadId)),null!=e.commentId&&(t.commentId=String(e.commentId)),null!=e.documentId&&(t.documentId=String(e.documentId)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.commentThreadId="",n.commentId="",n.documentId=""),null!=e.commentThreadId&&e.hasOwnProperty("commentThreadId")&&(n.commentThreadId=e.commentThreadId),null!=e.commentId&&e.hasOwnProperty("commentId")&&(n.commentId=e.commentId),null!=e.documentId&&e.hasOwnProperty("documentId")&&(n.documentId=e.documentId),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/CommentsV2RemoveCommentMessage"},o}(),s.CommentsV2RemoveCommentThreadMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.commentThreadId="",o.prototype.documentId="",o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.commentThreadId&&Object.hasOwnProperty.call(e,"commentThreadId")&&t.uint32(10).string(e.commentThreadId),null!=e.documentId&&Object.hasOwnProperty.call(e,"documentId")&&t.uint32(18).string(e.documentId),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.CommentsV2RemoveCommentThreadMessage;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.commentThreadId=e.string();break;case 2:o.documentId=e.string();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.commentThreadId&&e.hasOwnProperty("commentThreadId")&&!r.isString(e.commentThreadId)?"commentThreadId: string expected":null!=e.documentId&&e.hasOwnProperty("documentId")&&!r.isString(e.documentId)?"documentId: string expected":null},o.fromObject=function(e){if(e instanceof s.CommentsV2RemoveCommentThreadMessage)return e;var t=new s.CommentsV2RemoveCommentThreadMessage;return null!=e.commentThreadId&&(t.commentThreadId=String(e.commentThreadId)),null!=e.documentId&&(t.documentId=String(e.documentId)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.commentThreadId="",n.documentId=""),null!=e.commentThreadId&&e.hasOwnProperty("commentThreadId")&&(n.commentThreadId=e.commentThreadId),null!=e.documentId&&e.hasOwnProperty("documentId")&&(n.documentId=e.documentId),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/CommentsV2RemoveCommentThreadMessage"},o}(),s.CommentsV2UpdateCommentMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.commentThreadId="",o.prototype.commentId="",o.prototype.content="",o.prototype.documentId="",o.prototype.attributes="",o.prototype.isAttributesUpdated=!1,o.prototype.commentThread=null,o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.commentThreadId&&Object.hasOwnProperty.call(e,"commentThreadId")&&t.uint32(10).string(e.commentThreadId),null!=e.commentId&&Object.hasOwnProperty.call(e,"commentId")&&t.uint32(18).string(e.commentId),null!=e.content&&Object.hasOwnProperty.call(e,"content")&&t.uint32(26).string(e.content),null!=e.documentId&&Object.hasOwnProperty.call(e,"documentId")&&t.uint32(34).string(e.documentId),null!=e.attributes&&Object.hasOwnProperty.call(e,"attributes")&&t.uint32(42).string(e.attributes),null!=e.isAttributesUpdated&&Object.hasOwnProperty.call(e,"isAttributesUpdated")&&t.uint32(48).bool(e.isAttributesUpdated),null!=e.commentThread&&Object.hasOwnProperty.call(e,"commentThread")&&s.CommentsThreadDescriptor.encode(e.commentThread,t.uint32(58).fork()).ldelim(),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.CommentsV2UpdateCommentMessage;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.commentThreadId=e.string();break;case 2:o.commentId=e.string();break;case 3:o.content=e.string();break;case 4:o.documentId=e.string();break;case 5:o.attributes=e.string();break;case 6:o.isAttributesUpdated=e.bool();break;case 7:o.commentThread=s.CommentsThreadDescriptor.decode(e,e.uint32());break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.commentThreadId&&e.hasOwnProperty("commentThreadId")&&!r.isString(e.commentThreadId))return"commentThreadId: string expected";if(null!=e.commentId&&e.hasOwnProperty("commentId")&&!r.isString(e.commentId))return"commentId: string expected";if(null!=e.content&&e.hasOwnProperty("content")&&!r.isString(e.content))return"content: string expected";if(null!=e.documentId&&e.hasOwnProperty("documentId")&&!r.isString(e.documentId))return"documentId: string expected";if(null!=e.attributes&&e.hasOwnProperty("attributes")&&!r.isString(e.attributes))return"attributes: string expected";if(null!=e.isAttributesUpdated&&e.hasOwnProperty("isAttributesUpdated")&&"boolean"!=typeof e.isAttributesUpdated)return"isAttributesUpdated: boolean expected";if(null!=e.commentThread&&e.hasOwnProperty("commentThread")){var t=s.CommentsThreadDescriptor.verify(e.commentThread);if(t)return"commentThread."+t}return null},o.fromObject=function(e){if(e instanceof s.CommentsV2UpdateCommentMessage)return e;var t=new s.CommentsV2UpdateCommentMessage;if(null!=e.commentThreadId&&(t.commentThreadId=String(e.commentThreadId)),null!=e.commentId&&(t.commentId=String(e.commentId)),null!=e.content&&(t.content=String(e.content)),null!=e.documentId&&(t.documentId=String(e.documentId)),null!=e.attributes&&(t.attributes=String(e.attributes)),null!=e.isAttributesUpdated&&(t.isAttributesUpdated=Boolean(e.isAttributesUpdated)),null!=e.commentThread){if("object"!=typeof e.commentThread)throw TypeError(".CommentsV2UpdateCommentMessage.commentThread: object expected");t.commentThread=s.CommentsThreadDescriptor.fromObject(e.commentThread)}return t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.commentThreadId="",n.commentId="",n.content="",n.documentId="",n.attributes="",n.isAttributesUpdated=!1,n.commentThread=null),null!=e.commentThreadId&&e.hasOwnProperty("commentThreadId")&&(n.commentThreadId=e.commentThreadId),null!=e.commentId&&e.hasOwnProperty("commentId")&&(n.commentId=e.commentId),null!=e.content&&e.hasOwnProperty("content")&&(n.content=e.content),null!=e.documentId&&e.hasOwnProperty("documentId")&&(n.documentId=e.documentId),null!=e.attributes&&e.hasOwnProperty("attributes")&&(n.attributes=e.attributes),null!=e.isAttributesUpdated&&e.hasOwnProperty("isAttributesUpdated")&&(n.isAttributesUpdated=e.isAttributesUpdated),null!=e.commentThread&&e.hasOwnProperty("commentThread")&&(n.commentThread=s.CommentsThreadDescriptor.toObject(e.commentThread,t)),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/CommentsV2UpdateCommentMessage"},o}(),s.CommentsV2AddCommentResponse=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.commentThreadId="",o.prototype.commentId="",o.prototype.createdAt="",o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.commentThreadId&&Object.hasOwnProperty.call(e,"commentThreadId")&&t.uint32(10).string(e.commentThreadId),null!=e.commentId&&Object.hasOwnProperty.call(e,"commentId")&&t.uint32(18).string(e.commentId),null!=e.createdAt&&Object.hasOwnProperty.call(e,"createdAt")&&t.uint32(26).string(e.createdAt),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.CommentsV2AddCommentResponse;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.commentThreadId=e.string();break;case 2:o.commentId=e.string();break;case 3:o.createdAt=e.string();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.commentThreadId&&e.hasOwnProperty("commentThreadId")&&!r.isString(e.commentThreadId)?"commentThreadId: string expected":null!=e.commentId&&e.hasOwnProperty("commentId")&&!r.isString(e.commentId)?"commentId: string expected":null!=e.createdAt&&e.hasOwnProperty("createdAt")&&!r.isString(e.createdAt)?"createdAt: string expected":null},o.fromObject=function(e){if(e instanceof s.CommentsV2AddCommentResponse)return e;var t=new s.CommentsV2AddCommentResponse;return null!=e.commentThreadId&&(t.commentThreadId=String(e.commentThreadId)),null!=e.commentId&&(t.commentId=String(e.commentId)),null!=e.createdAt&&(t.createdAt=String(e.createdAt)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.commentThreadId="",n.commentId="",n.createdAt=""),null!=e.commentThreadId&&e.hasOwnProperty("commentThreadId")&&(n.commentThreadId=e.commentThreadId),null!=e.commentId&&e.hasOwnProperty("commentId")&&(n.commentId=e.commentId),null!=e.createdAt&&e.hasOwnProperty("createdAt")&&(n.createdAt=e.createdAt),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/CommentsV2AddCommentResponse"},o}(),s.CommentsV2AddCommentThreadResponse=function(){function o(e){if(this.comments=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.commentThreadId="",o.prototype.createdAt="",o.prototype.comments=r.emptyArray,o.create=function(e){return new o(e)},o.encode=function(e,t){if(t||(t=n.create()),null!=e.commentThreadId&&Object.hasOwnProperty.call(e,"commentThreadId")&&t.uint32(10).string(e.commentThreadId),null!=e.createdAt&&Object.hasOwnProperty.call(e,"createdAt")&&t.uint32(18).string(e.createdAt),null!=e.comments&&e.comments.length)for(var r=0;r<e.comments.length;++r)s.CommentThreadAddedCommentDescriptor.encode(e.comments[r],t.uint32(26).fork()).ldelim();return t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.CommentsV2AddCommentThreadResponse;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.commentThreadId=e.string();break;case 2:o.createdAt=e.string();break;case 3:o.comments&&o.comments.length||(o.comments=[]),o.comments.push(s.CommentThreadAddedCommentDescriptor.decode(e,e.uint32()));break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.commentThreadId&&e.hasOwnProperty("commentThreadId")&&!r.isString(e.commentThreadId))return"commentThreadId: string expected";if(null!=e.createdAt&&e.hasOwnProperty("createdAt")&&!r.isString(e.createdAt))return"createdAt: string expected";if(null!=e.comments&&e.hasOwnProperty("comments")){if(!Array.isArray(e.comments))return"comments: array expected";for(var t=0;t<e.comments.length;++t){var n=s.CommentThreadAddedCommentDescriptor.verify(e.comments[t]);if(n)return"comments."+n}}return null},o.fromObject=function(e){if(e instanceof s.CommentsV2AddCommentThreadResponse)return e;var t=new s.CommentsV2AddCommentThreadResponse;if(null!=e.commentThreadId&&(t.commentThreadId=String(e.commentThreadId)),null!=e.createdAt&&(t.createdAt=String(e.createdAt)),e.comments){if(!Array.isArray(e.comments))throw TypeError(".CommentsV2AddCommentThreadResponse.comments: array expected");t.comments=[];for(var n=0;n<e.comments.length;++n){if("object"!=typeof e.comments[n])throw TypeError(".CommentsV2AddCommentThreadResponse.comments: object expected");t.comments[n]=s.CommentThreadAddedCommentDescriptor.fromObject(e.comments[n])}}return t},o.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.comments=[]),t.defaults&&(n.commentThreadId="",n.createdAt=""),null!=e.commentThreadId&&e.hasOwnProperty("commentThreadId")&&(n.commentThreadId=e.commentThreadId),null!=e.createdAt&&e.hasOwnProperty("createdAt")&&(n.createdAt=e.createdAt),e.comments&&e.comments.length){n.comments=[];for(var r=0;r<e.comments.length;++r)n.comments[r]=s.CommentThreadAddedCommentDescriptor.toObject(e.comments[r],t)}return n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/CommentsV2AddCommentThreadResponse"},o}(),s.CommentsV2ResolveCommentThreadResponse=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.commentThreadId="",o.prototype.documentId="",o.prototype.resolvedAt="",o.prototype.resolvedBy="",o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.commentThreadId&&Object.hasOwnProperty.call(e,"commentThreadId")&&t.uint32(10).string(e.commentThreadId),null!=e.documentId&&Object.hasOwnProperty.call(e,"documentId")&&t.uint32(18).string(e.documentId),null!=e.resolvedAt&&Object.hasOwnProperty.call(e,"resolvedAt")&&t.uint32(26).string(e.resolvedAt),null!=e.resolvedBy&&Object.hasOwnProperty.call(e,"resolvedBy")&&t.uint32(34).string(e.resolvedBy),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.CommentsV2ResolveCommentThreadResponse;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.commentThreadId=e.string();break;case 2:o.documentId=e.string();break;case 3:o.resolvedAt=e.string();break;case 4:o.resolvedBy=e.string();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.commentThreadId&&e.hasOwnProperty("commentThreadId")&&!r.isString(e.commentThreadId)?"commentThreadId: string expected":null!=e.documentId&&e.hasOwnProperty("documentId")&&!r.isString(e.documentId)?"documentId: string expected":null!=e.resolvedAt&&e.hasOwnProperty("resolvedAt")&&!r.isString(e.resolvedAt)?"resolvedAt: string expected":null!=e.resolvedBy&&e.hasOwnProperty("resolvedBy")&&!r.isString(e.resolvedBy)?"resolvedBy: string expected":null},o.fromObject=function(e){if(e instanceof s.CommentsV2ResolveCommentThreadResponse)return e;var t=new s.CommentsV2ResolveCommentThreadResponse;return null!=e.commentThreadId&&(t.commentThreadId=String(e.commentThreadId)),null!=e.documentId&&(t.documentId=String(e.documentId)),null!=e.resolvedAt&&(t.resolvedAt=String(e.resolvedAt)),null!=e.resolvedBy&&(t.resolvedBy=String(e.resolvedBy)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.commentThreadId="",n.documentId="",n.resolvedAt="",n.resolvedBy=""),null!=e.commentThreadId&&e.hasOwnProperty("commentThreadId")&&(n.commentThreadId=e.commentThreadId),null!=e.documentId&&e.hasOwnProperty("documentId")&&(n.documentId=e.documentId),null!=e.resolvedAt&&e.hasOwnProperty("resolvedAt")&&(n.resolvedAt=e.resolvedAt),null!=e.resolvedBy&&e.hasOwnProperty("resolvedBy")&&(n.resolvedBy=e.resolvedBy),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/CommentsV2ResolveCommentThreadResponse"},o}(),s.CommentsV2ConnectResponse=function(){function o(e){if(this.threads=[],this.threadsV2=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.channel="",o.prototype.threads=r.emptyArray,o.prototype.threadsV2=r.emptyArray,o.create=function(e){return new o(e)},o.encode=function(e,t){if(t||(t=n.create()),null!=e.channel&&Object.hasOwnProperty.call(e,"channel")&&t.uint32(10).string(e.channel),null!=e.threads&&e.threads.length)for(var r=0;r<e.threads.length;++r)t.uint32(18).string(e.threads[r]);if(null!=e.threadsV2&&e.threadsV2.length)for(r=0;r<e.threadsV2.length;++r)s.CommentsThreadDescriptor.encode(e.threadsV2[r],t.uint32(26).fork()).ldelim();return t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.CommentsV2ConnectResponse;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.channel=e.string();break;case 2:o.threads&&o.threads.length||(o.threads=[]),o.threads.push(e.string());break;case 3:o.threadsV2&&o.threadsV2.length||(o.threadsV2=[]),o.threadsV2.push(s.CommentsThreadDescriptor.decode(e,e.uint32()));break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.channel&&e.hasOwnProperty("channel")&&!r.isString(e.channel))return"channel: string expected";if(null!=e.threads&&e.hasOwnProperty("threads")){if(!Array.isArray(e.threads))return"threads: array expected";for(var t=0;t<e.threads.length;++t)if(!r.isString(e.threads[t]))return"threads: string[] expected"}if(null!=e.threadsV2&&e.hasOwnProperty("threadsV2")){if(!Array.isArray(e.threadsV2))return"threadsV2: array expected";for(t=0;t<e.threadsV2.length;++t){var n=s.CommentsThreadDescriptor.verify(e.threadsV2[t]);if(n)return"threadsV2."+n}}return null},o.fromObject=function(e){if(e instanceof s.CommentsV2ConnectResponse)return e;var t=new s.CommentsV2ConnectResponse;if(null!=e.channel&&(t.channel=String(e.channel)),e.threads){if(!Array.isArray(e.threads))throw TypeError(".CommentsV2ConnectResponse.threads: array expected");t.threads=[];for(var n=0;n<e.threads.length;++n)t.threads[n]=String(e.threads[n])}if(e.threadsV2){if(!Array.isArray(e.threadsV2))throw TypeError(".CommentsV2ConnectResponse.threadsV2: array expected");for(t.threadsV2=[],n=0;n<e.threadsV2.length;++n){if("object"!=typeof e.threadsV2[n])throw TypeError(".CommentsV2ConnectResponse.threadsV2: object expected");t.threadsV2[n]=s.CommentsThreadDescriptor.fromObject(e.threadsV2[n])}}return t},o.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.threads=[],n.threadsV2=[]),t.defaults&&(n.channel=""),null!=e.channel&&e.hasOwnProperty("channel")&&(n.channel=e.channel),e.threads&&e.threads.length){n.threads=[];for(var r=0;r<e.threads.length;++r)n.threads[r]=e.threads[r]}if(e.threadsV2&&e.threadsV2.length)for(n.threadsV2=[],r=0;r<e.threadsV2.length;++r)n.threadsV2[r]=s.CommentsThreadDescriptor.toObject(e.threadsV2[r],t);return n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/CommentsV2ConnectResponse"},o}(),s.CommentsV2GetCommentThreadResponse=function(){function o(e){if(this.comments=[],this.commentsV2=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.commentThreadId="",o.prototype.comments=r.emptyArray,o.prototype.commentsV2=r.emptyArray,o.prototype.resolvedAt="",o.prototype.resolvedBy="",o.prototype.context="",o.prototype.createdAt="",o.prototype.deletedAt="",o.prototype.attributes="",o.prototype.unlinkedAt="",o.create=function(e){return new o(e)},o.encode=function(e,t){if(t||(t=n.create()),null!=e.commentThreadId&&Object.hasOwnProperty.call(e,"commentThreadId")&&t.uint32(10).string(e.commentThreadId),null!=e.comments&&e.comments.length)for(var r=0;r<e.comments.length;++r)t.uint32(18).string(e.comments[r]);if(null!=e.commentsV2&&e.commentsV2.length)for(r=0;r<e.commentsV2.length;++r)s.CommentDescriptor.encode(e.commentsV2[r],t.uint32(26).fork()).ldelim();return null!=e.resolvedAt&&Object.hasOwnProperty.call(e,"resolvedAt")&&t.uint32(34).string(e.resolvedAt),null!=e.resolvedBy&&Object.hasOwnProperty.call(e,"resolvedBy")&&t.uint32(42).string(e.resolvedBy),null!=e.context&&Object.hasOwnProperty.call(e,"context")&&t.uint32(50).string(e.context),null!=e.createdAt&&Object.hasOwnProperty.call(e,"createdAt")&&t.uint32(58).string(e.createdAt),null!=e.deletedAt&&Object.hasOwnProperty.call(e,"deletedAt")&&t.uint32(66).string(e.deletedAt),null!=e.attributes&&Object.hasOwnProperty.call(e,"attributes")&&t.uint32(74).string(e.attributes),null!=e.unlinkedAt&&Object.hasOwnProperty.call(e,"unlinkedAt")&&t.uint32(82).string(e.unlinkedAt),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.CommentsV2GetCommentThreadResponse;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.commentThreadId=e.string();break;case 2:o.comments&&o.comments.length||(o.comments=[]),o.comments.push(e.string());break;case 3:o.commentsV2&&o.commentsV2.length||(o.commentsV2=[]),o.commentsV2.push(s.CommentDescriptor.decode(e,e.uint32()));break;case 4:o.resolvedAt=e.string();break;case 5:o.resolvedBy=e.string();break;case 6:o.context=e.string();break;case 7:o.createdAt=e.string();break;case 8:o.deletedAt=e.string();break;case 9:o.attributes=e.string();break;case 10:o.unlinkedAt=e.string();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.commentThreadId&&e.hasOwnProperty("commentThreadId")&&!r.isString(e.commentThreadId))return"commentThreadId: string expected";if(null!=e.comments&&e.hasOwnProperty("comments")){if(!Array.isArray(e.comments))return"comments: array expected";for(var t=0;t<e.comments.length;++t)if(!r.isString(e.comments[t]))return"comments: string[] expected"}if(null!=e.commentsV2&&e.hasOwnProperty("commentsV2")){if(!Array.isArray(e.commentsV2))return"commentsV2: array expected";for(t=0;t<e.commentsV2.length;++t){var n=s.CommentDescriptor.verify(e.commentsV2[t]);if(n)return"commentsV2."+n}}return null!=e.resolvedAt&&e.hasOwnProperty("resolvedAt")&&!r.isString(e.resolvedAt)?"resolvedAt: string expected":null!=e.resolvedBy&&e.hasOwnProperty("resolvedBy")&&!r.isString(e.resolvedBy)?"resolvedBy: string expected":null!=e.context&&e.hasOwnProperty("context")&&!r.isString(e.context)?"context: string expected":null!=e.createdAt&&e.hasOwnProperty("createdAt")&&!r.isString(e.createdAt)?"createdAt: string expected":null!=e.deletedAt&&e.hasOwnProperty("deletedAt")&&!r.isString(e.deletedAt)?"deletedAt: string expected":null!=e.attributes&&e.hasOwnProperty("attributes")&&!r.isString(e.attributes)?"attributes: string expected":null!=e.unlinkedAt&&e.hasOwnProperty("unlinkedAt")&&!r.isString(e.unlinkedAt)?"unlinkedAt: string expected":null},o.fromObject=function(e){if(e instanceof s.CommentsV2GetCommentThreadResponse)return e;var t=new s.CommentsV2GetCommentThreadResponse;if(null!=e.commentThreadId&&(t.commentThreadId=String(e.commentThreadId)),e.comments){if(!Array.isArray(e.comments))throw TypeError(".CommentsV2GetCommentThreadResponse.comments: array expected");t.comments=[];for(var n=0;n<e.comments.length;++n)t.comments[n]=String(e.comments[n])}if(e.commentsV2){if(!Array.isArray(e.commentsV2))throw TypeError(".CommentsV2GetCommentThreadResponse.commentsV2: array expected");for(t.commentsV2=[],n=0;n<e.commentsV2.length;++n){if("object"!=typeof e.commentsV2[n])throw TypeError(".CommentsV2GetCommentThreadResponse.commentsV2: object expected");t.commentsV2[n]=s.CommentDescriptor.fromObject(e.commentsV2[n])}}return null!=e.resolvedAt&&(t.resolvedAt=String(e.resolvedAt)),null!=e.resolvedBy&&(t.resolvedBy=String(e.resolvedBy)),null!=e.context&&(t.context=String(e.context)),null!=e.createdAt&&(t.createdAt=String(e.createdAt)),null!=e.deletedAt&&(t.deletedAt=String(e.deletedAt)),null!=e.attributes&&(t.attributes=String(e.attributes)),null!=e.unlinkedAt&&(t.unlinkedAt=String(e.unlinkedAt)),t},o.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.comments=[],n.commentsV2=[]),t.defaults&&(n.commentThreadId="",n.resolvedAt="",n.resolvedBy="",n.context="",n.createdAt="",n.deletedAt="",n.attributes="",n.unlinkedAt=""),null!=e.commentThreadId&&e.hasOwnProperty("commentThreadId")&&(n.commentThreadId=e.commentThreadId),e.comments&&e.comments.length){n.comments=[];for(var r=0;r<e.comments.length;++r)n.comments[r]=e.comments[r]}if(e.commentsV2&&e.commentsV2.length)for(n.commentsV2=[],r=0;r<e.commentsV2.length;++r)n.commentsV2[r]=s.CommentDescriptor.toObject(e.commentsV2[r],t);return null!=e.resolvedAt&&e.hasOwnProperty("resolvedAt")&&(n.resolvedAt=e.resolvedAt),null!=e.resolvedBy&&e.hasOwnProperty("resolvedBy")&&(n.resolvedBy=e.resolvedBy),null!=e.context&&e.hasOwnProperty("context")&&(n.context=e.context),null!=e.createdAt&&e.hasOwnProperty("createdAt")&&(n.createdAt=e.createdAt),null!=e.deletedAt&&e.hasOwnProperty("deletedAt")&&(n.deletedAt=e.deletedAt),null!=e.attributes&&e.hasOwnProperty("attributes")&&(n.attributes=e.attributes),null!=e.unlinkedAt&&e.hasOwnProperty("unlinkedAt")&&(n.unlinkedAt=e.unlinkedAt),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/CommentsV2GetCommentThreadResponse"},o}(),s.CommentsV2GetDocumentThreadsResponse=function(){function o(e){if(this.threads=[],this.threadsV2=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.threads=r.emptyArray,o.prototype.threadsV2=r.emptyArray,o.create=function(e){return new o(e)},o.encode=function(e,t){if(t||(t=n.create()),null!=e.threads&&e.threads.length)for(var r=0;r<e.threads.length;++r)t.uint32(10).string(e.threads[r]);if(null!=e.threadsV2&&e.threadsV2.length)for(r=0;r<e.threadsV2.length;++r)s.CommentsThreadDescriptor.encode(e.threadsV2[r],t.uint32(18).fork()).ldelim();return t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.CommentsV2GetDocumentThreadsResponse;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.threads&&o.threads.length||(o.threads=[]),o.threads.push(e.string());break;case 2:o.threadsV2&&o.threadsV2.length||(o.threadsV2=[]),o.threadsV2.push(s.CommentsThreadDescriptor.decode(e,e.uint32()));break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.threads&&e.hasOwnProperty("threads")){if(!Array.isArray(e.threads))return"threads: array expected";for(var t=0;t<e.threads.length;++t)if(!r.isString(e.threads[t]))return"threads: string[] expected"}if(null!=e.threadsV2&&e.hasOwnProperty("threadsV2")){if(!Array.isArray(e.threadsV2))return"threadsV2: array expected";for(t=0;t<e.threadsV2.length;++t){var n=s.CommentsThreadDescriptor.verify(e.threadsV2[t]);if(n)return"threadsV2."+n}}return null},o.fromObject=function(e){if(e instanceof s.CommentsV2GetDocumentThreadsResponse)return e;var t=new s.CommentsV2GetDocumentThreadsResponse;if(e.threads){if(!Array.isArray(e.threads))throw TypeError(".CommentsV2GetDocumentThreadsResponse.threads: array expected");t.threads=[];for(var n=0;n<e.threads.length;++n)t.threads[n]=String(e.threads[n])}if(e.threadsV2){if(!Array.isArray(e.threadsV2))throw TypeError(".CommentsV2GetDocumentThreadsResponse.threadsV2: array expected");for(t.threadsV2=[],n=0;n<e.threadsV2.length;++n){if("object"!=typeof e.threadsV2[n])throw TypeError(".CommentsV2GetDocumentThreadsResponse.threadsV2: object expected");t.threadsV2[n]=s.CommentsThreadDescriptor.fromObject(e.threadsV2[n])}}return t},o.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.threads=[],n.threadsV2=[]),e.threads&&e.threads.length){n.threads=[];for(var r=0;r<e.threads.length;++r)n.threads[r]=e.threads[r]}if(e.threadsV2&&e.threadsV2.length)for(n.threadsV2=[],r=0;r<e.threadsV2.length;++r)n.threadsV2[r]=s.CommentsThreadDescriptor.toObject(e.threadsV2[r],t);return n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/CommentsV2GetDocumentThreadsResponse"},o}(),s.KeyValueDescriptor=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.key="",o.prototype.value="",o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.key&&Object.hasOwnProperty.call(e,"key")&&t.uint32(10).string(e.key),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(18).string(e.value),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.KeyValueDescriptor;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.key=e.string();break;case 2:o.value=e.string();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.key&&e.hasOwnProperty("key")&&!r.isString(e.key)?"key: string expected":null!=e.value&&e.hasOwnProperty("value")&&!r.isString(e.value)?"value: string expected":null},o.fromObject=function(e){if(e instanceof s.KeyValueDescriptor)return e;var t=new s.KeyValueDescriptor;return null!=e.key&&(t.key=String(e.key)),null!=e.value&&(t.value=String(e.value)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.key="",n.value=""),null!=e.key&&e.hasOwnProperty("key")&&(n.key=e.key),null!=e.value&&e.hasOwnProperty("value")&&(n.value=e.value),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/KeyValueDescriptor"},o}(),s.IsEditorBundleUploadedMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.bundleVersion="",o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.bundleVersion&&Object.hasOwnProperty.call(e,"bundleVersion")&&t.uint32(10).string(e.bundleVersion),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.IsEditorBundleUploadedMessage;e.pos<r;){var i=e.uint32();i>>>3==1?o.bundleVersion=e.string():e.skipType(7&i)}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.bundleVersion&&e.hasOwnProperty("bundleVersion")&&!r.isString(e.bundleVersion)?"bundleVersion: string expected":null},o.fromObject=function(e){if(e instanceof s.IsEditorBundleUploadedMessage)return e;var t=new s.IsEditorBundleUploadedMessage;return null!=e.bundleVersion&&(t.bundleVersion=String(e.bundleVersion)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.bundleVersion=""),null!=e.bundleVersion&&e.hasOwnProperty("bundleVersion")&&(n.bundleVersion=e.bundleVersion),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/IsEditorBundleUploadedMessage"},o}(),s.IsEditorBundleUploadedResponse=function(){function r(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return r.prototype.isUploaded=!1,r.create=function(e){return new r(e)},r.encode=function(e,t){return t||(t=n.create()),null!=e.isUploaded&&Object.hasOwnProperty.call(e,"isUploaded")&&t.uint32(8).bool(e.isUploaded),t},r.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},r.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.IsEditorBundleUploadedResponse;e.pos<r;){var i=e.uint32();i>>>3==1?o.isUploaded=e.bool():e.skipType(7&i)}return o},r.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},r.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.isUploaded&&e.hasOwnProperty("isUploaded")&&"boolean"!=typeof e.isUploaded?"isUploaded: boolean expected":null},r.fromObject=function(e){if(e instanceof s.IsEditorBundleUploadedResponse)return e;var t=new s.IsEditorBundleUploadedResponse;return null!=e.isUploaded&&(t.isUploaded=Boolean(e.isUploaded)),t},r.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.isUploaded=!1),null!=e.isUploaded&&e.hasOwnProperty("isUploaded")&&(n.isUploaded=e.isUploaded),n},r.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},r.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/IsEditorBundleUploadedResponse"},r}(),s.RevisionDescriptor=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.revisionId="",o.prototype.name="",o.prototype.creatorId="",o.prototype.authorsIds="",o.prototype.diffData="",o.prototype.createdAt="",o.prototype.attributes="",o.prototype.toVersion=0,o.prototype.fromVersion=0,o.prototype.isEmptyCurrent=!1,o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.revisionId&&Object.hasOwnProperty.call(e,"revisionId")&&t.uint32(10).string(e.revisionId),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(18).string(e.name),null!=e.creatorId&&Object.hasOwnProperty.call(e,"creatorId")&&t.uint32(26).string(e.creatorId),null!=e.authorsIds&&Object.hasOwnProperty.call(e,"authorsIds")&&t.uint32(34).string(e.authorsIds),null!=e.diffData&&Object.hasOwnProperty.call(e,"diffData")&&t.uint32(42).string(e.diffData),null!=e.createdAt&&Object.hasOwnProperty.call(e,"createdAt")&&t.uint32(50).string(e.createdAt),null!=e.attributes&&Object.hasOwnProperty.call(e,"attributes")&&t.uint32(58).string(e.attributes),null!=e.toVersion&&Object.hasOwnProperty.call(e,"toVersion")&&t.uint32(64).uint32(e.toVersion),null!=e.fromVersion&&Object.hasOwnProperty.call(e,"fromVersion")&&t.uint32(72).uint32(e.fromVersion),null!=e.isEmptyCurrent&&Object.hasOwnProperty.call(e,"isEmptyCurrent")&&t.uint32(80).bool(e.isEmptyCurrent),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.RevisionDescriptor;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.revisionId=e.string();break;case 2:o.name=e.string();break;case 3:o.creatorId=e.string();break;case 4:o.authorsIds=e.string();break;case 5:o.diffData=e.string();break;case 6:o.createdAt=e.string();break;case 7:o.attributes=e.string();break;case 8:o.toVersion=e.uint32();break;case 9:o.fromVersion=e.uint32();break;case 10:o.isEmptyCurrent=e.bool();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.revisionId&&e.hasOwnProperty("revisionId")&&!r.isString(e.revisionId)?"revisionId: string expected":null!=e.name&&e.hasOwnProperty("name")&&!r.isString(e.name)?"name: string expected":null!=e.creatorId&&e.hasOwnProperty("creatorId")&&!r.isString(e.creatorId)?"creatorId: string expected":null!=e.authorsIds&&e.hasOwnProperty("authorsIds")&&!r.isString(e.authorsIds)?"authorsIds: string expected":null!=e.diffData&&e.hasOwnProperty("diffData")&&!r.isString(e.diffData)?"diffData: string expected":null!=e.createdAt&&e.hasOwnProperty("createdAt")&&!r.isString(e.createdAt)?"createdAt: string expected":null!=e.attributes&&e.hasOwnProperty("attributes")&&!r.isString(e.attributes)?"attributes: string expected":null!=e.toVersion&&e.hasOwnProperty("toVersion")&&!r.isInteger(e.toVersion)?"toVersion: integer expected":null!=e.fromVersion&&e.hasOwnProperty("fromVersion")&&!r.isInteger(e.fromVersion)?"fromVersion: integer expected":null!=e.isEmptyCurrent&&e.hasOwnProperty("isEmptyCurrent")&&"boolean"!=typeof e.isEmptyCurrent?"isEmptyCurrent: boolean expected":null},o.fromObject=function(e){if(e instanceof s.RevisionDescriptor)return e;var t=new s.RevisionDescriptor;return null!=e.revisionId&&(t.revisionId=String(e.revisionId)),null!=e.name&&(t.name=String(e.name)),null!=e.creatorId&&(t.creatorId=String(e.creatorId)),null!=e.authorsIds&&(t.authorsIds=String(e.authorsIds)),null!=e.diffData&&(t.diffData=String(e.diffData)),null!=e.createdAt&&(t.createdAt=String(e.createdAt)),null!=e.attributes&&(t.attributes=String(e.attributes)),null!=e.toVersion&&(t.toVersion=e.toVersion>>>0),null!=e.fromVersion&&(t.fromVersion=e.fromVersion>>>0),null!=e.isEmptyCurrent&&(t.isEmptyCurrent=Boolean(e.isEmptyCurrent)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.revisionId="",n.name="",n.creatorId="",n.authorsIds="",n.diffData="",n.createdAt="",n.attributes="",n.toVersion=0,n.fromVersion=0,n.isEmptyCurrent=!1),null!=e.revisionId&&e.hasOwnProperty("revisionId")&&(n.revisionId=e.revisionId),null!=e.name&&e.hasOwnProperty("name")&&(n.name=e.name),null!=e.creatorId&&e.hasOwnProperty("creatorId")&&(n.creatorId=e.creatorId),null!=e.authorsIds&&e.hasOwnProperty("authorsIds")&&(n.authorsIds=e.authorsIds),null!=e.diffData&&e.hasOwnProperty("diffData")&&(n.diffData=e.diffData),null!=e.createdAt&&e.hasOwnProperty("createdAt")&&(n.createdAt=e.createdAt),null!=e.attributes&&e.hasOwnProperty("attributes")&&(n.attributes=e.attributes),null!=e.toVersion&&e.hasOwnProperty("toVersion")&&(n.toVersion=e.toVersion),null!=e.fromVersion&&e.hasOwnProperty("fromVersion")&&(n.fromVersion=e.fromVersion),null!=e.isEmptyCurrent&&e.hasOwnProperty("isEmptyCurrent")&&(n.isEmptyCurrent=e.isEmptyCurrent),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/RevisionDescriptor"},o}(),s.RevisionHistoryConnectMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.documentId="",o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.documentId&&Object.hasOwnProperty.call(e,"documentId")&&t.uint32(10).string(e.documentId),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.RevisionHistoryConnectMessage;e.pos<r;){var i=e.uint32();i>>>3==1?o.documentId=e.string():e.skipType(7&i)}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.documentId&&e.hasOwnProperty("documentId")&&!r.isString(e.documentId)?"documentId: string expected":null},o.fromObject=function(e){if(e instanceof s.RevisionHistoryConnectMessage)return e;var t=new s.RevisionHistoryConnectMessage;return null!=e.documentId&&(t.documentId=String(e.documentId)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.documentId=""),null!=e.documentId&&e.hasOwnProperty("documentId")&&(n.documentId=e.documentId),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/RevisionHistoryConnectMessage"},o}(),s.RevisionHistoryGetRevisionMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.documentId="",o.prototype.revisionId="",o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.documentId&&Object.hasOwnProperty.call(e,"documentId")&&t.uint32(10).string(e.documentId),null!=e.revisionId&&Object.hasOwnProperty.call(e,"revisionId")&&t.uint32(18).string(e.revisionId),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.RevisionHistoryGetRevisionMessage;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.documentId=e.string();break;case 2:o.revisionId=e.string();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.documentId&&e.hasOwnProperty("documentId")&&!r.isString(e.documentId)?"documentId: string expected":null!=e.revisionId&&e.hasOwnProperty("revisionId")&&!r.isString(e.revisionId)?"revisionId: string expected":null},o.fromObject=function(e){if(e instanceof s.RevisionHistoryGetRevisionMessage)return e;var t=new s.RevisionHistoryGetRevisionMessage;return null!=e.documentId&&(t.documentId=String(e.documentId)),null!=e.revisionId&&(t.revisionId=String(e.revisionId)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.documentId="",n.revisionId=""),null!=e.documentId&&e.hasOwnProperty("documentId")&&(n.documentId=e.documentId),null!=e.revisionId&&e.hasOwnProperty("revisionId")&&(n.revisionId=e.revisionId),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/RevisionHistoryGetRevisionMessage"},o}(),s.RevisionHistoryReconnectMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.documentId="",o.prototype.requestId=0,o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.documentId&&Object.hasOwnProperty.call(e,"documentId")&&t.uint32(10).string(e.documentId),null!=e.requestId&&Object.hasOwnProperty.call(e,"requestId")&&t.uint32(16).uint32(e.requestId),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.RevisionHistoryReconnectMessage;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.documentId=e.string();break;case 2:o.requestId=e.uint32();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.documentId&&e.hasOwnProperty("documentId")&&!r.isString(e.documentId)?"documentId: string expected":null!=e.requestId&&e.hasOwnProperty("requestId")&&!r.isInteger(e.requestId)?"requestId: integer expected":null},o.fromObject=function(e){if(e instanceof s.RevisionHistoryReconnectMessage)return e;var t=new s.RevisionHistoryReconnectMessage;return null!=e.documentId&&(t.documentId=String(e.documentId)),null!=e.requestId&&(t.requestId=e.requestId>>>0),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.documentId="",n.requestId=0),null!=e.documentId&&e.hasOwnProperty("documentId")&&(n.documentId=e.documentId),null!=e.requestId&&e.hasOwnProperty("requestId")&&(n.requestId=e.requestId),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/RevisionHistoryReconnectMessage"},o}(),s.RevisionHistoryUpdateRevisionsMessage=function(){function o(e){if(this.revisions=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.documentId="",o.prototype.requestId=0,o.prototype.revisions=r.emptyArray,o.create=function(e){return new o(e)},o.encode=function(e,t){if(t||(t=n.create()),null!=e.documentId&&Object.hasOwnProperty.call(e,"documentId")&&t.uint32(10).string(e.documentId),null!=e.requestId&&Object.hasOwnProperty.call(e,"requestId")&&t.uint32(16).uint32(e.requestId),null!=e.revisions&&e.revisions.length)for(var r=0;r<e.revisions.length;++r)s.RevisionDescriptor.encode(e.revisions[r],t.uint32(26).fork()).ldelim();return t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.RevisionHistoryUpdateRevisionsMessage;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.documentId=e.string();break;case 2:o.requestId=e.uint32();break;case 3:o.revisions&&o.revisions.length||(o.revisions=[]),o.revisions.push(s.RevisionDescriptor.decode(e,e.uint32()));break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.documentId&&e.hasOwnProperty("documentId")&&!r.isString(e.documentId))return"documentId: string expected";if(null!=e.requestId&&e.hasOwnProperty("requestId")&&!r.isInteger(e.requestId))return"requestId: integer expected";if(null!=e.revisions&&e.hasOwnProperty("revisions")){if(!Array.isArray(e.revisions))return"revisions: array expected";for(var t=0;t<e.revisions.length;++t){var n=s.RevisionDescriptor.verify(e.revisions[t]);if(n)return"revisions."+n}}return null},o.fromObject=function(e){if(e instanceof s.RevisionHistoryUpdateRevisionsMessage)return e;var t=new s.RevisionHistoryUpdateRevisionsMessage;if(null!=e.documentId&&(t.documentId=String(e.documentId)),null!=e.requestId&&(t.requestId=e.requestId>>>0),e.revisions){if(!Array.isArray(e.revisions))throw TypeError(".RevisionHistoryUpdateRevisionsMessage.revisions: array expected");t.revisions=[];for(var n=0;n<e.revisions.length;++n){if("object"!=typeof e.revisions[n])throw TypeError(".RevisionHistoryUpdateRevisionsMessage.revisions: object expected");t.revisions[n]=s.RevisionDescriptor.fromObject(e.revisions[n])}}return t},o.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.revisions=[]),t.defaults&&(n.documentId="",n.requestId=0),null!=e.documentId&&e.hasOwnProperty("documentId")&&(n.documentId=e.documentId),null!=e.requestId&&e.hasOwnProperty("requestId")&&(n.requestId=e.requestId),e.revisions&&e.revisions.length){n.revisions=[];for(var r=0;r<e.revisions.length;++r)n.revisions[r]=s.RevisionDescriptor.toObject(e.revisions[r],t)}return n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/RevisionHistoryUpdateRevisionsMessage"},o}(),s.RevisionHistoryConnectResponse=function(){function o(e){if(this.revisions=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.channel="",o.prototype.requestId=0,o.prototype.revisions=r.emptyArray,o.create=function(e){return new o(e)},o.encode=function(e,t){if(t||(t=n.create()),null!=e.channel&&Object.hasOwnProperty.call(e,"channel")&&t.uint32(10).string(e.channel),null!=e.requestId&&Object.hasOwnProperty.call(e,"requestId")&&t.uint32(16).uint32(e.requestId),null!=e.revisions&&e.revisions.length)for(var r=0;r<e.revisions.length;++r)s.RevisionDescriptor.encode(e.revisions[r],t.uint32(26).fork()).ldelim();return t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.RevisionHistoryConnectResponse;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.channel=e.string();break;case 2:o.requestId=e.uint32();break;case 3:o.revisions&&o.revisions.length||(o.revisions=[]),o.revisions.push(s.RevisionDescriptor.decode(e,e.uint32()));break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.channel&&e.hasOwnProperty("channel")&&!r.isString(e.channel))return"channel: string expected";if(null!=e.requestId&&e.hasOwnProperty("requestId")&&!r.isInteger(e.requestId))return"requestId: integer expected";if(null!=e.revisions&&e.hasOwnProperty("revisions")){if(!Array.isArray(e.revisions))return"revisions: array expected";for(var t=0;t<e.revisions.length;++t){var n=s.RevisionDescriptor.verify(e.revisions[t]);if(n)return"revisions."+n}}return null},o.fromObject=function(e){if(e instanceof s.RevisionHistoryConnectResponse)return e;var t=new s.RevisionHistoryConnectResponse;if(null!=e.channel&&(t.channel=String(e.channel)),null!=e.requestId&&(t.requestId=e.requestId>>>0),e.revisions){if(!Array.isArray(e.revisions))throw TypeError(".RevisionHistoryConnectResponse.revisions: array expected");t.revisions=[];for(var n=0;n<e.revisions.length;++n){if("object"!=typeof e.revisions[n])throw TypeError(".RevisionHistoryConnectResponse.revisions: object expected");t.revisions[n]=s.RevisionDescriptor.fromObject(e.revisions[n])}}return t},o.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.revisions=[]),t.defaults&&(n.channel="",n.requestId=0),null!=e.channel&&e.hasOwnProperty("channel")&&(n.channel=e.channel),null!=e.requestId&&e.hasOwnProperty("requestId")&&(n.requestId=e.requestId),e.revisions&&e.revisions.length){n.revisions=[];for(var r=0;r<e.revisions.length;++r)n.revisions[r]=s.RevisionDescriptor.toObject(e.revisions[r],t)}return n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/RevisionHistoryConnectResponse"},o}(),s.RevisionHistoryGetRevisionResponse=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.revisionId="",o.prototype.name="",o.prototype.creatorId="",o.prototype.authorsIds="",o.prototype.diffData="",o.prototype.createdAt="",o.prototype.attributes="",o.prototype.toVersion=0,o.prototype.fromVersion=0,o.prototype.isEmptyCurrent=!1,o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.revisionId&&Object.hasOwnProperty.call(e,"revisionId")&&t.uint32(10).string(e.revisionId),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(18).string(e.name),null!=e.creatorId&&Object.hasOwnProperty.call(e,"creatorId")&&t.uint32(26).string(e.creatorId),null!=e.authorsIds&&Object.hasOwnProperty.call(e,"authorsIds")&&t.uint32(34).string(e.authorsIds),null!=e.diffData&&Object.hasOwnProperty.call(e,"diffData")&&t.uint32(42).string(e.diffData),null!=e.createdAt&&Object.hasOwnProperty.call(e,"createdAt")&&t.uint32(50).string(e.createdAt),null!=e.attributes&&Object.hasOwnProperty.call(e,"attributes")&&t.uint32(58).string(e.attributes),null!=e.toVersion&&Object.hasOwnProperty.call(e,"toVersion")&&t.uint32(64).uint32(e.toVersion),null!=e.fromVersion&&Object.hasOwnProperty.call(e,"fromVersion")&&t.uint32(72).uint32(e.fromVersion),null!=e.isEmptyCurrent&&Object.hasOwnProperty.call(e,"isEmptyCurrent")&&t.uint32(80).bool(e.isEmptyCurrent),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.RevisionHistoryGetRevisionResponse;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.revisionId=e.string();break;case 2:o.name=e.string();break;case 3:o.creatorId=e.string();break;case 4:o.authorsIds=e.string();break;case 5:o.diffData=e.string();break;case 6:o.createdAt=e.string();break;case 7:o.attributes=e.string();break;case 8:o.toVersion=e.uint32();break;case 9:o.fromVersion=e.uint32();break;case 10:o.isEmptyCurrent=e.bool();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.revisionId&&e.hasOwnProperty("revisionId")&&!r.isString(e.revisionId)?"revisionId: string expected":null!=e.name&&e.hasOwnProperty("name")&&!r.isString(e.name)?"name: string expected":null!=e.creatorId&&e.hasOwnProperty("creatorId")&&!r.isString(e.creatorId)?"creatorId: string expected":null!=e.authorsIds&&e.hasOwnProperty("authorsIds")&&!r.isString(e.authorsIds)?"authorsIds: string expected":null!=e.diffData&&e.hasOwnProperty("diffData")&&!r.isString(e.diffData)?"diffData: string expected":null!=e.createdAt&&e.hasOwnProperty("createdAt")&&!r.isString(e.createdAt)?"createdAt: string expected":null!=e.attributes&&e.hasOwnProperty("attributes")&&!r.isString(e.attributes)?"attributes: string expected":null!=e.toVersion&&e.hasOwnProperty("toVersion")&&!r.isInteger(e.toVersion)?"toVersion: integer expected":null!=e.fromVersion&&e.hasOwnProperty("fromVersion")&&!r.isInteger(e.fromVersion)?"fromVersion: integer expected":null!=e.isEmptyCurrent&&e.hasOwnProperty("isEmptyCurrent")&&"boolean"!=typeof e.isEmptyCurrent?"isEmptyCurrent: boolean expected":null},o.fromObject=function(e){if(e instanceof s.RevisionHistoryGetRevisionResponse)return e;var t=new s.RevisionHistoryGetRevisionResponse;return null!=e.revisionId&&(t.revisionId=String(e.revisionId)),null!=e.name&&(t.name=String(e.name)),null!=e.creatorId&&(t.creatorId=String(e.creatorId)),null!=e.authorsIds&&(t.authorsIds=String(e.authorsIds)),null!=e.diffData&&(t.diffData=String(e.diffData)),null!=e.createdAt&&(t.createdAt=String(e.createdAt)),null!=e.attributes&&(t.attributes=String(e.attributes)),null!=e.toVersion&&(t.toVersion=e.toVersion>>>0),null!=e.fromVersion&&(t.fromVersion=e.fromVersion>>>0),null!=e.isEmptyCurrent&&(t.isEmptyCurrent=Boolean(e.isEmptyCurrent)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.revisionId="",n.name="",n.creatorId="",n.authorsIds="",n.diffData="",n.createdAt="",n.attributes="",n.toVersion=0,n.fromVersion=0,n.isEmptyCurrent=!1),null!=e.revisionId&&e.hasOwnProperty("revisionId")&&(n.revisionId=e.revisionId),null!=e.name&&e.hasOwnProperty("name")&&(n.name=e.name),null!=e.creatorId&&e.hasOwnProperty("creatorId")&&(n.creatorId=e.creatorId),null!=e.authorsIds&&e.hasOwnProperty("authorsIds")&&(n.authorsIds=e.authorsIds),null!=e.diffData&&e.hasOwnProperty("diffData")&&(n.diffData=e.diffData),null!=e.createdAt&&e.hasOwnProperty("createdAt")&&(n.createdAt=e.createdAt),null!=e.attributes&&e.hasOwnProperty("attributes")&&(n.attributes=e.attributes),null!=e.toVersion&&e.hasOwnProperty("toVersion")&&(n.toVersion=e.toVersion),null!=e.fromVersion&&e.hasOwnProperty("fromVersion")&&(n.fromVersion=e.fromVersion),null!=e.isEmptyCurrent&&e.hasOwnProperty("isEmptyCurrent")&&(n.isEmptyCurrent=e.isEmptyCurrent),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/RevisionHistoryGetRevisionResponse"},o}(),s.RevisionHistoryUpdateRevisionsResponse=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.requestId=0,o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.requestId&&Object.hasOwnProperty.call(e,"requestId")&&t.uint32(8).uint32(e.requestId),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.RevisionHistoryUpdateRevisionsResponse;e.pos<r;){var i=e.uint32();i>>>3==1?o.requestId=e.uint32():e.skipType(7&i)}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.requestId&&e.hasOwnProperty("requestId")&&!r.isInteger(e.requestId)?"requestId: integer expected":null},o.fromObject=function(e){if(e instanceof s.RevisionHistoryUpdateRevisionsResponse)return e;var t=new s.RevisionHistoryUpdateRevisionsResponse;return null!=e.requestId&&(t.requestId=e.requestId>>>0),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.requestId=0),null!=e.requestId&&e.hasOwnProperty("requestId")&&(n.requestId=e.requestId),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/RevisionHistoryUpdateRevisionsResponse"},o}(),s.SessionsSocketDescriptor=function(){function o(e){if(this.permissions=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.session="",o.prototype.user="",o.prototype.role="",o.prototype.permissions=r.emptyArray,o.create=function(e){return new o(e)},o.encode=function(e,t){if(t||(t=n.create()),null!=e.session&&Object.hasOwnProperty.call(e,"session")&&t.uint32(10).string(e.session),null!=e.user&&Object.hasOwnProperty.call(e,"user")&&t.uint32(18).string(e.user),null!=e.role&&Object.hasOwnProperty.call(e,"role")&&t.uint32(26).string(e.role),null!=e.permissions&&e.permissions.length)for(var r=0;r<e.permissions.length;++r)t.uint32(34).string(e.permissions[r]);return t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.SessionsSocketDescriptor;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.session=e.string();break;case 2:o.user=e.string();break;case 3:o.role=e.string();break;case 4:o.permissions&&o.permissions.length||(o.permissions=[]),o.permissions.push(e.string());break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.session&&e.hasOwnProperty("session")&&!r.isString(e.session))return"session: string expected";if(null!=e.user&&e.hasOwnProperty("user")&&!r.isString(e.user))return"user: string expected";if(null!=e.role&&e.hasOwnProperty("role")&&!r.isString(e.role))return"role: string expected";if(null!=e.permissions&&e.hasOwnProperty("permissions")){if(!Array.isArray(e.permissions))return"permissions: array expected";for(var t=0;t<e.permissions.length;++t)if(!r.isString(e.permissions[t]))return"permissions: string[] expected"}return null},o.fromObject=function(e){if(e instanceof s.SessionsSocketDescriptor)return e;var t=new s.SessionsSocketDescriptor;if(null!=e.session&&(t.session=String(e.session)),null!=e.user&&(t.user=String(e.user)),null!=e.role&&(t.role=String(e.role)),e.permissions){if(!Array.isArray(e.permissions))throw TypeError(".SessionsSocketDescriptor.permissions: array expected");t.permissions=[];for(var n=0;n<e.permissions.length;++n)t.permissions[n]=String(e.permissions[n])}return t},o.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.permissions=[]),t.defaults&&(n.session="",n.user="",n.role=""),null!=e.session&&e.hasOwnProperty("session")&&(n.session=e.session),null!=e.user&&e.hasOwnProperty("user")&&(n.user=e.user),null!=e.role&&e.hasOwnProperty("role")&&(n.role=e.role),e.permissions&&e.permissions.length){n.permissions=[];for(var r=0;r<e.permissions.length;++r)n.permissions[r]=e.permissions[r]}return n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/SessionsSocketDescriptor"},o}(),s.SessionsConnectMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.id="",o.prototype.sessionType=0,o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.id&&Object.hasOwnProperty.call(e,"id")&&t.uint32(10).string(e.id),null!=e.sessionType&&Object.hasOwnProperty.call(e,"sessionType")&&t.uint32(16).uint32(e.sessionType),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.SessionsConnectMessage;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.id=e.string();break;case 2:o.sessionType=e.uint32();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.id&&e.hasOwnProperty("id")&&!r.isString(e.id)?"id: string expected":null!=e.sessionType&&e.hasOwnProperty("sessionType")&&!r.isInteger(e.sessionType)?"sessionType: integer expected":null},o.fromObject=function(e){if(e instanceof s.SessionsConnectMessage)return e;var t=new s.SessionsConnectMessage;return null!=e.id&&(t.id=String(e.id)),null!=e.sessionType&&(t.sessionType=e.sessionType>>>0),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.id="",n.sessionType=0),null!=e.id&&e.hasOwnProperty("id")&&(n.id=e.id),null!=e.sessionType&&e.hasOwnProperty("sessionType")&&(n.sessionType=e.sessionType),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/SessionsConnectMessage"},o}(),s.SocketConnectMessage=function(){function o(e){if(this.permissions=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.id="",o.prototype.userId="",o.prototype.role="",o.prototype.permissions=r.emptyArray,o.create=function(e){return new o(e)},o.encode=function(e,t){if(t||(t=n.create()),null!=e.id&&Object.hasOwnProperty.call(e,"id")&&t.uint32(10).string(e.id),null!=e.userId&&Object.hasOwnProperty.call(e,"userId")&&t.uint32(18).string(e.userId),null!=e.role&&Object.hasOwnProperty.call(e,"role")&&t.uint32(26).string(e.role),null!=e.permissions&&e.permissions.length)for(var r=0;r<e.permissions.length;++r)t.uint32(34).string(e.permissions[r]);return t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.SocketConnectMessage;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.id=e.string();break;case 2:o.userId=e.string();break;case 3:o.role=e.string();break;case 4:o.permissions&&o.permissions.length||(o.permissions=[]),o.permissions.push(e.string());break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.id&&e.hasOwnProperty("id")&&!r.isString(e.id))return"id: string expected";if(null!=e.userId&&e.hasOwnProperty("userId")&&!r.isString(e.userId))return"userId: string expected";if(null!=e.role&&e.hasOwnProperty("role")&&!r.isString(e.role))return"role: string expected";if(null!=e.permissions&&e.hasOwnProperty("permissions")){if(!Array.isArray(e.permissions))return"permissions: array expected";for(var t=0;t<e.permissions.length;++t)if(!r.isString(e.permissions[t]))return"permissions: string[] expected"}return null},o.fromObject=function(e){if(e instanceof s.SocketConnectMessage)return e;var t=new s.SocketConnectMessage;if(null!=e.id&&(t.id=String(e.id)),null!=e.userId&&(t.userId=String(e.userId)),null!=e.role&&(t.role=String(e.role)),e.permissions){if(!Array.isArray(e.permissions))throw TypeError(".SocketConnectMessage.permissions: array expected");t.permissions=[];for(var n=0;n<e.permissions.length;++n)t.permissions[n]=String(e.permissions[n])}return t},o.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.permissions=[]),t.defaults&&(n.id="",n.userId="",n.role=""),null!=e.id&&e.hasOwnProperty("id")&&(n.id=e.id),null!=e.userId&&e.hasOwnProperty("userId")&&(n.userId=e.userId),null!=e.role&&e.hasOwnProperty("role")&&(n.role=e.role),e.permissions&&e.permissions.length){n.permissions=[];for(var r=0;r<e.permissions.length;++r)n.permissions[r]=e.permissions[r]}return n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/SocketConnectMessage"},o}(),s.SocketDisconnectMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.id="",o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.id&&Object.hasOwnProperty.call(e,"id")&&t.uint32(10).string(e.id),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.SocketDisconnectMessage;e.pos<r;){var i=e.uint32();i>>>3==1?o.id=e.string():e.skipType(7&i)}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.id&&e.hasOwnProperty("id")&&!r.isString(e.id)?"id: string expected":null},o.fromObject=function(e){if(e instanceof s.SocketDisconnectMessage)return e;var t=new s.SocketDisconnectMessage;return null!=e.id&&(t.id=String(e.id)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.id=""),null!=e.id&&e.hasOwnProperty("id")&&(n.id=e.id),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/SocketDisconnectMessage"},o}(),s.SessionsConnectResponse=function(){function o(e){if(this.sockets=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.channel="",o.prototype.sockets=r.emptyArray,o.create=function(e){return new o(e)},o.encode=function(e,t){if(t||(t=n.create()),null!=e.channel&&Object.hasOwnProperty.call(e,"channel")&&t.uint32(10).string(e.channel),null!=e.sockets&&e.sockets.length)for(var r=0;r<e.sockets.length;++r)s.SessionsSocketDescriptor.encode(e.sockets[r],t.uint32(18).fork()).ldelim();return t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.SessionsConnectResponse;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.channel=e.string();break;case 2:o.sockets&&o.sockets.length||(o.sockets=[]),o.sockets.push(s.SessionsSocketDescriptor.decode(e,e.uint32()));break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.channel&&e.hasOwnProperty("channel")&&!r.isString(e.channel))return"channel: string expected";if(null!=e.sockets&&e.hasOwnProperty("sockets")){if(!Array.isArray(e.sockets))return"sockets: array expected";for(var t=0;t<e.sockets.length;++t){var n=s.SessionsSocketDescriptor.verify(e.sockets[t]);if(n)return"sockets."+n}}return null},o.fromObject=function(e){if(e instanceof s.SessionsConnectResponse)return e;var t=new s.SessionsConnectResponse;if(null!=e.channel&&(t.channel=String(e.channel)),e.sockets){if(!Array.isArray(e.sockets))throw TypeError(".SessionsConnectResponse.sockets: array expected");t.sockets=[];for(var n=0;n<e.sockets.length;++n){if("object"!=typeof e.sockets[n])throw TypeError(".SessionsConnectResponse.sockets: object expected");t.sockets[n]=s.SessionsSocketDescriptor.fromObject(e.sockets[n])}}return t},o.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.sockets=[]),t.defaults&&(n.channel=""),null!=e.channel&&e.hasOwnProperty("channel")&&(n.channel=e.channel),e.sockets&&e.sockets.length){n.sockets=[];for(var r=0;r<e.sockets.length;++r)n.sockets[r]=s.SessionsSocketDescriptor.toObject(e.sockets[r],t)}return n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/SessionsConnectResponse"},o}(),s.SuggestionDescriptor=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.id="",o.prototype.authorId="",o.prototype.type="",o.prototype.createdAt="",o.prototype.data="",o.prototype.hasComments=!1,o.prototype.state="",o.prototype.attributes="",o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.id&&Object.hasOwnProperty.call(e,"id")&&t.uint32(10).string(e.id),null!=e.authorId&&Object.hasOwnProperty.call(e,"authorId")&&t.uint32(18).string(e.authorId),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(26).string(e.type),null!=e.createdAt&&Object.hasOwnProperty.call(e,"createdAt")&&t.uint32(34).string(e.createdAt),null!=e.data&&Object.hasOwnProperty.call(e,"data")&&t.uint32(42).string(e.data),null!=e.hasComments&&Object.hasOwnProperty.call(e,"hasComments")&&t.uint32(48).bool(e.hasComments),null!=e.state&&Object.hasOwnProperty.call(e,"state")&&t.uint32(58).string(e.state),null!=e.attributes&&Object.hasOwnProperty.call(e,"attributes")&&t.uint32(66).string(e.attributes),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.SuggestionDescriptor;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.id=e.string();break;case 2:o.authorId=e.string();break;case 3:o.type=e.string();break;case 4:o.createdAt=e.string();break;case 5:o.data=e.string();break;case 6:o.hasComments=e.bool();break;case 7:o.state=e.string();break;case 8:o.attributes=e.string();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.id&&e.hasOwnProperty("id")&&!r.isString(e.id)?"id: string expected":null!=e.authorId&&e.hasOwnProperty("authorId")&&!r.isString(e.authorId)?"authorId: string expected":null!=e.type&&e.hasOwnProperty("type")&&!r.isString(e.type)?"type: string expected":null!=e.createdAt&&e.hasOwnProperty("createdAt")&&!r.isString(e.createdAt)?"createdAt: string expected":null!=e.data&&e.hasOwnProperty("data")&&!r.isString(e.data)?"data: string expected":null!=e.hasComments&&e.hasOwnProperty("hasComments")&&"boolean"!=typeof e.hasComments?"hasComments: boolean expected":null!=e.state&&e.hasOwnProperty("state")&&!r.isString(e.state)?"state: string expected":null!=e.attributes&&e.hasOwnProperty("attributes")&&!r.isString(e.attributes)?"attributes: string expected":null},o.fromObject=function(e){if(e instanceof s.SuggestionDescriptor)return e;var t=new s.SuggestionDescriptor;return null!=e.id&&(t.id=String(e.id)),null!=e.authorId&&(t.authorId=String(e.authorId)),null!=e.type&&(t.type=String(e.type)),null!=e.createdAt&&(t.createdAt=String(e.createdAt)),null!=e.data&&(t.data=String(e.data)),null!=e.hasComments&&(t.hasComments=Boolean(e.hasComments)),null!=e.state&&(t.state=String(e.state)),null!=e.attributes&&(t.attributes=String(e.attributes)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.id="",n.authorId="",n.type="",n.createdAt="",n.data="",n.hasComments=!1,n.state="",n.attributes=""),null!=e.id&&e.hasOwnProperty("id")&&(n.id=e.id),null!=e.authorId&&e.hasOwnProperty("authorId")&&(n.authorId=e.authorId),null!=e.type&&e.hasOwnProperty("type")&&(n.type=e.type),null!=e.createdAt&&e.hasOwnProperty("createdAt")&&(n.createdAt=e.createdAt),null!=e.data&&e.hasOwnProperty("data")&&(n.data=e.data),null!=e.hasComments&&e.hasOwnProperty("hasComments")&&(n.hasComments=e.hasComments),null!=e.state&&e.hasOwnProperty("state")&&(n.state=e.state),null!=e.attributes&&e.hasOwnProperty("attributes")&&(n.attributes=e.attributes),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/SuggestionDescriptor"},o}(),s.TrackChangesAddSuggestionMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.id="",o.prototype.documentId="",o.prototype.type="",o.prototype.data="",o.prototype.originalSuggestionId="",o.prototype.attributes="",o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.id&&Object.hasOwnProperty.call(e,"id")&&t.uint32(10).string(e.id),null!=e.documentId&&Object.hasOwnProperty.call(e,"documentId")&&t.uint32(18).string(e.documentId),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(26).string(e.type),null!=e.data&&Object.hasOwnProperty.call(e,"data")&&t.uint32(34).string(e.data),null!=e.originalSuggestionId&&Object.hasOwnProperty.call(e,"originalSuggestionId")&&t.uint32(42).string(e.originalSuggestionId),null!=e.attributes&&Object.hasOwnProperty.call(e,"attributes")&&t.uint32(50).string(e.attributes),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.TrackChangesAddSuggestionMessage;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.id=e.string();break;case 2:o.documentId=e.string();break;case 3:o.type=e.string();break;case 4:o.data=e.string();break;case 5:o.originalSuggestionId=e.string();break;case 6:o.attributes=e.string();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.id&&e.hasOwnProperty("id")&&!r.isString(e.id)?"id: string expected":null!=e.documentId&&e.hasOwnProperty("documentId")&&!r.isString(e.documentId)?"documentId: string expected":null!=e.type&&e.hasOwnProperty("type")&&!r.isString(e.type)?"type: string expected":null!=e.data&&e.hasOwnProperty("data")&&!r.isString(e.data)?"data: string expected":null!=e.originalSuggestionId&&e.hasOwnProperty("originalSuggestionId")&&!r.isString(e.originalSuggestionId)?"originalSuggestionId: string expected":null!=e.attributes&&e.hasOwnProperty("attributes")&&!r.isString(e.attributes)?"attributes: string expected":null},o.fromObject=function(e){if(e instanceof s.TrackChangesAddSuggestionMessage)return e;var t=new s.TrackChangesAddSuggestionMessage;return null!=e.id&&(t.id=String(e.id)),null!=e.documentId&&(t.documentId=String(e.documentId)),null!=e.type&&(t.type=String(e.type)),null!=e.data&&(t.data=String(e.data)),null!=e.originalSuggestionId&&(t.originalSuggestionId=String(e.originalSuggestionId)),null!=e.attributes&&(t.attributes=String(e.attributes)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.id="",n.documentId="",n.type="",n.data="",n.originalSuggestionId="",n.attributes=""),null!=e.id&&e.hasOwnProperty("id")&&(n.id=e.id),null!=e.documentId&&e.hasOwnProperty("documentId")&&(n.documentId=e.documentId),null!=e.type&&e.hasOwnProperty("type")&&(n.type=e.type),null!=e.data&&e.hasOwnProperty("data")&&(n.data=e.data),null!=e.originalSuggestionId&&e.hasOwnProperty("originalSuggestionId")&&(n.originalSuggestionId=e.originalSuggestionId),null!=e.attributes&&e.hasOwnProperty("attributes")&&(n.attributes=e.attributes),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/TrackChangesAddSuggestionMessage"},o}(),s.TrackChangesBatchUpdateSuggestionsStateMessage=function(){function o(e){if(this.ids=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.ids=r.emptyArray,o.prototype.documentId="",o.prototype.state="",o.create=function(e){return new o(e)},o.encode=function(e,t){if(t||(t=n.create()),null!=e.ids&&e.ids.length)for(var r=0;r<e.ids.length;++r)t.uint32(10).string(e.ids[r]);return null!=e.documentId&&Object.hasOwnProperty.call(e,"documentId")&&t.uint32(18).string(e.documentId),null!=e.state&&Object.hasOwnProperty.call(e,"state")&&t.uint32(26).string(e.state),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.TrackChangesBatchUpdateSuggestionsStateMessage;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.ids&&o.ids.length||(o.ids=[]),o.ids.push(e.string());break;case 2:o.documentId=e.string();break;case 3:o.state=e.string();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.ids&&e.hasOwnProperty("ids")){if(!Array.isArray(e.ids))return"ids: array expected";for(var t=0;t<e.ids.length;++t)if(!r.isString(e.ids[t]))return"ids: string[] expected"}return null!=e.documentId&&e.hasOwnProperty("documentId")&&!r.isString(e.documentId)?"documentId: string expected":null!=e.state&&e.hasOwnProperty("state")&&!r.isString(e.state)?"state: string expected":null},o.fromObject=function(e){if(e instanceof s.TrackChangesBatchUpdateSuggestionsStateMessage)return e;var t=new s.TrackChangesBatchUpdateSuggestionsStateMessage;if(e.ids){if(!Array.isArray(e.ids))throw TypeError(".TrackChangesBatchUpdateSuggestionsStateMessage.ids: array expected");t.ids=[];for(var n=0;n<e.ids.length;++n)t.ids[n]=String(e.ids[n])}return null!=e.documentId&&(t.documentId=String(e.documentId)),null!=e.state&&(t.state=String(e.state)),t},o.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.ids=[]),t.defaults&&(n.documentId="",n.state=""),e.ids&&e.ids.length){n.ids=[];for(var r=0;r<e.ids.length;++r)n.ids[r]=e.ids[r]}return null!=e.documentId&&e.hasOwnProperty("documentId")&&(n.documentId=e.documentId),null!=e.state&&e.hasOwnProperty("state")&&(n.state=e.state),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/TrackChangesBatchUpdateSuggestionsStateMessage"},o}(),s.TrackChangesConnectMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.documentId="",o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.documentId&&Object.hasOwnProperty.call(e,"documentId")&&t.uint32(10).string(e.documentId),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.TrackChangesConnectMessage;e.pos<r;){var i=e.uint32();i>>>3==1?o.documentId=e.string():e.skipType(7&i)}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.documentId&&e.hasOwnProperty("documentId")&&!r.isString(e.documentId)?"documentId: string expected":null},o.fromObject=function(e){if(e instanceof s.TrackChangesConnectMessage)return e;var t=new s.TrackChangesConnectMessage;return null!=e.documentId&&(t.documentId=String(e.documentId)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.documentId=""),null!=e.documentId&&e.hasOwnProperty("documentId")&&(n.documentId=e.documentId),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/TrackChangesConnectMessage"},o}(),s.TrackChangesGetAllSuggestionMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.documentId="",o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.documentId&&Object.hasOwnProperty.call(e,"documentId")&&t.uint32(10).string(e.documentId),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.TrackChangesGetAllSuggestionMessage;e.pos<r;){var i=e.uint32();i>>>3==1?o.documentId=e.string():e.skipType(7&i)}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.documentId&&e.hasOwnProperty("documentId")&&!r.isString(e.documentId)?"documentId: string expected":null},o.fromObject=function(e){if(e instanceof s.TrackChangesGetAllSuggestionMessage)return e;var t=new s.TrackChangesGetAllSuggestionMessage;return null!=e.documentId&&(t.documentId=String(e.documentId)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.documentId=""),null!=e.documentId&&e.hasOwnProperty("documentId")&&(n.documentId=e.documentId),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/TrackChangesGetAllSuggestionMessage"},o}(),s.TrackChangesGetSuggestionMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.id="",o.prototype.documentId="",o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.id&&Object.hasOwnProperty.call(e,"id")&&t.uint32(10).string(e.id),null!=e.documentId&&Object.hasOwnProperty.call(e,"documentId")&&t.uint32(18).string(e.documentId),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.TrackChangesGetSuggestionMessage;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.id=e.string();break;case 2:o.documentId=e.string();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.id&&e.hasOwnProperty("id")&&!r.isString(e.id)?"id: string expected":null!=e.documentId&&e.hasOwnProperty("documentId")&&!r.isString(e.documentId)?"documentId: string expected":null},o.fromObject=function(e){if(e instanceof s.TrackChangesGetSuggestionMessage)return e;var t=new s.TrackChangesGetSuggestionMessage;return null!=e.id&&(t.id=String(e.id)),null!=e.documentId&&(t.documentId=String(e.documentId)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.id="",n.documentId=""),null!=e.id&&e.hasOwnProperty("id")&&(n.id=e.id),null!=e.documentId&&e.hasOwnProperty("documentId")&&(n.documentId=e.documentId),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/TrackChangesGetSuggestionMessage"},o}(),s.TrackChangesUpdateSuggestionMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.id="",o.prototype.documentId="",o.prototype.hasComments=!1,o.prototype.isHasCommentsModified=!1,o.prototype.state="",o.prototype.attributes="",o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.id&&Object.hasOwnProperty.call(e,"id")&&t.uint32(10).string(e.id),null!=e.documentId&&Object.hasOwnProperty.call(e,"documentId")&&t.uint32(18).string(e.documentId),null!=e.hasComments&&Object.hasOwnProperty.call(e,"hasComments")&&t.uint32(24).bool(e.hasComments),null!=e.isHasCommentsModified&&Object.hasOwnProperty.call(e,"isHasCommentsModified")&&t.uint32(32).bool(e.isHasCommentsModified),null!=e.state&&Object.hasOwnProperty.call(e,"state")&&t.uint32(42).string(e.state),null!=e.attributes&&Object.hasOwnProperty.call(e,"attributes")&&t.uint32(50).string(e.attributes),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.TrackChangesUpdateSuggestionMessage;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.id=e.string();break;case 2:o.documentId=e.string();break;case 3:o.hasComments=e.bool();break;case 4:o.isHasCommentsModified=e.bool();break;case 5:o.state=e.string();break;case 6:o.attributes=e.string();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.id&&e.hasOwnProperty("id")&&!r.isString(e.id)?"id: string expected":null!=e.documentId&&e.hasOwnProperty("documentId")&&!r.isString(e.documentId)?"documentId: string expected":null!=e.hasComments&&e.hasOwnProperty("hasComments")&&"boolean"!=typeof e.hasComments?"hasComments: boolean expected":null!=e.isHasCommentsModified&&e.hasOwnProperty("isHasCommentsModified")&&"boolean"!=typeof e.isHasCommentsModified?"isHasCommentsModified: boolean expected":null!=e.state&&e.hasOwnProperty("state")&&!r.isString(e.state)?"state: string expected":null!=e.attributes&&e.hasOwnProperty("attributes")&&!r.isString(e.attributes)?"attributes: string expected":null},o.fromObject=function(e){if(e instanceof s.TrackChangesUpdateSuggestionMessage)return e;var t=new s.TrackChangesUpdateSuggestionMessage;return null!=e.id&&(t.id=String(e.id)),null!=e.documentId&&(t.documentId=String(e.documentId)),null!=e.hasComments&&(t.hasComments=Boolean(e.hasComments)),null!=e.isHasCommentsModified&&(t.isHasCommentsModified=Boolean(e.isHasCommentsModified)),null!=e.state&&(t.state=String(e.state)),null!=e.attributes&&(t.attributes=String(e.attributes)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.id="",n.documentId="",n.hasComments=!1,n.isHasCommentsModified=!1,n.state="",n.attributes=""),null!=e.id&&e.hasOwnProperty("id")&&(n.id=e.id),null!=e.documentId&&e.hasOwnProperty("documentId")&&(n.documentId=e.documentId),null!=e.hasComments&&e.hasOwnProperty("hasComments")&&(n.hasComments=e.hasComments),null!=e.isHasCommentsModified&&e.hasOwnProperty("isHasCommentsModified")&&(n.isHasCommentsModified=e.isHasCommentsModified),null!=e.state&&e.hasOwnProperty("state")&&(n.state=e.state),null!=e.attributes&&e.hasOwnProperty("attributes")&&(n.attributes=e.attributes),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/TrackChangesUpdateSuggestionMessage"},o}(),s.TrackChangesAddSuggestionResponse=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.id="",o.prototype.authorId="",o.prototype.type="",o.prototype.createdAt="",o.prototype.data="",o.prototype.hasComments=!1,o.prototype.state="",o.prototype.attributes="",o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.id&&Object.hasOwnProperty.call(e,"id")&&t.uint32(10).string(e.id),null!=e.authorId&&Object.hasOwnProperty.call(e,"authorId")&&t.uint32(18).string(e.authorId),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(26).string(e.type),null!=e.createdAt&&Object.hasOwnProperty.call(e,"createdAt")&&t.uint32(34).string(e.createdAt),null!=e.data&&Object.hasOwnProperty.call(e,"data")&&t.uint32(42).string(e.data),null!=e.hasComments&&Object.hasOwnProperty.call(e,"hasComments")&&t.uint32(48).bool(e.hasComments),null!=e.state&&Object.hasOwnProperty.call(e,"state")&&t.uint32(58).string(e.state),null!=e.attributes&&Object.hasOwnProperty.call(e,"attributes")&&t.uint32(66).string(e.attributes),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.TrackChangesAddSuggestionResponse;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.id=e.string();break;case 2:o.authorId=e.string();break;case 3:o.type=e.string();break;case 4:o.createdAt=e.string();break;case 5:o.data=e.string();break;case 6:o.hasComments=e.bool();break;case 7:o.state=e.string();break;case 8:o.attributes=e.string();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.id&&e.hasOwnProperty("id")&&!r.isString(e.id)?"id: string expected":null!=e.authorId&&e.hasOwnProperty("authorId")&&!r.isString(e.authorId)?"authorId: string expected":null!=e.type&&e.hasOwnProperty("type")&&!r.isString(e.type)?"type: string expected":null!=e.createdAt&&e.hasOwnProperty("createdAt")&&!r.isString(e.createdAt)?"createdAt: string expected":null!=e.data&&e.hasOwnProperty("data")&&!r.isString(e.data)?"data: string expected":null!=e.hasComments&&e.hasOwnProperty("hasComments")&&"boolean"!=typeof e.hasComments?"hasComments: boolean expected":null!=e.state&&e.hasOwnProperty("state")&&!r.isString(e.state)?"state: string expected":null!=e.attributes&&e.hasOwnProperty("attributes")&&!r.isString(e.attributes)?"attributes: string expected":null},o.fromObject=function(e){if(e instanceof s.TrackChangesAddSuggestionResponse)return e;var t=new s.TrackChangesAddSuggestionResponse;return null!=e.id&&(t.id=String(e.id)),null!=e.authorId&&(t.authorId=String(e.authorId)),null!=e.type&&(t.type=String(e.type)),null!=e.createdAt&&(t.createdAt=String(e.createdAt)),null!=e.data&&(t.data=String(e.data)),null!=e.hasComments&&(t.hasComments=Boolean(e.hasComments)),null!=e.state&&(t.state=String(e.state)),null!=e.attributes&&(t.attributes=String(e.attributes)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.id="",n.authorId="",n.type="",n.createdAt="",n.data="",n.hasComments=!1,n.state="",n.attributes=""),null!=e.id&&e.hasOwnProperty("id")&&(n.id=e.id),null!=e.authorId&&e.hasOwnProperty("authorId")&&(n.authorId=e.authorId),null!=e.type&&e.hasOwnProperty("type")&&(n.type=e.type),null!=e.createdAt&&e.hasOwnProperty("createdAt")&&(n.createdAt=e.createdAt),null!=e.data&&e.hasOwnProperty("data")&&(n.data=e.data),null!=e.hasComments&&e.hasOwnProperty("hasComments")&&(n.hasComments=e.hasComments),null!=e.state&&e.hasOwnProperty("state")&&(n.state=e.state),null!=e.attributes&&e.hasOwnProperty("attributes")&&(n.attributes=e.attributes),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/TrackChangesAddSuggestionResponse"},o}(),s.TrackChangesConnectResponse=function(){function o(e){if(this.suggestions=[],this.suggestionsV2=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.channel="",o.prototype.suggestions=r.emptyArray,o.prototype.suggestionsV2=r.emptyArray,o.create=function(e){return new o(e)},o.encode=function(e,t){if(t||(t=n.create()),null!=e.channel&&Object.hasOwnProperty.call(e,"channel")&&t.uint32(10).string(e.channel),null!=e.suggestions&&e.suggestions.length)for(var r=0;r<e.suggestions.length;++r)t.uint32(18).string(e.suggestions[r]);if(null!=e.suggestionsV2&&e.suggestionsV2.length)for(r=0;r<e.suggestionsV2.length;++r)s.SuggestionDescriptor.encode(e.suggestionsV2[r],t.uint32(26).fork()).ldelim();return t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.TrackChangesConnectResponse;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.channel=e.string();break;case 2:o.suggestions&&o.suggestions.length||(o.suggestions=[]),o.suggestions.push(e.string());break;case 3:o.suggestionsV2&&o.suggestionsV2.length||(o.suggestionsV2=[]),o.suggestionsV2.push(s.SuggestionDescriptor.decode(e,e.uint32()));break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.channel&&e.hasOwnProperty("channel")&&!r.isString(e.channel))return"channel: string expected";if(null!=e.suggestions&&e.hasOwnProperty("suggestions")){if(!Array.isArray(e.suggestions))return"suggestions: array expected";for(var t=0;t<e.suggestions.length;++t)if(!r.isString(e.suggestions[t]))return"suggestions: string[] expected"}if(null!=e.suggestionsV2&&e.hasOwnProperty("suggestionsV2")){if(!Array.isArray(e.suggestionsV2))return"suggestionsV2: array expected";for(t=0;t<e.suggestionsV2.length;++t){var n=s.SuggestionDescriptor.verify(e.suggestionsV2[t]);if(n)return"suggestionsV2."+n}}return null},o.fromObject=function(e){if(e instanceof s.TrackChangesConnectResponse)return e;var t=new s.TrackChangesConnectResponse;if(null!=e.channel&&(t.channel=String(e.channel)),e.suggestions){if(!Array.isArray(e.suggestions))throw TypeError(".TrackChangesConnectResponse.suggestions: array expected");t.suggestions=[];for(var n=0;n<e.suggestions.length;++n)t.suggestions[n]=String(e.suggestions[n])}if(e.suggestionsV2){if(!Array.isArray(e.suggestionsV2))throw TypeError(".TrackChangesConnectResponse.suggestionsV2: array expected");for(t.suggestionsV2=[],n=0;n<e.suggestionsV2.length;++n){if("object"!=typeof e.suggestionsV2[n])throw TypeError(".TrackChangesConnectResponse.suggestionsV2: object expected");t.suggestionsV2[n]=s.SuggestionDescriptor.fromObject(e.suggestionsV2[n])}}return t},o.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.suggestions=[],n.suggestionsV2=[]),t.defaults&&(n.channel=""),null!=e.channel&&e.hasOwnProperty("channel")&&(n.channel=e.channel),e.suggestions&&e.suggestions.length){n.suggestions=[];for(var r=0;r<e.suggestions.length;++r)n.suggestions[r]=e.suggestions[r]}if(e.suggestionsV2&&e.suggestionsV2.length)for(n.suggestionsV2=[],r=0;r<e.suggestionsV2.length;++r)n.suggestionsV2[r]=s.SuggestionDescriptor.toObject(e.suggestionsV2[r],t);return n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/TrackChangesConnectResponse"},o}(),s.TrackChangesGetAllSuggestionsResponse=function(){function o(e){if(this.suggestions=[],this.suggestionsV2=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.suggestions=r.emptyArray,o.prototype.suggestionsV2=r.emptyArray,o.create=function(e){return new o(e)},o.encode=function(e,t){if(t||(t=n.create()),null!=e.suggestions&&e.suggestions.length)for(var r=0;r<e.suggestions.length;++r)t.uint32(10).string(e.suggestions[r]);if(null!=e.suggestionsV2&&e.suggestionsV2.length)for(r=0;r<e.suggestionsV2.length;++r)s.SuggestionDescriptor.encode(e.suggestionsV2[r],t.uint32(18).fork()).ldelim();return t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.TrackChangesGetAllSuggestionsResponse;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.suggestions&&o.suggestions.length||(o.suggestions=[]),o.suggestions.push(e.string());break;case 2:o.suggestionsV2&&o.suggestionsV2.length||(o.suggestionsV2=[]),o.suggestionsV2.push(s.SuggestionDescriptor.decode(e,e.uint32()));break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.suggestions&&e.hasOwnProperty("suggestions")){if(!Array.isArray(e.suggestions))return"suggestions: array expected";for(var t=0;t<e.suggestions.length;++t)if(!r.isString(e.suggestions[t]))return"suggestions: string[] expected"}if(null!=e.suggestionsV2&&e.hasOwnProperty("suggestionsV2")){if(!Array.isArray(e.suggestionsV2))return"suggestionsV2: array expected";for(t=0;t<e.suggestionsV2.length;++t){var n=s.SuggestionDescriptor.verify(e.suggestionsV2[t]);if(n)return"suggestionsV2."+n}}return null},o.fromObject=function(e){if(e instanceof s.TrackChangesGetAllSuggestionsResponse)return e;var t=new s.TrackChangesGetAllSuggestionsResponse;if(e.suggestions){if(!Array.isArray(e.suggestions))throw TypeError(".TrackChangesGetAllSuggestionsResponse.suggestions: array expected");t.suggestions=[];for(var n=0;n<e.suggestions.length;++n)t.suggestions[n]=String(e.suggestions[n])}if(e.suggestionsV2){if(!Array.isArray(e.suggestionsV2))throw TypeError(".TrackChangesGetAllSuggestionsResponse.suggestionsV2: array expected");for(t.suggestionsV2=[],n=0;n<e.suggestionsV2.length;++n){if("object"!=typeof e.suggestionsV2[n])throw TypeError(".TrackChangesGetAllSuggestionsResponse.suggestionsV2: object expected");t.suggestionsV2[n]=s.SuggestionDescriptor.fromObject(e.suggestionsV2[n])}}return t},o.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.suggestions=[],n.suggestionsV2=[]),e.suggestions&&e.suggestions.length){n.suggestions=[];for(var r=0;r<e.suggestions.length;++r)n.suggestions[r]=e.suggestions[r]}if(e.suggestionsV2&&e.suggestionsV2.length)for(n.suggestionsV2=[],r=0;r<e.suggestionsV2.length;++r)n.suggestionsV2[r]=s.SuggestionDescriptor.toObject(e.suggestionsV2[r],t);return n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/TrackChangesGetAllSuggestionsResponse"},o}(),s.TrackChangesGetSuggestionResponse=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.id="",o.prototype.authorId="",o.prototype.type="",o.prototype.createdAt="",o.prototype.data="",o.prototype.hasComments=!1,o.prototype.state="",o.prototype.attributes="",o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.id&&Object.hasOwnProperty.call(e,"id")&&t.uint32(10).string(e.id),null!=e.authorId&&Object.hasOwnProperty.call(e,"authorId")&&t.uint32(18).string(e.authorId),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(26).string(e.type),null!=e.createdAt&&Object.hasOwnProperty.call(e,"createdAt")&&t.uint32(34).string(e.createdAt),null!=e.data&&Object.hasOwnProperty.call(e,"data")&&t.uint32(42).string(e.data),null!=e.hasComments&&Object.hasOwnProperty.call(e,"hasComments")&&t.uint32(48).bool(e.hasComments),null!=e.state&&Object.hasOwnProperty.call(e,"state")&&t.uint32(58).string(e.state),null!=e.attributes&&Object.hasOwnProperty.call(e,"attributes")&&t.uint32(66).string(e.attributes),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.TrackChangesGetSuggestionResponse;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.id=e.string();break;case 2:o.authorId=e.string();break;case 3:o.type=e.string();break;case 4:o.createdAt=e.string();break;case 5:o.data=e.string();break;case 6:o.hasComments=e.bool();break;case 7:o.state=e.string();break;case 8:o.attributes=e.string();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.id&&e.hasOwnProperty("id")&&!r.isString(e.id)?"id: string expected":null!=e.authorId&&e.hasOwnProperty("authorId")&&!r.isString(e.authorId)?"authorId: string expected":null!=e.type&&e.hasOwnProperty("type")&&!r.isString(e.type)?"type: string expected":null!=e.createdAt&&e.hasOwnProperty("createdAt")&&!r.isString(e.createdAt)?"createdAt: string expected":null!=e.data&&e.hasOwnProperty("data")&&!r.isString(e.data)?"data: string expected":null!=e.hasComments&&e.hasOwnProperty("hasComments")&&"boolean"!=typeof e.hasComments?"hasComments: boolean expected":null!=e.state&&e.hasOwnProperty("state")&&!r.isString(e.state)?"state: string expected":null!=e.attributes&&e.hasOwnProperty("attributes")&&!r.isString(e.attributes)?"attributes: string expected":null},o.fromObject=function(e){if(e instanceof s.TrackChangesGetSuggestionResponse)return e;var t=new s.TrackChangesGetSuggestionResponse;return null!=e.id&&(t.id=String(e.id)),null!=e.authorId&&(t.authorId=String(e.authorId)),null!=e.type&&(t.type=String(e.type)),null!=e.createdAt&&(t.createdAt=String(e.createdAt)),null!=e.data&&(t.data=String(e.data)),null!=e.hasComments&&(t.hasComments=Boolean(e.hasComments)),null!=e.state&&(t.state=String(e.state)),null!=e.attributes&&(t.attributes=String(e.attributes)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.id="",n.authorId="",n.type="",n.createdAt="",n.data="",n.hasComments=!1,n.state="",n.attributes=""),null!=e.id&&e.hasOwnProperty("id")&&(n.id=e.id),null!=e.authorId&&e.hasOwnProperty("authorId")&&(n.authorId=e.authorId),null!=e.type&&e.hasOwnProperty("type")&&(n.type=e.type),null!=e.createdAt&&e.hasOwnProperty("createdAt")&&(n.createdAt=e.createdAt),null!=e.data&&e.hasOwnProperty("data")&&(n.data=e.data),null!=e.hasComments&&e.hasOwnProperty("hasComments")&&(n.hasComments=e.hasComments),null!=e.state&&e.hasOwnProperty("state")&&(n.state=e.state),null!=e.attributes&&e.hasOwnProperty("attributes")&&(n.attributes=e.attributes),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/TrackChangesGetSuggestionResponse"},o}(),s.UserDescriptor=function(){function o(e){if(this.attributes=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.attributes=r.emptyArray,o.create=function(e){return new o(e)},o.encode=function(e,t){if(t||(t=n.create()),null!=e.attributes&&e.attributes.length)for(var r=0;r<e.attributes.length;++r)s.KeyValueDescriptor.encode(e.attributes[r],t.uint32(10).fork()).ldelim();return t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.UserDescriptor;e.pos<r;){var i=e.uint32();i>>>3==1?(o.attributes&&o.attributes.length||(o.attributes=[]),o.attributes.push(s.KeyValueDescriptor.decode(e,e.uint32()))):e.skipType(7&i)}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.attributes&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var t=0;t<e.attributes.length;++t){var n=s.KeyValueDescriptor.verify(e.attributes[t]);if(n)return"attributes."+n}}return null},o.fromObject=function(e){if(e instanceof s.UserDescriptor)return e;var t=new s.UserDescriptor;if(e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".UserDescriptor.attributes: array expected");t.attributes=[];for(var n=0;n<e.attributes.length;++n){if("object"!=typeof e.attributes[n])throw TypeError(".UserDescriptor.attributes: object expected");t.attributes[n]=s.KeyValueDescriptor.fromObject(e.attributes[n])}}return t},o.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.attributes=[]),e.attributes&&e.attributes.length){n.attributes=[];for(var r=0;r<e.attributes.length;++r)n.attributes[r]=s.KeyValueDescriptor.toObject(e.attributes[r],t)}return n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/UserDescriptor"},o}(),s.GetManyUsersMessage=function(){function o(e){if(this.ids=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.ids=r.emptyArray,o.create=function(e){return new o(e)},o.encode=function(e,t){if(t||(t=n.create()),null!=e.ids&&e.ids.length)for(var r=0;r<e.ids.length;++r)t.uint32(10).string(e.ids[r]);return t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.GetManyUsersMessage;e.pos<r;){var i=e.uint32();i>>>3==1?(o.ids&&o.ids.length||(o.ids=[]),o.ids.push(e.string())):e.skipType(7&i)}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.ids&&e.hasOwnProperty("ids")){if(!Array.isArray(e.ids))return"ids: array expected";for(var t=0;t<e.ids.length;++t)if(!r.isString(e.ids[t]))return"ids: string[] expected"}return null},o.fromObject=function(e){if(e instanceof s.GetManyUsersMessage)return e;var t=new s.GetManyUsersMessage;if(e.ids){if(!Array.isArray(e.ids))throw TypeError(".GetManyUsersMessage.ids: array expected");t.ids=[];for(var n=0;n<e.ids.length;++n)t.ids[n]=String(e.ids[n])}return t},o.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.ids=[]),e.ids&&e.ids.length){n.ids=[];for(var r=0;r<e.ids.length;++r)n.ids[r]=e.ids[r]}return n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/GetManyUsersMessage"},o}(),s.GetUserMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.id="",o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.id&&Object.hasOwnProperty.call(e,"id")&&t.uint32(10).string(e.id),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.GetUserMessage;e.pos<r;){var i=e.uint32();i>>>3==1?o.id=e.string():e.skipType(7&i)}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.id&&e.hasOwnProperty("id")&&!r.isString(e.id)?"id: string expected":null},o.fromObject=function(e){if(e instanceof s.GetUserMessage)return e;var t=new s.GetUserMessage;return null!=e.id&&(t.id=String(e.id)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.id=""),null!=e.id&&e.hasOwnProperty("id")&&(n.id=e.id),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/GetUserMessage"},o}(),s.GetManyUsersResponse=function(){function o(e){if(this.users=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.users=r.emptyArray,o.create=function(e){return new o(e)},o.encode=function(e,t){if(t||(t=n.create()),null!=e.users&&e.users.length)for(var r=0;r<e.users.length;++r)s.UserDescriptor.encode(e.users[r],t.uint32(10).fork()).ldelim();return t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.GetManyUsersResponse;e.pos<r;){var i=e.uint32();i>>>3==1?(o.users&&o.users.length||(o.users=[]),o.users.push(s.UserDescriptor.decode(e,e.uint32()))):e.skipType(7&i)}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.users&&e.hasOwnProperty("users")){if(!Array.isArray(e.users))return"users: array expected";for(var t=0;t<e.users.length;++t){var n=s.UserDescriptor.verify(e.users[t]);if(n)return"users."+n}}return null},o.fromObject=function(e){if(e instanceof s.GetManyUsersResponse)return e;var t=new s.GetManyUsersResponse;if(e.users){if(!Array.isArray(e.users))throw TypeError(".GetManyUsersResponse.users: array expected");t.users=[];for(var n=0;n<e.users.length;++n){if("object"!=typeof e.users[n])throw TypeError(".GetManyUsersResponse.users: object expected");t.users[n]=s.UserDescriptor.fromObject(e.users[n])}}return t},o.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.users=[]),e.users&&e.users.length){n.users=[];for(var r=0;r<e.users.length;++r)n.users[r]=s.UserDescriptor.toObject(e.users[r],t)}return n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/GetManyUsersResponse"},o}(),s.GetUserResponse=function(){function o(e){if(this.attributes=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.attributes=r.emptyArray,o.create=function(e){return new o(e)},o.encode=function(e,t){if(t||(t=n.create()),null!=e.attributes&&e.attributes.length)for(var r=0;r<e.attributes.length;++r)s.KeyValueDescriptor.encode(e.attributes[r],t.uint32(10).fork()).ldelim();return t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.GetUserResponse;e.pos<r;){var i=e.uint32();i>>>3==1?(o.attributes&&o.attributes.length||(o.attributes=[]),o.attributes.push(s.KeyValueDescriptor.decode(e,e.uint32()))):e.skipType(7&i)}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.attributes&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var t=0;t<e.attributes.length;++t){var n=s.KeyValueDescriptor.verify(e.attributes[t]);if(n)return"attributes."+n}}return null},o.fromObject=function(e){if(e instanceof s.GetUserResponse)return e;var t=new s.GetUserResponse;if(e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".GetUserResponse.attributes: array expected");t.attributes=[];for(var n=0;n<e.attributes.length;++n){if("object"!=typeof e.attributes[n])throw TypeError(".GetUserResponse.attributes: object expected");t.attributes[n]=s.KeyValueDescriptor.fromObject(e.attributes[n])}}return t},o.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.attributes=[]),e.attributes&&e.attributes.length){n.attributes=[];for(var r=0;r<e.attributes.length;++r)n.attributes[r]=s.KeyValueDescriptor.toObject(e.attributes[r],t)}return n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/GetUserResponse"},o}(),s.ChannelMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.type=0,o.prototype.socketId="",o.prototype.data=r.newBuffer([]),o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(8).uint32(e.type),null!=e.socketId&&Object.hasOwnProperty.call(e,"socketId")&&t.uint32(18).string(e.socketId),null!=e.data&&Object.hasOwnProperty.call(e,"data")&&t.uint32(26).bytes(e.data),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.ChannelMessage;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.type=e.uint32();break;case 2:o.socketId=e.string();break;case 3:o.data=e.bytes();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.type&&e.hasOwnProperty("type")&&!r.isInteger(e.type)?"type: integer expected":null!=e.socketId&&e.hasOwnProperty("socketId")&&!r.isString(e.socketId)?"socketId: string expected":null!=e.data&&e.hasOwnProperty("data")&&!(e.data&&"number"==typeof e.data.length||r.isString(e.data))?"data: buffer expected":null},o.fromObject=function(e){if(e instanceof s.ChannelMessage)return e;var t=new s.ChannelMessage;return null!=e.type&&(t.type=e.type>>>0),null!=e.socketId&&(t.socketId=String(e.socketId)),null!=e.data&&("string"==typeof e.data?r.base64.decode(e.data,t.data=r.newBuffer(r.base64.length(e.data)),0):e.data.length>=0&&(t.data=e.data)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.type=0,n.socketId="",t.bytes===String?n.data="":(n.data=[],t.bytes!==Array&&(n.data=r.newBuffer(n.data)))),null!=e.type&&e.hasOwnProperty("type")&&(n.type=e.type),null!=e.socketId&&e.hasOwnProperty("socketId")&&(n.socketId=e.socketId),null!=e.data&&e.hasOwnProperty("data")&&(n.data=t.bytes===String?r.base64.encode(e.data,0,e.data.length):t.bytes===Array?Array.prototype.slice.call(e.data):e.data),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ChannelMessage"},o}(),s.BytesBytesPacketDataMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.data=r.newBuffer([]),o.prototype.data1=r.newBuffer([]),o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.data&&Object.hasOwnProperty.call(e,"data")&&t.uint32(10).bytes(e.data),null!=e.data1&&Object.hasOwnProperty.call(e,"data1")&&t.uint32(18).bytes(e.data1),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.BytesBytesPacketDataMessage;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.data=e.bytes();break;case 2:o.data1=e.bytes();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.data&&e.hasOwnProperty("data")&&!(e.data&&"number"==typeof e.data.length||r.isString(e.data))?"data: buffer expected":null!=e.data1&&e.hasOwnProperty("data1")&&!(e.data1&&"number"==typeof e.data1.length||r.isString(e.data1))?"data1: buffer expected":null},o.fromObject=function(e){if(e instanceof s.BytesBytesPacketDataMessage)return e;var t=new s.BytesBytesPacketDataMessage;return null!=e.data&&("string"==typeof e.data?r.base64.decode(e.data,t.data=r.newBuffer(r.base64.length(e.data)),0):e.data.length>=0&&(t.data=e.data)),null!=e.data1&&("string"==typeof e.data1?r.base64.decode(e.data1,t.data1=r.newBuffer(r.base64.length(e.data1)),0):e.data1.length>=0&&(t.data1=e.data1)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(t.bytes===String?n.data="":(n.data=[],t.bytes!==Array&&(n.data=r.newBuffer(n.data))),t.bytes===String?n.data1="":(n.data1=[],t.bytes!==Array&&(n.data1=r.newBuffer(n.data1)))),null!=e.data&&e.hasOwnProperty("data")&&(n.data=t.bytes===String?r.base64.encode(e.data,0,e.data.length):t.bytes===Array?Array.prototype.slice.call(e.data):e.data),null!=e.data1&&e.hasOwnProperty("data1")&&(n.data1=t.bytes===String?r.base64.encode(e.data1,0,e.data1.length):t.bytes===Array?Array.prototype.slice.call(e.data1):e.data1),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/BytesBytesPacketDataMessage"},o}(),s.NumberBytesPacketDataMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.data=0,o.prototype.data1=r.newBuffer([]),o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.data&&Object.hasOwnProperty.call(e,"data")&&t.uint32(8).uint32(e.data),null!=e.data1&&Object.hasOwnProperty.call(e,"data1")&&t.uint32(18).bytes(e.data1),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.NumberBytesPacketDataMessage;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.data=e.uint32();break;case 2:o.data1=e.bytes();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.data&&e.hasOwnProperty("data")&&!r.isInteger(e.data)?"data: integer expected":null!=e.data1&&e.hasOwnProperty("data1")&&!(e.data1&&"number"==typeof e.data1.length||r.isString(e.data1))?"data1: buffer expected":null},o.fromObject=function(e){if(e instanceof s.NumberBytesPacketDataMessage)return e;var t=new s.NumberBytesPacketDataMessage;return null!=e.data&&(t.data=e.data>>>0),null!=e.data1&&("string"==typeof e.data1?r.base64.decode(e.data1,t.data1=r.newBuffer(r.base64.length(e.data1)),0):e.data1.length>=0&&(t.data1=e.data1)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.data=0,t.bytes===String?n.data1="":(n.data1=[],t.bytes!==Array&&(n.data1=r.newBuffer(n.data1)))),null!=e.data&&e.hasOwnProperty("data")&&(n.data=e.data),null!=e.data1&&e.hasOwnProperty("data1")&&(n.data1=t.bytes===String?r.base64.encode(e.data1,0,e.data1.length):t.bytes===Array?Array.prototype.slice.call(e.data1):e.data1),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/NumberBytesPacketDataMessage"},o}(),s.NumberNumberPacketDataMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.data=0,o.prototype.data1=0,o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.data&&Object.hasOwnProperty.call(e,"data")&&t.uint32(8).uint32(e.data),null!=e.data1&&Object.hasOwnProperty.call(e,"data1")&&t.uint32(16).uint32(e.data1),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.NumberNumberPacketDataMessage;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.data=e.uint32();break;case 2:o.data1=e.uint32();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.data&&e.hasOwnProperty("data")&&!r.isInteger(e.data)?"data: integer expected":null!=e.data1&&e.hasOwnProperty("data1")&&!r.isInteger(e.data1)?"data1: integer expected":null},o.fromObject=function(e){if(e instanceof s.NumberNumberPacketDataMessage)return e;var t=new s.NumberNumberPacketDataMessage;return null!=e.data&&(t.data=e.data>>>0),null!=e.data1&&(t.data1=e.data1>>>0),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.data=0,n.data1=0),null!=e.data&&e.hasOwnProperty("data")&&(n.data=e.data),null!=e.data1&&e.hasOwnProperty("data1")&&(n.data1=e.data1),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/NumberNumberPacketDataMessage"},o}(),s.NumberObjectPacketDataMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.data=0,o.prototype.data1="",o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.data&&Object.hasOwnProperty.call(e,"data")&&t.uint32(8).uint32(e.data),null!=e.data1&&Object.hasOwnProperty.call(e,"data1")&&t.uint32(18).string(e.data1),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.NumberObjectPacketDataMessage;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.data=e.uint32();break;case 2:o.data1=e.string();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.data&&e.hasOwnProperty("data")&&!r.isInteger(e.data)?"data: integer expected":null!=e.data1&&e.hasOwnProperty("data1")&&!r.isString(e.data1)?"data1: string expected":null},o.fromObject=function(e){if(e instanceof s.NumberObjectPacketDataMessage)return e;var t=new s.NumberObjectPacketDataMessage;return null!=e.data&&(t.data=e.data>>>0),null!=e.data1&&(t.data1=String(e.data1)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.data=0,n.data1=""),null!=e.data&&e.hasOwnProperty("data")&&(n.data=e.data),null!=e.data1&&e.hasOwnProperty("data1")&&(n.data1=e.data1),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/NumberObjectPacketDataMessage"},o}(),s.NumberStringPacketDataMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.data=0,o.prototype.data1="",o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.data&&Object.hasOwnProperty.call(e,"data")&&t.uint32(8).uint32(e.data),null!=e.data1&&Object.hasOwnProperty.call(e,"data1")&&t.uint32(18).string(e.data1),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.NumberStringPacketDataMessage;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.data=e.uint32();break;case 2:o.data1=e.string();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.data&&e.hasOwnProperty("data")&&!r.isInteger(e.data)?"data: integer expected":null!=e.data1&&e.hasOwnProperty("data1")&&!r.isString(e.data1)?"data1: string expected":null},o.fromObject=function(e){if(e instanceof s.NumberStringPacketDataMessage)return e;var t=new s.NumberStringPacketDataMessage;return null!=e.data&&(t.data=e.data>>>0),null!=e.data1&&(t.data1=String(e.data1)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.data=0,n.data1=""),null!=e.data&&e.hasOwnProperty("data")&&(n.data=e.data),null!=e.data1&&e.hasOwnProperty("data1")&&(n.data1=e.data1),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/NumberStringPacketDataMessage"},o}(),s.ObjectBufferPacketDataMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.data="",o.prototype.data1=r.newBuffer([]),o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.data&&Object.hasOwnProperty.call(e,"data")&&t.uint32(10).string(e.data),null!=e.data1&&Object.hasOwnProperty.call(e,"data1")&&t.uint32(18).bytes(e.data1),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.ObjectBufferPacketDataMessage;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.data=e.string();break;case 2:o.data1=e.bytes();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.data&&e.hasOwnProperty("data")&&!r.isString(e.data)?"data: string expected":null!=e.data1&&e.hasOwnProperty("data1")&&!(e.data1&&"number"==typeof e.data1.length||r.isString(e.data1))?"data1: buffer expected":null},o.fromObject=function(e){if(e instanceof s.ObjectBufferPacketDataMessage)return e;var t=new s.ObjectBufferPacketDataMessage;return null!=e.data&&(t.data=String(e.data)),null!=e.data1&&("string"==typeof e.data1?r.base64.decode(e.data1,t.data1=r.newBuffer(r.base64.length(e.data1)),0):e.data1.length>=0&&(t.data1=e.data1)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.data="",t.bytes===String?n.data1="":(n.data1=[],t.bytes!==Array&&(n.data1=r.newBuffer(n.data1)))),null!=e.data&&e.hasOwnProperty("data")&&(n.data=e.data),null!=e.data1&&e.hasOwnProperty("data1")&&(n.data1=t.bytes===String?r.base64.encode(e.data1,0,e.data1.length):t.bytes===Array?Array.prototype.slice.call(e.data1):e.data1),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ObjectBufferPacketDataMessage"},o}(),s.ObjectObjectPacketDataMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.data="",o.prototype.data1="",o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.data&&Object.hasOwnProperty.call(e,"data")&&t.uint32(10).string(e.data),null!=e.data1&&Object.hasOwnProperty.call(e,"data1")&&t.uint32(18).string(e.data1),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.ObjectObjectPacketDataMessage;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.data=e.string();break;case 2:o.data1=e.string();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.data&&e.hasOwnProperty("data")&&!r.isString(e.data)?"data: string expected":null!=e.data1&&e.hasOwnProperty("data1")&&!r.isString(e.data1)?"data1: string expected":null},o.fromObject=function(e){if(e instanceof s.ObjectObjectPacketDataMessage)return e;var t=new s.ObjectObjectPacketDataMessage;return null!=e.data&&(t.data=String(e.data)),null!=e.data1&&(t.data1=String(e.data1)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.data="",n.data1=""),null!=e.data&&e.hasOwnProperty("data")&&(n.data=e.data),null!=e.data1&&e.hasOwnProperty("data1")&&(n.data1=e.data1),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ObjectObjectPacketDataMessage"},o}(),s.PacketMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.type=0,o.prototype.id=0,o.prototype.nsp="",o.prototype.data=r.newBuffer([]),o.prototype.options=r.newBuffer([]),o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(8).uint32(e.type),null!=e.id&&Object.hasOwnProperty.call(e,"id")&&t.uint32(16).uint32(e.id),null!=e.nsp&&Object.hasOwnProperty.call(e,"nsp")&&t.uint32(26).string(e.nsp),null!=e.data&&Object.hasOwnProperty.call(e,"data")&&t.uint32(34).bytes(e.data),null!=e.options&&Object.hasOwnProperty.call(e,"options")&&t.uint32(42).bytes(e.options),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.PacketMessage;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.type=e.uint32();break;case 2:o.id=e.uint32();break;case 3:o.nsp=e.string();break;case 4:o.data=e.bytes();break;case 5:o.options=e.bytes();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.type&&e.hasOwnProperty("type")&&!r.isInteger(e.type)?"type: integer expected":null!=e.id&&e.hasOwnProperty("id")&&!r.isInteger(e.id)?"id: integer expected":null!=e.nsp&&e.hasOwnProperty("nsp")&&!r.isString(e.nsp)?"nsp: string expected":null!=e.data&&e.hasOwnProperty("data")&&!(e.data&&"number"==typeof e.data.length||r.isString(e.data))?"data: buffer expected":null!=e.options&&e.hasOwnProperty("options")&&!(e.options&&"number"==typeof e.options.length||r.isString(e.options))?"options: buffer expected":null},o.fromObject=function(e){if(e instanceof s.PacketMessage)return e;var t=new s.PacketMessage;return null!=e.type&&(t.type=e.type>>>0),null!=e.id&&(t.id=e.id>>>0),null!=e.nsp&&(t.nsp=String(e.nsp)),null!=e.data&&("string"==typeof e.data?r.base64.decode(e.data,t.data=r.newBuffer(r.base64.length(e.data)),0):e.data.length>=0&&(t.data=e.data)),null!=e.options&&("string"==typeof e.options?r.base64.decode(e.options,t.options=r.newBuffer(r.base64.length(e.options)),0):e.options.length>=0&&(t.options=e.options)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.type=0,n.id=0,n.nsp="",t.bytes===String?n.data="":(n.data=[],t.bytes!==Array&&(n.data=r.newBuffer(n.data))),t.bytes===String?n.options="":(n.options=[],t.bytes!==Array&&(n.options=r.newBuffer(n.options)))),null!=e.type&&e.hasOwnProperty("type")&&(n.type=e.type),null!=e.id&&e.hasOwnProperty("id")&&(n.id=e.id),null!=e.nsp&&e.hasOwnProperty("nsp")&&(n.nsp=e.nsp),null!=e.data&&e.hasOwnProperty("data")&&(n.data=t.bytes===String?r.base64.encode(e.data,0,e.data.length):t.bytes===Array?Array.prototype.slice.call(e.data):e.data),null!=e.options&&e.hasOwnProperty("options")&&(n.options=t.bytes===String?r.base64.encode(e.options,0,e.options.length):t.bytes===Array?Array.prototype.slice.call(e.options):e.options),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/PacketMessage"},o}(),s.PacketOptionsMessage=function(){function o(e){if(this.rooms=[],this.except=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.flags="",o.prototype.rooms=r.emptyArray,o.prototype.except=r.emptyArray,o.create=function(e){return new o(e)},o.encode=function(e,t){if(t||(t=n.create()),null!=e.flags&&Object.hasOwnProperty.call(e,"flags")&&t.uint32(10).string(e.flags),null!=e.rooms&&e.rooms.length)for(var r=0;r<e.rooms.length;++r)t.uint32(18).string(e.rooms[r]);if(null!=e.except&&e.except.length)for(r=0;r<e.except.length;++r)t.uint32(26).string(e.except[r]);return t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.PacketOptionsMessage;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.flags=e.string();break;case 2:o.rooms&&o.rooms.length||(o.rooms=[]),o.rooms.push(e.string());break;case 3:o.except&&o.except.length||(o.except=[]),o.except.push(e.string());break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.flags&&e.hasOwnProperty("flags")&&!r.isString(e.flags))return"flags: string expected";if(null!=e.rooms&&e.hasOwnProperty("rooms")){if(!Array.isArray(e.rooms))return"rooms: array expected";for(var t=0;t<e.rooms.length;++t)if(!r.isString(e.rooms[t]))return"rooms: string[] expected"}if(null!=e.except&&e.hasOwnProperty("except")){if(!Array.isArray(e.except))return"except: array expected";for(t=0;t<e.except.length;++t)if(!r.isString(e.except[t]))return"except: string[] expected"}return null},o.fromObject=function(e){if(e instanceof s.PacketOptionsMessage)return e;var t=new s.PacketOptionsMessage;if(null!=e.flags&&(t.flags=String(e.flags)),e.rooms){if(!Array.isArray(e.rooms))throw TypeError(".PacketOptionsMessage.rooms: array expected");t.rooms=[];for(var n=0;n<e.rooms.length;++n)t.rooms[n]=String(e.rooms[n])}if(e.except){if(!Array.isArray(e.except))throw TypeError(".PacketOptionsMessage.except: array expected");for(t.except=[],n=0;n<e.except.length;++n)t.except[n]=String(e.except[n])}return t},o.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.rooms=[],n.except=[]),t.defaults&&(n.flags=""),null!=e.flags&&e.hasOwnProperty("flags")&&(n.flags=e.flags),e.rooms&&e.rooms.length){n.rooms=[];for(var r=0;r<e.rooms.length;++r)n.rooms[r]=e.rooms[r]}if(e.except&&e.except.length)for(n.except=[],r=0;r<e.except.length;++r)n.except[r]=e.except[r];return n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/PacketOptionsMessage"},o}(),s.StringBytesPacketDataMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.data="",o.prototype.data1=r.newBuffer([]),o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.data&&Object.hasOwnProperty.call(e,"data")&&t.uint32(10).string(e.data),null!=e.data1&&Object.hasOwnProperty.call(e,"data1")&&t.uint32(18).bytes(e.data1),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.StringBytesPacketDataMessage;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.data=e.string();break;case 2:o.data1=e.bytes();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.data&&e.hasOwnProperty("data")&&!r.isString(e.data)?"data: string expected":null!=e.data1&&e.hasOwnProperty("data1")&&!(e.data1&&"number"==typeof e.data1.length||r.isString(e.data1))?"data1: buffer expected":null},o.fromObject=function(e){if(e instanceof s.StringBytesPacketDataMessage)return e;var t=new s.StringBytesPacketDataMessage;return null!=e.data&&(t.data=String(e.data)),null!=e.data1&&("string"==typeof e.data1?r.base64.decode(e.data1,t.data1=r.newBuffer(r.base64.length(e.data1)),0):e.data1.length>=0&&(t.data1=e.data1)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.data="",t.bytes===String?n.data1="":(n.data1=[],t.bytes!==Array&&(n.data1=r.newBuffer(n.data1)))),null!=e.data&&e.hasOwnProperty("data")&&(n.data=e.data),null!=e.data1&&e.hasOwnProperty("data1")&&(n.data1=t.bytes===String?r.base64.encode(e.data1,0,e.data1.length):t.bytes===Array?Array.prototype.slice.call(e.data1):e.data1),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/StringBytesPacketDataMessage"},o}(),s.StringNumberPacketDataMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.data="",o.prototype.data1=0,o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.data&&Object.hasOwnProperty.call(e,"data")&&t.uint32(10).string(e.data),null!=e.data1&&Object.hasOwnProperty.call(e,"data1")&&t.uint32(16).uint32(e.data1),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.StringNumberPacketDataMessage;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.data=e.string();break;case 2:o.data1=e.uint32();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.data&&e.hasOwnProperty("data")&&!r.isString(e.data)?"data: string expected":null!=e.data1&&e.hasOwnProperty("data1")&&!r.isInteger(e.data1)?"data1: integer expected":null},o.fromObject=function(e){if(e instanceof s.StringNumberPacketDataMessage)return e;var t=new s.StringNumberPacketDataMessage;return null!=e.data&&(t.data=String(e.data)),null!=e.data1&&(t.data1=e.data1>>>0),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.data="",n.data1=0),null!=e.data&&e.hasOwnProperty("data")&&(n.data=e.data),null!=e.data1&&e.hasOwnProperty("data1")&&(n.data1=e.data1),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/StringNumberPacketDataMessage"},o}(),s.StringObjectPacketDataMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.data="",o.prototype.data1="",o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.data&&Object.hasOwnProperty.call(e,"data")&&t.uint32(10).string(e.data),null!=e.data1&&Object.hasOwnProperty.call(e,"data1")&&t.uint32(18).string(e.data1),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.StringObjectPacketDataMessage;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.data=e.string();break;case 2:o.data1=e.string();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.data&&e.hasOwnProperty("data")&&!r.isString(e.data)?"data: string expected":null!=e.data1&&e.hasOwnProperty("data1")&&!r.isString(e.data1)?"data1: string expected":null},o.fromObject=function(e){if(e instanceof s.StringObjectPacketDataMessage)return e;var t=new s.StringObjectPacketDataMessage;return null!=e.data&&(t.data=String(e.data)),null!=e.data1&&(t.data1=String(e.data1)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.data="",n.data1=""),null!=e.data&&e.hasOwnProperty("data")&&(n.data=e.data),null!=e.data1&&e.hasOwnProperty("data1")&&(n.data1=e.data1),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/StringObjectPacketDataMessage"},o}(),s.StringStringPacketDataMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.data="",o.prototype.data1="",o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.data&&Object.hasOwnProperty.call(e,"data")&&t.uint32(10).string(e.data),null!=e.data1&&Object.hasOwnProperty.call(e,"data1")&&t.uint32(18).string(e.data1),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.StringStringPacketDataMessage;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.data=e.string();break;case 2:o.data1=e.string();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.data&&e.hasOwnProperty("data")&&!r.isString(e.data)?"data: string expected":null!=e.data1&&e.hasOwnProperty("data1")&&!r.isString(e.data1)?"data1: string expected":null},o.fromObject=function(e){if(e instanceof s.StringStringPacketDataMessage)return e;var t=new s.StringStringPacketDataMessage;return null!=e.data&&(t.data=String(e.data)),null!=e.data1&&(t.data1=String(e.data1)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.data="",n.data1=""),null!=e.data&&e.hasOwnProperty("data")&&(n.data=e.data),null!=e.data1&&e.hasOwnProperty("data1")&&(n.data1=e.data1),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/StringStringPacketDataMessage"},o}(),s},s=[n(8934)],void 0===(o="function"==typeof(r=i)?r.apply(t,s):r)||(e.exports=o)},3130:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=class{constructor(...e){}}},9425:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t._SERVICE=void 0;const s=n(4584),o=r(n(1774)),i=n(1244),a=r(n(4070)),c=r(n(1030)),u=r(n(7477));t._SERVICE=13;class d extends((0,s.EmitterMixin)()){static async isBundleUploaded(e,t){const n=new a.default(t);if(e.state!==i.WEB_SOCKET_GATEWAY_STATES.CONNECTED)throw new u.default("WebSocket Gateway is not connected.",e);const r=await e._sendRequest(d._SERVICE,a.default.TYPE,o.default.encode(n));return o.default.decode(r,c.default).isUploaded}}d._SERVICE=t._SERVICE,t.default=d},4070:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e){super(),this.bundleVersion=e}toJSON(){return{bundleVersion:this.bundleVersion}}static fromJSON(e){return new o(e.bundleVersion)}}t.default=o,o.TYPE="131",o.READABLE_TYPE_NAME="isEditorBundleUploaded",o.DESCRIPTOR_NAME="IsEditorBundleUploadedMessage",o.DESCRIPTOR={fields:{bundleVersion:{type:"string",id:1}}}},1030:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e){super(),this.isUploaded=e}toJSON(){return{isUploaded:this.isUploaded}}static fromJSON(e){return new o(e.isUploaded)}}t.default=o,o.DESCRIPTOR_NAME="IsEditorBundleUploadedResponse",o.DESCRIPTOR={fields:{isUploaded:{type:"bool",id:1}}}},2352:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(7477));class o extends s.default{constructor(e,t){super(e+" Service is not connected.",t)}}t.default=o},1987:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return s(t,e),t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.AddCommentThreadMessage=t.IsEditorBundleUploadedResponse=t.IsEditorBundleUploadedMessage=t.GetDocumentDetailsResponse=t.GetDocumentDetailsMessage=t.ChannelMessage=t.RevisionHistoryUpdateRevisionsResponse=t.RevisionHistoryGetRevisionResponse=t.RevisionHistoryConnectResponse=t.RevisionHistoryUpdateRevisionsMessage=t.RevisionHistoryGetRevisionMessage=t.RevisionHistoryReconnectMessage=t.RevisionHistoryConnectMessage=t.User=t.GetManyUsersResponse=t.GetUserResponse=t.GetManyUsersMessage=t.GetUserMessage=t.BatchUpdateSuggestionsStateMessage=t.UpdateSuggestionMessage=t.GetSuggestionMessage=t.GetAllSuggestionsMessage=t.ConnectTrackChangesMessage=t.GetSuggestionResponse=t.GetAllSuggestionsResponse=t.ConnectTrackChangesResponse=t.AddSuggestionResponse=t.AddSuggestionMessage=t.SocketDisconnectMessage=t.SocketConnectMessage=t.SessionsConnectResponse=t.SessionsConnectMessage=t.GetCommentThreadResponse=t.ConnectCommentsResponse=t.AddCommentResponse=t.UpdateCommentMessage=t.RemoveCommentThreadMessage=t.GetDocumentThreadsResponse=t.RemoveCommentMessage=t.GetDocumentThreadsMessage=t.GetCommentThreadMessage=t.ConnectCommentsMessage=t.AddCommentMessage=t.CollaborativeEditingResponse=t.CollaborativeEditingConnectResponse=t.CollaborativeEditingUpdateMessage=t.CollaborativeEditingReconnectMessage=t.CollaborativeEditingConnectMessage=t.MessagesMapper=t.MessagesCompressor=void 0,t.Parser=t.PacketParser=t.Decoder=t.Encoder=t.ResolveCommentThreadResponse=t.AddCommentThreadResponse=t.UpdateCommentThreadMessage=t.ResolveCommentThreadMessage=t.ReopenCommentThreadMessage=void 0;const a=i(n(1774));t.MessagesCompressor=a.default;const c=i(n(8154));t.MessagesMapper=c.default;const u=i(n(7261));t.CollaborativeEditingConnectMessage=u.default;const d=i(n(9168));t.CollaborativeEditingReconnectMessage=d.default;const l=i(n(4766));t.CollaborativeEditingUpdateMessage=l.default;const p=i(n(242));t.CollaborativeEditingConnectResponse=p.default;const h=i(n(3049));t.CollaborativeEditingResponse=h.default;const f=i(n(9031));t.GetDocumentDetailsMessage=f.default;const m=i(n(8359));t.GetDocumentDetailsResponse=m.default;const y=i(n(5797));t.GetManyUsersMessage=y.default;const g=i(n(8605));t.GetManyUsersResponse=g.default;const b=i(n(9403));t.GetUserMessage=b.default;const O=i(n(6947));t.GetUserResponse=O.default;const v=i(n(7861));t.User=v.default;const w=i(n(8741));t.AddCommentMessage=w.default;const I=i(n(1763));t.AddCommentResponse=I.default;const _=i(n(6033));t.ConnectCommentsMessage=_.default;const S=i(n(8610));t.GetCommentThreadMessage=S.default;const P=i(n(4451));t.GetDocumentThreadsMessage=P.default;const A=i(n(1973));t.GetDocumentThreadsResponse=A.default;const T=i(n(1452));t.RemoveCommentMessage=T.default;const k=i(n(8852));t.RemoveCommentThreadMessage=k.default;const C=i(n(2481));t.UpdateCommentMessage=C.default;const E=i(n(6599));t.ConnectCommentsResponse=E.default;const j=i(n(8994));t.GetCommentThreadResponse=j.default;const D=i(n(2603));t.UpdateCommentThreadMessage=D.default;const R=i(n(5632));t.ResolveCommentThreadMessage=R.default;const M=i(n(2015));t.ReopenCommentThreadMessage=M.default;const N=i(n(9811));t.AddCommentThreadMessage=N.default;const x=i(n(8477));t.AddCommentThreadResponse=x.default;const V=i(n(7140));t.ResolveCommentThreadResponse=V.default;const B=i(n(8016));t.SessionsConnectMessage=B.default;const U=i(n(1644));t.SessionsConnectResponse=U.default;const J=i(n(5928));t.SocketConnectMessage=J.default;const q=i(n(1196));t.SocketDisconnectMessage=q.default;const G=i(n(92));t.AddSuggestionMessage=G.default;const L=i(n(6068));t.AddSuggestionResponse=L.default;const Y=i(n(827));t.GetAllSuggestionsResponse=Y.default;const F=i(n(5659));t.GetSuggestionResponse=F.default;const z=i(n(8961));t.GetSuggestionMessage=z.default;const H=i(n(785));t.GetAllSuggestionsMessage=H.default;const K=i(n(3460));t.UpdateSuggestionMessage=K.default;const W=i(n(7079));t.ConnectTrackChangesMessage=W.default;const $=i(n(3917));t.ConnectTrackChangesResponse=$.default;const Q=i(n(9212));t.BatchUpdateSuggestionsStateMessage=Q.default;const X=i(n(8291));t.RevisionHistoryConnectMessage=X.default;const Z=i(n(3322));t.RevisionHistoryReconnectMessage=Z.default;const ee=i(n(9370));t.RevisionHistoryGetRevisionMessage=ee.default;const te=i(n(3826));t.RevisionHistoryUpdateRevisionsMessage=te.default;const ne=i(n(9399));t.RevisionHistoryConnectResponse=ne.default;const re=i(n(4360));t.RevisionHistoryGetRevisionResponse=re.default;const se=i(n(2608));t.RevisionHistoryUpdateRevisionsResponse=se.default;const oe=i(n(1030));t.IsEditorBundleUploadedResponse=oe.default;const ie=i(n(4070));t.IsEditorBundleUploadedMessage=ie.default;const ae=o(n(9924));t.Parser=ae;const ce=i(n(6444));t.PacketParser=ce.default;const ue=i(n(7868));t.ChannelMessage=ue.default;const{Encoder:de,Decoder:le}=ae;t.Encoder=de,t.Decoder=le},8844:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(3130));class o extends s.default{constructor(...e){super()}static fromJSON(e){throw new TypeError("Must be implemented in a child class!")}}t.default=o,o.TYPE="1000"},1774:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(6504));function o(e){return s.default[e.DESCRIPTOR_NAME]}t.default=class{static decode(e,t){const n=o(t).decode("undefined"==typeof window?e:new Uint8Array(e));return t.fromJSON({...n})}static encode(e){const t=o(e.constructor),n=e.toJSON(),r=t.verify(n);if(r)throw Error(r);return t.encode(t.create(n)).finish()}}},8154:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(7261)),o=r(n(9168)),i=r(n(4766)),a=r(n(9031)),c=r(n(8741)),u=r(n(6033)),d=r(n(8610)),l=r(n(4451)),p=r(n(1452)),h=r(n(8852)),f=r(n(2481)),m=r(n(8016)),y=r(n(5928)),g=r(n(1196)),b=r(n(92)),O=r(n(785)),v=r(n(8961)),w=r(n(3460)),I=r(n(7079)),_=r(n(9212)),S=r(n(9403)),P=r(n(5797)),A=r(n(8291)),T=r(n(3322)),k=r(n(9370)),C=r(n(3826)),E=r(n(4070)),j=r(n(5632)),D=r(n(2015)),R=r(n(2603)),M=r(n(9811)),N=new Map([[s.default.TYPE,s.default.READABLE_TYPE_NAME],[o.default.TYPE,o.default.READABLE_TYPE_NAME],[i.default.TYPE,i.default.READABLE_TYPE_NAME],[a.default.TYPE,a.default.READABLE_TYPE_NAME],[c.default.TYPE,c.default.READABLE_TYPE_NAME],[u.default.TYPE,u.default.READABLE_TYPE_NAME],[d.default.TYPE,d.default.READABLE_TYPE_NAME],[l.default.TYPE,l.default.READABLE_TYPE_NAME],[p.default.TYPE,p.default.READABLE_TYPE_NAME],[h.default.TYPE,h.default.READABLE_TYPE_NAME],[f.default.TYPE,f.default.READABLE_TYPE_NAME],[m.default.TYPE,m.default.READABLE_TYPE_NAME],[y.default.TYPE,y.default.READABLE_TYPE_NAME],[g.default.TYPE,g.default.READABLE_TYPE_NAME],[b.default.TYPE,b.default.READABLE_TYPE_NAME],[v.default.TYPE,v.default.READABLE_TYPE_NAME],[w.default.TYPE,w.default.READABLE_TYPE_NAME],[O.default.TYPE,O.default.READABLE_TYPE_NAME],[I.default.TYPE,I.default.READABLE_TYPE_NAME],[_.default.TYPE,_.default.READABLE_TYPE_NAME],[S.default.TYPE,S.default.READABLE_TYPE_NAME],[P.default.TYPE,P.default.READABLE_TYPE_NAME],[A.default.TYPE,A.default.READABLE_TYPE_NAME],[T.default.TYPE,T.default.READABLE_TYPE_NAME],[k.default.TYPE,k.default.READABLE_TYPE_NAME],[C.default.TYPE,C.default.READABLE_TYPE_NAME],[E.default.TYPE,E.default.READABLE_TYPE_NAME],[j.default.TYPE,j.default.READABLE_TYPE_NAME],[D.default.TYPE,D.default.READABLE_TYPE_NAME],[R.default.TYPE,R.default.READABLE_TYPE_NAME],[M.default.TYPE,M.default.READABLE_TYPE_NAME]]);t.default=class{static typeToStringName(e){var t;return null!==(t=N.get(String(e)))&&void 0!==t?t:e}}},9858:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(3130));class o extends s.default{static create(e){return{revisionId:e.id,name:e.name,creatorId:e.creatorId,createdAt:e.createdAt,fromVersion:e.fromVersion,toVersion:e.toVersion,isEmptyCurrent:e.isEmptyCurrent,diffData:e.diffData?JSON.stringify(e.diffData):void 0,attributes:e.attributes,authorsIds:e.authorsIds}}static toJSON(e){var t;return{revisionId:e.revisionId,name:e.name,creatorId:e.creatorId,authorsIds:e.authorsIds?JSON.stringify(e.authorsIds):void 0,diffData:e.diffData,createdAt:null===(t=e.createdAt)||void 0===t?void 0:t.toISOString(),attributes:e.attributes?JSON.stringify(e.attributes):void 0,toVersion:e.toVersion,fromVersion:e.fromVersion,isEmptyCurrent:e.isEmptyCurrent}}static fromJSON(e){return{revisionId:(e={...e}).revisionId,name:e.name,creatorId:e.creatorId,authorsIds:e.authorsIds?JSON.parse(e.authorsIds):void 0,diffData:e.diffData,createdAt:e.createdAt?new Date(e.createdAt):void 0,attributes:e.attributes?JSON.parse(e.attributes):void 0,toVersion:e.toVersion,fromVersion:e.fromVersion,isEmptyCurrent:e.isEmptyCurrent}}static toObject(e){return function(e){for(const[t,n]of Object.entries(e))void 0===n&&delete e[t];return e}({id:e.revisionId,name:e.name,creatorId:e.creatorId,createdAt:e.createdAt,fromVersion:e.fromVersion,toVersion:e.toVersion,isEmptyCurrent:e.isEmptyCurrent,diffData:e.diffData?JSON.parse(e.diffData):void 0,attributes:e.attributes,authorsIds:e.authorsIds})}}t.default=o,o.DESCRIPTOR_NAME="RevisionDescriptor",o.DESCRIPTOR={fields:{revisionId:{type:"string",id:1},name:{type:"string",id:2},creatorId:{type:"string",id:3},authorsIds:{type:"string",id:4},diffData:{type:"string",id:5},createdAt:{type:"string",id:6},attributes:{type:"string",id:7},toVersion:{type:"uint32",id:8},fromVersion:{type:"uint32",id:9},isEmptyCurrent:{type:"bool",id:10}}}},8291:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e){super(),this.documentId=e}toJSON(){return{documentId:this.documentId}}static fromJSON(e){return new o(e.documentId)}}t.default=o,o.TYPE="121",o.READABLE_TYPE_NAME="connectToRevisionHistory",o.DESCRIPTOR_NAME="RevisionHistoryConnectMessage",o.DESCRIPTOR={fields:{documentId:{type:"string",id:1}}}},9370:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e,t){super(),this.documentId=e,this.revisionId=t}toJSON(){return{documentId:this.documentId,revisionId:this.revisionId}}static fromJSON(e){return new o(e.documentId,e.revisionId)}}t.default=o,o.TYPE="123",o.READABLE_TYPE_NAME="getRevision",o.DESCRIPTOR_NAME="RevisionHistoryGetRevisionMessage",o.DESCRIPTOR={fields:{documentId:{type:"string",id:1},revisionId:{type:"string",id:2}}}},3322:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e,t){super(),this.documentId=e,this.requestId=t}toJSON(){return{documentId:this.documentId,requestId:this.requestId}}static fromJSON(e){return new o(e.documentId,e.requestId)}}t.default=o,o.TYPE="122",o.READABLE_TYPE_NAME="reconnectToRevisionHistory",o.DESCRIPTOR_NAME="RevisionHistoryReconnectMessage",o.DESCRIPTOR={fields:{documentId:{type:"string",id:1},requestId:{type:"uint32",id:2}}}},3826:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844)),o=r(n(9858));class i extends s.default{constructor(e,t,n){super(),this.documentId=e,this.requestId=t,this.revisions=n}toJSON(){return{documentId:this.documentId,requestId:this.requestId,revisions:this.revisions.map(o.default.toJSON)}}toObject(){return{documentId:this.documentId,requestId:this.requestId,revisions:this.revisions.map(o.default.toObject)}}static create(e){return new i(e.documentId,e.requestId,e.revisions.map(o.default.create))}static fromJSON(e){return new i(e.documentId,e.requestId,e.revisions.map(o.default.fromJSON))}}t.default=i,i.TYPE="124",i.READABLE_TYPE_NAME="updateRevisions",i.DESCRIPTOR_NAME="RevisionHistoryUpdateRevisionsMessage",i.DESCRIPTOR={fields:{documentId:{type:"string",id:1},requestId:{type:"uint32",id:2},revisions:{type:"RevisionDescriptor",id:3,rule:"repeated"}}}},9399:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844)),o=r(n(9858));class i extends s.default{constructor(e,t,n){super(),this.channel=e,this.requestId=t,this.revisions=n}toJSON(){return{channel:this.channel,requestId:this.requestId,revisions:this.revisions.map(o.default.toJSON)}}toObject(){return{channel:this.channel,requestId:this.requestId,revisions:this.revisions.map(o.default.toObject)}}static fromJSON(e){return new i(e.channel,e.requestId,e.revisions.map(o.default.fromJSON))}}t.default=i,i.DESCRIPTOR_NAME="RevisionHistoryConnectResponse",i.DESCRIPTOR={fields:{channel:{type:"string",id:1},requestId:{type:"uint32",id:2},revisions:{type:"RevisionDescriptor",id:3,rule:"repeated"}}}},4360:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844)),o=r(n(9858));class i extends s.default{constructor(e,t,n,r,s,o,i,a,c,u){super(),this.revisionId=e,this.name=t,this.creatorId=n,this.authorsIds=r,this.createdAt=s,this.diffData=o,this.attributes=i,this.fromVersion=a,this.toVersion=c,this.isEmptyCurrent=u}toJSON(){return o.default.toJSON(this)}toObject(){return o.default.toObject(this)}static create(e){return new i(e.revisionId,e.name,e.creatorId,e.authorsIds,e.createdAt,e.diffData,e.attributes,e.fromVersion,e.toVersion,e.isEmptyCurrent)}static fromJSON(e){return new i(e.revisionId,e.name,e.creatorId,e.authorsIds?JSON.parse(e.authorsIds):void 0,e.createdAt?new Date(e.createdAt):void 0,e.diffData,e.attributes?JSON.parse(e.attributes):void 0,e.fromVersion,e.toVersion,e.isEmptyCurrent)}}t.default=i,i.DESCRIPTOR_NAME="RevisionHistoryGetRevisionResponse",i.DESCRIPTOR=o.default.DESCRIPTOR},2608:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e){super(),this.requestId=e}toJSON(){return{requestId:this.requestId}}static fromJSON(e){return new o(e.requestId)}}t.default=o,o.DESCRIPTOR_NAME="RevisionHistoryUpdateRevisionsResponse",o.DESCRIPTOR={fields:{requestId:{type:"uint32",id:1}}}},1696:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return s(t,e),t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t._SERVICE=void 0;const a=n(4584),c=i(n(1774)),u=i(n(9370)),d=i(n(4360)),l=i(n(3826)),p=i(n(2608)),h=i(n(8291)),f=i(n(9399)),m=i(n(3322)),y=i(n(7477)),g=o(n(1244)),b=i(n(2352));t._SERVICE=12;class O extends((0,a.EmitterMixin)()){constructor(e){super(),this._documentId=e,this._isConnected=!1}get isConnected(){return this._isConnected}connect(e){return this._isConnected?Promise.resolve():this._connect(e,new h.default(this._documentId))}disconnect(){this._isConnected&&(this._isConnected=!1,this._wsGateway&&(this.stopListening(this._wsGateway),this._wsGateway=void 0),this._channel&&(this.stopListening(this._channel),this._channel=void 0),this.fire("disconnected"),this.stopListening())}reconnect(e,t){if(this.isConnected)throw new y.default("Cannot reconnect to already connected service.",e);return this._connect(e,new m.default(this._documentId,t))}async updateRevisions(e,t){const n=l.default.create({documentId:this._documentId,requestId:t,revisions:e}),r=await this._sendRequest(l.default.TYPE,n),{requestId:s}=c.default.decode(r,p.default);return s}async getRevision(e){const t=new u.default(this._documentId,e),n=await this._sendRequest(u.default.TYPE,t);return c.default.decode(n,d.default).toObject()}async _connect(e,n){if(e.state!==g.WEB_SOCKET_GATEWAY_STATES.CONNECTED)throw new y.default("WebSocket Gateway is not connected.",e);this._wsGateway=e,this.stopListening(e,"change:state");const r=await e._sendRequest(t._SERVICE,n.constructor.TYPE,c.default.encode(n)),{channel:s,requestId:o,revisions:i}=c.default.decode(r,f.default).toObject();return this.listenTo(e,"change:state",((e,t,n)=>this._onWsGatewayStateChange(n)),{priority:g.default._CHANGE_STATE_EVENT_PRIORITY}),this._connectToChannel(e,s),this._isConnected=!0,this.fire("connected"),{revisions:i,requestId:o}}_connectToChannel(e,t){this._channel=e._getChannel(O._SERVICE,t),this._channel&&this.listenTo(this._channel,this._channel.getEventName(l.default.TYPE),((e,t)=>{const{documentId:n,requestId:r,revisions:s}=c.default.decode(t,l.default).toObject();this.fire("revisionsUpdated",{documentId:n,requestId:r,revisionsData:s})}))}_onWsGatewayStateChange(e){e===g.WEB_SOCKET_GATEWAY_STATES.DISCONNECTED&&this.disconnect()}_sendRequest(e,n){if(!this._wsGateway||!this._isConnected)throw new b.default("Revision History",this);return this._wsGateway._sendRequest(t._SERVICE,e,c.default.encode(n))}}O._SERVICE=t._SERVICE,t.default=O},5111:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return s(t,e),t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.WEB_SOCKET_GATEWAY_STATES=t.CommentsService=t.SessionCollection=t.TrackChangesService=t.WebSocketGateway=t.EditorService=t.RevisionHistoryService=t.CollaborativeEditingService=void 0;const a=o(n(1244));t.WebSocketGateway=a.default,Object.defineProperty(t,"WEB_SOCKET_GATEWAY_STATES",{enumerable:!0,get:function(){return a.WEB_SOCKET_GATEWAY_STATES}});const c=i(n(9425));t.EditorService=c.default;const u=i(n(1696));t.RevisionHistoryService=u.default;const d=i(n(4908));t.TrackChangesService=d.default;const l=i(n(2909));t.SessionCollection=l.default;const p=i(n(44));t.CollaborativeEditingService=p.default;const h=i(n(2924));t.CommentsService=h.default},8016:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e,t){super(),this.id=e,this.sessionType=t}toJSON(){return{id:this.id,sessionType:this.sessionType}}static fromJSON(e){return new o(e.id,e.sessionType)}}t.default=o,o.TYPE="31",o.READABLE_TYPE_NAME="getConnectedSockets",o.DESCRIPTOR_NAME="SessionsConnectMessage",o.DESCRIPTOR={fields:{id:{type:"string",id:1},sessionType:{type:"uint32",id:2}}}},5928:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e,t,n,r){super(),this.id=e,this.userId=t,this.role=n,this.permissions=r}toJSON(){var e,t,n;return{id:this.id,userId:null!==(e=this.userId)&&void 0!==e?e:void 0,role:null!==(t=this.role)&&void 0!==t?t:void 0,permissions:null!==(n=this.permissions)&&void 0!==n?n:void 0}}static fromJSON(e){return new o(e.id,e.userId,e.role,e.permissions)}}t.default=o,o.TYPE="32",o.READABLE_TYPE_NAME="connectSocket",o.DESCRIPTOR_NAME="SocketConnectMessage",o.DESCRIPTOR={fields:{id:{type:"string",id:1},userId:{type:"string",id:2},role:{type:"string",id:3},permissions:{rule:"repeated",type:"string",id:4}}}},1196:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e){super(),this.id=e}toJSON(){return{id:this.id}}static fromJSON(e){return new o(e.id)}}t.default=o,o.TYPE="33",o.READABLE_TYPE_NAME="disconnectSocket",o.DESCRIPTOR_NAME="SocketDisconnectMessage",o.DESCRIPTOR={fields:{id:{type:"string",id:1}}}},1644:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e,t=[]){super(),this.channel=e,this.sockets=t}toJSON(){return{channel:this.channel,sockets:this.sockets.map((e=>({user:e.userId,session:e.id,role:e.role,permissions:e.permissions})))}}static fromJSON(e){return new o(e.channel,e.sockets.map((e=>({id:e.session,userId:e.user,role:e.role,permissions:e.permissions}))))}}t.default=o,o.DESCRIPTOR_NAME="SessionsConnectResponse",o.DESCRIPTOR={fields:{channel:{type:"string",id:1},sockets:{rule:"repeated",type:"SessionsSocketDescriptor",id:2}}}},2909:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=n(4584),o=n(4096),i=r(n(7861)),a=r(n(1244)),c=r(n(1644)),u=r(n(8016)),d=r(n(5928)),l=r(n(1196)),p=r(n(1774));class h extends s.Collection{constructor(e,t){super({idProperty:"id"}),this._id=e,this._sessionType=t,this._handlers=new Map,this._eventsQueue=[],this._isRunning=!1}async connect(e){this._wsGateway=e,this.stopListening(e,"change:state");const t=new u.default(this._id,this._sessionType);let n;try{const e=await this._wsGateway._sendRequest(o._SERVICE,u.default.TYPE,p.default.encode(t));n=p.default.decode(e,c.default)}catch(e){n=new c.default(this._id,[])}this._connectToChannel(this._wsGateway,n.channel,this._sessionType);const r=await async function(e,t){const n=t.map((e=>e.userId)),r=n.length?await i.default.getMany(e,n):[];return t.map((e=>{const t={id:e.id,role:e.role,permissions:e.permissions};return t.user=e.userId&&r.find((t=>t.id===e.userId))||new i.default,t}))}(this._wsGateway,n.sockets);for(const e of r)super.add(e);this._connected=!0,this.fire("connected"),this.listenTo(this._wsGateway,"change:state",((e,t,n)=>this._onWsGatewayStateChange(n)),{priority:a.default._CHANGE_STATE_EVENT_PRIORITY}),await this._runQueue()}disconnect(e=!0){if(this._connected){for(this._connected=!1,this._eventsQueue=[];this.length;)super.remove(0);this._channel&&(this.stopListening(this._channel),this._channel=void 0),this._wsGateway&&e&&(this.stopListening(this._wsGateway),this._wsGateway=void 0),this.fire("disconnected"),e&&this.stopListening()}}add(e,t){throw new TypeError("The collection is read-only.")}remove(e){throw new TypeError("The collection is read-only.")}_connectToChannel(e,t,n){this._channel=e._getChannel(n,t),this._channel&&(this._addHandler(this._channel,d.default.TYPE,(async t=>{const n=p.default.decode(t,d.default);if(-1===this.getIndex(n.id)){const t={id:n.id,role:n.role,permissions:n.permissions};n.userId&&(t.user=await i.default.get(e,n.userId)),super.add(t)}})),this._addHandler(this._channel,l.default.TYPE,(e=>{const t=p.default.decode(e,l.default);-1!==this.getIndex(t.id)&&super.remove(t.id)})))}async _onWsGatewayStateChange(e){e===a.default.STATE_DISCONNECTED&&this.disconnect(!1),e===a.default.STATE_CONNECTED&&await this.connect(this._wsGateway)}async _runQueue(){if(this._isRunning||!this._connected)return;let e;for(this._isRunning=!0;e=this._eventsQueue.shift();){const t=this._handlers.get(e.eventName);t&&await t(e.data)}this._isRunning=!1}_addHandler(e,t,n){const r=e.getEventName(t,!0);this.listenTo(e,r,(async(e,t)=>{const n=e.name;this._eventsQueue.push({eventName:n,data:t}),await this._runQueue()})),this._handlers.set(r,n)}}t.default=h},4096:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t._SERVICE=void 0;const s=r(n(2909));t._SERVICE=3,t.default=class{static async getConnectedSessions(e,t,n){const r=new s.default(t,n);return await r.connect(e),r}}},3721:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(3130));class o extends s.default{static toJSON(e){var t;return{...e,data:e.data?JSON.stringify(e.data):e.data,attributes:e.attributes?JSON.stringify(e.attributes):e.attributes,createdAt:null===(t=e.createdAt)||void 0===t?void 0:t.toISOString()}}static fromJSON(e){return{...e,data:e.data?JSON.parse(e.data):e.data,attributes:e.attributes?JSON.parse(e.attributes):e.attributes,createdAt:e.createdAt?new Date(e.createdAt):void 0}}}t.default=o,o.DESCRIPTOR_NAME="SuggestionDescriptor",o.DESCRIPTOR={fields:{id:{id:1,type:"string"},authorId:{id:2,type:"string"},type:{id:3,type:"string"},createdAt:{id:4,type:"string"},data:{id:5,type:"string"},hasComments:{id:6,type:"bool"},state:{id:7,type:"string"},attributes:{id:8,type:"string"}}}},92:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e,t,n,r={},s=null,o=null){super(),this.id=e,this.documentId=t,this.type=n,this.data=r,this.originalSuggestionId=s,this.attributes=o}toJSON(){return{id:this.id,documentId:this.documentId,type:this.type,data:JSON.stringify(this.data),originalSuggestionId:this.originalSuggestionId,attributes:JSON.stringify(this.attributes)}}static fromJSON(e){var t;return new o(e.id,e.documentId,e.type,JSON.parse(e.data),null!==(t=e.originalSuggestionId)&&void 0!==t?t:null,e.attributes?JSON.parse(e.attributes):null)}}t.default=o,o.TYPE="101",o.READABLE_TYPE_NAME="addSuggestion",o.DESCRIPTOR_NAME="TrackChangesAddSuggestionMessage",o.DESCRIPTOR={fields:{id:{type:"string",id:1},documentId:{type:"string",id:2},type:{type:"string",id:3},data:{type:"string",id:4},originalSuggestionId:{type:"string",id:5},attributes:{type:"string",id:6}}}},9212:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e,t,n){super(),this.ids=e,this.documentId=t,this.state=n}toJSON(){return{ids:this.ids,documentId:this.documentId,state:this.state}}static fromJSON(e){return new o(e.ids,e.documentId,e.state)}}t.default=o,o.TYPE="106",o.READABLE_TYPE_NAME="batchUpdateSuggestionsState",o.DESCRIPTOR_NAME="TrackChangesBatchUpdateSuggestionsStateMessage",o.DESCRIPTOR={fields:{ids:{type:"string",rule:"repeated",id:1},documentId:{type:"string",id:2},state:{type:"string",id:3}}}},7079:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e){super(),this.documentId=e}toJSON(){return{documentId:this.documentId}}static fromJSON(e){return new o(e.documentId)}}t.default=o,o.TYPE="105",o.READABLE_TYPE_NAME="connectToSuggestions",o.DESCRIPTOR_NAME="TrackChangesConnectMessage",o.DESCRIPTOR={fields:{documentId:{type:"string",id:1}}}},785:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e){super(),this.documentId=e}toJSON(){return{documentId:this.documentId}}static fromJSON(e){return new o(e.documentId)}}t.default=o,o.TYPE="102",o.READABLE_TYPE_NAME="getAllSuggestions",o.DESCRIPTOR_NAME="TrackChangesGetAllSuggestionMessage",o.DESCRIPTOR={fields:{documentId:{type:"string",id:1}}}},8961:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e,t){super(),this.id=e,this.documentId=t}toJSON(){return{id:this.id,documentId:this.documentId}}static fromJSON(e){return new o(e.id,e.documentId)}}t.default=o,o.TYPE="103",o.READABLE_TYPE_NAME="getSuggestion",o.DESCRIPTOR_NAME="TrackChangesGetSuggestionMessage",o.DESCRIPTOR={fields:{id:{type:"string",id:1},documentId:{type:"string",id:2}}}},3460:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e,t,n,r,s,o=null){super(),this.id=e,this.documentId=t,this.hasComments=n,this.isHasCommentsModified=r,this.state=s,this.attributes=o}toJSON(){return{id:this.id,documentId:this.documentId,hasComments:this.hasComments,isHasCommentsModified:this.isHasCommentsModified,state:this.state,attributes:JSON.stringify(this.attributes)}}static fromJSON(e){return new o(e.id,e.documentId,e.hasComments,e.isHasCommentsModified,e.state,e.attributes?JSON.parse(e.attributes):null)}}t.default=o,o.TYPE="104",o.READABLE_TYPE_NAME="updateSuggestion",o.DESCRIPTOR_NAME="TrackChangesUpdateSuggestionMessage",o.DESCRIPTOR={fields:{id:{type:"string",id:1},documentId:{type:"string",id:2},hasComments:{type:"bool",id:3},isHasCommentsModified:{type:"bool",id:4},state:{type:"string",id:5},attributes:{type:"string",id:6}}}},6068:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e,t,n,r,s,o,i={},a=null){super(),this.id=e,this.authorId=t,this.type=n,this.hasComments=s,this.state=o,this.data=i,this.attributes=a,this.createdAt=r?new Date(r):void 0}toJSON(){var e;return{id:this.id,authorId:this.authorId,type:this.type,createdAt:null===(e=this.createdAt)||void 0===e?void 0:e.toISOString(),data:JSON.stringify(this.data),hasComments:this.hasComments,state:this.state,attributes:JSON.stringify(this.attributes)}}static fromJSON(e){return new o(e.id,e.authorId,e.type,e.createdAt,e.hasComments,e.state,JSON.parse(e.data),e.attributes?JSON.parse(e.attributes):null)}}t.default=o,o.DESCRIPTOR_NAME="TrackChangesAddSuggestionResponse",o.DESCRIPTOR={fields:{id:{type:"string",id:1},authorId:{type:"string",id:2},type:{type:"string",id:3},createdAt:{type:"string",id:4},data:{type:"string",id:5},hasComments:{type:"bool",id:6},state:{type:"string",id:7},attributes:{type:"string",id:8}}}},3917:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844)),o=r(n(3721));class i extends s.default{constructor(e,t,n){super(),this.channel=e,this._suggestions=t,this._suggestionsV2=n,this.suggestions=(null==n?void 0:n.length)?n:t}toJSON(){var e,t;return{channel:this.channel,suggestions:null===(e=this._suggestions)||void 0===e?void 0:e.map((e=>JSON.stringify(e))),suggestionsV2:null===(t=this._suggestionsV2)||void 0===t?void 0:t.map(o.default.toJSON)}}static fromJSON(e){var t,n;return new i(e.channel,null===(t=e.suggestions)||void 0===t?void 0:t.map((e=>JSON.parse(e))),null===(n=e.suggestionsV2)||void 0===n?void 0:n.map(o.default.fromJSON))}}t.default=i,i.DESCRIPTOR_NAME="TrackChangesConnectResponse",i.DESCRIPTOR={fields:{channel:{type:"string",id:1},suggestions:{type:"string",rule:"repeated",id:2},suggestionsV2:{type:"SuggestionDescriptor",rule:"repeated",id:3}}}},827:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844)),o=r(n(3721));class i extends s.default{constructor(e,t){super(),this._suggestions=e,this._suggestionsV2=t,this.suggestions=(null==t?void 0:t.length)?t:e}toJSON(){var e,t;return{suggestions:null===(e=this._suggestions)||void 0===e?void 0:e.map((e=>JSON.stringify(e))),suggestionsV2:null===(t=this._suggestionsV2)||void 0===t?void 0:t.map(o.default.toJSON)}}static fromJSON(e){var t,n;return new i(null===(t=e.suggestions)||void 0===t?void 0:t.map(a),null===(n=e.suggestionsV2)||void 0===n?void 0:n.map(o.default.fromJSON))}}function a(e){const t=JSON.parse(e);return t.createdAt=t.createdAt?new Date(t.createdAt):void 0,t}t.default=i,i.DESCRIPTOR_NAME="TrackChangesGetAllSuggestionsResponse",i.DESCRIPTOR={fields:{suggestions:{type:"string",rule:"repeated",id:1},suggestionsV2:{type:"SuggestionDescriptor",rule:"repeated",id:2}}}},5659:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e,t,n,r,s,o,i={},a=null){super(),this.id=e,this.authorId=t,this.type=n,this.hasComments=s,this.state=o,this.data=i,this.attributes=a,this.createdAt=new Date(r)}toJSON(){return{id:this.id,authorId:this.authorId,type:this.type,createdAt:this.createdAt.toISOString(),data:JSON.stringify(this.data),hasComments:this.hasComments,state:this.state,attributes:JSON.stringify(this.attributes)}}static fromJSON(e){return new o(e.id,e.authorId,e.type,e.createdAt,e.hasComments,e.state,JSON.parse(e.data),e.attributes?JSON.parse(e.attributes):null)}}t.default=o,o.DESCRIPTOR_NAME="TrackChangesGetSuggestionResponse",o.DESCRIPTOR={fields:{id:{type:"string",id:1},authorId:{type:"string",id:2},type:{type:"string",id:3},createdAt:{type:"string",id:4},data:{type:"string",id:5},hasComments:{type:"bool",id:6},state:{type:"string",id:7},attributes:{type:"string",id:8}}}},4908:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return s(t,e),t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t._SERVICE=void 0;const a=n(4584),c=i(n(1774)),u=i(n(92)),d=i(n(6068)),l=i(n(8961)),p=i(n(5659)),h=i(n(785)),f=i(n(827)),m=i(n(3460)),y=i(n(7079)),g=i(n(3917)),b=i(n(7477)),O=o(n(1244)),v=i(n(2352)),w=i(n(556)),I=i(n(9212));t._SERVICE=10;class _ extends((0,a.EmitterMixin)()){constructor(e){super(),this._documentId=e,this._isConnected=!1}get isConnected(){return this._isConnected}async connect(e){if(this._isConnected)return;if(e.state!==O.WEB_SOCKET_GATEWAY_STATES.CONNECTED)throw new b.default("WebSocket Gateway is not connected.",e);const n=new y.default(this._documentId);this._wsGateway=e,this.stopListening(e,"change:state");const r=await e._sendRequest(t._SERVICE,y.default.TYPE,c.default.encode(n)),s=c.default.decode(r,g.default);return this.listenTo(e,"change:state",((e,t,n)=>this._onWsGatewayStateChange(n)),{priority:O.default._CHANGE_STATE_EVENT_PRIORITY}),this._connectToChannel(e,s.channel),this._isConnected=!0,this.fire("connected"),s.suggestions}disconnect(){this._isConnected&&(this._isConnected=!1,this._wsGateway&&(this.stopListening(this._wsGateway),this._wsGateway=void 0),this._channel&&(this.stopListening(this._channel),this._channel=void 0),this.fire("disconnected"),this.stopListening())}async add(e,t,n,r=null,s){const o=new u.default(e,this._documentId,t,n,r,s),i=await this._sendRequest(u.default.TYPE,o);return c.default.decode(i,d.default)}async get(e,t=1){const n=new l.default(e,this._documentId);try{const e=await this._sendRequest(l.default.TYPE,n);return c.default.decode(e,p.default)}catch(n){if("CKEditorCloudServicesServerError"===n.name&&"404"===n.code&&t<5)return await(r=100*t,new Promise((e=>{setTimeout(e,r)}))),this.get(e,t+1);if("CKEditorCloudServicesServerError"===n.name)throw n;throw w.default.fromPublicError(n)}var r}async getAll(){const e=new h.default(this._documentId),t=await this._sendRequest(h.default.TYPE,e),{suggestions:n}=c.default.decode(t,f.default);return n}async update(e,t={}){const{hasComments:n,state:r,attributes:s}=t,o=void 0!==n,i=new m.default(e,this._documentId,n,o,r,s);await this._sendRequest(m.default.TYPE,i)}async batchUpdateState(e){const t=new I.default(e.ids,this._documentId,e.state);await this._sendRequest(I.default.TYPE,t)}_connectToChannel(e,t){this._channel=e._getChannel(_._SERVICE,t),this._channel&&this.listenTo(this._channel,this._channel.getEventName(m.default.TYPE),((e,t)=>{const n=c.default.decode(t,m.default);this.fire("suggestionUpdated",n)}))}_onWsGatewayStateChange(e){e===O.WEB_SOCKET_GATEWAY_STATES.DISCONNECTED&&this.disconnect()}_sendRequest(e,n){if(!this._wsGateway||!this._isConnected)throw new v.default("Track Changes",this);return this._wsGateway._sendRequest(t._SERVICE,e,c.default.encode(n))}}_._SERVICE=t._SERVICE,t.default=_},5797:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e){super(),this.ids=e}toJSON(){return{ids:this.ids}}static fromJSON(e){return new o(e.ids)}}t.default=o,o.TYPE="22",o.READABLE_TYPE_NAME="getManyUsers",o.DESCRIPTOR_NAME="GetManyUsersMessage",o.DESCRIPTOR={fields:{ids:{id:1,type:"string",rule:"repeated"}}}},9403:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e){super(),this.id=e}toJSON(){return{id:this.id}}static fromJSON(e){return new o(e.id)}}t.default=o,o.TYPE="21",o.READABLE_TYPE_NAME="getUser",o.DESCRIPTOR_NAME="GetUserMessage",o.DESCRIPTOR={fields:{id:{type:"string",id:1}}}},8605:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e){super(),this.users=e}toJSON(){return{users:this.users.map(i)}}static fromJSON(e){return new o(e.users.map(a))}}function i(e){return{attributes:Object.keys(e).map((t=>({key:t,value:JSON.stringify(e[t])})))}}function a(e){return e.attributes.reduce(((e,t)=>(e[t.key]=t.value?JSON.parse(t.value):null,e)),{})}t.default=o,o.DESCRIPTOR_NAME="GetManyUsersResponse",o.DESCRIPTOR={fields:{users:{rule:"repeated",type:"UserDescriptor",id:1}}}},6947:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e){super(),this.attributes=e}toJSON(){return{attributes:Object.keys(this.attributes).map((e=>({key:e,value:JSON.stringify(this.attributes[e])})))}}static fromJSON(e){const t=e.attributes.reduce(((e,t)=>(e[t.key]=t.value?JSON.parse(t.value):null,e)),{});return new o(t)}}t.default=o,o.DESCRIPTOR_NAME="GetUserResponse",o.DESCRIPTOR={fields:{attributes:{rule:"repeated",type:"KeyValueDescriptor",id:1}}}},7861:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(9403)),o=r(n(6947)),i=r(n(1774)),a=r(n(5797)),c=r(n(8605));class u{constructor(e={}){this._attributes=new Map;for(const t of Object.keys(e))"id"!==t?(this._attributes.set(t,e[t]),Object.defineProperty(this,t,{enumerable:!0,configurable:!1,get:()=>this._attributes.get(t)})):this.id=e.id}static fromData(e){return new u(e)}static async get(e,t){const n=new s.default(t);try{const t=await e._sendRequest(u._SERVICE,s.default.TYPE,i.default.encode(n)),r=i.default.decode(t,o.default);return new u(r.attributes)}catch(e){return new u({id:t})}}static async getMany(e,t){const n=new a.default(t);try{const t=await e._sendRequest(u._SERVICE,a.default.TYPE,i.default.encode(n));return i.default.decode(t,c.default).users.map((e=>new u(e)))}catch(e){return t.map((e=>new u({id:e})))}}}u._SERVICE=2,t.default=u},2587:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default="52.0.1"},8944:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=n(4584),o=r(n(7868)),i=r(n(1774));class a extends((0,s.EmitterMixin)()){constructor(e,t,n){super(),this._channelName=e,this._wsGateway=t,this._socket=n,this._subscribeToChannel()}remove(){this._socket.off(this._channelName)}getEventName(e,t=!1){let n="";return t&&(n+="all:"),n+="event",e&&(n+=":"+e),n}_subscribeToChannel(){this._socket.on(this._channelName,(e=>{const t=i.default.decode(e,o.default);this.fire(this.getEventName(t.type,!0),t.data,t.socketId),t.socketId!==this._wsGateway.socketId&&this.fire(this.getEventName(t.type),t.data,t.socketId)}))}}t.default=a},7868:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e,t,n){super(),this.type=e,this.socketId=t,this.data=n}toJSON(){return{type:this.type,socketId:this.socketId,data:this.data}}static fromJSON(e){return new o(e.type,e.socketId,e.data)}}t.default=o,o.DESCRIPTOR_NAME="ChannelMessage",o.DESCRIPTOR={fields:{type:{type:"uint32",id:1},socketId:{type:"string",id:2},data:{type:"bytes",id:3}}}},6444:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(1594)),o=r(n(1774));t.default=class{encode(e,t,n,r="/",i={}){if(t.length>2)throw new Error("PacketParser supports only 2 elements in data");const a={type:e,data:t,id:n,nsp:r};return o.default.encode(s.default.create(a,i))}decode(e){const t=o.default.decode(e,s.default);return{packet:{id:t.id,type:t.type,data:t.packetData,nsp:t.nsp},options:{flags:t.options.flags,rooms:t.options.rooms,except:t.options.except}}}}},2300:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return s(t,e),t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=i(n(1010)),c=o(n(447));class u extends a.default{constructor(e,t){super(),this.data=e,this.data1=t}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(e){return new u(e.data,e.data1)}static create(e,t){return new u(e,t)}}t.default=u,u.TYPE=c.default.getPacketType(c.MessageDataTypes.BUFFER,c.MessageDataTypes.BUFFER),u.DESCRIPTOR_NAME="BytesBytesPacketDataMessage",u.DESCRIPTOR={fields:{data:{type:"bytes",id:1},data1:{type:"bytes",id:2}}}},6026:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return s(t,e),t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=i(n(1010)),c=o(n(447));class u extends a.default{constructor(e,t){super(),this.data=e,this.data1=t}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(e){return new u(e.data,e.data1)}static create(e,t){return new u(e,t)}}t.default=u,u.TYPE=c.default.getPacketType(c.MessageDataTypes.NUMBER,c.MessageDataTypes.BUFFER),u.DESCRIPTOR_NAME="NumberBytesPacketDataMessage",u.DESCRIPTOR={fields:{data:{type:"uint32",id:1},data1:{type:"bytes",id:2}}}},6325:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return s(t,e),t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=i(n(1010)),c=o(n(447));class u extends a.default{constructor(e,t){super(),this.data=e,this.data1=t}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(e){return new u(e.data,e.data1)}static create(e,t){return new u(e,t)}}t.default=u,u.TYPE=c.default.getPacketType(c.MessageDataTypes.NUMBER,c.MessageDataTypes.NUMBER),u.DESCRIPTOR_NAME="NumberNumberPacketDataMessage",u.DESCRIPTOR={fields:{data:{type:"uint32",id:1},data1:{type:"uint32",id:2}}}},1272:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return s(t,e),t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=i(n(1010)),c=o(n(447));class u extends a.default{constructor(e,t){super(),this.data=e,this.data1=t}toJSON(){return{data:this.data,data1:this.data1?JSON.stringify(this.data1):void 0}}static fromJSON(e){return new u(e.data,e.data1&&JSON.parse(e.data1))}static create(e,t){return new u(e,t)}}t.default=u,u.TYPE=c.default.getPacketType(c.MessageDataTypes.NUMBER,c.MessageDataTypes.OBJECT),u.DESCRIPTOR_NAME="NumberObjectPacketDataMessage",u.DESCRIPTOR={fields:{data:{type:"uint32",id:1},data1:{type:"string",id:2}}}},7609:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return s(t,e),t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=i(n(1010)),c=o(n(447));class u extends a.default{constructor(e,t){super(),this.data=e,this.data1=t}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(e){return new u(e.data,e.data1)}static create(e,t){return new u(e,t)}}t.default=u,u.TYPE=c.default.getPacketType(c.MessageDataTypes.NUMBER,c.MessageDataTypes.STRING),u.DESCRIPTOR_NAME="NumberStringPacketDataMessage",u.DESCRIPTOR={fields:{data:{type:"uint32",id:1},data1:{type:"string",id:2}}}},3285:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return s(t,e),t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=i(n(1010)),c=o(n(447));class u extends a.default{constructor(e,t){super(),this.data=e,this.data1=t}toJSON(){return{data:this.data?JSON.stringify(this.data):void 0,data1:this.data1}}static fromJSON(e){return new u(e.data&&JSON.parse(e.data),e.data1)}static create(e,t){return new u(e,t)}}t.default=u,u.TYPE=c.default.getPacketType(c.MessageDataTypes.OBJECT,c.MessageDataTypes.BUFFER),u.DESCRIPTOR_NAME="ObjectBufferPacketDataMessage",u.DESCRIPTOR={fields:{data:{type:"string",id:1},data1:{type:"bytes",id:2}}}},110:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return s(t,e),t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=i(n(1010)),c=o(n(447));class u extends a.default{constructor(e,t){super(),this.data=e,this.data1=t}toJSON(){return{data:this.data?JSON.stringify(this.data):void 0,data1:this.data1?JSON.stringify(this.data1):void 0}}static fromJSON(e){return new u(e.data&&JSON.parse(e.data),e.data1&&JSON.parse(e.data1))}static create(e,t){return new u(e,t)}}t.default=u,u.TYPE=c.default.getPacketType(c.MessageDataTypes.OBJECT,c.MessageDataTypes.OBJECT),u.DESCRIPTOR_NAME="ObjectObjectPacketDataMessage",u.DESCRIPTOR={fields:{data:{type:"string",id:1},data1:{type:"string",id:2}}}},1010:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{static create(e,t){throw new TypeError("Must be implemented in a child class!")}}t.default=o,e.exports=o},1594:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(1774)),o=r(n(8844)),i=r(n(3120)),a=r(n(447)),c=r(n(6026)),u=r(n(1974)),d=r(n(2300)),l=r(n(532)),p=r(n(1272)),h=r(n(110)),f=r(n(3285)),m=r(n(8758)),y=r(n(3674)),g=r(n(6325)),b=r(n(7609)),O=[c.default,u.default,d.default,l.default,p.default,h.default,f.default,m.default,y.default,g.default,b.default].reduce(((e,t)=>(e[t.TYPE]=t,e)),{});class v extends o.default{constructor(e,t,n,r="/",s=new i.default){super(),this.type=e,this.data=t,this.id=n,this.nsp=r,this.options=s}get packetData(){return void 0===this.data.data&&void 0===this.data.data1?[]:this.data.data&&void 0===this.data.data1?[this.data.data]:[this.data.data,this.data.data1]}toJSON(){const e=s.default.encode(this.options),t=s.default.encode(this.data);return{type:this.type+10*this.data.constructor.TYPE,id:this.id,nsp:"/"===this.nsp?void 0:this.nsp,data:t,options:e}}static fromJSON(e){const t=Math.floor(e.type/10);return new v(e.type-10*t,s.default.decode(e.data,O[t]),e.id,e.nsp,e.options?s.default.decode(e.options,i.default):new i.default)}static create(e,t={}){var n;const r=a.default.getPacketType(a.default.getType(e.data[0]),a.default.getType(null!==(n=e.data[1])&&void 0!==n?n:e.data[0]));return new v(e.type,O[r].create(e.data[0],e.data[1]),e.id,e.nsp,new i.default(t.flags,t.rooms,t.except))}}t.default=v,v.TYPE=10,v.DESCRIPTOR_NAME="PacketMessage",v.DESCRIPTOR={fields:{type:{type:"uint32",id:1},id:{type:"uint32",id:2},nsp:{type:"string",id:3},data:{type:"bytes",id:4},options:{type:"bytes",id:5}}}},3120:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e,t=[],n=[]){super(),this.flags=e,this.rooms=t,this.except=n}toJSON(){var e,t;return{flags:this.flags?JSON.stringify(this.flags):void 0,rooms:(null===(e=this.rooms)||void 0===e?void 0:e.length)?this.rooms:void 0,except:(null===(t=this.except)||void 0===t?void 0:t.length)?this.except:void 0}}static fromJSON(e){return new o(e.flags&&JSON.parse(e.flags),e.rooms,e.except)}}t.default=o,o.TYPE=11,o.DESCRIPTOR_NAME="PacketOptionsMessage",o.DESCRIPTOR={fields:{flags:{type:"string",id:1},rooms:{type:"string",id:2,rule:"repeated"},except:{type:"string",id:3,rule:"repeated"}}}},1974:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return s(t,e),t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=i(n(1010)),c=o(n(447));class u extends a.default{constructor(e,t){super(),this.data=e,this.data1=t}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(e){return new u(e.data,e.data1)}static create(e,t){return new u(e,t)}}t.default=u,u.TYPE=c.default.getPacketType(c.MessageDataTypes.STRING,c.MessageDataTypes.BUFFER),u.DESCRIPTOR_NAME="StringBytesPacketDataMessage",u.DESCRIPTOR={fields:{data:{type:"string",id:1},data1:{type:"bytes",id:2}}}},3674:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return s(t,e),t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=i(n(1010)),c=o(n(447));class u extends a.default{constructor(e,t){super(),this.data=e,this.data1=t}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(e){return new u(e.data,e.data1)}static create(e,t){return new u(e,t)}}t.default=u,u.TYPE=c.default.getPacketType(c.MessageDataTypes.STRING,c.MessageDataTypes.NUMBER),u.DESCRIPTOR_NAME="StringNumberPacketDataMessage",u.DESCRIPTOR={fields:{data:{type:"string",id:1},data1:{type:"uint32",id:2}}}},532:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return s(t,e),t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=i(n(1010)),c=o(n(447));class u extends a.default{constructor(e,t){super(),this.data=e,this.data1=t}toJSON(){return{data:this.data,data1:this.data1?JSON.stringify(this.data1):void 0}}static fromJSON(e){return new u(e.data,e.data1&&JSON.parse(e.data1))}static create(e,t){return new u(e,t)}}t.default=u,u.TYPE=c.default.getPacketType(c.MessageDataTypes.STRING,c.MessageDataTypes.OBJECT),u.DESCRIPTOR_NAME="StringObjectPacketDataMessage",u.DESCRIPTOR={fields:{data:{type:"string",id:1},data1:{type:"string",id:2}}}},8758:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return s(t,e),t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=i(n(1010)),c=o(n(447));class u extends a.default{constructor(e,t){super(),this.data=e,this.data1=t}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(e){return new u(e.data,e.data1)}static create(e,t){return new u(e,t)}}t.default=u,u.TYPE=c.default.getPacketType(c.MessageDataTypes.STRING,c.MessageDataTypes.STRING),u.DESCRIPTOR_NAME="StringStringPacketDataMessage",u.DESCRIPTOR={fields:{data:{type:"string",id:1},data1:{type:"string",id:2}}}},9924:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Decoder=t.Encoder=t.ENCODED_TYPES=void 0;const s=n(114),o=r(n(6444)),i=r(n(447));t.ENCODED_TYPES=[s.PacketType.EVENT,s.PacketType.ACK,s.PacketType.BINARY_ACK,s.PacketType.BINARY_EVENT];class a extends s.Encoder{constructor(e=new o.default){super(),this._packetParser=e}encode(e){if(t.ENCODED_TYPES.includes(e.type))try{return[this._packetParser.encode(e.type,e.data,e.id,e.nsp)]}catch(e){console.error("Can not properly serialize or deserialize messages. Check the original error.",{originalError:{message:e.message}})}return super.encode(e)}}t.Encoder=a;class c extends s.Decoder{constructor(e=new o.default){super(),this._packetParser=e}add(e){if(!i.default.isBuffer(e))return super.add(e);let t;try{t=this._packetParser.decode(e).packet}catch(t){return super.add(e)}super.emitReserved("decoded",t)}}t.Decoder=c},447:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageDataTypes=void 0;const n=!("undefined"==typeof process||!process.versions||!process.versions.node);var r,s;(s=r=t.MessageDataTypes||(t.MessageDataTypes={}))[s.BUFFER=1]="BUFFER",s[s.STRING=2]="STRING",s[s.NUMBER=3]="NUMBER",s[s.OBJECT=4]="OBJECT";class o{static getPacketType(...e){let t=0;for(let n=0;n<e.length;n++)t+=e[n]*Math.pow(10,e.length-n-1);return t}static getType(e){if(o.isBuffer(e))return r.BUFFER;const t=typeof e;return"string"===t?r.STRING:"number"===t?r.NUMBER:r.OBJECT}static isBuffer(e){return n&&Buffer.isBuffer(e)||e instanceof ArrayBuffer||e instanceof Uint8Array||this._isBufferView(e)}static _isBufferView(e){return"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer}}t.default=o},2934:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(7477));class o{constructor(e,t){this._context=e,this._deferredPromise=function(){let e,t;const n=new Promise(((n,r)=>{e=n,t=r}));return{resolve:e,reject:t,promise:n}}(),this.timeout=setTimeout((()=>this.error(new s.default("Request timeout.",this._context))),t)}get promise(){return this._deferredPromise.promise}response(e){this._deferredPromise.resolve(e)}error(e){this._deferredPromise.reject(e)}}t.default=class{constructor(e){this._context=e,this._requests=new Set}async send(e,t=45e3){const n=this._createRequest(t);try{return e(n),await n.promise}finally{this._finishRequest(n)}}errorAll(e){for(const t of this._requests)t.error(e)}waitForAllRequests(e=45e3){return this._waitForRequests(e)}_createRequest(e){const t=new o(this._context,e);return this._requests.add(t),t}_finishRequest(e){this._requests.delete(e),clearTimeout(e.timeout)}async _waitForRequests(e=5e3,t=0){return!this._requests.size||t>=e/500?Promise.resolve():(await new Promise((e=>{setTimeout(e,500)})),this._waitForRequests(e,t++))}}},1244:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.WEB_SOCKET_GATEWAY_STATES=void 0;const s=n(2790),o=r(n(5835)),i=n(4584),a=r(n(8944)),c=r(n(7861)),u=r(n(2587)),d=r(n(7477)),l=r(n(556)),p=n(9924),h=r(n(2934));var f,m;(m=f=t.WEB_SOCKET_GATEWAY_STATES||(t.WEB_SOCKET_GATEWAY_STATES={})).DISCONNECTED="disconnected",m.CONNECTING="connecting",m.CONNECTED="connected";class y extends((0,i.ObservableMixin)()){constructor(e,t,n={},r=s.io,i=c.default.get){if(super(),this._token=t,this._options=n,this._connectionProvider=r,this._userFactory=i,this._requestsManager=new h.default(this),this._channels=new Map,this._connectionAttempt=0,!e)throw new TypeError("Api address must be provided.");if(!this._token)throw new TypeError("Token must be provided.");this._options.requestTimeout||(this._options.requestTimeout=2e4),this._url=(0,o.default)(e.replace(/^(?!(?:\w+:)?\/\/)/,"https://")),this.set("state",f.DISCONNECTED),this.set("socketId",void 0),this.set("me",void 0),this.on("change:state",(async(e,t,n)=>{var r;if(this._debugEvent("ws-gw:change:state",n),n!==y.STATE_CONNECTED){if(n===y.STATE_DISCONNECTED)return this._requestsManager.errorAll(new d.default("Not connected.",this))}else try{this.me=await this._userFactory.call(c.default,this,null===(r=this._socketAuth)||void 0===r?void 0:r.userId)}catch(e){}}),{priority:y._CHANGE_STATE_EVENT_PRIORITY}),this.on("error",((e,t)=>{this._options.onError?this._options.onError(t):console.error(t)}))}get sessionId(){return this.socketId}waitForAllRequests(e){return this._requestsManager.waitForAllRequests(e)}disconnect(){var e;this.state!==f.DISCONNECTED&&(null===(e=this._socket)||void 0===e||e.disconnect(),this._socket=void 0,this.state=f.DISCONNECTED)}async reconnect(){this._socket||this.state!==f.DISCONNECTED||(await this._token.refreshToken(),await this._connect())}static async connect(e,t="local.cs.dev:443/ws-v2",n={},r=s.io,o=c.default.get){const i=new y(t,e,n,r,o);return await i._connect(),i}_sendRequest(e,t,n){if(!e)throw new d.default("`serviceName` must be provided.",this);if(this.state!==y.STATE_CONNECTED)throw new d.default("Not connected.",this);if(!this._socketAuth||!this._socketAuth.isAuthenticated)throw new d.default("Not authenticated.",this);const r=new ArrayBuffer(n.length+2),s=new Uint8Array(r);return s[0]=e,s[1]=parseInt(t),s.set(n,2),this._emit(1,s)}_getChannel(e,t){const n=""+e+t;return!this._channels.has(n)&&this._socket&&this._channels.set(n,new a.default(n,this,this._socket)),this._channels.get(n)}_connect(){return new Promise(((e,t)=>{const n=this._setupSocket();!this.socketId&&n.io.on("reconnect_error",(()=>{this._debugEvent("reconnect_error"),this._reconnectionAttemptError(t)})),n.once("connect",(async()=>{this._debugEvent("once-connect");try{await this._onConnect(),e()}catch(e){t(e)}})),n.connect()}))}_getPortByProtocol(e){return["http:","ws:"].includes(e)?80:443}_setupSocket(){var e;if(this._socket)return this._socket;const t=this._url.port||this._getPortByProtocol(this._url.protocol),n=(this._url.protocol||"https:")+"//"+this._url.hostname+":"+t,r=this._url.pathname.match(/^\/.*\/ws/)?this._url.pathname.split("/ws")[0]:"",s=this._connectionProvider(n,{parser:{Encoder:p.Encoder,Decoder:p.Decoder},path:r+"/ws-v2/ws",transports:["websocket"],timeout:void 0!==this._options.timeout?this._options.timeout:5e3,reconnection:void 0===this._options.autoReconnect||this._options.autoReconnect,reconnectionDelay:1e3,reconnectionDelayMax:5e3,rejectUnauthorized:void 0===this._options.rejectUnauthorized||this._options.rejectUnauthorized,query:{version:u.default},agent:null!==(e=this._options.agent)&&void 0!==e&&e,closeOnBeforeunload:!1});return this.state=f.CONNECTING,s.on("connect",(()=>{this._debugEvent("connect"),this.socketId=s.id})),s.on("connect_error",(e=>{this._debugEvent("connect_error",e)})),s.on("disconnect",(()=>{this._debugEvent("disconnect"),this._onDisconnect()})),s.io.on("reconnect",(async()=>{this._debugEvent("reconnect"),await this._onReconnect()})),s.io.on("reconnect_attempt",(e=>{this._debugEvent("reconnect_attempt",e),this.state=f.CONNECTING,this._connectionAttempt=e})),s.on("unauthorized",(e=>{this._debugEvent("unauthorized"),this._onUnauthorized(e)})),s.on("authenticationRequest",(async e=>{this._debugEvent("authenticationRequest",e.attempt),await this._onReconnect()})),this._socket=s,s}_emit(e,t){const n=this._socket;return this._requestsManager.send((r=>{n.emit(e,t,((e,t)=>{if(e)return r.error(l.default.fromPublicError(e));r.response(t)}))}),this._options.requestTimeout)}_addAuthData(e,t){this._socketAuth={environmentId:e,userId:t,isAuthenticated:!0}}_removeAuthData(){this._socketAuth=void 0}async _onConnect(){await this._authenticate(this._token.value),this.state=f.CONNECTED;const e=async(e,t,n)=>{this._debugEvent("token:value:change");try{await this._authenticate(n)}catch(e){}};this._token.on("change:value",e),this._socket.io.off("reconnect_error"),this.on("disconnect",(()=>{this._token.off("change:value",e)}))}async _onReconnect(){await this._token.refreshToken(),await this._onConnect()}_onDisconnect(){this.state=f.DISCONNECTED,this._connectionAttempt=0,this.fire("disconnect");for(const e of this._channels.values())e.remove();this._channels.clear(),void 0===this._options.autoReconnect||this._options.autoReconnect||(this._socket=void 0)}_debugEvent(e,t){if(!this._isDebugModeEnabled())return;const n=void 0!==t?", data: "+t:"";console.info((new Date).toLocaleString()+" "+e+n)}_reconnectionAttemptError(e){this._connectionAttempt>=2&&(this.disconnect(),e(d.default.fromPublicError({message:"The number of initial connection attempts exceeded.",explanation:"Three initial connection attempts failed. It can be caused by a slow, unstable, missing or blocked Internet connection.",action:"Please verify the stability of your Internet connection and ensure that no antivirus or firewall software blocks the Web Socket protocol connections."})))}_onUnauthorized({error:e}){this._removeAuthData(),this.fire("error",l.default.fromPublicError(e))}async _authenticate(e){try{this._debugEvent("authenticate:start");const t=await this._emit(2,{token:e});this._debugEvent("authenticate:success","envId: "+t.environmentId+", userId: "+t.userId),this._addAuthData(t.environmentId,t.userId)}catch(e){throw this._debugEvent("authenticate:error",e.message),this._removeAuthData(),e}}_isDebugModeEnabled(){var e;return!!i.global.window.localStorage&&"true"===(null!==(e=i.global.window.localStorage.getItem("csClientDebugMode"))&&void 0!==e?e:"false").toLowerCase()}}y.STATE_DISCONNECTED=f.DISCONNECTED,y.STATE_CONNECTING=f.CONNECTING,y.STATE_CONNECTED=f.CONNECTED,y._CHANGE_STATE_EVENT_PRIORITY=i.priorities.get("highest")+999999,t.default=y},9310:e=>{"use strict";e.exports=function(e,t){var n=new Array(arguments.length-1),r=0,s=2,o=!0;for(;s<arguments.length;)n[r++]=arguments[s++];return new Promise((function(s,i){n[r]=function(e){if(o)if(o=!1,e)i(e);else{for(var t=new Array(arguments.length-1),n=0;n<t.length;)t[n++]=arguments[n];s.apply(null,t)}};try{e.apply(t||null,n)}catch(e){o&&(o=!1,i(e))}}))}},6662:(e,t)=>{"use strict";var n=t;n.length=function(e){var t=e.length;if(!t)return 0;for(var n=0;--t%4>1&&"="===e.charAt(t);)++n;return Math.ceil(3*e.length)/4-n};for(var r=new Array(64),s=new Array(123),o=0;o<64;)s[r[o]=o<26?o+65:o<52?o+71:o<62?o-4:o-59|43]=o++;n.encode=function(e,t,n){for(var s,o=null,i=[],a=0,c=0;t<n;){var u=e[t++];switch(c){case 0:i[a++]=r[u>>2],s=(3&u)<<4,c=1;break;case 1:i[a++]=r[s|u>>4],s=(15&u)<<2,c=2;break;case 2:i[a++]=r[s|u>>6],i[a++]=r[63&u],c=0}a>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,i)),a=0)}return c&&(i[a++]=r[s],i[a++]=61,1===c&&(i[a++]=61)),o?(a&&o.push(String.fromCharCode.apply(String,i.slice(0,a))),o.join("")):String.fromCharCode.apply(String,i.slice(0,a))};var i="invalid encoding";n.decode=function(e,t,n){for(var r,o=n,a=0,c=0;c<e.length;){var u=e.charCodeAt(c++);if(61===u&&a>1)break;if(void 0===(u=s[u]))throw Error(i);switch(a){case 0:r=u,a=1;break;case 1:t[n++]=r<<2|(48&u)>>4,r=u,a=2;break;case 2:t[n++]=(15&r)<<4|(60&u)>>2,r=u,a=3;break;case 3:t[n++]=(3&r)<<6|u,a=0}}if(1===a)throw Error(i);return n-o},n.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}},5707:e=>{"use strict";function t(){this._listeners={}}e.exports=t,t.prototype.on=function(e,t,n){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:t,ctx:n||this}),this},t.prototype.off=function(e,t){if(void 0===e)this._listeners={};else if(void 0===t)this._listeners[e]=[];else for(var n=this._listeners[e],r=0;r<n.length;)n[r].fn===t?n.splice(r,1):++r;return this},t.prototype.emit=function(e){var t=this._listeners[e];if(t){for(var n=[],r=1;r<arguments.length;)n.push(arguments[r++]);for(r=0;r<t.length;)t[r].fn.apply(t[r++].ctx,n)}return this}},9365:e=>{"use strict";function t(e){return"undefined"!=typeof Float32Array?function(){var t=new Float32Array([-0]),n=new Uint8Array(t.buffer),r=128===n[3];function s(e,r,s){t[0]=e,r[s]=n[0],r[s+1]=n[1],r[s+2]=n[2],r[s+3]=n[3]}function o(e,r,s){t[0]=e,r[s]=n[3],r[s+1]=n[2],r[s+2]=n[1],r[s+3]=n[0]}function i(e,r){return n[0]=e[r],n[1]=e[r+1],n[2]=e[r+2],n[3]=e[r+3],t[0]}function a(e,r){return n[3]=e[r],n[2]=e[r+1],n[1]=e[r+2],n[0]=e[r+3],t[0]}e.writeFloatLE=r?s:o,e.writeFloatBE=r?o:s,e.readFloatLE=r?i:a,e.readFloatBE=r?a:i}():function(){function t(e,t,n,r){var s=t<0?1:0;if(s&&(t=-t),0===t)e(1/t>0?0:2147483648,n,r);else if(isNaN(t))e(2143289344,n,r);else if(t>34028234663852886e22)e((s<<31|2139095040)>>>0,n,r);else if(t<11754943508222875e-54)e((s<<31|Math.round(t/1401298464324817e-60))>>>0,n,r);else{var o=Math.floor(Math.log(t)/Math.LN2);e((s<<31|o+127<<23|8388607&Math.round(t*Math.pow(2,-o)*8388608))>>>0,n,r)}}function i(e,t,n){var r=e(t,n),s=2*(r>>31)+1,o=r>>>23&255,i=8388607&r;return 255===o?i?NaN:s*(1/0):0===o?1401298464324817e-60*s*i:s*Math.pow(2,o-150)*(i+8388608)}e.writeFloatLE=t.bind(null,n),e.writeFloatBE=t.bind(null,r),e.readFloatLE=i.bind(null,s),e.readFloatBE=i.bind(null,o)}(),"undefined"!=typeof Float64Array?function(){var t=new Float64Array([-0]),n=new Uint8Array(t.buffer),r=128===n[7];function s(e,r,s){t[0]=e,r[s]=n[0],r[s+1]=n[1],r[s+2]=n[2],r[s+3]=n[3],r[s+4]=n[4],r[s+5]=n[5],r[s+6]=n[6],r[s+7]=n[7]}function o(e,r,s){t[0]=e,r[s]=n[7],r[s+1]=n[6],r[s+2]=n[5],r[s+3]=n[4],r[s+4]=n[3],r[s+5]=n[2],r[s+6]=n[1],r[s+7]=n[0]}function i(e,r){return n[0]=e[r],n[1]=e[r+1],n[2]=e[r+2],n[3]=e[r+3],n[4]=e[r+4],n[5]=e[r+5],n[6]=e[r+6],n[7]=e[r+7],t[0]}function a(e,r){return n[7]=e[r],n[6]=e[r+1],n[5]=e[r+2],n[4]=e[r+3],n[3]=e[r+4],n[2]=e[r+5],n[1]=e[r+6],n[0]=e[r+7],t[0]}e.writeDoubleLE=r?s:o,e.writeDoubleBE=r?o:s,e.readDoubleLE=r?i:a,e.readDoubleBE=r?a:i}():function(){function t(e,t,n,r,s,o){var i=r<0?1:0;if(i&&(r=-r),0===r)e(0,s,o+t),e(1/r>0?0:2147483648,s,o+n);else if(isNaN(r))e(0,s,o+t),e(2146959360,s,o+n);else if(r>17976931348623157e292)e(0,s,o+t),e((i<<31|2146435072)>>>0,s,o+n);else{var a;if(r<22250738585072014e-324)e((a=r/5e-324)>>>0,s,o+t),e((i<<31|a/4294967296)>>>0,s,o+n);else{var c=Math.floor(Math.log(r)/Math.LN2);1024===c&&(c=1023),e(4503599627370496*(a=r*Math.pow(2,-c))>>>0,s,o+t),e((i<<31|c+1023<<20|1048576*a&1048575)>>>0,s,o+n)}}}function i(e,t,n,r,s){var o=e(r,s+t),i=e(r,s+n),a=2*(i>>31)+1,c=i>>>20&2047,u=4294967296*(1048575&i)+o;return 2047===c?u?NaN:a*(1/0):0===c?5e-324*a*u:a*Math.pow(2,c-1075)*(u+4503599627370496)}e.writeDoubleLE=t.bind(null,n,0,4),e.writeDoubleBE=t.bind(null,r,4,0),e.readDoubleLE=i.bind(null,s,0,4),e.readDoubleBE=i.bind(null,o,4,0)}(),e}function n(e,t,n){t[n]=255&e,t[n+1]=e>>>8&255,t[n+2]=e>>>16&255,t[n+3]=e>>>24}function r(e,t,n){t[n]=e>>>24,t[n+1]=e>>>16&255,t[n+2]=e>>>8&255,t[n+3]=255&e}function s(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}function o(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}e.exports=t(t)},230:module=>{"use strict";function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}module.exports=inquire},319:e=>{"use strict";e.exports=function(e,t,n){var r=n||8192,s=r>>>1,o=null,i=r;return function(n){if(n<1||n>s)return e(n);i+n>r&&(o=e(r),i=0);var a=t.call(o,i,i+=n);return 7&i&&(i=1+(7|i)),a}}},1742:(e,t)=>{"use strict";var n=t;n.length=function(e){for(var t=0,n=0,r=0;r<e.length;++r)(n=e.charCodeAt(r))<128?t+=1:n<2048?t+=2:55296==(64512&n)&&56320==(64512&e.charCodeAt(r+1))?(++r,t+=4):t+=3;return t},n.read=function(e,t,n){if(n-t<1)return"";for(var r,s=null,o=[],i=0;t<n;)(r=e[t++])<128?o[i++]=r:r>191&&r<224?o[i++]=(31&r)<<6|63&e[t++]:r>239&&r<365?(r=((7&r)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,o[i++]=55296+(r>>10),o[i++]=56320+(1023&r)):o[i++]=(15&r)<<12|(63&e[t++])<<6|63&e[t++],i>8191&&((s||(s=[])).push(String.fromCharCode.apply(String,o)),i=0);return s?(i&&s.push(String.fromCharCode.apply(String,o.slice(0,i))),s.join("")):String.fromCharCode.apply(String,o.slice(0,i))},n.write=function(e,t,n){for(var r,s,o=n,i=0;i<e.length;++i)(r=e.charCodeAt(i))<128?t[n++]=r:r<2048?(t[n++]=r>>6|192,t[n++]=63&r|128):55296==(64512&r)&&56320==(64512&(s=e.charCodeAt(i+1)))?(r=65536+((1023&r)<<10)+(1023&s),++i,t[n++]=r>>18|240,t[n++]=r>>12&63|128,t[n++]=r>>6&63|128,t[n++]=63&r|128):(t[n++]=r>>12|224,t[n++]=r>>6&63|128,t[n++]=63&r|128);return n-o}},4106:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(8433),s=n.n(r)()((function(e){return e[1]}));s.push([e.id,".ck.ck-balloon-panel.ck-tooltip{pointer-events:none;z-index:calc(var(--ck-z-dialog) + 100)}:root{--ck-color-presence-list-dropdown-background:#fff;--ck-color-presence-list-dropdown-arrow-border:#ebebeb;--ck-presence-list-dropdown-list-max-width:250px;--ck-presence-list-dropdown-list-min-width:180px;--ck-presence-list-users-tooltip-max-width:120px;--ck-presence-list-users-tooltip-min-width:25px}.ck.ck-presence-list{align-items:center;display:flex;font-size:var(--ck-font-size-base);margin-right:var(--ck-spacing-standard);transition:margin-right .2s ease-in-out}.ck.ck-presence-list *{box-sizing:border-box}.ck.ck-presence-list__list{display:flex;justify-content:flex-end}.ck.ck-presence-list__counter{color:var(--ck-color-base-text);margin-right:var(--ck-spacing-large)}.ck.ck-presence-list__counter--hidden{display:none}.ck.ck-presence-list__list-item{background:none;border:0;color:inherit;font:inherit;margin-left:var(--ck-spacing-standard);outline:none;padding:0;position:relative}.ck.ck-presence-list__list-item:last-child{margin-left:0;order:-1}.ck.ck-tooltip.ck-presence-list__list-item__tooltip>.ck-tooltip__text{display:inline-block;max-width:var(--ck-presence-list-users-tooltip-max-width);overflow:hidden;text-align:center;text-overflow:ellipsis;white-space:nowrap}.ck.ck-presence-list__marker{display:block;height:3px;margin-top:3px;position:relative;width:100%}.ck-presence-list__balloon button.ck-presence-list__dropdown-list-item *,.ck-presence-list__list button.ck-presence-list__list-item *{cursor:pointer}.ck.ck-presence-list--collapsed .ck-presence-list__list{min-width:calc(var(--ck-user-avatar-size)*2)}.ck.ck-presence-list--collapsed .ck-presence-list__list *{cursor:pointer;transition:all .4s ease-in-out}.ck.ck-presence-list--collapsed .ck.ck-presence-list__list-item{margin-left:calc(var(--ck-user-avatar-size)*-1 + 7px)}.ck.ck-presence-list--collapsed .ck.ck-presence-list__list-item:last-child{order:unset}.ck.ck-presence-list--collapsed .ck.ck-presence-list__list-item:nth-last-child(2){opacity:.75}.ck.ck-presence-list--collapsed .ck.ck-presence-list__list-item:nth-last-child(3){opacity:.55}.ck.ck-presence-list--collapsed .ck.ck-presence-list__list-item:nth-last-child(4){opacity:.35}.ck.ck-presence-list--collapsed .ck.ck-presence-list__list-item:nth-last-child(5){opacity:.15}.ck.ck-presence-list--collapsed .ck.ck-presence-list__list-item:nth-last-child(n+6){display:none}.ck.ck-presence-list__balloon{--ck-color-panel-border:var(--ck-color-presence-list-dropdown-arrow-border);--ck-color-panel-background:var(--ck-color-presence-list-dropdown-background);animation:fadeIn .3s ease-in-out;background-color:var(--ck-color-presence-list-dropdown-background);border:0;opacity:1}.ck.ck-presence-list__balloon .ck.ck-presence-list__dropdown-list-wrapper{border-radius:var(--ck-border-radius);max-height:80vh;max-width:var(--ck-presence-list-dropdown-list-max-width);min-width:var(--ck-presence-list-dropdown-list-min-width);overflow-x:hidden;overflow-y:auto}.ck.ck-presence-list__balloon .ck.ck-presence-list__dropdown-list-item{align-items:center;background:none;border:0;color:inherit;display:flex;font:inherit;outline:none;padding:var(--ck-spacing-standard);position:relative}.ck.ck-presence-list__balloon .ck.ck-presence-list__dropdown-list-item:first-of-type .ck-presence-list__marker{border-top-left-radius:var(--ck-border-radius)}.ck.ck-presence-list__balloon .ck.ck-presence-list__dropdown-list-item:last-of-type .ck-presence-list__marker{border-bottom-left-radius:var(--ck-border-radius)}.ck.ck-presence-list__balloon .ck.ck-presence-list__dropdown-list .ck-user__full-name{color:var(--ck-color-base-text);margin-left:var(--ck-spacing-standard);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ck.ck-presence-list__balloon .ck.ck-presence-list__dropdown-list .ck.ck-presence-list__marker{height:100%;left:0;margin:0;position:absolute;width:3px}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}",""]);const o=s},7535:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(8433),s=n.n(r)()((function(e){return e[1]}));s.push([e.id,".ck .ck-user__marker-dot{border-radius:50%;cursor:default;display:block;height:var(--ck-user-dot-size);left:50%;position:absolute;top:calc((var(--ck-user-dot-size)/2)*-1);transform:translate(-50%,-50%);width:var(--ck-user-dot-size)}.ck .ck-user__marker{cursor:default;display:inline;position:relative}.ck .ck-user__marker:after{color:#fff;content:attr(data-name);display:none;font-family:Georgia,sans-serif;font-size:var(--ck-font-size-base);font-style:normal;font-weight:400;left:0;line-height:1;opacity:0;padding:var(--ck-spacing-small);position:absolute;top:-20px;transition:opacity .2s linear,transform .3s ease-in-out;white-space:nowrap;z-index:99999}.ck .ck-user__marker:hover .ck-user__marker-dot{width:0}.ck .ck-user__marker:hover:after{animation:fadeInLeft .3s ease-in-out;display:block;opacity:1}.ck .ck-user__marker-line{bottom:0;height:100%;position:absolute;width:0}.ck .ck-placeholder .ck-user__marker{display:none}@keyframes fadeInLeft{0%{opacity:0;transform:translateX(-10px)}to{opacity:1;transform:translateX(0)}}",""]);const o=s},8433:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=e(t);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var s={};if(r)for(var o=0;o<this.length;o++){var i=this[o][0];null!=i&&(s[i]=!0)}for(var a=0;a<e.length;a++){var c=[].concat(e[a]);r&&s[c[0]]||(n&&(c[2]?c[2]="".concat(n," and ").concat(c[2]):c[2]=n),t.push(c))}},t}},9651:e=>{var t=1e3,n=60*t,r=60*n,s=24*r,o=7*s,i=365.25*s;function a(e,t,n,r){var s=t>=1.5*n;return Math.round(e/n)+" "+r+(s?"s":"")}e.exports=function(e,c){c=c||{};var u=typeof e;if("string"===u&&e.length>0)return function(e){if((e=String(e)).length>100)return;var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!a)return;var c=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return c*i;case"weeks":case"week":case"w":return c*o;case"days":case"day":case"d":return c*s;case"hours":case"hour":case"hrs":case"hr":case"h":return c*r;case"minutes":case"minute":case"mins":case"min":case"m":return c*n;case"seconds":case"second":case"secs":case"sec":case"s":return c*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}(e);if("number"===u&&isFinite(e))return c.long?function(e){var o=Math.abs(e);if(o>=s)return a(e,o,s,"day");if(o>=r)return a(e,o,r,"hour");if(o>=n)return a(e,o,n,"minute");if(o>=t)return a(e,o,t,"second");return e+" ms"}(e):function(e){var o=Math.abs(e);if(o>=s)return Math.round(e/s)+"d";if(o>=r)return Math.round(e/r)+"h";if(o>=n)return Math.round(e/n)+"m";if(o>=t)return Math.round(e/t)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},3502:(e,t,n)=>{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,s=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(s=r))})),t.splice(s,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n(4049)(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},4049:(e,t,n)=>{e.exports=function(e){function t(e){let n,s,o,i=null;function a(...e){if(!a.enabled)return;const r=a,s=Number(new Date),o=s-(n||s);r.diff=o,r.prev=n,r.curr=s,n=s,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let i=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,s)=>{if("%%"===n)return"%";i++;const o=t.formatters[s];if("function"==typeof o){const t=e[i];n=o.call(r,t),e.splice(i,1),i--}return n})),t.formatArgs.call(r,e);(r.log||t.log).apply(r,e)}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=r,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==i?i:(s!==t.namespaces&&(s=t.namespaces,o=t.enabled(e)),o),set:e=>{i=e}}),"function"==typeof t.init&&t.init(a),a}function r(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function s(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(s),...t.skips.map(s).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),s=r.length;for(n=0;n<s;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(9651),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},1199:(e,t,n)=>{"use strict";e.exports=n(995)},995:(e,t,n)=>{"use strict";var r=t;function s(){r.util._configure(),r.Writer._configure(r.BufferWriter),r.Reader._configure(r.BufferReader)}r.build="minimal",r.Writer=n(4006),r.BufferWriter=n(5623),r.Reader=n(1366),r.BufferReader=n(5895),r.util=n(9737),r.rpc=n(5178),r.roots=n(4156),r.configure=s,s()},1366:(e,t,n)=>{"use strict";e.exports=c;var r,s=n(9737),o=s.LongBits,i=s.utf8;function a(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function c(e){this.buf=e,this.pos=0,this.len=e.length}var u,d="undefined"!=typeof Uint8Array?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new c(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new c(e);throw Error("illegal buffer")},l=function(){return s.Buffer?function(e){return(c.create=function(e){return s.Buffer.isBuffer(e)?new r(e):d(e)})(e)}:d};function p(){var e=new o(0,0),t=0;if(!(this.len-this.pos>4)){for(;t<3;++t){if(this.pos>=this.len)throw a(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(127&this.buf[this.pos++])<<7*t)>>>0,e}for(;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e;if(t=0,this.len-this.pos>4){for(;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw a(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function h(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function f(){if(this.pos+8>this.len)throw a(this,8);return new o(h(this.buf,this.pos+=4),h(this.buf,this.pos+=4))}c.create=l(),c.prototype._slice=s.Array.prototype.subarray||s.Array.prototype.slice,c.prototype.uint32=(u=4294967295,function(){if(u=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return u;if((this.pos+=5)>this.len)throw this.pos=this.len,a(this,10);return u}),c.prototype.int32=function(){return 0|this.uint32()},c.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)|0},c.prototype.bool=function(){return 0!==this.uint32()},c.prototype.fixed32=function(){if(this.pos+4>this.len)throw a(this,4);return h(this.buf,this.pos+=4)},c.prototype.sfixed32=function(){if(this.pos+4>this.len)throw a(this,4);return 0|h(this.buf,this.pos+=4)},c.prototype.float=function(){if(this.pos+4>this.len)throw a(this,4);var e=s.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},c.prototype.double=function(){if(this.pos+8>this.len)throw a(this,4);var e=s.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},c.prototype.bytes=function(){var e=this.uint32(),t=this.pos,n=this.pos+e;if(n>this.len)throw a(this,e);return this.pos+=e,Array.isArray(this.buf)?this.buf.slice(t,n):t===n?new this.buf.constructor(0):this._slice.call(this.buf,t,n)},c.prototype.string=function(){var e=this.bytes();return i.read(e,0,e.length)},c.prototype.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw a(this,e);this.pos+=e}else do{if(this.pos>=this.len)throw a(this)}while(128&this.buf[this.pos++]);return this},c.prototype.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(e=7&this.uint32());)this.skipType(e);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},c._configure=function(e){r=e,c.create=l(),r._configure();var t=s.Long?"toLong":"toNumber";s.merge(c.prototype,{int64:function(){return p.call(this)[t](!1)},uint64:function(){return p.call(this)[t](!0)},sint64:function(){return p.call(this).zzDecode()[t](!1)},fixed64:function(){return f.call(this)[t](!0)},sfixed64:function(){return f.call(this)[t](!1)}})}},5895:(e,t,n)=>{"use strict";e.exports=o;var r=n(1366);(o.prototype=Object.create(r.prototype)).constructor=o;var s=n(9737);function o(e){r.call(this,e)}o._configure=function(){s.Buffer&&(o.prototype._slice=s.Buffer.prototype.slice)},o.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+e,this.len))},o._configure()},4156:e=>{"use strict";e.exports={}},5178:(e,t,n)=>{"use strict";t.Service=n(1418)},1418:(e,t,n)=>{"use strict";e.exports=s;var r=n(9737);function s(e,t,n){if("function"!=typeof e)throw TypeError("rpcImpl must be a function");r.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=Boolean(t),this.responseDelimited=Boolean(n)}(s.prototype=Object.create(r.EventEmitter.prototype)).constructor=s,s.prototype.rpcCall=function e(t,n,s,o,i){if(!o)throw TypeError("request must be specified");var a=this;if(!i)return r.asPromise(e,a,t,n,s,o);if(a.rpcImpl)try{return a.rpcImpl(t,n[a.requestDelimited?"encodeDelimited":"encode"](o).finish(),(function(e,n){if(e)return a.emit("error",e,t),i(e);if(null!==n){if(!(n instanceof s))try{n=s[a.responseDelimited?"decodeDelimited":"decode"](n)}catch(e){return a.emit("error",e,t),i(e)}return a.emit("data",n,t),i(null,n)}a.end(!0)}))}catch(e){return a.emit("error",e,t),void setTimeout((function(){i(e)}),0)}else setTimeout((function(){i(Error("already ended"))}),0)},s.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},2130:(e,t,n)=>{"use strict";e.exports=s;var r=n(9737);function s(e,t){this.lo=e>>>0,this.hi=t>>>0}var o=s.zero=new s(0,0);o.toNumber=function(){return 0},o.zzEncode=o.zzDecode=function(){return this},o.length=function(){return 1};var i=s.zeroHash="\0\0\0\0\0\0\0\0";s.fromNumber=function(e){if(0===e)return o;var t=e<0;t&&(e=-e);var n=e>>>0,r=(e-n)/4294967296>>>0;return t&&(r=~r>>>0,n=~n>>>0,++n>4294967295&&(n=0,++r>4294967295&&(r=0))),new s(n,r)},s.from=function(e){if("number"==typeof e)return s.fromNumber(e);if(r.isString(e)){if(!r.Long)return s.fromNumber(parseInt(e,10));e=r.Long.fromString(e)}return e.low||e.high?new s(e.low>>>0,e.high>>>0):o},s.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=1+~this.lo>>>0,n=~this.hi>>>0;return t||(n=n+1>>>0),-(t+4294967296*n)}return this.lo+4294967296*this.hi},s.prototype.toLong=function(e){return r.Long?new r.Long(0|this.lo,0|this.hi,Boolean(e)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(e)}};var a=String.prototype.charCodeAt;s.fromHash=function(e){return e===i?o:new s((a.call(e,0)|a.call(e,1)<<8|a.call(e,2)<<16|a.call(e,3)<<24)>>>0,(a.call(e,4)|a.call(e,5)<<8|a.call(e,6)<<16|a.call(e,7)<<24)>>>0)},s.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},s.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},s.prototype.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},s.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,n=this.hi>>>24;return 0===n?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:n<128?9:10}},9737:function(e,t,n){"use strict";var r=t;function s(e,t,n){for(var r=Object.keys(t),s=0;s<r.length;++s)void 0!==e[r[s]]&&n||(e[r[s]]=t[r[s]]);return e}function o(e){function t(e,n){if(!(this instanceof t))return new t(e,n);Object.defineProperty(this,"message",{get:function(){return e}}),Error.captureStackTrace?Error.captureStackTrace(this,t):Object.defineProperty(this,"stack",{value:(new Error).stack||""}),n&&s(this,n)}return t.prototype=Object.create(Error.prototype,{constructor:{value:t,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return e},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),t}r.asPromise=n(9310),r.base64=n(6662),r.EventEmitter=n(5707),r.float=n(9365),r.inquire=n(230),r.utf8=n(1742),r.pool=n(319),r.LongBits=n(2130),r.isNode=Boolean(void 0!==n.g&&n.g&&n.g.process&&n.g.process.versions&&n.g.process.versions.node),r.global=r.isNode&&n.g||"undefined"!=typeof window&&window||"undefined"!=typeof self&&self||this,r.emptyArray=Object.freeze?Object.freeze([]):[],r.emptyObject=Object.freeze?Object.freeze({}):{},r.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},r.isString=function(e){return"string"==typeof e||e instanceof String},r.isObject=function(e){return e&&"object"==typeof e},r.isset=r.isSet=function(e,t){var n=e[t];return!(null==n||!e.hasOwnProperty(t))&&("object"!=typeof n||(Array.isArray(n)?n.length:Object.keys(n).length)>0)},r.Buffer=function(){try{var e=r.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch(e){return null}}(),r._Buffer_from=null,r._Buffer_allocUnsafe=null,r.newBuffer=function(e){return"number"==typeof e?r.Buffer?r._Buffer_allocUnsafe(e):new r.Array(e):r.Buffer?r._Buffer_from(e):"undefined"==typeof Uint8Array?e:new Uint8Array(e)},r.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,r.Long=r.global.dcodeIO&&r.global.dcodeIO.Long||r.global.Long||r.inquire("long"),r.key2Re=/^true|false|0|1$/,r.key32Re=/^-?(?:0|[1-9][0-9]*)$/,r.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,r.longToHash=function(e){return e?r.LongBits.from(e).toHash():r.LongBits.zeroHash},r.longFromHash=function(e,t){var n=r.LongBits.fromHash(e);return r.Long?r.Long.fromBits(n.lo,n.hi,t):n.toNumber(Boolean(t))},r.merge=s,r.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},r.newError=o,r.ProtocolError=o("ProtocolError"),r.oneOfGetter=function(e){for(var t={},n=0;n<e.length;++n)t[e[n]]=1;return function(){for(var e=Object.keys(this),n=e.length-1;n>-1;--n)if(1===t[e[n]]&&void 0!==this[e[n]]&&null!==this[e[n]])return e[n]}},r.oneOfSetter=function(e){return function(t){for(var n=0;n<e.length;++n)e[n]!==t&&delete this[e[n]]}},r.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},r._configure=function(){var e=r.Buffer;e?(r._Buffer_from=e.from!==Uint8Array.from&&e.from||function(t,n){return new e(t,n)},r._Buffer_allocUnsafe=e.allocUnsafe||function(t){return new e(t)}):r._Buffer_from=r._Buffer_allocUnsafe=null}},4006:(e,t,n)=>{"use strict";e.exports=l;var r,s=n(9737),o=s.LongBits,i=s.base64,a=s.utf8;function c(e,t,n){this.fn=e,this.len=t,this.next=void 0,this.val=n}function u(){}function d(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function l(){this.len=0,this.head=new c(u,0,0),this.tail=this.head,this.states=null}var p=function(){return s.Buffer?function(){return(l.create=function(){return new r})()}:function(){return new l}};function h(e,t,n){t[n]=255&e}function f(e,t){this.len=e,this.next=void 0,this.val=t}function m(e,t,n){for(;e.hi;)t[n++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[n++]=127&e.lo|128,e.lo=e.lo>>>7;t[n++]=e.lo}function y(e,t,n){t[n]=255&e,t[n+1]=e>>>8&255,t[n+2]=e>>>16&255,t[n+3]=e>>>24}l.create=p(),l.alloc=function(e){return new s.Array(e)},s.Array!==Array&&(l.alloc=s.pool(l.alloc,s.Array.prototype.subarray)),l.prototype._push=function(e,t,n){return this.tail=this.tail.next=new c(e,t,n),this.len+=t,this},f.prototype=Object.create(c.prototype),f.prototype.fn=function(e,t,n){for(;e>127;)t[n++]=127&e|128,e>>>=7;t[n]=e},l.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new f((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},l.prototype.int32=function(e){return e<0?this._push(m,10,o.fromNumber(e)):this.uint32(e)},l.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},l.prototype.uint64=function(e){var t=o.from(e);return this._push(m,t.length(),t)},l.prototype.int64=l.prototype.uint64,l.prototype.sint64=function(e){var t=o.from(e).zzEncode();return this._push(m,t.length(),t)},l.prototype.bool=function(e){return this._push(h,1,e?1:0)},l.prototype.fixed32=function(e){return this._push(y,4,e>>>0)},l.prototype.sfixed32=l.prototype.fixed32,l.prototype.fixed64=function(e){var t=o.from(e);return this._push(y,4,t.lo)._push(y,4,t.hi)},l.prototype.sfixed64=l.prototype.fixed64,l.prototype.float=function(e){return this._push(s.float.writeFloatLE,4,e)},l.prototype.double=function(e){return this._push(s.float.writeDoubleLE,8,e)};var g=s.Array.prototype.set?function(e,t,n){t.set(e,n)}:function(e,t,n){for(var r=0;r<e.length;++r)t[n+r]=e[r]};l.prototype.bytes=function(e){var t=e.length>>>0;if(!t)return this._push(h,1,0);if(s.isString(e)){var n=l.alloc(t=i.length(e));i.decode(e,n,0),e=n}return this.uint32(t)._push(g,t,e)},l.prototype.string=function(e){var t=a.length(e);return t?this.uint32(t)._push(a.write,t,e):this._push(h,1,0)},l.prototype.fork=function(){return this.states=new d(this),this.head=this.tail=new c(u,0,0),this.len=0,this},l.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new c(u,0,0),this.len=0),this},l.prototype.ldelim=function(){var e=this.head,t=this.tail,n=this.len;return this.reset().uint32(n),n&&(this.tail.next=e.next,this.tail=t,this.len+=n),this},l.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),n=0;e;)e.fn(e.val,t,n),n+=e.len,e=e.next;return t},l._configure=function(e){r=e,l.create=p(),r._configure()}},5623:(e,t,n)=>{"use strict";e.exports=o;var r=n(4006);(o.prototype=Object.create(r.prototype)).constructor=o;var s=n(9737);function o(){r.call(this)}function i(e,t,n){e.length<40?s.utf8.write(e,t,n):t.utf8Write?t.utf8Write(e,n):t.write(e,n)}o._configure=function(){o.alloc=s._Buffer_allocUnsafe,o.writeBytesBuffer=s.Buffer&&s.Buffer.prototype instanceof Uint8Array&&"set"===s.Buffer.prototype.set.name?function(e,t,n){t.set(e,n)}:function(e,t,n){if(e.copy)e.copy(t,n,0,e.length);else for(var r=0;r<e.length;)t[n++]=e[r++]}},o.prototype.bytes=function(e){s.isString(e)&&(e=s._Buffer_from(e,"base64"));var t=e.length>>>0;return this.uint32(t),t&&this._push(o.writeBytesBuffer,t,e),this},o.prototype.string=function(e){var t=s.Buffer.byteLength(e);return this.uint32(t),t&&this._push(i,t,e),this},o._configure()},6553:(e,t)=>{"use strict";var n=Object.prototype.hasOwnProperty;function r(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(e){return null}}function s(e){try{return encodeURIComponent(e)}catch(e){return null}}t.stringify=function(e,t){t=t||"";var r,o,i=[];for(o in"string"!=typeof t&&(t="?"),e)if(n.call(e,o)){if((r=e[o])||null!=r&&!isNaN(r)||(r=""),o=s(o),r=s(r),null===o||null===r)continue;i.push(o+"="+r)}return i.length?t+i.join("&"):""},t.parse=function(e){for(var t,n=/([^=?#&]+)=?([^&]*)/g,s={};t=n.exec(e);){var o=r(t[1]),i=r(t[2]);null===o||null===i||o in s||(s[o]=i)}return s}},8696:e=>{"use strict";e.exports=function(e,t){if(t=t.split(":")[0],!(e=+e))return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e}},4673:(e,t,n)=>{"use strict";var r,s=function(){return void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r},o=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),i=[];function a(e){for(var t=-1,n=0;n<i.length;n++)if(i[n].identifier===e){t=n;break}return t}function c(e,t){for(var n={},r=[],s=0;s<e.length;s++){var o=e[s],c=t.base?o[0]+t.base:o[0],u=n[c]||0,d="".concat(c," ").concat(u);n[c]=u+1;var l=a(d),p={css:o[1],media:o[2],sourceMap:o[3]};-1!==l?(i[l].references++,i[l].updater(p)):i.push({identifier:d,updater:y(p,t),references:1}),r.push(d)}return r}function u(e){var t=document.createElement("style"),r=e.attributes||{};if(void 0===r.nonce){var s=n.nc;s&&(r.nonce=s)}if(Object.keys(r).forEach((function(e){t.setAttribute(e,r[e])})),"function"==typeof e.insert)e.insert(t);else{var i=o(e.insert||"head");if(!i)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");i.appendChild(t)}return t}var d,l=(d=[],function(e,t){return d[e]=t,d.filter(Boolean).join("\n")});function p(e,t,n,r){var s=n?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;if(e.styleSheet)e.styleSheet.cssText=l(t,s);else{var o=document.createTextNode(s),i=e.childNodes;i[t]&&e.removeChild(i[t]),i.length?e.insertBefore(o,i[t]):e.appendChild(o)}}function h(e,t,n){var r=n.css,s=n.media,o=n.sourceMap;if(s?e.setAttribute("media",s):e.removeAttribute("media"),o&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}var f=null,m=0;function y(e,t){var n,r,s;if(t.singleton){var o=m++;n=f||(f=u(t)),r=p.bind(null,n,o,!1),s=p.bind(null,n,o,!0)}else n=u(t),r=h.bind(null,n,t),s=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else s()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=s());var n=c(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var r=0;r<n.length;r++){var s=a(n[r]);i[s].references--}for(var o=c(e,t),u=0;u<n.length;u++){var d=a(n[u]);0===i[d].references&&(i[d].updater(),i.splice(d,1))}n=o}}}},5835:(e,t,n)=>{"use strict";var r=n(8696),s=n(6553),o=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,i=/[\n\r\t]/g,a=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,c=/:\d+$/,u=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,d=/^[a-zA-Z]:/;function l(e){return(e||"").toString().replace(o,"")}var p=[["#","hash"],["?","query"],function(e,t){return m(t.protocol)?e.replace(/\\/g,"/"):e},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],h={hash:1,query:1};function f(e){var t,r=("undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{}).location||{},s={},o=typeof(e=e||r);if("blob:"===e.protocol)s=new g(unescape(e.pathname),{});else if("string"===o)for(t in s=new g(e,{}),h)delete s[t];else if("object"===o){for(t in e)t in h||(s[t]=e[t]);void 0===s.slashes&&(s.slashes=a.test(e.href))}return s}function m(e){return"file:"===e||"ftp:"===e||"http:"===e||"https:"===e||"ws:"===e||"wss:"===e}function y(e,t){e=(e=l(e)).replace(i,""),t=t||{};var n,r=u.exec(e),s=r[1]?r[1].toLowerCase():"",o=!!r[2],a=!!r[3],c=0;return o?a?(n=r[2]+r[3]+r[4],c=r[2].length+r[3].length):(n=r[2]+r[4],c=r[2].length):a?(n=r[3]+r[4],c=r[3].length):n=r[4],"file:"===s?c>=2&&(n=n.slice(2)):m(s)?n=r[4]:s?o&&(n=n.slice(2)):c>=2&&m(t.protocol)&&(n=r[4]),{protocol:s,slashes:o||m(s),slashesCount:c,rest:n}}function g(e,t,n){if(e=(e=l(e)).replace(i,""),!(this instanceof g))return new g(e,t,n);var o,a,c,u,h,b,O=p.slice(),v=typeof t,w=this,I=0;for("object"!==v&&"string"!==v&&(n=t,t=null),n&&"function"!=typeof n&&(n=s.parse),o=!(a=y(e||"",t=f(t))).protocol&&!a.slashes,w.slashes=a.slashes||o&&t.slashes,w.protocol=a.protocol||t.protocol||"",e=a.rest,("file:"===a.protocol&&(2!==a.slashesCount||d.test(e))||!a.slashes&&(a.protocol||a.slashesCount<2||!m(w.protocol)))&&(O[3]=[/(.*)/,"pathname"]);I<O.length;I++)"function"!=typeof(u=O[I])?(c=u[0],b=u[1],c!=c?w[b]=e:"string"==typeof c?~(h="@"===c?e.lastIndexOf(c):e.indexOf(c))&&("number"==typeof u[2]?(w[b]=e.slice(0,h),e=e.slice(h+u[2])):(w[b]=e.slice(h),e=e.slice(0,h))):(h=c.exec(e))&&(w[b]=h[1],e=e.slice(0,h.index)),w[b]=w[b]||o&&u[3]&&t[b]||"",u[4]&&(w[b]=w[b].toLowerCase())):e=u(e,w);n&&(w.query=n(w.query)),o&&t.slashes&&"/"!==w.pathname.charAt(0)&&(""!==w.pathname||""!==t.pathname)&&(w.pathname=function(e,t){if(""===e)return t;for(var n=(t||"/").split("/").slice(0,-1).concat(e.split("/")),r=n.length,s=n[r-1],o=!1,i=0;r--;)"."===n[r]?n.splice(r,1):".."===n[r]?(n.splice(r,1),i++):i&&(0===r&&(o=!0),n.splice(r,1),i--);return o&&n.unshift(""),"."!==s&&".."!==s||n.push(""),n.join("/")}(w.pathname,t.pathname)),"/"!==w.pathname.charAt(0)&&m(w.protocol)&&(w.pathname="/"+w.pathname),r(w.port,w.protocol)||(w.host=w.hostname,w.port=""),w.username=w.password="",w.auth&&(~(h=w.auth.indexOf(":"))?(w.username=w.auth.slice(0,h),w.username=encodeURIComponent(decodeURIComponent(w.username)),w.password=w.auth.slice(h+1),w.password=encodeURIComponent(decodeURIComponent(w.password))):w.username=encodeURIComponent(decodeURIComponent(w.auth)),w.auth=w.password?w.username+":"+w.password:w.username),w.origin="file:"!==w.protocol&&m(w.protocol)&&w.host?w.protocol+"//"+w.host:"null",w.href=w.toString()}g.prototype={set:function(e,t,n){var o=this;switch(e){case"query":"string"==typeof t&&t.length&&(t=(n||s.parse)(t)),o[e]=t;break;case"port":o[e]=t,r(t,o.protocol)?t&&(o.host=o.hostname+":"+t):(o.host=o.hostname,o[e]="");break;case"hostname":o[e]=t,o.port&&(t+=":"+o.port),o.host=t;break;case"host":o[e]=t,c.test(t)?(t=t.split(":"),o.port=t.pop(),o.hostname=t.join(":")):(o.hostname=t,o.port="");break;case"protocol":o.protocol=t.toLowerCase(),o.slashes=!n;break;case"pathname":case"hash":if(t){var i="pathname"===e?"/":"#";o[e]=t.charAt(0)!==i?i+t:t}else o[e]=t;break;case"username":case"password":o[e]=encodeURIComponent(t);break;case"auth":var a=t.indexOf(":");~a?(o.username=t.slice(0,a),o.username=encodeURIComponent(decodeURIComponent(o.username)),o.password=t.slice(a+1),o.password=encodeURIComponent(decodeURIComponent(o.password))):o.username=encodeURIComponent(decodeURIComponent(t))}for(var u=0;u<p.length;u++){var d=p[u];d[4]&&(o[d[1]]=o[d[1]].toLowerCase())}return o.auth=o.password?o.username+":"+o.password:o.username,o.origin="file:"!==o.protocol&&m(o.protocol)&&o.host?o.protocol+"//"+o.host:"null",o.href=o.toString(),o},toString:function(e){e&&"function"==typeof e||(e=s.stringify);var t,n=this,r=n.host,o=n.protocol;o&&":"!==o.charAt(o.length-1)&&(o+=":");var i=o+(n.protocol&&n.slashes||m(n.protocol)?"//":"");return n.username?(i+=n.username,n.password&&(i+=":"+n.password),i+="@"):n.password?(i+=":"+n.password,i+="@"):"file:"!==n.protocol&&m(n.protocol)&&!r&&"/"!==n.pathname&&(i+="@"),(":"===r[r.length-1]||c.test(n.hostname)&&!n.port)&&(r+=":"),i+=r+n.pathname,(t="object"==typeof n.query?e(n.query):n.query)&&(i+="?"!==t.charAt(0)?"?"+t:t),n.hash&&(i+=n.hash),i}},g.extractProtocol=y,g.location=f,g.trimLeft=l,g.qs=s,e.exports=g},9662:(e,t,n)=>{"use strict";var r;n.r(t),n.d(t,{NIL:()=>D,parse:()=>y,stringify:()=>d,v1:()=>m,v3:()=>A,v4:()=>T,v5:()=>j,validate:()=>a,version:()=>R});var s=new Uint8Array(16);function o(){if(!r&&!(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(s)}const i=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;const a=function(e){return"string"==typeof e&&i.test(e)};for(var c=[],u=0;u<256;++u)c.push((u+256).toString(16).substr(1));const d=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(c[e[t+0]]+c[e[t+1]]+c[e[t+2]]+c[e[t+3]]+"-"+c[e[t+4]]+c[e[t+5]]+"-"+c[e[t+6]]+c[e[t+7]]+"-"+c[e[t+8]]+c[e[t+9]]+"-"+c[e[t+10]]+c[e[t+11]]+c[e[t+12]]+c[e[t+13]]+c[e[t+14]]+c[e[t+15]]).toLowerCase();if(!a(n))throw TypeError("Stringified UUID is invalid");return n};var l,p,h=0,f=0;const m=function(e,t,n){var r=t&&n||0,s=t||new Array(16),i=(e=e||{}).node||l,a=void 0!==e.clockseq?e.clockseq:p;if(null==i||null==a){var c=e.random||(e.rng||o)();null==i&&(i=l=[1|c[0],c[1],c[2],c[3],c[4],c[5]]),null==a&&(a=p=16383&(c[6]<<8|c[7]))}var u=void 0!==e.msecs?e.msecs:Date.now(),m=void 0!==e.nsecs?e.nsecs:f+1,y=u-h+(m-f)/1e4;if(y<0&&void 0===e.clockseq&&(a=a+1&16383),(y<0||u>h)&&void 0===e.nsecs&&(m=0),m>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");h=u,f=m,p=a;var g=(1e4*(268435455&(u+=122192928e5))+m)%4294967296;s[r++]=g>>>24&255,s[r++]=g>>>16&255,s[r++]=g>>>8&255,s[r++]=255&g;var b=u/4294967296*1e4&268435455;s[r++]=b>>>8&255,s[r++]=255&b,s[r++]=b>>>24&15|16,s[r++]=b>>>16&255,s[r++]=a>>>8|128,s[r++]=255&a;for(var O=0;O<6;++O)s[r+O]=i[O];return t||d(s)};const y=function(e){if(!a(e))throw TypeError("Invalid UUID");var t,n=new Uint8Array(16);return n[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=255&t,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=255&t,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=255&t,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=255&t,n};function g(e,t,n){function r(e,r,s,o){if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=[],n=0;n<e.length;++n)t.push(e.charCodeAt(n));return t}(e)),"string"==typeof r&&(r=y(r)),16!==r.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var i=new Uint8Array(16+e.length);if(i.set(r),i.set(e,r.length),(i=n(i))[6]=15&i[6]|t,i[8]=63&i[8]|128,s){o=o||0;for(var a=0;a<16;++a)s[o+a]=i[a];return s}return d(i)}try{r.name=e}catch(e){}return r.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",r.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",r}function b(e){return 14+(e+64>>>9<<4)+1}function O(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function v(e,t,n,r,s,o){return O((i=O(O(t,e),O(r,o)))<<(a=s)|i>>>32-a,n);var i,a}function w(e,t,n,r,s,o,i){return v(t&n|~t&r,e,t,s,o,i)}function I(e,t,n,r,s,o,i){return v(t&r|n&~r,e,t,s,o,i)}function _(e,t,n,r,s,o,i){return v(t^n^r,e,t,s,o,i)}function S(e,t,n,r,s,o,i){return v(n^(t|~r),e,t,s,o,i)}const P=function(e){if("string"==typeof e){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var n=0;n<t.length;++n)e[n]=t.charCodeAt(n)}return function(e){for(var t=[],n=32*e.length,r="0123456789abcdef",s=0;s<n;s+=8){var o=e[s>>5]>>>s%32&255,i=parseInt(r.charAt(o>>>4&15)+r.charAt(15&o),16);t.push(i)}return t}(function(e,t){e[t>>5]|=128<<t%32,e[b(t)-1]=t;for(var n=1732584193,r=-271733879,s=-1732584194,o=271733878,i=0;i<e.length;i+=16){var a=n,c=r,u=s,d=o;n=w(n,r,s,o,e[i],7,-680876936),o=w(o,n,r,s,e[i+1],12,-389564586),s=w(s,o,n,r,e[i+2],17,606105819),r=w(r,s,o,n,e[i+3],22,-1044525330),n=w(n,r,s,o,e[i+4],7,-176418897),o=w(o,n,r,s,e[i+5],12,1200080426),s=w(s,o,n,r,e[i+6],17,-1473231341),r=w(r,s,o,n,e[i+7],22,-45705983),n=w(n,r,s,o,e[i+8],7,1770035416),o=w(o,n,r,s,e[i+9],12,-1958414417),s=w(s,o,n,r,e[i+10],17,-42063),r=w(r,s,o,n,e[i+11],22,-1990404162),n=w(n,r,s,o,e[i+12],7,1804603682),o=w(o,n,r,s,e[i+13],12,-40341101),s=w(s,o,n,r,e[i+14],17,-1502002290),n=I(n,r=w(r,s,o,n,e[i+15],22,1236535329),s,o,e[i+1],5,-165796510),o=I(o,n,r,s,e[i+6],9,-1069501632),s=I(s,o,n,r,e[i+11],14,643717713),r=I(r,s,o,n,e[i],20,-373897302),n=I(n,r,s,o,e[i+5],5,-701558691),o=I(o,n,r,s,e[i+10],9,38016083),s=I(s,o,n,r,e[i+15],14,-660478335),r=I(r,s,o,n,e[i+4],20,-405537848),n=I(n,r,s,o,e[i+9],5,568446438),o=I(o,n,r,s,e[i+14],9,-1019803690),s=I(s,o,n,r,e[i+3],14,-187363961),r=I(r,s,o,n,e[i+8],20,1163531501),n=I(n,r,s,o,e[i+13],5,-1444681467),o=I(o,n,r,s,e[i+2],9,-51403784),s=I(s,o,n,r,e[i+7],14,1735328473),n=_(n,r=I(r,s,o,n,e[i+12],20,-1926607734),s,o,e[i+5],4,-378558),o=_(o,n,r,s,e[i+8],11,-2022574463),s=_(s,o,n,r,e[i+11],16,1839030562),r=_(r,s,o,n,e[i+14],23,-35309556),n=_(n,r,s,o,e[i+1],4,-1530992060),o=_(o,n,r,s,e[i+4],11,1272893353),s=_(s,o,n,r,e[i+7],16,-155497632),r=_(r,s,o,n,e[i+10],23,-1094730640),n=_(n,r,s,o,e[i+13],4,681279174),o=_(o,n,r,s,e[i],11,-358537222),s=_(s,o,n,r,e[i+3],16,-722521979),r=_(r,s,o,n,e[i+6],23,76029189),n=_(n,r,s,o,e[i+9],4,-640364487),o=_(o,n,r,s,e[i+12],11,-421815835),s=_(s,o,n,r,e[i+15],16,530742520),n=S(n,r=_(r,s,o,n,e[i+2],23,-995338651),s,o,e[i],6,-198630844),o=S(o,n,r,s,e[i+7],10,1126891415),s=S(s,o,n,r,e[i+14],15,-1416354905),r=S(r,s,o,n,e[i+5],21,-57434055),n=S(n,r,s,o,e[i+12],6,1700485571),o=S(o,n,r,s,e[i+3],10,-1894986606),s=S(s,o,n,r,e[i+10],15,-1051523),r=S(r,s,o,n,e[i+1],21,-2054922799),n=S(n,r,s,o,e[i+8],6,1873313359),o=S(o,n,r,s,e[i+15],10,-30611744),s=S(s,o,n,r,e[i+6],15,-1560198380),r=S(r,s,o,n,e[i+13],21,1309151649),n=S(n,r,s,o,e[i+4],6,-145523070),o=S(o,n,r,s,e[i+11],10,-1120210379),s=S(s,o,n,r,e[i+2],15,718787259),r=S(r,s,o,n,e[i+9],21,-343485551),n=O(n,a),r=O(r,c),s=O(s,u),o=O(o,d)}return[n,r,s,o]}(function(e){if(0===e.length)return[];for(var t=8*e.length,n=new Uint32Array(b(t)),r=0;r<t;r+=8)n[r>>5]|=(255&e[r/8])<<r%32;return n}(e),8*e.length))};const A=g("v3",48,P);const T=function(e,t,n){var r=(e=e||{}).random||(e.rng||o)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var s=0;s<16;++s)t[n+s]=r[s];return t}return d(r)};function k(e,t,n,r){switch(e){case 0:return t&n^~t&r;case 1:case 3:return t^n^r;case 2:return t&n^t&r^n&r}}function C(e,t){return e<<t|e>>>32-t}const E=function(e){var t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){var r=unescape(encodeURIComponent(e));e=[];for(var s=0;s<r.length;++s)e.push(r.charCodeAt(s))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);for(var o=e.length/4+2,i=Math.ceil(o/16),a=new Array(i),c=0;c<i;++c){for(var u=new Uint32Array(16),d=0;d<16;++d)u[d]=e[64*c+4*d]<<24|e[64*c+4*d+1]<<16|e[64*c+4*d+2]<<8|e[64*c+4*d+3];a[c]=u}a[i-1][14]=8*(e.length-1)/Math.pow(2,32),a[i-1][14]=Math.floor(a[i-1][14]),a[i-1][15]=8*(e.length-1)&4294967295;for(var l=0;l<i;++l){for(var p=new Uint32Array(80),h=0;h<16;++h)p[h]=a[l][h];for(var f=16;f<80;++f)p[f]=C(p[f-3]^p[f-8]^p[f-14]^p[f-16],1);for(var m=n[0],y=n[1],g=n[2],b=n[3],O=n[4],v=0;v<80;++v){var w=Math.floor(v/20),I=C(m,5)+k(w,y,g,b)+O+t[w]+p[v]>>>0;O=b,b=g,g=C(y,30)>>>0,y=m,m=I}n[0]=n[0]+m>>>0,n[1]=n[1]+y>>>0,n[2]=n[2]+g>>>0,n[3]=n[3]+b>>>0,n[4]=n[4]+O>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]};const j=g("v5",80,E),D="00000000-0000-0000-0000-000000000000";const R=function(e){if(!a(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)}},6211:(e,t,n)=>{e.exports=n(7312)("./src/collaboration-core.js")},1782:(e,t,n)=>{e.exports=n(9237)("./src/core.js")},1783:(e,t,n)=>{e.exports=n(9237)("./src/engine.js")},8311:(e,t,n)=>{e.exports=n(9237)("./src/ui.js")},4584:(e,t,n)=>{e.exports=n(9237)("./src/utils.js")},7312:e=>{"use strict";e.exports=CKEditor5.collaborationDll},9237:e=>{"use strict";e.exports=CKEditor5.dll},7809:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reconstructPacket=t.deconstructPacket=void 0;const r=n(5132);function s(e,t){if(!e)return e;if((0,r.isBinary)(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=s(e[r],t);return n}if("object"==typeof e&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=s(e[r],t));return n}return e}function o(e,t){if(!e)return e;if(e&&!0===e._placeholder){if("number"==typeof e.num&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=o(e[n],t);else if("object"==typeof e)for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=o(e[n],t));return e}t.deconstructPacket=function(e){const t=[],n=e.data,r=e;return r.data=s(n,t),r.attachments=t.length,{packet:r,buffers:t}},t.reconstructPacket=function(e,t){return e.data=o(e.data,t),delete e.attachments,e}},114:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Decoder=t.Encoder=t.PacketType=t.protocol=void 0;const r=n(4770),s=n(7809),o=n(5132),i=(0,n(3502).default)("socket.io-parser");var a;t.protocol=5,function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"}(a=t.PacketType||(t.PacketType={}));t.Encoder=class{constructor(e){this.replacer=e}encode(e){return i("encoding packet %j",e),e.type!==a.EVENT&&e.type!==a.ACK||!(0,o.hasBinary)(e)?[this.encodeAsString(e)]:this.encodeAsBinary({type:e.type===a.EVENT?a.BINARY_EVENT:a.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id})}encodeAsString(e){let t=""+e.type;return e.type!==a.BINARY_EVENT&&e.type!==a.BINARY_ACK||(t+=e.attachments+"-"),e.nsp&&"/"!==e.nsp&&(t+=e.nsp+","),null!=e.id&&(t+=e.id),null!=e.data&&(t+=JSON.stringify(e.data,this.replacer)),i("encoded %j as %s",e,t),t}encodeAsBinary(e){const t=(0,s.deconstructPacket)(e),n=this.encodeAsString(t.packet),r=t.buffers;return r.unshift(n),r}};class c extends r.Emitter{constructor(e){super(),this.reviver=e}add(e){let t;if("string"==typeof e){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");t=this.decodeString(e);const n=t.type===a.BINARY_EVENT;n||t.type===a.BINARY_ACK?(t.type=n?a.EVENT:a.ACK,this.reconstructor=new u(t),0===t.attachments&&super.emitReserved("decoded",t)):super.emitReserved("decoded",t)}else{if(!(0,o.isBinary)(e)&&!e.base64)throw new Error("Unknown type: "+e);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");t=this.reconstructor.takeBinaryData(e),t&&(this.reconstructor=null,super.emitReserved("decoded",t))}}decodeString(e){let t=0;const n={type:Number(e.charAt(0))};if(void 0===a[n.type])throw new Error("unknown packet type "+n.type);if(n.type===a.BINARY_EVENT||n.type===a.BINARY_ACK){const r=t+1;for(;"-"!==e.charAt(++t)&&t!=e.length;);const s=e.substring(r,t);if(s!=Number(s)||"-"!==e.charAt(t))throw new Error("Illegal attachments");n.attachments=Number(s)}if("/"===e.charAt(t+1)){const r=t+1;for(;++t;){if(","===e.charAt(t))break;if(t===e.length)break}n.nsp=e.substring(r,t)}else n.nsp="/";const r=e.charAt(t+1);if(""!==r&&Number(r)==r){const r=t+1;for(;++t;){const n=e.charAt(t);if(null==n||Number(n)!=n){--t;break}if(t===e.length)break}n.id=Number(e.substring(r,t+1))}if(e.charAt(++t)){const r=this.tryParse(e.substr(t));if(!c.isPayloadValid(n.type,r))throw new Error("invalid payload");n.data=r}return i("decoded %s as %j",e,n),n}tryParse(e){try{return JSON.parse(e,this.reviver)}catch(e){return!1}}static isPayloadValid(e,t){switch(e){case a.CONNECT:return"object"==typeof t;case a.DISCONNECT:return void 0===t;case a.CONNECT_ERROR:return"string"==typeof t||"object"==typeof t;case a.EVENT:case a.BINARY_EVENT:return Array.isArray(t)&&("string"==typeof t[0]||"number"==typeof t[0]);case a.ACK:case a.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}t.Decoder=c;class u{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const e=(0,s.reconstructPacket)(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}},5132:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hasBinary=t.isBinary=void 0;const n="function"==typeof ArrayBuffer,r=e=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,s=Object.prototype.toString,o="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===s.call(Blob),i="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===s.call(File);function a(e){return n&&(e instanceof ArrayBuffer||r(e))||o&&e instanceof Blob||i&&e instanceof File}t.isBinary=a,t.hasBinary=function e(t,n){if(!t||"object"!=typeof t)return!1;if(Array.isArray(t)){for(let n=0,r=t.length;n<r;n++)if(e(t[n]))return!0;return!1}if(a(t))return!0;if(t.toJSON&&"function"==typeof t.toJSON&&1===arguments.length)return e(t.toJSON(),!0);for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return!0;return!1}},6097:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hasCORS=void 0;let n=!1;try{n="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(e){}t.hasCORS=n},7032:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decode=t.encode=void 0,t.encode=function(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t},t.decode=function(e){let t={},n=e.split("&");for(let e=0,r=n.length;e<r;e++){let r=n[e].split("=");t[decodeURIComponent(r[0])]=decodeURIComponent(r[1])}return t}},5836:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parse=void 0;const n=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,r=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];t.parse=function(e){const t=e,s=e.indexOf("["),o=e.indexOf("]");-1!=s&&-1!=o&&(e=e.substring(0,s)+e.substring(s,o).replace(/:/g,";")+e.substring(o,e.length));let i=n.exec(e||""),a={},c=14;for(;c--;)a[r[c]]=i[c]||"";return-1!=s&&-1!=o&&(a.source=t,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a.pathNames=function(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");"/"!=t.slice(0,1)&&0!==t.length||r.splice(0,1);"/"==t.slice(-1)&&r.splice(r.length-1,1);return r}(0,a.path),a.queryKey=function(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,(function(e,t,r){t&&(n[t]=r)})),n}(0,a.query),a}},2785:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.yeast=t.decode=t.encode=void 0;const n="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),r=64,s={};let o,i=0,a=0;function c(e){let t="";do{t=n[e%r]+t,e=Math.floor(e/r)}while(e>0);return t}for(t.encode=c,t.decode=function(e){let t=0;for(a=0;a<e.length;a++)t=t*r+s[e.charAt(a)];return t},t.yeast=function(){const e=c(+new Date);return e!==o?(i=0,o=e):e+"."+c(i++)};a<r;a++)s[n[a]]=a},6988:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.globalThisShim=void 0,t.globalThisShim="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")()},6105:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.nextTick=t.parse=t.installTimerFunctions=t.transports=t.Transport=t.protocol=t.Socket=void 0;const r=n(8160);Object.defineProperty(t,"Socket",{enumerable:!0,get:function(){return r.Socket}}),t.protocol=r.Socket.protocol;var s=n(7620);Object.defineProperty(t,"Transport",{enumerable:!0,get:function(){return s.Transport}});var o=n(7316);Object.defineProperty(t,"transports",{enumerable:!0,get:function(){return o.transports}});var i=n(9889);Object.defineProperty(t,"installTimerFunctions",{enumerable:!0,get:function(){return i.installTimerFunctions}});var a=n(5836);Object.defineProperty(t,"parse",{enumerable:!0,get:function(){return a.parse}});var c=n(1692);Object.defineProperty(t,"nextTick",{enumerable:!0,get:function(){return c.nextTick}})},8160:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Socket=void 0;const s=n(7316),o=n(9889),i=n(7032),a=n(5836),c=r(n(3502)),u=n(4770),d=n(7721),l=(0,c.default)("engine.io-client:socket");class p extends u.Emitter{constructor(e,t={}){super(),this.writeBuffer=[],e&&"object"==typeof e&&(t=e,e=null),e?(e=(0,a.parse)(e),t.hostname=e.host,t.secure="https"===e.protocol||"wss"===e.protocol,t.port=e.port,e.query&&(t.query=e.query)):t.host&&(t.hostname=(0,a.parse)(t.host).host),(0,o.installTimerFunctions)(this,t),this.secure=null!=t.secure?t.secure:"undefined"!=typeof location&&"https:"===location.protocol,t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.hostname=t.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=t.port||("undefined"!=typeof location&&location.port?location.port:this.secure?"443":"80"),this.transports=t.transports||["polling","websocket"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},t),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),"string"==typeof this.opts.query&&(this.opts.query=(0,i.decode)(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,"function"==typeof addEventListener&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),"localhost"!==this.hostname&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(e){l('creating transport "%s"',e);const t=Object.assign({},this.opts.query);t.EIO=d.protocol,t.transport=e,this.id&&(t.sid=this.id);const n=Object.assign({},this.opts.transportOptions[e],this.opts,{query:t,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return l("options: %j",n),new s.transports[e](n)}open(){let e;if(this.opts.rememberUpgrade&&p.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))e="websocket";else{if(0===this.transports.length)return void this.setTimeoutFn((()=>{this.emitReserved("error","No transports available")}),0);e=this.transports[0]}this.readyState="opening";try{e=this.createTransport(e)}catch(e){return l("error while creating transport: %s",e),this.transports.shift(),void this.open()}e.open(),this.setTransport(e)}setTransport(e){l("setting transport %s",e.name),this.transport&&(l("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=e,e.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",(e=>this.onClose("transport close",e)))}probe(e){l('probing transport "%s"',e);let t=this.createTransport(e),n=!1;p.priorWebsocketSuccess=!1;const r=()=>{n||(l('probe transport "%s" opened',e),t.send([{type:"ping",data:"probe"}]),t.once("packet",(r=>{if(!n)if("pong"===r.type&&"probe"===r.data){if(l('probe transport "%s" pong',e),this.upgrading=!0,this.emitReserved("upgrading",t),!t)return;p.priorWebsocketSuccess="websocket"===t.name,l('pausing current transport "%s"',this.transport.name),this.transport.pause((()=>{n||"closed"!==this.readyState&&(l("changing transport and sending upgrade packet"),u(),this.setTransport(t),t.send([{type:"upgrade"}]),this.emitReserved("upgrade",t),t=null,this.upgrading=!1,this.flush())}))}else{l('probe transport "%s" failed',e);const n=new Error("probe error");n.transport=t.name,this.emitReserved("upgradeError",n)}})))};function s(){n||(n=!0,u(),t.close(),t=null)}const o=n=>{const r=new Error("probe error: "+n);r.transport=t.name,s(),l('probe transport "%s" failed because of error: %s',e,n),this.emitReserved("upgradeError",r)};function i(){o("transport closed")}function a(){o("socket closed")}function c(e){t&&e.name!==t.name&&(l('"%s" works - aborting "%s"',e.name,t.name),s())}const u=()=>{t.removeListener("open",r),t.removeListener("error",o),t.removeListener("close",i),this.off("close",a),this.off("upgrading",c)};t.once("open",r),t.once("error",o),t.once("close",i),this.once("close",a),this.once("upgrading",c),t.open()}onOpen(){if(l("socket open"),this.readyState="open",p.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush(),"open"===this.readyState&&this.opts.upgrade){l("starting upgrade probes");let e=0;const t=this.upgrades.length;for(;e<t;e++)this.probe(this.upgrades[e])}}onPacket(e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(l('socket receive: type "%s", data "%s"',e.type,e.data),this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this.resetPingTimeout(),this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const t=new Error("server error");t.code=e.data,this.onError(t);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data)}else l('packet received with socket readyState "%s"',this.readyState)}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this.upgrades=this.filterUpgrades(e.upgrades),this.pingInterval=e.pingInterval,this.pingTimeout=e.pingTimeout,this.maxPayload=e.maxPayload,this.onOpen(),"closed"!==this.readyState&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn((()=>{this.onClose("ping timeout")}),this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}flush(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this.getWritablePackets();l("flushing %d packets in socket",e.length),this.transport.send(e),this.prevBufferLen=e.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;let e=1;for(let t=0;t<this.writeBuffer.length;t++){const n=this.writeBuffer[t].data;if(n&&(e+=(0,o.byteLength)(n)),t>0&&e>this.maxPayload)return l("only send %d out of %d packets",t,this.writeBuffer.length),this.writeBuffer.slice(0,t);e+=2}return l("payload size is %d (max: %d)",e,this.maxPayload),this.writeBuffer}write(e,t,n){return this.sendPacket("message",e,t,n),this}send(e,t,n){return this.sendPacket("message",e,t,n),this}sendPacket(e,t,n,r){if("function"==typeof t&&(r=t,t=void 0),"function"==typeof n&&(r=n,n=null),"closing"===this.readyState||"closed"===this.readyState)return;(n=n||{}).compress=!1!==n.compress;const s={type:e,data:t,options:n};this.emitReserved("packetCreate",s),this.writeBuffer.push(s),r&&this.once("flush",r),this.flush()}close(){const e=()=>{this.onClose("forced close"),l("socket closing - telling transport to close"),this.transport.close()},t=()=>{this.off("upgrade",t),this.off("upgradeError",t),e()},n=()=>{this.once("upgrade",t),this.once("upgradeError",t)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",(()=>{this.upgrading?n():e()})):this.upgrading?n():e()),this}onError(e){l("socket error %j",e),p.priorWebsocketSuccess=!1,this.emitReserved("error",e),this.onClose("transport error",e)}onClose(e,t){"opening"!==this.readyState&&"open"!==this.readyState&&"closing"!==this.readyState||(l('socket close with reason: "%s"',e),this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),"function"==typeof removeEventListener&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",e,t),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(e){const t=[];let n=0;const r=e.length;for(;n<r;n++)~this.transports.indexOf(e[n])&&t.push(e[n]);return t}}t.Socket=p,p.protocol=d.protocol},7620:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Transport=void 0;const s=n(7721),o=n(4770),i=n(9889),a=(0,r(n(3502)).default)("engine.io-client:transport");class c extends Error{constructor(e,t,n){super(e),this.description=t,this.context=n,this.type="TransportError"}}class u extends o.Emitter{constructor(e){super(),this.writable=!1,(0,i.installTimerFunctions)(this,e),this.opts=e,this.query=e.query,this.socket=e.socket}onError(e,t,n){return super.emitReserved("error",new c(e,t,n)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this}send(e){"open"===this.readyState?this.write(e):a("transport is not open, discarding packets")}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const t=(0,s.decodePacket)(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}}t.Transport=u},7316:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.transports=void 0;const r=n(179),s=n(355);t.transports={websocket:s.WS,polling:r.Polling}},179:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Request=t.Polling=void 0;const s=n(7620),o=r(n(3502)),i=n(2785),a=n(7032),c=n(7721),u=n(6898),d=n(4770),l=n(9889),p=n(6988),h=(0,o.default)("engine.io-client:polling");function f(){}const m=null!=new u.XHR({xdomain:!1}).responseType;class y extends s.Transport{constructor(e){if(super(e),this.polling=!1,"undefined"!=typeof location){const t="https:"===location.protocol;let n=location.port;n||(n=t?"443":"80"),this.xd="undefined"!=typeof location&&e.hostname!==location.hostname||n!==e.port,this.xs=e.secure!==t}const t=e&&e.forceBase64;this.supportsBinary=m&&!t}get name(){return"polling"}doOpen(){this.poll()}pause(e){this.readyState="pausing";const t=()=>{h("paused"),this.readyState="paused",e()};if(this.polling||!this.writable){let e=0;this.polling&&(h("we are currently polling - waiting to pause"),e++,this.once("pollComplete",(function(){h("pre-pause polling complete"),--e||t()}))),this.writable||(h("we are currently writing - waiting to pause"),e++,this.once("drain",(function(){h("pre-pause writing complete"),--e||t()})))}else t()}poll(){h("polling"),this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){h("polling got data %s",e);(0,c.decodePayload)(e,this.socket.binaryType).forEach((e=>{if("opening"===this.readyState&&"open"===e.type&&this.onOpen(),"close"===e.type)return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(e)})),"closed"!==this.readyState&&(this.polling=!1,this.emitReserved("pollComplete"),"open"===this.readyState?this.poll():h('ignoring poll - transport state "%s"',this.readyState))}doClose(){const e=()=>{h("writing close packet"),this.write([{type:"close"}])};"open"===this.readyState?(h("transport open - closing"),e()):(h("transport not open - deferring close"),this.once("open",e))}write(e){this.writable=!1,(0,c.encodePayload)(e,(e=>{this.doWrite(e,(()=>{this.writable=!0,this.emitReserved("drain")}))}))}uri(){let e=this.query||{};const t=this.opts.secure?"https":"http";let n="";!1!==this.opts.timestampRequests&&(e[this.opts.timestampParam]=(0,i.yeast)()),this.supportsBinary||e.sid||(e.b64=1),this.opts.port&&("https"===t&&443!==Number(this.opts.port)||"http"===t&&80!==Number(this.opts.port))&&(n=":"+this.opts.port);const r=(0,a.encode)(e);return t+"://"+(-1!==this.opts.hostname.indexOf(":")?"["+this.opts.hostname+"]":this.opts.hostname)+n+this.opts.path+(r.length?"?"+r:"")}request(e={}){return Object.assign(e,{xd:this.xd,xs:this.xs},this.opts),new g(this.uri(),e)}doWrite(e,t){const n=this.request({method:"POST",data:e});n.on("success",t),n.on("error",((e,t)=>{this.onError("xhr post error",e,t)}))}doPoll(){h("xhr poll");const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",((e,t)=>{this.onError("xhr poll error",e,t)})),this.pollXhr=e}}t.Polling=y;class g extends d.Emitter{constructor(e,t){super(),(0,l.installTimerFunctions)(this,t),this.opts=t,this.method=t.method||"GET",this.uri=e,this.async=!1!==t.async,this.data=void 0!==t.data?t.data:null,this.create()}create(){const e=(0,l.pick)(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");e.xdomain=!!this.opts.xd,e.xscheme=!!this.opts.xs;const t=this.xhr=new u.XHR(e);try{h("xhr open %s: %s",this.method,this.uri),t.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){t.setDisableHeaderCheck&&t.setDisableHeaderCheck(!0);for(let e in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(e)&&t.setRequestHeader(e,this.opts.extraHeaders[e])}}catch(e){}if("POST"===this.method)try{t.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(e){}try{t.setRequestHeader("Accept","*/*")}catch(e){}"withCredentials"in t&&(t.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(t.timeout=this.opts.requestTimeout),t.onreadystatechange=()=>{4===t.readyState&&(200===t.status||1223===t.status?this.onLoad():this.setTimeoutFn((()=>{this.onError("number"==typeof t.status?t.status:0)}),0))},h("xhr data %s",this.data),t.send(this.data)}catch(e){return void this.setTimeoutFn((()=>{this.onError(e)}),0)}"undefined"!=typeof document&&(this.index=g.requestsCount++,g.requests[this.index]=this)}onError(e){this.emitReserved("error",e,this.xhr),this.cleanup(!0)}cleanup(e){if(void 0!==this.xhr&&null!==this.xhr){if(this.xhr.onreadystatechange=f,e)try{this.xhr.abort()}catch(e){}"undefined"!=typeof document&&delete g.requests[this.index],this.xhr=null}}onLoad(){const e=this.xhr.responseText;null!==e&&(this.emitReserved("data",e),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}if(t.Request=g,g.requestsCount=0,g.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",b);else if("function"==typeof addEventListener){const e="onpagehide"in p.globalThisShim?"pagehide":"unload";addEventListener(e,b,!1)}function b(){for(let e in g.requests)g.requests.hasOwnProperty(e)&&g.requests[e].abort()}},1692:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultBinaryType=t.usingBrowserWebSocket=t.WebSocket=t.nextTick=void 0;const r=n(6988);t.nextTick="function"==typeof Promise&&"function"==typeof Promise.resolve?e=>Promise.resolve().then(e):(e,t)=>t(e,0),t.WebSocket=r.globalThisShim.WebSocket||r.globalThisShim.MozWebSocket,t.usingBrowserWebSocket=!0,t.defaultBinaryType="arraybuffer"},355:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.WS=void 0;const s=n(7620),o=n(7032),i=n(2785),a=n(9889),c=n(1692),u=r(n(3502)),d=n(7721),l=(0,u.default)("engine.io-client:websocket"),p="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase();class h extends s.Transport{constructor(e){super(e),this.supportsBinary=!e.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const e=this.uri(),t=this.opts.protocols,n=p?{}:(0,a.pick)(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=c.usingBrowserWebSocket&&!p?t?new c.WebSocket(e,t):new c.WebSocket(e):new c.WebSocket(e,t,n)}catch(e){return this.emitReserved("error",e)}this.ws.binaryType=this.socket.binaryType||c.defaultBinaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const n=e[t],r=t===e.length-1;(0,d.encodePacket)(n,this.supportsBinary,(e=>{const t={};if(!c.usingBrowserWebSocket&&(n.options&&(t.compress=n.options.compress),this.opts.perMessageDeflate)){("string"==typeof e?Buffer.byteLength(e):e.length)<this.opts.perMessageDeflate.threshold&&(t.compress=!1)}try{c.usingBrowserWebSocket?this.ws.send(e):this.ws.send(e,t)}catch(e){l("websocket closed before onclose event")}r&&(0,c.nextTick)((()=>{this.writable=!0,this.emitReserved("drain")}),this.setTimeoutFn)}))}}doClose(){void 0!==this.ws&&(this.ws.close(),this.ws=null)}uri(){let e=this.query||{};const t=this.opts.secure?"wss":"ws";let n="";this.opts.port&&("wss"===t&&443!==Number(this.opts.port)||"ws"===t&&80!==Number(this.opts.port))&&(n=":"+this.opts.port),this.opts.timestampRequests&&(e[this.opts.timestampParam]=(0,i.yeast)()),this.supportsBinary||(e.b64=1);const r=(0,o.encode)(e);return t+"://"+(-1!==this.opts.hostname.indexOf(":")?"["+this.opts.hostname+"]":this.opts.hostname)+n+this.opts.path+(r.length?"?"+r:"")}check(){return!!c.WebSocket}}t.WS=h},6898:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.XHR=void 0;const r=n(6097),s=n(6988);t.XHR=function(e){const t=e.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!t||r.hasCORS))return new XMLHttpRequest}catch(e){}if(!t)try{return new(s.globalThisShim[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(e){}}},9889:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.byteLength=t.installTimerFunctions=t.pick=void 0;const r=n(6988);t.pick=function(e,...t){return t.reduce(((t,n)=>(e.hasOwnProperty(n)&&(t[n]=e[n]),t)),{})};const s=r.globalThisShim.setTimeout,o=r.globalThisShim.clearTimeout;t.installTimerFunctions=function(e,t){t.useNativeTimers?(e.setTimeoutFn=s.bind(r.globalThisShim),e.clearTimeoutFn=o.bind(r.globalThisShim)):(e.setTimeoutFn=r.globalThisShim.setTimeout.bind(r.globalThisShim),e.clearTimeoutFn=r.globalThisShim.clearTimeout.bind(r.globalThisShim))};t.byteLength=function(e){return"string"==typeof e?function(e){let t=0,n=0;for(let r=0,s=e.length;r<s;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}(e):Math.ceil(1.33*(e.byteLength||e.size))}},8479:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ERROR_PACKET=t.PACKET_TYPES_REVERSE=t.PACKET_TYPES=void 0;const n=Object.create(null);t.PACKET_TYPES=n,n.open="0",n.close="1",n.ping="2",n.pong="3",n.message="4",n.upgrade="5",n.noop="6";const r=Object.create(null);t.PACKET_TYPES_REVERSE=r,Object.keys(n).forEach((e=>{r[n[e]]=e}));t.ERROR_PACKET={type:"error",data:"parser error"}},7030:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decode=t.encode=void 0;const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r="undefined"==typeof Uint8Array?[]:new Uint8Array(256);for(let e=0;e<64;e++)r[n.charCodeAt(e)]=e;t.encode=e=>{let t,r=new Uint8Array(e),s=r.length,o="";for(t=0;t<s;t+=3)o+=n[r[t]>>2],o+=n[(3&r[t])<<4|r[t+1]>>4],o+=n[(15&r[t+1])<<2|r[t+2]>>6],o+=n[63&r[t+2]];return s%3==2?o=o.substring(0,o.length-1)+"=":s%3==1&&(o=o.substring(0,o.length-2)+"=="),o};t.decode=e=>{let t,n,s,o,i,a=.75*e.length,c=e.length,u=0;"="===e[e.length-1]&&(a--,"="===e[e.length-2]&&a--);const d=new ArrayBuffer(a),l=new Uint8Array(d);for(t=0;t<c;t+=4)n=r[e.charCodeAt(t)],s=r[e.charCodeAt(t+1)],o=r[e.charCodeAt(t+2)],i=r[e.charCodeAt(t+3)],l[u++]=n<<2|s>>4,l[u++]=(15&s)<<4|o>>2,l[u++]=(3&o)<<6|63&i;return d}},4013:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(8479),s=n(7030),o="function"==typeof ArrayBuffer,i=(e,t)=>{if(o){const n=(0,s.decode)(e);return a(n,t)}return{base64:!0,data:e}},a=(e,t)=>"blob"===t&&e instanceof ArrayBuffer?new Blob([e]):e;t.default=(e,t)=>{if("string"!=typeof e)return{type:"message",data:a(e,t)};const n=e.charAt(0);if("b"===n)return{type:"message",data:i(e.substring(1),t)};return r.PACKET_TYPES_REVERSE[n]?e.length>1?{type:r.PACKET_TYPES_REVERSE[n],data:e.substring(1)}:{type:r.PACKET_TYPES_REVERSE[n]}:r.ERROR_PACKET}},9305:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(8479),s="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),o="function"==typeof ArrayBuffer,i=(e,t)=>{const n=new FileReader;return n.onload=function(){const e=n.result.split(",")[1];t("b"+(e||""))},n.readAsDataURL(e)};t.default=({type:e,data:t},n,a)=>{return s&&t instanceof Blob?n?a(t):i(t,a):o&&(t instanceof ArrayBuffer||(c=t,"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(c):c&&c.buffer instanceof ArrayBuffer))?n?a(t):i(new Blob([t]),a):a(r.PACKET_TYPES[e]+(t||""));var c}},7721:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodePayload=t.decodePacket=t.encodePayload=t.encodePacket=t.protocol=void 0;const r=n(9305);t.encodePacket=r.default;const s=n(4013);t.decodePacket=s.default;const o=String.fromCharCode(30);t.encodePayload=(e,t)=>{const n=e.length,s=new Array(n);let i=0;e.forEach(((e,a)=>{(0,r.default)(e,!1,(e=>{s[a]=e,++i===n&&t(s.join(o))}))}))};t.decodePayload=(e,t)=>{const n=e.split(o),r=[];for(let e=0;e<n.length;e++){const o=(0,s.default)(n[e],t);if(r.push(o),"error"===o.type)break}return r},t.protocol=4},2408:(e,t)=>{"use strict";function n(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Object.defineProperty(t,"__esModule",{value:!0}),t.Backoff=void 0,t.Backoff=n,n.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=0==(1&Math.floor(10*t))?e-n:e+n}return 0|Math.min(e,this.max)},n.prototype.reset=function(){this.attempts=0},n.prototype.setMin=function(e){this.ms=e},n.prototype.setMax=function(e){this.max=e},n.prototype.setJitter=function(e){this.jitter=e}},2790:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.connect=t.io=t.Socket=t.Manager=t.protocol=void 0;const s=n(9023),o=n(3145);Object.defineProperty(t,"Manager",{enumerable:!0,get:function(){return o.Manager}});const i=n(9945);Object.defineProperty(t,"Socket",{enumerable:!0,get:function(){return i.Socket}});const a=r(n(3502)).default("socket.io-client"),c={};function u(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};const n=s.url(e,t.path||"/socket.io"),r=n.source,i=n.id,u=n.path,d=c[i]&&u in c[i].nsps;let l;return t.forceNew||t["force new connection"]||!1===t.multiplex||d?(a("ignoring socket cache for %s",r),l=new o.Manager(r,t)):(c[i]||(a("new io instance for %s",r),c[i]=new o.Manager(r,t)),l=c[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}t.io=u,t.connect=u,t.default=u,Object.assign(u,{Manager:o.Manager,Socket:i.Socket,io:u,connect:u});var d=n(4078);Object.defineProperty(t,"protocol",{enumerable:!0,get:function(){return d.protocol}}),e.exports=u},3145:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return s(t,e),t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Manager=void 0;const a=n(6105),c=n(9945),u=o(n(4078)),d=n(2461),l=n(2408),p=n(4770),h=i(n(3502)).default("socket.io-client:manager");class f extends p.Emitter{constructor(e,t){var n;super(),this.nsps={},this.subs=[],e&&"object"==typeof e&&(t=e,e=void 0),(t=t||{}).path=t.path||"/socket.io",this.opts=t,a.installTimerFunctions(this,t),this.reconnection(!1!==t.reconnection),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor(null!==(n=t.randomizationFactor)&&void 0!==n?n:.5),this.backoff=new l.Backoff({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==t.timeout?2e4:t.timeout),this._readyState="closed",this.uri=e;const r=t.parser||u;this.encoder=new r.Encoder,this.decoder=new r.Decoder,this._autoConnect=!1!==t.autoConnect,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection}reconnectionAttempts(e){return void 0===e?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return void 0===e?this._reconnectionDelay:(this._reconnectionDelay=e,null===(t=this.backoff)||void 0===t||t.setMin(e),this)}randomizationFactor(e){var t;return void 0===e?this._randomizationFactor:(this._randomizationFactor=e,null===(t=this.backoff)||void 0===t||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return void 0===e?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,null===(t=this.backoff)||void 0===t||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}open(e){if(h("readyState %s",this._readyState),~this._readyState.indexOf("open"))return this;h("opening %s",this.uri),this.engine=new a.Socket(this.uri,this.opts);const t=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const r=d.on(t,"open",(function(){n.onopen(),e&&e()})),s=d.on(t,"error",(t=>{h("error"),n.cleanup(),n._readyState="closed",this.emitReserved("error",t),e?e(t):n.maybeReconnectOnOpen()}));if(!1!==this._timeout){const e=this._timeout;h("connect attempt will timeout after %d",e),0===e&&r();const n=this.setTimeoutFn((()=>{h("connect attempt timed out after %d",e),r(),t.close(),t.emit("error",new Error("timeout"))}),e);this.opts.autoUnref&&n.unref(),this.subs.push((function(){clearTimeout(n)}))}return this.subs.push(r),this.subs.push(s),this}connect(e){return this.open(e)}onopen(){h("open"),this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(d.on(e,"ping",this.onping.bind(this)),d.on(e,"data",this.ondata.bind(this)),d.on(e,"error",this.onerror.bind(this)),d.on(e,"close",this.onclose.bind(this)),d.on(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(e){this.onclose("parse error",e)}}ondecoded(e){a.nextTick((()=>{this.emitReserved("packet",e)}),this.setTimeoutFn)}onerror(e){h("error",e),this.emitReserved("error",e)}socket(e,t){let n=this.nsps[e];return n?this._autoConnect&&!n.active&&n.connect():(n=new c.Socket(this,e,t),this.nsps[e]=n),n}_destroy(e){const t=Object.keys(this.nsps);for(const e of t){if(this.nsps[e].active)return void h("socket %s is still active, skipping close",e)}this._close()}_packet(e){h("writing packet %j",e);const t=this.encoder.encode(e);for(let n=0;n<t.length;n++)this.engine.write(t[n],e.options)}cleanup(){h("cleanup"),this.subs.forEach((e=>e())),this.subs.length=0,this.decoder.destroy()}_close(){h("disconnect"),this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(e,t){h("closed due to %s",e),this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)h("reconnect failed"),this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const t=this.backoff.duration();h("will wait %dms before reconnect attempt",t),this._reconnecting=!0;const n=this.setTimeoutFn((()=>{e.skipReconnect||(h("attempting reconnect"),this.emitReserved("reconnect_attempt",e.backoff.attempts),e.skipReconnect||e.open((t=>{t?(h("reconnect attempt error"),e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",t)):(h("reconnect success"),e.onreconnect())})))}),t);this.opts.autoUnref&&n.unref(),this.subs.push((function(){clearTimeout(n)}))}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}t.Manager=f},2461:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.on=void 0,t.on=function(e,t,n){return e.on(t,n),function(){e.off(t,n)}}},9945:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Socket=void 0;const s=n(4078),o=n(2461),i=n(4770),a=r(n(3502)).default("socket.io-client:socket"),c=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class u extends i.Emitter{constructor(e,t,n){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=t,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[o.on(e,"open",this.onopen.bind(this)),o.on(e,"packet",this.onpacket.bind(this)),o.on(e,"error",this.onerror.bind(this)),o.on(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected||(this.subEvents(),this.io._reconnecting||this.io.open(),"open"===this.io._readyState&&this.onopen()),this}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...t){if(c.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(t.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(t),this;const n={type:s.PacketType.EVENT,data:t,options:{}};if(n.options.compress=!1!==this.flags.compress,"function"==typeof t[t.length-1]){const e=this.ids++;a("emitting packet with ack id %d",e);const r=t.pop();this._registerAckCallback(e,r),n.id=e}const r=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!r||!this.connected)?a("discard packet as the transport is not currently writable"):this.connected?(this.notifyOutgoingListeners(n),this.packet(n)):this.sendBuffer.push(n),this.flags={},this}_registerAckCallback(e,t){var n;const r=null!==(n=this.flags.timeout)&&void 0!==n?n:this._opts.ackTimeout;if(void 0===r)return void(this.acks[e]=t);const s=this.io.setTimeoutFn((()=>{delete this.acks[e];for(let t=0;t<this.sendBuffer.length;t++)this.sendBuffer[t].id===e&&(a("removing packet with ack id %d from the buffer",e),this.sendBuffer.splice(t,1));a("event with ack id %d has timed out after %d ms",e,r),t.call(this,new Error("operation has timed out"))}),r);this.acks[e]=(...e)=>{this.io.clearTimeoutFn(s),t.apply(this,[null,...e])}}emitWithAck(e,...t){const n=void 0!==this.flags.timeout||void 0!==this._opts.ackTimeout;return new Promise(((r,s)=>{t.push(((e,t)=>n?e?s(e):r(t):r(e))),this.emit(e,...t)}))}_addToQueue(e){let t;"function"==typeof e[e.length-1]&&(t=e.pop());const n={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push(((e,...r)=>{if(n!==this._queue[0])return;return null!==e?n.tryCount>this._opts.retries&&(a("packet [%d] is discarded after %d tries",n.id,n.tryCount),this._queue.shift(),t&&t(e)):(a("packet [%d] was successfully sent",n.id),this._queue.shift(),t&&t(null,...r)),n.pending=!1,this._drainQueue()})),this._queue.push(n),this._drainQueue()}_drainQueue(e=!1){if(a("draining queue"),!this.connected||0===this._queue.length)return;const t=this._queue[0];!t.pending||e?(t.pending=!0,t.tryCount++,a("sending packet [%d] (try n°%d)",t.id,t.tryCount),this.flags=t.flags,this.emit.apply(this,t.args)):a("packet [%d] has already been sent and is waiting for an ack",t.id)}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){a("transport is open - connecting"),"function"==typeof this.auth?this.auth((e=>{this._sendConnectPacket(e)})):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:s.PacketType.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,t){a("close (%s)",e),this.connected=!1,delete this.id,this.emitReserved("disconnect",e,t)}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case s.PacketType.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case s.PacketType.EVENT:case s.PacketType.BINARY_EVENT:this.onevent(e);break;case s.PacketType.ACK:case s.PacketType.BINARY_ACK:this.onack(e);break;case s.PacketType.DISCONNECT:this.ondisconnect();break;case s.PacketType.CONNECT_ERROR:this.destroy();const t=new Error(e.data.message);t.data=e.data.data,this.emitReserved("connect_error",t)}}onevent(e){const t=e.data||[];a("emitting event %j",t),null!=e.id&&(a("attaching ack callback to event"),t.push(this.ack(e.id))),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const t=this._anyListeners.slice();for(const n of t)n.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&"string"==typeof e[e.length-1]&&(this._lastOffset=e[e.length-1])}ack(e){const t=this;let n=!1;return function(...r){n||(n=!0,a("sending ack %j",r),t.packet({type:s.PacketType.ACK,id:e,data:r}))}}onack(e){const t=this.acks[e.id];"function"==typeof t?(a("calling ack %s with %j",e.id,e.data),t.apply(this,e.data),delete this.acks[e.id]):a("bad ack %s",e.id)}onconnect(e,t){a("socket connected with id %s",e),this.id=e,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach((e=>this.emitEvent(e))),this.receiveBuffer=[],this.sendBuffer.forEach((e=>{this.notifyOutgoingListeners(e),this.packet(e)})),this.sendBuffer=[]}ondisconnect(){a("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach((e=>e())),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&(a("performing disconnect (%s)",this.nsp),this.packet({type:s.PacketType.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const t=this._anyListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){const t=this._anyOutgoingListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const t=this._anyOutgoingListeners.slice();for(const n of t)n.apply(this,e.data)}}}t.Socket=u},9023:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.url=void 0;const s=n(6105),o=r(n(3502)).default("socket.io-client:url");t.url=function(e,t="",n){let r=e;n=n||"undefined"!=typeof location&&location,null==e&&(e=n.protocol+"//"+n.host),"string"==typeof e&&("/"===e.charAt(0)&&(e="/"===e.charAt(1)?n.protocol+e:n.host+e),/^(https?|wss?):\/\//.test(e)||(o("protocol-less url %s",e),e=void 0!==n?n.protocol+"//"+e:"https://"+e),o("parse %s",e),r=s.parse(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const i=-1!==r.host.indexOf(":")?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+i+":"+r.port+t,r.href=r.protocol+"://"+i+(n&&n.port===r.port?"":":"+r.port),r}},4581:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reconstructPacket=t.deconstructPacket=void 0;const r=n(7152);function s(e,t){if(!e)return e;if((0,r.isBinary)(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=s(e[r],t);return n}if("object"==typeof e&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=s(e[r],t));return n}return e}function o(e,t){if(!e)return e;if(e&&!0===e._placeholder){if("number"==typeof e.num&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=o(e[n],t);else if("object"==typeof e)for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=o(e[n],t));return e}t.deconstructPacket=function(e){const t=[],n=e.data,r=e;return r.data=s(n,t),r.attachments=t.length,{packet:r,buffers:t}},t.reconstructPacket=function(e,t){return e.data=o(e.data,t),delete e.attachments,e}},4078:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Decoder=t.Encoder=t.PacketType=t.protocol=void 0;const r=n(4770),s=n(4581),o=n(7152),i=(0,n(3502).default)("socket.io-parser"),a=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var c;t.protocol=5,function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"}(c=t.PacketType||(t.PacketType={}));function u(e){return"[object Object]"===Object.prototype.toString.call(e)}t.Encoder=class{constructor(e){this.replacer=e}encode(e){return i("encoding packet %j",e),e.type!==c.EVENT&&e.type!==c.ACK||!(0,o.hasBinary)(e)?[this.encodeAsString(e)]:this.encodeAsBinary({type:e.type===c.EVENT?c.BINARY_EVENT:c.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id})}encodeAsString(e){let t=""+e.type;return e.type!==c.BINARY_EVENT&&e.type!==c.BINARY_ACK||(t+=e.attachments+"-"),e.nsp&&"/"!==e.nsp&&(t+=e.nsp+","),null!=e.id&&(t+=e.id),null!=e.data&&(t+=JSON.stringify(e.data,this.replacer)),i("encoded %j as %s",e,t),t}encodeAsBinary(e){const t=(0,s.deconstructPacket)(e),n=this.encodeAsString(t.packet),r=t.buffers;return r.unshift(n),r}};class d extends r.Emitter{constructor(e){super(),this.reviver=e}add(e){let t;if("string"==typeof e){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");t=this.decodeString(e);const n=t.type===c.BINARY_EVENT;n||t.type===c.BINARY_ACK?(t.type=n?c.EVENT:c.ACK,this.reconstructor=new l(t),0===t.attachments&&super.emitReserved("decoded",t)):super.emitReserved("decoded",t)}else{if(!(0,o.isBinary)(e)&&!e.base64)throw new Error("Unknown type: "+e);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");t=this.reconstructor.takeBinaryData(e),t&&(this.reconstructor=null,super.emitReserved("decoded",t))}}decodeString(e){let t=0;const n={type:Number(e.charAt(0))};if(void 0===c[n.type])throw new Error("unknown packet type "+n.type);if(n.type===c.BINARY_EVENT||n.type===c.BINARY_ACK){const r=t+1;for(;"-"!==e.charAt(++t)&&t!=e.length;);const s=e.substring(r,t);if(s!=Number(s)||"-"!==e.charAt(t))throw new Error("Illegal attachments");n.attachments=Number(s)}if("/"===e.charAt(t+1)){const r=t+1;for(;++t;){if(","===e.charAt(t))break;if(t===e.length)break}n.nsp=e.substring(r,t)}else n.nsp="/";const r=e.charAt(t+1);if(""!==r&&Number(r)==r){const r=t+1;for(;++t;){const n=e.charAt(t);if(null==n||Number(n)!=n){--t;break}if(t===e.length)break}n.id=Number(e.substring(r,t+1))}if(e.charAt(++t)){const r=this.tryParse(e.substr(t));if(!d.isPayloadValid(n.type,r))throw new Error("invalid payload");n.data=r}return i("decoded %s as %j",e,n),n}tryParse(e){try{return JSON.parse(e,this.reviver)}catch(e){return!1}}static isPayloadValid(e,t){switch(e){case c.CONNECT:return u(t);case c.DISCONNECT:return void 0===t;case c.CONNECT_ERROR:return"string"==typeof t||u(t);case c.EVENT:case c.BINARY_EVENT:return Array.isArray(t)&&("number"==typeof t[0]||"string"==typeof t[0]&&-1===a.indexOf(t[0]));case c.ACK:case c.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}t.Decoder=d;class l{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const e=(0,s.reconstructPacket)(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}},7152:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hasBinary=t.isBinary=void 0;const n="function"==typeof ArrayBuffer,r=e=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,s=Object.prototype.toString,o="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===s.call(Blob),i="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===s.call(File);function a(e){return n&&(e instanceof ArrayBuffer||r(e))||o&&e instanceof Blob||i&&e instanceof File}t.isBinary=a,t.hasBinary=function e(t,n){if(!t||"object"!=typeof t)return!1;if(Array.isArray(t)){for(let n=0,r=t.length;n<r;n++)if(e(t[n]))return!0;return!1}if(a(t))return!0;if(t.toJSON&&"function"==typeof t.toJSON&&1===arguments.length)return e(t.toJSON(),!0);for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return!0;return!1}},4770:(e,t,n)=>{"use strict";function r(e){if(e)return function(e){for(var t in r.prototype)e[t]=r.prototype[t];return e}(e)}n.r(t),n.d(t,{Emitter:()=>r}),r.prototype.on=r.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},r.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var s=0;s<r.length;s++)if((n=r[s])===t||n.fn===t){r.splice(s,1);break}return 0===r.length&&delete this._callbacks["$"+e],this},r.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){r=0;for(var s=(n=n.slice(0)).length;r<s;++r)n[r].apply(this,t)}return this},r.prototype.emitReserved=r.prototype.emit,r.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},r.prototype.hasListeners=function(e){return!!this.listeners(e).length}}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var n=__webpack_module_cache__[e]={id:e,exports:{}};return __webpack_modules__[e].call(n.exports,n,n.exports,__webpack_require__),n.exports}__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=(e,t)=>{for(var n in t)__webpack_require__.o(t,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.nc=void 0;var __webpack_exports__={};(()=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{CloudServicesCommentsAdapter:()=>as,CloudServicesRevisionHistoryAdapter:()=>Cs,CloudServicesTrackChangesAdapter:()=>ms,PresenceList:()=>Oo,RealTimeCollaborationClient:()=>Wr,RealTimeCollaborativeComments:()=>ws,RealTimeCollaborativeEditing:()=>rs,RealTimeCollaborativeRevisionHistory:()=>Ns,RealTimeCollaborativeTrackChanges:()=>Ps});var e={};__webpack_require__.r(e),__webpack_require__.d(e,{AttributeOperation:()=>j,Element:()=>G,InsertOperation:()=>D,MarkerOperation:()=>R,MergeOperation:()=>M,MoveOperation:()=>N,Position:()=>J,Range:()=>q,RenameOperation:()=>x,RootAttributeOperation:()=>V,RootOperation:()=>B,SplitOperation:()=>U,default:()=>E});var t=__webpack_require__(1782),n=__webpack_require__(4584),r=__webpack_require__(8311),s=__webpack_require__(1783),o=__webpack_require__(5111);function i(){const e=["delete","add","plugins","listenTo","from","5772030NzjLYE","22HwBjFJ","bind","disconnect","create","1443458zWjxOt","_reconnect","function","isInReconnectionStack","4004ohqlRq","cloudservices-reconnection-error","_isBrowserOffline","offline","connected","set","pluginName","1DbEDNg","config","_shouldPluginsReconnect","constructor","init","then","error","The limit of maximum concurrent connections that the collaboration server can handle has been reached. Try opening the document again in a few minutes. Please contact your system administrator if the problem persists.","DISCONNECTED","WebSocketGateway","showWarning","online","1350468KmgCuT","cloudServices.connectionTimeout","context","_domEmitter","limitExceeded","token","4958429kqTgwn","5170ZgqeLV","_reconnectionStack","CONNECTED","catch","CloudServices","websocketgateway-missing-websocket-url","connect","real-time-collaboration","Connected users limit exceeded","websocketgateway-invalid-plugin-interface","stopListening","reconnect","6DqOMfW","cloudServices.requestTimeout","state","11586195QcHKZA","websocketgateway-plugin-already-registered","webSocketUrl","connection","initialReconnectionInterval","CONNECTING","removeFromReconnectionStack","2984208PrapIv","get","destroy","define","change:me","code","cloudservices-init","all","websocketgateway-missing-token","has","requires","addToReconnectionStack"];return(i=function(){return e})()}const a=c;function c(e,t){const n=i();return(c=function(e,t){return n[e-=115]})(e,t)}!function(e,t){const n=c,r=e();for(;;)try{if(811573===parseInt(n(116))/1*(-parseInt(n(179))/2)+-parseInt(n(128))/3+-parseInt(n(183))/4*(-parseInt(n(135))/5)+parseInt(n(147))/6*(parseInt(n(134))/7)+parseInt(n(157))/8+-parseInt(n(150))/9+-parseInt(n(174))/10*(-parseInt(n(175))/11))break;r.push(r.shift())}catch(e){r.push(r.shift())}}(i);class u extends t.ContextPlugin{static get[a(167)](){return[a(139),r.Notification]}static get[a(115)](){return a(125)}constructor(e){const t=a;super(e),this[t(188)](t(149),o.WEB_SOCKET_GATEWAY_STATES[t(137)]),this[t(188)](t(185),!1),this[t(136)]=new Set,this[t(118)]=!1,this[t(131)]=Object[t(178)](n.DomEmitterMixin)}[a(120)](){const e=a,t=this[e(130)],s=t[e(171)][e(158)](e(139)),i=t[e(171)][e(158)](r.Notification);if(!s[e(133)])throw new n.CKEditorError(e(165),this);if(!s[e(152)])throw new n.CKEditorError(e(140),this);return this[e(131)][e(172)](window,e(186),(()=>this[e(185)]=!0)),this[e(131)][e(172)](window,e(127),(()=>this[e(185)]=!1)),this[e(130)][e(117)][e(160)](e(129),10),this[e(130)][e(117)][e(160)](e(148),20),u[e(125)][e(141)](s[e(133)],s[e(152)],{timeout:1e3*this[e(130)][e(117)][e(158)](e(129)),requestTimeout:1e3*this[e(130)][e(117)][e(158)](e(148))})[e(121)]((t=>{const r=e;if(this[r(153)]=t,this[r(176)](r(149)).to(t,r(149),this,r(185),((e,t)=>(r(187)!==e&&(this[r(118)]=!0),t||e!==o.WEB_SOCKET_GATEWAY_STATES[r(137)]?o.WEB_SOCKET_GATEWAY_STATES[r(124)]:this[r(149)]==o.WEB_SOCKET_GATEWAY_STATES[r(124)]&&this[r(118)]?(this[r(118)]=!1,this[r(180)](),o.WEB_SOCKET_GATEWAY_STATES[r(155)]):o.WEB_SOCKET_GATEWAY_STATES[r(137)]))),this[r(153)].on(r(122),((e,t)=>{const s=r;if(s(132)!==t[s(162)])throw console[s(122)](t),new n.CKEditorError(s(163),null,{originalError:t});i[s(126)](s(123),{title:s(143),namespace:s(142)})})),!t.me)return new Promise((e=>t.on(r(161),e)))}))[e(138)]((t=>{const r=e;throw console[r(122)](t),new n.CKEditorError(r(163),null,{originalError:t})}))}[a(168)](e){const t=a;if(t(181)!=typeof e[t(146)])throw new n.CKEditorError(t(144),this);if(this[t(182)](e))throw new n.CKEditorError(t(151),this,{name:e[t(119)][t(115)]});this[t(136)][t(170)](e)}[a(156)](e){const t=a;this[t(136)][t(169)](e)}[a(182)](e){const t=a;return this[t(136)][t(166)](e)}[a(180)](){const e=a;return this[e(153)][e(146)]()[e(121)]((()=>Promise[e(164)](Array[e(173)](this[e(136)],(t=>t[e(146)]())))))[e(121)]((()=>this[e(149)]=o.WEB_SOCKET_GATEWAY_STATES[e(137)]))[e(138)]((t=>{const r=e;throw console[r(122)](t),new n.CKEditorError(r(184),this[r(130)])}))}[a(159)](){const e=a;this[e(153)]&&this[e(153)][e(177)](),this[e(149)]=o.WEB_SOCKET_GATEWAY_STATES[e(124)],this[e(131)][e(145)](),super[e(159)]()}}u[a(125)]=o.WebSocketGateway,u[a(154)]=1e3;const d=u;var l=__webpack_require__(6211);function p(){const e=["3158985ceGonT","plugins","state","_registeredSessions","delete","user","sessionId","role","remove","values","pluginName","has","2488dOPuCz","context","148248avCTIK","_createUser","register","channelSessions","listenTo","fire","connection","addUser","584280sICkyC","channelConnectedUsers","connected","_users","5720071zIQPZM","getUserRole","forEach","isMe","getUserSessions","add","_handleSessionRemove","unregister","init","_uniqueUsersCount","get","clear","sessions-unregister-not-exist","getUser","_handleSessionAdd","1054832uiaXZj","getUserBySessionId","sessions-register-already-registered","size","mySessionId","Sessions","3274FeMSST","537wUVzeM","allConnectedUsers","requires","defineMe","assign","stopListening","sessionAdd:","52749DxRUfo","change:state","orderNumber","set"];return(p=function(){return e})()}const h=f;function f(e,t){const n=p();return(f=function(e,t){return n[e-=407]})(e,t)}!function(e,t){const n=f,r=e();for(;;)try{if(720992===-parseInt(n(436))/1*(-parseInt(n(435))/2)+parseInt(n(461))/3+parseInt(n(429))/4+parseInt(n(447))/5+-parseInt(n(410))/6+parseInt(n(414))/7+parseInt(n(459))/8*(-parseInt(n(443))/9))break;r.push(r.shift())}catch(e){r.push(r.shift())}}(p);class m extends t.ContextPlugin{static get[h(457)](){return h(434)}static get[h(438)](){return[d,l.Users]}constructor(e){const t=h;super(e),this[t(464)]=new Map,this[t(411)]=new Map,this[t(437)]=new n.Collection,this[t(450)]=new Map,this[t(423)]=0,this[t(413)]=this[t(460)][t(448)][t(424)](l.Users)}[h(422)](){const e=h,t=this[e(460)][e(448)][e(424)](d);this[e(465)](t,e(444),((t,n,r)=>{const s=e;if(s(412)!==r)this[s(464)][s(416)]((e=>e[s(425)]())),this[s(411)][s(416)]((e=>e[s(425)]())),this[s(437)][s(425)]();else for(const[e,t]of this[s(450)])for(const n of t)this[s(428)](e,n)})),this[e(462)](t[e(408)].me,!0)}[h(463)](e,t){const r=h;if(this[r(450)][r(458)](e))throw new n.CKEditorError(r(431),null,{channelId:e});this[r(450)][r(446)](e,t),this[r(464)][r(446)](e,new n.Collection),this[r(411)][r(446)](e,new n.Collection),this[r(465)](t,r(419),((t,n)=>this[r(428)](e,n))),this[r(465)](t,r(455),((t,n)=>this[r(420)](e,n)));for(const n of t)this[r(428)](e,n)}[h(421)](e){const t=h;if(!this[t(450)][t(458)](e))throw new n.CKEditorError(t(426),null,{channelId:e});const r=this[t(450)][t(424)](e);this[t(441)](r);for(const n of r)t(412)===this[t(460)][t(448)][t(424)](d)[t(449)]&&this[t(420)](e,n);this[t(450)][t(451)](e),this[t(464)][t(451)](e),this[t(411)][t(451)](e)}get[h(433)](){const e=h;return this[e(460)][e(448)][e(424)](d)[e(408)][e(453)]}[h(430)](e){const t=h;for(const n of this[t(464)][t(456)]())for(const r of n)if(r.id===e)return r[t(452)]}[h(418)](e,t){const n=h,r=t?[this[n(464)][n(424)](t)]:this[n(464)][n(456)](),s=new Set;for(const t of r)for(const r of t)r[n(452)].id===e.id&&s[n(419)](r.id);return s}[h(415)](e){const t=h;for(const n of this[t(464)][t(456)]())for(const r of n)if(r[t(452)]===e)return r[t(454)]}[h(428)](e,t){const n=h;if(n(412)!==this[n(460)][n(448)][n(424)](d)[n(449)])return;const r=t[n(452)],s=this[n(413)][n(427)](r.id)||this[n(462)](r),o=Object[n(440)]({},t,{user:s});this[n(464)][n(424)](e)[n(419)](o);const i=this[n(411)][n(424)](e);i[n(458)](s.id)||i[n(419)](s),this[n(437)][n(458)](s.id)||this[n(437)][n(419)](s,s[n(417)]?0:void 0),this[n(407)](n(442)+e,{channelId:e,session:o})}[h(420)](e,t){const n=h;if(n(412)!==this[n(460)][n(448)][n(424)](d)[n(449)])return;const r=this[n(411)][n(424)](e),s=t[n(452)];s.id&&(this[n(464)][n(424)](e)[n(455)](t.id),r[n(458)](s.id)&&!this[n(418)](s,e)[n(432)]&&r[n(455)](s.id),this[n(437)][n(424)](s.id)&&!this[n(418)](s)[n(432)]&&this[n(437)][n(455)](s.id))}[h(462)](e,t){const n=h,r=this[n(413)][n(409)](e);return t&&this[n(413)][n(439)](e.id),r[n(445)]=this[n(423)]++,r}}var y=__webpack_require__(4673),g=__webpack_require__.n(y),b=__webpack_require__(7535),O={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};g()(b.A,O);b.A.locals;const v=I;!function(e,t){const n=I,r=e();for(;;)try{if(455771===parseInt(n(404))/1*(-parseInt(n(439))/2)+parseInt(n(458))/3+parseInt(n(487))/4+parseInt(n(433))/5*(parseInt(n(437))/6)+parseInt(n(489))/7*(-parseInt(n(396))/8)+parseInt(n(500))/9*(-parseInt(n(472))/10)+-parseInt(n(402))/11*(parseInt(n(426))/12))break;r.push(r.shift())}catch(e){r.push(r.shift())}}(S);class w extends t.Plugin{static get[v(446)](){return[m]}static get[v(491)](){return v(493)}[v(447)](){const e=v,t=this[e(464)],n=t[e(480)][e(441)](m);t[e(468)][e(462)](e(449))[e(505)]({model:e(457),view:(r,{writer:s})=>function(t,n,r,s){const o=e,i=t[o(495)][o(483)](":")[2],a=r[o(398)](i);if(!a||i===r[o(504)])return;if(!s[o(444)][o(413)][o(454)](t[o(414)][o(442)],o(499)))return;const c={class:o(471)+a[o(461)][o(400)](),"data-name":a[o(401)],"data-session-id":i},u=s[o(444)][o(418)][o(441)](t[o(495)])[o(440)](),d=u[o(407)],l=s[o(444)][o(413)];if(d&&l[o(412)](d)&&l[o(494)](d)&&!s[o(444)][o(418)][o(441)](o(403)+i)[o(438)]()[o(478)])return;const p=u[o(425)];return s[o(444)][o(413)][o(397)](p)&&!s[o(444)][o(492)](p)&&(c[o(395)]=!1),function(e,t){const n=o,r=e[n(408)](n(502),t);return e[n(430)](n(399),!0,r),r[n(393)]=function(e){const t=n,r=this[t(484)](e);return r[t(469)]=t(497),r},r[n(416)]=function(e){const t=n;return!(!this[t(443)](t(399))||!e[t(443)](t(399))||this[t(429)](t(475))!=e[t(429)](t(475)))},r}(n,c)}(r,s,n,t)}),t[e(468)][e(462)](e(449))[e(417)]({model:e(436),view:t=>function(t,n){const r=e,s=t[r(495)][r(483)](":")[2];if(s===n[r(504)])return null;const o=n[r(398)](s);return o?{id:s,classes:[r(486),o[r(461)][r(394)]()],attributes:{"data-session-id":s},priority:2e3+o[r(450)]}:{id:s,classes:[]}}(t,n)}),function(t){const n=e,r=t[n(444)],o=new Map,i=t[n(480)][n(441)](m);r[n(418)].on(n(476),((e,a,c,u)=>{const d=n;if(!u&&o[d(441)](a[d(401)]))return o[d(441)](a[d(401)])[d(496)](),void o[d(481)](a[d(401)]);const l=a[d(401)][d(483)](":")[2];if(l===i[d(504)])return;const p=d(409)+l;r[d(418)][d(474)](p)&&t[d(470)][d(460)](p),a.on(d(421),((e,t,n)=>{const i=d;if(i(424)!=t[i(405)][i(465)]&&i(424)==a[i(438)]()[i(405)][i(465)]&&!o[i(474)](a[i(401)])){const e=r[i(413)][i(391)](n[i(453)]);if(e){const t=s.LiveRange[i(456)](e);o[i(451)](a[i(401)],t),t.on(i(421),((e,n,s)=>{const c=i;if(c(424)==t[c(405)][c(465)]){const e=r[c(413)][c(391)](s[c(453)]);e?(t[c(442)]=e[c(442)],t[c(503)]=e[c(503)]):(o[c(481)](a[c(401)]),t[c(496)]())}}))}}}))})),r[n(452)].on(n(435),(()=>{const e=n;o[e(415)]>0&&r[e(392)]({isUndoable:!1},(t=>{const n=e;for(const[e,s]of o)n(424)==r[n(418)][n(441)](e)[n(438)]()[n(405)][n(465)]&&(_(e[n(483)](":")[2],s[n(463)](),r,t),s[n(496)]());o[n(455)]()}))}))}(t)}[v(467)](){const e=v,t=this[e(464)],n=t[e(431)][e(441)](e(448));n&&t[e(444)].on(e(488),((r,s)=>{const o=e,i=s[0];if(o(434)!=i[o(479)]||!i[o(401)][o(406)](o(420)))return;const a=i[o(473)];n[o(466)][o(474)](a)&&(i[o(498)]=i[o(501)]?t[o(444)][o(485)](i[o(501)][o(442)],i[o(501)][o(503)]):null)}),{priority:e(482)})}[v(428)](){const e=v,t=this[e(464)],n=t[e(444)][e(452)],r=t[e(480)][e(441)](m);t[e(444)][e(392)]({isUndoable:!1},(s=>{const o=e,i=o(403)+r[o(504)],a=o(409)+r[o(504)],c=t[o(444)][o(418)][o(474)](i);t[o(470)][o(411)][o(423)]?_(r[o(504)],n[o(432)][o(490)](),t[o(444)],s):c&&(s[o(477)](i),s[o(477)](a))}))}}function I(e,t){const n=S();return(I=function(e,t){return n[e-=391]})(e,t)}function _(e,t,n,r){const s=v,o=s(403)+e,i=s(409)+e,a=t[s(427)]();let c=t[s(442)];a&&a.is(s(459),s(410))&&(c=function(e,t){const n=s;for(const r of e[n(445)]())if(t[n(413)][n(454)](r,n(499)))return r}(t,n),t=r[s(485)](c));const u=r[s(485)](c);n[s(418)][s(474)](o)?(r[s(419)](o,{range:t}),r[s(419)](i,{range:u})):(r[s(422)](o,{range:t,usingOperation:!0}),r[s(422)](i,{range:u,usingOperation:!0}))}function S(){const e=["type","plugins","delete","highest","split","toDomElement","createRange","ck-user__selection","3500976OSYluQ","applyOperation","7nfBNqg","getFirstRange","pluginName","hasContent","UserMarkers","isInline","markerName","detach",'⁠<span class="ck-user__marker-line" contenteditable="false"><span class="ck-user__marker-dot"></span></span>⁠',"newRange","$text","9FXLGzh","oldRange","span","end","mySessionId","markerToElement","getNearestSelectionRange","enqueueChange","render","getSelectionClass","contenteditable","1718168tPXfkk","isLimit","getUserBySessionId","userPositionMarker","getMarkerClass","name","11JaDldp","user:range:","8xLahAc","root","startsWith","nodeAfter","createUIElement","user:position:","tableCell","view","isObject","schema","markerRange","size","isSimilar","markerToHighlight","markers","updateMarker","user:","change:range","addMarker","hasDomSelection","$graveyard","parent","4016532HBxwVp","getContainedElement","createUserMarkerOperations","getAttribute","setCustomProperty","commands","selection","50YJemun","marker","change","user:range","6042QTBwCk","getRange","87664JFrZkg","getStart","get","start","getCustomProperty","model","getPositions","requires","init","undo","editingDowncast","orderNumber","set","document","deletionPosition","checkChild","clear","fromRange","user:position","2264016lIfKwz","element","reconvertMarker","color","for","toRange","editor","rootName","_createdBatches","afterInit","conversion","innerHTML","editing","ck-user__marker ","2840770NColPj","batch","has","data-session-id","update:user:range","removeMarker","isCollapsed"];return(S=function(){return e})()}function P(e,t,n){const r=e.t;switch(t){case"PENDING_ACTION_SENDING_DATA":return r({string:"Sending data to the server.",id:"PENDING_ACTION_SENDING_DATA"});case"The local document and server document differ and merging them can cause unexpected behavior. To not lose your content save it locally and refresh the editor.":return r("The local document and server document differ and merging them can cause unexpected behavior. To not lose your content save it locally and refresh the editor.");case"The document cannot be connected back to the server. To not lose your content save it locally and refresh the editor.":return r("The document cannot be connected back to the server. To not lose your content save it locally and refresh the editor.");case"The document details could not be taken during the reconnection. To not lose your content save it locally and refresh the editor.":return r("The document details could not be taken during the reconnection. To not lose your content save it locally and refresh the editor.");case"The last saved version of the document does not match the local version. To not lose your content save it locally and refresh the editor.":return r("The last saved version of the document does not match the local version. To not lose your content save it locally and refresh the editor.");case"Synchronization issue":return r("Synchronization issue");case"PENDING_ACTION_REVISION_HISTORY":return r({string:"Unsaved change in revision history.",id:"PENDING_ACTION_REVISION_HISTORY"});case"CONNECTED_USERS":return r({string:"1 connected user (me)",plural:"%0 connected users",id:"CONNECTED_USERS"},n);default:return""}}var A=__webpack_require__(1199);const T=A.Reader,k=A.Writer,C=A.util,E=A.roots.default||(A.roots.default={}),j=E.AttributeOperation=(()=>{function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.range=null,e.prototype.key="",e.prototype.oldValueBoolean=!1,e.prototype.oldValueJson="",e.prototype.newValueBoolean=!1,e.prototype.newValueJson="",e.prototype.wasUndone=!1,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=k.create()),null!=e.range&&Object.hasOwnProperty.call(e,"range")&&E.Range.encode(e.range,t.uint32(10).fork()).ldelim(),null!=e.key&&Object.hasOwnProperty.call(e,"key")&&t.uint32(18).string(e.key),null!=e.oldValueBoolean&&Object.hasOwnProperty.call(e,"oldValueBoolean")&&t.uint32(24).bool(e.oldValueBoolean),null!=e.oldValueJson&&Object.hasOwnProperty.call(e,"oldValueJson")&&t.uint32(34).string(e.oldValueJson),null!=e.newValueBoolean&&Object.hasOwnProperty.call(e,"newValueBoolean")&&t.uint32(40).bool(e.newValueBoolean),null!=e.newValueJson&&Object.hasOwnProperty.call(e,"newValueJson")&&t.uint32(50).string(e.newValueJson),null!=e.wasUndone&&Object.hasOwnProperty.call(e,"wasUndone")&&t.uint32(56).bool(e.wasUndone),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof T||(e=T.create(e));let n=void 0===t?e.len:e.pos+t,r=new E.AttributeOperation;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.range=E.Range.decode(e,e.uint32());break;case 2:r.key=e.string();break;case 3:r.oldValueBoolean=e.bool();break;case 4:r.oldValueJson=e.string();break;case 5:r.newValueBoolean=e.bool();break;case 6:r.newValueJson=e.string();break;case 7:r.wasUndone=e.bool();break;default:e.skipType(7&t)}}return r},e.decodeDelimited=function(e){return e instanceof T||(e=new T(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.range&&e.hasOwnProperty("range")){let t=E.Range.verify(e.range);if(t)return"range."+t}return null!=e.key&&e.hasOwnProperty("key")&&!C.isString(e.key)?"key: string expected":null!=e.oldValueBoolean&&e.hasOwnProperty("oldValueBoolean")&&"boolean"!=typeof e.oldValueBoolean?"oldValueBoolean: boolean expected":null!=e.oldValueJson&&e.hasOwnProperty("oldValueJson")&&!C.isString(e.oldValueJson)?"oldValueJson: string expected":null!=e.newValueBoolean&&e.hasOwnProperty("newValueBoolean")&&"boolean"!=typeof e.newValueBoolean?"newValueBoolean: boolean expected":null!=e.newValueJson&&e.hasOwnProperty("newValueJson")&&!C.isString(e.newValueJson)?"newValueJson: string expected":null!=e.wasUndone&&e.hasOwnProperty("wasUndone")&&"boolean"!=typeof e.wasUndone?"wasUndone: boolean expected":null},e.fromObject=function(e){if(e instanceof E.AttributeOperation)return e;let t=new E.AttributeOperation;if(null!=e.range){if("object"!=typeof e.range)throw TypeError(".AttributeOperation.range: object expected");t.range=E.Range.fromObject(e.range)}return null!=e.key&&(t.key=String(e.key)),null!=e.oldValueBoolean&&(t.oldValueBoolean=Boolean(e.oldValueBoolean)),null!=e.oldValueJson&&(t.oldValueJson=String(e.oldValueJson)),null!=e.newValueBoolean&&(t.newValueBoolean=Boolean(e.newValueBoolean)),null!=e.newValueJson&&(t.newValueJson=String(e.newValueJson)),null!=e.wasUndone&&(t.wasUndone=Boolean(e.wasUndone)),t},e.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.range=null,n.key="",n.oldValueBoolean=!1,n.oldValueJson="",n.newValueBoolean=!1,n.newValueJson="",n.wasUndone=!1),null!=e.range&&e.hasOwnProperty("range")&&(n.range=E.Range.toObject(e.range,t)),null!=e.key&&e.hasOwnProperty("key")&&(n.key=e.key),null!=e.oldValueBoolean&&e.hasOwnProperty("oldValueBoolean")&&(n.oldValueBoolean=e.oldValueBoolean),null!=e.oldValueJson&&e.hasOwnProperty("oldValueJson")&&(n.oldValueJson=e.oldValueJson),null!=e.newValueBoolean&&e.hasOwnProperty("newValueBoolean")&&(n.newValueBoolean=e.newValueBoolean),null!=e.newValueJson&&e.hasOwnProperty("newValueJson")&&(n.newValueJson=e.newValueJson),null!=e.wasUndone&&e.hasOwnProperty("wasUndone")&&(n.wasUndone=e.wasUndone),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,A.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/AttributeOperation"},e})(),D=E.InsertOperation=(()=>{function e(e){if(this.nodes=[],e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.position=null,e.prototype.nodes=C.emptyArray,e.prototype.shouldReceiveAttributes=!1,e.prototype.wasUndone=!1,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=k.create()),null!=e.position&&Object.hasOwnProperty.call(e,"position")&&E.Position.encode(e.position,t.uint32(10).fork()).ldelim(),null!=e.nodes&&e.nodes.length)for(let n=0;n<e.nodes.length;++n)E.Element.encode(e.nodes[n],t.uint32(18).fork()).ldelim();return null!=e.shouldReceiveAttributes&&Object.hasOwnProperty.call(e,"shouldReceiveAttributes")&&t.uint32(24).bool(e.shouldReceiveAttributes),null!=e.wasUndone&&Object.hasOwnProperty.call(e,"wasUndone")&&t.uint32(32).bool(e.wasUndone),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof T||(e=T.create(e));let n=void 0===t?e.len:e.pos+t,r=new E.InsertOperation;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.position=E.Position.decode(e,e.uint32());break;case 2:r.nodes&&r.nodes.length||(r.nodes=[]),r.nodes.push(E.Element.decode(e,e.uint32()));break;case 3:r.shouldReceiveAttributes=e.bool();break;case 4:r.wasUndone=e.bool();break;default:e.skipType(7&t)}}return r},e.decodeDelimited=function(e){return e instanceof T||(e=new T(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.position&&e.hasOwnProperty("position")){let t=E.Position.verify(e.position);if(t)return"position."+t}if(null!=e.nodes&&e.hasOwnProperty("nodes")){if(!Array.isArray(e.nodes))return"nodes: array expected";for(let t=0;t<e.nodes.length;++t){let n=E.Element.verify(e.nodes[t]);if(n)return"nodes."+n}}return null!=e.shouldReceiveAttributes&&e.hasOwnProperty("shouldReceiveAttributes")&&"boolean"!=typeof e.shouldReceiveAttributes?"shouldReceiveAttributes: boolean expected":null!=e.wasUndone&&e.hasOwnProperty("wasUndone")&&"boolean"!=typeof e.wasUndone?"wasUndone: boolean expected":null},e.fromObject=function(e){if(e instanceof E.InsertOperation)return e;let t=new E.InsertOperation;if(null!=e.position){if("object"!=typeof e.position)throw TypeError(".InsertOperation.position: object expected");t.position=E.Position.fromObject(e.position)}if(e.nodes){if(!Array.isArray(e.nodes))throw TypeError(".InsertOperation.nodes: array expected");t.nodes=[];for(let n=0;n<e.nodes.length;++n){if("object"!=typeof e.nodes[n])throw TypeError(".InsertOperation.nodes: object expected");t.nodes[n]=E.Element.fromObject(e.nodes[n])}}return null!=e.shouldReceiveAttributes&&(t.shouldReceiveAttributes=Boolean(e.shouldReceiveAttributes)),null!=e.wasUndone&&(t.wasUndone=Boolean(e.wasUndone)),t},e.toObject=function(e,t){t||(t={});let n={};if((t.arrays||t.defaults)&&(n.nodes=[]),t.defaults&&(n.position=null,n.shouldReceiveAttributes=!1,n.wasUndone=!1),null!=e.position&&e.hasOwnProperty("position")&&(n.position=E.Position.toObject(e.position,t)),e.nodes&&e.nodes.length){n.nodes=[];for(let r=0;r<e.nodes.length;++r)n.nodes[r]=E.Element.toObject(e.nodes[r],t)}return null!=e.shouldReceiveAttributes&&e.hasOwnProperty("shouldReceiveAttributes")&&(n.shouldReceiveAttributes=e.shouldReceiveAttributes),null!=e.wasUndone&&e.hasOwnProperty("wasUndone")&&(n.wasUndone=e.wasUndone),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,A.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/InsertOperation"},e})(),R=E.MarkerOperation=(()=>{function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.name="",e.prototype.oldRange=null,e.prototype.newRange=null,e.prototype.affectsData=!1,e.prototype.wasUndone=!1,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=k.create()),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.oldRange&&Object.hasOwnProperty.call(e,"oldRange")&&E.Range.encode(e.oldRange,t.uint32(18).fork()).ldelim(),null!=e.newRange&&Object.hasOwnProperty.call(e,"newRange")&&E.Range.encode(e.newRange,t.uint32(26).fork()).ldelim(),null!=e.affectsData&&Object.hasOwnProperty.call(e,"affectsData")&&t.uint32(32).bool(e.affectsData),null!=e.wasUndone&&Object.hasOwnProperty.call(e,"wasUndone")&&t.uint32(40).bool(e.wasUndone),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof T||(e=T.create(e));let n=void 0===t?e.len:e.pos+t,r=new E.MarkerOperation;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.name=e.string();break;case 2:r.oldRange=E.Range.decode(e,e.uint32());break;case 3:r.newRange=E.Range.decode(e,e.uint32());break;case 4:r.affectsData=e.bool();break;case 5:r.wasUndone=e.bool();break;default:e.skipType(7&t)}}return r},e.decodeDelimited=function(e){return e instanceof T||(e=new T(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.name&&e.hasOwnProperty("name")&&!C.isString(e.name))return"name: string expected";if(null!=e.oldRange&&e.hasOwnProperty("oldRange")){let t=E.Range.verify(e.oldRange);if(t)return"oldRange."+t}if(null!=e.newRange&&e.hasOwnProperty("newRange")){let t=E.Range.verify(e.newRange);if(t)return"newRange."+t}return null!=e.affectsData&&e.hasOwnProperty("affectsData")&&"boolean"!=typeof e.affectsData?"affectsData: boolean expected":null!=e.wasUndone&&e.hasOwnProperty("wasUndone")&&"boolean"!=typeof e.wasUndone?"wasUndone: boolean expected":null},e.fromObject=function(e){if(e instanceof E.MarkerOperation)return e;let t=new E.MarkerOperation;if(null!=e.name&&(t.name=String(e.name)),null!=e.oldRange){if("object"!=typeof e.oldRange)throw TypeError(".MarkerOperation.oldRange: object expected");t.oldRange=E.Range.fromObject(e.oldRange)}if(null!=e.newRange){if("object"!=typeof e.newRange)throw TypeError(".MarkerOperation.newRange: object expected");t.newRange=E.Range.fromObject(e.newRange)}return null!=e.affectsData&&(t.affectsData=Boolean(e.affectsData)),null!=e.wasUndone&&(t.wasUndone=Boolean(e.wasUndone)),t},e.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.name="",n.oldRange=null,n.newRange=null,n.affectsData=!1,n.wasUndone=!1),null!=e.name&&e.hasOwnProperty("name")&&(n.name=e.name),null!=e.oldRange&&e.hasOwnProperty("oldRange")&&(n.oldRange=E.Range.toObject(e.oldRange,t)),null!=e.newRange&&e.hasOwnProperty("newRange")&&(n.newRange=E.Range.toObject(e.newRange,t)),null!=e.affectsData&&e.hasOwnProperty("affectsData")&&(n.affectsData=e.affectsData),null!=e.wasUndone&&e.hasOwnProperty("wasUndone")&&(n.wasUndone=e.wasUndone),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,A.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/MarkerOperation"},e})(),M=E.MergeOperation=(()=>{function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.sourcePosition=null,e.prototype.targetPosition=null,e.prototype.graveyardPosition=null,e.prototype.howMany=0,e.prototype.wasUndone=!1,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=k.create()),null!=e.sourcePosition&&Object.hasOwnProperty.call(e,"sourcePosition")&&E.Position.encode(e.sourcePosition,t.uint32(10).fork()).ldelim(),null!=e.targetPosition&&Object.hasOwnProperty.call(e,"targetPosition")&&E.Position.encode(e.targetPosition,t.uint32(18).fork()).ldelim(),null!=e.graveyardPosition&&Object.hasOwnProperty.call(e,"graveyardPosition")&&E.Position.encode(e.graveyardPosition,t.uint32(26).fork()).ldelim(),null!=e.howMany&&Object.hasOwnProperty.call(e,"howMany")&&t.uint32(32).uint32(e.howMany),null!=e.wasUndone&&Object.hasOwnProperty.call(e,"wasUndone")&&t.uint32(40).bool(e.wasUndone),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof T||(e=T.create(e));let n=void 0===t?e.len:e.pos+t,r=new E.MergeOperation;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.sourcePosition=E.Position.decode(e,e.uint32());break;case 2:r.targetPosition=E.Position.decode(e,e.uint32());break;case 3:r.graveyardPosition=E.Position.decode(e,e.uint32());break;case 4:r.howMany=e.uint32();break;case 5:r.wasUndone=e.bool();break;default:e.skipType(7&t)}}return r},e.decodeDelimited=function(e){return e instanceof T||(e=new T(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.sourcePosition&&e.hasOwnProperty("sourcePosition")){let t=E.Position.verify(e.sourcePosition);if(t)return"sourcePosition."+t}if(null!=e.targetPosition&&e.hasOwnProperty("targetPosition")){let t=E.Position.verify(e.targetPosition);if(t)return"targetPosition."+t}if(null!=e.graveyardPosition&&e.hasOwnProperty("graveyardPosition")){let t=E.Position.verify(e.graveyardPosition);if(t)return"graveyardPosition."+t}return null!=e.howMany&&e.hasOwnProperty("howMany")&&!C.isInteger(e.howMany)?"howMany: integer expected":null!=e.wasUndone&&e.hasOwnProperty("wasUndone")&&"boolean"!=typeof e.wasUndone?"wasUndone: boolean expected":null},e.fromObject=function(e){if(e instanceof E.MergeOperation)return e;let t=new E.MergeOperation;if(null!=e.sourcePosition){if("object"!=typeof e.sourcePosition)throw TypeError(".MergeOperation.sourcePosition: object expected");t.sourcePosition=E.Position.fromObject(e.sourcePosition)}if(null!=e.targetPosition){if("object"!=typeof e.targetPosition)throw TypeError(".MergeOperation.targetPosition: object expected");t.targetPosition=E.Position.fromObject(e.targetPosition)}if(null!=e.graveyardPosition){if("object"!=typeof e.graveyardPosition)throw TypeError(".MergeOperation.graveyardPosition: object expected");t.graveyardPosition=E.Position.fromObject(e.graveyardPosition)}return null!=e.howMany&&(t.howMany=e.howMany>>>0),null!=e.wasUndone&&(t.wasUndone=Boolean(e.wasUndone)),t},e.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.sourcePosition=null,n.targetPosition=null,n.graveyardPosition=null,n.howMany=0,n.wasUndone=!1),null!=e.sourcePosition&&e.hasOwnProperty("sourcePosition")&&(n.sourcePosition=E.Position.toObject(e.sourcePosition,t)),null!=e.targetPosition&&e.hasOwnProperty("targetPosition")&&(n.targetPosition=E.Position.toObject(e.targetPosition,t)),null!=e.graveyardPosition&&e.hasOwnProperty("graveyardPosition")&&(n.graveyardPosition=E.Position.toObject(e.graveyardPosition,t)),null!=e.howMany&&e.hasOwnProperty("howMany")&&(n.howMany=e.howMany),null!=e.wasUndone&&e.hasOwnProperty("wasUndone")&&(n.wasUndone=e.wasUndone),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,A.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/MergeOperation"},e})(),N=E.MoveOperation=(()=>{function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.sourcePosition=null,e.prototype.howMany=0,e.prototype.targetPosition=null,e.prototype.wasUndone=!1,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=k.create()),null!=e.sourcePosition&&Object.hasOwnProperty.call(e,"sourcePosition")&&E.Position.encode(e.sourcePosition,t.uint32(10).fork()).ldelim(),null!=e.howMany&&Object.hasOwnProperty.call(e,"howMany")&&t.uint32(16).uint32(e.howMany),null!=e.targetPosition&&Object.hasOwnProperty.call(e,"targetPosition")&&E.Position.encode(e.targetPosition,t.uint32(26).fork()).ldelim(),null!=e.wasUndone&&Object.hasOwnProperty.call(e,"wasUndone")&&t.uint32(32).bool(e.wasUndone),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof T||(e=T.create(e));let n=void 0===t?e.len:e.pos+t,r=new E.MoveOperation;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.sourcePosition=E.Position.decode(e,e.uint32());break;case 2:r.howMany=e.uint32();break;case 3:r.targetPosition=E.Position.decode(e,e.uint32());break;case 4:r.wasUndone=e.bool();break;default:e.skipType(7&t)}}return r},e.decodeDelimited=function(e){return e instanceof T||(e=new T(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.sourcePosition&&e.hasOwnProperty("sourcePosition")){let t=E.Position.verify(e.sourcePosition);if(t)return"sourcePosition."+t}if(null!=e.howMany&&e.hasOwnProperty("howMany")&&!C.isInteger(e.howMany))return"howMany: integer expected";if(null!=e.targetPosition&&e.hasOwnProperty("targetPosition")){let t=E.Position.verify(e.targetPosition);if(t)return"targetPosition."+t}return null!=e.wasUndone&&e.hasOwnProperty("wasUndone")&&"boolean"!=typeof e.wasUndone?"wasUndone: boolean expected":null},e.fromObject=function(e){if(e instanceof E.MoveOperation)return e;let t=new E.MoveOperation;if(null!=e.sourcePosition){if("object"!=typeof e.sourcePosition)throw TypeError(".MoveOperation.sourcePosition: object expected");t.sourcePosition=E.Position.fromObject(e.sourcePosition)}if(null!=e.howMany&&(t.howMany=e.howMany>>>0),null!=e.targetPosition){if("object"!=typeof e.targetPosition)throw TypeError(".MoveOperation.targetPosition: object expected");t.targetPosition=E.Position.fromObject(e.targetPosition)}return null!=e.wasUndone&&(t.wasUndone=Boolean(e.wasUndone)),t},e.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.sourcePosition=null,n.howMany=0,n.targetPosition=null,n.wasUndone=!1),null!=e.sourcePosition&&e.hasOwnProperty("sourcePosition")&&(n.sourcePosition=E.Position.toObject(e.sourcePosition,t)),null!=e.howMany&&e.hasOwnProperty("howMany")&&(n.howMany=e.howMany),null!=e.targetPosition&&e.hasOwnProperty("targetPosition")&&(n.targetPosition=E.Position.toObject(e.targetPosition,t)),null!=e.wasUndone&&e.hasOwnProperty("wasUndone")&&(n.wasUndone=e.wasUndone),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,A.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/MoveOperation"},e})(),x=E.RenameOperation=(()=>{function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.position=null,e.prototype.oldName="",e.prototype.newName="",e.prototype.wasUndone=!1,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=k.create()),null!=e.position&&Object.hasOwnProperty.call(e,"position")&&E.Position.encode(e.position,t.uint32(10).fork()).ldelim(),null!=e.oldName&&Object.hasOwnProperty.call(e,"oldName")&&t.uint32(18).string(e.oldName),null!=e.newName&&Object.hasOwnProperty.call(e,"newName")&&t.uint32(26).string(e.newName),null!=e.wasUndone&&Object.hasOwnProperty.call(e,"wasUndone")&&t.uint32(32).bool(e.wasUndone),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof T||(e=T.create(e));let n=void 0===t?e.len:e.pos+t,r=new E.RenameOperation;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.position=E.Position.decode(e,e.uint32());break;case 2:r.oldName=e.string();break;case 3:r.newName=e.string();break;case 4:r.wasUndone=e.bool();break;default:e.skipType(7&t)}}return r},e.decodeDelimited=function(e){return e instanceof T||(e=new T(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.position&&e.hasOwnProperty("position")){let t=E.Position.verify(e.position);if(t)return"position."+t}return null!=e.oldName&&e.hasOwnProperty("oldName")&&!C.isString(e.oldName)?"oldName: string expected":null!=e.newName&&e.hasOwnProperty("newName")&&!C.isString(e.newName)?"newName: string expected":null!=e.wasUndone&&e.hasOwnProperty("wasUndone")&&"boolean"!=typeof e.wasUndone?"wasUndone: boolean expected":null},e.fromObject=function(e){if(e instanceof E.RenameOperation)return e;let t=new E.RenameOperation;if(null!=e.position){if("object"!=typeof e.position)throw TypeError(".RenameOperation.position: object expected");t.position=E.Position.fromObject(e.position)}return null!=e.oldName&&(t.oldName=String(e.oldName)),null!=e.newName&&(t.newName=String(e.newName)),null!=e.wasUndone&&(t.wasUndone=Boolean(e.wasUndone)),t},e.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.position=null,n.oldName="",n.newName="",n.wasUndone=!1),null!=e.position&&e.hasOwnProperty("position")&&(n.position=E.Position.toObject(e.position,t)),null!=e.oldName&&e.hasOwnProperty("oldName")&&(n.oldName=e.oldName),null!=e.newName&&e.hasOwnProperty("newName")&&(n.newName=e.newName),null!=e.wasUndone&&e.hasOwnProperty("wasUndone")&&(n.wasUndone=e.wasUndone),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,A.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/RenameOperation"},e})(),V=E.RootAttributeOperation=(()=>{function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.root="",e.prototype.key="",e.prototype.oldValueBoolean=!1,e.prototype.oldValueJson="",e.prototype.newValueBoolean=!1,e.prototype.newValueJson="",e.prototype.wasUndone=!1,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=k.create()),null!=e.root&&Object.hasOwnProperty.call(e,"root")&&t.uint32(10).string(e.root),null!=e.key&&Object.hasOwnProperty.call(e,"key")&&t.uint32(18).string(e.key),null!=e.oldValueBoolean&&Object.hasOwnProperty.call(e,"oldValueBoolean")&&t.uint32(24).bool(e.oldValueBoolean),null!=e.oldValueJson&&Object.hasOwnProperty.call(e,"oldValueJson")&&t.uint32(34).string(e.oldValueJson),null!=e.newValueBoolean&&Object.hasOwnProperty.call(e,"newValueBoolean")&&t.uint32(40).bool(e.newValueBoolean),null!=e.newValueJson&&Object.hasOwnProperty.call(e,"newValueJson")&&t.uint32(50).string(e.newValueJson),null!=e.wasUndone&&Object.hasOwnProperty.call(e,"wasUndone")&&t.uint32(56).bool(e.wasUndone),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof T||(e=T.create(e));let n=void 0===t?e.len:e.pos+t,r=new E.RootAttributeOperation;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.root=e.string();break;case 2:r.key=e.string();break;case 3:r.oldValueBoolean=e.bool();break;case 4:r.oldValueJson=e.string();break;case 5:r.newValueBoolean=e.bool();break;case 6:r.newValueJson=e.string();break;case 7:r.wasUndone=e.bool();break;default:e.skipType(7&t)}}return r},e.decodeDelimited=function(e){return e instanceof T||(e=new T(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.root&&e.hasOwnProperty("root")&&!C.isString(e.root)?"root: string expected":null!=e.key&&e.hasOwnProperty("key")&&!C.isString(e.key)?"key: string expected":null!=e.oldValueBoolean&&e.hasOwnProperty("oldValueBoolean")&&"boolean"!=typeof e.oldValueBoolean?"oldValueBoolean: boolean expected":null!=e.oldValueJson&&e.hasOwnProperty("oldValueJson")&&!C.isString(e.oldValueJson)?"oldValueJson: string expected":null!=e.newValueBoolean&&e.hasOwnProperty("newValueBoolean")&&"boolean"!=typeof e.newValueBoolean?"newValueBoolean: boolean expected":null!=e.newValueJson&&e.hasOwnProperty("newValueJson")&&!C.isString(e.newValueJson)?"newValueJson: string expected":null!=e.wasUndone&&e.hasOwnProperty("wasUndone")&&"boolean"!=typeof e.wasUndone?"wasUndone: boolean expected":null},e.fromObject=function(e){if(e instanceof E.RootAttributeOperation)return e;let t=new E.RootAttributeOperation;return null!=e.root&&(t.root=String(e.root)),null!=e.key&&(t.key=String(e.key)),null!=e.oldValueBoolean&&(t.oldValueBoolean=Boolean(e.oldValueBoolean)),null!=e.oldValueJson&&(t.oldValueJson=String(e.oldValueJson)),null!=e.newValueBoolean&&(t.newValueBoolean=Boolean(e.newValueBoolean)),null!=e.newValueJson&&(t.newValueJson=String(e.newValueJson)),null!=e.wasUndone&&(t.wasUndone=Boolean(e.wasUndone)),t},e.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.root="",n.key="",n.oldValueBoolean=!1,n.oldValueJson="",n.newValueBoolean=!1,n.newValueJson="",n.wasUndone=!1),null!=e.root&&e.hasOwnProperty("root")&&(n.root=e.root),null!=e.key&&e.hasOwnProperty("key")&&(n.key=e.key),null!=e.oldValueBoolean&&e.hasOwnProperty("oldValueBoolean")&&(n.oldValueBoolean=e.oldValueBoolean),null!=e.oldValueJson&&e.hasOwnProperty("oldValueJson")&&(n.oldValueJson=e.oldValueJson),null!=e.newValueBoolean&&e.hasOwnProperty("newValueBoolean")&&(n.newValueBoolean=e.newValueBoolean),null!=e.newValueJson&&e.hasOwnProperty("newValueJson")&&(n.newValueJson=e.newValueJson),null!=e.wasUndone&&e.hasOwnProperty("wasUndone")&&(n.wasUndone=e.wasUndone),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,A.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/RootAttributeOperation"},e})(),B=E.RootOperation=(()=>{function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.rootName="",e.prototype.elementName="",e.prototype.isAdd=!1,e.prototype.wasUndone=!1,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=k.create()),null!=e.rootName&&Object.hasOwnProperty.call(e,"rootName")&&t.uint32(10).string(e.rootName),null!=e.elementName&&Object.hasOwnProperty.call(e,"elementName")&&t.uint32(18).string(e.elementName),null!=e.isAdd&&Object.hasOwnProperty.call(e,"isAdd")&&t.uint32(24).bool(e.isAdd),null!=e.wasUndone&&Object.hasOwnProperty.call(e,"wasUndone")&&t.uint32(32).bool(e.wasUndone),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof T||(e=T.create(e));let n=void 0===t?e.len:e.pos+t,r=new E.RootOperation;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.rootName=e.string();break;case 2:r.elementName=e.string();break;case 3:r.isAdd=e.bool();break;case 4:r.wasUndone=e.bool();break;default:e.skipType(7&t)}}return r},e.decodeDelimited=function(e){return e instanceof T||(e=new T(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.rootName&&e.hasOwnProperty("rootName")&&!C.isString(e.rootName)?"rootName: string expected":null!=e.elementName&&e.hasOwnProperty("elementName")&&!C.isString(e.elementName)?"elementName: string expected":null!=e.isAdd&&e.hasOwnProperty("isAdd")&&"boolean"!=typeof e.isAdd?"isAdd: boolean expected":null!=e.wasUndone&&e.hasOwnProperty("wasUndone")&&"boolean"!=typeof e.wasUndone?"wasUndone: boolean expected":null},e.fromObject=function(e){if(e instanceof E.RootOperation)return e;let t=new E.RootOperation;return null!=e.rootName&&(t.rootName=String(e.rootName)),null!=e.elementName&&(t.elementName=String(e.elementName)),null!=e.isAdd&&(t.isAdd=Boolean(e.isAdd)),null!=e.wasUndone&&(t.wasUndone=Boolean(e.wasUndone)),t},e.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.rootName="",n.elementName="",n.isAdd=!1,n.wasUndone=!1),null!=e.rootName&&e.hasOwnProperty("rootName")&&(n.rootName=e.rootName),null!=e.elementName&&e.hasOwnProperty("elementName")&&(n.elementName=e.elementName),null!=e.isAdd&&e.hasOwnProperty("isAdd")&&(n.isAdd=e.isAdd),null!=e.wasUndone&&e.hasOwnProperty("wasUndone")&&(n.wasUndone=e.wasUndone),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,A.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/RootOperation"},e})(),U=E.SplitOperation=(()=>{function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.splitPosition=null,e.prototype.graveyardPosition=null,e.prototype.howMany=0,e.prototype.insertionPosition=null,e.prototype.wasUndone=!1,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=k.create()),null!=e.splitPosition&&Object.hasOwnProperty.call(e,"splitPosition")&&E.Position.encode(e.splitPosition,t.uint32(10).fork()).ldelim(),null!=e.graveyardPosition&&Object.hasOwnProperty.call(e,"graveyardPosition")&&E.Position.encode(e.graveyardPosition,t.uint32(18).fork()).ldelim(),null!=e.howMany&&Object.hasOwnProperty.call(e,"howMany")&&t.uint32(24).uint32(e.howMany),null!=e.insertionPosition&&Object.hasOwnProperty.call(e,"insertionPosition")&&E.Position.encode(e.insertionPosition,t.uint32(34).fork()).ldelim(),null!=e.wasUndone&&Object.hasOwnProperty.call(e,"wasUndone")&&t.uint32(40).bool(e.wasUndone),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof T||(e=T.create(e));let n=void 0===t?e.len:e.pos+t,r=new E.SplitOperation;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.splitPosition=E.Position.decode(e,e.uint32());break;case 2:r.graveyardPosition=E.Position.decode(e,e.uint32());break;case 3:r.howMany=e.uint32();break;case 4:r.insertionPosition=E.Position.decode(e,e.uint32());break;case 5:r.wasUndone=e.bool();break;default:e.skipType(7&t)}}return r},e.decodeDelimited=function(e){return e instanceof T||(e=new T(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.splitPosition&&e.hasOwnProperty("splitPosition")){let t=E.Position.verify(e.splitPosition);if(t)return"splitPosition."+t}if(null!=e.graveyardPosition&&e.hasOwnProperty("graveyardPosition")){let t=E.Position.verify(e.graveyardPosition);if(t)return"graveyardPosition."+t}if(null!=e.howMany&&e.hasOwnProperty("howMany")&&!C.isInteger(e.howMany))return"howMany: integer expected";if(null!=e.insertionPosition&&e.hasOwnProperty("insertionPosition")){let t=E.Position.verify(e.insertionPosition);if(t)return"insertionPosition."+t}return null!=e.wasUndone&&e.hasOwnProperty("wasUndone")&&"boolean"!=typeof e.wasUndone?"wasUndone: boolean expected":null},e.fromObject=function(e){if(e instanceof E.SplitOperation)return e;let t=new E.SplitOperation;if(null!=e.splitPosition){if("object"!=typeof e.splitPosition)throw TypeError(".SplitOperation.splitPosition: object expected");t.splitPosition=E.Position.fromObject(e.splitPosition)}if(null!=e.graveyardPosition){if("object"!=typeof e.graveyardPosition)throw TypeError(".SplitOperation.graveyardPosition: object expected");t.graveyardPosition=E.Position.fromObject(e.graveyardPosition)}if(null!=e.howMany&&(t.howMany=e.howMany>>>0),null!=e.insertionPosition){if("object"!=typeof e.insertionPosition)throw TypeError(".SplitOperation.insertionPosition: object expected");t.insertionPosition=E.Position.fromObject(e.insertionPosition)}return null!=e.wasUndone&&(t.wasUndone=Boolean(e.wasUndone)),t},e.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.splitPosition=null,n.graveyardPosition=null,n.howMany=0,n.insertionPosition=null,n.wasUndone=!1),null!=e.splitPosition&&e.hasOwnProperty("splitPosition")&&(n.splitPosition=E.Position.toObject(e.splitPosition,t)),null!=e.graveyardPosition&&e.hasOwnProperty("graveyardPosition")&&(n.graveyardPosition=E.Position.toObject(e.graveyardPosition,t)),null!=e.howMany&&e.hasOwnProperty("howMany")&&(n.howMany=e.howMany),null!=e.insertionPosition&&e.hasOwnProperty("insertionPosition")&&(n.insertionPosition=E.Position.toObject(e.insertionPosition,t)),null!=e.wasUndone&&e.hasOwnProperty("wasUndone")&&(n.wasUndone=e.wasUndone),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,A.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/SplitOperation"},e})(),J=E.Position=(()=>{function e(e){if(this.path=[],e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.root="",e.prototype.rootMain=!1,e.prototype.rootGraveyard=!1,e.prototype.path=C.emptyArray,e.prototype.stickiness="",e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=k.create()),null!=e.root&&Object.hasOwnProperty.call(e,"root")&&t.uint32(10).string(e.root),null!=e.rootMain&&Object.hasOwnProperty.call(e,"rootMain")&&t.uint32(16).bool(e.rootMain),null!=e.rootGraveyard&&Object.hasOwnProperty.call(e,"rootGraveyard")&&t.uint32(24).bool(e.rootGraveyard),null!=e.path&&e.path.length){t.uint32(34).fork();for(let n=0;n<e.path.length;++n)t.uint32(e.path[n]);t.ldelim()}return null!=e.stickiness&&Object.hasOwnProperty.call(e,"stickiness")&&t.uint32(42).string(e.stickiness),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof T||(e=T.create(e));let n=void 0===t?e.len:e.pos+t,r=new E.Position;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.root=e.string();break;case 2:r.rootMain=e.bool();break;case 3:r.rootGraveyard=e.bool();break;case 4:if(r.path&&r.path.length||(r.path=[]),2==(7&t)){let t=e.uint32()+e.pos;for(;e.pos<t;)r.path.push(e.uint32())}else r.path.push(e.uint32());break;case 5:r.stickiness=e.string();break;default:e.skipType(7&t)}}return r},e.decodeDelimited=function(e){return e instanceof T||(e=new T(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.root&&e.hasOwnProperty("root")&&!C.isString(e.root))return"root: string expected";if(null!=e.rootMain&&e.hasOwnProperty("rootMain")&&"boolean"!=typeof e.rootMain)return"rootMain: boolean expected";if(null!=e.rootGraveyard&&e.hasOwnProperty("rootGraveyard")&&"boolean"!=typeof e.rootGraveyard)return"rootGraveyard: boolean expected";if(null!=e.path&&e.hasOwnProperty("path")){if(!Array.isArray(e.path))return"path: array expected";for(let t=0;t<e.path.length;++t)if(!C.isInteger(e.path[t]))return"path: integer[] expected"}return null!=e.stickiness&&e.hasOwnProperty("stickiness")&&!C.isString(e.stickiness)?"stickiness: string expected":null},e.fromObject=function(e){if(e instanceof E.Position)return e;let t=new E.Position;if(null!=e.root&&(t.root=String(e.root)),null!=e.rootMain&&(t.rootMain=Boolean(e.rootMain)),null!=e.rootGraveyard&&(t.rootGraveyard=Boolean(e.rootGraveyard)),e.path){if(!Array.isArray(e.path))throw TypeError(".Position.path: array expected");t.path=[];for(let n=0;n<e.path.length;++n)t.path[n]=e.path[n]>>>0}return null!=e.stickiness&&(t.stickiness=String(e.stickiness)),t},e.toObject=function(e,t){t||(t={});let n={};if((t.arrays||t.defaults)&&(n.path=[]),t.defaults&&(n.root="",n.rootMain=!1,n.rootGraveyard=!1,n.stickiness=""),null!=e.root&&e.hasOwnProperty("root")&&(n.root=e.root),null!=e.rootMain&&e.hasOwnProperty("rootMain")&&(n.rootMain=e.rootMain),null!=e.rootGraveyard&&e.hasOwnProperty("rootGraveyard")&&(n.rootGraveyard=e.rootGraveyard),e.path&&e.path.length){n.path=[];for(let t=0;t<e.path.length;++t)n.path[t]=e.path[t]}return null!=e.stickiness&&e.hasOwnProperty("stickiness")&&(n.stickiness=e.stickiness),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,A.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/Position"},e})(),q=E.Range=(()=>{function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.start=null,e.prototype.end=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=k.create()),null!=e.start&&Object.hasOwnProperty.call(e,"start")&&E.Position.encode(e.start,t.uint32(10).fork()).ldelim(),null!=e.end&&Object.hasOwnProperty.call(e,"end")&&E.Position.encode(e.end,t.uint32(18).fork()).ldelim(),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof T||(e=T.create(e));let n=void 0===t?e.len:e.pos+t,r=new E.Range;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.start=E.Position.decode(e,e.uint32());break;case 2:r.end=E.Position.decode(e,e.uint32());break;default:e.skipType(7&t)}}return r},e.decodeDelimited=function(e){return e instanceof T||(e=new T(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.start&&e.hasOwnProperty("start")){let t=E.Position.verify(e.start);if(t)return"start."+t}if(null!=e.end&&e.hasOwnProperty("end")){let t=E.Position.verify(e.end);if(t)return"end."+t}return null},e.fromObject=function(e){if(e instanceof E.Range)return e;let t=new E.Range;if(null!=e.start){if("object"!=typeof e.start)throw TypeError(".Range.start: object expected");t.start=E.Position.fromObject(e.start)}if(null!=e.end){if("object"!=typeof e.end)throw TypeError(".Range.end: object expected");t.end=E.Position.fromObject(e.end)}return t},e.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.start=null,n.end=null),null!=e.start&&e.hasOwnProperty("start")&&(n.start=E.Position.toObject(e.start,t)),null!=e.end&&e.hasOwnProperty("end")&&(n.end=E.Position.toObject(e.end,t)),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,A.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/Range"},e})(),G=E.Element=(()=>{function e(e){if(this.children=[],this.attributesBoolean={},e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.name="",e.prototype.children=C.emptyArray,e.prototype.data="",e.prototype.attributesBoolean=C.emptyObject,e.prototype.attributesJson="",e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=k.create()),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.children&&e.children.length)for(let n=0;n<e.children.length;++n)E.Element.encode(e.children[n],t.uint32(18).fork()).ldelim();if(null!=e.data&&Object.hasOwnProperty.call(e,"data")&&t.uint32(26).string(e.data),null!=e.attributesBoolean&&Object.hasOwnProperty.call(e,"attributesBoolean"))for(let n=Object.keys(e.attributesBoolean),r=0;r<n.length;++r)t.uint32(34).fork().uint32(10).string(n[r]).uint32(16).bool(e.attributesBoolean[n[r]]).ldelim();return null!=e.attributesJson&&Object.hasOwnProperty.call(e,"attributesJson")&&t.uint32(42).string(e.attributesJson),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof T||(e=T.create(e));let n,r,s=void 0===t?e.len:e.pos+t,o=new E.Element;for(;e.pos<s;){let t=e.uint32();switch(t>>>3){case 1:o.name=e.string();break;case 2:o.children&&o.children.length||(o.children=[]),o.children.push(E.Element.decode(e,e.uint32()));break;case 3:o.data=e.string();break;case 4:{o.attributesBoolean===C.emptyObject&&(o.attributesBoolean={});let t=e.uint32()+e.pos;for(n="",r=!1;e.pos<t;){let t=e.uint32();switch(t>>>3){case 1:n=e.string();break;case 2:r=e.bool();break;default:e.skipType(7&t)}}o.attributesBoolean[n]=r;break}case 5:o.attributesJson=e.string();break;default:e.skipType(7&t)}}return o},e.decodeDelimited=function(e){return e instanceof T||(e=new T(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.name&&e.hasOwnProperty("name")&&!C.isString(e.name))return"name: string expected";if(null!=e.children&&e.hasOwnProperty("children")){if(!Array.isArray(e.children))return"children: array expected";for(let t=0;t<e.children.length;++t){let n=E.Element.verify(e.children[t]);if(n)return"children."+n}}if(null!=e.data&&e.hasOwnProperty("data")&&!C.isString(e.data))return"data: string expected";if(null!=e.attributesBoolean&&e.hasOwnProperty("attributesBoolean")){if(!C.isObject(e.attributesBoolean))return"attributesBoolean: object expected";let t=Object.keys(e.attributesBoolean);for(let n=0;n<t.length;++n)if("boolean"!=typeof e.attributesBoolean[t[n]])return"attributesBoolean: boolean{k:string} expected"}return null!=e.attributesJson&&e.hasOwnProperty("attributesJson")&&!C.isString(e.attributesJson)?"attributesJson: string expected":null},e.fromObject=function(e){if(e instanceof E.Element)return e;let t=new E.Element;if(null!=e.name&&(t.name=String(e.name)),e.children){if(!Array.isArray(e.children))throw TypeError(".Element.children: array expected");t.children=[];for(let n=0;n<e.children.length;++n){if("object"!=typeof e.children[n])throw TypeError(".Element.children: object expected");t.children[n]=E.Element.fromObject(e.children[n])}}if(null!=e.data&&(t.data=String(e.data)),e.attributesBoolean){if("object"!=typeof e.attributesBoolean)throw TypeError(".Element.attributesBoolean: object expected");t.attributesBoolean={};for(let n=Object.keys(e.attributesBoolean),r=0;r<n.length;++r)t.attributesBoolean[n[r]]=Boolean(e.attributesBoolean[n[r]])}return null!=e.attributesJson&&(t.attributesJson=String(e.attributesJson)),t},e.toObject=function(e,t){t||(t={});let n,r={};if((t.arrays||t.defaults)&&(r.children=[]),(t.objects||t.defaults)&&(r.attributesBoolean={}),t.defaults&&(r.name="",r.data="",r.attributesJson=""),null!=e.name&&e.hasOwnProperty("name")&&(r.name=e.name),e.children&&e.children.length){r.children=[];for(let n=0;n<e.children.length;++n)r.children[n]=E.Element.toObject(e.children[n],t)}if(null!=e.data&&e.hasOwnProperty("data")&&(r.data=e.data),e.attributesBoolean&&(n=Object.keys(e.attributesBoolean)).length){r.attributesBoolean={};for(let t=0;t<n.length;++t)r.attributesBoolean[n[t]]=e.attributesBoolean[n[t]]}return null!=e.attributesJson&&e.hasOwnProperty("attributesJson")&&(r.attributesJson=e.attributesJson),r},e.prototype.toJSON=function(){return this.constructor.toObject(this,A.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/Element"},e})();class L{constructor(){this._protobufRoot=e}getDescriptor(e){return new Y(this._protobufRoot[e])}}class Y{constructor(e){this._protobuf=e}compress(e){const t=this._protobuf.verify(e);if(t)throw Error(t);return this._protobuf.encode(this._protobuf.create(e)).finish()}decompress(e){return this._protobuf.toObject(this._protobuf.decode(e),{oneofs:!0})}}const F=function(){this.__data__=[],this.size=0};const z=function(e,t){return e===t||e!=e&&t!=t};const H=function(e,t){for(var n=e.length;n--;)if(z(e[n][0],t))return n;return-1};var K=Array.prototype.splice;const W=function(e){var t=this.__data__,n=H(t,e);return!(n<0)&&(n==t.length-1?t.pop():K.call(t,n,1),--this.size,!0)};const $=function(e){var t=this.__data__,n=H(t,e);return n<0?void 0:t[n][1]};const Q=function(e){return H(this.__data__,e)>-1};const X=function(e,t){var n=this.__data__,r=H(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function Z(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Z.prototype.clear=F,Z.prototype.delete=W,Z.prototype.get=$,Z.prototype.has=Q,Z.prototype.set=X;const ee=Z;const te=function(){this.__data__=new ee,this.size=0};const ne=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n};const re=function(e){return this.__data__.get(e)};const se=function(e){return this.__data__.has(e)};const oe="object"==typeof global&&global&&global.Object===Object&&global;var ie="object"==typeof self&&self&&self.Object===Object&&self;const ae=oe||ie||Function("return this")();const ce=ae.Symbol;var ue=Object.prototype,de=ue.hasOwnProperty,le=ue.toString,pe=ce?ce.toStringTag:void 0;const he=function(e){var t=de.call(e,pe),n=e[pe];try{e[pe]=void 0;var r=!0}catch(e){}var s=le.call(e);return r&&(t?e[pe]=n:delete e[pe]),s};var fe=Object.prototype.toString;const me=function(e){return fe.call(e)};var ye=ce?ce.toStringTag:void 0;const ge=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":ye&&ye in Object(e)?he(e):me(e)};const be=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)};const Oe=function(e){if(!be(e))return!1;var t=ge(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t};const ve=ae["__core-js_shared__"];var we,Ie=(we=/[^.]+$/.exec(ve&&ve.keys&&ve.keys.IE_PROTO||""))?"Symbol(src)_1."+we:"";const _e=function(e){return!!Ie&&Ie in e};var Se=Function.prototype.toString;const Pe=function(e){if(null!=e){try{return Se.call(e)}catch(e){}try{return e+""}catch(e){}}return""};var Ae=/^\[object .+?Constructor\]$/,Te=Function.prototype,ke=Object.prototype,Ce=Te.toString,Ee=ke.hasOwnProperty,je=RegExp("^"+Ce.call(Ee).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const De=function(e){return!(!be(e)||_e(e))&&(Oe(e)?je:Ae).test(Pe(e))};const Re=function(e,t){return null==e?void 0:e[t]};const Me=function(e,t){var n=Re(e,t);return De(n)?n:void 0};const Ne=Me(ae,"Map");const xe=Me(Object,"create");const Ve=function(){this.__data__=xe?xe(null):{},this.size=0};const Be=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t};var Ue=Object.prototype.hasOwnProperty;const Je=function(e){var t=this.__data__;if(xe){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return Ue.call(t,e)?t[e]:void 0};var qe=Object.prototype.hasOwnProperty;const Ge=function(e){var t=this.__data__;return xe?void 0!==t[e]:qe.call(t,e)};const Le=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=xe&&void 0===t?"__lodash_hash_undefined__":t,this};function Ye(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ye.prototype.clear=Ve,Ye.prototype.delete=Be,Ye.prototype.get=Je,Ye.prototype.has=Ge,Ye.prototype.set=Le;const Fe=Ye;const ze=function(){this.size=0,this.__data__={hash:new Fe,map:new(Ne||ee),string:new Fe}};const He=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};const Ke=function(e,t){var n=e.__data__;return He(t)?n["string"==typeof t?"string":"hash"]:n.map};const We=function(e){var t=Ke(this,e).delete(e);return this.size-=t?1:0,t};const $e=function(e){return Ke(this,e).get(e)};const Qe=function(e){return Ke(this,e).has(e)};const Xe=function(e,t){var n=Ke(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function Ze(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ze.prototype.clear=ze,Ze.prototype.delete=We,Ze.prototype.get=$e,Ze.prototype.has=Qe,Ze.prototype.set=Xe;const et=Ze;const tt=function(e,t){var n=this.__data__;if(n instanceof ee){var r=n.__data__;if(!Ne||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new et(r)}return n.set(e,t),this.size=n.size,this};function nt(e){var t=this.__data__=new ee(e);this.size=t.size}nt.prototype.clear=te,nt.prototype.delete=ne,nt.prototype.get=re,nt.prototype.has=se,nt.prototype.set=tt;const rt=nt;const st=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e};const ot=function(){try{var e=Me(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();const it=function(e,t,n){"__proto__"==t&&ot?ot(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n};var at=Object.prototype.hasOwnProperty;const ct=function(e,t,n){var r=e[t];at.call(e,t)&&z(r,n)&&(void 0!==n||t in e)||it(e,t,n)};const ut=function(e,t,n,r){var s=!n;n||(n={});for(var o=-1,i=t.length;++o<i;){var a=t[o],c=r?r(n[a],e[a],a,n,e):void 0;void 0===c&&(c=e[a]),s?it(n,a,c):ct(n,a,c)}return n};const dt=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r};const lt=function(e){return null!=e&&"object"==typeof e};const pt=function(e){return lt(e)&&"[object Arguments]"==ge(e)};var ht=Object.prototype,ft=ht.hasOwnProperty,mt=ht.propertyIsEnumerable;const yt=pt(function(){return arguments}())?pt:function(e){return lt(e)&&ft.call(e,"callee")&&!mt.call(e,"callee")};const gt=Array.isArray;const bt=function(){return!1};var Ot="object"==typeof exports&&exports&&!exports.nodeType&&exports,vt=Ot&&"object"==typeof module&&module&&!module.nodeType&&module,wt=vt&&vt.exports===Ot?ae.Buffer:void 0;const It=(wt?wt.isBuffer:void 0)||bt;var _t=/^(?:0|[1-9]\d*)$/;const St=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&_t.test(e))&&e>-1&&e%1==0&&e<t};const Pt=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991};var At={};At["[object Float32Array]"]=At["[object Float64Array]"]=At["[object Int8Array]"]=At["[object Int16Array]"]=At["[object Int32Array]"]=At["[object Uint8Array]"]=At["[object Uint8ClampedArray]"]=At["[object Uint16Array]"]=At["[object Uint32Array]"]=!0,At["[object Arguments]"]=At["[object Array]"]=At["[object ArrayBuffer]"]=At["[object Boolean]"]=At["[object DataView]"]=At["[object Date]"]=At["[object Error]"]=At["[object Function]"]=At["[object Map]"]=At["[object Number]"]=At["[object Object]"]=At["[object RegExp]"]=At["[object Set]"]=At["[object String]"]=At["[object WeakMap]"]=!1;const Tt=function(e){return lt(e)&&Pt(e.length)&&!!At[ge(e)]};const kt=function(e){return function(t){return e(t)}};var Ct="object"==typeof exports&&exports&&!exports.nodeType&&exports,Et=Ct&&"object"==typeof module&&module&&!module.nodeType&&module,jt=Et&&Et.exports===Ct&&oe.process;const Dt=function(){try{var e=Et&&Et.require&&Et.require("util").types;return e||jt&&jt.binding&&jt.binding("util")}catch(e){}}();var Rt=Dt&&Dt.isTypedArray;const Mt=Rt?kt(Rt):Tt;var Nt=Object.prototype.hasOwnProperty;const xt=function(e,t){var n=gt(e),r=!n&&yt(e),s=!n&&!r&&It(e),o=!n&&!r&&!s&&Mt(e),i=n||r||s||o,a=i?dt(e.length,String):[],c=a.length;for(var u in e)!t&&!Nt.call(e,u)||i&&("length"==u||s&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||St(u,c))||a.push(u);return a};var Vt=Object.prototype;const Bt=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Vt)};const Ut=function(e,t){return function(n){return e(t(n))}};const Jt=Ut(Object.keys,Object);var qt=Object.prototype.hasOwnProperty;const Gt=function(e){if(!Bt(e))return Jt(e);var t=[];for(var n in Object(e))qt.call(e,n)&&"constructor"!=n&&t.push(n);return t};const Lt=function(e){return null!=e&&Pt(e.length)&&!Oe(e)};const Yt=function(e){return Lt(e)?xt(e):Gt(e)};const Ft=function(e,t){return e&&ut(t,Yt(t),e)};const zt=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t};var Ht=Object.prototype.hasOwnProperty;const Kt=function(e){if(!be(e))return zt(e);var t=Bt(e),n=[];for(var r in e)("constructor"!=r||!t&&Ht.call(e,r))&&n.push(r);return n};const Wt=function(e){return Lt(e)?xt(e,!0):Kt(e)};const $t=function(e,t){return e&&ut(t,Wt(t),e)};var Qt="object"==typeof exports&&exports&&!exports.nodeType&&exports,Xt=Qt&&"object"==typeof module&&module&&!module.nodeType&&module,Zt=Xt&&Xt.exports===Qt?ae.Buffer:void 0,en=Zt?Zt.allocUnsafe:void 0;const tn=function(e,t){if(t)return e.slice();var n=e.length,r=en?en(n):new e.constructor(n);return e.copy(r),r};const nn=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t};const rn=function(e,t){for(var n=-1,r=null==e?0:e.length,s=0,o=[];++n<r;){var i=e[n];t(i,n,e)&&(o[s++]=i)}return o};const sn=function(){return[]};var on=Object.prototype.propertyIsEnumerable,an=Object.getOwnPropertySymbols;const cn=an?function(e){return null==e?[]:(e=Object(e),rn(an(e),(function(t){return on.call(e,t)})))}:sn;const un=function(e,t){return ut(e,cn(e),t)};const dn=function(e,t){for(var n=-1,r=t.length,s=e.length;++n<r;)e[s+n]=t[n];return e};const ln=Ut(Object.getPrototypeOf,Object);const pn=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)dn(t,cn(e)),e=ln(e);return t}:sn;const hn=function(e,t){return ut(e,pn(e),t)};const fn=function(e,t,n){var r=t(e);return gt(e)?r:dn(r,n(e))};const mn=function(e){return fn(e,Yt,cn)};const yn=function(e){return fn(e,Wt,pn)};const gn=Me(ae,"DataView");const bn=Me(ae,"Promise");const On=Me(ae,"Set");const vn=Me(ae,"WeakMap");var wn="[object Map]",In="[object Promise]",_n="[object Set]",Sn="[object WeakMap]",Pn="[object DataView]",An=Pe(gn),Tn=Pe(Ne),kn=Pe(bn),Cn=Pe(On),En=Pe(vn),jn=ge;(gn&&jn(new gn(new ArrayBuffer(1)))!=Pn||Ne&&jn(new Ne)!=wn||bn&&jn(bn.resolve())!=In||On&&jn(new On)!=_n||vn&&jn(new vn)!=Sn)&&(jn=function(e){var t=ge(e),n="[object Object]"==t?e.constructor:void 0,r=n?Pe(n):"";if(r)switch(r){case An:return Pn;case Tn:return wn;case kn:return In;case Cn:return _n;case En:return Sn}return t});const Dn=jn;var Rn=Object.prototype.hasOwnProperty;const Mn=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Rn.call(e,"index")&&(n.index=e.index,n.input=e.input),n};const Nn=ae.Uint8Array;const xn=function(e){var t=new e.constructor(e.byteLength);return new Nn(t).set(new Nn(e)),t};const Vn=function(e,t){var n=t?xn(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)};var Bn=/\w*$/;const Un=function(e){var t=new e.constructor(e.source,Bn.exec(e));return t.lastIndex=e.lastIndex,t};var Jn=ce?ce.prototype:void 0,qn=Jn?Jn.valueOf:void 0;const Gn=function(e){return qn?Object(qn.call(e)):{}};const Ln=function(e,t){var n=t?xn(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)};const Yn=function(e,t,n){var r=e.constructor;switch(t){case"[object ArrayBuffer]":return xn(e);case"[object Boolean]":case"[object Date]":return new r(+e);case"[object DataView]":return Vn(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return Ln(e,n);case"[object Map]":case"[object Set]":return new r;case"[object Number]":case"[object String]":return new r(e);case"[object RegExp]":return Un(e);case"[object Symbol]":return Gn(e)}};var Fn=Object.create;const zn=function(){function e(){}return function(t){if(!be(t))return{};if(Fn)return Fn(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();const Hn=function(e){return"function"!=typeof e.constructor||Bt(e)?{}:zn(ln(e))};const Kn=function(e){return lt(e)&&"[object Map]"==Dn(e)};var Wn=Dt&&Dt.isMap;const $n=Wn?kt(Wn):Kn;const Qn=function(e){return lt(e)&&"[object Set]"==Dn(e)};var Xn=Dt&&Dt.isSet;const Zn=Xn?kt(Xn):Qn;var er="[object Arguments]",tr="[object Function]",nr="[object Object]",rr={};rr[er]=rr["[object Array]"]=rr["[object ArrayBuffer]"]=rr["[object DataView]"]=rr["[object Boolean]"]=rr["[object Date]"]=rr["[object Float32Array]"]=rr["[object Float64Array]"]=rr["[object Int8Array]"]=rr["[object Int16Array]"]=rr["[object Int32Array]"]=rr["[object Map]"]=rr["[object Number]"]=rr[nr]=rr["[object RegExp]"]=rr["[object Set]"]=rr["[object String]"]=rr["[object Symbol]"]=rr["[object Uint8Array]"]=rr["[object Uint8ClampedArray]"]=rr["[object Uint16Array]"]=rr["[object Uint32Array]"]=!0,rr["[object Error]"]=rr[tr]=rr["[object WeakMap]"]=!1;const sr=function e(t,n,r,s,o,i){var a,c=1&n,u=2&n,d=4&n;if(r&&(a=o?r(t,s,o,i):r(t)),void 0!==a)return a;if(!be(t))return t;var l=gt(t);if(l){if(a=Mn(t),!c)return nn(t,a)}else{var p=Dn(t),h=p==tr||"[object GeneratorFunction]"==p;if(It(t))return tn(t,c);if(p==nr||p==er||h&&!o){if(a=u||h?{}:Hn(t),!c)return u?hn(t,$t(a,t)):un(t,Ft(a,t))}else{if(!rr[p])return o?t:{};a=Yn(t,p,c)}}i||(i=new rt);var f=i.get(t);if(f)return f;i.set(t,a),Zn(t)?t.forEach((function(s){a.add(e(s,n,r,s,t,i))})):$n(t)&&t.forEach((function(s,o){a.set(o,e(s,n,r,o,t,i))}));var m=l?void 0:(d?u?yn:mn:u?Wt:Yt)(t);return st(m||t,(function(s,o){m&&(s=t[o=s]),ct(a,o,e(s,n,r,o,t,i))})),a};const or=function(e){return sr(e,5)};const ir=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this};const ar=function(e){return this.__data__.has(e)};function cr(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new et;++t<n;)this.add(e[t])}cr.prototype.add=cr.prototype.push=ir,cr.prototype.has=ar;const ur=cr;const dr=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1};const lr=function(e,t){return e.has(t)};const pr=function(e,t,n,r,s,o){var i=1&n,a=e.length,c=t.length;if(a!=c&&!(i&&c>a))return!1;var u=o.get(e),d=o.get(t);if(u&&d)return u==t&&d==e;var l=-1,p=!0,h=2&n?new ur:void 0;for(o.set(e,t),o.set(t,e);++l<a;){var f=e[l],m=t[l];if(r)var y=i?r(m,f,l,t,e,o):r(f,m,l,e,t,o);if(void 0!==y){if(y)continue;p=!1;break}if(h){if(!dr(t,(function(e,t){if(!lr(h,t)&&(f===e||s(f,e,n,r,o)))return h.push(t)}))){p=!1;break}}else if(f!==m&&!s(f,m,n,r,o)){p=!1;break}}return o.delete(e),o.delete(t),p};const hr=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n};const fr=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n};var mr=ce?ce.prototype:void 0,yr=mr?mr.valueOf:void 0;const gr=function(e,t,n,r,s,o,i){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!o(new Nn(e),new Nn(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return z(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var a=hr;case"[object Set]":var c=1&r;if(a||(a=fr),e.size!=t.size&&!c)return!1;var u=i.get(e);if(u)return u==t;r|=2,i.set(e,t);var d=pr(a(e),a(t),r,s,o,i);return i.delete(e),d;case"[object Symbol]":if(yr)return yr.call(e)==yr.call(t)}return!1};var br=Object.prototype.hasOwnProperty;const Or=function(e,t,n,r,s,o){var i=1&n,a=mn(e),c=a.length;if(c!=mn(t).length&&!i)return!1;for(var u=c;u--;){var d=a[u];if(!(i?d in t:br.call(t,d)))return!1}var l=o.get(e),p=o.get(t);if(l&&p)return l==t&&p==e;var h=!0;o.set(e,t),o.set(t,e);for(var f=i;++u<c;){var m=e[d=a[u]],y=t[d];if(r)var g=i?r(y,m,d,t,e,o):r(m,y,d,e,t,o);if(!(void 0===g?m===y||s(m,y,n,r,o):g)){h=!1;break}f||(f="constructor"==d)}if(h&&!f){var b=e.constructor,O=t.constructor;b==O||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof O&&O instanceof O||(h=!1)}return o.delete(e),o.delete(t),h};var vr="[object Arguments]",wr="[object Array]",Ir="[object Object]",_r=Object.prototype.hasOwnProperty;const Sr=function(e,t,n,r,s,o){var i=gt(e),a=gt(t),c=i?wr:Dn(e),u=a?wr:Dn(t),d=(c=c==vr?Ir:c)==Ir,l=(u=u==vr?Ir:u)==Ir,p=c==u;if(p&&It(e)){if(!It(t))return!1;i=!0,d=!1}if(p&&!d)return o||(o=new rt),i||Mt(e)?pr(e,t,n,r,s,o):gr(e,t,c,n,r,s,o);if(!(1&n)){var h=d&&_r.call(e,"__wrapped__"),f=l&&_r.call(t,"__wrapped__");if(h||f){var m=h?e.value():e,y=f?t.value():t;return o||(o=new rt),s(m,y,n,r,o)}}return!!p&&(o||(o=new rt),Or(e,t,n,r,s,o))};const Pr=function e(t,n,r,s,o){return t===n||(null==t||null==n||!lt(t)&&!lt(n)?t!=t&&n!=n:Sr(t,n,r,s,e,o))};const Ar=function(e,t){return Pr(e,t)};function Tr(e,t){const n=or(e);return n.path[n.path.length-1]+=t,n}function kr(e,t){return e.root===t.root&&Ar(e.path,t.path)}function Cr(e){jr(e,(e=>("main"==e.root?(e.rootMain=!0,delete e.root):"$graveyard"==e.root&&(e.rootGraveyard=!0,delete e.root),e)))}function Er(e){jr(e,(e=>(e.rootMain?(e.root="main",delete e.rootMain):e.rootGraveyard&&(e.root="$graveyard",delete e.rootGraveyard),e)))}function jr(e,t){for(const n in e){const r=e[n];"nodes"!==n&&be(r)&&(r.path&&(r.root||r.rootMain||r.rootGraveyard)?e[n]=t(r):jr(r,t))}return e}class Dr{constructor(e,t,n){this._id=e,this._operationName=t,this._protobufDescriptor=n}compress(e,t){const n=t.shift();return Cr(n),e.buffers.push(this._protobufDescriptor.compress(n)),e.types.push(this._id),!0}decompress(e,t){t.types.shift();const n=this._protobufDescriptor.decompress(t.buffers.shift());Er(n),n.__className=this._operationName,e.push(n)}}class Rr extends Dr{compress(e,t){const n=t.shift();return this._serializeOneOf("oldValue",n),this._serializeOneOf("newValue",n),Cr(n),e.buffers.push(this._protobufDescriptor.compress(n)),e.types.push(this._id),!0}decompress(e,t){const{types:n,buffers:r}=t,s=this._protobufDescriptor.decompress(r.shift());n.shift(),this._deserializeOneOf("oldValue",s),this._deserializeOneOf("newValue",s),Er(s),s.__className=this._operationName,e.push(s)}_serializeOneOf(e,t){const n=t[e];"boolean"==typeof n?t[`${e}Boolean`]=n:t[`${e}Json`]=JSON.stringify(n)}_deserializeOneOf(e,t){const n=`${e}Json`;t[n]?(t[e]=JSON.parse(t[n]),delete t[n]):(t[e]=t[`${e}Boolean`],delete t[`${e}Boolean`])}}class Mr extends Dr{compress(e,t){const n=t.shift();return this._serializeNodesAttributes(n.nodes),Cr(n),e.buffers.push(this._protobufDescriptor.compress(n)),e.types.push(this._id),!0}decompress(e,t){const{types:n,buffers:r}=t,s=this._protobufDescriptor.decompress(r.shift());n.shift(),s.nodes||(s.nodes=[]),this._deserializeNodesAttributes(s.nodes),Er(s),s.__className=this._operationName,e.push(s)}_serializeNodesAttributes(e){for(const t of e){if(t.attributes){const e=t.attributes;this._areValuesBoolean(e)?t.attributesBoolean=e:t.attributesJson=JSON.stringify(e)}t.children&&this._serializeNodesAttributes(t.children)}}_deserializeNodesAttributes(e){for(const t of e)(t.attributesBoolean||t.attributesJson)&&(t.attributesBoolean?(t.attributes=t.attributesBoolean,delete t.attributesBoolean):(t.attributes=JSON.parse(t.attributesJson),delete t.attributesJson)),t.children&&this._deserializeNodesAttributes(t.children)}_areValuesBoolean(e){return Object.keys(e).every((t=>"boolean"==typeof e[t]))}}class Nr extends Dr{decompress(e,t){super.decompress(e,t);const n=e[e.length-1];n.oldRange||(n.oldRange=null),n.newRange||(n.newRange=null)}}class xr extends Dr{compress(e,t){return t.shift(),e.types.push(this._id),!0}decompress(e,t){t.types.shift(),e.push({__className:this._operationName})}}class Vr extends Nr{constructor(e,t,n,r){super(e,t,n),this._omittedNamespace=r+":"}compress(e,t){return!("MarkerOperation"!=t[0].__className||!t[0].name.startsWith(this._omittedNamespace))&&(t[0].name=t[0].name.replace(new RegExp("^"+this._omittedNamespace),""),super.compress(e,t),!0)}decompress(e,t){super.decompress(e,t);const n=e[e.length-1];n.name=this._omittedNamespace+n.name}}class Br{constructor(e,t){this._id=e,this._context=t}compress(e,t){let n;for(;t.length>1&&this._compareOperations(t[0],t[1]);)n?(n=this._combineNext(t.shift(),n),e.types.push(0)):(n=or(t.shift()),e.types.push(this._id));return!!n&&(n=this._combineNext(t.shift(),n),e.types.push(0),e.buffers.push(this._compressSingleOperation(n)),!0)}decompress(e,t){const n=this._decompressSingleOperation(t);for(;0==t.types[0];)t.types.shift(),e.push(this._splitCurrent(n));e.push(n)}}class Ur extends Br{_combineNext(e,t){return t.nodes[0].data+=e.nodes[0].data,t}_splitCurrent(e){const t=or(e),n=t.nodes[0],r=e.nodes[0],s=r.data[Symbol.iterator]().next().value,o=s.length;return n.data=s,r.data=r.data.substr(o),e.position=Tr(e.position,o),t}_compareOperations(e,t){if(this._checkOperation(e)&&this._checkOperation(t)){const n=e.nodes[0].data.length,r=kr(Tr(e.position,n),t.position),s=e.nodes[0],o=t.nodes[0];return r&&this._compareAttributes(s,o)}return!1}_compressSingleOperation(e){const t={types:[],buffers:[],baseVersion:0};return this._context._getCompressorByName("InsertOperation").compress(t,[e]),t.buffers[0]}_decompressSingleOperation(e){const t=[];return this._context._getCompressorByName("InsertOperation").decompress(t,e),t[0]}_checkOperation(e){return"InsertOperation"==e.__className&&1==e.nodes.length&&e.nodes[0].data&&!e.wasUndone&&1==Array.from(e.nodes[0].data).length}_compareAttributes(e,t){const n=Object.keys(e.attributes||{}),r=Object.keys(t.attributes||{});return n.length===r.length&&n.every((n=>t.attributes[n]&&t.attributes[n]===e.attributes[n]))}}class Jr extends Br{_combineNext(e,t){return t.howMany++,t.sourcePosition=or(e.sourcePosition),t}_splitCurrent(e){const t=or(e);return e.howMany--,t.howMany=1,t.sourcePosition=Tr(t.sourcePosition,e.howMany),t}_compareOperations(e,t){return!(!this._checkOperation(e)||!this._checkOperation(t))&&(kr(Tr(e.sourcePosition,-1),t.sourcePosition)&&kr(e.targetPosition,t.targetPosition))}_compressSingleOperation(e){const t={types:[],buffers:[],baseVersion:0};return this._context._getCompressorByName("MoveOperation").compress(t,[e]),t.buffers[0]}_decompressSingleOperation(e){const t=[];return this._context._getCompressorByName("MoveOperation").decompress(t,e),t[0]}_checkOperation(e){return"MoveOperation"==e.__className&&"$graveyard"==e.targetPosition.root&&1==e.howMany&&!e.wasUndone}}class qr extends Br{_combineNext(e,t){return t.howMany++,t}_splitCurrent(e){const t=or(e);return t.howMany=1,e.howMany--,t}_compareOperations(e,t){return!(!this._checkOperation(e)||!this._checkOperation(t))&&(kr(e.sourcePosition,t.sourcePosition)&&kr(e.targetPosition,t.targetPosition))}_compressSingleOperation(e){const t={types:[],buffers:[],baseVersion:0};return this._context._getCompressorByName("MoveOperation").compress(t,[e]),t.buffers[0]}_decompressSingleOperation(e){const t=[];return this._context._getCompressorByName("MoveOperation").decompress(t,e),t[0]}_checkOperation(e){return"MoveOperation"==e.__className&&"$graveyard"==e.targetPosition.root&&1==e.howMany&&!e.wasUndone}}class Gr extends Br{compress(e,t){if(!this._compareOperations(t[0],t[1]))return!1;const n=t.shift();return n.oldRange=null,n.newRange&&kr(n.newRange.start,n.newRange.end)&&(n.newRange.end=null),t.shift(),e.types.push(this._id),e.types.push(0),e.buffers.push(this._compressSingleOperation(n)),!0}decompress(e,t){const n=this._decompressSingleOperation(t);n.newRange&&!n.newRange.end&&(n.newRange.end=or(n.newRange.start));const r=or(n);r.newRange&&(r.newRange.start.stickiness="toNone",r.newRange.end=or(r.newRange.start)),r.name="user:position:"+r.name.split(":")[2],t.types.shift(),e.push(n),e.push(r)}_compressSingleOperation(e){const t={types:[],buffers:[],baseVersion:0};return this._context._getCompressorByName("MarkerOperation").compress(t,[e]),t.buffers[0]}_decompressSingleOperation(e){const t=[];return this._context._getCompressorByName("MarkerOperation").decompress(t,e),t[0]}_compareOperations(e,t){return!(!e||!t)&&("MarkerOperation"==e.__className&&"MarkerOperation"==t.__className&&!(!e.name.startsWith("user:")||!t.name.startsWith("user:")||e.name==t.name))}}class Lr{constructor(){this._compressorById=new Map,this._compressorByName=new Map,this._protobufFactory=new L;const e=this._protobufFactory.getDescriptor("MarkerOperation");this._registerCompressor(1,"NoOperation",new xr(1,"NoOperation",void 0)),this._registerOperationCompressor(10,"AttributeOperation",Rr),this._registerOperationCompressor(11,"InsertOperation",Mr),this._registerOperationCompressor(12,"MarkerOperation",Nr),this._registerOperationCompressor(13,"MergeOperation",Dr),this._registerOperationCompressor(14,"MoveOperation",Dr),this._registerOperationCompressor(15,"RenameOperation",Dr),this._registerOperationCompressor(16,"RootAttributeOperation",Rr),this._registerOperationCompressor(17,"SplitOperation",Dr),this._registerCompressor(18,"CommentMarkerOperation",new Vr(18,"MarkerOperation",e,"comment")),this._registerCompressor(19,"SuggestionMarkerOperation",new Vr(19,"MarkerOperation",e,"suggestion")),this._registerOperationCompressor(20,"RootOperation",Dr),this._registerActionCompressor(100,"TypingAction",Ur),this._registerActionCompressor(101,"DeletingAction",Jr),this._registerActionCompressor(102,"ForwardDeletingAction",qr),this._registerActionCompressor(103,"UserSelectionAction",Gr)}compress(e){if(!e||!e[0])throw new n.CKEditorError("no-operations-provided",this);const t={types:[],buffers:[],baseVersion:e[0].baseVersion};for(;e.length;)this._getCompressorByName("UserSelectionAction").compress(t,e)||this._getCompressorByName("TypingAction").compress(t,e)||this._getCompressorByName("DeletingAction").compress(t,e)||this._getCompressorByName("ForwardDeletingAction").compress(t,e)||this._getCompressorByName("CommentMarkerOperation").compress(t,e)||this._getCompressorByName("SuggestionMarkerOperation").compress(t,e)||this._getCompressorByName(e[0].__className).compress(t,e);return t}decompress(e){const t=[];for(;e.types.length;){this._compressorById.get(e.types[0]).decompress(t,e)}return t.forEach(((t,n)=>t.baseVersion=e.baseVersion+n)),t}_getCompressorByName(e){return this._compressorByName.get(e)}_registerOperationCompressor(e,t,n){const r=new n(e,t,this._protobufFactory.getDescriptor(t));this._registerCompressor(e,t,r)}_registerActionCompressor(e,t,n){const r=new n(e,this);this._registerCompressor(e,t,r)}_registerCompressor(e,t,n){this._compressorById.set(e,n),this._compressorByName.set(t,n)}}var Yr=__webpack_require__(1987);const Fr=Qr;function zr(){const e=["removeFromReconnectionStack","keys","$root","_pendingAction","error","attributes","start","loadRoot","connection","realtimecollaborationclient-editor-setdata-and-editor-data-set-are-forbidden-in-real-time-collaboration","affectsData","_knownOperations","change:_isEditingAllowed","reconnection: flushed session","_handleServerResponse","plugins","1632429qILQRU","type","end","9554570tBlUzS","filter","_applyOperationsSet","roots","The last saved version of the document does not match the local version. To not lose your content save it locally and refresh the editor.","requires","config","_compressOperations","_sendBufferedOperationsDelayed","stopListening","parse","document:write","insert","isDocumentOperation","cloud-services-internal-error: Request timeout.","_crash","rtc-offline","2332KtYFIo","_handleReceivedOperations","_updateServerHistory","real-time-collaboration","decompress","mySessionId","newRange","then","collaboration-missing-channelid","_handleSendingSelectionMarkers","_knownRootNames","connected","lastDocumentSession","unregister","rootsAttributes","editing","stop","from","_fetchMissingUsers","_isInit","InsertOperation","_addKnownRoot","ready","_lastServerVersion","get","serverHistory","Synchronization issue","map","The local document and server document differ and merging them can cause unexpected behavior. To not lose your content save it locally and refresh the editor.","version","_decompressOperations","_bufferedOperations","_channelId","has","isReadOnly","createRange","_shouldSendSelectionUpdate","rootName","suppressErrorInCollaboration","listenTo","marker","_handleInitialConnectionData","length","_initThrowingOnDataSet","isEnabled","lastSyncVersion","getOperationAuthor","rtc-destroyed","_loadRoot","locale","applyOperation","createPositionAt","The document cannot be connected back to the server. To not lose your content save it locally and refresh the editor.","_baseBufferDelay","markers","31988879DwtMUE","Notification","size","add","_document","5255770HyoDUm","isUndoneOperation","slice","move","_getAffectedRoot","setIdForTheLastOperation","_saveOperationInBuffer","_sendBufferedOperations","push","21236EEBmGf","reset","disableReadOnlyMode","_isLoaded","RealTimeCollaborationClient","sessionAdd:","_handleReconnectionResponse","setPermissions","getDocumentDetails","connect","return","destroy","realtimecollaborationclient-init-connection-failed","realtimecollaborationclient-init-document-already-initialized","differ","history","sessionId","_disconnectService","createUserMarkerOperations","_connectService","collaboration","The document details could not be taken during the reconnection. To not lose your content save it locally and refresh the editor.","entries","CollaborativeEditingService","collaboration.channelId","createdAt","targetPosition","data","channelSessions","cloud-services-internal-error: Collaborative Editing Service is not connected.","batch","_setPendingAction","forEach","editor","_refreshUserSelectionMarkers","realtimecollaborationclient-handleserverresponse","addToReconnectionStack","_isDisconnection","realtimecollaborationclient-init-session-connection-error","code","cloudServices.bundleVersion","getConnectedSessions","_authorId","change:_isPendingUpdate","state","_isAttached","cs:removeUser","view","404","getMany","_sendBufferedOperationsDelayId","createPositionFromPath","sendOperations","bind","initData","showWarning","_handleReconnectionError","_offset","round","position","addOperation","toJSON","off","fromJSON","_compressor","message","_currentBufferDelay","_lastSyncedOperationId","init","10663583rbwxGO","246phLKoC","11frCVtq","offset","realtimecollaborationclient-initservice-incorrect-server-operation","_shouldSendUpdate","reconnect","_isEditingAllowed","createRoot","_operationIdentifier","_handleExternalOperations","addRootAttribute","string","_connectAfterSessionHasBeenFlushed","userId","787sFAmtU","realtimecollaborationclient-sendbufferedoperations","change:range","addRoot","getOperations","define","permissions","cloudDocumentVersion","getUser","catch","register","_waitUntilSynced","metadata","Permissions","_clearPendingAction","_ignoredOperations","clone","CommentsOnly","_bufferRootLoad","remove","enableReadOnlyMode","finally","_service","_initSessionsHandling","6rdiJjk","8lZLgLo","sessionCreatedAt","_disconnectionOperations","operationsReceived","disconnect","selection","affectedSelectable","12OKOokl","realtimecollaborationclient-init-non-existent-root","currentDocumentSession","wereChangesApplied","_isConnected","apply","model","409","PENDING_ACTION_SENDING_DATA","getRoot","multi-root-editor-root-attributes-no-root","_operationToId","enqueueChange","cloud-services-internal-error: Not connected.","includes","_setUpDataInit","baseVersion","wasUndone","lastOperationId","getIdOfTheLastOperation","fire","lastOperationAcceptedAt","change:hasDomSelection","startsWith","pluginName","_getOperationsFromInitData","realtimecollaborationclient-initservice-internal-error","set","__className","high","directChange","_hasSynchronizationProblem","document","root","disconnected","compress","_isPendingUpdate","addUser","path","_hasSelectionChanged"];return(zr=function(){return e})()}!function(e,t){const n=Qr,r=e();for(;;)try{if(805842===parseInt(n(499))/1*(-parseInt(n(607))/2)+-parseInt(n(485))/3*(parseInt(n(676))/4)+-parseInt(n(667))/5+-parseInt(n(523))/6*(-parseInt(n(484))/7)+parseInt(n(524))/8*(parseInt(n(587))/9)+-parseInt(n(590))/10*(parseInt(n(486))/11)+parseInt(n(531))/12*(parseInt(n(662))/13))break;r.push(r.shift())}catch(e){r.push(r.shift())}}(zr);let Hr=1;class Kr extends t.Plugin{static get[Fr(595)](){return[d,m,w,t.PendingActions,l.Users,r.Notification]}static get[Fr(555)](){return Fr(680)}get[Fr(506)](){const e=Fr;return this[e(630)]+this[e(733)]}get[Fr(630)](){const e=Fr;return this[e(632)][e(636)]-this[e(733)]}get[Fr(652)](){const e=Fr,t=this[e(632)][e(503)]();for(let n=t[e(649)]-1;n>=0;n--){const r=t[n];if(!this[e(526)][e(640)](r))return r[e(547)]+1-this[e(733)]}return 0}constructor(e){const t=Fr;if(super(e),this[t(733)]=0,this[t(692)]=null,this[t(632)]=new s.History,this[t(709)][t(596)][t(504)](t(696),{}),this[t(639)]=this[t(709)][t(596)][t(631)](t(700)),!this[t(639)])throw new n.CKEditorError(t(615),this);const r=e[t(596)][t(631)](t(716))||n.version;this[t(521)]=new(Kr[t(699)])(r,this[t(639)]),this[t(666)]=this[t(709)][t(537)][t(563)],this[t(740)]=new Lr,this[t(638)]=[],this[t(582)]=new WeakSet,this[t(617)]=new Set,this[t(558)](t(567),!1),this[t(558)](t(562),!1),this[t(574)]=null,this[t(570)]=!1,this[t(726)]=null,this[t(660)]=300,this[t(742)]=this[t(660)],this[t(482)]=null,this[t(526)]=new WeakSet,this[t(493)]=new Zr(this[t(526)])}[Fr(483)](){const e=Fr,t=this[e(709)],n=t[e(586)][e(631)](l.Users),r=t[e(586)][e(631)](d);this[e(646)](n,e(653),((t,r)=>{const s=e,o=r[0];o[s(718)]&&(t[s(686)]=n[s(507)](o[s(718)]),t[s(623)]()),null===o[s(718)]&&(t[s(686)]=null,t[s(623)]())}),{priority:e(560)}),this[e(646)](t[e(537)][e(563)][e(529)],e(501),((t,n)=>{const r=e;n[r(561)]&&this[r(710)]()})),this[e(646)](t[e(622)][e(723)],e(553),(()=>{this[e(710)]()})),this[e(650)](),t[e(537)].on(e(657),((t,n)=>{const r=e,s=n[0];s[r(603)]&&(this[r(673)](s),this[r(489)]()&&this[r(598)]())})),this[e(546)](),this[e(729)](e(491)).to(r,e(720),this,e(562),((t,n)=>e(618)===t&&!n)),this.on(e(583),(()=>{const n=e;this[n(491)]?t[n(678)](n(606)):t[n(519)](n(606))})),this[e(491)]?t[e(678)](e(606)):t[e(519)](e(606)),this[e(558)](e(535),!1)}async[Fr(490)](){const e=Fr,t=this[e(709)][e(586)][e(631)](m),n=this[e(709)][e(586)][e(631)](d);try{this[e(567)]=!0,t[e(620)](this[e(639)]);const r=await this[e(521)][e(490)](n[e(579)],this[e(652)]);await this[e(682)](r)&&(this[e(567)]=!1,this[e(513)]());const s=await this[e(521)][e(717)]();t[e(509)](this[e(639)],s),this[e(616)](),this[e(535)]=!0}catch(t){if(function(t){const n=e;return n(724)===t[n(715)]}(t)&&this[e(692)])await this[e(497)]();else if(function(t){const n=e;return n(538)===t[n(715)]}(t)){const t=P(this[e(709)][e(656)],e(659));this[e(732)](t)}else{if(!(t instanceof $r))throw t;this[e(732)]()}}}[Fr(687)](){const e=Fr,t=this[e(709)][e(586)][e(631)](d),n=this[e(709)][e(586)][e(631)](m);this[e(709)][e(519)](e(654)),n[e(704)][e(640)](this[e(639)])&&n[e(620)](this[e(639)]),t[e(571)](this),this[e(693)](),super[e(687)]()}async[Fr(682)](e){const t=Fr;if(this[t(692)]!==e[t(692)]&&this[t(482)]!==e[t(549)])throw new $r;return this[t(692)]=e[t(692)],this[t(585)]([],{...e,wereChangesApplied:!1,data:e[t(703)]},t(490))}async[Fr(695)](e,t=!1){const n=Fr,{connection:r}=this[n(709)][n(586)][n(631)](d);Kr[n(699)][n(717)](r,this[n(639)])[n(614)]((e=>this[n(522)](e)))[n(508)]((e=>{const t=n;this[t(605)](t(714),e)})),this[n(646)](this[n(521)],n(527),this[n(608)][n(729)](this)),this[n(646)](this[n(521)],n(575),((e,t)=>{const r=n;this[r(605)](r(557),t)})),this[n(646)](this[n(521)],n(565),(()=>{this[n(535)]=!1}));const s=this[n(493)][n(550)](e);this[n(567)]=!0;const o=await this[n(521)][n(685)](r,this[n(597)](e),s);if(this[n(692)]=o[n(692)],t){if(!o[n(534)])return void this[n(732)]();this[n(567)]=!1,this[n(513)](),this[n(632)][n(677)](),this[n(733)]=o[n(487)],this[n(632)][n(636)]=this[n(733)],await this[n(585)](e,o,n(584))}else await this[n(648)](o,e);this[n(616)](),this[n(535)]=!0}[Fr(616)](){const e=Fr,t=this[e(709)][e(586)][e(631)](m),n=this[e(709)][e(586)][e(631)](w),r=t[e(704)][e(631)](this[e(639)]);r&&r[e(649)]>1?n[e(694)]():this[e(646)](t,e(681)+this[e(639)],(()=>{const r=e;2===t[r(704)][r(631)](this[r(639)])[r(649)]&&n[r(694)]()}))}async[Fr(608)](e,t,n,r){const s=Fr;if(!this[s(567)]&&this[s(666)][s(636)]==t){const e=this[s(637)](n,r);await this[s(625)](e),this[s(494)](e,t,n[s(549)])||this[s(605)](s(488))}}async[Fr(497)](){const e=Fr;this[e(693)]();const{locale:t}=this[e(709)];let n;try{n=await this[e(521)][e(684)]()}catch(n){const r=P(t,e(697));return void this[e(732)](r)}const r=n[e(533)]||n[e(619)];if(this[e(482)]===r[e(549)])await this[e(695)](this[e(709)][e(537)][e(563)][e(691)][e(503)](),!0);else{const n=P(t,e(594));this[e(732)](n)}}[Fr(693)](){const e=Fr;this[e(521)][e(528)](),this[e(638)]=[],clearTimeout(this[e(726)]),this[e(599)](this[e(521)])}[Fr(522)](e){const t=Fr,n=this[t(709)][t(586)][t(631)](m);this[t(646)](n,t(681)+this[t(639)],((e,{session:r})=>{const s=t;if(r.id===n[s(612)]){e[s(738)]();const t=this[s(709)][s(586)][s(640)](s(516))&&this[s(709)][s(586)][s(631)](s(516));let n=r[s(505)];t&&t[s(651)]&&(n=n[s(591)]((e=>s(601)!==e))),this[s(709)][s(586)][s(631)](s(512))[s(683)](n,this[s(639)])}})),n[t(509)](this[t(639)],e)}[Fr(650)](){const e=Fr,t=this[e(709)][e(703)][e(558)];this[e(709)][e(703)][e(558)]=(...r)=>{const s=e;if(!r[r[s(649)]-1][s(645)])throw new n.CKEditorError(s(580),this);t[s(536)](this[s(709)][s(703)],r)}}[Fr(546)](){const e=Fr;this[e(709)][e(703)].on(e(483),((t,[r])=>{const o=e;if(this[o(666)][o(636)])throw new n.CKEditorError(o(689),this);t[o(623)](),this[o(707)]();const i=this[o(709)][o(596)][o(631)](o(621)),a=this[o(556)](r,i);0==a[o(649)]&&a[o(675)](new s.NoOperation(0)),t[o(686)]=this[o(695)](a)[o(614)]((()=>{const e=o;this[e(709)][e(586)][e(631)](d)[e(712)](this),this[e(709)][e(703)][e(551)](e(629))}))[o(508)]((e=>this[o(605)](o(688),e)))[o(520)]((()=>this[o(513)]()))}),{priority:e(560)}),this[e(709)].on(e(578),(async(t,[n,r])=>{const s=e;t[s(623)]();const o=this[s(709)][s(537)][s(563)][s(540)](n);if(!this[s(617)][s(640)](n)){const e=r&&r[s(703)]?r[s(703)]:"",t=r&&r[s(576)]?r[s(576)]:{};await this[s(655)](n,e,t)}this[s(709)][s(537)][s(543)]({isUndoable:!1},(()=>{const e=s;o[e(679)]=!0,this[e(709)][e(537)][e(563)][e(690)][e(517)](o)}))}),{priority:e(560)})}async[Fr(625)](e){const t=Fr,n=this[t(709)][t(586)][t(631)](l.Users),{connection:r}=this[t(709)][t(586)][t(631)](d),s=new Set;for(const r of e){const e=r[t(718)];e&&!n[t(507)](e)&&s[t(665)](e)}if(0===s[t(664)])return;const o=await Yr.User[t(725)](r,Array[t(624)](s));for(const e of o)n[t(507)](e.id)||n[t(568)](e)}[Fr(556)](e,t={}){const r=Fr,o=this[r(709)][r(537)],i=[];let a=0;const c=r(496)==typeof e?{main:e}:e;for(const e of Object[r(572)](c)){if(!this[r(666)][r(593)][r(640)](e))throw new n.CKEditorError(r(532),this);const t=this[r(709)][r(703)][r(600)](c[e]),u=this[r(666)][r(540)](e),d=new s.InsertOperation(o[r(658)](u,0),t,a++);i[r(675)](d);for(const[e,n]of t[r(661)]){const t=o[r(642)](o[r(727)](u,n[r(577)][r(569)][r(669)]()),o[r(727)](u,n[r(589)][r(569)][r(669)]())),c=new s.MarkerOperation(e,null,t,o[r(661)],!0,a++);i[r(675)](c)}}if(t)for(const[e,c]of Object[r(698)](t)){const t=o[r(563)][r(540)](e);if(!t)throw new n.CKEditorError(r(541),null);for(const[e,n]of Object[r(698)](c))if(null!==n){const o=new s.RootAttributeOperation(t,e,null,n,a++);i[r(675)](o)}}return i}async[Fr(655)](e,t,n){const r=Fr;this[r(556)]({[e]:t},{[e]:n})[r(708)](((e,t)=>{const n=r;e[n(547)]=this[n(666)][n(636)]+t,e[n(626)]=!0,this[n(673)](e)})),this[r(598)](),await this[r(510)]()}async[Fr(648)](e,t){const n=Fr;let r;this[n(733)]=e[n(487)];const s=e[n(534)]&&!e[n(730)],o=s?0:e[n(703)][n(547)];if(t[n(708)]((t=>{const r=n;t[r(626)]=!0,t[r(701)]=e[r(525)],t[r(718)]=null})),s)r=t,this[n(592)](r,s);else{if(e[n(730)]){const t=this[n(556)](e[n(730)]);this[n(666)][n(691)][n(636)]=-t[n(649)],t[n(708)]((r=>{const s=n;r[s(547)]-=t[s(649)],r[s(701)]=e[s(525)],r[s(626)]=!0,r[s(718)]=null})),this[n(592)](t,!0),this[n(632)][n(636)]=-t[n(649)]+this[n(733)],this[n(609)](t)}this[n(666)][n(691)][n(636)]=o,r=this[n(637)](e[n(703)],e[n(511)]),await this[n(625)](r),this[n(592)](r,s)}e[n(549)]&&(this[n(493)][n(672)](r,e[n(549)]),this[n(482)]=e[n(549)]),this[n(632)][n(636)]=o+this[n(733)],this[n(609)](r),t[n(591)]((e=>{const t=n,r=this[t(671)](e);return r&&!this[t(617)][t(640)](r)}))[n(708)](((e,t)=>{const r=n;e[r(547)]=this[r(666)][r(636)]+t,this[r(673)](e)})),this[n(489)]()?(this[n(742)]=0,this[n(598)](!0),await this[n(510)]()):(this[n(567)]=!1,this[n(513)]())}[Fr(605)](e,t){const r=Fr;throw this[r(567)]=!0,t&&console[r(575)](t),new n.CKEditorError(e,this[r(709)])}[Fr(673)](e){const t=Fr;this[t(582)][t(640)](e)||(this[t(582)][t(665)](e),this[t(638)][t(675)](e),this[t(574)]||t(647)==e[t(588)]&&!e[t(581)]||this[t(707)]())}[Fr(598)](e=!1){const t=Fr;!e&&this[t(567)]||(this[t(567)]=!0,clearTimeout(this[t(726)]),this[t(726)]=setTimeout((()=>{const e=t;this[e(674)]()[e(614)]((t=>{const n=e;t&&(this[n(513)](),this[n(567)]=!1)}))[e(508)]((t=>{const n=e;if(this[n(513)](),this[n(567)]=!1,!function(e){const t=n;return e[t(741)][t(554)](t(544))||e[t(741)][t(554)](t(705))||e[t(741)][t(554)](t(604))}(t))throw t}))}),this[t(742)]))}[Fr(510)](){return new Promise((e=>{const t=Qr;this.on(t(719),(()=>{e()}))}))}async[Fr(674)](){const e=Fr,t=this[e(709)][e(586)][e(631)](w);if(this[e(643)]()&&(t[e(694)](),this[e(570)]=!1),!this[e(489)]())return!0;const n=[...this[e(638)]];for(const t of n)t[e(548)]=this[e(666)][e(691)][e(668)](t);const r=this[e(493)][e(550)](n),s=Hr++,o=this[e(597)](n),i=await this[e(521)][e(728)](o,o[e(547)],r);try{return await this[e(585)](n,i,s)}catch(t){return this[e(605)](e(500),t)}}async[Fr(585)](e,t,n){const r=Fr;if(r(575)in t)throw t[r(575)];let s=!1;if(t[r(534)]){t[r(549)]&&(this[r(482)]=t[r(549)]),this[r(638)]=this[r(638)][r(591)]((t=>!e[r(545)](t)));for(const n of e)n[r(701)]=r(552)in t&&t[r(552)]||void 0;Xr(e,t[r(636)]-e[r(649)]),this[r(609)](e);const n=e[r(591)]((e=>{const t=r;if(!e[t(626)])return!1;const n=this[t(671)](e);return n&&!this[t(617)][t(640)](n)}));Xr(n,this[r(666)][r(636)]),this[r(592)](n),s=!0,this[r(742)]=this[r(660)]}else{const e=this[r(637)](t[r(703)],t[r(511)])[r(591)]((e=>e[r(547)]>=this[r(630)]));e[r(708)]((e=>this[r(628)](e))),this[r(638)]=this[r(638)][r(591)]((e=>!e[r(626)]||!this[r(617)][r(640)](this[r(671)](e)))),this[r(638)][r(649)]&&Xr(this[r(638)],this[r(638)][0][r(547)]),await this[r(625)](e),s=this[r(494)](e,t[r(636)],t[r(549)]),this[r(742)]=Math[r(734)](this[r(742)]/2)}return s?!this[r(489)]()||(this[r(598)](!0),!1):this[r(605)](r(711))}[Fr(494)](e,t,n){const r=Fr;try{const o={document:this[r(666)],useRelations:!1,padWithNoOps:!0},{operationsA:i,operationsB:a,originalOperations:c}=(0,s.transformSets)(e,this[r(638)],o);Xr(i,this[r(666)][r(636)]),Xr(a,t);for(const e of i){const t=c[r(631)](e);e[r(718)]=t?t[r(718)]:null}n&&(this[r(493)][r(672)](e,n),this[r(482)]=n),this[r(638)]=[...a],this[r(592)](i),this[r(609)](e)}catch(e){return console[r(575)](e),!1}return!0}[Fr(592)](e,t=!1){const n=Fr;this[n(709)][n(537)][n(543)]({isUndoable:!1,isLocal:!1},(t=>{const r=n;for(const n of e)this[r(582)][r(665)](n),this[r(628)](n),t[r(706)][r(736)](n),this[r(709)][r(537)][r(657)](n)}))}[Fr(628)](e){const t=Fr,n=this[t(671)](e);n&&this[t(617)][t(665)](n)}[Fr(671)](e){const t=Fr;let n,r;switch(e[t(588)]){case t(602):n=e[t(735)][t(564)];break;case t(647):if(r=e[t(613)],!r)return null;n=r[t(564)];break;case t(495):n=e[t(564)];break;case t(502):n=e[t(530)];break;case t(670):n=e[t(702)][t(564)];break;default:return null}return n[t(644)]}[Fr(609)](e){const t=Fr;e[t(708)]((e=>{const n=t,r=e[n(515)]();r[n(718)]=e[n(718)],r[n(626)]=!!e[n(626)],r[n(701)]=e[n(701)],r[n(547)]+=this[n(733)],e[n(713)]&&this[n(526)][n(665)](r),this[n(632)][n(736)](r)}))}[Fr(732)](e){const t=Fr,n=this[t(709)][t(586)][t(631)](t(663)),r=this[t(709)][t(656)];e||(e=P(r,t(635))),n[t(731)](e,{title:P(r,t(633)),namespace:t(610)}),this[t(562)]=!0,clearTimeout(this[t(726)]),this[t(638)]=[],this[t(709)][t(586)][t(631)](d)[t(687)]()}[Fr(707)](){const e=Fr;this[e(574)]||(this[e(574)]=this[e(709)][e(586)][e(631)](t.PendingActions)[e(665)](P(this[e(709)][e(656)],e(539))))}[Fr(513)](){const e=Fr;this[e(574)]&&(this[e(709)][e(586)][e(631)](t.PendingActions)[e(518)](this[e(574)]),this[e(574)]=null)}[Fr(597)](e){const t=Fr,n=e[t(634)]((e=>e[t(737)]()));return this[t(740)][t(566)](n)}[Fr(637)](e,t){const n=Fr;return this[n(740)][n(611)](e)[n(634)](((e,r)=>{const o=n,i=o(483)==t[r][o(588)];if(o(627)==e[o(559)]){const t=e[o(735)][o(564)];!this[o(666)][o(540)](t)&&(this[o(666)][o(492)](o(573),t)[o(721)]=!1)}const a=s.OperationFactory[o(739)](e,this[o(666)]);return a[o(548)]=e[o(548)],a[o(626)]=i,a[o(718)]=i?null:t[r][o(498)],a[o(713)]=o(722)===t[r][o(588)],a[o(701)]=t[r][o(701)],a}))}[Fr(710)](){const e=Fr;this[e(570)]=!0,this[e(643)]()?this[e(598)]():this[e(570)]=!1}[Fr(643)](){const e=Fr,t=this[e(709)][e(586)][e(631)](m)[e(704)][e(631)](this[e(639)]);return!this[e(709)][e(641)]&&!!t&&t[e(649)]>1&&this[e(570)]}[Fr(489)](){const e=Fr;return this[e(638)][e(649)]>0||this[e(643)]()}}Kr[Fr(699)]=o.CollaborativeEditingService;const Wr=Kr;class $r extends Error{}function Qr(e,t){const n=zr();return(Qr=function(e,t){return n[e-=482]})(e,t)}function Xr(e,t){const n=Fr;for(const r of e)r[n(547)]=t++}class Zr{constructor(e){const t=Fr;this[t(514)]=e,this[t(542)]=new WeakMap}[Fr(550)](e){const t=Fr;let r=e[t(649)];for(;r--;){const s=e[r];if(!this[t(514)][t(640)](s)){if(!this[t(542)][t(640)](s)){const e=(0,n.uid)()[t(669)](1,18);this[t(542)][t(558)](s,e)}return this[t(542)][t(631)](s)}}}[Fr(672)](e,t){const n=Fr;if(!t)return;let r=e[n(649)];for(;r--;){const s=e[r];this[n(514)][n(640)](s)||this[n(542)][n(558)](s,t)}}}function es(){var e=["8jePUay","RealTimeCollaborativeEditing","4aotwVN","pluginName","172MEVoWI","520FbvKQL","requires","19083rPUuaB","662430BQfvvH","25047nZiJfU","700581BnSXoO","12RVeqAD","3568191JygrnU","132644AxcMkx","1435278neVBrs"];return(es=function(){return e})()}function ts(e,t){var n=es();return(ts=function(e,t){return n[e-=425]})(e,t)}var ns=ts;!function(e,t){for(var n=ts,r=e();;)try{if(365790===-parseInt(n(437))/1*(-parseInt(n(433))/2)+-parseInt(n(427))/3*(-parseInt(n(439))/4)+-parseInt(n(428))/5+parseInt(n(434))/6+parseInt(n(430))/7*(-parseInt(n(435))/8)+parseInt(n(429))/9*(parseInt(n(425))/10)+parseInt(n(432))/11*(-parseInt(n(431))/12))break;r.push(r.shift())}catch(e){r.push(r.shift())}}(es);class rs extends t.Plugin{static get[ns(426)](){return[Wr]}static get[ns(438)](){return ns(436)}}const ss=os;function os(e,t){const n=ls();return(os=function(e,t){return n[e-=433]})(e,t)}!function(e,t){const n=os,r=e();for(;;)try{if(455363===parseInt(n(446))/1*(-parseInt(n(460))/2)+parseInt(n(482))/3+-parseInt(n(454))/4+-parseInt(n(495))/5*(parseInt(n(496))/6)+-parseInt(n(451))/7*(parseInt(n(508))/8)+-parseInt(n(444))/9+parseInt(n(467))/10*(parseInt(n(486))/11))break;r.push(r.shift())}catch(e){r.push(r.shift())}}(ls);class is extends t.ContextPlugin{static get[ss(527)](){return[d,ss(434),m,l.Users]}static get[ss(494)](){return ss(490)}constructor(e){const t=ss;super(e),this[t(479)]=new Map}async[ss(476)](){const e=ss,n=this[e(533)],r=n[e(507)][e(473)](e(434));if(n[e(507)][e(473)](d)[e(498)](this),r[e(461)]={addCommentThread:async({channelId:t,threadId:n,comments:r,resolvedAt:s,resolvedBy:o,context:i,attributes:a})=>{const c=e,u=await this[c(481)](t)[c(505)]({commentThreadId:n,comments:r[c(455)]((e=>function(e,t,n){const r=c;return{commentThreadId:n,commentId:e[r(502)],userId:e[r(491)],content:e[r(516)],documentId:t,createdAt:e[r(465)],attributes:e[r(439)]||{}}}(e,t,n))),resolvedAt:s,resolvedBy:o,context:i,attributes:a})[c(449)](us);return{threadId:u[c(459)],comments:u[c(448)]}},getCommentThread:async({channelId:t,threadId:n})=>{const r=e,s=await this[r(481)](t)[r(488)](n)[r(449)](us);return await this[r(478)]([s]),{threadId:s[r(459)],comments:s[r(448)][r(455)](ds),context:s[r(533)],resolvedAt:s[r(511)],resolvedBy:s[r(437)],attributes:s[r(439)]||{}}},updateCommentThread:async({channelId:t,threadId:n,context:r,unlinkedAt:s,attributes:o})=>this[e(481)](t)[e(462)]({commentThreadId:n,context:r,attributes:o,unlinkedAt:s})[e(449)](cs)[e(449)](us),resolveCommentThread:async({channelId:t,threadId:n})=>{const r=e,s=await this[r(481)](t)[r(485)](n)[r(449)](cs)[r(449)](us);return{threadId:s[r(459)],resolvedAt:s[r(511)],resolvedBy:s[r(437)]}},reopenCommentThread:async({channelId:t,threadId:n})=>this[e(481)](t)[e(493)](n)[e(449)](cs)[e(449)](us),removeCommentThread:({channelId:t,threadId:n})=>this[e(481)](t)[e(529)](n)[e(449)](cs)[e(449)](us),addComment:({channelId:t,threadId:n,commentId:r,content:s,attributes:o})=>this[e(481)](t)[e(489)](n,r,s,o)[e(449)](us),updateComment:({channelId:t,threadId:n,commentId:r,content:s,attributes:o})=>this[e(481)](t)[e(532)](n,r,s,o)[e(449)](cs)[e(449)](us),removeComment:({channelId:t,threadId:n,commentId:r})=>this[e(481)](t)[e(510)](n,r)[e(449)](cs)[e(449)](us)},n instanceof t.Context){const t=n[e(504)][e(473)](e(477)),r=n[e(507)][e(473)](m);await this[e(472)](t);const s=await this[e(479)][e(473)](t)[e(512)]();this[e(531)](r,e(466)+t,((n,{session:s})=>{const o=e;s.id===r[o(515)]&&(n[o(436)](),this[o(533)][o(507)][o(473)](o(518))[o(521)](s[o(525)],t))})),r[e(464)](t,s)}}async[ss(472)](e){const t=ss;if(this[t(479)][t(469)](e))throw new n.CKEditorError(t(484),null,{channelId:e});const r=this[t(533)][t(507)][t(473)](t(434)),s=new(is[t(438)])(e);this[t(479)][t(519)](e,s),this[t(531)](s,t(530),((e,n)=>{const s=t,{commentThreadId:o,documentId:i,context:a,attributes:c,resolvedAt:u,resolvedBy:d,comments:l}=n;r[s(488)](o)||r[s(505)]({threadId:o,channelId:i,comments:l?l[s(455)](ds):[],context:a,attributes:c,resolvedAt:u,resolvedBy:d,isFromAdapter:!0})})),this[t(531)](s,t(440),((e,{commentThreadId:n,documentId:s,context:o,unlinkedAt:i,attributes:a})=>{const c=t;r[c(488)](n)&&r[c(462)]({threadId:n,channelId:s,context:o,unlinkedAt:i,attributes:a,isFromAdapter:!0})})),this[t(531)](s,t(509),((e,{commentThreadId:n,resolvedBy:s,resolvedAt:o})=>{const i=t,a=r[i(488)](n);a&&a[i(433)]({resolvedBy:s,resolvedAt:o,isFromAdapter:!0})})),this[t(531)](s,t(450),((e,{commentThreadId:n})=>{const s=t,o=r[s(488)](n);o&&o[s(463)]({isFromAdapter:!0})})),this[t(531)](s,t(458),((e,{commentThreadId:n})=>{const s=t,o=r[s(488)](n);o&&o[s(492)]({isFromAdapter:!0})})),this[t(531)](s,t(443),((e,n)=>{const s=t,o=n[s(459)],i=r[s(488)](o);i&&i[s(489)]({...ds(n),isFromAdapter:!0})})),this[t(531)](s,t(503),((e,{commentThreadId:n,commentId:s,content:o,attributes:i})=>{const a=t,c=r[a(488)](n);if(c){const e=c[a(513)](s);e&&e[a(506)]({content:o,attributes:i,isFromAdapter:!0})}})),this[t(531)](s,t(528),((e,{commentThreadId:n,commentId:s})=>{const o=t,i=r[o(488)](n);if(i){const e=i[o(513)](s);e&&e[o(492)]({isFromAdapter:!0})}})),await this[t(487)](e)}[ss(500)](){const e=ss;if(this[e(533)]instanceof t.Context){const t=this[e(533)][e(504)][e(473)](e(477));this[e(456)](t)}}[ss(456)](e){const t=ss;if(!this[t(479)][t(469)](e))throw new n.CKEditorError(t(435),null,{channelId:e});this[t(481)](e)[t(453)](),this[t(479)][t(526)](e)}async[ss(524)](){const e=ss;for(const t of this[e(479)][e(442)]())await this[e(487)](t);if(this[e(533)]instanceof t.Context){const t=this[e(533)][e(504)][e(473)](e(477)),n=this[e(533)][e(507)][e(473)](m);n[e(441)](t);const r=await this[e(479)][e(473)](t)[e(512)]();n[e(464)](t,r)}}async[ss(487)](e){const t=ss,{connection:n}=this[t(533)][t(507)][t(473)](d),r=this[t(533)][t(507)][t(473)](t(434)),s=this[t(479)][t(473)](e),o=await s[t(522)](n);await this[t(478)](o);const i=new Set(Array[t(445)](r[t(499)]({channelId:e}),(e=>e.id)));for(const e of o)e[t(447)]||i[t(526)](e[t(459)]);for(const e of i)r[t(488)](e)[t(492)]({isFromAdapter:!0});for(const n of o){let s=r[t(488)](n[t(459)]);const{commentThreadId:o,context:i,attributes:a,resolvedBy:c,resolvedAt:u,unlinkedAt:d,deletedAt:l}=n;if(l)continue;s||(s=r[t(505)]({channelId:e,threadId:o,context:i,attributes:a||{},resolvedBy:c,resolvedAt:u,unlinkedAt:d,isFromAdapter:!0}));const p=new Set(Array[t(445)](s[t(448)],(e=>e.id)));for(const e of n[t(448)])p[t(526)](e[t(502)]);for(const e of p)s[t(513)](e)[t(492)]({isFromAdapter:!0});for(const e of n[t(448)]){const n=s[t(513)](e[t(502)]);n?n[t(516)]!==e[t(516)]&&n[t(506)]({content:e[t(516)],isFromAdapter:!0}):s[t(489)](Object[t(483)](ds(e),{isFromAdapter:!0}))}}}[ss(481)](e){const t=ss;if(!this[t(479)][t(469)](e))throw new n.CKEditorError(t(471),null,{channelId:e});return this[t(479)][t(473)](e)}async[ss(478)](e){const t=ss,n=this[t(533)][t(507)][t(473)](l.Users),{connection:r}=this[t(533)][t(507)][t(473)](d),s=new Set;for(const{resolvedBy:r,comments:o}of e){r&&!n[t(480)](r)&&s[t(468)](r);for(const{userId:e}of o)n[t(480)](e)||s[t(468)](e)}if(0===s[t(470)])return;const o=await Yr.User[t(474)](r,Array[t(445)](s));for(const e of o)n[t(480)](e.id)||n[t(452)](e)}}is[ss(438)]=o.CommentsService;const as=is;async function cs(e){const t=ss;if(t(523)!==e[t(475)])throw e}function us(e){const t=ss;if((n=e)[t(501)][t(514)](t(497))||n[t(501)][t(514)](t(517))||n[t(501)][t(514)](t(457)))return new Promise((()=>{}));var n;throw e}function ds(e){const t=ss;return{threadId:e[t(459)],commentId:e[t(502)],content:e[t(516)],createdAt:e[t(465)],authorId:e[t(520)],attributes:e[t(439)]||{}}}function ls(){const e=["commentThreadResolved","removeComment","resolvedAt","getConnectedSessions","getComment","startsWith","mySessionId","content","cloud-services-internal-error: Not connected.","Permissions","set","userId","setPermissions","connect","404","reconnect","permissions","delete","requires","commentRemoved","removeCommentThread","commentThreadAdded","listenTo","updateComment","context","resolve","CommentsRepository","cloudservicescommentsadapter-disconnect-not-exist","off","resolvedBy","CommentsService","attributes","commentThreadUpdated","unregister","keys","commentAdded","1826505lGgkgI","from","1627XLzVPk","deletedAt","comments","catch","commentThreadReopened","21FGzzJG","addUser","disconnect","160720utouve","map","_terminateService","cloud-services-internal-error: Request timeout.","commentThreadRemoved","commentThreadId","544ZGHUze","adapter","updateCommentThread","reopen","register","createdAt","sessionAdd:","845910riSKUZ","add","has","size","cloudservicescommentsadapter-service-not-exist","_setUpService","get","getMany","code","init","collaboration.channelId","_fetchMissingUsersForThreads","_services","getUser","_getService","2490429demdDj","assign","cloudservicescommentsadapter-connect-already-connected","resolveCommentThread","209EFcuuu","_connectService","getCommentThread","addComment","CloudServicesCommentsAdapter","authorId","remove","reopenCommentThread","pluginName","25RGzKDt","705666PogdEv","cloud-services-internal-error: Comments Service is not connected.","addToReconnectionStack","getCommentThreads","destroy","message","commentId","commentUpdated","config","addCommentThread","update","plugins","1888760YzqTON"];return(ls=function(){return e})()}function ps(){const e=["3434952obIrhw","getSuggestion","getMany","8CpsXLa","isConnected","listenTo","open","values","_fetchMissingUsersForThreads","getUser","10615Lqjoxt","originalSuggestionId","TrackChangesService","40270XEPVXX","addSuggestionData","catch","then","get","editor","cloud-services-internal-error: Not connected.","addUser","1103649NlsVOa","TrackChangesEditing","suggestionUpdated","init","9430525vGsTJV","cloud-services-internal-error: Request timeout.","collaboration.channelId","adapter","from","_waitForServiceReady","4dmHnor","_trackChangesService","connect","2xMrfTc","size","config","_saved","data","connected","find","update","attributes","requires","type","23301hDExLa","message","connection","set","delete","hasSuggestion","reconnect","9947763CWBTxd","addToReconnectionStack","off","plugins","startsWith","11869795EFQSlD","_bufferedRequests","add","state"];return(ps=function(){return e})()}const hs=fs;function fs(e,t){const n=ps();return(fs=function(e,t){return n[e-=256]})(e,t)}!function(e,t){const n=fs,r=e();for(;;)try{if(982350===-parseInt(n(265))/1*(parseInt(n(315))/2)+-parseInt(n(302))/3*(parseInt(n(312))/4)+parseInt(n(306))/5+parseInt(n(281))/6+parseInt(n(277))/7+-parseInt(n(284))/8*(-parseInt(n(272))/9)+parseInt(n(294))/10*(-parseInt(n(291))/11))break;r.push(r.shift())}catch(e){r.push(r.shift())}}(ps);class ms extends t.Plugin{static get[hs(263)](){return[as,hs(303),d]}constructor(e){const t=hs;super(e);const n=this[t(299)][t(256)][t(298)](t(308));this[t(278)]=new Map,this[t(313)]=new(ms[t(293)])(n)}[hs(305)](){const e=hs,t=this[e(299)][e(275)][e(298)](d),n=this[e(299)][e(275)][e(298)](e(303));return n[e(309)]={getSuggestion:async t=>{const n=e;await this[n(311)]();const r=await this[n(313)][n(298)](t)[n(296)](ys);return await this[n(289)]([r]),r},addSuggestion:async({id:t,type:n,data:r,originalSuggestionId:s,attributes:o})=>{const i=e;await this[i(311)]();const a={id:t,type:n,data:r,originalSuggestionId:s,attributes:o},c=await this[i(313)][i(279)](t,n,r,s,o)[i(296)]((e=>{if(gs(e))return new Promise((e=>{const n=fs;this[n(278)][n(268)](t,{resolve:e,suggestionData:a})}));throw e}));return this[i(278)][i(269)](t),c},updateSuggestion:async(t,n)=>{const r=e;if(await this[r(311)](),r(287)!==n[r(280)])return this[r(313)][r(261)](t,n)[r(296)](ys)}},this[e(286)](this[e(313)],e(304),((t,r)=>{const s=e;n[s(270)](r.id)&&(n[s(282)](r.id)[s(262)]=r[s(262)])})),this[e(313)][e(314)](t[e(267)])[e(297)]((r=>(t[e(273)](this),this[e(289)](r)[e(297)]((()=>{const t=e;for(const e of r)n[t(295)](e)[t(257)]=!0})))))}async[hs(271)](){const e=hs,t=this[e(299)][e(275)][e(298)](e(303)),{connection:n}=this[e(299)][e(275)][e(298)](d),r=await this[e(313)][e(314)](n);await this[e(289)](r);for(const{suggestionData:t,resolve:n}of this[e(278)][e(288)]()){let s=r[e(260)]((e=>e.id===t.id));s||(s=await this[e(313)][e(279)](t.id,t[e(264)],t[e(258)],t[e(292)])),n(s)}for(const n of r)t[e(270)](n.id)||t[e(295)](n)}async[hs(311)](){const e=hs;this[e(313)][e(285)]||await new Promise((t=>{const n=e;this[n(286)](this[n(313)],n(259),(e=>{e[n(274)](),t()}))}))}async[hs(289)](e){const t=hs,n=this[t(299)][t(275)][t(298)](l.Users),{connection:r}=this[t(299)][t(275)][t(298)](d),s=new Set;for(const{authorId:r}of e)n[t(290)](r)||s[t(279)](r);if(0===s[t(316)])return;const o=await Yr.User[t(283)](r,Array[t(310)](s));for(const e of o)n[t(290)](e.id)||n[t(301)](e)}}function ys(e){if(gs(e))return new Promise((()=>{}));throw e}function gs(e){const t=hs;return e[t(266)][t(276)](t(300))||e[t(266)][t(276)](t(307))}function bs(e,t){const n=vs();return(bs=function(e,t){return n[e-=108]})(e,t)}ms[hs(293)]=o.TrackChangesService;const Os=bs;function vs(){const e=["init","isThreadsLoadingPaused","config","editor","ready","8vXMJPo","11UPPwbc","27IMPofW","8323805IoGgFA","_setUpService","CommentsEditing","100gUwkgx","requires","pluginName","plugins","237948PxkLhM","switchReadOnly","change:state","_terminateService","Comments","data","listenTo","connected","once","16906452nBASOa","4018208VDGsVo","3768070AalBWn","get","346tIOPCR","352711CGRtsz","21003AfroLY","CommentsRepository","RealTimeCollaborativeComments","destroy","collaboration.channelId"];return(vs=function(){return e})()}!function(e,t){const n=bs,r=e();for(;;)try{if(864611===parseInt(n(130))/1+parseInt(n(129))/2*(parseInt(n(131))/3)+parseInt(n(126))/4+-parseInt(n(112))/5*(parseInt(n(116))/6)+parseInt(n(109))/7*(-parseInt(n(141))/8)+-parseInt(n(108))/9*(parseInt(n(127))/10)+-parseInt(n(142))/11*(-parseInt(n(125))/12))break;r.push(r.shift())}catch(e){r.push(r.shift())}}(vs);class ws extends t.Plugin{static get[Os(113)](){return[Os(120),as,rs,d]}static get[Os(114)](){return Os(133)}[Os(136)](){const e=Os,t=this[e(139)][e(115)][e(128)](d),n=this[e(139)][e(115)][e(128)](e(111)),r=this[e(139)][e(115)][e(128)](as);return this[e(139)][e(121)][e(124)](e(140),(()=>{const r=e;this[r(122)](t,r(118),((e,t,s)=>{const o=r;n[o(137)]=o(123)!==s}))})),this[e(122)](t,e(118),((t,n,r)=>{const s=e;this[s(139)][s(115)][s(128)](s(132))[s(117)](s(123)!==r)})),r[e(110)](this[e(139)][e(138)][e(128)](e(135)))}[Os(134)](){const e=Os;this[e(139)][e(115)][e(128)](as)[e(119)](this[e(139)][e(138)][e(128)](e(135))),super[e(134)]()}}var Is=Ss;function _s(){var e=["1294984wZKOhC","pluginName","TrackChanges","22191498iSBHtg","82714EKFbGJ","897477nXeLiQ","75Aaeybu","10rZWtlk","requires","82520nhxHja","1801962KOJiRx","3850835pGjhzo","826OfGAZC","RealTimeCollaborativeTrackChanges"];return(_s=function(){return e})()}function Ss(e,t){var n=_s();return(Ss=function(e,t){return n[e-=331]})(e,t)}!function(e,t){for(var n=Ss,r=e();;)try{if(966010===parseInt(n(335))/1+-parseInt(n(334))/2*(parseInt(n(336))/3)+parseInt(n(344))/4+-parseInt(n(341))/5+parseInt(n(340))/6+-parseInt(n(342))/7*(parseInt(n(339))/8)+parseInt(n(333))/9*(parseInt(n(337))/10))break;r.push(r.shift())}catch(e){r.push(r.shift())}}(_s);class Ps extends t.Plugin{static get[Is(338)](){return[ws,ms,Is(332)]}static get[Is(331)](){return Is(343)}}const As=Es;function Ts(){const e=["collaboration.channelId","6ZBfred","remove","get","destroy","CONNECTED","change:_isPendingUpdate","reconnect","currentRevision","buildRevisionData","change:_isConnected","400","marker","getOperations","connect","RevisionTracker","cloud-services-internal-error: Revision History Service is not connected.","connected","startsWith","709841hamGWV","code","_revisionTracker","toVersion","config","addRevisionData","wrongRequestId","from","catch","_fetchMissingUsers","isEnabled","_getLatestVersionFromServerOperations","adapter","_offset","add","connection","affectsData","_update","has","13401CzKlgf","cloud-services-internal-error: Not connected.","isEmptyCurrent","data","listenTo","map","954734WtTuAj","_revisionHistoryService","_oldOffset","creatorId","_isPendingUpdate","reverse","editor","sessionId","_fixRevision","_handleRevisionsUpdate","updateRevisions","20EuENyz","max","setRevisionData","RevisionHistoryService","createdAt","addUser","isConnected","plugins","_lastRequestId","init","_revisionDataBuilder","state","fromVersion","reInit","_createCurrentRevision","_startingVersion","once","off","12tiLoMK","_waitForServiceReady","requires","type","1107844GNYdvo","getUser","message","isBundleUploaded","2109485CRyhpX","bind","_getLatestVersion","setSource","addToReconnectionStack","size","15010pVwAzp","then","_bufferedUpdates","length","cloudServices.bundleVersion","5368clKpUs","getMany","keys","authors","getRevisions","_isConnected","_handleReconnectionError","sendBufferedUpdates","34277712EcNhhJ","_revisions","authorsIds","serverHistory","getRevision","_preventResendingRevisionData","baseVersion","18fmPqQk","diffData","revisionsUpdated","repository","cloud-services-internal-error: Request timeout.","_bufferUpdate"];return(Ts=function(){return e})()}!function(e,t){const n=Es,r=e();for(;;)try{if(578788===-parseInt(n(355))/1+parseInt(n(322))/2*(-parseInt(n(279))/3)+-parseInt(n(351))/4*(-parseInt(n(365))/5)+parseInt(n(272))/6*(parseInt(n(359))/7)+-parseInt(n(370))/8*(parseInt(n(316))/9)+-parseInt(n(333))/10*(parseInt(n(297))/11)+parseInt(n(378))/12)break;r.push(r.shift())}catch(e){r.push(r.shift())}}(Ts);class ks extends t.Plugin{static get[As(353)](){return[d,Wr,As(293),m,l.Users]}constructor(e){const t=As;super(e);const n=this[t(328)][t(301)][t(281)](t(278));this[t(341)]=null,this[t(299)]=this[t(328)][t(340)][t(281)](t(293)),this[t(323)]=new(ks[t(336)])(n)}async[As(342)](){const e=As,t=this[e(328)][e(340)][e(281)](Wr),r=t[e(268)],s=this[e(328)][e(340)][e(281)](d);this[e(299)][e(362)]({history:r,getLatestVersion:()=>this[e(361)](),getCurrentRevisionId:()=>t[e(329)]});const i=this[e(328)][e(301)][e(281)](e(369))||n.version,a=await o.EditorService[e(358)](s[e(312)],i);this[e(299)][e(309)]={getRevision:async({revisionId:t})=>(await this[e(352)](),await this[e(323)][e(269)](t)),updateRevisions:async t=>{const n=e;await this[n(352)]();const r=this[n(299)][n(286)];if(a&&1===t[n(368)]&&t[0].id===r.id)return t;for(const e of t)e.id===r.id&&(e[n(318)]=e[n(345)]===e[n(300)]);return this[n(323)][n(332)](t,this[n(341)])[n(366)]((e=>(this[n(341)]=e,t)))[n(305)]((e=>{const r=n;if(js(e)||r(289)===e[r(298)]&&void 0!==e[r(319)][r(303)]){for(const e of t)!this[r(299)][r(275)][r(269)](e.id)||this[r(299)][r(277)](e.id,e,!1);if(js(e))throw e;return t}throw e}))}},this[e(320)](this[e(323)],e(274),((t,{revisionsData:n,requestId:r})=>{const s=e;Math[s(334)](...n[s(321)]((e=>e[s(300)])))>this[s(308)]()-1?this[s(361)]()[s(366)]((()=>{this[s(331)](n,r)})):this[s(331)](n,r)}));const{revisions:c,requestId:u}=await this[e(323)][e(292)](s[e(312)]);s[e(363)](this),this[e(341)]=u,await this[e(306)](c);for(const t of c)this[e(299)][e(302)](t);this[e(320)](t,e(288),((n,r,s)=>{const o=e;s&&(this[o(324)]=t[o(310)],n[o(350)]())})),this[e(299)][e(360)](e(307)).to(s,e(344),(t=>t===o.WEB_SOCKET_GATEWAY_STATES[e(283)]))}async[As(285)](){const e=As,t=this[e(328)][e(340)][e(281)](d),n=this[e(328)][e(340)][e(281)](Wr),r=async()=>{const r=e,s=this[r(299)][r(286)],o=s.id,i=o!==n[r(329)];if(i){const e=n[r(310)]-this[r(324)],t=this[r(308)]();if(this[r(299)][r(343)][r(346)](),s[r(300)]+e!==t){const n=s[r(345)]+e,o=this[r(328)][r(340)][r(281)](l.Users),i=this[r(299)][r(287)]({revision:s,from:n,to:t});i.id=s.id;const a=i[r(267)][r(321)]((e=>o[r(356)](e)));s[r(314)]({...i,authors:a},!0),this[r(299)][r(277)](s.id,i,!0)}this[r(299)][r(348)]=t,s[r(300)]===s[r(345)]&&!this[r(299)][r(367)][r(315)](o)&&this[r(299)][r(275)][r(266)][r(280)](o),this[r(299)][r(347)](t)}const{revisions:a,requestId:c}=await this[r(323)][r(285)](t[r(312)],this[r(341)]);i&&a[r(368)]>0?n[r(376)]():(await this[r(306)](a),this[r(331)](a,c),this[r(299)][r(377)]())};return n[e(375)]?r():new Promise(((t,s)=>{const o=e;n[o(349)](o(288),(()=>{const e=o;r()[e(366)](t)[e(305)](s)}))}))}[As(282)](){super[As(282)]()}async[As(352)](){const e=As;this[e(323)][e(339)]||await new Promise((t=>{const n=e;this[n(320)](this[n(323)],n(295),(e=>{e[n(350)](),t()}))}))}[As(308)](){const e=As,t=this[e(328)][e(340)][e(281)](Wr)[e(268)][e(291)]()[e(327)]();for(const n of t)if(e(290)!==n[e(354)]||n[e(313)])return n[e(271)]+1}[As(361)](){const e=As,t=this[e(328)][e(340)][e(281)](Wr);return new Promise((n=>{const r=e;t[r(326)]?t[r(349)](r(284),(()=>{n(this[r(308)]())})):n(this[r(308)]())}))}[As(331)](e,t){const n=As,r=this[n(299)][n(275)];this[n(341)]=t;for(const t of e){const e=r[n(269)](t.id);if(e){if((t[n(345)]||t[n(300)])&&(t[n(273)]=null),e===this[n(299)][n(286)]){const r=Math[n(334)](e[n(300)],t[n(300)]),s=Math[n(334)](e[n(345)],t[n(345)]);let o;e[n(300)]===t[n(300)]&&e[n(345)]===t[n(345)]?(o=!0,this[n(270)](t)):t[n(300)]===r&&t[n(345)]===s?o=!1:(e[n(300)]===r&&e[n(345)]===s||this[n(330)]({revision:e,from:s,to:r}),o=!0),o&&(delete t[n(345)],delete t[n(300)],delete t[n(273)],delete t[n(337)],delete t[n(267)])}this[n(299)][n(335)](t),this[n(270)](t)}else this[n(299)][n(302)](t)}const s=r[n(374)]();s[n(327)]();for(let e=0;e<s[n(368)]-1;e++){const t=s[e],r=s[e+1];if(t[n(345)]<r[n(300)]){const e=r[n(300)],s=Math[n(334)](e,t[n(300)]);this[n(330)]({revision:t,from:e,to:s})}}}[As(330)]({revision:e,from:t,to:n}={}){const r=As,s=this[r(328)][r(340)][r(281)](l.Users),o=this[r(299)][r(287)]({revision:e,from:t,to:n});o[r(373)]=o[r(267)][r(321)]((e=>s[r(356)](e))),e[r(314)](o)}[As(270)](e){const t=As,n={};n.id=e.id;for(const r of Object[t(372)](e))"id"!==r&&(n[r]=void 0);this[t(299)][t(277)](n.id,n,!0)}async[As(306)](e){const t=As,n=this[t(328)][t(340)][t(281)](l.Users),{connection:r}=this[t(328)][t(340)][t(281)](d),s=new Set;for(const n of e){for(const e of n[t(267)])i(e);n[t(325)]&&i(n[t(325)])}if(0===s[t(364)])return;const o=await Yr.User[t(371)](r,Array[t(304)](s));for(const e of o)n[t(356)](e.id)||n[t(338)](e);function i(e){const r=t;n[r(356)](e)||s[r(311)](e)}}}ks[As(336)]=o.RevisionHistoryService;const Cs=ks;function Es(e,t){const n=Ts();return(Es=function(e,t){return n[e-=266]})(e,t)}function js(e){const t=As;return e[t(357)][t(296)](t(294))||e[t(357)][t(296)](t(317))||e[t(357)][t(296)](t(276))}function Ds(e,t){var n=Ms();return(Ds=function(e,t){return n[e-=493]})(e,t)}var Rs=Ds;function Ms(){var e=["867346vlPBDG","823963HKjJQb","722808rsRhJf","870880QIPXBW","RevisionHistory","pluginName","20EpBtyN","1610653YoadSJ","28qJWJeO","193208zlgRCj","6PyiQiR","7110110BRqwHU","requires","RealTimeCollaborativeRevisionHistory","9hSqCov"];return(Ms=function(){return e})()}!function(e,t){for(var n=Ds,r=e();;)try{if(440423===-parseInt(n(502))/1+parseInt(n(501))/2*(parseInt(n(496))/3)+parseInt(n(504))/4+parseInt(n(507))/5*(-parseInt(n(503))/6)+-parseInt(n(494))/7*(-parseInt(n(495))/8)+parseInt(n(500))/9*(parseInt(n(497))/10)+-parseInt(n(493))/11)break;r.push(r.shift())}catch(e){r.push(r.shift())}}(Ms);class Ns extends t.Plugin{static get[Rs(498)](){return[Rs(505),Cs,rs]}static get[Rs(506)](){return Rs(499)}}var xs=Function.prototype,Vs=Object.prototype,Bs=xs.toString,Us=Vs.hasOwnProperty,Js=Bs.call(Object);const qs=function(e){if(!lt(e)||"[object Object]"!=ge(e))return!1;var t=ln(e);if(null===t)return!0;var n=Us.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Bs.call(n)==Js};const Gs=function(e){return lt(e)&&1===e.nodeType&&!qs(e)};function Ls(e,t){const n=Ys();return(Ls=function(e,t){return n[e-=182]})(e,t)}function Ys(){const e=["bindTemplate","412877NbIbBY","70vrMgnj","setTemplate","154gxgbHM","24BnSaGR","usersCount","780ATaAsI","41346TyCprH","20379535gZunPV","6cAjtpZ","343424rpOasH","set","isHidden","ck-presence-list__counter","div","CONNECTED_USERS","264672goyjUY","3201132LeFFuO","864186nyjJCm","ck-presence-list__counter--hidden"];return(Ys=function(){return e})()}!function(e,t){const n=Ls,r=e();for(;;)try{if(491439===parseInt(n(192))/1+-parseInt(n(189))/2*(parseInt(n(201))/3)+-parseInt(n(187))/4*(parseInt(n(193))/5)+-parseInt(n(188))/6+-parseInt(n(195))/7*(parseInt(n(202))/8)+parseInt(n(199))/9*(-parseInt(n(198))/10)+-parseInt(n(200))/11*(-parseInt(n(196))/12))break;r.push(r.shift())}catch(e){r.push(r.shift())}}(Ys);class Fs extends r.View{constructor(e){const t=Ls;super(e);const n=this[t(191)];this[t(182)](t(197),0),this[t(182)](t(183),!0),this[t(194)]({tag:t(185),attributes:{class:["ck",t(184),n.if(t(183),t(190))]},children:[{text:n.to(t(197),(n=>P(e,t(186),n)))}]})}}function zs(){const e=["createCollection","div","setTemplate","execute","6146kOyVsT","3336pbjSJL","1219419MupDSQ","6425680fqHCyr","bindTemplate","2290527TpcYJN","755eHDiMO","1884332qVDLBD","264126KDwFoF","items","11922AvhaJb","fire","ck-presence-list__list","2zxMvIz"];return(zs=function(){return e})()}function Hs(e,t){const n=zs();return(Hs=function(e,t){return n[e-=194]})(e,t)}!function(e,t){const n=Hs,r=e();for(;;)try{if(310700===parseInt(n(207))/1+-parseInt(n(194))/2*(-parseInt(n(201))/3)+parseInt(n(206))/4+-parseInt(n(205))/5*(parseInt(n(209))/6)+parseInt(n(199))/7*(parseInt(n(200))/8)+-parseInt(n(204))/9+-parseInt(n(202))/10)break;r.push(r.shift())}catch(e){r.push(r.shift())}}(zs);class Ks extends r.View{constructor(e){const t=Hs;super(e),this[t(208)]=this[t(195)]();const n=this[t(203)];this[t(197)]({tag:t(196),attributes:{class:["ck",t(211)]},children:this[t(208)],on:{click:n.to((()=>this[t(210)](t(198))))}})}}var Ws=__webpack_require__(4106),$s={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};g()(Ws.A,$s);Ws.A.locals;function Qs(e,t){const n=Zs();return(Qs=function(e,t){return n[e-=471]})(e,t)}!function(e,t){const n=Qs,r=e();for(;;)try{if(284758===-parseInt(n(487))/1*(-parseInt(n(494))/2)+parseInt(n(485))/3+-parseInt(n(478))/4*(-parseInt(n(490))/5)+-parseInt(n(480))/6+-parseInt(n(497))/7*(parseInt(n(473))/8)+parseInt(n(482))/9*(-parseInt(n(472))/10)+parseInt(n(474))/11)break;r.push(r.shift())}catch(e){r.push(r.shift())}}(Zs);class Xs extends r.View{constructor(e){const t=Qs;super(e);const n=this[t(488)];this[t(492)](t(475),!0),this[t(484)]=new Fs(this[t(498)]),this[t(476)]=new Ks(e),this[t(496)](this[t(476)][t(493)],t(477),(()=>{const e=t;for(const t of this[e(476)][e(493)])t[e(481)]="s";this[e(476)][e(493)][e(471)]&&(this[e(476)][e(493)][e(471)][e(481)]="se")})),this[t(489)]({tag:t(495),attributes:{class:["ck",t(486),t(491),t(479),n.if(t(475),t(483))]},children:[this[t(484)],this[t(476)]]})}}function Zs(){const e=["18EFraiN","ck-presence-list--collapsed","counterView","849789OKFYdp","ck-presence-list","65ngaBSe","bindTemplate","setTemplate","3395ySMivH","ck-reset","set","items","7586sIiDrE","div","listenTo","91aEYLSL","locale","first","1053320Nnsxdb","295016nVzkAM","3736348IVNKkK","isCollapsed","inlineListView","change","3140EfkSxw","ck-rounded-corners","2566008MDoKch","tooltipPosition"];return(Zs=function(){return e})()}!function(e,t){for(var n=to,r=e();;)try{if(700742===-parseInt(n(327))/1*(-parseInt(n(325))/2)+-parseInt(n(331))/3+parseInt(n(323))/4+-parseInt(n(320))/5*(parseInt(n(318))/6)+-parseInt(n(324))/7+-parseInt(n(329))/8*(-parseInt(n(322))/9)+parseInt(n(328))/10*(parseInt(n(319))/11))break;r.push(r.shift())}catch(e){r.push(r.shift())}}(no);class eo extends r.View{constructor(e){var t=to;super(e),this[t(330)]=this[t(333)](),this[t(321)]({tag:t(332),attributes:{class:["ck",t(317)]},children:[{tag:t(332),attributes:{class:["ck",t(326)]},children:this[t(330)]}]})}}function to(e,t){var n=no();return(to=function(e,t){return n[e-=317]})(e,t)}function no(){var e=["367020jJNhBs","3328430mbbuZY","4NrVNJm","ck-presence-list__dropdown-list-wrapper","255728SkGJYe","113420rcVBbJ","2319352InHLrD","items","3865041zVEqhQ","div","createCollection","ck-presence-list__dropdown-list","246QfvDQg","2134igtyAK","76695bMkzIc","setTemplate","9LSetjG"];return(no=function(){return e})()}function ro(){const e=["setTemplate","execute","747LVvWzY","ck-user__full-name","1658781AuegSe","3686350gOKmzw","div","6dYsrQh","tag","ck-presence-list__dropdown-list-item","5658245nBdnCW","button","bindTemplate","userView","376888peSChs","getBackgroundColorClass","40XvTMGW","ck-presence-list__marker","color","fire","1359869ylGLey","span","7316RlPYtv","7oTEGCn","true","name","7416959MOgEwp"];return(ro=function(){return e})()}function so(e,t){const n=ro();return(so=function(e,t){return n[e-=400]})(e,t)}!function(e,t){const n=so,r=e();for(;;)try{if(747462===parseInt(n(414))/1*(parseInt(n(405))/2)+parseInt(n(420))/3*(parseInt(n(413))/4)+parseInt(n(401))/5+parseInt(n(425))/6*(-parseInt(n(411))/7)+-parseInt(n(407))/8*(parseInt(n(422))/9)+-parseInt(n(423))/10+-parseInt(n(417))/11)break;r.push(r.shift())}catch(e){r.push(r.shift())}}(ro);class oo extends r.View{constructor(e,t,n){const r=so;super(e);const s=this[r(403)];this[r(404)]=new l.UserView(e,t);const o={tag:r(424),attributes:{class:["ck",r(400)]},children:[this[r(404)],{tag:r(412),attributes:{class:["ck",r(421)]},children:[{text:t[r(416)]}]},{tag:r(412),attributes:{class:["ck",r(408),t[r(409)][r(406)]()],"aria-hidden":r(415)}}]};n&&(o[r(426)]=r(402),o.on={click:s.to((()=>this[r(410)](r(419))))}),this[r(418)](o)}}function io(e,t){const n=ao();return(io=function(e,t){return n[e-=444]})(e,t)}function ao(){const e=["ck-presence-list__list-item__tooltip","hasTooltip","169458MSDDep","button","8LgYPCg","959130ihrkdO","ck-presence-list__marker","7898013QbPQiw","120RTOzEU","9526860kxsShi","1627879cydvrS","userView","1141gSjxCb","2146zEhvGF","getBackgroundColorClass","613781whIdEv","div","fire","execute","span","tooltipPosition","name","color","true","markerView","setTemplate","tag","20qlglHT","bindTemplate","set","ck-presence-list__list-item"];return(ao=function(){return e})()}!function(e,t){const n=io,r=e();for(;;)try{if(810493===parseInt(n(445))/1*(parseInt(n(446))/2)+-parseInt(n(466))/3+-parseInt(n(460))/4*(parseInt(n(469))/5)+parseInt(n(473))/6+-parseInt(n(448))/7+parseInt(n(468))/8*(parseInt(n(471))/9)+parseInt(n(472))/10*(-parseInt(n(474))/11))break;r.push(r.shift())}catch(e){r.push(r.shift())}}(ao);class co extends r.View{constructor(e,t,n){const r=io;super(e);const s=this[r(461)];this[r(462)](r(465),!0),this[r(462)](r(453),""),this[r(444)]=new l.UserView(e,t),this[r(457)]=new uo(e,t);const o={tag:r(449),attributes:{class:["ck",r(463)],"data-cke-tooltip-text":this[r(444)][r(454)],"data-cke-tooltip-position":s.to(r(453)),"data-cke-tooltip-disabled":s.to(r(465),(e=>!e)),"data-cke-tooltip-class":r(464)},children:[this[r(444)],this[r(457)]]};n&&(o[r(459)]=r(467),o.on={click:s.to((()=>this[r(450)](r(451))))}),this[r(458)](o)}}class uo extends r.View{constructor(e,t){const n=io;super(e),this[n(458)]({tag:n(452),attributes:{class:["ck",n(470),t[n(455)][n(447)]()],"aria-hidden":n(456)}})}}function lo(e,t){const n=mo();return(lo=function(e,t){return n[e-=250]})(e,t)}const po=lo;!function(e,t){const n=lo,r=e();for(;;)try{if(489741===parseInt(n(319))/1+parseInt(n(268))/2+parseInt(n(309))/3*(parseInt(n(302))/4)+parseInt(n(310))/5+parseInt(n(295))/6+parseInt(n(282))/7+parseInt(n(273))/8*(-parseInt(n(307))/9))break;r.push(r.shift())}catch(e){r.push(r.shift())}}(mo);const ho={collapseAt:6,displayMe:!0};class fo extends t.ContextPlugin{constructor(e){const t=lo;super(e),this[t(308)][t(276)][t(316)](t(293),ho);const s=e[t(276)][t(258)](t(305));if(t(313)!=typeof s)throw new n.CKEditorError(t(261),this);if(s<1)throw new n.CKEditorError(t(261),this);this[t(266)]=this[t(308)][t(317)][t(258)](m)[t(267)],this[t(269)](t(264),0),this[t(287)]=new n.Collection,this[t(296)]=new r.BalloonPanelView,this[t(296)][t(321)]=t(297),this[t(272)]=this[t(285)](),this[t(283)]=void 0}static get[po(314)](){return[m]}[po(306)](){const e=po;for(const t of this[e(266)])this[e(289)](t);this[e(262)](this[e(266)],e(318),((t,n)=>{this[e(289)](n)})),this[e(262)](this[e(266)],e(303),((t,n)=>{this[e(275)](n)}))}[po(285)](){const e=po,t=this[e(308)],s=new Xs(this[e(308)][e(256)]),o=this[e(296)];if(!Gs(t[e(276)][e(258)](e(255))))throw new n.CKEditorError(e(278),this);return s[e(288)][e(291)](e(264)).to(this),s[e(291)](e(265)).to(this,e(264),(n=>{const r=e,{collapseAt:o,displayMe:i}=t[r(276)][r(258)](r(293)),a=n>=o;return s[r(288)][r(277)]=!(1==n&&i||a),a||this[r(279)](),a})),s[e(254)][e(292)][e(320)](this[e(287)])[e(280)]((n=>{const r=e,o=t[r(276)][r(258)](r(293)),i=new co(t[r(256)],n,!!o[r(300)]);return i[r(291)](r(259)).to(s,r(265),(e=>!e)),o[r(300)]&&this[r(262)](i,r(299),(()=>{const e=r;this[e(272)][e(265)]||o[e(300)](n,i[e(312)])})),i})),this[e(262)](s[e(254)],e(299),(()=>{const t=e;this[t(283)]?this[t(279)]():this[t(272)][t(265)]&&this[t(263)]()})),s[e(251)](),o[e(251)](),(0,r.clickOutsideHandler)({emitter:s,activator:()=>o[e(274)],contextElements:[o[e(312)],s[e(254)][e(312)]],callback:()=>this[e(279)]()}),t[e(276)][e(258)](e(255))[e(294)](s[e(312)]),this[e(304)]=new r.BodyCollection(this[e(308)][e(256)]),this[e(304)][e(252)](),this[e(304)][e(318)](o),s}[po(289)](e){const t=po;if(!this[t(308)][t(276)][t(258)](t(284))&&e[t(286)])return;const n=this[t(308)][t(276)][t(258)](t(305))-1;this[t(264)]++,this[t(287)][t(250)]==n&&this[t(287)][t(303)](0);const r=this[t(260)](e);this[t(287)][t(318)](e,r)}[po(275)](e){const t=po;if(this[t(264)]--,this[t(287)][t(258)](e.id)&&(this[t(287)][t(303)](e.id),this[t(287)][t(250)]<this[t(264)]))for(const e of Array[t(290)](this[t(266)])[t(270)]())if(!this[t(287)][t(258)](e.id))return void this[t(287)][t(318)](e,0)}[po(260)](e){const t=po;return Boolean(this[t(287)][t(281)]&&this[t(287)][t(281)][t(286)])&&!e[t(286)]?this[t(287)][t(250)]-1:this[t(287)][t(250)]}[po(263)](){const e=po;if(this[e(283)])return;this[e(283)]=new eo(this[e(308)][e(256)]);const t=this[e(308)][e(276)][e(258)](e(293));this[e(283)][e(292)][e(320)](this[e(266)])[e(280)]((n=>{const r=e;if(!t[r(315)]&&n[r(286)])return null;const s=new oo(this[r(308)][r(256)],n,!!t[r(300)]);return t[r(300)]&&this[r(262)](s,r(299),(()=>{const e=r;t[e(300)](n,s[e(312)])})),s})),this[e(296)][e(301)][e(318)](this[e(283)]),this[e(296)][e(271)]({target:this[e(272)][e(254)][e(312)]})}[po(279)](){const e=po;this[e(283)]&&(this[e(296)][e(298)](),this[e(296)][e(301)][e(303)](this[e(283)]),this[e(283)][e(311)](),this[e(283)]=void 0)}[po(311)](){const e=po;super[e(311)](),this[e(272)]&&this[e(272)][e(257)]&&this[e(272)][e(311)](),this[e(304)]&&this[e(304)][e(253)]()}}function mo(){const e=["_handleUserRemove","config","isHidden","presencelist-missing-container","hideDropdown","using","last","1563436XNWgtt","presenceDropdownView","presenceList.displayMe","_createView","isMe","currentDisplayedUsers","counterView","_handleUserAdd","from","bind","items","presenceList","appendChild","512844PHlXpf","balloonPanelView","ck ck-presence-list__balloon","unpin","execute","onClick","content","86096XvpOzj","remove","_bodyCollection","presenceList.collapseAt","init","1344861QvRmFb","context","42yhuSwT","1277430mPHmzT","destroy","element","number","requires","displayMe","define","plugins","add","676074QnqOtJ","bindTo","class","length","render","attachToDom","detachFromDom","inlineListView","presenceList.container","locale","isRendered","get","hasTooltip","_calculateNewUserPosition","presencelist-collapseat-invalid-format","listenTo","showDropdown","usersCount","isCollapsed","_allConnectedUsers","allConnectedUsers","1781200WBsEDN","set","reverse","pin","view","104SIigiC","isVisible"];return(mo=function(){return e})()}var yo=bo;function go(){var e=["2tVUnZU","3702910TZHbTh","55JPlmrX","3480120wXumvy","426237dCLiQO","6aibJza","PresenceList","requires","1025481PZVRow","pluginName","722079kvXZRy","8954710krntSL","72aGpsNz","1463574MJIrrR"];return(go=function(){return e})()}function bo(e,t){var n=go();return(bo=function(e,t){return n[e-=283]})(e,t)}!function(e,t){for(var n=bo,r=e();;)try{if(957804===-parseInt(n(288))/1*(parseInt(n(294))/2)+parseInt(n(284))/3+-parseInt(n(283))/4+parseInt(n(291))/5*(parseInt(n(285))/6)+-parseInt(n(293))/7+-parseInt(n(292))/8*(parseInt(n(290))/9)+parseInt(n(295))/10*(parseInt(n(296))/11))break;r.push(r.shift())}catch(e){r.push(r.shift())}}(go);class Oo extends t.ContextPlugin{static get[yo(287)](){return[m,fo]}static get[yo(289)](){return yo(286)}}Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;(0,n.ObservableMixin)();(0,n.EmitterMixin)();t.ContextPlugin;t.ContextPlugin;function vo(e,t){var n=wo();return(vo=function(e,t){return n[e-=125]})(e,t)}function wo(){var e=["310989UuRYwS","292386QorcqB","922221aOdBVL","36GjHKhj","299528GTOaau","4498949LmyLFc","14kcyDji","30Oregqw","5718669dLdvHS","35zYtzWL","3862560KMzGSM","1LSHdKs","5CKObRI","12SbIIep"];return(wo=function(){return e})()}function Io(e,t){var n=_o();return(Io=function(e,t){return n[e-=402]})(e,t)}function _o(){var e=["7804DauoHH","1471225npsLjp","2hVeXXE","3579240YtvUPp","3435xHpGgI","52695819dYcCgK","414tqoTdO","1679982bujeyA","2373etDGpT","353540aBkblJ","19974KvGhvR"];return(_o=function(){return e})()}!function(e,t){for(var n=vo,r=e();;)try{if(550754===parseInt(n(126))/1*(-parseInt(n(130))/2)+-parseInt(n(129))/3*(parseInt(n(132))/4)+parseInt(n(127))/5*(parseInt(n(125))/6)+-parseInt(n(138))/7*(parseInt(n(133))/8)+parseInt(n(131))/9*(parseInt(n(136))/10)+parseInt(n(137))/11*(parseInt(n(128))/12)+parseInt(n(134))/13*(parseInt(n(135))/14))break;r.push(r.shift())}catch(e){r.push(r.shift())}}(wo),function(e,t){for(var n=Io,r=e();;)try{if(888437===parseInt(n(412))/1+-parseInt(n(402))/2*(-parseInt(n(407))/3)+-parseInt(n(411))/4*(-parseInt(n(404))/5)+-parseInt(n(410))/6*(-parseInt(n(408))/7)+-parseInt(n(403))/8+parseInt(n(406))/9*(parseInt(n(409))/10)+-parseInt(n(405))/11)break;r.push(r.shift())}catch(e){r.push(r.shift())}}(_o)})(),(window.CKEditor5=window.CKEditor5||{}).realTimeCollaboration=__webpack_exports__})();
5
+ */(()=>{var __webpack_modules__={8934:(e,t,n)=>{"use strict";e.exports=n(8577)},8577:(e,t,n)=>{"use strict";var r=t;function s(){r.util._configure(),r.Writer._configure(r.BufferWriter),r.Reader._configure(r.BufferReader)}r.build="minimal",r.Writer=n(4196),r.BufferWriter=n(341),r.Reader=n(6040),r.BufferReader=n(9385),r.util=n(8107),r.rpc=n(7352),r.roots=n(5042),r.configure=s,s()},6040:(e,t,n)=>{"use strict";e.exports=c;var r,s=n(8107),o=s.LongBits,i=s.utf8;function a(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function c(e){this.buf=e,this.pos=0,this.len=e.length}var u,d="undefined"!=typeof Uint8Array?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new c(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new c(e);throw Error("illegal buffer")},l=function(){return s.Buffer?function(e){return(c.create=function(e){return s.Buffer.isBuffer(e)?new r(e):d(e)})(e)}:d};function p(){var e=new o(0,0),t=0;if(!(this.len-this.pos>4)){for(;t<3;++t){if(this.pos>=this.len)throw a(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(127&this.buf[this.pos++])<<7*t)>>>0,e}for(;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e;if(t=0,this.len-this.pos>4){for(;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw a(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function h(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function f(){if(this.pos+8>this.len)throw a(this,8);return new o(h(this.buf,this.pos+=4),h(this.buf,this.pos+=4))}c.create=l(),c.prototype._slice=s.Array.prototype.subarray||s.Array.prototype.slice,c.prototype.uint32=(u=4294967295,function(){if(u=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return u;if((this.pos+=5)>this.len)throw this.pos=this.len,a(this,10);return u}),c.prototype.int32=function(){return 0|this.uint32()},c.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)},c.prototype.bool=function(){return 0!==this.uint32()},c.prototype.fixed32=function(){if(this.pos+4>this.len)throw a(this,4);return h(this.buf,this.pos+=4)},c.prototype.sfixed32=function(){if(this.pos+4>this.len)throw a(this,4);return 0|h(this.buf,this.pos+=4)},c.prototype.float=function(){if(this.pos+4>this.len)throw a(this,4);var e=s.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},c.prototype.double=function(){if(this.pos+8>this.len)throw a(this,4);var e=s.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},c.prototype.bytes=function(){var e=this.uint32(),t=this.pos,n=this.pos+e;if(n>this.len)throw a(this,e);if(this.pos+=e,Array.isArray(this.buf))return this.buf.slice(t,n);if(t===n){var r=s.Buffer;return r?r.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,t,n)},c.prototype.string=function(){var e=this.bytes();return i.read(e,0,e.length)},c.prototype.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw a(this,e);this.pos+=e}else do{if(this.pos>=this.len)throw a(this)}while(128&this.buf[this.pos++]);return this},c.prototype.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(e=7&this.uint32());)this.skipType(e);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},c._configure=function(e){r=e,c.create=l(),r._configure();var t=s.Long?"toLong":"toNumber";s.merge(c.prototype,{int64:function(){return p.call(this)[t](!1)},uint64:function(){return p.call(this)[t](!0)},sint64:function(){return p.call(this).zzDecode()[t](!1)},fixed64:function(){return f.call(this)[t](!0)},sfixed64:function(){return f.call(this)[t](!1)}})}},9385:(e,t,n)=>{"use strict";e.exports=o;var r=n(6040);(o.prototype=Object.create(r.prototype)).constructor=o;var s=n(8107);function o(e){r.call(this,e)}o._configure=function(){s.Buffer&&(o.prototype._slice=s.Buffer.prototype.slice)},o.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+e,this.len))},o._configure()},5042:e=>{"use strict";e.exports={}},7352:(e,t,n)=>{"use strict";t.Service=n(756)},756:(e,t,n)=>{"use strict";e.exports=s;var r=n(8107);function s(e,t,n){if("function"!=typeof e)throw TypeError("rpcImpl must be a function");r.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=Boolean(t),this.responseDelimited=Boolean(n)}(s.prototype=Object.create(r.EventEmitter.prototype)).constructor=s,s.prototype.rpcCall=function e(t,n,s,o,i){if(!o)throw TypeError("request must be specified");var a=this;if(!i)return r.asPromise(e,a,t,n,s,o);if(a.rpcImpl)try{return a.rpcImpl(t,n[a.requestDelimited?"encodeDelimited":"encode"](o).finish(),(function(e,n){if(e)return a.emit("error",e,t),i(e);if(null!==n){if(!(n instanceof s))try{n=s[a.responseDelimited?"decodeDelimited":"decode"](n)}catch(e){return a.emit("error",e,t),i(e)}return a.emit("data",n,t),i(null,n)}a.end(!0)}))}catch(e){return a.emit("error",e,t),void setTimeout((function(){i(e)}),0)}else setTimeout((function(){i(Error("already ended"))}),0)},s.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},2576:(e,t,n)=>{"use strict";e.exports=s;var r=n(8107);function s(e,t){this.lo=e>>>0,this.hi=t>>>0}var o=s.zero=new s(0,0);o.toNumber=function(){return 0},o.zzEncode=o.zzDecode=function(){return this},o.length=function(){return 1};var i=s.zeroHash="\0\0\0\0\0\0\0\0";s.fromNumber=function(e){if(0===e)return o;var t=e<0;t&&(e=-e);var n=e>>>0,r=(e-n)/4294967296>>>0;return t&&(r=~r>>>0,n=~n>>>0,++n>4294967295&&(n=0,++r>4294967295&&(r=0))),new s(n,r)},s.from=function(e){if("number"==typeof e)return s.fromNumber(e);if(r.isString(e)){if(!r.Long)return s.fromNumber(parseInt(e,10));e=r.Long.fromString(e)}return e.low||e.high?new s(e.low>>>0,e.high>>>0):o},s.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=1+~this.lo>>>0,n=~this.hi>>>0;return t||(n=n+1>>>0),-(t+4294967296*n)}return this.lo+4294967296*this.hi},s.prototype.toLong=function(e){return r.Long?new r.Long(0|this.lo,0|this.hi,Boolean(e)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(e)}};var a=String.prototype.charCodeAt;s.fromHash=function(e){return e===i?o:new s((a.call(e,0)|a.call(e,1)<<8|a.call(e,2)<<16|a.call(e,3)<<24)>>>0,(a.call(e,4)|a.call(e,5)<<8|a.call(e,6)<<16|a.call(e,7)<<24)>>>0)},s.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},s.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},s.prototype.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},s.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,n=this.hi>>>24;return 0===n?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:n<128?9:10}},8107:function(e,t,n){"use strict";var r=t;function s(e,t,n){for(var r=Object.keys(t),s=0;s<r.length;++s)void 0!==e[r[s]]&&n||(e[r[s]]=t[r[s]]);return e}function o(e){function t(e,n){if(!(this instanceof t))return new t(e,n);Object.defineProperty(this,"message",{get:function(){return e}}),Error.captureStackTrace?Error.captureStackTrace(this,t):Object.defineProperty(this,"stack",{value:(new Error).stack||""}),n&&s(this,n)}return t.prototype=Object.create(Error.prototype,{constructor:{value:t,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return e},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),t}r.asPromise=n(9310),r.base64=n(6662),r.EventEmitter=n(5707),r.float=n(9365),r.inquire=n(230),r.utf8=n(1742),r.pool=n(319),r.LongBits=n(2576),r.isNode=Boolean(void 0!==n.g&&n.g&&n.g.process&&n.g.process.versions&&n.g.process.versions.node),r.global=r.isNode&&n.g||"undefined"!=typeof window&&window||"undefined"!=typeof self&&self||this,r.emptyArray=Object.freeze?Object.freeze([]):[],r.emptyObject=Object.freeze?Object.freeze({}):{},r.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},r.isString=function(e){return"string"==typeof e||e instanceof String},r.isObject=function(e){return e&&"object"==typeof e},r.isset=r.isSet=function(e,t){var n=e[t];return!(null==n||!e.hasOwnProperty(t))&&("object"!=typeof n||(Array.isArray(n)?n.length:Object.keys(n).length)>0)},r.Buffer=function(){try{var e=r.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch(e){return null}}(),r._Buffer_from=null,r._Buffer_allocUnsafe=null,r.newBuffer=function(e){return"number"==typeof e?r.Buffer?r._Buffer_allocUnsafe(e):new r.Array(e):r.Buffer?r._Buffer_from(e):"undefined"==typeof Uint8Array?e:new Uint8Array(e)},r.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,r.Long=r.global.dcodeIO&&r.global.dcodeIO.Long||r.global.Long||r.inquire("long"),r.key2Re=/^true|false|0|1$/,r.key32Re=/^-?(?:0|[1-9][0-9]*)$/,r.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,r.longToHash=function(e){return e?r.LongBits.from(e).toHash():r.LongBits.zeroHash},r.longFromHash=function(e,t){var n=r.LongBits.fromHash(e);return r.Long?r.Long.fromBits(n.lo,n.hi,t):n.toNumber(Boolean(t))},r.merge=s,r.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},r.newError=o,r.ProtocolError=o("ProtocolError"),r.oneOfGetter=function(e){for(var t={},n=0;n<e.length;++n)t[e[n]]=1;return function(){for(var e=Object.keys(this),n=e.length-1;n>-1;--n)if(1===t[e[n]]&&void 0!==this[e[n]]&&null!==this[e[n]])return e[n]}},r.oneOfSetter=function(e){return function(t){for(var n=0;n<e.length;++n)e[n]!==t&&delete this[e[n]]}},r.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},r._configure=function(){var e=r.Buffer;e?(r._Buffer_from=e.from!==Uint8Array.from&&e.from||function(t,n){return new e(t,n)},r._Buffer_allocUnsafe=e.allocUnsafe||function(t){return new e(t)}):r._Buffer_from=r._Buffer_allocUnsafe=null}},4196:(e,t,n)=>{"use strict";e.exports=l;var r,s=n(8107),o=s.LongBits,i=s.base64,a=s.utf8;function c(e,t,n){this.fn=e,this.len=t,this.next=void 0,this.val=n}function u(){}function d(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function l(){this.len=0,this.head=new c(u,0,0),this.tail=this.head,this.states=null}var p=function(){return s.Buffer?function(){return(l.create=function(){return new r})()}:function(){return new l}};function h(e,t,n){t[n]=255&e}function f(e,t){this.len=e,this.next=void 0,this.val=t}function m(e,t,n){for(;e.hi;)t[n++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[n++]=127&e.lo|128,e.lo=e.lo>>>7;t[n++]=e.lo}function y(e,t,n){t[n]=255&e,t[n+1]=e>>>8&255,t[n+2]=e>>>16&255,t[n+3]=e>>>24}l.create=p(),l.alloc=function(e){return new s.Array(e)},s.Array!==Array&&(l.alloc=s.pool(l.alloc,s.Array.prototype.subarray)),l.prototype._push=function(e,t,n){return this.tail=this.tail.next=new c(e,t,n),this.len+=t,this},f.prototype=Object.create(c.prototype),f.prototype.fn=function(e,t,n){for(;e>127;)t[n++]=127&e|128,e>>>=7;t[n]=e},l.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new f((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},l.prototype.int32=function(e){return e<0?this._push(m,10,o.fromNumber(e)):this.uint32(e)},l.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},l.prototype.uint64=function(e){var t=o.from(e);return this._push(m,t.length(),t)},l.prototype.int64=l.prototype.uint64,l.prototype.sint64=function(e){var t=o.from(e).zzEncode();return this._push(m,t.length(),t)},l.prototype.bool=function(e){return this._push(h,1,e?1:0)},l.prototype.fixed32=function(e){return this._push(y,4,e>>>0)},l.prototype.sfixed32=l.prototype.fixed32,l.prototype.fixed64=function(e){var t=o.from(e);return this._push(y,4,t.lo)._push(y,4,t.hi)},l.prototype.sfixed64=l.prototype.fixed64,l.prototype.float=function(e){return this._push(s.float.writeFloatLE,4,e)},l.prototype.double=function(e){return this._push(s.float.writeDoubleLE,8,e)};var g=s.Array.prototype.set?function(e,t,n){t.set(e,n)}:function(e,t,n){for(var r=0;r<e.length;++r)t[n+r]=e[r]};l.prototype.bytes=function(e){var t=e.length>>>0;if(!t)return this._push(h,1,0);if(s.isString(e)){var n=l.alloc(t=i.length(e));i.decode(e,n,0),e=n}return this.uint32(t)._push(g,t,e)},l.prototype.string=function(e){var t=a.length(e);return t?this.uint32(t)._push(a.write,t,e):this._push(h,1,0)},l.prototype.fork=function(){return this.states=new d(this),this.head=this.tail=new c(u,0,0),this.len=0,this},l.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new c(u,0,0),this.len=0),this},l.prototype.ldelim=function(){var e=this.head,t=this.tail,n=this.len;return this.reset().uint32(n),n&&(this.tail.next=e.next,this.tail=t,this.len+=n),this},l.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),n=0;e;)e.fn(e.val,t,n),n+=e.len,e=e.next;return t},l._configure=function(e){r=e,l.create=p(),r._configure()}},341:(e,t,n)=>{"use strict";e.exports=o;var r=n(4196);(o.prototype=Object.create(r.prototype)).constructor=o;var s=n(8107);function o(){r.call(this)}function i(e,t,n){e.length<40?s.utf8.write(e,t,n):t.utf8Write?t.utf8Write(e,n):t.write(e,n)}o._configure=function(){o.alloc=s._Buffer_allocUnsafe,o.writeBytesBuffer=s.Buffer&&s.Buffer.prototype instanceof Uint8Array&&"set"===s.Buffer.prototype.set.name?function(e,t,n){t.set(e,n)}:function(e,t,n){if(e.copy)e.copy(t,n,0,e.length);else for(var r=0;r<e.length;)t[n++]=e[r++]}},o.prototype.bytes=function(e){s.isString(e)&&(e=s._Buffer_from(e,"base64"));var t=e.length>>>0;return this.uint32(t),t&&this._push(o.writeBytesBuffer,t,e),this},o.prototype.string=function(e){var t=s.Buffer.byteLength(e);return this.uint32(t),t&&this._push(i,t,e),this},o._configure()},7477:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n extends Error{constructor(e,t,n=null,r={}){super("cloud-services-internal-error: "+e),this.context=t,this.code=n,this.data=r,this.name="CKEditorError"}static fromPublicError(e){return new n(function(e){let t="cloud-services-error: "+e.message;return e.data&&(t+="\nError data: "+JSON.stringify(e.data)),e.explanation&&(t+="\nExplanation: "+e.explanation),e.action&&(t+="\nAction: "+e.action),e.traceId&&(t+="\nTraceId: "+e.traceId),e.code&&(t+="\nCode: "+e.code),t}(e),e)}}t.default=n},556:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n extends Error{constructor(e,t){super(),this.name="CKEditorCloudServicesServerError",this.stack=void 0,this.message=e,this.code=t.code,this.traceId=t.traceId,this.data=t.data}static fromPublicError(e){return new n(function(e){let t="cloud-services-server-error: "+e.message;return e.explanation&&(t+="\nExplanation: "+e.explanation),e.action&&(t+="\nAction: "+e.action),e.traceId&&(t+="\nTraceId: "+e.traceId),e.code&&(t+="\nCode: "+e.code),t}(e),e)}}t.default=n},44:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t._SERVICE=void 0;const s=n(9662),o=n(4584),i=r(n(1774)),a=r(n(4096)),c=r(n(7261)),u=r(n(4766)),d=r(n(9168)),l=r(n(3049)),p=r(n(242)),h=r(n(1244)),f=r(n(7477)),m=r(n(2352)),y=r(n(8359)),g=r(n(9031));t._SERVICE=1;class b extends((0,o.EmitterMixin)()){constructor(e,t){if(super(),!e)throw new TypeError('Param "bundleVersion" must be provided.');this._id=null!=t?t:(0,s.v4)(),this._isConnected=!1,this._bundleVersion=e}getId(){return this._id}isConnected(){return this._isConnected}connect(e,t={buffers:[],types:[]},n){const r=new c.default(this.getId(),t.buffers,t.types,this._bundleVersion,n);return this._connect(e,r)}reconnect(e,t){if(this.isConnected())throw new f.default("Cannot reconnect to already connected service.",e);return this._connect(e,new d.default(this.getId(),t,this._bundleVersion))}disconnect(){this._isConnected&&(this._isConnected=!1,this._wsGateway&&(this.stopListening(this._wsGateway),this._wsGateway=void 0),this._channel&&(this.stopListening(this._channel),this._channel=void 0),this._connectedSessions&&(this._connectedSessions.disconnect(),this._connectedSessions=void 0),this.fire("disconnected"),this.stopListening())}async getDocumentDetails(){const e=new g.default(this.getId());if(!this._wsGateway)throw new m.default("Collaborative Editing",this);const n=await this._wsGateway._sendRequest(t._SERVICE,g.default.TYPE,i.default.encode(e));return i.default.decode(n,y.default)}async sendOperations(e,n,r){if(!e||!e.types||!e.types.length)throw new f.default("Cannot send empty update.",this._wsGateway);const s="number"==typeof n?n:parseInt(n);if(!Number.isInteger(s)||s<0)throw new f.default("Base version not provided.",this._wsGateway);const o=new u.default(this.getId(),e.buffers,e.types,s,[],r);if(!this._wsGateway||!this._isConnected)throw new m.default("Collaborative Editing",this);const a=await this._wsGateway._sendRequest(t._SERVICE,u.default.TYPE,i.default.encode(o));return i.default.decode(a,l.default)}async getConnectedSessions(){if(!this._isConnected)throw new m.default("Collaborative Editing",this);return this._connectedSessions||(this._connectedSessions=await a.default.getConnectedSessions(this._wsGateway,this._id,t._SERVICE)),this._connectedSessions}static getConnectedSessions(e,n){return a.default.getConnectedSessions(e,n,t._SERVICE)}async _connect(e,n){if(this.isConnected())return;if(e.state!==h.default.STATE_CONNECTED)throw new f.default("WebSocket Gateway is not connected.",e);this._wsGateway=e,this.stopListening(e,"change:state");const r=await e._sendRequest(t._SERVICE,n.constructor.TYPE,i.default.encode(n)),s=i.default.decode(r,p.default);return this.listenTo(e,"change:state",((e,t,n)=>this._onWsGatewayStateChange(n)),{priority:h.default._CHANGE_STATE_EVENT_PRIORITY}),this._connectToChannel(e,s.channel),this._isConnected=!0,this.fire("connected"),s}_connectToChannel(e,n){this._channel=e._getChannel(t._SERVICE,n),this.listenTo(this._channel,this._channel.getEventName(u.default.TYPE),((e,t)=>{const n=i.default.decode(t,u.default);this.fire("operationsReceived",n.baseVersion,n.data,n.metadata)}))}_onWsGatewayStateChange(e){e===h.default.STATE_DISCONNECTED&&this.disconnect()}}b._SERVICE=t._SERVICE,t.default=b},1074:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(3130));class o extends s.default{static toJSON({createdAt:e,...t}){const n={...t};return(null==e?void 0:e.toISOString)&&(n.createdAt=e.toISOString()),n}static fromJSON({createdAt:e,...t}){const n={...t};return e&&(n.createdAt=new Date(e)),n}}t.default=o,o.DESCRIPTOR_NAME="OperationMetadataDescriptor",o.DESCRIPTOR={fields:{userId:{type:"string",id:1},type:{type:"string",id:2},createdAt:{type:"string",id:3}}}},2895:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=class{static prepareMetadataForOperations(e,t){if(!(e&&e.length&&t&&t.length))return[];const n=[];let r=0;for(const s of e)if(0!==s){if(!t[r])throw new Error("Missing metadata for a operation");n.push(t[r]),r++}else n.push(n[n.length-1]);return n}static removeUnnecessaryMetadata(e,t){if(!(e&&e.length&&t&&t.length))return[];const n=[];for(let r=0;r<e.length;r++)if(0!==e[r]){if(!t[r])throw new Error("Missing metadata for a operation");n.push(t[r])}return n}}},7261:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e,t,n,r,s=""){super(),this.id=e,this.buffers=t,this.types=n,this.bundleVersion=r,this.lastOperationId=s}toJSON(){return{id:this.id,buffers:this.buffers,types:this.types,bundleVersion:this.bundleVersion,lastOperationId:this.lastOperationId}}static fromJSON(e){return new o(e.id,e.buffers,e.types,e.bundleVersion,e.lastOperationId)}}t.default=o,o.TYPE="11",o.READABLE_TYPE_NAME="connectToDocument",o.DESCRIPTOR_NAME="CollaborativeEditingConnectMessage",o.DESCRIPTOR={fields:{id:{type:"string",id:1},bundleVersion:{type:"string",id:2},buffers:{rule:"repeated",type:"bytes",id:3},types:{rule:"repeated",type:"uint32",id:4},lastOperationId:{type:"string",id:5}}}},9168:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e,t,n){super(),this.id=e,this.lastKnowVersion=t,this.bundleVersion=n}toJSON(){return{id:this.id,bundleVersion:this.bundleVersion,lastKnowVersion:this.lastKnowVersion}}static fromJSON(e){return new o(e.id,e.lastKnowVersion,e.bundleVersion)}}t.default=o,o.TYPE="12",o.READABLE_TYPE_NAME="reconnectToDocument",o.DESCRIPTOR_NAME="CollaborativeEditingReconnectMessage",o.DESCRIPTOR={fields:{id:{type:"string",id:1},bundleVersion:{type:"string",id:2},lastKnowVersion:{type:"uint32",id:3}}}},4766:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844)),o=r(n(2895)),i=r(n(1074));class a extends s.default{constructor(e,t,n,r,s=[],o=""){super(),this.id=e,this.buffers=t,this.types=n,this.baseVersion=r,this.metadata=s,this.lastOperationId=o}get data(){return{buffers:this.buffers,types:this.types,baseVersion:this.baseVersion,lastOperationId:this.lastOperationId}}toJSON(){return{id:this.id,buffers:this.buffers,types:this.types,baseVersion:this.baseVersion,metadata:o.default.removeUnnecessaryMetadata(this.types,this.metadata).map(i.default.toJSON),lastOperationId:this.lastOperationId}}static fromJSON(e){return new a(e.id,e.buffers,e.types,e.baseVersion,o.default.prepareMetadataForOperations(e.types,e.metadata).map(i.default.fromJSON),e.lastOperationId)}}t.default=a,a.TYPE="13",a.READABLE_TYPE_NAME="updateDocument",a.DESCRIPTOR_NAME="CollaborativeEditingUpdateMessage",a.DESCRIPTOR={fields:{id:{type:"string",id:1},baseVersion:{type:"uint32",id:2},buffers:{rule:"repeated",type:"bytes",id:3},types:{rule:"repeated",type:"uint32",id:4},metadata:{rule:"repeated",type:"OperationMetadataDescriptor",id:6},lastOperationId:{type:"string",id:7}}}},9031:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e){super(),this.documentId=e}get data(){return{documentId:this.documentId}}toJSON(){return{documentId:this.documentId}}static fromJSON(e){return new o(e.documentId)}}t.default=o,o.TYPE="14",o.READABLE_TYPE_NAME="getDocumentDetails",o.DESCRIPTOR_NAME="GetDocumentDetailsMessage",o.DESCRIPTOR={fields:{documentId:{type:"string",id:1},environmentId:{type:"string",id:2}}}},242:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844)),o=r(n(2895)),i=r(n(1074));class a extends s.default{constructor(e,t,n=[],r=[],s=0,o=[],i=null,a="",c="",u=null){super(),this.channel=e,this.version=t,this.buffers=n,this.types=r,this.offset=s,this.metadata=o,this.initData=i,this.sessionId=a,this.lastOperationId=c,this.sessionCreatedAt=u}get data(){return{buffers:this.buffers,types:this.types,baseVersion:this.version-this.types.length,lastOperationId:this.lastOperationId,sessionCreatedAt:this.sessionCreatedAt}}get wereChangesApplied(){var e;return!(null===(e=this.types)||void 0===e?void 0:e.length)&&null===this.initData}toJSON(){var e;return{channel:this.channel,version:this.version,sessionId:this.sessionId,buffers:this.buffers,types:this.types,offset:this.offset,metadata:o.default.removeUnnecessaryMetadata(this.types,this.metadata).map(i.default.toJSON),initData:null!==(e=this.initData)&&void 0!==e?e:"",isInitialized:"string"==typeof this.initData,lastOperationId:this.lastOperationId,sessionCreatedAt:this.sessionCreatedAt?this.sessionCreatedAt.toISOString():null}}static create(e){return new a(e.channel,e.version,e.buffers,e.types,e.offset,e.metadata,e.initData,e.sessionId,e.lastOperationId,e.sessionCreatedAt)}static fromJSON(e){var t;let n=null;return!0===e.isInitialized?n=null!==(t=e.initData)&&void 0!==t?t:"":"boolean"!=typeof e.isInitialized&&e.initData&&(n=e.initData),a.create({channel:e.channel,version:e.version,buffers:e.buffers,types:e.types,offset:e.offset,metadata:o.default.prepareMetadataForOperations(e.types,e.metadata).map(i.default.fromJSON),initData:n,sessionId:e.sessionId,lastOperationId:e.lastOperationId,sessionCreatedAt:e.sessionCreatedAt?new Date(e.sessionCreatedAt):null})}}t.default=a,a.DESCRIPTOR_NAME="CollaborativeEditingConnectResponse",a.DESCRIPTOR={fields:{channel:{type:"string",id:1},offset:{type:"uint32",id:2},version:{type:"uint32",id:3},buffers:{rule:"repeated",type:"bytes",id:4},types:{rule:"repeated",type:"uint32",id:5},metadata:{rule:"repeated",type:i.default.DESCRIPTOR_NAME,id:7},initData:{type:"string",id:8},isInitialized:{type:"bool",id:9},sessionId:{type:"string",id:10},lastOperationId:{type:"string",id:11},sessionCreatedAt:{type:"string",id:12}}}},3049:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844)),o=r(n(2895)),i=r(n(1074));class a extends s.default{constructor(e,t=[],n=[],r=[],s="",o=null){super(),this.version=e,this.buffers=t,this.types=n,this.metadata=r,this.lastOperationId=s,this.lastOperationAcceptedAt=o}get data(){return{buffers:this.buffers,types:this.types,baseVersion:this.version-this.types.length,lastOperationId:this.lastOperationId,lastOperationAcceptedAt:this.lastOperationAcceptedAt}}get wereChangesApplied(){var e;return!(null===(e=this.types)||void 0===e?void 0:e.length)}toJSON(){return{version:this.version,buffers:this.buffers,types:this.types,metadata:o.default.removeUnnecessaryMetadata(this.types,this.metadata).map(i.default.toJSON),lastOperationId:this.lastOperationId,lastOperationAcceptedAt:this.lastOperationAcceptedAt instanceof Date?this.lastOperationAcceptedAt.toISOString():this.lastOperationAcceptedAt}}static fromJSON(e){return new a(e.version,e.buffers,e.types,o.default.prepareMetadataForOperations(e.types,e.metadata).map(i.default.fromJSON),e.lastOperationId,e.lastOperationAcceptedAt?new Date(e.lastOperationAcceptedAt):null)}static create(e){return new a(e.version,e.buffers,e.types,e.metadata,e.lastOperationId,e.lastOperationAcceptedAt?new Date(e.lastOperationAcceptedAt):null)}}t.default=a,a.DESCRIPTOR_NAME="CollaborativeEditingResponse",a.DESCRIPTOR={fields:{version:{type:"uint32",id:1},buffers:{rule:"repeated",type:"bytes",id:2},types:{rule:"repeated",type:"uint32",id:3},metadata:{rule:"repeated",type:"OperationMetadataDescriptor",id:5},lastOperationId:{type:"string",id:6},lastOperationAcceptedAt:{type:"string",id:7}}}},8359:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e,t){super(),this.lastDocumentSession=e,this.currentDocumentSession=t}get data(){var e,t,n,r,s;return{lastDocumentSessionId:null===(e=this.lastDocumentSession)||void 0===e?void 0:e.id,lastDocumentSessionOperationId:null===(t=this.lastDocumentSession)||void 0===t?void 0:t.lastOperationId,currentDocumentSessionId:null===(n=this.currentDocumentSession)||void 0===n?void 0:n.id,currentDocumentSessionVersion:null===(r=this.currentDocumentSession)||void 0===r?void 0:r.version,currentDocumentSessionOperationId:null===(s=this.currentDocumentSession)||void 0===s?void 0:s.lastOperationId}}toJSON(){var e,t,n,r,s;return{lastDocumentSessionId:null===(e=this.lastDocumentSession)||void 0===e?void 0:e.id,lastDocumentSessionOperationId:null===(t=this.lastDocumentSession)||void 0===t?void 0:t.lastOperationId,currentDocumentSessionId:null===(n=this.currentDocumentSession)||void 0===n?void 0:n.id,currentDocumentSessionVersion:null===(r=this.currentDocumentSession)||void 0===r?void 0:r.version,currentDocumentSessionOperationId:null===(s=this.currentDocumentSession)||void 0===s?void 0:s.lastOperationId}}static fromJSON(e){const t=e.lastDocumentSessionId?{id:e.lastDocumentSessionId,lastOperationId:e.lastDocumentSessionOperationId}:void 0,n=e.currentDocumentSessionId?{lastOperationId:e.currentDocumentSessionOperationId,version:e.currentDocumentSessionVersion,id:e.currentDocumentSessionId}:void 0;return new o(t,n)}}t.default=o,o.DESCRIPTOR_NAME="GetDocumentDetailsResponse",o.DESCRIPTOR={fields:{lastDocumentSessionId:{type:"string",id:1},lastDocumentSessionOperationId:{type:"string",id:2},currentDocumentSessionId:{type:"string",id:3},currentDocumentSessionVersion:{type:"uint32",id:4},currentDocumentSessionOperationId:{type:"string",id:5}}}},2924:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return s(t,e),t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t._SERVICE=void 0;const a=n(4584),c=i(n(1774)),u=i(n(8741)),d=i(n(1763)),l=i(n(6033)),p=i(n(6599)),h=i(n(1452)),f=i(n(8852)),m=i(n(2481)),y=i(n(8610)),g=i(n(8994)),b=i(n(4451)),O=i(n(1973)),v=o(n(1244)),w=i(n(7477)),I=i(n(4096)),_=i(n(2352)),S=i(n(556)),P=i(n(8477)),A=i(n(9811)),T=i(n(5632)),k=i(n(2015)),C=i(n(2603)),E=i(n(7140));t._SERVICE=9;class j extends((0,a.EmitterMixin)()){constructor(e){super(),this._documentId=e,this._isConnected=!1}get isConnected(){return this._isConnected}async connect(e){if(this._isConnected)return;if(e.state!==v.WEB_SOCKET_GATEWAY_STATES.CONNECTED)throw new w.default("WebSocket Gateway is not connected.",e);const n=new l.default(this._documentId);this._wsGateway=e,this.stopListening(e,"change:state");const r=await e._sendRequest(t._SERVICE,l.default.TYPE,c.default.encode(n)),{channel:s,threads:o}=c.default.decode(r,p.default);return this.listenTo(e,"change:state",((e,t,n)=>this._onWsGatewayStateChange(n)),{priority:v.default._CHANGE_STATE_EVENT_PRIORITY}),this._connectToChannel(e,s),this._isConnected=!0,this.fire("connected"),o}disconnect(){this._isConnected&&(this._isConnected=!1,this._wsGateway&&(this.stopListening(this._wsGateway),this._wsGateway=void 0),this._channel&&(this.stopListening(this._channel),this._channel=void 0),this._connectedSessions&&(this._connectedSessions.disconnect(),this._connectedSessions=void 0),this.fire("disconnected"),this.stopListening())}async addComment(e,t,n,r){const s=new u.default(this._documentId,e,n,t,void 0,void 0,r),o=await this._sendRequest(u.default.TYPE,s);return c.default.decode(o,d.default)}async updateComment(e,t,n,r){const s=void 0!==r,o=new m.default(this._documentId,e,t,n,r,s);await this._sendRequest(m.default.TYPE,o)}async removeComment(e,t){const n=new h.default(this._documentId,e,t);await this._sendRequest(h.default.TYPE,n)}async removeCommentThread(e){const t=new f.default(this._documentId,e);await this._sendRequest(f.default.TYPE,t)}async addCommentThread(e){var t;const n=new A.default(this._documentId,e.commentThreadId,null===(t=e.comments)||void 0===t?void 0:t.map((t=>({...t,documentId:this._documentId,commentThreadId:e.commentThreadId}))),e.context,e.resolvedBy,e.createdAt,e.resolvedAt,e.deletedAt,e.attributes),r=await this._sendRequest(A.default.TYPE,n);return c.default.decode(r,P.default)}async resolveCommentThread(e){const t=new T.default(e,this._documentId),n=await this._sendRequest(T.default.TYPE,t);return c.default.decode(n,E.default)}async reopenCommentThread(e){const t=new k.default(e,this._documentId);await this._sendRequest(k.default.TYPE,t)}async updateCommentThread(e){const t=new C.default(e.commentThreadId,this._documentId,e.context,e.attributes,e.unlinkedAt);await this._sendRequest(C.default.TYPE,t)}async getCommentThread(e,t=1){const n=new y.default(e,this._documentId);try{const e=await this._sendRequest(y.default.TYPE,n),t=c.default.decode(e,g.default);return{commentThreadId:t.commentThreadId,comments:t.comments,attributes:t.attributes,context:t.context,resolvedAt:t.resolvedAt,resolvedBy:t.resolvedBy,deletedAt:t.deletedAt,unlinkedAt:t.unlinkedAt}}catch(n){if("CKEditorCloudServicesServerError"===n.name&&"404"===n.code&&t<5)return await(r=100*t,new Promise((e=>{setTimeout(e,r)}))),this.getCommentThread(e,t+1);if("CKEditorCloudServicesServerError"===n.name)throw n;throw S.default.fromPublicError(n)}var r}async getDocumentThreads(){const e=new b.default(this._documentId),t=await this._sendRequest(b.default.TYPE,e),{threads:n}=c.default.decode(t,O.default);return{threads:n}}async getConnectedSessions(){if(!this._isConnected)throw new _.default("Comments",this);return this._connectedSessions||(this._connectedSessions=await I.default.getConnectedSessions(this._wsGateway,this._documentId,t._SERVICE)),this._connectedSessions}_connectToChannel(e,t){this._channel=e._getChannel(j._SERVICE,t),this._channel&&(this.listenTo(this._channel,this._channel.getEventName(u.default.TYPE),((e,t)=>{const n=c.default.decode(t,u.default);this.fire("commentAdded",n)})),this.listenTo(this._channel,this._channel.getEventName(h.default.TYPE),((e,t)=>{const n=c.default.decode(t,h.default);this.fire("commentRemoved",n)})),this.listenTo(this._channel,this._channel.getEventName(m.default.TYPE),((e,t)=>{const n=c.default.decode(t,m.default);this.fire("commentUpdated",n)})),this.listenTo(this._channel,this._channel.getEventName(f.default.TYPE),((e,t)=>{const n=c.default.decode(t,f.default);this.fire("commentThreadRemoved",n)})),this.listenTo(this._channel,this._channel.getEventName(A.default.TYPE),((e,t)=>{const n=c.default.decode(t,A.default);this.fire("commentThreadAdded",n)})),this.listenTo(this._channel,this._channel.getEventName(C.default.TYPE),((e,t)=>{const n=c.default.decode(t,C.default);this.fire("commentThreadUpdated",n)})),this.listenTo(this._channel,this._channel.getEventName(T.default.TYPE),((e,t)=>{const n=c.default.decode(t,T.default);this.fire("commentThreadResolved",n)})),this.listenTo(this._channel,this._channel.getEventName(k.default.TYPE),((e,t)=>{const n=c.default.decode(t,k.default);this.fire("commentThreadReopened",n)})))}_onWsGatewayStateChange(e){e===v.WEB_SOCKET_GATEWAY_STATES.DISCONNECTED&&this.disconnect()}_sendRequest(e,n){if(!this._wsGateway||!this._isConnected)throw new _.default("Comments",this);return this._wsGateway._sendRequest(t._SERVICE,e,c.default.encode(n))}}j._SERVICE=t._SERVICE,t.default=j},3748:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(3130));class o extends s.default{static toJSON(e){var t;return{...e,createdAt:null===(t=e.createdAt)||void 0===t?void 0:t.toISOString(),attributes:e.attributes?JSON.stringify(e.attributes):null}}static fromJSON(e){return{...e,createdAt:new Date(e.createdAt),attributes:e.attributes?JSON.parse(e.attributes):null}}}t.default=o,o.DESCRIPTOR_NAME="CommentDescriptor",o.DESCRIPTOR={fields:{commentId:{id:1,type:"string"},commentThreadId:{id:2,type:"string"},userId:{id:3,type:"string"},content:{id:4,type:"string"},documentId:{id:5,type:"string"},createdAt:{id:6,type:"string"},attributes:{id:7,type:"string"}}}},5597:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(3130)),o=r(n(3748));class i extends s.default{static toJSON(e){var t,n,r,s,i;return{...e,createdAt:null===(t=e.createdAt)||void 0===t?void 0:t.toISOString(),deletedAt:null===(n=e.deletedAt)||void 0===n?void 0:n.toISOString(),resolvedAt:null===(r=e.resolvedAt)||void 0===r?void 0:r.toISOString(),attributes:e.attributes?JSON.stringify(e.attributes):null,context:e.context?JSON.stringify(e.context):e.context,comments:null===(s=e.comments)||void 0===s?void 0:s.map(o.default.toJSON),unlinkedAt:null===(i=e.unlinkedAt)||void 0===i?void 0:i.toISOString()}}static fromJSON(e){var t;return{...e,createdAt:e.createdAt?new Date(e.createdAt):void 0,deletedAt:e.deletedAt?new Date(e.deletedAt):void 0,resolvedAt:e.resolvedAt?new Date(e.resolvedAt):void 0,attributes:e.attributes?JSON.parse(e.attributes):null,context:e.context?JSON.parse(e.context):void 0,comments:null===(t=e.comments)||void 0===t?void 0:t.map(o.default.fromJSON),unlinkedAt:e.unlinkedAt?new Date(e.unlinkedAt):void 0}}}t.default=i,i.DESCRIPTOR_NAME="CommentsThreadDescriptor",i.DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},comments:{type:"CommentDescriptor",rule:"repeated",id:2},resolvedAt:{type:"string",id:3},resolvedBy:{type:"string",id:4},context:{type:"string",id:5},createdAt:{type:"string",id:6},deletedAt:{type:"string",id:7},attributes:{type:"string",id:8},unlinkedAt:{type:"string",id:9}}}},1866:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(3130));class o extends s.default{static toJSON(e){var t;return{commentId:e.commentId,createdAt:null===(t=e.createdAt)||void 0===t?void 0:t.toISOString()}}static fromJSON(e){return{commentId:e.commentId,createdAt:new Date(e.createdAt)}}}t.default=o,o.DESCRIPTOR_NAME="CommentThreadAddedCommentDescriptor",o.DESCRIPTOR={fields:{commentId:{id:1,type:"string"},createdAt:{id:2,type:"string"}}}},8741:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844)),o=r(n(5597));class i extends s.default{constructor(e,t,n,r="",s,o="",i=null,a){super(),this.documentId=e,this.commentThreadId=t,this.content=n,this.commentId=r,this.userId=o,this.attributes=i,this.commentThread=a,this.createdAt=s?new Date(s):""}toJSON(){return{commentThreadId:this.commentThreadId,content:this.content,documentId:this.documentId,commentId:this.commentId,createdAt:this.createdAt instanceof Date?this.createdAt.toISOString():this.createdAt,userId:this.userId,attributes:JSON.stringify(this.attributes),commentThread:this.commentThread?o.default.toJSON(this.commentThread):void 0}}static fromJSON(e){return new i(e.documentId,e.commentThreadId,e.content,e.commentId?e.commentId:void 0,e.createdAt?new Date(e.createdAt):void 0,e.userId?e.userId:void 0,e.attributes?JSON.parse(e.attributes):{},e.commentThread?o.default.fromJSON(e.commentThread):void 0)}}t.default=i,i.TYPE="91",i.READABLE_TYPE_NAME="addComment",i.DESCRIPTOR_NAME="CommentsV2AddCommentMessage",i.DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},content:{type:"string",id:2},documentId:{type:"string",id:3},commentId:{type:"string",id:4},createdAt:{type:"string",id:5},userId:{type:"string",id:6},attributes:{type:"string",id:7},commentThread:{type:"CommentsThreadDescriptor",id:8}}}},9811:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844)),o=r(n(3748));class i extends s.default{constructor(e,t,n=[],r,s=null,o=null,i=null,a=null,c=null){super(),this.documentId=e,this.commentThreadId=t,this.comments=n,this.context=r,this.resolvedBy=s,this.attributes=c,this.createdAt=o?new Date(o):"",this.resolvedAt=i?new Date(i):"",this.deletedAt=a?new Date(a):""}toJSON(){var e;return{commentThreadId:this.commentThreadId,context:this.context?JSON.stringify(this.context):this.context,documentId:this.documentId,resolvedBy:this.resolvedBy,resolvedAt:this.resolvedAt instanceof Date?this.resolvedAt.toISOString():this.resolvedAt,deletedAt:this.deletedAt instanceof Date?this.deletedAt.toISOString():this.deletedAt,createdAt:this.createdAt instanceof Date?this.createdAt.toISOString():this.createdAt,attributes:this.attributes?JSON.stringify(this.attributes):this.attributes,comments:null===(e=this.comments)||void 0===e?void 0:e.map((e=>o.default.toJSON(e)))}}static fromJSON(e){var t;return new i(e.documentId,e.commentThreadId,null===(t=e.comments)||void 0===t?void 0:t.map((t=>o.default.fromJSON({...t,documentId:e.documentId,commentThreadId:e.commentThreadId}))),e.context?JSON.parse(e.context):e.context,e.resolvedBy,e.createdAt?new Date(e.createdAt):void 0,e.resolvedAt?new Date(e.resolvedAt):void 0,e.deletedAt?new Date(e.deletedAt):void 0,e.attributes?JSON.parse(e.attributes):e.attributes)}}t.default=i,i.TYPE="140",i.READABLE_TYPE_NAME="addCommentThread",i.DESCRIPTOR_NAME="CommentsV2AddCommentThreadMessage",i.DESCRIPTOR={fields:{documentId:{type:"string",id:1},commentThreadId:{type:"string",id:2},context:{type:"string",id:3},createdAt:{type:"string",id:4},resolvedAt:{type:"string",id:5},resolvedBy:{type:"string",id:6},attributes:{type:"string",id:7},deletedAt:{type:"string",id:8},comments:{type:"CommentDescriptor",rule:"repeated",id:9}}}},2015:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e,t){super(),this.commentThreadId=e,this.documentId=t}toJSON(){return{documentId:this.documentId,commentThreadId:this.commentThreadId}}static fromJSON(e){return new o(e.commentThreadId,e.documentId)}}t.default=o,o.TYPE="141",o.READABLE_TYPE_NAME="reopenCommentThread",o.DESCRIPTOR_NAME="CommentsV2ReopenCommentThreadMessage",o.DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},documentId:{type:"string",id:2}}}},5632:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e,t,n,r){super(),this.commentThreadId=e,this.documentId=t,this.resolvedBy=n,this.resolvedAt=r?new Date(r):void 0}toJSON(){var e;return{documentId:this.documentId,commentThreadId:this.commentThreadId,resolvedBy:this.resolvedBy,resolvedAt:null===(e=this.resolvedAt)||void 0===e?void 0:e.toISOString()}}static fromJSON(e){return new o(e.commentThreadId,e.documentId,e.resolvedBy,e.resolvedAt)}}t.default=o,o.TYPE="142",o.READABLE_TYPE_NAME="resolveCommentThread",o.DESCRIPTOR_NAME="CommentsV2ResolveCommentThreadMessage",o.DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},documentId:{type:"string",id:2},resolvedBy:{type:"string",id:3},resolvedAt:{type:"string",id:4}}}},2603:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e,t,n,r=null,s=null){super(),this.commentThreadId=e,this.documentId=t,this.context=n,this.attributes=r,this.unlinkedAt=s?new Date(s):""}toJSON(){return{documentId:this.documentId,commentThreadId:this.commentThreadId,context:this.context?JSON.stringify(this.context):this.context,attributes:this.attributes?JSON.stringify(this.attributes):null,unlinkedAt:this.unlinkedAt instanceof Date?this.unlinkedAt.toISOString():this.unlinkedAt}}static fromJSON(e){return new o(e.commentThreadId,e.documentId,e.context?JSON.parse(e.context):e.context,e.attributes?JSON.parse(e.attributes):null,e.unlinkedAt?new Date(e.unlinkedAt):null)}}t.default=o,o.TYPE="143",o.READABLE_TYPE_NAME="updateCommentThread",o.DESCRIPTOR_NAME="CommentsV2UpdateCommentThreadMessage",o.DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},documentId:{type:"string",id:2},context:{type:"string",id:3},attributes:{type:"string",id:4},unlinkedAt:{type:"string",id:5}}}},6033:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e){super(),this.documentId=e}toJSON(){return{documentId:this.documentId}}static fromJSON(e){return new o(e.documentId)}}t.default=o,o.TYPE="92",o.READABLE_TYPE_NAME="connectToComment",o.DESCRIPTOR_NAME="CommentsV2ConnectMessage",o.DESCRIPTOR={fields:{documentId:{type:"string",id:1}}}},8610:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e,t){super(),this.commentThreadId=e,this.documentId=t}toJSON(){return{commentThreadId:this.commentThreadId,documentId:this.documentId}}static fromJSON(e){return new o(e.commentThreadId,e.documentId)}}t.default=o,o.TYPE="93",o.READABLE_TYPE_NAME="getComment",o.DESCRIPTOR_NAME="CommentsV2GetCommentThreadMessage",o.DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},documentId:{type:"string",id:2}}}},4451:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e){super(),this.documentId=e}toJSON(){return{documentId:this.documentId}}static fromJSON(e){return new o(e.documentId)}}t.default=o,o.TYPE="94",o.READABLE_TYPE_NAME="getDocumentThreads",o.DESCRIPTOR_NAME="CommentsV2GetDocumentThreadsMessage",o.DESCRIPTOR={fields:{documentId:{type:"string",id:1}}}},1452:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e,t,n){super(),this.documentId=e,this.commentThreadId=t,this.commentId=n}toJSON(){return{documentId:this.documentId,commentThreadId:this.commentThreadId,commentId:this.commentId}}static fromJSON(e){return new o(e.documentId,e.commentThreadId,e.commentId)}}t.default=o,o.TYPE="95",o.READABLE_TYPE_NAME="removeComment",o.DESCRIPTOR_NAME="CommentsV2RemoveCommentMessage",o.DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},commentId:{type:"string",id:2},documentId:{type:"string",id:3}}}},8852:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e,t){super(),this.documentId=e,this.commentThreadId=t}toJSON(){return{documentId:this.documentId,commentThreadId:this.commentThreadId}}static fromJSON(e){return new o(e.documentId,e.commentThreadId)}}t.default=o,o.TYPE="97",o.READABLE_TYPE_NAME="removeCommentThread",o.DESCRIPTOR_NAME="CommentsV2RemoveCommentThreadMessage",o.DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},documentId:{type:"string",id:2}}}},2481:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844)),o=r(n(5597));class i extends s.default{constructor(e,t,n,r,s=null,o=!1,i){super(),this.documentId=e,this.commentThreadId=t,this.commentId=n,this.content=r,this.attributes=s,this.isAttributesUpdated=o,this.commentThread=i}toJSON(){return{documentId:this.documentId,commentThreadId:this.commentThreadId,commentId:this.commentId,content:this.content,attributes:this.attributes?JSON.stringify(this.attributes):null,isAttributesUpdated:this.isAttributesUpdated,commentThread:this.commentThread?o.default.toJSON(this.commentThread):void 0}}static fromJSON(e){return new i(e.documentId,e.commentThreadId,e.commentId,e.content,e.attributes?JSON.parse(e.attributes):null,e.isAttributesUpdated,e.commentThread?o.default.fromJSON(e.commentThread):void 0)}}t.default=i,i.TYPE="96",i.READABLE_TYPE_NAME="updateComment",i.DESCRIPTOR_NAME="CommentsV2UpdateCommentMessage",i.DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},commentId:{type:"string",id:2},content:{type:"string",id:3},documentId:{type:"string",id:4},attributes:{type:"string",id:5},isAttributesUpdated:{type:"bool",id:6},commentThread:{type:"CommentsThreadDescriptor",id:7}}}},1763:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e,t,n){super(),this.commentThreadId=e,this.commentId=t,this.createdAt=new Date(n)}toJSON(){return{commentThreadId:this.commentThreadId,commentId:this.commentId,createdAt:this.createdAt.toISOString()}}static fromJSON(e){return new o(e.commentThreadId,e.commentId,e.createdAt)}}t.default=o,o.DESCRIPTOR_NAME="CommentsV2AddCommentResponse",o.DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},commentId:{type:"string",id:2},createdAt:{type:"string",id:3}}}},8477:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844)),o=r(n(1866));class i extends s.default{constructor(e,t,n=[]){super(),this.commentThreadId=e,this.comments=n,this.createdAt=new Date(t)}toJSON(){return{commentThreadId:this.commentThreadId,createdAt:this.createdAt.toISOString(),comments:this.comments.map((e=>o.default.toJSON(e)))}}static fromJSON(e){return new i(e.commentThreadId,e.createdAt,e.comments.map((e=>o.default.fromJSON(e))))}}t.default=i,i.DESCRIPTOR_NAME="CommentsV2AddCommentThreadResponse",i.DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},createdAt:{type:"string",id:2},comments:{type:"CommentThreadAddedCommentDescriptor",rule:"repeated",id:3}}}},7140:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e,t,n,r){super(),this.commentThreadId=e,this.documentId=t,this.resolvedBy=n,this.resolvedAt=new Date(r)}toJSON(){return{commentThreadId:this.commentThreadId,documentId:this.documentId,resolvedBy:this.resolvedBy,resolvedAt:this.resolvedAt.toISOString()}}static fromJSON(e){return new o(e.commentThreadId,e.documentId,e.resolvedBy,e.resolvedAt)}}t.default=o,o.DESCRIPTOR_NAME="CommentsV2ResolveCommentThreadResponse",o.DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},documentId:{type:"string",id:2},resolvedAt:{type:"string",id:3},resolvedBy:{type:"string",id:4}}}},6599:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844)),o=r(n(5597));class i extends s.default{constructor(e,t,n){super(),this.channel=e,this._threads=t,this._threadsV2=n,this.threads=(null==n?void 0:n.length)?n:t}toJSON(){var e,t;return{channel:this.channel,threads:null===(e=this._threads)||void 0===e?void 0:e.map((e=>JSON.stringify(e))),threadsV2:null===(t=this._threadsV2)||void 0===t?void 0:t.map(o.default.toJSON)}}static fromJSON(e){var t,n;return new i(e.channel,null===(t=e.threads)||void 0===t?void 0:t.map((e=>JSON.parse(e))),null===(n=e.threadsV2)||void 0===n?void 0:n.map(o.default.fromJSON))}}t.default=i,i.DESCRIPTOR_NAME="CommentsV2ConnectResponse",i.DESCRIPTOR={fields:{channel:{type:"string",id:1},threads:{type:"string",rule:"repeated",id:2},threadsV2:{type:"CommentsThreadDescriptor",rule:"repeated",id:3}}}},8994:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844)),o=r(n(3748));class i extends s.default{constructor(e,t,n,r,s,o,i,a,c,u){super(),this.commentThreadId=e,this._comments=t,this._commentsV2=n,this.resolvedBy=s,this.comments=(null==n?void 0:n.length)?n:t,this.createdAt=i?new Date(i):void 0,this.deletedAt="string"==typeof a?new Date(a):a,this.resolvedAt="string"==typeof c?new Date(c):c,this.unlinkedAt="string"==typeof u?new Date(u):u,this.attributes="string"==typeof r?JSON.parse(r):r,this.context="string"==typeof o?JSON.parse(o):o}toJSON(){var e,t,n,r,s,i;return{commentThreadId:this.commentThreadId,comments:null===(e=this._comments)||void 0===e?void 0:e.map((e=>JSON.stringify(e))),commentsV2:null===(t=this._commentsV2)||void 0===t?void 0:t.map(o.default.toJSON),attributes:this.attributes?JSON.stringify(this.attributes):this.attributes,context:this.context?JSON.stringify(this.context):this.context,resolvedBy:this.resolvedBy,createdAt:null===(n=this.createdAt)||void 0===n?void 0:n.toISOString(),deletedAt:null===(r=this.deletedAt)||void 0===r?void 0:r.toISOString(),resolvedAt:null===(s=this.resolvedAt)||void 0===s?void 0:s.toISOString(),unlinkedAt:null===(i=this.unlinkedAt)||void 0===i?void 0:i.toISOString()}}static fromJSON(e){var t,n;return new i(e.commentThreadId,null===(t=e.comments)||void 0===t?void 0:t.map((e=>function(e){const t=JSON.parse(e);return{...t,createdAt:new Date(t.createdAt)}}(e))),null===(n=e.commentsV2)||void 0===n?void 0:n.map(o.default.fromJSON),e.attributes?JSON.parse(e.attributes):e.attributes,e.resolvedBy,e.context?JSON.parse(e.context):e.context,e.createdAt,e.deletedAt,e.resolvedAt,e.unlinkedAt)}}t.default=i,i.DESCRIPTOR_NAME="CommentsV2GetCommentThreadResponse",i.DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},comments:{type:"string",rule:"repeated",id:2},commentsV2:{type:"CommentDescriptor",rule:"repeated",id:3},resolvedAt:{type:"string",id:4},resolvedBy:{type:"string",id:5},context:{type:"string",id:6},createdAt:{type:"string",id:7},deletedAt:{type:"string",id:8},attributes:{type:"string",id:9},unlinkedAt:{type:"string",id:10}}}},1973:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844)),o=r(n(5597));class i extends s.default{constructor(e,t){super(),this._threads=e,this._threadsV2=t,this.threads=(null==t?void 0:t.length)?t:e}toJSON(){var e,t;return{threads:null===(e=this._threads)||void 0===e?void 0:e.map((e=>JSON.stringify(e))),threadsV2:null===(t=this._threadsV2)||void 0===t?void 0:t.map(o.default.toJSON)}}static fromJSON(e){var t,n;return new i(null===(t=e.threads)||void 0===t?void 0:t.map((e=>function(e){var t;const n=JSON.parse(e),r={...n};return n.comments&&(r.comments=null===(t=n.comments)||void 0===t?void 0:t.map((e=>({...e,createdAt:new Date(e.createdAt)})))),r}(e))),null===(n=e.threadsV2)||void 0===n?void 0:n.map(o.default.fromJSON))}}t.default=i,i.DESCRIPTOR_NAME="CommentsV2GetDocumentThreadsResponse",i.DESCRIPTOR={fields:{threads:{type:"string",rule:"repeated",id:1},threadsV2:{type:"CommentsThreadDescriptor",rule:"repeated",id:2}}}},6504:(e,t,n)=>{var r,s,o,i;i=function(e){"use strict";var t=e.Reader,n=e.Writer,r=e.util,s=e.roots.default||(e.roots.default={});return s.OperationMetadataDescriptor=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.userId="",o.prototype.type="",o.prototype.createdAt="",o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.userId&&Object.hasOwnProperty.call(e,"userId")&&t.uint32(10).string(e.userId),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(18).string(e.type),null!=e.createdAt&&Object.hasOwnProperty.call(e,"createdAt")&&t.uint32(26).string(e.createdAt),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.OperationMetadataDescriptor;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.userId=e.string();break;case 2:o.type=e.string();break;case 3:o.createdAt=e.string();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.userId&&e.hasOwnProperty("userId")&&!r.isString(e.userId)?"userId: string expected":null!=e.type&&e.hasOwnProperty("type")&&!r.isString(e.type)?"type: string expected":null!=e.createdAt&&e.hasOwnProperty("createdAt")&&!r.isString(e.createdAt)?"createdAt: string expected":null},o.fromObject=function(e){if(e instanceof s.OperationMetadataDescriptor)return e;var t=new s.OperationMetadataDescriptor;return null!=e.userId&&(t.userId=String(e.userId)),null!=e.type&&(t.type=String(e.type)),null!=e.createdAt&&(t.createdAt=String(e.createdAt)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.userId="",n.type="",n.createdAt=""),null!=e.userId&&e.hasOwnProperty("userId")&&(n.userId=e.userId),null!=e.type&&e.hasOwnProperty("type")&&(n.type=e.type),null!=e.createdAt&&e.hasOwnProperty("createdAt")&&(n.createdAt=e.createdAt),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/OperationMetadataDescriptor"},o}(),s.CollaborativeEditingConnectMessage=function(){function o(e){if(this.buffers=[],this.types=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.id="",o.prototype.bundleVersion="",o.prototype.buffers=r.emptyArray,o.prototype.types=r.emptyArray,o.prototype.lastOperationId="",o.create=function(e){return new o(e)},o.encode=function(e,t){if(t||(t=n.create()),null!=e.id&&Object.hasOwnProperty.call(e,"id")&&t.uint32(10).string(e.id),null!=e.bundleVersion&&Object.hasOwnProperty.call(e,"bundleVersion")&&t.uint32(18).string(e.bundleVersion),null!=e.buffers&&e.buffers.length)for(var r=0;r<e.buffers.length;++r)t.uint32(26).bytes(e.buffers[r]);if(null!=e.types&&e.types.length){for(t.uint32(34).fork(),r=0;r<e.types.length;++r)t.uint32(e.types[r]);t.ldelim()}return null!=e.lastOperationId&&Object.hasOwnProperty.call(e,"lastOperationId")&&t.uint32(42).string(e.lastOperationId),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.CollaborativeEditingConnectMessage;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.id=e.string();break;case 2:o.bundleVersion=e.string();break;case 3:o.buffers&&o.buffers.length||(o.buffers=[]),o.buffers.push(e.bytes());break;case 4:if(o.types&&o.types.length||(o.types=[]),2==(7&i))for(var a=e.uint32()+e.pos;e.pos<a;)o.types.push(e.uint32());else o.types.push(e.uint32());break;case 5:o.lastOperationId=e.string();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.id&&e.hasOwnProperty("id")&&!r.isString(e.id))return"id: string expected";if(null!=e.bundleVersion&&e.hasOwnProperty("bundleVersion")&&!r.isString(e.bundleVersion))return"bundleVersion: string expected";if(null!=e.buffers&&e.hasOwnProperty("buffers")){if(!Array.isArray(e.buffers))return"buffers: array expected";for(var t=0;t<e.buffers.length;++t)if(!(e.buffers[t]&&"number"==typeof e.buffers[t].length||r.isString(e.buffers[t])))return"buffers: buffer[] expected"}if(null!=e.types&&e.hasOwnProperty("types")){if(!Array.isArray(e.types))return"types: array expected";for(t=0;t<e.types.length;++t)if(!r.isInteger(e.types[t]))return"types: integer[] expected"}return null!=e.lastOperationId&&e.hasOwnProperty("lastOperationId")&&!r.isString(e.lastOperationId)?"lastOperationId: string expected":null},o.fromObject=function(e){if(e instanceof s.CollaborativeEditingConnectMessage)return e;var t=new s.CollaborativeEditingConnectMessage;if(null!=e.id&&(t.id=String(e.id)),null!=e.bundleVersion&&(t.bundleVersion=String(e.bundleVersion)),e.buffers){if(!Array.isArray(e.buffers))throw TypeError(".CollaborativeEditingConnectMessage.buffers: array expected");t.buffers=[];for(var n=0;n<e.buffers.length;++n)"string"==typeof e.buffers[n]?r.base64.decode(e.buffers[n],t.buffers[n]=r.newBuffer(r.base64.length(e.buffers[n])),0):e.buffers[n].length>=0&&(t.buffers[n]=e.buffers[n])}if(e.types){if(!Array.isArray(e.types))throw TypeError(".CollaborativeEditingConnectMessage.types: array expected");for(t.types=[],n=0;n<e.types.length;++n)t.types[n]=e.types[n]>>>0}return null!=e.lastOperationId&&(t.lastOperationId=String(e.lastOperationId)),t},o.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.buffers=[],n.types=[]),t.defaults&&(n.id="",n.bundleVersion="",n.lastOperationId=""),null!=e.id&&e.hasOwnProperty("id")&&(n.id=e.id),null!=e.bundleVersion&&e.hasOwnProperty("bundleVersion")&&(n.bundleVersion=e.bundleVersion),e.buffers&&e.buffers.length){n.buffers=[];for(var s=0;s<e.buffers.length;++s)n.buffers[s]=t.bytes===String?r.base64.encode(e.buffers[s],0,e.buffers[s].length):t.bytes===Array?Array.prototype.slice.call(e.buffers[s]):e.buffers[s]}if(e.types&&e.types.length)for(n.types=[],s=0;s<e.types.length;++s)n.types[s]=e.types[s];return null!=e.lastOperationId&&e.hasOwnProperty("lastOperationId")&&(n.lastOperationId=e.lastOperationId),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/CollaborativeEditingConnectMessage"},o}(),s.CollaborativeEditingReconnectMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.id="",o.prototype.bundleVersion="",o.prototype.lastKnowVersion=0,o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.id&&Object.hasOwnProperty.call(e,"id")&&t.uint32(10).string(e.id),null!=e.bundleVersion&&Object.hasOwnProperty.call(e,"bundleVersion")&&t.uint32(18).string(e.bundleVersion),null!=e.lastKnowVersion&&Object.hasOwnProperty.call(e,"lastKnowVersion")&&t.uint32(24).uint32(e.lastKnowVersion),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.CollaborativeEditingReconnectMessage;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.id=e.string();break;case 2:o.bundleVersion=e.string();break;case 3:o.lastKnowVersion=e.uint32();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.id&&e.hasOwnProperty("id")&&!r.isString(e.id)?"id: string expected":null!=e.bundleVersion&&e.hasOwnProperty("bundleVersion")&&!r.isString(e.bundleVersion)?"bundleVersion: string expected":null!=e.lastKnowVersion&&e.hasOwnProperty("lastKnowVersion")&&!r.isInteger(e.lastKnowVersion)?"lastKnowVersion: integer expected":null},o.fromObject=function(e){if(e instanceof s.CollaborativeEditingReconnectMessage)return e;var t=new s.CollaborativeEditingReconnectMessage;return null!=e.id&&(t.id=String(e.id)),null!=e.bundleVersion&&(t.bundleVersion=String(e.bundleVersion)),null!=e.lastKnowVersion&&(t.lastKnowVersion=e.lastKnowVersion>>>0),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.id="",n.bundleVersion="",n.lastKnowVersion=0),null!=e.id&&e.hasOwnProperty("id")&&(n.id=e.id),null!=e.bundleVersion&&e.hasOwnProperty("bundleVersion")&&(n.bundleVersion=e.bundleVersion),null!=e.lastKnowVersion&&e.hasOwnProperty("lastKnowVersion")&&(n.lastKnowVersion=e.lastKnowVersion),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/CollaborativeEditingReconnectMessage"},o}(),s.CollaborativeEditingUpdateMessage=function(){function o(e){if(this.buffers=[],this.types=[],this.metadata=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.id="",o.prototype.baseVersion=0,o.prototype.buffers=r.emptyArray,o.prototype.types=r.emptyArray,o.prototype.metadata=r.emptyArray,o.prototype.lastOperationId="",o.create=function(e){return new o(e)},o.encode=function(e,t){if(t||(t=n.create()),null!=e.id&&Object.hasOwnProperty.call(e,"id")&&t.uint32(10).string(e.id),null!=e.baseVersion&&Object.hasOwnProperty.call(e,"baseVersion")&&t.uint32(16).uint32(e.baseVersion),null!=e.buffers&&e.buffers.length)for(var r=0;r<e.buffers.length;++r)t.uint32(26).bytes(e.buffers[r]);if(null!=e.types&&e.types.length){for(t.uint32(34).fork(),r=0;r<e.types.length;++r)t.uint32(e.types[r]);t.ldelim()}if(null!=e.metadata&&e.metadata.length)for(r=0;r<e.metadata.length;++r)s.OperationMetadataDescriptor.encode(e.metadata[r],t.uint32(50).fork()).ldelim();return null!=e.lastOperationId&&Object.hasOwnProperty.call(e,"lastOperationId")&&t.uint32(58).string(e.lastOperationId),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.CollaborativeEditingUpdateMessage;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.id=e.string();break;case 2:o.baseVersion=e.uint32();break;case 3:o.buffers&&o.buffers.length||(o.buffers=[]),o.buffers.push(e.bytes());break;case 4:if(o.types&&o.types.length||(o.types=[]),2==(7&i))for(var a=e.uint32()+e.pos;e.pos<a;)o.types.push(e.uint32());else o.types.push(e.uint32());break;case 6:o.metadata&&o.metadata.length||(o.metadata=[]),o.metadata.push(s.OperationMetadataDescriptor.decode(e,e.uint32()));break;case 7:o.lastOperationId=e.string();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.id&&e.hasOwnProperty("id")&&!r.isString(e.id))return"id: string expected";if(null!=e.baseVersion&&e.hasOwnProperty("baseVersion")&&!r.isInteger(e.baseVersion))return"baseVersion: integer expected";if(null!=e.buffers&&e.hasOwnProperty("buffers")){if(!Array.isArray(e.buffers))return"buffers: array expected";for(var t=0;t<e.buffers.length;++t)if(!(e.buffers[t]&&"number"==typeof e.buffers[t].length||r.isString(e.buffers[t])))return"buffers: buffer[] expected"}if(null!=e.types&&e.hasOwnProperty("types")){if(!Array.isArray(e.types))return"types: array expected";for(t=0;t<e.types.length;++t)if(!r.isInteger(e.types[t]))return"types: integer[] expected"}if(null!=e.metadata&&e.hasOwnProperty("metadata")){if(!Array.isArray(e.metadata))return"metadata: array expected";for(t=0;t<e.metadata.length;++t){var n=s.OperationMetadataDescriptor.verify(e.metadata[t]);if(n)return"metadata."+n}}return null!=e.lastOperationId&&e.hasOwnProperty("lastOperationId")&&!r.isString(e.lastOperationId)?"lastOperationId: string expected":null},o.fromObject=function(e){if(e instanceof s.CollaborativeEditingUpdateMessage)return e;var t=new s.CollaborativeEditingUpdateMessage;if(null!=e.id&&(t.id=String(e.id)),null!=e.baseVersion&&(t.baseVersion=e.baseVersion>>>0),e.buffers){if(!Array.isArray(e.buffers))throw TypeError(".CollaborativeEditingUpdateMessage.buffers: array expected");t.buffers=[];for(var n=0;n<e.buffers.length;++n)"string"==typeof e.buffers[n]?r.base64.decode(e.buffers[n],t.buffers[n]=r.newBuffer(r.base64.length(e.buffers[n])),0):e.buffers[n].length>=0&&(t.buffers[n]=e.buffers[n])}if(e.types){if(!Array.isArray(e.types))throw TypeError(".CollaborativeEditingUpdateMessage.types: array expected");for(t.types=[],n=0;n<e.types.length;++n)t.types[n]=e.types[n]>>>0}if(e.metadata){if(!Array.isArray(e.metadata))throw TypeError(".CollaborativeEditingUpdateMessage.metadata: array expected");for(t.metadata=[],n=0;n<e.metadata.length;++n){if("object"!=typeof e.metadata[n])throw TypeError(".CollaborativeEditingUpdateMessage.metadata: object expected");t.metadata[n]=s.OperationMetadataDescriptor.fromObject(e.metadata[n])}}return null!=e.lastOperationId&&(t.lastOperationId=String(e.lastOperationId)),t},o.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.buffers=[],n.types=[],n.metadata=[]),t.defaults&&(n.id="",n.baseVersion=0,n.lastOperationId=""),null!=e.id&&e.hasOwnProperty("id")&&(n.id=e.id),null!=e.baseVersion&&e.hasOwnProperty("baseVersion")&&(n.baseVersion=e.baseVersion),e.buffers&&e.buffers.length){n.buffers=[];for(var o=0;o<e.buffers.length;++o)n.buffers[o]=t.bytes===String?r.base64.encode(e.buffers[o],0,e.buffers[o].length):t.bytes===Array?Array.prototype.slice.call(e.buffers[o]):e.buffers[o]}if(e.types&&e.types.length)for(n.types=[],o=0;o<e.types.length;++o)n.types[o]=e.types[o];if(e.metadata&&e.metadata.length)for(n.metadata=[],o=0;o<e.metadata.length;++o)n.metadata[o]=s.OperationMetadataDescriptor.toObject(e.metadata[o],t);return null!=e.lastOperationId&&e.hasOwnProperty("lastOperationId")&&(n.lastOperationId=e.lastOperationId),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/CollaborativeEditingUpdateMessage"},o}(),s.GetDocumentDetailsMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.documentId="",o.prototype.environmentId="",o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.documentId&&Object.hasOwnProperty.call(e,"documentId")&&t.uint32(10).string(e.documentId),null!=e.environmentId&&Object.hasOwnProperty.call(e,"environmentId")&&t.uint32(18).string(e.environmentId),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.GetDocumentDetailsMessage;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.documentId=e.string();break;case 2:o.environmentId=e.string();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.documentId&&e.hasOwnProperty("documentId")&&!r.isString(e.documentId)?"documentId: string expected":null!=e.environmentId&&e.hasOwnProperty("environmentId")&&!r.isString(e.environmentId)?"environmentId: string expected":null},o.fromObject=function(e){if(e instanceof s.GetDocumentDetailsMessage)return e;var t=new s.GetDocumentDetailsMessage;return null!=e.documentId&&(t.documentId=String(e.documentId)),null!=e.environmentId&&(t.environmentId=String(e.environmentId)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.documentId="",n.environmentId=""),null!=e.documentId&&e.hasOwnProperty("documentId")&&(n.documentId=e.documentId),null!=e.environmentId&&e.hasOwnProperty("environmentId")&&(n.environmentId=e.environmentId),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/GetDocumentDetailsMessage"},o}(),s.CollaborativeEditingConnectResponse=function(){function o(e){if(this.buffers=[],this.types=[],this.metadata=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.channel="",o.prototype.offset=0,o.prototype.version=0,o.prototype.buffers=r.emptyArray,o.prototype.types=r.emptyArray,o.prototype.metadata=r.emptyArray,o.prototype.initData="",o.prototype.isInitialized=!1,o.prototype.sessionId="",o.prototype.lastOperationId="",o.prototype.sessionCreatedAt="",o.create=function(e){return new o(e)},o.encode=function(e,t){if(t||(t=n.create()),null!=e.channel&&Object.hasOwnProperty.call(e,"channel")&&t.uint32(10).string(e.channel),null!=e.offset&&Object.hasOwnProperty.call(e,"offset")&&t.uint32(16).uint32(e.offset),null!=e.version&&Object.hasOwnProperty.call(e,"version")&&t.uint32(24).uint32(e.version),null!=e.buffers&&e.buffers.length)for(var r=0;r<e.buffers.length;++r)t.uint32(34).bytes(e.buffers[r]);if(null!=e.types&&e.types.length){for(t.uint32(42).fork(),r=0;r<e.types.length;++r)t.uint32(e.types[r]);t.ldelim()}if(null!=e.metadata&&e.metadata.length)for(r=0;r<e.metadata.length;++r)s.OperationMetadataDescriptor.encode(e.metadata[r],t.uint32(58).fork()).ldelim();return null!=e.initData&&Object.hasOwnProperty.call(e,"initData")&&t.uint32(66).string(e.initData),null!=e.isInitialized&&Object.hasOwnProperty.call(e,"isInitialized")&&t.uint32(72).bool(e.isInitialized),null!=e.sessionId&&Object.hasOwnProperty.call(e,"sessionId")&&t.uint32(82).string(e.sessionId),null!=e.lastOperationId&&Object.hasOwnProperty.call(e,"lastOperationId")&&t.uint32(90).string(e.lastOperationId),null!=e.sessionCreatedAt&&Object.hasOwnProperty.call(e,"sessionCreatedAt")&&t.uint32(98).string(e.sessionCreatedAt),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.CollaborativeEditingConnectResponse;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.channel=e.string();break;case 2:o.offset=e.uint32();break;case 3:o.version=e.uint32();break;case 4:o.buffers&&o.buffers.length||(o.buffers=[]),o.buffers.push(e.bytes());break;case 5:if(o.types&&o.types.length||(o.types=[]),2==(7&i))for(var a=e.uint32()+e.pos;e.pos<a;)o.types.push(e.uint32());else o.types.push(e.uint32());break;case 7:o.metadata&&o.metadata.length||(o.metadata=[]),o.metadata.push(s.OperationMetadataDescriptor.decode(e,e.uint32()));break;case 8:o.initData=e.string();break;case 9:o.isInitialized=e.bool();break;case 10:o.sessionId=e.string();break;case 11:o.lastOperationId=e.string();break;case 12:o.sessionCreatedAt=e.string();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.channel&&e.hasOwnProperty("channel")&&!r.isString(e.channel))return"channel: string expected";if(null!=e.offset&&e.hasOwnProperty("offset")&&!r.isInteger(e.offset))return"offset: integer expected";if(null!=e.version&&e.hasOwnProperty("version")&&!r.isInteger(e.version))return"version: integer expected";if(null!=e.buffers&&e.hasOwnProperty("buffers")){if(!Array.isArray(e.buffers))return"buffers: array expected";for(var t=0;t<e.buffers.length;++t)if(!(e.buffers[t]&&"number"==typeof e.buffers[t].length||r.isString(e.buffers[t])))return"buffers: buffer[] expected"}if(null!=e.types&&e.hasOwnProperty("types")){if(!Array.isArray(e.types))return"types: array expected";for(t=0;t<e.types.length;++t)if(!r.isInteger(e.types[t]))return"types: integer[] expected"}if(null!=e.metadata&&e.hasOwnProperty("metadata")){if(!Array.isArray(e.metadata))return"metadata: array expected";for(t=0;t<e.metadata.length;++t){var n=s.OperationMetadataDescriptor.verify(e.metadata[t]);if(n)return"metadata."+n}}return null!=e.initData&&e.hasOwnProperty("initData")&&!r.isString(e.initData)?"initData: string expected":null!=e.isInitialized&&e.hasOwnProperty("isInitialized")&&"boolean"!=typeof e.isInitialized?"isInitialized: boolean expected":null!=e.sessionId&&e.hasOwnProperty("sessionId")&&!r.isString(e.sessionId)?"sessionId: string expected":null!=e.lastOperationId&&e.hasOwnProperty("lastOperationId")&&!r.isString(e.lastOperationId)?"lastOperationId: string expected":null!=e.sessionCreatedAt&&e.hasOwnProperty("sessionCreatedAt")&&!r.isString(e.sessionCreatedAt)?"sessionCreatedAt: string expected":null},o.fromObject=function(e){if(e instanceof s.CollaborativeEditingConnectResponse)return e;var t=new s.CollaborativeEditingConnectResponse;if(null!=e.channel&&(t.channel=String(e.channel)),null!=e.offset&&(t.offset=e.offset>>>0),null!=e.version&&(t.version=e.version>>>0),e.buffers){if(!Array.isArray(e.buffers))throw TypeError(".CollaborativeEditingConnectResponse.buffers: array expected");t.buffers=[];for(var n=0;n<e.buffers.length;++n)"string"==typeof e.buffers[n]?r.base64.decode(e.buffers[n],t.buffers[n]=r.newBuffer(r.base64.length(e.buffers[n])),0):e.buffers[n].length>=0&&(t.buffers[n]=e.buffers[n])}if(e.types){if(!Array.isArray(e.types))throw TypeError(".CollaborativeEditingConnectResponse.types: array expected");for(t.types=[],n=0;n<e.types.length;++n)t.types[n]=e.types[n]>>>0}if(e.metadata){if(!Array.isArray(e.metadata))throw TypeError(".CollaborativeEditingConnectResponse.metadata: array expected");for(t.metadata=[],n=0;n<e.metadata.length;++n){if("object"!=typeof e.metadata[n])throw TypeError(".CollaborativeEditingConnectResponse.metadata: object expected");t.metadata[n]=s.OperationMetadataDescriptor.fromObject(e.metadata[n])}}return null!=e.initData&&(t.initData=String(e.initData)),null!=e.isInitialized&&(t.isInitialized=Boolean(e.isInitialized)),null!=e.sessionId&&(t.sessionId=String(e.sessionId)),null!=e.lastOperationId&&(t.lastOperationId=String(e.lastOperationId)),null!=e.sessionCreatedAt&&(t.sessionCreatedAt=String(e.sessionCreatedAt)),t},o.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.buffers=[],n.types=[],n.metadata=[]),t.defaults&&(n.channel="",n.offset=0,n.version=0,n.initData="",n.isInitialized=!1,n.sessionId="",n.lastOperationId="",n.sessionCreatedAt=""),null!=e.channel&&e.hasOwnProperty("channel")&&(n.channel=e.channel),null!=e.offset&&e.hasOwnProperty("offset")&&(n.offset=e.offset),null!=e.version&&e.hasOwnProperty("version")&&(n.version=e.version),e.buffers&&e.buffers.length){n.buffers=[];for(var o=0;o<e.buffers.length;++o)n.buffers[o]=t.bytes===String?r.base64.encode(e.buffers[o],0,e.buffers[o].length):t.bytes===Array?Array.prototype.slice.call(e.buffers[o]):e.buffers[o]}if(e.types&&e.types.length)for(n.types=[],o=0;o<e.types.length;++o)n.types[o]=e.types[o];if(e.metadata&&e.metadata.length)for(n.metadata=[],o=0;o<e.metadata.length;++o)n.metadata[o]=s.OperationMetadataDescriptor.toObject(e.metadata[o],t);return null!=e.initData&&e.hasOwnProperty("initData")&&(n.initData=e.initData),null!=e.isInitialized&&e.hasOwnProperty("isInitialized")&&(n.isInitialized=e.isInitialized),null!=e.sessionId&&e.hasOwnProperty("sessionId")&&(n.sessionId=e.sessionId),null!=e.lastOperationId&&e.hasOwnProperty("lastOperationId")&&(n.lastOperationId=e.lastOperationId),null!=e.sessionCreatedAt&&e.hasOwnProperty("sessionCreatedAt")&&(n.sessionCreatedAt=e.sessionCreatedAt),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/CollaborativeEditingConnectResponse"},o}(),s.CollaborativeEditingResponse=function(){function o(e){if(this.buffers=[],this.types=[],this.metadata=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.version=0,o.prototype.buffers=r.emptyArray,o.prototype.types=r.emptyArray,o.prototype.metadata=r.emptyArray,o.prototype.lastOperationId="",o.prototype.lastOperationAcceptedAt="",o.create=function(e){return new o(e)},o.encode=function(e,t){if(t||(t=n.create()),null!=e.version&&Object.hasOwnProperty.call(e,"version")&&t.uint32(8).uint32(e.version),null!=e.buffers&&e.buffers.length)for(var r=0;r<e.buffers.length;++r)t.uint32(18).bytes(e.buffers[r]);if(null!=e.types&&e.types.length){for(t.uint32(26).fork(),r=0;r<e.types.length;++r)t.uint32(e.types[r]);t.ldelim()}if(null!=e.metadata&&e.metadata.length)for(r=0;r<e.metadata.length;++r)s.OperationMetadataDescriptor.encode(e.metadata[r],t.uint32(42).fork()).ldelim();return null!=e.lastOperationId&&Object.hasOwnProperty.call(e,"lastOperationId")&&t.uint32(50).string(e.lastOperationId),null!=e.lastOperationAcceptedAt&&Object.hasOwnProperty.call(e,"lastOperationAcceptedAt")&&t.uint32(58).string(e.lastOperationAcceptedAt),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.CollaborativeEditingResponse;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.version=e.uint32();break;case 2:o.buffers&&o.buffers.length||(o.buffers=[]),o.buffers.push(e.bytes());break;case 3:if(o.types&&o.types.length||(o.types=[]),2==(7&i))for(var a=e.uint32()+e.pos;e.pos<a;)o.types.push(e.uint32());else o.types.push(e.uint32());break;case 5:o.metadata&&o.metadata.length||(o.metadata=[]),o.metadata.push(s.OperationMetadataDescriptor.decode(e,e.uint32()));break;case 6:o.lastOperationId=e.string();break;case 7:o.lastOperationAcceptedAt=e.string();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.version&&e.hasOwnProperty("version")&&!r.isInteger(e.version))return"version: integer expected";if(null!=e.buffers&&e.hasOwnProperty("buffers")){if(!Array.isArray(e.buffers))return"buffers: array expected";for(var t=0;t<e.buffers.length;++t)if(!(e.buffers[t]&&"number"==typeof e.buffers[t].length||r.isString(e.buffers[t])))return"buffers: buffer[] expected"}if(null!=e.types&&e.hasOwnProperty("types")){if(!Array.isArray(e.types))return"types: array expected";for(t=0;t<e.types.length;++t)if(!r.isInteger(e.types[t]))return"types: integer[] expected"}if(null!=e.metadata&&e.hasOwnProperty("metadata")){if(!Array.isArray(e.metadata))return"metadata: array expected";for(t=0;t<e.metadata.length;++t){var n=s.OperationMetadataDescriptor.verify(e.metadata[t]);if(n)return"metadata."+n}}return null!=e.lastOperationId&&e.hasOwnProperty("lastOperationId")&&!r.isString(e.lastOperationId)?"lastOperationId: string expected":null!=e.lastOperationAcceptedAt&&e.hasOwnProperty("lastOperationAcceptedAt")&&!r.isString(e.lastOperationAcceptedAt)?"lastOperationAcceptedAt: string expected":null},o.fromObject=function(e){if(e instanceof s.CollaborativeEditingResponse)return e;var t=new s.CollaborativeEditingResponse;if(null!=e.version&&(t.version=e.version>>>0),e.buffers){if(!Array.isArray(e.buffers))throw TypeError(".CollaborativeEditingResponse.buffers: array expected");t.buffers=[];for(var n=0;n<e.buffers.length;++n)"string"==typeof e.buffers[n]?r.base64.decode(e.buffers[n],t.buffers[n]=r.newBuffer(r.base64.length(e.buffers[n])),0):e.buffers[n].length>=0&&(t.buffers[n]=e.buffers[n])}if(e.types){if(!Array.isArray(e.types))throw TypeError(".CollaborativeEditingResponse.types: array expected");for(t.types=[],n=0;n<e.types.length;++n)t.types[n]=e.types[n]>>>0}if(e.metadata){if(!Array.isArray(e.metadata))throw TypeError(".CollaborativeEditingResponse.metadata: array expected");for(t.metadata=[],n=0;n<e.metadata.length;++n){if("object"!=typeof e.metadata[n])throw TypeError(".CollaborativeEditingResponse.metadata: object expected");t.metadata[n]=s.OperationMetadataDescriptor.fromObject(e.metadata[n])}}return null!=e.lastOperationId&&(t.lastOperationId=String(e.lastOperationId)),null!=e.lastOperationAcceptedAt&&(t.lastOperationAcceptedAt=String(e.lastOperationAcceptedAt)),t},o.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.buffers=[],n.types=[],n.metadata=[]),t.defaults&&(n.version=0,n.lastOperationId="",n.lastOperationAcceptedAt=""),null!=e.version&&e.hasOwnProperty("version")&&(n.version=e.version),e.buffers&&e.buffers.length){n.buffers=[];for(var o=0;o<e.buffers.length;++o)n.buffers[o]=t.bytes===String?r.base64.encode(e.buffers[o],0,e.buffers[o].length):t.bytes===Array?Array.prototype.slice.call(e.buffers[o]):e.buffers[o]}if(e.types&&e.types.length)for(n.types=[],o=0;o<e.types.length;++o)n.types[o]=e.types[o];if(e.metadata&&e.metadata.length)for(n.metadata=[],o=0;o<e.metadata.length;++o)n.metadata[o]=s.OperationMetadataDescriptor.toObject(e.metadata[o],t);return null!=e.lastOperationId&&e.hasOwnProperty("lastOperationId")&&(n.lastOperationId=e.lastOperationId),null!=e.lastOperationAcceptedAt&&e.hasOwnProperty("lastOperationAcceptedAt")&&(n.lastOperationAcceptedAt=e.lastOperationAcceptedAt),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/CollaborativeEditingResponse"},o}(),s.GetDocumentDetailsResponse=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.lastDocumentSessionId="",o.prototype.lastDocumentSessionOperationId="",o.prototype.currentDocumentSessionId="",o.prototype.currentDocumentSessionVersion=0,o.prototype.currentDocumentSessionOperationId="",o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.lastDocumentSessionId&&Object.hasOwnProperty.call(e,"lastDocumentSessionId")&&t.uint32(10).string(e.lastDocumentSessionId),null!=e.lastDocumentSessionOperationId&&Object.hasOwnProperty.call(e,"lastDocumentSessionOperationId")&&t.uint32(18).string(e.lastDocumentSessionOperationId),null!=e.currentDocumentSessionId&&Object.hasOwnProperty.call(e,"currentDocumentSessionId")&&t.uint32(26).string(e.currentDocumentSessionId),null!=e.currentDocumentSessionVersion&&Object.hasOwnProperty.call(e,"currentDocumentSessionVersion")&&t.uint32(32).uint32(e.currentDocumentSessionVersion),null!=e.currentDocumentSessionOperationId&&Object.hasOwnProperty.call(e,"currentDocumentSessionOperationId")&&t.uint32(42).string(e.currentDocumentSessionOperationId),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.GetDocumentDetailsResponse;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.lastDocumentSessionId=e.string();break;case 2:o.lastDocumentSessionOperationId=e.string();break;case 3:o.currentDocumentSessionId=e.string();break;case 4:o.currentDocumentSessionVersion=e.uint32();break;case 5:o.currentDocumentSessionOperationId=e.string();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.lastDocumentSessionId&&e.hasOwnProperty("lastDocumentSessionId")&&!r.isString(e.lastDocumentSessionId)?"lastDocumentSessionId: string expected":null!=e.lastDocumentSessionOperationId&&e.hasOwnProperty("lastDocumentSessionOperationId")&&!r.isString(e.lastDocumentSessionOperationId)?"lastDocumentSessionOperationId: string expected":null!=e.currentDocumentSessionId&&e.hasOwnProperty("currentDocumentSessionId")&&!r.isString(e.currentDocumentSessionId)?"currentDocumentSessionId: string expected":null!=e.currentDocumentSessionVersion&&e.hasOwnProperty("currentDocumentSessionVersion")&&!r.isInteger(e.currentDocumentSessionVersion)?"currentDocumentSessionVersion: integer expected":null!=e.currentDocumentSessionOperationId&&e.hasOwnProperty("currentDocumentSessionOperationId")&&!r.isString(e.currentDocumentSessionOperationId)?"currentDocumentSessionOperationId: string expected":null},o.fromObject=function(e){if(e instanceof s.GetDocumentDetailsResponse)return e;var t=new s.GetDocumentDetailsResponse;return null!=e.lastDocumentSessionId&&(t.lastDocumentSessionId=String(e.lastDocumentSessionId)),null!=e.lastDocumentSessionOperationId&&(t.lastDocumentSessionOperationId=String(e.lastDocumentSessionOperationId)),null!=e.currentDocumentSessionId&&(t.currentDocumentSessionId=String(e.currentDocumentSessionId)),null!=e.currentDocumentSessionVersion&&(t.currentDocumentSessionVersion=e.currentDocumentSessionVersion>>>0),null!=e.currentDocumentSessionOperationId&&(t.currentDocumentSessionOperationId=String(e.currentDocumentSessionOperationId)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.lastDocumentSessionId="",n.lastDocumentSessionOperationId="",n.currentDocumentSessionId="",n.currentDocumentSessionVersion=0,n.currentDocumentSessionOperationId=""),null!=e.lastDocumentSessionId&&e.hasOwnProperty("lastDocumentSessionId")&&(n.lastDocumentSessionId=e.lastDocumentSessionId),null!=e.lastDocumentSessionOperationId&&e.hasOwnProperty("lastDocumentSessionOperationId")&&(n.lastDocumentSessionOperationId=e.lastDocumentSessionOperationId),null!=e.currentDocumentSessionId&&e.hasOwnProperty("currentDocumentSessionId")&&(n.currentDocumentSessionId=e.currentDocumentSessionId),null!=e.currentDocumentSessionVersion&&e.hasOwnProperty("currentDocumentSessionVersion")&&(n.currentDocumentSessionVersion=e.currentDocumentSessionVersion),null!=e.currentDocumentSessionOperationId&&e.hasOwnProperty("currentDocumentSessionOperationId")&&(n.currentDocumentSessionOperationId=e.currentDocumentSessionOperationId),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/GetDocumentDetailsResponse"},o}(),s.CommentDescriptor=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.commentId="",o.prototype.commentThreadId="",o.prototype.userId="",o.prototype.content="",o.prototype.documentId="",o.prototype.createdAt="",o.prototype.attributes="",o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.commentId&&Object.hasOwnProperty.call(e,"commentId")&&t.uint32(10).string(e.commentId),null!=e.commentThreadId&&Object.hasOwnProperty.call(e,"commentThreadId")&&t.uint32(18).string(e.commentThreadId),null!=e.userId&&Object.hasOwnProperty.call(e,"userId")&&t.uint32(26).string(e.userId),null!=e.content&&Object.hasOwnProperty.call(e,"content")&&t.uint32(34).string(e.content),null!=e.documentId&&Object.hasOwnProperty.call(e,"documentId")&&t.uint32(42).string(e.documentId),null!=e.createdAt&&Object.hasOwnProperty.call(e,"createdAt")&&t.uint32(50).string(e.createdAt),null!=e.attributes&&Object.hasOwnProperty.call(e,"attributes")&&t.uint32(58).string(e.attributes),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.CommentDescriptor;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.commentId=e.string();break;case 2:o.commentThreadId=e.string();break;case 3:o.userId=e.string();break;case 4:o.content=e.string();break;case 5:o.documentId=e.string();break;case 6:o.createdAt=e.string();break;case 7:o.attributes=e.string();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.commentId&&e.hasOwnProperty("commentId")&&!r.isString(e.commentId)?"commentId: string expected":null!=e.commentThreadId&&e.hasOwnProperty("commentThreadId")&&!r.isString(e.commentThreadId)?"commentThreadId: string expected":null!=e.userId&&e.hasOwnProperty("userId")&&!r.isString(e.userId)?"userId: string expected":null!=e.content&&e.hasOwnProperty("content")&&!r.isString(e.content)?"content: string expected":null!=e.documentId&&e.hasOwnProperty("documentId")&&!r.isString(e.documentId)?"documentId: string expected":null!=e.createdAt&&e.hasOwnProperty("createdAt")&&!r.isString(e.createdAt)?"createdAt: string expected":null!=e.attributes&&e.hasOwnProperty("attributes")&&!r.isString(e.attributes)?"attributes: string expected":null},o.fromObject=function(e){if(e instanceof s.CommentDescriptor)return e;var t=new s.CommentDescriptor;return null!=e.commentId&&(t.commentId=String(e.commentId)),null!=e.commentThreadId&&(t.commentThreadId=String(e.commentThreadId)),null!=e.userId&&(t.userId=String(e.userId)),null!=e.content&&(t.content=String(e.content)),null!=e.documentId&&(t.documentId=String(e.documentId)),null!=e.createdAt&&(t.createdAt=String(e.createdAt)),null!=e.attributes&&(t.attributes=String(e.attributes)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.commentId="",n.commentThreadId="",n.userId="",n.content="",n.documentId="",n.createdAt="",n.attributes=""),null!=e.commentId&&e.hasOwnProperty("commentId")&&(n.commentId=e.commentId),null!=e.commentThreadId&&e.hasOwnProperty("commentThreadId")&&(n.commentThreadId=e.commentThreadId),null!=e.userId&&e.hasOwnProperty("userId")&&(n.userId=e.userId),null!=e.content&&e.hasOwnProperty("content")&&(n.content=e.content),null!=e.documentId&&e.hasOwnProperty("documentId")&&(n.documentId=e.documentId),null!=e.createdAt&&e.hasOwnProperty("createdAt")&&(n.createdAt=e.createdAt),null!=e.attributes&&e.hasOwnProperty("attributes")&&(n.attributes=e.attributes),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/CommentDescriptor"},o}(),s.CommentsThreadDescriptor=function(){function o(e){if(this.comments=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.commentThreadId="",o.prototype.comments=r.emptyArray,o.prototype.resolvedAt="",o.prototype.resolvedBy="",o.prototype.context="",o.prototype.createdAt="",o.prototype.deletedAt="",o.prototype.attributes="",o.prototype.unlinkedAt="",o.create=function(e){return new o(e)},o.encode=function(e,t){if(t||(t=n.create()),null!=e.commentThreadId&&Object.hasOwnProperty.call(e,"commentThreadId")&&t.uint32(10).string(e.commentThreadId),null!=e.comments&&e.comments.length)for(var r=0;r<e.comments.length;++r)s.CommentDescriptor.encode(e.comments[r],t.uint32(18).fork()).ldelim();return null!=e.resolvedAt&&Object.hasOwnProperty.call(e,"resolvedAt")&&t.uint32(26).string(e.resolvedAt),null!=e.resolvedBy&&Object.hasOwnProperty.call(e,"resolvedBy")&&t.uint32(34).string(e.resolvedBy),null!=e.context&&Object.hasOwnProperty.call(e,"context")&&t.uint32(42).string(e.context),null!=e.createdAt&&Object.hasOwnProperty.call(e,"createdAt")&&t.uint32(50).string(e.createdAt),null!=e.deletedAt&&Object.hasOwnProperty.call(e,"deletedAt")&&t.uint32(58).string(e.deletedAt),null!=e.attributes&&Object.hasOwnProperty.call(e,"attributes")&&t.uint32(66).string(e.attributes),null!=e.unlinkedAt&&Object.hasOwnProperty.call(e,"unlinkedAt")&&t.uint32(74).string(e.unlinkedAt),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.CommentsThreadDescriptor;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.commentThreadId=e.string();break;case 2:o.comments&&o.comments.length||(o.comments=[]),o.comments.push(s.CommentDescriptor.decode(e,e.uint32()));break;case 3:o.resolvedAt=e.string();break;case 4:o.resolvedBy=e.string();break;case 5:o.context=e.string();break;case 6:o.createdAt=e.string();break;case 7:o.deletedAt=e.string();break;case 8:o.attributes=e.string();break;case 9:o.unlinkedAt=e.string();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.commentThreadId&&e.hasOwnProperty("commentThreadId")&&!r.isString(e.commentThreadId))return"commentThreadId: string expected";if(null!=e.comments&&e.hasOwnProperty("comments")){if(!Array.isArray(e.comments))return"comments: array expected";for(var t=0;t<e.comments.length;++t){var n=s.CommentDescriptor.verify(e.comments[t]);if(n)return"comments."+n}}return null!=e.resolvedAt&&e.hasOwnProperty("resolvedAt")&&!r.isString(e.resolvedAt)?"resolvedAt: string expected":null!=e.resolvedBy&&e.hasOwnProperty("resolvedBy")&&!r.isString(e.resolvedBy)?"resolvedBy: string expected":null!=e.context&&e.hasOwnProperty("context")&&!r.isString(e.context)?"context: string expected":null!=e.createdAt&&e.hasOwnProperty("createdAt")&&!r.isString(e.createdAt)?"createdAt: string expected":null!=e.deletedAt&&e.hasOwnProperty("deletedAt")&&!r.isString(e.deletedAt)?"deletedAt: string expected":null!=e.attributes&&e.hasOwnProperty("attributes")&&!r.isString(e.attributes)?"attributes: string expected":null!=e.unlinkedAt&&e.hasOwnProperty("unlinkedAt")&&!r.isString(e.unlinkedAt)?"unlinkedAt: string expected":null},o.fromObject=function(e){if(e instanceof s.CommentsThreadDescriptor)return e;var t=new s.CommentsThreadDescriptor;if(null!=e.commentThreadId&&(t.commentThreadId=String(e.commentThreadId)),e.comments){if(!Array.isArray(e.comments))throw TypeError(".CommentsThreadDescriptor.comments: array expected");t.comments=[];for(var n=0;n<e.comments.length;++n){if("object"!=typeof e.comments[n])throw TypeError(".CommentsThreadDescriptor.comments: object expected");t.comments[n]=s.CommentDescriptor.fromObject(e.comments[n])}}return null!=e.resolvedAt&&(t.resolvedAt=String(e.resolvedAt)),null!=e.resolvedBy&&(t.resolvedBy=String(e.resolvedBy)),null!=e.context&&(t.context=String(e.context)),null!=e.createdAt&&(t.createdAt=String(e.createdAt)),null!=e.deletedAt&&(t.deletedAt=String(e.deletedAt)),null!=e.attributes&&(t.attributes=String(e.attributes)),null!=e.unlinkedAt&&(t.unlinkedAt=String(e.unlinkedAt)),t},o.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.comments=[]),t.defaults&&(n.commentThreadId="",n.resolvedAt="",n.resolvedBy="",n.context="",n.createdAt="",n.deletedAt="",n.attributes="",n.unlinkedAt=""),null!=e.commentThreadId&&e.hasOwnProperty("commentThreadId")&&(n.commentThreadId=e.commentThreadId),e.comments&&e.comments.length){n.comments=[];for(var r=0;r<e.comments.length;++r)n.comments[r]=s.CommentDescriptor.toObject(e.comments[r],t)}return null!=e.resolvedAt&&e.hasOwnProperty("resolvedAt")&&(n.resolvedAt=e.resolvedAt),null!=e.resolvedBy&&e.hasOwnProperty("resolvedBy")&&(n.resolvedBy=e.resolvedBy),null!=e.context&&e.hasOwnProperty("context")&&(n.context=e.context),null!=e.createdAt&&e.hasOwnProperty("createdAt")&&(n.createdAt=e.createdAt),null!=e.deletedAt&&e.hasOwnProperty("deletedAt")&&(n.deletedAt=e.deletedAt),null!=e.attributes&&e.hasOwnProperty("attributes")&&(n.attributes=e.attributes),null!=e.unlinkedAt&&e.hasOwnProperty("unlinkedAt")&&(n.unlinkedAt=e.unlinkedAt),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/CommentsThreadDescriptor"},o}(),s.CommentThreadAddedCommentDescriptor=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.commentId="",o.prototype.createdAt="",o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.commentId&&Object.hasOwnProperty.call(e,"commentId")&&t.uint32(10).string(e.commentId),null!=e.createdAt&&Object.hasOwnProperty.call(e,"createdAt")&&t.uint32(18).string(e.createdAt),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.CommentThreadAddedCommentDescriptor;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.commentId=e.string();break;case 2:o.createdAt=e.string();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.commentId&&e.hasOwnProperty("commentId")&&!r.isString(e.commentId)?"commentId: string expected":null!=e.createdAt&&e.hasOwnProperty("createdAt")&&!r.isString(e.createdAt)?"createdAt: string expected":null},o.fromObject=function(e){if(e instanceof s.CommentThreadAddedCommentDescriptor)return e;var t=new s.CommentThreadAddedCommentDescriptor;return null!=e.commentId&&(t.commentId=String(e.commentId)),null!=e.createdAt&&(t.createdAt=String(e.createdAt)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.commentId="",n.createdAt=""),null!=e.commentId&&e.hasOwnProperty("commentId")&&(n.commentId=e.commentId),null!=e.createdAt&&e.hasOwnProperty("createdAt")&&(n.createdAt=e.createdAt),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/CommentThreadAddedCommentDescriptor"},o}(),s.CommentsV2AddCommentMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.commentThreadId="",o.prototype.content="",o.prototype.documentId="",o.prototype.commentId="",o.prototype.createdAt="",o.prototype.userId="",o.prototype.attributes="",o.prototype.commentThread=null,o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.commentThreadId&&Object.hasOwnProperty.call(e,"commentThreadId")&&t.uint32(10).string(e.commentThreadId),null!=e.content&&Object.hasOwnProperty.call(e,"content")&&t.uint32(18).string(e.content),null!=e.documentId&&Object.hasOwnProperty.call(e,"documentId")&&t.uint32(26).string(e.documentId),null!=e.commentId&&Object.hasOwnProperty.call(e,"commentId")&&t.uint32(34).string(e.commentId),null!=e.createdAt&&Object.hasOwnProperty.call(e,"createdAt")&&t.uint32(42).string(e.createdAt),null!=e.userId&&Object.hasOwnProperty.call(e,"userId")&&t.uint32(50).string(e.userId),null!=e.attributes&&Object.hasOwnProperty.call(e,"attributes")&&t.uint32(58).string(e.attributes),null!=e.commentThread&&Object.hasOwnProperty.call(e,"commentThread")&&s.CommentsThreadDescriptor.encode(e.commentThread,t.uint32(66).fork()).ldelim(),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.CommentsV2AddCommentMessage;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.commentThreadId=e.string();break;case 2:o.content=e.string();break;case 3:o.documentId=e.string();break;case 4:o.commentId=e.string();break;case 5:o.createdAt=e.string();break;case 6:o.userId=e.string();break;case 7:o.attributes=e.string();break;case 8:o.commentThread=s.CommentsThreadDescriptor.decode(e,e.uint32());break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.commentThreadId&&e.hasOwnProperty("commentThreadId")&&!r.isString(e.commentThreadId))return"commentThreadId: string expected";if(null!=e.content&&e.hasOwnProperty("content")&&!r.isString(e.content))return"content: string expected";if(null!=e.documentId&&e.hasOwnProperty("documentId")&&!r.isString(e.documentId))return"documentId: string expected";if(null!=e.commentId&&e.hasOwnProperty("commentId")&&!r.isString(e.commentId))return"commentId: string expected";if(null!=e.createdAt&&e.hasOwnProperty("createdAt")&&!r.isString(e.createdAt))return"createdAt: string expected";if(null!=e.userId&&e.hasOwnProperty("userId")&&!r.isString(e.userId))return"userId: string expected";if(null!=e.attributes&&e.hasOwnProperty("attributes")&&!r.isString(e.attributes))return"attributes: string expected";if(null!=e.commentThread&&e.hasOwnProperty("commentThread")){var t=s.CommentsThreadDescriptor.verify(e.commentThread);if(t)return"commentThread."+t}return null},o.fromObject=function(e){if(e instanceof s.CommentsV2AddCommentMessage)return e;var t=new s.CommentsV2AddCommentMessage;if(null!=e.commentThreadId&&(t.commentThreadId=String(e.commentThreadId)),null!=e.content&&(t.content=String(e.content)),null!=e.documentId&&(t.documentId=String(e.documentId)),null!=e.commentId&&(t.commentId=String(e.commentId)),null!=e.createdAt&&(t.createdAt=String(e.createdAt)),null!=e.userId&&(t.userId=String(e.userId)),null!=e.attributes&&(t.attributes=String(e.attributes)),null!=e.commentThread){if("object"!=typeof e.commentThread)throw TypeError(".CommentsV2AddCommentMessage.commentThread: object expected");t.commentThread=s.CommentsThreadDescriptor.fromObject(e.commentThread)}return t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.commentThreadId="",n.content="",n.documentId="",n.commentId="",n.createdAt="",n.userId="",n.attributes="",n.commentThread=null),null!=e.commentThreadId&&e.hasOwnProperty("commentThreadId")&&(n.commentThreadId=e.commentThreadId),null!=e.content&&e.hasOwnProperty("content")&&(n.content=e.content),null!=e.documentId&&e.hasOwnProperty("documentId")&&(n.documentId=e.documentId),null!=e.commentId&&e.hasOwnProperty("commentId")&&(n.commentId=e.commentId),null!=e.createdAt&&e.hasOwnProperty("createdAt")&&(n.createdAt=e.createdAt),null!=e.userId&&e.hasOwnProperty("userId")&&(n.userId=e.userId),null!=e.attributes&&e.hasOwnProperty("attributes")&&(n.attributes=e.attributes),null!=e.commentThread&&e.hasOwnProperty("commentThread")&&(n.commentThread=s.CommentsThreadDescriptor.toObject(e.commentThread,t)),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/CommentsV2AddCommentMessage"},o}(),s.CommentsV2AddCommentThreadMessage=function(){function o(e){if(this.comments=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.documentId="",o.prototype.commentThreadId="",o.prototype.context="",o.prototype.createdAt="",o.prototype.resolvedAt="",o.prototype.resolvedBy="",o.prototype.attributes="",o.prototype.deletedAt="",o.prototype.comments=r.emptyArray,o.create=function(e){return new o(e)},o.encode=function(e,t){if(t||(t=n.create()),null!=e.documentId&&Object.hasOwnProperty.call(e,"documentId")&&t.uint32(10).string(e.documentId),null!=e.commentThreadId&&Object.hasOwnProperty.call(e,"commentThreadId")&&t.uint32(18).string(e.commentThreadId),null!=e.context&&Object.hasOwnProperty.call(e,"context")&&t.uint32(26).string(e.context),null!=e.createdAt&&Object.hasOwnProperty.call(e,"createdAt")&&t.uint32(34).string(e.createdAt),null!=e.resolvedAt&&Object.hasOwnProperty.call(e,"resolvedAt")&&t.uint32(42).string(e.resolvedAt),null!=e.resolvedBy&&Object.hasOwnProperty.call(e,"resolvedBy")&&t.uint32(50).string(e.resolvedBy),null!=e.attributes&&Object.hasOwnProperty.call(e,"attributes")&&t.uint32(58).string(e.attributes),null!=e.deletedAt&&Object.hasOwnProperty.call(e,"deletedAt")&&t.uint32(66).string(e.deletedAt),null!=e.comments&&e.comments.length)for(var r=0;r<e.comments.length;++r)s.CommentDescriptor.encode(e.comments[r],t.uint32(74).fork()).ldelim();return t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.CommentsV2AddCommentThreadMessage;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.documentId=e.string();break;case 2:o.commentThreadId=e.string();break;case 3:o.context=e.string();break;case 4:o.createdAt=e.string();break;case 5:o.resolvedAt=e.string();break;case 6:o.resolvedBy=e.string();break;case 7:o.attributes=e.string();break;case 8:o.deletedAt=e.string();break;case 9:o.comments&&o.comments.length||(o.comments=[]),o.comments.push(s.CommentDescriptor.decode(e,e.uint32()));break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.documentId&&e.hasOwnProperty("documentId")&&!r.isString(e.documentId))return"documentId: string expected";if(null!=e.commentThreadId&&e.hasOwnProperty("commentThreadId")&&!r.isString(e.commentThreadId))return"commentThreadId: string expected";if(null!=e.context&&e.hasOwnProperty("context")&&!r.isString(e.context))return"context: string expected";if(null!=e.createdAt&&e.hasOwnProperty("createdAt")&&!r.isString(e.createdAt))return"createdAt: string expected";if(null!=e.resolvedAt&&e.hasOwnProperty("resolvedAt")&&!r.isString(e.resolvedAt))return"resolvedAt: string expected";if(null!=e.resolvedBy&&e.hasOwnProperty("resolvedBy")&&!r.isString(e.resolvedBy))return"resolvedBy: string expected";if(null!=e.attributes&&e.hasOwnProperty("attributes")&&!r.isString(e.attributes))return"attributes: string expected";if(null!=e.deletedAt&&e.hasOwnProperty("deletedAt")&&!r.isString(e.deletedAt))return"deletedAt: string expected";if(null!=e.comments&&e.hasOwnProperty("comments")){if(!Array.isArray(e.comments))return"comments: array expected";for(var t=0;t<e.comments.length;++t){var n=s.CommentDescriptor.verify(e.comments[t]);if(n)return"comments."+n}}return null},o.fromObject=function(e){if(e instanceof s.CommentsV2AddCommentThreadMessage)return e;var t=new s.CommentsV2AddCommentThreadMessage;if(null!=e.documentId&&(t.documentId=String(e.documentId)),null!=e.commentThreadId&&(t.commentThreadId=String(e.commentThreadId)),null!=e.context&&(t.context=String(e.context)),null!=e.createdAt&&(t.createdAt=String(e.createdAt)),null!=e.resolvedAt&&(t.resolvedAt=String(e.resolvedAt)),null!=e.resolvedBy&&(t.resolvedBy=String(e.resolvedBy)),null!=e.attributes&&(t.attributes=String(e.attributes)),null!=e.deletedAt&&(t.deletedAt=String(e.deletedAt)),e.comments){if(!Array.isArray(e.comments))throw TypeError(".CommentsV2AddCommentThreadMessage.comments: array expected");t.comments=[];for(var n=0;n<e.comments.length;++n){if("object"!=typeof e.comments[n])throw TypeError(".CommentsV2AddCommentThreadMessage.comments: object expected");t.comments[n]=s.CommentDescriptor.fromObject(e.comments[n])}}return t},o.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.comments=[]),t.defaults&&(n.documentId="",n.commentThreadId="",n.context="",n.createdAt="",n.resolvedAt="",n.resolvedBy="",n.attributes="",n.deletedAt=""),null!=e.documentId&&e.hasOwnProperty("documentId")&&(n.documentId=e.documentId),null!=e.commentThreadId&&e.hasOwnProperty("commentThreadId")&&(n.commentThreadId=e.commentThreadId),null!=e.context&&e.hasOwnProperty("context")&&(n.context=e.context),null!=e.createdAt&&e.hasOwnProperty("createdAt")&&(n.createdAt=e.createdAt),null!=e.resolvedAt&&e.hasOwnProperty("resolvedAt")&&(n.resolvedAt=e.resolvedAt),null!=e.resolvedBy&&e.hasOwnProperty("resolvedBy")&&(n.resolvedBy=e.resolvedBy),null!=e.attributes&&e.hasOwnProperty("attributes")&&(n.attributes=e.attributes),null!=e.deletedAt&&e.hasOwnProperty("deletedAt")&&(n.deletedAt=e.deletedAt),e.comments&&e.comments.length){n.comments=[];for(var r=0;r<e.comments.length;++r)n.comments[r]=s.CommentDescriptor.toObject(e.comments[r],t)}return n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/CommentsV2AddCommentThreadMessage"},o}(),s.CommentsV2ReopenCommentThreadMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.commentThreadId="",o.prototype.documentId="",o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.commentThreadId&&Object.hasOwnProperty.call(e,"commentThreadId")&&t.uint32(10).string(e.commentThreadId),null!=e.documentId&&Object.hasOwnProperty.call(e,"documentId")&&t.uint32(18).string(e.documentId),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.CommentsV2ReopenCommentThreadMessage;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.commentThreadId=e.string();break;case 2:o.documentId=e.string();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.commentThreadId&&e.hasOwnProperty("commentThreadId")&&!r.isString(e.commentThreadId)?"commentThreadId: string expected":null!=e.documentId&&e.hasOwnProperty("documentId")&&!r.isString(e.documentId)?"documentId: string expected":null},o.fromObject=function(e){if(e instanceof s.CommentsV2ReopenCommentThreadMessage)return e;var t=new s.CommentsV2ReopenCommentThreadMessage;return null!=e.commentThreadId&&(t.commentThreadId=String(e.commentThreadId)),null!=e.documentId&&(t.documentId=String(e.documentId)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.commentThreadId="",n.documentId=""),null!=e.commentThreadId&&e.hasOwnProperty("commentThreadId")&&(n.commentThreadId=e.commentThreadId),null!=e.documentId&&e.hasOwnProperty("documentId")&&(n.documentId=e.documentId),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/CommentsV2ReopenCommentThreadMessage"},o}(),s.CommentsV2ResolveCommentThreadMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.commentThreadId="",o.prototype.documentId="",o.prototype.resolvedBy="",o.prototype.resolvedAt="",o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.commentThreadId&&Object.hasOwnProperty.call(e,"commentThreadId")&&t.uint32(10).string(e.commentThreadId),null!=e.documentId&&Object.hasOwnProperty.call(e,"documentId")&&t.uint32(18).string(e.documentId),null!=e.resolvedBy&&Object.hasOwnProperty.call(e,"resolvedBy")&&t.uint32(26).string(e.resolvedBy),null!=e.resolvedAt&&Object.hasOwnProperty.call(e,"resolvedAt")&&t.uint32(34).string(e.resolvedAt),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.CommentsV2ResolveCommentThreadMessage;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.commentThreadId=e.string();break;case 2:o.documentId=e.string();break;case 3:o.resolvedBy=e.string();break;case 4:o.resolvedAt=e.string();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.commentThreadId&&e.hasOwnProperty("commentThreadId")&&!r.isString(e.commentThreadId)?"commentThreadId: string expected":null!=e.documentId&&e.hasOwnProperty("documentId")&&!r.isString(e.documentId)?"documentId: string expected":null!=e.resolvedBy&&e.hasOwnProperty("resolvedBy")&&!r.isString(e.resolvedBy)?"resolvedBy: string expected":null!=e.resolvedAt&&e.hasOwnProperty("resolvedAt")&&!r.isString(e.resolvedAt)?"resolvedAt: string expected":null},o.fromObject=function(e){if(e instanceof s.CommentsV2ResolveCommentThreadMessage)return e;var t=new s.CommentsV2ResolveCommentThreadMessage;return null!=e.commentThreadId&&(t.commentThreadId=String(e.commentThreadId)),null!=e.documentId&&(t.documentId=String(e.documentId)),null!=e.resolvedBy&&(t.resolvedBy=String(e.resolvedBy)),null!=e.resolvedAt&&(t.resolvedAt=String(e.resolvedAt)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.commentThreadId="",n.documentId="",n.resolvedBy="",n.resolvedAt=""),null!=e.commentThreadId&&e.hasOwnProperty("commentThreadId")&&(n.commentThreadId=e.commentThreadId),null!=e.documentId&&e.hasOwnProperty("documentId")&&(n.documentId=e.documentId),null!=e.resolvedBy&&e.hasOwnProperty("resolvedBy")&&(n.resolvedBy=e.resolvedBy),null!=e.resolvedAt&&e.hasOwnProperty("resolvedAt")&&(n.resolvedAt=e.resolvedAt),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/CommentsV2ResolveCommentThreadMessage"},o}(),s.CommentsV2UpdateCommentThreadMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.commentThreadId="",o.prototype.documentId="",o.prototype.context="",o.prototype.attributes="",o.prototype.unlinkedAt="",o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.commentThreadId&&Object.hasOwnProperty.call(e,"commentThreadId")&&t.uint32(10).string(e.commentThreadId),null!=e.documentId&&Object.hasOwnProperty.call(e,"documentId")&&t.uint32(18).string(e.documentId),null!=e.context&&Object.hasOwnProperty.call(e,"context")&&t.uint32(26).string(e.context),null!=e.attributes&&Object.hasOwnProperty.call(e,"attributes")&&t.uint32(34).string(e.attributes),null!=e.unlinkedAt&&Object.hasOwnProperty.call(e,"unlinkedAt")&&t.uint32(42).string(e.unlinkedAt),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.CommentsV2UpdateCommentThreadMessage;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.commentThreadId=e.string();break;case 2:o.documentId=e.string();break;case 3:o.context=e.string();break;case 4:o.attributes=e.string();break;case 5:o.unlinkedAt=e.string();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.commentThreadId&&e.hasOwnProperty("commentThreadId")&&!r.isString(e.commentThreadId)?"commentThreadId: string expected":null!=e.documentId&&e.hasOwnProperty("documentId")&&!r.isString(e.documentId)?"documentId: string expected":null!=e.context&&e.hasOwnProperty("context")&&!r.isString(e.context)?"context: string expected":null!=e.attributes&&e.hasOwnProperty("attributes")&&!r.isString(e.attributes)?"attributes: string expected":null!=e.unlinkedAt&&e.hasOwnProperty("unlinkedAt")&&!r.isString(e.unlinkedAt)?"unlinkedAt: string expected":null},o.fromObject=function(e){if(e instanceof s.CommentsV2UpdateCommentThreadMessage)return e;var t=new s.CommentsV2UpdateCommentThreadMessage;return null!=e.commentThreadId&&(t.commentThreadId=String(e.commentThreadId)),null!=e.documentId&&(t.documentId=String(e.documentId)),null!=e.context&&(t.context=String(e.context)),null!=e.attributes&&(t.attributes=String(e.attributes)),null!=e.unlinkedAt&&(t.unlinkedAt=String(e.unlinkedAt)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.commentThreadId="",n.documentId="",n.context="",n.attributes="",n.unlinkedAt=""),null!=e.commentThreadId&&e.hasOwnProperty("commentThreadId")&&(n.commentThreadId=e.commentThreadId),null!=e.documentId&&e.hasOwnProperty("documentId")&&(n.documentId=e.documentId),null!=e.context&&e.hasOwnProperty("context")&&(n.context=e.context),null!=e.attributes&&e.hasOwnProperty("attributes")&&(n.attributes=e.attributes),null!=e.unlinkedAt&&e.hasOwnProperty("unlinkedAt")&&(n.unlinkedAt=e.unlinkedAt),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/CommentsV2UpdateCommentThreadMessage"},o}(),s.CommentsV2ConnectMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.documentId="",o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.documentId&&Object.hasOwnProperty.call(e,"documentId")&&t.uint32(10).string(e.documentId),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.CommentsV2ConnectMessage;e.pos<r;){var i=e.uint32();i>>>3==1?o.documentId=e.string():e.skipType(7&i)}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.documentId&&e.hasOwnProperty("documentId")&&!r.isString(e.documentId)?"documentId: string expected":null},o.fromObject=function(e){if(e instanceof s.CommentsV2ConnectMessage)return e;var t=new s.CommentsV2ConnectMessage;return null!=e.documentId&&(t.documentId=String(e.documentId)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.documentId=""),null!=e.documentId&&e.hasOwnProperty("documentId")&&(n.documentId=e.documentId),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/CommentsV2ConnectMessage"},o}(),s.CommentsV2GetCommentThreadMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.commentThreadId="",o.prototype.documentId="",o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.commentThreadId&&Object.hasOwnProperty.call(e,"commentThreadId")&&t.uint32(10).string(e.commentThreadId),null!=e.documentId&&Object.hasOwnProperty.call(e,"documentId")&&t.uint32(18).string(e.documentId),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.CommentsV2GetCommentThreadMessage;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.commentThreadId=e.string();break;case 2:o.documentId=e.string();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.commentThreadId&&e.hasOwnProperty("commentThreadId")&&!r.isString(e.commentThreadId)?"commentThreadId: string expected":null!=e.documentId&&e.hasOwnProperty("documentId")&&!r.isString(e.documentId)?"documentId: string expected":null},o.fromObject=function(e){if(e instanceof s.CommentsV2GetCommentThreadMessage)return e;var t=new s.CommentsV2GetCommentThreadMessage;return null!=e.commentThreadId&&(t.commentThreadId=String(e.commentThreadId)),null!=e.documentId&&(t.documentId=String(e.documentId)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.commentThreadId="",n.documentId=""),null!=e.commentThreadId&&e.hasOwnProperty("commentThreadId")&&(n.commentThreadId=e.commentThreadId),null!=e.documentId&&e.hasOwnProperty("documentId")&&(n.documentId=e.documentId),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/CommentsV2GetCommentThreadMessage"},o}(),s.CommentsV2GetDocumentThreadsMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.documentId="",o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.documentId&&Object.hasOwnProperty.call(e,"documentId")&&t.uint32(10).string(e.documentId),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.CommentsV2GetDocumentThreadsMessage;e.pos<r;){var i=e.uint32();i>>>3==1?o.documentId=e.string():e.skipType(7&i)}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.documentId&&e.hasOwnProperty("documentId")&&!r.isString(e.documentId)?"documentId: string expected":null},o.fromObject=function(e){if(e instanceof s.CommentsV2GetDocumentThreadsMessage)return e;var t=new s.CommentsV2GetDocumentThreadsMessage;return null!=e.documentId&&(t.documentId=String(e.documentId)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.documentId=""),null!=e.documentId&&e.hasOwnProperty("documentId")&&(n.documentId=e.documentId),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/CommentsV2GetDocumentThreadsMessage"},o}(),s.CommentsV2RemoveCommentMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.commentThreadId="",o.prototype.commentId="",o.prototype.documentId="",o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.commentThreadId&&Object.hasOwnProperty.call(e,"commentThreadId")&&t.uint32(10).string(e.commentThreadId),null!=e.commentId&&Object.hasOwnProperty.call(e,"commentId")&&t.uint32(18).string(e.commentId),null!=e.documentId&&Object.hasOwnProperty.call(e,"documentId")&&t.uint32(26).string(e.documentId),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.CommentsV2RemoveCommentMessage;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.commentThreadId=e.string();break;case 2:o.commentId=e.string();break;case 3:o.documentId=e.string();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.commentThreadId&&e.hasOwnProperty("commentThreadId")&&!r.isString(e.commentThreadId)?"commentThreadId: string expected":null!=e.commentId&&e.hasOwnProperty("commentId")&&!r.isString(e.commentId)?"commentId: string expected":null!=e.documentId&&e.hasOwnProperty("documentId")&&!r.isString(e.documentId)?"documentId: string expected":null},o.fromObject=function(e){if(e instanceof s.CommentsV2RemoveCommentMessage)return e;var t=new s.CommentsV2RemoveCommentMessage;return null!=e.commentThreadId&&(t.commentThreadId=String(e.commentThreadId)),null!=e.commentId&&(t.commentId=String(e.commentId)),null!=e.documentId&&(t.documentId=String(e.documentId)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.commentThreadId="",n.commentId="",n.documentId=""),null!=e.commentThreadId&&e.hasOwnProperty("commentThreadId")&&(n.commentThreadId=e.commentThreadId),null!=e.commentId&&e.hasOwnProperty("commentId")&&(n.commentId=e.commentId),null!=e.documentId&&e.hasOwnProperty("documentId")&&(n.documentId=e.documentId),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/CommentsV2RemoveCommentMessage"},o}(),s.CommentsV2RemoveCommentThreadMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.commentThreadId="",o.prototype.documentId="",o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.commentThreadId&&Object.hasOwnProperty.call(e,"commentThreadId")&&t.uint32(10).string(e.commentThreadId),null!=e.documentId&&Object.hasOwnProperty.call(e,"documentId")&&t.uint32(18).string(e.documentId),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.CommentsV2RemoveCommentThreadMessage;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.commentThreadId=e.string();break;case 2:o.documentId=e.string();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.commentThreadId&&e.hasOwnProperty("commentThreadId")&&!r.isString(e.commentThreadId)?"commentThreadId: string expected":null!=e.documentId&&e.hasOwnProperty("documentId")&&!r.isString(e.documentId)?"documentId: string expected":null},o.fromObject=function(e){if(e instanceof s.CommentsV2RemoveCommentThreadMessage)return e;var t=new s.CommentsV2RemoveCommentThreadMessage;return null!=e.commentThreadId&&(t.commentThreadId=String(e.commentThreadId)),null!=e.documentId&&(t.documentId=String(e.documentId)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.commentThreadId="",n.documentId=""),null!=e.commentThreadId&&e.hasOwnProperty("commentThreadId")&&(n.commentThreadId=e.commentThreadId),null!=e.documentId&&e.hasOwnProperty("documentId")&&(n.documentId=e.documentId),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/CommentsV2RemoveCommentThreadMessage"},o}(),s.CommentsV2UpdateCommentMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.commentThreadId="",o.prototype.commentId="",o.prototype.content="",o.prototype.documentId="",o.prototype.attributes="",o.prototype.isAttributesUpdated=!1,o.prototype.commentThread=null,o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.commentThreadId&&Object.hasOwnProperty.call(e,"commentThreadId")&&t.uint32(10).string(e.commentThreadId),null!=e.commentId&&Object.hasOwnProperty.call(e,"commentId")&&t.uint32(18).string(e.commentId),null!=e.content&&Object.hasOwnProperty.call(e,"content")&&t.uint32(26).string(e.content),null!=e.documentId&&Object.hasOwnProperty.call(e,"documentId")&&t.uint32(34).string(e.documentId),null!=e.attributes&&Object.hasOwnProperty.call(e,"attributes")&&t.uint32(42).string(e.attributes),null!=e.isAttributesUpdated&&Object.hasOwnProperty.call(e,"isAttributesUpdated")&&t.uint32(48).bool(e.isAttributesUpdated),null!=e.commentThread&&Object.hasOwnProperty.call(e,"commentThread")&&s.CommentsThreadDescriptor.encode(e.commentThread,t.uint32(58).fork()).ldelim(),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.CommentsV2UpdateCommentMessage;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.commentThreadId=e.string();break;case 2:o.commentId=e.string();break;case 3:o.content=e.string();break;case 4:o.documentId=e.string();break;case 5:o.attributes=e.string();break;case 6:o.isAttributesUpdated=e.bool();break;case 7:o.commentThread=s.CommentsThreadDescriptor.decode(e,e.uint32());break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.commentThreadId&&e.hasOwnProperty("commentThreadId")&&!r.isString(e.commentThreadId))return"commentThreadId: string expected";if(null!=e.commentId&&e.hasOwnProperty("commentId")&&!r.isString(e.commentId))return"commentId: string expected";if(null!=e.content&&e.hasOwnProperty("content")&&!r.isString(e.content))return"content: string expected";if(null!=e.documentId&&e.hasOwnProperty("documentId")&&!r.isString(e.documentId))return"documentId: string expected";if(null!=e.attributes&&e.hasOwnProperty("attributes")&&!r.isString(e.attributes))return"attributes: string expected";if(null!=e.isAttributesUpdated&&e.hasOwnProperty("isAttributesUpdated")&&"boolean"!=typeof e.isAttributesUpdated)return"isAttributesUpdated: boolean expected";if(null!=e.commentThread&&e.hasOwnProperty("commentThread")){var t=s.CommentsThreadDescriptor.verify(e.commentThread);if(t)return"commentThread."+t}return null},o.fromObject=function(e){if(e instanceof s.CommentsV2UpdateCommentMessage)return e;var t=new s.CommentsV2UpdateCommentMessage;if(null!=e.commentThreadId&&(t.commentThreadId=String(e.commentThreadId)),null!=e.commentId&&(t.commentId=String(e.commentId)),null!=e.content&&(t.content=String(e.content)),null!=e.documentId&&(t.documentId=String(e.documentId)),null!=e.attributes&&(t.attributes=String(e.attributes)),null!=e.isAttributesUpdated&&(t.isAttributesUpdated=Boolean(e.isAttributesUpdated)),null!=e.commentThread){if("object"!=typeof e.commentThread)throw TypeError(".CommentsV2UpdateCommentMessage.commentThread: object expected");t.commentThread=s.CommentsThreadDescriptor.fromObject(e.commentThread)}return t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.commentThreadId="",n.commentId="",n.content="",n.documentId="",n.attributes="",n.isAttributesUpdated=!1,n.commentThread=null),null!=e.commentThreadId&&e.hasOwnProperty("commentThreadId")&&(n.commentThreadId=e.commentThreadId),null!=e.commentId&&e.hasOwnProperty("commentId")&&(n.commentId=e.commentId),null!=e.content&&e.hasOwnProperty("content")&&(n.content=e.content),null!=e.documentId&&e.hasOwnProperty("documentId")&&(n.documentId=e.documentId),null!=e.attributes&&e.hasOwnProperty("attributes")&&(n.attributes=e.attributes),null!=e.isAttributesUpdated&&e.hasOwnProperty("isAttributesUpdated")&&(n.isAttributesUpdated=e.isAttributesUpdated),null!=e.commentThread&&e.hasOwnProperty("commentThread")&&(n.commentThread=s.CommentsThreadDescriptor.toObject(e.commentThread,t)),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/CommentsV2UpdateCommentMessage"},o}(),s.CommentsV2AddCommentResponse=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.commentThreadId="",o.prototype.commentId="",o.prototype.createdAt="",o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.commentThreadId&&Object.hasOwnProperty.call(e,"commentThreadId")&&t.uint32(10).string(e.commentThreadId),null!=e.commentId&&Object.hasOwnProperty.call(e,"commentId")&&t.uint32(18).string(e.commentId),null!=e.createdAt&&Object.hasOwnProperty.call(e,"createdAt")&&t.uint32(26).string(e.createdAt),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.CommentsV2AddCommentResponse;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.commentThreadId=e.string();break;case 2:o.commentId=e.string();break;case 3:o.createdAt=e.string();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.commentThreadId&&e.hasOwnProperty("commentThreadId")&&!r.isString(e.commentThreadId)?"commentThreadId: string expected":null!=e.commentId&&e.hasOwnProperty("commentId")&&!r.isString(e.commentId)?"commentId: string expected":null!=e.createdAt&&e.hasOwnProperty("createdAt")&&!r.isString(e.createdAt)?"createdAt: string expected":null},o.fromObject=function(e){if(e instanceof s.CommentsV2AddCommentResponse)return e;var t=new s.CommentsV2AddCommentResponse;return null!=e.commentThreadId&&(t.commentThreadId=String(e.commentThreadId)),null!=e.commentId&&(t.commentId=String(e.commentId)),null!=e.createdAt&&(t.createdAt=String(e.createdAt)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.commentThreadId="",n.commentId="",n.createdAt=""),null!=e.commentThreadId&&e.hasOwnProperty("commentThreadId")&&(n.commentThreadId=e.commentThreadId),null!=e.commentId&&e.hasOwnProperty("commentId")&&(n.commentId=e.commentId),null!=e.createdAt&&e.hasOwnProperty("createdAt")&&(n.createdAt=e.createdAt),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/CommentsV2AddCommentResponse"},o}(),s.CommentsV2AddCommentThreadResponse=function(){function o(e){if(this.comments=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.commentThreadId="",o.prototype.createdAt="",o.prototype.comments=r.emptyArray,o.create=function(e){return new o(e)},o.encode=function(e,t){if(t||(t=n.create()),null!=e.commentThreadId&&Object.hasOwnProperty.call(e,"commentThreadId")&&t.uint32(10).string(e.commentThreadId),null!=e.createdAt&&Object.hasOwnProperty.call(e,"createdAt")&&t.uint32(18).string(e.createdAt),null!=e.comments&&e.comments.length)for(var r=0;r<e.comments.length;++r)s.CommentThreadAddedCommentDescriptor.encode(e.comments[r],t.uint32(26).fork()).ldelim();return t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.CommentsV2AddCommentThreadResponse;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.commentThreadId=e.string();break;case 2:o.createdAt=e.string();break;case 3:o.comments&&o.comments.length||(o.comments=[]),o.comments.push(s.CommentThreadAddedCommentDescriptor.decode(e,e.uint32()));break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.commentThreadId&&e.hasOwnProperty("commentThreadId")&&!r.isString(e.commentThreadId))return"commentThreadId: string expected";if(null!=e.createdAt&&e.hasOwnProperty("createdAt")&&!r.isString(e.createdAt))return"createdAt: string expected";if(null!=e.comments&&e.hasOwnProperty("comments")){if(!Array.isArray(e.comments))return"comments: array expected";for(var t=0;t<e.comments.length;++t){var n=s.CommentThreadAddedCommentDescriptor.verify(e.comments[t]);if(n)return"comments."+n}}return null},o.fromObject=function(e){if(e instanceof s.CommentsV2AddCommentThreadResponse)return e;var t=new s.CommentsV2AddCommentThreadResponse;if(null!=e.commentThreadId&&(t.commentThreadId=String(e.commentThreadId)),null!=e.createdAt&&(t.createdAt=String(e.createdAt)),e.comments){if(!Array.isArray(e.comments))throw TypeError(".CommentsV2AddCommentThreadResponse.comments: array expected");t.comments=[];for(var n=0;n<e.comments.length;++n){if("object"!=typeof e.comments[n])throw TypeError(".CommentsV2AddCommentThreadResponse.comments: object expected");t.comments[n]=s.CommentThreadAddedCommentDescriptor.fromObject(e.comments[n])}}return t},o.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.comments=[]),t.defaults&&(n.commentThreadId="",n.createdAt=""),null!=e.commentThreadId&&e.hasOwnProperty("commentThreadId")&&(n.commentThreadId=e.commentThreadId),null!=e.createdAt&&e.hasOwnProperty("createdAt")&&(n.createdAt=e.createdAt),e.comments&&e.comments.length){n.comments=[];for(var r=0;r<e.comments.length;++r)n.comments[r]=s.CommentThreadAddedCommentDescriptor.toObject(e.comments[r],t)}return n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/CommentsV2AddCommentThreadResponse"},o}(),s.CommentsV2ResolveCommentThreadResponse=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.commentThreadId="",o.prototype.documentId="",o.prototype.resolvedAt="",o.prototype.resolvedBy="",o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.commentThreadId&&Object.hasOwnProperty.call(e,"commentThreadId")&&t.uint32(10).string(e.commentThreadId),null!=e.documentId&&Object.hasOwnProperty.call(e,"documentId")&&t.uint32(18).string(e.documentId),null!=e.resolvedAt&&Object.hasOwnProperty.call(e,"resolvedAt")&&t.uint32(26).string(e.resolvedAt),null!=e.resolvedBy&&Object.hasOwnProperty.call(e,"resolvedBy")&&t.uint32(34).string(e.resolvedBy),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.CommentsV2ResolveCommentThreadResponse;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.commentThreadId=e.string();break;case 2:o.documentId=e.string();break;case 3:o.resolvedAt=e.string();break;case 4:o.resolvedBy=e.string();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.commentThreadId&&e.hasOwnProperty("commentThreadId")&&!r.isString(e.commentThreadId)?"commentThreadId: string expected":null!=e.documentId&&e.hasOwnProperty("documentId")&&!r.isString(e.documentId)?"documentId: string expected":null!=e.resolvedAt&&e.hasOwnProperty("resolvedAt")&&!r.isString(e.resolvedAt)?"resolvedAt: string expected":null!=e.resolvedBy&&e.hasOwnProperty("resolvedBy")&&!r.isString(e.resolvedBy)?"resolvedBy: string expected":null},o.fromObject=function(e){if(e instanceof s.CommentsV2ResolveCommentThreadResponse)return e;var t=new s.CommentsV2ResolveCommentThreadResponse;return null!=e.commentThreadId&&(t.commentThreadId=String(e.commentThreadId)),null!=e.documentId&&(t.documentId=String(e.documentId)),null!=e.resolvedAt&&(t.resolvedAt=String(e.resolvedAt)),null!=e.resolvedBy&&(t.resolvedBy=String(e.resolvedBy)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.commentThreadId="",n.documentId="",n.resolvedAt="",n.resolvedBy=""),null!=e.commentThreadId&&e.hasOwnProperty("commentThreadId")&&(n.commentThreadId=e.commentThreadId),null!=e.documentId&&e.hasOwnProperty("documentId")&&(n.documentId=e.documentId),null!=e.resolvedAt&&e.hasOwnProperty("resolvedAt")&&(n.resolvedAt=e.resolvedAt),null!=e.resolvedBy&&e.hasOwnProperty("resolvedBy")&&(n.resolvedBy=e.resolvedBy),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/CommentsV2ResolveCommentThreadResponse"},o}(),s.CommentsV2ConnectResponse=function(){function o(e){if(this.threads=[],this.threadsV2=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.channel="",o.prototype.threads=r.emptyArray,o.prototype.threadsV2=r.emptyArray,o.create=function(e){return new o(e)},o.encode=function(e,t){if(t||(t=n.create()),null!=e.channel&&Object.hasOwnProperty.call(e,"channel")&&t.uint32(10).string(e.channel),null!=e.threads&&e.threads.length)for(var r=0;r<e.threads.length;++r)t.uint32(18).string(e.threads[r]);if(null!=e.threadsV2&&e.threadsV2.length)for(r=0;r<e.threadsV2.length;++r)s.CommentsThreadDescriptor.encode(e.threadsV2[r],t.uint32(26).fork()).ldelim();return t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.CommentsV2ConnectResponse;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.channel=e.string();break;case 2:o.threads&&o.threads.length||(o.threads=[]),o.threads.push(e.string());break;case 3:o.threadsV2&&o.threadsV2.length||(o.threadsV2=[]),o.threadsV2.push(s.CommentsThreadDescriptor.decode(e,e.uint32()));break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.channel&&e.hasOwnProperty("channel")&&!r.isString(e.channel))return"channel: string expected";if(null!=e.threads&&e.hasOwnProperty("threads")){if(!Array.isArray(e.threads))return"threads: array expected";for(var t=0;t<e.threads.length;++t)if(!r.isString(e.threads[t]))return"threads: string[] expected"}if(null!=e.threadsV2&&e.hasOwnProperty("threadsV2")){if(!Array.isArray(e.threadsV2))return"threadsV2: array expected";for(t=0;t<e.threadsV2.length;++t){var n=s.CommentsThreadDescriptor.verify(e.threadsV2[t]);if(n)return"threadsV2."+n}}return null},o.fromObject=function(e){if(e instanceof s.CommentsV2ConnectResponse)return e;var t=new s.CommentsV2ConnectResponse;if(null!=e.channel&&(t.channel=String(e.channel)),e.threads){if(!Array.isArray(e.threads))throw TypeError(".CommentsV2ConnectResponse.threads: array expected");t.threads=[];for(var n=0;n<e.threads.length;++n)t.threads[n]=String(e.threads[n])}if(e.threadsV2){if(!Array.isArray(e.threadsV2))throw TypeError(".CommentsV2ConnectResponse.threadsV2: array expected");for(t.threadsV2=[],n=0;n<e.threadsV2.length;++n){if("object"!=typeof e.threadsV2[n])throw TypeError(".CommentsV2ConnectResponse.threadsV2: object expected");t.threadsV2[n]=s.CommentsThreadDescriptor.fromObject(e.threadsV2[n])}}return t},o.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.threads=[],n.threadsV2=[]),t.defaults&&(n.channel=""),null!=e.channel&&e.hasOwnProperty("channel")&&(n.channel=e.channel),e.threads&&e.threads.length){n.threads=[];for(var r=0;r<e.threads.length;++r)n.threads[r]=e.threads[r]}if(e.threadsV2&&e.threadsV2.length)for(n.threadsV2=[],r=0;r<e.threadsV2.length;++r)n.threadsV2[r]=s.CommentsThreadDescriptor.toObject(e.threadsV2[r],t);return n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/CommentsV2ConnectResponse"},o}(),s.CommentsV2GetCommentThreadResponse=function(){function o(e){if(this.comments=[],this.commentsV2=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.commentThreadId="",o.prototype.comments=r.emptyArray,o.prototype.commentsV2=r.emptyArray,o.prototype.resolvedAt="",o.prototype.resolvedBy="",o.prototype.context="",o.prototype.createdAt="",o.prototype.deletedAt="",o.prototype.attributes="",o.prototype.unlinkedAt="",o.create=function(e){return new o(e)},o.encode=function(e,t){if(t||(t=n.create()),null!=e.commentThreadId&&Object.hasOwnProperty.call(e,"commentThreadId")&&t.uint32(10).string(e.commentThreadId),null!=e.comments&&e.comments.length)for(var r=0;r<e.comments.length;++r)t.uint32(18).string(e.comments[r]);if(null!=e.commentsV2&&e.commentsV2.length)for(r=0;r<e.commentsV2.length;++r)s.CommentDescriptor.encode(e.commentsV2[r],t.uint32(26).fork()).ldelim();return null!=e.resolvedAt&&Object.hasOwnProperty.call(e,"resolvedAt")&&t.uint32(34).string(e.resolvedAt),null!=e.resolvedBy&&Object.hasOwnProperty.call(e,"resolvedBy")&&t.uint32(42).string(e.resolvedBy),null!=e.context&&Object.hasOwnProperty.call(e,"context")&&t.uint32(50).string(e.context),null!=e.createdAt&&Object.hasOwnProperty.call(e,"createdAt")&&t.uint32(58).string(e.createdAt),null!=e.deletedAt&&Object.hasOwnProperty.call(e,"deletedAt")&&t.uint32(66).string(e.deletedAt),null!=e.attributes&&Object.hasOwnProperty.call(e,"attributes")&&t.uint32(74).string(e.attributes),null!=e.unlinkedAt&&Object.hasOwnProperty.call(e,"unlinkedAt")&&t.uint32(82).string(e.unlinkedAt),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.CommentsV2GetCommentThreadResponse;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.commentThreadId=e.string();break;case 2:o.comments&&o.comments.length||(o.comments=[]),o.comments.push(e.string());break;case 3:o.commentsV2&&o.commentsV2.length||(o.commentsV2=[]),o.commentsV2.push(s.CommentDescriptor.decode(e,e.uint32()));break;case 4:o.resolvedAt=e.string();break;case 5:o.resolvedBy=e.string();break;case 6:o.context=e.string();break;case 7:o.createdAt=e.string();break;case 8:o.deletedAt=e.string();break;case 9:o.attributes=e.string();break;case 10:o.unlinkedAt=e.string();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.commentThreadId&&e.hasOwnProperty("commentThreadId")&&!r.isString(e.commentThreadId))return"commentThreadId: string expected";if(null!=e.comments&&e.hasOwnProperty("comments")){if(!Array.isArray(e.comments))return"comments: array expected";for(var t=0;t<e.comments.length;++t)if(!r.isString(e.comments[t]))return"comments: string[] expected"}if(null!=e.commentsV2&&e.hasOwnProperty("commentsV2")){if(!Array.isArray(e.commentsV2))return"commentsV2: array expected";for(t=0;t<e.commentsV2.length;++t){var n=s.CommentDescriptor.verify(e.commentsV2[t]);if(n)return"commentsV2."+n}}return null!=e.resolvedAt&&e.hasOwnProperty("resolvedAt")&&!r.isString(e.resolvedAt)?"resolvedAt: string expected":null!=e.resolvedBy&&e.hasOwnProperty("resolvedBy")&&!r.isString(e.resolvedBy)?"resolvedBy: string expected":null!=e.context&&e.hasOwnProperty("context")&&!r.isString(e.context)?"context: string expected":null!=e.createdAt&&e.hasOwnProperty("createdAt")&&!r.isString(e.createdAt)?"createdAt: string expected":null!=e.deletedAt&&e.hasOwnProperty("deletedAt")&&!r.isString(e.deletedAt)?"deletedAt: string expected":null!=e.attributes&&e.hasOwnProperty("attributes")&&!r.isString(e.attributes)?"attributes: string expected":null!=e.unlinkedAt&&e.hasOwnProperty("unlinkedAt")&&!r.isString(e.unlinkedAt)?"unlinkedAt: string expected":null},o.fromObject=function(e){if(e instanceof s.CommentsV2GetCommentThreadResponse)return e;var t=new s.CommentsV2GetCommentThreadResponse;if(null!=e.commentThreadId&&(t.commentThreadId=String(e.commentThreadId)),e.comments){if(!Array.isArray(e.comments))throw TypeError(".CommentsV2GetCommentThreadResponse.comments: array expected");t.comments=[];for(var n=0;n<e.comments.length;++n)t.comments[n]=String(e.comments[n])}if(e.commentsV2){if(!Array.isArray(e.commentsV2))throw TypeError(".CommentsV2GetCommentThreadResponse.commentsV2: array expected");for(t.commentsV2=[],n=0;n<e.commentsV2.length;++n){if("object"!=typeof e.commentsV2[n])throw TypeError(".CommentsV2GetCommentThreadResponse.commentsV2: object expected");t.commentsV2[n]=s.CommentDescriptor.fromObject(e.commentsV2[n])}}return null!=e.resolvedAt&&(t.resolvedAt=String(e.resolvedAt)),null!=e.resolvedBy&&(t.resolvedBy=String(e.resolvedBy)),null!=e.context&&(t.context=String(e.context)),null!=e.createdAt&&(t.createdAt=String(e.createdAt)),null!=e.deletedAt&&(t.deletedAt=String(e.deletedAt)),null!=e.attributes&&(t.attributes=String(e.attributes)),null!=e.unlinkedAt&&(t.unlinkedAt=String(e.unlinkedAt)),t},o.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.comments=[],n.commentsV2=[]),t.defaults&&(n.commentThreadId="",n.resolvedAt="",n.resolvedBy="",n.context="",n.createdAt="",n.deletedAt="",n.attributes="",n.unlinkedAt=""),null!=e.commentThreadId&&e.hasOwnProperty("commentThreadId")&&(n.commentThreadId=e.commentThreadId),e.comments&&e.comments.length){n.comments=[];for(var r=0;r<e.comments.length;++r)n.comments[r]=e.comments[r]}if(e.commentsV2&&e.commentsV2.length)for(n.commentsV2=[],r=0;r<e.commentsV2.length;++r)n.commentsV2[r]=s.CommentDescriptor.toObject(e.commentsV2[r],t);return null!=e.resolvedAt&&e.hasOwnProperty("resolvedAt")&&(n.resolvedAt=e.resolvedAt),null!=e.resolvedBy&&e.hasOwnProperty("resolvedBy")&&(n.resolvedBy=e.resolvedBy),null!=e.context&&e.hasOwnProperty("context")&&(n.context=e.context),null!=e.createdAt&&e.hasOwnProperty("createdAt")&&(n.createdAt=e.createdAt),null!=e.deletedAt&&e.hasOwnProperty("deletedAt")&&(n.deletedAt=e.deletedAt),null!=e.attributes&&e.hasOwnProperty("attributes")&&(n.attributes=e.attributes),null!=e.unlinkedAt&&e.hasOwnProperty("unlinkedAt")&&(n.unlinkedAt=e.unlinkedAt),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/CommentsV2GetCommentThreadResponse"},o}(),s.CommentsV2GetDocumentThreadsResponse=function(){function o(e){if(this.threads=[],this.threadsV2=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.threads=r.emptyArray,o.prototype.threadsV2=r.emptyArray,o.create=function(e){return new o(e)},o.encode=function(e,t){if(t||(t=n.create()),null!=e.threads&&e.threads.length)for(var r=0;r<e.threads.length;++r)t.uint32(10).string(e.threads[r]);if(null!=e.threadsV2&&e.threadsV2.length)for(r=0;r<e.threadsV2.length;++r)s.CommentsThreadDescriptor.encode(e.threadsV2[r],t.uint32(18).fork()).ldelim();return t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.CommentsV2GetDocumentThreadsResponse;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.threads&&o.threads.length||(o.threads=[]),o.threads.push(e.string());break;case 2:o.threadsV2&&o.threadsV2.length||(o.threadsV2=[]),o.threadsV2.push(s.CommentsThreadDescriptor.decode(e,e.uint32()));break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.threads&&e.hasOwnProperty("threads")){if(!Array.isArray(e.threads))return"threads: array expected";for(var t=0;t<e.threads.length;++t)if(!r.isString(e.threads[t]))return"threads: string[] expected"}if(null!=e.threadsV2&&e.hasOwnProperty("threadsV2")){if(!Array.isArray(e.threadsV2))return"threadsV2: array expected";for(t=0;t<e.threadsV2.length;++t){var n=s.CommentsThreadDescriptor.verify(e.threadsV2[t]);if(n)return"threadsV2."+n}}return null},o.fromObject=function(e){if(e instanceof s.CommentsV2GetDocumentThreadsResponse)return e;var t=new s.CommentsV2GetDocumentThreadsResponse;if(e.threads){if(!Array.isArray(e.threads))throw TypeError(".CommentsV2GetDocumentThreadsResponse.threads: array expected");t.threads=[];for(var n=0;n<e.threads.length;++n)t.threads[n]=String(e.threads[n])}if(e.threadsV2){if(!Array.isArray(e.threadsV2))throw TypeError(".CommentsV2GetDocumentThreadsResponse.threadsV2: array expected");for(t.threadsV2=[],n=0;n<e.threadsV2.length;++n){if("object"!=typeof e.threadsV2[n])throw TypeError(".CommentsV2GetDocumentThreadsResponse.threadsV2: object expected");t.threadsV2[n]=s.CommentsThreadDescriptor.fromObject(e.threadsV2[n])}}return t},o.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.threads=[],n.threadsV2=[]),e.threads&&e.threads.length){n.threads=[];for(var r=0;r<e.threads.length;++r)n.threads[r]=e.threads[r]}if(e.threadsV2&&e.threadsV2.length)for(n.threadsV2=[],r=0;r<e.threadsV2.length;++r)n.threadsV2[r]=s.CommentsThreadDescriptor.toObject(e.threadsV2[r],t);return n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/CommentsV2GetDocumentThreadsResponse"},o}(),s.KeyValueDescriptor=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.key="",o.prototype.value="",o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.key&&Object.hasOwnProperty.call(e,"key")&&t.uint32(10).string(e.key),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(18).string(e.value),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.KeyValueDescriptor;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.key=e.string();break;case 2:o.value=e.string();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.key&&e.hasOwnProperty("key")&&!r.isString(e.key)?"key: string expected":null!=e.value&&e.hasOwnProperty("value")&&!r.isString(e.value)?"value: string expected":null},o.fromObject=function(e){if(e instanceof s.KeyValueDescriptor)return e;var t=new s.KeyValueDescriptor;return null!=e.key&&(t.key=String(e.key)),null!=e.value&&(t.value=String(e.value)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.key="",n.value=""),null!=e.key&&e.hasOwnProperty("key")&&(n.key=e.key),null!=e.value&&e.hasOwnProperty("value")&&(n.value=e.value),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/KeyValueDescriptor"},o}(),s.IsEditorBundleUploadedMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.bundleVersion="",o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.bundleVersion&&Object.hasOwnProperty.call(e,"bundleVersion")&&t.uint32(10).string(e.bundleVersion),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.IsEditorBundleUploadedMessage;e.pos<r;){var i=e.uint32();i>>>3==1?o.bundleVersion=e.string():e.skipType(7&i)}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.bundleVersion&&e.hasOwnProperty("bundleVersion")&&!r.isString(e.bundleVersion)?"bundleVersion: string expected":null},o.fromObject=function(e){if(e instanceof s.IsEditorBundleUploadedMessage)return e;var t=new s.IsEditorBundleUploadedMessage;return null!=e.bundleVersion&&(t.bundleVersion=String(e.bundleVersion)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.bundleVersion=""),null!=e.bundleVersion&&e.hasOwnProperty("bundleVersion")&&(n.bundleVersion=e.bundleVersion),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/IsEditorBundleUploadedMessage"},o}(),s.IsEditorBundleUploadedResponse=function(){function r(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return r.prototype.isUploaded=!1,r.create=function(e){return new r(e)},r.encode=function(e,t){return t||(t=n.create()),null!=e.isUploaded&&Object.hasOwnProperty.call(e,"isUploaded")&&t.uint32(8).bool(e.isUploaded),t},r.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},r.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.IsEditorBundleUploadedResponse;e.pos<r;){var i=e.uint32();i>>>3==1?o.isUploaded=e.bool():e.skipType(7&i)}return o},r.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},r.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.isUploaded&&e.hasOwnProperty("isUploaded")&&"boolean"!=typeof e.isUploaded?"isUploaded: boolean expected":null},r.fromObject=function(e){if(e instanceof s.IsEditorBundleUploadedResponse)return e;var t=new s.IsEditorBundleUploadedResponse;return null!=e.isUploaded&&(t.isUploaded=Boolean(e.isUploaded)),t},r.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.isUploaded=!1),null!=e.isUploaded&&e.hasOwnProperty("isUploaded")&&(n.isUploaded=e.isUploaded),n},r.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},r.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/IsEditorBundleUploadedResponse"},r}(),s.RevisionDescriptor=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.revisionId="",o.prototype.name="",o.prototype.creatorId="",o.prototype.authorsIds="",o.prototype.diffData="",o.prototype.createdAt="",o.prototype.attributes="",o.prototype.toVersion=0,o.prototype.fromVersion=0,o.prototype.isEmptyCurrent=!1,o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.revisionId&&Object.hasOwnProperty.call(e,"revisionId")&&t.uint32(10).string(e.revisionId),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(18).string(e.name),null!=e.creatorId&&Object.hasOwnProperty.call(e,"creatorId")&&t.uint32(26).string(e.creatorId),null!=e.authorsIds&&Object.hasOwnProperty.call(e,"authorsIds")&&t.uint32(34).string(e.authorsIds),null!=e.diffData&&Object.hasOwnProperty.call(e,"diffData")&&t.uint32(42).string(e.diffData),null!=e.createdAt&&Object.hasOwnProperty.call(e,"createdAt")&&t.uint32(50).string(e.createdAt),null!=e.attributes&&Object.hasOwnProperty.call(e,"attributes")&&t.uint32(58).string(e.attributes),null!=e.toVersion&&Object.hasOwnProperty.call(e,"toVersion")&&t.uint32(64).uint32(e.toVersion),null!=e.fromVersion&&Object.hasOwnProperty.call(e,"fromVersion")&&t.uint32(72).uint32(e.fromVersion),null!=e.isEmptyCurrent&&Object.hasOwnProperty.call(e,"isEmptyCurrent")&&t.uint32(80).bool(e.isEmptyCurrent),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.RevisionDescriptor;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.revisionId=e.string();break;case 2:o.name=e.string();break;case 3:o.creatorId=e.string();break;case 4:o.authorsIds=e.string();break;case 5:o.diffData=e.string();break;case 6:o.createdAt=e.string();break;case 7:o.attributes=e.string();break;case 8:o.toVersion=e.uint32();break;case 9:o.fromVersion=e.uint32();break;case 10:o.isEmptyCurrent=e.bool();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.revisionId&&e.hasOwnProperty("revisionId")&&!r.isString(e.revisionId)?"revisionId: string expected":null!=e.name&&e.hasOwnProperty("name")&&!r.isString(e.name)?"name: string expected":null!=e.creatorId&&e.hasOwnProperty("creatorId")&&!r.isString(e.creatorId)?"creatorId: string expected":null!=e.authorsIds&&e.hasOwnProperty("authorsIds")&&!r.isString(e.authorsIds)?"authorsIds: string expected":null!=e.diffData&&e.hasOwnProperty("diffData")&&!r.isString(e.diffData)?"diffData: string expected":null!=e.createdAt&&e.hasOwnProperty("createdAt")&&!r.isString(e.createdAt)?"createdAt: string expected":null!=e.attributes&&e.hasOwnProperty("attributes")&&!r.isString(e.attributes)?"attributes: string expected":null!=e.toVersion&&e.hasOwnProperty("toVersion")&&!r.isInteger(e.toVersion)?"toVersion: integer expected":null!=e.fromVersion&&e.hasOwnProperty("fromVersion")&&!r.isInteger(e.fromVersion)?"fromVersion: integer expected":null!=e.isEmptyCurrent&&e.hasOwnProperty("isEmptyCurrent")&&"boolean"!=typeof e.isEmptyCurrent?"isEmptyCurrent: boolean expected":null},o.fromObject=function(e){if(e instanceof s.RevisionDescriptor)return e;var t=new s.RevisionDescriptor;return null!=e.revisionId&&(t.revisionId=String(e.revisionId)),null!=e.name&&(t.name=String(e.name)),null!=e.creatorId&&(t.creatorId=String(e.creatorId)),null!=e.authorsIds&&(t.authorsIds=String(e.authorsIds)),null!=e.diffData&&(t.diffData=String(e.diffData)),null!=e.createdAt&&(t.createdAt=String(e.createdAt)),null!=e.attributes&&(t.attributes=String(e.attributes)),null!=e.toVersion&&(t.toVersion=e.toVersion>>>0),null!=e.fromVersion&&(t.fromVersion=e.fromVersion>>>0),null!=e.isEmptyCurrent&&(t.isEmptyCurrent=Boolean(e.isEmptyCurrent)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.revisionId="",n.name="",n.creatorId="",n.authorsIds="",n.diffData="",n.createdAt="",n.attributes="",n.toVersion=0,n.fromVersion=0,n.isEmptyCurrent=!1),null!=e.revisionId&&e.hasOwnProperty("revisionId")&&(n.revisionId=e.revisionId),null!=e.name&&e.hasOwnProperty("name")&&(n.name=e.name),null!=e.creatorId&&e.hasOwnProperty("creatorId")&&(n.creatorId=e.creatorId),null!=e.authorsIds&&e.hasOwnProperty("authorsIds")&&(n.authorsIds=e.authorsIds),null!=e.diffData&&e.hasOwnProperty("diffData")&&(n.diffData=e.diffData),null!=e.createdAt&&e.hasOwnProperty("createdAt")&&(n.createdAt=e.createdAt),null!=e.attributes&&e.hasOwnProperty("attributes")&&(n.attributes=e.attributes),null!=e.toVersion&&e.hasOwnProperty("toVersion")&&(n.toVersion=e.toVersion),null!=e.fromVersion&&e.hasOwnProperty("fromVersion")&&(n.fromVersion=e.fromVersion),null!=e.isEmptyCurrent&&e.hasOwnProperty("isEmptyCurrent")&&(n.isEmptyCurrent=e.isEmptyCurrent),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/RevisionDescriptor"},o}(),s.RevisionHistoryConnectMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.documentId="",o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.documentId&&Object.hasOwnProperty.call(e,"documentId")&&t.uint32(10).string(e.documentId),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.RevisionHistoryConnectMessage;e.pos<r;){var i=e.uint32();i>>>3==1?o.documentId=e.string():e.skipType(7&i)}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.documentId&&e.hasOwnProperty("documentId")&&!r.isString(e.documentId)?"documentId: string expected":null},o.fromObject=function(e){if(e instanceof s.RevisionHistoryConnectMessage)return e;var t=new s.RevisionHistoryConnectMessage;return null!=e.documentId&&(t.documentId=String(e.documentId)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.documentId=""),null!=e.documentId&&e.hasOwnProperty("documentId")&&(n.documentId=e.documentId),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/RevisionHistoryConnectMessage"},o}(),s.RevisionHistoryGetRevisionMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.documentId="",o.prototype.revisionId="",o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.documentId&&Object.hasOwnProperty.call(e,"documentId")&&t.uint32(10).string(e.documentId),null!=e.revisionId&&Object.hasOwnProperty.call(e,"revisionId")&&t.uint32(18).string(e.revisionId),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.RevisionHistoryGetRevisionMessage;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.documentId=e.string();break;case 2:o.revisionId=e.string();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.documentId&&e.hasOwnProperty("documentId")&&!r.isString(e.documentId)?"documentId: string expected":null!=e.revisionId&&e.hasOwnProperty("revisionId")&&!r.isString(e.revisionId)?"revisionId: string expected":null},o.fromObject=function(e){if(e instanceof s.RevisionHistoryGetRevisionMessage)return e;var t=new s.RevisionHistoryGetRevisionMessage;return null!=e.documentId&&(t.documentId=String(e.documentId)),null!=e.revisionId&&(t.revisionId=String(e.revisionId)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.documentId="",n.revisionId=""),null!=e.documentId&&e.hasOwnProperty("documentId")&&(n.documentId=e.documentId),null!=e.revisionId&&e.hasOwnProperty("revisionId")&&(n.revisionId=e.revisionId),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/RevisionHistoryGetRevisionMessage"},o}(),s.RevisionHistoryReconnectMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.documentId="",o.prototype.requestId=0,o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.documentId&&Object.hasOwnProperty.call(e,"documentId")&&t.uint32(10).string(e.documentId),null!=e.requestId&&Object.hasOwnProperty.call(e,"requestId")&&t.uint32(16).uint32(e.requestId),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.RevisionHistoryReconnectMessage;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.documentId=e.string();break;case 2:o.requestId=e.uint32();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.documentId&&e.hasOwnProperty("documentId")&&!r.isString(e.documentId)?"documentId: string expected":null!=e.requestId&&e.hasOwnProperty("requestId")&&!r.isInteger(e.requestId)?"requestId: integer expected":null},o.fromObject=function(e){if(e instanceof s.RevisionHistoryReconnectMessage)return e;var t=new s.RevisionHistoryReconnectMessage;return null!=e.documentId&&(t.documentId=String(e.documentId)),null!=e.requestId&&(t.requestId=e.requestId>>>0),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.documentId="",n.requestId=0),null!=e.documentId&&e.hasOwnProperty("documentId")&&(n.documentId=e.documentId),null!=e.requestId&&e.hasOwnProperty("requestId")&&(n.requestId=e.requestId),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/RevisionHistoryReconnectMessage"},o}(),s.RevisionHistoryUpdateRevisionsMessage=function(){function o(e){if(this.revisions=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.documentId="",o.prototype.requestId=0,o.prototype.revisions=r.emptyArray,o.create=function(e){return new o(e)},o.encode=function(e,t){if(t||(t=n.create()),null!=e.documentId&&Object.hasOwnProperty.call(e,"documentId")&&t.uint32(10).string(e.documentId),null!=e.requestId&&Object.hasOwnProperty.call(e,"requestId")&&t.uint32(16).uint32(e.requestId),null!=e.revisions&&e.revisions.length)for(var r=0;r<e.revisions.length;++r)s.RevisionDescriptor.encode(e.revisions[r],t.uint32(26).fork()).ldelim();return t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.RevisionHistoryUpdateRevisionsMessage;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.documentId=e.string();break;case 2:o.requestId=e.uint32();break;case 3:o.revisions&&o.revisions.length||(o.revisions=[]),o.revisions.push(s.RevisionDescriptor.decode(e,e.uint32()));break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.documentId&&e.hasOwnProperty("documentId")&&!r.isString(e.documentId))return"documentId: string expected";if(null!=e.requestId&&e.hasOwnProperty("requestId")&&!r.isInteger(e.requestId))return"requestId: integer expected";if(null!=e.revisions&&e.hasOwnProperty("revisions")){if(!Array.isArray(e.revisions))return"revisions: array expected";for(var t=0;t<e.revisions.length;++t){var n=s.RevisionDescriptor.verify(e.revisions[t]);if(n)return"revisions."+n}}return null},o.fromObject=function(e){if(e instanceof s.RevisionHistoryUpdateRevisionsMessage)return e;var t=new s.RevisionHistoryUpdateRevisionsMessage;if(null!=e.documentId&&(t.documentId=String(e.documentId)),null!=e.requestId&&(t.requestId=e.requestId>>>0),e.revisions){if(!Array.isArray(e.revisions))throw TypeError(".RevisionHistoryUpdateRevisionsMessage.revisions: array expected");t.revisions=[];for(var n=0;n<e.revisions.length;++n){if("object"!=typeof e.revisions[n])throw TypeError(".RevisionHistoryUpdateRevisionsMessage.revisions: object expected");t.revisions[n]=s.RevisionDescriptor.fromObject(e.revisions[n])}}return t},o.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.revisions=[]),t.defaults&&(n.documentId="",n.requestId=0),null!=e.documentId&&e.hasOwnProperty("documentId")&&(n.documentId=e.documentId),null!=e.requestId&&e.hasOwnProperty("requestId")&&(n.requestId=e.requestId),e.revisions&&e.revisions.length){n.revisions=[];for(var r=0;r<e.revisions.length;++r)n.revisions[r]=s.RevisionDescriptor.toObject(e.revisions[r],t)}return n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/RevisionHistoryUpdateRevisionsMessage"},o}(),s.RevisionHistoryConnectResponse=function(){function o(e){if(this.revisions=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.channel="",o.prototype.requestId=0,o.prototype.revisions=r.emptyArray,o.create=function(e){return new o(e)},o.encode=function(e,t){if(t||(t=n.create()),null!=e.channel&&Object.hasOwnProperty.call(e,"channel")&&t.uint32(10).string(e.channel),null!=e.requestId&&Object.hasOwnProperty.call(e,"requestId")&&t.uint32(16).uint32(e.requestId),null!=e.revisions&&e.revisions.length)for(var r=0;r<e.revisions.length;++r)s.RevisionDescriptor.encode(e.revisions[r],t.uint32(26).fork()).ldelim();return t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.RevisionHistoryConnectResponse;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.channel=e.string();break;case 2:o.requestId=e.uint32();break;case 3:o.revisions&&o.revisions.length||(o.revisions=[]),o.revisions.push(s.RevisionDescriptor.decode(e,e.uint32()));break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.channel&&e.hasOwnProperty("channel")&&!r.isString(e.channel))return"channel: string expected";if(null!=e.requestId&&e.hasOwnProperty("requestId")&&!r.isInteger(e.requestId))return"requestId: integer expected";if(null!=e.revisions&&e.hasOwnProperty("revisions")){if(!Array.isArray(e.revisions))return"revisions: array expected";for(var t=0;t<e.revisions.length;++t){var n=s.RevisionDescriptor.verify(e.revisions[t]);if(n)return"revisions."+n}}return null},o.fromObject=function(e){if(e instanceof s.RevisionHistoryConnectResponse)return e;var t=new s.RevisionHistoryConnectResponse;if(null!=e.channel&&(t.channel=String(e.channel)),null!=e.requestId&&(t.requestId=e.requestId>>>0),e.revisions){if(!Array.isArray(e.revisions))throw TypeError(".RevisionHistoryConnectResponse.revisions: array expected");t.revisions=[];for(var n=0;n<e.revisions.length;++n){if("object"!=typeof e.revisions[n])throw TypeError(".RevisionHistoryConnectResponse.revisions: object expected");t.revisions[n]=s.RevisionDescriptor.fromObject(e.revisions[n])}}return t},o.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.revisions=[]),t.defaults&&(n.channel="",n.requestId=0),null!=e.channel&&e.hasOwnProperty("channel")&&(n.channel=e.channel),null!=e.requestId&&e.hasOwnProperty("requestId")&&(n.requestId=e.requestId),e.revisions&&e.revisions.length){n.revisions=[];for(var r=0;r<e.revisions.length;++r)n.revisions[r]=s.RevisionDescriptor.toObject(e.revisions[r],t)}return n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/RevisionHistoryConnectResponse"},o}(),s.RevisionHistoryGetRevisionResponse=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.revisionId="",o.prototype.name="",o.prototype.creatorId="",o.prototype.authorsIds="",o.prototype.diffData="",o.prototype.createdAt="",o.prototype.attributes="",o.prototype.toVersion=0,o.prototype.fromVersion=0,o.prototype.isEmptyCurrent=!1,o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.revisionId&&Object.hasOwnProperty.call(e,"revisionId")&&t.uint32(10).string(e.revisionId),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(18).string(e.name),null!=e.creatorId&&Object.hasOwnProperty.call(e,"creatorId")&&t.uint32(26).string(e.creatorId),null!=e.authorsIds&&Object.hasOwnProperty.call(e,"authorsIds")&&t.uint32(34).string(e.authorsIds),null!=e.diffData&&Object.hasOwnProperty.call(e,"diffData")&&t.uint32(42).string(e.diffData),null!=e.createdAt&&Object.hasOwnProperty.call(e,"createdAt")&&t.uint32(50).string(e.createdAt),null!=e.attributes&&Object.hasOwnProperty.call(e,"attributes")&&t.uint32(58).string(e.attributes),null!=e.toVersion&&Object.hasOwnProperty.call(e,"toVersion")&&t.uint32(64).uint32(e.toVersion),null!=e.fromVersion&&Object.hasOwnProperty.call(e,"fromVersion")&&t.uint32(72).uint32(e.fromVersion),null!=e.isEmptyCurrent&&Object.hasOwnProperty.call(e,"isEmptyCurrent")&&t.uint32(80).bool(e.isEmptyCurrent),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.RevisionHistoryGetRevisionResponse;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.revisionId=e.string();break;case 2:o.name=e.string();break;case 3:o.creatorId=e.string();break;case 4:o.authorsIds=e.string();break;case 5:o.diffData=e.string();break;case 6:o.createdAt=e.string();break;case 7:o.attributes=e.string();break;case 8:o.toVersion=e.uint32();break;case 9:o.fromVersion=e.uint32();break;case 10:o.isEmptyCurrent=e.bool();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.revisionId&&e.hasOwnProperty("revisionId")&&!r.isString(e.revisionId)?"revisionId: string expected":null!=e.name&&e.hasOwnProperty("name")&&!r.isString(e.name)?"name: string expected":null!=e.creatorId&&e.hasOwnProperty("creatorId")&&!r.isString(e.creatorId)?"creatorId: string expected":null!=e.authorsIds&&e.hasOwnProperty("authorsIds")&&!r.isString(e.authorsIds)?"authorsIds: string expected":null!=e.diffData&&e.hasOwnProperty("diffData")&&!r.isString(e.diffData)?"diffData: string expected":null!=e.createdAt&&e.hasOwnProperty("createdAt")&&!r.isString(e.createdAt)?"createdAt: string expected":null!=e.attributes&&e.hasOwnProperty("attributes")&&!r.isString(e.attributes)?"attributes: string expected":null!=e.toVersion&&e.hasOwnProperty("toVersion")&&!r.isInteger(e.toVersion)?"toVersion: integer expected":null!=e.fromVersion&&e.hasOwnProperty("fromVersion")&&!r.isInteger(e.fromVersion)?"fromVersion: integer expected":null!=e.isEmptyCurrent&&e.hasOwnProperty("isEmptyCurrent")&&"boolean"!=typeof e.isEmptyCurrent?"isEmptyCurrent: boolean expected":null},o.fromObject=function(e){if(e instanceof s.RevisionHistoryGetRevisionResponse)return e;var t=new s.RevisionHistoryGetRevisionResponse;return null!=e.revisionId&&(t.revisionId=String(e.revisionId)),null!=e.name&&(t.name=String(e.name)),null!=e.creatorId&&(t.creatorId=String(e.creatorId)),null!=e.authorsIds&&(t.authorsIds=String(e.authorsIds)),null!=e.diffData&&(t.diffData=String(e.diffData)),null!=e.createdAt&&(t.createdAt=String(e.createdAt)),null!=e.attributes&&(t.attributes=String(e.attributes)),null!=e.toVersion&&(t.toVersion=e.toVersion>>>0),null!=e.fromVersion&&(t.fromVersion=e.fromVersion>>>0),null!=e.isEmptyCurrent&&(t.isEmptyCurrent=Boolean(e.isEmptyCurrent)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.revisionId="",n.name="",n.creatorId="",n.authorsIds="",n.diffData="",n.createdAt="",n.attributes="",n.toVersion=0,n.fromVersion=0,n.isEmptyCurrent=!1),null!=e.revisionId&&e.hasOwnProperty("revisionId")&&(n.revisionId=e.revisionId),null!=e.name&&e.hasOwnProperty("name")&&(n.name=e.name),null!=e.creatorId&&e.hasOwnProperty("creatorId")&&(n.creatorId=e.creatorId),null!=e.authorsIds&&e.hasOwnProperty("authorsIds")&&(n.authorsIds=e.authorsIds),null!=e.diffData&&e.hasOwnProperty("diffData")&&(n.diffData=e.diffData),null!=e.createdAt&&e.hasOwnProperty("createdAt")&&(n.createdAt=e.createdAt),null!=e.attributes&&e.hasOwnProperty("attributes")&&(n.attributes=e.attributes),null!=e.toVersion&&e.hasOwnProperty("toVersion")&&(n.toVersion=e.toVersion),null!=e.fromVersion&&e.hasOwnProperty("fromVersion")&&(n.fromVersion=e.fromVersion),null!=e.isEmptyCurrent&&e.hasOwnProperty("isEmptyCurrent")&&(n.isEmptyCurrent=e.isEmptyCurrent),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/RevisionHistoryGetRevisionResponse"},o}(),s.RevisionHistoryUpdateRevisionsResponse=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.requestId=0,o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.requestId&&Object.hasOwnProperty.call(e,"requestId")&&t.uint32(8).uint32(e.requestId),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.RevisionHistoryUpdateRevisionsResponse;e.pos<r;){var i=e.uint32();i>>>3==1?o.requestId=e.uint32():e.skipType(7&i)}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.requestId&&e.hasOwnProperty("requestId")&&!r.isInteger(e.requestId)?"requestId: integer expected":null},o.fromObject=function(e){if(e instanceof s.RevisionHistoryUpdateRevisionsResponse)return e;var t=new s.RevisionHistoryUpdateRevisionsResponse;return null!=e.requestId&&(t.requestId=e.requestId>>>0),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.requestId=0),null!=e.requestId&&e.hasOwnProperty("requestId")&&(n.requestId=e.requestId),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/RevisionHistoryUpdateRevisionsResponse"},o}(),s.SessionsSocketDescriptor=function(){function o(e){if(this.permissions=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.session="",o.prototype.user="",o.prototype.role="",o.prototype.permissions=r.emptyArray,o.create=function(e){return new o(e)},o.encode=function(e,t){if(t||(t=n.create()),null!=e.session&&Object.hasOwnProperty.call(e,"session")&&t.uint32(10).string(e.session),null!=e.user&&Object.hasOwnProperty.call(e,"user")&&t.uint32(18).string(e.user),null!=e.role&&Object.hasOwnProperty.call(e,"role")&&t.uint32(26).string(e.role),null!=e.permissions&&e.permissions.length)for(var r=0;r<e.permissions.length;++r)t.uint32(34).string(e.permissions[r]);return t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.SessionsSocketDescriptor;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.session=e.string();break;case 2:o.user=e.string();break;case 3:o.role=e.string();break;case 4:o.permissions&&o.permissions.length||(o.permissions=[]),o.permissions.push(e.string());break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.session&&e.hasOwnProperty("session")&&!r.isString(e.session))return"session: string expected";if(null!=e.user&&e.hasOwnProperty("user")&&!r.isString(e.user))return"user: string expected";if(null!=e.role&&e.hasOwnProperty("role")&&!r.isString(e.role))return"role: string expected";if(null!=e.permissions&&e.hasOwnProperty("permissions")){if(!Array.isArray(e.permissions))return"permissions: array expected";for(var t=0;t<e.permissions.length;++t)if(!r.isString(e.permissions[t]))return"permissions: string[] expected"}return null},o.fromObject=function(e){if(e instanceof s.SessionsSocketDescriptor)return e;var t=new s.SessionsSocketDescriptor;if(null!=e.session&&(t.session=String(e.session)),null!=e.user&&(t.user=String(e.user)),null!=e.role&&(t.role=String(e.role)),e.permissions){if(!Array.isArray(e.permissions))throw TypeError(".SessionsSocketDescriptor.permissions: array expected");t.permissions=[];for(var n=0;n<e.permissions.length;++n)t.permissions[n]=String(e.permissions[n])}return t},o.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.permissions=[]),t.defaults&&(n.session="",n.user="",n.role=""),null!=e.session&&e.hasOwnProperty("session")&&(n.session=e.session),null!=e.user&&e.hasOwnProperty("user")&&(n.user=e.user),null!=e.role&&e.hasOwnProperty("role")&&(n.role=e.role),e.permissions&&e.permissions.length){n.permissions=[];for(var r=0;r<e.permissions.length;++r)n.permissions[r]=e.permissions[r]}return n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/SessionsSocketDescriptor"},o}(),s.SessionsConnectMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.id="",o.prototype.sessionType=0,o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.id&&Object.hasOwnProperty.call(e,"id")&&t.uint32(10).string(e.id),null!=e.sessionType&&Object.hasOwnProperty.call(e,"sessionType")&&t.uint32(16).uint32(e.sessionType),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.SessionsConnectMessage;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.id=e.string();break;case 2:o.sessionType=e.uint32();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.id&&e.hasOwnProperty("id")&&!r.isString(e.id)?"id: string expected":null!=e.sessionType&&e.hasOwnProperty("sessionType")&&!r.isInteger(e.sessionType)?"sessionType: integer expected":null},o.fromObject=function(e){if(e instanceof s.SessionsConnectMessage)return e;var t=new s.SessionsConnectMessage;return null!=e.id&&(t.id=String(e.id)),null!=e.sessionType&&(t.sessionType=e.sessionType>>>0),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.id="",n.sessionType=0),null!=e.id&&e.hasOwnProperty("id")&&(n.id=e.id),null!=e.sessionType&&e.hasOwnProperty("sessionType")&&(n.sessionType=e.sessionType),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/SessionsConnectMessage"},o}(),s.SocketConnectMessage=function(){function o(e){if(this.permissions=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.id="",o.prototype.userId="",o.prototype.role="",o.prototype.permissions=r.emptyArray,o.create=function(e){return new o(e)},o.encode=function(e,t){if(t||(t=n.create()),null!=e.id&&Object.hasOwnProperty.call(e,"id")&&t.uint32(10).string(e.id),null!=e.userId&&Object.hasOwnProperty.call(e,"userId")&&t.uint32(18).string(e.userId),null!=e.role&&Object.hasOwnProperty.call(e,"role")&&t.uint32(26).string(e.role),null!=e.permissions&&e.permissions.length)for(var r=0;r<e.permissions.length;++r)t.uint32(34).string(e.permissions[r]);return t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.SocketConnectMessage;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.id=e.string();break;case 2:o.userId=e.string();break;case 3:o.role=e.string();break;case 4:o.permissions&&o.permissions.length||(o.permissions=[]),o.permissions.push(e.string());break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.id&&e.hasOwnProperty("id")&&!r.isString(e.id))return"id: string expected";if(null!=e.userId&&e.hasOwnProperty("userId")&&!r.isString(e.userId))return"userId: string expected";if(null!=e.role&&e.hasOwnProperty("role")&&!r.isString(e.role))return"role: string expected";if(null!=e.permissions&&e.hasOwnProperty("permissions")){if(!Array.isArray(e.permissions))return"permissions: array expected";for(var t=0;t<e.permissions.length;++t)if(!r.isString(e.permissions[t]))return"permissions: string[] expected"}return null},o.fromObject=function(e){if(e instanceof s.SocketConnectMessage)return e;var t=new s.SocketConnectMessage;if(null!=e.id&&(t.id=String(e.id)),null!=e.userId&&(t.userId=String(e.userId)),null!=e.role&&(t.role=String(e.role)),e.permissions){if(!Array.isArray(e.permissions))throw TypeError(".SocketConnectMessage.permissions: array expected");t.permissions=[];for(var n=0;n<e.permissions.length;++n)t.permissions[n]=String(e.permissions[n])}return t},o.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.permissions=[]),t.defaults&&(n.id="",n.userId="",n.role=""),null!=e.id&&e.hasOwnProperty("id")&&(n.id=e.id),null!=e.userId&&e.hasOwnProperty("userId")&&(n.userId=e.userId),null!=e.role&&e.hasOwnProperty("role")&&(n.role=e.role),e.permissions&&e.permissions.length){n.permissions=[];for(var r=0;r<e.permissions.length;++r)n.permissions[r]=e.permissions[r]}return n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/SocketConnectMessage"},o}(),s.SocketDisconnectMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.id="",o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.id&&Object.hasOwnProperty.call(e,"id")&&t.uint32(10).string(e.id),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.SocketDisconnectMessage;e.pos<r;){var i=e.uint32();i>>>3==1?o.id=e.string():e.skipType(7&i)}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.id&&e.hasOwnProperty("id")&&!r.isString(e.id)?"id: string expected":null},o.fromObject=function(e){if(e instanceof s.SocketDisconnectMessage)return e;var t=new s.SocketDisconnectMessage;return null!=e.id&&(t.id=String(e.id)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.id=""),null!=e.id&&e.hasOwnProperty("id")&&(n.id=e.id),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/SocketDisconnectMessage"},o}(),s.SessionsConnectResponse=function(){function o(e){if(this.sockets=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.channel="",o.prototype.sockets=r.emptyArray,o.create=function(e){return new o(e)},o.encode=function(e,t){if(t||(t=n.create()),null!=e.channel&&Object.hasOwnProperty.call(e,"channel")&&t.uint32(10).string(e.channel),null!=e.sockets&&e.sockets.length)for(var r=0;r<e.sockets.length;++r)s.SessionsSocketDescriptor.encode(e.sockets[r],t.uint32(18).fork()).ldelim();return t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.SessionsConnectResponse;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.channel=e.string();break;case 2:o.sockets&&o.sockets.length||(o.sockets=[]),o.sockets.push(s.SessionsSocketDescriptor.decode(e,e.uint32()));break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.channel&&e.hasOwnProperty("channel")&&!r.isString(e.channel))return"channel: string expected";if(null!=e.sockets&&e.hasOwnProperty("sockets")){if(!Array.isArray(e.sockets))return"sockets: array expected";for(var t=0;t<e.sockets.length;++t){var n=s.SessionsSocketDescriptor.verify(e.sockets[t]);if(n)return"sockets."+n}}return null},o.fromObject=function(e){if(e instanceof s.SessionsConnectResponse)return e;var t=new s.SessionsConnectResponse;if(null!=e.channel&&(t.channel=String(e.channel)),e.sockets){if(!Array.isArray(e.sockets))throw TypeError(".SessionsConnectResponse.sockets: array expected");t.sockets=[];for(var n=0;n<e.sockets.length;++n){if("object"!=typeof e.sockets[n])throw TypeError(".SessionsConnectResponse.sockets: object expected");t.sockets[n]=s.SessionsSocketDescriptor.fromObject(e.sockets[n])}}return t},o.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.sockets=[]),t.defaults&&(n.channel=""),null!=e.channel&&e.hasOwnProperty("channel")&&(n.channel=e.channel),e.sockets&&e.sockets.length){n.sockets=[];for(var r=0;r<e.sockets.length;++r)n.sockets[r]=s.SessionsSocketDescriptor.toObject(e.sockets[r],t)}return n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/SessionsConnectResponse"},o}(),s.SuggestionDescriptor=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.id="",o.prototype.authorId="",o.prototype.type="",o.prototype.createdAt="",o.prototype.data="",o.prototype.hasComments=!1,o.prototype.state="",o.prototype.attributes="",o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.id&&Object.hasOwnProperty.call(e,"id")&&t.uint32(10).string(e.id),null!=e.authorId&&Object.hasOwnProperty.call(e,"authorId")&&t.uint32(18).string(e.authorId),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(26).string(e.type),null!=e.createdAt&&Object.hasOwnProperty.call(e,"createdAt")&&t.uint32(34).string(e.createdAt),null!=e.data&&Object.hasOwnProperty.call(e,"data")&&t.uint32(42).string(e.data),null!=e.hasComments&&Object.hasOwnProperty.call(e,"hasComments")&&t.uint32(48).bool(e.hasComments),null!=e.state&&Object.hasOwnProperty.call(e,"state")&&t.uint32(58).string(e.state),null!=e.attributes&&Object.hasOwnProperty.call(e,"attributes")&&t.uint32(66).string(e.attributes),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.SuggestionDescriptor;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.id=e.string();break;case 2:o.authorId=e.string();break;case 3:o.type=e.string();break;case 4:o.createdAt=e.string();break;case 5:o.data=e.string();break;case 6:o.hasComments=e.bool();break;case 7:o.state=e.string();break;case 8:o.attributes=e.string();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.id&&e.hasOwnProperty("id")&&!r.isString(e.id)?"id: string expected":null!=e.authorId&&e.hasOwnProperty("authorId")&&!r.isString(e.authorId)?"authorId: string expected":null!=e.type&&e.hasOwnProperty("type")&&!r.isString(e.type)?"type: string expected":null!=e.createdAt&&e.hasOwnProperty("createdAt")&&!r.isString(e.createdAt)?"createdAt: string expected":null!=e.data&&e.hasOwnProperty("data")&&!r.isString(e.data)?"data: string expected":null!=e.hasComments&&e.hasOwnProperty("hasComments")&&"boolean"!=typeof e.hasComments?"hasComments: boolean expected":null!=e.state&&e.hasOwnProperty("state")&&!r.isString(e.state)?"state: string expected":null!=e.attributes&&e.hasOwnProperty("attributes")&&!r.isString(e.attributes)?"attributes: string expected":null},o.fromObject=function(e){if(e instanceof s.SuggestionDescriptor)return e;var t=new s.SuggestionDescriptor;return null!=e.id&&(t.id=String(e.id)),null!=e.authorId&&(t.authorId=String(e.authorId)),null!=e.type&&(t.type=String(e.type)),null!=e.createdAt&&(t.createdAt=String(e.createdAt)),null!=e.data&&(t.data=String(e.data)),null!=e.hasComments&&(t.hasComments=Boolean(e.hasComments)),null!=e.state&&(t.state=String(e.state)),null!=e.attributes&&(t.attributes=String(e.attributes)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.id="",n.authorId="",n.type="",n.createdAt="",n.data="",n.hasComments=!1,n.state="",n.attributes=""),null!=e.id&&e.hasOwnProperty("id")&&(n.id=e.id),null!=e.authorId&&e.hasOwnProperty("authorId")&&(n.authorId=e.authorId),null!=e.type&&e.hasOwnProperty("type")&&(n.type=e.type),null!=e.createdAt&&e.hasOwnProperty("createdAt")&&(n.createdAt=e.createdAt),null!=e.data&&e.hasOwnProperty("data")&&(n.data=e.data),null!=e.hasComments&&e.hasOwnProperty("hasComments")&&(n.hasComments=e.hasComments),null!=e.state&&e.hasOwnProperty("state")&&(n.state=e.state),null!=e.attributes&&e.hasOwnProperty("attributes")&&(n.attributes=e.attributes),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/SuggestionDescriptor"},o}(),s.TrackChangesAddSuggestionMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.id="",o.prototype.documentId="",o.prototype.type="",o.prototype.data="",o.prototype.originalSuggestionId="",o.prototype.attributes="",o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.id&&Object.hasOwnProperty.call(e,"id")&&t.uint32(10).string(e.id),null!=e.documentId&&Object.hasOwnProperty.call(e,"documentId")&&t.uint32(18).string(e.documentId),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(26).string(e.type),null!=e.data&&Object.hasOwnProperty.call(e,"data")&&t.uint32(34).string(e.data),null!=e.originalSuggestionId&&Object.hasOwnProperty.call(e,"originalSuggestionId")&&t.uint32(42).string(e.originalSuggestionId),null!=e.attributes&&Object.hasOwnProperty.call(e,"attributes")&&t.uint32(50).string(e.attributes),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.TrackChangesAddSuggestionMessage;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.id=e.string();break;case 2:o.documentId=e.string();break;case 3:o.type=e.string();break;case 4:o.data=e.string();break;case 5:o.originalSuggestionId=e.string();break;case 6:o.attributes=e.string();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.id&&e.hasOwnProperty("id")&&!r.isString(e.id)?"id: string expected":null!=e.documentId&&e.hasOwnProperty("documentId")&&!r.isString(e.documentId)?"documentId: string expected":null!=e.type&&e.hasOwnProperty("type")&&!r.isString(e.type)?"type: string expected":null!=e.data&&e.hasOwnProperty("data")&&!r.isString(e.data)?"data: string expected":null!=e.originalSuggestionId&&e.hasOwnProperty("originalSuggestionId")&&!r.isString(e.originalSuggestionId)?"originalSuggestionId: string expected":null!=e.attributes&&e.hasOwnProperty("attributes")&&!r.isString(e.attributes)?"attributes: string expected":null},o.fromObject=function(e){if(e instanceof s.TrackChangesAddSuggestionMessage)return e;var t=new s.TrackChangesAddSuggestionMessage;return null!=e.id&&(t.id=String(e.id)),null!=e.documentId&&(t.documentId=String(e.documentId)),null!=e.type&&(t.type=String(e.type)),null!=e.data&&(t.data=String(e.data)),null!=e.originalSuggestionId&&(t.originalSuggestionId=String(e.originalSuggestionId)),null!=e.attributes&&(t.attributes=String(e.attributes)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.id="",n.documentId="",n.type="",n.data="",n.originalSuggestionId="",n.attributes=""),null!=e.id&&e.hasOwnProperty("id")&&(n.id=e.id),null!=e.documentId&&e.hasOwnProperty("documentId")&&(n.documentId=e.documentId),null!=e.type&&e.hasOwnProperty("type")&&(n.type=e.type),null!=e.data&&e.hasOwnProperty("data")&&(n.data=e.data),null!=e.originalSuggestionId&&e.hasOwnProperty("originalSuggestionId")&&(n.originalSuggestionId=e.originalSuggestionId),null!=e.attributes&&e.hasOwnProperty("attributes")&&(n.attributes=e.attributes),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/TrackChangesAddSuggestionMessage"},o}(),s.TrackChangesBatchUpdateSuggestionsStateMessage=function(){function o(e){if(this.ids=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.ids=r.emptyArray,o.prototype.documentId="",o.prototype.state="",o.create=function(e){return new o(e)},o.encode=function(e,t){if(t||(t=n.create()),null!=e.ids&&e.ids.length)for(var r=0;r<e.ids.length;++r)t.uint32(10).string(e.ids[r]);return null!=e.documentId&&Object.hasOwnProperty.call(e,"documentId")&&t.uint32(18).string(e.documentId),null!=e.state&&Object.hasOwnProperty.call(e,"state")&&t.uint32(26).string(e.state),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.TrackChangesBatchUpdateSuggestionsStateMessage;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.ids&&o.ids.length||(o.ids=[]),o.ids.push(e.string());break;case 2:o.documentId=e.string();break;case 3:o.state=e.string();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.ids&&e.hasOwnProperty("ids")){if(!Array.isArray(e.ids))return"ids: array expected";for(var t=0;t<e.ids.length;++t)if(!r.isString(e.ids[t]))return"ids: string[] expected"}return null!=e.documentId&&e.hasOwnProperty("documentId")&&!r.isString(e.documentId)?"documentId: string expected":null!=e.state&&e.hasOwnProperty("state")&&!r.isString(e.state)?"state: string expected":null},o.fromObject=function(e){if(e instanceof s.TrackChangesBatchUpdateSuggestionsStateMessage)return e;var t=new s.TrackChangesBatchUpdateSuggestionsStateMessage;if(e.ids){if(!Array.isArray(e.ids))throw TypeError(".TrackChangesBatchUpdateSuggestionsStateMessage.ids: array expected");t.ids=[];for(var n=0;n<e.ids.length;++n)t.ids[n]=String(e.ids[n])}return null!=e.documentId&&(t.documentId=String(e.documentId)),null!=e.state&&(t.state=String(e.state)),t},o.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.ids=[]),t.defaults&&(n.documentId="",n.state=""),e.ids&&e.ids.length){n.ids=[];for(var r=0;r<e.ids.length;++r)n.ids[r]=e.ids[r]}return null!=e.documentId&&e.hasOwnProperty("documentId")&&(n.documentId=e.documentId),null!=e.state&&e.hasOwnProperty("state")&&(n.state=e.state),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/TrackChangesBatchUpdateSuggestionsStateMessage"},o}(),s.TrackChangesConnectMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.documentId="",o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.documentId&&Object.hasOwnProperty.call(e,"documentId")&&t.uint32(10).string(e.documentId),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.TrackChangesConnectMessage;e.pos<r;){var i=e.uint32();i>>>3==1?o.documentId=e.string():e.skipType(7&i)}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.documentId&&e.hasOwnProperty("documentId")&&!r.isString(e.documentId)?"documentId: string expected":null},o.fromObject=function(e){if(e instanceof s.TrackChangesConnectMessage)return e;var t=new s.TrackChangesConnectMessage;return null!=e.documentId&&(t.documentId=String(e.documentId)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.documentId=""),null!=e.documentId&&e.hasOwnProperty("documentId")&&(n.documentId=e.documentId),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/TrackChangesConnectMessage"},o}(),s.TrackChangesGetAllSuggestionMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.documentId="",o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.documentId&&Object.hasOwnProperty.call(e,"documentId")&&t.uint32(10).string(e.documentId),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.TrackChangesGetAllSuggestionMessage;e.pos<r;){var i=e.uint32();i>>>3==1?o.documentId=e.string():e.skipType(7&i)}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.documentId&&e.hasOwnProperty("documentId")&&!r.isString(e.documentId)?"documentId: string expected":null},o.fromObject=function(e){if(e instanceof s.TrackChangesGetAllSuggestionMessage)return e;var t=new s.TrackChangesGetAllSuggestionMessage;return null!=e.documentId&&(t.documentId=String(e.documentId)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.documentId=""),null!=e.documentId&&e.hasOwnProperty("documentId")&&(n.documentId=e.documentId),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/TrackChangesGetAllSuggestionMessage"},o}(),s.TrackChangesGetSuggestionMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.id="",o.prototype.documentId="",o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.id&&Object.hasOwnProperty.call(e,"id")&&t.uint32(10).string(e.id),null!=e.documentId&&Object.hasOwnProperty.call(e,"documentId")&&t.uint32(18).string(e.documentId),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.TrackChangesGetSuggestionMessage;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.id=e.string();break;case 2:o.documentId=e.string();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.id&&e.hasOwnProperty("id")&&!r.isString(e.id)?"id: string expected":null!=e.documentId&&e.hasOwnProperty("documentId")&&!r.isString(e.documentId)?"documentId: string expected":null},o.fromObject=function(e){if(e instanceof s.TrackChangesGetSuggestionMessage)return e;var t=new s.TrackChangesGetSuggestionMessage;return null!=e.id&&(t.id=String(e.id)),null!=e.documentId&&(t.documentId=String(e.documentId)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.id="",n.documentId=""),null!=e.id&&e.hasOwnProperty("id")&&(n.id=e.id),null!=e.documentId&&e.hasOwnProperty("documentId")&&(n.documentId=e.documentId),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/TrackChangesGetSuggestionMessage"},o}(),s.TrackChangesUpdateSuggestionMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.id="",o.prototype.documentId="",o.prototype.hasComments=!1,o.prototype.isHasCommentsModified=!1,o.prototype.state="",o.prototype.attributes="",o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.id&&Object.hasOwnProperty.call(e,"id")&&t.uint32(10).string(e.id),null!=e.documentId&&Object.hasOwnProperty.call(e,"documentId")&&t.uint32(18).string(e.documentId),null!=e.hasComments&&Object.hasOwnProperty.call(e,"hasComments")&&t.uint32(24).bool(e.hasComments),null!=e.isHasCommentsModified&&Object.hasOwnProperty.call(e,"isHasCommentsModified")&&t.uint32(32).bool(e.isHasCommentsModified),null!=e.state&&Object.hasOwnProperty.call(e,"state")&&t.uint32(42).string(e.state),null!=e.attributes&&Object.hasOwnProperty.call(e,"attributes")&&t.uint32(50).string(e.attributes),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.TrackChangesUpdateSuggestionMessage;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.id=e.string();break;case 2:o.documentId=e.string();break;case 3:o.hasComments=e.bool();break;case 4:o.isHasCommentsModified=e.bool();break;case 5:o.state=e.string();break;case 6:o.attributes=e.string();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.id&&e.hasOwnProperty("id")&&!r.isString(e.id)?"id: string expected":null!=e.documentId&&e.hasOwnProperty("documentId")&&!r.isString(e.documentId)?"documentId: string expected":null!=e.hasComments&&e.hasOwnProperty("hasComments")&&"boolean"!=typeof e.hasComments?"hasComments: boolean expected":null!=e.isHasCommentsModified&&e.hasOwnProperty("isHasCommentsModified")&&"boolean"!=typeof e.isHasCommentsModified?"isHasCommentsModified: boolean expected":null!=e.state&&e.hasOwnProperty("state")&&!r.isString(e.state)?"state: string expected":null!=e.attributes&&e.hasOwnProperty("attributes")&&!r.isString(e.attributes)?"attributes: string expected":null},o.fromObject=function(e){if(e instanceof s.TrackChangesUpdateSuggestionMessage)return e;var t=new s.TrackChangesUpdateSuggestionMessage;return null!=e.id&&(t.id=String(e.id)),null!=e.documentId&&(t.documentId=String(e.documentId)),null!=e.hasComments&&(t.hasComments=Boolean(e.hasComments)),null!=e.isHasCommentsModified&&(t.isHasCommentsModified=Boolean(e.isHasCommentsModified)),null!=e.state&&(t.state=String(e.state)),null!=e.attributes&&(t.attributes=String(e.attributes)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.id="",n.documentId="",n.hasComments=!1,n.isHasCommentsModified=!1,n.state="",n.attributes=""),null!=e.id&&e.hasOwnProperty("id")&&(n.id=e.id),null!=e.documentId&&e.hasOwnProperty("documentId")&&(n.documentId=e.documentId),null!=e.hasComments&&e.hasOwnProperty("hasComments")&&(n.hasComments=e.hasComments),null!=e.isHasCommentsModified&&e.hasOwnProperty("isHasCommentsModified")&&(n.isHasCommentsModified=e.isHasCommentsModified),null!=e.state&&e.hasOwnProperty("state")&&(n.state=e.state),null!=e.attributes&&e.hasOwnProperty("attributes")&&(n.attributes=e.attributes),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/TrackChangesUpdateSuggestionMessage"},o}(),s.TrackChangesAddSuggestionResponse=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.id="",o.prototype.authorId="",o.prototype.type="",o.prototype.createdAt="",o.prototype.data="",o.prototype.hasComments=!1,o.prototype.state="",o.prototype.attributes="",o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.id&&Object.hasOwnProperty.call(e,"id")&&t.uint32(10).string(e.id),null!=e.authorId&&Object.hasOwnProperty.call(e,"authorId")&&t.uint32(18).string(e.authorId),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(26).string(e.type),null!=e.createdAt&&Object.hasOwnProperty.call(e,"createdAt")&&t.uint32(34).string(e.createdAt),null!=e.data&&Object.hasOwnProperty.call(e,"data")&&t.uint32(42).string(e.data),null!=e.hasComments&&Object.hasOwnProperty.call(e,"hasComments")&&t.uint32(48).bool(e.hasComments),null!=e.state&&Object.hasOwnProperty.call(e,"state")&&t.uint32(58).string(e.state),null!=e.attributes&&Object.hasOwnProperty.call(e,"attributes")&&t.uint32(66).string(e.attributes),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.TrackChangesAddSuggestionResponse;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.id=e.string();break;case 2:o.authorId=e.string();break;case 3:o.type=e.string();break;case 4:o.createdAt=e.string();break;case 5:o.data=e.string();break;case 6:o.hasComments=e.bool();break;case 7:o.state=e.string();break;case 8:o.attributes=e.string();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.id&&e.hasOwnProperty("id")&&!r.isString(e.id)?"id: string expected":null!=e.authorId&&e.hasOwnProperty("authorId")&&!r.isString(e.authorId)?"authorId: string expected":null!=e.type&&e.hasOwnProperty("type")&&!r.isString(e.type)?"type: string expected":null!=e.createdAt&&e.hasOwnProperty("createdAt")&&!r.isString(e.createdAt)?"createdAt: string expected":null!=e.data&&e.hasOwnProperty("data")&&!r.isString(e.data)?"data: string expected":null!=e.hasComments&&e.hasOwnProperty("hasComments")&&"boolean"!=typeof e.hasComments?"hasComments: boolean expected":null!=e.state&&e.hasOwnProperty("state")&&!r.isString(e.state)?"state: string expected":null!=e.attributes&&e.hasOwnProperty("attributes")&&!r.isString(e.attributes)?"attributes: string expected":null},o.fromObject=function(e){if(e instanceof s.TrackChangesAddSuggestionResponse)return e;var t=new s.TrackChangesAddSuggestionResponse;return null!=e.id&&(t.id=String(e.id)),null!=e.authorId&&(t.authorId=String(e.authorId)),null!=e.type&&(t.type=String(e.type)),null!=e.createdAt&&(t.createdAt=String(e.createdAt)),null!=e.data&&(t.data=String(e.data)),null!=e.hasComments&&(t.hasComments=Boolean(e.hasComments)),null!=e.state&&(t.state=String(e.state)),null!=e.attributes&&(t.attributes=String(e.attributes)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.id="",n.authorId="",n.type="",n.createdAt="",n.data="",n.hasComments=!1,n.state="",n.attributes=""),null!=e.id&&e.hasOwnProperty("id")&&(n.id=e.id),null!=e.authorId&&e.hasOwnProperty("authorId")&&(n.authorId=e.authorId),null!=e.type&&e.hasOwnProperty("type")&&(n.type=e.type),null!=e.createdAt&&e.hasOwnProperty("createdAt")&&(n.createdAt=e.createdAt),null!=e.data&&e.hasOwnProperty("data")&&(n.data=e.data),null!=e.hasComments&&e.hasOwnProperty("hasComments")&&(n.hasComments=e.hasComments),null!=e.state&&e.hasOwnProperty("state")&&(n.state=e.state),null!=e.attributes&&e.hasOwnProperty("attributes")&&(n.attributes=e.attributes),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/TrackChangesAddSuggestionResponse"},o}(),s.TrackChangesConnectResponse=function(){function o(e){if(this.suggestions=[],this.suggestionsV2=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.channel="",o.prototype.suggestions=r.emptyArray,o.prototype.suggestionsV2=r.emptyArray,o.create=function(e){return new o(e)},o.encode=function(e,t){if(t||(t=n.create()),null!=e.channel&&Object.hasOwnProperty.call(e,"channel")&&t.uint32(10).string(e.channel),null!=e.suggestions&&e.suggestions.length)for(var r=0;r<e.suggestions.length;++r)t.uint32(18).string(e.suggestions[r]);if(null!=e.suggestionsV2&&e.suggestionsV2.length)for(r=0;r<e.suggestionsV2.length;++r)s.SuggestionDescriptor.encode(e.suggestionsV2[r],t.uint32(26).fork()).ldelim();return t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.TrackChangesConnectResponse;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.channel=e.string();break;case 2:o.suggestions&&o.suggestions.length||(o.suggestions=[]),o.suggestions.push(e.string());break;case 3:o.suggestionsV2&&o.suggestionsV2.length||(o.suggestionsV2=[]),o.suggestionsV2.push(s.SuggestionDescriptor.decode(e,e.uint32()));break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.channel&&e.hasOwnProperty("channel")&&!r.isString(e.channel))return"channel: string expected";if(null!=e.suggestions&&e.hasOwnProperty("suggestions")){if(!Array.isArray(e.suggestions))return"suggestions: array expected";for(var t=0;t<e.suggestions.length;++t)if(!r.isString(e.suggestions[t]))return"suggestions: string[] expected"}if(null!=e.suggestionsV2&&e.hasOwnProperty("suggestionsV2")){if(!Array.isArray(e.suggestionsV2))return"suggestionsV2: array expected";for(t=0;t<e.suggestionsV2.length;++t){var n=s.SuggestionDescriptor.verify(e.suggestionsV2[t]);if(n)return"suggestionsV2."+n}}return null},o.fromObject=function(e){if(e instanceof s.TrackChangesConnectResponse)return e;var t=new s.TrackChangesConnectResponse;if(null!=e.channel&&(t.channel=String(e.channel)),e.suggestions){if(!Array.isArray(e.suggestions))throw TypeError(".TrackChangesConnectResponse.suggestions: array expected");t.suggestions=[];for(var n=0;n<e.suggestions.length;++n)t.suggestions[n]=String(e.suggestions[n])}if(e.suggestionsV2){if(!Array.isArray(e.suggestionsV2))throw TypeError(".TrackChangesConnectResponse.suggestionsV2: array expected");for(t.suggestionsV2=[],n=0;n<e.suggestionsV2.length;++n){if("object"!=typeof e.suggestionsV2[n])throw TypeError(".TrackChangesConnectResponse.suggestionsV2: object expected");t.suggestionsV2[n]=s.SuggestionDescriptor.fromObject(e.suggestionsV2[n])}}return t},o.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.suggestions=[],n.suggestionsV2=[]),t.defaults&&(n.channel=""),null!=e.channel&&e.hasOwnProperty("channel")&&(n.channel=e.channel),e.suggestions&&e.suggestions.length){n.suggestions=[];for(var r=0;r<e.suggestions.length;++r)n.suggestions[r]=e.suggestions[r]}if(e.suggestionsV2&&e.suggestionsV2.length)for(n.suggestionsV2=[],r=0;r<e.suggestionsV2.length;++r)n.suggestionsV2[r]=s.SuggestionDescriptor.toObject(e.suggestionsV2[r],t);return n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/TrackChangesConnectResponse"},o}(),s.TrackChangesGetAllSuggestionsResponse=function(){function o(e){if(this.suggestions=[],this.suggestionsV2=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.suggestions=r.emptyArray,o.prototype.suggestionsV2=r.emptyArray,o.create=function(e){return new o(e)},o.encode=function(e,t){if(t||(t=n.create()),null!=e.suggestions&&e.suggestions.length)for(var r=0;r<e.suggestions.length;++r)t.uint32(10).string(e.suggestions[r]);if(null!=e.suggestionsV2&&e.suggestionsV2.length)for(r=0;r<e.suggestionsV2.length;++r)s.SuggestionDescriptor.encode(e.suggestionsV2[r],t.uint32(18).fork()).ldelim();return t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.TrackChangesGetAllSuggestionsResponse;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.suggestions&&o.suggestions.length||(o.suggestions=[]),o.suggestions.push(e.string());break;case 2:o.suggestionsV2&&o.suggestionsV2.length||(o.suggestionsV2=[]),o.suggestionsV2.push(s.SuggestionDescriptor.decode(e,e.uint32()));break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.suggestions&&e.hasOwnProperty("suggestions")){if(!Array.isArray(e.suggestions))return"suggestions: array expected";for(var t=0;t<e.suggestions.length;++t)if(!r.isString(e.suggestions[t]))return"suggestions: string[] expected"}if(null!=e.suggestionsV2&&e.hasOwnProperty("suggestionsV2")){if(!Array.isArray(e.suggestionsV2))return"suggestionsV2: array expected";for(t=0;t<e.suggestionsV2.length;++t){var n=s.SuggestionDescriptor.verify(e.suggestionsV2[t]);if(n)return"suggestionsV2."+n}}return null},o.fromObject=function(e){if(e instanceof s.TrackChangesGetAllSuggestionsResponse)return e;var t=new s.TrackChangesGetAllSuggestionsResponse;if(e.suggestions){if(!Array.isArray(e.suggestions))throw TypeError(".TrackChangesGetAllSuggestionsResponse.suggestions: array expected");t.suggestions=[];for(var n=0;n<e.suggestions.length;++n)t.suggestions[n]=String(e.suggestions[n])}if(e.suggestionsV2){if(!Array.isArray(e.suggestionsV2))throw TypeError(".TrackChangesGetAllSuggestionsResponse.suggestionsV2: array expected");for(t.suggestionsV2=[],n=0;n<e.suggestionsV2.length;++n){if("object"!=typeof e.suggestionsV2[n])throw TypeError(".TrackChangesGetAllSuggestionsResponse.suggestionsV2: object expected");t.suggestionsV2[n]=s.SuggestionDescriptor.fromObject(e.suggestionsV2[n])}}return t},o.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.suggestions=[],n.suggestionsV2=[]),e.suggestions&&e.suggestions.length){n.suggestions=[];for(var r=0;r<e.suggestions.length;++r)n.suggestions[r]=e.suggestions[r]}if(e.suggestionsV2&&e.suggestionsV2.length)for(n.suggestionsV2=[],r=0;r<e.suggestionsV2.length;++r)n.suggestionsV2[r]=s.SuggestionDescriptor.toObject(e.suggestionsV2[r],t);return n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/TrackChangesGetAllSuggestionsResponse"},o}(),s.TrackChangesGetSuggestionResponse=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.id="",o.prototype.authorId="",o.prototype.type="",o.prototype.createdAt="",o.prototype.data="",o.prototype.hasComments=!1,o.prototype.state="",o.prototype.attributes="",o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.id&&Object.hasOwnProperty.call(e,"id")&&t.uint32(10).string(e.id),null!=e.authorId&&Object.hasOwnProperty.call(e,"authorId")&&t.uint32(18).string(e.authorId),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(26).string(e.type),null!=e.createdAt&&Object.hasOwnProperty.call(e,"createdAt")&&t.uint32(34).string(e.createdAt),null!=e.data&&Object.hasOwnProperty.call(e,"data")&&t.uint32(42).string(e.data),null!=e.hasComments&&Object.hasOwnProperty.call(e,"hasComments")&&t.uint32(48).bool(e.hasComments),null!=e.state&&Object.hasOwnProperty.call(e,"state")&&t.uint32(58).string(e.state),null!=e.attributes&&Object.hasOwnProperty.call(e,"attributes")&&t.uint32(66).string(e.attributes),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.TrackChangesGetSuggestionResponse;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.id=e.string();break;case 2:o.authorId=e.string();break;case 3:o.type=e.string();break;case 4:o.createdAt=e.string();break;case 5:o.data=e.string();break;case 6:o.hasComments=e.bool();break;case 7:o.state=e.string();break;case 8:o.attributes=e.string();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.id&&e.hasOwnProperty("id")&&!r.isString(e.id)?"id: string expected":null!=e.authorId&&e.hasOwnProperty("authorId")&&!r.isString(e.authorId)?"authorId: string expected":null!=e.type&&e.hasOwnProperty("type")&&!r.isString(e.type)?"type: string expected":null!=e.createdAt&&e.hasOwnProperty("createdAt")&&!r.isString(e.createdAt)?"createdAt: string expected":null!=e.data&&e.hasOwnProperty("data")&&!r.isString(e.data)?"data: string expected":null!=e.hasComments&&e.hasOwnProperty("hasComments")&&"boolean"!=typeof e.hasComments?"hasComments: boolean expected":null!=e.state&&e.hasOwnProperty("state")&&!r.isString(e.state)?"state: string expected":null!=e.attributes&&e.hasOwnProperty("attributes")&&!r.isString(e.attributes)?"attributes: string expected":null},o.fromObject=function(e){if(e instanceof s.TrackChangesGetSuggestionResponse)return e;var t=new s.TrackChangesGetSuggestionResponse;return null!=e.id&&(t.id=String(e.id)),null!=e.authorId&&(t.authorId=String(e.authorId)),null!=e.type&&(t.type=String(e.type)),null!=e.createdAt&&(t.createdAt=String(e.createdAt)),null!=e.data&&(t.data=String(e.data)),null!=e.hasComments&&(t.hasComments=Boolean(e.hasComments)),null!=e.state&&(t.state=String(e.state)),null!=e.attributes&&(t.attributes=String(e.attributes)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.id="",n.authorId="",n.type="",n.createdAt="",n.data="",n.hasComments=!1,n.state="",n.attributes=""),null!=e.id&&e.hasOwnProperty("id")&&(n.id=e.id),null!=e.authorId&&e.hasOwnProperty("authorId")&&(n.authorId=e.authorId),null!=e.type&&e.hasOwnProperty("type")&&(n.type=e.type),null!=e.createdAt&&e.hasOwnProperty("createdAt")&&(n.createdAt=e.createdAt),null!=e.data&&e.hasOwnProperty("data")&&(n.data=e.data),null!=e.hasComments&&e.hasOwnProperty("hasComments")&&(n.hasComments=e.hasComments),null!=e.state&&e.hasOwnProperty("state")&&(n.state=e.state),null!=e.attributes&&e.hasOwnProperty("attributes")&&(n.attributes=e.attributes),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/TrackChangesGetSuggestionResponse"},o}(),s.UserDescriptor=function(){function o(e){if(this.attributes=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.attributes=r.emptyArray,o.create=function(e){return new o(e)},o.encode=function(e,t){if(t||(t=n.create()),null!=e.attributes&&e.attributes.length)for(var r=0;r<e.attributes.length;++r)s.KeyValueDescriptor.encode(e.attributes[r],t.uint32(10).fork()).ldelim();return t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.UserDescriptor;e.pos<r;){var i=e.uint32();i>>>3==1?(o.attributes&&o.attributes.length||(o.attributes=[]),o.attributes.push(s.KeyValueDescriptor.decode(e,e.uint32()))):e.skipType(7&i)}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.attributes&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var t=0;t<e.attributes.length;++t){var n=s.KeyValueDescriptor.verify(e.attributes[t]);if(n)return"attributes."+n}}return null},o.fromObject=function(e){if(e instanceof s.UserDescriptor)return e;var t=new s.UserDescriptor;if(e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".UserDescriptor.attributes: array expected");t.attributes=[];for(var n=0;n<e.attributes.length;++n){if("object"!=typeof e.attributes[n])throw TypeError(".UserDescriptor.attributes: object expected");t.attributes[n]=s.KeyValueDescriptor.fromObject(e.attributes[n])}}return t},o.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.attributes=[]),e.attributes&&e.attributes.length){n.attributes=[];for(var r=0;r<e.attributes.length;++r)n.attributes[r]=s.KeyValueDescriptor.toObject(e.attributes[r],t)}return n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/UserDescriptor"},o}(),s.GetManyUsersMessage=function(){function o(e){if(this.ids=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.ids=r.emptyArray,o.create=function(e){return new o(e)},o.encode=function(e,t){if(t||(t=n.create()),null!=e.ids&&e.ids.length)for(var r=0;r<e.ids.length;++r)t.uint32(10).string(e.ids[r]);return t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.GetManyUsersMessage;e.pos<r;){var i=e.uint32();i>>>3==1?(o.ids&&o.ids.length||(o.ids=[]),o.ids.push(e.string())):e.skipType(7&i)}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.ids&&e.hasOwnProperty("ids")){if(!Array.isArray(e.ids))return"ids: array expected";for(var t=0;t<e.ids.length;++t)if(!r.isString(e.ids[t]))return"ids: string[] expected"}return null},o.fromObject=function(e){if(e instanceof s.GetManyUsersMessage)return e;var t=new s.GetManyUsersMessage;if(e.ids){if(!Array.isArray(e.ids))throw TypeError(".GetManyUsersMessage.ids: array expected");t.ids=[];for(var n=0;n<e.ids.length;++n)t.ids[n]=String(e.ids[n])}return t},o.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.ids=[]),e.ids&&e.ids.length){n.ids=[];for(var r=0;r<e.ids.length;++r)n.ids[r]=e.ids[r]}return n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/GetManyUsersMessage"},o}(),s.GetUserMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.id="",o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.id&&Object.hasOwnProperty.call(e,"id")&&t.uint32(10).string(e.id),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.GetUserMessage;e.pos<r;){var i=e.uint32();i>>>3==1?o.id=e.string():e.skipType(7&i)}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.id&&e.hasOwnProperty("id")&&!r.isString(e.id)?"id: string expected":null},o.fromObject=function(e){if(e instanceof s.GetUserMessage)return e;var t=new s.GetUserMessage;return null!=e.id&&(t.id=String(e.id)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.id=""),null!=e.id&&e.hasOwnProperty("id")&&(n.id=e.id),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/GetUserMessage"},o}(),s.GetManyUsersResponse=function(){function o(e){if(this.users=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.users=r.emptyArray,o.create=function(e){return new o(e)},o.encode=function(e,t){if(t||(t=n.create()),null!=e.users&&e.users.length)for(var r=0;r<e.users.length;++r)s.UserDescriptor.encode(e.users[r],t.uint32(10).fork()).ldelim();return t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.GetManyUsersResponse;e.pos<r;){var i=e.uint32();i>>>3==1?(o.users&&o.users.length||(o.users=[]),o.users.push(s.UserDescriptor.decode(e,e.uint32()))):e.skipType(7&i)}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.users&&e.hasOwnProperty("users")){if(!Array.isArray(e.users))return"users: array expected";for(var t=0;t<e.users.length;++t){var n=s.UserDescriptor.verify(e.users[t]);if(n)return"users."+n}}return null},o.fromObject=function(e){if(e instanceof s.GetManyUsersResponse)return e;var t=new s.GetManyUsersResponse;if(e.users){if(!Array.isArray(e.users))throw TypeError(".GetManyUsersResponse.users: array expected");t.users=[];for(var n=0;n<e.users.length;++n){if("object"!=typeof e.users[n])throw TypeError(".GetManyUsersResponse.users: object expected");t.users[n]=s.UserDescriptor.fromObject(e.users[n])}}return t},o.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.users=[]),e.users&&e.users.length){n.users=[];for(var r=0;r<e.users.length;++r)n.users[r]=s.UserDescriptor.toObject(e.users[r],t)}return n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/GetManyUsersResponse"},o}(),s.GetUserResponse=function(){function o(e){if(this.attributes=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.attributes=r.emptyArray,o.create=function(e){return new o(e)},o.encode=function(e,t){if(t||(t=n.create()),null!=e.attributes&&e.attributes.length)for(var r=0;r<e.attributes.length;++r)s.KeyValueDescriptor.encode(e.attributes[r],t.uint32(10).fork()).ldelim();return t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.GetUserResponse;e.pos<r;){var i=e.uint32();i>>>3==1?(o.attributes&&o.attributes.length||(o.attributes=[]),o.attributes.push(s.KeyValueDescriptor.decode(e,e.uint32()))):e.skipType(7&i)}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.attributes&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var t=0;t<e.attributes.length;++t){var n=s.KeyValueDescriptor.verify(e.attributes[t]);if(n)return"attributes."+n}}return null},o.fromObject=function(e){if(e instanceof s.GetUserResponse)return e;var t=new s.GetUserResponse;if(e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".GetUserResponse.attributes: array expected");t.attributes=[];for(var n=0;n<e.attributes.length;++n){if("object"!=typeof e.attributes[n])throw TypeError(".GetUserResponse.attributes: object expected");t.attributes[n]=s.KeyValueDescriptor.fromObject(e.attributes[n])}}return t},o.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.attributes=[]),e.attributes&&e.attributes.length){n.attributes=[];for(var r=0;r<e.attributes.length;++r)n.attributes[r]=s.KeyValueDescriptor.toObject(e.attributes[r],t)}return n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/GetUserResponse"},o}(),s.ChannelMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.type=0,o.prototype.socketId="",o.prototype.data=r.newBuffer([]),o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(8).uint32(e.type),null!=e.socketId&&Object.hasOwnProperty.call(e,"socketId")&&t.uint32(18).string(e.socketId),null!=e.data&&Object.hasOwnProperty.call(e,"data")&&t.uint32(26).bytes(e.data),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.ChannelMessage;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.type=e.uint32();break;case 2:o.socketId=e.string();break;case 3:o.data=e.bytes();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.type&&e.hasOwnProperty("type")&&!r.isInteger(e.type)?"type: integer expected":null!=e.socketId&&e.hasOwnProperty("socketId")&&!r.isString(e.socketId)?"socketId: string expected":null!=e.data&&e.hasOwnProperty("data")&&!(e.data&&"number"==typeof e.data.length||r.isString(e.data))?"data: buffer expected":null},o.fromObject=function(e){if(e instanceof s.ChannelMessage)return e;var t=new s.ChannelMessage;return null!=e.type&&(t.type=e.type>>>0),null!=e.socketId&&(t.socketId=String(e.socketId)),null!=e.data&&("string"==typeof e.data?r.base64.decode(e.data,t.data=r.newBuffer(r.base64.length(e.data)),0):e.data.length>=0&&(t.data=e.data)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.type=0,n.socketId="",t.bytes===String?n.data="":(n.data=[],t.bytes!==Array&&(n.data=r.newBuffer(n.data)))),null!=e.type&&e.hasOwnProperty("type")&&(n.type=e.type),null!=e.socketId&&e.hasOwnProperty("socketId")&&(n.socketId=e.socketId),null!=e.data&&e.hasOwnProperty("data")&&(n.data=t.bytes===String?r.base64.encode(e.data,0,e.data.length):t.bytes===Array?Array.prototype.slice.call(e.data):e.data),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ChannelMessage"},o}(),s.BytesBytesPacketDataMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.data=r.newBuffer([]),o.prototype.data1=r.newBuffer([]),o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.data&&Object.hasOwnProperty.call(e,"data")&&t.uint32(10).bytes(e.data),null!=e.data1&&Object.hasOwnProperty.call(e,"data1")&&t.uint32(18).bytes(e.data1),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.BytesBytesPacketDataMessage;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.data=e.bytes();break;case 2:o.data1=e.bytes();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.data&&e.hasOwnProperty("data")&&!(e.data&&"number"==typeof e.data.length||r.isString(e.data))?"data: buffer expected":null!=e.data1&&e.hasOwnProperty("data1")&&!(e.data1&&"number"==typeof e.data1.length||r.isString(e.data1))?"data1: buffer expected":null},o.fromObject=function(e){if(e instanceof s.BytesBytesPacketDataMessage)return e;var t=new s.BytesBytesPacketDataMessage;return null!=e.data&&("string"==typeof e.data?r.base64.decode(e.data,t.data=r.newBuffer(r.base64.length(e.data)),0):e.data.length>=0&&(t.data=e.data)),null!=e.data1&&("string"==typeof e.data1?r.base64.decode(e.data1,t.data1=r.newBuffer(r.base64.length(e.data1)),0):e.data1.length>=0&&(t.data1=e.data1)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(t.bytes===String?n.data="":(n.data=[],t.bytes!==Array&&(n.data=r.newBuffer(n.data))),t.bytes===String?n.data1="":(n.data1=[],t.bytes!==Array&&(n.data1=r.newBuffer(n.data1)))),null!=e.data&&e.hasOwnProperty("data")&&(n.data=t.bytes===String?r.base64.encode(e.data,0,e.data.length):t.bytes===Array?Array.prototype.slice.call(e.data):e.data),null!=e.data1&&e.hasOwnProperty("data1")&&(n.data1=t.bytes===String?r.base64.encode(e.data1,0,e.data1.length):t.bytes===Array?Array.prototype.slice.call(e.data1):e.data1),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/BytesBytesPacketDataMessage"},o}(),s.NumberBytesPacketDataMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.data=0,o.prototype.data1=r.newBuffer([]),o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.data&&Object.hasOwnProperty.call(e,"data")&&t.uint32(8).uint32(e.data),null!=e.data1&&Object.hasOwnProperty.call(e,"data1")&&t.uint32(18).bytes(e.data1),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.NumberBytesPacketDataMessage;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.data=e.uint32();break;case 2:o.data1=e.bytes();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.data&&e.hasOwnProperty("data")&&!r.isInteger(e.data)?"data: integer expected":null!=e.data1&&e.hasOwnProperty("data1")&&!(e.data1&&"number"==typeof e.data1.length||r.isString(e.data1))?"data1: buffer expected":null},o.fromObject=function(e){if(e instanceof s.NumberBytesPacketDataMessage)return e;var t=new s.NumberBytesPacketDataMessage;return null!=e.data&&(t.data=e.data>>>0),null!=e.data1&&("string"==typeof e.data1?r.base64.decode(e.data1,t.data1=r.newBuffer(r.base64.length(e.data1)),0):e.data1.length>=0&&(t.data1=e.data1)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.data=0,t.bytes===String?n.data1="":(n.data1=[],t.bytes!==Array&&(n.data1=r.newBuffer(n.data1)))),null!=e.data&&e.hasOwnProperty("data")&&(n.data=e.data),null!=e.data1&&e.hasOwnProperty("data1")&&(n.data1=t.bytes===String?r.base64.encode(e.data1,0,e.data1.length):t.bytes===Array?Array.prototype.slice.call(e.data1):e.data1),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/NumberBytesPacketDataMessage"},o}(),s.NumberNumberPacketDataMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.data=0,o.prototype.data1=0,o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.data&&Object.hasOwnProperty.call(e,"data")&&t.uint32(8).uint32(e.data),null!=e.data1&&Object.hasOwnProperty.call(e,"data1")&&t.uint32(16).uint32(e.data1),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.NumberNumberPacketDataMessage;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.data=e.uint32();break;case 2:o.data1=e.uint32();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.data&&e.hasOwnProperty("data")&&!r.isInteger(e.data)?"data: integer expected":null!=e.data1&&e.hasOwnProperty("data1")&&!r.isInteger(e.data1)?"data1: integer expected":null},o.fromObject=function(e){if(e instanceof s.NumberNumberPacketDataMessage)return e;var t=new s.NumberNumberPacketDataMessage;return null!=e.data&&(t.data=e.data>>>0),null!=e.data1&&(t.data1=e.data1>>>0),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.data=0,n.data1=0),null!=e.data&&e.hasOwnProperty("data")&&(n.data=e.data),null!=e.data1&&e.hasOwnProperty("data1")&&(n.data1=e.data1),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/NumberNumberPacketDataMessage"},o}(),s.NumberObjectPacketDataMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.data=0,o.prototype.data1="",o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.data&&Object.hasOwnProperty.call(e,"data")&&t.uint32(8).uint32(e.data),null!=e.data1&&Object.hasOwnProperty.call(e,"data1")&&t.uint32(18).string(e.data1),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.NumberObjectPacketDataMessage;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.data=e.uint32();break;case 2:o.data1=e.string();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.data&&e.hasOwnProperty("data")&&!r.isInteger(e.data)?"data: integer expected":null!=e.data1&&e.hasOwnProperty("data1")&&!r.isString(e.data1)?"data1: string expected":null},o.fromObject=function(e){if(e instanceof s.NumberObjectPacketDataMessage)return e;var t=new s.NumberObjectPacketDataMessage;return null!=e.data&&(t.data=e.data>>>0),null!=e.data1&&(t.data1=String(e.data1)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.data=0,n.data1=""),null!=e.data&&e.hasOwnProperty("data")&&(n.data=e.data),null!=e.data1&&e.hasOwnProperty("data1")&&(n.data1=e.data1),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/NumberObjectPacketDataMessage"},o}(),s.NumberStringPacketDataMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.data=0,o.prototype.data1="",o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.data&&Object.hasOwnProperty.call(e,"data")&&t.uint32(8).uint32(e.data),null!=e.data1&&Object.hasOwnProperty.call(e,"data1")&&t.uint32(18).string(e.data1),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.NumberStringPacketDataMessage;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.data=e.uint32();break;case 2:o.data1=e.string();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.data&&e.hasOwnProperty("data")&&!r.isInteger(e.data)?"data: integer expected":null!=e.data1&&e.hasOwnProperty("data1")&&!r.isString(e.data1)?"data1: string expected":null},o.fromObject=function(e){if(e instanceof s.NumberStringPacketDataMessage)return e;var t=new s.NumberStringPacketDataMessage;return null!=e.data&&(t.data=e.data>>>0),null!=e.data1&&(t.data1=String(e.data1)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.data=0,n.data1=""),null!=e.data&&e.hasOwnProperty("data")&&(n.data=e.data),null!=e.data1&&e.hasOwnProperty("data1")&&(n.data1=e.data1),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/NumberStringPacketDataMessage"},o}(),s.ObjectBufferPacketDataMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.data="",o.prototype.data1=r.newBuffer([]),o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.data&&Object.hasOwnProperty.call(e,"data")&&t.uint32(10).string(e.data),null!=e.data1&&Object.hasOwnProperty.call(e,"data1")&&t.uint32(18).bytes(e.data1),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.ObjectBufferPacketDataMessage;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.data=e.string();break;case 2:o.data1=e.bytes();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.data&&e.hasOwnProperty("data")&&!r.isString(e.data)?"data: string expected":null!=e.data1&&e.hasOwnProperty("data1")&&!(e.data1&&"number"==typeof e.data1.length||r.isString(e.data1))?"data1: buffer expected":null},o.fromObject=function(e){if(e instanceof s.ObjectBufferPacketDataMessage)return e;var t=new s.ObjectBufferPacketDataMessage;return null!=e.data&&(t.data=String(e.data)),null!=e.data1&&("string"==typeof e.data1?r.base64.decode(e.data1,t.data1=r.newBuffer(r.base64.length(e.data1)),0):e.data1.length>=0&&(t.data1=e.data1)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.data="",t.bytes===String?n.data1="":(n.data1=[],t.bytes!==Array&&(n.data1=r.newBuffer(n.data1)))),null!=e.data&&e.hasOwnProperty("data")&&(n.data=e.data),null!=e.data1&&e.hasOwnProperty("data1")&&(n.data1=t.bytes===String?r.base64.encode(e.data1,0,e.data1.length):t.bytes===Array?Array.prototype.slice.call(e.data1):e.data1),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ObjectBufferPacketDataMessage"},o}(),s.ObjectObjectPacketDataMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.data="",o.prototype.data1="",o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.data&&Object.hasOwnProperty.call(e,"data")&&t.uint32(10).string(e.data),null!=e.data1&&Object.hasOwnProperty.call(e,"data1")&&t.uint32(18).string(e.data1),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.ObjectObjectPacketDataMessage;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.data=e.string();break;case 2:o.data1=e.string();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.data&&e.hasOwnProperty("data")&&!r.isString(e.data)?"data: string expected":null!=e.data1&&e.hasOwnProperty("data1")&&!r.isString(e.data1)?"data1: string expected":null},o.fromObject=function(e){if(e instanceof s.ObjectObjectPacketDataMessage)return e;var t=new s.ObjectObjectPacketDataMessage;return null!=e.data&&(t.data=String(e.data)),null!=e.data1&&(t.data1=String(e.data1)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.data="",n.data1=""),null!=e.data&&e.hasOwnProperty("data")&&(n.data=e.data),null!=e.data1&&e.hasOwnProperty("data1")&&(n.data1=e.data1),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ObjectObjectPacketDataMessage"},o}(),s.PacketMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.type=0,o.prototype.id=0,o.prototype.nsp="",o.prototype.data=r.newBuffer([]),o.prototype.options=r.newBuffer([]),o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(8).uint32(e.type),null!=e.id&&Object.hasOwnProperty.call(e,"id")&&t.uint32(16).uint32(e.id),null!=e.nsp&&Object.hasOwnProperty.call(e,"nsp")&&t.uint32(26).string(e.nsp),null!=e.data&&Object.hasOwnProperty.call(e,"data")&&t.uint32(34).bytes(e.data),null!=e.options&&Object.hasOwnProperty.call(e,"options")&&t.uint32(42).bytes(e.options),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.PacketMessage;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.type=e.uint32();break;case 2:o.id=e.uint32();break;case 3:o.nsp=e.string();break;case 4:o.data=e.bytes();break;case 5:o.options=e.bytes();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.type&&e.hasOwnProperty("type")&&!r.isInteger(e.type)?"type: integer expected":null!=e.id&&e.hasOwnProperty("id")&&!r.isInteger(e.id)?"id: integer expected":null!=e.nsp&&e.hasOwnProperty("nsp")&&!r.isString(e.nsp)?"nsp: string expected":null!=e.data&&e.hasOwnProperty("data")&&!(e.data&&"number"==typeof e.data.length||r.isString(e.data))?"data: buffer expected":null!=e.options&&e.hasOwnProperty("options")&&!(e.options&&"number"==typeof e.options.length||r.isString(e.options))?"options: buffer expected":null},o.fromObject=function(e){if(e instanceof s.PacketMessage)return e;var t=new s.PacketMessage;return null!=e.type&&(t.type=e.type>>>0),null!=e.id&&(t.id=e.id>>>0),null!=e.nsp&&(t.nsp=String(e.nsp)),null!=e.data&&("string"==typeof e.data?r.base64.decode(e.data,t.data=r.newBuffer(r.base64.length(e.data)),0):e.data.length>=0&&(t.data=e.data)),null!=e.options&&("string"==typeof e.options?r.base64.decode(e.options,t.options=r.newBuffer(r.base64.length(e.options)),0):e.options.length>=0&&(t.options=e.options)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.type=0,n.id=0,n.nsp="",t.bytes===String?n.data="":(n.data=[],t.bytes!==Array&&(n.data=r.newBuffer(n.data))),t.bytes===String?n.options="":(n.options=[],t.bytes!==Array&&(n.options=r.newBuffer(n.options)))),null!=e.type&&e.hasOwnProperty("type")&&(n.type=e.type),null!=e.id&&e.hasOwnProperty("id")&&(n.id=e.id),null!=e.nsp&&e.hasOwnProperty("nsp")&&(n.nsp=e.nsp),null!=e.data&&e.hasOwnProperty("data")&&(n.data=t.bytes===String?r.base64.encode(e.data,0,e.data.length):t.bytes===Array?Array.prototype.slice.call(e.data):e.data),null!=e.options&&e.hasOwnProperty("options")&&(n.options=t.bytes===String?r.base64.encode(e.options,0,e.options.length):t.bytes===Array?Array.prototype.slice.call(e.options):e.options),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/PacketMessage"},o}(),s.PacketOptionsMessage=function(){function o(e){if(this.rooms=[],this.except=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.flags="",o.prototype.rooms=r.emptyArray,o.prototype.except=r.emptyArray,o.create=function(e){return new o(e)},o.encode=function(e,t){if(t||(t=n.create()),null!=e.flags&&Object.hasOwnProperty.call(e,"flags")&&t.uint32(10).string(e.flags),null!=e.rooms&&e.rooms.length)for(var r=0;r<e.rooms.length;++r)t.uint32(18).string(e.rooms[r]);if(null!=e.except&&e.except.length)for(r=0;r<e.except.length;++r)t.uint32(26).string(e.except[r]);return t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.PacketOptionsMessage;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.flags=e.string();break;case 2:o.rooms&&o.rooms.length||(o.rooms=[]),o.rooms.push(e.string());break;case 3:o.except&&o.except.length||(o.except=[]),o.except.push(e.string());break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.flags&&e.hasOwnProperty("flags")&&!r.isString(e.flags))return"flags: string expected";if(null!=e.rooms&&e.hasOwnProperty("rooms")){if(!Array.isArray(e.rooms))return"rooms: array expected";for(var t=0;t<e.rooms.length;++t)if(!r.isString(e.rooms[t]))return"rooms: string[] expected"}if(null!=e.except&&e.hasOwnProperty("except")){if(!Array.isArray(e.except))return"except: array expected";for(t=0;t<e.except.length;++t)if(!r.isString(e.except[t]))return"except: string[] expected"}return null},o.fromObject=function(e){if(e instanceof s.PacketOptionsMessage)return e;var t=new s.PacketOptionsMessage;if(null!=e.flags&&(t.flags=String(e.flags)),e.rooms){if(!Array.isArray(e.rooms))throw TypeError(".PacketOptionsMessage.rooms: array expected");t.rooms=[];for(var n=0;n<e.rooms.length;++n)t.rooms[n]=String(e.rooms[n])}if(e.except){if(!Array.isArray(e.except))throw TypeError(".PacketOptionsMessage.except: array expected");for(t.except=[],n=0;n<e.except.length;++n)t.except[n]=String(e.except[n])}return t},o.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.rooms=[],n.except=[]),t.defaults&&(n.flags=""),null!=e.flags&&e.hasOwnProperty("flags")&&(n.flags=e.flags),e.rooms&&e.rooms.length){n.rooms=[];for(var r=0;r<e.rooms.length;++r)n.rooms[r]=e.rooms[r]}if(e.except&&e.except.length)for(n.except=[],r=0;r<e.except.length;++r)n.except[r]=e.except[r];return n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/PacketOptionsMessage"},o}(),s.StringBytesPacketDataMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.data="",o.prototype.data1=r.newBuffer([]),o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.data&&Object.hasOwnProperty.call(e,"data")&&t.uint32(10).string(e.data),null!=e.data1&&Object.hasOwnProperty.call(e,"data1")&&t.uint32(18).bytes(e.data1),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.StringBytesPacketDataMessage;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.data=e.string();break;case 2:o.data1=e.bytes();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.data&&e.hasOwnProperty("data")&&!r.isString(e.data)?"data: string expected":null!=e.data1&&e.hasOwnProperty("data1")&&!(e.data1&&"number"==typeof e.data1.length||r.isString(e.data1))?"data1: buffer expected":null},o.fromObject=function(e){if(e instanceof s.StringBytesPacketDataMessage)return e;var t=new s.StringBytesPacketDataMessage;return null!=e.data&&(t.data=String(e.data)),null!=e.data1&&("string"==typeof e.data1?r.base64.decode(e.data1,t.data1=r.newBuffer(r.base64.length(e.data1)),0):e.data1.length>=0&&(t.data1=e.data1)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.data="",t.bytes===String?n.data1="":(n.data1=[],t.bytes!==Array&&(n.data1=r.newBuffer(n.data1)))),null!=e.data&&e.hasOwnProperty("data")&&(n.data=e.data),null!=e.data1&&e.hasOwnProperty("data1")&&(n.data1=t.bytes===String?r.base64.encode(e.data1,0,e.data1.length):t.bytes===Array?Array.prototype.slice.call(e.data1):e.data1),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/StringBytesPacketDataMessage"},o}(),s.StringNumberPacketDataMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.data="",o.prototype.data1=0,o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.data&&Object.hasOwnProperty.call(e,"data")&&t.uint32(10).string(e.data),null!=e.data1&&Object.hasOwnProperty.call(e,"data1")&&t.uint32(16).uint32(e.data1),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.StringNumberPacketDataMessage;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.data=e.string();break;case 2:o.data1=e.uint32();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.data&&e.hasOwnProperty("data")&&!r.isString(e.data)?"data: string expected":null!=e.data1&&e.hasOwnProperty("data1")&&!r.isInteger(e.data1)?"data1: integer expected":null},o.fromObject=function(e){if(e instanceof s.StringNumberPacketDataMessage)return e;var t=new s.StringNumberPacketDataMessage;return null!=e.data&&(t.data=String(e.data)),null!=e.data1&&(t.data1=e.data1>>>0),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.data="",n.data1=0),null!=e.data&&e.hasOwnProperty("data")&&(n.data=e.data),null!=e.data1&&e.hasOwnProperty("data1")&&(n.data1=e.data1),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/StringNumberPacketDataMessage"},o}(),s.StringObjectPacketDataMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.data="",o.prototype.data1="",o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.data&&Object.hasOwnProperty.call(e,"data")&&t.uint32(10).string(e.data),null!=e.data1&&Object.hasOwnProperty.call(e,"data1")&&t.uint32(18).string(e.data1),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.StringObjectPacketDataMessage;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.data=e.string();break;case 2:o.data1=e.string();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.data&&e.hasOwnProperty("data")&&!r.isString(e.data)?"data: string expected":null!=e.data1&&e.hasOwnProperty("data1")&&!r.isString(e.data1)?"data1: string expected":null},o.fromObject=function(e){if(e instanceof s.StringObjectPacketDataMessage)return e;var t=new s.StringObjectPacketDataMessage;return null!=e.data&&(t.data=String(e.data)),null!=e.data1&&(t.data1=String(e.data1)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.data="",n.data1=""),null!=e.data&&e.hasOwnProperty("data")&&(n.data=e.data),null!=e.data1&&e.hasOwnProperty("data1")&&(n.data1=e.data1),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/StringObjectPacketDataMessage"},o}(),s.StringStringPacketDataMessage=function(){function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return o.prototype.data="",o.prototype.data1="",o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=n.create()),null!=e.data&&Object.hasOwnProperty.call(e,"data")&&t.uint32(10).string(e.data),null!=e.data1&&Object.hasOwnProperty.call(e,"data1")&&t.uint32(18).string(e.data1),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,o=new s.StringStringPacketDataMessage;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:o.data=e.string();break;case 2:o.data1=e.string();break;default:e.skipType(7&i)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.data&&e.hasOwnProperty("data")&&!r.isString(e.data)?"data: string expected":null!=e.data1&&e.hasOwnProperty("data1")&&!r.isString(e.data1)?"data1: string expected":null},o.fromObject=function(e){if(e instanceof s.StringStringPacketDataMessage)return e;var t=new s.StringStringPacketDataMessage;return null!=e.data&&(t.data=String(e.data)),null!=e.data1&&(t.data1=String(e.data1)),t},o.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.data="",n.data1=""),null!=e.data&&e.hasOwnProperty("data")&&(n.data=e.data),null!=e.data1&&e.hasOwnProperty("data1")&&(n.data1=e.data1),n},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/StringStringPacketDataMessage"},o}(),s},s=[n(8934)],void 0===(o="function"==typeof(r=i)?r.apply(t,s):r)||(e.exports=o)},3130:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=class{constructor(...e){}}},9425:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t._SERVICE=void 0;const s=n(4584),o=r(n(1774)),i=n(1244),a=r(n(4070)),c=r(n(1030)),u=r(n(7477));t._SERVICE=13;class d extends((0,s.EmitterMixin)()){static async isBundleUploaded(e,t){const n=new a.default(t);if(e.state!==i.WEB_SOCKET_GATEWAY_STATES.CONNECTED)throw new u.default("WebSocket Gateway is not connected.",e);const r=await e._sendRequest(d._SERVICE,a.default.TYPE,o.default.encode(n));return o.default.decode(r,c.default).isUploaded}}d._SERVICE=t._SERVICE,t.default=d},4070:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e){super(),this.bundleVersion=e}toJSON(){return{bundleVersion:this.bundleVersion}}static fromJSON(e){return new o(e.bundleVersion)}}t.default=o,o.TYPE="131",o.READABLE_TYPE_NAME="isEditorBundleUploaded",o.DESCRIPTOR_NAME="IsEditorBundleUploadedMessage",o.DESCRIPTOR={fields:{bundleVersion:{type:"string",id:1}}}},1030:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e){super(),this.isUploaded=e}toJSON(){return{isUploaded:this.isUploaded}}static fromJSON(e){return new o(e.isUploaded)}}t.default=o,o.DESCRIPTOR_NAME="IsEditorBundleUploadedResponse",o.DESCRIPTOR={fields:{isUploaded:{type:"bool",id:1}}}},2352:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(7477));class o extends s.default{constructor(e,t){super(e+" Service is not connected.",t)}}t.default=o},1987:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return s(t,e),t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.AddCommentThreadMessage=t.IsEditorBundleUploadedResponse=t.IsEditorBundleUploadedMessage=t.GetDocumentDetailsResponse=t.GetDocumentDetailsMessage=t.ChannelMessage=t.RevisionHistoryUpdateRevisionsResponse=t.RevisionHistoryGetRevisionResponse=t.RevisionHistoryConnectResponse=t.RevisionHistoryUpdateRevisionsMessage=t.RevisionHistoryGetRevisionMessage=t.RevisionHistoryReconnectMessage=t.RevisionHistoryConnectMessage=t.User=t.GetManyUsersResponse=t.GetUserResponse=t.GetManyUsersMessage=t.GetUserMessage=t.BatchUpdateSuggestionsStateMessage=t.UpdateSuggestionMessage=t.GetSuggestionMessage=t.GetAllSuggestionsMessage=t.ConnectTrackChangesMessage=t.GetSuggestionResponse=t.GetAllSuggestionsResponse=t.ConnectTrackChangesResponse=t.AddSuggestionResponse=t.AddSuggestionMessage=t.SocketDisconnectMessage=t.SocketConnectMessage=t.SessionsConnectResponse=t.SessionsConnectMessage=t.GetCommentThreadResponse=t.ConnectCommentsResponse=t.AddCommentResponse=t.UpdateCommentMessage=t.RemoveCommentThreadMessage=t.GetDocumentThreadsResponse=t.RemoveCommentMessage=t.GetDocumentThreadsMessage=t.GetCommentThreadMessage=t.ConnectCommentsMessage=t.AddCommentMessage=t.CollaborativeEditingResponse=t.CollaborativeEditingConnectResponse=t.CollaborativeEditingUpdateMessage=t.CollaborativeEditingReconnectMessage=t.CollaborativeEditingConnectMessage=t.MessagesMapper=t.MessagesCompressor=void 0,t.Parser=t.PacketParser=t.Decoder=t.Encoder=t.ResolveCommentThreadResponse=t.AddCommentThreadResponse=t.UpdateCommentThreadMessage=t.ResolveCommentThreadMessage=t.ReopenCommentThreadMessage=void 0;const a=i(n(1774));t.MessagesCompressor=a.default;const c=i(n(8154));t.MessagesMapper=c.default;const u=i(n(7261));t.CollaborativeEditingConnectMessage=u.default;const d=i(n(9168));t.CollaborativeEditingReconnectMessage=d.default;const l=i(n(4766));t.CollaborativeEditingUpdateMessage=l.default;const p=i(n(242));t.CollaborativeEditingConnectResponse=p.default;const h=i(n(3049));t.CollaborativeEditingResponse=h.default;const f=i(n(9031));t.GetDocumentDetailsMessage=f.default;const m=i(n(8359));t.GetDocumentDetailsResponse=m.default;const y=i(n(5797));t.GetManyUsersMessage=y.default;const g=i(n(8605));t.GetManyUsersResponse=g.default;const b=i(n(9403));t.GetUserMessage=b.default;const O=i(n(6947));t.GetUserResponse=O.default;const v=i(n(7861));t.User=v.default;const w=i(n(8741));t.AddCommentMessage=w.default;const I=i(n(1763));t.AddCommentResponse=I.default;const _=i(n(6033));t.ConnectCommentsMessage=_.default;const S=i(n(8610));t.GetCommentThreadMessage=S.default;const P=i(n(4451));t.GetDocumentThreadsMessage=P.default;const A=i(n(1973));t.GetDocumentThreadsResponse=A.default;const T=i(n(1452));t.RemoveCommentMessage=T.default;const k=i(n(8852));t.RemoveCommentThreadMessage=k.default;const C=i(n(2481));t.UpdateCommentMessage=C.default;const E=i(n(6599));t.ConnectCommentsResponse=E.default;const j=i(n(8994));t.GetCommentThreadResponse=j.default;const D=i(n(2603));t.UpdateCommentThreadMessage=D.default;const R=i(n(5632));t.ResolveCommentThreadMessage=R.default;const M=i(n(2015));t.ReopenCommentThreadMessage=M.default;const N=i(n(9811));t.AddCommentThreadMessage=N.default;const x=i(n(8477));t.AddCommentThreadResponse=x.default;const V=i(n(7140));t.ResolveCommentThreadResponse=V.default;const B=i(n(8016));t.SessionsConnectMessage=B.default;const U=i(n(1644));t.SessionsConnectResponse=U.default;const J=i(n(5928));t.SocketConnectMessage=J.default;const q=i(n(1196));t.SocketDisconnectMessage=q.default;const G=i(n(92));t.AddSuggestionMessage=G.default;const L=i(n(6068));t.AddSuggestionResponse=L.default;const Y=i(n(827));t.GetAllSuggestionsResponse=Y.default;const F=i(n(5659));t.GetSuggestionResponse=F.default;const z=i(n(8961));t.GetSuggestionMessage=z.default;const H=i(n(785));t.GetAllSuggestionsMessage=H.default;const K=i(n(3460));t.UpdateSuggestionMessage=K.default;const W=i(n(7079));t.ConnectTrackChangesMessage=W.default;const $=i(n(3917));t.ConnectTrackChangesResponse=$.default;const Q=i(n(9212));t.BatchUpdateSuggestionsStateMessage=Q.default;const X=i(n(8291));t.RevisionHistoryConnectMessage=X.default;const Z=i(n(3322));t.RevisionHistoryReconnectMessage=Z.default;const ee=i(n(9370));t.RevisionHistoryGetRevisionMessage=ee.default;const te=i(n(3826));t.RevisionHistoryUpdateRevisionsMessage=te.default;const ne=i(n(9399));t.RevisionHistoryConnectResponse=ne.default;const re=i(n(4360));t.RevisionHistoryGetRevisionResponse=re.default;const se=i(n(2608));t.RevisionHistoryUpdateRevisionsResponse=se.default;const oe=i(n(1030));t.IsEditorBundleUploadedResponse=oe.default;const ie=i(n(4070));t.IsEditorBundleUploadedMessage=ie.default;const ae=o(n(9924));t.Parser=ae;const ce=i(n(6444));t.PacketParser=ce.default;const ue=i(n(7868));t.ChannelMessage=ue.default;const{Encoder:de,Decoder:le}=ae;t.Encoder=de,t.Decoder=le},8844:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(3130));class o extends s.default{constructor(...e){super()}static fromJSON(e){throw new TypeError("Must be implemented in a child class!")}}t.default=o,o.TYPE="1000"},1774:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(6504));function o(e){return s.default[e.DESCRIPTOR_NAME]}t.default=class{static decode(e,t){const n=o(t).decode("undefined"==typeof window?e:new Uint8Array(e));return t.fromJSON({...n})}static encode(e){const t=o(e.constructor),n=e.toJSON(),r=t.verify(n);if(r)throw Error(r);return t.encode(t.create(n)).finish()}}},8154:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(7261)),o=r(n(9168)),i=r(n(4766)),a=r(n(9031)),c=r(n(8741)),u=r(n(6033)),d=r(n(8610)),l=r(n(4451)),p=r(n(1452)),h=r(n(8852)),f=r(n(2481)),m=r(n(8016)),y=r(n(5928)),g=r(n(1196)),b=r(n(92)),O=r(n(785)),v=r(n(8961)),w=r(n(3460)),I=r(n(7079)),_=r(n(9212)),S=r(n(9403)),P=r(n(5797)),A=r(n(8291)),T=r(n(3322)),k=r(n(9370)),C=r(n(3826)),E=r(n(4070)),j=r(n(5632)),D=r(n(2015)),R=r(n(2603)),M=r(n(9811)),N=new Map([[s.default.TYPE,s.default.READABLE_TYPE_NAME],[o.default.TYPE,o.default.READABLE_TYPE_NAME],[i.default.TYPE,i.default.READABLE_TYPE_NAME],[a.default.TYPE,a.default.READABLE_TYPE_NAME],[c.default.TYPE,c.default.READABLE_TYPE_NAME],[u.default.TYPE,u.default.READABLE_TYPE_NAME],[d.default.TYPE,d.default.READABLE_TYPE_NAME],[l.default.TYPE,l.default.READABLE_TYPE_NAME],[p.default.TYPE,p.default.READABLE_TYPE_NAME],[h.default.TYPE,h.default.READABLE_TYPE_NAME],[f.default.TYPE,f.default.READABLE_TYPE_NAME],[m.default.TYPE,m.default.READABLE_TYPE_NAME],[y.default.TYPE,y.default.READABLE_TYPE_NAME],[g.default.TYPE,g.default.READABLE_TYPE_NAME],[b.default.TYPE,b.default.READABLE_TYPE_NAME],[v.default.TYPE,v.default.READABLE_TYPE_NAME],[w.default.TYPE,w.default.READABLE_TYPE_NAME],[O.default.TYPE,O.default.READABLE_TYPE_NAME],[I.default.TYPE,I.default.READABLE_TYPE_NAME],[_.default.TYPE,_.default.READABLE_TYPE_NAME],[S.default.TYPE,S.default.READABLE_TYPE_NAME],[P.default.TYPE,P.default.READABLE_TYPE_NAME],[A.default.TYPE,A.default.READABLE_TYPE_NAME],[T.default.TYPE,T.default.READABLE_TYPE_NAME],[k.default.TYPE,k.default.READABLE_TYPE_NAME],[C.default.TYPE,C.default.READABLE_TYPE_NAME],[E.default.TYPE,E.default.READABLE_TYPE_NAME],[j.default.TYPE,j.default.READABLE_TYPE_NAME],[D.default.TYPE,D.default.READABLE_TYPE_NAME],[R.default.TYPE,R.default.READABLE_TYPE_NAME],[M.default.TYPE,M.default.READABLE_TYPE_NAME]]);t.default=class{static typeToStringName(e){var t;return null!==(t=N.get(String(e)))&&void 0!==t?t:e}}},9858:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(3130));class o extends s.default{static create(e){return{revisionId:e.id,name:e.name,creatorId:e.creatorId,createdAt:e.createdAt,fromVersion:e.fromVersion,toVersion:e.toVersion,isEmptyCurrent:e.isEmptyCurrent,diffData:e.diffData?JSON.stringify(e.diffData):void 0,attributes:e.attributes,authorsIds:e.authorsIds}}static toJSON(e){var t;return{revisionId:e.revisionId,name:e.name,creatorId:e.creatorId,authorsIds:e.authorsIds?JSON.stringify(e.authorsIds):void 0,diffData:e.diffData,createdAt:null===(t=e.createdAt)||void 0===t?void 0:t.toISOString(),attributes:e.attributes?JSON.stringify(e.attributes):void 0,toVersion:e.toVersion,fromVersion:e.fromVersion,isEmptyCurrent:e.isEmptyCurrent}}static fromJSON(e){return{revisionId:(e={...e}).revisionId,name:e.name,creatorId:e.creatorId,authorsIds:e.authorsIds?JSON.parse(e.authorsIds):void 0,diffData:e.diffData,createdAt:e.createdAt?new Date(e.createdAt):void 0,attributes:e.attributes?JSON.parse(e.attributes):void 0,toVersion:e.toVersion,fromVersion:e.fromVersion,isEmptyCurrent:e.isEmptyCurrent}}static toObject(e){return function(e){for(const[t,n]of Object.entries(e))void 0===n&&delete e[t];return e}({id:e.revisionId,name:e.name,creatorId:e.creatorId,createdAt:e.createdAt,fromVersion:e.fromVersion,toVersion:e.toVersion,isEmptyCurrent:e.isEmptyCurrent,diffData:e.diffData?JSON.parse(e.diffData):void 0,attributes:e.attributes,authorsIds:e.authorsIds})}}t.default=o,o.DESCRIPTOR_NAME="RevisionDescriptor",o.DESCRIPTOR={fields:{revisionId:{type:"string",id:1},name:{type:"string",id:2},creatorId:{type:"string",id:3},authorsIds:{type:"string",id:4},diffData:{type:"string",id:5},createdAt:{type:"string",id:6},attributes:{type:"string",id:7},toVersion:{type:"uint32",id:8},fromVersion:{type:"uint32",id:9},isEmptyCurrent:{type:"bool",id:10}}}},8291:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e){super(),this.documentId=e}toJSON(){return{documentId:this.documentId}}static fromJSON(e){return new o(e.documentId)}}t.default=o,o.TYPE="121",o.READABLE_TYPE_NAME="connectToRevisionHistory",o.DESCRIPTOR_NAME="RevisionHistoryConnectMessage",o.DESCRIPTOR={fields:{documentId:{type:"string",id:1}}}},9370:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e,t){super(),this.documentId=e,this.revisionId=t}toJSON(){return{documentId:this.documentId,revisionId:this.revisionId}}static fromJSON(e){return new o(e.documentId,e.revisionId)}}t.default=o,o.TYPE="123",o.READABLE_TYPE_NAME="getRevision",o.DESCRIPTOR_NAME="RevisionHistoryGetRevisionMessage",o.DESCRIPTOR={fields:{documentId:{type:"string",id:1},revisionId:{type:"string",id:2}}}},3322:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e,t){super(),this.documentId=e,this.requestId=t}toJSON(){return{documentId:this.documentId,requestId:this.requestId}}static fromJSON(e){return new o(e.documentId,e.requestId)}}t.default=o,o.TYPE="122",o.READABLE_TYPE_NAME="reconnectToRevisionHistory",o.DESCRIPTOR_NAME="RevisionHistoryReconnectMessage",o.DESCRIPTOR={fields:{documentId:{type:"string",id:1},requestId:{type:"uint32",id:2}}}},3826:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844)),o=r(n(9858));class i extends s.default{constructor(e,t,n){super(),this.documentId=e,this.requestId=t,this.revisions=n}toJSON(){return{documentId:this.documentId,requestId:this.requestId,revisions:this.revisions.map(o.default.toJSON)}}toObject(){return{documentId:this.documentId,requestId:this.requestId,revisions:this.revisions.map(o.default.toObject)}}static create(e){return new i(e.documentId,e.requestId,e.revisions.map(o.default.create))}static fromJSON(e){return new i(e.documentId,e.requestId,e.revisions.map(o.default.fromJSON))}}t.default=i,i.TYPE="124",i.READABLE_TYPE_NAME="updateRevisions",i.DESCRIPTOR_NAME="RevisionHistoryUpdateRevisionsMessage",i.DESCRIPTOR={fields:{documentId:{type:"string",id:1},requestId:{type:"uint32",id:2},revisions:{type:"RevisionDescriptor",id:3,rule:"repeated"}}}},9399:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844)),o=r(n(9858));class i extends s.default{constructor(e,t,n){super(),this.channel=e,this.requestId=t,this.revisions=n}toJSON(){return{channel:this.channel,requestId:this.requestId,revisions:this.revisions.map(o.default.toJSON)}}toObject(){return{channel:this.channel,requestId:this.requestId,revisions:this.revisions.map(o.default.toObject)}}static fromJSON(e){return new i(e.channel,e.requestId,e.revisions.map(o.default.fromJSON))}}t.default=i,i.DESCRIPTOR_NAME="RevisionHistoryConnectResponse",i.DESCRIPTOR={fields:{channel:{type:"string",id:1},requestId:{type:"uint32",id:2},revisions:{type:"RevisionDescriptor",id:3,rule:"repeated"}}}},4360:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844)),o=r(n(9858));class i extends s.default{constructor(e,t,n,r,s,o,i,a,c,u){super(),this.revisionId=e,this.name=t,this.creatorId=n,this.authorsIds=r,this.createdAt=s,this.diffData=o,this.attributes=i,this.fromVersion=a,this.toVersion=c,this.isEmptyCurrent=u}toJSON(){return o.default.toJSON(this)}toObject(){return o.default.toObject(this)}static create(e){return new i(e.revisionId,e.name,e.creatorId,e.authorsIds,e.createdAt,e.diffData,e.attributes,e.fromVersion,e.toVersion,e.isEmptyCurrent)}static fromJSON(e){return new i(e.revisionId,e.name,e.creatorId,e.authorsIds?JSON.parse(e.authorsIds):void 0,e.createdAt?new Date(e.createdAt):void 0,e.diffData,e.attributes?JSON.parse(e.attributes):void 0,e.fromVersion,e.toVersion,e.isEmptyCurrent)}}t.default=i,i.DESCRIPTOR_NAME="RevisionHistoryGetRevisionResponse",i.DESCRIPTOR=o.default.DESCRIPTOR},2608:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e){super(),this.requestId=e}toJSON(){return{requestId:this.requestId}}static fromJSON(e){return new o(e.requestId)}}t.default=o,o.DESCRIPTOR_NAME="RevisionHistoryUpdateRevisionsResponse",o.DESCRIPTOR={fields:{requestId:{type:"uint32",id:1}}}},1696:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return s(t,e),t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t._SERVICE=void 0;const a=n(4584),c=i(n(1774)),u=i(n(9370)),d=i(n(4360)),l=i(n(3826)),p=i(n(2608)),h=i(n(8291)),f=i(n(9399)),m=i(n(3322)),y=i(n(7477)),g=o(n(1244)),b=i(n(2352));t._SERVICE=12;class O extends((0,a.EmitterMixin)()){constructor(e){super(),this._documentId=e,this._isConnected=!1}get isConnected(){return this._isConnected}connect(e){return this._isConnected?Promise.resolve():this._connect(e,new h.default(this._documentId))}disconnect(){this._isConnected&&(this._isConnected=!1,this._wsGateway&&(this.stopListening(this._wsGateway),this._wsGateway=void 0),this._channel&&(this.stopListening(this._channel),this._channel=void 0),this.fire("disconnected"),this.stopListening())}reconnect(e,t){if(this.isConnected)throw new y.default("Cannot reconnect to already connected service.",e);return this._connect(e,new m.default(this._documentId,t))}async updateRevisions(e,t){const n=l.default.create({documentId:this._documentId,requestId:t,revisions:e}),r=await this._sendRequest(l.default.TYPE,n),{requestId:s}=c.default.decode(r,p.default);return s}async getRevision(e){const t=new u.default(this._documentId,e),n=await this._sendRequest(u.default.TYPE,t);return c.default.decode(n,d.default).toObject()}async _connect(e,n){if(e.state!==g.WEB_SOCKET_GATEWAY_STATES.CONNECTED)throw new y.default("WebSocket Gateway is not connected.",e);this._wsGateway=e,this.stopListening(e,"change:state");const r=await e._sendRequest(t._SERVICE,n.constructor.TYPE,c.default.encode(n)),{channel:s,requestId:o,revisions:i}=c.default.decode(r,f.default).toObject();return this.listenTo(e,"change:state",((e,t,n)=>this._onWsGatewayStateChange(n)),{priority:g.default._CHANGE_STATE_EVENT_PRIORITY}),this._connectToChannel(e,s),this._isConnected=!0,this.fire("connected"),{revisions:i,requestId:o}}_connectToChannel(e,t){this._channel=e._getChannel(O._SERVICE,t),this._channel&&this.listenTo(this._channel,this._channel.getEventName(l.default.TYPE),((e,t)=>{const{documentId:n,requestId:r,revisions:s}=c.default.decode(t,l.default).toObject();this.fire("revisionsUpdated",{documentId:n,requestId:r,revisionsData:s})}))}_onWsGatewayStateChange(e){e===g.WEB_SOCKET_GATEWAY_STATES.DISCONNECTED&&this.disconnect()}_sendRequest(e,n){if(!this._wsGateway||!this._isConnected)throw new b.default("Revision History",this);return this._wsGateway._sendRequest(t._SERVICE,e,c.default.encode(n))}}O._SERVICE=t._SERVICE,t.default=O},5111:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return s(t,e),t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.WEB_SOCKET_GATEWAY_STATES=t.CommentsService=t.SessionCollection=t.TrackChangesService=t.WebSocketGateway=t.EditorService=t.RevisionHistoryService=t.CollaborativeEditingService=void 0;const a=o(n(1244));t.WebSocketGateway=a.default,Object.defineProperty(t,"WEB_SOCKET_GATEWAY_STATES",{enumerable:!0,get:function(){return a.WEB_SOCKET_GATEWAY_STATES}});const c=i(n(9425));t.EditorService=c.default;const u=i(n(1696));t.RevisionHistoryService=u.default;const d=i(n(4908));t.TrackChangesService=d.default;const l=i(n(2909));t.SessionCollection=l.default;const p=i(n(44));t.CollaborativeEditingService=p.default;const h=i(n(2924));t.CommentsService=h.default},8016:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e,t){super(),this.id=e,this.sessionType=t}toJSON(){return{id:this.id,sessionType:this.sessionType}}static fromJSON(e){return new o(e.id,e.sessionType)}}t.default=o,o.TYPE="31",o.READABLE_TYPE_NAME="getConnectedSockets",o.DESCRIPTOR_NAME="SessionsConnectMessage",o.DESCRIPTOR={fields:{id:{type:"string",id:1},sessionType:{type:"uint32",id:2}}}},5928:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e,t,n,r){super(),this.id=e,this.userId=t,this.role=n,this.permissions=r}toJSON(){var e,t,n;return{id:this.id,userId:null!==(e=this.userId)&&void 0!==e?e:void 0,role:null!==(t=this.role)&&void 0!==t?t:void 0,permissions:null!==(n=this.permissions)&&void 0!==n?n:void 0}}static fromJSON(e){return new o(e.id,e.userId,e.role,e.permissions)}}t.default=o,o.TYPE="32",o.READABLE_TYPE_NAME="connectSocket",o.DESCRIPTOR_NAME="SocketConnectMessage",o.DESCRIPTOR={fields:{id:{type:"string",id:1},userId:{type:"string",id:2},role:{type:"string",id:3},permissions:{rule:"repeated",type:"string",id:4}}}},1196:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e){super(),this.id=e}toJSON(){return{id:this.id}}static fromJSON(e){return new o(e.id)}}t.default=o,o.TYPE="33",o.READABLE_TYPE_NAME="disconnectSocket",o.DESCRIPTOR_NAME="SocketDisconnectMessage",o.DESCRIPTOR={fields:{id:{type:"string",id:1}}}},1644:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e,t=[]){super(),this.channel=e,this.sockets=t}toJSON(){return{channel:this.channel,sockets:this.sockets.map((e=>({user:e.userId,session:e.id,role:e.role,permissions:e.permissions})))}}static fromJSON(e){return new o(e.channel,e.sockets.map((e=>({id:e.session,userId:e.user,role:e.role,permissions:e.permissions}))))}}t.default=o,o.DESCRIPTOR_NAME="SessionsConnectResponse",o.DESCRIPTOR={fields:{channel:{type:"string",id:1},sockets:{rule:"repeated",type:"SessionsSocketDescriptor",id:2}}}},2909:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=n(4584),o=n(4096),i=r(n(7861)),a=r(n(1244)),c=r(n(1644)),u=r(n(8016)),d=r(n(5928)),l=r(n(1196)),p=r(n(1774));class h extends s.Collection{constructor(e,t){super({idProperty:"id"}),this._id=e,this._sessionType=t,this._handlers=new Map,this._eventsQueue=[],this._isRunning=!1}async connect(e){this._wsGateway=e,this.stopListening(e,"change:state");const t=new u.default(this._id,this._sessionType);let n;try{const e=await this._wsGateway._sendRequest(o._SERVICE,u.default.TYPE,p.default.encode(t));n=p.default.decode(e,c.default)}catch(e){n=new c.default(this._id,[])}this._connectToChannel(this._wsGateway,n.channel,this._sessionType);const r=await async function(e,t){const n=t.map((e=>e.userId)),r=n.length?await i.default.getMany(e,n):[];return t.map((e=>{const t={id:e.id,role:e.role,permissions:e.permissions};return t.user=e.userId&&r.find((t=>t.id===e.userId))||new i.default,t}))}(this._wsGateway,n.sockets);for(const e of r)super.add(e);this._connected=!0,this.fire("connected"),this.listenTo(this._wsGateway,"change:state",((e,t,n)=>this._onWsGatewayStateChange(n)),{priority:a.default._CHANGE_STATE_EVENT_PRIORITY}),await this._runQueue()}disconnect(e=!0){if(this._connected){for(this._connected=!1,this._eventsQueue=[];this.length;)super.remove(0);this._channel&&(this.stopListening(this._channel),this._channel=void 0),this._wsGateway&&e&&(this.stopListening(this._wsGateway),this._wsGateway=void 0),this.fire("disconnected"),e&&this.stopListening()}}add(e,t){throw new TypeError("The collection is read-only.")}remove(e){throw new TypeError("The collection is read-only.")}_connectToChannel(e,t,n){this._channel=e._getChannel(n,t),this._channel&&(this._addHandler(this._channel,d.default.TYPE,(async t=>{const n=p.default.decode(t,d.default);if(-1===this.getIndex(n.id)){const t={id:n.id,role:n.role,permissions:n.permissions};n.userId&&(t.user=await i.default.get(e,n.userId)),super.add(t)}})),this._addHandler(this._channel,l.default.TYPE,(e=>{const t=p.default.decode(e,l.default);-1!==this.getIndex(t.id)&&super.remove(t.id)})))}async _onWsGatewayStateChange(e){e===a.default.STATE_DISCONNECTED&&this.disconnect(!1),e===a.default.STATE_CONNECTED&&await this.connect(this._wsGateway)}async _runQueue(){if(this._isRunning||!this._connected)return;let e;for(this._isRunning=!0;e=this._eventsQueue.shift();){const t=this._handlers.get(e.eventName);t&&await t(e.data)}this._isRunning=!1}_addHandler(e,t,n){const r=e.getEventName(t,!0);this.listenTo(e,r,(async(e,t)=>{const n=e.name;this._eventsQueue.push({eventName:n,data:t}),await this._runQueue()})),this._handlers.set(r,n)}}t.default=h},4096:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t._SERVICE=void 0;const s=r(n(2909));t._SERVICE=3,t.default=class{static async getConnectedSessions(e,t,n){const r=new s.default(t,n);return await r.connect(e),r}}},3721:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(3130));class o extends s.default{static toJSON(e){var t;return{...e,data:e.data?JSON.stringify(e.data):e.data,attributes:e.attributes?JSON.stringify(e.attributes):e.attributes,createdAt:null===(t=e.createdAt)||void 0===t?void 0:t.toISOString()}}static fromJSON(e){return{...e,data:e.data?JSON.parse(e.data):e.data,attributes:e.attributes?JSON.parse(e.attributes):e.attributes,createdAt:e.createdAt?new Date(e.createdAt):void 0}}}t.default=o,o.DESCRIPTOR_NAME="SuggestionDescriptor",o.DESCRIPTOR={fields:{id:{id:1,type:"string"},authorId:{id:2,type:"string"},type:{id:3,type:"string"},createdAt:{id:4,type:"string"},data:{id:5,type:"string"},hasComments:{id:6,type:"bool"},state:{id:7,type:"string"},attributes:{id:8,type:"string"}}}},92:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e,t,n,r={},s=null,o=null){super(),this.id=e,this.documentId=t,this.type=n,this.data=r,this.originalSuggestionId=s,this.attributes=o}toJSON(){return{id:this.id,documentId:this.documentId,type:this.type,data:JSON.stringify(this.data),originalSuggestionId:this.originalSuggestionId,attributes:JSON.stringify(this.attributes)}}static fromJSON(e){var t;return new o(e.id,e.documentId,e.type,JSON.parse(e.data),null!==(t=e.originalSuggestionId)&&void 0!==t?t:null,e.attributes?JSON.parse(e.attributes):null)}}t.default=o,o.TYPE="101",o.READABLE_TYPE_NAME="addSuggestion",o.DESCRIPTOR_NAME="TrackChangesAddSuggestionMessage",o.DESCRIPTOR={fields:{id:{type:"string",id:1},documentId:{type:"string",id:2},type:{type:"string",id:3},data:{type:"string",id:4},originalSuggestionId:{type:"string",id:5},attributes:{type:"string",id:6}}}},9212:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e,t,n){super(),this.ids=e,this.documentId=t,this.state=n}toJSON(){return{ids:this.ids,documentId:this.documentId,state:this.state}}static fromJSON(e){return new o(e.ids,e.documentId,e.state)}}t.default=o,o.TYPE="106",o.READABLE_TYPE_NAME="batchUpdateSuggestionsState",o.DESCRIPTOR_NAME="TrackChangesBatchUpdateSuggestionsStateMessage",o.DESCRIPTOR={fields:{ids:{type:"string",rule:"repeated",id:1},documentId:{type:"string",id:2},state:{type:"string",id:3}}}},7079:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e){super(),this.documentId=e}toJSON(){return{documentId:this.documentId}}static fromJSON(e){return new o(e.documentId)}}t.default=o,o.TYPE="105",o.READABLE_TYPE_NAME="connectToSuggestions",o.DESCRIPTOR_NAME="TrackChangesConnectMessage",o.DESCRIPTOR={fields:{documentId:{type:"string",id:1}}}},785:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e){super(),this.documentId=e}toJSON(){return{documentId:this.documentId}}static fromJSON(e){return new o(e.documentId)}}t.default=o,o.TYPE="102",o.READABLE_TYPE_NAME="getAllSuggestions",o.DESCRIPTOR_NAME="TrackChangesGetAllSuggestionMessage",o.DESCRIPTOR={fields:{documentId:{type:"string",id:1}}}},8961:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e,t){super(),this.id=e,this.documentId=t}toJSON(){return{id:this.id,documentId:this.documentId}}static fromJSON(e){return new o(e.id,e.documentId)}}t.default=o,o.TYPE="103",o.READABLE_TYPE_NAME="getSuggestion",o.DESCRIPTOR_NAME="TrackChangesGetSuggestionMessage",o.DESCRIPTOR={fields:{id:{type:"string",id:1},documentId:{type:"string",id:2}}}},3460:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e,t,n,r,s,o=null){super(),this.id=e,this.documentId=t,this.hasComments=n,this.isHasCommentsModified=r,this.state=s,this.attributes=o}toJSON(){return{id:this.id,documentId:this.documentId,hasComments:this.hasComments,isHasCommentsModified:this.isHasCommentsModified,state:this.state,attributes:JSON.stringify(this.attributes)}}static fromJSON(e){return new o(e.id,e.documentId,e.hasComments,e.isHasCommentsModified,e.state,e.attributes?JSON.parse(e.attributes):null)}}t.default=o,o.TYPE="104",o.READABLE_TYPE_NAME="updateSuggestion",o.DESCRIPTOR_NAME="TrackChangesUpdateSuggestionMessage",o.DESCRIPTOR={fields:{id:{type:"string",id:1},documentId:{type:"string",id:2},hasComments:{type:"bool",id:3},isHasCommentsModified:{type:"bool",id:4},state:{type:"string",id:5},attributes:{type:"string",id:6}}}},6068:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e,t,n,r,s,o,i={},a=null){super(),this.id=e,this.authorId=t,this.type=n,this.hasComments=s,this.state=o,this.data=i,this.attributes=a,this.createdAt=r?new Date(r):void 0}toJSON(){var e;return{id:this.id,authorId:this.authorId,type:this.type,createdAt:null===(e=this.createdAt)||void 0===e?void 0:e.toISOString(),data:JSON.stringify(this.data),hasComments:this.hasComments,state:this.state,attributes:JSON.stringify(this.attributes)}}static fromJSON(e){return new o(e.id,e.authorId,e.type,e.createdAt,e.hasComments,e.state,JSON.parse(e.data),e.attributes?JSON.parse(e.attributes):null)}}t.default=o,o.DESCRIPTOR_NAME="TrackChangesAddSuggestionResponse",o.DESCRIPTOR={fields:{id:{type:"string",id:1},authorId:{type:"string",id:2},type:{type:"string",id:3},createdAt:{type:"string",id:4},data:{type:"string",id:5},hasComments:{type:"bool",id:6},state:{type:"string",id:7},attributes:{type:"string",id:8}}}},3917:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844)),o=r(n(3721));class i extends s.default{constructor(e,t,n){super(),this.channel=e,this._suggestions=t,this._suggestionsV2=n,this.suggestions=(null==n?void 0:n.length)?n:t}toJSON(){var e,t;return{channel:this.channel,suggestions:null===(e=this._suggestions)||void 0===e?void 0:e.map((e=>JSON.stringify(e))),suggestionsV2:null===(t=this._suggestionsV2)||void 0===t?void 0:t.map(o.default.toJSON)}}static fromJSON(e){var t,n;return new i(e.channel,null===(t=e.suggestions)||void 0===t?void 0:t.map((e=>JSON.parse(e))),null===(n=e.suggestionsV2)||void 0===n?void 0:n.map(o.default.fromJSON))}}t.default=i,i.DESCRIPTOR_NAME="TrackChangesConnectResponse",i.DESCRIPTOR={fields:{channel:{type:"string",id:1},suggestions:{type:"string",rule:"repeated",id:2},suggestionsV2:{type:"SuggestionDescriptor",rule:"repeated",id:3}}}},827:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844)),o=r(n(3721));class i extends s.default{constructor(e,t){super(),this._suggestions=e,this._suggestionsV2=t,this.suggestions=(null==t?void 0:t.length)?t:e}toJSON(){var e,t;return{suggestions:null===(e=this._suggestions)||void 0===e?void 0:e.map((e=>JSON.stringify(e))),suggestionsV2:null===(t=this._suggestionsV2)||void 0===t?void 0:t.map(o.default.toJSON)}}static fromJSON(e){var t,n;return new i(null===(t=e.suggestions)||void 0===t?void 0:t.map(a),null===(n=e.suggestionsV2)||void 0===n?void 0:n.map(o.default.fromJSON))}}function a(e){const t=JSON.parse(e);return t.createdAt=t.createdAt?new Date(t.createdAt):void 0,t}t.default=i,i.DESCRIPTOR_NAME="TrackChangesGetAllSuggestionsResponse",i.DESCRIPTOR={fields:{suggestions:{type:"string",rule:"repeated",id:1},suggestionsV2:{type:"SuggestionDescriptor",rule:"repeated",id:2}}}},5659:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e,t,n,r,s,o,i={},a=null){super(),this.id=e,this.authorId=t,this.type=n,this.hasComments=s,this.state=o,this.data=i,this.attributes=a,this.createdAt=new Date(r)}toJSON(){return{id:this.id,authorId:this.authorId,type:this.type,createdAt:this.createdAt.toISOString(),data:JSON.stringify(this.data),hasComments:this.hasComments,state:this.state,attributes:JSON.stringify(this.attributes)}}static fromJSON(e){return new o(e.id,e.authorId,e.type,e.createdAt,e.hasComments,e.state,JSON.parse(e.data),e.attributes?JSON.parse(e.attributes):null)}}t.default=o,o.DESCRIPTOR_NAME="TrackChangesGetSuggestionResponse",o.DESCRIPTOR={fields:{id:{type:"string",id:1},authorId:{type:"string",id:2},type:{type:"string",id:3},createdAt:{type:"string",id:4},data:{type:"string",id:5},hasComments:{type:"bool",id:6},state:{type:"string",id:7},attributes:{type:"string",id:8}}}},4908:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return s(t,e),t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t._SERVICE=void 0;const a=n(4584),c=i(n(1774)),u=i(n(92)),d=i(n(6068)),l=i(n(8961)),p=i(n(5659)),h=i(n(785)),f=i(n(827)),m=i(n(3460)),y=i(n(7079)),g=i(n(3917)),b=i(n(7477)),O=o(n(1244)),v=i(n(2352)),w=i(n(556)),I=i(n(9212));t._SERVICE=10;class _ extends((0,a.EmitterMixin)()){constructor(e){super(),this._documentId=e,this._isConnected=!1}get isConnected(){return this._isConnected}async connect(e){if(this._isConnected)return;if(e.state!==O.WEB_SOCKET_GATEWAY_STATES.CONNECTED)throw new b.default("WebSocket Gateway is not connected.",e);const n=new y.default(this._documentId);this._wsGateway=e,this.stopListening(e,"change:state");const r=await e._sendRequest(t._SERVICE,y.default.TYPE,c.default.encode(n)),s=c.default.decode(r,g.default);return this.listenTo(e,"change:state",((e,t,n)=>this._onWsGatewayStateChange(n)),{priority:O.default._CHANGE_STATE_EVENT_PRIORITY}),this._connectToChannel(e,s.channel),this._isConnected=!0,this.fire("connected"),s.suggestions}disconnect(){this._isConnected&&(this._isConnected=!1,this._wsGateway&&(this.stopListening(this._wsGateway),this._wsGateway=void 0),this._channel&&(this.stopListening(this._channel),this._channel=void 0),this.fire("disconnected"),this.stopListening())}async add(e,t,n,r=null,s){const o=new u.default(e,this._documentId,t,n,r,s),i=await this._sendRequest(u.default.TYPE,o);return c.default.decode(i,d.default)}async get(e,t=1){const n=new l.default(e,this._documentId);try{const e=await this._sendRequest(l.default.TYPE,n);return c.default.decode(e,p.default)}catch(n){if("CKEditorCloudServicesServerError"===n.name&&"404"===n.code&&t<5)return await(r=100*t,new Promise((e=>{setTimeout(e,r)}))),this.get(e,t+1);if("CKEditorCloudServicesServerError"===n.name)throw n;throw w.default.fromPublicError(n)}var r}async getAll(){const e=new h.default(this._documentId),t=await this._sendRequest(h.default.TYPE,e),{suggestions:n}=c.default.decode(t,f.default);return n}async update(e,t={}){const{hasComments:n,state:r,attributes:s}=t,o=void 0!==n,i=new m.default(e,this._documentId,n,o,r,s);await this._sendRequest(m.default.TYPE,i)}async batchUpdateState(e){const t=new I.default(e.ids,this._documentId,e.state);await this._sendRequest(I.default.TYPE,t)}_connectToChannel(e,t){this._channel=e._getChannel(_._SERVICE,t),this._channel&&this.listenTo(this._channel,this._channel.getEventName(m.default.TYPE),((e,t)=>{const n=c.default.decode(t,m.default);this.fire("suggestionUpdated",n)}))}_onWsGatewayStateChange(e){e===O.WEB_SOCKET_GATEWAY_STATES.DISCONNECTED&&this.disconnect()}_sendRequest(e,n){if(!this._wsGateway||!this._isConnected)throw new v.default("Track Changes",this);return this._wsGateway._sendRequest(t._SERVICE,e,c.default.encode(n))}}_._SERVICE=t._SERVICE,t.default=_},5797:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e){super(),this.ids=e}toJSON(){return{ids:this.ids}}static fromJSON(e){return new o(e.ids)}}t.default=o,o.TYPE="22",o.READABLE_TYPE_NAME="getManyUsers",o.DESCRIPTOR_NAME="GetManyUsersMessage",o.DESCRIPTOR={fields:{ids:{id:1,type:"string",rule:"repeated"}}}},9403:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e){super(),this.id=e}toJSON(){return{id:this.id}}static fromJSON(e){return new o(e.id)}}t.default=o,o.TYPE="21",o.READABLE_TYPE_NAME="getUser",o.DESCRIPTOR_NAME="GetUserMessage",o.DESCRIPTOR={fields:{id:{type:"string",id:1}}}},8605:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e){super(),this.users=e}toJSON(){return{users:this.users.map(i)}}static fromJSON(e){return new o(e.users.map(a))}}function i(e){return{attributes:Object.keys(e).map((t=>({key:t,value:JSON.stringify(e[t])})))}}function a(e){return e.attributes.reduce(((e,t)=>(e[t.key]=t.value?JSON.parse(t.value):null,e)),{})}t.default=o,o.DESCRIPTOR_NAME="GetManyUsersResponse",o.DESCRIPTOR={fields:{users:{rule:"repeated",type:"UserDescriptor",id:1}}}},6947:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e){super(),this.attributes=e}toJSON(){return{attributes:Object.keys(this.attributes).map((e=>({key:e,value:JSON.stringify(this.attributes[e])})))}}static fromJSON(e){const t=e.attributes.reduce(((e,t)=>(e[t.key]=t.value?JSON.parse(t.value):null,e)),{});return new o(t)}}t.default=o,o.DESCRIPTOR_NAME="GetUserResponse",o.DESCRIPTOR={fields:{attributes:{rule:"repeated",type:"KeyValueDescriptor",id:1}}}},7861:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(9403)),o=r(n(6947)),i=r(n(1774)),a=r(n(5797)),c=r(n(8605));class u{constructor(e={}){this._attributes=new Map;for(const t of Object.keys(e))"id"!==t?(this._attributes.set(t,e[t]),Object.defineProperty(this,t,{enumerable:!0,configurable:!1,get:()=>this._attributes.get(t)})):this.id=e.id}static fromData(e){return new u(e)}static async get(e,t){const n=new s.default(t);try{const t=await e._sendRequest(u._SERVICE,s.default.TYPE,i.default.encode(n)),r=i.default.decode(t,o.default);return new u(r.attributes)}catch(e){return new u({id:t})}}static async getMany(e,t){const n=new a.default(t);try{const t=await e._sendRequest(u._SERVICE,a.default.TYPE,i.default.encode(n));return i.default.decode(t,c.default).users.map((e=>new u(e)))}catch(e){return t.map((e=>new u({id:e})))}}}u._SERVICE=2,t.default=u},2587:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default="52.0.1"},8944:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=n(4584),o=r(n(7868)),i=r(n(1774));class a extends((0,s.EmitterMixin)()){constructor(e,t,n){super(),this._channelName=e,this._wsGateway=t,this._socket=n,this._subscribeToChannel()}remove(){this._socket.off(this._channelName)}getEventName(e,t=!1){let n="";return t&&(n+="all:"),n+="event",e&&(n+=":"+e),n}_subscribeToChannel(){this._socket.on(this._channelName,(e=>{const t=i.default.decode(e,o.default);this.fire(this.getEventName(t.type,!0),t.data,t.socketId),t.socketId!==this._wsGateway.socketId&&this.fire(this.getEventName(t.type),t.data,t.socketId)}))}}t.default=a},7868:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e,t,n){super(),this.type=e,this.socketId=t,this.data=n}toJSON(){return{type:this.type,socketId:this.socketId,data:this.data}}static fromJSON(e){return new o(e.type,e.socketId,e.data)}}t.default=o,o.DESCRIPTOR_NAME="ChannelMessage",o.DESCRIPTOR={fields:{type:{type:"uint32",id:1},socketId:{type:"string",id:2},data:{type:"bytes",id:3}}}},6444:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(1594)),o=r(n(1774));t.default=class{encode(e,t,n,r="/",i={}){if(t.length>2)throw new Error("PacketParser supports only 2 elements in data");const a={type:e,data:t,id:n,nsp:r};return o.default.encode(s.default.create(a,i))}decode(e){const t=o.default.decode(e,s.default);return{packet:{id:t.id,type:t.type,data:t.packetData,nsp:t.nsp},options:{flags:t.options.flags,rooms:t.options.rooms,except:t.options.except}}}}},2300:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return s(t,e),t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=i(n(1010)),c=o(n(447));class u extends a.default{constructor(e,t){super(),this.data=e,this.data1=t}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(e){return new u(e.data,e.data1)}static create(e,t){return new u(e,t)}}t.default=u,u.TYPE=c.default.getPacketType(c.MessageDataTypes.BUFFER,c.MessageDataTypes.BUFFER),u.DESCRIPTOR_NAME="BytesBytesPacketDataMessage",u.DESCRIPTOR={fields:{data:{type:"bytes",id:1},data1:{type:"bytes",id:2}}}},6026:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return s(t,e),t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=i(n(1010)),c=o(n(447));class u extends a.default{constructor(e,t){super(),this.data=e,this.data1=t}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(e){return new u(e.data,e.data1)}static create(e,t){return new u(e,t)}}t.default=u,u.TYPE=c.default.getPacketType(c.MessageDataTypes.NUMBER,c.MessageDataTypes.BUFFER),u.DESCRIPTOR_NAME="NumberBytesPacketDataMessage",u.DESCRIPTOR={fields:{data:{type:"uint32",id:1},data1:{type:"bytes",id:2}}}},6325:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return s(t,e),t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=i(n(1010)),c=o(n(447));class u extends a.default{constructor(e,t){super(),this.data=e,this.data1=t}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(e){return new u(e.data,e.data1)}static create(e,t){return new u(e,t)}}t.default=u,u.TYPE=c.default.getPacketType(c.MessageDataTypes.NUMBER,c.MessageDataTypes.NUMBER),u.DESCRIPTOR_NAME="NumberNumberPacketDataMessage",u.DESCRIPTOR={fields:{data:{type:"uint32",id:1},data1:{type:"uint32",id:2}}}},1272:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return s(t,e),t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=i(n(1010)),c=o(n(447));class u extends a.default{constructor(e,t){super(),this.data=e,this.data1=t}toJSON(){return{data:this.data,data1:this.data1?JSON.stringify(this.data1):void 0}}static fromJSON(e){return new u(e.data,e.data1&&JSON.parse(e.data1))}static create(e,t){return new u(e,t)}}t.default=u,u.TYPE=c.default.getPacketType(c.MessageDataTypes.NUMBER,c.MessageDataTypes.OBJECT),u.DESCRIPTOR_NAME="NumberObjectPacketDataMessage",u.DESCRIPTOR={fields:{data:{type:"uint32",id:1},data1:{type:"string",id:2}}}},7609:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return s(t,e),t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=i(n(1010)),c=o(n(447));class u extends a.default{constructor(e,t){super(),this.data=e,this.data1=t}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(e){return new u(e.data,e.data1)}static create(e,t){return new u(e,t)}}t.default=u,u.TYPE=c.default.getPacketType(c.MessageDataTypes.NUMBER,c.MessageDataTypes.STRING),u.DESCRIPTOR_NAME="NumberStringPacketDataMessage",u.DESCRIPTOR={fields:{data:{type:"uint32",id:1},data1:{type:"string",id:2}}}},3285:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return s(t,e),t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=i(n(1010)),c=o(n(447));class u extends a.default{constructor(e,t){super(),this.data=e,this.data1=t}toJSON(){return{data:this.data?JSON.stringify(this.data):void 0,data1:this.data1}}static fromJSON(e){return new u(e.data&&JSON.parse(e.data),e.data1)}static create(e,t){return new u(e,t)}}t.default=u,u.TYPE=c.default.getPacketType(c.MessageDataTypes.OBJECT,c.MessageDataTypes.BUFFER),u.DESCRIPTOR_NAME="ObjectBufferPacketDataMessage",u.DESCRIPTOR={fields:{data:{type:"string",id:1},data1:{type:"bytes",id:2}}}},110:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return s(t,e),t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=i(n(1010)),c=o(n(447));class u extends a.default{constructor(e,t){super(),this.data=e,this.data1=t}toJSON(){return{data:this.data?JSON.stringify(this.data):void 0,data1:this.data1?JSON.stringify(this.data1):void 0}}static fromJSON(e){return new u(e.data&&JSON.parse(e.data),e.data1&&JSON.parse(e.data1))}static create(e,t){return new u(e,t)}}t.default=u,u.TYPE=c.default.getPacketType(c.MessageDataTypes.OBJECT,c.MessageDataTypes.OBJECT),u.DESCRIPTOR_NAME="ObjectObjectPacketDataMessage",u.DESCRIPTOR={fields:{data:{type:"string",id:1},data1:{type:"string",id:2}}}},1010:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{static create(e,t){throw new TypeError("Must be implemented in a child class!")}}t.default=o,e.exports=o},1594:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(1774)),o=r(n(8844)),i=r(n(3120)),a=r(n(447)),c=r(n(6026)),u=r(n(1974)),d=r(n(2300)),l=r(n(532)),p=r(n(1272)),h=r(n(110)),f=r(n(3285)),m=r(n(8758)),y=r(n(3674)),g=r(n(6325)),b=r(n(7609)),O=[c.default,u.default,d.default,l.default,p.default,h.default,f.default,m.default,y.default,g.default,b.default].reduce(((e,t)=>(e[t.TYPE]=t,e)),{});class v extends o.default{constructor(e,t,n,r="/",s=new i.default){super(),this.type=e,this.data=t,this.id=n,this.nsp=r,this.options=s}get packetData(){return void 0===this.data.data&&void 0===this.data.data1?[]:this.data.data&&void 0===this.data.data1?[this.data.data]:[this.data.data,this.data.data1]}toJSON(){const e=s.default.encode(this.options),t=s.default.encode(this.data);return{type:this.type+10*this.data.constructor.TYPE,id:this.id,nsp:"/"===this.nsp?void 0:this.nsp,data:t,options:e}}static fromJSON(e){const t=Math.floor(e.type/10);return new v(e.type-10*t,s.default.decode(e.data,O[t]),e.id,e.nsp,e.options?s.default.decode(e.options,i.default):new i.default)}static create(e,t={}){var n;const r=a.default.getPacketType(a.default.getType(e.data[0]),a.default.getType(null!==(n=e.data[1])&&void 0!==n?n:e.data[0]));return new v(e.type,O[r].create(e.data[0],e.data[1]),e.id,e.nsp,new i.default(t.flags,t.rooms,t.except))}}t.default=v,v.TYPE=10,v.DESCRIPTOR_NAME="PacketMessage",v.DESCRIPTOR={fields:{type:{type:"uint32",id:1},id:{type:"uint32",id:2},nsp:{type:"string",id:3},data:{type:"bytes",id:4},options:{type:"bytes",id:5}}}},3120:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8844));class o extends s.default{constructor(e,t=[],n=[]){super(),this.flags=e,this.rooms=t,this.except=n}toJSON(){var e,t;return{flags:this.flags?JSON.stringify(this.flags):void 0,rooms:(null===(e=this.rooms)||void 0===e?void 0:e.length)?this.rooms:void 0,except:(null===(t=this.except)||void 0===t?void 0:t.length)?this.except:void 0}}static fromJSON(e){return new o(e.flags&&JSON.parse(e.flags),e.rooms,e.except)}}t.default=o,o.TYPE=11,o.DESCRIPTOR_NAME="PacketOptionsMessage",o.DESCRIPTOR={fields:{flags:{type:"string",id:1},rooms:{type:"string",id:2,rule:"repeated"},except:{type:"string",id:3,rule:"repeated"}}}},1974:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return s(t,e),t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=i(n(1010)),c=o(n(447));class u extends a.default{constructor(e,t){super(),this.data=e,this.data1=t}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(e){return new u(e.data,e.data1)}static create(e,t){return new u(e,t)}}t.default=u,u.TYPE=c.default.getPacketType(c.MessageDataTypes.STRING,c.MessageDataTypes.BUFFER),u.DESCRIPTOR_NAME="StringBytesPacketDataMessage",u.DESCRIPTOR={fields:{data:{type:"string",id:1},data1:{type:"bytes",id:2}}}},3674:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return s(t,e),t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=i(n(1010)),c=o(n(447));class u extends a.default{constructor(e,t){super(),this.data=e,this.data1=t}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(e){return new u(e.data,e.data1)}static create(e,t){return new u(e,t)}}t.default=u,u.TYPE=c.default.getPacketType(c.MessageDataTypes.STRING,c.MessageDataTypes.NUMBER),u.DESCRIPTOR_NAME="StringNumberPacketDataMessage",u.DESCRIPTOR={fields:{data:{type:"string",id:1},data1:{type:"uint32",id:2}}}},532:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return s(t,e),t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=i(n(1010)),c=o(n(447));class u extends a.default{constructor(e,t){super(),this.data=e,this.data1=t}toJSON(){return{data:this.data,data1:this.data1?JSON.stringify(this.data1):void 0}}static fromJSON(e){return new u(e.data,e.data1&&JSON.parse(e.data1))}static create(e,t){return new u(e,t)}}t.default=u,u.TYPE=c.default.getPacketType(c.MessageDataTypes.STRING,c.MessageDataTypes.OBJECT),u.DESCRIPTOR_NAME="StringObjectPacketDataMessage",u.DESCRIPTOR={fields:{data:{type:"string",id:1},data1:{type:"string",id:2}}}},8758:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return s(t,e),t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=i(n(1010)),c=o(n(447));class u extends a.default{constructor(e,t){super(),this.data=e,this.data1=t}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(e){return new u(e.data,e.data1)}static create(e,t){return new u(e,t)}}t.default=u,u.TYPE=c.default.getPacketType(c.MessageDataTypes.STRING,c.MessageDataTypes.STRING),u.DESCRIPTOR_NAME="StringStringPacketDataMessage",u.DESCRIPTOR={fields:{data:{type:"string",id:1},data1:{type:"string",id:2}}}},9924:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Decoder=t.Encoder=t.ENCODED_TYPES=void 0;const s=n(114),o=r(n(6444)),i=r(n(447));t.ENCODED_TYPES=[s.PacketType.EVENT,s.PacketType.ACK,s.PacketType.BINARY_ACK,s.PacketType.BINARY_EVENT];class a extends s.Encoder{constructor(e=new o.default){super(),this._packetParser=e}encode(e){if(t.ENCODED_TYPES.includes(e.type))try{return[this._packetParser.encode(e.type,e.data,e.id,e.nsp)]}catch(e){console.error("Can not properly serialize or deserialize messages. Check the original error.",{originalError:{message:e.message}})}return super.encode(e)}}t.Encoder=a;class c extends s.Decoder{constructor(e=new o.default){super(),this._packetParser=e}add(e){if(!i.default.isBuffer(e))return super.add(e);let t;try{t=this._packetParser.decode(e).packet}catch(t){return super.add(e)}super.emitReserved("decoded",t)}}t.Decoder=c},447:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageDataTypes=void 0;const n=!("undefined"==typeof process||!process.versions||!process.versions.node);var r,s;(s=r=t.MessageDataTypes||(t.MessageDataTypes={}))[s.BUFFER=1]="BUFFER",s[s.STRING=2]="STRING",s[s.NUMBER=3]="NUMBER",s[s.OBJECT=4]="OBJECT";class o{static getPacketType(...e){let t=0;for(let n=0;n<e.length;n++)t+=e[n]*Math.pow(10,e.length-n-1);return t}static getType(e){if(o.isBuffer(e))return r.BUFFER;const t=typeof e;return"string"===t?r.STRING:"number"===t?r.NUMBER:r.OBJECT}static isBuffer(e){return n&&Buffer.isBuffer(e)||e instanceof ArrayBuffer||e instanceof Uint8Array||this._isBufferView(e)}static _isBufferView(e){return"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer}}t.default=o},2934:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(7477));class o{constructor(e,t){this._context=e,this._deferredPromise=function(){let e,t;const n=new Promise(((n,r)=>{e=n,t=r}));return{resolve:e,reject:t,promise:n}}(),this.timeout=setTimeout((()=>this.error(new s.default("Request timeout.",this._context))),t)}get promise(){return this._deferredPromise.promise}response(e){this._deferredPromise.resolve(e)}error(e){this._deferredPromise.reject(e)}}t.default=class{constructor(e){this._context=e,this._requests=new Set}async send(e,t=45e3){const n=this._createRequest(t);try{return e(n),await n.promise}finally{this._finishRequest(n)}}errorAll(e){for(const t of this._requests)t.error(e)}waitForAllRequests(e=45e3){return this._waitForRequests(e)}_createRequest(e){const t=new o(this._context,e);return this._requests.add(t),t}_finishRequest(e){this._requests.delete(e),clearTimeout(e.timeout)}async _waitForRequests(e=5e3,t=0){return!this._requests.size||t>=e/500?Promise.resolve():(await new Promise((e=>{setTimeout(e,500)})),this._waitForRequests(e,t++))}}},1244:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.WEB_SOCKET_GATEWAY_STATES=void 0;const s=n(2790),o=r(n(5835)),i=n(4584),a=r(n(8944)),c=r(n(7861)),u=r(n(2587)),d=r(n(7477)),l=r(n(556)),p=n(9924),h=r(n(2934));var f,m;(m=f=t.WEB_SOCKET_GATEWAY_STATES||(t.WEB_SOCKET_GATEWAY_STATES={})).DISCONNECTED="disconnected",m.CONNECTING="connecting",m.CONNECTED="connected";class y extends((0,i.ObservableMixin)()){constructor(e,t,n={},r=s.io,i=c.default.get){if(super(),this._token=t,this._options=n,this._connectionProvider=r,this._userFactory=i,this._requestsManager=new h.default(this),this._channels=new Map,this._connectionAttempt=0,!e)throw new TypeError("Api address must be provided.");if(!this._token)throw new TypeError("Token must be provided.");this._options.requestTimeout||(this._options.requestTimeout=2e4),this._url=(0,o.default)(e.replace(/^(?!(?:\w+:)?\/\/)/,"https://")),this.set("state",f.DISCONNECTED),this.set("socketId",void 0),this.set("me",void 0),this.on("change:state",(async(e,t,n)=>{var r;if(this._debugEvent("ws-gw:change:state",n),n!==y.STATE_CONNECTED){if(n===y.STATE_DISCONNECTED)return this._requestsManager.errorAll(new d.default("Not connected.",this))}else try{this.me=await this._userFactory.call(c.default,this,null===(r=this._socketAuth)||void 0===r?void 0:r.userId)}catch(e){}}),{priority:y._CHANGE_STATE_EVENT_PRIORITY}),this.on("error",((e,t)=>{this._options.onError?this._options.onError(t):console.error(t)}))}get sessionId(){return this.socketId}waitForAllRequests(e){return this._requestsManager.waitForAllRequests(e)}disconnect(){var e;this.state!==f.DISCONNECTED&&(null===(e=this._socket)||void 0===e||e.disconnect(),this._socket=void 0,this.state=f.DISCONNECTED)}async reconnect(){this._socket||this.state!==f.DISCONNECTED||(await this._token.refreshToken(),await this._connect())}static async connect(e,t="local.cs.dev:443/ws-v2",n={},r=s.io,o=c.default.get){const i=new y(t,e,n,r,o);return await i._connect(),i}_sendRequest(e,t,n){if(!e)throw new d.default("`serviceName` must be provided.",this);if(this.state!==y.STATE_CONNECTED)throw new d.default("Not connected.",this);if(!this._socketAuth||!this._socketAuth.isAuthenticated)throw new d.default("Not authenticated.",this);const r=new ArrayBuffer(n.length+2),s=new Uint8Array(r);return s[0]=e,s[1]=parseInt(t),s.set(n,2),this._emit(1,s)}_getChannel(e,t){const n=""+e+t;return!this._channels.has(n)&&this._socket&&this._channels.set(n,new a.default(n,this,this._socket)),this._channels.get(n)}_connect(){return new Promise(((e,t)=>{const n=this._setupSocket();!this.socketId&&n.io.on("reconnect_error",(()=>{this._debugEvent("reconnect_error"),this._reconnectionAttemptError(t)})),n.once("connect",(async()=>{this._debugEvent("once-connect");try{await this._onConnect(),e()}catch(e){t(e)}})),n.connect()}))}_getPortByProtocol(e){return["http:","ws:"].includes(e)?80:443}_setupSocket(){var e;if(this._socket)return this._socket;const t=this._url.port||this._getPortByProtocol(this._url.protocol),n=(this._url.protocol||"https:")+"//"+this._url.hostname+":"+t,r=this._url.pathname.match(/^\/.*\/ws/)?this._url.pathname.split("/ws")[0]:"",s=this._connectionProvider(n,{parser:{Encoder:p.Encoder,Decoder:p.Decoder},path:r+"/ws-v2/ws",transports:["websocket"],timeout:void 0!==this._options.timeout?this._options.timeout:5e3,reconnection:void 0===this._options.autoReconnect||this._options.autoReconnect,reconnectionDelay:1e3,reconnectionDelayMax:5e3,rejectUnauthorized:void 0===this._options.rejectUnauthorized||this._options.rejectUnauthorized,query:{version:u.default},agent:null!==(e=this._options.agent)&&void 0!==e&&e,closeOnBeforeunload:!1});return this.state=f.CONNECTING,s.on("connect",(()=>{this._debugEvent("connect"),this.socketId=s.id})),s.on("connect_error",(e=>{this._debugEvent("connect_error",e)})),s.on("disconnect",(()=>{this._debugEvent("disconnect"),this._onDisconnect()})),s.io.on("reconnect",(async()=>{this._debugEvent("reconnect"),await this._onReconnect()})),s.io.on("reconnect_attempt",(e=>{this._debugEvent("reconnect_attempt",e),this.state=f.CONNECTING,this._connectionAttempt=e})),s.on("unauthorized",(e=>{this._debugEvent("unauthorized"),this._onUnauthorized(e)})),s.on("authenticationRequest",(async e=>{this._debugEvent("authenticationRequest",e.attempt),await this._onReconnect()})),this._socket=s,s}_emit(e,t){const n=this._socket;return this._requestsManager.send((r=>{n.emit(e,t,((e,t)=>{if(e)return r.error(l.default.fromPublicError(e));r.response(t)}))}),this._options.requestTimeout)}_addAuthData(e,t){this._socketAuth={environmentId:e,userId:t,isAuthenticated:!0}}_removeAuthData(){this._socketAuth=void 0}async _onConnect(){await this._authenticate(this._token.value),this.state=f.CONNECTED;const e=async(e,t,n)=>{this._debugEvent("token:value:change");try{await this._authenticate(n)}catch(e){}};this._token.on("change:value",e),this._socket.io.off("reconnect_error"),this.on("disconnect",(()=>{this._token.off("change:value",e)}))}async _onReconnect(){await this._token.refreshToken(),await this._onConnect()}_onDisconnect(){this.state=f.DISCONNECTED,this._connectionAttempt=0,this.fire("disconnect");for(const e of this._channels.values())e.remove();this._channels.clear(),void 0===this._options.autoReconnect||this._options.autoReconnect||(this._socket=void 0)}_debugEvent(e,t){if(!this._isDebugModeEnabled())return;const n=void 0!==t?", data: "+t:"";console.info((new Date).toLocaleString()+" "+e+n)}_reconnectionAttemptError(e){this._connectionAttempt>=2&&(this.disconnect(),e(d.default.fromPublicError({message:"The number of initial connection attempts exceeded.",explanation:"Three initial connection attempts failed. It can be caused by a slow, unstable, missing or blocked Internet connection.",action:"Please verify the stability of your Internet connection and ensure that no antivirus or firewall software blocks the Web Socket protocol connections."})))}_onUnauthorized({error:e}){this._removeAuthData(),this.fire("error",l.default.fromPublicError(e))}async _authenticate(e){try{this._debugEvent("authenticate:start");const t=await this._emit(2,{token:e});this._debugEvent("authenticate:success","envId: "+t.environmentId+", userId: "+t.userId),this._addAuthData(t.environmentId,t.userId)}catch(e){throw this._debugEvent("authenticate:error",e.message),this._removeAuthData(),e}}_isDebugModeEnabled(){var e;return!!i.global.window.localStorage&&"true"===(null!==(e=i.global.window.localStorage.getItem("csClientDebugMode"))&&void 0!==e?e:"false").toLowerCase()}}y.STATE_DISCONNECTED=f.DISCONNECTED,y.STATE_CONNECTING=f.CONNECTING,y.STATE_CONNECTED=f.CONNECTED,y._CHANGE_STATE_EVENT_PRIORITY=i.priorities.get("highest")+999999,t.default=y},9310:e=>{"use strict";e.exports=function(e,t){var n=new Array(arguments.length-1),r=0,s=2,o=!0;for(;s<arguments.length;)n[r++]=arguments[s++];return new Promise((function(s,i){n[r]=function(e){if(o)if(o=!1,e)i(e);else{for(var t=new Array(arguments.length-1),n=0;n<t.length;)t[n++]=arguments[n];s.apply(null,t)}};try{e.apply(t||null,n)}catch(e){o&&(o=!1,i(e))}}))}},6662:(e,t)=>{"use strict";var n=t;n.length=function(e){var t=e.length;if(!t)return 0;for(var n=0;--t%4>1&&"="===e.charAt(t);)++n;return Math.ceil(3*e.length)/4-n};for(var r=new Array(64),s=new Array(123),o=0;o<64;)s[r[o]=o<26?o+65:o<52?o+71:o<62?o-4:o-59|43]=o++;n.encode=function(e,t,n){for(var s,o=null,i=[],a=0,c=0;t<n;){var u=e[t++];switch(c){case 0:i[a++]=r[u>>2],s=(3&u)<<4,c=1;break;case 1:i[a++]=r[s|u>>4],s=(15&u)<<2,c=2;break;case 2:i[a++]=r[s|u>>6],i[a++]=r[63&u],c=0}a>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,i)),a=0)}return c&&(i[a++]=r[s],i[a++]=61,1===c&&(i[a++]=61)),o?(a&&o.push(String.fromCharCode.apply(String,i.slice(0,a))),o.join("")):String.fromCharCode.apply(String,i.slice(0,a))};var i="invalid encoding";n.decode=function(e,t,n){for(var r,o=n,a=0,c=0;c<e.length;){var u=e.charCodeAt(c++);if(61===u&&a>1)break;if(void 0===(u=s[u]))throw Error(i);switch(a){case 0:r=u,a=1;break;case 1:t[n++]=r<<2|(48&u)>>4,r=u,a=2;break;case 2:t[n++]=(15&r)<<4|(60&u)>>2,r=u,a=3;break;case 3:t[n++]=(3&r)<<6|u,a=0}}if(1===a)throw Error(i);return n-o},n.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}},5707:e=>{"use strict";function t(){this._listeners={}}e.exports=t,t.prototype.on=function(e,t,n){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:t,ctx:n||this}),this},t.prototype.off=function(e,t){if(void 0===e)this._listeners={};else if(void 0===t)this._listeners[e]=[];else for(var n=this._listeners[e],r=0;r<n.length;)n[r].fn===t?n.splice(r,1):++r;return this},t.prototype.emit=function(e){var t=this._listeners[e];if(t){for(var n=[],r=1;r<arguments.length;)n.push(arguments[r++]);for(r=0;r<t.length;)t[r].fn.apply(t[r++].ctx,n)}return this}},9365:e=>{"use strict";function t(e){return"undefined"!=typeof Float32Array?function(){var t=new Float32Array([-0]),n=new Uint8Array(t.buffer),r=128===n[3];function s(e,r,s){t[0]=e,r[s]=n[0],r[s+1]=n[1],r[s+2]=n[2],r[s+3]=n[3]}function o(e,r,s){t[0]=e,r[s]=n[3],r[s+1]=n[2],r[s+2]=n[1],r[s+3]=n[0]}function i(e,r){return n[0]=e[r],n[1]=e[r+1],n[2]=e[r+2],n[3]=e[r+3],t[0]}function a(e,r){return n[3]=e[r],n[2]=e[r+1],n[1]=e[r+2],n[0]=e[r+3],t[0]}e.writeFloatLE=r?s:o,e.writeFloatBE=r?o:s,e.readFloatLE=r?i:a,e.readFloatBE=r?a:i}():function(){function t(e,t,n,r){var s=t<0?1:0;if(s&&(t=-t),0===t)e(1/t>0?0:2147483648,n,r);else if(isNaN(t))e(2143289344,n,r);else if(t>34028234663852886e22)e((s<<31|2139095040)>>>0,n,r);else if(t<11754943508222875e-54)e((s<<31|Math.round(t/1401298464324817e-60))>>>0,n,r);else{var o=Math.floor(Math.log(t)/Math.LN2);e((s<<31|o+127<<23|8388607&Math.round(t*Math.pow(2,-o)*8388608))>>>0,n,r)}}function i(e,t,n){var r=e(t,n),s=2*(r>>31)+1,o=r>>>23&255,i=8388607&r;return 255===o?i?NaN:s*(1/0):0===o?1401298464324817e-60*s*i:s*Math.pow(2,o-150)*(i+8388608)}e.writeFloatLE=t.bind(null,n),e.writeFloatBE=t.bind(null,r),e.readFloatLE=i.bind(null,s),e.readFloatBE=i.bind(null,o)}(),"undefined"!=typeof Float64Array?function(){var t=new Float64Array([-0]),n=new Uint8Array(t.buffer),r=128===n[7];function s(e,r,s){t[0]=e,r[s]=n[0],r[s+1]=n[1],r[s+2]=n[2],r[s+3]=n[3],r[s+4]=n[4],r[s+5]=n[5],r[s+6]=n[6],r[s+7]=n[7]}function o(e,r,s){t[0]=e,r[s]=n[7],r[s+1]=n[6],r[s+2]=n[5],r[s+3]=n[4],r[s+4]=n[3],r[s+5]=n[2],r[s+6]=n[1],r[s+7]=n[0]}function i(e,r){return n[0]=e[r],n[1]=e[r+1],n[2]=e[r+2],n[3]=e[r+3],n[4]=e[r+4],n[5]=e[r+5],n[6]=e[r+6],n[7]=e[r+7],t[0]}function a(e,r){return n[7]=e[r],n[6]=e[r+1],n[5]=e[r+2],n[4]=e[r+3],n[3]=e[r+4],n[2]=e[r+5],n[1]=e[r+6],n[0]=e[r+7],t[0]}e.writeDoubleLE=r?s:o,e.writeDoubleBE=r?o:s,e.readDoubleLE=r?i:a,e.readDoubleBE=r?a:i}():function(){function t(e,t,n,r,s,o){var i=r<0?1:0;if(i&&(r=-r),0===r)e(0,s,o+t),e(1/r>0?0:2147483648,s,o+n);else if(isNaN(r))e(0,s,o+t),e(2146959360,s,o+n);else if(r>17976931348623157e292)e(0,s,o+t),e((i<<31|2146435072)>>>0,s,o+n);else{var a;if(r<22250738585072014e-324)e((a=r/5e-324)>>>0,s,o+t),e((i<<31|a/4294967296)>>>0,s,o+n);else{var c=Math.floor(Math.log(r)/Math.LN2);1024===c&&(c=1023),e(4503599627370496*(a=r*Math.pow(2,-c))>>>0,s,o+t),e((i<<31|c+1023<<20|1048576*a&1048575)>>>0,s,o+n)}}}function i(e,t,n,r,s){var o=e(r,s+t),i=e(r,s+n),a=2*(i>>31)+1,c=i>>>20&2047,u=4294967296*(1048575&i)+o;return 2047===c?u?NaN:a*(1/0):0===c?5e-324*a*u:a*Math.pow(2,c-1075)*(u+4503599627370496)}e.writeDoubleLE=t.bind(null,n,0,4),e.writeDoubleBE=t.bind(null,r,4,0),e.readDoubleLE=i.bind(null,s,0,4),e.readDoubleBE=i.bind(null,o,4,0)}(),e}function n(e,t,n){t[n]=255&e,t[n+1]=e>>>8&255,t[n+2]=e>>>16&255,t[n+3]=e>>>24}function r(e,t,n){t[n]=e>>>24,t[n+1]=e>>>16&255,t[n+2]=e>>>8&255,t[n+3]=255&e}function s(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}function o(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}e.exports=t(t)},230:module=>{"use strict";function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}module.exports=inquire},319:e=>{"use strict";e.exports=function(e,t,n){var r=n||8192,s=r>>>1,o=null,i=r;return function(n){if(n<1||n>s)return e(n);i+n>r&&(o=e(r),i=0);var a=t.call(o,i,i+=n);return 7&i&&(i=1+(7|i)),a}}},1742:(e,t)=>{"use strict";var n=t;n.length=function(e){for(var t=0,n=0,r=0;r<e.length;++r)(n=e.charCodeAt(r))<128?t+=1:n<2048?t+=2:55296==(64512&n)&&56320==(64512&e.charCodeAt(r+1))?(++r,t+=4):t+=3;return t},n.read=function(e,t,n){if(n-t<1)return"";for(var r,s=null,o=[],i=0;t<n;)(r=e[t++])<128?o[i++]=r:r>191&&r<224?o[i++]=(31&r)<<6|63&e[t++]:r>239&&r<365?(r=((7&r)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,o[i++]=55296+(r>>10),o[i++]=56320+(1023&r)):o[i++]=(15&r)<<12|(63&e[t++])<<6|63&e[t++],i>8191&&((s||(s=[])).push(String.fromCharCode.apply(String,o)),i=0);return s?(i&&s.push(String.fromCharCode.apply(String,o.slice(0,i))),s.join("")):String.fromCharCode.apply(String,o.slice(0,i))},n.write=function(e,t,n){for(var r,s,o=n,i=0;i<e.length;++i)(r=e.charCodeAt(i))<128?t[n++]=r:r<2048?(t[n++]=r>>6|192,t[n++]=63&r|128):55296==(64512&r)&&56320==(64512&(s=e.charCodeAt(i+1)))?(r=65536+((1023&r)<<10)+(1023&s),++i,t[n++]=r>>18|240,t[n++]=r>>12&63|128,t[n++]=r>>6&63|128,t[n++]=63&r|128):(t[n++]=r>>12|224,t[n++]=r>>6&63|128,t[n++]=63&r|128);return n-o}},4106:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(8433),s=n.n(r)()((function(e){return e[1]}));s.push([e.id,".ck.ck-balloon-panel.ck-tooltip{pointer-events:none;z-index:calc(var(--ck-z-dialog) + 100)}:root{--ck-color-presence-list-dropdown-background:#fff;--ck-color-presence-list-dropdown-arrow-border:#ebebeb;--ck-presence-list-dropdown-list-max-width:250px;--ck-presence-list-dropdown-list-min-width:180px;--ck-presence-list-users-tooltip-max-width:120px;--ck-presence-list-users-tooltip-min-width:25px}.ck.ck-presence-list{align-items:center;display:flex;font-size:var(--ck-font-size-base);margin-right:var(--ck-spacing-standard);transition:margin-right .2s ease-in-out}.ck.ck-presence-list *{box-sizing:border-box}.ck.ck-presence-list__list{display:flex;justify-content:flex-end}.ck.ck-presence-list__counter{color:var(--ck-color-base-text);margin-right:var(--ck-spacing-large)}.ck.ck-presence-list__counter--hidden{display:none}.ck.ck-presence-list__list-item{background:none;border:0;color:inherit;font:inherit;margin-left:var(--ck-spacing-standard);outline:none;padding:0;position:relative}.ck.ck-presence-list__list-item:last-child{margin-left:0;order:-1}.ck.ck-tooltip.ck-presence-list__list-item__tooltip>.ck-tooltip__text{display:inline-block;max-width:var(--ck-presence-list-users-tooltip-max-width);overflow:hidden;text-align:center;text-overflow:ellipsis;white-space:nowrap}.ck.ck-presence-list__marker{display:block;height:3px;margin-top:3px;position:relative;width:100%}.ck-presence-list__balloon button.ck-presence-list__dropdown-list-item *,.ck-presence-list__list button.ck-presence-list__list-item *{cursor:pointer}.ck.ck-presence-list--collapsed .ck-presence-list__list{min-width:calc(var(--ck-user-avatar-size)*2)}.ck.ck-presence-list--collapsed .ck-presence-list__list *{cursor:pointer;transition:all .4s ease-in-out}.ck.ck-presence-list--collapsed .ck.ck-presence-list__list-item{margin-left:calc(var(--ck-user-avatar-size)*-1 + 7px)}.ck.ck-presence-list--collapsed .ck.ck-presence-list__list-item:last-child{order:unset}.ck.ck-presence-list--collapsed .ck.ck-presence-list__list-item:nth-last-child(2){opacity:.75}.ck.ck-presence-list--collapsed .ck.ck-presence-list__list-item:nth-last-child(3){opacity:.55}.ck.ck-presence-list--collapsed .ck.ck-presence-list__list-item:nth-last-child(4){opacity:.35}.ck.ck-presence-list--collapsed .ck.ck-presence-list__list-item:nth-last-child(5){opacity:.15}.ck.ck-presence-list--collapsed .ck.ck-presence-list__list-item:nth-last-child(n+6){display:none}.ck.ck-presence-list__balloon{--ck-color-panel-border:var(--ck-color-presence-list-dropdown-arrow-border);--ck-color-panel-background:var(--ck-color-presence-list-dropdown-background);animation:fadeIn .3s ease-in-out;background-color:var(--ck-color-presence-list-dropdown-background);border:0;opacity:1}.ck.ck-presence-list__balloon .ck.ck-presence-list__dropdown-list-wrapper{border-radius:var(--ck-border-radius);max-height:80vh;max-width:var(--ck-presence-list-dropdown-list-max-width);min-width:var(--ck-presence-list-dropdown-list-min-width);overflow-x:hidden;overflow-y:auto}.ck.ck-presence-list__balloon .ck.ck-presence-list__dropdown-list-item{align-items:center;background:none;border:0;color:inherit;display:flex;font:inherit;outline:none;padding:var(--ck-spacing-standard);position:relative}.ck.ck-presence-list__balloon .ck.ck-presence-list__dropdown-list-item:first-of-type .ck-presence-list__marker{border-top-left-radius:var(--ck-border-radius)}.ck.ck-presence-list__balloon .ck.ck-presence-list__dropdown-list-item:last-of-type .ck-presence-list__marker{border-bottom-left-radius:var(--ck-border-radius)}.ck.ck-presence-list__balloon .ck.ck-presence-list__dropdown-list .ck-user__full-name{color:var(--ck-color-base-text);margin-left:var(--ck-spacing-standard);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ck.ck-presence-list__balloon .ck.ck-presence-list__dropdown-list .ck.ck-presence-list__marker{height:100%;left:0;margin:0;position:absolute;width:3px}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}",""]);const o=s},7535:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(8433),s=n.n(r)()((function(e){return e[1]}));s.push([e.id,".ck .ck-user__marker-dot{border-radius:50%;cursor:default;display:block;height:var(--ck-user-dot-size);left:50%;position:absolute;top:calc((var(--ck-user-dot-size)/2)*-1);transform:translate(-50%,-50%);width:var(--ck-user-dot-size)}.ck .ck-user__marker{cursor:default;display:inline;position:relative}.ck .ck-user__marker:after{color:#fff;content:attr(data-name);display:none;font-family:Georgia,sans-serif;font-size:var(--ck-font-size-base);font-style:normal;font-weight:400;left:0;line-height:1;opacity:0;padding:var(--ck-spacing-small);position:absolute;top:-20px;transition:opacity .2s linear,transform .3s ease-in-out;white-space:nowrap;z-index:99999}.ck .ck-user__marker:hover .ck-user__marker-dot{width:0}.ck .ck-user__marker:hover:after{animation:fadeInLeft .3s ease-in-out;display:block;opacity:1}.ck .ck-user__marker-line{bottom:0;height:100%;position:absolute;width:0}.ck .ck-placeholder .ck-user__marker{display:none}@keyframes fadeInLeft{0%{opacity:0;transform:translateX(-10px)}to{opacity:1;transform:translateX(0)}}",""]);const o=s},8433:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=e(t);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var s={};if(r)for(var o=0;o<this.length;o++){var i=this[o][0];null!=i&&(s[i]=!0)}for(var a=0;a<e.length;a++){var c=[].concat(e[a]);r&&s[c[0]]||(n&&(c[2]?c[2]="".concat(n," and ").concat(c[2]):c[2]=n),t.push(c))}},t}},9651:e=>{var t=1e3,n=60*t,r=60*n,s=24*r,o=7*s,i=365.25*s;function a(e,t,n,r){var s=t>=1.5*n;return Math.round(e/n)+" "+r+(s?"s":"")}e.exports=function(e,c){c=c||{};var u=typeof e;if("string"===u&&e.length>0)return function(e){if((e=String(e)).length>100)return;var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!a)return;var c=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return c*i;case"weeks":case"week":case"w":return c*o;case"days":case"day":case"d":return c*s;case"hours":case"hour":case"hrs":case"hr":case"h":return c*r;case"minutes":case"minute":case"mins":case"min":case"m":return c*n;case"seconds":case"second":case"secs":case"sec":case"s":return c*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}(e);if("number"===u&&isFinite(e))return c.long?function(e){var o=Math.abs(e);if(o>=s)return a(e,o,s,"day");if(o>=r)return a(e,o,r,"hour");if(o>=n)return a(e,o,n,"minute");if(o>=t)return a(e,o,t,"second");return e+" ms"}(e):function(e){var o=Math.abs(e);if(o>=s)return Math.round(e/s)+"d";if(o>=r)return Math.round(e/r)+"h";if(o>=n)return Math.round(e/n)+"m";if(o>=t)return Math.round(e/t)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},3502:(e,t,n)=>{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,s=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(s=r))})),t.splice(s,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n(4049)(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},4049:(e,t,n)=>{e.exports=function(e){function t(e){let n,s,o,i=null;function a(...e){if(!a.enabled)return;const r=a,s=Number(new Date),o=s-(n||s);r.diff=o,r.prev=n,r.curr=s,n=s,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let i=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,s)=>{if("%%"===n)return"%";i++;const o=t.formatters[s];if("function"==typeof o){const t=e[i];n=o.call(r,t),e.splice(i,1),i--}return n})),t.formatArgs.call(r,e);(r.log||t.log).apply(r,e)}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=r,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==i?i:(s!==t.namespaces&&(s=t.namespaces,o=t.enabled(e)),o),set:e=>{i=e}}),"function"==typeof t.init&&t.init(a),a}function r(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function s(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(s),...t.skips.map(s).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),s=r.length;for(n=0;n<s;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(9651),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},1199:(e,t,n)=>{"use strict";e.exports=n(995)},995:(e,t,n)=>{"use strict";var r=t;function s(){r.util._configure(),r.Writer._configure(r.BufferWriter),r.Reader._configure(r.BufferReader)}r.build="minimal",r.Writer=n(4006),r.BufferWriter=n(5623),r.Reader=n(1366),r.BufferReader=n(5895),r.util=n(9737),r.rpc=n(5178),r.roots=n(4156),r.configure=s,s()},1366:(e,t,n)=>{"use strict";e.exports=c;var r,s=n(9737),o=s.LongBits,i=s.utf8;function a(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function c(e){this.buf=e,this.pos=0,this.len=e.length}var u,d="undefined"!=typeof Uint8Array?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new c(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new c(e);throw Error("illegal buffer")},l=function(){return s.Buffer?function(e){return(c.create=function(e){return s.Buffer.isBuffer(e)?new r(e):d(e)})(e)}:d};function p(){var e=new o(0,0),t=0;if(!(this.len-this.pos>4)){for(;t<3;++t){if(this.pos>=this.len)throw a(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(127&this.buf[this.pos++])<<7*t)>>>0,e}for(;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e;if(t=0,this.len-this.pos>4){for(;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw a(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function h(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function f(){if(this.pos+8>this.len)throw a(this,8);return new o(h(this.buf,this.pos+=4),h(this.buf,this.pos+=4))}c.create=l(),c.prototype._slice=s.Array.prototype.subarray||s.Array.prototype.slice,c.prototype.uint32=(u=4294967295,function(){if(u=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return u;if((this.pos+=5)>this.len)throw this.pos=this.len,a(this,10);return u}),c.prototype.int32=function(){return 0|this.uint32()},c.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)},c.prototype.bool=function(){return 0!==this.uint32()},c.prototype.fixed32=function(){if(this.pos+4>this.len)throw a(this,4);return h(this.buf,this.pos+=4)},c.prototype.sfixed32=function(){if(this.pos+4>this.len)throw a(this,4);return 0|h(this.buf,this.pos+=4)},c.prototype.float=function(){if(this.pos+4>this.len)throw a(this,4);var e=s.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},c.prototype.double=function(){if(this.pos+8>this.len)throw a(this,4);var e=s.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},c.prototype.bytes=function(){var e=this.uint32(),t=this.pos,n=this.pos+e;if(n>this.len)throw a(this,e);return this.pos+=e,Array.isArray(this.buf)?this.buf.slice(t,n):t===n?new this.buf.constructor(0):this._slice.call(this.buf,t,n)},c.prototype.string=function(){var e=this.bytes();return i.read(e,0,e.length)},c.prototype.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw a(this,e);this.pos+=e}else do{if(this.pos>=this.len)throw a(this)}while(128&this.buf[this.pos++]);return this},c.prototype.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(e=7&this.uint32());)this.skipType(e);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},c._configure=function(e){r=e,c.create=l(),r._configure();var t=s.Long?"toLong":"toNumber";s.merge(c.prototype,{int64:function(){return p.call(this)[t](!1)},uint64:function(){return p.call(this)[t](!0)},sint64:function(){return p.call(this).zzDecode()[t](!1)},fixed64:function(){return f.call(this)[t](!0)},sfixed64:function(){return f.call(this)[t](!1)}})}},5895:(e,t,n)=>{"use strict";e.exports=o;var r=n(1366);(o.prototype=Object.create(r.prototype)).constructor=o;var s=n(9737);function o(e){r.call(this,e)}o._configure=function(){s.Buffer&&(o.prototype._slice=s.Buffer.prototype.slice)},o.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+e,this.len))},o._configure()},4156:e=>{"use strict";e.exports={}},5178:(e,t,n)=>{"use strict";t.Service=n(1418)},1418:(e,t,n)=>{"use strict";e.exports=s;var r=n(9737);function s(e,t,n){if("function"!=typeof e)throw TypeError("rpcImpl must be a function");r.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=Boolean(t),this.responseDelimited=Boolean(n)}(s.prototype=Object.create(r.EventEmitter.prototype)).constructor=s,s.prototype.rpcCall=function e(t,n,s,o,i){if(!o)throw TypeError("request must be specified");var a=this;if(!i)return r.asPromise(e,a,t,n,s,o);if(a.rpcImpl)try{return a.rpcImpl(t,n[a.requestDelimited?"encodeDelimited":"encode"](o).finish(),(function(e,n){if(e)return a.emit("error",e,t),i(e);if(null!==n){if(!(n instanceof s))try{n=s[a.responseDelimited?"decodeDelimited":"decode"](n)}catch(e){return a.emit("error",e,t),i(e)}return a.emit("data",n,t),i(null,n)}a.end(!0)}))}catch(e){return a.emit("error",e,t),void setTimeout((function(){i(e)}),0)}else setTimeout((function(){i(Error("already ended"))}),0)},s.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},2130:(e,t,n)=>{"use strict";e.exports=s;var r=n(9737);function s(e,t){this.lo=e>>>0,this.hi=t>>>0}var o=s.zero=new s(0,0);o.toNumber=function(){return 0},o.zzEncode=o.zzDecode=function(){return this},o.length=function(){return 1};var i=s.zeroHash="\0\0\0\0\0\0\0\0";s.fromNumber=function(e){if(0===e)return o;var t=e<0;t&&(e=-e);var n=e>>>0,r=(e-n)/4294967296>>>0;return t&&(r=~r>>>0,n=~n>>>0,++n>4294967295&&(n=0,++r>4294967295&&(r=0))),new s(n,r)},s.from=function(e){if("number"==typeof e)return s.fromNumber(e);if(r.isString(e)){if(!r.Long)return s.fromNumber(parseInt(e,10));e=r.Long.fromString(e)}return e.low||e.high?new s(e.low>>>0,e.high>>>0):o},s.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=1+~this.lo>>>0,n=~this.hi>>>0;return t||(n=n+1>>>0),-(t+4294967296*n)}return this.lo+4294967296*this.hi},s.prototype.toLong=function(e){return r.Long?new r.Long(0|this.lo,0|this.hi,Boolean(e)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(e)}};var a=String.prototype.charCodeAt;s.fromHash=function(e){return e===i?o:new s((a.call(e,0)|a.call(e,1)<<8|a.call(e,2)<<16|a.call(e,3)<<24)>>>0,(a.call(e,4)|a.call(e,5)<<8|a.call(e,6)<<16|a.call(e,7)<<24)>>>0)},s.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},s.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},s.prototype.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},s.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,n=this.hi>>>24;return 0===n?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:n<128?9:10}},9737:function(e,t,n){"use strict";var r=t;function s(e,t,n){for(var r=Object.keys(t),s=0;s<r.length;++s)void 0!==e[r[s]]&&n||(e[r[s]]=t[r[s]]);return e}function o(e){function t(e,n){if(!(this instanceof t))return new t(e,n);Object.defineProperty(this,"message",{get:function(){return e}}),Error.captureStackTrace?Error.captureStackTrace(this,t):Object.defineProperty(this,"stack",{value:(new Error).stack||""}),n&&s(this,n)}return t.prototype=Object.create(Error.prototype,{constructor:{value:t,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return e},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),t}r.asPromise=n(9310),r.base64=n(6662),r.EventEmitter=n(5707),r.float=n(9365),r.inquire=n(230),r.utf8=n(1742),r.pool=n(319),r.LongBits=n(2130),r.isNode=Boolean(void 0!==n.g&&n.g&&n.g.process&&n.g.process.versions&&n.g.process.versions.node),r.global=r.isNode&&n.g||"undefined"!=typeof window&&window||"undefined"!=typeof self&&self||this,r.emptyArray=Object.freeze?Object.freeze([]):[],r.emptyObject=Object.freeze?Object.freeze({}):{},r.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},r.isString=function(e){return"string"==typeof e||e instanceof String},r.isObject=function(e){return e&&"object"==typeof e},r.isset=r.isSet=function(e,t){var n=e[t];return!(null==n||!e.hasOwnProperty(t))&&("object"!=typeof n||(Array.isArray(n)?n.length:Object.keys(n).length)>0)},r.Buffer=function(){try{var e=r.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch(e){return null}}(),r._Buffer_from=null,r._Buffer_allocUnsafe=null,r.newBuffer=function(e){return"number"==typeof e?r.Buffer?r._Buffer_allocUnsafe(e):new r.Array(e):r.Buffer?r._Buffer_from(e):"undefined"==typeof Uint8Array?e:new Uint8Array(e)},r.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,r.Long=r.global.dcodeIO&&r.global.dcodeIO.Long||r.global.Long||r.inquire("long"),r.key2Re=/^true|false|0|1$/,r.key32Re=/^-?(?:0|[1-9][0-9]*)$/,r.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,r.longToHash=function(e){return e?r.LongBits.from(e).toHash():r.LongBits.zeroHash},r.longFromHash=function(e,t){var n=r.LongBits.fromHash(e);return r.Long?r.Long.fromBits(n.lo,n.hi,t):n.toNumber(Boolean(t))},r.merge=s,r.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},r.newError=o,r.ProtocolError=o("ProtocolError"),r.oneOfGetter=function(e){for(var t={},n=0;n<e.length;++n)t[e[n]]=1;return function(){for(var e=Object.keys(this),n=e.length-1;n>-1;--n)if(1===t[e[n]]&&void 0!==this[e[n]]&&null!==this[e[n]])return e[n]}},r.oneOfSetter=function(e){return function(t){for(var n=0;n<e.length;++n)e[n]!==t&&delete this[e[n]]}},r.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},r._configure=function(){var e=r.Buffer;e?(r._Buffer_from=e.from!==Uint8Array.from&&e.from||function(t,n){return new e(t,n)},r._Buffer_allocUnsafe=e.allocUnsafe||function(t){return new e(t)}):r._Buffer_from=r._Buffer_allocUnsafe=null}},4006:(e,t,n)=>{"use strict";e.exports=l;var r,s=n(9737),o=s.LongBits,i=s.base64,a=s.utf8;function c(e,t,n){this.fn=e,this.len=t,this.next=void 0,this.val=n}function u(){}function d(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function l(){this.len=0,this.head=new c(u,0,0),this.tail=this.head,this.states=null}var p=function(){return s.Buffer?function(){return(l.create=function(){return new r})()}:function(){return new l}};function h(e,t,n){t[n]=255&e}function f(e,t){this.len=e,this.next=void 0,this.val=t}function m(e,t,n){for(;e.hi;)t[n++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[n++]=127&e.lo|128,e.lo=e.lo>>>7;t[n++]=e.lo}function y(e,t,n){t[n]=255&e,t[n+1]=e>>>8&255,t[n+2]=e>>>16&255,t[n+3]=e>>>24}l.create=p(),l.alloc=function(e){return new s.Array(e)},s.Array!==Array&&(l.alloc=s.pool(l.alloc,s.Array.prototype.subarray)),l.prototype._push=function(e,t,n){return this.tail=this.tail.next=new c(e,t,n),this.len+=t,this},f.prototype=Object.create(c.prototype),f.prototype.fn=function(e,t,n){for(;e>127;)t[n++]=127&e|128,e>>>=7;t[n]=e},l.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new f((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},l.prototype.int32=function(e){return e<0?this._push(m,10,o.fromNumber(e)):this.uint32(e)},l.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},l.prototype.uint64=function(e){var t=o.from(e);return this._push(m,t.length(),t)},l.prototype.int64=l.prototype.uint64,l.prototype.sint64=function(e){var t=o.from(e).zzEncode();return this._push(m,t.length(),t)},l.prototype.bool=function(e){return this._push(h,1,e?1:0)},l.prototype.fixed32=function(e){return this._push(y,4,e>>>0)},l.prototype.sfixed32=l.prototype.fixed32,l.prototype.fixed64=function(e){var t=o.from(e);return this._push(y,4,t.lo)._push(y,4,t.hi)},l.prototype.sfixed64=l.prototype.fixed64,l.prototype.float=function(e){return this._push(s.float.writeFloatLE,4,e)},l.prototype.double=function(e){return this._push(s.float.writeDoubleLE,8,e)};var g=s.Array.prototype.set?function(e,t,n){t.set(e,n)}:function(e,t,n){for(var r=0;r<e.length;++r)t[n+r]=e[r]};l.prototype.bytes=function(e){var t=e.length>>>0;if(!t)return this._push(h,1,0);if(s.isString(e)){var n=l.alloc(t=i.length(e));i.decode(e,n,0),e=n}return this.uint32(t)._push(g,t,e)},l.prototype.string=function(e){var t=a.length(e);return t?this.uint32(t)._push(a.write,t,e):this._push(h,1,0)},l.prototype.fork=function(){return this.states=new d(this),this.head=this.tail=new c(u,0,0),this.len=0,this},l.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new c(u,0,0),this.len=0),this},l.prototype.ldelim=function(){var e=this.head,t=this.tail,n=this.len;return this.reset().uint32(n),n&&(this.tail.next=e.next,this.tail=t,this.len+=n),this},l.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),n=0;e;)e.fn(e.val,t,n),n+=e.len,e=e.next;return t},l._configure=function(e){r=e,l.create=p(),r._configure()}},5623:(e,t,n)=>{"use strict";e.exports=o;var r=n(4006);(o.prototype=Object.create(r.prototype)).constructor=o;var s=n(9737);function o(){r.call(this)}function i(e,t,n){e.length<40?s.utf8.write(e,t,n):t.utf8Write?t.utf8Write(e,n):t.write(e,n)}o._configure=function(){o.alloc=s._Buffer_allocUnsafe,o.writeBytesBuffer=s.Buffer&&s.Buffer.prototype instanceof Uint8Array&&"set"===s.Buffer.prototype.set.name?function(e,t,n){t.set(e,n)}:function(e,t,n){if(e.copy)e.copy(t,n,0,e.length);else for(var r=0;r<e.length;)t[n++]=e[r++]}},o.prototype.bytes=function(e){s.isString(e)&&(e=s._Buffer_from(e,"base64"));var t=e.length>>>0;return this.uint32(t),t&&this._push(o.writeBytesBuffer,t,e),this},o.prototype.string=function(e){var t=s.Buffer.byteLength(e);return this.uint32(t),t&&this._push(i,t,e),this},o._configure()},6553:(e,t)=>{"use strict";var n=Object.prototype.hasOwnProperty;function r(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(e){return null}}function s(e){try{return encodeURIComponent(e)}catch(e){return null}}t.stringify=function(e,t){t=t||"";var r,o,i=[];for(o in"string"!=typeof t&&(t="?"),e)if(n.call(e,o)){if((r=e[o])||null!=r&&!isNaN(r)||(r=""),o=s(o),r=s(r),null===o||null===r)continue;i.push(o+"="+r)}return i.length?t+i.join("&"):""},t.parse=function(e){for(var t,n=/([^=?#&]+)=?([^&]*)/g,s={};t=n.exec(e);){var o=r(t[1]),i=r(t[2]);null===o||null===i||o in s||(s[o]=i)}return s}},8696:e=>{"use strict";e.exports=function(e,t){if(t=t.split(":")[0],!(e=+e))return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e}},4673:(e,t,n)=>{"use strict";var r,s=function(){return void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r},o=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),i=[];function a(e){for(var t=-1,n=0;n<i.length;n++)if(i[n].identifier===e){t=n;break}return t}function c(e,t){for(var n={},r=[],s=0;s<e.length;s++){var o=e[s],c=t.base?o[0]+t.base:o[0],u=n[c]||0,d="".concat(c," ").concat(u);n[c]=u+1;var l=a(d),p={css:o[1],media:o[2],sourceMap:o[3]};-1!==l?(i[l].references++,i[l].updater(p)):i.push({identifier:d,updater:y(p,t),references:1}),r.push(d)}return r}function u(e){var t=document.createElement("style"),r=e.attributes||{};if(void 0===r.nonce){var s=n.nc;s&&(r.nonce=s)}if(Object.keys(r).forEach((function(e){t.setAttribute(e,r[e])})),"function"==typeof e.insert)e.insert(t);else{var i=o(e.insert||"head");if(!i)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");i.appendChild(t)}return t}var d,l=(d=[],function(e,t){return d[e]=t,d.filter(Boolean).join("\n")});function p(e,t,n,r){var s=n?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;if(e.styleSheet)e.styleSheet.cssText=l(t,s);else{var o=document.createTextNode(s),i=e.childNodes;i[t]&&e.removeChild(i[t]),i.length?e.insertBefore(o,i[t]):e.appendChild(o)}}function h(e,t,n){var r=n.css,s=n.media,o=n.sourceMap;if(s?e.setAttribute("media",s):e.removeAttribute("media"),o&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}var f=null,m=0;function y(e,t){var n,r,s;if(t.singleton){var o=m++;n=f||(f=u(t)),r=p.bind(null,n,o,!1),s=p.bind(null,n,o,!0)}else n=u(t),r=h.bind(null,n,t),s=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else s()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=s());var n=c(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var r=0;r<n.length;r++){var s=a(n[r]);i[s].references--}for(var o=c(e,t),u=0;u<n.length;u++){var d=a(n[u]);0===i[d].references&&(i[d].updater(),i.splice(d,1))}n=o}}}},5835:(e,t,n)=>{"use strict";var r=n(8696),s=n(6553),o=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,i=/[\n\r\t]/g,a=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,c=/:\d+$/,u=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,d=/^[a-zA-Z]:/;function l(e){return(e||"").toString().replace(o,"")}var p=[["#","hash"],["?","query"],function(e,t){return m(t.protocol)?e.replace(/\\/g,"/"):e},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],h={hash:1,query:1};function f(e){var t,r=("undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{}).location||{},s={},o=typeof(e=e||r);if("blob:"===e.protocol)s=new g(unescape(e.pathname),{});else if("string"===o)for(t in s=new g(e,{}),h)delete s[t];else if("object"===o){for(t in e)t in h||(s[t]=e[t]);void 0===s.slashes&&(s.slashes=a.test(e.href))}return s}function m(e){return"file:"===e||"ftp:"===e||"http:"===e||"https:"===e||"ws:"===e||"wss:"===e}function y(e,t){e=(e=l(e)).replace(i,""),t=t||{};var n,r=u.exec(e),s=r[1]?r[1].toLowerCase():"",o=!!r[2],a=!!r[3],c=0;return o?a?(n=r[2]+r[3]+r[4],c=r[2].length+r[3].length):(n=r[2]+r[4],c=r[2].length):a?(n=r[3]+r[4],c=r[3].length):n=r[4],"file:"===s?c>=2&&(n=n.slice(2)):m(s)?n=r[4]:s?o&&(n=n.slice(2)):c>=2&&m(t.protocol)&&(n=r[4]),{protocol:s,slashes:o||m(s),slashesCount:c,rest:n}}function g(e,t,n){if(e=(e=l(e)).replace(i,""),!(this instanceof g))return new g(e,t,n);var o,a,c,u,h,b,O=p.slice(),v=typeof t,w=this,I=0;for("object"!==v&&"string"!==v&&(n=t,t=null),n&&"function"!=typeof n&&(n=s.parse),o=!(a=y(e||"",t=f(t))).protocol&&!a.slashes,w.slashes=a.slashes||o&&t.slashes,w.protocol=a.protocol||t.protocol||"",e=a.rest,("file:"===a.protocol&&(2!==a.slashesCount||d.test(e))||!a.slashes&&(a.protocol||a.slashesCount<2||!m(w.protocol)))&&(O[3]=[/(.*)/,"pathname"]);I<O.length;I++)"function"!=typeof(u=O[I])?(c=u[0],b=u[1],c!=c?w[b]=e:"string"==typeof c?~(h="@"===c?e.lastIndexOf(c):e.indexOf(c))&&("number"==typeof u[2]?(w[b]=e.slice(0,h),e=e.slice(h+u[2])):(w[b]=e.slice(h),e=e.slice(0,h))):(h=c.exec(e))&&(w[b]=h[1],e=e.slice(0,h.index)),w[b]=w[b]||o&&u[3]&&t[b]||"",u[4]&&(w[b]=w[b].toLowerCase())):e=u(e,w);n&&(w.query=n(w.query)),o&&t.slashes&&"/"!==w.pathname.charAt(0)&&(""!==w.pathname||""!==t.pathname)&&(w.pathname=function(e,t){if(""===e)return t;for(var n=(t||"/").split("/").slice(0,-1).concat(e.split("/")),r=n.length,s=n[r-1],o=!1,i=0;r--;)"."===n[r]?n.splice(r,1):".."===n[r]?(n.splice(r,1),i++):i&&(0===r&&(o=!0),n.splice(r,1),i--);return o&&n.unshift(""),"."!==s&&".."!==s||n.push(""),n.join("/")}(w.pathname,t.pathname)),"/"!==w.pathname.charAt(0)&&m(w.protocol)&&(w.pathname="/"+w.pathname),r(w.port,w.protocol)||(w.host=w.hostname,w.port=""),w.username=w.password="",w.auth&&(~(h=w.auth.indexOf(":"))?(w.username=w.auth.slice(0,h),w.username=encodeURIComponent(decodeURIComponent(w.username)),w.password=w.auth.slice(h+1),w.password=encodeURIComponent(decodeURIComponent(w.password))):w.username=encodeURIComponent(decodeURIComponent(w.auth)),w.auth=w.password?w.username+":"+w.password:w.username),w.origin="file:"!==w.protocol&&m(w.protocol)&&w.host?w.protocol+"//"+w.host:"null",w.href=w.toString()}g.prototype={set:function(e,t,n){var o=this;switch(e){case"query":"string"==typeof t&&t.length&&(t=(n||s.parse)(t)),o[e]=t;break;case"port":o[e]=t,r(t,o.protocol)?t&&(o.host=o.hostname+":"+t):(o.host=o.hostname,o[e]="");break;case"hostname":o[e]=t,o.port&&(t+=":"+o.port),o.host=t;break;case"host":o[e]=t,c.test(t)?(t=t.split(":"),o.port=t.pop(),o.hostname=t.join(":")):(o.hostname=t,o.port="");break;case"protocol":o.protocol=t.toLowerCase(),o.slashes=!n;break;case"pathname":case"hash":if(t){var i="pathname"===e?"/":"#";o[e]=t.charAt(0)!==i?i+t:t}else o[e]=t;break;case"username":case"password":o[e]=encodeURIComponent(t);break;case"auth":var a=t.indexOf(":");~a?(o.username=t.slice(0,a),o.username=encodeURIComponent(decodeURIComponent(o.username)),o.password=t.slice(a+1),o.password=encodeURIComponent(decodeURIComponent(o.password))):o.username=encodeURIComponent(decodeURIComponent(t))}for(var u=0;u<p.length;u++){var d=p[u];d[4]&&(o[d[1]]=o[d[1]].toLowerCase())}return o.auth=o.password?o.username+":"+o.password:o.username,o.origin="file:"!==o.protocol&&m(o.protocol)&&o.host?o.protocol+"//"+o.host:"null",o.href=o.toString(),o},toString:function(e){e&&"function"==typeof e||(e=s.stringify);var t,n=this,r=n.host,o=n.protocol;o&&":"!==o.charAt(o.length-1)&&(o+=":");var i=o+(n.protocol&&n.slashes||m(n.protocol)?"//":"");return n.username?(i+=n.username,n.password&&(i+=":"+n.password),i+="@"):n.password?(i+=":"+n.password,i+="@"):"file:"!==n.protocol&&m(n.protocol)&&!r&&"/"!==n.pathname&&(i+="@"),(":"===r[r.length-1]||c.test(n.hostname)&&!n.port)&&(r+=":"),i+=r+n.pathname,(t="object"==typeof n.query?e(n.query):n.query)&&(i+="?"!==t.charAt(0)?"?"+t:t),n.hash&&(i+=n.hash),i}},g.extractProtocol=y,g.location=f,g.trimLeft=l,g.qs=s,e.exports=g},9662:(e,t,n)=>{"use strict";var r;n.r(t),n.d(t,{NIL:()=>D,parse:()=>y,stringify:()=>d,v1:()=>m,v3:()=>A,v4:()=>T,v5:()=>j,validate:()=>a,version:()=>R});var s=new Uint8Array(16);function o(){if(!r&&!(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(s)}const i=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;const a=function(e){return"string"==typeof e&&i.test(e)};for(var c=[],u=0;u<256;++u)c.push((u+256).toString(16).substr(1));const d=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(c[e[t+0]]+c[e[t+1]]+c[e[t+2]]+c[e[t+3]]+"-"+c[e[t+4]]+c[e[t+5]]+"-"+c[e[t+6]]+c[e[t+7]]+"-"+c[e[t+8]]+c[e[t+9]]+"-"+c[e[t+10]]+c[e[t+11]]+c[e[t+12]]+c[e[t+13]]+c[e[t+14]]+c[e[t+15]]).toLowerCase();if(!a(n))throw TypeError("Stringified UUID is invalid");return n};var l,p,h=0,f=0;const m=function(e,t,n){var r=t&&n||0,s=t||new Array(16),i=(e=e||{}).node||l,a=void 0!==e.clockseq?e.clockseq:p;if(null==i||null==a){var c=e.random||(e.rng||o)();null==i&&(i=l=[1|c[0],c[1],c[2],c[3],c[4],c[5]]),null==a&&(a=p=16383&(c[6]<<8|c[7]))}var u=void 0!==e.msecs?e.msecs:Date.now(),m=void 0!==e.nsecs?e.nsecs:f+1,y=u-h+(m-f)/1e4;if(y<0&&void 0===e.clockseq&&(a=a+1&16383),(y<0||u>h)&&void 0===e.nsecs&&(m=0),m>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");h=u,f=m,p=a;var g=(1e4*(268435455&(u+=122192928e5))+m)%4294967296;s[r++]=g>>>24&255,s[r++]=g>>>16&255,s[r++]=g>>>8&255,s[r++]=255&g;var b=u/4294967296*1e4&268435455;s[r++]=b>>>8&255,s[r++]=255&b,s[r++]=b>>>24&15|16,s[r++]=b>>>16&255,s[r++]=a>>>8|128,s[r++]=255&a;for(var O=0;O<6;++O)s[r+O]=i[O];return t||d(s)};const y=function(e){if(!a(e))throw TypeError("Invalid UUID");var t,n=new Uint8Array(16);return n[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=255&t,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=255&t,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=255&t,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=255&t,n};function g(e,t,n){function r(e,r,s,o){if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=[],n=0;n<e.length;++n)t.push(e.charCodeAt(n));return t}(e)),"string"==typeof r&&(r=y(r)),16!==r.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var i=new Uint8Array(16+e.length);if(i.set(r),i.set(e,r.length),(i=n(i))[6]=15&i[6]|t,i[8]=63&i[8]|128,s){o=o||0;for(var a=0;a<16;++a)s[o+a]=i[a];return s}return d(i)}try{r.name=e}catch(e){}return r.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",r.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",r}function b(e){return 14+(e+64>>>9<<4)+1}function O(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function v(e,t,n,r,s,o){return O((i=O(O(t,e),O(r,o)))<<(a=s)|i>>>32-a,n);var i,a}function w(e,t,n,r,s,o,i){return v(t&n|~t&r,e,t,s,o,i)}function I(e,t,n,r,s,o,i){return v(t&r|n&~r,e,t,s,o,i)}function _(e,t,n,r,s,o,i){return v(t^n^r,e,t,s,o,i)}function S(e,t,n,r,s,o,i){return v(n^(t|~r),e,t,s,o,i)}const P=function(e){if("string"==typeof e){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var n=0;n<t.length;++n)e[n]=t.charCodeAt(n)}return function(e){for(var t=[],n=32*e.length,r="0123456789abcdef",s=0;s<n;s+=8){var o=e[s>>5]>>>s%32&255,i=parseInt(r.charAt(o>>>4&15)+r.charAt(15&o),16);t.push(i)}return t}(function(e,t){e[t>>5]|=128<<t%32,e[b(t)-1]=t;for(var n=1732584193,r=-271733879,s=-1732584194,o=271733878,i=0;i<e.length;i+=16){var a=n,c=r,u=s,d=o;n=w(n,r,s,o,e[i],7,-680876936),o=w(o,n,r,s,e[i+1],12,-389564586),s=w(s,o,n,r,e[i+2],17,606105819),r=w(r,s,o,n,e[i+3],22,-1044525330),n=w(n,r,s,o,e[i+4],7,-176418897),o=w(o,n,r,s,e[i+5],12,1200080426),s=w(s,o,n,r,e[i+6],17,-1473231341),r=w(r,s,o,n,e[i+7],22,-45705983),n=w(n,r,s,o,e[i+8],7,1770035416),o=w(o,n,r,s,e[i+9],12,-1958414417),s=w(s,o,n,r,e[i+10],17,-42063),r=w(r,s,o,n,e[i+11],22,-1990404162),n=w(n,r,s,o,e[i+12],7,1804603682),o=w(o,n,r,s,e[i+13],12,-40341101),s=w(s,o,n,r,e[i+14],17,-1502002290),n=I(n,r=w(r,s,o,n,e[i+15],22,1236535329),s,o,e[i+1],5,-165796510),o=I(o,n,r,s,e[i+6],9,-1069501632),s=I(s,o,n,r,e[i+11],14,643717713),r=I(r,s,o,n,e[i],20,-373897302),n=I(n,r,s,o,e[i+5],5,-701558691),o=I(o,n,r,s,e[i+10],9,38016083),s=I(s,o,n,r,e[i+15],14,-660478335),r=I(r,s,o,n,e[i+4],20,-405537848),n=I(n,r,s,o,e[i+9],5,568446438),o=I(o,n,r,s,e[i+14],9,-1019803690),s=I(s,o,n,r,e[i+3],14,-187363961),r=I(r,s,o,n,e[i+8],20,1163531501),n=I(n,r,s,o,e[i+13],5,-1444681467),o=I(o,n,r,s,e[i+2],9,-51403784),s=I(s,o,n,r,e[i+7],14,1735328473),n=_(n,r=I(r,s,o,n,e[i+12],20,-1926607734),s,o,e[i+5],4,-378558),o=_(o,n,r,s,e[i+8],11,-2022574463),s=_(s,o,n,r,e[i+11],16,1839030562),r=_(r,s,o,n,e[i+14],23,-35309556),n=_(n,r,s,o,e[i+1],4,-1530992060),o=_(o,n,r,s,e[i+4],11,1272893353),s=_(s,o,n,r,e[i+7],16,-155497632),r=_(r,s,o,n,e[i+10],23,-1094730640),n=_(n,r,s,o,e[i+13],4,681279174),o=_(o,n,r,s,e[i],11,-358537222),s=_(s,o,n,r,e[i+3],16,-722521979),r=_(r,s,o,n,e[i+6],23,76029189),n=_(n,r,s,o,e[i+9],4,-640364487),o=_(o,n,r,s,e[i+12],11,-421815835),s=_(s,o,n,r,e[i+15],16,530742520),n=S(n,r=_(r,s,o,n,e[i+2],23,-995338651),s,o,e[i],6,-198630844),o=S(o,n,r,s,e[i+7],10,1126891415),s=S(s,o,n,r,e[i+14],15,-1416354905),r=S(r,s,o,n,e[i+5],21,-57434055),n=S(n,r,s,o,e[i+12],6,1700485571),o=S(o,n,r,s,e[i+3],10,-1894986606),s=S(s,o,n,r,e[i+10],15,-1051523),r=S(r,s,o,n,e[i+1],21,-2054922799),n=S(n,r,s,o,e[i+8],6,1873313359),o=S(o,n,r,s,e[i+15],10,-30611744),s=S(s,o,n,r,e[i+6],15,-1560198380),r=S(r,s,o,n,e[i+13],21,1309151649),n=S(n,r,s,o,e[i+4],6,-145523070),o=S(o,n,r,s,e[i+11],10,-1120210379),s=S(s,o,n,r,e[i+2],15,718787259),r=S(r,s,o,n,e[i+9],21,-343485551),n=O(n,a),r=O(r,c),s=O(s,u),o=O(o,d)}return[n,r,s,o]}(function(e){if(0===e.length)return[];for(var t=8*e.length,n=new Uint32Array(b(t)),r=0;r<t;r+=8)n[r>>5]|=(255&e[r/8])<<r%32;return n}(e),8*e.length))};const A=g("v3",48,P);const T=function(e,t,n){var r=(e=e||{}).random||(e.rng||o)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var s=0;s<16;++s)t[n+s]=r[s];return t}return d(r)};function k(e,t,n,r){switch(e){case 0:return t&n^~t&r;case 1:case 3:return t^n^r;case 2:return t&n^t&r^n&r}}function C(e,t){return e<<t|e>>>32-t}const E=function(e){var t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){var r=unescape(encodeURIComponent(e));e=[];for(var s=0;s<r.length;++s)e.push(r.charCodeAt(s))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);for(var o=e.length/4+2,i=Math.ceil(o/16),a=new Array(i),c=0;c<i;++c){for(var u=new Uint32Array(16),d=0;d<16;++d)u[d]=e[64*c+4*d]<<24|e[64*c+4*d+1]<<16|e[64*c+4*d+2]<<8|e[64*c+4*d+3];a[c]=u}a[i-1][14]=8*(e.length-1)/Math.pow(2,32),a[i-1][14]=Math.floor(a[i-1][14]),a[i-1][15]=8*(e.length-1)&4294967295;for(var l=0;l<i;++l){for(var p=new Uint32Array(80),h=0;h<16;++h)p[h]=a[l][h];for(var f=16;f<80;++f)p[f]=C(p[f-3]^p[f-8]^p[f-14]^p[f-16],1);for(var m=n[0],y=n[1],g=n[2],b=n[3],O=n[4],v=0;v<80;++v){var w=Math.floor(v/20),I=C(m,5)+k(w,y,g,b)+O+t[w]+p[v]>>>0;O=b,b=g,g=C(y,30)>>>0,y=m,m=I}n[0]=n[0]+m>>>0,n[1]=n[1]+y>>>0,n[2]=n[2]+g>>>0,n[3]=n[3]+b>>>0,n[4]=n[4]+O>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]};const j=g("v5",80,E),D="00000000-0000-0000-0000-000000000000";const R=function(e){if(!a(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)}},6211:(e,t,n)=>{e.exports=n(7312)("./src/collaboration-core.js")},1782:(e,t,n)=>{e.exports=n(9237)("./src/core.js")},1783:(e,t,n)=>{e.exports=n(9237)("./src/engine.js")},8311:(e,t,n)=>{e.exports=n(9237)("./src/ui.js")},4584:(e,t,n)=>{e.exports=n(9237)("./src/utils.js")},7312:e=>{"use strict";e.exports=CKEditor5.collaborationDll},9237:e=>{"use strict";e.exports=CKEditor5.dll},7809:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reconstructPacket=t.deconstructPacket=void 0;const r=n(5132);function s(e,t){if(!e)return e;if((0,r.isBinary)(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=s(e[r],t);return n}if("object"==typeof e&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=s(e[r],t));return n}return e}function o(e,t){if(!e)return e;if(e&&!0===e._placeholder){if("number"==typeof e.num&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=o(e[n],t);else if("object"==typeof e)for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=o(e[n],t));return e}t.deconstructPacket=function(e){const t=[],n=e.data,r=e;return r.data=s(n,t),r.attachments=t.length,{packet:r,buffers:t}},t.reconstructPacket=function(e,t){return e.data=o(e.data,t),delete e.attachments,e}},114:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Decoder=t.Encoder=t.PacketType=t.protocol=void 0;const r=n(4770),s=n(7809),o=n(5132),i=(0,n(3502).default)("socket.io-parser");var a;t.protocol=5,function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"}(a=t.PacketType||(t.PacketType={}));t.Encoder=class{constructor(e){this.replacer=e}encode(e){return i("encoding packet %j",e),e.type!==a.EVENT&&e.type!==a.ACK||!(0,o.hasBinary)(e)?[this.encodeAsString(e)]:this.encodeAsBinary({type:e.type===a.EVENT?a.BINARY_EVENT:a.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id})}encodeAsString(e){let t=""+e.type;return e.type!==a.BINARY_EVENT&&e.type!==a.BINARY_ACK||(t+=e.attachments+"-"),e.nsp&&"/"!==e.nsp&&(t+=e.nsp+","),null!=e.id&&(t+=e.id),null!=e.data&&(t+=JSON.stringify(e.data,this.replacer)),i("encoded %j as %s",e,t),t}encodeAsBinary(e){const t=(0,s.deconstructPacket)(e),n=this.encodeAsString(t.packet),r=t.buffers;return r.unshift(n),r}};class c extends r.Emitter{constructor(e){super(),this.reviver=e}add(e){let t;if("string"==typeof e){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");t=this.decodeString(e);const n=t.type===a.BINARY_EVENT;n||t.type===a.BINARY_ACK?(t.type=n?a.EVENT:a.ACK,this.reconstructor=new u(t),0===t.attachments&&super.emitReserved("decoded",t)):super.emitReserved("decoded",t)}else{if(!(0,o.isBinary)(e)&&!e.base64)throw new Error("Unknown type: "+e);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");t=this.reconstructor.takeBinaryData(e),t&&(this.reconstructor=null,super.emitReserved("decoded",t))}}decodeString(e){let t=0;const n={type:Number(e.charAt(0))};if(void 0===a[n.type])throw new Error("unknown packet type "+n.type);if(n.type===a.BINARY_EVENT||n.type===a.BINARY_ACK){const r=t+1;for(;"-"!==e.charAt(++t)&&t!=e.length;);const s=e.substring(r,t);if(s!=Number(s)||"-"!==e.charAt(t))throw new Error("Illegal attachments");n.attachments=Number(s)}if("/"===e.charAt(t+1)){const r=t+1;for(;++t;){if(","===e.charAt(t))break;if(t===e.length)break}n.nsp=e.substring(r,t)}else n.nsp="/";const r=e.charAt(t+1);if(""!==r&&Number(r)==r){const r=t+1;for(;++t;){const n=e.charAt(t);if(null==n||Number(n)!=n){--t;break}if(t===e.length)break}n.id=Number(e.substring(r,t+1))}if(e.charAt(++t)){const r=this.tryParse(e.substr(t));if(!c.isPayloadValid(n.type,r))throw new Error("invalid payload");n.data=r}return i("decoded %s as %j",e,n),n}tryParse(e){try{return JSON.parse(e,this.reviver)}catch(e){return!1}}static isPayloadValid(e,t){switch(e){case a.CONNECT:return"object"==typeof t;case a.DISCONNECT:return void 0===t;case a.CONNECT_ERROR:return"string"==typeof t||"object"==typeof t;case a.EVENT:case a.BINARY_EVENT:return Array.isArray(t)&&("string"==typeof t[0]||"number"==typeof t[0]);case a.ACK:case a.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}t.Decoder=c;class u{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const e=(0,s.reconstructPacket)(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}},5132:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hasBinary=t.isBinary=void 0;const n="function"==typeof ArrayBuffer,r=e=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,s=Object.prototype.toString,o="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===s.call(Blob),i="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===s.call(File);function a(e){return n&&(e instanceof ArrayBuffer||r(e))||o&&e instanceof Blob||i&&e instanceof File}t.isBinary=a,t.hasBinary=function e(t,n){if(!t||"object"!=typeof t)return!1;if(Array.isArray(t)){for(let n=0,r=t.length;n<r;n++)if(e(t[n]))return!0;return!1}if(a(t))return!0;if(t.toJSON&&"function"==typeof t.toJSON&&1===arguments.length)return e(t.toJSON(),!0);for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return!0;return!1}},6097:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hasCORS=void 0;let n=!1;try{n="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(e){}t.hasCORS=n},7032:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decode=t.encode=void 0,t.encode=function(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t},t.decode=function(e){let t={},n=e.split("&");for(let e=0,r=n.length;e<r;e++){let r=n[e].split("=");t[decodeURIComponent(r[0])]=decodeURIComponent(r[1])}return t}},5836:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parse=void 0;const n=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,r=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];t.parse=function(e){const t=e,s=e.indexOf("["),o=e.indexOf("]");-1!=s&&-1!=o&&(e=e.substring(0,s)+e.substring(s,o).replace(/:/g,";")+e.substring(o,e.length));let i=n.exec(e||""),a={},c=14;for(;c--;)a[r[c]]=i[c]||"";return-1!=s&&-1!=o&&(a.source=t,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a.pathNames=function(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");"/"!=t.slice(0,1)&&0!==t.length||r.splice(0,1);"/"==t.slice(-1)&&r.splice(r.length-1,1);return r}(0,a.path),a.queryKey=function(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,(function(e,t,r){t&&(n[t]=r)})),n}(0,a.query),a}},2785:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.yeast=t.decode=t.encode=void 0;const n="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),r=64,s={};let o,i=0,a=0;function c(e){let t="";do{t=n[e%r]+t,e=Math.floor(e/r)}while(e>0);return t}for(t.encode=c,t.decode=function(e){let t=0;for(a=0;a<e.length;a++)t=t*r+s[e.charAt(a)];return t},t.yeast=function(){const e=c(+new Date);return e!==o?(i=0,o=e):e+"."+c(i++)};a<r;a++)s[n[a]]=a},6988:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.globalThisShim=void 0,t.globalThisShim="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")()},6105:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.nextTick=t.parse=t.installTimerFunctions=t.transports=t.Transport=t.protocol=t.Socket=void 0;const r=n(8160);Object.defineProperty(t,"Socket",{enumerable:!0,get:function(){return r.Socket}}),t.protocol=r.Socket.protocol;var s=n(7620);Object.defineProperty(t,"Transport",{enumerable:!0,get:function(){return s.Transport}});var o=n(7316);Object.defineProperty(t,"transports",{enumerable:!0,get:function(){return o.transports}});var i=n(9889);Object.defineProperty(t,"installTimerFunctions",{enumerable:!0,get:function(){return i.installTimerFunctions}});var a=n(5836);Object.defineProperty(t,"parse",{enumerable:!0,get:function(){return a.parse}});var c=n(1692);Object.defineProperty(t,"nextTick",{enumerable:!0,get:function(){return c.nextTick}})},8160:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Socket=void 0;const s=n(7316),o=n(9889),i=n(7032),a=n(5836),c=r(n(3502)),u=n(4770),d=n(7721),l=(0,c.default)("engine.io-client:socket");class p extends u.Emitter{constructor(e,t={}){super(),this.writeBuffer=[],e&&"object"==typeof e&&(t=e,e=null),e?(e=(0,a.parse)(e),t.hostname=e.host,t.secure="https"===e.protocol||"wss"===e.protocol,t.port=e.port,e.query&&(t.query=e.query)):t.host&&(t.hostname=(0,a.parse)(t.host).host),(0,o.installTimerFunctions)(this,t),this.secure=null!=t.secure?t.secure:"undefined"!=typeof location&&"https:"===location.protocol,t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.hostname=t.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=t.port||("undefined"!=typeof location&&location.port?location.port:this.secure?"443":"80"),this.transports=t.transports||["polling","websocket"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},t),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),"string"==typeof this.opts.query&&(this.opts.query=(0,i.decode)(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,"function"==typeof addEventListener&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),"localhost"!==this.hostname&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(e){l('creating transport "%s"',e);const t=Object.assign({},this.opts.query);t.EIO=d.protocol,t.transport=e,this.id&&(t.sid=this.id);const n=Object.assign({},this.opts.transportOptions[e],this.opts,{query:t,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return l("options: %j",n),new s.transports[e](n)}open(){let e;if(this.opts.rememberUpgrade&&p.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))e="websocket";else{if(0===this.transports.length)return void this.setTimeoutFn((()=>{this.emitReserved("error","No transports available")}),0);e=this.transports[0]}this.readyState="opening";try{e=this.createTransport(e)}catch(e){return l("error while creating transport: %s",e),this.transports.shift(),void this.open()}e.open(),this.setTransport(e)}setTransport(e){l("setting transport %s",e.name),this.transport&&(l("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=e,e.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",(e=>this.onClose("transport close",e)))}probe(e){l('probing transport "%s"',e);let t=this.createTransport(e),n=!1;p.priorWebsocketSuccess=!1;const r=()=>{n||(l('probe transport "%s" opened',e),t.send([{type:"ping",data:"probe"}]),t.once("packet",(r=>{if(!n)if("pong"===r.type&&"probe"===r.data){if(l('probe transport "%s" pong',e),this.upgrading=!0,this.emitReserved("upgrading",t),!t)return;p.priorWebsocketSuccess="websocket"===t.name,l('pausing current transport "%s"',this.transport.name),this.transport.pause((()=>{n||"closed"!==this.readyState&&(l("changing transport and sending upgrade packet"),u(),this.setTransport(t),t.send([{type:"upgrade"}]),this.emitReserved("upgrade",t),t=null,this.upgrading=!1,this.flush())}))}else{l('probe transport "%s" failed',e);const n=new Error("probe error");n.transport=t.name,this.emitReserved("upgradeError",n)}})))};function s(){n||(n=!0,u(),t.close(),t=null)}const o=n=>{const r=new Error("probe error: "+n);r.transport=t.name,s(),l('probe transport "%s" failed because of error: %s',e,n),this.emitReserved("upgradeError",r)};function i(){o("transport closed")}function a(){o("socket closed")}function c(e){t&&e.name!==t.name&&(l('"%s" works - aborting "%s"',e.name,t.name),s())}const u=()=>{t.removeListener("open",r),t.removeListener("error",o),t.removeListener("close",i),this.off("close",a),this.off("upgrading",c)};t.once("open",r),t.once("error",o),t.once("close",i),this.once("close",a),this.once("upgrading",c),t.open()}onOpen(){if(l("socket open"),this.readyState="open",p.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush(),"open"===this.readyState&&this.opts.upgrade){l("starting upgrade probes");let e=0;const t=this.upgrades.length;for(;e<t;e++)this.probe(this.upgrades[e])}}onPacket(e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(l('socket receive: type "%s", data "%s"',e.type,e.data),this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this.resetPingTimeout(),this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const t=new Error("server error");t.code=e.data,this.onError(t);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data)}else l('packet received with socket readyState "%s"',this.readyState)}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this.upgrades=this.filterUpgrades(e.upgrades),this.pingInterval=e.pingInterval,this.pingTimeout=e.pingTimeout,this.maxPayload=e.maxPayload,this.onOpen(),"closed"!==this.readyState&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn((()=>{this.onClose("ping timeout")}),this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}flush(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this.getWritablePackets();l("flushing %d packets in socket",e.length),this.transport.send(e),this.prevBufferLen=e.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;let e=1;for(let t=0;t<this.writeBuffer.length;t++){const n=this.writeBuffer[t].data;if(n&&(e+=(0,o.byteLength)(n)),t>0&&e>this.maxPayload)return l("only send %d out of %d packets",t,this.writeBuffer.length),this.writeBuffer.slice(0,t);e+=2}return l("payload size is %d (max: %d)",e,this.maxPayload),this.writeBuffer}write(e,t,n){return this.sendPacket("message",e,t,n),this}send(e,t,n){return this.sendPacket("message",e,t,n),this}sendPacket(e,t,n,r){if("function"==typeof t&&(r=t,t=void 0),"function"==typeof n&&(r=n,n=null),"closing"===this.readyState||"closed"===this.readyState)return;(n=n||{}).compress=!1!==n.compress;const s={type:e,data:t,options:n};this.emitReserved("packetCreate",s),this.writeBuffer.push(s),r&&this.once("flush",r),this.flush()}close(){const e=()=>{this.onClose("forced close"),l("socket closing - telling transport to close"),this.transport.close()},t=()=>{this.off("upgrade",t),this.off("upgradeError",t),e()},n=()=>{this.once("upgrade",t),this.once("upgradeError",t)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",(()=>{this.upgrading?n():e()})):this.upgrading?n():e()),this}onError(e){l("socket error %j",e),p.priorWebsocketSuccess=!1,this.emitReserved("error",e),this.onClose("transport error",e)}onClose(e,t){"opening"!==this.readyState&&"open"!==this.readyState&&"closing"!==this.readyState||(l('socket close with reason: "%s"',e),this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),"function"==typeof removeEventListener&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",e,t),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(e){const t=[];let n=0;const r=e.length;for(;n<r;n++)~this.transports.indexOf(e[n])&&t.push(e[n]);return t}}t.Socket=p,p.protocol=d.protocol},7620:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Transport=void 0;const s=n(7721),o=n(4770),i=n(9889),a=(0,r(n(3502)).default)("engine.io-client:transport");class c extends Error{constructor(e,t,n){super(e),this.description=t,this.context=n,this.type="TransportError"}}class u extends o.Emitter{constructor(e){super(),this.writable=!1,(0,i.installTimerFunctions)(this,e),this.opts=e,this.query=e.query,this.socket=e.socket}onError(e,t,n){return super.emitReserved("error",new c(e,t,n)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this}send(e){"open"===this.readyState?this.write(e):a("transport is not open, discarding packets")}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const t=(0,s.decodePacket)(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}}t.Transport=u},7316:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.transports=void 0;const r=n(179),s=n(355);t.transports={websocket:s.WS,polling:r.Polling}},179:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Request=t.Polling=void 0;const s=n(7620),o=r(n(3502)),i=n(2785),a=n(7032),c=n(7721),u=n(6898),d=n(4770),l=n(9889),p=n(6988),h=(0,o.default)("engine.io-client:polling");function f(){}const m=null!=new u.XHR({xdomain:!1}).responseType;class y extends s.Transport{constructor(e){if(super(e),this.polling=!1,"undefined"!=typeof location){const t="https:"===location.protocol;let n=location.port;n||(n=t?"443":"80"),this.xd="undefined"!=typeof location&&e.hostname!==location.hostname||n!==e.port,this.xs=e.secure!==t}const t=e&&e.forceBase64;this.supportsBinary=m&&!t}get name(){return"polling"}doOpen(){this.poll()}pause(e){this.readyState="pausing";const t=()=>{h("paused"),this.readyState="paused",e()};if(this.polling||!this.writable){let e=0;this.polling&&(h("we are currently polling - waiting to pause"),e++,this.once("pollComplete",(function(){h("pre-pause polling complete"),--e||t()}))),this.writable||(h("we are currently writing - waiting to pause"),e++,this.once("drain",(function(){h("pre-pause writing complete"),--e||t()})))}else t()}poll(){h("polling"),this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){h("polling got data %s",e);(0,c.decodePayload)(e,this.socket.binaryType).forEach((e=>{if("opening"===this.readyState&&"open"===e.type&&this.onOpen(),"close"===e.type)return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(e)})),"closed"!==this.readyState&&(this.polling=!1,this.emitReserved("pollComplete"),"open"===this.readyState?this.poll():h('ignoring poll - transport state "%s"',this.readyState))}doClose(){const e=()=>{h("writing close packet"),this.write([{type:"close"}])};"open"===this.readyState?(h("transport open - closing"),e()):(h("transport not open - deferring close"),this.once("open",e))}write(e){this.writable=!1,(0,c.encodePayload)(e,(e=>{this.doWrite(e,(()=>{this.writable=!0,this.emitReserved("drain")}))}))}uri(){let e=this.query||{};const t=this.opts.secure?"https":"http";let n="";!1!==this.opts.timestampRequests&&(e[this.opts.timestampParam]=(0,i.yeast)()),this.supportsBinary||e.sid||(e.b64=1),this.opts.port&&("https"===t&&443!==Number(this.opts.port)||"http"===t&&80!==Number(this.opts.port))&&(n=":"+this.opts.port);const r=(0,a.encode)(e);return t+"://"+(-1!==this.opts.hostname.indexOf(":")?"["+this.opts.hostname+"]":this.opts.hostname)+n+this.opts.path+(r.length?"?"+r:"")}request(e={}){return Object.assign(e,{xd:this.xd,xs:this.xs},this.opts),new g(this.uri(),e)}doWrite(e,t){const n=this.request({method:"POST",data:e});n.on("success",t),n.on("error",((e,t)=>{this.onError("xhr post error",e,t)}))}doPoll(){h("xhr poll");const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",((e,t)=>{this.onError("xhr poll error",e,t)})),this.pollXhr=e}}t.Polling=y;class g extends d.Emitter{constructor(e,t){super(),(0,l.installTimerFunctions)(this,t),this.opts=t,this.method=t.method||"GET",this.uri=e,this.async=!1!==t.async,this.data=void 0!==t.data?t.data:null,this.create()}create(){const e=(0,l.pick)(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");e.xdomain=!!this.opts.xd,e.xscheme=!!this.opts.xs;const t=this.xhr=new u.XHR(e);try{h("xhr open %s: %s",this.method,this.uri),t.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){t.setDisableHeaderCheck&&t.setDisableHeaderCheck(!0);for(let e in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(e)&&t.setRequestHeader(e,this.opts.extraHeaders[e])}}catch(e){}if("POST"===this.method)try{t.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(e){}try{t.setRequestHeader("Accept","*/*")}catch(e){}"withCredentials"in t&&(t.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(t.timeout=this.opts.requestTimeout),t.onreadystatechange=()=>{4===t.readyState&&(200===t.status||1223===t.status?this.onLoad():this.setTimeoutFn((()=>{this.onError("number"==typeof t.status?t.status:0)}),0))},h("xhr data %s",this.data),t.send(this.data)}catch(e){return void this.setTimeoutFn((()=>{this.onError(e)}),0)}"undefined"!=typeof document&&(this.index=g.requestsCount++,g.requests[this.index]=this)}onError(e){this.emitReserved("error",e,this.xhr),this.cleanup(!0)}cleanup(e){if(void 0!==this.xhr&&null!==this.xhr){if(this.xhr.onreadystatechange=f,e)try{this.xhr.abort()}catch(e){}"undefined"!=typeof document&&delete g.requests[this.index],this.xhr=null}}onLoad(){const e=this.xhr.responseText;null!==e&&(this.emitReserved("data",e),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}if(t.Request=g,g.requestsCount=0,g.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",b);else if("function"==typeof addEventListener){const e="onpagehide"in p.globalThisShim?"pagehide":"unload";addEventListener(e,b,!1)}function b(){for(let e in g.requests)g.requests.hasOwnProperty(e)&&g.requests[e].abort()}},1692:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultBinaryType=t.usingBrowserWebSocket=t.WebSocket=t.nextTick=void 0;const r=n(6988);t.nextTick="function"==typeof Promise&&"function"==typeof Promise.resolve?e=>Promise.resolve().then(e):(e,t)=>t(e,0),t.WebSocket=r.globalThisShim.WebSocket||r.globalThisShim.MozWebSocket,t.usingBrowserWebSocket=!0,t.defaultBinaryType="arraybuffer"},355:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.WS=void 0;const s=n(7620),o=n(7032),i=n(2785),a=n(9889),c=n(1692),u=r(n(3502)),d=n(7721),l=(0,u.default)("engine.io-client:websocket"),p="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase();class h extends s.Transport{constructor(e){super(e),this.supportsBinary=!e.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const e=this.uri(),t=this.opts.protocols,n=p?{}:(0,a.pick)(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=c.usingBrowserWebSocket&&!p?t?new c.WebSocket(e,t):new c.WebSocket(e):new c.WebSocket(e,t,n)}catch(e){return this.emitReserved("error",e)}this.ws.binaryType=this.socket.binaryType||c.defaultBinaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const n=e[t],r=t===e.length-1;(0,d.encodePacket)(n,this.supportsBinary,(e=>{const t={};if(!c.usingBrowserWebSocket&&(n.options&&(t.compress=n.options.compress),this.opts.perMessageDeflate)){("string"==typeof e?Buffer.byteLength(e):e.length)<this.opts.perMessageDeflate.threshold&&(t.compress=!1)}try{c.usingBrowserWebSocket?this.ws.send(e):this.ws.send(e,t)}catch(e){l("websocket closed before onclose event")}r&&(0,c.nextTick)((()=>{this.writable=!0,this.emitReserved("drain")}),this.setTimeoutFn)}))}}doClose(){void 0!==this.ws&&(this.ws.close(),this.ws=null)}uri(){let e=this.query||{};const t=this.opts.secure?"wss":"ws";let n="";this.opts.port&&("wss"===t&&443!==Number(this.opts.port)||"ws"===t&&80!==Number(this.opts.port))&&(n=":"+this.opts.port),this.opts.timestampRequests&&(e[this.opts.timestampParam]=(0,i.yeast)()),this.supportsBinary||(e.b64=1);const r=(0,o.encode)(e);return t+"://"+(-1!==this.opts.hostname.indexOf(":")?"["+this.opts.hostname+"]":this.opts.hostname)+n+this.opts.path+(r.length?"?"+r:"")}check(){return!!c.WebSocket}}t.WS=h},6898:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.XHR=void 0;const r=n(6097),s=n(6988);t.XHR=function(e){const t=e.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!t||r.hasCORS))return new XMLHttpRequest}catch(e){}if(!t)try{return new(s.globalThisShim[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(e){}}},9889:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.byteLength=t.installTimerFunctions=t.pick=void 0;const r=n(6988);t.pick=function(e,...t){return t.reduce(((t,n)=>(e.hasOwnProperty(n)&&(t[n]=e[n]),t)),{})};const s=r.globalThisShim.setTimeout,o=r.globalThisShim.clearTimeout;t.installTimerFunctions=function(e,t){t.useNativeTimers?(e.setTimeoutFn=s.bind(r.globalThisShim),e.clearTimeoutFn=o.bind(r.globalThisShim)):(e.setTimeoutFn=r.globalThisShim.setTimeout.bind(r.globalThisShim),e.clearTimeoutFn=r.globalThisShim.clearTimeout.bind(r.globalThisShim))};t.byteLength=function(e){return"string"==typeof e?function(e){let t=0,n=0;for(let r=0,s=e.length;r<s;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}(e):Math.ceil(1.33*(e.byteLength||e.size))}},8479:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ERROR_PACKET=t.PACKET_TYPES_REVERSE=t.PACKET_TYPES=void 0;const n=Object.create(null);t.PACKET_TYPES=n,n.open="0",n.close="1",n.ping="2",n.pong="3",n.message="4",n.upgrade="5",n.noop="6";const r=Object.create(null);t.PACKET_TYPES_REVERSE=r,Object.keys(n).forEach((e=>{r[n[e]]=e}));t.ERROR_PACKET={type:"error",data:"parser error"}},7030:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decode=t.encode=void 0;const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r="undefined"==typeof Uint8Array?[]:new Uint8Array(256);for(let e=0;e<64;e++)r[n.charCodeAt(e)]=e;t.encode=e=>{let t,r=new Uint8Array(e),s=r.length,o="";for(t=0;t<s;t+=3)o+=n[r[t]>>2],o+=n[(3&r[t])<<4|r[t+1]>>4],o+=n[(15&r[t+1])<<2|r[t+2]>>6],o+=n[63&r[t+2]];return s%3==2?o=o.substring(0,o.length-1)+"=":s%3==1&&(o=o.substring(0,o.length-2)+"=="),o};t.decode=e=>{let t,n,s,o,i,a=.75*e.length,c=e.length,u=0;"="===e[e.length-1]&&(a--,"="===e[e.length-2]&&a--);const d=new ArrayBuffer(a),l=new Uint8Array(d);for(t=0;t<c;t+=4)n=r[e.charCodeAt(t)],s=r[e.charCodeAt(t+1)],o=r[e.charCodeAt(t+2)],i=r[e.charCodeAt(t+3)],l[u++]=n<<2|s>>4,l[u++]=(15&s)<<4|o>>2,l[u++]=(3&o)<<6|63&i;return d}},4013:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(8479),s=n(7030),o="function"==typeof ArrayBuffer,i=(e,t)=>{if(o){const n=(0,s.decode)(e);return a(n,t)}return{base64:!0,data:e}},a=(e,t)=>"blob"===t&&e instanceof ArrayBuffer?new Blob([e]):e;t.default=(e,t)=>{if("string"!=typeof e)return{type:"message",data:a(e,t)};const n=e.charAt(0);if("b"===n)return{type:"message",data:i(e.substring(1),t)};return r.PACKET_TYPES_REVERSE[n]?e.length>1?{type:r.PACKET_TYPES_REVERSE[n],data:e.substring(1)}:{type:r.PACKET_TYPES_REVERSE[n]}:r.ERROR_PACKET}},9305:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(8479),s="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),o="function"==typeof ArrayBuffer,i=(e,t)=>{const n=new FileReader;return n.onload=function(){const e=n.result.split(",")[1];t("b"+(e||""))},n.readAsDataURL(e)};t.default=({type:e,data:t},n,a)=>{return s&&t instanceof Blob?n?a(t):i(t,a):o&&(t instanceof ArrayBuffer||(c=t,"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(c):c&&c.buffer instanceof ArrayBuffer))?n?a(t):i(new Blob([t]),a):a(r.PACKET_TYPES[e]+(t||""));var c}},7721:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodePayload=t.decodePacket=t.encodePayload=t.encodePacket=t.protocol=void 0;const r=n(9305);t.encodePacket=r.default;const s=n(4013);t.decodePacket=s.default;const o=String.fromCharCode(30);t.encodePayload=(e,t)=>{const n=e.length,s=new Array(n);let i=0;e.forEach(((e,a)=>{(0,r.default)(e,!1,(e=>{s[a]=e,++i===n&&t(s.join(o))}))}))};t.decodePayload=(e,t)=>{const n=e.split(o),r=[];for(let e=0;e<n.length;e++){const o=(0,s.default)(n[e],t);if(r.push(o),"error"===o.type)break}return r},t.protocol=4},2408:(e,t)=>{"use strict";function n(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Object.defineProperty(t,"__esModule",{value:!0}),t.Backoff=void 0,t.Backoff=n,n.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=1&Math.floor(10*t)?e+n:e-n}return 0|Math.min(e,this.max)},n.prototype.reset=function(){this.attempts=0},n.prototype.setMin=function(e){this.ms=e},n.prototype.setMax=function(e){this.max=e},n.prototype.setJitter=function(e){this.jitter=e}},2790:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.connect=t.io=t.Socket=t.Manager=t.protocol=void 0;const s=n(9023),o=n(3145);Object.defineProperty(t,"Manager",{enumerable:!0,get:function(){return o.Manager}});const i=n(9945);Object.defineProperty(t,"Socket",{enumerable:!0,get:function(){return i.Socket}});const a=r(n(3502)).default("socket.io-client"),c={};function u(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};const n=s.url(e,t.path||"/socket.io"),r=n.source,i=n.id,u=n.path,d=c[i]&&u in c[i].nsps;let l;return t.forceNew||t["force new connection"]||!1===t.multiplex||d?(a("ignoring socket cache for %s",r),l=new o.Manager(r,t)):(c[i]||(a("new io instance for %s",r),c[i]=new o.Manager(r,t)),l=c[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}t.io=u,t.connect=u,t.default=u,Object.assign(u,{Manager:o.Manager,Socket:i.Socket,io:u,connect:u});var d=n(4078);Object.defineProperty(t,"protocol",{enumerable:!0,get:function(){return d.protocol}}),e.exports=u},3145:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return s(t,e),t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Manager=void 0;const a=n(6105),c=n(9945),u=o(n(4078)),d=n(2461),l=n(2408),p=n(4770),h=i(n(3502)).default("socket.io-client:manager");class f extends p.Emitter{constructor(e,t){var n;super(),this.nsps={},this.subs=[],e&&"object"==typeof e&&(t=e,e=void 0),(t=t||{}).path=t.path||"/socket.io",this.opts=t,a.installTimerFunctions(this,t),this.reconnection(!1!==t.reconnection),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor(null!==(n=t.randomizationFactor)&&void 0!==n?n:.5),this.backoff=new l.Backoff({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==t.timeout?2e4:t.timeout),this._readyState="closed",this.uri=e;const r=t.parser||u;this.encoder=new r.Encoder,this.decoder=new r.Decoder,this._autoConnect=!1!==t.autoConnect,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection}reconnectionAttempts(e){return void 0===e?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return void 0===e?this._reconnectionDelay:(this._reconnectionDelay=e,null===(t=this.backoff)||void 0===t||t.setMin(e),this)}randomizationFactor(e){var t;return void 0===e?this._randomizationFactor:(this._randomizationFactor=e,null===(t=this.backoff)||void 0===t||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return void 0===e?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,null===(t=this.backoff)||void 0===t||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}open(e){if(h("readyState %s",this._readyState),~this._readyState.indexOf("open"))return this;h("opening %s",this.uri),this.engine=new a.Socket(this.uri,this.opts);const t=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const r=d.on(t,"open",(function(){n.onopen(),e&&e()})),s=d.on(t,"error",(t=>{h("error"),n.cleanup(),n._readyState="closed",this.emitReserved("error",t),e?e(t):n.maybeReconnectOnOpen()}));if(!1!==this._timeout){const e=this._timeout;h("connect attempt will timeout after %d",e),0===e&&r();const n=this.setTimeoutFn((()=>{h("connect attempt timed out after %d",e),r(),t.close(),t.emit("error",new Error("timeout"))}),e);this.opts.autoUnref&&n.unref(),this.subs.push((function(){clearTimeout(n)}))}return this.subs.push(r),this.subs.push(s),this}connect(e){return this.open(e)}onopen(){h("open"),this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(d.on(e,"ping",this.onping.bind(this)),d.on(e,"data",this.ondata.bind(this)),d.on(e,"error",this.onerror.bind(this)),d.on(e,"close",this.onclose.bind(this)),d.on(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(e){this.onclose("parse error",e)}}ondecoded(e){a.nextTick((()=>{this.emitReserved("packet",e)}),this.setTimeoutFn)}onerror(e){h("error",e),this.emitReserved("error",e)}socket(e,t){let n=this.nsps[e];return n?this._autoConnect&&!n.active&&n.connect():(n=new c.Socket(this,e,t),this.nsps[e]=n),n}_destroy(e){const t=Object.keys(this.nsps);for(const e of t){if(this.nsps[e].active)return void h("socket %s is still active, skipping close",e)}this._close()}_packet(e){h("writing packet %j",e);const t=this.encoder.encode(e);for(let n=0;n<t.length;n++)this.engine.write(t[n],e.options)}cleanup(){h("cleanup"),this.subs.forEach((e=>e())),this.subs.length=0,this.decoder.destroy()}_close(){h("disconnect"),this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(e,t){h("closed due to %s",e),this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)h("reconnect failed"),this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const t=this.backoff.duration();h("will wait %dms before reconnect attempt",t),this._reconnecting=!0;const n=this.setTimeoutFn((()=>{e.skipReconnect||(h("attempting reconnect"),this.emitReserved("reconnect_attempt",e.backoff.attempts),e.skipReconnect||e.open((t=>{t?(h("reconnect attempt error"),e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",t)):(h("reconnect success"),e.onreconnect())})))}),t);this.opts.autoUnref&&n.unref(),this.subs.push((function(){clearTimeout(n)}))}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}t.Manager=f},2461:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.on=void 0,t.on=function(e,t,n){return e.on(t,n),function(){e.off(t,n)}}},9945:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Socket=void 0;const s=n(4078),o=n(2461),i=n(4770),a=r(n(3502)).default("socket.io-client:socket"),c=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class u extends i.Emitter{constructor(e,t,n){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=t,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[o.on(e,"open",this.onopen.bind(this)),o.on(e,"packet",this.onpacket.bind(this)),o.on(e,"error",this.onerror.bind(this)),o.on(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected||(this.subEvents(),this.io._reconnecting||this.io.open(),"open"===this.io._readyState&&this.onopen()),this}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...t){if(c.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(t.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(t),this;const n={type:s.PacketType.EVENT,data:t,options:{}};if(n.options.compress=!1!==this.flags.compress,"function"==typeof t[t.length-1]){const e=this.ids++;a("emitting packet with ack id %d",e);const r=t.pop();this._registerAckCallback(e,r),n.id=e}const r=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!r||!this.connected)?a("discard packet as the transport is not currently writable"):this.connected?(this.notifyOutgoingListeners(n),this.packet(n)):this.sendBuffer.push(n),this.flags={},this}_registerAckCallback(e,t){var n;const r=null!==(n=this.flags.timeout)&&void 0!==n?n:this._opts.ackTimeout;if(void 0===r)return void(this.acks[e]=t);const s=this.io.setTimeoutFn((()=>{delete this.acks[e];for(let t=0;t<this.sendBuffer.length;t++)this.sendBuffer[t].id===e&&(a("removing packet with ack id %d from the buffer",e),this.sendBuffer.splice(t,1));a("event with ack id %d has timed out after %d ms",e,r),t.call(this,new Error("operation has timed out"))}),r);this.acks[e]=(...e)=>{this.io.clearTimeoutFn(s),t.apply(this,[null,...e])}}emitWithAck(e,...t){const n=void 0!==this.flags.timeout||void 0!==this._opts.ackTimeout;return new Promise(((r,s)=>{t.push(((e,t)=>n?e?s(e):r(t):r(e))),this.emit(e,...t)}))}_addToQueue(e){let t;"function"==typeof e[e.length-1]&&(t=e.pop());const n={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push(((e,...r)=>{if(n!==this._queue[0])return;return null!==e?n.tryCount>this._opts.retries&&(a("packet [%d] is discarded after %d tries",n.id,n.tryCount),this._queue.shift(),t&&t(e)):(a("packet [%d] was successfully sent",n.id),this._queue.shift(),t&&t(null,...r)),n.pending=!1,this._drainQueue()})),this._queue.push(n),this._drainQueue()}_drainQueue(e=!1){if(a("draining queue"),!this.connected||0===this._queue.length)return;const t=this._queue[0];!t.pending||e?(t.pending=!0,t.tryCount++,a("sending packet [%d] (try n°%d)",t.id,t.tryCount),this.flags=t.flags,this.emit.apply(this,t.args)):a("packet [%d] has already been sent and is waiting for an ack",t.id)}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){a("transport is open - connecting"),"function"==typeof this.auth?this.auth((e=>{this._sendConnectPacket(e)})):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:s.PacketType.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,t){a("close (%s)",e),this.connected=!1,delete this.id,this.emitReserved("disconnect",e,t)}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case s.PacketType.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case s.PacketType.EVENT:case s.PacketType.BINARY_EVENT:this.onevent(e);break;case s.PacketType.ACK:case s.PacketType.BINARY_ACK:this.onack(e);break;case s.PacketType.DISCONNECT:this.ondisconnect();break;case s.PacketType.CONNECT_ERROR:this.destroy();const t=new Error(e.data.message);t.data=e.data.data,this.emitReserved("connect_error",t)}}onevent(e){const t=e.data||[];a("emitting event %j",t),null!=e.id&&(a("attaching ack callback to event"),t.push(this.ack(e.id))),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const t=this._anyListeners.slice();for(const n of t)n.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&"string"==typeof e[e.length-1]&&(this._lastOffset=e[e.length-1])}ack(e){const t=this;let n=!1;return function(...r){n||(n=!0,a("sending ack %j",r),t.packet({type:s.PacketType.ACK,id:e,data:r}))}}onack(e){const t=this.acks[e.id];"function"==typeof t?(a("calling ack %s with %j",e.id,e.data),t.apply(this,e.data),delete this.acks[e.id]):a("bad ack %s",e.id)}onconnect(e,t){a("socket connected with id %s",e),this.id=e,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach((e=>this.emitEvent(e))),this.receiveBuffer=[],this.sendBuffer.forEach((e=>{this.notifyOutgoingListeners(e),this.packet(e)})),this.sendBuffer=[]}ondisconnect(){a("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach((e=>e())),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&(a("performing disconnect (%s)",this.nsp),this.packet({type:s.PacketType.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const t=this._anyListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){const t=this._anyOutgoingListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const t=this._anyOutgoingListeners.slice();for(const n of t)n.apply(this,e.data)}}}t.Socket=u},9023:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.url=void 0;const s=n(6105),o=r(n(3502)).default("socket.io-client:url");t.url=function(e,t="",n){let r=e;n=n||"undefined"!=typeof location&&location,null==e&&(e=n.protocol+"//"+n.host),"string"==typeof e&&("/"===e.charAt(0)&&(e="/"===e.charAt(1)?n.protocol+e:n.host+e),/^(https?|wss?):\/\//.test(e)||(o("protocol-less url %s",e),e=void 0!==n?n.protocol+"//"+e:"https://"+e),o("parse %s",e),r=s.parse(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const i=-1!==r.host.indexOf(":")?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+i+":"+r.port+t,r.href=r.protocol+"://"+i+(n&&n.port===r.port?"":":"+r.port),r}},4581:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reconstructPacket=t.deconstructPacket=void 0;const r=n(7152);function s(e,t){if(!e)return e;if((0,r.isBinary)(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=s(e[r],t);return n}if("object"==typeof e&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=s(e[r],t));return n}return e}function o(e,t){if(!e)return e;if(e&&!0===e._placeholder){if("number"==typeof e.num&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=o(e[n],t);else if("object"==typeof e)for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=o(e[n],t));return e}t.deconstructPacket=function(e){const t=[],n=e.data,r=e;return r.data=s(n,t),r.attachments=t.length,{packet:r,buffers:t}},t.reconstructPacket=function(e,t){return e.data=o(e.data,t),delete e.attachments,e}},4078:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Decoder=t.Encoder=t.PacketType=t.protocol=void 0;const r=n(4770),s=n(4581),o=n(7152),i=(0,n(3502).default)("socket.io-parser"),a=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var c;t.protocol=5,function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"}(c=t.PacketType||(t.PacketType={}));function u(e){return"[object Object]"===Object.prototype.toString.call(e)}t.Encoder=class{constructor(e){this.replacer=e}encode(e){return i("encoding packet %j",e),e.type!==c.EVENT&&e.type!==c.ACK||!(0,o.hasBinary)(e)?[this.encodeAsString(e)]:this.encodeAsBinary({type:e.type===c.EVENT?c.BINARY_EVENT:c.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id})}encodeAsString(e){let t=""+e.type;return e.type!==c.BINARY_EVENT&&e.type!==c.BINARY_ACK||(t+=e.attachments+"-"),e.nsp&&"/"!==e.nsp&&(t+=e.nsp+","),null!=e.id&&(t+=e.id),null!=e.data&&(t+=JSON.stringify(e.data,this.replacer)),i("encoded %j as %s",e,t),t}encodeAsBinary(e){const t=(0,s.deconstructPacket)(e),n=this.encodeAsString(t.packet),r=t.buffers;return r.unshift(n),r}};class d extends r.Emitter{constructor(e){super(),this.reviver=e}add(e){let t;if("string"==typeof e){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");t=this.decodeString(e);const n=t.type===c.BINARY_EVENT;n||t.type===c.BINARY_ACK?(t.type=n?c.EVENT:c.ACK,this.reconstructor=new l(t),0===t.attachments&&super.emitReserved("decoded",t)):super.emitReserved("decoded",t)}else{if(!(0,o.isBinary)(e)&&!e.base64)throw new Error("Unknown type: "+e);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");t=this.reconstructor.takeBinaryData(e),t&&(this.reconstructor=null,super.emitReserved("decoded",t))}}decodeString(e){let t=0;const n={type:Number(e.charAt(0))};if(void 0===c[n.type])throw new Error("unknown packet type "+n.type);if(n.type===c.BINARY_EVENT||n.type===c.BINARY_ACK){const r=t+1;for(;"-"!==e.charAt(++t)&&t!=e.length;);const s=e.substring(r,t);if(s!=Number(s)||"-"!==e.charAt(t))throw new Error("Illegal attachments");n.attachments=Number(s)}if("/"===e.charAt(t+1)){const r=t+1;for(;++t;){if(","===e.charAt(t))break;if(t===e.length)break}n.nsp=e.substring(r,t)}else n.nsp="/";const r=e.charAt(t+1);if(""!==r&&Number(r)==r){const r=t+1;for(;++t;){const n=e.charAt(t);if(null==n||Number(n)!=n){--t;break}if(t===e.length)break}n.id=Number(e.substring(r,t+1))}if(e.charAt(++t)){const r=this.tryParse(e.substr(t));if(!d.isPayloadValid(n.type,r))throw new Error("invalid payload");n.data=r}return i("decoded %s as %j",e,n),n}tryParse(e){try{return JSON.parse(e,this.reviver)}catch(e){return!1}}static isPayloadValid(e,t){switch(e){case c.CONNECT:return u(t);case c.DISCONNECT:return void 0===t;case c.CONNECT_ERROR:return"string"==typeof t||u(t);case c.EVENT:case c.BINARY_EVENT:return Array.isArray(t)&&("number"==typeof t[0]||"string"==typeof t[0]&&-1===a.indexOf(t[0]));case c.ACK:case c.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}t.Decoder=d;class l{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const e=(0,s.reconstructPacket)(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}},7152:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hasBinary=t.isBinary=void 0;const n="function"==typeof ArrayBuffer,r=e=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,s=Object.prototype.toString,o="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===s.call(Blob),i="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===s.call(File);function a(e){return n&&(e instanceof ArrayBuffer||r(e))||o&&e instanceof Blob||i&&e instanceof File}t.isBinary=a,t.hasBinary=function e(t,n){if(!t||"object"!=typeof t)return!1;if(Array.isArray(t)){for(let n=0,r=t.length;n<r;n++)if(e(t[n]))return!0;return!1}if(a(t))return!0;if(t.toJSON&&"function"==typeof t.toJSON&&1===arguments.length)return e(t.toJSON(),!0);for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return!0;return!1}},4770:(e,t,n)=>{"use strict";function r(e){if(e)return function(e){for(var t in r.prototype)e[t]=r.prototype[t];return e}(e)}n.r(t),n.d(t,{Emitter:()=>r}),r.prototype.on=r.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},r.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var s=0;s<r.length;s++)if((n=r[s])===t||n.fn===t){r.splice(s,1);break}return 0===r.length&&delete this._callbacks["$"+e],this},r.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){r=0;for(var s=(n=n.slice(0)).length;r<s;++r)n[r].apply(this,t)}return this},r.prototype.emitReserved=r.prototype.emit,r.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},r.prototype.hasListeners=function(e){return!!this.listeners(e).length}}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var n=__webpack_module_cache__[e]={id:e,exports:{}};return __webpack_modules__[e].call(n.exports,n,n.exports,__webpack_require__),n.exports}__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=(e,t)=>{for(var n in t)__webpack_require__.o(t,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.nc=void 0;var __webpack_exports__={};(()=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{CloudServicesCommentsAdapter:()=>as,CloudServicesRevisionHistoryAdapter:()=>Es,CloudServicesTrackChangesAdapter:()=>fs,PresenceList:()=>Oo,RealTimeCollaborationClient:()=>Wr,RealTimeCollaborativeComments:()=>ws,RealTimeCollaborativeEditing:()=>rs,RealTimeCollaborativeRevisionHistory:()=>Ns,RealTimeCollaborativeTrackChanges:()=>Ps});var e={};__webpack_require__.r(e),__webpack_require__.d(e,{AttributeOperation:()=>j,Element:()=>G,InsertOperation:()=>D,MarkerOperation:()=>R,MergeOperation:()=>M,MoveOperation:()=>N,Position:()=>J,Range:()=>q,RenameOperation:()=>x,RootAttributeOperation:()=>V,RootOperation:()=>B,SplitOperation:()=>U,default:()=>E});var t=__webpack_require__(1782),n=__webpack_require__(4584),r=__webpack_require__(8311),s=__webpack_require__(1783),o=__webpack_require__(5111);function i(e,t){const n=a();return(i=function(e,t){return n[e-=160]})(e,t)}function a(){const e=["create","websocketgateway-invalid-plugin-interface","webSocketUrl","_domEmitter","function","disconnect","then","initialReconnectionInterval","add","The limit of maximum concurrent connections that the collaboration server can handle has been reached. Try opening the document again in a few minutes. Please contact your system administrator if the problem persists.","cloudServices.requestTimeout","token","_shouldPluginsReconnect","delete","limitExceeded","1013952BvIgRt","listenTo","686224SzzGLv","pluginName","1433610RBHUBc","cloudServices.connectionTimeout","_reconnectionStack","define","7EdFZII","110aCVabM","stopListening","from","change:me","catch","72085EuLGWM","CloudServices","context","DISCONNECTED","_isBrowserOffline","state","config","bind","code","9wrmqKD","38692SMmAGg","reconnect","connection","online","all","connect","real-time-collaboration","init","connected","cloudservices-reconnection-error","plugins","websocketgateway-missing-token","Connected users limit exceeded","55yIQwga","constructor","has","510612AXptkO","destroy","websocketgateway-missing-websocket-url","websocketgateway-plugin-already-registered","_reconnect","9SbFPYG","requires","addToReconnectionStack","set","get","116120MXgFmL","CONNECTED","error","offline","cloudservices-init","WebSocketGateway","removeFromReconnectionStack","showWarning","CONNECTING","isInReconnectionStack"];return(a=function(){return e})()}const c=i;!function(e,t){const n=i,r=e();for(;;)try{if(105603===parseInt(n(171))/1+parseInt(n(207))/2*(-parseInt(n(180))/3)+parseInt(n(181))/4*(-parseInt(n(194))/5)+-parseInt(n(232))/6*(parseInt(n(165))/7)+-parseInt(n(234))/8+parseInt(n(202))/9*(parseInt(n(161))/10)+-parseInt(n(166))/11*(-parseInt(n(197))/12))break;r.push(r.shift())}catch(e){r.push(r.shift())}}(a);class u extends t.ContextPlugin{static get[c(203)](){return[c(172),r.Notification]}static get[c(160)](){return c(212)}constructor(e){const t=c;super(e),this[t(205)](t(176),o.WEB_SOCKET_GATEWAY_STATES[t(208)]),this[t(205)](t(175),!1),this[t(163)]=new Set,this[t(229)]=!1,this[t(220)]=Object[t(217)](n.DomEmitterMixin)}[c(188)](){const e=c,t=this[e(173)],s=t[e(191)][e(206)](e(172)),i=t[e(191)][e(206)](r.Notification);if(!s[e(228)])throw new n.CKEditorError(e(192),this);if(!s[e(219)])throw new n.CKEditorError(e(199),this);return this[e(220)][e(233)](window,e(210),(()=>this[e(175)]=!0)),this[e(220)][e(233)](window,e(184),(()=>this[e(175)]=!1)),this[e(173)][e(177)][e(164)](e(162),10),this[e(173)][e(177)][e(164)](e(227),20),u[e(212)][e(186)](s[e(228)],s[e(219)],{timeout:1e3*this[e(173)][e(177)][e(206)](e(162)),requestTimeout:1e3*this[e(173)][e(177)][e(206)](e(227))})[e(223)]((t=>{const r=e;if(this[r(183)]=t,this[r(178)](r(176)).to(t,r(176),this,r(175),((e,t)=>(r(189)!==e&&(this[r(229)]=!0),t||e!==o.WEB_SOCKET_GATEWAY_STATES[r(208)]?o.WEB_SOCKET_GATEWAY_STATES[r(174)]:this[r(176)]==o.WEB_SOCKET_GATEWAY_STATES[r(174)]&&this[r(229)]?(this[r(229)]=!1,this[r(201)](),o.WEB_SOCKET_GATEWAY_STATES[r(215)]):o.WEB_SOCKET_GATEWAY_STATES[r(208)]))),this[r(183)].on(r(209),((e,t)=>{const s=r;if(s(231)!==t[s(179)])throw console[s(209)](t),new n.CKEditorError(s(211),null,{originalError:t});i[s(214)](s(226),{title:s(193),namespace:s(187)})})),!t.me)return new Promise((e=>t.on(r(169),e)))}))[e(170)]((t=>{const r=e;throw console[r(209)](t),new n.CKEditorError(r(211),null,{originalError:t})}))}[c(204)](e){const t=c;if(t(221)!=typeof e[t(182)])throw new n.CKEditorError(t(218),this);if(this[t(216)](e))throw new n.CKEditorError(t(200),this,{name:e[t(195)][t(160)]});this[t(163)][t(225)](e)}[c(213)](e){const t=c;this[t(163)][t(230)](e)}[c(216)](e){const t=c;return this[t(163)][t(196)](e)}[c(201)](){const e=c;return this[e(183)][e(182)]()[e(223)]((()=>Promise[e(185)](Array[e(168)](this[e(163)],(t=>t[e(182)]())))))[e(223)]((()=>this[e(176)]=o.WEB_SOCKET_GATEWAY_STATES[e(208)]))[e(170)]((t=>{const r=e;throw console[r(209)](t),new n.CKEditorError(r(190),this[r(173)])}))}[c(198)](){const e=c;this[e(183)]&&this[e(183)][e(222)](),this[e(176)]=o.WEB_SOCKET_GATEWAY_STATES[e(174)],this[e(220)][e(167)](),super[e(198)]()}}u[c(212)]=o.WebSocketGateway,u[c(224)]=1e3;const d=u;var l=__webpack_require__(6211);const p=h;function h(e,t){const n=f();return(h=function(e,t){return n[e-=204]})(e,t)}function f(){const e=["addUser","pluginName","48keVnnH","orderNumber","1568bLyNbf","getUser","getUserRole","get","role","36iahEFZ","set","state","814OloXXj","channelConnectedUsers","sessionAdd:","_handleSessionAdd","sessions-register-already-registered","user","connection","isMe","channelSessions","fire","requires","context","clear","466016lNAfBB","_uniqueUsersCount","delete","362263mGOuNH","defineMe","getUserSessions","sessionId","_users","30006xVSejx","has","size","Sessions","mySessionId","unregister","connected","listenTo","_createUser","add","assign","allConnectedUsers","sessions-unregister-not-exist","stopListening","values","getUserBySessionId","6Deciqk","1549163pmnKTM","init","_registeredSessions","96ovDHbL","register","7955570otKulL","change:state","forEach","_handleSessionRemove","plugins","remove","1755080yMFBfM"];return(f=function(){return e})()}!function(e,t){const n=h,r=e();for(;;)try{if(425860===-parseInt(n(265))/1*(parseInt(n(211))/2)+-parseInt(n(232))/3*(-parseInt(n(252))/4)+parseInt(n(260))/5+parseInt(n(248))/6*(-parseInt(n(249))/7)+-parseInt(n(224))/8*(parseInt(n(208))/9)+parseInt(n(254))/10+parseInt(n(227))/11*(parseInt(n(263))/12))break;r.push(r.shift())}catch(e){r.push(r.shift())}}(f);class m extends t.ContextPlugin{static get[p(262)](){return p(235)}static get[p(221)](){return[d,l.Users]}constructor(e){const t=p;super(e),this[t(219)]=new Map,this[t(212)]=new Map,this[t(243)]=new n.Collection,this[t(251)]=new Map,this[t(225)]=0,this[t(231)]=this[t(222)][t(258)][t(206)](l.Users)}[p(250)](){const e=p,t=this[e(222)][e(258)][e(206)](d);this[e(239)](t,e(255),((t,n,r)=>{const s=e;if(s(238)!==r)this[s(219)][s(256)]((e=>e[s(223)]())),this[s(212)][s(256)]((e=>e[s(223)]())),this[s(243)][s(223)]();else for(const[e,t]of this[s(251)])for(const n of t)this[s(214)](e,n)})),this[e(240)](t[e(217)].me,!0)}[p(253)](e,t){const r=p;if(this[r(251)][r(233)](e))throw new n.CKEditorError(r(215),null,{channelId:e});this[r(251)][r(209)](e,t),this[r(219)][r(209)](e,new n.Collection),this[r(212)][r(209)](e,new n.Collection),this[r(239)](t,r(241),((t,n)=>this[r(214)](e,n))),this[r(239)](t,r(259),((t,n)=>this[r(257)](e,n)));for(const n of t)this[r(214)](e,n)}[p(237)](e){const t=p;if(!this[t(251)][t(233)](e))throw new n.CKEditorError(t(244),null,{channelId:e});const r=this[t(251)][t(206)](e);this[t(245)](r);for(const n of r)t(238)===this[t(222)][t(258)][t(206)](d)[t(210)]&&this[t(257)](e,n);this[t(251)][t(226)](e),this[t(219)][t(226)](e),this[t(212)][t(226)](e)}get[p(236)](){const e=p;return this[e(222)][e(258)][e(206)](d)[e(217)][e(230)]}[p(247)](e){const t=p;for(const n of this[t(219)][t(246)]())for(const r of n)if(r.id===e)return r[t(216)]}[p(229)](e,t){const n=p,r=t?[this[n(219)][n(206)](t)]:this[n(219)][n(246)](),s=new Set;for(const t of r)for(const r of t)r[n(216)].id===e.id&&s[n(241)](r.id);return s}[p(205)](e){const t=p;for(const n of this[t(219)][t(246)]())for(const r of n)if(r[t(216)]===e)return r[t(207)]}[p(214)](e,t){const n=p;if(n(238)!==this[n(222)][n(258)][n(206)](d)[n(210)])return;const r=t[n(216)],s=this[n(231)][n(204)](r.id)||this[n(240)](r),o=Object[n(242)]({},t,{user:s});this[n(219)][n(206)](e)[n(241)](o);const i=this[n(212)][n(206)](e);i[n(233)](s.id)||i[n(241)](s),this[n(243)][n(233)](s.id)||this[n(243)][n(241)](s,s[n(218)]?0:void 0),this[n(220)](n(213)+e,{channelId:e,session:o})}[p(257)](e,t){const n=p;if(n(238)!==this[n(222)][n(258)][n(206)](d)[n(210)])return;const r=this[n(212)][n(206)](e),s=t[n(216)];s.id&&(this[n(219)][n(206)](e)[n(259)](t.id),r[n(233)](s.id)&&!this[n(229)](s,e)[n(234)]&&r[n(259)](s.id),this[n(243)][n(206)](s.id)&&!this[n(229)](s)[n(234)]&&this[n(243)][n(259)](s.id))}[p(240)](e,t){const n=p,r=this[n(231)][n(261)](e);return t&&this[n(231)][n(228)](e.id),r[n(264)]=this[n(225)]++,r}}var y=__webpack_require__(4673),g=__webpack_require__.n(y),b=__webpack_require__(7535),O={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};g()(b.A,O);b.A.locals;const v=w;function w(e,t){const n=S();return(w=function(e,t){return n[e-=200]})(e,t)}!function(e,t){const n=w,r=e();for(;;)try{if(912078===-parseInt(n(227))/1*(parseInt(n(265))/2)+-parseInt(n(203))/3+parseInt(n(249))/4+-parseInt(n(260))/5+parseInt(n(280))/6*(parseInt(n(312))/7)+-parseInt(n(202))/8*(parseInt(n(263))/9)+parseInt(n(221))/10)break;r.push(r.shift())}catch(e){r.push(r.shift())}}(S);class I extends t.Plugin{static get[v(207)](){return[m]}static get[v(257)](){return v(310)}[v(275)](){const e=v,t=this[e(292)],n=t[e(289)][e(224)](m);t[e(215)][e(250)](e(311))[e(284)]({model:e(213),view:(r,{writer:s})=>function(t,n,r,s){const o=e,i=t[o(235)][o(288)](":")[2],a=r[o(231)](i);if(!a||i===r[o(259)])return;if(!s[o(267)][o(293)][o(245)](t[o(294)][o(258)],o(270)))return;const c={class:o(256)+a[o(212)][o(239)](),"data-name":a[o(282)],"data-session-id":i},u=s[o(267)][o(303)][o(224)](t[o(235)])[o(233)](),d=u[o(252)],l=s[o(267)][o(293)];if(d&&l[o(304)](d)&&l[o(286)](d)&&!s[o(267)][o(303)][o(224)](o(218)+i)[o(291)]()[o(234)])return;const p=u[o(306)];return s[o(267)][o(293)][o(283)](p)&&!s[o(267)][o(237)](p)&&(c[o(201)]=!1),function(e,t){const n=o,r=e[n(298)](n(309),t);return e[n(296)](n(253),!0,r),r[n(268)]=function(e){const t=n,r=this[t(271)](e);return r[t(297)]=t(278),r},r[n(225)]=function(e){const t=n;return!(!this[t(287)](t(253))||!e[t(287)](t(253))||this[t(277)](t(274))!=e[t(277)](t(274)))},r}(n,c)}(r,s,n,t)}),t[e(215)][e(250)](e(311))[e(254)]({model:e(264),view:t=>function(t,n){const r=e,s=t[r(235)][r(288)](":")[2];if(s===n[r(259)])return null;const o=n[r(231)](s);return o?{id:s,classes:[r(279),o[r(212)][r(219)]()],attributes:{"data-session-id":s},priority:2e3+o[r(230)]}:{id:s,classes:[]}}(t,n)}),function(t){const n=e,r=t[n(267)],o=new Map,i=t[n(289)][n(224)](m);r[n(303)].on(n(242),((e,a,c,u)=>{const d=n;if(!u&&o[d(224)](a[d(282)]))return o[d(224)](a[d(282)])[d(243)](),void o[d(255)](a[d(282)]);const l=a[d(282)][d(288)](":")[2];if(l===i[d(259)])return;const p=d(214)+l;r[d(303)][d(300)](p)&&t[d(273)][d(302)](p),a.on(d(220),((e,t,n)=>{const i=d;if(i(209)!=t[i(308)][i(217)]&&i(209)==a[i(291)]()[i(308)][i(217)]&&!o[i(300)](a[i(282)])){const e=r[i(293)][i(247)](n[i(241)]);if(e){const t=s.LiveRange[i(204)](e);o[i(208)](a[i(282)],t),t.on(i(220),((e,n,s)=>{const c=i;if(c(209)==t[c(308)][c(217)]){const e=r[c(293)][c(247)](s[c(241)]);e?(t[c(258)]=e[c(258)],t[c(211)]=e[c(211)]):(o[c(255)](a[c(282)]),t[c(243)]())}}))}}}))})),r[n(246)].on(n(205),(()=>{const e=n;o[e(301)]>0&&r[e(232)]({isUndoable:!1},(t=>{const n=e;for(const[e,s]of o)n(209)==r[n(303)][n(224)](e)[n(291)]()[n(308)][n(217)]&&(_(e[n(288)](":")[2],s[n(272)](),r,t),s[n(243)]());o[n(226)]()}))}))}(t)}[v(290)](){const e=v,t=this[e(292)],n=t[e(248)][e(224)](e(251));n&&t[e(267)].on(e(266),((r,s)=>{const o=e,i=s[0];if(o(236)!=i[o(238)]||!i[o(282)][o(223)](o(305)))return;const a=i[o(261)];n[o(222)][o(300)](a)&&(i[o(299)]=i[o(276)]?t[o(267)][o(295)](i[o(276)][o(258)],i[o(276)][o(211)]):null)}),{priority:e(269)})}[v(229)](){const e=v,t=this[e(292)],n=t[e(267)][e(246)],r=t[e(289)][e(224)](m);t[e(267)][e(232)]({isUndoable:!1},(s=>{const o=e,i=o(218)+r[o(259)],a=o(214)+r[o(259)],c=t[o(267)][o(303)][o(300)](i);t[o(273)][o(244)][o(228)]?_(r[o(259)],n[o(200)][o(210)](),t[o(267)],s):c&&(s[o(281)](i),s[o(281)](a))}))}}function _(e,t,n,r){const s=v,o=s(218)+e,i=s(214)+e,a=t[s(307)]();let c=t[s(258)];a&&a.is(s(285),s(216))&&(c=function(e,t){const n=s;for(const r of e[n(206)]())if(t[n(293)][n(245)](r,n(270)))return r}(t,n),t=r[s(295)](c));const u=r[s(295)](c);n[s(303)][s(300)](o)?(r[s(240)](o,{range:t}),r[s(240)](i,{range:u})):(r[s(262)](o,{range:t,usingOperation:!0}),r[s(262)](i,{range:u,usingOperation:!0}))}function S(){const e=["view","checkChild","document","getNearestSelectionRange","commands","5637668QpbUOA","for","undo","nodeAfter","userPositionMarker","markerToHighlight","delete","ck-user__marker ","pluginName","start","mySessionId","7007795pQhThN","batch","addMarker","245169yuWPlE","user:range","200SBggJl","applyOperation","model","render","highest","$text","toDomElement","toRange","editing","data-session-id","init","oldRange","getAttribute",'⁠<span class="ck-user__marker-line" contenteditable="false"><span class="ck-user__marker-dot"></span></span>⁠',"ck-user__selection","124242HVSjts","removeMarker","name","isLimit","markerToElement","element","isInline","getCustomProperty","split","plugins","afterInit","getRange","editor","schema","markerRange","createRange","setCustomProperty","innerHTML","createUIElement","newRange","has","size","reconvertMarker","markers","isObject","user:","parent","getContainedElement","root","span","UserMarkers","editingDowncast","539UqDhYc","selection","contenteditable","24LpjMCJ","3287835iXFbhd","fromRange","change","getPositions","requires","set","$graveyard","getFirstRange","end","color","user:position","user:position:","conversion","tableCell","rootName","user:range:","getSelectionClass","change:range","6908490lEmVAx","_createdBatches","startsWith","get","isSimilar","clear","2034RWAcdz","hasDomSelection","createUserMarkerOperations","orderNumber","getUserBySessionId","enqueueChange","getStart","isCollapsed","markerName","marker","hasContent","type","getMarkerClass","updateMarker","deletionPosition","update:user:range","detach"];return(S=function(){return e})()}function P(e,t,n){const r=e.t;switch(t){case"PENDING_ACTION_SENDING_DATA":return r({string:"Sending data to the server.",id:"PENDING_ACTION_SENDING_DATA"});case"The local document and server document differ and merging them can cause unexpected behavior. To not lose your content save it locally and refresh the editor.":return r("The local document and server document differ and merging them can cause unexpected behavior. To not lose your content save it locally and refresh the editor.");case"The document cannot be connected back to the server. To not lose your content save it locally and refresh the editor.":return r("The document cannot be connected back to the server. To not lose your content save it locally and refresh the editor.");case"The document details could not be taken during the reconnection. To not lose your content save it locally and refresh the editor.":return r("The document details could not be taken during the reconnection. To not lose your content save it locally and refresh the editor.");case"The last saved version of the document does not match the local version. To not lose your content save it locally and refresh the editor.":return r("The last saved version of the document does not match the local version. To not lose your content save it locally and refresh the editor.");case"Synchronization issue":return r("Synchronization issue");case"PENDING_ACTION_REVISION_HISTORY":return r({string:"Unsaved change in revision history.",id:"PENDING_ACTION_REVISION_HISTORY"});case"CONNECTED_USERS":return r({string:"1 connected user (me)",plural:"%0 connected users",id:"CONNECTED_USERS"},n);default:return""}}var A=__webpack_require__(1199);const T=A.Reader,k=A.Writer,C=A.util,E=A.roots.default||(A.roots.default={}),j=E.AttributeOperation=(()=>{function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.range=null,e.prototype.key="",e.prototype.oldValueBoolean=!1,e.prototype.oldValueJson="",e.prototype.newValueBoolean=!1,e.prototype.newValueJson="",e.prototype.wasUndone=!1,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=k.create()),null!=e.range&&Object.hasOwnProperty.call(e,"range")&&E.Range.encode(e.range,t.uint32(10).fork()).ldelim(),null!=e.key&&Object.hasOwnProperty.call(e,"key")&&t.uint32(18).string(e.key),null!=e.oldValueBoolean&&Object.hasOwnProperty.call(e,"oldValueBoolean")&&t.uint32(24).bool(e.oldValueBoolean),null!=e.oldValueJson&&Object.hasOwnProperty.call(e,"oldValueJson")&&t.uint32(34).string(e.oldValueJson),null!=e.newValueBoolean&&Object.hasOwnProperty.call(e,"newValueBoolean")&&t.uint32(40).bool(e.newValueBoolean),null!=e.newValueJson&&Object.hasOwnProperty.call(e,"newValueJson")&&t.uint32(50).string(e.newValueJson),null!=e.wasUndone&&Object.hasOwnProperty.call(e,"wasUndone")&&t.uint32(56).bool(e.wasUndone),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof T||(e=T.create(e));let n=void 0===t?e.len:e.pos+t,r=new E.AttributeOperation;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.range=E.Range.decode(e,e.uint32());break;case 2:r.key=e.string();break;case 3:r.oldValueBoolean=e.bool();break;case 4:r.oldValueJson=e.string();break;case 5:r.newValueBoolean=e.bool();break;case 6:r.newValueJson=e.string();break;case 7:r.wasUndone=e.bool();break;default:e.skipType(7&t)}}return r},e.decodeDelimited=function(e){return e instanceof T||(e=new T(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.range&&e.hasOwnProperty("range")){let t=E.Range.verify(e.range);if(t)return"range."+t}return null!=e.key&&e.hasOwnProperty("key")&&!C.isString(e.key)?"key: string expected":null!=e.oldValueBoolean&&e.hasOwnProperty("oldValueBoolean")&&"boolean"!=typeof e.oldValueBoolean?"oldValueBoolean: boolean expected":null!=e.oldValueJson&&e.hasOwnProperty("oldValueJson")&&!C.isString(e.oldValueJson)?"oldValueJson: string expected":null!=e.newValueBoolean&&e.hasOwnProperty("newValueBoolean")&&"boolean"!=typeof e.newValueBoolean?"newValueBoolean: boolean expected":null!=e.newValueJson&&e.hasOwnProperty("newValueJson")&&!C.isString(e.newValueJson)?"newValueJson: string expected":null!=e.wasUndone&&e.hasOwnProperty("wasUndone")&&"boolean"!=typeof e.wasUndone?"wasUndone: boolean expected":null},e.fromObject=function(e){if(e instanceof E.AttributeOperation)return e;let t=new E.AttributeOperation;if(null!=e.range){if("object"!=typeof e.range)throw TypeError(".AttributeOperation.range: object expected");t.range=E.Range.fromObject(e.range)}return null!=e.key&&(t.key=String(e.key)),null!=e.oldValueBoolean&&(t.oldValueBoolean=Boolean(e.oldValueBoolean)),null!=e.oldValueJson&&(t.oldValueJson=String(e.oldValueJson)),null!=e.newValueBoolean&&(t.newValueBoolean=Boolean(e.newValueBoolean)),null!=e.newValueJson&&(t.newValueJson=String(e.newValueJson)),null!=e.wasUndone&&(t.wasUndone=Boolean(e.wasUndone)),t},e.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.range=null,n.key="",n.oldValueBoolean=!1,n.oldValueJson="",n.newValueBoolean=!1,n.newValueJson="",n.wasUndone=!1),null!=e.range&&e.hasOwnProperty("range")&&(n.range=E.Range.toObject(e.range,t)),null!=e.key&&e.hasOwnProperty("key")&&(n.key=e.key),null!=e.oldValueBoolean&&e.hasOwnProperty("oldValueBoolean")&&(n.oldValueBoolean=e.oldValueBoolean),null!=e.oldValueJson&&e.hasOwnProperty("oldValueJson")&&(n.oldValueJson=e.oldValueJson),null!=e.newValueBoolean&&e.hasOwnProperty("newValueBoolean")&&(n.newValueBoolean=e.newValueBoolean),null!=e.newValueJson&&e.hasOwnProperty("newValueJson")&&(n.newValueJson=e.newValueJson),null!=e.wasUndone&&e.hasOwnProperty("wasUndone")&&(n.wasUndone=e.wasUndone),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,A.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/AttributeOperation"},e})(),D=E.InsertOperation=(()=>{function e(e){if(this.nodes=[],e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.position=null,e.prototype.nodes=C.emptyArray,e.prototype.shouldReceiveAttributes=!1,e.prototype.wasUndone=!1,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=k.create()),null!=e.position&&Object.hasOwnProperty.call(e,"position")&&E.Position.encode(e.position,t.uint32(10).fork()).ldelim(),null!=e.nodes&&e.nodes.length)for(let n=0;n<e.nodes.length;++n)E.Element.encode(e.nodes[n],t.uint32(18).fork()).ldelim();return null!=e.shouldReceiveAttributes&&Object.hasOwnProperty.call(e,"shouldReceiveAttributes")&&t.uint32(24).bool(e.shouldReceiveAttributes),null!=e.wasUndone&&Object.hasOwnProperty.call(e,"wasUndone")&&t.uint32(32).bool(e.wasUndone),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof T||(e=T.create(e));let n=void 0===t?e.len:e.pos+t,r=new E.InsertOperation;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.position=E.Position.decode(e,e.uint32());break;case 2:r.nodes&&r.nodes.length||(r.nodes=[]),r.nodes.push(E.Element.decode(e,e.uint32()));break;case 3:r.shouldReceiveAttributes=e.bool();break;case 4:r.wasUndone=e.bool();break;default:e.skipType(7&t)}}return r},e.decodeDelimited=function(e){return e instanceof T||(e=new T(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.position&&e.hasOwnProperty("position")){let t=E.Position.verify(e.position);if(t)return"position."+t}if(null!=e.nodes&&e.hasOwnProperty("nodes")){if(!Array.isArray(e.nodes))return"nodes: array expected";for(let t=0;t<e.nodes.length;++t){let n=E.Element.verify(e.nodes[t]);if(n)return"nodes."+n}}return null!=e.shouldReceiveAttributes&&e.hasOwnProperty("shouldReceiveAttributes")&&"boolean"!=typeof e.shouldReceiveAttributes?"shouldReceiveAttributes: boolean expected":null!=e.wasUndone&&e.hasOwnProperty("wasUndone")&&"boolean"!=typeof e.wasUndone?"wasUndone: boolean expected":null},e.fromObject=function(e){if(e instanceof E.InsertOperation)return e;let t=new E.InsertOperation;if(null!=e.position){if("object"!=typeof e.position)throw TypeError(".InsertOperation.position: object expected");t.position=E.Position.fromObject(e.position)}if(e.nodes){if(!Array.isArray(e.nodes))throw TypeError(".InsertOperation.nodes: array expected");t.nodes=[];for(let n=0;n<e.nodes.length;++n){if("object"!=typeof e.nodes[n])throw TypeError(".InsertOperation.nodes: object expected");t.nodes[n]=E.Element.fromObject(e.nodes[n])}}return null!=e.shouldReceiveAttributes&&(t.shouldReceiveAttributes=Boolean(e.shouldReceiveAttributes)),null!=e.wasUndone&&(t.wasUndone=Boolean(e.wasUndone)),t},e.toObject=function(e,t){t||(t={});let n={};if((t.arrays||t.defaults)&&(n.nodes=[]),t.defaults&&(n.position=null,n.shouldReceiveAttributes=!1,n.wasUndone=!1),null!=e.position&&e.hasOwnProperty("position")&&(n.position=E.Position.toObject(e.position,t)),e.nodes&&e.nodes.length){n.nodes=[];for(let r=0;r<e.nodes.length;++r)n.nodes[r]=E.Element.toObject(e.nodes[r],t)}return null!=e.shouldReceiveAttributes&&e.hasOwnProperty("shouldReceiveAttributes")&&(n.shouldReceiveAttributes=e.shouldReceiveAttributes),null!=e.wasUndone&&e.hasOwnProperty("wasUndone")&&(n.wasUndone=e.wasUndone),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,A.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/InsertOperation"},e})(),R=E.MarkerOperation=(()=>{function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.name="",e.prototype.oldRange=null,e.prototype.newRange=null,e.prototype.affectsData=!1,e.prototype.wasUndone=!1,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=k.create()),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.oldRange&&Object.hasOwnProperty.call(e,"oldRange")&&E.Range.encode(e.oldRange,t.uint32(18).fork()).ldelim(),null!=e.newRange&&Object.hasOwnProperty.call(e,"newRange")&&E.Range.encode(e.newRange,t.uint32(26).fork()).ldelim(),null!=e.affectsData&&Object.hasOwnProperty.call(e,"affectsData")&&t.uint32(32).bool(e.affectsData),null!=e.wasUndone&&Object.hasOwnProperty.call(e,"wasUndone")&&t.uint32(40).bool(e.wasUndone),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof T||(e=T.create(e));let n=void 0===t?e.len:e.pos+t,r=new E.MarkerOperation;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.name=e.string();break;case 2:r.oldRange=E.Range.decode(e,e.uint32());break;case 3:r.newRange=E.Range.decode(e,e.uint32());break;case 4:r.affectsData=e.bool();break;case 5:r.wasUndone=e.bool();break;default:e.skipType(7&t)}}return r},e.decodeDelimited=function(e){return e instanceof T||(e=new T(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.name&&e.hasOwnProperty("name")&&!C.isString(e.name))return"name: string expected";if(null!=e.oldRange&&e.hasOwnProperty("oldRange")){let t=E.Range.verify(e.oldRange);if(t)return"oldRange."+t}if(null!=e.newRange&&e.hasOwnProperty("newRange")){let t=E.Range.verify(e.newRange);if(t)return"newRange."+t}return null!=e.affectsData&&e.hasOwnProperty("affectsData")&&"boolean"!=typeof e.affectsData?"affectsData: boolean expected":null!=e.wasUndone&&e.hasOwnProperty("wasUndone")&&"boolean"!=typeof e.wasUndone?"wasUndone: boolean expected":null},e.fromObject=function(e){if(e instanceof E.MarkerOperation)return e;let t=new E.MarkerOperation;if(null!=e.name&&(t.name=String(e.name)),null!=e.oldRange){if("object"!=typeof e.oldRange)throw TypeError(".MarkerOperation.oldRange: object expected");t.oldRange=E.Range.fromObject(e.oldRange)}if(null!=e.newRange){if("object"!=typeof e.newRange)throw TypeError(".MarkerOperation.newRange: object expected");t.newRange=E.Range.fromObject(e.newRange)}return null!=e.affectsData&&(t.affectsData=Boolean(e.affectsData)),null!=e.wasUndone&&(t.wasUndone=Boolean(e.wasUndone)),t},e.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.name="",n.oldRange=null,n.newRange=null,n.affectsData=!1,n.wasUndone=!1),null!=e.name&&e.hasOwnProperty("name")&&(n.name=e.name),null!=e.oldRange&&e.hasOwnProperty("oldRange")&&(n.oldRange=E.Range.toObject(e.oldRange,t)),null!=e.newRange&&e.hasOwnProperty("newRange")&&(n.newRange=E.Range.toObject(e.newRange,t)),null!=e.affectsData&&e.hasOwnProperty("affectsData")&&(n.affectsData=e.affectsData),null!=e.wasUndone&&e.hasOwnProperty("wasUndone")&&(n.wasUndone=e.wasUndone),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,A.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/MarkerOperation"},e})(),M=E.MergeOperation=(()=>{function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.sourcePosition=null,e.prototype.targetPosition=null,e.prototype.graveyardPosition=null,e.prototype.howMany=0,e.prototype.wasUndone=!1,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=k.create()),null!=e.sourcePosition&&Object.hasOwnProperty.call(e,"sourcePosition")&&E.Position.encode(e.sourcePosition,t.uint32(10).fork()).ldelim(),null!=e.targetPosition&&Object.hasOwnProperty.call(e,"targetPosition")&&E.Position.encode(e.targetPosition,t.uint32(18).fork()).ldelim(),null!=e.graveyardPosition&&Object.hasOwnProperty.call(e,"graveyardPosition")&&E.Position.encode(e.graveyardPosition,t.uint32(26).fork()).ldelim(),null!=e.howMany&&Object.hasOwnProperty.call(e,"howMany")&&t.uint32(32).uint32(e.howMany),null!=e.wasUndone&&Object.hasOwnProperty.call(e,"wasUndone")&&t.uint32(40).bool(e.wasUndone),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof T||(e=T.create(e));let n=void 0===t?e.len:e.pos+t,r=new E.MergeOperation;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.sourcePosition=E.Position.decode(e,e.uint32());break;case 2:r.targetPosition=E.Position.decode(e,e.uint32());break;case 3:r.graveyardPosition=E.Position.decode(e,e.uint32());break;case 4:r.howMany=e.uint32();break;case 5:r.wasUndone=e.bool();break;default:e.skipType(7&t)}}return r},e.decodeDelimited=function(e){return e instanceof T||(e=new T(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.sourcePosition&&e.hasOwnProperty("sourcePosition")){let t=E.Position.verify(e.sourcePosition);if(t)return"sourcePosition."+t}if(null!=e.targetPosition&&e.hasOwnProperty("targetPosition")){let t=E.Position.verify(e.targetPosition);if(t)return"targetPosition."+t}if(null!=e.graveyardPosition&&e.hasOwnProperty("graveyardPosition")){let t=E.Position.verify(e.graveyardPosition);if(t)return"graveyardPosition."+t}return null!=e.howMany&&e.hasOwnProperty("howMany")&&!C.isInteger(e.howMany)?"howMany: integer expected":null!=e.wasUndone&&e.hasOwnProperty("wasUndone")&&"boolean"!=typeof e.wasUndone?"wasUndone: boolean expected":null},e.fromObject=function(e){if(e instanceof E.MergeOperation)return e;let t=new E.MergeOperation;if(null!=e.sourcePosition){if("object"!=typeof e.sourcePosition)throw TypeError(".MergeOperation.sourcePosition: object expected");t.sourcePosition=E.Position.fromObject(e.sourcePosition)}if(null!=e.targetPosition){if("object"!=typeof e.targetPosition)throw TypeError(".MergeOperation.targetPosition: object expected");t.targetPosition=E.Position.fromObject(e.targetPosition)}if(null!=e.graveyardPosition){if("object"!=typeof e.graveyardPosition)throw TypeError(".MergeOperation.graveyardPosition: object expected");t.graveyardPosition=E.Position.fromObject(e.graveyardPosition)}return null!=e.howMany&&(t.howMany=e.howMany>>>0),null!=e.wasUndone&&(t.wasUndone=Boolean(e.wasUndone)),t},e.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.sourcePosition=null,n.targetPosition=null,n.graveyardPosition=null,n.howMany=0,n.wasUndone=!1),null!=e.sourcePosition&&e.hasOwnProperty("sourcePosition")&&(n.sourcePosition=E.Position.toObject(e.sourcePosition,t)),null!=e.targetPosition&&e.hasOwnProperty("targetPosition")&&(n.targetPosition=E.Position.toObject(e.targetPosition,t)),null!=e.graveyardPosition&&e.hasOwnProperty("graveyardPosition")&&(n.graveyardPosition=E.Position.toObject(e.graveyardPosition,t)),null!=e.howMany&&e.hasOwnProperty("howMany")&&(n.howMany=e.howMany),null!=e.wasUndone&&e.hasOwnProperty("wasUndone")&&(n.wasUndone=e.wasUndone),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,A.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/MergeOperation"},e})(),N=E.MoveOperation=(()=>{function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.sourcePosition=null,e.prototype.howMany=0,e.prototype.targetPosition=null,e.prototype.wasUndone=!1,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=k.create()),null!=e.sourcePosition&&Object.hasOwnProperty.call(e,"sourcePosition")&&E.Position.encode(e.sourcePosition,t.uint32(10).fork()).ldelim(),null!=e.howMany&&Object.hasOwnProperty.call(e,"howMany")&&t.uint32(16).uint32(e.howMany),null!=e.targetPosition&&Object.hasOwnProperty.call(e,"targetPosition")&&E.Position.encode(e.targetPosition,t.uint32(26).fork()).ldelim(),null!=e.wasUndone&&Object.hasOwnProperty.call(e,"wasUndone")&&t.uint32(32).bool(e.wasUndone),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof T||(e=T.create(e));let n=void 0===t?e.len:e.pos+t,r=new E.MoveOperation;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.sourcePosition=E.Position.decode(e,e.uint32());break;case 2:r.howMany=e.uint32();break;case 3:r.targetPosition=E.Position.decode(e,e.uint32());break;case 4:r.wasUndone=e.bool();break;default:e.skipType(7&t)}}return r},e.decodeDelimited=function(e){return e instanceof T||(e=new T(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.sourcePosition&&e.hasOwnProperty("sourcePosition")){let t=E.Position.verify(e.sourcePosition);if(t)return"sourcePosition."+t}if(null!=e.howMany&&e.hasOwnProperty("howMany")&&!C.isInteger(e.howMany))return"howMany: integer expected";if(null!=e.targetPosition&&e.hasOwnProperty("targetPosition")){let t=E.Position.verify(e.targetPosition);if(t)return"targetPosition."+t}return null!=e.wasUndone&&e.hasOwnProperty("wasUndone")&&"boolean"!=typeof e.wasUndone?"wasUndone: boolean expected":null},e.fromObject=function(e){if(e instanceof E.MoveOperation)return e;let t=new E.MoveOperation;if(null!=e.sourcePosition){if("object"!=typeof e.sourcePosition)throw TypeError(".MoveOperation.sourcePosition: object expected");t.sourcePosition=E.Position.fromObject(e.sourcePosition)}if(null!=e.howMany&&(t.howMany=e.howMany>>>0),null!=e.targetPosition){if("object"!=typeof e.targetPosition)throw TypeError(".MoveOperation.targetPosition: object expected");t.targetPosition=E.Position.fromObject(e.targetPosition)}return null!=e.wasUndone&&(t.wasUndone=Boolean(e.wasUndone)),t},e.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.sourcePosition=null,n.howMany=0,n.targetPosition=null,n.wasUndone=!1),null!=e.sourcePosition&&e.hasOwnProperty("sourcePosition")&&(n.sourcePosition=E.Position.toObject(e.sourcePosition,t)),null!=e.howMany&&e.hasOwnProperty("howMany")&&(n.howMany=e.howMany),null!=e.targetPosition&&e.hasOwnProperty("targetPosition")&&(n.targetPosition=E.Position.toObject(e.targetPosition,t)),null!=e.wasUndone&&e.hasOwnProperty("wasUndone")&&(n.wasUndone=e.wasUndone),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,A.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/MoveOperation"},e})(),x=E.RenameOperation=(()=>{function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.position=null,e.prototype.oldName="",e.prototype.newName="",e.prototype.wasUndone=!1,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=k.create()),null!=e.position&&Object.hasOwnProperty.call(e,"position")&&E.Position.encode(e.position,t.uint32(10).fork()).ldelim(),null!=e.oldName&&Object.hasOwnProperty.call(e,"oldName")&&t.uint32(18).string(e.oldName),null!=e.newName&&Object.hasOwnProperty.call(e,"newName")&&t.uint32(26).string(e.newName),null!=e.wasUndone&&Object.hasOwnProperty.call(e,"wasUndone")&&t.uint32(32).bool(e.wasUndone),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof T||(e=T.create(e));let n=void 0===t?e.len:e.pos+t,r=new E.RenameOperation;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.position=E.Position.decode(e,e.uint32());break;case 2:r.oldName=e.string();break;case 3:r.newName=e.string();break;case 4:r.wasUndone=e.bool();break;default:e.skipType(7&t)}}return r},e.decodeDelimited=function(e){return e instanceof T||(e=new T(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.position&&e.hasOwnProperty("position")){let t=E.Position.verify(e.position);if(t)return"position."+t}return null!=e.oldName&&e.hasOwnProperty("oldName")&&!C.isString(e.oldName)?"oldName: string expected":null!=e.newName&&e.hasOwnProperty("newName")&&!C.isString(e.newName)?"newName: string expected":null!=e.wasUndone&&e.hasOwnProperty("wasUndone")&&"boolean"!=typeof e.wasUndone?"wasUndone: boolean expected":null},e.fromObject=function(e){if(e instanceof E.RenameOperation)return e;let t=new E.RenameOperation;if(null!=e.position){if("object"!=typeof e.position)throw TypeError(".RenameOperation.position: object expected");t.position=E.Position.fromObject(e.position)}return null!=e.oldName&&(t.oldName=String(e.oldName)),null!=e.newName&&(t.newName=String(e.newName)),null!=e.wasUndone&&(t.wasUndone=Boolean(e.wasUndone)),t},e.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.position=null,n.oldName="",n.newName="",n.wasUndone=!1),null!=e.position&&e.hasOwnProperty("position")&&(n.position=E.Position.toObject(e.position,t)),null!=e.oldName&&e.hasOwnProperty("oldName")&&(n.oldName=e.oldName),null!=e.newName&&e.hasOwnProperty("newName")&&(n.newName=e.newName),null!=e.wasUndone&&e.hasOwnProperty("wasUndone")&&(n.wasUndone=e.wasUndone),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,A.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/RenameOperation"},e})(),V=E.RootAttributeOperation=(()=>{function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.root="",e.prototype.key="",e.prototype.oldValueBoolean=!1,e.prototype.oldValueJson="",e.prototype.newValueBoolean=!1,e.prototype.newValueJson="",e.prototype.wasUndone=!1,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=k.create()),null!=e.root&&Object.hasOwnProperty.call(e,"root")&&t.uint32(10).string(e.root),null!=e.key&&Object.hasOwnProperty.call(e,"key")&&t.uint32(18).string(e.key),null!=e.oldValueBoolean&&Object.hasOwnProperty.call(e,"oldValueBoolean")&&t.uint32(24).bool(e.oldValueBoolean),null!=e.oldValueJson&&Object.hasOwnProperty.call(e,"oldValueJson")&&t.uint32(34).string(e.oldValueJson),null!=e.newValueBoolean&&Object.hasOwnProperty.call(e,"newValueBoolean")&&t.uint32(40).bool(e.newValueBoolean),null!=e.newValueJson&&Object.hasOwnProperty.call(e,"newValueJson")&&t.uint32(50).string(e.newValueJson),null!=e.wasUndone&&Object.hasOwnProperty.call(e,"wasUndone")&&t.uint32(56).bool(e.wasUndone),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof T||(e=T.create(e));let n=void 0===t?e.len:e.pos+t,r=new E.RootAttributeOperation;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.root=e.string();break;case 2:r.key=e.string();break;case 3:r.oldValueBoolean=e.bool();break;case 4:r.oldValueJson=e.string();break;case 5:r.newValueBoolean=e.bool();break;case 6:r.newValueJson=e.string();break;case 7:r.wasUndone=e.bool();break;default:e.skipType(7&t)}}return r},e.decodeDelimited=function(e){return e instanceof T||(e=new T(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.root&&e.hasOwnProperty("root")&&!C.isString(e.root)?"root: string expected":null!=e.key&&e.hasOwnProperty("key")&&!C.isString(e.key)?"key: string expected":null!=e.oldValueBoolean&&e.hasOwnProperty("oldValueBoolean")&&"boolean"!=typeof e.oldValueBoolean?"oldValueBoolean: boolean expected":null!=e.oldValueJson&&e.hasOwnProperty("oldValueJson")&&!C.isString(e.oldValueJson)?"oldValueJson: string expected":null!=e.newValueBoolean&&e.hasOwnProperty("newValueBoolean")&&"boolean"!=typeof e.newValueBoolean?"newValueBoolean: boolean expected":null!=e.newValueJson&&e.hasOwnProperty("newValueJson")&&!C.isString(e.newValueJson)?"newValueJson: string expected":null!=e.wasUndone&&e.hasOwnProperty("wasUndone")&&"boolean"!=typeof e.wasUndone?"wasUndone: boolean expected":null},e.fromObject=function(e){if(e instanceof E.RootAttributeOperation)return e;let t=new E.RootAttributeOperation;return null!=e.root&&(t.root=String(e.root)),null!=e.key&&(t.key=String(e.key)),null!=e.oldValueBoolean&&(t.oldValueBoolean=Boolean(e.oldValueBoolean)),null!=e.oldValueJson&&(t.oldValueJson=String(e.oldValueJson)),null!=e.newValueBoolean&&(t.newValueBoolean=Boolean(e.newValueBoolean)),null!=e.newValueJson&&(t.newValueJson=String(e.newValueJson)),null!=e.wasUndone&&(t.wasUndone=Boolean(e.wasUndone)),t},e.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.root="",n.key="",n.oldValueBoolean=!1,n.oldValueJson="",n.newValueBoolean=!1,n.newValueJson="",n.wasUndone=!1),null!=e.root&&e.hasOwnProperty("root")&&(n.root=e.root),null!=e.key&&e.hasOwnProperty("key")&&(n.key=e.key),null!=e.oldValueBoolean&&e.hasOwnProperty("oldValueBoolean")&&(n.oldValueBoolean=e.oldValueBoolean),null!=e.oldValueJson&&e.hasOwnProperty("oldValueJson")&&(n.oldValueJson=e.oldValueJson),null!=e.newValueBoolean&&e.hasOwnProperty("newValueBoolean")&&(n.newValueBoolean=e.newValueBoolean),null!=e.newValueJson&&e.hasOwnProperty("newValueJson")&&(n.newValueJson=e.newValueJson),null!=e.wasUndone&&e.hasOwnProperty("wasUndone")&&(n.wasUndone=e.wasUndone),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,A.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/RootAttributeOperation"},e})(),B=E.RootOperation=(()=>{function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.rootName="",e.prototype.elementName="",e.prototype.isAdd=!1,e.prototype.wasUndone=!1,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=k.create()),null!=e.rootName&&Object.hasOwnProperty.call(e,"rootName")&&t.uint32(10).string(e.rootName),null!=e.elementName&&Object.hasOwnProperty.call(e,"elementName")&&t.uint32(18).string(e.elementName),null!=e.isAdd&&Object.hasOwnProperty.call(e,"isAdd")&&t.uint32(24).bool(e.isAdd),null!=e.wasUndone&&Object.hasOwnProperty.call(e,"wasUndone")&&t.uint32(32).bool(e.wasUndone),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof T||(e=T.create(e));let n=void 0===t?e.len:e.pos+t,r=new E.RootOperation;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.rootName=e.string();break;case 2:r.elementName=e.string();break;case 3:r.isAdd=e.bool();break;case 4:r.wasUndone=e.bool();break;default:e.skipType(7&t)}}return r},e.decodeDelimited=function(e){return e instanceof T||(e=new T(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.rootName&&e.hasOwnProperty("rootName")&&!C.isString(e.rootName)?"rootName: string expected":null!=e.elementName&&e.hasOwnProperty("elementName")&&!C.isString(e.elementName)?"elementName: string expected":null!=e.isAdd&&e.hasOwnProperty("isAdd")&&"boolean"!=typeof e.isAdd?"isAdd: boolean expected":null!=e.wasUndone&&e.hasOwnProperty("wasUndone")&&"boolean"!=typeof e.wasUndone?"wasUndone: boolean expected":null},e.fromObject=function(e){if(e instanceof E.RootOperation)return e;let t=new E.RootOperation;return null!=e.rootName&&(t.rootName=String(e.rootName)),null!=e.elementName&&(t.elementName=String(e.elementName)),null!=e.isAdd&&(t.isAdd=Boolean(e.isAdd)),null!=e.wasUndone&&(t.wasUndone=Boolean(e.wasUndone)),t},e.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.rootName="",n.elementName="",n.isAdd=!1,n.wasUndone=!1),null!=e.rootName&&e.hasOwnProperty("rootName")&&(n.rootName=e.rootName),null!=e.elementName&&e.hasOwnProperty("elementName")&&(n.elementName=e.elementName),null!=e.isAdd&&e.hasOwnProperty("isAdd")&&(n.isAdd=e.isAdd),null!=e.wasUndone&&e.hasOwnProperty("wasUndone")&&(n.wasUndone=e.wasUndone),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,A.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/RootOperation"},e})(),U=E.SplitOperation=(()=>{function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.splitPosition=null,e.prototype.graveyardPosition=null,e.prototype.howMany=0,e.prototype.insertionPosition=null,e.prototype.wasUndone=!1,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=k.create()),null!=e.splitPosition&&Object.hasOwnProperty.call(e,"splitPosition")&&E.Position.encode(e.splitPosition,t.uint32(10).fork()).ldelim(),null!=e.graveyardPosition&&Object.hasOwnProperty.call(e,"graveyardPosition")&&E.Position.encode(e.graveyardPosition,t.uint32(18).fork()).ldelim(),null!=e.howMany&&Object.hasOwnProperty.call(e,"howMany")&&t.uint32(24).uint32(e.howMany),null!=e.insertionPosition&&Object.hasOwnProperty.call(e,"insertionPosition")&&E.Position.encode(e.insertionPosition,t.uint32(34).fork()).ldelim(),null!=e.wasUndone&&Object.hasOwnProperty.call(e,"wasUndone")&&t.uint32(40).bool(e.wasUndone),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof T||(e=T.create(e));let n=void 0===t?e.len:e.pos+t,r=new E.SplitOperation;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.splitPosition=E.Position.decode(e,e.uint32());break;case 2:r.graveyardPosition=E.Position.decode(e,e.uint32());break;case 3:r.howMany=e.uint32();break;case 4:r.insertionPosition=E.Position.decode(e,e.uint32());break;case 5:r.wasUndone=e.bool();break;default:e.skipType(7&t)}}return r},e.decodeDelimited=function(e){return e instanceof T||(e=new T(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.splitPosition&&e.hasOwnProperty("splitPosition")){let t=E.Position.verify(e.splitPosition);if(t)return"splitPosition."+t}if(null!=e.graveyardPosition&&e.hasOwnProperty("graveyardPosition")){let t=E.Position.verify(e.graveyardPosition);if(t)return"graveyardPosition."+t}if(null!=e.howMany&&e.hasOwnProperty("howMany")&&!C.isInteger(e.howMany))return"howMany: integer expected";if(null!=e.insertionPosition&&e.hasOwnProperty("insertionPosition")){let t=E.Position.verify(e.insertionPosition);if(t)return"insertionPosition."+t}return null!=e.wasUndone&&e.hasOwnProperty("wasUndone")&&"boolean"!=typeof e.wasUndone?"wasUndone: boolean expected":null},e.fromObject=function(e){if(e instanceof E.SplitOperation)return e;let t=new E.SplitOperation;if(null!=e.splitPosition){if("object"!=typeof e.splitPosition)throw TypeError(".SplitOperation.splitPosition: object expected");t.splitPosition=E.Position.fromObject(e.splitPosition)}if(null!=e.graveyardPosition){if("object"!=typeof e.graveyardPosition)throw TypeError(".SplitOperation.graveyardPosition: object expected");t.graveyardPosition=E.Position.fromObject(e.graveyardPosition)}if(null!=e.howMany&&(t.howMany=e.howMany>>>0),null!=e.insertionPosition){if("object"!=typeof e.insertionPosition)throw TypeError(".SplitOperation.insertionPosition: object expected");t.insertionPosition=E.Position.fromObject(e.insertionPosition)}return null!=e.wasUndone&&(t.wasUndone=Boolean(e.wasUndone)),t},e.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.splitPosition=null,n.graveyardPosition=null,n.howMany=0,n.insertionPosition=null,n.wasUndone=!1),null!=e.splitPosition&&e.hasOwnProperty("splitPosition")&&(n.splitPosition=E.Position.toObject(e.splitPosition,t)),null!=e.graveyardPosition&&e.hasOwnProperty("graveyardPosition")&&(n.graveyardPosition=E.Position.toObject(e.graveyardPosition,t)),null!=e.howMany&&e.hasOwnProperty("howMany")&&(n.howMany=e.howMany),null!=e.insertionPosition&&e.hasOwnProperty("insertionPosition")&&(n.insertionPosition=E.Position.toObject(e.insertionPosition,t)),null!=e.wasUndone&&e.hasOwnProperty("wasUndone")&&(n.wasUndone=e.wasUndone),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,A.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/SplitOperation"},e})(),J=E.Position=(()=>{function e(e){if(this.path=[],e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.root="",e.prototype.rootMain=!1,e.prototype.rootGraveyard=!1,e.prototype.path=C.emptyArray,e.prototype.stickiness="",e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=k.create()),null!=e.root&&Object.hasOwnProperty.call(e,"root")&&t.uint32(10).string(e.root),null!=e.rootMain&&Object.hasOwnProperty.call(e,"rootMain")&&t.uint32(16).bool(e.rootMain),null!=e.rootGraveyard&&Object.hasOwnProperty.call(e,"rootGraveyard")&&t.uint32(24).bool(e.rootGraveyard),null!=e.path&&e.path.length){t.uint32(34).fork();for(let n=0;n<e.path.length;++n)t.uint32(e.path[n]);t.ldelim()}return null!=e.stickiness&&Object.hasOwnProperty.call(e,"stickiness")&&t.uint32(42).string(e.stickiness),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof T||(e=T.create(e));let n=void 0===t?e.len:e.pos+t,r=new E.Position;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.root=e.string();break;case 2:r.rootMain=e.bool();break;case 3:r.rootGraveyard=e.bool();break;case 4:if(r.path&&r.path.length||(r.path=[]),2==(7&t)){let t=e.uint32()+e.pos;for(;e.pos<t;)r.path.push(e.uint32())}else r.path.push(e.uint32());break;case 5:r.stickiness=e.string();break;default:e.skipType(7&t)}}return r},e.decodeDelimited=function(e){return e instanceof T||(e=new T(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.root&&e.hasOwnProperty("root")&&!C.isString(e.root))return"root: string expected";if(null!=e.rootMain&&e.hasOwnProperty("rootMain")&&"boolean"!=typeof e.rootMain)return"rootMain: boolean expected";if(null!=e.rootGraveyard&&e.hasOwnProperty("rootGraveyard")&&"boolean"!=typeof e.rootGraveyard)return"rootGraveyard: boolean expected";if(null!=e.path&&e.hasOwnProperty("path")){if(!Array.isArray(e.path))return"path: array expected";for(let t=0;t<e.path.length;++t)if(!C.isInteger(e.path[t]))return"path: integer[] expected"}return null!=e.stickiness&&e.hasOwnProperty("stickiness")&&!C.isString(e.stickiness)?"stickiness: string expected":null},e.fromObject=function(e){if(e instanceof E.Position)return e;let t=new E.Position;if(null!=e.root&&(t.root=String(e.root)),null!=e.rootMain&&(t.rootMain=Boolean(e.rootMain)),null!=e.rootGraveyard&&(t.rootGraveyard=Boolean(e.rootGraveyard)),e.path){if(!Array.isArray(e.path))throw TypeError(".Position.path: array expected");t.path=[];for(let n=0;n<e.path.length;++n)t.path[n]=e.path[n]>>>0}return null!=e.stickiness&&(t.stickiness=String(e.stickiness)),t},e.toObject=function(e,t){t||(t={});let n={};if((t.arrays||t.defaults)&&(n.path=[]),t.defaults&&(n.root="",n.rootMain=!1,n.rootGraveyard=!1,n.stickiness=""),null!=e.root&&e.hasOwnProperty("root")&&(n.root=e.root),null!=e.rootMain&&e.hasOwnProperty("rootMain")&&(n.rootMain=e.rootMain),null!=e.rootGraveyard&&e.hasOwnProperty("rootGraveyard")&&(n.rootGraveyard=e.rootGraveyard),e.path&&e.path.length){n.path=[];for(let t=0;t<e.path.length;++t)n.path[t]=e.path[t]}return null!=e.stickiness&&e.hasOwnProperty("stickiness")&&(n.stickiness=e.stickiness),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,A.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/Position"},e})(),q=E.Range=(()=>{function e(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.start=null,e.prototype.end=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=k.create()),null!=e.start&&Object.hasOwnProperty.call(e,"start")&&E.Position.encode(e.start,t.uint32(10).fork()).ldelim(),null!=e.end&&Object.hasOwnProperty.call(e,"end")&&E.Position.encode(e.end,t.uint32(18).fork()).ldelim(),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof T||(e=T.create(e));let n=void 0===t?e.len:e.pos+t,r=new E.Range;for(;e.pos<n;){let t=e.uint32();switch(t>>>3){case 1:r.start=E.Position.decode(e,e.uint32());break;case 2:r.end=E.Position.decode(e,e.uint32());break;default:e.skipType(7&t)}}return r},e.decodeDelimited=function(e){return e instanceof T||(e=new T(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.start&&e.hasOwnProperty("start")){let t=E.Position.verify(e.start);if(t)return"start."+t}if(null!=e.end&&e.hasOwnProperty("end")){let t=E.Position.verify(e.end);if(t)return"end."+t}return null},e.fromObject=function(e){if(e instanceof E.Range)return e;let t=new E.Range;if(null!=e.start){if("object"!=typeof e.start)throw TypeError(".Range.start: object expected");t.start=E.Position.fromObject(e.start)}if(null!=e.end){if("object"!=typeof e.end)throw TypeError(".Range.end: object expected");t.end=E.Position.fromObject(e.end)}return t},e.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.start=null,n.end=null),null!=e.start&&e.hasOwnProperty("start")&&(n.start=E.Position.toObject(e.start,t)),null!=e.end&&e.hasOwnProperty("end")&&(n.end=E.Position.toObject(e.end,t)),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,A.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/Range"},e})(),G=E.Element=(()=>{function e(e){if(this.children=[],this.attributesBoolean={},e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.name="",e.prototype.children=C.emptyArray,e.prototype.data="",e.prototype.attributesBoolean=C.emptyObject,e.prototype.attributesJson="",e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=k.create()),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.children&&e.children.length)for(let n=0;n<e.children.length;++n)E.Element.encode(e.children[n],t.uint32(18).fork()).ldelim();if(null!=e.data&&Object.hasOwnProperty.call(e,"data")&&t.uint32(26).string(e.data),null!=e.attributesBoolean&&Object.hasOwnProperty.call(e,"attributesBoolean"))for(let n=Object.keys(e.attributesBoolean),r=0;r<n.length;++r)t.uint32(34).fork().uint32(10).string(n[r]).uint32(16).bool(e.attributesBoolean[n[r]]).ldelim();return null!=e.attributesJson&&Object.hasOwnProperty.call(e,"attributesJson")&&t.uint32(42).string(e.attributesJson),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof T||(e=T.create(e));let n,r,s=void 0===t?e.len:e.pos+t,o=new E.Element;for(;e.pos<s;){let t=e.uint32();switch(t>>>3){case 1:o.name=e.string();break;case 2:o.children&&o.children.length||(o.children=[]),o.children.push(E.Element.decode(e,e.uint32()));break;case 3:o.data=e.string();break;case 4:{o.attributesBoolean===C.emptyObject&&(o.attributesBoolean={});let t=e.uint32()+e.pos;for(n="",r=!1;e.pos<t;){let t=e.uint32();switch(t>>>3){case 1:n=e.string();break;case 2:r=e.bool();break;default:e.skipType(7&t)}}o.attributesBoolean[n]=r;break}case 5:o.attributesJson=e.string();break;default:e.skipType(7&t)}}return o},e.decodeDelimited=function(e){return e instanceof T||(e=new T(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.name&&e.hasOwnProperty("name")&&!C.isString(e.name))return"name: string expected";if(null!=e.children&&e.hasOwnProperty("children")){if(!Array.isArray(e.children))return"children: array expected";for(let t=0;t<e.children.length;++t){let n=E.Element.verify(e.children[t]);if(n)return"children."+n}}if(null!=e.data&&e.hasOwnProperty("data")&&!C.isString(e.data))return"data: string expected";if(null!=e.attributesBoolean&&e.hasOwnProperty("attributesBoolean")){if(!C.isObject(e.attributesBoolean))return"attributesBoolean: object expected";let t=Object.keys(e.attributesBoolean);for(let n=0;n<t.length;++n)if("boolean"!=typeof e.attributesBoolean[t[n]])return"attributesBoolean: boolean{k:string} expected"}return null!=e.attributesJson&&e.hasOwnProperty("attributesJson")&&!C.isString(e.attributesJson)?"attributesJson: string expected":null},e.fromObject=function(e){if(e instanceof E.Element)return e;let t=new E.Element;if(null!=e.name&&(t.name=String(e.name)),e.children){if(!Array.isArray(e.children))throw TypeError(".Element.children: array expected");t.children=[];for(let n=0;n<e.children.length;++n){if("object"!=typeof e.children[n])throw TypeError(".Element.children: object expected");t.children[n]=E.Element.fromObject(e.children[n])}}if(null!=e.data&&(t.data=String(e.data)),e.attributesBoolean){if("object"!=typeof e.attributesBoolean)throw TypeError(".Element.attributesBoolean: object expected");t.attributesBoolean={};for(let n=Object.keys(e.attributesBoolean),r=0;r<n.length;++r)t.attributesBoolean[n[r]]=Boolean(e.attributesBoolean[n[r]])}return null!=e.attributesJson&&(t.attributesJson=String(e.attributesJson)),t},e.toObject=function(e,t){t||(t={});let n,r={};if((t.arrays||t.defaults)&&(r.children=[]),(t.objects||t.defaults)&&(r.attributesBoolean={}),t.defaults&&(r.name="",r.data="",r.attributesJson=""),null!=e.name&&e.hasOwnProperty("name")&&(r.name=e.name),e.children&&e.children.length){r.children=[];for(let n=0;n<e.children.length;++n)r.children[n]=E.Element.toObject(e.children[n],t)}if(null!=e.data&&e.hasOwnProperty("data")&&(r.data=e.data),e.attributesBoolean&&(n=Object.keys(e.attributesBoolean)).length){r.attributesBoolean={};for(let t=0;t<n.length;++t)r.attributesBoolean[n[t]]=e.attributesBoolean[n[t]]}return null!=e.attributesJson&&e.hasOwnProperty("attributesJson")&&(r.attributesJson=e.attributesJson),r},e.prototype.toJSON=function(){return this.constructor.toObject(this,A.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/Element"},e})();class L{constructor(){this._protobufRoot=e}getDescriptor(e){return new Y(this._protobufRoot[e])}}class Y{constructor(e){this._protobuf=e}compress(e){const t=this._protobuf.verify(e);if(t)throw Error(t);return this._protobuf.encode(this._protobuf.create(e)).finish()}decompress(e){return this._protobuf.toObject(this._protobuf.decode(e),{oneofs:!0})}}const F=function(){this.__data__=[],this.size=0};const z=function(e,t){return e===t||e!=e&&t!=t};const H=function(e,t){for(var n=e.length;n--;)if(z(e[n][0],t))return n;return-1};var K=Array.prototype.splice;const W=function(e){var t=this.__data__,n=H(t,e);return!(n<0)&&(n==t.length-1?t.pop():K.call(t,n,1),--this.size,!0)};const $=function(e){var t=this.__data__,n=H(t,e);return n<0?void 0:t[n][1]};const Q=function(e){return H(this.__data__,e)>-1};const X=function(e,t){var n=this.__data__,r=H(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function Z(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Z.prototype.clear=F,Z.prototype.delete=W,Z.prototype.get=$,Z.prototype.has=Q,Z.prototype.set=X;const ee=Z;const te=function(){this.__data__=new ee,this.size=0};const ne=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n};const re=function(e){return this.__data__.get(e)};const se=function(e){return this.__data__.has(e)};const oe="object"==typeof global&&global&&global.Object===Object&&global;var ie="object"==typeof self&&self&&self.Object===Object&&self;const ae=oe||ie||Function("return this")();const ce=ae.Symbol;var ue=Object.prototype,de=ue.hasOwnProperty,le=ue.toString,pe=ce?ce.toStringTag:void 0;const he=function(e){var t=de.call(e,pe),n=e[pe];try{e[pe]=void 0;var r=!0}catch(e){}var s=le.call(e);return r&&(t?e[pe]=n:delete e[pe]),s};var fe=Object.prototype.toString;const me=function(e){return fe.call(e)};var ye=ce?ce.toStringTag:void 0;const ge=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":ye&&ye in Object(e)?he(e):me(e)};const be=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)};const Oe=function(e){if(!be(e))return!1;var t=ge(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t};const ve=ae["__core-js_shared__"];var we,Ie=(we=/[^.]+$/.exec(ve&&ve.keys&&ve.keys.IE_PROTO||""))?"Symbol(src)_1."+we:"";const _e=function(e){return!!Ie&&Ie in e};var Se=Function.prototype.toString;const Pe=function(e){if(null!=e){try{return Se.call(e)}catch(e){}try{return e+""}catch(e){}}return""};var Ae=/^\[object .+?Constructor\]$/,Te=Function.prototype,ke=Object.prototype,Ce=Te.toString,Ee=ke.hasOwnProperty,je=RegExp("^"+Ce.call(Ee).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const De=function(e){return!(!be(e)||_e(e))&&(Oe(e)?je:Ae).test(Pe(e))};const Re=function(e,t){return null==e?void 0:e[t]};const Me=function(e,t){var n=Re(e,t);return De(n)?n:void 0};const Ne=Me(ae,"Map");const xe=Me(Object,"create");const Ve=function(){this.__data__=xe?xe(null):{},this.size=0};const Be=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t};var Ue=Object.prototype.hasOwnProperty;const Je=function(e){var t=this.__data__;if(xe){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return Ue.call(t,e)?t[e]:void 0};var qe=Object.prototype.hasOwnProperty;const Ge=function(e){var t=this.__data__;return xe?void 0!==t[e]:qe.call(t,e)};const Le=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=xe&&void 0===t?"__lodash_hash_undefined__":t,this};function Ye(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ye.prototype.clear=Ve,Ye.prototype.delete=Be,Ye.prototype.get=Je,Ye.prototype.has=Ge,Ye.prototype.set=Le;const Fe=Ye;const ze=function(){this.size=0,this.__data__={hash:new Fe,map:new(Ne||ee),string:new Fe}};const He=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};const Ke=function(e,t){var n=e.__data__;return He(t)?n["string"==typeof t?"string":"hash"]:n.map};const We=function(e){var t=Ke(this,e).delete(e);return this.size-=t?1:0,t};const $e=function(e){return Ke(this,e).get(e)};const Qe=function(e){return Ke(this,e).has(e)};const Xe=function(e,t){var n=Ke(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function Ze(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ze.prototype.clear=ze,Ze.prototype.delete=We,Ze.prototype.get=$e,Ze.prototype.has=Qe,Ze.prototype.set=Xe;const et=Ze;const tt=function(e,t){var n=this.__data__;if(n instanceof ee){var r=n.__data__;if(!Ne||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new et(r)}return n.set(e,t),this.size=n.size,this};function nt(e){var t=this.__data__=new ee(e);this.size=t.size}nt.prototype.clear=te,nt.prototype.delete=ne,nt.prototype.get=re,nt.prototype.has=se,nt.prototype.set=tt;const rt=nt;const st=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e};const ot=function(){try{var e=Me(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();const it=function(e,t,n){"__proto__"==t&&ot?ot(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n};var at=Object.prototype.hasOwnProperty;const ct=function(e,t,n){var r=e[t];at.call(e,t)&&z(r,n)&&(void 0!==n||t in e)||it(e,t,n)};const ut=function(e,t,n,r){var s=!n;n||(n={});for(var o=-1,i=t.length;++o<i;){var a=t[o],c=r?r(n[a],e[a],a,n,e):void 0;void 0===c&&(c=e[a]),s?it(n,a,c):ct(n,a,c)}return n};const dt=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r};const lt=function(e){return null!=e&&"object"==typeof e};const pt=function(e){return lt(e)&&"[object Arguments]"==ge(e)};var ht=Object.prototype,ft=ht.hasOwnProperty,mt=ht.propertyIsEnumerable;const yt=pt(function(){return arguments}())?pt:function(e){return lt(e)&&ft.call(e,"callee")&&!mt.call(e,"callee")};const gt=Array.isArray;const bt=function(){return!1};var Ot="object"==typeof exports&&exports&&!exports.nodeType&&exports,vt=Ot&&"object"==typeof module&&module&&!module.nodeType&&module,wt=vt&&vt.exports===Ot?ae.Buffer:void 0;const It=(wt?wt.isBuffer:void 0)||bt;var _t=/^(?:0|[1-9]\d*)$/;const St=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&_t.test(e))&&e>-1&&e%1==0&&e<t};const Pt=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991};var At={};At["[object Float32Array]"]=At["[object Float64Array]"]=At["[object Int8Array]"]=At["[object Int16Array]"]=At["[object Int32Array]"]=At["[object Uint8Array]"]=At["[object Uint8ClampedArray]"]=At["[object Uint16Array]"]=At["[object Uint32Array]"]=!0,At["[object Arguments]"]=At["[object Array]"]=At["[object ArrayBuffer]"]=At["[object Boolean]"]=At["[object DataView]"]=At["[object Date]"]=At["[object Error]"]=At["[object Function]"]=At["[object Map]"]=At["[object Number]"]=At["[object Object]"]=At["[object RegExp]"]=At["[object Set]"]=At["[object String]"]=At["[object WeakMap]"]=!1;const Tt=function(e){return lt(e)&&Pt(e.length)&&!!At[ge(e)]};const kt=function(e){return function(t){return e(t)}};var Ct="object"==typeof exports&&exports&&!exports.nodeType&&exports,Et=Ct&&"object"==typeof module&&module&&!module.nodeType&&module,jt=Et&&Et.exports===Ct&&oe.process;const Dt=function(){try{var e=Et&&Et.require&&Et.require("util").types;return e||jt&&jt.binding&&jt.binding("util")}catch(e){}}();var Rt=Dt&&Dt.isTypedArray;const Mt=Rt?kt(Rt):Tt;var Nt=Object.prototype.hasOwnProperty;const xt=function(e,t){var n=gt(e),r=!n&&yt(e),s=!n&&!r&&It(e),o=!n&&!r&&!s&&Mt(e),i=n||r||s||o,a=i?dt(e.length,String):[],c=a.length;for(var u in e)!t&&!Nt.call(e,u)||i&&("length"==u||s&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||St(u,c))||a.push(u);return a};var Vt=Object.prototype;const Bt=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Vt)};const Ut=function(e,t){return function(n){return e(t(n))}};const Jt=Ut(Object.keys,Object);var qt=Object.prototype.hasOwnProperty;const Gt=function(e){if(!Bt(e))return Jt(e);var t=[];for(var n in Object(e))qt.call(e,n)&&"constructor"!=n&&t.push(n);return t};const Lt=function(e){return null!=e&&Pt(e.length)&&!Oe(e)};const Yt=function(e){return Lt(e)?xt(e):Gt(e)};const Ft=function(e,t){return e&&ut(t,Yt(t),e)};const zt=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t};var Ht=Object.prototype.hasOwnProperty;const Kt=function(e){if(!be(e))return zt(e);var t=Bt(e),n=[];for(var r in e)("constructor"!=r||!t&&Ht.call(e,r))&&n.push(r);return n};const Wt=function(e){return Lt(e)?xt(e,!0):Kt(e)};const $t=function(e,t){return e&&ut(t,Wt(t),e)};var Qt="object"==typeof exports&&exports&&!exports.nodeType&&exports,Xt=Qt&&"object"==typeof module&&module&&!module.nodeType&&module,Zt=Xt&&Xt.exports===Qt?ae.Buffer:void 0,en=Zt?Zt.allocUnsafe:void 0;const tn=function(e,t){if(t)return e.slice();var n=e.length,r=en?en(n):new e.constructor(n);return e.copy(r),r};const nn=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t};const rn=function(e,t){for(var n=-1,r=null==e?0:e.length,s=0,o=[];++n<r;){var i=e[n];t(i,n,e)&&(o[s++]=i)}return o};const sn=function(){return[]};var on=Object.prototype.propertyIsEnumerable,an=Object.getOwnPropertySymbols;const cn=an?function(e){return null==e?[]:(e=Object(e),rn(an(e),(function(t){return on.call(e,t)})))}:sn;const un=function(e,t){return ut(e,cn(e),t)};const dn=function(e,t){for(var n=-1,r=t.length,s=e.length;++n<r;)e[s+n]=t[n];return e};const ln=Ut(Object.getPrototypeOf,Object);const pn=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)dn(t,cn(e)),e=ln(e);return t}:sn;const hn=function(e,t){return ut(e,pn(e),t)};const fn=function(e,t,n){var r=t(e);return gt(e)?r:dn(r,n(e))};const mn=function(e){return fn(e,Yt,cn)};const yn=function(e){return fn(e,Wt,pn)};const gn=Me(ae,"DataView");const bn=Me(ae,"Promise");const On=Me(ae,"Set");const vn=Me(ae,"WeakMap");var wn="[object Map]",In="[object Promise]",_n="[object Set]",Sn="[object WeakMap]",Pn="[object DataView]",An=Pe(gn),Tn=Pe(Ne),kn=Pe(bn),Cn=Pe(On),En=Pe(vn),jn=ge;(gn&&jn(new gn(new ArrayBuffer(1)))!=Pn||Ne&&jn(new Ne)!=wn||bn&&jn(bn.resolve())!=In||On&&jn(new On)!=_n||vn&&jn(new vn)!=Sn)&&(jn=function(e){var t=ge(e),n="[object Object]"==t?e.constructor:void 0,r=n?Pe(n):"";if(r)switch(r){case An:return Pn;case Tn:return wn;case kn:return In;case Cn:return _n;case En:return Sn}return t});const Dn=jn;var Rn=Object.prototype.hasOwnProperty;const Mn=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Rn.call(e,"index")&&(n.index=e.index,n.input=e.input),n};const Nn=ae.Uint8Array;const xn=function(e){var t=new e.constructor(e.byteLength);return new Nn(t).set(new Nn(e)),t};const Vn=function(e,t){var n=t?xn(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)};var Bn=/\w*$/;const Un=function(e){var t=new e.constructor(e.source,Bn.exec(e));return t.lastIndex=e.lastIndex,t};var Jn=ce?ce.prototype:void 0,qn=Jn?Jn.valueOf:void 0;const Gn=function(e){return qn?Object(qn.call(e)):{}};const Ln=function(e,t){var n=t?xn(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)};const Yn=function(e,t,n){var r=e.constructor;switch(t){case"[object ArrayBuffer]":return xn(e);case"[object Boolean]":case"[object Date]":return new r(+e);case"[object DataView]":return Vn(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return Ln(e,n);case"[object Map]":case"[object Set]":return new r;case"[object Number]":case"[object String]":return new r(e);case"[object RegExp]":return Un(e);case"[object Symbol]":return Gn(e)}};var Fn=Object.create;const zn=function(){function e(){}return function(t){if(!be(t))return{};if(Fn)return Fn(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();const Hn=function(e){return"function"!=typeof e.constructor||Bt(e)?{}:zn(ln(e))};const Kn=function(e){return lt(e)&&"[object Map]"==Dn(e)};var Wn=Dt&&Dt.isMap;const $n=Wn?kt(Wn):Kn;const Qn=function(e){return lt(e)&&"[object Set]"==Dn(e)};var Xn=Dt&&Dt.isSet;const Zn=Xn?kt(Xn):Qn;var er="[object Arguments]",tr="[object Function]",nr="[object Object]",rr={};rr[er]=rr["[object Array]"]=rr["[object ArrayBuffer]"]=rr["[object DataView]"]=rr["[object Boolean]"]=rr["[object Date]"]=rr["[object Float32Array]"]=rr["[object Float64Array]"]=rr["[object Int8Array]"]=rr["[object Int16Array]"]=rr["[object Int32Array]"]=rr["[object Map]"]=rr["[object Number]"]=rr[nr]=rr["[object RegExp]"]=rr["[object Set]"]=rr["[object String]"]=rr["[object Symbol]"]=rr["[object Uint8Array]"]=rr["[object Uint8ClampedArray]"]=rr["[object Uint16Array]"]=rr["[object Uint32Array]"]=!0,rr["[object Error]"]=rr[tr]=rr["[object WeakMap]"]=!1;const sr=function e(t,n,r,s,o,i){var a,c=1&n,u=2&n,d=4&n;if(r&&(a=o?r(t,s,o,i):r(t)),void 0!==a)return a;if(!be(t))return t;var l=gt(t);if(l){if(a=Mn(t),!c)return nn(t,a)}else{var p=Dn(t),h=p==tr||"[object GeneratorFunction]"==p;if(It(t))return tn(t,c);if(p==nr||p==er||h&&!o){if(a=u||h?{}:Hn(t),!c)return u?hn(t,$t(a,t)):un(t,Ft(a,t))}else{if(!rr[p])return o?t:{};a=Yn(t,p,c)}}i||(i=new rt);var f=i.get(t);if(f)return f;i.set(t,a),Zn(t)?t.forEach((function(s){a.add(e(s,n,r,s,t,i))})):$n(t)&&t.forEach((function(s,o){a.set(o,e(s,n,r,o,t,i))}));var m=l?void 0:(d?u?yn:mn:u?Wt:Yt)(t);return st(m||t,(function(s,o){m&&(s=t[o=s]),ct(a,o,e(s,n,r,o,t,i))})),a};const or=function(e){return sr(e,5)};const ir=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this};const ar=function(e){return this.__data__.has(e)};function cr(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new et;++t<n;)this.add(e[t])}cr.prototype.add=cr.prototype.push=ir,cr.prototype.has=ar;const ur=cr;const dr=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1};const lr=function(e,t){return e.has(t)};const pr=function(e,t,n,r,s,o){var i=1&n,a=e.length,c=t.length;if(a!=c&&!(i&&c>a))return!1;var u=o.get(e),d=o.get(t);if(u&&d)return u==t&&d==e;var l=-1,p=!0,h=2&n?new ur:void 0;for(o.set(e,t),o.set(t,e);++l<a;){var f=e[l],m=t[l];if(r)var y=i?r(m,f,l,t,e,o):r(f,m,l,e,t,o);if(void 0!==y){if(y)continue;p=!1;break}if(h){if(!dr(t,(function(e,t){if(!lr(h,t)&&(f===e||s(f,e,n,r,o)))return h.push(t)}))){p=!1;break}}else if(f!==m&&!s(f,m,n,r,o)){p=!1;break}}return o.delete(e),o.delete(t),p};const hr=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n};const fr=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n};var mr=ce?ce.prototype:void 0,yr=mr?mr.valueOf:void 0;const gr=function(e,t,n,r,s,o,i){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!o(new Nn(e),new Nn(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return z(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var a=hr;case"[object Set]":var c=1&r;if(a||(a=fr),e.size!=t.size&&!c)return!1;var u=i.get(e);if(u)return u==t;r|=2,i.set(e,t);var d=pr(a(e),a(t),r,s,o,i);return i.delete(e),d;case"[object Symbol]":if(yr)return yr.call(e)==yr.call(t)}return!1};var br=Object.prototype.hasOwnProperty;const Or=function(e,t,n,r,s,o){var i=1&n,a=mn(e),c=a.length;if(c!=mn(t).length&&!i)return!1;for(var u=c;u--;){var d=a[u];if(!(i?d in t:br.call(t,d)))return!1}var l=o.get(e),p=o.get(t);if(l&&p)return l==t&&p==e;var h=!0;o.set(e,t),o.set(t,e);for(var f=i;++u<c;){var m=e[d=a[u]],y=t[d];if(r)var g=i?r(y,m,d,t,e,o):r(m,y,d,e,t,o);if(!(void 0===g?m===y||s(m,y,n,r,o):g)){h=!1;break}f||(f="constructor"==d)}if(h&&!f){var b=e.constructor,O=t.constructor;b==O||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof O&&O instanceof O||(h=!1)}return o.delete(e),o.delete(t),h};var vr="[object Arguments]",wr="[object Array]",Ir="[object Object]",_r=Object.prototype.hasOwnProperty;const Sr=function(e,t,n,r,s,o){var i=gt(e),a=gt(t),c=i?wr:Dn(e),u=a?wr:Dn(t),d=(c=c==vr?Ir:c)==Ir,l=(u=u==vr?Ir:u)==Ir,p=c==u;if(p&&It(e)){if(!It(t))return!1;i=!0,d=!1}if(p&&!d)return o||(o=new rt),i||Mt(e)?pr(e,t,n,r,s,o):gr(e,t,c,n,r,s,o);if(!(1&n)){var h=d&&_r.call(e,"__wrapped__"),f=l&&_r.call(t,"__wrapped__");if(h||f){var m=h?e.value():e,y=f?t.value():t;return o||(o=new rt),s(m,y,n,r,o)}}return!!p&&(o||(o=new rt),Or(e,t,n,r,s,o))};const Pr=function e(t,n,r,s,o){return t===n||(null==t||null==n||!lt(t)&&!lt(n)?t!=t&&n!=n:Sr(t,n,r,s,e,o))};const Ar=function(e,t){return Pr(e,t)};function Tr(e,t){const n=or(e);return n.path[n.path.length-1]+=t,n}function kr(e,t){return e.root===t.root&&Ar(e.path,t.path)}function Cr(e){jr(e,(e=>("main"==e.root?(e.rootMain=!0,delete e.root):"$graveyard"==e.root&&(e.rootGraveyard=!0,delete e.root),e)))}function Er(e){jr(e,(e=>(e.rootMain?(e.root="main",delete e.rootMain):e.rootGraveyard&&(e.root="$graveyard",delete e.rootGraveyard),e)))}function jr(e,t){for(const n in e){const r=e[n];"nodes"!==n&&be(r)&&(r.path&&(r.root||r.rootMain||r.rootGraveyard)?e[n]=t(r):jr(r,t))}return e}class Dr{constructor(e,t,n){this._id=e,this._operationName=t,this._protobufDescriptor=n}compress(e,t){const n=t.shift();return Cr(n),e.buffers.push(this._protobufDescriptor.compress(n)),e.types.push(this._id),!0}decompress(e,t){t.types.shift();const n=this._protobufDescriptor.decompress(t.buffers.shift());Er(n),n.__className=this._operationName,e.push(n)}}class Rr extends Dr{compress(e,t){const n=t.shift();return this._serializeOneOf("oldValue",n),this._serializeOneOf("newValue",n),Cr(n),e.buffers.push(this._protobufDescriptor.compress(n)),e.types.push(this._id),!0}decompress(e,t){const{types:n,buffers:r}=t,s=this._protobufDescriptor.decompress(r.shift());n.shift(),this._deserializeOneOf("oldValue",s),this._deserializeOneOf("newValue",s),Er(s),s.__className=this._operationName,e.push(s)}_serializeOneOf(e,t){const n=t[e];"boolean"==typeof n?t[`${e}Boolean`]=n:t[`${e}Json`]=JSON.stringify(n)}_deserializeOneOf(e,t){const n=`${e}Json`;t[n]?(t[e]=JSON.parse(t[n]),delete t[n]):(t[e]=t[`${e}Boolean`],delete t[`${e}Boolean`])}}class Mr extends Dr{compress(e,t){const n=t.shift();return this._serializeNodesAttributes(n.nodes),Cr(n),e.buffers.push(this._protobufDescriptor.compress(n)),e.types.push(this._id),!0}decompress(e,t){const{types:n,buffers:r}=t,s=this._protobufDescriptor.decompress(r.shift());n.shift(),s.nodes||(s.nodes=[]),this._deserializeNodesAttributes(s.nodes),Er(s),s.__className=this._operationName,e.push(s)}_serializeNodesAttributes(e){for(const t of e){if(t.attributes){const e=t.attributes;this._areValuesBoolean(e)?t.attributesBoolean=e:t.attributesJson=JSON.stringify(e)}t.children&&this._serializeNodesAttributes(t.children)}}_deserializeNodesAttributes(e){for(const t of e)(t.attributesBoolean||t.attributesJson)&&(t.attributesBoolean?(t.attributes=t.attributesBoolean,delete t.attributesBoolean):(t.attributes=JSON.parse(t.attributesJson),delete t.attributesJson)),t.children&&this._deserializeNodesAttributes(t.children)}_areValuesBoolean(e){return Object.keys(e).every((t=>"boolean"==typeof e[t]))}}class Nr extends Dr{decompress(e,t){super.decompress(e,t);const n=e[e.length-1];n.oldRange||(n.oldRange=null),n.newRange||(n.newRange=null)}}class xr extends Dr{compress(e,t){return t.shift(),e.types.push(this._id),!0}decompress(e,t){t.types.shift(),e.push({__className:this._operationName})}}class Vr extends Nr{constructor(e,t,n,r){super(e,t,n),this._omittedNamespace=r+":"}compress(e,t){return!("MarkerOperation"!=t[0].__className||!t[0].name.startsWith(this._omittedNamespace))&&(t[0].name=t[0].name.replace(new RegExp("^"+this._omittedNamespace),""),super.compress(e,t),!0)}decompress(e,t){super.decompress(e,t);const n=e[e.length-1];n.name=this._omittedNamespace+n.name}}class Br{constructor(e,t){this._id=e,this._context=t}compress(e,t){let n;for(;t.length>1&&this._compareOperations(t[0],t[1]);)n?(n=this._combineNext(t.shift(),n),e.types.push(0)):(n=or(t.shift()),e.types.push(this._id));return!!n&&(n=this._combineNext(t.shift(),n),e.types.push(0),e.buffers.push(this._compressSingleOperation(n)),!0)}decompress(e,t){const n=this._decompressSingleOperation(t);for(;0==t.types[0];)t.types.shift(),e.push(this._splitCurrent(n));e.push(n)}}class Ur extends Br{_combineNext(e,t){return t.nodes[0].data+=e.nodes[0].data,t}_splitCurrent(e){const t=or(e),n=t.nodes[0],r=e.nodes[0],s=r.data[Symbol.iterator]().next().value,o=s.length;return n.data=s,r.data=r.data.substr(o),e.position=Tr(e.position,o),t}_compareOperations(e,t){if(this._checkOperation(e)&&this._checkOperation(t)){const n=e.nodes[0].data.length,r=kr(Tr(e.position,n),t.position),s=e.nodes[0],o=t.nodes[0];return r&&this._compareAttributes(s,o)}return!1}_compressSingleOperation(e){const t={types:[],buffers:[],baseVersion:0};return this._context._getCompressorByName("InsertOperation").compress(t,[e]),t.buffers[0]}_decompressSingleOperation(e){const t=[];return this._context._getCompressorByName("InsertOperation").decompress(t,e),t[0]}_checkOperation(e){return"InsertOperation"==e.__className&&1==e.nodes.length&&e.nodes[0].data&&!e.wasUndone&&1==Array.from(e.nodes[0].data).length}_compareAttributes(e,t){const n=Object.keys(e.attributes||{}),r=Object.keys(t.attributes||{});return n.length===r.length&&n.every((n=>t.attributes[n]&&t.attributes[n]===e.attributes[n]))}}class Jr extends Br{_combineNext(e,t){return t.howMany++,t.sourcePosition=or(e.sourcePosition),t}_splitCurrent(e){const t=or(e);return e.howMany--,t.howMany=1,t.sourcePosition=Tr(t.sourcePosition,e.howMany),t}_compareOperations(e,t){return!(!this._checkOperation(e)||!this._checkOperation(t))&&(kr(Tr(e.sourcePosition,-1),t.sourcePosition)&&kr(e.targetPosition,t.targetPosition))}_compressSingleOperation(e){const t={types:[],buffers:[],baseVersion:0};return this._context._getCompressorByName("MoveOperation").compress(t,[e]),t.buffers[0]}_decompressSingleOperation(e){const t=[];return this._context._getCompressorByName("MoveOperation").decompress(t,e),t[0]}_checkOperation(e){return"MoveOperation"==e.__className&&"$graveyard"==e.targetPosition.root&&1==e.howMany&&!e.wasUndone}}class qr extends Br{_combineNext(e,t){return t.howMany++,t}_splitCurrent(e){const t=or(e);return t.howMany=1,e.howMany--,t}_compareOperations(e,t){return!(!this._checkOperation(e)||!this._checkOperation(t))&&(kr(e.sourcePosition,t.sourcePosition)&&kr(e.targetPosition,t.targetPosition))}_compressSingleOperation(e){const t={types:[],buffers:[],baseVersion:0};return this._context._getCompressorByName("MoveOperation").compress(t,[e]),t.buffers[0]}_decompressSingleOperation(e){const t=[];return this._context._getCompressorByName("MoveOperation").decompress(t,e),t[0]}_checkOperation(e){return"MoveOperation"==e.__className&&"$graveyard"==e.targetPosition.root&&1==e.howMany&&!e.wasUndone}}class Gr extends Br{compress(e,t){if(!this._compareOperations(t[0],t[1]))return!1;const n=t.shift();return n.oldRange=null,n.newRange&&kr(n.newRange.start,n.newRange.end)&&(n.newRange.end=null),t.shift(),e.types.push(this._id),e.types.push(0),e.buffers.push(this._compressSingleOperation(n)),!0}decompress(e,t){const n=this._decompressSingleOperation(t);n.newRange&&!n.newRange.end&&(n.newRange.end=or(n.newRange.start));const r=or(n);r.newRange&&(r.newRange.start.stickiness="toNone",r.newRange.end=or(r.newRange.start)),r.name="user:position:"+r.name.split(":")[2],t.types.shift(),e.push(n),e.push(r)}_compressSingleOperation(e){const t={types:[],buffers:[],baseVersion:0};return this._context._getCompressorByName("MarkerOperation").compress(t,[e]),t.buffers[0]}_decompressSingleOperation(e){const t=[];return this._context._getCompressorByName("MarkerOperation").decompress(t,e),t[0]}_compareOperations(e,t){return!(!e||!t)&&("MarkerOperation"==e.__className&&"MarkerOperation"==t.__className&&!(!e.name.startsWith("user:")||!t.name.startsWith("user:")||e.name==t.name))}}class Lr{constructor(){this._compressorById=new Map,this._compressorByName=new Map,this._protobufFactory=new L;const e=this._protobufFactory.getDescriptor("MarkerOperation");this._registerCompressor(1,"NoOperation",new xr(1,"NoOperation",void 0)),this._registerOperationCompressor(10,"AttributeOperation",Rr),this._registerOperationCompressor(11,"InsertOperation",Mr),this._registerOperationCompressor(12,"MarkerOperation",Nr),this._registerOperationCompressor(13,"MergeOperation",Dr),this._registerOperationCompressor(14,"MoveOperation",Dr),this._registerOperationCompressor(15,"RenameOperation",Dr),this._registerOperationCompressor(16,"RootAttributeOperation",Rr),this._registerOperationCompressor(17,"SplitOperation",Dr),this._registerCompressor(18,"CommentMarkerOperation",new Vr(18,"MarkerOperation",e,"comment")),this._registerCompressor(19,"SuggestionMarkerOperation",new Vr(19,"MarkerOperation",e,"suggestion")),this._registerOperationCompressor(20,"RootOperation",Dr),this._registerActionCompressor(100,"TypingAction",Ur),this._registerActionCompressor(101,"DeletingAction",Jr),this._registerActionCompressor(102,"ForwardDeletingAction",qr),this._registerActionCompressor(103,"UserSelectionAction",Gr)}compress(e){if(!e||!e[0])throw new n.CKEditorError("no-operations-provided",this);const t={types:[],buffers:[],baseVersion:e[0].baseVersion};for(;e.length;)this._getCompressorByName("UserSelectionAction").compress(t,e)||this._getCompressorByName("TypingAction").compress(t,e)||this._getCompressorByName("DeletingAction").compress(t,e)||this._getCompressorByName("ForwardDeletingAction").compress(t,e)||this._getCompressorByName("CommentMarkerOperation").compress(t,e)||this._getCompressorByName("SuggestionMarkerOperation").compress(t,e)||this._getCompressorByName(e[0].__className).compress(t,e);return t}decompress(e){const t=[];for(;e.types.length;){this._compressorById.get(e.types[0]).decompress(t,e)}return t.forEach(((t,n)=>t.baseVersion=e.baseVersion+n)),t}_getCompressorByName(e){return this._compressorByName.get(e)}_registerOperationCompressor(e,t,n){const r=new n(e,t,this._protobufFactory.getDescriptor(t));this._registerCompressor(e,t,r)}_registerActionCompressor(e,t,n){const r=new n(e,this);this._registerCompressor(e,t,r)}_registerCompressor(e,t,n){this._compressorById.set(e,n),this._compressorByName.set(t,n)}}var Yr=__webpack_require__(1987);const Fr=Kr;!function(e,t){const n=Kr,r=e();for(;;)try{if(569094===-parseInt(n(415))/1*(parseInt(n(199))/2)+parseInt(n(428))/3+parseInt(n(275))/4*(parseInt(n(180))/5)+-parseInt(n(225))/6*(parseInt(n(280))/7)+-parseInt(n(282))/8+-parseInt(n(381))/9*(parseInt(n(293))/10)+parseInt(n(318))/11)break;r.push(r.shift())}catch(e){r.push(r.shift())}}(Zr);let zr=1;class Hr extends t.Plugin{static get[Fr(320)](){return[d,m,I,t.PendingActions,l.Users,r.Notification]}static get[Fr(219)](){return Fr(410)}get[Fr(389)](){const e=Fr;return this[e(290)]+this[e(301)]}get[Fr(290)](){const e=Fr;return this[e(274)][e(321)]-this[e(301)]}get[Fr(238)](){const e=Fr,t=this[e(274)][e(380)]();for(let n=t[e(279)]-1;n>=0;n--){const r=t[n];if(!this[e(388)][e(354)](r))return r[e(326)]+1-this[e(301)]}return 0}constructor(e){const t=Fr;if(super(e),this[t(301)]=0,this[t(395)]=null,this[t(274)]=new s.History,this[t(333)][t(195)][t(324)](t(422),{}),this[t(221)]=this[t(333)][t(195)][t(412)](t(335)),!this[t(221)])throw new n.CKEditorError(t(383),this);const r=e[t(195)][t(412)](t(338))||n.version;this[t(377)]=new(Hr[t(401)])(r,this[t(221)]),this[t(267)]=this[t(333)][t(287)][t(357)],this[t(385)]=new Lr,this[t(187)]=[],this[t(403)]=new WeakSet,this[t(227)]=new Set,this[t(368)](t(376),!1),this[t(368)](t(362),!1),this[t(189)]=null,this[t(288)]=!1,this[t(375)]=null,this[t(203)]=300,this[t(390)]=this[t(203)],this[t(314)]=null,this[t(388)]=new WeakSet,this[t(402)]=new Xr(this[t(388)])}[Fr(429)](){const e=Fr,t=this[e(333)],n=t[e(379)][e(412)](l.Users),r=t[e(379)][e(412)](d);this[e(426)](n,e(218),((t,r)=>{const s=e,o=r[0];o[s(246)]&&(t[s(392)]=n[s(237)](o[s(246)]),t[s(363)]()),null===o[s(246)]&&(t[s(392)]=null,t[s(363)]())}),{priority:e(332)}),this[e(426)](t[e(287)][e(357)][e(409)],e(286),((t,n)=>{const r=e;n[r(416)]&&this[r(342)]()})),this[e(426)](t[e(196)][e(202)],e(304),(()=>{this[e(342)]()})),this[e(234)](),t[e(287)].on(e(273),((t,n)=>{const r=e,s=n[0];s[r(204)]&&(this[r(356)](s),this[r(358)]()&&this[r(359)]())})),this[e(215)](),this[e(284)](e(292)).to(r,e(305),this,e(362),((t,n)=>e(378)===t&&!n)),this.on(e(413),(()=>{const n=e;this[n(292)]?t[n(256)](n(223)):t[n(186)](n(223))})),this[e(292)]?t[e(256)](e(223)):t[e(186)](e(223)),this[e(368)](e(360),!1)}async[Fr(207)](){const e=Fr,t=this[e(333)][e(379)][e(412)](m),n=this[e(333)][e(379)][e(412)](d);try{this[e(376)]=!0,t[e(419)](this[e(221)]);const r=await this[e(377)][e(207)](n[e(278)],this[e(238)]);await this[e(257)](r)&&(this[e(376)]=!1,this[e(229)]());const s=await this[e(377)][e(193)]();t[e(281)](this[e(221)],s),this[e(323)](),this[e(360)]=!0}catch(t){if(function(t){const n=e;return n(230)===t[n(295)]}(t)&&this[e(395)])await this[e(311)]();else if(function(t){const n=e;return n(306)===t[n(295)]}(t)){const t=P(this[e(333)][e(432)],e(328));this[e(317)](t)}else{if(!(t instanceof $r))throw t;this[e(317)]()}}}[Fr(259)](){const e=Fr,t=this[e(333)][e(379)][e(412)](d),n=this[e(333)][e(379)][e(412)](m);this[e(333)][e(186)](e(253)),n[e(343)][e(354)](this[e(221)])&&n[e(419)](this[e(221)]),t[e(396)](this),this[e(185)](),super[e(259)]()}async[Fr(257)](e){const t=Fr;if(this[t(395)]!==e[t(395)]&&this[t(314)]!==e[t(307)])throw new $r;return this[t(395)]=e[t(395)],this[t(313)]([],{...e,wereChangesApplied:!1,data:e[t(297)]},t(207))}async[Fr(190)](e,t=!1){const n=Fr,{connection:r}=this[n(333)][n(379)][n(412)](d);Hr[n(401)][n(193)](r,this[n(221)])[n(260)]((e=>this[n(348)](e)))[n(198)]((e=>{const t=n;this[t(213)](t(425),e)})),this[n(426)](this[n(377)],n(212),this[n(337)][n(284)](this)),this[n(426)](this[n(377)],n(277),((e,t)=>{const r=n;this[r(213)](r(336),t)})),this[n(426)](this[n(377)],n(411),(()=>{this[n(360)]=!1}));const s=this[n(402)][n(406)](e);this[n(376)]=!0;const o=await this[n(377)][n(400)](r,this[n(340)](e),s);if(this[n(395)]=o[n(395)],t){if(!o[n(296)])return void this[n(317)]();this[n(376)]=!1,this[n(229)](),this[n(274)][n(243)](),this[n(301)]=o[n(312)],this[n(274)][n(321)]=this[n(301)],await this[n(313)](e,o,n(271))}else await this[n(327)](o,e);this[n(323)](),this[n(360)]=!0}[Fr(323)](){const e=Fr,t=this[e(333)][e(379)][e(412)](m),n=this[e(333)][e(379)][e(412)](I),r=t[e(343)][e(412)](this[e(221)]);r&&r[e(279)]>1?n[e(262)]():this[e(426)](t,e(208)+this[e(221)],(()=>{const r=e;2===t[r(343)][r(412)](this[r(221)])[r(279)]&&n[r(262)]()}))}async[Fr(337)](e,t,n,r){const s=Fr;if(!this[s(376)]&&this[s(267)][s(321)]==t){const e=this[s(399)](n,r);await this[s(264)](e),this[s(224)](e,t,n[s(307)])||this[s(213)](s(387))}}async[Fr(311)](){const e=Fr;this[e(185)]();const{locale:t}=this[e(333)];let n;try{n=await this[e(377)][e(248)]()}catch(n){const r=P(t,e(270));return void this[e(317)](r)}const r=n[e(431)]||n[e(316)];if(this[e(314)]===r[e(307)])await this[e(190)](this[e(333)][e(287)][e(357)][e(232)][e(380)](),!0);else{const n=P(t,e(374));this[e(317)](n)}}[Fr(185)](){const e=Fr;this[e(377)][e(291)](),this[e(187)]=[],clearTimeout(this[e(375)]),this[e(217)](this[e(377)])}[Fr(348)](e){const t=Fr,n=this[t(333)][t(379)][t(412)](m);this[t(426)](n,t(208)+this[t(221)],((e,{session:r})=>{const s=t;if(r.id===n[s(329)]){e[s(420)]();const t=this[s(333)][s(379)][s(354)](s(265))&&this[s(333)][s(379)][s(412)](s(265));let n=r[s(407)];t&&t[s(309)]&&(n=n[s(423)]((e=>s(294)!==e))),this[s(333)][s(379)][s(412)](s(299))[s(194)](n,this[s(221)])}})),n[t(281)](this[t(221)],e)}[Fr(234)](){const e=Fr,t=this[e(333)][e(297)][e(368)];this[e(333)][e(297)][e(368)]=(...r)=>{const s=e;if(!r[r[s(279)]-1][s(414)])throw new n.CKEditorError(s(258),this);t[s(192)](this[s(333)][s(297)],r)}}[Fr(215)](){const e=Fr;this[e(333)][e(297)].on(e(429),((t,[r])=>{const o=e;if(this[o(267)][o(321)])throw new n.CKEditorError(o(191),this);t[o(363)](),this[o(364)]();const i=this[o(333)][o(195)][o(412)](o(408)),a=this[o(214)](r,i);0==a[o(279)]&&a[o(373)](new s.NoOperation(0)),t[o(392)]=this[o(190)](a)[o(260)]((()=>{const e=o;this[e(333)][e(379)][e(412)](d)[e(240)](this),this[e(333)][e(297)][e(322)](e(266))}))[o(198)]((e=>this[o(213)](o(345),e)))[o(367)]((()=>this[o(229)]()))}),{priority:e(332)}),this[e(333)].on(e(235),(async(t,[n,r])=>{const s=e;t[s(363)]();const o=this[s(333)][s(287)][s(357)][s(417)](n);if(!this[s(227)][s(354)](n)){const e=r&&r[s(297)]?r[s(297)]:"",t=r&&r[s(176)]?r[s(176)]:{};await this[s(308)](n,e,t)}this[s(333)][s(287)][s(272)]({isUndoable:!1},(()=>{const e=s;o[e(205)]=!0,this[e(333)][e(287)][e(357)][e(355)][e(353)](o)}))}),{priority:e(332)})}async[Fr(264)](e){const t=Fr,n=this[t(333)][t(379)][t(412)](l.Users),{connection:r}=this[t(333)][t(379)][t(412)](d),s=new Set;for(const r of e){const e=r[t(246)];e&&!n[t(237)](e)&&s[t(209)](e)}if(0===s[t(369)])return;const o=await Yr.User[t(346)](r,Array[t(247)](s));for(const e of o)n[t(237)](e.id)||n[t(351)](e)}[Fr(214)](e,t={}){const r=Fr,o=this[r(333)][r(287)],i=[];let a=0;const c=r(391)==typeof e?{main:e}:e;for(const e of Object[r(242)](c)){if(!this[r(267)][r(418)][r(354)](e))throw new n.CKEditorError(r(370),this);const t=this[r(333)][r(297)][r(177)](c[e]),u=this[r(267)][r(417)](e),d=new s.InsertOperation(o[r(325)](u,0),t,a++);i[r(373)](d);for(const[e,n]of t[r(178)]){const t=o[r(298)](o[r(181)](u,n[r(347)][r(404)][r(216)]()),o[r(181)](u,n[r(344)][r(404)][r(216)]())),c=new s.MarkerOperation(e,null,t,o[r(178)],!0,a++);i[r(373)](c)}}if(t)for(const[e,c]of Object[r(302)](t)){const t=o[r(357)][r(417)](e);if(!t)throw new n.CKEditorError(r(268),null);for(const[e,n]of Object[r(302)](c))if(null!==n){const o=new s.RootAttributeOperation(t,e,null,n,a++);i[r(373)](o)}}return i}async[Fr(308)](e,t,n){const r=Fr;this[r(214)]({[e]:t},{[e]:n})[r(251)](((e,t)=>{const n=r;e[n(326)]=this[n(267)][n(321)]+t,e[n(405)]=!0,this[n(356)](e)})),this[r(359)](),await this[r(349)]()}async[Fr(327)](e,t){const n=Fr;let r;this[n(301)]=e[n(312)];const s=e[n(296)]&&!e[n(236)],o=s?0:e[n(297)][n(326)];if(t[n(251)]((t=>{const r=n;t[r(405)]=!0,t[r(226)]=e[r(206)],t[r(246)]=null})),s)r=t,this[n(220)](r,s);else{if(e[n(236)]){const t=this[n(214)](e[n(236)]);this[n(267)][n(232)][n(321)]=-t[n(279)],t[n(251)]((r=>{const s=n;r[s(326)]-=t[s(279)],r[s(226)]=e[s(206)],r[s(405)]=!0,r[s(246)]=null})),this[n(220)](t,!0),this[n(274)][n(321)]=-t[n(279)]+this[n(301)],this[n(200)](t)}this[n(267)][n(232)][n(321)]=o,r=this[n(399)](e[n(297)],e[n(182)]),await this[n(264)](r),this[n(220)](r,s)}e[n(307)]&&(this[n(402)][n(421)](r,e[n(307)]),this[n(314)]=e[n(307)]),this[n(274)][n(321)]=o+this[n(301)],this[n(200)](r),t[n(423)]((e=>{const t=n,r=this[t(269)](e);return r&&!this[t(227)][t(354)](r)}))[n(251)](((e,t)=>{const r=n;e[r(326)]=this[r(267)][r(321)]+t,this[r(356)](e)})),this[n(358)]()?(this[n(390)]=0,this[n(359)](!0),await this[n(349)]()):(this[n(376)]=!1,this[n(229)]())}[Fr(213)](e,t){const r=Fr;throw this[r(376)]=!0,t&&console[r(277)](t),new n.CKEditorError(e,this[r(333)])}[Fr(356)](e){const t=Fr;this[t(403)][t(354)](e)||(this[t(403)][t(209)](e),this[t(187)][t(373)](e),this[t(189)]||t(371)==e[t(239)]&&!e[t(393)]||this[t(364)]())}[Fr(359)](e=!1){const t=Fr;!e&&this[t(376)]||(this[t(376)]=!0,clearTimeout(this[t(375)]),this[t(375)]=setTimeout((()=>{const e=t;this[e(397)]()[e(260)]((t=>{const n=e;t&&(this[n(229)](),this[n(376)]=!1)}))[e(198)]((t=>{const n=e;if(this[n(229)](),this[n(376)]=!1,!function(e){const t=n;return e[t(222)][t(201)](t(261))||e[t(222)][t(201)](t(398))||e[t(222)][t(201)](t(255))}(t))throw t}))}),this[t(390)]))}[Fr(349)](){return new Promise((e=>{const t=Kr;this.on(t(289),(()=>{e()}))}))}async[Fr(397)](){const e=Fr,t=this[e(333)][e(379)][e(412)](I);if(this[e(210)]()&&(t[e(262)](),this[e(288)]=!1),!this[e(358)]())return!0;const n=[...this[e(187)]];for(const t of n)t[e(285)]=this[e(267)][e(232)][e(384)](t);const r=this[e(402)][e(406)](n),s=zr++,o=this[e(340)](n),i=await this[e(377)][e(254)](o,o[e(326)],r);try{return await this[e(313)](n,i,s)}catch(t){return this[e(213)](e(188),t)}}async[Fr(313)](e,t,n){const r=Fr;if(r(277)in t)throw t[r(277)];let s=!1;if(t[r(296)]){t[r(307)]&&(this[r(314)]=t[r(307)]),this[r(187)]=this[r(187)][r(423)]((t=>!e[r(331)](t)));for(const n of e)n[r(226)]=r(434)in t&&t[r(434)]||void 0;Qr(e,t[r(321)]-e[r(279)]),this[r(200)](e);const n=e[r(423)]((e=>{const t=r;if(!e[t(405)])return!1;const n=this[t(269)](e);return n&&!this[t(227)][t(354)](n)}));Qr(n,this[r(267)][r(321)]),this[r(220)](n),s=!0,this[r(390)]=this[r(203)]}else{const e=this[r(399)](t[r(297)],t[r(182)])[r(423)]((e=>e[r(326)]>=this[r(290)]));e[r(251)]((e=>this[r(245)](e))),this[r(187)]=this[r(187)][r(423)]((e=>!e[r(405)]||!this[r(227)][r(354)](this[r(269)](e)))),this[r(187)][r(279)]&&Qr(this[r(187)],this[r(187)][0][r(326)]),await this[r(264)](e),s=this[r(224)](e,t[r(321)],t[r(307)]),this[r(390)]=Math[r(366)](this[r(390)]/2)}return s?!this[r(358)]()||(this[r(359)](!0),!1):this[r(213)](r(263))}[Fr(224)](e,t,n){const r=Fr;try{const o={document:this[r(267)],useRelations:!1,padWithNoOps:!0},{operationsA:i,operationsB:a,originalOperations:c}=(0,s.transformSets)(e,this[r(187)],o);Qr(i,this[r(267)][r(321)]),Qr(a,t);for(const e of i){const t=c[r(412)](e);e[r(246)]=t?t[r(246)]:null}n&&(this[r(402)][r(421)](e,n),this[r(314)]=n),this[r(187)]=[...a],this[r(220)](i),this[r(200)](e)}catch(e){return console[r(277)](e),!1}return!0}[Fr(220)](e,t=!1){const n=Fr;this[n(333)][n(287)][n(272)]({isUndoable:!1,isLocal:!1},(t=>{const r=n;for(const n of e)this[r(403)][r(209)](n),this[r(245)](n),t[r(361)][r(341)](n),this[r(333)][r(287)][r(273)](n)}))}[Fr(245)](e){const t=Fr,n=this[t(269)](e);n&&this[t(227)][t(209)](n)}[Fr(269)](e){const t=Fr;let n,r;switch(e[t(239)]){case t(211):n=e[t(330)][t(315)];break;case t(371):if(r=e[t(433)],!r)return null;n=r[t(315)];break;case t(339):n=e[t(315)];break;case t(352):n=e[t(427)];break;case t(250):n=e[t(430)][t(315)];break;default:return null}return n[t(303)]}[Fr(200)](e){const t=Fr;e[t(251)]((e=>{const n=t,r=e[n(386)]();r[n(246)]=e[n(246)],r[n(405)]=!!e[n(405)],r[n(226)]=e[n(226)],r[n(326)]+=this[n(301)],e[n(382)]&&this[n(388)][n(209)](r),this[n(274)][n(341)](r)}))}[Fr(317)](e){const t=Fr,n=this[t(333)][t(379)][t(412)](t(231)),r=this[t(333)][t(432)];e||(e=P(r,t(310))),n[t(372)](e,{title:P(r,t(394)),namespace:t(197)}),this[t(362)]=!0,clearTimeout(this[t(375)]),this[t(187)]=[],this[t(333)][t(379)][t(412)](d)[t(259)]()}[Fr(364)](){const e=Fr;this[e(189)]||(this[e(189)]=this[e(333)][e(379)][e(412)](t.PendingActions)[e(209)](P(this[e(333)][e(432)],e(249))))}[Fr(229)](){const e=Fr;this[e(189)]&&(this[e(333)][e(379)][e(412)](t.PendingActions)[e(241)](this[e(189)]),this[e(189)]=null)}[Fr(340)](e){const t=Fr,n=e[t(334)]((e=>e[t(365)]()));return this[t(385)][t(179)](n)}[Fr(399)](e,t){const n=Fr;return this[n(385)][n(183)](e)[n(334)](((e,r)=>{const o=n,i=o(429)==t[r][o(239)];if(o(350)==e[o(276)]){const t=e[o(330)][o(315)];!this[o(267)][o(417)](t)&&(this[o(267)][o(244)](o(252),t)[o(300)]=!1)}const a=s.OperationFactory[o(233)](e,this[o(267)]);return a[o(285)]=e[o(285)],a[o(405)]=i,a[o(246)]=i?null:t[r][o(228)],a[o(382)]=o(424)===t[r][o(239)],a[o(226)]=t[r][o(226)],a}))}[Fr(342)](){const e=Fr;this[e(288)]=!0,this[e(210)]()?this[e(359)]():this[e(288)]=!1}[Fr(210)](){const e=Fr,t=this[e(333)][e(379)][e(412)](m)[e(343)][e(412)](this[e(221)]);return!this[e(333)][e(283)]&&!!t&&t[e(279)]>1&&this[e(288)]}[Fr(358)](){const e=Fr;return this[e(187)][e(279)]>0||this[e(210)]()}}function Kr(e,t){const n=Zr();return(Kr=function(e,t){return n[e-=176]})(e,t)}Hr[Fr(401)]=o.CollaborativeEditingService;const Wr=Hr;class $r extends Error{}function Qr(e,t){const n=Fr;for(const r of e)r[n(326)]=t++}class Xr{constructor(e){const t=Fr;this[t(319)]=e,this[t(184)]=new WeakMap}[Fr(406)](e){const t=Fr;let r=e[t(279)];for(;r--;){const s=e[r];if(!this[t(319)][t(354)](s)){if(!this[t(184)][t(354)](s)){const e=(0,n.uid)()[t(216)](1,18);this[t(184)][t(368)](s,e)}return this[t(184)][t(412)](s)}}}[Fr(421)](e,t){const n=Fr;if(!t)return;let r=e[n(279)];for(;r--;){const s=e[r];this[n(319)][n(354)](s)||this[n(184)][n(368)](s,t)}}}function Zr(){const e=["2681rQaHjJ","register","2638184YRmAhI","isReadOnly","bind","wasUndone","change:range","model","_hasSelectionChanged","change:_isPendingUpdate","_lastServerVersion","disconnect","_isEditingAllowed","130gkswdw","document:write","code","wereChangesApplied","data","createRange","Permissions","_isAttached","_offset","entries","rootName","change:hasDomSelection","state","409","lastOperationId","_loadRoot","isEnabled","The local document and server document differ and merging them can cause unexpected behavior. To not lose your content save it locally and refresh the editor.","_connectAfterSessionHasBeenFlushed","offset","_handleServerResponse","_lastSyncedOperationId","root","lastDocumentSession","_handleReconnectionError","23849672TwFkUP","_ignoredOperations","requires","version","fire","_handleSendingSelectionMarkers","define","createPositionAt","baseVersion","_handleInitialConnectionData","The document cannot be connected back to the server. To not lose your content save it locally and refresh the editor.","mySessionId","position","includes","high","editor","map","collaboration.channelId","realtimecollaborationclient-initservice-internal-error","_handleReceivedOperations","cloudServices.bundleVersion","addRootAttribute","_compressOperations","addOperation","_refreshUserSelectionMarkers","channelSessions","end","realtimecollaborationclient-init-connection-failed","getMany","start","_initSessionsHandling","_waitUntilSynced","InsertOperation","addUser","addRoot","_bufferRootLoad","has","differ","_saveOperationInBuffer","document","_shouldSendUpdate","_sendBufferedOperationsDelayed","_isConnected","batch","_hasSynchronizationProblem","stop","_setPendingAction","toJSON","round","finally","set","size","realtimecollaborationclient-init-non-existent-root","marker","showWarning","push","The last saved version of the document does not match the local version. To not lose your content save it locally and refresh the editor.","_sendBufferedOperationsDelayId","_isPendingUpdate","_service","connected","plugins","getOperations","758547OiTewj","_isDisconnection","collaboration-missing-channelid","isUndoneOperation","_compressor","clone","realtimecollaborationclient-initservice-incorrect-server-operation","_disconnectionOperations","cloudDocumentVersion","_currentBufferDelay","string","return","affectsData","Synchronization issue","sessionId","removeFromReconnectionStack","_sendBufferedOperations","cloud-services-internal-error: Collaborative Editing Service is not connected.","_decompressOperations","connect","CollaborativeEditingService","_operationIdentifier","_knownOperations","path","_isInit","getIdOfTheLastOperation","permissions","rootsAttributes","selection","RealTimeCollaborationClient","disconnected","get","change:_isEditingAllowed","suppressErrorInCollaboration","1FrURXF","directChange","getRoot","roots","unregister","off","setIdForTheLastOperation","collaboration","filter","cs:removeUser","realtimecollaborationclient-init-session-connection-error","listenTo","affectedSelectable","1071849YvnUMZ","init","targetPosition","currentDocumentSession","locale","newRange","lastOperationAcceptedAt","attributes","parse","markers","compress","555eMNJQD","createPositionFromPath","metadata","decompress","_operationToId","_disconnectService","enableReadOnlyMode","_bufferedOperations","realtimecollaborationclient-sendbufferedoperations","_pendingAction","_connectService","realtimecollaborationclient-init-document-already-initialized","apply","getConnectedSessions","setPermissions","config","editing","real-time-collaboration","catch","1599424AcagnW","_updateServerHistory","startsWith","view","_baseBufferDelay","isDocumentOperation","_isLoaded","sessionCreatedAt","reconnect","sessionAdd:","add","_shouldSendSelectionUpdate","insert","operationsReceived","_crash","_getOperationsFromInitData","_setUpDataInit","slice","stopListening","getOperationAuthor","pluginName","_applyOperationsSet","_channelId","message","rtc-offline","_handleExternalOperations","10272OUyDGv","createdAt","_knownRootNames","userId","_clearPendingAction","404","Notification","history","fromJSON","_initThrowingOnDataSet","loadRoot","initData","getUser","lastSyncVersion","type","addToReconnectionStack","remove","keys","reset","createRoot","_addKnownRoot","_authorId","from","getDocumentDetails","PENDING_ACTION_SENDING_DATA","move","forEach","$root","rtc-destroyed","sendOperations","cloud-services-internal-error: Request timeout.","disableReadOnlyMode","_handleReconnectionResponse","realtimecollaborationclient-editor-setdata-and-editor-data-set-are-forbidden-in-real-time-collaboration","destroy","then","cloud-services-internal-error: Not connected.","createUserMarkerOperations","realtimecollaborationclient-handleserverresponse","_fetchMissingUsers","CommentsOnly","ready","_document","multi-root-editor-root-attributes-no-root","_getAffectedRoot","The document details could not be taken during the reconnection. To not lose your content save it locally and refresh the editor.","reconnection: flushed session","enqueueChange","applyOperation","serverHistory","33316vEuRbI","__className","error","connection","length"];return(Zr=function(){return e})()}var es=ns;function ts(){var e=["6mqbhlC","RealTimeCollaborativeEditing","6qGxEJv","904794dENjVn","1354554TiBanE","9464007VhoyMY","36MTDiNK","1115412yWkVUU","requires","pluginName","17934640EMddDS","8443145IEEJYo","1253072BvTXuY"];return(ts=function(){return e})()}function ns(e,t){var n=ts();return(ns=function(e,t){return n[e-=220]})(e,t)}!function(e,t){for(var n=ns,r=e();;)try{if(861101===parseInt(n(230))/1+parseInt(n(229))/2+parseInt(n(226))/3*(parseInt(n(220))/4)+-parseInt(n(224))/5*(parseInt(n(228))/6)+parseInt(n(231))/7+parseInt(n(225))/8*(parseInt(n(232))/9)+-parseInt(n(223))/10)break;r.push(r.shift())}catch(e){r.push(r.shift())}}(ts);class rs extends t.Plugin{static get[es(221)](){return[Wr]}static get[es(222)](){return es(227)}}const ss=cs;function os(){const e=["collaboration.channelId","36dFvFFi","addCommentThread","delete","resolvedAt","getCommentThreads","pluginName","747LEoUzh","commentThreadId","destroy","404","cloud-services-internal-error: Comments Service is not connected.","commentThreadRemoved","plugins","message","reopen","getComment","catch","from","updateCommentThread","commentId","2584560EFHhch","deletedAt","commentRemoved","userId","764iWbilr","code","cloudservicescommentsadapter-service-not-exist","map","cloudservicescommentsadapter-connect-already-connected","2497650rJLxkM","unregister","commentThreadUpdated","size","config","content","4912416VSrISk","addComment","1616WOVqqN","_setUpService","cloud-services-internal-error: Not connected.","permissions","set","removeComment","has","reopenCommentThread","_getService","connect","reconnect","assign","CloudServicesCommentsAdapter","authorId","context","add","disconnect","getMany","116538vzPmFY","addUser","_services","setPermissions","adapter","listenTo","commentUpdated","resolveCommentThread","_fetchMissingUsersForThreads","updateComment","cloudservicescommentsadapter-disconnect-not-exist","off","addToReconnectionStack","getConnectedSessions","init","getUser","keys","CommentsService","commentThreadResolved","_terminateService","remove","removeCommentThread","getCommentThread","commentThreadReopened","startsWith","mySessionId","commentAdded","register","resolve","Permissions","cloud-services-internal-error: Request timeout.","_connectService","resolvedBy","get","CommentsRepository","commentThreadAdded","update","attributes","requires","sessionAdd:","createdAt","2138283MOWkPM","comments","179160JDRRGf"];return(os=function(){return e})()}!function(e,t){const n=cs,r=e();for(;;)try{if(330649===-parseInt(n(157))/1*(-parseInt(n(170))/2)+-parseInt(n(188))/3*(-parseInt(n(133))/4)+-parseInt(n(162))/5+parseInt(n(153))/6+parseInt(n(129))/7+parseInt(n(168))/8+-parseInt(n(139))/9*(parseInt(n(131))/10))break;r.push(r.shift())}catch(e){r.push(r.shift())}}(os);class is extends t.ContextPlugin{static get[ss(126)](){return[d,ss(122),m,l.Users]}static get[ss(138)](){return ss(182)}constructor(e){const t=ss;super(e),this[t(190)]=new Map}async[ss(202)](){const e=ss,n=this[e(184)],r=n[e(145)][e(121)](e(122));if(n[e(145)][e(121)](d)[e(200)](this),r[e(192)]={addCommentThread:async({channelId:t,threadId:n,comments:r,resolvedAt:s,resolvedBy:o,context:i,attributes:a})=>{const c=e,u=await this[c(178)](t)[c(134)]({commentThreadId:n,comments:r[c(160)]((e=>function(e,t,n){const r=c;return{commentThreadId:n,commentId:e[r(152)],userId:e[r(183)],content:e[r(167)],documentId:t,createdAt:e[r(128)],attributes:e[r(125)]||{}}}(e,t,n))),resolvedAt:s,resolvedBy:o,context:i,attributes:a})[c(149)](ds);return{threadId:u[c(140)],comments:u[c(130)]}},getCommentThread:async({channelId:t,threadId:n})=>{const r=e,s=await this[r(178)](t)[r(210)](n)[r(149)](ds);return await this[r(196)]([s]),{threadId:s[r(140)],comments:s[r(130)][r(160)](ls),context:s[r(184)],resolvedAt:s[r(136)],resolvedBy:s[r(120)],attributes:s[r(125)]||{}}},updateCommentThread:async({channelId:t,threadId:n,context:r,unlinkedAt:s,attributes:o})=>this[e(178)](t)[e(151)]({commentThreadId:n,context:r,attributes:o,unlinkedAt:s})[e(149)](us)[e(149)](ds),resolveCommentThread:async({channelId:t,threadId:n})=>{const r=e,s=await this[r(178)](t)[r(195)](n)[r(149)](us)[r(149)](ds);return{threadId:s[r(140)],resolvedAt:s[r(136)],resolvedBy:s[r(120)]}},reopenCommentThread:async({channelId:t,threadId:n})=>this[e(178)](t)[e(177)](n)[e(149)](us)[e(149)](ds),removeCommentThread:({channelId:t,threadId:n})=>this[e(178)](t)[e(209)](n)[e(149)](us)[e(149)](ds),addComment:({channelId:t,threadId:n,commentId:r,content:s,attributes:o})=>this[e(178)](t)[e(169)](n,r,s,o)[e(149)](ds),updateComment:({channelId:t,threadId:n,commentId:r,content:s,attributes:o})=>this[e(178)](t)[e(197)](n,r,s,o)[e(149)](us)[e(149)](ds),removeComment:({channelId:t,threadId:n,commentId:r})=>this[e(178)](t)[e(175)](n,r)[e(149)](us)[e(149)](ds)},n instanceof t.Context){const t=n[e(166)][e(121)](e(132)),r=n[e(145)][e(121)](m);await this[e(171)](t);const s=await this[e(190)][e(121)](t)[e(201)]();this[e(193)](r,e(127)+t,((n,{session:s})=>{const o=e;s.id===r[o(213)]&&(n[o(199)](),this[o(184)][o(145)][o(121)](o(117))[o(191)](s[o(173)],t))})),r[e(115)](t,s)}}async[ss(171)](e){const t=ss;if(this[t(190)][t(176)](e))throw new n.CKEditorError(t(161),null,{channelId:e});const r=this[t(184)][t(145)][t(121)](t(122)),s=new(is[t(205)])(e);this[t(190)][t(174)](e,s),this[t(193)](s,t(123),((e,n)=>{const s=t,{commentThreadId:o,documentId:i,context:a,attributes:c,resolvedAt:u,resolvedBy:d,comments:l}=n;r[s(210)](o)||r[s(134)]({threadId:o,channelId:i,comments:l?l[s(160)](ls):[],context:a,attributes:c,resolvedAt:u,resolvedBy:d,isFromAdapter:!0})})),this[t(193)](s,t(164),((e,{commentThreadId:n,documentId:s,context:o,unlinkedAt:i,attributes:a})=>{const c=t;r[c(210)](n)&&r[c(151)]({threadId:n,channelId:s,context:o,unlinkedAt:i,attributes:a,isFromAdapter:!0})})),this[t(193)](s,t(206),((e,{commentThreadId:n,resolvedBy:s,resolvedAt:o})=>{const i=t,a=r[i(210)](n);a&&a[i(116)]({resolvedBy:s,resolvedAt:o,isFromAdapter:!0})})),this[t(193)](s,t(211),((e,{commentThreadId:n})=>{const s=t,o=r[s(210)](n);o&&o[s(147)]({isFromAdapter:!0})})),this[t(193)](s,t(144),((e,{commentThreadId:n})=>{const s=t,o=r[s(210)](n);o&&o[s(208)]({isFromAdapter:!0})})),this[t(193)](s,t(114),((e,n)=>{const s=t,o=n[s(140)],i=r[s(210)](o);i&&i[s(169)]({...ls(n),isFromAdapter:!0})})),this[t(193)](s,t(194),((e,{commentThreadId:n,commentId:s,content:o,attributes:i})=>{const a=t,c=r[a(210)](n);if(c){const e=c[a(148)](s);e&&e[a(124)]({content:o,attributes:i,isFromAdapter:!0})}})),this[t(193)](s,t(155),((e,{commentThreadId:n,commentId:s})=>{const o=t,i=r[o(210)](n);if(i){const e=i[o(148)](s);e&&e[o(208)]({isFromAdapter:!0})}})),await this[t(119)](e)}[ss(141)](){const e=ss;if(this[e(184)]instanceof t.Context){const t=this[e(184)][e(166)][e(121)](e(132));this[e(207)](t)}}[ss(207)](e){const t=ss;if(!this[t(190)][t(176)](e))throw new n.CKEditorError(t(198),null,{channelId:e});this[t(178)](e)[t(186)](),this[t(190)][t(135)](e)}async[ss(180)](){const e=ss;for(const t of this[e(190)][e(204)]())await this[e(119)](t);if(this[e(184)]instanceof t.Context){const t=this[e(184)][e(166)][e(121)](e(132)),n=this[e(184)][e(145)][e(121)](m);n[e(163)](t);const r=await this[e(190)][e(121)](t)[e(201)]();n[e(115)](t,r)}}async[ss(119)](e){const t=ss,{connection:n}=this[t(184)][t(145)][t(121)](d),r=this[t(184)][t(145)][t(121)](t(122)),s=this[t(190)][t(121)](e),o=await s[t(179)](n);await this[t(196)](o);const i=new Set(Array[t(150)](r[t(137)]({channelId:e}),(e=>e.id)));for(const e of o)e[t(154)]||i[t(135)](e[t(140)]);for(const e of i)r[t(210)](e)[t(208)]({isFromAdapter:!0});for(const n of o){let s=r[t(210)](n[t(140)]);const{commentThreadId:o,context:i,attributes:a,resolvedBy:c,resolvedAt:u,unlinkedAt:d,deletedAt:l}=n;if(l)continue;s||(s=r[t(134)]({channelId:e,threadId:o,context:i,attributes:a||{},resolvedBy:c,resolvedAt:u,unlinkedAt:d,isFromAdapter:!0}));const p=new Set(Array[t(150)](s[t(130)],(e=>e.id)));for(const e of n[t(130)])p[t(135)](e[t(152)]);for(const e of p)s[t(148)](e)[t(208)]({isFromAdapter:!0});for(const e of n[t(130)]){const n=s[t(148)](e[t(152)]);n?n[t(167)]!==e[t(167)]&&n[t(124)]({content:e[t(167)],isFromAdapter:!0}):s[t(169)](Object[t(181)](ls(e),{isFromAdapter:!0}))}}}[ss(178)](e){const t=ss;if(!this[t(190)][t(176)](e))throw new n.CKEditorError(t(159),null,{channelId:e});return this[t(190)][t(121)](e)}async[ss(196)](e){const t=ss,n=this[t(184)][t(145)][t(121)](l.Users),{connection:r}=this[t(184)][t(145)][t(121)](d),s=new Set;for(const{resolvedBy:r,comments:o}of e){r&&!n[t(203)](r)&&s[t(185)](r);for(const{userId:e}of o)n[t(203)](e)||s[t(185)](e)}if(0===s[t(165)])return;const o=await Yr.User[t(187)](r,Array[t(150)](s));for(const e of o)n[t(203)](e.id)||n[t(189)](e)}}is[ss(205)]=o.CommentsService;const as=is;function cs(e,t){const n=os();return(cs=function(e,t){return n[e-=114]})(e,t)}async function us(e){const t=ss;if(t(142)!==e[t(158)])throw e}function ds(e){const t=ss;if((n=e)[t(146)][t(212)](t(143))||n[t(146)][t(212)](t(172))||n[t(146)][t(212)](t(118)))return new Promise((()=>{}));var n;throw e}function ls(e){const t=ss;return{threadId:e[t(140)],commentId:e[t(152)],content:e[t(167)],createdAt:e[t(128)],authorId:e[t(156)],attributes:e[t(125)]||{}}}function ps(e,t){const n=ys();return(ps=function(e,t){return n[e-=216]})(e,t)}const hs=ps;!function(e,t){const n=ps,r=e();for(;;)try{if(343165===parseInt(n(273))/1+parseInt(n(272))/2*(-parseInt(n(223))/3)+parseInt(n(230))/4+parseInt(n(218))/5+parseInt(n(238))/6*(parseInt(n(255))/7)+parseInt(n(220))/8+-parseInt(n(274))/9)break;r.push(r.shift())}catch(e){r.push(r.shift())}}(ys);class fs extends t.Plugin{static get[hs(243)](){return[as,hs(245),d]}constructor(e){const t=hs;super(e);const n=this[t(257)][t(244)][t(241)](t(258));this[t(224)]=new Map,this[t(261)]=new(fs[t(235)])(n)}[hs(265)](){const e=hs,t=this[e(257)][e(253)][e(241)](d),n=this[e(257)][e(253)][e(241)](e(245));return n[e(267)]={getSuggestion:async t=>{const n=e;await this[n(268)]();const r=await this[n(261)][n(241)](t)[n(239)](ms);return await this[n(240)]([r]),r},addSuggestion:async({id:t,type:n,data:r,originalSuggestionId:s,attributes:o})=>{const i=e;await this[i(268)]();const a={id:t,type:n,data:r,originalSuggestionId:s,attributes:o},c=await this[i(261)][i(266)](t,n,r,s,o)[i(239)]((e=>{if(gs(e))return new Promise((e=>{const n=ps;this[n(224)][n(270)](t,{resolve:e,suggestionData:a})}));throw e}));return this[i(224)][i(256)](t),c},updateSuggestion:async(t,n)=>{const r=e;if(await this[r(268)](),r(252)!==n[r(247)])return this[r(261)][r(234)](t,n)[r(239)](ms)}},this[e(259)](this[e(261)],e(250),((t,r)=>{const s=e;n[s(222)](r.id)&&(n[s(264)](r.id)[s(216)]=r[s(216)])})),this[e(261)][e(242)](t[e(263)])[e(232)]((r=>(t[e(251)](this),this[e(240)](r)[e(232)]((()=>{const t=e;for(const e of r)n[t(217)](e)[t(237)]=!0})))))}async[hs(248)](){const e=hs,t=this[e(257)][e(253)][e(241)](e(245)),{connection:n}=this[e(257)][e(253)][e(241)](d),r=await this[e(261)][e(242)](n);await this[e(240)](r);for(const{suggestionData:t,resolve:n}of this[e(224)][e(226)]()){let s=r[e(254)]((e=>e.id===t.id));s||(s=await this[e(261)][e(266)](t.id,t[e(231)],t[e(236)],t[e(228)])),n(s)}for(const n of r)t[e(222)](n.id)||t[e(217)](n)}async[hs(268)](){const e=hs;this[e(261)][e(219)]||await new Promise((t=>{const n=e;this[n(259)](this[n(261)],n(260),(e=>{e[n(225)](),t()}))}))}async[hs(240)](e){const t=hs,n=this[t(257)][t(253)][t(241)](l.Users),{connection:r}=this[t(257)][t(253)][t(241)](d),s=new Set;for(const{authorId:r}of e)n[t(246)](r)||s[t(266)](r);if(0===s[t(249)])return;const o=await Yr.User[t(227)](r,Array[t(221)](s));for(const e of o)n[t(246)](e.id)||n[t(269)](e)}}function ms(e){if(gs(e))return new Promise((()=>{}));throw e}function ys(){const e=["1772144TzXNGQ","from","hasSuggestion","33NkIdUP","_bufferedRequests","off","values","getMany","originalSuggestionId","cloud-services-internal-error: Not connected.","565556BnEAMW","type","then","message","update","TrackChangesService","data","_saved","6BxvUMt","catch","_fetchMissingUsersForThreads","get","connect","requires","config","TrackChangesEditing","getUser","state","reconnect","size","suggestionUpdated","addToReconnectionStack","open","plugins","find","4592294nLXlqT","delete","editor","collaboration.channelId","listenTo","connected","_trackChangesService","startsWith","connection","getSuggestion","init","add","adapter","_waitForServiceReady","addUser","set","cloud-services-internal-error: Request timeout.","94502FQoNsA","472925Elqwni","7879914iGEEVP","attributes","addSuggestionData","1232990YFMECM","isConnected"];return(ys=function(){return e})()}function gs(e){const t=hs;return e[t(233)][t(262)](t(229))||e[t(233)][t(262)](t(271))}fs[hs(235)]=o.TrackChangesService;const bs=vs;function Os(){const e=["CommentsRepository","collaboration.channelId","244036UTiIYr","requires","_setUpService","2MlygLk","Comments","1838504JnEVPQ","config","34430XvbKFC","isThreadsLoadingPaused","1676731nWcZBi","ready","4015066USNWUQ","pluginName","editor","_terminateService","RealTimeCollaborativeComments","get","165804Osjrzh","data","1021293cJkUBo","destroy","plugins","change:state","once","10WZdpSM","init","CommentsEditing","108iDaenp","12VlVlWX","connected","switchReadOnly","listenTo"];return(Os=function(){return e})()}function vs(e,t){const n=Os();return(vs=function(e,t){return n[e-=385]})(e,t)}!function(e,t){const n=vs,r=e();for(;;)try{if(193043===-parseInt(n(415))/1*(-parseInt(n(418))/2)+-parseInt(n(409))/3*(parseInt(n(398))/4)+parseInt(n(388))/5*(parseInt(n(408))/6)+parseInt(n(390))/7+parseInt(n(386))/8+-parseInt(n(400))/9+-parseInt(n(405))/10*(parseInt(n(392))/11))break;r.push(r.shift())}catch(e){r.push(r.shift())}}(Os);class ws extends t.Plugin{static get[bs(416)](){return[bs(385),as,rs,d]}static get[bs(393)](){return bs(396)}[bs(406)](){const e=bs,t=this[e(394)][e(402)][e(397)](d),n=this[e(394)][e(402)][e(397)](e(407)),r=this[e(394)][e(402)][e(397)](as);return this[e(394)][e(399)][e(404)](e(391),(()=>{const r=e;this[r(412)](t,r(403),((e,t,s)=>{const o=r;n[o(389)]=o(410)!==s}))})),this[e(412)](t,e(403),((t,n,r)=>{const s=e;this[s(394)][s(402)][s(397)](s(413))[s(411)](s(410)!==r)})),r[e(417)](this[e(394)][e(387)][e(397)](e(414)))}[bs(401)](){const e=bs;this[e(394)][e(402)][e(397)](as)[e(395)](this[e(394)][e(387)][e(397)](e(414))),super[e(401)]()}}var Is=_s;function _s(e,t){var n=Ss();return(_s=function(e,t){return n[e-=100]})(e,t)}function Ss(){var e=["6063348CmRQFU","6foWUOt","pluginName","61873UlAKft","requires","3jUDkFs","933597EcZnxE","7960128OoCkFG","22tLeDSg","RealTimeCollaborativeTrackChanges","1325suTQXj","14603430fGKivk","11534085XrMyHI","TrackChanges","9270EPIJJp"];return(Ss=function(){return e})()}!function(e,t){for(var n=_s,r=e();;)try{if(962167===parseInt(n(113))/1*(-parseInt(n(111))/2)+parseInt(n(100))/3*(parseInt(n(110))/4)+-parseInt(n(105))/5*(-parseInt(n(109))/6)+-parseInt(n(101))/7+parseInt(n(102))/8+parseInt(n(107))/9+parseInt(n(106))/10*(-parseInt(n(103))/11))break;r.push(r.shift())}catch(e){r.push(r.shift())}}(Ss);class Ps extends t.Plugin{static get[Is(114)](){return[ws,fs,Is(108)]}static get[Is(112)](){return Is(104)}}const As=ks;!function(e,t){const n=ks,r=e();for(;;)try{if(971374===parseInt(n(489))/1+-parseInt(n(455))/2*(parseInt(n(511))/3)+-parseInt(n(447))/4+-parseInt(n(519))/5*(parseInt(n(487))/6)+parseInt(n(492))/7*(-parseInt(n(468))/8)+-parseInt(n(502))/9+parseInt(n(503))/10)break;r.push(r.shift())}catch(e){r.push(r.shift())}}(Cs);class Ts extends t.Plugin{static get[As(521)](){return[d,Wr,As(417),m,l.Users]}constructor(e){const t=As;super(e);const n=this[t(515)][t(427)][t(436)](t(448));this[t(435)]=null,this[t(507)]=this[t(515)][t(424)][t(436)](t(417)),this[t(510)]=new(Ts[t(516)])(n)}async[As(446)](){const e=As,t=this[e(515)][e(424)][e(436)](Wr),r=t[e(428)],s=this[e(515)][e(424)][e(436)](d);this[e(507)][e(456)]({history:r,getLatestVersion:()=>this[e(433)](),getCurrentRevisionId:()=>t[e(513)]});const i=this[e(515)][e(427)][e(436)](e(464))||n.version,a=await o.EditorService[e(442)](s[e(471)],i);this[e(507)][e(473)]={getRevision:async({revisionId:t})=>(await this[e(475)](),await this[e(510)][e(459)](t)),updateRevisions:async t=>{const n=e;await this[n(475)]();const r=this[n(507)][n(481)];if(a&&1===t[n(463)]&&t[0].id===r.id)return t;for(const e of t)e.id===r.id&&(e[n(524)]=e[n(418)]===e[n(452)]);return this[n(510)][n(478)](t,this[n(435)])[n(472)]((e=>(this[n(435)]=e,t)))[n(490)]((e=>{const r=n;if(js(e)||r(466)===e[r(498)]&&void 0!==e[r(509)][r(434)]){for(const e of t)!this[r(507)][r(421)][r(459)](e.id)||this[r(507)][r(425)](e.id,e,!1);if(js(e))throw e;return t}throw e}))}},this[e(508)](this[e(510)],e(469),((t,{revisionsData:n,requestId:r})=>{const s=e;Math[s(476)](...n[s(520)]((e=>e[s(452)])))>this[s(506)]()-1?this[s(433)]()[s(472)]((()=>{this[s(461)](n,r)})):this[s(461)](n,r)}));const{revisions:c,requestId:u}=await this[e(510)][e(499)](s[e(471)]);s[e(482)](this),this[e(435)]=u,await this[e(505)](c);for(const t of c)this[e(507)][e(416)](t);this[e(508)](t,e(415),((n,r,s)=>{const o=e;s&&(this[o(420)]=t[o(518)],n[o(460)]())})),this[e(507)][e(437)](e(497)).to(s,e(488),(t=>t===o.WEB_SOCKET_GATEWAY_STATES[e(451)]))}async[As(501)](){const e=As,t=this[e(515)][e(424)][e(436)](d),n=this[e(515)][e(424)][e(436)](Wr),r=async()=>{const r=e,s=this[r(507)][r(481)],o=s.id,i=o!==n[r(513)];if(i){const e=n[r(518)]-this[r(420)],t=this[r(506)]();if(this[r(507)][r(423)][r(457)](),s[r(452)]+e!==t){const n=s[r(418)]+e,o=this[r(515)][r(424)][r(436)](l.Users),i=this[r(507)][r(484)]({revision:s,from:n,to:t});i.id=s.id;const a=i[r(523)][r(520)]((e=>o[r(440)](e)));s[r(432)]({...i,authors:a},!0),this[r(507)][r(425)](s.id,i,!0)}this[r(507)][r(522)]=t,s[r(452)]===s[r(418)]&&!this[r(507)][r(517)][r(474)](o)&&this[r(507)][r(421)][r(491)][r(422)](o),this[r(507)][r(493)](t)}const{revisions:a,requestId:c}=await this[r(510)][r(501)](t[r(471)],this[r(435)]);i&&a[r(463)]>0?n[r(486)]():(await this[r(505)](a),this[r(461)](a,c),this[r(507)][r(453)]())};return n[e(426)]?r():new Promise(((t,s)=>{const o=e;n[o(525)](o(415),(()=>{const e=o;r()[e(472)](t)[e(490)](s)}))}))}[As(439)](){super[As(439)]()}async[As(475)](){const e=As;this[e(510)][e(470)]||await new Promise((t=>{const n=e;this[n(508)](this[n(510)],n(449),(e=>{e[n(460)](),t()}))}))}[As(506)](){const e=As,t=this[e(515)][e(424)][e(436)](Wr)[e(428)][e(485)]()[e(419)]();for(const n of t)if(e(429)!==n[e(458)]||n[e(454)])return n[e(512)]+1}[As(433)](){const e=As,t=this[e(515)][e(424)][e(436)](Wr);return new Promise((n=>{const r=e;t[r(445)]?t[r(525)](r(504),(()=>{n(this[r(506)]())})):n(this[r(506)]())}))}[As(461)](e,t){const n=As,r=this[n(507)][n(421)];this[n(435)]=t;for(const t of e){const e=r[n(459)](t.id);if(e){if((t[n(418)]||t[n(452)])&&(t[n(514)]=null),e===this[n(507)][n(481)]){const r=Math[n(476)](e[n(452)],t[n(452)]),s=Math[n(476)](e[n(418)],t[n(418)]);let o;e[n(452)]===t[n(452)]&&e[n(418)]===t[n(418)]?(o=!0,this[n(438)](t)):t[n(452)]===r&&t[n(418)]===s?o=!1:(e[n(452)]===r&&e[n(418)]===s||this[n(462)]({revision:e,from:s,to:r}),o=!0),o&&(delete t[n(418)],delete t[n(452)],delete t[n(514)],delete t[n(494)],delete t[n(523)])}this[n(507)][n(477)](t),this[n(438)](t)}else this[n(507)][n(416)](t)}const s=r[n(483)]();s[n(419)]();for(let e=0;e<s[n(463)]-1;e++){const t=s[e],r=s[e+1];if(t[n(418)]<r[n(452)]){const e=r[n(452)],s=Math[n(476)](e,t[n(452)]);this[n(462)]({revision:t,from:e,to:s})}}}[As(462)]({revision:e,from:t,to:n}={}){const r=As,s=this[r(515)][r(424)][r(436)](l.Users),o=this[r(507)][r(484)]({revision:e,from:t,to:n});o[r(450)]=o[r(523)][r(520)]((e=>s[r(440)](e))),e[r(432)](o)}[As(438)](e){const t=As,n={};n.id=e.id;for(const r of Object[t(496)](e))"id"!==r&&(n[r]=void 0);this[t(507)][t(425)](n.id,n,!0)}async[As(505)](e){const t=As,n=this[t(515)][t(424)][t(436)](l.Users),{connection:r}=this[t(515)][t(424)][t(436)](d),s=new Set;for(const n of e){for(const e of n[t(523)])i(e);n[t(467)]&&i(n[t(467)])}if(0===s[t(480)])return;const o=await Yr.User[t(444)](r,Array[t(465)](s));for(const e of o)n[t(440)](e.id)||n[t(495)](e);function i(e){const r=t;n[r(440)](e)||s[r(430)](e)}}}function ks(e,t){const n=Cs();return(ks=function(e,t){return n[e-=415]})(e,t)}function Cs(){const e=["2053053jvXRac","50147790UBCogC","change:_isPendingUpdate","_fetchMissingUsers","_getLatestVersionFromServerOperations","_revisionTracker","listenTo","data","_revisionHistoryService","44883drSIBE","baseVersion","sessionId","diffData","editor","RevisionHistoryService","_bufferedUpdates","_offset","595cUPhDH","map","requires","_startingVersion","authorsIds","isEmptyCurrent","once","change:_isConnected","addRevisionData","RevisionTracker","fromVersion","reverse","_oldOffset","repository","remove","_revisionDataBuilder","plugins","_bufferUpdate","_isConnected","config","serverHistory","marker","add","message","_update","_getLatestVersion","wrongRequestId","_lastRequestId","get","bind","_preventResendingRevisionData","destroy","getUser","cloud-services-internal-error: Not connected.","isBundleUploaded","startsWith","getMany","_isPendingUpdate","init","3929064MmDvXo","collaboration.channelId","connected","authors","CONNECTED","toVersion","sendBufferedUpdates","affectsData","254QnOIbn","setSource","reInit","type","getRevision","off","_handleRevisionsUpdate","_fixRevision","length","cloudServices.bundleVersion","from","400","creatorId","204616zhndzm","revisionsUpdated","isConnected","connection","then","adapter","has","_waitForServiceReady","max","setRevisionData","updateRevisions","cloud-services-internal-error: Request timeout.","size","currentRevision","addToReconnectionStack","getRevisions","buildRevisionData","getOperations","_handleReconnectionError","38094fEUDpx","state","845636wUmiar","catch","_revisions","280XudRXE","_createCurrentRevision","createdAt","addUser","keys","isEnabled","code","connect","cloud-services-internal-error: Revision History Service is not connected.","reconnect"];return(Cs=function(){return e})()}Ts[As(516)]=o.RevisionHistoryService;const Es=Ts;function js(e){const t=As;return e[t(431)][t(443)](t(500))||e[t(431)][t(443)](t(441))||e[t(431)][t(443)](t(479))}var Ds=Ms;function Rs(){var e=["5gsDtKq","3LoxBcI","requires","950917gPaqUQ","pluginName","7384653LyqElf","1384WjCVqw","RevisionHistory","693HUcJMp","RealTimeCollaborativeRevisionHistory","10rpxmQF","255162fPYAMW","72FyVdyh","4182414zTUzVo","1056490ccnrVZ","517160UcFNhn"];return(Rs=function(){return e})()}function Ms(e,t){var n=Rs();return(Ms=function(e,t){return n[e-=475]})(e,t)}!function(e,t){for(var n=Ms,r=e();;)try{if(705780===-parseInt(n(479))/1+-parseInt(n(476))/2*(parseInt(n(482))/3)+-parseInt(n(480))/4+-parseInt(n(481))/5*(-parseInt(n(478))/6)+-parseInt(n(489))/7*(parseInt(n(487))/8)+parseInt(n(486))/9*(parseInt(n(475))/10)+-parseInt(n(484))/11*(-parseInt(n(477))/12))break;r.push(r.shift())}catch(e){r.push(r.shift())}}(Rs);class Ns extends t.Plugin{static get[Ds(483)](){return[Ds(488),Es,rs]}static get[Ds(485)](){return Ds(490)}}var xs=Function.prototype,Vs=Object.prototype,Bs=xs.toString,Us=Vs.hasOwnProperty,Js=Bs.call(Object);const qs=function(e){if(!lt(e)||"[object Object]"!=ge(e))return!1;var t=ln(e);if(null===t)return!0;var n=Us.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Bs.call(n)==Js};const Gs=function(e){return lt(e)&&1===e.nodeType&&!qs(e)};function Ls(){const e=["539OUbaiN","set","177636MoPDqy","2290ziyioW","51419100MxYALh","CONNECTED_USERS","ck-presence-list__counter","usersCount","36QRAtNR","ck-presence-list__counter--hidden","setTemplate","57211FUQaGd","6vuSxGE","bindTemplate","10640745vHMKTa","41592fyBSnd","isHidden","div","67086LTSNWA","1YYkzmS","3576985GSMgpm"];return(Ls=function(){return e})()}function Ys(e,t){const n=Ls();return(Ys=function(e,t){return n[e-=159]})(e,t)}!function(e,t){const n=Ys,r=e();for(;;)try{if(683431===parseInt(n(171))/1*(parseInt(n(175))/2)+-parseInt(n(170))/3*(parseInt(n(160))/4)+parseInt(n(172))/5*(-parseInt(n(164))/6)+-parseInt(n(173))/7*(parseInt(n(167))/8)+-parseInt(n(166))/9+-parseInt(n(176))/10*(parseInt(n(163))/11)+parseInt(n(177))/12)break;r.push(r.shift())}catch(e){r.push(r.shift())}}(Ls);class Fs extends r.View{constructor(e){const t=Ys;super(e);const n=this[t(165)];this[t(174)](t(159),0),this[t(174)](t(168),!0),this[t(162)]({tag:t(169),attributes:{class:["ck",t(179),n.if(t(168),t(161))]},children:[{text:n.to(t(159),(n=>P(e,t(178),n)))}]})}}function zs(){const e=["855MEUBgj","setTemplate","ck-presence-list__list","fire","3642316NDighu","items","createCollection","185094DcywgC","193044kcMPvT","execute","319910yVlEBc","70470imaPhY","294114SPYBEY","4749003YzakIA","bindTemplate","div","11OTEErZ","192iEoywa"];return(zs=function(){return e})()}function Hs(e,t){const n=zs();return(Hs=function(e,t){return n[e-=451]})(e,t)}!function(e,t){const n=Hs,r=e();for(;;)try{if(814654===-parseInt(n(468))/1*(parseInt(n(464))/2)+parseInt(n(465))/3+parseInt(n(456))/4+-parseInt(n(462))/5+-parseInt(n(460))/6+-parseInt(n(459))/7*(parseInt(n(451))/8)+-parseInt(n(452))/9*(-parseInt(n(463))/10))break;r.push(r.shift())}catch(e){r.push(r.shift())}}(zs);class Ks extends r.View{constructor(e){const t=Hs;super(e),this[t(457)]=this[t(458)]();const n=this[t(466)];this[t(453)]({tag:t(467),attributes:{class:["ck",t(454)]},children:this[t(457)],on:{click:n.to((()=>this[t(455)](t(461))))}})}}var Ws=__webpack_require__(4106),$s={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};g()(Ws.A,$s);Ws.A.locals;function Qs(){const e=["3744513IbktCi","22TATwkl","inlineListView","52ocprzu","ck-presence-list","listenTo","385736OotptR","1841478RuzbJV","ck-rounded-corners","4559920UPZJsD","locale","set","counterView","first","isCollapsed","div","35130qVpLsQ","9742vXAquL","7yhQgCx","tooltipPosition","setTemplate","change","bindTemplate","3552040feJNht","ck-presence-list--collapsed","138vvAeWT","ck-reset","items"];return(Qs=function(){return e})()}function Xs(e,t){const n=Qs();return(Xs=function(e,t){return n[e-=453]})(e,t)}!function(e,t){const n=Xs,r=e();for(;;)try{if(288503===-parseInt(n(458))/1+-parseInt(n(469))/2*(-parseInt(n(477))/3)+parseInt(n(455))/4*(parseInt(n(468))/5)+parseInt(n(459))/6+-parseInt(n(470))/7*(parseInt(n(475))/8)+-parseInt(n(480))/9+parseInt(n(461))/10*(parseInt(n(453))/11))break;r.push(r.shift())}catch(e){r.push(r.shift())}}(Qs);class Zs extends r.View{constructor(e){const t=Xs;super(e);const n=this[t(474)];this[t(463)](t(466),!0),this[t(464)]=new Fs(this[t(462)]),this[t(454)]=new Ks(e),this[t(457)](this[t(454)][t(479)],t(473),(()=>{const e=t;for(const t of this[e(454)][e(479)])t[e(471)]="s";this[e(454)][e(479)][e(465)]&&(this[e(454)][e(479)][e(465)][e(471)]="se")})),this[t(472)]({tag:t(467),attributes:{class:["ck",t(456),t(478),t(460),n.if(t(466),t(476))]},children:[this[t(464)],this[t(454)]]})}}function eo(e,t){var n=to();return(eo=function(e,t){return n[e-=274]})(e,t)}function to(){var e=["ck-presence-list__dropdown-list","27Iiynuf","36690oCcHgK","1359064NxfmVz","21576mDOXWF","1295188FdfboY","createCollection","32940611RHjZOe","42YGsHZe","660qohRJS","3SAxrrf","items","1128992QvmwqC","setTemplate","ck-presence-list__dropdown-list-wrapper","2522570iMWSoC","div"];return(to=function(){return e})()}!function(e,t){for(var n=eo,r=e();;)try{if(425030===parseInt(n(283))/1+parseInt(n(284))/2+-parseInt(n(289))/3*(-parseInt(n(282))/4)+-parseInt(n(288))/5*(-parseInt(n(281))/6)+-parseInt(n(287))/7*(-parseInt(n(274))/8)+-parseInt(n(280))/9*(-parseInt(n(277))/10)+-parseInt(n(286))/11)break;r.push(r.shift())}catch(e){r.push(r.shift())}}(to);class no extends r.View{constructor(e){var t=eo;super(e),this[t(290)]=this[t(285)](),this[t(275)]({tag:t(278),attributes:{class:["ck",t(279)]},children:[{tag:t(278),attributes:{class:["ck",t(276)]},children:this[t(290)]}]})}}function ro(){const e=["span","div","tag","12ewVLki","ck-presence-list__marker","fire","11nTrpei","75305YoEpdJ","color","2041456ywMGHd","9427380qqlwRk","name","ck-presence-list__dropdown-list-item","4CUKVNN","button","3882949ewKJsX","2110431hnSZCu","18qAkqje","true","3309208nWQpaR","740655djBFRh","getBackgroundColorClass","setTemplate","bindTemplate","ck-user__full-name","execute","userView"];return(ro=function(){return e})()}function so(e,t){const n=ro();return(so=function(e,t){return n[e-=398]})(e,t)}!function(e,t){const n=so,r=e();for(;;)try{if(555513===-parseInt(n(402))/1+parseInt(n(418))/2+-parseInt(n(398))/3+parseInt(n(422))/4*(-parseInt(n(416))/5)+parseInt(n(412))/6*(parseInt(n(424))/7)+parseInt(n(401))/8*(parseInt(n(399))/9)+-parseInt(n(419))/10*(parseInt(n(415))/11))break;r.push(r.shift())}catch(e){r.push(r.shift())}}(ro);class oo extends r.View{constructor(e,t,n){const r=so;super(e);const s=this[r(405)];this[r(408)]=new l.UserView(e,t);const o={tag:r(410),attributes:{class:["ck",r(421)]},children:[this[r(408)],{tag:r(409),attributes:{class:["ck",r(406)]},children:[{text:t[r(420)]}]},{tag:r(409),attributes:{class:["ck",r(413),t[r(417)][r(403)]()],"aria-hidden":r(400)}}]};n&&(o[r(411)]=r(423),o.on={click:s.to((()=>this[r(414)](r(407))))}),this[r(404)](o)}}function io(e,t){const n=ao();return(io=function(e,t){return n[e-=480]})(e,t)}function ao(){const e=["8669940ePzxSm","ck-presence-list__list-item__tooltip","205389ueKyFs","628054fYzrVP","20692540anMXNs","3kICzkJ","markerView","execute","setTemplate","button","color","92hxmjAa","10586304yoTkfo","ck-presence-list__list-item","bindTemplate","getBackgroundColorClass","div","tag","set","14576wJOERE","tooltipPosition","fire","1288215WyMjIZ","userView","span","true","ck-presence-list__marker","4130pBBzwZ","hasTooltip","name"];return(ao=function(){return e})()}!function(e,t){const n=io,r=e();for(;;)try{if(897913===parseInt(n(499))/1*(-parseInt(n(497))/2)+parseInt(n(496))/3*(parseInt(n(505))/4)+-parseInt(n(486))/5+-parseInt(n(494))/6+-parseInt(n(491))/7*(-parseInt(n(483))/8)+-parseInt(n(506))/9+parseInt(n(498))/10)break;r.push(r.shift())}catch(e){r.push(r.shift())}}(ao);class co extends r.View{constructor(e,t,n){const r=io;super(e);const s=this[r(508)];this[r(482)](r(492),!0),this[r(482)](r(484),""),this[r(487)]=new l.UserView(e,t),this[r(500)]=new uo(e,t);const o={tag:r(480),attributes:{class:["ck",r(507)],"data-cke-tooltip-text":this[r(487)][r(493)],"data-cke-tooltip-position":s.to(r(484)),"data-cke-tooltip-disabled":s.to(r(492),(e=>!e)),"data-cke-tooltip-class":r(495)},children:[this[r(487)],this[r(500)]]};n&&(o[r(481)]=r(503),o.on={click:s.to((()=>this[r(485)](r(501))))}),this[r(502)](o)}}class uo extends r.View{constructor(e,t){const n=io;super(e),this[n(502)]({tag:n(488),attributes:{class:["ck",n(490),t[n(504)][n(509)]()],"aria-hidden":n(489)}})}}const lo=po;function po(e,t){const n=ho();return(po=function(e,t){return n[e-=384]})(e,t)}function ho(){const e=["presenceDropdownView","length","balloonPanelView","226878RRQRnz","bindTo","presenceList","define","pin","3621240fDxCmr","appendChild","1609cXiUfy","content","reverse","isRendered","_allConnectedUsers","presenceList.container","using","presenceList.displayMe","from","isHidden","onClick","render","ck ck-presence-list__balloon","config","_bodyCollection","set","_handleUserAdd","4413375lylLgv","16831179UjFvJo","attachToDom","items","remove","init","allConnectedUsers","execute","number","presenceList.collapseAt","plugins","isCollapsed","showDropdown","presencelist-collapseat-invalid-format","displayMe","currentDisplayedUsers","last","element","_calculateNewUserPosition","context","view","isMe","usersCount","56KkJUEa","bind","detachFromDom","hasTooltip","add","inlineListView","hideDropdown","class","1486LuIbIm","4847955jROMjU","requires","listenTo","isVisible","795078jdguVf","counterView","destroy","presencelist-missing-container","unpin","locale","_handleUserRemove","get","_createView"];return(ho=function(){return e})()}!function(e,t){const n=po,r=e();for(;;)try{if(605952===parseInt(n(429))/1*(-parseInt(n(405))/2)+-parseInt(n(422))/3*(parseInt(n(397))/4)+parseInt(n(446))/5+-parseInt(n(410))/6+parseInt(n(406))/7+-parseInt(n(427))/8+parseInt(n(447))/9)break;r.push(r.shift())}catch(e){r.push(r.shift())}}(ho);const fo={collapseAt:6,displayMe:!0};class mo extends t.ContextPlugin{constructor(e){const t=po;super(e),this[t(393)][t(442)][t(425)](t(424),fo);const s=e[t(442)][t(417)](t(455));if(t(454)!=typeof s)throw new n.CKEditorError(t(387),this);if(s<1)throw new n.CKEditorError(t(387),this);this[t(433)]=this[t(393)][t(384)][t(417)](m)[t(452)],this[t(444)](t(396),0),this[t(389)]=new n.Collection,this[t(421)]=new r.BalloonPanelView,this[t(421)][t(404)]=t(441),this[t(394)]=this[t(418)](),this[t(419)]=void 0}static get[lo(407)](){return[m]}[lo(451)](){const e=lo;for(const t of this[e(433)])this[e(445)](t);this[e(408)](this[e(433)],e(401),((t,n)=>{this[e(445)](n)})),this[e(408)](this[e(433)],e(450),((t,n)=>{this[e(416)](n)}))}[lo(418)](){const e=lo,t=this[e(393)],s=new Zs(this[e(393)][e(415)]),o=this[e(421)];if(!Gs(t[e(442)][e(417)](e(434))))throw new n.CKEditorError(e(413),this);return s[e(411)][e(398)](e(396)).to(this),s[e(398)](e(385)).to(this,e(396),(n=>{const r=e,{collapseAt:o,displayMe:i}=t[r(442)][r(417)](r(424)),a=n>=o;return s[r(411)][r(438)]=!(1==n&&i||a),a||this[r(403)](),a})),s[e(402)][e(449)][e(423)](this[e(389)])[e(435)]((n=>{const r=e,o=t[r(442)][r(417)](r(424)),i=new co(t[r(415)],n,!!o[r(439)]);return i[r(398)](r(400)).to(s,r(385),(e=>!e)),o[r(439)]&&this[r(408)](i,r(453),(()=>{const e=r;this[e(394)][e(385)]||o[e(439)](n,i[e(391)])})),i})),this[e(408)](s[e(402)],e(453),(()=>{const t=e;this[t(419)]?this[t(403)]():this[t(394)][t(385)]&&this[t(386)]()})),s[e(440)](),o[e(440)](),(0,r.clickOutsideHandler)({emitter:s,activator:()=>o[e(409)],contextElements:[o[e(391)],s[e(402)][e(391)]],callback:()=>this[e(403)]()}),t[e(442)][e(417)](e(434))[e(428)](s[e(391)]),this[e(443)]=new r.BodyCollection(this[e(393)][e(415)]),this[e(443)][e(448)](),this[e(443)][e(401)](o),s}[lo(445)](e){const t=lo;if(!this[t(393)][t(442)][t(417)](t(436))&&e[t(395)])return;const n=this[t(393)][t(442)][t(417)](t(455))-1;this[t(396)]++,this[t(389)][t(420)]==n&&this[t(389)][t(450)](0);const r=this[t(392)](e);this[t(389)][t(401)](e,r)}[lo(416)](e){const t=lo;if(this[t(396)]--,this[t(389)][t(417)](e.id)&&(this[t(389)][t(450)](e.id),this[t(389)][t(420)]<this[t(396)]))for(const e of Array[t(437)](this[t(433)])[t(431)]())if(!this[t(389)][t(417)](e.id))return void this[t(389)][t(401)](e,0)}[lo(392)](e){const t=lo;return Boolean(this[t(389)][t(390)]&&this[t(389)][t(390)][t(395)])&&!e[t(395)]?this[t(389)][t(420)]-1:this[t(389)][t(420)]}[lo(386)](){const e=lo;if(this[e(419)])return;this[e(419)]=new no(this[e(393)][e(415)]);const t=this[e(393)][e(442)][e(417)](e(424));this[e(419)][e(449)][e(423)](this[e(433)])[e(435)]((n=>{const r=e;if(!t[r(388)]&&n[r(395)])return null;const s=new oo(this[r(393)][r(415)],n,!!t[r(439)]);return t[r(439)]&&this[r(408)](s,r(453),(()=>{const e=r;t[e(439)](n,s[e(391)])})),s})),this[e(421)][e(430)][e(401)](this[e(419)]),this[e(421)][e(426)]({target:this[e(394)][e(402)][e(391)]})}[lo(403)](){const e=lo;this[e(419)]&&(this[e(421)][e(414)](),this[e(421)][e(430)][e(450)](this[e(419)]),this[e(419)][e(412)](),this[e(419)]=void 0)}[lo(412)](){const e=lo;super[e(412)](),this[e(394)]&&this[e(394)][e(432)]&&this[e(394)][e(412)](),this[e(443)]&&this[e(443)][e(399)]()}}var yo=bo;function go(){var e=["7602741qssdxN","979GxvCgi","109648qmFKrU","pluginName","PresenceList","161yUKwXG","979648DVTDJd","3138VoTrhl","1167655gjlCnb","215990jKhpgV","1604iAZtkN","requires","1147700lWVwqc","6sYHiea"];return(go=function(){return e})()}function bo(e,t){var n=go();return(bo=function(e,t){return n[e-=147]})(e,t)}!function(e,t){for(var n=bo,r=e();;)try{if(535760===parseInt(n(157))/1+parseInt(n(147))/2*(parseInt(n(158))/3)+-parseInt(n(149))/4+-parseInt(n(159))/5*(parseInt(n(150))/6)+parseInt(n(156))/7*(parseInt(n(153))/8)+parseInt(n(151))/9+parseInt(n(160))/10*(-parseInt(n(152))/11))break;r.push(r.shift())}catch(e){r.push(r.shift())}}(go);class Oo extends t.ContextPlugin{static get[yo(148)](){return[m,mo]}static get[yo(154)](){return yo(155)}}Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;(0,n.ObservableMixin)();(0,n.EmitterMixin)();t.ContextPlugin;t.ContextPlugin;function vo(e,t){var n=wo();return(vo=function(e,t){return n[e-=137]})(e,t)}function wo(){var e=["1ZMqTMi","63moAxTz","1020836kkAUaM","400584LQHhty","5060420ekBnjN","9943724PTgxAQ","5022330aboBxs","3628826wdHMPO","390EMtMQR","42200PrYbJv"];return(wo=function(){return e})()}function Io(){var e=["1562295ecXnTL","28afVJUT","1935376RGxYnF","471635QFUMXQ","128051dVctMA","18951200pfgQbX","5423376iqZrrT","7572366oeUKWF"];return(Io=function(){return e})()}function _o(e,t){var n=Io();return(_o=function(e,t){return n[e-=463]})(e,t)}!function(e,t){for(var n=vo,r=e();;)try{if(997673===parseInt(n(140))/1*(parseInt(n(137))/2)+-parseInt(n(146))/3+-parseInt(n(142))/4+-parseInt(n(139))/5*(-parseInt(n(138))/6)+parseInt(n(145))/7+parseInt(n(143))/8*(-parseInt(n(141))/9)+-parseInt(n(144))/10)break;r.push(r.shift())}catch(e){r.push(r.shift())}}(wo),function(e,t){for(var n=_o,r=e();;)try{if(913218===parseInt(n(463))/1+parseInt(n(469))/2+parseInt(n(465))/3+-parseInt(n(468))/4*(parseInt(n(470))/5)+parseInt(n(466))/6+-parseInt(n(467))/7+-parseInt(n(464))/8)break;r.push(r.shift())}catch(e){r.push(r.shift())}}(Io)})(),(window.CKEditor5=window.CKEditor5||{}).realTimeCollaboration=__webpack_exports__})();