@ckeditor/ckeditor5-real-time-collaboration 35.2.0 → 35.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.
@@ -1,5 +1,5 @@
1
- !function(e){const t=e.en=e.en||{};t.dictionary=Object.assign(t.dictionary||{},{CONNECTED_USERS:["1 connected user (me)","%0 connected users"],PENDING_ACTION_SENDING_DATA:"Sending data to the server.","Synchronization issue":"Synchronization issue","The document cannot be connected back to the server. To not lose your content save it locally and refresh the editor.":"The document cannot be connected back to the server. To not lose your content save it locally and refresh the editor.","The document details could not be taken during the reconnection. To not lose your content save it locally and refresh the editor.":"The document details could not be taken during the reconnection. To not lose your content save it locally and refresh the editor.","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.":"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.","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.":"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."})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={})),
1
+ !function(t){const e=t.en=t.en||{};e.dictionary=Object.assign(e.dictionary||{},{CONNECTED_USERS:["1 connected user (me)","%0 connected users"],PENDING_ACTION_SENDING_DATA:"Sending data to the server.","Synchronization issue":"Synchronization issue","The document cannot be connected back to the server. To not lose your content save it locally and refresh the editor.":"The document cannot be connected back to the server. To not lose your content save it locally and refresh the editor.","The document details could not be taken during the reconnection. To not lose your content save it locally and refresh the editor.":"The document details could not be taken during the reconnection. To not lose your content save it locally and refresh the editor.","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.":"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.","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.":"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."})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={})),
2
2
  /*!
3
3
  * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
4
4
  * For licensing, see LICENSE.md.
5
- */(()=>{var __webpack_modules__={357:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});class s extends Error{constructor(e,t,s=null,r={}){super("cloud-services-internal-error: "+e),this.context=t,this.code=s,this.data=r,this.name="CKEditorError"}static fromPublicError(e){return new s(function(e){let t="cloud-services-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=s},8801:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});class s 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 s(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=s},7622:function(e,t,s){"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 n=s(5003),i=s(2209),o=r(s(3596)),a=r(s(7026)),c=r(s(7839)),u=r(s(5132)),d=r(s(4148)),l=r(s(223)),h=r(s(2968)),f=r(s(7158)),p=r(s(357)),y=r(s(6314)),m=r(s(6148)),v=r(s(961));t._SERVICE=1;class x{constructor(e,t){if(!e)throw new TypeError('Param "bundleVersion" must be provided.');this._id=null!=t?t:(0,n.v4)(),this._isConnected=!1,this._bundleVersion=e}getId(){return this._id}isConnected(){return this._isConnected}connect(e,t={buffers:[],types:[]},s){const r=new c.default(this.getId(),t.buffers,t.types,this._bundleVersion,s);return this._connect(e,r)}reconnect(e,t){if(this.isConnected())throw new p.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 v.default(this.getId());if(!this._wsGateway)throw new y.default("Collaborative Editing",this);const s=await this._wsGateway._sendRequest(t._SERVICE,v.default.TYPE,o.default.encode(e));return o.default.decode(s,m.default)}async sendOperations(e,s,r){if(!e||!e.types||!e.types.length)throw new p.default("Cannot send empty update.",this._wsGateway);const n="number"==typeof s?s:parseInt(s);if(!Number.isInteger(n)||n<0)throw new p.default("Base version not provided.",this._wsGateway);const i=new u.default(this.getId(),e.buffers,e.types,n,[],r);if(!this._wsGateway||!this._isConnected)throw new y.default("Collaborative Editing",this);const a=await this._wsGateway._sendRequest(t._SERVICE,u.default.TYPE,o.default.encode(i));return o.default.decode(a,l.default)}async getConnectedSessions(){if(!this._isConnected)throw new y.default("Collaborative Editing",this);return this._connectedSessions||(this._connectedSessions=await a.default.getConnectedSessions(this._wsGateway,this._id,t._SERVICE)),this._connectedSessions}static getConnectedSessions(e,s){return a.default.getConnectedSessions(e,s,t._SERVICE)}async _connect(e,s){if(this.isConnected())return;if(e.state!==f.default.STATE_CONNECTED)throw new p.default("WebSocket Gateway is not connected.",e);this._wsGateway=e,this.stopListening(e,"change:state");const r=await e._sendRequest(t._SERVICE,s.constructor.TYPE,o.default.encode(s)),n=o.default.decode(r,h.default);return this.listenTo(e,"change:state",((e,t,s)=>this._onWsGatewayStateChange(s)),{priority:f.default._CHANGE_STATE_EVENT_PRIORITY}),this._connectToChannel(e,n.channel),this._isConnected=!0,this.fire("connected"),n}_connectToChannel(e,s){this._channel=e._getChannel(t._SERVICE,s),this.listenTo(this._channel,this._channel.getEventName(u.default.TYPE),((e,t)=>{const s=o.default.decode(t,u.default);this.fire("operationsReceived",s.baseVersion,s.data,s.metadata)}))}_onWsGatewayStateChange(e){e===f.default.STATE_DISCONNECTED&&this.disconnect()}}x._SERVICE=t._SERVICE,(0,i.mix)(x,i.EmitterMixin),t.default=x},8677:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(5945));class i extends n.default{static toJSON({createdAt:e,...t}){const s={...t};return e instanceof Date&&(s.createdAt=e.toISOString()),s}static fromJSON({createdAt:e,...t}){const s={...t};return e&&(s.createdAt=new Date(e)),s}}t.default=i,i.DESCRIPTOR_NAME="OperationMetadataDescriptor",i.DESCRIPTOR={fields:{userId:{type:"string",id:1},type:{type:"string",id:2},createdAt:{type:"string",id:3}}}},6685:(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 s=[];let r=0;for(const n of e)if(0!==n){if(!t[r])throw new Error("Missing metadata for a operation");s.push(t[r]),r++}else s.push(s[s.length-1]);return s}static removeUnnecessaryMetadata(e,t){if(!(e&&e.length&&t&&t.length))return[];const s=[];for(let r=0;r<e.length;r++)if(0!==e[r]){if(!t[r])throw new Error("Missing metadata for a operation");s.push(t[r])}return s}}},7839:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(e,t,s,r,n=""){super(),this.id=e,this.buffers=t,this.types=s,this.bundleVersion=r,this.lastOperationId=n}toJSON(){return{id:this.id,buffers:this.buffers,types:this.types,bundleVersion:this.bundleVersion,lastOperationId:this.lastOperationId}}static fromJSON(e){return new i(e.id,e.buffers,e.types,e.bundleVersion,e.lastOperationId)}}t.default=i,i.TYPE="11",i.READABLE_TYPE_NAME="connectToDocument",i.DESCRIPTOR_NAME="CollaborativeEditingConnectMessage",i.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}}}},4148:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(e,t,s){super(),this.id=e,this.lastKnowVersion=t,this.bundleVersion=s}toJSON(){return{id:this.id,bundleVersion:this.bundleVersion,lastKnowVersion:this.lastKnowVersion}}static fromJSON(e){return new i(e.id,e.lastKnowVersion,e.bundleVersion)}}t.default=i,i.TYPE="12",i.READABLE_TYPE_NAME="reconnectToDocument",i.DESCRIPTOR_NAME="CollaborativeEditingReconnectMessage",i.DESCRIPTOR={fields:{id:{type:"string",id:1},bundleVersion:{type:"string",id:2},lastKnowVersion:{type:"uint32",id:3}}}},5132:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545)),i=r(s(6685)),o=r(s(8677));class a extends n.default{constructor(e,t,s,r,n=[],i=""){super(),this.id=e,this.buffers=t,this.types=s,this.baseVersion=r,this.metadata=n,this.lastOperationId=i}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:i.default.removeUnnecessaryMetadata(this.types,this.metadata).map(o.default.toJSON),lastOperationId:this.lastOperationId}}static fromJSON(e){return new a(e.id,e.buffers,e.types,e.baseVersion,i.default.prepareMetadataForOperations(e.types,e.metadata).map(o.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}}}},961:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(e){super(),this.documentId=e}get data(){return{documentId:this.documentId}}toJSON(){return{documentId:this.documentId}}static fromJSON(e){return new i(e.documentId)}}t.default=i,i.TYPE="14",i.READABLE_TYPE_NAME="getDocumentDetails",i.DESCRIPTOR_NAME="GetDocumentDetailsMessage",i.DESCRIPTOR={fields:{documentId:{type:"string",id:1},environmentId:{type:"string",id:2}}}},2968:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545)),i=r(s(6685)),o=r(s(8677));class a extends n.default{constructor(e,t,s=[],r=[],n=0,i=[],o=null,a="",c="",u=null){super(),this.channel=e,this.version=t,this.buffers=s,this.types=r,this.offset=n,this.metadata=i,this.initData=o,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:i.default.removeUnnecessaryMetadata(this.types,this.metadata).map(o.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 s=null;return!0===e.isInitialized?s=null!==(t=e.initData)&&void 0!==t?t:"":"boolean"!=typeof e.isInitialized&&e.initData&&(s=e.initData),a.create({channel:e.channel,version:e.version,buffers:e.buffers,types:e.types,offset:e.offset,metadata:i.default.prepareMetadataForOperations(e.types,e.metadata).map(o.default.fromJSON),initData:s,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:o.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}}}},223:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545)),i=r(s(6685)),o=r(s(8677));class a extends n.default{constructor(e,t=[],s=[],r=[],n="",i=null){super(),this.version=e,this.buffers=t,this.types=s,this.metadata=r,this.lastOperationId=n,this.lastOperationAcceptedAt=i}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:i.default.removeUnnecessaryMetadata(this.types,this.metadata).map(o.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,i.default.prepareMetadataForOperations(e.types,e.metadata).map(o.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}}}},6148:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(e,t){super(),this.lastDocumentSession=e,this.currentDocumentSession=t}get data(){var e,t,s,r,n;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===(s=this.currentDocumentSession)||void 0===s?void 0:s.id,currentDocumentSessionVersion:null===(r=this.currentDocumentSession)||void 0===r?void 0:r.version,currentDocumentSessionOperationId:null===(n=this.currentDocumentSession)||void 0===n?void 0:n.lastOperationId}}toJSON(){var e,t,s,r,n;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===(s=this.currentDocumentSession)||void 0===s?void 0:s.id,currentDocumentSessionVersion:null===(r=this.currentDocumentSession)||void 0===r?void 0:r.version,currentDocumentSessionOperationId:null===(n=this.currentDocumentSession)||void 0===n?void 0:n.lastOperationId}}static fromJSON(e){const t=e.lastDocumentSessionId?{id:e.lastDocumentSessionId,lastOperationId:e.lastDocumentSessionOperationId}:void 0,s=e.currentDocumentSessionId?{lastOperationId:e.currentDocumentSessionOperationId,version:e.currentDocumentSessionVersion,id:e.currentDocumentSessionId}:void 0;return new i(t,s)}}t.default=i,i.DESCRIPTOR_NAME="GetDocumentDetailsResponse",i.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}}}},6042:function(e,t,s){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,s,r){void 0===r&&(r=s),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[s]}})}:function(e,t,s,r){void 0===r&&(r=s),e[r]=t[s]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var s in e)"default"!==s&&Object.prototype.hasOwnProperty.call(e,s)&&r(t,e,s);return n(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t._SERVICE=void 0;const a=s(2209),c=o(s(3596)),u=o(s(5420)),d=o(s(2280)),l=o(s(6376)),h=o(s(7608)),f=o(s(6178)),p=o(s(5711)),y=o(s(7955)),m=o(s(939)),v=o(s(6523)),x=o(s(1926)),_=o(s(7952)),g=i(s(7158)),b=o(s(357)),w=o(s(7026)),O=o(s(6314)),S=o(s(8801));t._SERVICE=9;class E{constructor(e){this._documentId=e,this._isConnected=!1}get isConnected(){return this._isConnected}async connect(e){if(this._isConnected)return;if(e.state!==g.WEB_SOCKET_GATEWAY_STATES.CONNECTED)throw new b.default("WebSocket Gateway is not connected.",e);const s=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(s)),{channel:n,threads:i}=c.default.decode(r,h.default);return this.listenTo(e,"change:state",((e,t,s)=>this._onWsGatewayStateChange(s)),{priority:g.default._CHANGE_STATE_EVENT_PRIORITY}),this._connectToChannel(e,n),this._isConnected=!0,this.fire("connected"),i}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,s,r){const n=new u.default(this._documentId,e,s,t,void 0,void 0,r),i=await this._sendRequest(u.default.TYPE,n);return c.default.decode(i,d.default)}async updateComment(e,t,s,r){const n=void 0!==r,i=new y.default(this._documentId,e,t,s,r,n);await this._sendRequest(y.default.TYPE,i)}async removeComment(e,t){const s=new f.default(this._documentId,e,t);await this._sendRequest(f.default.TYPE,s)}async removeCommentThread(e){const t=new p.default(this._documentId,e);await this._sendRequest(p.default.TYPE,t)}async getCommentThread(e,t=1){const s=new m.default(e,this._documentId);try{const e=await this._sendRequest(m.default.TYPE,s),{comments:t,commentThreadId:r}=c.default.decode(e,v.default);return{comments:t,commentThreadId:r}}catch(s){if(s instanceof S.default&&"404"===s.code&&t<5)return await(r=100*t,new Promise((e=>{setTimeout(e,r)}))),this.getCommentThread(e,t+1);if(s instanceof S.default)throw s;throw S.default.fromPublicError(s)}var r}async getDocumentThreads(){const e=new x.default(this._documentId),t=await this._sendRequest(x.default.TYPE,e),{threads:s}=c.default.decode(t,_.default);return{threads:s}}async getConnectedSessions(){if(!this._isConnected)throw new O.default("Comments",this);return this._connectedSessions||(this._connectedSessions=await w.default.getConnectedSessions(this._wsGateway,this._documentId,t._SERVICE)),this._connectedSessions}_connectToChannel(e,t){this._channel=e._getChannel(E._SERVICE,t),this._channel&&(this.listenTo(this._channel,this._channel.getEventName(u.default.TYPE),((e,t)=>{const s=c.default.decode(t,u.default);this.fire("commentAdded",s)})),this.listenTo(this._channel,this._channel.getEventName(f.default.TYPE),((e,t)=>{const s=c.default.decode(t,f.default);this.fire("commentRemoved",s)})),this.listenTo(this._channel,this._channel.getEventName(y.default.TYPE),((e,t)=>{const s=c.default.decode(t,y.default);this.fire("commentUpdated",s)})),this.listenTo(this._channel,this._channel.getEventName(p.default.TYPE),((e,t)=>{const s=c.default.decode(t,p.default);this.fire("commentThreadRemoved",s)})))}_onWsGatewayStateChange(e){e===g.WEB_SOCKET_GATEWAY_STATES.DISCONNECTED&&this.disconnect()}_sendRequest(e,s){if(!this._wsGateway||!this._isConnected)throw new O.default("Comments",this);return this._wsGateway._sendRequest(t._SERVICE,e,c.default.encode(s))}}E._SERVICE=t._SERVICE,(0,a.mix)(E,a.EmitterMixin),t.default=E},2529:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(5945));class i extends n.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=i,i.DESCRIPTOR_NAME="CommentDescriptor",i.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"}}}},1578:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(5945)),i=r(s(2529));class o extends n.default{static toJSON(e){var t;return{...e,comments:null===(t=e.comments)||void 0===t?void 0:t.map(i.default.toJSON)}}static fromJSON(e){var t;return{...e,comments:null===(t=e.comments)||void 0===t?void 0:t.map(i.default.fromJSON)}}}t.default=o,o.DESCRIPTOR_NAME="CommentsThreadDescriptor",o.DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},comments:{type:"CommentDescriptor",rule:"repeated",id:2}}}},5420:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(e,t,s,r="",n,i="",o=null){super(),this.documentId=e,this.commentThreadId=t,this.content=s,this.commentId=r,this.userId=i,this.attributes=o,this.createdAt=n?new Date(n):""}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)}}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):{})}}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}}}},6376:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(e){super(),this.documentId=e}toJSON(){return{documentId:this.documentId}}static fromJSON(e){return new i(e.documentId)}}t.default=i,i.TYPE="92",i.READABLE_TYPE_NAME="connectToComment",i.DESCRIPTOR_NAME="CommentsV2ConnectMessage",i.DESCRIPTOR={fields:{documentId:{type:"string",id:1}}}},939:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(e,t){super(),this.commentThreadId=e,this.documentId=t}toJSON(){return{commentThreadId:this.commentThreadId,documentId:this.documentId}}static fromJSON(e){return new i(e.commentThreadId,e.documentId)}}t.default=i,i.TYPE="93",i.READABLE_TYPE_NAME="getComment",i.DESCRIPTOR_NAME="CommentsV2GetCommentThreadMessage",i.DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},documentId:{type:"string",id:2}}}},1926:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(e){super(),this.documentId=e}toJSON(){return{documentId:this.documentId}}static fromJSON(e){return new i(e.documentId)}}t.default=i,i.TYPE="94",i.READABLE_TYPE_NAME="getDocumentThreads",i.DESCRIPTOR_NAME="CommentsV2GetDocumentThreadsMessage",i.DESCRIPTOR={fields:{documentId:{type:"string",id:1}}}},6178:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(e,t,s){super(),this.documentId=e,this.commentThreadId=t,this.commentId=s}toJSON(){return{documentId:this.documentId,commentThreadId:this.commentThreadId,commentId:this.commentId}}static fromJSON(e){return new i(e.documentId,e.commentThreadId,e.commentId)}}t.default=i,i.TYPE="95",i.READABLE_TYPE_NAME="removeComment",i.DESCRIPTOR_NAME="CommentsV2RemoveCommentMessage",i.DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},commentId:{type:"string",id:2},documentId:{type:"string",id:3}}}},5711:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(e,t){super(),this.documentId=e,this.commentThreadId=t}toJSON(){return{documentId:this.documentId,commentThreadId:this.commentThreadId}}static fromJSON(e){return new i(e.documentId,e.commentThreadId)}}t.default=i,i.TYPE="97",i.READABLE_TYPE_NAME="removeCommentThread",i.DESCRIPTOR_NAME="CommentsV2RemoveCommentThreadMessage",i.DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},documentId:{type:"string",id:2}}}},7955:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(e,t,s,r,n=null,i=!1){super(),this.documentId=e,this.commentThreadId=t,this.commentId=s,this.content=r,this.attributes=n,this.isAttributesUpdated=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}}static fromJSON(e){return new i(e.documentId,e.commentThreadId,e.commentId,e.content,e.attributes?JSON.parse(e.attributes):null,e.isAttributesUpdated)}}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}}}},2280:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(e,t,s){super(),this.commentThreadId=e,this.commentId=t,this.createdAt=new Date(s)}toJSON(){return{commentThreadId:this.commentThreadId,commentId:this.commentId,createdAt:this.createdAt.toISOString()}}static fromJSON(e){return new i(e.commentThreadId,e.commentId,e.createdAt)}}t.default=i,i.DESCRIPTOR_NAME="CommentsV2AddCommentResponse",i.DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},commentId:{type:"string",id:2},createdAt:{type:"string",id:3}}}},7608:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545)),i=r(s(1578));class o extends n.default{constructor(e,t,s){super(),this.channel=e,this._threads=t,this._threadsV2=s,this.threads=(null==s?void 0:s.length)?s: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(i.default.toJSON)}}static fromJSON(e){var t,s;return new o(e.channel,null===(t=e.threads)||void 0===t?void 0:t.map((e=>JSON.parse(e))),null===(s=e.threadsV2)||void 0===s?void 0:s.map(i.default.fromJSON))}}t.default=o,o.DESCRIPTOR_NAME="CommentsV2ConnectResponse",o.DESCRIPTOR={fields:{channel:{type:"string",id:1},threads:{type:"string",rule:"repeated",id:2},threadsV2:{type:"CommentsThreadDescriptor",rule:"repeated",id:3}}}},6523:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545)),i=r(s(2529));class o extends n.default{constructor(e,t,s){super(),this.commentThreadId=e,this._comments=t,this._commentsV2=s,this.comments=(null==s?void 0:s.length)?s:t}toJSON(){var e,t;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(i.default.toJSON)}}static fromJSON(e){var t,s;return new o(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===(s=e.commentsV2)||void 0===s?void 0:s.map(i.default.fromJSON))}}t.default=o,o.DESCRIPTOR_NAME="CommentsV2GetCommentThreadResponse",o.DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},comments:{type:"string",rule:"repeated",id:2},commentsV2:{type:"CommentDescriptor",rule:"repeated",id:3}}}},7952:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545)),i=r(s(1578));class o extends n.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(i.default.toJSON)}}static fromJSON(e){var t,s;return new o(null===(t=e.threads)||void 0===t?void 0:t.map((e=>function(e){var t;const s=JSON.parse(e),r={...s};return s.comments&&(r.comments=null===(t=s.comments)||void 0===t?void 0:t.map((e=>({...e,createdAt:new Date(e.createdAt)})))),r}(e))),null===(s=e.threadsV2)||void 0===s?void 0:s.map(i.default.fromJSON))}}t.default=o,o.DESCRIPTOR_NAME="CommentsV2GetDocumentThreadsResponse",o.DESCRIPTOR={fields:{threads:{type:"string",rule:"repeated",id:1},threadsV2:{type:"CommentsThreadDescriptor",rule:"repeated",id:2}}}},5945:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=class{constructor(...e){}}},6345:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(5945));class i extends n.default{}t.default=i,i.DESCRIPTOR_NAME="KeyValueDescriptor",i.DESCRIPTOR={fields:{key:{type:"string",id:1},value:{type:"string",id:2}}}},8689:function(e,t,s){"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 n=s(2209),i=r(s(3596)),o=s(7158),a=r(s(6052)),c=r(s(4910)),u=r(s(357));t._SERVICE=13;class d{static async isBundleUploaded(e,t){const s=new a.default(t);if(e.state!==o.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,i.default.encode(s));return i.default.decode(r,c.default).isUploaded}}d._SERVICE=t._SERVICE,(0,n.mix)(d,n.EmitterMixin),t.default=d},6052:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(e){super(),this.bundleVersion=e}toJSON(){return{bundleVersion:this.bundleVersion}}static fromJSON(e){return new i(e.bundleVersion)}}t.default=i,i.TYPE="131",i.READABLE_TYPE_NAME="isEditorBundleUploaded",i.DESCRIPTOR_NAME="IsEditorBundleUploadedMessage",i.DESCRIPTOR={fields:{bundleVersion:{type:"string",id:1}}}},4910:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(e){super(),this.isUploaded=e}toJSON(){return{isUploaded:this.isUploaded}}static fromJSON(e){return new i(e.isUploaded)}}t.default=i,i.DESCRIPTOR_NAME="IsEditorBundleUploadedResponse",i.DESCRIPTOR={fields:{isUploaded:{type:"bool",id:1}}}},6314:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(357));class i extends n.default{constructor(e,t){super(e+" Service is not connected.",t)}}t.default=i},3545:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(5945));class i extends n.default{constructor(...e){super()}static fromJSON(e){throw new TypeError("Must be implemented in a child class!")}}t.default=i,i.TYPE="1000"},3596:function(e,t,s){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,s,r){void 0===r&&(r=s),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[s]}})}:function(e,t,s,r){void 0===r&&(r=s),e[r]=t[s]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var s in e)"default"!==s&&Object.prototype.hasOwnProperty.call(e,s)&&r(t,e,s);return n(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=i(s(6154)),c=o(s(6783)),u=o(s(8677)),d=o(s(6345)),l=o(s(7618)),h=o(s(2529)),f=o(s(1578)),p=o(s(1706)),y=o(s(9883)),m=[d.default,c.default,u.default,l.default,h.default,f.default,p.default,y.default],v=a.Root.fromJSON({nested:m.reduce(((e,t)=>(e[t.DESCRIPTOR_NAME]=t.DESCRIPTOR,e)),{})});function x(e){return t=e,v.lookup(t.DESCRIPTOR_NAME)||v.addJSON({[t.DESCRIPTOR_NAME]:t.DESCRIPTOR}),v.lookupType(e.DESCRIPTOR_NAME);var t}t.default=class{static decode(e,t){const s=x(t).decode("undefined"==typeof window?e:new Uint8Array(e));return t.fromJSON({...s})}static encode(e){const t=x(e.constructor),s=e.toJSON(),r=t.verify(s);if(r)throw Error(r);return t.encode(t.create(s)).finish()}}},9883:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(5945));class i extends n.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,s]of Object.entries(e))void 0===s&&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=i,i.DESCRIPTOR_NAME="RevisionDescriptor",i.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}}}},801:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(e){super(),this.documentId=e}toJSON(){return{documentId:this.documentId}}static fromJSON(e){return new i(e.documentId)}}t.default=i,i.TYPE="121",i.READABLE_TYPE_NAME="connectToRevisionHistory",i.DESCRIPTOR_NAME="RevisionHistoryConnectMessage",i.DESCRIPTOR={fields:{documentId:{type:"string",id:1}}}},3667:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(e,t){super(),this.documentId=e,this.revisionId=t}toJSON(){return{documentId:this.documentId,revisionId:this.revisionId}}static fromJSON(e){return new i(e.documentId,e.revisionId)}}t.default=i,i.TYPE="123",i.READABLE_TYPE_NAME="getRevision",i.DESCRIPTOR_NAME="RevisionHistoryGetRevisionMessage",i.DESCRIPTOR={fields:{documentId:{type:"string",id:1},revisionId:{type:"string",id:2}}}},8702:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(e,t){super(),this.documentId=e,this.requestId=t}toJSON(){return{documentId:this.documentId,requestId:this.requestId}}static fromJSON(e){return new i(e.documentId,e.requestId)}}t.default=i,i.TYPE="122",i.READABLE_TYPE_NAME="reconnectToRevisionHistory",i.DESCRIPTOR_NAME="RevisionHistoryReconnectMessage",i.DESCRIPTOR={fields:{documentId:{type:"string",id:1},requestId:{type:"uint32",id:2}}}},6120:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545)),i=r(s(9883));class o extends n.default{constructor(e,t,s){super(),this.documentId=e,this.requestId=t,this.revisions=s}toJSON(){return{documentId:this.documentId,requestId:this.requestId,revisions:this.revisions.map(i.default.toJSON)}}toObject(){return{documentId:this.documentId,requestId:this.requestId,revisions:this.revisions.map(i.default.toObject)}}static create(e){return new o(e.documentId,e.requestId,e.revisions.map(i.default.create))}static fromJSON(e){return new o(e.documentId,e.requestId,e.revisions.map(i.default.fromJSON))}}t.default=o,o.TYPE="124",o.READABLE_TYPE_NAME="updateRevisions",o.DESCRIPTOR_NAME="RevisionHistoryUpdateRevisionsMessage",o.DESCRIPTOR={fields:{documentId:{type:"string",id:1},requestId:{type:"uint32",id:2},revisions:{type:"RevisionDescriptor",id:3,rule:"repeated"}}}},5218:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545)),i=r(s(9883));class o extends n.default{constructor(e,t,s){super(),this.channel=e,this.requestId=t,this.revisions=s}toJSON(){return{channel:this.channel,requestId:this.requestId,revisions:this.revisions.map(i.default.toJSON)}}toObject(){return{channel:this.channel,requestId:this.requestId,revisions:this.revisions.map(i.default.toObject)}}static fromJSON(e){return new o(e.channel,e.requestId,e.revisions.map(i.default.fromJSON))}}t.default=o,o.DESCRIPTOR_NAME="RevisionHistoryConnectResponse",o.DESCRIPTOR={fields:{channel:{type:"string",id:1},requestId:{type:"uint32",id:2},revisions:{type:"RevisionDescriptor",id:3,rule:"repeated"}}}},6311:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545)),i=r(s(9883));class o extends n.default{constructor(e,t,s,r,n,i,o,a,c,u){super(),this.revisionId=e,this.name=t,this.creatorId=s,this.authorsIds=r,this.createdAt=n,this.diffData=i,this.attributes=o,this.fromVersion=a,this.toVersion=c,this.isEmptyCurrent=u}toJSON(){return i.default.toJSON(this)}toObject(){return i.default.toObject(this)}static create(e){return new o(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 o(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=o,o.DESCRIPTOR_NAME="RevisionHistoryGetRevisionResponse",o.DESCRIPTOR=i.default.DESCRIPTOR},1655:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(e){super(),this.requestId=e}toJSON(){return{requestId:this.requestId}}static fromJSON(e){return new i(e.requestId)}}t.default=i,i.DESCRIPTOR_NAME="RevisionHistoryUpdateRevisionsResponse",i.DESCRIPTOR={fields:{requestId:{type:"uint32",id:1}}}},8811:function(e,t,s){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,s,r){void 0===r&&(r=s),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[s]}})}:function(e,t,s,r){void 0===r&&(r=s),e[r]=t[s]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var s in e)"default"!==s&&Object.prototype.hasOwnProperty.call(e,s)&&r(t,e,s);return n(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t._SERVICE=void 0;const a=s(2209),c=o(s(3596)),u=o(s(3667)),d=o(s(6311)),l=o(s(6120)),h=o(s(1655)),f=o(s(801)),p=o(s(5218)),y=o(s(8702)),m=o(s(357)),v=i(s(7158)),x=o(s(6314));t._SERVICE=12;class _{constructor(e){this._documentId=e,this._isConnected=!1}get isConnected(){return this._isConnected}connect(e){return this._isConnected?Promise.resolve():this._connect(e,new f.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 m.default("Cannot reconnect to already connected service.",e);return this._connect(e,new y.default(this._documentId,t))}async updateRevisions(e,t){const s=l.default.create({documentId:this._documentId,requestId:t,revisions:e}),r=await this._sendRequest(l.default.TYPE,s),{requestId:n}=c.default.decode(r,h.default);return n}async getRevision(e){const t=new u.default(this._documentId,e),s=await this._sendRequest(u.default.TYPE,t);return c.default.decode(s,d.default).toObject()}async _connect(e,s){if(e.state!==v.WEB_SOCKET_GATEWAY_STATES.CONNECTED)throw new m.default("WebSocket Gateway is not connected.",e);this._wsGateway=e,this.stopListening(e,"change:state");const r=await e._sendRequest(t._SERVICE,s.constructor.TYPE,c.default.encode(s)),{channel:n,requestId:i,revisions:o}=c.default.decode(r,p.default).toObject();return this.listenTo(e,"change:state",((e,t,s)=>this._onWsGatewayStateChange(s)),{priority:v.default._CHANGE_STATE_EVENT_PRIORITY}),this._connectToChannel(e,n),this._isConnected=!0,this.fire("connected"),{revisions:o,requestId:i}}_connectToChannel(e,t){this._channel=e._getChannel(_._SERVICE,t),this._channel&&this.listenTo(this._channel,this._channel.getEventName(l.default.TYPE),((e,t)=>{const{documentId:s,requestId:r,revisions:n}=c.default.decode(t,l.default).toObject();this.fire("revisionsUpdated",{documentId:s,requestId:r,revisionsData:n})}))}_onWsGatewayStateChange(e){e===v.WEB_SOCKET_GATEWAY_STATES.DISCONNECTED&&this.disconnect()}_sendRequest(e,s){if(!this._wsGateway||!this._isConnected)throw new x.default("Revision History",this);return this._wsGateway._sendRequest(t._SERVICE,e,c.default.encode(s))}}_._SERVICE=t._SERVICE,(0,a.mix)(_,a.EmitterMixin),t.default=_},6783:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(5945));class i extends n.default{}t.default=i,i.DESCRIPTOR_NAME="SessionsSocketDescriptor",i.DESCRIPTOR={fields:{session:{type:"string",id:1},user:{type:"string",id:2},role:{id:3,type:"string"},permissions:{rule:"repeated",type:"string",id:4}}}},2366:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(e,t){super(),this.id=e,this.sessionType=t}toJSON(){return{id:this.id,sessionType:this.sessionType}}static fromJSON(e){return new i(e.id,e.sessionType)}}t.default=i,i.TYPE="31",i.READABLE_TYPE_NAME="getConnectedSockets",i.DESCRIPTOR_NAME="SessionsConnectMessage",i.DESCRIPTOR={fields:{id:{type:"string",id:1},sessionType:{type:"uint32",id:2}}}},2414:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(e,t,s,r){super(),this.id=e,this.userId=t,this.role=s,this.permissions=r}toJSON(){var e,t,s;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!==(s=this.permissions)&&void 0!==s?s:void 0}}static fromJSON(e){return new i(e.id,e.userId,e.role,e.permissions)}}t.default=i,i.TYPE="32",i.READABLE_TYPE_NAME="connectSocket",i.DESCRIPTOR_NAME="SocketConnectMessage",i.DESCRIPTOR={fields:{id:{type:"string",id:1},userId:{type:"string",id:2},role:{type:"string",id:3},permissions:{rule:"repeated",type:"string",id:4}}}},4194:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(e){super(),this.id=e}toJSON(){return{id:this.id}}static fromJSON(e){return new i(e.id)}}t.default=i,i.TYPE="33",i.READABLE_TYPE_NAME="disconnectSocket",i.DESCRIPTOR_NAME="SocketDisconnectMessage",i.DESCRIPTOR={fields:{id:{type:"string",id:1}}}},6145:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.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 i(e.channel,e.sockets.map((e=>({id:e.session,userId:e.user,role:e.role,permissions:e.permissions}))))}}t.default=i,i.DESCRIPTOR_NAME="SessionsConnectResponse",i.DESCRIPTOR={fields:{channel:{type:"string",id:1},sockets:{rule:"repeated",type:"SessionsSocketDescriptor",id:2}}}},2690:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=s(2209),i=s(7026),o=r(s(7530)),a=r(s(7158)),c=r(s(6145)),u=r(s(2366)),d=r(s(2414)),l=r(s(4194)),h=r(s(3596));class f extends n.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 s;try{const e=await this._wsGateway._sendRequest(i._SERVICE,u.default.TYPE,h.default.encode(t));s=h.default.decode(e,c.default)}catch(e){s=new c.default(this._id,[])}this._connectToChannel(this._wsGateway,s.channel,this._sessionType);const r=await async function(e,t){const s=t.map((e=>e.userId)),r=s.length?await o.default.getMany(e,s):[];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 o.default,t}))}(this._wsGateway,s.sockets);for(const e of r)super.add(e);this._connected=!0,this.fire("connected"),this.listenTo(this._wsGateway,"change:state",((e,t,s)=>this._onWsGatewayStateChange(s)),{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,s){this._channel=e._getChannel(s,t),this._channel&&(this._addHandler(this._channel,d.default.TYPE,(async t=>{const s=h.default.decode(t,d.default);if(-1===this.getIndex(s.id)){const t={id:s.id,role:s.role,permissions:s.permissions};s.userId&&(t.user=await o.default.get(e,s.userId)),super.add(t)}})),this._addHandler(this._channel,l.default.TYPE,(e=>{const t=h.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,s){const r=e.getEventName(t,!0);this.listenTo(e,r,(async(e,t)=>{const s=e.name;this._eventsQueue.push({eventName:s,data:t}),await this._runQueue()})),this._handlers.set(r,s)}}t.default=f},7026:function(e,t,s){"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 n=r(s(2690));t._SERVICE=3,t.default=class{static async getConnectedSessions(e,t,s){const r=new n.default(t,s);return await r.connect(e),r}}},1706:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(5945));class i extends n.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=i,i.DESCRIPTOR_NAME="SuggestionDescriptor",i.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"}}}},597:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(e,t,s,r={},n=null,i=null){super(),this.id=e,this.documentId=t,this.type=s,this.data=r,this.originalSuggestionId=n,this.attributes=i}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 i(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=i,i.TYPE="101",i.READABLE_TYPE_NAME="addSuggestion",i.DESCRIPTOR_NAME="TrackChangesAddSuggestionMessage",i.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}}}},3268:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(e,t,s){super(),this.ids=e,this.documentId=t,this.state=s}toJSON(){return{ids:this.ids,documentId:this.documentId,state:this.state}}static fromJSON(e){return new i(e.ids,e.documentId,e.state)}}t.default=i,i.TYPE="106",i.READABLE_TYPE_NAME="batchUpdateSuggestionsState",i.DESCRIPTOR_NAME="TrackChangesBatchUpdateSuggestionsStateMessage",i.DESCRIPTOR={fields:{ids:{type:"string",rule:"repeated",id:1},documentId:{type:"string",id:2},state:{type:"string",id:3}}}},144:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(e){super(),this.documentId=e}toJSON(){return{documentId:this.documentId}}static fromJSON(e){return new i(e.documentId)}}t.default=i,i.TYPE="105",i.READABLE_TYPE_NAME="connectToSuggestions",i.DESCRIPTOR_NAME="TrackChangesConnectMessage",i.DESCRIPTOR={fields:{documentId:{type:"string",id:1}}}},2679:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(e){super(),this.documentId=e}toJSON(){return{documentId:this.documentId}}static fromJSON(e){return new i(e.documentId)}}t.default=i,i.TYPE="102",i.READABLE_TYPE_NAME="getAllSuggestions",i.DESCRIPTOR_NAME="TrackChangesGetAllSuggestionMessage",i.DESCRIPTOR={fields:{documentId:{type:"string",id:1}}}},1659:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(e,t){super(),this.id=e,this.documentId=t}toJSON(){return{id:this.id,documentId:this.documentId}}static fromJSON(e){return new i(e.id,e.documentId)}}t.default=i,i.TYPE="103",i.READABLE_TYPE_NAME="getSuggestion",i.DESCRIPTOR_NAME="TrackChangesGetSuggestionMessage",i.DESCRIPTOR={fields:{id:{type:"string",id:1},documentId:{type:"string",id:2}}}},598:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(e,t,s,r,n,i=null){super(),this.id=e,this.documentId=t,this.hasComments=s,this.isHasCommentsModified=r,this.state=n,this.attributes=i}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 i(e.id,e.documentId,e.hasComments,e.isHasCommentsModified,e.state,e.attributes?JSON.parse(e.attributes):null)}}t.default=i,i.TYPE="104",i.READABLE_TYPE_NAME="updateSuggestion",i.DESCRIPTOR_NAME="TrackChangesUpdateSuggestionMessage",i.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}}}},3111:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(e,t,s,r,n,i,o={},a=null){super(),this.id=e,this.authorId=t,this.type=s,this.hasComments=n,this.state=i,this.data=o,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 i(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=i,i.DESCRIPTOR_NAME="TrackChangesAddSuggestionResponse",i.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}}}},701:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545)),i=r(s(1706));class o extends n.default{constructor(e,t,s){super(),this.channel=e,this._suggestions=t,this._suggestionsV2=s,this.suggestions=(null==s?void 0:s.length)?s: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(i.default.toJSON)}}static fromJSON(e){var t,s;return new o(e.channel,null===(t=e.suggestions)||void 0===t?void 0:t.map((e=>JSON.parse(e))),null===(s=e.suggestionsV2)||void 0===s?void 0:s.map(i.default.fromJSON))}}t.default=o,o.DESCRIPTOR_NAME="TrackChangesConnectResponse",o.DESCRIPTOR={fields:{channel:{type:"string",id:1},suggestions:{type:"string",rule:"repeated",id:2},suggestionsV2:{type:"SuggestionDescriptor",rule:"repeated",id:3}}}},3390:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545)),i=r(s(1706));class o extends n.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(i.default.toJSON)}}static fromJSON(e){var t,s;return new o(null===(t=e.suggestions)||void 0===t?void 0:t.map(a),null===(s=e.suggestionsV2)||void 0===s?void 0:s.map(i.default.fromJSON))}}function a(e){const t=JSON.parse(e);return t.createdAt=t.createdAt?new Date(t.createdAt):void 0,t}t.default=o,o.DESCRIPTOR_NAME="TrackChangesGetAllSuggestionsResponse",o.DESCRIPTOR={fields:{suggestions:{type:"string",rule:"repeated",id:1},suggestionsV2:{type:"SuggestionDescriptor",rule:"repeated",id:2}}}},5930:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(e,t,s,r,n,i,o={},a=null){super(),this.id=e,this.authorId=t,this.type=s,this.hasComments=n,this.state=i,this.data=o,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 i(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=i,i.DESCRIPTOR_NAME="TrackChangesGetSuggestionResponse",i.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}}}},125:function(e,t,s){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,s,r){void 0===r&&(r=s),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[s]}})}:function(e,t,s,r){void 0===r&&(r=s),e[r]=t[s]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var s in e)"default"!==s&&Object.prototype.hasOwnProperty.call(e,s)&&r(t,e,s);return n(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t._SERVICE=void 0;const a=s(2209),c=o(s(3596)),u=o(s(597)),d=o(s(3111)),l=o(s(1659)),h=o(s(5930)),f=o(s(2679)),p=o(s(3390)),y=o(s(598)),m=o(s(144)),v=o(s(701)),x=o(s(357)),_=i(s(7158)),g=o(s(6314)),b=o(s(8801)),w=o(s(3268));t._SERVICE=10;class O{constructor(e){this._documentId=e,this._isConnected=!1}get isConnected(){return this._isConnected}async connect(e){if(this._isConnected)return;if(e.state!==_.WEB_SOCKET_GATEWAY_STATES.CONNECTED)throw new x.default("WebSocket Gateway is not connected.",e);const s=new m.default(this._documentId);this._wsGateway=e,this.stopListening(e,"change:state");const r=await e._sendRequest(t._SERVICE,m.default.TYPE,c.default.encode(s)),n=c.default.decode(r,v.default);return this.listenTo(e,"change:state",((e,t,s)=>this._onWsGatewayStateChange(s)),{priority:_.default._CHANGE_STATE_EVENT_PRIORITY}),this._connectToChannel(e,n.channel),this._isConnected=!0,this.fire("connected"),n.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,s,r=null,n){const i=new u.default(e,this._documentId,t,s,r,n),o=await this._sendRequest(u.default.TYPE,i);return c.default.decode(o,d.default)}async get(e,t=1){const s=new l.default(e,this._documentId);try{const e=await this._sendRequest(l.default.TYPE,s);return c.default.decode(e,h.default)}catch(s){if(s instanceof b.default&&"404"===s.code&&t<5)return await(r=100*t,new Promise((e=>{setTimeout(e,r)}))),this.get(e,t+1);if(s instanceof b.default)throw s;throw b.default.fromPublicError(s)}var r}async getAll(){const e=new f.default(this._documentId),t=await this._sendRequest(f.default.TYPE,e),{suggestions:s}=c.default.decode(t,p.default);return s}async update(e,t={}){const{hasComments:s,state:r,attributes:n}=t,i=void 0!==s,o=new y.default(e,this._documentId,s,i,r,n);await this._sendRequest(y.default.TYPE,o)}async batchUpdateState(e){const t=new w.default(e.ids,this._documentId,e.state);await this._sendRequest(w.default.TYPE,t)}_connectToChannel(e,t){this._channel=e._getChannel(O._SERVICE,t),this._channel&&this.listenTo(this._channel,this._channel.getEventName(y.default.TYPE),((e,t)=>{const s=c.default.decode(t,y.default);this.fire("suggestionUpdated",s)}))}_onWsGatewayStateChange(e){e===_.WEB_SOCKET_GATEWAY_STATES.DISCONNECTED&&this.disconnect()}_sendRequest(e,s){if(!this._wsGateway||!this._isConnected)throw new g.default("Track Changes",this);return this._wsGateway._sendRequest(t._SERVICE,e,c.default.encode(s))}}O._SERVICE=t._SERVICE,(0,a.mix)(O,a.EmitterMixin),t.default=O},7618:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(5945));class i extends n.default{}t.default=i,i.DESCRIPTOR_NAME="UserDescriptor",i.DESCRIPTOR={fields:{attributes:{rule:"repeated",type:"KeyValueDescriptor",id:1}}}},7204:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(e){super(),this.ids=e}toJSON(){return{ids:this.ids}}static fromJSON(e){return new i(e.ids)}}t.default=i,i.TYPE="22",i.READABLE_TYPE_NAME="getManyUsers",i.DESCRIPTOR_NAME="GetManyUsersMessage",i.DESCRIPTOR={fields:{ids:{id:1,type:"string",rule:"repeated"}}}},1779:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(e){super(),this.id=e}toJSON(){return{id:this.id}}static fromJSON(e){return new i(e.id)}}t.default=i,i.TYPE="21",i.READABLE_TYPE_NAME="getUser",i.DESCRIPTOR_NAME="GetUserMessage",i.DESCRIPTOR={fields:{id:{type:"string",id:1}}}},624:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(e){super(),this.users=e}toJSON(){return{users:this.users.map(o)}}static fromJSON(e){return new i(e.users.map(a))}}function o(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=i,i.DESCRIPTOR_NAME="GetManyUsersResponse",i.DESCRIPTOR={fields:{users:{rule:"repeated",type:"UserDescriptor",id:1}}}},2184:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.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 i(t)}}t.default=i,i.DESCRIPTOR_NAME="GetUserResponse",i.DESCRIPTOR={fields:{attributes:{rule:"repeated",type:"KeyValueDescriptor",id:1}}}},7530:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(1779)),i=r(s(2184)),o=r(s(3596)),a=r(s(7204)),c=r(s(624));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 s=new n.default(t);try{const t=await e._sendRequest(u._SERVICE,n.default.TYPE,o.default.encode(s)),r=o.default.decode(t,i.default);return new u(r.attributes)}catch(e){return new u({id:t})}}static async getMany(e,t){const s=new a.default(t);try{const t=await e._sendRequest(u._SERVICE,a.default.TYPE,o.default.encode(s));return o.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},6754:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default="36.0.0"},1573:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=s(2209),i=r(s(3554)),o=r(s(3596));class a{constructor(e,t,s){this._channelName=e,this._wsGateway=t,this._socket=s,this._subscribeToChannel()}remove(){this._socket.off(this._channelName)}getEventName(e,t=!1){let s="";return t&&(s+="all:"),s+="event",e&&(s+=":"+e),s}_subscribeToChannel(){this._socket.on(this._channelName,(e=>{const t=o.default.decode(e,i.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)}))}}(0,n.mix)(a,n.EmitterMixin),t.default=a},3554:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(e,t,s){super(),this.type=e,this.socketId=t,this.data=s}toJSON(){return{type:this.type,socketId:this.socketId,data:this.data}}static fromJSON(e){return new i(e.type,e.socketId,e.data)}}t.default=i,i.DESCRIPTOR_NAME="ChannelMessage",i.DESCRIPTOR={fields:{type:{type:"uint32",id:1},socketId:{type:"string",id:2},data:{type:"bytes",id:3}}}},8735:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(4990)),i=r(s(3596));t.default=class{encode(e,t,s,r="/",o={}){if(t.length>2)throw new Error("PacketParser supports only 2 elements in data");const a={type:e,data:t,id:s,nsp:r};return i.default.encode(n.default.create(a,o))}decode(e){const t=i.default.decode(e,n.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}}}}},2854:function(e,t,s){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,s,r){void 0===r&&(r=s),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[s]}})}:function(e,t,s,r){void 0===r&&(r=s),e[r]=t[s]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var s in e)"default"!==s&&Object.prototype.hasOwnProperty.call(e,s)&&r(t,e,s);return n(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=o(s(799)),c=i(s(817));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}}}},4253:function(e,t,s){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,s,r){void 0===r&&(r=s),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[s]}})}:function(e,t,s,r){void 0===r&&(r=s),e[r]=t[s]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var s in e)"default"!==s&&Object.prototype.hasOwnProperty.call(e,s)&&r(t,e,s);return n(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=o(s(799)),c=i(s(817));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}}}},1433:function(e,t,s){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,s,r){void 0===r&&(r=s),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[s]}})}:function(e,t,s,r){void 0===r&&(r=s),e[r]=t[s]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var s in e)"default"!==s&&Object.prototype.hasOwnProperty.call(e,s)&&r(t,e,s);return n(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=o(s(799)),c=i(s(817));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}}}},2272:function(e,t,s){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,s,r){void 0===r&&(r=s),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[s]}})}:function(e,t,s,r){void 0===r&&(r=s),e[r]=t[s]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var s in e)"default"!==s&&Object.prototype.hasOwnProperty.call(e,s)&&r(t,e,s);return n(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=o(s(799)),c=i(s(817));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}}}},1692:function(e,t,s){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,s,r){void 0===r&&(r=s),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[s]}})}:function(e,t,s,r){void 0===r&&(r=s),e[r]=t[s]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var s in e)"default"!==s&&Object.prototype.hasOwnProperty.call(e,s)&&r(t,e,s);return n(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=o(s(799)),c=i(s(817));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}}}},7239:function(e,t,s){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,s,r){void 0===r&&(r=s),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[s]}})}:function(e,t,s,r){void 0===r&&(r=s),e[r]=t[s]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var s in e)"default"!==s&&Object.prototype.hasOwnProperty.call(e,s)&&r(t,e,s);return n(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=o(s(799)),c=i(s(817));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}}}},9075:function(e,t,s){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,s,r){void 0===r&&(r=s),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[s]}})}:function(e,t,s,r){void 0===r&&(r=s),e[r]=t[s]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var s in e)"default"!==s&&Object.prototype.hasOwnProperty.call(e,s)&&r(t,e,s);return n(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=o(s(799)),c=i(s(817));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}}}},799:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{static create(e,t){throw new TypeError("Must be implemented in a child class!")}}t.default=i,e.exports=i},4990:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3596)),i=r(s(3545)),o=r(s(338)),a=r(s(817)),c=r(s(4253)),u=r(s(6335)),d=r(s(2854)),l=r(s(9769)),h=r(s(2272)),f=r(s(9075)),p=r(s(7239)),y=r(s(1797)),m=r(s(1694)),v=r(s(1433)),x=r(s(1692)),_=[c.default,u.default,d.default,l.default,h.default,f.default,p.default,y.default,m.default,v.default,x.default].reduce(((e,t)=>(e[t.TYPE]=t,e)),{});class g extends i.default{constructor(e,t,s,r="/",n=new o.default){super(),this.type=e,this.data=t,this.id=s,this.nsp=r,this.options=n}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=n.default.encode(this.options),t=n.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 g(e.type-10*t,n.default.decode(e.data,_[t]),e.id,e.nsp,e.options?n.default.decode(e.options,o.default):new o.default)}static create(e,t={}){var s;const r=a.default.getPacketType(a.default.getType(e.data[0]),a.default.getType(null!==(s=e.data[1])&&void 0!==s?s:e.data[0]));return new g(e.type,_[r].create(e.data[0],e.data[1]),e.id,e.nsp,new o.default(t.flags,t.rooms,t.except))}}t.default=g,g.TYPE=10,g.DESCRIPTOR_NAME="PacketMessage",g.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}}}},338:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(e,t=[],s=[]){super(),this.flags=e,this.rooms=t,this.except=s}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 i(e.flags&&JSON.parse(e.flags),e.rooms,e.except)}}t.default=i,i.TYPE=11,i.DESCRIPTOR_NAME="PacketOptionsMessage",i.DESCRIPTOR={fields:{flags:{type:"string",id:1},rooms:{type:"string",id:2,rule:"repeated"},except:{type:"string",id:3,rule:"repeated"}}}},6335:function(e,t,s){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,s,r){void 0===r&&(r=s),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[s]}})}:function(e,t,s,r){void 0===r&&(r=s),e[r]=t[s]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var s in e)"default"!==s&&Object.prototype.hasOwnProperty.call(e,s)&&r(t,e,s);return n(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=o(s(799)),c=i(s(817));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}}}},1694:function(e,t,s){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,s,r){void 0===r&&(r=s),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[s]}})}:function(e,t,s,r){void 0===r&&(r=s),e[r]=t[s]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var s in e)"default"!==s&&Object.prototype.hasOwnProperty.call(e,s)&&r(t,e,s);return n(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=o(s(799)),c=i(s(817));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}}}},9769:function(e,t,s){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,s,r){void 0===r&&(r=s),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[s]}})}:function(e,t,s,r){void 0===r&&(r=s),e[r]=t[s]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var s in e)"default"!==s&&Object.prototype.hasOwnProperty.call(e,s)&&r(t,e,s);return n(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=o(s(799)),c=i(s(817));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}}}},1797:function(e,t,s){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,s,r){void 0===r&&(r=s),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[s]}})}:function(e,t,s,r){void 0===r&&(r=s),e[r]=t[s]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var s in e)"default"!==s&&Object.prototype.hasOwnProperty.call(e,s)&&r(t,e,s);return n(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=o(s(799)),c=i(s(817));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}}}},2069:function(e,t,s){"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 n=s(170),i=r(s(8735)),o=r(s(817));t.ENCODED_TYPES=[n.PacketType.EVENT,n.PacketType.ACK,n.PacketType.BINARY_ACK,n.PacketType.BINARY_EVENT];class a extends n.Encoder{constructor(e=new i.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 n.Decoder{constructor(e=new i.default){super(),this._packetParser=e}add(e){if(!o.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},817:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageDataTypes=void 0;const s=!("undefined"==typeof process||!process.versions||!process.versions.node);var r,n;(n=r=t.MessageDataTypes||(t.MessageDataTypes={}))[n.BUFFER=1]="BUFFER",n[n.STRING=2]="STRING",n[n.NUMBER=3]="NUMBER",n[n.OBJECT=4]="OBJECT";class i{static getPacketType(...e){let t=0;for(let s=0;s<e.length;s++)t+=e[s]*Math.pow(10,e.length-s-1);return t}static getType(e){if(i.isBuffer(e))return r.BUFFER;const t=typeof e;return"string"===t?r.STRING:"number"===t?r.NUMBER:r.OBJECT}static isBuffer(e){return s&&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=i},1113:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(357));class i{constructor(e,t){this._context=e,this._deferredPromise=function(){let e,t;const s=new Promise(((s,r)=>{e=s,t=r}));return{resolve:e,reject:t,promise:s}}(),this.timeout=setTimeout((()=>this.error(new n.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=1e4){const s=this._createRequest(t);try{return e(s),await s.promise}finally{this._finishRequest(s)}}errorAll(e){for(const t of this._requests)t.error(e)}_createRequest(e){const t=new i(this._context,e);return this._requests.add(t),t}_finishRequest(e){this._requests.delete(e),clearTimeout(e.timeout)}}},7158:function(e,t,s){"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 n=s(8623),i=r(s(9655)),o=s(2209),a=r(s(1573)),c=r(s(7530)),u=r(s(6754)),d=r(s(357)),l=r(s(8801)),h=s(2069),f=r(s(1113));var p,y;(y=p=t.WEB_SOCKET_GATEWAY_STATES||(t.WEB_SOCKET_GATEWAY_STATES={})).DISCONNECTED="disconnected",y.CONNECTING="connecting",y.CONNECTED="connected";class m{constructor(e,t,s={},r=n.io,o=c.default.get){if(this._token=t,this._options=s,this._connectionProvider=r,this._userFactory=o,this._requestsManager=new f.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,i.default)(e.replace(/^(?!(?:\w+:)?\/\/)/,"https://")),this.set("state","disconnected"),this.set("socketId",void 0),this.set("me",void 0),this.on("change:state",(async(e,t,s)=>{var r;if(s!==m.STATE_CONNECTED){if(s===m.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:m._CHANGE_STATE_EVENT_PRIORITY}),this.on("error",((e,t)=>{this._options.onError?this._options.onError(t):console.error(t)}))}get sessionId(){return this.socketId}disconnect(){var e;this.state!==p.DISCONNECTED&&(null===(e=this._socket)||void 0===e||e.disconnect(),this._socket=void 0,this.state=p.DISCONNECTED)}async reconnect(){this._socket||this.state!==p.DISCONNECTED||(await this._token.refreshToken(),await this._connect())}static async connect(e,t="local.cs.dev:443/ws-v2",s={},r=n.io,i=c.default.get){const o=new m(t,e,s,r,i);return await o._connect(),o}_sendRequest(e,t,s){if(!e)throw new d.default("`serviceName` must be provided.",this);if(this.state!==m.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(s.length+2),n=new Uint8Array(r);return n[0]=e,n[1]=parseInt(t),n.set(s,2),this._emit(1,n)}_getChannel(e,t){const s=""+e+t;return!this._channels.has(s)&&this._socket&&this._channels.set(s,new a.default(s,this,this._socket)),this._channels.get(s)}_connect(){return new Promise(((e,t)=>{const s=this._setupSocket();!this.socketId&&s.io.on("reconnect_error",(()=>{this._reconnectionAttemptError(t)})),s.once("connect",(async()=>{try{await this._onConnect(),e()}catch(e){t(e)}})),s.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),s=(this._url.protocol||"https:")+"//"+this._url.hostname+":"+t,r=this._connectionProvider(s,{parser:{Encoder:h.Encoder,Decoder:h.Decoder},path:"/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=p.CONNECTING,r.on("connect",(()=>{this.socketId=r.id})),r.on("connect_error",this._onError.bind(this)),r.on("disconnect",this._onDisconnect.bind(this)),r.io.on("reconnect",this._onReconnect.bind(this)),r.io.on("reconnect_attempt",(e=>{this.state=p.CONNECTING,this._connectionAttempt=e})),r.on("unauthorized",this._onUnauthorized.bind(this)),this._socket=r,r}_emit(e,t){const s=this._socket;return this._requestsManager.send((r=>{s.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=p.CONNECTED;const e=async(e,t,s)=>{try{await this._authenticate(s)}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=p.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)}_onError(e){console.warn("Connection to WebSocket server failed. Details: ",{originalError:e})}_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 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{const t=await this._emit(2,{token:e});this._addAuthData(t.environmentId,t.userId)}catch(e){throw this._removeAuthData(),e}}}m.STATE_DISCONNECTED=p.DISCONNECTED,m.STATE_CONNECTING=p.CONNECTING,m.STATE_CONNECTED=p.CONNECTED,m._CHANGE_STATE_EVENT_PRIORITY=o.priorities.get("highest")+999999,(0,o.mix)(m,o.ObservableMixin),t.default=m},9933:(e,t,s)=>{"use strict";e.exports=s(6386)},2777:(e,t,s)=>{"use strict";var r=t,n=s(238),i=s(7886);function o(e,t,s,r){if(t.resolvedType)if(t.resolvedType instanceof n){e("switch(d%s){",r);for(var i=t.resolvedType.values,o=Object.keys(i),a=0;a<o.length;++a)t.repeated&&i[o[a]]===t.typeDefault&&e("default:"),e("case%j:",o[a])("case %i:",i[o[a]])("m%s=%j",r,i[o[a]])("break");e("}")}else e('if(typeof d%s!=="object")',r)("throw TypeError(%j)",t.fullName+": object expected")("m%s=types[%i].fromObject(d%s)",r,s,r);else{var c=!1;switch(t.type){case"double":case"float":e("m%s=Number(d%s)",r,r);break;case"uint32":case"fixed32":e("m%s=d%s>>>0",r,r);break;case"int32":case"sint32":case"sfixed32":e("m%s=d%s|0",r,r);break;case"uint64":c=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j",r,r,c)('else if(typeof d%s==="string")',r)("m%s=parseInt(d%s,10)",r,r)('else if(typeof d%s==="number")',r)("m%s=d%s",r,r)('else if(typeof d%s==="object")',r)("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)",r,r,r,c?"true":"");break;case"bytes":e('if(typeof d%s==="string")',r)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)",r,r,r)("else if(d%s.length)",r)("m%s=d%s",r,r);break;case"string":e("m%s=String(d%s)",r,r);break;case"bool":e("m%s=Boolean(d%s)",r,r)}}return e}function a(e,t,s,r){if(t.resolvedType)t.resolvedType instanceof n?e("d%s=o.enums===String?types[%i].values[m%s]:m%s",r,s,r,r):e("d%s=types[%i].toObject(m%s,o)",r,s,r);else{var i=!1;switch(t.type){case"double":case"float":e("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s",r,r,r,r);break;case"uint64":i=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e('if(typeof m%s==="number")',r)("d%s=o.longs===String?String(m%s):m%s",r,r,r)("else")("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s",r,r,r,r,i?"true":"",r);break;case"bytes":e("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s",r,r,r,r,r);break;default:e("d%s=m%s",r,r)}}return e}r.fromObject=function(e){var t=e.fieldsArray,s=i.codegen(["d"],e.name+"$fromObject")("if(d instanceof this.ctor)")("return d");if(!t.length)return s("return new this.ctor");s("var m=new this.ctor");for(var r=0;r<t.length;++r){var a=t[r].resolve(),c=i.safeProp(a.name);a.map?(s("if(d%s){",c)('if(typeof d%s!=="object")',c)("throw TypeError(%j)",a.fullName+": object expected")("m%s={}",c)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){",c),o(s,a,r,c+"[ks[i]]")("}")("}")):a.repeated?(s("if(d%s){",c)("if(!Array.isArray(d%s))",c)("throw TypeError(%j)",a.fullName+": array expected")("m%s=[]",c)("for(var i=0;i<d%s.length;++i){",c),o(s,a,r,c+"[i]")("}")("}")):(a.resolvedType instanceof n||s("if(d%s!=null){",c),o(s,a,r,c),a.resolvedType instanceof n||s("}"))}return s("return m")},r.toObject=function(e){var t=e.fieldsArray.slice().sort(i.compareFieldsById);if(!t.length)return i.codegen()("return {}");for(var s=i.codegen(["m","o"],e.name+"$toObject")("if(!o)")("o={}")("var d={}"),r=[],o=[],c=[],u=0;u<t.length;++u)t[u].partOf||(t[u].resolve().repeated?r:t[u].map?o:c).push(t[u]);if(r.length){for(s("if(o.arrays||o.defaults){"),u=0;u<r.length;++u)s("d%s=[]",i.safeProp(r[u].name));s("}")}if(o.length){for(s("if(o.objects||o.defaults){"),u=0;u<o.length;++u)s("d%s={}",i.safeProp(o[u].name));s("}")}if(c.length){for(s("if(o.defaults){"),u=0;u<c.length;++u){var d=c[u],l=i.safeProp(d.name);if(d.resolvedType instanceof n)s("d%s=o.enums===String?%j:%j",l,d.resolvedType.valuesById[d.typeDefault],d.typeDefault);else if(d.long)s("if(util.Long){")("var n=new util.Long(%i,%i,%j)",d.typeDefault.low,d.typeDefault.high,d.typeDefault.unsigned)("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n",l)("}else")("d%s=o.longs===String?%j:%i",l,d.typeDefault.toString(),d.typeDefault.toNumber());else if(d.bytes){var h="["+Array.prototype.slice.call(d.typeDefault).join(",")+"]";s("if(o.bytes===String)d%s=%j",l,String.fromCharCode.apply(String,d.typeDefault))("else{")("d%s=%s",l,h)("if(o.bytes!==Array)d%s=util.newBuffer(d%s)",l,l)("}")}else s("d%s=%j",l,d.typeDefault)}s("}")}var f=!1;for(u=0;u<t.length;++u){d=t[u];var p=e._fieldsArray.indexOf(d);l=i.safeProp(d.name);d.map?(f||(f=!0,s("var ks2")),s("if(m%s&&(ks2=Object.keys(m%s)).length){",l,l)("d%s={}",l)("for(var j=0;j<ks2.length;++j){"),a(s,d,p,l+"[ks2[j]]")("}")):d.repeated?(s("if(m%s&&m%s.length){",l,l)("d%s=[]",l)("for(var j=0;j<m%s.length;++j){",l),a(s,d,p,l+"[j]")("}")):(s("if(m%s!=null&&m.hasOwnProperty(%j)){",l,d.name),a(s,d,p,l),d.partOf&&s("if(o.oneofs)")("d%s=%j",i.safeProp(d.partOf.name),d.name)),s("}")}return s("return d")}},8159:(e,t,s)=>{"use strict";e.exports=function(e){var t=i.codegen(["r","l"],e.name+"$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new this.ctor"+(e.fieldsArray.filter((function(e){return e.map})).length?",k,value":""))("while(r.pos<c){")("var t=r.uint32()");e.group&&t("if((t&7)===4)")("break");t("switch(t>>>3){");for(var s=0;s<e.fieldsArray.length;++s){var a=e._fieldsArray[s].resolve(),c=a.resolvedType instanceof r?"int32":a.type,u="m"+i.safeProp(a.name);t("case %i:",a.id),a.map?(t("if(%s===util.emptyObject)",u)("%s={}",u)("var c2 = r.uint32()+r.pos"),void 0!==n.defaults[a.keyType]?t("k=%j",n.defaults[a.keyType]):t("k=null"),void 0!==n.defaults[c]?t("value=%j",n.defaults[c]):t("value=null"),t("while(r.pos<c2){")("var tag2=r.uint32()")("switch(tag2>>>3){")("case 1: k=r.%s(); break",a.keyType)("case 2:"),void 0===n.basic[c]?t("value=types[%i].decode(r,r.uint32())",s):t("value=r.%s()",c),t("break")("default:")("r.skipType(tag2&7)")("break")("}")("}"),void 0!==n.long[a.keyType]?t('%s[typeof k==="object"?util.longToHash(k):k]=value',u):t("%s[k]=value",u)):a.repeated?(t("if(!(%s&&%s.length))",u,u)("%s=[]",u),void 0!==n.packed[c]&&t("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())",u,c)("}else"),void 0===n.basic[c]?t(a.resolvedType.group?"%s.push(types[%i].decode(r))":"%s.push(types[%i].decode(r,r.uint32()))",u,s):t("%s.push(r.%s())",u,c)):void 0===n.basic[c]?t(a.resolvedType.group?"%s=types[%i].decode(r)":"%s=types[%i].decode(r,r.uint32())",u,s):t("%s=r.%s()",u,c),t("break")}for(t("default:")("r.skipType(t&7)")("break")("}")("}"),s=0;s<e._fieldsArray.length;++s){var d=e._fieldsArray[s];d.required&&t("if(!m.hasOwnProperty(%j))",d.name)("throw util.ProtocolError(%j,{instance:m})",o(d))}return t("return m")};var r=s(238),n=s(8372),i=s(7886);function o(e){return"missing required '"+e.name+"'"}},8357:(e,t,s)=>{"use strict";e.exports=function(e){for(var t,s=i.codegen(["m","w"],e.name+"$encode")("if(!w)")("w=Writer.create()"),a=e.fieldsArray.slice().sort(i.compareFieldsById),c=0;c<a.length;++c){var u=a[c].resolve(),d=e._fieldsArray.indexOf(u),l=u.resolvedType instanceof r?"int32":u.type,h=n.basic[l];t="m"+i.safeProp(u.name),u.map?(s("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){",t,u.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",t)("w.uint32(%i).fork().uint32(%i).%s(ks[i])",(u.id<<3|2)>>>0,8|n.mapKey[u.keyType],u.keyType),void 0===h?s("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",d,t):s(".uint32(%i).%s(%s[ks[i]]).ldelim()",16|h,l,t),s("}")("}")):u.repeated?(s("if(%s!=null&&%s.length){",t,t),u.packed&&void 0!==n.packed[l]?s("w.uint32(%i).fork()",(u.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",t)("w.%s(%s[i])",l,t)("w.ldelim()"):(s("for(var i=0;i<%s.length;++i)",t),void 0===h?o(s,u,d,t+"[i]"):s("w.uint32(%i).%s(%s[i])",(u.id<<3|h)>>>0,l,t)),s("}")):(u.optional&&s("if(%s!=null&&Object.hasOwnProperty.call(m,%j))",t,u.name),void 0===h?o(s,u,d,t):s("w.uint32(%i).%s(%s)",(u.id<<3|h)>>>0,l,t))}return s("return w")};var r=s(238),n=s(8372),i=s(7886);function o(e,t,s,r){return t.resolvedType.group?e("types[%i].encode(%s,w.uint32(%i)).uint32(%i)",s,r,(t.id<<3|3)>>>0,(t.id<<3|4)>>>0):e("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()",s,r,(t.id<<3|2)>>>0)}},238:(e,t,s)=>{"use strict";e.exports=o;var r=s(6913);((o.prototype=Object.create(r.prototype)).constructor=o).className="Enum";var n=s(9587),i=s(7886);function o(e,t,s,n,i){if(r.call(this,e,s),t&&"object"!=typeof t)throw TypeError("values must be an object");if(this.valuesById={},this.values=Object.create(this.valuesById),this.comment=n,this.comments=i||{},this.reserved=void 0,t)for(var o=Object.keys(t),a=0;a<o.length;++a)"number"==typeof t[o[a]]&&(this.valuesById[this.values[o[a]]=t[o[a]]]=o[a])}o.fromJSON=function(e,t){var s=new o(e,t.values,t.options,t.comment,t.comments);return s.reserved=t.reserved,s},o.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return i.toObject(["options",this.options,"values",this.values,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"comment",t?this.comment:void 0,"comments",t?this.comments:void 0])},o.prototype.add=function(e,t,s){if(!i.isString(e))throw TypeError("name must be a string");if(!i.isInteger(t))throw TypeError("id must be an integer");if(void 0!==this.values[e])throw Error("duplicate name '"+e+"' in "+this);if(this.isReservedId(t))throw Error("id "+t+" is reserved in "+this);if(this.isReservedName(e))throw Error("name '"+e+"' is reserved in "+this);if(void 0!==this.valuesById[t]){if(!this.options||!this.options.allow_alias)throw Error("duplicate id "+t+" in "+this);this.values[e]=t}else this.valuesById[this.values[e]=t]=e;return this.comments[e]=s||null,this},o.prototype.remove=function(e){if(!i.isString(e))throw TypeError("name must be a string");var t=this.values[e];if(null==t)throw Error("name '"+e+"' does not exist in "+this);return delete this.valuesById[t],delete this.values[e],delete this.comments[e],this},o.prototype.isReservedId=function(e){return n.isReservedId(this.reserved,e)},o.prototype.isReservedName=function(e){return n.isReservedName(this.reserved,e)}},5263:(e,t,s)=>{"use strict";e.exports=u;var r=s(6913);((u.prototype=Object.create(r.prototype)).constructor=u).className="Field";var n,i=s(238),o=s(8372),a=s(7886),c=/^required|optional|repeated$/;function u(e,t,s,n,i,u,d){if(a.isObject(n)?(d=i,u=n,n=i=void 0):a.isObject(i)&&(d=u,u=i,i=void 0),r.call(this,e,u),!a.isInteger(t)||t<0)throw TypeError("id must be a non-negative integer");if(!a.isString(s))throw TypeError("type must be a string");if(void 0!==n&&!c.test(n=n.toString().toLowerCase()))throw TypeError("rule must be a string rule");if(void 0!==i&&!a.isString(i))throw TypeError("extend must be a string");"proto3_optional"===n&&(n="optional"),this.rule=n&&"optional"!==n?n:void 0,this.type=s,this.id=t,this.extend=i||void 0,this.required="required"===n,this.optional=!this.required,this.repeated="repeated"===n,this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=!!a.Long&&void 0!==o.long[s],this.bytes="bytes"===s,this.resolvedType=null,this.extensionField=null,this.declaringField=null,this._packed=null,this.comment=d}u.fromJSON=function(e,t){return new u(e,t.id,t.type,t.rule,t.extend,t.options,t.comment)},Object.defineProperty(u.prototype,"packed",{get:function(){return null===this._packed&&(this._packed=!1!==this.getOption("packed")),this._packed}}),u.prototype.setOption=function(e,t,s){return"packed"===e&&(this._packed=null),r.prototype.setOption.call(this,e,t,s)},u.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return a.toObject(["rule","optional"!==this.rule&&this.rule||void 0,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",t?this.comment:void 0])},u.prototype.resolve=function(){if(this.resolved)return this;if(void 0===(this.typeDefault=o.defaults[this.type])&&(this.resolvedType=(this.declaringField?this.declaringField.parent:this.parent).lookupTypeOrEnum(this.type),this.resolvedType instanceof n?this.typeDefault=null:this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]),this.options&&null!=this.options.default&&(this.typeDefault=this.options.default,this.resolvedType instanceof i&&"string"==typeof this.typeDefault&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.options&&(!0!==this.options.packed&&(void 0===this.options.packed||!this.resolvedType||this.resolvedType instanceof i)||delete this.options.packed,Object.keys(this.options).length||(this.options=void 0)),this.long)this.typeDefault=a.Long.fromNumber(this.typeDefault,"u"===this.type.charAt(0)),Object.freeze&&Object.freeze(this.typeDefault);else if(this.bytes&&"string"==typeof this.typeDefault){var e;a.base64.test(this.typeDefault)?a.base64.decode(this.typeDefault,e=a.newBuffer(a.base64.length(this.typeDefault)),0):a.utf8.write(this.typeDefault,e=a.newBuffer(a.utf8.length(this.typeDefault)),0),this.typeDefault=e}return this.map?this.defaultValue=a.emptyObject:this.repeated?this.defaultValue=a.emptyArray:this.defaultValue=this.typeDefault,this.parent instanceof n&&(this.parent.ctor.prototype[this.name]=this.defaultValue),r.prototype.resolve.call(this)},u.d=function(e,t,s,r){return"function"==typeof t?t=a.decorateType(t).name:t&&"object"==typeof t&&(t=a.decorateEnum(t).name),function(n,i){a.decorateType(n.constructor).add(new u(i,e,t,s,{default:r}))}},u._configure=function(e){n=e}},6386:(e,t,s)=>{"use strict";var r=e.exports=s(2877);r.build="light",r.load=function(e,t,s){return"function"==typeof t?(s=t,t=new r.Root):t||(t=new r.Root),t.load(e,s)},r.loadSync=function(e,t){return t||(t=new r.Root),t.loadSync(e)},r.encoder=s(8357),r.decoder=s(8159),r.verifier=s(5669),r.converter=s(2777),r.ReflectionObject=s(6913),r.Namespace=s(9587),r.Root=s(6720),r.Enum=s(238),r.Type=s(396),r.Field=s(5263),r.OneOf=s(8930),r.MapField=s(6977),r.Service=s(5280),r.Method=s(9455),r.Message=s(5986),r.wrappers=s(2016),r.types=s(8372),r.util=s(7886),r.ReflectionObject._configure(r.Root),r.Namespace._configure(r.Type,r.Service,r.Enum),r.Root._configure(r.Type),r.Field._configure(r.Type)},2877:(e,t,s)=>{"use strict";var r=t;function n(){r.util._configure(),r.Writer._configure(r.BufferWriter),r.Reader._configure(r.BufferReader)}r.build="minimal",r.Writer=s(3117),r.BufferWriter=s(4766),r.Reader=s(9924),r.BufferReader=s(6515),r.util=s(4652),r.rpc=s(8607),r.roots=s(9188),r.configure=n,n()},6977:(e,t,s)=>{"use strict";e.exports=o;var r=s(5263);((o.prototype=Object.create(r.prototype)).constructor=o).className="MapField";var n=s(8372),i=s(7886);function o(e,t,s,n,o,a){if(r.call(this,e,t,n,void 0,void 0,o,a),!i.isString(s))throw TypeError("keyType must be a string");this.keyType=s,this.resolvedKeyType=null,this.map=!0}o.fromJSON=function(e,t){return new o(e,t.id,t.keyType,t.type,t.options,t.comment)},o.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return i.toObject(["keyType",this.keyType,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",t?this.comment:void 0])},o.prototype.resolve=function(){if(this.resolved)return this;if(void 0===n.mapKey[this.keyType])throw Error("invalid key type: "+this.keyType);return r.prototype.resolve.call(this)},o.d=function(e,t,s){return"function"==typeof s?s=i.decorateType(s).name:s&&"object"==typeof s&&(s=i.decorateEnum(s).name),function(r,n){i.decorateType(r.constructor).add(new o(n,e,t,s))}}},5986:(e,t,s)=>{"use strict";e.exports=n;var r=s(4652);function n(e){if(e)for(var t=Object.keys(e),s=0;s<t.length;++s)this[t[s]]=e[t[s]]}n.create=function(e){return this.$type.create(e)},n.encode=function(e,t){return this.$type.encode(e,t)},n.encodeDelimited=function(e,t){return this.$type.encodeDelimited(e,t)},n.decode=function(e){return this.$type.decode(e)},n.decodeDelimited=function(e){return this.$type.decodeDelimited(e)},n.verify=function(e){return this.$type.verify(e)},n.fromObject=function(e){return this.$type.fromObject(e)},n.toObject=function(e,t){return this.$type.toObject(e,t)},n.prototype.toJSON=function(){return this.$type.toObject(this,r.toJSONOptions)}},9455:(e,t,s)=>{"use strict";e.exports=i;var r=s(6913);((i.prototype=Object.create(r.prototype)).constructor=i).className="Method";var n=s(7886);function i(e,t,s,i,o,a,c,u,d){if(n.isObject(o)?(c=o,o=a=void 0):n.isObject(a)&&(c=a,a=void 0),void 0!==t&&!n.isString(t))throw TypeError("type must be a string");if(!n.isString(s))throw TypeError("requestType must be a string");if(!n.isString(i))throw TypeError("responseType must be a string");r.call(this,e,c),this.type=t||"rpc",this.requestType=s,this.requestStream=!!o||void 0,this.responseType=i,this.responseStream=!!a||void 0,this.resolvedRequestType=null,this.resolvedResponseType=null,this.comment=u,this.parsedOptions=d}i.fromJSON=function(e,t){return new i(e,t.type,t.requestType,t.responseType,t.requestStream,t.responseStream,t.options,t.comment,t.parsedOptions)},i.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return n.toObject(["type","rpc"!==this.type&&this.type||void 0,"requestType",this.requestType,"requestStream",this.requestStream,"responseType",this.responseType,"responseStream",this.responseStream,"options",this.options,"comment",t?this.comment:void 0,"parsedOptions",this.parsedOptions])},i.prototype.resolve=function(){return this.resolved?this:(this.resolvedRequestType=this.parent.lookupType(this.requestType),this.resolvedResponseType=this.parent.lookupType(this.responseType),r.prototype.resolve.call(this))}},9587:(e,t,s)=>{"use strict";e.exports=l;var r=s(6913);((l.prototype=Object.create(r.prototype)).constructor=l).className="Namespace";var n,i,o,a=s(5263),c=s(8930),u=s(7886);function d(e,t){if(e&&e.length){for(var s={},r=0;r<e.length;++r)s[e[r].name]=e[r].toJSON(t);return s}}function l(e,t){r.call(this,e,t),this.nested=void 0,this._nestedArray=null}function h(e){return e._nestedArray=null,e}l.fromJSON=function(e,t){return new l(e,t.options).addJSON(t.nested)},l.arrayToJSON=d,l.isReservedId=function(e,t){if(e)for(var s=0;s<e.length;++s)if("string"!=typeof e[s]&&e[s][0]<=t&&e[s][1]>t)return!0;return!1},l.isReservedName=function(e,t){if(e)for(var s=0;s<e.length;++s)if(e[s]===t)return!0;return!1},Object.defineProperty(l.prototype,"nestedArray",{get:function(){return this._nestedArray||(this._nestedArray=u.toArray(this.nested))}}),l.prototype.toJSON=function(e){return u.toObject(["options",this.options,"nested",d(this.nestedArray,e)])},l.prototype.addJSON=function(e){if(e)for(var t,s=Object.keys(e),r=0;r<s.length;++r)t=e[s[r]],this.add((void 0!==t.fields?n.fromJSON:void 0!==t.values?o.fromJSON:void 0!==t.methods?i.fromJSON:void 0!==t.id?a.fromJSON:l.fromJSON)(s[r],t));return this},l.prototype.get=function(e){return this.nested&&this.nested[e]||null},l.prototype.getEnum=function(e){if(this.nested&&this.nested[e]instanceof o)return this.nested[e].values;throw Error("no such enum: "+e)},l.prototype.add=function(e){if(!(e instanceof a&&void 0!==e.extend||e instanceof n||e instanceof o||e instanceof i||e instanceof l||e instanceof c))throw TypeError("object must be a valid nested object");if(this.nested){var t=this.get(e.name);if(t){if(!(t instanceof l&&e instanceof l)||t instanceof n||t instanceof i)throw Error("duplicate name '"+e.name+"' in "+this);for(var s=t.nestedArray,r=0;r<s.length;++r)e.add(s[r]);this.remove(t),this.nested||(this.nested={}),e.setOptions(t.options,!0)}}else this.nested={};return this.nested[e.name]=e,e.onAdd(this),h(this)},l.prototype.remove=function(e){if(!(e instanceof r))throw TypeError("object must be a ReflectionObject");if(e.parent!==this)throw Error(e+" is not a member of "+this);return delete this.nested[e.name],Object.keys(this.nested).length||(this.nested=void 0),e.onRemove(this),h(this)},l.prototype.define=function(e,t){if(u.isString(e))e=e.split(".");else if(!Array.isArray(e))throw TypeError("illegal path");if(e&&e.length&&""===e[0])throw Error("path must be relative");for(var s=this;e.length>0;){var r=e.shift();if(s.nested&&s.nested[r]){if(!((s=s.nested[r])instanceof l))throw Error("path conflicts with non-namespace objects")}else s.add(s=new l(r))}return t&&s.addJSON(t),s},l.prototype.resolveAll=function(){for(var e=this.nestedArray,t=0;t<e.length;)e[t]instanceof l?e[t++].resolveAll():e[t++].resolve();return this.resolve()},l.prototype.lookup=function(e,t,s){if("boolean"==typeof t?(s=t,t=void 0):t&&!Array.isArray(t)&&(t=[t]),u.isString(e)&&e.length){if("."===e)return this.root;e=e.split(".")}else if(!e.length)return this;if(""===e[0])return this.root.lookup(e.slice(1),t);var r=this.get(e[0]);if(r){if(1===e.length){if(!t||t.indexOf(r.constructor)>-1)return r}else if(r instanceof l&&(r=r.lookup(e.slice(1),t,!0)))return r}else for(var n=0;n<this.nestedArray.length;++n)if(this._nestedArray[n]instanceof l&&(r=this._nestedArray[n].lookup(e,t,!0)))return r;return null===this.parent||s?null:this.parent.lookup(e,t)},l.prototype.lookupType=function(e){var t=this.lookup(e,[n]);if(!t)throw Error("no such type: "+e);return t},l.prototype.lookupEnum=function(e){var t=this.lookup(e,[o]);if(!t)throw Error("no such Enum '"+e+"' in "+this);return t},l.prototype.lookupTypeOrEnum=function(e){var t=this.lookup(e,[n,o]);if(!t)throw Error("no such Type or Enum '"+e+"' in "+this);return t},l.prototype.lookupService=function(e){var t=this.lookup(e,[i]);if(!t)throw Error("no such Service '"+e+"' in "+this);return t},l._configure=function(e,t,s){n=e,i=t,o=s}},6913:(e,t,s)=>{"use strict";e.exports=i,i.className="ReflectionObject";var r,n=s(7886);function i(e,t){if(!n.isString(e))throw TypeError("name must be a string");if(t&&!n.isObject(t))throw TypeError("options must be an object");this.options=t,this.parsedOptions=null,this.name=e,this.parent=null,this.resolved=!1,this.comment=null,this.filename=null}Object.defineProperties(i.prototype,{root:{get:function(){for(var e=this;null!==e.parent;)e=e.parent;return e}},fullName:{get:function(){for(var e=[this.name],t=this.parent;t;)e.unshift(t.name),t=t.parent;return e.join(".")}}}),i.prototype.toJSON=function(){throw Error()},i.prototype.onAdd=function(e){this.parent&&this.parent!==e&&this.parent.remove(this),this.parent=e,this.resolved=!1;var t=e.root;t instanceof r&&t._handleAdd(this)},i.prototype.onRemove=function(e){var t=e.root;t instanceof r&&t._handleRemove(this),this.parent=null,this.resolved=!1},i.prototype.resolve=function(){return this.resolved||this.root instanceof r&&(this.resolved=!0),this},i.prototype.getOption=function(e){if(this.options)return this.options[e]},i.prototype.setOption=function(e,t,s){return s&&this.options&&void 0!==this.options[e]||((this.options||(this.options={}))[e]=t),this},i.prototype.setParsedOption=function(e,t,s){this.parsedOptions||(this.parsedOptions=[]);var r=this.parsedOptions;if(s){var i=r.find((function(t){return Object.prototype.hasOwnProperty.call(t,e)}));if(i){var o=i[e];n.setProperty(o,s,t)}else(i={})[e]=n.setProperty({},s,t),r.push(i)}else{var a={};a[e]=t,r.push(a)}return this},i.prototype.setOptions=function(e,t){if(e)for(var s=Object.keys(e),r=0;r<s.length;++r)this.setOption(s[r],e[s[r]],t);return this},i.prototype.toString=function(){var e=this.constructor.className,t=this.fullName;return t.length?e+" "+t:e},i._configure=function(e){r=e}},8930:(e,t,s)=>{"use strict";e.exports=o;var r=s(6913);((o.prototype=Object.create(r.prototype)).constructor=o).className="OneOf";var n=s(5263),i=s(7886);function o(e,t,s,n){if(Array.isArray(t)||(s=t,t=void 0),r.call(this,e,s),void 0!==t&&!Array.isArray(t))throw TypeError("fieldNames must be an Array");this.oneof=t||[],this.fieldsArray=[],this.comment=n}function a(e){if(e.parent)for(var t=0;t<e.fieldsArray.length;++t)e.fieldsArray[t].parent||e.parent.add(e.fieldsArray[t])}o.fromJSON=function(e,t){return new o(e,t.oneof,t.options,t.comment)},o.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return i.toObject(["options",this.options,"oneof",this.oneof,"comment",t?this.comment:void 0])},o.prototype.add=function(e){if(!(e instanceof n))throw TypeError("field must be a Field");return e.parent&&e.parent!==this.parent&&e.parent.remove(e),this.oneof.push(e.name),this.fieldsArray.push(e),e.partOf=this,a(this),this},o.prototype.remove=function(e){if(!(e instanceof n))throw TypeError("field must be a Field");var t=this.fieldsArray.indexOf(e);if(t<0)throw Error(e+" is not a member of "+this);return this.fieldsArray.splice(t,1),(t=this.oneof.indexOf(e.name))>-1&&this.oneof.splice(t,1),e.partOf=null,this},o.prototype.onAdd=function(e){r.prototype.onAdd.call(this,e);for(var t=0;t<this.oneof.length;++t){var s=e.get(this.oneof[t]);s&&!s.partOf&&(s.partOf=this,this.fieldsArray.push(s))}a(this)},o.prototype.onRemove=function(e){for(var t,s=0;s<this.fieldsArray.length;++s)(t=this.fieldsArray[s]).parent&&t.parent.remove(t);r.prototype.onRemove.call(this,e)},o.d=function(){for(var e=new Array(arguments.length),t=0;t<arguments.length;)e[t]=arguments[t++];return function(t,s){i.decorateType(t.constructor).add(new o(s,e)),Object.defineProperty(t,s,{get:i.oneOfGetter(e),set:i.oneOfSetter(e)})}}},9924:(e,t,s)=>{"use strict";e.exports=c;var r,n=s(4652),i=n.LongBits,o=n.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 n.Buffer?function(e){return(c.create=function(e){return n.Buffer.isBuffer(e)?new r(e):d(e)})(e)}:d};function h(){var e=new i(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 f(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function p(){if(this.pos+8>this.len)throw a(this,8);return new i(f(this.buf,this.pos+=4),f(this.buf,this.pos+=4))}c.create=l(),c.prototype._slice=n.Array.prototype.subarray||n.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 f(this.buf,this.pos+=4)},c.prototype.sfixed32=function(){if(this.pos+4>this.len)throw a(this,4);return 0|f(this.buf,this.pos+=4)},c.prototype.float=function(){if(this.pos+4>this.len)throw a(this,4);var e=n.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=n.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},c.prototype.bytes=function(){var e=this.uint32(),t=this.pos,s=this.pos+e;if(s>this.len)throw a(this,e);return this.pos+=e,Array.isArray(this.buf)?this.buf.slice(t,s):t===s?new this.buf.constructor(0):this._slice.call(this.buf,t,s)},c.prototype.string=function(){var e=this.bytes();return o.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=n.Long?"toLong":"toNumber";n.merge(c.prototype,{int64:function(){return h.call(this)[t](!1)},uint64:function(){return h.call(this)[t](!0)},sint64:function(){return h.call(this).zzDecode()[t](!1)},fixed64:function(){return p.call(this)[t](!0)},sfixed64:function(){return p.call(this)[t](!1)}})}},6515:(e,t,s)=>{"use strict";e.exports=i;var r=s(9924);(i.prototype=Object.create(r.prototype)).constructor=i;var n=s(4652);function i(e){r.call(this,e)}i._configure=function(){n.Buffer&&(i.prototype._slice=n.Buffer.prototype.slice)},i.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))},i._configure()},6720:(e,t,s)=>{"use strict";e.exports=l;var r=s(9587);((l.prototype=Object.create(r.prototype)).constructor=l).className="Root";var n,i,o,a=s(5263),c=s(238),u=s(8930),d=s(7886);function l(e){r.call(this,"",e),this.deferred=[],this.files=[]}function h(){}l.fromJSON=function(e,t){return t||(t=new l),e.options&&t.setOptions(e.options),t.addJSON(e.nested)},l.prototype.resolvePath=d.path.resolve,l.prototype.fetch=d.fetch,l.prototype.load=function e(t,s,r){"function"==typeof s&&(r=s,s=void 0);var n=this;if(!r)return d.asPromise(e,n,t,s);var a=r===h;function c(e,t){if(r){var s=r;if(r=null,a)throw e;s(e,t)}}function u(e){var t=e.lastIndexOf("google/protobuf/");if(t>-1){var s=e.substring(t);if(s in o)return s}return null}function l(e,t){try{if(d.isString(t)&&"{"===t.charAt(0)&&(t=JSON.parse(t)),d.isString(t)){i.filename=e;var r,o=i(t,n,s),l=0;if(o.imports)for(;l<o.imports.length;++l)(r=u(o.imports[l])||n.resolvePath(e,o.imports[l]))&&f(r);if(o.weakImports)for(l=0;l<o.weakImports.length;++l)(r=u(o.weakImports[l])||n.resolvePath(e,o.weakImports[l]))&&f(r,!0)}else n.setOptions(t.options).addJSON(t.nested)}catch(e){c(e)}a||p||c(null,n)}function f(e,t){if(!(n.files.indexOf(e)>-1))if(n.files.push(e),e in o)a?l(e,o[e]):(++p,setTimeout((function(){--p,l(e,o[e])})));else if(a){var s;try{s=d.fs.readFileSync(e).toString("utf8")}catch(e){return void(t||c(e))}l(e,s)}else++p,n.fetch(e,(function(s,i){--p,r&&(s?t?p||c(null,n):c(s):l(e,i))}))}var p=0;d.isString(t)&&(t=[t]);for(var y,m=0;m<t.length;++m)(y=n.resolvePath("",t[m]))&&f(y);if(a)return n;p||c(null,n)},l.prototype.loadSync=function(e,t){if(!d.isNode)throw Error("not supported");return this.load(e,t,h)},l.prototype.resolveAll=function(){if(this.deferred.length)throw Error("unresolvable extensions: "+this.deferred.map((function(e){return"'extend "+e.extend+"' in "+e.parent.fullName})).join(", "));return r.prototype.resolveAll.call(this)};var f=/^[A-Z]/;function p(e,t){var s=t.parent.lookup(t.extend);if(s){var r=new a(t.fullName,t.id,t.type,t.rule,void 0,t.options);return r.declaringField=t,t.extensionField=r,s.add(r),!0}return!1}l.prototype._handleAdd=function(e){if(e instanceof a)void 0===e.extend||e.extensionField||p(0,e)||this.deferred.push(e);else if(e instanceof c)f.test(e.name)&&(e.parent[e.name]=e.values);else if(!(e instanceof u)){if(e instanceof n)for(var t=0;t<this.deferred.length;)p(0,this.deferred[t])?this.deferred.splice(t,1):++t;for(var s=0;s<e.nestedArray.length;++s)this._handleAdd(e._nestedArray[s]);f.test(e.name)&&(e.parent[e.name]=e)}},l.prototype._handleRemove=function(e){if(e instanceof a){if(void 0!==e.extend)if(e.extensionField)e.extensionField.parent.remove(e.extensionField),e.extensionField=null;else{var t=this.deferred.indexOf(e);t>-1&&this.deferred.splice(t,1)}}else if(e instanceof c)f.test(e.name)&&delete e.parent[e.name];else if(e instanceof r){for(var s=0;s<e.nestedArray.length;++s)this._handleRemove(e._nestedArray[s]);f.test(e.name)&&delete e.parent[e.name]}},l._configure=function(e,t,s){n=e,i=t,o=s}},9188:e=>{"use strict";e.exports={}},8607:(e,t,s)=>{"use strict";t.Service=s(8887)},8887:(e,t,s)=>{"use strict";e.exports=n;var r=s(4652);function n(e,t,s){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(s)}(n.prototype=Object.create(r.EventEmitter.prototype)).constructor=n,n.prototype.rpcCall=function e(t,s,n,i,o){if(!i)throw TypeError("request must be specified");var a=this;if(!o)return r.asPromise(e,a,t,s,n,i);if(a.rpcImpl)try{return a.rpcImpl(t,s[a.requestDelimited?"encodeDelimited":"encode"](i).finish(),(function(e,s){if(e)return a.emit("error",e,t),o(e);if(null!==s){if(!(s instanceof n))try{s=n[a.responseDelimited?"decodeDelimited":"decode"](s)}catch(e){return a.emit("error",e,t),o(e)}return a.emit("data",s,t),o(null,s)}a.end(!0)}))}catch(e){return a.emit("error",e,t),void setTimeout((function(){o(e)}),0)}else setTimeout((function(){o(Error("already ended"))}),0)},n.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},5280:(e,t,s)=>{"use strict";e.exports=a;var r=s(9587);((a.prototype=Object.create(r.prototype)).constructor=a).className="Service";var n=s(9455),i=s(7886),o=s(8607);function a(e,t){r.call(this,e,t),this.methods={},this._methodsArray=null}function c(e){return e._methodsArray=null,e}a.fromJSON=function(e,t){var s=new a(e,t.options);if(t.methods)for(var r=Object.keys(t.methods),i=0;i<r.length;++i)s.add(n.fromJSON(r[i],t.methods[r[i]]));return t.nested&&s.addJSON(t.nested),s.comment=t.comment,s},a.prototype.toJSON=function(e){var t=r.prototype.toJSON.call(this,e),s=!!e&&Boolean(e.keepComments);return i.toObject(["options",t&&t.options||void 0,"methods",r.arrayToJSON(this.methodsArray,e)||{},"nested",t&&t.nested||void 0,"comment",s?this.comment:void 0])},Object.defineProperty(a.prototype,"methodsArray",{get:function(){return this._methodsArray||(this._methodsArray=i.toArray(this.methods))}}),a.prototype.get=function(e){return this.methods[e]||r.prototype.get.call(this,e)},a.prototype.resolveAll=function(){for(var e=this.methodsArray,t=0;t<e.length;++t)e[t].resolve();return r.prototype.resolve.call(this)},a.prototype.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+"' in "+this);return e instanceof n?(this.methods[e.name]=e,e.parent=this,c(this)):r.prototype.add.call(this,e)},a.prototype.remove=function(e){if(e instanceof n){if(this.methods[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.methods[e.name],e.parent=null,c(this)}return r.prototype.remove.call(this,e)},a.prototype.create=function(e,t,s){for(var r,n=new o.Service(e,t,s),a=0;a<this.methodsArray.length;++a){var c=i.lcFirst((r=this._methodsArray[a]).resolve().name).replace(/[^$\w_]/g,"");n[c]=i.codegen(["r","c"],i.isReserved(c)?c+"_":c)("return this.rpcCall(m,q,s,r,c)")({m:r,q:r.resolvedRequestType.ctor,s:r.resolvedResponseType.ctor})}return n}},396:(e,t,s)=>{"use strict";e.exports=x;var r=s(9587);((x.prototype=Object.create(r.prototype)).constructor=x).className="Type";var n=s(238),i=s(8930),o=s(5263),a=s(6977),c=s(5280),u=s(5986),d=s(9924),l=s(3117),h=s(7886),f=s(8357),p=s(8159),y=s(5669),m=s(2777),v=s(2016);function x(e,t){r.call(this,e,t),this.fields={},this.oneofs=void 0,this.extensions=void 0,this.reserved=void 0,this.group=void 0,this._fieldsById=null,this._fieldsArray=null,this._oneofsArray=null,this._ctor=null}function _(e){return e._fieldsById=e._fieldsArray=e._oneofsArray=null,delete e.encode,delete e.decode,delete e.verify,e}Object.defineProperties(x.prototype,{fieldsById:{get:function(){if(this._fieldsById)return this._fieldsById;this._fieldsById={};for(var e=Object.keys(this.fields),t=0;t<e.length;++t){var s=this.fields[e[t]],r=s.id;if(this._fieldsById[r])throw Error("duplicate id "+r+" in "+this);this._fieldsById[r]=s}return this._fieldsById}},fieldsArray:{get:function(){return this._fieldsArray||(this._fieldsArray=h.toArray(this.fields))}},oneofsArray:{get:function(){return this._oneofsArray||(this._oneofsArray=h.toArray(this.oneofs))}},ctor:{get:function(){return this._ctor||(this.ctor=x.generateConstructor(this)())},set:function(e){var t=e.prototype;t instanceof u||((e.prototype=new u).constructor=e,h.merge(e.prototype,t)),e.$type=e.prototype.$type=this,h.merge(e,u,!0),this._ctor=e;for(var s=0;s<this.fieldsArray.length;++s)this._fieldsArray[s].resolve();var r={};for(s=0;s<this.oneofsArray.length;++s)r[this._oneofsArray[s].resolve().name]={get:h.oneOfGetter(this._oneofsArray[s].oneof),set:h.oneOfSetter(this._oneofsArray[s].oneof)};s&&Object.defineProperties(e.prototype,r)}}}),x.generateConstructor=function(e){for(var t,s=h.codegen(["p"],e.name),r=0;r<e.fieldsArray.length;++r)(t=e._fieldsArray[r]).map?s("this%s={}",h.safeProp(t.name)):t.repeated&&s("this%s=[]",h.safeProp(t.name));return s("if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)")("this[ks[i]]=p[ks[i]]")},x.fromJSON=function(e,t){var s=new x(e,t.options);s.extensions=t.extensions,s.reserved=t.reserved;for(var u=Object.keys(t.fields),d=0;d<u.length;++d)s.add((void 0!==t.fields[u[d]].keyType?a.fromJSON:o.fromJSON)(u[d],t.fields[u[d]]));if(t.oneofs)for(u=Object.keys(t.oneofs),d=0;d<u.length;++d)s.add(i.fromJSON(u[d],t.oneofs[u[d]]));if(t.nested)for(u=Object.keys(t.nested),d=0;d<u.length;++d){var l=t.nested[u[d]];s.add((void 0!==l.id?o.fromJSON:void 0!==l.fields?x.fromJSON:void 0!==l.values?n.fromJSON:void 0!==l.methods?c.fromJSON:r.fromJSON)(u[d],l))}return t.extensions&&t.extensions.length&&(s.extensions=t.extensions),t.reserved&&t.reserved.length&&(s.reserved=t.reserved),t.group&&(s.group=!0),t.comment&&(s.comment=t.comment),s},x.prototype.toJSON=function(e){var t=r.prototype.toJSON.call(this,e),s=!!e&&Boolean(e.keepComments);return h.toObject(["options",t&&t.options||void 0,"oneofs",r.arrayToJSON(this.oneofsArray,e),"fields",r.arrayToJSON(this.fieldsArray.filter((function(e){return!e.declaringField})),e)||{},"extensions",this.extensions&&this.extensions.length?this.extensions:void 0,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"group",this.group||void 0,"nested",t&&t.nested||void 0,"comment",s?this.comment:void 0])},x.prototype.resolveAll=function(){for(var e=this.fieldsArray,t=0;t<e.length;)e[t++].resolve();var s=this.oneofsArray;for(t=0;t<s.length;)s[t++].resolve();return r.prototype.resolveAll.call(this)},x.prototype.get=function(e){return this.fields[e]||this.oneofs&&this.oneofs[e]||this.nested&&this.nested[e]||null},x.prototype.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+"' in "+this);if(e instanceof o&&void 0===e.extend){if(this._fieldsById?this._fieldsById[e.id]:this.fieldsById[e.id])throw Error("duplicate id "+e.id+" in "+this);if(this.isReservedId(e.id))throw Error("id "+e.id+" is reserved in "+this);if(this.isReservedName(e.name))throw Error("name '"+e.name+"' is reserved in "+this);return e.parent&&e.parent.remove(e),this.fields[e.name]=e,e.message=this,e.onAdd(this),_(this)}return e instanceof i?(this.oneofs||(this.oneofs={}),this.oneofs[e.name]=e,e.onAdd(this),_(this)):r.prototype.add.call(this,e)},x.prototype.remove=function(e){if(e instanceof o&&void 0===e.extend){if(!this.fields||this.fields[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.fields[e.name],e.parent=null,e.onRemove(this),_(this)}if(e instanceof i){if(!this.oneofs||this.oneofs[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.oneofs[e.name],e.parent=null,e.onRemove(this),_(this)}return r.prototype.remove.call(this,e)},x.prototype.isReservedId=function(e){return r.isReservedId(this.reserved,e)},x.prototype.isReservedName=function(e){return r.isReservedName(this.reserved,e)},x.prototype.create=function(e){return new this.ctor(e)},x.prototype.setup=function(){for(var e=this.fullName,t=[],s=0;s<this.fieldsArray.length;++s)t.push(this._fieldsArray[s].resolve().resolvedType);this.encode=f(this)({Writer:l,types:t,util:h}),this.decode=p(this)({Reader:d,types:t,util:h}),this.verify=y(this)({types:t,util:h}),this.fromObject=m.fromObject(this)({types:t,util:h}),this.toObject=m.toObject(this)({types:t,util:h});var r=v[e];if(r){var n=Object.create(this);n.fromObject=this.fromObject,this.fromObject=r.fromObject.bind(n),n.toObject=this.toObject,this.toObject=r.toObject.bind(n)}return this},x.prototype.encode=function(e,t){return this.setup().encode(e,t)},x.prototype.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},x.prototype.decode=function(e,t){return this.setup().decode(e,t)},x.prototype.decodeDelimited=function(e){return e instanceof d||(e=d.create(e)),this.decode(e,e.uint32())},x.prototype.verify=function(e){return this.setup().verify(e)},x.prototype.fromObject=function(e){return this.setup().fromObject(e)},x.prototype.toObject=function(e,t){return this.setup().toObject(e,t)},x.d=function(e){return function(t){h.decorateType(t,e)}}},8372:(e,t,s)=>{"use strict";var r=t,n=s(7886),i=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];function o(e,t){var s=0,r={};for(t|=0;s<e.length;)r[i[s+t]]=e[s++];return r}r.basic=o([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]),r.defaults=o([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",n.emptyArray,null]),r.long=o([0,0,0,1,1],7),r.mapKey=o([0,0,0,5,5,0,0,0,1,1,0,2],2),r.packed=o([1,5,0,0,0,5,5,0,0,0,1,1,0])},7886:(e,t,s)=>{"use strict";var r,n,i=e.exports=s(4652),o=s(9188);i.codegen=s(6348),i.fetch=s(7803),i.path=s(1272),i.fs=i.inquire("fs"),i.toArray=function(e){if(e){for(var t=Object.keys(e),s=new Array(t.length),r=0;r<t.length;)s[r]=e[t[r++]];return s}return[]},i.toObject=function(e){for(var t={},s=0;s<e.length;){var r=e[s++],n=e[s++];void 0!==n&&(t[r]=n)}return t};var a=/\\/g,c=/"/g;i.isReserved=function(e){return/^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/.test(e)},i.safeProp=function(e){return!/^[$\w_]+$/.test(e)||i.isReserved(e)?'["'+e.replace(a,"\\\\").replace(c,'\\"')+'"]':"."+e},i.ucFirst=function(e){return e.charAt(0).toUpperCase()+e.substring(1)};var u=/_([a-z])/g;i.camelCase=function(e){return e.substring(0,1)+e.substring(1).replace(u,(function(e,t){return t.toUpperCase()}))},i.compareFieldsById=function(e,t){return e.id-t.id},i.decorateType=function(e,t){if(e.$type)return t&&e.$type.name!==t&&(i.decorateRoot.remove(e.$type),e.$type.name=t,i.decorateRoot.add(e.$type)),e.$type;r||(r=s(396));var n=new r(t||e.name);return i.decorateRoot.add(n),n.ctor=e,Object.defineProperty(e,"$type",{value:n,enumerable:!1}),Object.defineProperty(e.prototype,"$type",{value:n,enumerable:!1}),n};var d=0;i.decorateEnum=function(e){if(e.$type)return e.$type;n||(n=s(238));var t=new n("Enum"+d++,e);return i.decorateRoot.add(t),Object.defineProperty(e,"$type",{value:t,enumerable:!1}),t},i.setProperty=function(e,t,s){if("object"!=typeof e)throw TypeError("dst must be an object");if(!t)throw TypeError("path must be specified");return function e(t,s,r){var n=s.shift();if("__proto__"===n)return t;if(s.length>0)t[n]=e(t[n]||{},s,r);else{var i=t[n];i&&(r=[].concat(i).concat(r)),t[n]=r}return t}(e,t=t.split("."),s)},Object.defineProperty(i,"decorateRoot",{get:function(){return o.decorated||(o.decorated=new(s(6720)))}})},1427:(e,t,s)=>{"use strict";e.exports=n;var r=s(4652);function n(e,t){this.lo=e>>>0,this.hi=t>>>0}var i=n.zero=new n(0,0);i.toNumber=function(){return 0},i.zzEncode=i.zzDecode=function(){return this},i.length=function(){return 1};var o=n.zeroHash="\0\0\0\0\0\0\0\0";n.fromNumber=function(e){if(0===e)return i;var t=e<0;t&&(e=-e);var s=e>>>0,r=(e-s)/4294967296>>>0;return t&&(r=~r>>>0,s=~s>>>0,++s>4294967295&&(s=0,++r>4294967295&&(r=0))),new n(s,r)},n.from=function(e){if("number"==typeof e)return n.fromNumber(e);if(r.isString(e)){if(!r.Long)return n.fromNumber(parseInt(e,10));e=r.Long.fromString(e)}return e.low||e.high?new n(e.low>>>0,e.high>>>0):i},n.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=1+~this.lo>>>0,s=~this.hi>>>0;return t||(s=s+1>>>0),-(t+4294967296*s)}return this.lo+4294967296*this.hi},n.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;n.fromHash=function(e){return e===o?i:new n((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)},n.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)},n.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},n.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},n.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,s=this.hi>>>24;return 0===s?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:s<128?9:10}},4652:function(e,t,s){"use strict";var r=t;function n(e,t,s){for(var r=Object.keys(t),n=0;n<r.length;++n)void 0!==e[r[n]]&&s||(e[r[n]]=t[r[n]]);return e}function i(e){function t(e,s){if(!(this instanceof t))return new t(e,s);Object.defineProperty(this,"message",{get:function(){return e}}),Error.captureStackTrace?Error.captureStackTrace(this,t):Object.defineProperty(this,"stack",{value:(new Error).stack||""}),s&&n(this,s)}return(t.prototype=Object.create(Error.prototype)).constructor=t,Object.defineProperty(t.prototype,"name",{get:function(){return e}}),t.prototype.toString=function(){return this.name+": "+this.message},t}r.asPromise=s(537),r.base64=s(9745),r.EventEmitter=s(4459),r.float=s(897),r.inquire=s(3229),r.utf8=s(113),r.pool=s(7986),r.LongBits=s(1427),r.isNode=Boolean(void 0!==s.g&&s.g&&s.g.process&&s.g.process.versions&&s.g.process.versions.node),r.global=r.isNode&&s.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 s=e[t];return!(null==s||!e.hasOwnProperty(t))&&("object"!=typeof s||(Array.isArray(s)?s.length:Object.keys(s).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 s=r.LongBits.fromHash(e);return r.Long?r.Long.fromBits(s.lo,s.hi,t):s.toNumber(Boolean(t))},r.merge=n,r.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},r.newError=i,r.ProtocolError=i("ProtocolError"),r.oneOfGetter=function(e){for(var t={},s=0;s<e.length;++s)t[e[s]]=1;return function(){for(var e=Object.keys(this),s=e.length-1;s>-1;--s)if(1===t[e[s]]&&void 0!==this[e[s]]&&null!==this[e[s]])return e[s]}},r.oneOfSetter=function(e){return function(t){for(var s=0;s<e.length;++s)e[s]!==t&&delete this[e[s]]}},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,s){return new e(t,s)},r._Buffer_allocUnsafe=e.allocUnsafe||function(t){return new e(t)}):r._Buffer_from=r._Buffer_allocUnsafe=null}},5669:(e,t,s)=>{"use strict";e.exports=function(e){var t=n.codegen(["m"],e.name+"$verify")('if(typeof m!=="object"||m===null)')("return%j","object expected"),s=e.oneofsArray,r={};s.length&&t("var p={}");for(var c=0;c<e.fieldsArray.length;++c){var u=e._fieldsArray[c].resolve(),d="m"+n.safeProp(u.name);if(u.optional&&t("if(%s!=null&&m.hasOwnProperty(%j)){",d,u.name),u.map)t("if(!util.isObject(%s))",d)("return%j",i(u,"object"))("var k=Object.keys(%s)",d)("for(var i=0;i<k.length;++i){"),a(t,u,"k[i]"),o(t,u,c,d+"[k[i]]")("}");else if(u.repeated)t("if(!Array.isArray(%s))",d)("return%j",i(u,"array"))("for(var i=0;i<%s.length;++i){",d),o(t,u,c,d+"[i]")("}");else{if(u.partOf){var l=n.safeProp(u.partOf.name);1===r[u.partOf.name]&&t("if(p%s===1)",l)("return%j",u.partOf.name+": multiple values"),r[u.partOf.name]=1,t("p%s=1",l)}o(t,u,c,d)}u.optional&&t("}")}return t("return null")};var r=s(238),n=s(7886);function i(e,t){return e.name+": "+t+(e.repeated&&"array"!==t?"[]":e.map&&"object"!==t?"{k:"+e.keyType+"}":"")+" expected"}function o(e,t,s,n){if(t.resolvedType)if(t.resolvedType instanceof r){e("switch(%s){",n)("default:")("return%j",i(t,"enum value"));for(var o=Object.keys(t.resolvedType.values),a=0;a<o.length;++a)e("case %i:",t.resolvedType.values[o[a]]);e("break")("}")}else e("{")("var e=types[%i].verify(%s);",s,n)("if(e)")("return%j+e",t.name+".")("}");else switch(t.type){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!util.isInteger(%s))",n)("return%j",i(t,"integer"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))",n,n,n,n)("return%j",i(t,"integer|Long"));break;case"float":case"double":e('if(typeof %s!=="number")',n)("return%j",i(t,"number"));break;case"bool":e('if(typeof %s!=="boolean")',n)("return%j",i(t,"boolean"));break;case"string":e("if(!util.isString(%s))",n)("return%j",i(t,"string"));break;case"bytes":e('if(!(%s&&typeof %s.length==="number"||util.isString(%s)))',n,n,n)("return%j",i(t,"buffer"))}return e}function a(e,t,s){switch(t.keyType){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!util.key32Re.test(%s))",s)("return%j",i(t,"integer key"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!util.key64Re.test(%s))",s)("return%j",i(t,"integer|Long key"));break;case"bool":e("if(!util.key2Re.test(%s))",s)("return%j",i(t,"boolean key"))}return e}},2016:(e,t,s)=>{"use strict";var r=t,n=s(5986);r[".google.protobuf.Any"]={fromObject:function(e){if(e&&e["@type"]){var t=e["@type"].substring(e["@type"].lastIndexOf("/")+1),s=this.lookup(t);if(s){var r="."===e["@type"].charAt(0)?e["@type"].substr(1):e["@type"];return-1===r.indexOf("/")&&(r="/"+r),this.create({type_url:r,value:s.encode(s.fromObject(e)).finish()})}}return this.fromObject(e)},toObject:function(e,t){var s="",r="";if(t&&t.json&&e.type_url&&e.value){r=e.type_url.substring(e.type_url.lastIndexOf("/")+1),s=e.type_url.substring(0,e.type_url.lastIndexOf("/")+1);var i=this.lookup(r);i&&(e=i.decode(e.value))}if(!(e instanceof this.ctor)&&e instanceof n){var o=e.$type.toObject(e,t);return""===s&&(s="type.googleapis.com/"),r=s+("."===e.$type.fullName[0]?e.$type.fullName.substr(1):e.$type.fullName),o["@type"]=r,o}return this.toObject(e,t)}}},3117:(e,t,s)=>{"use strict";e.exports=l;var r,n=s(4652),i=n.LongBits,o=n.base64,a=n.utf8;function c(e,t,s){this.fn=e,this.len=t,this.next=void 0,this.val=s}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 h=function(){return n.Buffer?function(){return(l.create=function(){return new r})()}:function(){return new l}};function f(e,t,s){t[s]=255&e}function p(e,t){this.len=e,this.next=void 0,this.val=t}function y(e,t,s){for(;e.hi;)t[s++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[s++]=127&e.lo|128,e.lo=e.lo>>>7;t[s++]=e.lo}function m(e,t,s){t[s]=255&e,t[s+1]=e>>>8&255,t[s+2]=e>>>16&255,t[s+3]=e>>>24}l.create=h(),l.alloc=function(e){return new n.Array(e)},n.Array!==Array&&(l.alloc=n.pool(l.alloc,n.Array.prototype.subarray)),l.prototype._push=function(e,t,s){return this.tail=this.tail.next=new c(e,t,s),this.len+=t,this},p.prototype=Object.create(c.prototype),p.prototype.fn=function(e,t,s){for(;e>127;)t[s++]=127&e|128,e>>>=7;t[s]=e},l.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new p((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(y,10,i.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=i.from(e);return this._push(y,t.length(),t)},l.prototype.int64=l.prototype.uint64,l.prototype.sint64=function(e){var t=i.from(e).zzEncode();return this._push(y,t.length(),t)},l.prototype.bool=function(e){return this._push(f,1,e?1:0)},l.prototype.fixed32=function(e){return this._push(m,4,e>>>0)},l.prototype.sfixed32=l.prototype.fixed32,l.prototype.fixed64=function(e){var t=i.from(e);return this._push(m,4,t.lo)._push(m,4,t.hi)},l.prototype.sfixed64=l.prototype.fixed64,l.prototype.float=function(e){return this._push(n.float.writeFloatLE,4,e)},l.prototype.double=function(e){return this._push(n.float.writeDoubleLE,8,e)};var v=n.Array.prototype.set?function(e,t,s){t.set(e,s)}:function(e,t,s){for(var r=0;r<e.length;++r)t[s+r]=e[r]};l.prototype.bytes=function(e){var t=e.length>>>0;if(!t)return this._push(f,1,0);if(n.isString(e)){var s=l.alloc(t=o.length(e));o.decode(e,s,0),e=s}return this.uint32(t)._push(v,t,e)},l.prototype.string=function(e){var t=a.length(e);return t?this.uint32(t)._push(a.write,t,e):this._push(f,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,s=this.len;return this.reset().uint32(s),s&&(this.tail.next=e.next,this.tail=t,this.len+=s),this},l.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),s=0;e;)e.fn(e.val,t,s),s+=e.len,e=e.next;return t},l._configure=function(e){r=e,l.create=h(),r._configure()}},4766:(e,t,s)=>{"use strict";e.exports=i;var r=s(3117);(i.prototype=Object.create(r.prototype)).constructor=i;var n=s(4652);function i(){r.call(this)}function o(e,t,s){e.length<40?n.utf8.write(e,t,s):t.utf8Write?t.utf8Write(e,s):t.write(e,s)}i._configure=function(){i.alloc=n._Buffer_allocUnsafe,i.writeBytesBuffer=n.Buffer&&n.Buffer.prototype instanceof Uint8Array&&"set"===n.Buffer.prototype.set.name?function(e,t,s){t.set(e,s)}:function(e,t,s){if(e.copy)e.copy(t,s,0,e.length);else for(var r=0;r<e.length;)t[s++]=e[r++]}},i.prototype.bytes=function(e){n.isString(e)&&(e=n._Buffer_from(e,"base64"));var t=e.length>>>0;return this.uint32(t),t&&this._push(i.writeBytesBuffer,t,e),this},i.prototype.string=function(e){var t=n.Buffer.byteLength(e);return this.uint32(t),t&&this._push(o,t,e),this},i._configure()},537:e=>{"use strict";e.exports=function(e,t){var s=new Array(arguments.length-1),r=0,n=2,i=!0;for(;n<arguments.length;)s[r++]=arguments[n++];return new Promise((function(n,o){s[r]=function(e){if(i)if(i=!1,e)o(e);else{for(var t=new Array(arguments.length-1),s=0;s<t.length;)t[s++]=arguments[s];n.apply(null,t)}};try{e.apply(t||null,s)}catch(e){i&&(i=!1,o(e))}}))}},9745:(e,t)=>{"use strict";var s=t;s.length=function(e){var t=e.length;if(!t)return 0;for(var s=0;--t%4>1&&"="===e.charAt(t);)++s;return Math.ceil(3*e.length)/4-s};for(var r=new Array(64),n=new Array(123),i=0;i<64;)n[r[i]=i<26?i+65:i<52?i+71:i<62?i-4:i-59|43]=i++;s.encode=function(e,t,s){for(var n,i=null,o=[],a=0,c=0;t<s;){var u=e[t++];switch(c){case 0:o[a++]=r[u>>2],n=(3&u)<<4,c=1;break;case 1:o[a++]=r[n|u>>4],n=(15&u)<<2,c=2;break;case 2:o[a++]=r[n|u>>6],o[a++]=r[63&u],c=0}a>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,o)),a=0)}return c&&(o[a++]=r[n],o[a++]=61,1===c&&(o[a++]=61)),i?(a&&i.push(String.fromCharCode.apply(String,o.slice(0,a))),i.join("")):String.fromCharCode.apply(String,o.slice(0,a))};var o="invalid encoding";s.decode=function(e,t,s){for(var r,i=s,a=0,c=0;c<e.length;){var u=e.charCodeAt(c++);if(61===u&&a>1)break;if(void 0===(u=n[u]))throw Error(o);switch(a){case 0:r=u,a=1;break;case 1:t[s++]=r<<2|(48&u)>>4,r=u,a=2;break;case 2:t[s++]=(15&r)<<4|(60&u)>>2,r=u,a=3;break;case 3:t[s++]=(3&r)<<6|u,a=0}}if(1===a)throw Error(o);return s-i},s.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}},6348:e=>{"use strict";function t(e,s){"string"==typeof e&&(s=e,e=void 0);var r=[];function n(e){if("string"!=typeof e){var s=i();if(t.verbose&&console.log("codegen: "+s),s="return "+s,e){for(var o=Object.keys(e),a=new Array(o.length+1),c=new Array(o.length),u=0;u<o.length;)a[u]=o[u],c[u]=e[o[u++]];return a[u]=s,Function.apply(null,a).apply(null,c)}return Function(s)()}for(var d=new Array(arguments.length-1),l=0;l<d.length;)d[l]=arguments[++l];if(l=0,e=e.replace(/%([%dfijs])/g,(function(e,t){var s=d[l++];switch(t){case"d":case"f":return String(Number(s));case"i":return String(Math.floor(s));case"j":return JSON.stringify(s);case"s":return String(s)}return"%"})),l!==d.length)throw Error("parameter count mismatch");return r.push(e),n}function i(t){return"function "+(t||s||"")+"("+(e&&e.join(",")||"")+"){\n "+r.join("\n ")+"\n}"}return n.toString=i,n}e.exports=t,t.verbose=!1},4459:e=>{"use strict";function t(){this._listeners={}}e.exports=t,t.prototype.on=function(e,t,s){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:t,ctx:s||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 s=this._listeners[e],r=0;r<s.length;)s[r].fn===t?s.splice(r,1):++r;return this},t.prototype.emit=function(e){var t=this._listeners[e];if(t){for(var s=[],r=1;r<arguments.length;)s.push(arguments[r++]);for(r=0;r<t.length;)t[r].fn.apply(t[r++].ctx,s)}return this}},7803:(e,t,s)=>{"use strict";e.exports=i;var r=s(537),n=s(3229)("fs");function i(e,t,s){return"function"==typeof t?(s=t,t={}):t||(t={}),s?!t.xhr&&n&&n.readFile?n.readFile(e,(function(r,n){return r&&"undefined"!=typeof XMLHttpRequest?i.xhr(e,t,s):r?s(r):s(null,t.binary?n:n.toString("utf8"))})):i.xhr(e,t,s):r(i,this,e,t)}i.xhr=function(e,t,s){var r=new XMLHttpRequest;r.onreadystatechange=function(){if(4===r.readyState){if(0!==r.status&&200!==r.status)return s(Error("status "+r.status));if(t.binary){var e=r.response;if(!e){e=[];for(var n=0;n<r.responseText.length;++n)e.push(255&r.responseText.charCodeAt(n))}return s(null,"undefined"!=typeof Uint8Array?new Uint8Array(e):e)}return s(null,r.responseText)}},t.binary&&("overrideMimeType"in r&&r.overrideMimeType("text/plain; charset=x-user-defined"),r.responseType="arraybuffer"),r.open("GET",e),r.send()}},897:e=>{"use strict";function t(e){return"undefined"!=typeof Float32Array?function(){var t=new Float32Array([-0]),s=new Uint8Array(t.buffer),r=128===s[3];function n(e,r,n){t[0]=e,r[n]=s[0],r[n+1]=s[1],r[n+2]=s[2],r[n+3]=s[3]}function i(e,r,n){t[0]=e,r[n]=s[3],r[n+1]=s[2],r[n+2]=s[1],r[n+3]=s[0]}function o(e,r){return s[0]=e[r],s[1]=e[r+1],s[2]=e[r+2],s[3]=e[r+3],t[0]}function a(e,r){return s[3]=e[r],s[2]=e[r+1],s[1]=e[r+2],s[0]=e[r+3],t[0]}e.writeFloatLE=r?n:i,e.writeFloatBE=r?i:n,e.readFloatLE=r?o:a,e.readFloatBE=r?a:o}():function(){function t(e,t,s,r){var n=t<0?1:0;if(n&&(t=-t),0===t)e(1/t>0?0:2147483648,s,r);else if(isNaN(t))e(2143289344,s,r);else if(t>34028234663852886e22)e((n<<31|2139095040)>>>0,s,r);else if(t<11754943508222875e-54)e((n<<31|Math.round(t/1401298464324817e-60))>>>0,s,r);else{var i=Math.floor(Math.log(t)/Math.LN2);e((n<<31|i+127<<23|8388607&Math.round(t*Math.pow(2,-i)*8388608))>>>0,s,r)}}function o(e,t,s){var r=e(t,s),n=2*(r>>31)+1,i=r>>>23&255,o=8388607&r;return 255===i?o?NaN:n*(1/0):0===i?1401298464324817e-60*n*o:n*Math.pow(2,i-150)*(o+8388608)}e.writeFloatLE=t.bind(null,s),e.writeFloatBE=t.bind(null,r),e.readFloatLE=o.bind(null,n),e.readFloatBE=o.bind(null,i)}(),"undefined"!=typeof Float64Array?function(){var t=new Float64Array([-0]),s=new Uint8Array(t.buffer),r=128===s[7];function n(e,r,n){t[0]=e,r[n]=s[0],r[n+1]=s[1],r[n+2]=s[2],r[n+3]=s[3],r[n+4]=s[4],r[n+5]=s[5],r[n+6]=s[6],r[n+7]=s[7]}function i(e,r,n){t[0]=e,r[n]=s[7],r[n+1]=s[6],r[n+2]=s[5],r[n+3]=s[4],r[n+4]=s[3],r[n+5]=s[2],r[n+6]=s[1],r[n+7]=s[0]}function o(e,r){return s[0]=e[r],s[1]=e[r+1],s[2]=e[r+2],s[3]=e[r+3],s[4]=e[r+4],s[5]=e[r+5],s[6]=e[r+6],s[7]=e[r+7],t[0]}function a(e,r){return s[7]=e[r],s[6]=e[r+1],s[5]=e[r+2],s[4]=e[r+3],s[3]=e[r+4],s[2]=e[r+5],s[1]=e[r+6],s[0]=e[r+7],t[0]}e.writeDoubleLE=r?n:i,e.writeDoubleBE=r?i:n,e.readDoubleLE=r?o:a,e.readDoubleBE=r?a:o}():function(){function t(e,t,s,r,n,i){var o=r<0?1:0;if(o&&(r=-r),0===r)e(0,n,i+t),e(1/r>0?0:2147483648,n,i+s);else if(isNaN(r))e(0,n,i+t),e(2146959360,n,i+s);else if(r>17976931348623157e292)e(0,n,i+t),e((o<<31|2146435072)>>>0,n,i+s);else{var a;if(r<22250738585072014e-324)e((a=r/5e-324)>>>0,n,i+t),e((o<<31|a/4294967296)>>>0,n,i+s);else{var c=Math.floor(Math.log(r)/Math.LN2);1024===c&&(c=1023),e(4503599627370496*(a=r*Math.pow(2,-c))>>>0,n,i+t),e((o<<31|c+1023<<20|1048576*a&1048575)>>>0,n,i+s)}}}function o(e,t,s,r,n){var i=e(r,n+t),o=e(r,n+s),a=2*(o>>31)+1,c=o>>>20&2047,u=4294967296*(1048575&o)+i;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,s,0,4),e.writeDoubleBE=t.bind(null,r,4,0),e.readDoubleLE=o.bind(null,n,0,4),e.readDoubleBE=o.bind(null,i,4,0)}(),e}function s(e,t,s){t[s]=255&e,t[s+1]=e>>>8&255,t[s+2]=e>>>16&255,t[s+3]=e>>>24}function r(e,t,s){t[s]=e>>>24,t[s+1]=e>>>16&255,t[s+2]=e>>>8&255,t[s+3]=255&e}function n(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}function i(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}e.exports=t(t)},3229: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},1272:(e,t)=>{"use strict";var s=t,r=s.isAbsolute=function(e){return/^(?:\/|\w+:)/.test(e)},n=s.normalize=function(e){var t=(e=e.replace(/\\/g,"/").replace(/\/{2,}/g,"/")).split("/"),s=r(e),n="";s&&(n=t.shift()+"/");for(var i=0;i<t.length;)".."===t[i]?i>0&&".."!==t[i-1]?t.splice(--i,2):s?t.splice(i,1):++i:"."===t[i]?t.splice(i,1):++i;return n+t.join("/")};s.resolve=function(e,t,s){return s||(t=n(t)),r(t)?t:(s||(e=n(e)),(e=e.replace(/(?:\/|^)[^/]+$/,"")).length?n(e+"/"+t):t)}},7986:e=>{"use strict";e.exports=function(e,t,s){var r=s||8192,n=r>>>1,i=null,o=r;return function(s){if(s<1||s>n)return e(s);o+s>r&&(i=e(r),o=0);var a=t.call(i,o,o+=s);return 7&o&&(o=1+(7|o)),a}}},113:(e,t)=>{"use strict";var s=t;s.length=function(e){for(var t=0,s=0,r=0;r<e.length;++r)(s=e.charCodeAt(r))<128?t+=1:s<2048?t+=2:55296==(64512&s)&&56320==(64512&e.charCodeAt(r+1))?(++r,t+=4):t+=3;return t},s.read=function(e,t,s){if(s-t<1)return"";for(var r,n=null,i=[],o=0;t<s;)(r=e[t++])<128?i[o++]=r:r>191&&r<224?i[o++]=(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,i[o++]=55296+(r>>10),i[o++]=56320+(1023&r)):i[o++]=(15&r)<<12|(63&e[t++])<<6|63&e[t++],o>8191&&((n||(n=[])).push(String.fromCharCode.apply(String,i)),o=0);return n?(o&&n.push(String.fromCharCode.apply(String,i.slice(0,o))),n.join("")):String.fromCharCode.apply(String,i.slice(0,o))},s.write=function(e,t,s){for(var r,n,i=s,o=0;o<e.length;++o)(r=e.charCodeAt(o))<128?t[s++]=r:r<2048?(t[s++]=r>>6|192,t[s++]=63&r|128):55296==(64512&r)&&56320==(64512&(n=e.charCodeAt(o+1)))?(r=65536+((1023&r)<<10)+(1023&n),++o,t[s++]=r>>18|240,t[s++]=r>>12&63|128,t[s++]=r>>6&63|128,t[s++]=63&r|128):(t[s++]=r>>12|224,t[s++]=r>>6&63|128,t[s++]=63&r|128);return s-i}},3717:(e,t)=>{function s(e){if(e)return function(e){for(var t in s.prototype)e[t]=s.prototype[t];return e}(e)}t.Emitter=s,s.prototype.on=s.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},s.prototype.once=function(e,t){function s(){this.off(e,s),t.apply(this,arguments)}return s.fn=t,this.on(e,s),this},s.prototype.off=s.prototype.removeListener=s.prototype.removeAllListeners=s.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var s,r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var n=0;n<r.length;n++)if((s=r[n])===t||s.fn===t){r.splice(n,1);break}return 0===r.length&&delete this._callbacks["$"+e],this},s.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),s=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(s){r=0;for(var n=(s=s.slice(0)).length;r<n;++r)s[r].apply(this,t)}return this},s.prototype.emitReserved=s.prototype.emit,s.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},s.prototype.hasListeners=function(e){return!!this.listeners(e).length}},7672:e=>{function t(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}e.exports=t,t.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),s=Math.floor(t*this.jitter*e);e=0==(1&Math.floor(10*t))?e-s:e+s}return 0|Math.min(e,this.max)},t.prototype.reset=function(){this.attempts=0},t.prototype.setMin=function(e){this.ms=e},t.prototype.setMax=function(e){this.max=e},t.prototype.setJitter=function(e){this.jitter=e}},3286:(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var r=s(7758),n=s.n(r)()((function(e){return e[1]}));n.push([e.id,".ck.ck-balloon-panel.ck-tooltip{pointer-events:none;z-index:calc(var(--ck-z-modal) + 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)}.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-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.ck-presence-list--collapsed .ck-presence-list__list{margin-left:var(--ck-spacing-standard);min-width:calc(var(--ck-user-avatar-size)*1.5)}.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 + 5px)}.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(4){opacity:.35}.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(2){opacity:.75}.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:0;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}.ck-presence-list__balloon button.ck-presence-list__dropdown-list-item *,.ck-presence-list__list button.ck-presence-list__list-item *{cursor:pointer}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}",""]);const i=n},9940:(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var r=s(7758),n=s.n(r)()((function(e){return e[1]}));n.push([e.id,".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-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-placeholder .ck-user__marker{display:none}@keyframes fadeInLeft{0%{opacity:0;transform:translateX(-10px)}to{opacity:1;transform:translateX(0)}}",""]);const i=n},7758:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var s=e(t);return t[2]?"@media ".concat(t[2]," {").concat(s,"}"):s})).join("")},t.i=function(e,s,r){"string"==typeof e&&(e=[[null,e,""]]);var n={};if(r)for(var i=0;i<this.length;i++){var o=this[i][0];null!=o&&(n[o]=!0)}for(var a=0;a<e.length;a++){var c=[].concat(e[a]);r&&n[c[0]]||(s&&(c[2]?c[2]="".concat(s," and ").concat(c[2]):c[2]=s),t.push(c))}},t}},7154:e=>{var t=1e3,s=60*t,r=60*s,n=24*r,i=7*n,o=365.25*n;function a(e,t,s,r){var n=t>=1.5*s;return Math.round(e/s)+" "+r+(n?"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*o;case"weeks":case"week":case"w":return c*i;case"days":case"day":case"d":return c*n;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*s;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 i=Math.abs(e);if(i>=n)return a(e,i,n,"day");if(i>=r)return a(e,i,r,"hour");if(i>=s)return a(e,i,s,"minute");if(i>=t)return a(e,i,t,"second");return e+" ms"}(e):function(e){var i=Math.abs(e);if(i>=n)return Math.round(e/n)+"d";if(i>=r)return Math.round(e/r)+"h";if(i>=s)return Math.round(e/s)+"m";if(i>=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))}},5579:(e,t,s)=>{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 s="color: "+this.color;t.splice(1,0,s,"color: inherit");let r=0,n=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(n=r))})),t.splice(n,0,s)},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=s(3847)(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},3847:(e,t,s)=>{e.exports=function(e){function t(e){let s,n,i,o=null;function a(...e){if(!a.enabled)return;const r=a,n=Number(new Date),i=n-(s||n);r.diff=i,r.prev=s,r.curr=n,s=n,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let o=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((s,n)=>{if("%%"===s)return"%";o++;const i=t.formatters[n];if("function"==typeof i){const t=e[o];s=i.call(r,t),e.splice(o,1),o--}return s})),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!==o?o:(n!==t.namespaces&&(n=t.namespaces,i=t.enabled(e)),i),set:e=>{o=e}}),"function"==typeof t.init&&t.init(a),a}function r(e,s){const r=t(this.namespace+(void 0===s?":":s)+e);return r.log=this.log,r}function n(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(n),...t.skips.map(n).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let s;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),n=r.length;for(s=0;s<n;s++)r[s]&&("-"===(e=r[s].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 s,r;for(s=0,r=t.skips.length;s<r;s++)if(t.skips[s].test(e))return!1;for(s=0,r=t.names.length;s<r;s++)if(t.names[s].test(e))return!0;return!1},t.humanize=s(7154),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((s=>{t[s]=e[s]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let s=0;for(let t=0;t<e.length;t++)s=(s<<5)-s+e.charCodeAt(t),s|=0;return t.colors[Math.abs(s)%t.colors.length]},t.enable(t.load()),t}},4568:e=>{try{e.exports="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(t){e.exports=!1}},9827:(e,t)=>{t.encode=function(e){var t="";for(var s in e)e.hasOwnProperty(s)&&(t.length&&(t+="&"),t+=encodeURIComponent(s)+"="+encodeURIComponent(e[s]));return t},t.decode=function(e){for(var t={},s=e.split("&"),r=0,n=s.length;r<n;r++){var i=s[r].split("=");t[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return t}},5977:e=>{var t=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,s=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];e.exports=function(e){var r=e,n=e.indexOf("["),i=e.indexOf("]");-1!=n&&-1!=i&&(e=e.substring(0,n)+e.substring(n,i).replace(/:/g,";")+e.substring(i,e.length));for(var o,a,c=t.exec(e||""),u={},d=14;d--;)u[s[d]]=c[d]||"";return-1!=n&&-1!=i&&(u.source=r,u.host=u.host.substring(1,u.host.length-1).replace(/;/g,":"),u.authority=u.authority.replace("[","").replace("]","").replace(/;/g,":"),u.ipv6uri=!0),u.pathNames=function(e,t){var s=/\/{2,9}/g,r=t.replace(s,"/").split("/");"/"!=t.substr(0,1)&&0!==t.length||r.splice(0,1);"/"==t.substr(t.length-1,1)&&r.splice(r.length-1,1);return r}(0,u.path),u.queryKey=(o=u.query,a={},o.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,(function(e,t,s){t&&(a[t]=s)})),a),u}},6154:(e,t,s)=>{"use strict";e.exports=s(7278)},6274:(e,t,s)=>{"use strict";var r=t,n=s(4937),i=s(7572);function o(e,t,s,r){if(t.resolvedType)if(t.resolvedType instanceof n){e("switch(d%s){",r);for(var i=t.resolvedType.values,o=Object.keys(i),a=0;a<o.length;++a)t.repeated&&i[o[a]]===t.typeDefault&&e("default:"),e("case%j:",o[a])("case %i:",i[o[a]])("m%s=%j",r,i[o[a]])("break");e("}")}else e('if(typeof d%s!=="object")',r)("throw TypeError(%j)",t.fullName+": object expected")("m%s=types[%i].fromObject(d%s)",r,s,r);else{var c=!1;switch(t.type){case"double":case"float":e("m%s=Number(d%s)",r,r);break;case"uint32":case"fixed32":e("m%s=d%s>>>0",r,r);break;case"int32":case"sint32":case"sfixed32":e("m%s=d%s|0",r,r);break;case"uint64":c=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j",r,r,c)('else if(typeof d%s==="string")',r)("m%s=parseInt(d%s,10)",r,r)('else if(typeof d%s==="number")',r)("m%s=d%s",r,r)('else if(typeof d%s==="object")',r)("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)",r,r,r,c?"true":"");break;case"bytes":e('if(typeof d%s==="string")',r)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)",r,r,r)("else if(d%s.length >= 0)",r)("m%s=d%s",r,r);break;case"string":e("m%s=String(d%s)",r,r);break;case"bool":e("m%s=Boolean(d%s)",r,r)}}return e}function a(e,t,s,r){if(t.resolvedType)t.resolvedType instanceof n?e("d%s=o.enums===String?types[%i].values[m%s]:m%s",r,s,r,r):e("d%s=types[%i].toObject(m%s,o)",r,s,r);else{var i=!1;switch(t.type){case"double":case"float":e("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s",r,r,r,r);break;case"uint64":i=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e('if(typeof m%s==="number")',r)("d%s=o.longs===String?String(m%s):m%s",r,r,r)("else")("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s",r,r,r,r,i?"true":"",r);break;case"bytes":e("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s",r,r,r,r,r);break;default:e("d%s=m%s",r,r)}}return e}r.fromObject=function(e){var t=e.fieldsArray,s=i.codegen(["d"],e.name+"$fromObject")("if(d instanceof this.ctor)")("return d");if(!t.length)return s("return new this.ctor");s("var m=new this.ctor");for(var r=0;r<t.length;++r){var a=t[r].resolve(),c=i.safeProp(a.name);a.map?(s("if(d%s){",c)('if(typeof d%s!=="object")',c)("throw TypeError(%j)",a.fullName+": object expected")("m%s={}",c)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){",c),o(s,a,r,c+"[ks[i]]")("}")("}")):a.repeated?(s("if(d%s){",c)("if(!Array.isArray(d%s))",c)("throw TypeError(%j)",a.fullName+": array expected")("m%s=[]",c)("for(var i=0;i<d%s.length;++i){",c),o(s,a,r,c+"[i]")("}")("}")):(a.resolvedType instanceof n||s("if(d%s!=null){",c),o(s,a,r,c),a.resolvedType instanceof n||s("}"))}return s("return m")},r.toObject=function(e){var t=e.fieldsArray.slice().sort(i.compareFieldsById);if(!t.length)return i.codegen()("return {}");for(var s=i.codegen(["m","o"],e.name+"$toObject")("if(!o)")("o={}")("var d={}"),r=[],o=[],c=[],u=0;u<t.length;++u)t[u].partOf||(t[u].resolve().repeated?r:t[u].map?o:c).push(t[u]);if(r.length){for(s("if(o.arrays||o.defaults){"),u=0;u<r.length;++u)s("d%s=[]",i.safeProp(r[u].name));s("}")}if(o.length){for(s("if(o.objects||o.defaults){"),u=0;u<o.length;++u)s("d%s={}",i.safeProp(o[u].name));s("}")}if(c.length){for(s("if(o.defaults){"),u=0;u<c.length;++u){var d=c[u],l=i.safeProp(d.name);if(d.resolvedType instanceof n)s("d%s=o.enums===String?%j:%j",l,d.resolvedType.valuesById[d.typeDefault],d.typeDefault);else if(d.long)s("if(util.Long){")("var n=new util.Long(%i,%i,%j)",d.typeDefault.low,d.typeDefault.high,d.typeDefault.unsigned)("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n",l)("}else")("d%s=o.longs===String?%j:%i",l,d.typeDefault.toString(),d.typeDefault.toNumber());else if(d.bytes){var h="["+Array.prototype.slice.call(d.typeDefault).join(",")+"]";s("if(o.bytes===String)d%s=%j",l,String.fromCharCode.apply(String,d.typeDefault))("else{")("d%s=%s",l,h)("if(o.bytes!==Array)d%s=util.newBuffer(d%s)",l,l)("}")}else s("d%s=%j",l,d.typeDefault)}s("}")}var f=!1;for(u=0;u<t.length;++u){d=t[u];var p=e._fieldsArray.indexOf(d);l=i.safeProp(d.name);d.map?(f||(f=!0,s("var ks2")),s("if(m%s&&(ks2=Object.keys(m%s)).length){",l,l)("d%s={}",l)("for(var j=0;j<ks2.length;++j){"),a(s,d,p,l+"[ks2[j]]")("}")):d.repeated?(s("if(m%s&&m%s.length){",l,l)("d%s=[]",l)("for(var j=0;j<m%s.length;++j){",l),a(s,d,p,l+"[j]")("}")):(s("if(m%s!=null&&m.hasOwnProperty(%j)){",l,d.name),a(s,d,p,l),d.partOf&&s("if(o.oneofs)")("d%s=%j",i.safeProp(d.partOf.name),d.name)),s("}")}return s("return d")}},4799:(e,t,s)=>{"use strict";e.exports=function(e){var t=i.codegen(["r","l"],e.name+"$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new this.ctor"+(e.fieldsArray.filter((function(e){return e.map})).length?",k,value":""))("while(r.pos<c){")("var t=r.uint32()");e.group&&t("if((t&7)===4)")("break");t("switch(t>>>3){");for(var s=0;s<e.fieldsArray.length;++s){var a=e._fieldsArray[s].resolve(),c=a.resolvedType instanceof r?"int32":a.type,u="m"+i.safeProp(a.name);t("case %i: {",a.id),a.map?(t("if(%s===util.emptyObject)",u)("%s={}",u)("var c2 = r.uint32()+r.pos"),void 0!==n.defaults[a.keyType]?t("k=%j",n.defaults[a.keyType]):t("k=null"),void 0!==n.defaults[c]?t("value=%j",n.defaults[c]):t("value=null"),t("while(r.pos<c2){")("var tag2=r.uint32()")("switch(tag2>>>3){")("case 1: k=r.%s(); break",a.keyType)("case 2:"),void 0===n.basic[c]?t("value=types[%i].decode(r,r.uint32())",s):t("value=r.%s()",c),t("break")("default:")("r.skipType(tag2&7)")("break")("}")("}"),void 0!==n.long[a.keyType]?t('%s[typeof k==="object"?util.longToHash(k):k]=value',u):t("%s[k]=value",u)):a.repeated?(t("if(!(%s&&%s.length))",u,u)("%s=[]",u),void 0!==n.packed[c]&&t("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())",u,c)("}else"),void 0===n.basic[c]?t(a.resolvedType.group?"%s.push(types[%i].decode(r))":"%s.push(types[%i].decode(r,r.uint32()))",u,s):t("%s.push(r.%s())",u,c)):void 0===n.basic[c]?t(a.resolvedType.group?"%s=types[%i].decode(r)":"%s=types[%i].decode(r,r.uint32())",u,s):t("%s=r.%s()",u,c),t("break")("}")}for(t("default:")("r.skipType(t&7)")("break")("}")("}"),s=0;s<e._fieldsArray.length;++s){var d=e._fieldsArray[s];d.required&&t("if(!m.hasOwnProperty(%j))",d.name)("throw util.ProtocolError(%j,{instance:m})",o(d))}return t("return m")};var r=s(4937),n=s(8997),i=s(7572);function o(e){return"missing required '"+e.name+"'"}},6382:(e,t,s)=>{"use strict";e.exports=function(e){for(var t,s=i.codegen(["m","w"],e.name+"$encode")("if(!w)")("w=Writer.create()"),a=e.fieldsArray.slice().sort(i.compareFieldsById),c=0;c<a.length;++c){var u=a[c].resolve(),d=e._fieldsArray.indexOf(u),l=u.resolvedType instanceof r?"int32":u.type,h=n.basic[l];t="m"+i.safeProp(u.name),u.map?(s("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){",t,u.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",t)("w.uint32(%i).fork().uint32(%i).%s(ks[i])",(u.id<<3|2)>>>0,8|n.mapKey[u.keyType],u.keyType),void 0===h?s("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",d,t):s(".uint32(%i).%s(%s[ks[i]]).ldelim()",16|h,l,t),s("}")("}")):u.repeated?(s("if(%s!=null&&%s.length){",t,t),u.packed&&void 0!==n.packed[l]?s("w.uint32(%i).fork()",(u.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",t)("w.%s(%s[i])",l,t)("w.ldelim()"):(s("for(var i=0;i<%s.length;++i)",t),void 0===h?o(s,u,d,t+"[i]"):s("w.uint32(%i).%s(%s[i])",(u.id<<3|h)>>>0,l,t)),s("}")):(u.optional&&s("if(%s!=null&&Object.hasOwnProperty.call(m,%j))",t,u.name),void 0===h?o(s,u,d,t):s("w.uint32(%i).%s(%s)",(u.id<<3|h)>>>0,l,t))}return s("return w")};var r=s(4937),n=s(8997),i=s(7572);function o(e,t,s,r){return t.resolvedType.group?e("types[%i].encode(%s,w.uint32(%i)).uint32(%i)",s,r,(t.id<<3|3)>>>0,(t.id<<3|4)>>>0):e("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()",s,r,(t.id<<3|2)>>>0)}},4937:(e,t,s)=>{"use strict";e.exports=o;var r=s(4154);((o.prototype=Object.create(r.prototype)).constructor=o).className="Enum";var n=s(512),i=s(7572);function o(e,t,s,n,i){if(r.call(this,e,s),t&&"object"!=typeof t)throw TypeError("values must be an object");if(this.valuesById={},this.values=Object.create(this.valuesById),this.comment=n,this.comments=i||{},this.reserved=void 0,t)for(var o=Object.keys(t),a=0;a<o.length;++a)"number"==typeof t[o[a]]&&(this.valuesById[this.values[o[a]]=t[o[a]]]=o[a])}o.fromJSON=function(e,t){var s=new o(e,t.values,t.options,t.comment,t.comments);return s.reserved=t.reserved,s},o.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return i.toObject(["options",this.options,"values",this.values,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"comment",t?this.comment:void 0,"comments",t?this.comments:void 0])},o.prototype.add=function(e,t,s){if(!i.isString(e))throw TypeError("name must be a string");if(!i.isInteger(t))throw TypeError("id must be an integer");if(void 0!==this.values[e])throw Error("duplicate name '"+e+"' in "+this);if(this.isReservedId(t))throw Error("id "+t+" is reserved in "+this);if(this.isReservedName(e))throw Error("name '"+e+"' is reserved in "+this);if(void 0!==this.valuesById[t]){if(!this.options||!this.options.allow_alias)throw Error("duplicate id "+t+" in "+this);this.values[e]=t}else this.valuesById[this.values[e]=t]=e;return this.comments[e]=s||null,this},o.prototype.remove=function(e){if(!i.isString(e))throw TypeError("name must be a string");var t=this.values[e];if(null==t)throw Error("name '"+e+"' does not exist in "+this);return delete this.valuesById[t],delete this.values[e],delete this.comments[e],this},o.prototype.isReservedId=function(e){return n.isReservedId(this.reserved,e)},o.prototype.isReservedName=function(e){return n.isReservedName(this.reserved,e)}},5891:(e,t,s)=>{"use strict";e.exports=u;var r=s(4154);((u.prototype=Object.create(r.prototype)).constructor=u).className="Field";var n,i=s(4937),o=s(8997),a=s(7572),c=/^required|optional|repeated$/;function u(e,t,s,n,i,u,d){if(a.isObject(n)?(d=i,u=n,n=i=void 0):a.isObject(i)&&(d=u,u=i,i=void 0),r.call(this,e,u),!a.isInteger(t)||t<0)throw TypeError("id must be a non-negative integer");if(!a.isString(s))throw TypeError("type must be a string");if(void 0!==n&&!c.test(n=n.toString().toLowerCase()))throw TypeError("rule must be a string rule");if(void 0!==i&&!a.isString(i))throw TypeError("extend must be a string");"proto3_optional"===n&&(n="optional"),this.rule=n&&"optional"!==n?n:void 0,this.type=s,this.id=t,this.extend=i||void 0,this.required="required"===n,this.optional=!this.required,this.repeated="repeated"===n,this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=!!a.Long&&void 0!==o.long[s],this.bytes="bytes"===s,this.resolvedType=null,this.extensionField=null,this.declaringField=null,this._packed=null,this.comment=d}u.fromJSON=function(e,t){return new u(e,t.id,t.type,t.rule,t.extend,t.options,t.comment)},Object.defineProperty(u.prototype,"packed",{get:function(){return null===this._packed&&(this._packed=!1!==this.getOption("packed")),this._packed}}),u.prototype.setOption=function(e,t,s){return"packed"===e&&(this._packed=null),r.prototype.setOption.call(this,e,t,s)},u.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return a.toObject(["rule","optional"!==this.rule&&this.rule||void 0,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",t?this.comment:void 0])},u.prototype.resolve=function(){if(this.resolved)return this;if(void 0===(this.typeDefault=o.defaults[this.type])?(this.resolvedType=(this.declaringField?this.declaringField.parent:this.parent).lookupTypeOrEnum(this.type),this.resolvedType instanceof n?this.typeDefault=null:this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]):this.options&&this.options.proto3_optional&&(this.typeDefault=null),this.options&&null!=this.options.default&&(this.typeDefault=this.options.default,this.resolvedType instanceof i&&"string"==typeof this.typeDefault&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.options&&(!0!==this.options.packed&&(void 0===this.options.packed||!this.resolvedType||this.resolvedType instanceof i)||delete this.options.packed,Object.keys(this.options).length||(this.options=void 0)),this.long)this.typeDefault=a.Long.fromNumber(this.typeDefault,"u"===this.type.charAt(0)),Object.freeze&&Object.freeze(this.typeDefault);else if(this.bytes&&"string"==typeof this.typeDefault){var e;a.base64.test(this.typeDefault)?a.base64.decode(this.typeDefault,e=a.newBuffer(a.base64.length(this.typeDefault)),0):a.utf8.write(this.typeDefault,e=a.newBuffer(a.utf8.length(this.typeDefault)),0),this.typeDefault=e}return this.map?this.defaultValue=a.emptyObject:this.repeated?this.defaultValue=a.emptyArray:this.defaultValue=this.typeDefault,this.parent instanceof n&&(this.parent.ctor.prototype[this.name]=this.defaultValue),r.prototype.resolve.call(this)},u.d=function(e,t,s,r){return"function"==typeof t?t=a.decorateType(t).name:t&&"object"==typeof t&&(t=a.decorateEnum(t).name),function(n,i){a.decorateType(n.constructor).add(new u(i,e,t,s,{default:r}))}},u._configure=function(e){n=e}},7278:(e,t,s)=>{"use strict";var r=e.exports=s(3278);r.build="light",r.load=function(e,t,s){return"function"==typeof t?(s=t,t=new r.Root):t||(t=new r.Root),t.load(e,s)},r.loadSync=function(e,t){return t||(t=new r.Root),t.loadSync(e)},r.encoder=s(6382),r.decoder=s(4799),r.verifier=s(8600),r.converter=s(6274),r.ReflectionObject=s(4154),r.Namespace=s(512),r.Root=s(2613),r.Enum=s(4937),r.Type=s(4560),r.Field=s(5891),r.OneOf=s(3044),r.MapField=s(8911),r.Service=s(877),r.Method=s(4935),r.Message=s(4777),r.wrappers=s(3375),r.types=s(8997),r.util=s(7572),r.ReflectionObject._configure(r.Root),r.Namespace._configure(r.Type,r.Service,r.Enum),r.Root._configure(r.Type),r.Field._configure(r.Type)},3278:(e,t,s)=>{"use strict";var r=t;function n(){r.util._configure(),r.Writer._configure(r.BufferWriter),r.Reader._configure(r.BufferReader)}r.build="minimal",r.Writer=s(2944),r.BufferWriter=s(2178),r.Reader=s(9867),r.BufferReader=s(2676),r.util=s(4155),r.rpc=s(3290),r.roots=s(284),r.configure=n,n()},8911:(e,t,s)=>{"use strict";e.exports=o;var r=s(5891);((o.prototype=Object.create(r.prototype)).constructor=o).className="MapField";var n=s(8997),i=s(7572);function o(e,t,s,n,o,a){if(r.call(this,e,t,n,void 0,void 0,o,a),!i.isString(s))throw TypeError("keyType must be a string");this.keyType=s,this.resolvedKeyType=null,this.map=!0}o.fromJSON=function(e,t){return new o(e,t.id,t.keyType,t.type,t.options,t.comment)},o.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return i.toObject(["keyType",this.keyType,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",t?this.comment:void 0])},o.prototype.resolve=function(){if(this.resolved)return this;if(void 0===n.mapKey[this.keyType])throw Error("invalid key type: "+this.keyType);return r.prototype.resolve.call(this)},o.d=function(e,t,s){return"function"==typeof s?s=i.decorateType(s).name:s&&"object"==typeof s&&(s=i.decorateEnum(s).name),function(r,n){i.decorateType(r.constructor).add(new o(n,e,t,s))}}},4777:(e,t,s)=>{"use strict";e.exports=n;var r=s(4155);function n(e){if(e)for(var t=Object.keys(e),s=0;s<t.length;++s)this[t[s]]=e[t[s]]}n.create=function(e){return this.$type.create(e)},n.encode=function(e,t){return this.$type.encode(e,t)},n.encodeDelimited=function(e,t){return this.$type.encodeDelimited(e,t)},n.decode=function(e){return this.$type.decode(e)},n.decodeDelimited=function(e){return this.$type.decodeDelimited(e)},n.verify=function(e){return this.$type.verify(e)},n.fromObject=function(e){return this.$type.fromObject(e)},n.toObject=function(e,t){return this.$type.toObject(e,t)},n.prototype.toJSON=function(){return this.$type.toObject(this,r.toJSONOptions)}},4935:(e,t,s)=>{"use strict";e.exports=i;var r=s(4154);((i.prototype=Object.create(r.prototype)).constructor=i).className="Method";var n=s(7572);function i(e,t,s,i,o,a,c,u,d){if(n.isObject(o)?(c=o,o=a=void 0):n.isObject(a)&&(c=a,a=void 0),void 0!==t&&!n.isString(t))throw TypeError("type must be a string");if(!n.isString(s))throw TypeError("requestType must be a string");if(!n.isString(i))throw TypeError("responseType must be a string");r.call(this,e,c),this.type=t||"rpc",this.requestType=s,this.requestStream=!!o||void 0,this.responseType=i,this.responseStream=!!a||void 0,this.resolvedRequestType=null,this.resolvedResponseType=null,this.comment=u,this.parsedOptions=d}i.fromJSON=function(e,t){return new i(e,t.type,t.requestType,t.responseType,t.requestStream,t.responseStream,t.options,t.comment,t.parsedOptions)},i.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return n.toObject(["type","rpc"!==this.type&&this.type||void 0,"requestType",this.requestType,"requestStream",this.requestStream,"responseType",this.responseType,"responseStream",this.responseStream,"options",this.options,"comment",t?this.comment:void 0,"parsedOptions",this.parsedOptions])},i.prototype.resolve=function(){return this.resolved?this:(this.resolvedRequestType=this.parent.lookupType(this.requestType),this.resolvedResponseType=this.parent.lookupType(this.responseType),r.prototype.resolve.call(this))}},512:(e,t,s)=>{"use strict";e.exports=d;var r=s(4154);((d.prototype=Object.create(r.prototype)).constructor=d).className="Namespace";var n,i,o,a=s(5891),c=s(7572);function u(e,t){if(e&&e.length){for(var s={},r=0;r<e.length;++r)s[e[r].name]=e[r].toJSON(t);return s}}function d(e,t){r.call(this,e,t),this.nested=void 0,this._nestedArray=null}function l(e){return e._nestedArray=null,e}d.fromJSON=function(e,t){return new d(e,t.options).addJSON(t.nested)},d.arrayToJSON=u,d.isReservedId=function(e,t){if(e)for(var s=0;s<e.length;++s)if("string"!=typeof e[s]&&e[s][0]<=t&&e[s][1]>t)return!0;return!1},d.isReservedName=function(e,t){if(e)for(var s=0;s<e.length;++s)if(e[s]===t)return!0;return!1},Object.defineProperty(d.prototype,"nestedArray",{get:function(){return this._nestedArray||(this._nestedArray=c.toArray(this.nested))}}),d.prototype.toJSON=function(e){return c.toObject(["options",this.options,"nested",u(this.nestedArray,e)])},d.prototype.addJSON=function(e){if(e)for(var t,s=Object.keys(e),r=0;r<s.length;++r)t=e[s[r]],this.add((void 0!==t.fields?n.fromJSON:void 0!==t.values?o.fromJSON:void 0!==t.methods?i.fromJSON:void 0!==t.id?a.fromJSON:d.fromJSON)(s[r],t));return this},d.prototype.get=function(e){return this.nested&&this.nested[e]||null},d.prototype.getEnum=function(e){if(this.nested&&this.nested[e]instanceof o)return this.nested[e].values;throw Error("no such enum: "+e)},d.prototype.add=function(e){if(!(e instanceof a&&void 0!==e.extend||e instanceof n||e instanceof o||e instanceof i||e instanceof d))throw TypeError("object must be a valid nested object");if(this.nested){var t=this.get(e.name);if(t){if(!(t instanceof d&&e instanceof d)||t instanceof n||t instanceof i)throw Error("duplicate name '"+e.name+"' in "+this);for(var s=t.nestedArray,r=0;r<s.length;++r)e.add(s[r]);this.remove(t),this.nested||(this.nested={}),e.setOptions(t.options,!0)}}else this.nested={};return this.nested[e.name]=e,e.onAdd(this),l(this)},d.prototype.remove=function(e){if(!(e instanceof r))throw TypeError("object must be a ReflectionObject");if(e.parent!==this)throw Error(e+" is not a member of "+this);return delete this.nested[e.name],Object.keys(this.nested).length||(this.nested=void 0),e.onRemove(this),l(this)},d.prototype.define=function(e,t){if(c.isString(e))e=e.split(".");else if(!Array.isArray(e))throw TypeError("illegal path");if(e&&e.length&&""===e[0])throw Error("path must be relative");for(var s=this;e.length>0;){var r=e.shift();if(s.nested&&s.nested[r]){if(!((s=s.nested[r])instanceof d))throw Error("path conflicts with non-namespace objects")}else s.add(s=new d(r))}return t&&s.addJSON(t),s},d.prototype.resolveAll=function(){for(var e=this.nestedArray,t=0;t<e.length;)e[t]instanceof d?e[t++].resolveAll():e[t++].resolve();return this.resolve()},d.prototype.lookup=function(e,t,s){if("boolean"==typeof t?(s=t,t=void 0):t&&!Array.isArray(t)&&(t=[t]),c.isString(e)&&e.length){if("."===e)return this.root;e=e.split(".")}else if(!e.length)return this;if(""===e[0])return this.root.lookup(e.slice(1),t);var r=this.get(e[0]);if(r){if(1===e.length){if(!t||t.indexOf(r.constructor)>-1)return r}else if(r instanceof d&&(r=r.lookup(e.slice(1),t,!0)))return r}else for(var n=0;n<this.nestedArray.length;++n)if(this._nestedArray[n]instanceof d&&(r=this._nestedArray[n].lookup(e,t,!0)))return r;return null===this.parent||s?null:this.parent.lookup(e,t)},d.prototype.lookupType=function(e){var t=this.lookup(e,[n]);if(!t)throw Error("no such type: "+e);return t},d.prototype.lookupEnum=function(e){var t=this.lookup(e,[o]);if(!t)throw Error("no such Enum '"+e+"' in "+this);return t},d.prototype.lookupTypeOrEnum=function(e){var t=this.lookup(e,[n,o]);if(!t)throw Error("no such Type or Enum '"+e+"' in "+this);return t},d.prototype.lookupService=function(e){var t=this.lookup(e,[i]);if(!t)throw Error("no such Service '"+e+"' in "+this);return t},d._configure=function(e,t,s){n=e,i=t,o=s}},4154:(e,t,s)=>{"use strict";e.exports=i,i.className="ReflectionObject";var r,n=s(7572);function i(e,t){if(!n.isString(e))throw TypeError("name must be a string");if(t&&!n.isObject(t))throw TypeError("options must be an object");this.options=t,this.parsedOptions=null,this.name=e,this.parent=null,this.resolved=!1,this.comment=null,this.filename=null}Object.defineProperties(i.prototype,{root:{get:function(){for(var e=this;null!==e.parent;)e=e.parent;return e}},fullName:{get:function(){for(var e=[this.name],t=this.parent;t;)e.unshift(t.name),t=t.parent;return e.join(".")}}}),i.prototype.toJSON=function(){throw Error()},i.prototype.onAdd=function(e){this.parent&&this.parent!==e&&this.parent.remove(this),this.parent=e,this.resolved=!1;var t=e.root;t instanceof r&&t._handleAdd(this)},i.prototype.onRemove=function(e){var t=e.root;t instanceof r&&t._handleRemove(this),this.parent=null,this.resolved=!1},i.prototype.resolve=function(){return this.resolved||this.root instanceof r&&(this.resolved=!0),this},i.prototype.getOption=function(e){if(this.options)return this.options[e]},i.prototype.setOption=function(e,t,s){return s&&this.options&&void 0!==this.options[e]||((this.options||(this.options={}))[e]=t),this},i.prototype.setParsedOption=function(e,t,s){this.parsedOptions||(this.parsedOptions=[]);var r=this.parsedOptions;if(s){var i=r.find((function(t){return Object.prototype.hasOwnProperty.call(t,e)}));if(i){var o=i[e];n.setProperty(o,s,t)}else(i={})[e]=n.setProperty({},s,t),r.push(i)}else{var a={};a[e]=t,r.push(a)}return this},i.prototype.setOptions=function(e,t){if(e)for(var s=Object.keys(e),r=0;r<s.length;++r)this.setOption(s[r],e[s[r]],t);return this},i.prototype.toString=function(){var e=this.constructor.className,t=this.fullName;return t.length?e+" "+t:e},i._configure=function(e){r=e}},3044:(e,t,s)=>{"use strict";e.exports=o;var r=s(4154);((o.prototype=Object.create(r.prototype)).constructor=o).className="OneOf";var n=s(5891),i=s(7572);function o(e,t,s,n){if(Array.isArray(t)||(s=t,t=void 0),r.call(this,e,s),void 0!==t&&!Array.isArray(t))throw TypeError("fieldNames must be an Array");this.oneof=t||[],this.fieldsArray=[],this.comment=n}function a(e){if(e.parent)for(var t=0;t<e.fieldsArray.length;++t)e.fieldsArray[t].parent||e.parent.add(e.fieldsArray[t])}o.fromJSON=function(e,t){return new o(e,t.oneof,t.options,t.comment)},o.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return i.toObject(["options",this.options,"oneof",this.oneof,"comment",t?this.comment:void 0])},o.prototype.add=function(e){if(!(e instanceof n))throw TypeError("field must be a Field");return e.parent&&e.parent!==this.parent&&e.parent.remove(e),this.oneof.push(e.name),this.fieldsArray.push(e),e.partOf=this,a(this),this},o.prototype.remove=function(e){if(!(e instanceof n))throw TypeError("field must be a Field");var t=this.fieldsArray.indexOf(e);if(t<0)throw Error(e+" is not a member of "+this);return this.fieldsArray.splice(t,1),(t=this.oneof.indexOf(e.name))>-1&&this.oneof.splice(t,1),e.partOf=null,this},o.prototype.onAdd=function(e){r.prototype.onAdd.call(this,e);for(var t=0;t<this.oneof.length;++t){var s=e.get(this.oneof[t]);s&&!s.partOf&&(s.partOf=this,this.fieldsArray.push(s))}a(this)},o.prototype.onRemove=function(e){for(var t,s=0;s<this.fieldsArray.length;++s)(t=this.fieldsArray[s]).parent&&t.parent.remove(t);r.prototype.onRemove.call(this,e)},o.d=function(){for(var e=new Array(arguments.length),t=0;t<arguments.length;)e[t]=arguments[t++];return function(t,s){i.decorateType(t.constructor).add(new o(s,e)),Object.defineProperty(t,s,{get:i.oneOfGetter(e),set:i.oneOfSetter(e)})}}},9867:(e,t,s)=>{"use strict";e.exports=c;var r,n=s(4155),i=n.LongBits,o=n.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 n.Buffer?function(e){return(c.create=function(e){return n.Buffer.isBuffer(e)?new r(e):d(e)})(e)}:d};function h(){var e=new i(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 f(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function p(){if(this.pos+8>this.len)throw a(this,8);return new i(f(this.buf,this.pos+=4),f(this.buf,this.pos+=4))}c.create=l(),c.prototype._slice=n.Array.prototype.subarray||n.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 f(this.buf,this.pos+=4)},c.prototype.sfixed32=function(){if(this.pos+4>this.len)throw a(this,4);return 0|f(this.buf,this.pos+=4)},c.prototype.float=function(){if(this.pos+4>this.len)throw a(this,4);var e=n.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=n.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},c.prototype.bytes=function(){var e=this.uint32(),t=this.pos,s=this.pos+e;if(s>this.len)throw a(this,e);return this.pos+=e,Array.isArray(this.buf)?this.buf.slice(t,s):t===s?new this.buf.constructor(0):this._slice.call(this.buf,t,s)},c.prototype.string=function(){var e=this.bytes();return o.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=n.Long?"toLong":"toNumber";n.merge(c.prototype,{int64:function(){return h.call(this)[t](!1)},uint64:function(){return h.call(this)[t](!0)},sint64:function(){return h.call(this).zzDecode()[t](!1)},fixed64:function(){return p.call(this)[t](!0)},sfixed64:function(){return p.call(this)[t](!1)}})}},2676:(e,t,s)=>{"use strict";e.exports=i;var r=s(9867);(i.prototype=Object.create(r.prototype)).constructor=i;var n=s(4155);function i(e){r.call(this,e)}i._configure=function(){n.Buffer&&(i.prototype._slice=n.Buffer.prototype.slice)},i.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))},i._configure()},2613:(e,t,s)=>{"use strict";e.exports=l;var r=s(512);((l.prototype=Object.create(r.prototype)).constructor=l).className="Root";var n,i,o,a=s(5891),c=s(4937),u=s(3044),d=s(7572);function l(e){r.call(this,"",e),this.deferred=[],this.files=[]}function h(){}l.fromJSON=function(e,t){return t||(t=new l),e.options&&t.setOptions(e.options),t.addJSON(e.nested)},l.prototype.resolvePath=d.path.resolve,l.prototype.fetch=d.fetch,l.prototype.load=function e(t,s,r){"function"==typeof s&&(r=s,s=void 0);var n=this;if(!r)return d.asPromise(e,n,t,s);var a=r===h;function c(e,t){if(r){var s=r;if(r=null,a)throw e;s(e,t)}}function u(e){var t=e.lastIndexOf("google/protobuf/");if(t>-1){var s=e.substring(t);if(s in o)return s}return null}function l(e,t){try{if(d.isString(t)&&"{"===t.charAt(0)&&(t=JSON.parse(t)),d.isString(t)){i.filename=e;var r,o=i(t,n,s),l=0;if(o.imports)for(;l<o.imports.length;++l)(r=u(o.imports[l])||n.resolvePath(e,o.imports[l]))&&f(r);if(o.weakImports)for(l=0;l<o.weakImports.length;++l)(r=u(o.weakImports[l])||n.resolvePath(e,o.weakImports[l]))&&f(r,!0)}else n.setOptions(t.options).addJSON(t.nested)}catch(e){c(e)}a||p||c(null,n)}function f(e,t){if(!(n.files.indexOf(e)>-1))if(n.files.push(e),e in o)a?l(e,o[e]):(++p,setTimeout((function(){--p,l(e,o[e])})));else if(a){var s;try{s=d.fs.readFileSync(e).toString("utf8")}catch(e){return void(t||c(e))}l(e,s)}else++p,n.fetch(e,(function(s,i){--p,r&&(s?t?p||c(null,n):c(s):l(e,i))}))}var p=0;d.isString(t)&&(t=[t]);for(var y,m=0;m<t.length;++m)(y=n.resolvePath("",t[m]))&&f(y);if(a)return n;p||c(null,n)},l.prototype.loadSync=function(e,t){if(!d.isNode)throw Error("not supported");return this.load(e,t,h)},l.prototype.resolveAll=function(){if(this.deferred.length)throw Error("unresolvable extensions: "+this.deferred.map((function(e){return"'extend "+e.extend+"' in "+e.parent.fullName})).join(", "));return r.prototype.resolveAll.call(this)};var f=/^[A-Z]/;function p(e,t){var s=t.parent.lookup(t.extend);if(s){var r=new a(t.fullName,t.id,t.type,t.rule,void 0,t.options);return r.declaringField=t,t.extensionField=r,s.add(r),!0}return!1}l.prototype._handleAdd=function(e){if(e instanceof a)void 0===e.extend||e.extensionField||p(0,e)||this.deferred.push(e);else if(e instanceof c)f.test(e.name)&&(e.parent[e.name]=e.values);else if(!(e instanceof u)){if(e instanceof n)for(var t=0;t<this.deferred.length;)p(0,this.deferred[t])?this.deferred.splice(t,1):++t;for(var s=0;s<e.nestedArray.length;++s)this._handleAdd(e._nestedArray[s]);f.test(e.name)&&(e.parent[e.name]=e)}},l.prototype._handleRemove=function(e){if(e instanceof a){if(void 0!==e.extend)if(e.extensionField)e.extensionField.parent.remove(e.extensionField),e.extensionField=null;else{var t=this.deferred.indexOf(e);t>-1&&this.deferred.splice(t,1)}}else if(e instanceof c)f.test(e.name)&&delete e.parent[e.name];else if(e instanceof r){for(var s=0;s<e.nestedArray.length;++s)this._handleRemove(e._nestedArray[s]);f.test(e.name)&&delete e.parent[e.name]}},l._configure=function(e,t,s){n=e,i=t,o=s}},284:e=>{"use strict";e.exports={}},3290:(e,t,s)=>{"use strict";t.Service=s(979)},979:(e,t,s)=>{"use strict";e.exports=n;var r=s(4155);function n(e,t,s){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(s)}(n.prototype=Object.create(r.EventEmitter.prototype)).constructor=n,n.prototype.rpcCall=function e(t,s,n,i,o){if(!i)throw TypeError("request must be specified");var a=this;if(!o)return r.asPromise(e,a,t,s,n,i);if(a.rpcImpl)try{return a.rpcImpl(t,s[a.requestDelimited?"encodeDelimited":"encode"](i).finish(),(function(e,s){if(e)return a.emit("error",e,t),o(e);if(null!==s){if(!(s instanceof n))try{s=n[a.responseDelimited?"decodeDelimited":"decode"](s)}catch(e){return a.emit("error",e,t),o(e)}return a.emit("data",s,t),o(null,s)}a.end(!0)}))}catch(e){return a.emit("error",e,t),void setTimeout((function(){o(e)}),0)}else setTimeout((function(){o(Error("already ended"))}),0)},n.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},877:(e,t,s)=>{"use strict";e.exports=a;var r=s(512);((a.prototype=Object.create(r.prototype)).constructor=a).className="Service";var n=s(4935),i=s(7572),o=s(3290);function a(e,t){r.call(this,e,t),this.methods={},this._methodsArray=null}function c(e){return e._methodsArray=null,e}a.fromJSON=function(e,t){var s=new a(e,t.options);if(t.methods)for(var r=Object.keys(t.methods),i=0;i<r.length;++i)s.add(n.fromJSON(r[i],t.methods[r[i]]));return t.nested&&s.addJSON(t.nested),s.comment=t.comment,s},a.prototype.toJSON=function(e){var t=r.prototype.toJSON.call(this,e),s=!!e&&Boolean(e.keepComments);return i.toObject(["options",t&&t.options||void 0,"methods",r.arrayToJSON(this.methodsArray,e)||{},"nested",t&&t.nested||void 0,"comment",s?this.comment:void 0])},Object.defineProperty(a.prototype,"methodsArray",{get:function(){return this._methodsArray||(this._methodsArray=i.toArray(this.methods))}}),a.prototype.get=function(e){return this.methods[e]||r.prototype.get.call(this,e)},a.prototype.resolveAll=function(){for(var e=this.methodsArray,t=0;t<e.length;++t)e[t].resolve();return r.prototype.resolve.call(this)},a.prototype.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+"' in "+this);return e instanceof n?(this.methods[e.name]=e,e.parent=this,c(this)):r.prototype.add.call(this,e)},a.prototype.remove=function(e){if(e instanceof n){if(this.methods[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.methods[e.name],e.parent=null,c(this)}return r.prototype.remove.call(this,e)},a.prototype.create=function(e,t,s){for(var r,n=new o.Service(e,t,s),a=0;a<this.methodsArray.length;++a){var c=i.lcFirst((r=this._methodsArray[a]).resolve().name).replace(/[^$\w_]/g,"");n[c]=i.codegen(["r","c"],i.isReserved(c)?c+"_":c)("return this.rpcCall(m,q,s,r,c)")({m:r,q:r.resolvedRequestType.ctor,s:r.resolvedResponseType.ctor})}return n}},4560:(e,t,s)=>{"use strict";e.exports=x;var r=s(512);((x.prototype=Object.create(r.prototype)).constructor=x).className="Type";var n=s(4937),i=s(3044),o=s(5891),a=s(8911),c=s(877),u=s(4777),d=s(9867),l=s(2944),h=s(7572),f=s(6382),p=s(4799),y=s(8600),m=s(6274),v=s(3375);function x(e,t){r.call(this,e,t),this.fields={},this.oneofs=void 0,this.extensions=void 0,this.reserved=void 0,this.group=void 0,this._fieldsById=null,this._fieldsArray=null,this._oneofsArray=null,this._ctor=null}function _(e){return e._fieldsById=e._fieldsArray=e._oneofsArray=null,delete e.encode,delete e.decode,delete e.verify,e}Object.defineProperties(x.prototype,{fieldsById:{get:function(){if(this._fieldsById)return this._fieldsById;this._fieldsById={};for(var e=Object.keys(this.fields),t=0;t<e.length;++t){var s=this.fields[e[t]],r=s.id;if(this._fieldsById[r])throw Error("duplicate id "+r+" in "+this);this._fieldsById[r]=s}return this._fieldsById}},fieldsArray:{get:function(){return this._fieldsArray||(this._fieldsArray=h.toArray(this.fields))}},oneofsArray:{get:function(){return this._oneofsArray||(this._oneofsArray=h.toArray(this.oneofs))}},ctor:{get:function(){return this._ctor||(this.ctor=x.generateConstructor(this)())},set:function(e){var t=e.prototype;t instanceof u||((e.prototype=new u).constructor=e,h.merge(e.prototype,t)),e.$type=e.prototype.$type=this,h.merge(e,u,!0),this._ctor=e;for(var s=0;s<this.fieldsArray.length;++s)this._fieldsArray[s].resolve();var r={};for(s=0;s<this.oneofsArray.length;++s)r[this._oneofsArray[s].resolve().name]={get:h.oneOfGetter(this._oneofsArray[s].oneof),set:h.oneOfSetter(this._oneofsArray[s].oneof)};s&&Object.defineProperties(e.prototype,r)}}}),x.generateConstructor=function(e){for(var t,s=h.codegen(["p"],e.name),r=0;r<e.fieldsArray.length;++r)(t=e._fieldsArray[r]).map?s("this%s={}",h.safeProp(t.name)):t.repeated&&s("this%s=[]",h.safeProp(t.name));return s("if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)")("this[ks[i]]=p[ks[i]]")},x.fromJSON=function(e,t){var s=new x(e,t.options);s.extensions=t.extensions,s.reserved=t.reserved;for(var u=Object.keys(t.fields),d=0;d<u.length;++d)s.add((void 0!==t.fields[u[d]].keyType?a.fromJSON:o.fromJSON)(u[d],t.fields[u[d]]));if(t.oneofs)for(u=Object.keys(t.oneofs),d=0;d<u.length;++d)s.add(i.fromJSON(u[d],t.oneofs[u[d]]));if(t.nested)for(u=Object.keys(t.nested),d=0;d<u.length;++d){var l=t.nested[u[d]];s.add((void 0!==l.id?o.fromJSON:void 0!==l.fields?x.fromJSON:void 0!==l.values?n.fromJSON:void 0!==l.methods?c.fromJSON:r.fromJSON)(u[d],l))}return t.extensions&&t.extensions.length&&(s.extensions=t.extensions),t.reserved&&t.reserved.length&&(s.reserved=t.reserved),t.group&&(s.group=!0),t.comment&&(s.comment=t.comment),s},x.prototype.toJSON=function(e){var t=r.prototype.toJSON.call(this,e),s=!!e&&Boolean(e.keepComments);return h.toObject(["options",t&&t.options||void 0,"oneofs",r.arrayToJSON(this.oneofsArray,e),"fields",r.arrayToJSON(this.fieldsArray.filter((function(e){return!e.declaringField})),e)||{},"extensions",this.extensions&&this.extensions.length?this.extensions:void 0,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"group",this.group||void 0,"nested",t&&t.nested||void 0,"comment",s?this.comment:void 0])},x.prototype.resolveAll=function(){for(var e=this.fieldsArray,t=0;t<e.length;)e[t++].resolve();var s=this.oneofsArray;for(t=0;t<s.length;)s[t++].resolve();return r.prototype.resolveAll.call(this)},x.prototype.get=function(e){return this.fields[e]||this.oneofs&&this.oneofs[e]||this.nested&&this.nested[e]||null},x.prototype.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+"' in "+this);if(e instanceof o&&void 0===e.extend){if(this._fieldsById?this._fieldsById[e.id]:this.fieldsById[e.id])throw Error("duplicate id "+e.id+" in "+this);if(this.isReservedId(e.id))throw Error("id "+e.id+" is reserved in "+this);if(this.isReservedName(e.name))throw Error("name '"+e.name+"' is reserved in "+this);return e.parent&&e.parent.remove(e),this.fields[e.name]=e,e.message=this,e.onAdd(this),_(this)}return e instanceof i?(this.oneofs||(this.oneofs={}),this.oneofs[e.name]=e,e.onAdd(this),_(this)):r.prototype.add.call(this,e)},x.prototype.remove=function(e){if(e instanceof o&&void 0===e.extend){if(!this.fields||this.fields[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.fields[e.name],e.parent=null,e.onRemove(this),_(this)}if(e instanceof i){if(!this.oneofs||this.oneofs[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.oneofs[e.name],e.parent=null,e.onRemove(this),_(this)}return r.prototype.remove.call(this,e)},x.prototype.isReservedId=function(e){return r.isReservedId(this.reserved,e)},x.prototype.isReservedName=function(e){return r.isReservedName(this.reserved,e)},x.prototype.create=function(e){return new this.ctor(e)},x.prototype.setup=function(){for(var e=this.fullName,t=[],s=0;s<this.fieldsArray.length;++s)t.push(this._fieldsArray[s].resolve().resolvedType);this.encode=f(this)({Writer:l,types:t,util:h}),this.decode=p(this)({Reader:d,types:t,util:h}),this.verify=y(this)({types:t,util:h}),this.fromObject=m.fromObject(this)({types:t,util:h}),this.toObject=m.toObject(this)({types:t,util:h});var r=v[e];if(r){var n=Object.create(this);n.fromObject=this.fromObject,this.fromObject=r.fromObject.bind(n),n.toObject=this.toObject,this.toObject=r.toObject.bind(n)}return this},x.prototype.encode=function(e,t){return this.setup().encode(e,t)},x.prototype.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},x.prototype.decode=function(e,t){return this.setup().decode(e,t)},x.prototype.decodeDelimited=function(e){return e instanceof d||(e=d.create(e)),this.decode(e,e.uint32())},x.prototype.verify=function(e){return this.setup().verify(e)},x.prototype.fromObject=function(e){return this.setup().fromObject(e)},x.prototype.toObject=function(e,t){return this.setup().toObject(e,t)},x.d=function(e){return function(t){h.decorateType(t,e)}}},8997:(e,t,s)=>{"use strict";var r=t,n=s(7572),i=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];function o(e,t){var s=0,r={};for(t|=0;s<e.length;)r[i[s+t]]=e[s++];return r}r.basic=o([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]),r.defaults=o([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",n.emptyArray,null]),r.long=o([0,0,0,1,1],7),r.mapKey=o([0,0,0,5,5,0,0,0,1,1,0,2],2),r.packed=o([1,5,0,0,0,5,5,0,0,0,1,1,0])},7572:(e,t,s)=>{"use strict";var r,n,i=e.exports=s(4155),o=s(284);i.codegen=s(6348),i.fetch=s(7803),i.path=s(1272),i.fs=i.inquire("fs"),i.toArray=function(e){if(e){for(var t=Object.keys(e),s=new Array(t.length),r=0;r<t.length;)s[r]=e[t[r++]];return s}return[]},i.toObject=function(e){for(var t={},s=0;s<e.length;){var r=e[s++],n=e[s++];void 0!==n&&(t[r]=n)}return t};var a=/\\/g,c=/"/g;i.isReserved=function(e){return/^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/.test(e)},i.safeProp=function(e){return!/^[$\w_]+$/.test(e)||i.isReserved(e)?'["'+e.replace(a,"\\\\").replace(c,'\\"')+'"]':"."+e},i.ucFirst=function(e){return e.charAt(0).toUpperCase()+e.substring(1)};var u=/_([a-z])/g;i.camelCase=function(e){return e.substring(0,1)+e.substring(1).replace(u,(function(e,t){return t.toUpperCase()}))},i.compareFieldsById=function(e,t){return e.id-t.id},i.decorateType=function(e,t){if(e.$type)return t&&e.$type.name!==t&&(i.decorateRoot.remove(e.$type),e.$type.name=t,i.decorateRoot.add(e.$type)),e.$type;r||(r=s(4560));var n=new r(t||e.name);return i.decorateRoot.add(n),n.ctor=e,Object.defineProperty(e,"$type",{value:n,enumerable:!1}),Object.defineProperty(e.prototype,"$type",{value:n,enumerable:!1}),n};var d=0;i.decorateEnum=function(e){if(e.$type)return e.$type;n||(n=s(4937));var t=new n("Enum"+d++,e);return i.decorateRoot.add(t),Object.defineProperty(e,"$type",{value:t,enumerable:!1}),t},i.setProperty=function(e,t,s){if("object"!=typeof e)throw TypeError("dst must be an object");if(!t)throw TypeError("path must be specified");return function e(t,s,r){var n=s.shift();if("__proto__"===n)return t;if(s.length>0)t[n]=e(t[n]||{},s,r);else{var i=t[n];i&&(r=[].concat(i).concat(r)),t[n]=r}return t}(e,t=t.split("."),s)},Object.defineProperty(i,"decorateRoot",{get:function(){return o.decorated||(o.decorated=new(s(2613)))}})},8950:(e,t,s)=>{"use strict";e.exports=n;var r=s(4155);function n(e,t){this.lo=e>>>0,this.hi=t>>>0}var i=n.zero=new n(0,0);i.toNumber=function(){return 0},i.zzEncode=i.zzDecode=function(){return this},i.length=function(){return 1};var o=n.zeroHash="\0\0\0\0\0\0\0\0";n.fromNumber=function(e){if(0===e)return i;var t=e<0;t&&(e=-e);var s=e>>>0,r=(e-s)/4294967296>>>0;return t&&(r=~r>>>0,s=~s>>>0,++s>4294967295&&(s=0,++r>4294967295&&(r=0))),new n(s,r)},n.from=function(e){if("number"==typeof e)return n.fromNumber(e);if(r.isString(e)){if(!r.Long)return n.fromNumber(parseInt(e,10));e=r.Long.fromString(e)}return e.low||e.high?new n(e.low>>>0,e.high>>>0):i},n.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=1+~this.lo>>>0,s=~this.hi>>>0;return t||(s=s+1>>>0),-(t+4294967296*s)}return this.lo+4294967296*this.hi},n.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;n.fromHash=function(e){return e===o?i:new n((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)},n.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)},n.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},n.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},n.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,s=this.hi>>>24;return 0===s?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:s<128?9:10}},4155:function(e,t,s){"use strict";var r=t;function n(e,t,s){for(var r=Object.keys(t),n=0;n<r.length;++n)void 0!==e[r[n]]&&s||(e[r[n]]=t[r[n]]);return e}function i(e){function t(e,s){if(!(this instanceof t))return new t(e,s);Object.defineProperty(this,"message",{get:function(){return e}}),Error.captureStackTrace?Error.captureStackTrace(this,t):Object.defineProperty(this,"stack",{value:(new Error).stack||""}),s&&n(this,s)}return t.prototype=Object.create(Error.prototype,{constructor:{value:t,writable:!0,enumerable:!1,configurable:!0},name:{get:()=>e,set:void 0,enumerable:!1,configurable:!0},toString:{value(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),t}r.asPromise=s(537),r.base64=s(9745),r.EventEmitter=s(4459),r.float=s(897),r.inquire=s(3229),r.utf8=s(113),r.pool=s(7986),r.LongBits=s(8950),r.isNode=Boolean(void 0!==s.g&&s.g&&s.g.process&&s.g.process.versions&&s.g.process.versions.node),r.global=r.isNode&&s.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 s=e[t];return!(null==s||!e.hasOwnProperty(t))&&("object"!=typeof s||(Array.isArray(s)?s.length:Object.keys(s).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 s=r.LongBits.fromHash(e);return r.Long?r.Long.fromBits(s.lo,s.hi,t):s.toNumber(Boolean(t))},r.merge=n,r.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},r.newError=i,r.ProtocolError=i("ProtocolError"),r.oneOfGetter=function(e){for(var t={},s=0;s<e.length;++s)t[e[s]]=1;return function(){for(var e=Object.keys(this),s=e.length-1;s>-1;--s)if(1===t[e[s]]&&void 0!==this[e[s]]&&null!==this[e[s]])return e[s]}},r.oneOfSetter=function(e){return function(t){for(var s=0;s<e.length;++s)e[s]!==t&&delete this[e[s]]}},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,s){return new e(t,s)},r._Buffer_allocUnsafe=e.allocUnsafe||function(t){return new e(t)}):r._Buffer_from=r._Buffer_allocUnsafe=null}},8600:(e,t,s)=>{"use strict";e.exports=function(e){var t=n.codegen(["m"],e.name+"$verify")('if(typeof m!=="object"||m===null)')("return%j","object expected"),s=e.oneofsArray,r={};s.length&&t("var p={}");for(var c=0;c<e.fieldsArray.length;++c){var u=e._fieldsArray[c].resolve(),d="m"+n.safeProp(u.name);if(u.optional&&t("if(%s!=null&&m.hasOwnProperty(%j)){",d,u.name),u.map)t("if(!util.isObject(%s))",d)("return%j",i(u,"object"))("var k=Object.keys(%s)",d)("for(var i=0;i<k.length;++i){"),a(t,u,"k[i]"),o(t,u,c,d+"[k[i]]")("}");else if(u.repeated)t("if(!Array.isArray(%s))",d)("return%j",i(u,"array"))("for(var i=0;i<%s.length;++i){",d),o(t,u,c,d+"[i]")("}");else{if(u.partOf){var l=n.safeProp(u.partOf.name);1===r[u.partOf.name]&&t("if(p%s===1)",l)("return%j",u.partOf.name+": multiple values"),r[u.partOf.name]=1,t("p%s=1",l)}o(t,u,c,d)}u.optional&&t("}")}return t("return null")};var r=s(4937),n=s(7572);function i(e,t){return e.name+": "+t+(e.repeated&&"array"!==t?"[]":e.map&&"object"!==t?"{k:"+e.keyType+"}":"")+" expected"}function o(e,t,s,n){if(t.resolvedType)if(t.resolvedType instanceof r){e("switch(%s){",n)("default:")("return%j",i(t,"enum value"));for(var o=Object.keys(t.resolvedType.values),a=0;a<o.length;++a)e("case %i:",t.resolvedType.values[o[a]]);e("break")("}")}else e("{")("var e=types[%i].verify(%s);",s,n)("if(e)")("return%j+e",t.name+".")("}");else switch(t.type){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!util.isInteger(%s))",n)("return%j",i(t,"integer"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))",n,n,n,n)("return%j",i(t,"integer|Long"));break;case"float":case"double":e('if(typeof %s!=="number")',n)("return%j",i(t,"number"));break;case"bool":e('if(typeof %s!=="boolean")',n)("return%j",i(t,"boolean"));break;case"string":e("if(!util.isString(%s))",n)("return%j",i(t,"string"));break;case"bytes":e('if(!(%s&&typeof %s.length==="number"||util.isString(%s)))',n,n,n)("return%j",i(t,"buffer"))}return e}function a(e,t,s){switch(t.keyType){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!util.key32Re.test(%s))",s)("return%j",i(t,"integer key"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!util.key64Re.test(%s))",s)("return%j",i(t,"integer|Long key"));break;case"bool":e("if(!util.key2Re.test(%s))",s)("return%j",i(t,"boolean key"))}return e}},3375:(e,t,s)=>{"use strict";var r=t,n=s(4777);r[".google.protobuf.Any"]={fromObject:function(e){if(e&&e["@type"]){var t=e["@type"].substring(e["@type"].lastIndexOf("/")+1),s=this.lookup(t);if(s){var r="."===e["@type"].charAt(0)?e["@type"].slice(1):e["@type"];return-1===r.indexOf("/")&&(r="/"+r),this.create({type_url:r,value:s.encode(s.fromObject(e)).finish()})}}return this.fromObject(e)},toObject:function(e,t){var s="",r="";if(t&&t.json&&e.type_url&&e.value){r=e.type_url.substring(e.type_url.lastIndexOf("/")+1),s=e.type_url.substring(0,e.type_url.lastIndexOf("/")+1);var i=this.lookup(r);i&&(e=i.decode(e.value))}if(!(e instanceof this.ctor)&&e instanceof n){var o=e.$type.toObject(e,t);return""===s&&(s="type.googleapis.com/"),r=s+("."===e.$type.fullName[0]?e.$type.fullName.slice(1):e.$type.fullName),o["@type"]=r,o}return this.toObject(e,t)}}},2944:(e,t,s)=>{"use strict";e.exports=l;var r,n=s(4155),i=n.LongBits,o=n.base64,a=n.utf8;function c(e,t,s){this.fn=e,this.len=t,this.next=void 0,this.val=s}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 h=function(){return n.Buffer?function(){return(l.create=function(){return new r})()}:function(){return new l}};function f(e,t,s){t[s]=255&e}function p(e,t){this.len=e,this.next=void 0,this.val=t}function y(e,t,s){for(;e.hi;)t[s++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[s++]=127&e.lo|128,e.lo=e.lo>>>7;t[s++]=e.lo}function m(e,t,s){t[s]=255&e,t[s+1]=e>>>8&255,t[s+2]=e>>>16&255,t[s+3]=e>>>24}l.create=h(),l.alloc=function(e){return new n.Array(e)},n.Array!==Array&&(l.alloc=n.pool(l.alloc,n.Array.prototype.subarray)),l.prototype._push=function(e,t,s){return this.tail=this.tail.next=new c(e,t,s),this.len+=t,this},p.prototype=Object.create(c.prototype),p.prototype.fn=function(e,t,s){for(;e>127;)t[s++]=127&e|128,e>>>=7;t[s]=e},l.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new p((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(y,10,i.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=i.from(e);return this._push(y,t.length(),t)},l.prototype.int64=l.prototype.uint64,l.prototype.sint64=function(e){var t=i.from(e).zzEncode();return this._push(y,t.length(),t)},l.prototype.bool=function(e){return this._push(f,1,e?1:0)},l.prototype.fixed32=function(e){return this._push(m,4,e>>>0)},l.prototype.sfixed32=l.prototype.fixed32,l.prototype.fixed64=function(e){var t=i.from(e);return this._push(m,4,t.lo)._push(m,4,t.hi)},l.prototype.sfixed64=l.prototype.fixed64,l.prototype.float=function(e){return this._push(n.float.writeFloatLE,4,e)},l.prototype.double=function(e){return this._push(n.float.writeDoubleLE,8,e)};var v=n.Array.prototype.set?function(e,t,s){t.set(e,s)}:function(e,t,s){for(var r=0;r<e.length;++r)t[s+r]=e[r]};l.prototype.bytes=function(e){var t=e.length>>>0;if(!t)return this._push(f,1,0);if(n.isString(e)){var s=l.alloc(t=o.length(e));o.decode(e,s,0),e=s}return this.uint32(t)._push(v,t,e)},l.prototype.string=function(e){var t=a.length(e);return t?this.uint32(t)._push(a.write,t,e):this._push(f,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,s=this.len;return this.reset().uint32(s),s&&(this.tail.next=e.next,this.tail=t,this.len+=s),this},l.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),s=0;e;)e.fn(e.val,t,s),s+=e.len,e=e.next;return t},l._configure=function(e){r=e,l.create=h(),r._configure()}},2178:(e,t,s)=>{"use strict";e.exports=i;var r=s(2944);(i.prototype=Object.create(r.prototype)).constructor=i;var n=s(4155);function i(){r.call(this)}function o(e,t,s){e.length<40?n.utf8.write(e,t,s):t.utf8Write?t.utf8Write(e,s):t.write(e,s)}i._configure=function(){i.alloc=n._Buffer_allocUnsafe,i.writeBytesBuffer=n.Buffer&&n.Buffer.prototype instanceof Uint8Array&&"set"===n.Buffer.prototype.set.name?function(e,t,s){t.set(e,s)}:function(e,t,s){if(e.copy)e.copy(t,s,0,e.length);else for(var r=0;r<e.length;)t[s++]=e[r++]}},i.prototype.bytes=function(e){n.isString(e)&&(e=n._Buffer_from(e,"base64"));var t=e.length>>>0;return this.uint32(t),t&&this._push(i.writeBytesBuffer,t,e),this},i.prototype.string=function(e){var t=n.Buffer.byteLength(e);return this.uint32(t),t&&this._push(o,t,e),this},i._configure()},1829:(e,t)=>{"use strict";var s=Object.prototype.hasOwnProperty;function r(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(e){return null}}function n(e){try{return encodeURIComponent(e)}catch(e){return null}}t.stringify=function(e,t){t=t||"";var r,i,o=[];for(i in"string"!=typeof t&&(t="?"),e)if(s.call(e,i)){if((r=e[i])||null!=r&&!isNaN(r)||(r=""),i=n(i),r=n(r),null===i||null===r)continue;o.push(i+"="+r)}return o.length?t+o.join("&"):""},t.parse=function(e){for(var t,s=/([^=?#&]+)=?([^&]*)/g,n={};t=s.exec(e);){var i=r(t[1]),o=r(t[2]);null===i||null===o||i in n||(n[i]=o)}return n}},3722: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}},7594:(e,t,s)=>{"use strict";var r,n=function(){return void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r},i=function(){var e={};return function(t){if(void 0===e[t]){var s=document.querySelector(t);if(window.HTMLIFrameElement&&s instanceof window.HTMLIFrameElement)try{s=s.contentDocument.head}catch(e){s=null}e[t]=s}return e[t]}}(),o=[];function a(e){for(var t=-1,s=0;s<o.length;s++)if(o[s].identifier===e){t=s;break}return t}function c(e,t){for(var s={},r=[],n=0;n<e.length;n++){var i=e[n],c=t.base?i[0]+t.base:i[0],u=s[c]||0,d="".concat(c," ").concat(u);s[c]=u+1;var l=a(d),h={css:i[1],media:i[2],sourceMap:i[3]};-1!==l?(o[l].references++,o[l].updater(h)):o.push({identifier:d,updater:m(h,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 n=s.nc;n&&(r.nonce=n)}if(Object.keys(r).forEach((function(e){t.setAttribute(e,r[e])})),"function"==typeof e.insert)e.insert(t);else{var o=i(e.insert||"head");if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(t)}return t}var d,l=(d=[],function(e,t){return d[e]=t,d.filter(Boolean).join("\n")});function h(e,t,s,r){var n=s?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;if(e.styleSheet)e.styleSheet.cssText=l(t,n);else{var i=document.createTextNode(n),o=e.childNodes;o[t]&&e.removeChild(o[t]),o.length?e.insertBefore(i,o[t]):e.appendChild(i)}}function f(e,t,s){var r=s.css,n=s.media,i=s.sourceMap;if(n?e.setAttribute("media",n):e.removeAttribute("media"),i&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}var p=null,y=0;function m(e,t){var s,r,n;if(t.singleton){var i=y++;s=p||(p=u(t)),r=h.bind(null,s,i,!1),n=h.bind(null,s,i,!0)}else s=u(t),r=f.bind(null,s,t),n=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(s)};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 n()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=n());var s=c(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var r=0;r<s.length;r++){var n=a(s[r]);o[n].references--}for(var i=c(e,t),u=0;u<s.length;u++){var d=a(s[u]);0===o[d].references&&(o[d].updater(),o.splice(d,1))}s=i}}}},9655:(e,t,s)=>{"use strict";var r=s(3722),n=s(1829),i=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,o=/[\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(i,"")}var h=[["#","hash"],["?","query"],function(e,t){return y(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]],f={hash:1,query:1};function p(e){var t,r=("undefined"!=typeof window?window:void 0!==s.g?s.g:"undefined"!=typeof self?self:{}).location||{},n={},i=typeof(e=e||r);if("blob:"===e.protocol)n=new v(unescape(e.pathname),{});else if("string"===i)for(t in n=new v(e,{}),f)delete n[t];else if("object"===i){for(t in e)t in f||(n[t]=e[t]);void 0===n.slashes&&(n.slashes=a.test(e.href))}return n}function y(e){return"file:"===e||"ftp:"===e||"http:"===e||"https:"===e||"ws:"===e||"wss:"===e}function m(e,t){e=(e=l(e)).replace(o,""),t=t||{};var s,r=u.exec(e),n=r[1]?r[1].toLowerCase():"",i=!!r[2],a=!!r[3],c=0;return i?a?(s=r[2]+r[3]+r[4],c=r[2].length+r[3].length):(s=r[2]+r[4],c=r[2].length):a?(s=r[3]+r[4],c=r[3].length):s=r[4],"file:"===n?c>=2&&(s=s.slice(2)):y(n)?s=r[4]:n?i&&(s=s.slice(2)):c>=2&&y(t.protocol)&&(s=r[4]),{protocol:n,slashes:i||y(n),slashesCount:c,rest:s}}function v(e,t,s){if(e=(e=l(e)).replace(o,""),!(this instanceof v))return new v(e,t,s);var i,a,c,u,f,x,_=h.slice(),g=typeof t,b=this,w=0;for("object"!==g&&"string"!==g&&(s=t,t=null),s&&"function"!=typeof s&&(s=n.parse),i=!(a=m(e||"",t=p(t))).protocol&&!a.slashes,b.slashes=a.slashes||i&&t.slashes,b.protocol=a.protocol||t.protocol||"",e=a.rest,("file:"===a.protocol&&(2!==a.slashesCount||d.test(e))||!a.slashes&&(a.protocol||a.slashesCount<2||!y(b.protocol)))&&(_[3]=[/(.*)/,"pathname"]);w<_.length;w++)"function"!=typeof(u=_[w])?(c=u[0],x=u[1],c!=c?b[x]=e:"string"==typeof c?~(f="@"===c?e.lastIndexOf(c):e.indexOf(c))&&("number"==typeof u[2]?(b[x]=e.slice(0,f),e=e.slice(f+u[2])):(b[x]=e.slice(f),e=e.slice(0,f))):(f=c.exec(e))&&(b[x]=f[1],e=e.slice(0,f.index)),b[x]=b[x]||i&&u[3]&&t[x]||"",u[4]&&(b[x]=b[x].toLowerCase())):e=u(e,b);s&&(b.query=s(b.query)),i&&t.slashes&&"/"!==b.pathname.charAt(0)&&(""!==b.pathname||""!==t.pathname)&&(b.pathname=function(e,t){if(""===e)return t;for(var s=(t||"/").split("/").slice(0,-1).concat(e.split("/")),r=s.length,n=s[r-1],i=!1,o=0;r--;)"."===s[r]?s.splice(r,1):".."===s[r]?(s.splice(r,1),o++):o&&(0===r&&(i=!0),s.splice(r,1),o--);return i&&s.unshift(""),"."!==n&&".."!==n||s.push(""),s.join("/")}(b.pathname,t.pathname)),"/"!==b.pathname.charAt(0)&&y(b.protocol)&&(b.pathname="/"+b.pathname),r(b.port,b.protocol)||(b.host=b.hostname,b.port=""),b.username=b.password="",b.auth&&(~(f=b.auth.indexOf(":"))?(b.username=b.auth.slice(0,f),b.username=encodeURIComponent(decodeURIComponent(b.username)),b.password=b.auth.slice(f+1),b.password=encodeURIComponent(decodeURIComponent(b.password))):b.username=encodeURIComponent(decodeURIComponent(b.auth)),b.auth=b.password?b.username+":"+b.password:b.username),b.origin="file:"!==b.protocol&&y(b.protocol)&&b.host?b.protocol+"//"+b.host:"null",b.href=b.toString()}v.prototype={set:function(e,t,s){var i=this;switch(e){case"query":"string"==typeof t&&t.length&&(t=(s||n.parse)(t)),i[e]=t;break;case"port":i[e]=t,r(t,i.protocol)?t&&(i.host=i.hostname+":"+t):(i.host=i.hostname,i[e]="");break;case"hostname":i[e]=t,i.port&&(t+=":"+i.port),i.host=t;break;case"host":i[e]=t,c.test(t)?(t=t.split(":"),i.port=t.pop(),i.hostname=t.join(":")):(i.hostname=t,i.port="");break;case"protocol":i.protocol=t.toLowerCase(),i.slashes=!s;break;case"pathname":case"hash":if(t){var o="pathname"===e?"/":"#";i[e]=t.charAt(0)!==o?o+t:t}else i[e]=t;break;case"username":case"password":i[e]=encodeURIComponent(t);break;case"auth":var a=t.indexOf(":");~a?(i.username=t.slice(0,a),i.username=encodeURIComponent(decodeURIComponent(i.username)),i.password=t.slice(a+1),i.password=encodeURIComponent(decodeURIComponent(i.password))):i.username=encodeURIComponent(decodeURIComponent(t))}for(var u=0;u<h.length;u++){var d=h[u];d[4]&&(i[d[1]]=i[d[1]].toLowerCase())}return i.auth=i.password?i.username+":"+i.password:i.username,i.origin="file:"!==i.protocol&&y(i.protocol)&&i.host?i.protocol+"//"+i.host:"null",i.href=i.toString(),i},toString:function(e){e&&"function"==typeof e||(e=n.stringify);var t,s=this,r=s.host,i=s.protocol;i&&":"!==i.charAt(i.length-1)&&(i+=":");var o=i+(s.protocol&&s.slashes||y(s.protocol)?"//":"");return s.username?(o+=s.username,s.password&&(o+=":"+s.password),o+="@"):s.password?(o+=":"+s.password,o+="@"):"file:"!==s.protocol&&y(s.protocol)&&!r&&"/"!==s.pathname&&(o+="@"),(":"===r[r.length-1]||c.test(s.hostname)&&!s.port)&&(r+=":"),o+=r+s.pathname,(t="object"==typeof s.query?e(s.query):s.query)&&(o+="?"!==t.charAt(0)?"?"+t:t),s.hash&&(o+=s.hash),o}},v.extractProtocol=m,v.location=p,v.trimLeft=l,v.qs=n,e.exports=v},5003:(e,t,s)=>{"use strict";var r;s.r(t),s.d(t,{NIL:()=>N,parse:()=>m,stringify:()=>d,v1:()=>y,v3:()=>T,v4:()=>k,v5:()=>R,validate:()=>a,version:()=>j});var n=new Uint8Array(16);function i(){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(n)}const o=/^(?:[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&&o.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,s=(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(s))throw TypeError("Stringified UUID is invalid");return s};var l,h,f=0,p=0;const y=function(e,t,s){var r=t&&s||0,n=t||new Array(16),o=(e=e||{}).node||l,a=void 0!==e.clockseq?e.clockseq:h;if(null==o||null==a){var c=e.random||(e.rng||i)();null==o&&(o=l=[1|c[0],c[1],c[2],c[3],c[4],c[5]]),null==a&&(a=h=16383&(c[6]<<8|c[7]))}var u=void 0!==e.msecs?e.msecs:Date.now(),y=void 0!==e.nsecs?e.nsecs:p+1,m=u-f+(y-p)/1e4;if(m<0&&void 0===e.clockseq&&(a=a+1&16383),(m<0||u>f)&&void 0===e.nsecs&&(y=0),y>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");f=u,p=y,h=a;var v=(1e4*(268435455&(u+=122192928e5))+y)%4294967296;n[r++]=v>>>24&255,n[r++]=v>>>16&255,n[r++]=v>>>8&255,n[r++]=255&v;var x=u/4294967296*1e4&268435455;n[r++]=x>>>8&255,n[r++]=255&x,n[r++]=x>>>24&15|16,n[r++]=x>>>16&255,n[r++]=a>>>8|128,n[r++]=255&a;for(var _=0;_<6;++_)n[r+_]=o[_];return t||d(n)};const m=function(e){if(!a(e))throw TypeError("Invalid UUID");var t,s=new Uint8Array(16);return s[0]=(t=parseInt(e.slice(0,8),16))>>>24,s[1]=t>>>16&255,s[2]=t>>>8&255,s[3]=255&t,s[4]=(t=parseInt(e.slice(9,13),16))>>>8,s[5]=255&t,s[6]=(t=parseInt(e.slice(14,18),16))>>>8,s[7]=255&t,s[8]=(t=parseInt(e.slice(19,23),16))>>>8,s[9]=255&t,s[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,s[11]=t/4294967296&255,s[12]=t>>>24&255,s[13]=t>>>16&255,s[14]=t>>>8&255,s[15]=255&t,s};function v(e,t,s){function r(e,r,n,i){if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=[],s=0;s<e.length;++s)t.push(e.charCodeAt(s));return t}(e)),"string"==typeof r&&(r=m(r)),16!==r.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var o=new Uint8Array(16+e.length);if(o.set(r),o.set(e,r.length),(o=s(o))[6]=15&o[6]|t,o[8]=63&o[8]|128,n){i=i||0;for(var a=0;a<16;++a)n[i+a]=o[a];return n}return d(o)}try{r.name=e}catch(e){}return r.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",r.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",r}function x(e){return 14+(e+64>>>9<<4)+1}function _(e,t){var s=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(s>>16)<<16|65535&s}function g(e,t,s,r,n,i){return _((o=_(_(t,e),_(r,i)))<<(a=n)|o>>>32-a,s);var o,a}function b(e,t,s,r,n,i,o){return g(t&s|~t&r,e,t,n,i,o)}function w(e,t,s,r,n,i,o){return g(t&r|s&~r,e,t,n,i,o)}function O(e,t,s,r,n,i,o){return g(t^s^r,e,t,n,i,o)}function S(e,t,s,r,n,i,o){return g(s^(t|~r),e,t,n,i,o)}const E=function(e){if("string"==typeof e){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var s=0;s<t.length;++s)e[s]=t.charCodeAt(s)}return function(e){for(var t=[],s=32*e.length,r="0123456789abcdef",n=0;n<s;n+=8){var i=e[n>>5]>>>n%32&255,o=parseInt(r.charAt(i>>>4&15)+r.charAt(15&i),16);t.push(o)}return t}(function(e,t){e[t>>5]|=128<<t%32,e[x(t)-1]=t;for(var s=1732584193,r=-271733879,n=-1732584194,i=271733878,o=0;o<e.length;o+=16){var a=s,c=r,u=n,d=i;s=b(s,r,n,i,e[o],7,-680876936),i=b(i,s,r,n,e[o+1],12,-389564586),n=b(n,i,s,r,e[o+2],17,606105819),r=b(r,n,i,s,e[o+3],22,-1044525330),s=b(s,r,n,i,e[o+4],7,-176418897),i=b(i,s,r,n,e[o+5],12,1200080426),n=b(n,i,s,r,e[o+6],17,-1473231341),r=b(r,n,i,s,e[o+7],22,-45705983),s=b(s,r,n,i,e[o+8],7,1770035416),i=b(i,s,r,n,e[o+9],12,-1958414417),n=b(n,i,s,r,e[o+10],17,-42063),r=b(r,n,i,s,e[o+11],22,-1990404162),s=b(s,r,n,i,e[o+12],7,1804603682),i=b(i,s,r,n,e[o+13],12,-40341101),n=b(n,i,s,r,e[o+14],17,-1502002290),s=w(s,r=b(r,n,i,s,e[o+15],22,1236535329),n,i,e[o+1],5,-165796510),i=w(i,s,r,n,e[o+6],9,-1069501632),n=w(n,i,s,r,e[o+11],14,643717713),r=w(r,n,i,s,e[o],20,-373897302),s=w(s,r,n,i,e[o+5],5,-701558691),i=w(i,s,r,n,e[o+10],9,38016083),n=w(n,i,s,r,e[o+15],14,-660478335),r=w(r,n,i,s,e[o+4],20,-405537848),s=w(s,r,n,i,e[o+9],5,568446438),i=w(i,s,r,n,e[o+14],9,-1019803690),n=w(n,i,s,r,e[o+3],14,-187363961),r=w(r,n,i,s,e[o+8],20,1163531501),s=w(s,r,n,i,e[o+13],5,-1444681467),i=w(i,s,r,n,e[o+2],9,-51403784),n=w(n,i,s,r,e[o+7],14,1735328473),s=O(s,r=w(r,n,i,s,e[o+12],20,-1926607734),n,i,e[o+5],4,-378558),i=O(i,s,r,n,e[o+8],11,-2022574463),n=O(n,i,s,r,e[o+11],16,1839030562),r=O(r,n,i,s,e[o+14],23,-35309556),s=O(s,r,n,i,e[o+1],4,-1530992060),i=O(i,s,r,n,e[o+4],11,1272893353),n=O(n,i,s,r,e[o+7],16,-155497632),r=O(r,n,i,s,e[o+10],23,-1094730640),s=O(s,r,n,i,e[o+13],4,681279174),i=O(i,s,r,n,e[o],11,-358537222),n=O(n,i,s,r,e[o+3],16,-722521979),r=O(r,n,i,s,e[o+6],23,76029189),s=O(s,r,n,i,e[o+9],4,-640364487),i=O(i,s,r,n,e[o+12],11,-421815835),n=O(n,i,s,r,e[o+15],16,530742520),s=S(s,r=O(r,n,i,s,e[o+2],23,-995338651),n,i,e[o],6,-198630844),i=S(i,s,r,n,e[o+7],10,1126891415),n=S(n,i,s,r,e[o+14],15,-1416354905),r=S(r,n,i,s,e[o+5],21,-57434055),s=S(s,r,n,i,e[o+12],6,1700485571),i=S(i,s,r,n,e[o+3],10,-1894986606),n=S(n,i,s,r,e[o+10],15,-1051523),r=S(r,n,i,s,e[o+1],21,-2054922799),s=S(s,r,n,i,e[o+8],6,1873313359),i=S(i,s,r,n,e[o+15],10,-30611744),n=S(n,i,s,r,e[o+6],15,-1560198380),r=S(r,n,i,s,e[o+13],21,1309151649),s=S(s,r,n,i,e[o+4],6,-145523070),i=S(i,s,r,n,e[o+11],10,-1120210379),n=S(n,i,s,r,e[o+2],15,718787259),r=S(r,n,i,s,e[o+9],21,-343485551),s=_(s,a),r=_(r,c),n=_(n,u),i=_(i,d)}return[s,r,n,i]}(function(e){if(0===e.length)return[];for(var t=8*e.length,s=new Uint32Array(x(t)),r=0;r<t;r+=8)s[r>>5]|=(255&e[r/8])<<r%32;return s}(e),8*e.length))};const T=v("v3",48,E);const k=function(e,t,s){var r=(e=e||{}).random||(e.rng||i)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){s=s||0;for(var n=0;n<16;++n)t[s+n]=r[n];return t}return d(r)};function C(e,t,s,r){switch(e){case 0:return t&s^~t&r;case 1:case 3:return t^s^r;case 2:return t&s^t&r^s&r}}function I(e,t){return e<<t|e>>>32-t}const A=function(e){var t=[1518500249,1859775393,2400959708,3395469782],s=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){var r=unescape(encodeURIComponent(e));e=[];for(var n=0;n<r.length;++n)e.push(r.charCodeAt(n))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);for(var i=e.length/4+2,o=Math.ceil(i/16),a=new Array(o),c=0;c<o;++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[o-1][14]=8*(e.length-1)/Math.pow(2,32),a[o-1][14]=Math.floor(a[o-1][14]),a[o-1][15]=8*(e.length-1)&4294967295;for(var l=0;l<o;++l){for(var h=new Uint32Array(80),f=0;f<16;++f)h[f]=a[l][f];for(var p=16;p<80;++p)h[p]=I(h[p-3]^h[p-8]^h[p-14]^h[p-16],1);for(var y=s[0],m=s[1],v=s[2],x=s[3],_=s[4],g=0;g<80;++g){var b=Math.floor(g/20),w=I(y,5)+C(b,m,v,x)+_+t[b]+h[g]>>>0;_=x,x=v,v=I(m,30)>>>0,m=y,y=w}s[0]=s[0]+y>>>0,s[1]=s[1]+m>>>0,s[2]=s[2]+v>>>0,s[3]=s[3]+x>>>0,s[4]=s[4]+_>>>0}return[s[0]>>24&255,s[0]>>16&255,s[0]>>8&255,255&s[0],s[1]>>24&255,s[1]>>16&255,s[1]>>8&255,255&s[1],s[2]>>24&255,s[2]>>16&255,s[2]>>8&255,255&s[2],s[3]>>24&255,s[3]>>16&255,s[3]>>8&255,255&s[3],s[4]>>24&255,s[4]>>16&255,s[4]>>8&255,255&s[4]]};const R=v("v5",80,A),N="00000000-0000-0000-0000-000000000000";const j=function(e){if(!a(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)}},9347:e=>{"use strict";var t,s="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),r={},n=0,i=0;function o(e){var t="";do{t=s[e%64]+t,e=Math.floor(e/64)}while(e>0);return t}function a(){var e=o(+new Date);return e!==t?(n=0,t=e):e+"."+o(n++)}for(;i<64;i++)r[s[i]]=i;a.encode=o,a.decode=function(e){var t=0;for(i=0;i<e.length;i++)t=64*t+r[e.charAt(i)];return t},e.exports=a},2417:(e,t,s)=>{e.exports=s(7720)("./src/collaboration-core.js")},2704:(e,t,s)=>{e.exports=s(7079)("./src/core.js")},1492:(e,t,s)=>{e.exports=s(7079)("./src/engine.js")},9273:(e,t,s)=>{e.exports=s(7079)("./src/ui.js")},2209:(e,t,s)=>{e.exports=s(7079)("./src/utils.js")},7720:e=>{"use strict";e.exports=CKEditor5.collaborationDll},7079:e=>{"use strict";e.exports=CKEditor5.dll},66:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")()},5769:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.installTimerFunctions=t.transports=t.Transport=t.protocol=t.Socket=void 0;const r=s(1187);Object.defineProperty(t,"Socket",{enumerable:!0,get:function(){return r.Socket}}),t.protocol=r.Socket.protocol;var n=s(4291);Object.defineProperty(t,"Transport",{enumerable:!0,get:function(){return n.Transport}});var i=s(6449);Object.defineProperty(t,"transports",{enumerable:!0,get:function(){return i.transports}});var o=s(102);Object.defineProperty(t,"installTimerFunctions",{enumerable:!0,get:function(){return o.installTimerFunctions}})},1187:function(e,t,s){"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 n=s(6449),i=s(102),o=r(s(9827)),a=r(s(5977)),c=r(s(5579)),u=s(3717),d=s(4755),l=(0,c.default)("engine.io-client:socket");class h extends u.Emitter{constructor(e,t={}){super(),e&&"object"==typeof e&&(t=e,e=null),e?(e=(0,a.default)(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.default)(t.host).host),(0,i.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.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},t),this.opts.path=this.opts.path.replace(/\/$/,"")+"/","string"==typeof this.opts.query&&(this.opts.query=o.default.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&&addEventListener("beforeunload",(()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())}),!1),"localhost"!==this.hostname&&(this.offlineEventListener=()=>{this.onClose("transport close")},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(e){l('creating transport "%s"',e);const t=function(e){const t={};for(let s in e)e.hasOwnProperty(s)&&(t[s]=e[s]);return t}(this.opts.query);t.EIO=d.protocol,t.transport=e,this.id&&(t.sid=this.id);const s=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",s),new n.transports[e](s)}open(){let e;if(this.opts.rememberUpgrade&&h.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",(()=>{this.onClose("transport close")}))}probe(e){l('probing transport "%s"',e);let t=this.createTransport(e),s=!1;h.priorWebsocketSuccess=!1;const r=()=>{s||(l('probe transport "%s" opened',e),t.send([{type:"ping",data:"probe"}]),t.once("packet",(r=>{if(!s)if("pong"===r.type&&"probe"===r.data){if(l('probe transport "%s" pong',e),this.upgrading=!0,this.emitReserved("upgrading",t),!t)return;h.priorWebsocketSuccess="websocket"===t.name,l('pausing current transport "%s"',this.transport.name),this.transport.pause((()=>{s||"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 s=new Error("probe error");s.transport=t.name,this.emitReserved("upgradeError",s)}})))};function n(){s||(s=!0,u(),t.close(),t=null)}const i=s=>{const r=new Error("probe error: "+s);r.transport=t.name,n(),l('probe transport "%s" failed because of error: %s',e,s),this.emitReserved("upgradeError",r)};function o(){i("transport closed")}function a(){i("socket closed")}function c(e){t&&e.name!==t.name&&(l('"%s" works - aborting "%s"',e.name,t.name),n())}const u=()=>{t.removeListener("open",r),t.removeListener("error",i),t.removeListener("close",o),this.off("close",a),this.off("upgrading",c)};t.once("open",r),t.once("error",i),t.once("close",o),this.once("close",a),this.once("upgrading",c),t.open()}onOpen(){if(l("socket open"),this.readyState="open",h.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush(),"open"===this.readyState&&this.opts.upgrade&&this.transport.pause){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.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(){"closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length&&(l("flushing %d packets in socket",this.writeBuffer.length),this.transport.send(this.writeBuffer),this.prevBufferLen=this.writeBuffer.length,this.emitReserved("flush"))}write(e,t,s){return this.sendPacket("message",e,t,s),this}send(e,t,s){return this.sendPacket("message",e,t,s),this}sendPacket(e,t,s,r){if("function"==typeof t&&(r=t,t=void 0),"function"==typeof s&&(r=s,s=null),"closing"===this.readyState||"closed"===this.readyState)return;(s=s||{}).compress=!1!==s.compress;const n={type:e,data:t,options:s};this.emitReserved("packetCreate",n),this.writeBuffer.push(n),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()},s=()=>{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?s():e()})):this.upgrading?s():e()),this}onError(e){l("socket error %j",e),h.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("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 s=0;const r=e.length;for(;s<r;s++)~this.transports.indexOf(e[s])&&t.push(e[s]);return t}}t.Socket=h,h.protocol=d.protocol},4291:function(e,t,s){"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 n=s(4755),i=s(3717),o=s(102),a=(0,r(s(5579)).default)("engine.io-client:transport");class c extends i.Emitter{constructor(e){super(),this.writable=!1,(0,o.installTimerFunctions)(this,e),this.opts=e,this.query=e.query,this.readyState="",this.socket=e.socket}onError(e,t){const s=new Error(e);return s.type="TransportError",s.description=t,super.emit("error",s),this}open(){return"closed"!==this.readyState&&""!==this.readyState||(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.emit("open")}onData(e){const t=(0,n.decodePacket)(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emit("packet",e)}onClose(){this.readyState="closed",super.emit("close")}}t.Transport=c},6449:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.transports=void 0;const r=s(9814),n=s(4199);t.transports={websocket:n.WS,polling:r.XHR}},9814:function(e,t,s){"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.XHR=void 0;const n=r(s(4582)),i=r(s(5579)),o=r(s(66)),a=s(102),c=s(3717),u=s(3737),d=(0,i.default)("engine.io-client:polling-xhr");function l(){}const h=null!=new n.default({xdomain:!1}).responseType;class f extends u.Polling{constructor(e){if(super(e),"undefined"!=typeof location){const t="https:"===location.protocol;let s=location.port;s||(s=t?"443":"80"),this.xd="undefined"!=typeof location&&e.hostname!==location.hostname||s!==e.port,this.xs=e.secure!==t}const t=e&&e.forceBase64;this.supportsBinary=h&&!t}request(e={}){return Object.assign(e,{xd:this.xd,xs:this.xs},this.opts),new p(this.uri(),e)}doWrite(e,t){const s=this.request({method:"POST",data:e});s.on("success",t),s.on("error",(e=>{this.onError("xhr post error",e)}))}doPoll(){d("xhr poll");const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(e=>{this.onError("xhr poll error",e)})),this.pollXhr=e}}t.XHR=f;class p extends c.Emitter{constructor(e,t){super(),(0,a.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,a.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 n.default(e);try{d("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))},d("xhr data %s",this.data),t.send(this.data)}catch(e){return void this.setTimeoutFn((()=>{this.onError(e)}),0)}"undefined"!=typeof document&&(this.index=p.requestsCount++,p.requests[this.index]=this)}onSuccess(){this.emit("success"),this.cleanup()}onData(e){this.emit("data",e),this.onSuccess()}onError(e){this.emit("error",e),this.cleanup(!0)}cleanup(e){if(void 0!==this.xhr&&null!==this.xhr){if(this.xhr.onreadystatechange=l,e)try{this.xhr.abort()}catch(e){}"undefined"!=typeof document&&delete p.requests[this.index],this.xhr=null}}onLoad(){const e=this.xhr.responseText;null!==e&&this.onData(e)}abort(){this.cleanup()}}if(t.Request=p,p.requestsCount=0,p.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",y);else if("function"==typeof addEventListener){const e="onpagehide"in o.default?"pagehide":"unload";addEventListener(e,y,!1)}function y(){for(let e in p.requests)p.requests.hasOwnProperty(e)&&p.requests[e].abort()}},3737:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Polling=void 0;const n=s(4291),i=r(s(5579)),o=r(s(9347)),a=r(s(9827)),c=s(4755),u=(0,i.default)("engine.io-client:polling");class d extends n.Transport{constructor(){super(...arguments),this.polling=!1}get name(){return"polling"}doOpen(){this.poll()}pause(e){this.readyState="pausing";const t=()=>{u("paused"),this.readyState="paused",e()};if(this.polling||!this.writable){let e=0;this.polling&&(u("we are currently polling - waiting to pause"),e++,this.once("pollComplete",(function(){u("pre-pause polling complete"),--e||t()}))),this.writable||(u("we are currently writing - waiting to pause"),e++,this.once("drain",(function(){u("pre-pause writing complete"),--e||t()})))}else t()}poll(){u("polling"),this.polling=!0,this.doPoll(),this.emit("poll")}onData(e){u("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(),!1;this.onPacket(e)})),"closed"!==this.readyState&&(this.polling=!1,this.emit("pollComplete"),"open"===this.readyState?this.poll():u('ignoring poll - transport state "%s"',this.readyState))}doClose(){const e=()=>{u("writing close packet"),this.write([{type:"close"}])};"open"===this.readyState?(u("transport open - closing"),e()):(u("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.emit("drain")}))}))}uri(){let e=this.query||{};const t=this.opts.secure?"https":"http";let s="";!1!==this.opts.timestampRequests&&(e[this.opts.timestampParam]=(0,o.default)()),this.supportsBinary||e.sid||(e.b64=1),this.opts.port&&("https"===t&&443!==Number(this.opts.port)||"http"===t&&80!==Number(this.opts.port))&&(s=":"+this.opts.port);const r=a.default.encode(e);return t+"://"+(-1!==this.opts.hostname.indexOf(":")?"["+this.opts.hostname+"]":this.opts.hostname)+s+this.opts.path+(r.length?"?"+r:"")}}t.Polling=d},9233:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.defaultBinaryType=t.usingBrowserWebSocket=t.WebSocket=t.nextTick=void 0;const n=r(s(66));t.nextTick="function"==typeof Promise&&"function"==typeof Promise.resolve?e=>Promise.resolve().then(e):(e,t)=>t(e,0),t.WebSocket=n.default.WebSocket||n.default.MozWebSocket,t.usingBrowserWebSocket=!0,t.defaultBinaryType="arraybuffer"},4199:function(e,t,s){"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 n=s(4291),i=r(s(9827)),o=r(s(9347)),a=s(102),c=s(9233),u=r(s(5579)),d=s(4755),l=(0,u.default)("engine.io-client:websocket"),h="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase();class f extends n.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,s=h?{}:(0,a.pick)(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(s.headers=this.opts.extraHeaders);try{this.ws=c.usingBrowserWebSocket&&!h?t?new c.WebSocket(e,t):new c.WebSocket(e):new c.WebSocket(e,t,s)}catch(e){return this.emit("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=this.onClose.bind(this),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 s=e[t],r=t===e.length-1;(0,d.encodePacket)(s,this.supportsBinary,(e=>{const t={};if(!c.usingBrowserWebSocket&&(s.options&&(t.compress=s.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.emit("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 s="";this.opts.port&&("wss"===t&&443!==Number(this.opts.port)||"ws"===t&&80!==Number(this.opts.port))&&(s=":"+this.opts.port),this.opts.timestampRequests&&(e[this.opts.timestampParam]=(0,o.default)()),this.supportsBinary||(e.b64=1);const r=i.default.encode(e);return t+"://"+(-1!==this.opts.hostname.indexOf(":")?"["+this.opts.hostname+"]":this.opts.hostname)+s+this.opts.path+(r.length?"?"+r:"")}check(){return!(!c.WebSocket||"__initialize"in c.WebSocket&&this.name===f.prototype.name)}}t.WS=f},4582:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(s(4568)),i=r(s(66));t.default=function(e){const t=e.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!t||n.default))return new XMLHttpRequest}catch(e){}if(!t)try{return new(i.default[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(e){}}},102:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.installTimerFunctions=t.pick=void 0;const n=r(s(66));t.pick=function(e,...t){return t.reduce(((t,s)=>(e.hasOwnProperty(s)&&(t[s]=e[s]),t)),{})};const i=setTimeout,o=clearTimeout;t.installTimerFunctions=function(e,t){t.useNativeTimers?(e.setTimeoutFn=i.bind(n.default),e.clearTimeoutFn=o.bind(n.default)):(e.setTimeoutFn=setTimeout.bind(n.default),e.clearTimeoutFn=clearTimeout.bind(n.default))}},9782:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ERROR_PACKET=t.PACKET_TYPES_REVERSE=t.PACKET_TYPES=void 0;const s=Object.create(null);t.PACKET_TYPES=s,s.open="0",s.close="1",s.ping="2",s.pong="3",s.message="4",s.upgrade="5",s.noop="6";const r=Object.create(null);t.PACKET_TYPES_REVERSE=r,Object.keys(s).forEach((e=>{r[s[e]]=e}));t.ERROR_PACKET={type:"error",data:"parser error"}},6502:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decode=t.encode=void 0;const s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r="undefined"==typeof Uint8Array?[]:new Uint8Array(256);for(let e=0;e<s.length;e++)r[s.charCodeAt(e)]=e;t.encode=e=>{let t,r=new Uint8Array(e),n=r.length,i="";for(t=0;t<n;t+=3)i+=s[r[t]>>2],i+=s[(3&r[t])<<4|r[t+1]>>4],i+=s[(15&r[t+1])<<2|r[t+2]>>6],i+=s[63&r[t+2]];return n%3==2?i=i.substring(0,i.length-1)+"=":n%3==1&&(i=i.substring(0,i.length-2)+"=="),i};t.decode=e=>{let t,s,n,i,o,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)s=r[e.charCodeAt(t)],n=r[e.charCodeAt(t+1)],i=r[e.charCodeAt(t+2)],o=r[e.charCodeAt(t+3)],l[u++]=s<<2|n>>4,l[u++]=(15&n)<<4|i>>2,l[u++]=(3&i)<<6|63&o;return d}},3108:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=s(9782),n=s(6502),i="function"==typeof ArrayBuffer,o=(e,t)=>{if(i){const s=(0,n.decode)(e);return a(s,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 s=e.charAt(0);if("b"===s)return{type:"message",data:o(e.substring(1),t)};return r.PACKET_TYPES_REVERSE[s]?e.length>1?{type:r.PACKET_TYPES_REVERSE[s],data:e.substring(1)}:{type:r.PACKET_TYPES_REVERSE[s]}:r.ERROR_PACKET}},4895:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=s(9782),n="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),i="function"==typeof ArrayBuffer,o=(e,t)=>{const s=new FileReader;return s.onload=function(){const e=s.result.split(",")[1];t("b"+e)},s.readAsDataURL(e)};t.default=({type:e,data:t},s,a)=>{return n&&t instanceof Blob?s?a(t):o(t,a):i&&(t instanceof ArrayBuffer||(c=t,"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(c):c&&c.buffer instanceof ArrayBuffer))?s?a(t):o(new Blob([t]),a):a(r.PACKET_TYPES[e]+(t||""));var c}},4755:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodePayload=t.decodePacket=t.encodePayload=t.encodePacket=t.protocol=void 0;const r=s(4895);t.encodePacket=r.default;const n=s(3108);t.decodePacket=n.default;const i=String.fromCharCode(30);t.encodePayload=(e,t)=>{const s=e.length,n=new Array(s);let o=0;e.forEach(((e,a)=>{(0,r.default)(e,!1,(e=>{n[a]=e,++o===s&&t(n.join(i))}))}))};t.decodePayload=(e,t)=>{const s=e.split(i),r=[];for(let e=0;e<s.length;e++){const i=(0,n.default)(s[e],t);if(r.push(i),"error"===i.type)break}return r},t.protocol=4},8623:function(e,t,s){"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 n=s(4197),i=s(3288);Object.defineProperty(t,"Manager",{enumerable:!0,get:function(){return i.Manager}});const o=s(3232);Object.defineProperty(t,"Socket",{enumerable:!0,get:function(){return o.Socket}});const a=r(s(5579)).default("socket.io-client"),c={};function u(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};const s=n.url(e,t.path||"/socket.io"),r=s.source,o=s.id,u=s.path,d=c[o]&&u in c[o].nsps;let l;return t.forceNew||t["force new connection"]||!1===t.multiplex||d?(a("ignoring socket cache for %s",r),l=new i.Manager(r,t)):(c[o]||(a("new io instance for %s",r),c[o]=new i.Manager(r,t)),l=c[o]),s.query&&!t.query&&(t.query=s.queryKey),l.socket(s.path,t)}t.io=u,t.connect=u,t.default=u,Object.assign(u,{Manager:i.Manager,Socket:o.Socket,io:u,connect:u});var d=s(170);Object.defineProperty(t,"protocol",{enumerable:!0,get:function(){return d.protocol}}),e.exports=u},3288:function(e,t,s){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,s,r){void 0===r&&(r=s),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[s]}})}:function(e,t,s,r){void 0===r&&(r=s),e[r]=t[s]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var s in e)"default"!==s&&Object.prototype.hasOwnProperty.call(e,s)&&r(t,e,s);return n(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Manager=void 0;const a=s(5769),c=s(3232),u=i(s(170)),d=s(6263),l=o(s(7672)),h=s(3717),f=o(s(5579)).default("socket.io-client:manager");class p extends h.Emitter{constructor(e,t){var s;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!==(s=t.randomizationFactor)&&void 0!==s?s:.5),this.backoff=new l.default({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(f("readyState %s",this._readyState),~this._readyState.indexOf("open"))return this;f("opening %s",this.uri),this.engine=new a.Socket(this.uri,this.opts);const t=this.engine,s=this;this._readyState="opening",this.skipReconnect=!1;const r=d.on(t,"open",(function(){s.onopen(),e&&e()})),n=d.on(t,"error",(t=>{f("error"),s.cleanup(),s._readyState="closed",this.emitReserved("error",t),e?e(t):s.maybeReconnectOnOpen()}));if(!1!==this._timeout){const e=this._timeout;f("connect attempt will timeout after %d",e),0===e&&r();const s=this.setTimeoutFn((()=>{f("connect attempt timed out after %d",e),r(),t.close(),t.emit("error",new Error("timeout"))}),e);this.opts.autoUnref&&s.unref(),this.subs.push((function(){clearTimeout(s)}))}return this.subs.push(r),this.subs.push(n),this}connect(e){return this.open(e)}onopen(){f("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){this.decoder.add(e)}ondecoded(e){this.emitReserved("packet",e)}onerror(e){f("error",e),this.emitReserved("error",e)}socket(e,t){let s=this.nsps[e];return s||(s=new c.Socket(this,e,t),this.nsps[e]=s),s}_destroy(e){const t=Object.keys(this.nsps);for(const e of t){if(this.nsps[e].active)return void f("socket %s is still active, skipping close",e)}this._close()}_packet(e){f("writing packet %j",e);const t=this.encoder.encode(e);for(let s=0;s<t.length;s++)this.engine.write(t[s],e.options)}cleanup(){f("cleanup"),this.subs.forEach((e=>e())),this.subs.length=0,this.decoder.destroy()}_close(){f("disconnect"),this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(e){f("closed due to %s",e),this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)f("reconnect failed"),this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const t=this.backoff.duration();f("will wait %dms before reconnect attempt",t),this._reconnecting=!0;const s=this.setTimeoutFn((()=>{e.skipReconnect||(f("attempting reconnect"),this.emitReserved("reconnect_attempt",e.backoff.attempts),e.skipReconnect||e.open((t=>{t?(f("reconnect attempt error"),e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",t)):(f("reconnect success"),e.onreconnect())})))}),t);this.opts.autoUnref&&s.unref(),this.subs.push((function(){clearTimeout(s)}))}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}t.Manager=p},6263:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.on=void 0,t.on=function(e,t,s){return e.on(t,s),function(){e.off(t,s)}}},3232:function(e,t,s){"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 n=s(170),i=s(6263),o=s(3717),a=r(s(5579)).default("socket.io-client:socket"),c=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class u extends o.Emitter{constructor(e,t,s){super(),this.connected=!1,this.disconnected=!0,this.receiveBuffer=[],this.sendBuffer=[],this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=t,s&&s.auth&&(this.auth=s.auth),this.io._autoConnect&&this.open()}subEvents(){if(this.subs)return;const e=this.io;this.subs=[i.on(e,"open",this.onopen.bind(this)),i.on(e,"packet",this.onpacket.bind(this)),i.on(e,"error",this.onerror.bind(this)),i.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+'" is a reserved event name');t.unshift(e);const s={type:n.PacketType.EVENT,data:t,options:{}};if(s.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),s.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.packet(s):this.sendBuffer.push(s),this.flags={},this}_registerAckCallback(e,t){const s=this.flags.timeout;if(void 0===s)return void(this.acks[e]=t);const r=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,s),t.call(this,new Error("operation has timed out"))}),s);this.acks[e]=(...e)=>{this.io.clearTimeoutFn(r),t.apply(this,[null,...e])}}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){a("transport is open - connecting"),"function"==typeof this.auth?this.auth((e=>{this.packet({type:n.PacketType.CONNECT,data:e})})):this.packet({type:n.PacketType.CONNECT,data:this.auth})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e){a("close (%s)",e),this.connected=!1,this.disconnected=!0,delete this.id,this.emitReserved("disconnect",e)}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case n.PacketType.CONNECT:if(e.data&&e.data.sid){const t=e.data.sid;this.onconnect(t)}else 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 n.PacketType.EVENT:case n.PacketType.BINARY_EVENT:this.onevent(e);break;case n.PacketType.ACK:case n.PacketType.BINARY_ACK:this.onack(e);break;case n.PacketType.DISCONNECT:this.ondisconnect();break;case n.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 s of t)s.apply(this,e)}super.emit.apply(this,e)}ack(e){const t=this;let s=!1;return function(...r){s||(s=!0,a("sending ack %j",r),t.packet({type:n.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){a("socket connected with id %s",e),this.id=e,this.connected=!0,this.disconnected=!1,this.emitBuffered(),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach((e=>this.emitEvent(e))),this.receiveBuffer=[],this.sendBuffer.forEach((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:n.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 s=0;s<t.length;s++)if(e===t[s])return t.splice(s,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}}t.Socket=u},4197:function(e,t,s){"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 n=r(s(5977)),i=r(s(5579)).default("socket.io-client:url");t.url=function(e,t="",s){let r=e;s=s||"undefined"!=typeof location&&location,null==e&&(e=s.protocol+"//"+s.host),"string"==typeof e&&("/"===e.charAt(0)&&(e="/"===e.charAt(1)?s.protocol+e:s.host+e),/^(https?|wss?):\/\//.test(e)||(i("protocol-less url %s",e),e=void 0!==s?s.protocol+"//"+e:"https://"+e),i("parse %s",e),r=n.default(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 o=-1!==r.host.indexOf(":")?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+o+":"+r.port+t,r.href=r.protocol+"://"+o+(s&&s.port===r.port?"":":"+r.port),r}},2830:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reconstructPacket=t.deconstructPacket=void 0;const r=s(3980);function n(e,t){if(!e)return e;if(r.isBinary(e)){const s={_placeholder:!0,num:t.length};return t.push(e),s}if(Array.isArray(e)){const s=new Array(e.length);for(let r=0;r<e.length;r++)s[r]=n(e[r],t);return s}if("object"==typeof e&&!(e instanceof Date)){const s={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(s[r]=n(e[r],t));return s}return e}function i(e,t){if(!e)return e;if(e&&e._placeholder)return t[e.num];if(Array.isArray(e))for(let s=0;s<e.length;s++)e[s]=i(e[s],t);else if("object"==typeof e)for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(e[s]=i(e[s],t));return e}t.deconstructPacket=function(e){const t=[],s=e.data,r=e;return r.data=n(s,t),r.attachments=t.length,{packet:r,buffers:t}},t.reconstructPacket=function(e,t){return e.data=i(e.data,t),e.attachments=void 0,e}},170:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Decoder=t.Encoder=t.PacketType=t.protocol=void 0;const r=s(3717),n=s(2830),i=s(3980),o=s(5579).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{encode(e){return o("encoding packet %j",e),e.type!==a.EVENT&&e.type!==a.ACK||!i.hasBinary(e)?[this.encodeAsString(e)]:(e.type=e.type===a.EVENT?a.BINARY_EVENT:a.BINARY_ACK,this.encodeAsBinary(e))}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)),o("encoded %j as %s",e,t),t}encodeAsBinary(e){const t=n.deconstructPacket(e),s=this.encodeAsString(t.packet),r=t.buffers;return r.unshift(s),r}};class c extends r.Emitter{constructor(){super()}add(e){let t;if("string"==typeof e)t=this.decodeString(e),t.type===a.BINARY_EVENT||t.type===a.BINARY_ACK?(this.reconstructor=new u(t),0===t.attachments&&super.emitReserved("decoded",t)):super.emitReserved("decoded",t);else{if(!i.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 s={type:Number(e.charAt(0))};if(void 0===a[s.type])throw new Error("unknown packet type "+s.type);if(s.type===a.BINARY_EVENT||s.type===a.BINARY_ACK){const r=t+1;for(;"-"!==e.charAt(++t)&&t!=e.length;);const n=e.substring(r,t);if(n!=Number(n)||"-"!==e.charAt(t))throw new Error("Illegal attachments");s.attachments=Number(n)}if("/"===e.charAt(t+1)){const r=t+1;for(;++t;){if(","===e.charAt(t))break;if(t===e.length)break}s.nsp=e.substring(r,t)}else s.nsp="/";const r=e.charAt(t+1);if(""!==r&&Number(r)==r){const r=t+1;for(;++t;){const s=e.charAt(t);if(null==s||Number(s)!=s){--t;break}if(t===e.length)break}s.id=Number(e.substring(r,t+1))}if(e.charAt(++t)){const r=function(e){try{return JSON.parse(e)}catch(e){return!1}}(e.substr(t));if(!c.isPayloadValid(s.type,r))throw new Error("invalid payload");s.data=r}return o("decoded %s as %j",e,s),s}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)&&t.length>0;case a.ACK:case a.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}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=n.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}},3980:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hasBinary=t.isBinary=void 0;const s="function"==typeof ArrayBuffer,r=Object.prototype.toString,n="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===r.call(Blob),i="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===r.call(File);function o(e){return s&&(e instanceof ArrayBuffer||(e=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer)(e))||n&&e instanceof Blob||i&&e instanceof File}t.isBinary=o,t.hasBinary=function e(t,s){if(!t||"object"!=typeof t)return!1;if(Array.isArray(t)){for(let s=0,r=t.length;s<r;s++)if(e(t[s]))return!0;return!1}if(o(t))return!0;if(t.toJSON&&"function"==typeof t.toJSON&&1===arguments.length)return e(t.toJSON(),!0);for(const s in t)if(Object.prototype.hasOwnProperty.call(t,s)&&e(t[s]))return!0;return!1}}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var s=__webpack_module_cache__[e]={id:e,exports:{}};return __webpack_modules__[e].call(s.exports,s,s.exports,__webpack_require__),s.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 s in t)__webpack_require__.o(t,s)&&!__webpack_require__.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},__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:()=>Li,CloudServicesRevisionHistoryAdapter:()=>_o,CloudServicesTrackChangesAdapter:()=>Zi,PresenceList:()=>ba,RealTimeCollaborativeComments:()=>no,RealTimeCollaborativeEditing:()=>Pi,RealTimeCollaborativeRevisionHistory:()=>Eo,RealTimeCollaborativeTrackChanges:()=>uo});var e=__webpack_require__(2704),t=__webpack_require__(2209),s=__webpack_require__(1492),r=__webpack_require__(9273),n=__webpack_require__(2417),i=__webpack_require__(7158),o=__webpack_require__.n(i);const a=["code","_shouldPluginsReconnect","change:me","websocketgateway-plugin-already-registered","listenTo","disconnected","define","token","addToReconnectionStack","online","plugins","_domEmitter","real-time-collaboration","destroy","cloudServices.requestTimeout","config","showWarning","bind","connecting","limitExceeded","function","_isBrowserOffline","websocketgateway-invalid-plugin-interface","state","reconnect","then","requires","webSocketUrl","_reconnect","cloudservices-init","cloudservices-reconnection-error","connection","error","pluginName","initialReconnectionInterval","get","isInReconnectionStack","websocketgateway-missing-websocket-url","disconnect","WebSocketGateway","CloudServices","constructor","offline","from","catch","cloudServices.connectionTimeout","connected","websocketgateway-missing-token","_reconnectionStack","context","removeFromReconnectionStack","set","add","all"];var c,u;c=a,u=310,function(e){for(;--e;)c.push(c.shift())}(++u);const d=function(e,t){return a[e-=0]};class l extends e.ContextPlugin{static get[d("0x28")](){return[d("0x0"),r.Notification]}static get pluginName(){return d("0x35")}init(){const e=this.context,s=e[d("0x18")][d("0x31")](d("0x0")),n=e.plugins[d("0x31")](r.Notification);if(!s[d("0x15")])throw new t.CKEditorError(d("0x7"),this);if(!s[d("0x29")])throw new t.CKEditorError(d("0x33"),this);return this[d("0xb")](d("0x25"),"connecting"),this[d("0xb")](d("0x23"),!1),this[d("0x8")]=new Set,this._shouldPluginsReconnect=!1,this[d("0x19")]=Object.create(t.DomEmitterMixin),this[d("0x19")][d("0x12")](window,d("0x2"),(()=>this[d("0x23")]=!0)),this[d("0x19")][d("0x12")](window,d("0x17"),(()=>this._isBrowserOffline=!1)),this[d("0x9")][d("0x1d")][d("0x14")](d("0x5"),10),this[d("0x9")][d("0x1d")].define("cloudServices.requestTimeout",20),l[d("0x35")].connect(s[d("0x15")],s.webSocketUrl,{disconnectOnUnload:!1,timeout:1e3*this[d("0x9")][d("0x1d")][d("0x31")](d("0x5")),requestTimeout:1e3*this[d("0x9")][d("0x1d")][d("0x31")](d("0x1c"))})[d("0x27")]((e=>{if(this[d("0x2d")]=e,this[d("0x1f")](d("0x25")).to(e,d("0x25"),this,"_isBrowserOffline",((e,t)=>(d("0x6")!==e&&(this[d("0xf")]=!0),t||"connected"!==e?d("0x13"):d("0x13")==this[d("0x25")]&&this[d("0xf")]?(this[d("0xf")]=!1,this._reconnect(),d("0x20")):d("0x6")))),this[d("0x2d")].on(d("0x2e"),((e,s)=>{if(d("0x21")!==s[d("0xe")])throw console[d("0x2e")](s),new t.CKEditorError(d("0x2b"),null,{originalError:s});n[d("0x1e")]("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.",{title:"Connected users limit exceeded",namespace:d("0x1a")})})),!e.me)return new Promise((t=>e.on(d("0x10"),t)))}))[d("0x4")]((e=>{throw console[d("0x2e")](e),new t.CKEditorError("cloudservices-init",null,{originalError:e})}))}[d("0x16")](e){if(d("0x22")!=typeof e[d("0x26")])throw new t.CKEditorError(d("0x24"),this);if(this.isInReconnectionStack(e))throw new t.CKEditorError(d("0x11"),this,{name:e[d("0x1")][d("0x2f")]});this[d("0x8")][d("0xc")](e)}[d("0xa")](e){this[d("0x8")].delete(e)}[d("0x32")](e){return this[d("0x8")].has(e)}[d("0x2a")](){return this[d("0x2d")][d("0x26")]()[d("0x27")]((()=>Promise[d("0xd")](Array[d("0x3")](this[d("0x8")],(e=>e.reconnect()))))).then((()=>this[d("0x25")]=d("0x6")))[d("0x4")]((e=>{throw console[d("0x2e")](e),new t.CKEditorError(d("0x2c"),this[d("0x9")])}))}[d("0x1b")](){this[d("0x2d")]&&this[d("0x2d")][d("0x34")](),this.state=d("0x13"),this[d("0x19")].stopListening(),super[d("0x1b")]()}}l.WebSocketGateway=o(),l[d("0x30")]=1e3;const h=["allConnectedUsers","_handleSessionRemove","values","clear","sessionAdd:","state","size","_users","unregister","connected","connection","remove","get","add","channelConnectedUsers","set","stopListening","user","_uniqueUsersCount","listenTo","init","context","role","_createUser","addUser","getUserSessions","_handleSessionAdd","_registeredSessions","getUser","orderNumber","assign","defineMe","has","sessionId","sessions-register-already-registered","mySessionId","plugins","register","channelSessions","forEach","fire","requires","pluginName"];var f,p;f=h,p=347,function(e){for(;--e;)f.push(f.shift())}(++p);const y=function(e,t){return h[e-=0]};class m extends e.ContextPlugin{static get[y("0x27")](){return"Sessions"}static get[y("0x26")](){return[l,n.Users]}[y("0x11")](){const e=this[y("0x12")],s=e[y("0x21")][y("0x9")](l);this[y("0x23")]=new Map,this[y("0xb")]=new Map,this[y("0x28")]=new t.Collection,this[y("0x18")]=new Map,this[y("0xf")]=0,this._users=e[y("0x21")][y("0x9")](n.Users),this.listenTo(s,"change:state",((e,t,s)=>{if(y("0x6")!==s)this[y("0x23")][y("0x24")]((e=>e.clear())),this[y("0xb")].forEach((e=>e[y("0x0")]())),this[y("0x28")][y("0x0")]();else for(const[e,t]of this._registeredSessions)for(const s of t)this[y("0x17")](e,s)})),this[y("0x14")](s[y("0x7")].me,!0)}[y("0x22")](e,s){if(this[y("0x18")][y("0x1d")](e))throw new t.CKEditorError(y("0x1f"),null,{channelId:e});this[y("0x18")][y("0xc")](e,s),this.channelSessions[y("0xc")](e,new t.Collection),this[y("0xb")][y("0xc")](e,new t.Collection),this[y("0x10")](s,y("0xa"),((t,s)=>this._handleSessionAdd(e,s))),this[y("0x10")](s,y("0x8"),((t,s)=>this[y("0x29")](e,s)));for(const t of s)this._handleSessionAdd(e,t)}[y("0x5")](e){if(!this[y("0x18")][y("0x1d")](e))throw new t.CKEditorError("sessions-unregister-not-exist",null,{channelId:e});const s=this._registeredSessions[y("0x9")](e);this[y("0xd")](s);for(const t of s)y("0x6")===this.context[y("0x21")][y("0x9")](l)[y("0x2")]&&this[y("0x29")](e,t);this[y("0x18")].delete(e),this[y("0x23")].delete(e),this[y("0xb")].delete(e)}get[y("0x20")](){return this[y("0x12")][y("0x21")][y("0x9")](l)[y("0x7")][y("0x1e")]}getUserBySessionId(e){for(const t of this[y("0x23")][y("0x2a")]())for(const s of t)if(s.id===e)return s.user}[y("0x16")](e,t){const s=t?[this.channelSessions.get(t)]:this[y("0x23")][y("0x2a")](),r=new Set;for(const t of s)for(const s of t)s[y("0xe")].id===e.id&&r[y("0xa")](s.id);return r}getUserRole(e){for(const t of this[y("0x23")][y("0x2a")]())for(const s of t)if(s.user===e)return s[y("0x13")]}[y("0x17")](e,t){if(y("0x6")!==this[y("0x12")][y("0x21")][y("0x9")](l)[y("0x2")])return;const s=t.user,r=this._users[y("0x19")](s.id)||this[y("0x14")](s),n=Object[y("0x1b")]({},t,{user:r});this[y("0x23")][y("0x9")](e)[y("0xa")](n);const i=this[y("0xb")].get(e);i[y("0x1d")](r.id)||i[y("0xa")](r),this[y("0x28")][y("0x1d")](r.id)||this[y("0x28")][y("0xa")](r),this[y("0x25")](y("0x1")+e,{channelId:e,session:n})}_handleSessionRemove(e,t){if(y("0x6")!==this[y("0x12")].plugins[y("0x9")](l)[y("0x2")])return;const s=this.channelConnectedUsers[y("0x9")](e),r=t[y("0xe")];this[y("0x23")][y("0x9")](e)[y("0x8")](t.id),s[y("0x1d")](r.id)&&!this.getUserSessions(r,e)[y("0x3")]&&s[y("0x8")](r.id),this[y("0x28")][y("0x9")](r.id)&&!this[y("0x16")](r)[y("0x3")]&&this[y("0x28")].remove(r.id)}[y("0x14")](e,t){const s=this[y("0x4")][y("0x15")](e);return t&&this[y("0x4")][y("0x1c")](e.id),s[y("0x1a")]=this[y("0xf")]++,s}}var v=__webpack_require__(7594),x=__webpack_require__.n(v),_=__webpack_require__(9940),g={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};x()(_.Z,g);_.Z.locals;const b=["isSimilar","oldRange","setCustomProperty","clear","isCollapsed","user:range","createUIElement","color","UserMarkers","newRange","reconvertMarker","getNearestSelectionRange","ck-user__marker ","mySessionId","for","root","createUserMarkerOperations","editor","conversion","getUserBySessionId","ck-user__selection","hasDomSelection","markerRange","removeMarker","addMarker","toDomElement","highest","split","isObject","selection","plugins","getCustomProperty","fromRange","update:user:range","detach","enqueueChange","batch","getSelectionClass","_createdBatches","markerName","change:range","userPositionMarker","isInline","createRange","model","user:range:","priority","editingDowncast","applyOperation","tableCell",'&#8203;<span class="ck-user__marker-line"><span class="ck-user__marker-dot"></span></span>',"innerHTML","rootName","markers","getAttribute","getRange","user:position","change","nodeAfter","pluginName","document","commands","orderNumber","deletionPosition","afterInit","contenteditable","name","startsWith","parent","$graveyard","get","editing","hasContent","has","start","end","markerToHighlight","init","schema","set","user:position:","marker","$text","updateMarker","getFirstRange","getStart"];var w,O;w=b,O=406,function(e){for(;--e;)w.push(w.shift())}(++O);const S=function(e,t){return b[e-=0]};class E extends e.Plugin{static get requires(){return[m]}static get[S("0x53")](){return S("0x20")}[S("0xf")](){const e=this[S("0x29")],t=e[S("0x36")][S("0x8")](m);e[S("0x2a")][S("0x26")]("editingDowncast").markerToElement({model:S("0x50"),view:(s,{writer:r})=>function(e,t,s,r){const n=e.markerName[S("0x33")](":")[2],i=s.getUserBySessionId(n);if(!i||n===s[S("0x25")])return;if(!r.model.schema.checkChild(e[S("0x2e")][S("0xc")],S("0x14")))return;const o={class:S("0x24")+i[S("0x1f")].getMarkerClass(),"data-name":i[S("0x4")],"data-session-id":n},a=r[S("0x44")][S("0x4d")][S("0x8")](e[S("0x3f")])[S("0x17")](),c=a[S("0x52")],u=r[S("0x44")][S("0x10")];if(c&&u[S("0x34")](c)&&u[S("0x42")](c)&&!r[S("0x44")][S("0x4d")].get(S("0x45")+n).getRange()[S("0x1c")])return;const d=a[S("0x6")];r[S("0x44")].schema.isLimit(d)&&!r[S("0x44")][S("0xa")](d)&&(o[S("0x3")]=!1);const l=function(e,t){const s=e[S("0x1e")]("span",t);return e[S("0x1a")](S("0x41"),!0,s),s.render=function(e){const t=this[S("0x31")](e);return t[S("0x4b")]=S("0x4a"),t},s[S("0x18")]=function(e){return this.getCustomProperty(S("0x41"))&&e[S("0x37")]("userPositionMarker")&&this[S("0x4e")]("data-session-id")==e[S("0x4e")]("data-session-id")},s}(t,o);return l[S("0x46")]=1e3+i[S("0x0")],l}(s,r,t,e)}),e[S("0x2a")][S("0x26")](S("0x47"))[S("0xe")]({model:S("0x1d"),view:e=>function(e,t){const s=e.markerName[S("0x33")](":")[2];if(s===t.mySessionId)return;const r=t[S("0x2b")](s);return r?{id:s,classes:[S("0x2c"),r[S("0x1f")][S("0x3d")]()],attributes:{"data-session-id":s},priority:2e3+r.orderNumber}:{id:s}}(e,t)}),function(e){const t=e[S("0x44")],r=new Map,n=e[S("0x36")][S("0x8")](m);t[S("0x4d")].on(S("0x39"),((i,o,a,c)=>{if(!c&&r[S("0x8")](o[S("0x4")]))return r[S("0x8")](o[S("0x4")])[S("0x3a")](),void r.delete(o.name);const u=o[S("0x4")].split(":")[2];if(u===n[S("0x25")])return;const d=S("0x12")+u;t[S("0x4d")][S("0xb")](d)&&e.editing[S("0x22")](d),o.on(S("0x40"),((e,n,i)=>{if(S("0x7")!=n[S("0x27")][S("0x4c")]&&S("0x7")==o[S("0x4f")]()[S("0x27")][S("0x4c")]&&!r[S("0xb")](o.name)){const e=t[S("0x10")][S("0x23")](i.deletionPosition);if(e){const n=s.LiveRange[S("0x38")](e);r[S("0x11")](o[S("0x4")],n),n.on(S("0x40"),((e,s,i)=>{if("$graveyard"==n[S("0x27")][S("0x4c")]){const e=t.schema.getNearestSelectionRange(i[S("0x1")]);e?(n[S("0xc")]=e[S("0xc")],n.end=e[S("0xd")]):(r.delete(o[S("0x4")]),n[S("0x3a")]())}}))}}}))})),t[S("0x54")].on(S("0x51"),(()=>{r.size>0&&t[S("0x3b")]({isUndoable:!1},(e=>{for(const[s,n]of r)S("0x7")==t[S("0x4d")][S("0x8")](s)[S("0x4f")]()[S("0x27")][S("0x4c")]&&(T(s[S("0x33")](":")[2],n.toRange(),t,e),n[S("0x3a")]());r[S("0x1b")]()}))}))}(e)}[S("0x2")](){const e=this[S("0x29")],t=e[S("0x55")][S("0x8")]("undo");t&&e[S("0x44")].on(S("0x48"),((s,r)=>{const n=r[0];if(S("0x13")!=n.type||!n.name[S("0x5")]("user:"))return;const i=n[S("0x3c")];t[S("0x3e")][S("0xb")](i)&&(n[S("0x21")]=n[S("0x19")]?e[S("0x44")][S("0x43")](n.oldRange[S("0xc")],n[S("0x19")].end):null)}),{priority:S("0x32")})}[S("0x28")](){const e=this[S("0x29")],t=e[S("0x44")][S("0x54")],s=e[S("0x36")].get(m);e[S("0x44")][S("0x3b")]({isUndoable:!1},(r=>{const n=S("0x45")+s.mySessionId,i=S("0x12")+s[S("0x25")],o=e[S("0x44")][S("0x4d")][S("0xb")](n);e[S("0x9")].view[S("0x2d")]?T(s[S("0x25")],t[S("0x35")][S("0x16")](),e[S("0x44")],r):o&&(r.removeMarker(n),r[S("0x2f")](i))}))}}function T(e,t,s,r){const n=S("0x45")+e,i=S("0x12")+e,o=t.getContainedElement();let a=t.start;o&&o.is("element",S("0x49"))&&(a=function(e,t){for(const s of e.getPositions())if(t[S("0x10")].checkChild(s,S("0x14")))return s}(t,s),t=r[S("0x43")](a)),a=r[S("0x43")](a),s[S("0x4d")][S("0xb")](n)?(r[S("0x15")](n,{range:t}),r[S("0x15")](i,{range:a})):(r.addMarker(n,{range:t,usingOperation:!0}),r[S("0x30")](i,{range:a,usingOperation:!0}))}function k(e,t,s){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"},s)}}var C=__webpack_require__(9933),I=__webpack_require__.n(C);const A=function(){this.__data__=[],this.size=0};const R=function(e,t){return e===t||e!=e&&t!=t};const N=function(e,t){for(var s=e.length;s--;)if(R(e[s][0],t))return s;return-1};var j=Array.prototype.splice;const P=function(e){var t=this.__data__,s=N(t,e);return!(s<0)&&(s==t.length-1?t.pop():j.call(t,s,1),--this.size,!0)};const D=function(e){var t=this.__data__,s=N(t,e);return s<0?void 0:t[s][1]};const M=function(e){return N(this.__data__,e)>-1};const B=function(e,t){var s=this.__data__,r=N(s,e);return r<0?(++this.size,s.push([e,t])):s[r][1]=t,this};function J(e){var t=-1,s=null==e?0:e.length;for(this.clear();++t<s;){var r=e[t];this.set(r[0],r[1])}}J.prototype.clear=A,J.prototype.delete=P,J.prototype.get=D,J.prototype.has=M,J.prototype.set=B;const U=J;const V=function(){this.__data__=new U,this.size=0};const F=function(e){var t=this.__data__,s=t.delete(e);return this.size=t.size,s};const q=function(e){return this.__data__.get(e)};const L=function(e){return this.__data__.has(e)};const Y="object"==typeof global&&global&&global.Object===Object&&global;var z="object"==typeof self&&self&&self.Object===Object&&self;const G=Y||z||Function("return this")();const $=G.Symbol;var W=Object.prototype,H=W.hasOwnProperty,K=W.toString,Z=$?$.toStringTag:void 0;const X=function(e){var t=H.call(e,Z),s=e[Z];try{e[Z]=void 0;var r=!0}catch(e){}var n=K.call(e);return r&&(t?e[Z]=s:delete e[Z]),n};var Q=Object.prototype.toString;const ee=function(e){return Q.call(e)};var te=$?$.toStringTag:void 0;const se=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":te&&te in Object(e)?X(e):ee(e)};const re=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)};const ne=function(e){if(!re(e))return!1;var t=se(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t};const ie=G["__core-js_shared__"];var oe,ae=(oe=/[^.]+$/.exec(ie&&ie.keys&&ie.keys.IE_PROTO||""))?"Symbol(src)_1."+oe:"";const ce=function(e){return!!ae&&ae in e};var ue=Function.prototype.toString;const de=function(e){if(null!=e){try{return ue.call(e)}catch(e){}try{return e+""}catch(e){}}return""};var le=/^\[object .+?Constructor\]$/,he=Function.prototype,fe=Object.prototype,pe=he.toString,ye=fe.hasOwnProperty,me=RegExp("^"+pe.call(ye).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const ve=function(e){return!(!re(e)||ce(e))&&(ne(e)?me:le).test(de(e))};const xe=function(e,t){return null==e?void 0:e[t]};const _e=function(e,t){var s=xe(e,t);return ve(s)?s:void 0};const ge=_e(G,"Map");const be=_e(Object,"create");const we=function(){this.__data__=be?be(null):{},this.size=0};const Oe=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t};var Se=Object.prototype.hasOwnProperty;const Ee=function(e){var t=this.__data__;if(be){var s=t[e];return"__lodash_hash_undefined__"===s?void 0:s}return Se.call(t,e)?t[e]:void 0};var Te=Object.prototype.hasOwnProperty;const ke=function(e){var t=this.__data__;return be?void 0!==t[e]:Te.call(t,e)};const Ce=function(e,t){var s=this.__data__;return this.size+=this.has(e)?0:1,s[e]=be&&void 0===t?"__lodash_hash_undefined__":t,this};function Ie(e){var t=-1,s=null==e?0:e.length;for(this.clear();++t<s;){var r=e[t];this.set(r[0],r[1])}}Ie.prototype.clear=we,Ie.prototype.delete=Oe,Ie.prototype.get=Ee,Ie.prototype.has=ke,Ie.prototype.set=Ce;const Ae=Ie;const Re=function(){this.size=0,this.__data__={hash:new Ae,map:new(ge||U),string:new Ae}};const Ne=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};const je=function(e,t){var s=e.__data__;return Ne(t)?s["string"==typeof t?"string":"hash"]:s.map};const Pe=function(e){var t=je(this,e).delete(e);return this.size-=t?1:0,t};const De=function(e){return je(this,e).get(e)};const Me=function(e){return je(this,e).has(e)};const Be=function(e,t){var s=je(this,e),r=s.size;return s.set(e,t),this.size+=s.size==r?0:1,this};function Je(e){var t=-1,s=null==e?0:e.length;for(this.clear();++t<s;){var r=e[t];this.set(r[0],r[1])}}Je.prototype.clear=Re,Je.prototype.delete=Pe,Je.prototype.get=De,Je.prototype.has=Me,Je.prototype.set=Be;const Ue=Je;const Ve=function(e,t){var s=this.__data__;if(s instanceof U){var r=s.__data__;if(!ge||r.length<199)return r.push([e,t]),this.size=++s.size,this;s=this.__data__=new Ue(r)}return s.set(e,t),this.size=s.size,this};function Fe(e){var t=this.__data__=new U(e);this.size=t.size}Fe.prototype.clear=V,Fe.prototype.delete=F,Fe.prototype.get=q,Fe.prototype.has=L,Fe.prototype.set=Ve;const qe=Fe;const Le=function(e,t){for(var s=-1,r=null==e?0:e.length;++s<r&&!1!==t(e[s],s,e););return e};const Ye=function(){try{var e=_e(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();const ze=function(e,t,s){"__proto__"==t&&Ye?Ye(e,t,{configurable:!0,enumerable:!0,value:s,writable:!0}):e[t]=s};var Ge=Object.prototype.hasOwnProperty;const $e=function(e,t,s){var r=e[t];Ge.call(e,t)&&R(r,s)&&(void 0!==s||t in e)||ze(e,t,s)};const We=function(e,t,s,r){var n=!s;s||(s={});for(var i=-1,o=t.length;++i<o;){var a=t[i],c=r?r(s[a],e[a],a,s,e):void 0;void 0===c&&(c=e[a]),n?ze(s,a,c):$e(s,a,c)}return s};const He=function(e,t){for(var s=-1,r=Array(e);++s<e;)r[s]=t(s);return r};const Ke=function(e){return null!=e&&"object"==typeof e};const Ze=function(e){return Ke(e)&&"[object Arguments]"==se(e)};var Xe=Object.prototype,Qe=Xe.hasOwnProperty,et=Xe.propertyIsEnumerable;const tt=Ze(function(){return arguments}())?Ze:function(e){return Ke(e)&&Qe.call(e,"callee")&&!et.call(e,"callee")};const st=Array.isArray;const rt=function(){return!1};var nt="object"==typeof exports&&exports&&!exports.nodeType&&exports,it=nt&&"object"==typeof module&&module&&!module.nodeType&&module,ot=it&&it.exports===nt?G.Buffer:void 0;const at=(ot?ot.isBuffer:void 0)||rt;var ct=/^(?:0|[1-9]\d*)$/;const ut=function(e,t){var s=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==s||"symbol"!=s&&ct.test(e))&&e>-1&&e%1==0&&e<t};const dt=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991};var lt={};lt["[object Float32Array]"]=lt["[object Float64Array]"]=lt["[object Int8Array]"]=lt["[object Int16Array]"]=lt["[object Int32Array]"]=lt["[object Uint8Array]"]=lt["[object Uint8ClampedArray]"]=lt["[object Uint16Array]"]=lt["[object Uint32Array]"]=!0,lt["[object Arguments]"]=lt["[object Array]"]=lt["[object ArrayBuffer]"]=lt["[object Boolean]"]=lt["[object DataView]"]=lt["[object Date]"]=lt["[object Error]"]=lt["[object Function]"]=lt["[object Map]"]=lt["[object Number]"]=lt["[object Object]"]=lt["[object RegExp]"]=lt["[object Set]"]=lt["[object String]"]=lt["[object WeakMap]"]=!1;const ht=function(e){return Ke(e)&&dt(e.length)&&!!lt[se(e)]};const ft=function(e){return function(t){return e(t)}};var pt="object"==typeof exports&&exports&&!exports.nodeType&&exports,yt=pt&&"object"==typeof module&&module&&!module.nodeType&&module,mt=yt&&yt.exports===pt&&Y.process;const vt=function(){try{var e=yt&&yt.require&&yt.require("util").types;return e||mt&&mt.binding&&mt.binding("util")}catch(e){}}();var xt=vt&&vt.isTypedArray;const _t=xt?ft(xt):ht;var gt=Object.prototype.hasOwnProperty;const bt=function(e,t){var s=st(e),r=!s&&tt(e),n=!s&&!r&&at(e),i=!s&&!r&&!n&&_t(e),o=s||r||n||i,a=o?He(e.length,String):[],c=a.length;for(var u in e)!t&&!gt.call(e,u)||o&&("length"==u||n&&("offset"==u||"parent"==u)||i&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||ut(u,c))||a.push(u);return a};var wt=Object.prototype;const Ot=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||wt)};const St=function(e,t){return function(s){return e(t(s))}};const Et=St(Object.keys,Object);var Tt=Object.prototype.hasOwnProperty;const kt=function(e){if(!Ot(e))return Et(e);var t=[];for(var s in Object(e))Tt.call(e,s)&&"constructor"!=s&&t.push(s);return t};const Ct=function(e){return null!=e&&dt(e.length)&&!ne(e)};const It=function(e){return Ct(e)?bt(e):kt(e)};const At=function(e,t){return e&&We(t,It(t),e)};const Rt=function(e){var t=[];if(null!=e)for(var s in Object(e))t.push(s);return t};var Nt=Object.prototype.hasOwnProperty;const jt=function(e){if(!re(e))return Rt(e);var t=Ot(e),s=[];for(var r in e)("constructor"!=r||!t&&Nt.call(e,r))&&s.push(r);return s};const Pt=function(e){return Ct(e)?bt(e,!0):jt(e)};const Dt=function(e,t){return e&&We(t,Pt(t),e)};var Mt="object"==typeof exports&&exports&&!exports.nodeType&&exports,Bt=Mt&&"object"==typeof module&&module&&!module.nodeType&&module,Jt=Bt&&Bt.exports===Mt?G.Buffer:void 0,Ut=Jt?Jt.allocUnsafe:void 0;const Vt=function(e,t){if(t)return e.slice();var s=e.length,r=Ut?Ut(s):new e.constructor(s);return e.copy(r),r};const Ft=function(e,t){var s=-1,r=e.length;for(t||(t=Array(r));++s<r;)t[s]=e[s];return t};const qt=function(e,t){for(var s=-1,r=null==e?0:e.length,n=0,i=[];++s<r;){var o=e[s];t(o,s,e)&&(i[n++]=o)}return i};const Lt=function(){return[]};var Yt=Object.prototype.propertyIsEnumerable,zt=Object.getOwnPropertySymbols;const Gt=zt?function(e){return null==e?[]:(e=Object(e),qt(zt(e),(function(t){return Yt.call(e,t)})))}:Lt;const $t=function(e,t){return We(e,Gt(e),t)};const Wt=function(e,t){for(var s=-1,r=t.length,n=e.length;++s<r;)e[n+s]=t[s];return e};const Ht=St(Object.getPrototypeOf,Object);const Kt=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)Wt(t,Gt(e)),e=Ht(e);return t}:Lt;const Zt=function(e,t){return We(e,Kt(e),t)};const Xt=function(e,t,s){var r=t(e);return st(e)?r:Wt(r,s(e))};const Qt=function(e){return Xt(e,It,Gt)};const es=function(e){return Xt(e,Pt,Kt)};const ts=_e(G,"DataView");const ss=_e(G,"Promise");const rs=_e(G,"Set");const ns=_e(G,"WeakMap");var is="[object Map]",os="[object Promise]",as="[object Set]",cs="[object WeakMap]",us="[object DataView]",ds=de(ts),ls=de(ge),hs=de(ss),fs=de(rs),ps=de(ns),ys=se;(ts&&ys(new ts(new ArrayBuffer(1)))!=us||ge&&ys(new ge)!=is||ss&&ys(ss.resolve())!=os||rs&&ys(new rs)!=as||ns&&ys(new ns)!=cs)&&(ys=function(e){var t=se(e),s="[object Object]"==t?e.constructor:void 0,r=s?de(s):"";if(r)switch(r){case ds:return us;case ls:return is;case hs:return os;case fs:return as;case ps:return cs}return t});const ms=ys;var vs=Object.prototype.hasOwnProperty;const xs=function(e){var t=e.length,s=new e.constructor(t);return t&&"string"==typeof e[0]&&vs.call(e,"index")&&(s.index=e.index,s.input=e.input),s};const _s=G.Uint8Array;const gs=function(e){var t=new e.constructor(e.byteLength);return new _s(t).set(new _s(e)),t};const bs=function(e,t){var s=t?gs(e.buffer):e.buffer;return new e.constructor(s,e.byteOffset,e.byteLength)};var ws=/\w*$/;const Os=function(e){var t=new e.constructor(e.source,ws.exec(e));return t.lastIndex=e.lastIndex,t};var Ss=$?$.prototype:void 0,Es=Ss?Ss.valueOf:void 0;const Ts=function(e){return Es?Object(Es.call(e)):{}};const ks=function(e,t){var s=t?gs(e.buffer):e.buffer;return new e.constructor(s,e.byteOffset,e.length)};const Cs=function(e,t,s){var r=e.constructor;switch(t){case"[object ArrayBuffer]":return gs(e);case"[object Boolean]":case"[object Date]":return new r(+e);case"[object DataView]":return bs(e,s);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 ks(e,s);case"[object Map]":case"[object Set]":return new r;case"[object Number]":case"[object String]":return new r(e);case"[object RegExp]":return Os(e);case"[object Symbol]":return Ts(e)}};var Is=Object.create;const As=function(){function e(){}return function(t){if(!re(t))return{};if(Is)return Is(t);e.prototype=t;var s=new e;return e.prototype=void 0,s}}();const Rs=function(e){return"function"!=typeof e.constructor||Ot(e)?{}:As(Ht(e))};const Ns=function(e){return Ke(e)&&"[object Map]"==ms(e)};var js=vt&&vt.isMap;const Ps=js?ft(js):Ns;const Ds=function(e){return Ke(e)&&"[object Set]"==ms(e)};var Ms=vt&&vt.isSet;const Bs=Ms?ft(Ms):Ds;var Js="[object Arguments]",Us="[object Function]",Vs="[object Object]",Fs={};Fs[Js]=Fs["[object Array]"]=Fs["[object ArrayBuffer]"]=Fs["[object DataView]"]=Fs["[object Boolean]"]=Fs["[object Date]"]=Fs["[object Float32Array]"]=Fs["[object Float64Array]"]=Fs["[object Int8Array]"]=Fs["[object Int16Array]"]=Fs["[object Int32Array]"]=Fs["[object Map]"]=Fs["[object Number]"]=Fs["[object Object]"]=Fs["[object RegExp]"]=Fs["[object Set]"]=Fs["[object String]"]=Fs["[object Symbol]"]=Fs["[object Uint8Array]"]=Fs["[object Uint8ClampedArray]"]=Fs["[object Uint16Array]"]=Fs["[object Uint32Array]"]=!0,Fs["[object Error]"]=Fs[Us]=Fs["[object WeakMap]"]=!1;const qs=function e(t,s,r,n,i,o){var a,c=1&s,u=2&s,d=4&s;if(r&&(a=i?r(t,n,i,o):r(t)),void 0!==a)return a;if(!re(t))return t;var l=st(t);if(l){if(a=xs(t),!c)return Ft(t,a)}else{var h=ms(t),f=h==Us||"[object GeneratorFunction]"==h;if(at(t))return Vt(t,c);if(h==Vs||h==Js||f&&!i){if(a=u||f?{}:Rs(t),!c)return u?Zt(t,Dt(a,t)):$t(t,At(a,t))}else{if(!Fs[h])return i?t:{};a=Cs(t,h,c)}}o||(o=new qe);var p=o.get(t);if(p)return p;o.set(t,a),Bs(t)?t.forEach((function(n){a.add(e(n,s,r,n,t,o))})):Ps(t)&&t.forEach((function(n,i){a.set(i,e(n,s,r,i,t,o))}));var y=l?void 0:(d?u?es:Qt:u?Pt:It)(t);return Le(y||t,(function(n,i){y&&(n=t[i=n]),$e(a,i,e(n,s,r,i,t,o))})),a};const Ls=function(e){return qs(e,5)},Ys=["nested","create","fromJSON","protobuffactory-cannot-get-descriptor-before-build","finish","_protobuf","decode","toObject","build","decompress","_protobufRoot","_description","encode","getDescriptor","verify"];var zs,Gs;zs=Ys,Gs=422,function(e){for(;--e;)zs.push(zs.shift())}(++Gs);const $s=function(e,t){return Ys[e-=0]};class Ws{constructor(){this._description={nested:{}}}registerDescriptor(e,t){this[$s("0x9")][$s("0xd")][e]=Ls(t)}[$s("0x6")](){this[$s("0x8")]=I().Root[$s("0x0")](this[$s("0x9")])}[$s("0xb")](e){if(!this[$s("0x8")])throw new t.CKEditorError($s("0x1"),this);return new Hs(this[$s("0x8")].lookupType(e))}}class Hs{constructor(e){this[$s("0x3")]=e}compress(e){const t=this._protobuf[$s("0xc")](e);if(t)throw Error(t);return this[$s("0x3")][$s("0xa")](this[$s("0x3")][$s("0xe")](e))[$s("0x2")]()}[$s("0x7")](e){return this[$s("0x3")][$s("0x5")](this._protobuf[$s("0x4")](e),{oneofs:!0})}}var Ks,Zs,Xs=["uint32","bool","string","repeated","Position","Element"];Ks=Xs,Zs=478,function(e){for(;--e;)Ks.push(Ks.shift())}(++Zs);var Qs=function(e,t){return Xs[e-=0]};const er={Position:{fields:{root:{type:Qs("0x4"),id:1},rootMain:{type:Qs("0x3"),id:2},rootGraveyard:{type:Qs("0x3"),id:3},path:{rule:Qs("0x5"),type:Qs("0x2"),id:4},stickiness:{type:Qs("0x4"),id:5}}},Range:{fields:{start:{type:Qs("0x0"),id:1},end:{type:"Position",id:2}}},Element:{fields:{name:{type:Qs("0x4"),id:1},children:{rule:"repeated",type:Qs("0x1"),id:2},data:{type:"string",id:3},attributesBoolean:{keyType:Qs("0x4"),type:Qs("0x3"),id:4},attributesJson:{type:Qs("0x4"),id:5}}}};const tr=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this};const sr=function(e){return this.__data__.has(e)};function rr(e){var t=-1,s=null==e?0:e.length;for(this.__data__=new Ue;++t<s;)this.add(e[t])}rr.prototype.add=rr.prototype.push=tr,rr.prototype.has=sr;const nr=rr;const ir=function(e,t){for(var s=-1,r=null==e?0:e.length;++s<r;)if(t(e[s],s,e))return!0;return!1};const or=function(e,t){return e.has(t)};const ar=function(e,t,s,r,n,i){var o=1&s,a=e.length,c=t.length;if(a!=c&&!(o&&c>a))return!1;var u=i.get(e),d=i.get(t);if(u&&d)return u==t&&d==e;var l=-1,h=!0,f=2&s?new nr:void 0;for(i.set(e,t),i.set(t,e);++l<a;){var p=e[l],y=t[l];if(r)var m=o?r(y,p,l,t,e,i):r(p,y,l,e,t,i);if(void 0!==m){if(m)continue;h=!1;break}if(f){if(!ir(t,(function(e,t){if(!or(f,t)&&(p===e||n(p,e,s,r,i)))return f.push(t)}))){h=!1;break}}else if(p!==y&&!n(p,y,s,r,i)){h=!1;break}}return i.delete(e),i.delete(t),h};const cr=function(e){var t=-1,s=Array(e.size);return e.forEach((function(e,r){s[++t]=[r,e]})),s};const ur=function(e){var t=-1,s=Array(e.size);return e.forEach((function(e){s[++t]=e})),s};var dr=$?$.prototype:void 0,lr=dr?dr.valueOf:void 0;const hr=function(e,t,s,r,n,i,o){switch(s){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||!i(new _s(e),new _s(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return R(+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=cr;case"[object Set]":var c=1&r;if(a||(a=ur),e.size!=t.size&&!c)return!1;var u=o.get(e);if(u)return u==t;r|=2,o.set(e,t);var d=ar(a(e),a(t),r,n,i,o);return o.delete(e),d;case"[object Symbol]":if(lr)return lr.call(e)==lr.call(t)}return!1};var fr=Object.prototype.hasOwnProperty;const pr=function(e,t,s,r,n,i){var o=1&s,a=Qt(e),c=a.length;if(c!=Qt(t).length&&!o)return!1;for(var u=c;u--;){var d=a[u];if(!(o?d in t:fr.call(t,d)))return!1}var l=i.get(e),h=i.get(t);if(l&&h)return l==t&&h==e;var f=!0;i.set(e,t),i.set(t,e);for(var p=o;++u<c;){var y=e[d=a[u]],m=t[d];if(r)var v=o?r(m,y,d,t,e,i):r(y,m,d,e,t,i);if(!(void 0===v?y===m||n(y,m,s,r,i):v)){f=!1;break}p||(p="constructor"==d)}if(f&&!p){var x=e.constructor,_=t.constructor;x==_||!("constructor"in e)||!("constructor"in t)||"function"==typeof x&&x instanceof x&&"function"==typeof _&&_ instanceof _||(f=!1)}return i.delete(e),i.delete(t),f};var yr="[object Arguments]",mr="[object Array]",vr="[object Object]",xr=Object.prototype.hasOwnProperty;const _r=function(e,t,s,r,n,i){var o=st(e),a=st(t),c=o?mr:ms(e),u=a?mr:ms(t),d=(c=c==yr?vr:c)==vr,l=(u=u==yr?vr:u)==vr,h=c==u;if(h&&at(e)){if(!at(t))return!1;o=!0,d=!1}if(h&&!d)return i||(i=new qe),o||_t(e)?ar(e,t,s,r,n,i):hr(e,t,c,s,r,n,i);if(!(1&s)){var f=d&&xr.call(e,"__wrapped__"),p=l&&xr.call(t,"__wrapped__");if(f||p){var y=f?e.value():e,m=p?t.value():t;return i||(i=new qe),n(y,m,s,r,i)}}return!!h&&(i||(i=new qe),pr(e,t,s,r,n,i))};const gr=function e(t,s,r,n,i){return t===s||(null==t||null==s||!Ke(t)&&!Ke(s)?t!=t&&s!=s:_r(t,s,r,n,e,i))};const br=function(e,t){return gr(e,t)},wr=["nodes","path","rootGraveyard","$graveyard","root","main","rootMain"];var Or,Sr;Or=wr,Sr=205,function(e){for(;--e;)Or.push(Or.shift())}(++Sr);const Er=function(e,t){return wr[e-=0]};function Tr(e,t){const s=Ls(e);return s[Er("0x6")][s[Er("0x6")].length-1]+=t,s}function kr(e,t){return e[Er("0x2")]===t[Er("0x2")]&&br(e[Er("0x6")],t[Er("0x6")])}function Cr(e){Ar(e,(e=>(Er("0x3")==e[Er("0x2")]?(e[Er("0x4")]=!0,delete e[Er("0x2")]):"$graveyard"==e[Er("0x2")]&&(e[Er("0x0")]=!0,delete e[Er("0x2")]),e)))}function Ir(e){Ar(e,(e=>(e[Er("0x4")]?(e[Er("0x2")]=Er("0x3"),delete e.rootMain):e[Er("0x0")]&&(e[Er("0x2")]=Er("0x1"),delete e[Er("0x0")]),e)))}function Ar(e,t){for(const s in e){const r=e[s];Er("0x5")!==s&&re(r)&&(r[Er("0x6")]&&(r[Er("0x2")]||r[Er("0x4")]||r[Er("0x0")])?e[s]=t(r):Ar(r,t))}return e}const Rr=["operationName","buffers","shift","decompress","compress","__className","types","_protobufDescriptor","push"];var Nr,jr;Nr=Rr,jr=222,function(e){for(;--e;)Nr.push(Nr.shift())}(++jr);const Pr=function(e,t){return Rr[e-=0]};class Dr{constructor(e,t,s){this.id=e,this.operationName=t,this[Pr("0x1")]=s}compress(e,t){const s=t[Pr("0x5")]();Cr(s),e[Pr("0x4")].push(this[Pr("0x1")][Pr("0x7")](s)),e[Pr("0x0")][Pr("0x2")](this.id)}[Pr("0x6")](e,t){t[Pr("0x0")][Pr("0x5")]();const s=this[Pr("0x1")][Pr("0x6")](t.buffers[Pr("0x5")]());Ir(s),s[Pr("0x8")]=this[Pr("0x3")],e[Pr("0x2")](s)}}const Mr=["__className","Range","_protobufDescriptor","string","Boolean","oldValue","buffers","stringify","bool","compress","description","newValue","Json","decompress","push"];var Br,Jr;Br=Mr,Jr=344,function(e){for(;--e;)Br.push(Br.shift())}(++Jr);const Ur=function(e,t){return Mr[e-=0]};class Vr extends Dr{static get[Ur("0xb")](){return{fields:{range:{type:Ur("0x2"),id:1},key:{type:Ur("0x4"),id:2},oldValueBoolean:{type:Ur("0x9"),id:3},oldValueJson:{type:Ur("0x4"),id:4},newValueBoolean:{type:Ur("0x9"),id:5},newValueJson:{type:Ur("0x4"),id:6},wasUndone:{type:Ur("0x9"),id:7}}}}[Ur("0xa")](e,t){const s=t.shift();Fr(Ur("0x6"),s),Fr(Ur("0xc"),s),Cr(s),e[Ur("0x7")][Ur("0x0")](this[Ur("0x3")][Ur("0xa")](s)),e.types[Ur("0x0")](this.id)}decompress(e,t){const{types:s,buffers:r}=t,n=this._protobufDescriptor[Ur("0xe")](r.shift());s.shift(),qr(Ur("0x6"),n),qr(Ur("0xc"),n),Ir(n),n[Ur("0x1")]=this.operationName,e[Ur("0x0")](n)}}function Fr(e,t){const s=t[e];"boolean"==typeof s?t[e+Ur("0x5")]=s:t[e+Ur("0xd")]=JSON[Ur("0x8")](s)}function qr(e,t){const s=e+Ur("0xd");t[s]?(t[e]=JSON.parse(t[s]),delete t[s]):(t[e]=t[e+Ur("0x5")],delete t[e+Ur("0x5")])}const Lr=["buffers","repeated","nodes","bool","attributes","shift","attributesBoolean","types","Element","description","parse","compress","stringify","Position","children","attributesJson","every","_protobufDescriptor","push","decompress"];var Yr,zr;Yr=Lr,zr=227,function(e){for(;--e;)Yr.push(Yr.shift())}(++zr);const Gr=function(e,t){return Lr[e-=0]};class $r extends Dr{static get[Gr("0x2")](){return{fields:{position:{type:Gr("0x6"),id:1},nodes:{rule:Gr("0xe"),type:Gr("0x1"),id:2},shouldReceiveAttributes:{type:Gr("0x10"),id:3},wasUndone:{type:Gr("0x10"),id:4}}}}[Gr("0x4")](e,t){const s=t[Gr("0x12")]();Wr(s[Gr("0xf")]),Cr(s),e[Gr("0xd")][Gr("0xb")](this[Gr("0xa")][Gr("0x4")](s)),e[Gr("0x0")][Gr("0xb")](this.id)}[Gr("0xc")](e,t){const{types:s,buffers:r}=t,n=this._protobufDescriptor[Gr("0xc")](r.shift());s[Gr("0x12")](),n[Gr("0xf")]||(n[Gr("0xf")]=[]),Hr(n[Gr("0xf")]),Ir(n),n.__className=this.operationName,e[Gr("0xb")](n)}}function Wr(e){for(const t of e){if(t[Gr("0x11")]){const e=t[Gr("0x11")];Kr(e)?t[Gr("0x13")]=e:t[Gr("0x8")]=JSON[Gr("0x5")](e)}t[Gr("0x7")]&&Wr(t[Gr("0x7")])}}function Hr(e){for(const t of e)(t.attributesBoolean||t[Gr("0x8")])&&(t[Gr("0x13")]?(t[Gr("0x11")]=t[Gr("0x13")],delete t[Gr("0x13")]):(t[Gr("0x11")]=JSON[Gr("0x3")](t[Gr("0x8")]),delete t.attributesJson)),t[Gr("0x7")]&&Hr(t.children)}function Kr(e){return Object.keys(e)[Gr("0x9")]((t=>"boolean"==typeof e[t]))}const Zr=["oldRange","description","bool","decompress","newRange","length","Range"];var Xr,Qr;Xr=Zr,Qr=400,function(e){for(;--e;)Xr.push(Xr.shift())}(++Qr);const en=function(e,t){return Zr[e-=0]};class tn extends Dr{static get[en("0x0")](){return{fields:{name:{type:"string",id:1},oldRange:{type:en("0x5"),id:2},newRange:{type:en("0x5"),id:3},affectsData:{type:en("0x1"),id:4},wasUndone:{type:en("0x1"),id:5}}}}[en("0x2")](e,t){super.decompress(e,t);const s=e[e[en("0x4")]-1];s[en("0x6")]||(s.oldRange=null),s[en("0x3")]||(s[en("0x3")]=null)}}var sn,rn,nn=["Position","description","bool"];sn=nn,rn=414,function(e){for(;--e;)sn.push(sn.shift())}(++rn);var on=function(e,t){return nn[e-=0]};class an extends Dr{static get[on("0x1")](){return{fields:{sourcePosition:{type:"Position",id:1},targetPosition:{type:on("0x0"),id:2},graveyardPosition:{type:on("0x0"),id:3},howMany:{type:"uint32",id:4},wasUndone:{type:on("0x2"),id:5}}}}}var cn,un,dn=["Position","description","bool"];cn=dn,un=412,function(e){for(;--e;)cn.push(cn.shift())}(++un);var ln=function(e,t){return dn[e-=0]};class hn extends Dr{static get[ln("0x0")](){return{fields:{sourcePosition:{type:ln("0x2"),id:1},howMany:{type:"uint32",id:2},targetPosition:{type:"Position",id:3},wasUndone:{type:ln("0x1"),id:4}}}}}var fn,pn,yn=["description","string"];fn=yn,pn=231,function(e){for(;--e;)fn.push(fn.shift())}(++pn);var mn=function(e,t){return yn[e-=0]};class vn extends Dr{static get[mn("0x1")](){return{fields:{position:{type:"Position",id:1},oldName:{type:mn("0x0"),id:2},newName:{type:"string",id:3},wasUndone:{type:"bool",id:4}}}}}const xn=["range","fields","string","description","root"];var _n,gn;_n=xn,gn=129,function(e){for(;--e;)_n.push(_n.shift())}(++gn);const bn=function(e,t){return xn[e-=0]};class wn extends Vr{static get[bn("0x4")](){const e=Vr.description;return delete e[bn("0x2")][bn("0x1")],e.fields[bn("0x0")]={type:bn("0x3"),id:1},e}}var On,Sn,En=["description","uint32","bool","Position"];On=En,Sn=205,function(e){for(;--e;)On.push(On.shift())}(++Sn);var Tn=function(e,t){return En[e-=0]};class kn extends Dr{static get[Tn("0x3")](){return{fields:{splitPosition:{type:Tn("0x2"),id:1},graveyardPosition:{type:"Position",id:2},howMany:{type:Tn("0x0"),id:3},insertionPosition:{type:Tn("0x2"),id:4},wasUndone:{type:Tn("0x1"),id:5}}}}}var Cn,In,An=["operationName","decompress","types","compress","push","shift"];Cn=An,In=178,function(e){for(;--e;)Cn.push(Cn.shift())}(++In);var Rn=function(e,t){return An[e-=0]};class Nn extends Dr{[Rn("0x5")](e,t){t[Rn("0x1")](),e[Rn("0x4")][Rn("0x0")](this.id)}[Rn("0x3")](e,t){t[Rn("0x4")][Rn("0x1")](),e[Rn("0x0")]({__className:this[Rn("0x2")]})}}const jn=["compress","_omittedNamespace","startsWith","decompress","name"];var Pn,Dn;Pn=jn,Dn=273,function(e){for(;--e;)Pn.push(Pn.shift())}(++Dn);const Mn=function(e,t){return jn[e-=0]};class Bn extends tn{constructor(e,t,s,r){super(e,t,s),this[Mn("0x3")]=r+":"}[Mn("0x2")](e,t){return!("MarkerOperation"!=t[0].__className||!t[0].name[Mn("0x4")](this._omittedNamespace)||(t[0].name=t[0][Mn("0x1")].replace(new RegExp("^"+this[Mn("0x3")]),""),super.compress(e,t),0))}[Mn("0x0")](e,t){super[Mn("0x0")](e,t);const s=e[e.length-1];s[Mn("0x1")]=this[Mn("0x3")]+s.name}}const Jn=["decompress","shift","types","compress","push","_decompressSingleOperation","_compareOperations","buffers","length","_context"];var Un,Vn;Un=Jn,Vn=316,function(e){for(;--e;)Un.push(Un.shift())}(++Vn);const Fn=function(e,t){return Jn[e-=0]};class qn{constructor(e,t){this.id=e,this[Fn("0x3")]=t}[Fn("0x7")](e,t){let s;for(;t[Fn("0x2")]>1&&this[Fn("0x0")](t[0],t[1]);)s?(s=this._combineNext(t.shift(),s),e[Fn("0x6")][Fn("0x8")](0)):(s=Ls(t.shift()),e[Fn("0x6")].push(this.id));return!!s&&(s=this._combineNext(t[Fn("0x5")](),s),e.types.push(0),e[Fn("0x1")][Fn("0x8")](this._compressSingleOperation(s)),!0)}[Fn("0x4")](e,t){const s=this[Fn("0x9")](t);for(;0==t.types[0];)t[Fn("0x6")][Fn("0x5")](),e[Fn("0x8")](this._splitCurrent(s));e[Fn("0x8")](s)}}const Ln=["InsertOperation","substr","_context","_compressSingleOperation","keys","iterator","from","wasUndone","decompress","_compareOperations","length","buffers","compress","__className","data","next","position","_getCompressorByName","nodes","_splitCurrent","value","attributes"];var Yn,zn;Yn=Ln,zn=395,function(e){for(;--e;)Yn.push(Yn.shift())}(++zn);const Gn=function(e,t){return Ln[e-=0]};class $n extends qn{_combineNext(e,t){return t.nodes[0][Gn("0xf")]+=e[Gn("0x13")][0][Gn("0xf")],t}[Gn("0x14")](e){const t=Ls(e),s=t[Gn("0x13")][0],r=e[Gn("0x13")][0],n=r[Gn("0xf")][Symbol[Gn("0x6")]]()[Gn("0x10")]()[Gn("0x15")],i=n.length;return s[Gn("0xf")]=n,r[Gn("0xf")]=r.data[Gn("0x2")](i),e[Gn("0x11")]=Tr(e[Gn("0x11")],i),t}[Gn("0xa")](e,t){if(Wn(e)&&Wn(t)){const s=e.nodes[0][Gn("0xf")].length,r=kr(Tr(e.position,s),t[Gn("0x11")]),n=e[Gn("0x13")][0],i=t.nodes[0];return r&&function(e,t){const s=Object[Gn("0x5")](e[Gn("0x0")]||{}),r=Object[Gn("0x5")](t[Gn("0x0")]||{});return s.length===r.length&&s.every((s=>t.attributes[s]&&t[Gn("0x0")][s]===e[Gn("0x0")][s]))}(n,i)}return!1}[Gn("0x4")](e){const t={types:[],buffers:[],baseVersion:0};return this[Gn("0x3")][Gn("0x12")](Gn("0x1"))[Gn("0xd")](t,[e]),t[Gn("0xc")][0]}_decompressSingleOperation(e){const t=[];return this[Gn("0x3")][Gn("0x12")](Gn("0x1"))[Gn("0x9")](t,e),t[0]}}function Wn(e){return Gn("0x1")==e[Gn("0xe")]&&1==e[Gn("0x13")][Gn("0xb")]&&e[Gn("0x13")][0].data&&!e[Gn("0x8")]&&1==Array[Gn("0x7")](e[Gn("0x13")][0][Gn("0xf")])[Gn("0xb")]}const Hn=["howMany","_context","root","_decompressSingleOperation","__className","_combineNext","wasUndone","_getCompressorByName","targetPosition","buffers","MoveOperation","_splitCurrent","compress","_compareOperations","sourcePosition"];var Kn,Zn;Kn=Hn,Zn=470,function(e){for(;--e;)Kn.push(Kn.shift())}(++Zn);const Xn=function(e,t){return Hn[e-=0]};class Qn extends qn{[Xn("0x0")](e,t){return t[Xn("0xa")]++,t.sourcePosition=Ls(e[Xn("0x9")]),t}[Xn("0x6")](e){const t=Ls(e);return e[Xn("0xa")]--,t[Xn("0xa")]=1,t[Xn("0x9")]=Tr(t.sourcePosition,e.howMany),t}[Xn("0x8")](e,t){return!(!ei(e)||!ei(t))&&kr(Tr(e[Xn("0x9")],-1),t[Xn("0x9")])&&kr(e[Xn("0x3")],t[Xn("0x3")])}_compressSingleOperation(e){const t={types:[],buffers:[],baseVersion:0};return this[Xn("0xb")][Xn("0x2")](Xn("0x5"))[Xn("0x7")](t,[e]),t[Xn("0x4")][0]}[Xn("0xd")](e){const t=[];return this[Xn("0xb")][Xn("0x2")](Xn("0x5")).decompress(t,e),t[0]}}function ei(e){return Xn("0x5")==e[Xn("0xe")]&&"$graveyard"==e[Xn("0x3")][Xn("0xc")]&&1==e[Xn("0xa")]&&!e[Xn("0x1")]}const ti=["buffers","root","_combineNext","_splitCurrent","_compareOperations","MoveOperation","targetPosition","$graveyard","wasUndone","_context","compress","__className","sourcePosition","_decompressSingleOperation","_compressSingleOperation","howMany"];var si,ri;si=ti,ri=366,function(e){for(;--e;)si.push(si.shift())}(++ri);const ni=function(e,t){return ti[e-=0]};class ii extends qn{[ni("0x4")](e,t){return t[ni("0x1")]++,t}[ni("0x5")](e){const t=Ls(e);return t[ni("0x1")]=1,e[ni("0x1")]--,t}[ni("0x6")](e,t){return!(!oi(e)||!oi(t))&&kr(e[ni("0xe")],t[ni("0xe")])&&kr(e.targetPosition,t.targetPosition)}[ni("0x0")](e){const t={types:[],buffers:[],baseVersion:0};return this[ni("0xb")]._getCompressorByName(ni("0x7"))[ni("0xc")](t,[e]),t[ni("0x2")][0]}[ni("0xf")](e){const t=[];return this[ni("0xb")]._getCompressorByName(ni("0x7")).decompress(t,e),t[0]}}function oi(e){return ni("0x7")==e[ni("0xd")]&&ni("0x9")==e[ni("0x8")][ni("0x3")]&&1==e[ni("0x1")]&&!e[ni("0xa")]}const ai=["name","buffers","oldRange","startsWith","compress","user:","newRange","shift","_decompressSingleOperation","_context","decompress","types","__className","_getCompressorByName","MarkerOperation","push","stickiness","_compressSingleOperation","start","user:position:","end","toNone"];var ci,ui;ci=ai,ui=418,function(e){for(;--e;)ci.push(ci.shift())}(++ui);const di=function(e,t){return ai[e-=0]};class li extends qn{[di("0x4")](e,t){if(s=t[0],r=t[1],!(s&&r&&di("0xe")==s[di("0xc")]&&"MarkerOperation"==r[di("0xc")]&&s[di("0x0")][di("0x3")](di("0x5"))&&r[di("0x0")][di("0x3")](di("0x5"))&&s[di("0x0")]!=r[di("0x0")]))return!1;var s,r;const n=t[di("0x7")]();return n[di("0x2")]=null,n[di("0x6")]&&kr(n[di("0x6")][di("0x12")],n.newRange.end)&&(n[di("0x6")].end=null),t[di("0x7")](),e[di("0xb")].push(this.id),e[di("0xb")][di("0xf")](0),e[di("0x1")][di("0xf")](this._compressSingleOperation(n)),!0}decompress(e,t){const s=this[di("0x8")](t);s[di("0x6")]&&!s[di("0x6")].end&&(s[di("0x6")][di("0x14")]=Ls(s.newRange[di("0x12")]));const r=Ls(s);r[di("0x6")]&&(r.newRange.start[di("0x10")]=di("0x15"),r[di("0x6")][di("0x14")]=Ls(r[di("0x6")][di("0x12")])),r[di("0x0")]=di("0x13")+r.name.split(":")[2],t[di("0xb")].shift(),e[di("0xf")](s),e[di("0xf")](r)}[di("0x11")](e){const t={types:[],buffers:[],baseVersion:0};return this[di("0x9")][di("0xd")]("MarkerOperation")[di("0x4")](t,[e]),t[di("0x1")][0]}[di("0x8")](e){const t=[];return this._context[di("0xd")](di("0xe"))[di("0xa")](t,e),t[0]}}const hi=["_compressorByName","types","SplitOperation","baseVersion","getDescriptor","MergeOperation","ForwardDeletingAction","_registerActionCompressor","registerDescriptor","_getCompressorByName","build","suggestion","TypingAction","compress","Position","MarkerOperation","_protobufFactory","UserSelectionAction","MoveOperation","CommentMarkerOperation","comment","no-operations-provided","description","NoOperation","RootAttributeOperation","SuggestionMarkerOperation","_registerOperationCompressor","set","decompress","RenameOperation","AttributeOperation","_compressorById","Element","_registerCompressor","InsertOperation","DeletingAction","forEach","length"];var fi,pi;fi=hi,pi=441,function(e){for(;--e;)fi.push(fi.shift())}(++pi);const yi=function(e,t){return hi[e-=0]};class mi{constructor(){this[yi("0x8")]=new Map,this[yi("0xf")]=new Map,this[yi("0x1f")]=new Ws,this[yi("0x1f")][yi("0x17")]("Position",er[yi("0x1d")]),this._protobufFactory[yi("0x17")]("Range",er.Range),this[yi("0x1f")][yi("0x17")](yi("0x9"),er[yi("0x9")]),this[yi("0x1f")][yi("0x17")](yi("0x7"),Vr[yi("0x25")]),this[yi("0x1f")][yi("0x17")](yi("0xb"),$r[yi("0x25")]),this[yi("0x1f")].registerDescriptor(yi("0x1e"),tn.description),this._protobufFactory[yi("0x17")](yi("0x14"),an[yi("0x25")]),this[yi("0x1f")][yi("0x17")](yi("0x21"),hn[yi("0x25")]),this[yi("0x1f")][yi("0x17")](yi("0x6"),vn[yi("0x25")]),this._protobufFactory[yi("0x17")](yi("0x1"),wn[yi("0x25")]),this[yi("0x1f")][yi("0x17")](yi("0x11"),kn[yi("0x25")]),this._protobufFactory[yi("0x19")](),this[yi("0xa")](1,yi("0x0"),new Nn(1,yi("0x0"))),this[yi("0x3")](10,yi("0x7"),Vr),this[yi("0x3")](11,"InsertOperation",$r),this._registerOperationCompressor(12,yi("0x1e"),tn),this[yi("0x3")](13,"MergeOperation",an),this._registerOperationCompressor(14,yi("0x21"),hn),this._registerOperationCompressor(15,yi("0x6"),vn),this._registerOperationCompressor(16,"RootAttributeOperation",wn),this[yi("0x3")](17,"SplitOperation",kn);const e=this[yi("0x1f")].getDescriptor("MarkerOperation");this[yi("0xa")](18,"CommentMarkerOperation",new Bn(18,yi("0x1e"),e,yi("0x23"))),this[yi("0xa")](19,"SuggestionMarkerOperation",new Bn(19,yi("0x1e"),e,yi("0x1a"))),this._registerActionCompressor(100,"TypingAction",$n),this[yi("0x16")](101,yi("0xc"),Qn),this[yi("0x16")](102,"ForwardDeletingAction",ii),this[yi("0x16")](103,"UserSelectionAction",li)}_registerOperationCompressor(e,t,s){const r=new s(e,t,this[yi("0x1f")][yi("0x13")](t));this._registerCompressor(e,t,r)}_registerActionCompressor(e,t,s){const r=new s(e,this);this[yi("0xa")](e,t,r)}_registerCompressor(e,t,s){this[yi("0x8")][yi("0x4")](e,s),this[yi("0xf")].set(t,s)}[yi("0x18")](e){return this[yi("0xf")].get(e)}compress(e){if(!e||!e[0])throw new t.CKEditorError(yi("0x24"),this);const s={types:[],buffers:[],baseVersion:e[0][yi("0x12")]};for(;e[yi("0xe")];)this[yi("0x18")](yi("0x20"))[yi("0x1c")](s,e)||this[yi("0x18")](yi("0x1b"))[yi("0x1c")](s,e)||this[yi("0x18")](yi("0xc"))[yi("0x1c")](s,e)||this[yi("0x18")](yi("0x15"))[yi("0x1c")](s,e)||this._getCompressorByName(yi("0x22"))[yi("0x1c")](s,e)||this[yi("0x18")](yi("0x2"))[yi("0x1c")](s,e)||this._getCompressorByName(e[0].__className)[yi("0x1c")](s,e);return s}decompress(e){const t=[];for(;e.types[yi("0xe")];)this[yi("0x8")].get(e[yi("0x10")][0])[yi("0x5")](t,e);return t[yi("0xd")](((t,s)=>t[yi("0x12")]=e[yi("0x12")]+s)),t}}var vi=__webpack_require__(7622),xi=__webpack_require__.n(vi),_i=__webpack_require__(7530),gi=__webpack_require__.n(_i);const bi=["initData","getUser","_connectAfterSessionHasBeenFlushed","config","_handleServerResponse","_handleSendingSelectionMarkers","map","stopListening","_bufferedOperations","lastOperationId","keys","rtc-destroyed","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.","code","define","startsWith","_decompressOperations","error","Synchronization issue","lastDocumentSession","locale","_service","_ignoredOperations","realtimecollaborationclient-handleserverresponse","suppressErrorInCollaboration","404","_connectService","change:hasDomSelection","enableReadOnlyMode","permissions","_initThrowingOnDataSet","destroy","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.","connection","bind","wasUndone","sessionAdd:","off","unregister","push","rtc-offline","mySessionId","_assignOperationsMetaData","userId","_applyOperationsSet","_getOperationsFromInitData","_disconnectService","The document cannot be connected back to the server. To not lose your content save it locally and refresh the editor.","has","markers","directChange","listenTo","plugins","_handleReconnectionResponse","cloudServices.bundleVersion","marker","_authorId","_lastServerVersion","_isDisconnection","_shouldSendSelectionUpdate","_isPendingUpdate","realtimecollaborationclient-sendbufferedoperations","realtimecollaborationclient-init-session-connection-error","message","getIdOfTheLastOperation","isDocumentOperation","filter","createUserMarkerOperations","_hasSelectionChanged","model","register","apply","get","applyOperation","round","_shouldSendUpdate","setIdForTheLastOperation","_channelId","reconnect","change:range","_lastSyncedOperationId","end","sessionId","isReadOnly","stop","addToReconnectionStack","_handleReceivedOperations","_compressOperations","forEach","catch","_baseBufferDelay","_sendBufferedOperationsDelay","getConnectedSessions","_sendBufferedOperationsDelayId","cloud-services-internal-error: Not connected.","editing","_currentBufferDelay","path","baseVersion","change:_isEditingAllowed","_sendBufferedOperationsDelayed","createRange","includes","getDocumentDetails","reset","_hasSynchronizationProblem","_operationToId","serverHistory","disableReadOnlyMode","createPositionFromPath","slice","_operationIdentifier","collaboration-missing-channelid","history","metadata","cs:removeUser","init","selection","_pendingAction","isEnabled","_disconnectionOperations","createdAt","finally","document:write","document","_fetchMissingUsers","roots","return","The document details could not be taken during the reconnection. To not lose your content save it locally and refresh the editor.","_saveOperationInBuffer","_compressor","add","_document","409","PENDING_ACTION_SENDING_DATA","high","channelSessions","realtimecollaborationclient-init-document-already-initialized","disconnect","getOperations","_knownOperations","_isInit","set","operationsReceived","ready","_handleReconnectionError","data","getRoot","addOperation","Notification","sessionCreatedAt","CollaborativeEditingService","_isEditingAllowed","disconnected","start","_setPendingAction","then","setPermissions","RealTimeCollaborationClient","length","cloud-services-internal-error: Collaborative Editing Service is not connected.","_handleInitialConnectionData","createPositionAt","connect","_offset","_refreshUserSelectionMarkers","getMany","compress","sendOperations","batch","_clearPendingAction","_updateServerHistory","CommentsOnly","reconnection: flushed session","connected","editor","_isConnected","offset","type","remove","pluginName","_initSessionsHandling","version","wereChangesApplied","_setUpDataInit","parse","realtimecollaborationclient-init-connection-failed","_crash","toJSON"];var wi,Oi;wi=bi,Oi=491,function(e){for(;--e;)wi.push(wi.shift())}(++Oi);const Si=function(e,t){return bi[e-=0]};let Ei=1;class Ti extends e.Plugin{static get requires(){return[l,m,E,e.PendingActions,n.Users,r.Notification]}static get[Si("0x43")](){return Si("0x2d")}get cloudDocumentVersion(){return this[Si("0x85")]+this[Si("0x33")]}get _lastServerVersion(){return this[Si("0xb7")][Si("0x45")]-this[Si("0x33")]}get lastSyncVersion(){const e=this[Si("0xb7")].getOperations();for(let t=e[Si("0x2e")]-1;t>=0;t--){const s=e[t];if(!this._disconnectionOperations.has(s))return s[Si("0xae")]+1-this._offset}return 0}[Si("0x3")](){const e=this[Si("0x3e")],r=e[Si("0x80")][Si("0x94")](n.Users),i=e.plugins[Si("0x94")](l);if(this[Si("0x33")]=0,this.sessionId=null,this[Si("0xb7")]=new s.History,this[Si("0x3e")][Si("0x4f")][Si("0x5a")]("collaboration",{}),this[Si("0x99")]=e.config[Si("0x94")]("collaboration.channelId"),!this._channelId)throw new t.CKEditorError(Si("0xbc"),this);this[Si("0x7f")](r,"getOperationAuthor",((e,t)=>{const s=t[0];s[Si("0x84")]&&(e[Si("0xe")]=r[Si("0x4d")](s[Si("0x84")]),e.stop()),null===s[Si("0x84")]&&(e[Si("0xe")]=null,e.stop())}),{priority:Si("0x16")});const o=e.config[Si("0x94")](Si("0x82"))||t.version;this[Si("0x61")]=new(Ti[Si("0x26")])(o,this[Si("0x99")]),this[Si("0x13")]=this.editor.model[Si("0xb")],this[Si("0x11")]=new mi,this._bufferedOperations=[],this[Si("0x1b")]=new WeakSet,this[Si("0x1d")](Si("0x88"),!1),this.set(Si("0xb5"),!1),this._pendingAction=null,this[Si("0x90")]=!1,this._sendBufferedOperationsDelayId=null,this[Si("0xa6")]=300,this._currentBufferDelay=this[Si("0xa6")],this[Si("0x9c")]=null,this[Si("0x7")]=new WeakSet,this[Si("0xbb")]=new Ii(this[Si("0x7")]),this[Si("0x7f")](e[Si("0x91")][Si("0xb")][Si("0x4")],Si("0x9b"),((e,t)=>{t[Si("0x7e")]&&this._refreshUserSelectionMarkers()})),this[Si("0x7f")](e[Si("0xab")].view,Si("0x67"),(()=>{this[Si("0x34")]()})),this[Si("0x6a")](),e[Si("0x91")].on("applyOperation",((e,t)=>{const s=t[0];s[Si("0x8d")]&&(this._saveOperationInBuffer(s),this._shouldSendUpdate()&&this[Si("0xb0")]())})),this[Si("0x47")](),this.bind(Si("0x27")).to(i,"state",this,Si("0xb5"),((e,t)=>Si("0x3d")===e&&!t)),this.on(Si("0xaf"),(()=>{this[Si("0x27")]?e[Si("0xb8")](Si("0x74")):e[Si("0x68")](Si("0x74"))})),this[Si("0x27")]?e.disableReadOnlyMode(Si("0x74")):e[Si("0x68")](Si("0x74")),this[Si("0x1d")](Si("0x3f"),!1)}async reconnect(){const e=this[Si("0x3e")][Si("0x80")][Si("0x94")](m),t=this[Si("0x3e")][Si("0x80")][Si("0x94")](l);try{this[Si("0x88")]=!0,e[Si("0x72")](this[Si("0x99")]);const s=await this[Si("0x61")][Si("0x9a")](t[Si("0x6d")],this.lastSyncVersion);await this[Si("0x81")](s)&&(this[Si("0x88")]=!1,this[Si("0x39")]());const r=await this[Si("0x61")].getConnectedSessions();e[Si("0x92")](this[Si("0x99")],r),this[Si("0x51")](),this._isConnected=!0}catch(e){if(r=e,Si("0x65")===r[Si("0x59")]&&this.sessionId)await this[Si("0x4e")]();else if(s=e,Si("0x14")===s[Si("0x59")]){const e=k(this[Si("0x3e")][Si("0x60")],Si("0x7b"));this[Si("0x20")](e)}else{if(!(e instanceof ki))throw e;this[Si("0x20")]()}}var s,r}[Si("0x6b")](){const e=this[Si("0x3e")][Si("0x80")][Si("0x94")](l),t=this[Si("0x3e")][Si("0x80")][Si("0x94")](m);this[Si("0x3e")].enableReadOnlyMode(Si("0x57")),t.channelSessions[Si("0x7c")](this[Si("0x99")])&&t[Si("0x72")](this[Si("0x99")]),e.removeFromReconnectionStack(this),this[Si("0x7a")](),super[Si("0x6b")]()}async[Si("0x81")](e){if(this.sessionId!==e[Si("0x9e")]&&this[Si("0x9c")]!==e[Si("0x55")])throw new ki;return this[Si("0x9e")]=e[Si("0x9e")],this[Si("0x50")]([],{...e,wereChangesApplied:!1,data:e[Si("0x21")]},Si("0x9a"))}async[Si("0x66")](e,t=!1){const{connection:s}=this[Si("0x3e")][Si("0x80")].get(l);Ti[Si("0x26")][Si("0xa8")](s,this[Si("0x99")])[Si("0x2b")]((e=>this[Si("0x44")](e)))[Si("0xa5")]((e=>{this[Si("0x4a")](Si("0x8a"),e)})),this[Si("0x7f")](this[Si("0x61")],Si("0x1e"),this[Si("0xa2")][Si("0x6e")](this)),this[Si("0x7f")](this._service,"error",((e,t)=>{this[Si("0x4a")]("realtimecollaborationclient-initservice-internal-error",t)})),this.listenTo(this[Si("0x61")],Si("0x28"),(()=>{this[Si("0x3f")]=!1}));const r=this._operationIdentifier[Si("0x8c")](e),n=await this[Si("0x61")][Si("0x32")](s,this[Si("0xa3")](e),r);if(this[Si("0x9e")]=n[Si("0x9e")],n.wereChangesApplied&&(this._isPendingUpdate=!1,this[Si("0x39")]()),t){if(!n[Si("0x46")])return void this[Si("0x20")]();this[Si("0xb7")][Si("0xb4")](),this[Si("0x33")]=n[Si("0x40")],this[Si("0xb7")][Si("0x45")]=this[Si("0x33")],await this[Si("0x50")](e,n,Si("0x3c"))}else await this[Si("0x30")](n,e);this._handleSendingSelectionMarkers(),this._isConnected=!0}[Si("0x51")](){const e=this[Si("0x3e")][Si("0x80")][Si("0x94")](m),t=e[Si("0x17")][Si("0x94")](this[Si("0x99")]);t&&t.length>1?(this[Si("0x90")]=!0,this._sendBufferedOperationsDelayed()):this[Si("0x7f")](e,Si("0x70")+this._channelId,(t=>{e[Si("0x17")][Si("0x94")](this._channelId)[Si("0x2e")]>1&&(this[Si("0x90")]=!0,this[Si("0xb0")](),t[Si("0x71")]())}))}async _handleReceivedOperations(e,t,s,r){if(!this[Si("0x88")]&&this._document[Si("0x45")]==t){const e=this[Si("0x5c")](s,r);await this[Si("0xc")](e),this._handleExternalOperations(e,t,s[Si("0x55")])||this[Si("0x4a")]("realtimecollaborationclient-initservice-incorrect-server-operation")}}async _connectAfterSessionHasBeenFlushed(){this[Si("0x7a")]();const{locale:e}=this.editor;let t;try{t=await this._service[Si("0xb3")]()}catch(t){const s=k(e,Si("0xf"));return void this[Si("0x20")](s)}const s=t.currentDocumentSession||t[Si("0x5f")];if(this._lastSyncedOperationId===s[Si("0x55")])await this[Si("0x66")](this[Si("0x3e")][Si("0x91")][Si("0xb")][Si("0x0")][Si("0x1a")](),!0);else{const t=k(e,Si("0x58"));this[Si("0x20")](t)}}[Si("0x7a")](){this[Si("0x61")][Si("0x19")](),this[Si("0x54")]=[],clearTimeout(this[Si("0xa7")]),this[Si("0x53")](this._service)}[Si("0x44")](e){const t=this[Si("0x3e")].plugins[Si("0x94")](m);this[Si("0x7f")](t,Si("0x70")+this[Si("0x99")],((e,{session:s})=>{if(s.id===t[Si("0x75")]){e[Si("0x71")]();const t=this[Si("0x3e")][Si("0x80")][Si("0x7c")](Si("0x3b"))&&this[Si("0x3e")][Si("0x80")].get("CommentsOnly");let r=s[Si("0x69")];t&&t[Si("0x6")]&&(r=r.filter((e=>Si("0xa")!==e))),this[Si("0x3e")][Si("0x80")].get("Permissions")[Si("0x2c")](r,this._channelId)}})),t.register(this[Si("0x99")],e)}_initThrowingOnDataSet(){const e=this[Si("0x3e")][Si("0x21")].set;this[Si("0x3e")].data[Si("0x1d")]=(...s)=>{if(!s[s.length-1][Si("0x64")])throw new t.CKEditorError("realtimecollaborationclient-editor-setdata-and-editor-data-set-are-forbidden-in-real-time-collaboration",this);e[Si("0x93")](this.editor[Si("0x21")],s)}}[Si("0x47")](){this[Si("0x3e")][Si("0x21")].on(Si("0x3"),((e,[s])=>{if(this._document[Si("0x45")])throw new t.CKEditorError(Si("0x18"),this);e[Si("0xa0")](),this[Si("0x2a")]();const r=this[Si("0x79")](s);e[Si("0xe")]=this[Si("0x66")](r)[Si("0x2b")]((()=>{this[Si("0x3e")][Si("0x80")][Si("0x94")](l)[Si("0xa1")](this),this[Si("0x3e")][Si("0x21")].fire(Si("0x1f"))})).catch((e=>this[Si("0x4a")](Si("0x49"),e)))[Si("0x9")]((()=>this[Si("0x39")]()))}),{priority:Si("0x16")})}async[Si("0xc")](e){const t=this[Si("0x3e")][Si("0x80")].get(n.Users),{connection:s}=this[Si("0x3e")][Si("0x80")][Si("0x94")](l),r=new Set;for(const s of e){const e=s[Si("0x84")];e&&!t[Si("0x4d")](e)&&r.add(e)}if(0===r.size)return;const i=await gi()[Si("0x35")](s,Array.from(r));for(const e of i)t.getUser(e.id)||t.addUser(e)}[Si("0x79")](e){const r=this[Si("0x3e")][Si("0x91")],n=[];let i=0;const o="string"==typeof e?{main:e}:e;for(const e of Object[Si("0x56")](o)){if(!this[Si("0x13")][Si("0xd")][Si("0x7c")](e))throw new t.CKEditorError("realtimecollaborationclient-init-non-existent-root",this);const a=this.editor[Si("0x21")][Si("0x48")](o[e]),c=this._document[Si("0x22")](e),u=new s.InsertOperation(r[Si("0x31")](c,0),a,i++);n[Si("0x73")](u);for(const[e,t]of a[Si("0x7d")]){const o=r[Si("0xb1")](r[Si("0xb9")](c,t[Si("0x29")][Si("0xad")][Si("0xba")]()),r.createPositionFromPath(c,t[Si("0x9d")][Si("0xad")][Si("0xba")]())),a=new s.MarkerOperation(e,null,o,r[Si("0x7d")],!0,i++);n[Si("0x73")](a)}}return n}async[Si("0x30")](e,t){let s;this[Si("0x33")]=e[Si("0x40")];const r=e.wereChangesApplied&&!e[Si("0x4c")],n=r?0:e.data[Si("0xae")];if(r)s=t,s.forEach((t=>{t[Si("0x8")]=e[Si("0x25")],t[Si("0x1c")]=!0,t[Si("0x84")]=null})),this._applyOperationsSet(s,r);else{if(e[Si("0x4c")]){const t=this._getOperationsFromInitData(e[Si("0x4c")]);this[Si("0x13")][Si("0x0")][Si("0x45")]=-t[Si("0x2e")],t[Si("0xa4")]((s=>{s[Si("0xae")]-=t[Si("0x2e")],s[Si("0x8")]=e[Si("0x25")],s[Si("0x1c")]=!0,s[Si("0x84")]=null})),this[Si("0x78")](t,!0),this.serverHistory[Si("0x45")]=-t[Si("0x2e")]+this[Si("0x33")],this[Si("0x3a")](t)}this[Si("0x13")].history[Si("0x45")]=n,s=this[Si("0x5c")](e[Si("0x21")],e[Si("0x1")]),await this[Si("0xc")](s),this[Si("0x78")](s,r)}e[Si("0x55")]&&(this[Si("0xbb")][Si("0x98")](s,e.lastOperationId),this[Si("0x9c")]=e[Si("0x55")]),this.serverHistory[Si("0x45")]=n+this._offset,this[Si("0x3a")](s)}[Si("0x4a")](e,s){throw this._isPendingUpdate=!0,s&&console[Si("0x5d")](s),new t.CKEditorError(e,this[Si("0x3e")])}[Si("0x10")](e){this[Si("0x1b")][Si("0x7c")](e)||(this[Si("0x1b")][Si("0x12")](e),this[Si("0x54")][Si("0x73")](e),this._pendingAction||Si("0x83")==e.type&&!e.affectsData||this[Si("0x2a")]())}[Si("0xb0")](e=!1){!e&&this[Si("0x88")]||(this[Si("0x88")]=!0,clearTimeout(this._sendBufferedOperationsDelayId),this._sendBufferedOperationsDelayId=setTimeout((()=>{this._sendBufferedOperations()[Si("0x2b")]((e=>{e&&(this[Si("0x39")](),this[Si("0x88")]=!1)})).catch((e=>{if(this._clearPendingAction(),this[Si("0x88")]=!1,!((t=e)[Si("0x8b")][Si("0x5b")](Si("0xaa"))||t.message[Si("0x5b")](Si("0x2f"))||t[Si("0x8b")].startsWith("cloud-services-internal-error: Request timeout.")))throw e;var t}))}),this[Si("0xac")]))}async _sendBufferedOperations(){const e=this[Si("0x3e")][Si("0x80")].get(E);if(this[Si("0x87")]()&&(e[Si("0x8f")](),this[Si("0x90")]=!1),!this[Si("0x97")]())return!0;const t=[...this._bufferedOperations];for(const e of t)e[Si("0x6f")]=this[Si("0x13")][Si("0x0")].isUndoneOperation(e);const s=this[Si("0xbb")][Si("0x8c")](t),r=Ei++,n=this[Si("0xa3")](t),i=await this[Si("0x61")][Si("0x37")](n,n[Si("0xae")],s);try{return await this._handleServerResponse(t,i,r)}catch(e){return this[Si("0x4a")](Si("0x89"),e)}}async _handleServerResponse(e,t,s){if(t[Si("0x5d")])throw t[Si("0x5d")];let r=!1;if(t[Si("0x46")]){t[Si("0x55")]&&(this[Si("0x9c")]=t.lastOperationId),this[Si("0x54")]=this._bufferedOperations[Si("0x8e")]((t=>!e[Si("0xb2")](t)));for(const s of e)s[Si("0x8")]=t.lastOperationAcceptedAt;this._updateServerHistory(e),r=!0,this._currentBufferDelay=this[Si("0xa6")]}else{const e=this[Si("0x5c")](t.data,t.metadata)[Si("0x8e")]((e=>e[Si("0xae")]>=this[Si("0x85")]));await this[Si("0xc")](e),r=this._handleExternalOperations(e,t.version,t.lastOperationId),this._currentBufferDelay=Math[Si("0x96")](this._currentBufferDelay/2)}return r?!this._shouldSendUpdate()||(this._sendBufferedOperationsDelayed(!0),!1):this._crash(Si("0x63"))}_handleExternalOperations(e,t,r){try{const n={document:this[Si("0x13")],useRelations:!1,padWithNoOps:!0},{operationsA:i,operationsB:o,originalOperations:a}=(0,s.transformSets)(e,this[Si("0x54")],n);Ci(i,this[Si("0x13")].version),Ci(o,t);for(const e of i){const t=a[Si("0x94")](e);e[Si("0x84")]=t?t._authorId:null}r&&(this[Si("0xbb")].setIdForTheLastOperation(e,r),this[Si("0x9c")]=r),this[Si("0x54")]=[...o],this[Si("0x78")](i),this[Si("0x3a")](e)}catch(e){return console[Si("0x5d")](e),!1}return!0}[Si("0x78")](e,t=!1){this.editor[Si("0x91")].enqueueChange({isUndoable:!1,isLocal:!1},(t=>{for(const s of e)this[Si("0x1b")][Si("0x12")](s),t[Si("0x38")][Si("0x23")](s),this[Si("0x3e")].model[Si("0x95")](s)}))}_updateServerHistory(e){e[Si("0xa4")]((e=>{const t=e.clone();t[Si("0x84")]=e[Si("0x84")],t[Si("0x1c")]=!!e[Si("0x1c")],t[Si("0x8")]=e[Si("0x8")],t.baseVersion+=this[Si("0x33")],e[Si("0x86")]&&this[Si("0x7")][Si("0x12")](t),this[Si("0xb7")][Si("0x23")](t)}))}[Si("0x20")](e){const t=this[Si("0x3e")][Si("0x80")][Si("0x94")](Si("0x24")),s=this[Si("0x3e")].locale;e||(e=k(s,Si("0x6c"))),t.showWarning(e,{title:k(s,Si("0x5e")),namespace:"real-time-collaboration"}),this[Si("0xb5")]=!0,clearTimeout(this[Si("0xa9")]),this[Si("0x54")]=[],this[Si("0x3e")][Si("0x80")][Si("0x94")](l)[Si("0x6b")]()}[Si("0x2a")](){this._pendingAction||(this._pendingAction=this[Si("0x3e")][Si("0x80")][Si("0x94")](e.PendingActions)[Si("0x12")](k(this[Si("0x3e")][Si("0x60")],Si("0x15"))))}[Si("0x39")](){this[Si("0x5")]&&(this[Si("0x3e")].plugins[Si("0x94")](e.PendingActions)[Si("0x42")](this._pendingAction),this[Si("0x5")]=null)}[Si("0xa3")](e){const t=e[Si("0x52")]((e=>e[Si("0x4b")]()));return this[Si("0x11")][Si("0x36")](t)}[Si("0x5c")](e,t){const r=this[Si("0x11")].decompress(e).map(((e,r)=>{const n=s.OperationFactory.fromJSON(e,this[Si("0x13")]);return n[Si("0x6f")]=e[Si("0x6f")],Si("0x2")===t[r][Si("0x41")]&&(n[Si("0x86")]=!0),n}));return this._assignOperationsMetaData(r,t),r}[Si("0x76")](e,t){for(let s=0;s<e[Si("0x2e")];s++)Si("0x3")==t[s][Si("0x41")]?(e[s]._isInit=!0,e[s][Si("0x84")]=null):(e[s][Si("0x1c")]=!1,e[s]._authorId=t[s][Si("0x77")]),e[s][Si("0x8")]=t[s][Si("0x8")]}[Si("0x34")](){this[Si("0x90")]=!0,this[Si("0x87")]()&&this[Si("0xb0")]()}[Si("0x87")](){const e=this.editor[Si("0x80")].get(m).channelSessions[Si("0x94")](this[Si("0x99")]);return!this[Si("0x3e")][Si("0x9f")]&&e&&e[Si("0x2e")]>1&&this._hasSelectionChanged}[Si("0x97")](){return this[Si("0x54")][Si("0x2e")]>0||this[Si("0x87")]()}}class ki extends Error{}function Ci(e,t){for(const s of e)s[Si("0xae")]=t++}Ti[Si("0x26")]=xi();class Ii{constructor(e){this[Si("0x62")]=e,this[Si("0xb6")]=new WeakMap}[Si("0x8c")](e){let s=e[Si("0x2e")];for(;s--;){const r=e[s];if(!this[Si("0x62")][Si("0x7c")](r)){if(!this[Si("0xb6")][Si("0x7c")](r)){const e=(0,t.uid)()[Si("0xba")](1,18);this[Si("0xb6")][Si("0x1d")](r,e)}return this[Si("0xb6")][Si("0x94")](r)}}}[Si("0x98")](e,t){if(!t)return;let s=e[Si("0x2e")];for(;s--;){const r=e[s];this[Si("0x62")][Si("0x7c")](r)||this._operationToId[Si("0x1d")](r,t)}}}var Ai,Ri,Ni=["requires","RealTimeCollaborativeEditing","pluginName"];Ai=Ni,Ri=207,function(e){for(;--e;)Ai.push(Ai.shift())}(++Ri);var ji=function(e,t){return Ni[e-=0]};class Pi extends e.Plugin{static get[ji("0x0")](){return[Ti]}static get[ji("0x2")](){return ji("0x1")}}var Di=__webpack_require__(125),Mi=__webpack_require__.n(Di),Bi=__webpack_require__(6042),Ji=__webpack_require__.n(Bi);const Ui=["hasCommentThread","update","_setUpService","code","startsWith","permissions","unregister","setPermissions","comments","_terminateService","destroy","map","has","CommentsRepository","updateComment","commentRemoved","cloud-services-internal-error: Comments Service is not connected.","removeComment","cloud-services-internal-error: Not connected.","cloudservicescommentsadapter-disconnect-not-exist","collaboration.channelId","config","commentId","_getService","commentThreadId","register","addComment","getComment","getMany","mySessionId","commentUpdated","delete","Permissions","set","attributes","from","_services","addUser","context","addCommentThread","commentAdded","_fetchMissingUsersForThreads","keys","sessionAdd:","size","addToReconnectionStack","connect","off","get","cloudservicescommentsadapter-service-not-exist","cloudservicescommentsadapter-connect-already-connected","CommentsService","plugins","catch","listenTo","_connectService","removeCommentThread","requires","content","add","message","getCommentThread","getCommentThreads","cloud-services-internal-error: Request timeout.","assign","remove","adapter","getConnectedSessions","getUser","reconnect"];var Vi,Fi;Vi=Ui,Fi=203,function(e){for(;--e;)Vi.push(Vi.shift())}(++Fi);const qi=function(e,t){return Ui[e-=0]};class Li extends e.ContextPlugin{static get[qi("0x40")](){return[l,"CommentsRepository",m,n.Users]}constructor(e){super(e),this[qi("0x2b")]=new Map}async init(){const t=this.context,s=t[qi("0x3b")].get(qi("0x14"));if(t[qi("0x3b")].get(l)[qi("0x34")](this),s[qi("0x3")]={getCommentThread:async({channelId:e,threadId:t})=>{const s=await this[qi("0x1e")](e)[qi("0x44")](t)[qi("0x3c")](zi);return await this[qi("0x30")]([s]),{threadId:s.commentThreadId,comments:s[qi("0xf")][qi("0x12")](Gi)}},removeCommentThread:({channelId:e,threadId:t})=>this[qi("0x1e")](e)[qi("0x3f")](t)[qi("0x3c")](Yi)[qi("0x3c")](zi),addComment:({channelId:e,threadId:t,commentId:s,content:r,attributes:n})=>this._getService(e)[qi("0x21")](t,s,r,n)[qi("0x3c")](zi),updateComment:({channelId:e,threadId:t,commentId:s,content:r,attributes:n})=>this[qi("0x1e")](e)[qi("0x15")](t,s,r,n)[qi("0x3c")](Yi).catch(zi),removeComment:({channelId:e,threadId:t,commentId:s})=>this[qi("0x1e")](e)[qi("0x18")](t,s)[qi("0x3c")](Yi)[qi("0x3c")](zi)},t instanceof e.Context){const e=t[qi("0x1c")][qi("0x37")](qi("0x1b")),s=t[qi("0x3b")][qi("0x37")](m);await this._setUpService(e);const r=await this[qi("0x2b")].get(e)[qi("0x4")]();this[qi("0x3d")](s,qi("0x32")+e,((t,{session:r})=>{r.id===s[qi("0x24")]&&(t[qi("0x36")](),this[qi("0x2d")][qi("0x3b")][qi("0x37")](qi("0x27"))[qi("0xe")](r[qi("0xc")],e))})),s[qi("0x20")](e,r)}}async[qi("0x9")](e){if(this[qi("0x2b")][qi("0x13")](e))throw new t.CKEditorError(qi("0x39"),null,{channelId:e});const s=this[qi("0x2d")].plugins[qi("0x37")](qi("0x14")),r=new Li.CommentsService(e);this._services[qi("0x28")](e,r),this[qi("0x3d")](r,"commentThreadRemoved",((e,{commentThreadId:t})=>{const r=s[qi("0x44")](t);r&&r.remove({isFromAdapter:!0})})),this.listenTo(r,qi("0x2f"),((t,r)=>{const n=r[qi("0x1f")];s[qi("0x7")](n)||s.addCommentThread({channelId:e,threadId:n,isFromAdapter:!0});const i=s.getCommentThread(n);i&&i.addComment(Object[qi("0x1")](Gi(r),{isFromAdapter:!0}))})),this.listenTo(r,qi("0x25"),((e,{commentThreadId:t,commentId:r,content:n,attributes:i})=>{const o=s[qi("0x44")](t);if(o){const e=o[qi("0x22")](r);e&&e.update({content:n,attributes:i,isFromAdapter:!0})}})),this[qi("0x3d")](r,qi("0x16"),((e,{commentThreadId:t,commentId:r})=>{const n=s[qi("0x44")](t);if(n){const e=n.getComment(r);e&&e[qi("0x2")]({isFromAdapter:!0})}})),await this[qi("0x3e")](e)}[qi("0x11")](){if(this.context instanceof e.Context){const e=this[qi("0x2d")].config.get("collaboration.channelId");this[qi("0x10")](e)}}[qi("0x10")](e){if(!this[qi("0x2b")][qi("0x13")](e))throw new t.CKEditorError(qi("0x1a"),null,{channelId:e});this[qi("0x1e")](e).disconnect(),this[qi("0x2b")].delete(e)}async[qi("0x6")](){for(const e of this[qi("0x2b")][qi("0x31")]())await this[qi("0x3e")](e);if(this.context instanceof e.Context){const e=this[qi("0x2d")][qi("0x1c")][qi("0x37")]("collaboration.channelId"),t=this[qi("0x2d")].plugins[qi("0x37")](m);t[qi("0xd")](e);const s=await this._services[qi("0x37")](e)[qi("0x4")]();t.register(e,s)}}async[qi("0x3e")](e){const{connection:t}=this[qi("0x2d")][qi("0x3b")][qi("0x37")](l),s=this[qi("0x2d")].plugins[qi("0x37")](qi("0x14")),r=this[qi("0x2b")].get(e),n=await r[qi("0x35")](t);await this[qi("0x30")](n);const i=new Set(Array[qi("0x2a")](s[qi("0x45")]({channelId:e}),(e=>e.id)));for(const e of n)i.delete(e[qi("0x1f")]);for(const e of i)s[qi("0x44")](e)[qi("0x2")]({isFromAdapter:!0});for(const t of n){let r=s[qi("0x44")](t[qi("0x1f")]);r||(r=s[qi("0x2e")]({channelId:e,threadId:t[qi("0x1f")],isFromAdapter:!0}));const n=new Set(Array[qi("0x2a")](r[qi("0xf")],(e=>e.id)));for(const e of t.comments)n[qi("0x26")](e[qi("0x1d")]);for(const e of n)r[qi("0x22")](e)[qi("0x2")]({isFromAdapter:!0});for(const e of t[qi("0xf")]){const t=r[qi("0x22")](e.commentId);t?t[qi("0x41")]!==e[qi("0x41")]&&t[qi("0x8")]({content:e[qi("0x41")],isFromAdapter:!0}):r.addComment(Object[qi("0x1")](Gi(e),{isFromAdapter:!0}))}}}[qi("0x1e")](e){if(!this[qi("0x2b")][qi("0x13")](e))throw new t.CKEditorError(qi("0x38"),null,{channelId:e});return this[qi("0x2b")][qi("0x37")](e)}async[qi("0x30")](e){const t=this[qi("0x2d")][qi("0x3b")].get(n.Users),{connection:s}=this[qi("0x2d")].plugins[qi("0x37")](l),r=new Set;for(const{comments:s}of e)for(const{userId:e}of s)t[qi("0x5")](e)||r[qi("0x42")](e);if(0===r[qi("0x33")])return;const i=await gi()[qi("0x23")](s,Array[qi("0x2a")](r));for(const e of i)t[qi("0x5")](e.id)||t[qi("0x2c")](e)}}async function Yi(e){if("404"!==e[qi("0xa")])throw e}function zi(e){if((t=e).message[qi("0xb")](qi("0x17"))||t[qi("0x43")][qi("0xb")](qi("0x19"))||t.message.startsWith(qi("0x0")))return new Promise((()=>{}));var t;throw e}function Gi(e){return{threadId:e[qi("0x1f")],commentId:e[qi("0x1d")],content:e.content,createdAt:e.createdAt,authorId:e.userId,attributes:e[qi("0x29")]}}Li[qi("0x3a")]=Ji();const $i=["originalSuggestionId","state","addUser","connected","cloud-services-internal-error: Request timeout.","reconnect","update","_waitForServiceReady","values","set","editor","connection","attributes","add","delete","suggestionUpdated","plugins","catch","get","find","addSuggestionData","collaboration.channelId","connect","getUser","then","_bufferedRequests","TrackChangesEditing","getSuggestion","type","from","adapter","message","requires","listenTo","getMany","config","cloud-services-internal-error: Not connected.","data","_fetchMissingUsersForThreads","addToReconnectionStack","startsWith","_trackChangesService"];var Wi,Hi;Wi=$i,Hi=369,function(e){for(;--e;)Wi.push(Wi.shift())}(++Hi);const Ki=function(e,t){return $i[e-=0]};class Zi extends e.Plugin{static get[Ki("0x29")](){return[Li,Ki("0x23"),l]}constructor(e){super(e),this._bufferedRequests=new Map}init(){const e=this[Ki("0x13")][Ki("0x19")][Ki("0x1b")](l),t=this[Ki("0x13")][Ki("0x19")][Ki("0x1b")]("TrackChangesEditing"),s=this[Ki("0x13")][Ki("0x2")].get(Ki("0x1e"));return this._trackChangesService=new Zi.TrackChangesService(s),t[Ki("0x27")]={getSuggestion:async e=>{await this[Ki("0x10")]();const t=await this[Ki("0x8")][Ki("0x1b")](e)[Ki("0x1a")](Xi);return await this._fetchMissingUsersForThreads([t]),t},addSuggestion:async({id:e,type:t,data:s,originalSuggestionId:r,attributes:n})=>{await this[Ki("0x10")]();const i={id:e,type:t,data:s,originalSuggestionId:r,attributes:n},o=await this[Ki("0x8")].add(e,t,s,r,n)[Ki("0x1a")]((t=>{if(Qi(t))return new Promise((t=>{this[Ki("0x22")][Ki("0x12")](e,{resolve:t,suggestionData:i})}));throw t}));return this[Ki("0x22")][Ki("0x17")](e),o},updateSuggestion:async(e,t)=>{if(await this[Ki("0x10")](),"open"!==t[Ki("0xa")])return this[Ki("0x8")][Ki("0xf")](e,t)[Ki("0x1a")](Xi)}},this.listenTo(this[Ki("0x8")],Ki("0x18"),((e,s)=>{t.hasSuggestion(s.id)&&(t[Ki("0x24")](s.id).attributes=s[Ki("0x15")])})),this._trackChangesService[Ki("0x1f")](e[Ki("0x14")])[Ki("0x21")]((s=>(e[Ki("0x6")](this),this[Ki("0x5")](s)[Ki("0x21")]((()=>{for(const e of s)t[Ki("0x1d")](e)._saved=!0})))))}async[Ki("0xe")](){const e=this[Ki("0x13")][Ki("0x19")].get(Ki("0x23")),{connection:t}=this[Ki("0x13")].plugins.get(l),s=await this._trackChangesService[Ki("0x1f")](t);await this[Ki("0x5")](s);for(const{suggestionData:e,resolve:t}of this._bufferedRequests[Ki("0x11")]()){let r=s[Ki("0x1c")]((t=>t.id===e.id));r||(r=await this[Ki("0x8")][Ki("0x16")](e.id,e[Ki("0x25")],e[Ki("0x4")],e[Ki("0x9")])),t(r)}for(const t of s)e.hasSuggestion(t.id)||e[Ki("0x1d")](t)}async[Ki("0x10")](){this[Ki("0x8")].isConnected||await new Promise((e=>{this[Ki("0x0")](this[Ki("0x8")],Ki("0xc"),(t=>{t.off(),e()}))}))}async[Ki("0x5")](e){const t=this.editor.plugins[Ki("0x1b")](n.Users),{connection:s}=this[Ki("0x13")].plugins[Ki("0x1b")](l),r=new Set;for(const{authorId:s}of e)t.getUser(s)||r.add(s);if(0===r.size)return;const i=await gi()[Ki("0x1")](s,Array[Ki("0x26")](r));for(const e of i)t[Ki("0x20")](e.id)||t[Ki("0xb")](e)}}function Xi(e){if(Qi(e))return new Promise((()=>{}));throw e}function Qi(e){return e[Ki("0x28")][Ki("0x7")](Ki("0x3"))||e.message[Ki("0x7")](Ki("0xd"))}Zi.TrackChangesService=Mi();const eo=["Comments","CommentsEditing","editor","switchReadOnly","change:state","get","collaboration.channelId","plugins","isThreadsLoadingPaused","once","connected","config","CommentsRepository","RealTimeCollaborativeComments","pluginName","requires","ready","destroy","_terminateService","listenTo"];var to,so;to=eo,so=211,function(e){for(;--e;)to.push(to.shift())}(++so);const ro=function(e,t){return eo[e-=0]};class no extends e.Plugin{static get[ro("0x4")](){return[ro("0x9"),Li,Pi,l]}static get[ro("0x3")](){return ro("0x2")}init(){const e=this[ro("0xb")].plugins[ro("0xe")](l),t=this[ro("0xb")][ro("0x10")][ro("0xe")](ro("0xa")),s=this[ro("0xb")].plugins[ro("0xe")](Li);return this[ro("0xb")].data[ro("0x12")](ro("0x5"),(()=>{this[ro("0x8")](e,ro("0xd"),((e,s,r)=>{t[ro("0x11")]=ro("0x13")!==r}))})),this[ro("0x8")](e,ro("0xd"),((e,t,s)=>{this[ro("0xb")][ro("0x10")][ro("0xe")](ro("0x1"))[ro("0xc")]("connected"!==s)})),s._setUpService(this.editor[ro("0x0")].get(ro("0xf")))}[ro("0x6")](){this[ro("0xb")].plugins[ro("0xe")](Li)[ro("0x7")](this[ro("0xb")][ro("0x0")].get(ro("0xf"))),super[ro("0x6")]()}}var io,oo,ao=["pluginName","TrackChanges"];io=ao,oo=187,function(e){for(;--e;)io.push(io.shift())}(++oo);var co=function(e,t){return ao[e-=0]};class uo extends e.Plugin{static get requires(){return[no,Zi,co("0x0")]}static get[co("0x1")](){return"RealTimeCollaborativeTrackChanges"}}var lo=__webpack_require__(8811),ho=__webpack_require__.n(lo),fo=__webpack_require__(8689),po=__webpack_require__.n(fo);const yo=["cloud-services-internal-error: Request timeout.","_fetchMissingUsers","init","message","config","getOperations","state","_revisionTracker","catch","startsWith","off","adapter","keys","_lastRequestId","RevisionTracker","Users","from","_preventResendingRevisionData","listenTo","setRevisionData","has","addUser","then","_update","map","_revisionHistoryService","serverHistory","revisionsUpdated","sessionId","authorsIds","_isConnected","_handleReconnectionError","getRevisions","creatorId","isEnabled","data","connected","createdAt","stopListening","plugins","getUser","getMany","once","authors","add","length","_oldOffset","_fixRevision","addRevisionData","bind","repository","fromVersion","reInit","setSource","isEmptyCurrent","change:_isConnected","remove","_getLatestVersion","_offset","connection","toVersion","type","_createCurrentRevision","cloud-services-internal-error: Not connected.","affectsData","buildRevisionData","_handleRevisionsUpdate","max","RevisionHistoryService","_getLatestVersionFromServerOperations","size","_bufferUpdate","editor","updateRevisions","getRevision","get","reverse","_waitForServiceReady","sendBufferedUpdates","code","_domEmitter","collaboration.channelId","currentRevision","_revisions","cloud-services-internal-error: Revision History Service is not connected.","requires"];var mo,vo;mo=yo,vo=182,function(e){for(;--e;)mo.push(mo.shift())}(++vo);const xo=function(e,t){return yo[e-=0]};class _o extends e.Plugin{static get[xo("0x4b")](){return[l,Ti,xo("0x4"),m,n.Users]}async[xo("0x4e")](){this[xo("0x3")]=null,this[xo("0x53")]=this[xo("0x3e")][xo("0x1d")].get(xo("0x4"));const e=this[xo("0x3e")].plugins[xo("0x41")](Ti),s=e[xo("0x10")],r=this.editor.plugins[xo("0x41")](l),n=this[xo("0x3e")][xo("0x50")][xo("0x41")](xo("0x47"));this[xo("0xf")]=new _o.RevisionHistoryService(n),this[xo("0x53")][xo("0x2b")]({history:s,getLatestVersion:()=>this[xo("0x2f")](),getCurrentRevisionId:()=>e[xo("0x12")]});const i=this[xo("0x3e")][xo("0x50")][xo("0x41")]("cloudServices.bundleVersion")||t.version,o=await po().isBundleUploaded(r[xo("0x31")],i);this._revisionTracker[xo("0x1")]={getRevision:async({revisionId:e})=>(await this._waitForServiceReady(),await this[xo("0xf")][xo("0x40")](e)),updateRevisions:async e=>{await this[xo("0x43")]();const t=this._revisionTracker[xo("0x48")];if(!o||1!==e[xo("0x23")]||e[0].id!==t.id){for(const s of e)s.id===t.id&&(s[xo("0x2c")]=s.fromVersion===s.toVersion);return this[xo("0xf")][xo("0x3f")](e,this[xo("0x3")])[xo("0xc")]((e=>{this[xo("0x3")]=e})).catch((t=>{if(!(go(t)||"400"===t[xo("0x45")]&&void 0!==t[xo("0x19")].wrongRequestId))throw t;for(const t of e)!this[xo("0x53")].repository[xo("0x40")](t.id)||this[xo("0x53")]._bufferUpdate(t.id,t,!1);if(go(t))throw t}))}}},this[xo("0x8")](this[xo("0xf")],xo("0x11"),((e,{revisionsData:t,requestId:s})=>{Math[xo("0x39")](...t[xo("0xe")]((e=>e[xo("0x32")])))>this[xo("0x3b")]()-1?this._getLatestVersion()[xo("0xc")]((()=>{this[xo("0x38")](t,s)})):this._handleRevisionsUpdate(t,s)}));const{revisions:a,requestId:c}=await this[xo("0xf")].connect(r.connection);r.addToReconnectionStack(this),this[xo("0x3")]=c,await this[xo("0x4d")](a);for(const e of a)this._revisionTracker.addRevisionData(e);this[xo("0x8")](e,"change:_isConnected",((t,s,r)=>{r&&(this[xo("0x24")]=e[xo("0x30")],t[xo("0x0")]())})),this._revisionTracker[xo("0x27")](xo("0x18")).to(r,xo("0x52"),(e=>xo("0x1a")===e))}async reconnect(){const e=this[xo("0x3e")][xo("0x1d")][xo("0x41")](l),t=this[xo("0x3e")].plugins[xo("0x41")](Ti),s=async()=>{const s=this[xo("0x53")][xo("0x48")],r=s.id,n=r!==t[xo("0x12")];if(n){const e=t[xo("0x30")]-this[xo("0x24")],n=this[xo("0x3b")]();if(this[xo("0x53")]._revisionDataBuilder[xo("0x2a")](),s[xo("0x32")]+e!==n){const t=s[xo("0x29")]+e,r=this[xo("0x3e")][xo("0x1d")][xo("0x41")]("Users"),i=this._revisionTracker[xo("0x37")]({currentRevision:s,from:t,to:n});i.id=s.id;const o=i[xo("0x13")][xo("0xe")]((e=>r[xo("0x1e")](e)));s[xo("0xd")]({...i,authors:o},!0),this[xo("0x53")][xo("0x3d")](s.id,i,!0)}this._revisionTracker._startingVersion=n,s[xo("0x32")]===s.fromVersion&&!this[xo("0x53")]._bufferedUpdates[xo("0xa")](r)&&this._revisionTracker.repository[xo("0x49")][xo("0x2e")](r),this._revisionTracker[xo("0x34")](n)}const{revisions:i,requestId:o}=await this._revisionHistoryService.reconnect(e[xo("0x31")],this[xo("0x3")]);n&&i[xo("0x23")]>0?t[xo("0x15")]():(await this[xo("0x4d")](i),this[xo("0x38")](i,o),this[xo("0x53")][xo("0x44")]())};return t[xo("0x14")]?s():new Promise(((e,r)=>{t[xo("0x20")](xo("0x2d"),(()=>{s()[xo("0xc")](e)[xo("0x54")](r)}))}))}destroy(){this[xo("0x46")]&&this[xo("0x46")][xo("0x1c")](),super.destroy()}async[xo("0x43")](){this[xo("0xf")].isConnected||await new Promise((e=>{this[xo("0x8")](this[xo("0xf")],xo("0x1a"),(t=>{t.off(),e()}))}))}[xo("0x3b")](){const e=this[xo("0x3e")][xo("0x1d")][xo("0x41")](Ti)[xo("0x10")];for(const t of e[xo("0x51")]()[xo("0x42")]())if("marker"!==t[xo("0x33")]||t[xo("0x36")])return t.baseVersion+1}[xo("0x2f")](){const e=this[xo("0x3e")][xo("0x1d")].get(Ti);return new Promise((t=>{e._isPendingUpdate?e[xo("0x20")]("change:_isPendingUpdate",(()=>{t(this[xo("0x3b")]())})):t(this._getLatestVersionFromServerOperations())}))}[xo("0x38")](e,t){const s=this[xo("0x53")][xo("0x28")];this[xo("0x3")]=t;for(const t of e){const e=s[xo("0x40")](t.id);if(e){if((t.fromVersion||t[xo("0x32")])&&(t.diffData=null),e===this[xo("0x53")].currentRevision){const s=Math[xo("0x39")](e[xo("0x32")],t[xo("0x32")]),r=Math[xo("0x39")](e.fromVersion,t[xo("0x29")]);let n;e.toVersion===t.toVersion&&e.fromVersion===t[xo("0x29")]?(n=!0,this[xo("0x7")](t)):t[xo("0x32")]===s&&t[xo("0x29")]===r?n=!1:(e.toVersion===s&&e[xo("0x29")]===r||this._fixRevision({revision:e,from:r,to:s}),n=!0),n&&(delete t[xo("0x29")],delete t[xo("0x32")],delete t.diffData,delete t[xo("0x1b")],delete t[xo("0x13")])}this[xo("0x53")][xo("0x9")](t),this[xo("0x7")](t)}else this[xo("0x53")][xo("0x26")](t)}const r=s[xo("0x16")]();r.reverse();for(let e=0;e<r[xo("0x23")]-1;e++){const t=r[e],s=r[e+1];if(t[xo("0x29")]<s.toVersion){const e=s.toVersion,r=Math[xo("0x39")](e,t[xo("0x32")]);this[xo("0x25")]({revision:t,from:e,to:r})}}}[xo("0x25")]({revision:e,from:t,to:s}={}){const r=this[xo("0x3e")][xo("0x1d")][xo("0x41")](xo("0x5")),n=this[xo("0x53")][xo("0x37")]({revision:e,from:t,to:s});n[xo("0x21")]=n.authorsIds[xo("0xe")]((e=>r[xo("0x1e")](e))),e[xo("0xd")](n)}[xo("0x7")](e){const t={};t.id=e.id;for(const s of Object[xo("0x2")](e))"id"!==s&&(t[s]=void 0);this[xo("0x53")]._bufferUpdate(t.id,t,!0)}async[xo("0x4d")](e){const t=this.editor[xo("0x1d")][xo("0x41")](n.Users),{connection:s}=this[xo("0x3e")].plugins[xo("0x41")](l),r=new Set;for(const t of e){for(const e of t.authorsIds)o(e);t[xo("0x17")]&&o(t[xo("0x17")])}if(0===r[xo("0x3c")])return;const i=await gi()[xo("0x1f")](s,Array[xo("0x6")](r));for(const e of i)t[xo("0x1e")](e.id)||t[xo("0xb")](e);function o(e){t.getUser(e)||r[xo("0x22")](e)}}}function go(e){return e.message.startsWith(xo("0x4a"))||e[xo("0x4f")][xo("0x55")](xo("0x35"))||e[xo("0x4f")].startsWith(xo("0x4c"))}_o[xo("0x3a")]=ho();var bo,wo,Oo=["RealTimeCollaborativeRevisionHistory","RevisionHistory","requires","pluginName"];bo=Oo,wo=372,function(e){for(;--e;)bo.push(bo.shift())}(++wo);var So=function(e,t){return Oo[e-=0]};class Eo extends e.Plugin{static get[So("0x2")](){return[So("0x1"),_o,Pi]}static get[So("0x3")](){return So("0x0")}}var To=Function.prototype,ko=Object.prototype,Co=To.toString,Io=ko.hasOwnProperty,Ao=Co.call(Object);const Ro=function(e){if(!Ke(e)||"[object Object]"!=se(e))return!1;var t=Ht(e);if(null===t)return!0;var s=Io.call(t,"constructor")&&t.constructor;return"function"==typeof s&&s instanceof s&&Co.call(s)==Ao};const No=function(e){return Ke(e)&&1===e.nodeType&&!Ro(e)},jo=["bindTemplate","usersCount","ck-presence-list__counter","setTemplate","div","set"];var Po,Do;Po=jo,Do=306,function(e){for(;--e;)Po.push(Po.shift())}(++Do);const Mo=function(e,t){return jo[e-=0]};class Bo extends r.View{constructor(e){super(e);const t=this[Mo("0x0")];this[Mo("0x5")](Mo("0x1"),0),this.set("isHidden",!0),this[Mo("0x3")]({tag:Mo("0x4"),attributes:{class:["ck",Mo("0x2"),t.if("isHidden","ck-presence-list__counter--hidden")]},children:[{text:t.to(Mo("0x1"),(t=>k(e,"CONNECTED_USERS",t)))}]})}}const Jo=["bindTemplate","ck-presence-list__list","createCollection","items","fire","setTemplate","div"];var Uo,Vo;Uo=Jo,Vo=121,function(e){for(;--e;)Uo.push(Uo.shift())}(++Vo);const Fo=function(e,t){return Jo[e-=0]};class qo extends r.View{constructor(e){super(e),this[Fo("0x1")]=this[Fo("0x0")]();const t=this[Fo("0x5")];this[Fo("0x3")]({tag:Fo("0x4"),attributes:{class:["ck",Fo("0x6")]},children:this[Fo("0x1")],on:{click:t.to((()=>this[Fo("0x2")]("execute")))}})}}var Lo=__webpack_require__(3286),Yo={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};x()(Lo.Z,Yo);Lo.Z.locals;const zo=["isCollapsed","listenTo","counterView","ck-rounded-corners","items","tooltipPosition","change","bindTemplate","setTemplate","locale","div","ck-presence-list--collapsed","inlineListView","ck-reset"];var Go,$o;Go=zo,$o=298,function(e){for(;--e;)Go.push(Go.shift())}(++$o);const Wo=function(e,t){return zo[e-=0]};class Ho extends r.View{constructor(e){super(e);const t=this[Wo("0x3")];this.set(Wo("0xa"),!0),this[Wo("0xc")]=new Bo(this[Wo("0x5")]),this[Wo("0x8")]=new qo(e),this[Wo("0xb")](this[Wo("0x8")].items,Wo("0x2"),(()=>{for(const e of this.inlineListView[Wo("0x0")])e[Wo("0x1")]="s";this[Wo("0x8")][Wo("0x0")].first&&(this[Wo("0x8")][Wo("0x0")].first[Wo("0x1")]="se")})),this[Wo("0x4")]({tag:Wo("0x6"),attributes:{class:["ck","ck-presence-list",Wo("0x9"),Wo("0xd"),t.if(Wo("0xa"),Wo("0x7"))]},children:[this[Wo("0xc")],this.inlineListView]})}}var Ko,Zo,Xo=["items","ck-presence-list__dropdown-list","ck-presence-list__dropdown-list-wrapper","div","setTemplate","createCollection"];Ko=Xo,Zo=298,function(e){for(;--e;)Ko.push(Ko.shift())}(++Zo);var Qo=function(e,t){return Xo[e-=0]};class ea extends r.View{constructor(e){super(e),this[Qo("0x2")]=this[Qo("0x1")](),this[Qo("0x0")]({tag:Qo("0x5"),attributes:{class:["ck",Qo("0x3")]},children:[{tag:Qo("0x5"),attributes:{class:["ck",Qo("0x4")]},children:this[Qo("0x2")]}]})}}const ta=["span","ck-user__full-name","fire","tag","setTemplate","execute","userView","name","color","ck-presence-list__dropdown-list-item","getBackgroundColorClass"];var sa,ra;sa=ta,ra=213,function(e){for(;--e;)sa.push(sa.shift())}(++ra);const na=function(e,t){return ta[e-=0]};class ia extends r.View{constructor(e,t,s){super(e);const r=this.bindTemplate;this[na("0x2")]=new n.UserView(e,t);const i={tag:"div",attributes:{class:["ck",na("0x5")]},children:[this[na("0x2")],{tag:na("0x7"),attributes:{class:["ck",na("0x8")]},children:[{text:t[na("0x3")]}]},{tag:na("0x7"),attributes:{class:["ck","ck-presence-list__marker",t[na("0x4")][na("0x6")]()],"aria-hidden":"true"}}]};s&&(i[na("0xa")]="button",i.on={click:r.to((()=>this[na("0x9")](na("0x1"))))}),this[na("0x0")](i)}}const oa=["ck-presence-list__list-item__tooltip","hasTooltip","ck-presence-list__list-item","fire","execute","getBackgroundColorClass","setTemplate","tooltipPosition","markerView","userView","div","tag","button","color"];var aa,ca;aa=oa,ca=207,function(e){for(;--e;)aa.push(aa.shift())}(++ca);const ua=function(e,t){return oa[e-=0]};class da extends r.View{constructor(e,t,s){super(e);const r=this.bindTemplate;this.set(ua("0x4"),!0),this.set(ua("0xa"),""),this[ua("0xc")]=new n.UserView(e,t),this[ua("0xb")]=new la(e,t);const i={tag:ua("0xd"),attributes:{class:["ck",ua("0x5")],"data-cke-tooltip-text":this.userView.name,"data-cke-tooltip-position":r.to(ua("0xa")),"data-cke-tooltip-disabled":r.to("hasTooltip",(e=>!e)),"data-cke-tooltip-class":ua("0x3")},children:[this[ua("0xc")],this[ua("0xb")]]};s&&(i[ua("0x0")]=ua("0x1"),i.on={click:r.to((()=>this[ua("0x6")](ua("0x7"))))}),this[ua("0x9")](i)}}class la extends r.View{constructor(e,t){super(e),this[ua("0x9")]({tag:"span",attributes:{class:["ck","ck-presence-list__marker",t[ua("0x2")][ua("0x8")]()],"aria-hidden":"true"}})}}const ha=["content","render","counterView","bodyCollection","_handleUserRemove","usersCount","set","presenceList","hideDropdown","locale","reverse","isCollapsed","appendChild","onClick","unpin","items","requires","_createView","bind","view","class","lastConnectedUsers","plugins","add","number","inlineListView","using","presenceList.collapseAt","presenceDropdownView","presencelist-collapseat-invalid-format","context","isRendered","presencelist-missing-container","pin","isVisible","listenTo","hasTooltip","from","config","length","_handleUserAdd","showDropdown","presenceList.container","balloonPanelView","ck ck-presence-list__balloon","element","bindTo","destroy","get","attachToDom","isHidden","_allConnectedUsers","remove","execute"];var fa,pa;fa=ha,pa=223,function(e){for(;--e;)fa.push(fa.shift())}(++pa);const ya=function(e,t){return ha[e-=0]};class ma extends e.ContextPlugin{constructor(e){super(e),e[ya("0x1f")].define(ya("0x0"),{collapseAt:6});const s=e[ya("0x1f")].get(ya("0x14"));if(ya("0x11")!=typeof s)throw new t.CKEditorError(ya("0x16"),this);if(s<1)throw new t.CKEditorError(ya("0x16"),this)}static get[ya("0x9")](){return[m]}init(){const e=this.context;this[ya("0x2c")]=e[ya("0xf")][ya("0x29")](m).allConnectedUsers,this[ya("0x35")](ya("0x34"),0),this.lastConnectedUsers=new t.Collection,this[ya("0x24")]=new r.BalloonPanelView,this.balloonPanelView[ya("0xd")]=ya("0x25"),this[ya("0xc")]=this[ya("0xa")](),this.presenceDropdownView=void 0;for(const e of this._allConnectedUsers)this[ya("0x21")](e);this[ya("0x1c")](this[ya("0x2c")],ya("0x10"),((e,t)=>{this._handleUserAdd(t)})),this[ya("0x1c")](this[ya("0x2c")],"remove",((e,t)=>{this[ya("0x33")](t)}))}[ya("0xa")](){const e=this[ya("0x17")],s=new Ho(this[ya("0x17")][ya("0x2")]),n=this.balloonPanelView;if(!No(e[ya("0x1f")][ya("0x29")]("presenceList.container")))throw new t.CKEditorError(ya("0x19"),this);return s[ya("0x31")].bind(ya("0x34")).to(this),s[ya("0xb")](ya("0x4")).to(this,ya("0x34"),(t=>{const r=t>=e[ya("0x1f")].get("presenceList.collapseAt");return s[ya("0x31")][ya("0x2b")]=!(1==t||r),r||this.hideDropdown(),r})),s[ya("0x12")][ya("0x8")][ya("0x27")](this[ya("0xe")])[ya("0x13")]((t=>{const r=e[ya("0x1f")].get(ya("0x0")),n=new da(e.locale,t,r[ya("0x6")]);return n.bind(ya("0x1d")).to(s,ya("0x4"),(e=>!e)),r[ya("0x6")]&&this[ya("0x1c")](n,"execute",(()=>{this[ya("0xc")][ya("0x4")]||r.onClick(t,n[ya("0x26")])})),n})),this[ya("0x1c")](s[ya("0x12")],"execute",(()=>{this[ya("0x15")]?this[ya("0x1")]():this[ya("0xc")][ya("0x4")]&&this[ya("0x22")]()})),s.render(),n[ya("0x30")](),(0,r.clickOutsideHandler)({emitter:s,activator:()=>n[ya("0x1b")],contextElements:[n[ya("0x26")],s[ya("0x12")][ya("0x26")]],callback:()=>this[ya("0x1")]()}),e[ya("0x1f")][ya("0x29")](ya("0x23"))[ya("0x5")](s[ya("0x26")]),this[ya("0x32")]=new r.BodyCollection(this[ya("0x17")].locale),this[ya("0x32")][ya("0x2a")](),this[ya("0x32")][ya("0x10")](n),s}[ya("0x21")](e){this[ya("0x34")]++,5==this[ya("0xe")][ya("0x20")]&&this[ya("0xe")].remove(0),this.lastConnectedUsers[ya("0x10")](e)}[ya("0x33")](e){if(this[ya("0x34")]--,this[ya("0xe")][ya("0x29")](e.id)&&(this[ya("0xe")][ya("0x2d")](e.id),this[ya("0xe")].length<this[ya("0x34")]))for(const e of Array[ya("0x1e")](this[ya("0x2c")])[ya("0x3")]())if(!this.lastConnectedUsers.get(e.id))return void this.lastConnectedUsers[ya("0x10")](e,0)}[ya("0x22")](){if(this[ya("0x15")])return;this[ya("0x15")]=new ea;const e=this.context[ya("0x1f")][ya("0x29")](ya("0x0"));this[ya("0x15")][ya("0x8")][ya("0x27")](this[ya("0x2c")]).using((t=>{const s=new ia(this[ya("0x17")][ya("0x2")],t,!!e[ya("0x6")]);return e[ya("0x6")]&&this[ya("0x1c")](s,ya("0x2e"),(()=>{e.onClick(t,s.element)})),s})),this[ya("0x24")][ya("0x2f")][ya("0x10")](this.presenceDropdownView),this[ya("0x24")][ya("0x1a")]({target:this[ya("0xc")][ya("0x12")][ya("0x26")]})}hideDropdown(){this[ya("0x15")]&&(this[ya("0x24")][ya("0x7")](),this[ya("0x24")].content[ya("0x2d")](this.presenceDropdownView),this.presenceDropdownView[ya("0x28")](),this.presenceDropdownView=void 0)}[ya("0x28")](){super.destroy(),this[ya("0xc")]&&this[ya("0xc")][ya("0x18")]&&this[ya("0xc")][ya("0x28")](),this[ya("0x32")]&&this[ya("0x32")].detachFromDom()}}var va,xa,_a=["requires","pluginName"];va=_a,xa=205,function(e){for(;--e;)va.push(va.shift())}(++xa);var ga=function(e,t){return _a[e-=0]};class ba extends e.ContextPlugin{static get[ga("0x1")](){return[m,ma]}static get[ga("0x0")](){return"PresenceList"}}})(),(window.CKEditor5=window.CKEditor5||{}).realTimeCollaboration=__webpack_exports__})();
5
+ */(()=>{var __webpack_modules__={357:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});class s extends Error{constructor(t,e,s=null,r={}){super("cloud-services-internal-error: "+t),this.context=e,this.code=s,this.data=r,this.name="CKEditorError"}static fromPublicError(t){return new s(function(t){let e="cloud-services-error: "+t.message;return t.explanation&&(e+="\nExplanation: "+t.explanation),t.action&&(e+="\nAction: "+t.action),t.traceId&&(e+="\nTraceId: "+t.traceId),t.code&&(e+="\nCode: "+t.code),e}(t),t)}}e.default=s},8801:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});class s extends Error{constructor(t,e){super(),this.name="CKEditorCloudServicesServerError",this.stack=void 0,this.message=t,this.code=e.code,this.traceId=e.traceId,this.data=e.data}static fromPublicError(t){return new s(function(t){let e="cloud-services-server-error: "+t.message;return t.explanation&&(e+="\nExplanation: "+t.explanation),t.action&&(e+="\nAction: "+t.action),t.traceId&&(e+="\nTraceId: "+t.traceId),t.code&&(e+="\nCode: "+t.code),e}(t),t)}}e.default=s},7622:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e._SERVICE=void 0;const n=s(5003),i=s(2209),o=r(s(3596)),a=r(s(7026)),c=r(s(7839)),u=r(s(5132)),d=r(s(4148)),l=r(s(223)),h=r(s(2968)),f=r(s(7158)),p=r(s(357)),y=r(s(6314)),m=r(s(6148)),v=r(s(961));e._SERVICE=1;class x{constructor(t,e){if(!t)throw new TypeError('Param "bundleVersion" must be provided.');this._id=null!=e?e:(0,n.v4)(),this._isConnected=!1,this._bundleVersion=t}getId(){return this._id}isConnected(){return this._isConnected}connect(t,e={buffers:[],types:[]},s){const r=new c.default(this.getId(),e.buffers,e.types,this._bundleVersion,s);return this._connect(t,r)}reconnect(t,e){if(this.isConnected())throw new p.default("Cannot reconnect to already connected service.",t);return this._connect(t,new d.default(this.getId(),e,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 t=new v.default(this.getId());if(!this._wsGateway)throw new y.default("Collaborative Editing",this);const s=await this._wsGateway._sendRequest(e._SERVICE,v.default.TYPE,o.default.encode(t));return o.default.decode(s,m.default)}async sendOperations(t,s,r){if(!t||!t.types||!t.types.length)throw new p.default("Cannot send empty update.",this._wsGateway);const n="number"==typeof s?s:parseInt(s);if(!Number.isInteger(n)||n<0)throw new p.default("Base version not provided.",this._wsGateway);const i=new u.default(this.getId(),t.buffers,t.types,n,[],r);if(!this._wsGateway||!this._isConnected)throw new y.default("Collaborative Editing",this);const a=await this._wsGateway._sendRequest(e._SERVICE,u.default.TYPE,o.default.encode(i));return o.default.decode(a,l.default)}async getConnectedSessions(){if(!this._isConnected)throw new y.default("Collaborative Editing",this);return this._connectedSessions||(this._connectedSessions=await a.default.getConnectedSessions(this._wsGateway,this._id,e._SERVICE)),this._connectedSessions}static getConnectedSessions(t,s){return a.default.getConnectedSessions(t,s,e._SERVICE)}async _connect(t,s){if(this.isConnected())return;if(t.state!==f.default.STATE_CONNECTED)throw new p.default("WebSocket Gateway is not connected.",t);this._wsGateway=t,this.stopListening(t,"change:state");const r=await t._sendRequest(e._SERVICE,s.constructor.TYPE,o.default.encode(s)),n=o.default.decode(r,h.default);return this.listenTo(t,"change:state",((t,e,s)=>this._onWsGatewayStateChange(s)),{priority:f.default._CHANGE_STATE_EVENT_PRIORITY}),this._connectToChannel(t,n.channel),this._isConnected=!0,this.fire("connected"),n}_connectToChannel(t,s){this._channel=t._getChannel(e._SERVICE,s),this.listenTo(this._channel,this._channel.getEventName(u.default.TYPE),((t,e)=>{const s=o.default.decode(e,u.default);this.fire("operationsReceived",s.baseVersion,s.data,s.metadata)}))}_onWsGatewayStateChange(t){t===f.default.STATE_DISCONNECTED&&this.disconnect()}}x._SERVICE=e._SERVICE,(0,i.mix)(x,i.EmitterMixin),e.default=x},8677:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(5945));class i extends n.default{static toJSON({createdAt:t,...e}){const s={...e};return t instanceof Date&&(s.createdAt=t.toISOString()),s}static fromJSON({createdAt:t,...e}){const s={...e};return t&&(s.createdAt=new Date(t)),s}}e.default=i,i.DESCRIPTOR_NAME="OperationMetadataDescriptor",i.DESCRIPTOR={fields:{userId:{type:"string",id:1},type:{type:"string",id:2},createdAt:{type:"string",id:3}}}},6685:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=class{static prepareMetadataForOperations(t,e){if(!(t&&t.length&&e&&e.length))return[];const s=[];let r=0;for(const n of t)if(0!==n){if(!e[r])throw new Error("Missing metadata for a operation");s.push(e[r]),r++}else s.push(s[s.length-1]);return s}static removeUnnecessaryMetadata(t,e){if(!(t&&t.length&&e&&e.length))return[];const s=[];for(let r=0;r<t.length;r++)if(0!==t[r]){if(!e[r])throw new Error("Missing metadata for a operation");s.push(e[r])}return s}}},7839:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(t,e,s,r,n=""){super(),this.id=t,this.buffers=e,this.types=s,this.bundleVersion=r,this.lastOperationId=n}toJSON(){return{id:this.id,buffers:this.buffers,types:this.types,bundleVersion:this.bundleVersion,lastOperationId:this.lastOperationId}}static fromJSON(t){return new i(t.id,t.buffers,t.types,t.bundleVersion,t.lastOperationId)}}e.default=i,i.TYPE="11",i.READABLE_TYPE_NAME="connectToDocument",i.DESCRIPTOR_NAME="CollaborativeEditingConnectMessage",i.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}}}},4148:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(t,e,s){super(),this.id=t,this.lastKnowVersion=e,this.bundleVersion=s}toJSON(){return{id:this.id,bundleVersion:this.bundleVersion,lastKnowVersion:this.lastKnowVersion}}static fromJSON(t){return new i(t.id,t.lastKnowVersion,t.bundleVersion)}}e.default=i,i.TYPE="12",i.READABLE_TYPE_NAME="reconnectToDocument",i.DESCRIPTOR_NAME="CollaborativeEditingReconnectMessage",i.DESCRIPTOR={fields:{id:{type:"string",id:1},bundleVersion:{type:"string",id:2},lastKnowVersion:{type:"uint32",id:3}}}},5132:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545)),i=r(s(6685)),o=r(s(8677));class a extends n.default{constructor(t,e,s,r,n=[],i=""){super(),this.id=t,this.buffers=e,this.types=s,this.baseVersion=r,this.metadata=n,this.lastOperationId=i}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:i.default.removeUnnecessaryMetadata(this.types,this.metadata).map(o.default.toJSON),lastOperationId:this.lastOperationId}}static fromJSON(t){return new a(t.id,t.buffers,t.types,t.baseVersion,i.default.prepareMetadataForOperations(t.types,t.metadata).map(o.default.fromJSON),t.lastOperationId)}}e.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}}}},961:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(t){super(),this.documentId=t}get data(){return{documentId:this.documentId}}toJSON(){return{documentId:this.documentId}}static fromJSON(t){return new i(t.documentId)}}e.default=i,i.TYPE="14",i.READABLE_TYPE_NAME="getDocumentDetails",i.DESCRIPTOR_NAME="GetDocumentDetailsMessage",i.DESCRIPTOR={fields:{documentId:{type:"string",id:1},environmentId:{type:"string",id:2}}}},2968:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545)),i=r(s(6685)),o=r(s(8677));class a extends n.default{constructor(t,e,s=[],r=[],n=0,i=[],o=null,a="",c="",u=null){super(),this.channel=t,this.version=e,this.buffers=s,this.types=r,this.offset=n,this.metadata=i,this.initData=o,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 t;return!(null===(t=this.types)||void 0===t?void 0:t.length)&&null===this.initData}toJSON(){var t;return{channel:this.channel,version:this.version,sessionId:this.sessionId,buffers:this.buffers,types:this.types,offset:this.offset,metadata:i.default.removeUnnecessaryMetadata(this.types,this.metadata).map(o.default.toJSON),initData:null!==(t=this.initData)&&void 0!==t?t:"",isInitialized:"string"==typeof this.initData,lastOperationId:this.lastOperationId,sessionCreatedAt:this.sessionCreatedAt?this.sessionCreatedAt.toISOString():null}}static create(t){return new a(t.channel,t.version,t.buffers,t.types,t.offset,t.metadata,t.initData,t.sessionId,t.lastOperationId,t.sessionCreatedAt)}static fromJSON(t){var e;let s=null;return!0===t.isInitialized?s=null!==(e=t.initData)&&void 0!==e?e:"":"boolean"!=typeof t.isInitialized&&t.initData&&(s=t.initData),a.create({channel:t.channel,version:t.version,buffers:t.buffers,types:t.types,offset:t.offset,metadata:i.default.prepareMetadataForOperations(t.types,t.metadata).map(o.default.fromJSON),initData:s,sessionId:t.sessionId,lastOperationId:t.lastOperationId,sessionCreatedAt:t.sessionCreatedAt?new Date(t.sessionCreatedAt):null})}}e.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:o.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}}}},223:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545)),i=r(s(6685)),o=r(s(8677));class a extends n.default{constructor(t,e=[],s=[],r=[],n="",i=null){super(),this.version=t,this.buffers=e,this.types=s,this.metadata=r,this.lastOperationId=n,this.lastOperationAcceptedAt=i}get data(){return{buffers:this.buffers,types:this.types,baseVersion:this.version-this.types.length,lastOperationId:this.lastOperationId,lastOperationAcceptedAt:this.lastOperationAcceptedAt}}get wereChangesApplied(){var t;return!(null===(t=this.types)||void 0===t?void 0:t.length)}toJSON(){return{version:this.version,buffers:this.buffers,types:this.types,metadata:i.default.removeUnnecessaryMetadata(this.types,this.metadata).map(o.default.toJSON),lastOperationId:this.lastOperationId,lastOperationAcceptedAt:this.lastOperationAcceptedAt instanceof Date?this.lastOperationAcceptedAt.toISOString():this.lastOperationAcceptedAt}}static fromJSON(t){return new a(t.version,t.buffers,t.types,i.default.prepareMetadataForOperations(t.types,t.metadata).map(o.default.fromJSON),t.lastOperationId,t.lastOperationAcceptedAt?new Date(t.lastOperationAcceptedAt):null)}static create(t){return new a(t.version,t.buffers,t.types,t.metadata,t.lastOperationId,t.lastOperationAcceptedAt?new Date(t.lastOperationAcceptedAt):null)}}e.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}}}},6148:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(t,e){super(),this.lastDocumentSession=t,this.currentDocumentSession=e}get data(){var t,e,s,r,n;return{lastDocumentSessionId:null===(t=this.lastDocumentSession)||void 0===t?void 0:t.id,lastDocumentSessionOperationId:null===(e=this.lastDocumentSession)||void 0===e?void 0:e.lastOperationId,currentDocumentSessionId:null===(s=this.currentDocumentSession)||void 0===s?void 0:s.id,currentDocumentSessionVersion:null===(r=this.currentDocumentSession)||void 0===r?void 0:r.version,currentDocumentSessionOperationId:null===(n=this.currentDocumentSession)||void 0===n?void 0:n.lastOperationId}}toJSON(){var t,e,s,r,n;return{lastDocumentSessionId:null===(t=this.lastDocumentSession)||void 0===t?void 0:t.id,lastDocumentSessionOperationId:null===(e=this.lastDocumentSession)||void 0===e?void 0:e.lastOperationId,currentDocumentSessionId:null===(s=this.currentDocumentSession)||void 0===s?void 0:s.id,currentDocumentSessionVersion:null===(r=this.currentDocumentSession)||void 0===r?void 0:r.version,currentDocumentSessionOperationId:null===(n=this.currentDocumentSession)||void 0===n?void 0:n.lastOperationId}}static fromJSON(t){const e=t.lastDocumentSessionId?{id:t.lastDocumentSessionId,lastOperationId:t.lastDocumentSessionOperationId}:void 0,s=t.currentDocumentSessionId?{lastOperationId:t.currentDocumentSessionOperationId,version:t.currentDocumentSessionVersion,id:t.currentDocumentSessionId}:void 0;return new i(e,s)}}e.default=i,i.DESCRIPTOR_NAME="GetDocumentDetailsResponse",i.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}}}},6042:function(t,e,s){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,s,r){void 0===r&&(r=s),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[s]}})}:function(t,e,s,r){void 0===r&&(r=s),t[r]=e[s]}),n=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var s in t)"default"!==s&&Object.prototype.hasOwnProperty.call(t,s)&&r(e,t,s);return n(e,t),e},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e._SERVICE=void 0;const a=s(2209),c=o(s(3596)),u=o(s(5420)),d=o(s(2280)),l=o(s(6376)),h=o(s(7608)),f=o(s(6178)),p=o(s(5711)),y=o(s(7955)),m=o(s(939)),v=o(s(6523)),x=o(s(1926)),_=o(s(7952)),g=i(s(7158)),b=o(s(357)),w=o(s(7026)),O=o(s(6314)),S=o(s(8801));e._SERVICE=9;class E{constructor(t){this._documentId=t,this._isConnected=!1}get isConnected(){return this._isConnected}async connect(t){if(this._isConnected)return;if(t.state!==g.WEB_SOCKET_GATEWAY_STATES.CONNECTED)throw new b.default("WebSocket Gateway is not connected.",t);const s=new l.default(this._documentId);this._wsGateway=t,this.stopListening(t,"change:state");const r=await t._sendRequest(e._SERVICE,l.default.TYPE,c.default.encode(s)),{channel:n,threads:i}=c.default.decode(r,h.default);return this.listenTo(t,"change:state",((t,e,s)=>this._onWsGatewayStateChange(s)),{priority:g.default._CHANGE_STATE_EVENT_PRIORITY}),this._connectToChannel(t,n),this._isConnected=!0,this.fire("connected"),i}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(t,e,s,r){const n=new u.default(this._documentId,t,s,e,void 0,void 0,r),i=await this._sendRequest(u.default.TYPE,n);return c.default.decode(i,d.default)}async updateComment(t,e,s,r){const n=void 0!==r,i=new y.default(this._documentId,t,e,s,r,n);await this._sendRequest(y.default.TYPE,i)}async removeComment(t,e){const s=new f.default(this._documentId,t,e);await this._sendRequest(f.default.TYPE,s)}async removeCommentThread(t){const e=new p.default(this._documentId,t);await this._sendRequest(p.default.TYPE,e)}async getCommentThread(t,e=1){const s=new m.default(t,this._documentId);try{const t=await this._sendRequest(m.default.TYPE,s),{comments:e,commentThreadId:r}=c.default.decode(t,v.default);return{comments:e,commentThreadId:r}}catch(s){if(s instanceof S.default&&"404"===s.code&&e<5)return await(r=100*e,new Promise((t=>{setTimeout(t,r)}))),this.getCommentThread(t,e+1);if(s instanceof S.default)throw s;throw S.default.fromPublicError(s)}var r}async getDocumentThreads(){const t=new x.default(this._documentId),e=await this._sendRequest(x.default.TYPE,t),{threads:s}=c.default.decode(e,_.default);return{threads:s}}async getConnectedSessions(){if(!this._isConnected)throw new O.default("Comments",this);return this._connectedSessions||(this._connectedSessions=await w.default.getConnectedSessions(this._wsGateway,this._documentId,e._SERVICE)),this._connectedSessions}_connectToChannel(t,e){this._channel=t._getChannel(E._SERVICE,e),this._channel&&(this.listenTo(this._channel,this._channel.getEventName(u.default.TYPE),((t,e)=>{const s=c.default.decode(e,u.default);this.fire("commentAdded",s)})),this.listenTo(this._channel,this._channel.getEventName(f.default.TYPE),((t,e)=>{const s=c.default.decode(e,f.default);this.fire("commentRemoved",s)})),this.listenTo(this._channel,this._channel.getEventName(y.default.TYPE),((t,e)=>{const s=c.default.decode(e,y.default);this.fire("commentUpdated",s)})),this.listenTo(this._channel,this._channel.getEventName(p.default.TYPE),((t,e)=>{const s=c.default.decode(e,p.default);this.fire("commentThreadRemoved",s)})))}_onWsGatewayStateChange(t){t===g.WEB_SOCKET_GATEWAY_STATES.DISCONNECTED&&this.disconnect()}_sendRequest(t,s){if(!this._wsGateway||!this._isConnected)throw new O.default("Comments",this);return this._wsGateway._sendRequest(e._SERVICE,t,c.default.encode(s))}}E._SERVICE=e._SERVICE,(0,a.mix)(E,a.EmitterMixin),e.default=E},2529:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(5945));class i extends n.default{static toJSON(t){var e;return{...t,createdAt:null===(e=t.createdAt)||void 0===e?void 0:e.toISOString(),attributes:t.attributes?JSON.stringify(t.attributes):null}}static fromJSON(t){return{...t,createdAt:new Date(t.createdAt),attributes:t.attributes?JSON.parse(t.attributes):null}}}e.default=i,i.DESCRIPTOR_NAME="CommentDescriptor",i.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"}}}},1578:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(5945)),i=r(s(2529));class o extends n.default{static toJSON(t){var e;return{...t,comments:null===(e=t.comments)||void 0===e?void 0:e.map(i.default.toJSON)}}static fromJSON(t){var e;return{...t,comments:null===(e=t.comments)||void 0===e?void 0:e.map(i.default.fromJSON)}}}e.default=o,o.DESCRIPTOR_NAME="CommentsThreadDescriptor",o.DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},comments:{type:"CommentDescriptor",rule:"repeated",id:2}}}},5420:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(t,e,s,r="",n,i="",o=null){super(),this.documentId=t,this.commentThreadId=e,this.content=s,this.commentId=r,this.userId=i,this.attributes=o,this.createdAt=n?new Date(n):""}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)}}static fromJSON(t){return new i(t.documentId,t.commentThreadId,t.content,t.commentId?t.commentId:void 0,t.createdAt?new Date(t.createdAt):void 0,t.userId?t.userId:void 0,t.attributes?JSON.parse(t.attributes):{})}}e.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}}}},6376:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(t){super(),this.documentId=t}toJSON(){return{documentId:this.documentId}}static fromJSON(t){return new i(t.documentId)}}e.default=i,i.TYPE="92",i.READABLE_TYPE_NAME="connectToComment",i.DESCRIPTOR_NAME="CommentsV2ConnectMessage",i.DESCRIPTOR={fields:{documentId:{type:"string",id:1}}}},939:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(t,e){super(),this.commentThreadId=t,this.documentId=e}toJSON(){return{commentThreadId:this.commentThreadId,documentId:this.documentId}}static fromJSON(t){return new i(t.commentThreadId,t.documentId)}}e.default=i,i.TYPE="93",i.READABLE_TYPE_NAME="getComment",i.DESCRIPTOR_NAME="CommentsV2GetCommentThreadMessage",i.DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},documentId:{type:"string",id:2}}}},1926:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(t){super(),this.documentId=t}toJSON(){return{documentId:this.documentId}}static fromJSON(t){return new i(t.documentId)}}e.default=i,i.TYPE="94",i.READABLE_TYPE_NAME="getDocumentThreads",i.DESCRIPTOR_NAME="CommentsV2GetDocumentThreadsMessage",i.DESCRIPTOR={fields:{documentId:{type:"string",id:1}}}},6178:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(t,e,s){super(),this.documentId=t,this.commentThreadId=e,this.commentId=s}toJSON(){return{documentId:this.documentId,commentThreadId:this.commentThreadId,commentId:this.commentId}}static fromJSON(t){return new i(t.documentId,t.commentThreadId,t.commentId)}}e.default=i,i.TYPE="95",i.READABLE_TYPE_NAME="removeComment",i.DESCRIPTOR_NAME="CommentsV2RemoveCommentMessage",i.DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},commentId:{type:"string",id:2},documentId:{type:"string",id:3}}}},5711:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(t,e){super(),this.documentId=t,this.commentThreadId=e}toJSON(){return{documentId:this.documentId,commentThreadId:this.commentThreadId}}static fromJSON(t){return new i(t.documentId,t.commentThreadId)}}e.default=i,i.TYPE="97",i.READABLE_TYPE_NAME="removeCommentThread",i.DESCRIPTOR_NAME="CommentsV2RemoveCommentThreadMessage",i.DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},documentId:{type:"string",id:2}}}},7955:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(t,e,s,r,n=null,i=!1){super(),this.documentId=t,this.commentThreadId=e,this.commentId=s,this.content=r,this.attributes=n,this.isAttributesUpdated=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}}static fromJSON(t){return new i(t.documentId,t.commentThreadId,t.commentId,t.content,t.attributes?JSON.parse(t.attributes):null,t.isAttributesUpdated)}}e.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}}}},2280:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(t,e,s){super(),this.commentThreadId=t,this.commentId=e,this.createdAt=new Date(s)}toJSON(){return{commentThreadId:this.commentThreadId,commentId:this.commentId,createdAt:this.createdAt.toISOString()}}static fromJSON(t){return new i(t.commentThreadId,t.commentId,t.createdAt)}}e.default=i,i.DESCRIPTOR_NAME="CommentsV2AddCommentResponse",i.DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},commentId:{type:"string",id:2},createdAt:{type:"string",id:3}}}},7608:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545)),i=r(s(1578));class o extends n.default{constructor(t,e,s){super(),this.channel=t,this._threads=e,this._threadsV2=s,this.threads=(null==s?void 0:s.length)?s:e}toJSON(){var t,e;return{channel:this.channel,threads:null===(t=this._threads)||void 0===t?void 0:t.map((t=>JSON.stringify(t))),threadsV2:null===(e=this._threadsV2)||void 0===e?void 0:e.map(i.default.toJSON)}}static fromJSON(t){var e,s;return new o(t.channel,null===(e=t.threads)||void 0===e?void 0:e.map((t=>JSON.parse(t))),null===(s=t.threadsV2)||void 0===s?void 0:s.map(i.default.fromJSON))}}e.default=o,o.DESCRIPTOR_NAME="CommentsV2ConnectResponse",o.DESCRIPTOR={fields:{channel:{type:"string",id:1},threads:{type:"string",rule:"repeated",id:2},threadsV2:{type:"CommentsThreadDescriptor",rule:"repeated",id:3}}}},6523:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545)),i=r(s(2529));class o extends n.default{constructor(t,e,s){super(),this.commentThreadId=t,this._comments=e,this._commentsV2=s,this.comments=(null==s?void 0:s.length)?s:e}toJSON(){var t,e;return{commentThreadId:this.commentThreadId,comments:null===(t=this._comments)||void 0===t?void 0:t.map((t=>JSON.stringify(t))),commentsV2:null===(e=this._commentsV2)||void 0===e?void 0:e.map(i.default.toJSON)}}static fromJSON(t){var e,s;return new o(t.commentThreadId,null===(e=t.comments)||void 0===e?void 0:e.map((t=>function(t){const e=JSON.parse(t);return{...e,createdAt:new Date(e.createdAt)}}(t))),null===(s=t.commentsV2)||void 0===s?void 0:s.map(i.default.fromJSON))}}e.default=o,o.DESCRIPTOR_NAME="CommentsV2GetCommentThreadResponse",o.DESCRIPTOR={fields:{commentThreadId:{type:"string",id:1},comments:{type:"string",rule:"repeated",id:2},commentsV2:{type:"CommentDescriptor",rule:"repeated",id:3}}}},7952:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545)),i=r(s(1578));class o extends n.default{constructor(t,e){super(),this._threads=t,this._threadsV2=e,this.threads=(null==e?void 0:e.length)?e:t}toJSON(){var t,e;return{threads:null===(t=this._threads)||void 0===t?void 0:t.map((t=>JSON.stringify(t))),threadsV2:null===(e=this._threadsV2)||void 0===e?void 0:e.map(i.default.toJSON)}}static fromJSON(t){var e,s;return new o(null===(e=t.threads)||void 0===e?void 0:e.map((t=>function(t){var e;const s=JSON.parse(t),r={...s};return s.comments&&(r.comments=null===(e=s.comments)||void 0===e?void 0:e.map((t=>({...t,createdAt:new Date(t.createdAt)})))),r}(t))),null===(s=t.threadsV2)||void 0===s?void 0:s.map(i.default.fromJSON))}}e.default=o,o.DESCRIPTOR_NAME="CommentsV2GetDocumentThreadsResponse",o.DESCRIPTOR={fields:{threads:{type:"string",rule:"repeated",id:1},threadsV2:{type:"CommentsThreadDescriptor",rule:"repeated",id:2}}}},5945:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=class{constructor(...t){}}},6345:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(5945));class i extends n.default{}e.default=i,i.DESCRIPTOR_NAME="KeyValueDescriptor",i.DESCRIPTOR={fields:{key:{type:"string",id:1},value:{type:"string",id:2}}}},8689:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e._SERVICE=void 0;const n=s(2209),i=r(s(3596)),o=s(7158),a=r(s(6052)),c=r(s(4910)),u=r(s(357));e._SERVICE=13;class d{static async isBundleUploaded(t,e){const s=new a.default(e);if(t.state!==o.WEB_SOCKET_GATEWAY_STATES.CONNECTED)throw new u.default("WebSocket Gateway is not connected.",t);const r=await t._sendRequest(d._SERVICE,a.default.TYPE,i.default.encode(s));return i.default.decode(r,c.default).isUploaded}}d._SERVICE=e._SERVICE,(0,n.mix)(d,n.EmitterMixin),e.default=d},6052:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(t){super(),this.bundleVersion=t}toJSON(){return{bundleVersion:this.bundleVersion}}static fromJSON(t){return new i(t.bundleVersion)}}e.default=i,i.TYPE="131",i.READABLE_TYPE_NAME="isEditorBundleUploaded",i.DESCRIPTOR_NAME="IsEditorBundleUploadedMessage",i.DESCRIPTOR={fields:{bundleVersion:{type:"string",id:1}}}},4910:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(t){super(),this.isUploaded=t}toJSON(){return{isUploaded:this.isUploaded}}static fromJSON(t){return new i(t.isUploaded)}}e.default=i,i.DESCRIPTOR_NAME="IsEditorBundleUploadedResponse",i.DESCRIPTOR={fields:{isUploaded:{type:"bool",id:1}}}},6314:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(357));class i extends n.default{constructor(t,e){super(t+" Service is not connected.",e)}}e.default=i},3545:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(5945));class i extends n.default{constructor(...t){super()}static fromJSON(t){throw new TypeError("Must be implemented in a child class!")}}e.default=i,i.TYPE="1000"},3596:function(t,e,s){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,s,r){void 0===r&&(r=s),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[s]}})}:function(t,e,s,r){void 0===r&&(r=s),t[r]=e[s]}),n=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var s in t)"default"!==s&&Object.prototype.hasOwnProperty.call(t,s)&&r(e,t,s);return n(e,t),e},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const a=i(s(6154)),c=o(s(6783)),u=o(s(8677)),d=o(s(6345)),l=o(s(7618)),h=o(s(2529)),f=o(s(1578)),p=o(s(1706)),y=o(s(9883)),m=[d.default,c.default,u.default,l.default,h.default,f.default,p.default,y.default],v=a.Root.fromJSON({nested:m.reduce(((t,e)=>(t[e.DESCRIPTOR_NAME]=e.DESCRIPTOR,t)),{})});function x(t){return e=t,v.lookup(e.DESCRIPTOR_NAME)||v.addJSON({[e.DESCRIPTOR_NAME]:e.DESCRIPTOR}),v.lookupType(t.DESCRIPTOR_NAME);var e}e.default=class{static decode(t,e){const s=x(e).decode("undefined"==typeof window?t:new Uint8Array(t));return e.fromJSON({...s})}static encode(t){const e=x(t.constructor),s=t.toJSON(),r=e.verify(s);if(r)throw Error(r);return e.encode(e.create(s)).finish()}}},9883:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(5945));class i extends n.default{static create(t){return{revisionId:t.id,name:t.name,creatorId:t.creatorId,createdAt:t.createdAt,fromVersion:t.fromVersion,toVersion:t.toVersion,isEmptyCurrent:t.isEmptyCurrent,diffData:t.diffData?JSON.stringify(t.diffData):void 0,attributes:t.attributes,authorsIds:t.authorsIds}}static toJSON(t){var e;return{revisionId:t.revisionId,name:t.name,creatorId:t.creatorId,authorsIds:t.authorsIds?JSON.stringify(t.authorsIds):void 0,diffData:t.diffData,createdAt:null===(e=t.createdAt)||void 0===e?void 0:e.toISOString(),attributes:t.attributes?JSON.stringify(t.attributes):void 0,toVersion:t.toVersion,fromVersion:t.fromVersion,isEmptyCurrent:t.isEmptyCurrent}}static fromJSON(t){return{revisionId:(t={...t}).revisionId,name:t.name,creatorId:t.creatorId,authorsIds:t.authorsIds?JSON.parse(t.authorsIds):void 0,diffData:t.diffData,createdAt:t.createdAt?new Date(t.createdAt):void 0,attributes:t.attributes?JSON.parse(t.attributes):void 0,toVersion:t.toVersion,fromVersion:t.fromVersion,isEmptyCurrent:t.isEmptyCurrent}}static toObject(t){return function(t){for(const[e,s]of Object.entries(t))void 0===s&&delete t[e];return t}({id:t.revisionId,name:t.name,creatorId:t.creatorId,createdAt:t.createdAt,fromVersion:t.fromVersion,toVersion:t.toVersion,isEmptyCurrent:t.isEmptyCurrent,diffData:t.diffData?JSON.parse(t.diffData):void 0,attributes:t.attributes,authorsIds:t.authorsIds})}}e.default=i,i.DESCRIPTOR_NAME="RevisionDescriptor",i.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}}}},801:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(t){super(),this.documentId=t}toJSON(){return{documentId:this.documentId}}static fromJSON(t){return new i(t.documentId)}}e.default=i,i.TYPE="121",i.READABLE_TYPE_NAME="connectToRevisionHistory",i.DESCRIPTOR_NAME="RevisionHistoryConnectMessage",i.DESCRIPTOR={fields:{documentId:{type:"string",id:1}}}},3667:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(t,e){super(),this.documentId=t,this.revisionId=e}toJSON(){return{documentId:this.documentId,revisionId:this.revisionId}}static fromJSON(t){return new i(t.documentId,t.revisionId)}}e.default=i,i.TYPE="123",i.READABLE_TYPE_NAME="getRevision",i.DESCRIPTOR_NAME="RevisionHistoryGetRevisionMessage",i.DESCRIPTOR={fields:{documentId:{type:"string",id:1},revisionId:{type:"string",id:2}}}},8702:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(t,e){super(),this.documentId=t,this.requestId=e}toJSON(){return{documentId:this.documentId,requestId:this.requestId}}static fromJSON(t){return new i(t.documentId,t.requestId)}}e.default=i,i.TYPE="122",i.READABLE_TYPE_NAME="reconnectToRevisionHistory",i.DESCRIPTOR_NAME="RevisionHistoryReconnectMessage",i.DESCRIPTOR={fields:{documentId:{type:"string",id:1},requestId:{type:"uint32",id:2}}}},6120:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545)),i=r(s(9883));class o extends n.default{constructor(t,e,s){super(),this.documentId=t,this.requestId=e,this.revisions=s}toJSON(){return{documentId:this.documentId,requestId:this.requestId,revisions:this.revisions.map(i.default.toJSON)}}toObject(){return{documentId:this.documentId,requestId:this.requestId,revisions:this.revisions.map(i.default.toObject)}}static create(t){return new o(t.documentId,t.requestId,t.revisions.map(i.default.create))}static fromJSON(t){return new o(t.documentId,t.requestId,t.revisions.map(i.default.fromJSON))}}e.default=o,o.TYPE="124",o.READABLE_TYPE_NAME="updateRevisions",o.DESCRIPTOR_NAME="RevisionHistoryUpdateRevisionsMessage",o.DESCRIPTOR={fields:{documentId:{type:"string",id:1},requestId:{type:"uint32",id:2},revisions:{type:"RevisionDescriptor",id:3,rule:"repeated"}}}},5218:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545)),i=r(s(9883));class o extends n.default{constructor(t,e,s){super(),this.channel=t,this.requestId=e,this.revisions=s}toJSON(){return{channel:this.channel,requestId:this.requestId,revisions:this.revisions.map(i.default.toJSON)}}toObject(){return{channel:this.channel,requestId:this.requestId,revisions:this.revisions.map(i.default.toObject)}}static fromJSON(t){return new o(t.channel,t.requestId,t.revisions.map(i.default.fromJSON))}}e.default=o,o.DESCRIPTOR_NAME="RevisionHistoryConnectResponse",o.DESCRIPTOR={fields:{channel:{type:"string",id:1},requestId:{type:"uint32",id:2},revisions:{type:"RevisionDescriptor",id:3,rule:"repeated"}}}},6311:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545)),i=r(s(9883));class o extends n.default{constructor(t,e,s,r,n,i,o,a,c,u){super(),this.revisionId=t,this.name=e,this.creatorId=s,this.authorsIds=r,this.createdAt=n,this.diffData=i,this.attributes=o,this.fromVersion=a,this.toVersion=c,this.isEmptyCurrent=u}toJSON(){return i.default.toJSON(this)}toObject(){return i.default.toObject(this)}static create(t){return new o(t.revisionId,t.name,t.creatorId,t.authorsIds,t.createdAt,t.diffData,t.attributes,t.fromVersion,t.toVersion,t.isEmptyCurrent)}static fromJSON(t){return new o(t.revisionId,t.name,t.creatorId,t.authorsIds?JSON.parse(t.authorsIds):void 0,t.createdAt?new Date(t.createdAt):void 0,t.diffData,t.attributes?JSON.parse(t.attributes):void 0,t.fromVersion,t.toVersion,t.isEmptyCurrent)}}e.default=o,o.DESCRIPTOR_NAME="RevisionHistoryGetRevisionResponse",o.DESCRIPTOR=i.default.DESCRIPTOR},1655:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(t){super(),this.requestId=t}toJSON(){return{requestId:this.requestId}}static fromJSON(t){return new i(t.requestId)}}e.default=i,i.DESCRIPTOR_NAME="RevisionHistoryUpdateRevisionsResponse",i.DESCRIPTOR={fields:{requestId:{type:"uint32",id:1}}}},8811:function(t,e,s){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,s,r){void 0===r&&(r=s),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[s]}})}:function(t,e,s,r){void 0===r&&(r=s),t[r]=e[s]}),n=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var s in t)"default"!==s&&Object.prototype.hasOwnProperty.call(t,s)&&r(e,t,s);return n(e,t),e},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e._SERVICE=void 0;const a=s(2209),c=o(s(3596)),u=o(s(3667)),d=o(s(6311)),l=o(s(6120)),h=o(s(1655)),f=o(s(801)),p=o(s(5218)),y=o(s(8702)),m=o(s(357)),v=i(s(7158)),x=o(s(6314));e._SERVICE=12;class _{constructor(t){this._documentId=t,this._isConnected=!1}get isConnected(){return this._isConnected}connect(t){return this._isConnected?Promise.resolve():this._connect(t,new f.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(t,e){if(this.isConnected)throw new m.default("Cannot reconnect to already connected service.",t);return this._connect(t,new y.default(this._documentId,e))}async updateRevisions(t,e){const s=l.default.create({documentId:this._documentId,requestId:e,revisions:t}),r=await this._sendRequest(l.default.TYPE,s),{requestId:n}=c.default.decode(r,h.default);return n}async getRevision(t){const e=new u.default(this._documentId,t),s=await this._sendRequest(u.default.TYPE,e);return c.default.decode(s,d.default).toObject()}async _connect(t,s){if(t.state!==v.WEB_SOCKET_GATEWAY_STATES.CONNECTED)throw new m.default("WebSocket Gateway is not connected.",t);this._wsGateway=t,this.stopListening(t,"change:state");const r=await t._sendRequest(e._SERVICE,s.constructor.TYPE,c.default.encode(s)),{channel:n,requestId:i,revisions:o}=c.default.decode(r,p.default).toObject();return this.listenTo(t,"change:state",((t,e,s)=>this._onWsGatewayStateChange(s)),{priority:v.default._CHANGE_STATE_EVENT_PRIORITY}),this._connectToChannel(t,n),this._isConnected=!0,this.fire("connected"),{revisions:o,requestId:i}}_connectToChannel(t,e){this._channel=t._getChannel(_._SERVICE,e),this._channel&&this.listenTo(this._channel,this._channel.getEventName(l.default.TYPE),((t,e)=>{const{documentId:s,requestId:r,revisions:n}=c.default.decode(e,l.default).toObject();this.fire("revisionsUpdated",{documentId:s,requestId:r,revisionsData:n})}))}_onWsGatewayStateChange(t){t===v.WEB_SOCKET_GATEWAY_STATES.DISCONNECTED&&this.disconnect()}_sendRequest(t,s){if(!this._wsGateway||!this._isConnected)throw new x.default("Revision History",this);return this._wsGateway._sendRequest(e._SERVICE,t,c.default.encode(s))}}_._SERVICE=e._SERVICE,(0,a.mix)(_,a.EmitterMixin),e.default=_},6783:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(5945));class i extends n.default{}e.default=i,i.DESCRIPTOR_NAME="SessionsSocketDescriptor",i.DESCRIPTOR={fields:{session:{type:"string",id:1},user:{type:"string",id:2},role:{id:3,type:"string"},permissions:{rule:"repeated",type:"string",id:4}}}},2366:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(t,e){super(),this.id=t,this.sessionType=e}toJSON(){return{id:this.id,sessionType:this.sessionType}}static fromJSON(t){return new i(t.id,t.sessionType)}}e.default=i,i.TYPE="31",i.READABLE_TYPE_NAME="getConnectedSockets",i.DESCRIPTOR_NAME="SessionsConnectMessage",i.DESCRIPTOR={fields:{id:{type:"string",id:1},sessionType:{type:"uint32",id:2}}}},2414:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(t,e,s,r){super(),this.id=t,this.userId=e,this.role=s,this.permissions=r}toJSON(){var t,e,s;return{id:this.id,userId:null!==(t=this.userId)&&void 0!==t?t:void 0,role:null!==(e=this.role)&&void 0!==e?e:void 0,permissions:null!==(s=this.permissions)&&void 0!==s?s:void 0}}static fromJSON(t){return new i(t.id,t.userId,t.role,t.permissions)}}e.default=i,i.TYPE="32",i.READABLE_TYPE_NAME="connectSocket",i.DESCRIPTOR_NAME="SocketConnectMessage",i.DESCRIPTOR={fields:{id:{type:"string",id:1},userId:{type:"string",id:2},role:{type:"string",id:3},permissions:{rule:"repeated",type:"string",id:4}}}},4194:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(t){super(),this.id=t}toJSON(){return{id:this.id}}static fromJSON(t){return new i(t.id)}}e.default=i,i.TYPE="33",i.READABLE_TYPE_NAME="disconnectSocket",i.DESCRIPTOR_NAME="SocketDisconnectMessage",i.DESCRIPTOR={fields:{id:{type:"string",id:1}}}},6145:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(t,e=[]){super(),this.channel=t,this.sockets=e}toJSON(){return{channel:this.channel,sockets:this.sockets.map((t=>({user:t.userId,session:t.id,role:t.role,permissions:t.permissions})))}}static fromJSON(t){return new i(t.channel,t.sockets.map((t=>({id:t.session,userId:t.user,role:t.role,permissions:t.permissions}))))}}e.default=i,i.DESCRIPTOR_NAME="SessionsConnectResponse",i.DESCRIPTOR={fields:{channel:{type:"string",id:1},sockets:{rule:"repeated",type:"SessionsSocketDescriptor",id:2}}}},2690:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=s(2209),i=s(7026),o=r(s(7530)),a=r(s(7158)),c=r(s(6145)),u=r(s(2366)),d=r(s(2414)),l=r(s(4194)),h=r(s(3596));class f extends n.Collection{constructor(t,e){super({idProperty:"id"}),this._id=t,this._sessionType=e,this._handlers=new Map,this._eventsQueue=[],this._isRunning=!1}async connect(t){this._wsGateway=t,this.stopListening(t,"change:state");const e=new u.default(this._id,this._sessionType);let s;try{const t=await this._wsGateway._sendRequest(i._SERVICE,u.default.TYPE,h.default.encode(e));s=h.default.decode(t,c.default)}catch(t){s=new c.default(this._id,[])}this._connectToChannel(this._wsGateway,s.channel,this._sessionType);const r=await async function(t,e){const s=e.map((t=>t.userId)),r=s.length?await o.default.getMany(t,s):[];return e.map((t=>{const e={id:t.id,role:t.role,permissions:t.permissions};return e.user=t.userId&&r.find((e=>e.id===t.userId))||new o.default,e}))}(this._wsGateway,s.sockets);for(const t of r)super.add(t);this._connected=!0,this.fire("connected"),this.listenTo(this._wsGateway,"change:state",((t,e,s)=>this._onWsGatewayStateChange(s)),{priority:a.default._CHANGE_STATE_EVENT_PRIORITY}),await this._runQueue()}disconnect(t=!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&&t&&(this.stopListening(this._wsGateway),this._wsGateway=void 0),this.fire("disconnected"),t&&this.stopListening()}}add(t,e){throw new TypeError("The collection is read-only.")}remove(t){throw new TypeError("The collection is read-only.")}_connectToChannel(t,e,s){this._channel=t._getChannel(s,e),this._channel&&(this._addHandler(this._channel,d.default.TYPE,(async e=>{const s=h.default.decode(e,d.default);if(-1===this.getIndex(s.id)){const e={id:s.id,role:s.role,permissions:s.permissions};s.userId&&(e.user=await o.default.get(t,s.userId)),super.add(e)}})),this._addHandler(this._channel,l.default.TYPE,(t=>{const e=h.default.decode(t,l.default);-1!==this.getIndex(e.id)&&super.remove(e.id)})))}async _onWsGatewayStateChange(t){t===a.default.STATE_DISCONNECTED&&this.disconnect(!1),t===a.default.STATE_CONNECTED&&await this.connect(this._wsGateway)}async _runQueue(){if(this._isRunning||!this._connected)return;let t;for(this._isRunning=!0;t=this._eventsQueue.shift();){const e=this._handlers.get(t.eventName);e&&await e(t.data)}this._isRunning=!1}_addHandler(t,e,s){const r=t.getEventName(e,!0);this.listenTo(t,r,(async(t,e)=>{const s=t.name;this._eventsQueue.push({eventName:s,data:e}),await this._runQueue()})),this._handlers.set(r,s)}}e.default=f},7026:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e._SERVICE=void 0;const n=r(s(2690));e._SERVICE=3,e.default=class{static async getConnectedSessions(t,e,s){const r=new n.default(e,s);return await r.connect(t),r}}},1706:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(5945));class i extends n.default{static toJSON(t){var e;return{...t,data:t.data?JSON.stringify(t.data):t.data,attributes:t.attributes?JSON.stringify(t.attributes):t.attributes,createdAt:null===(e=t.createdAt)||void 0===e?void 0:e.toISOString()}}static fromJSON(t){return{...t,data:t.data?JSON.parse(t.data):t.data,attributes:t.attributes?JSON.parse(t.attributes):t.attributes,createdAt:t.createdAt?new Date(t.createdAt):void 0}}}e.default=i,i.DESCRIPTOR_NAME="SuggestionDescriptor",i.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"}}}},597:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(t,e,s,r={},n=null,i=null){super(),this.id=t,this.documentId=e,this.type=s,this.data=r,this.originalSuggestionId=n,this.attributes=i}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(t){var e;return new i(t.id,t.documentId,t.type,JSON.parse(t.data),null!==(e=t.originalSuggestionId)&&void 0!==e?e:null,t.attributes?JSON.parse(t.attributes):null)}}e.default=i,i.TYPE="101",i.READABLE_TYPE_NAME="addSuggestion",i.DESCRIPTOR_NAME="TrackChangesAddSuggestionMessage",i.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}}}},3268:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(t,e,s){super(),this.ids=t,this.documentId=e,this.state=s}toJSON(){return{ids:this.ids,documentId:this.documentId,state:this.state}}static fromJSON(t){return new i(t.ids,t.documentId,t.state)}}e.default=i,i.TYPE="106",i.READABLE_TYPE_NAME="batchUpdateSuggestionsState",i.DESCRIPTOR_NAME="TrackChangesBatchUpdateSuggestionsStateMessage",i.DESCRIPTOR={fields:{ids:{type:"string",rule:"repeated",id:1},documentId:{type:"string",id:2},state:{type:"string",id:3}}}},144:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(t){super(),this.documentId=t}toJSON(){return{documentId:this.documentId}}static fromJSON(t){return new i(t.documentId)}}e.default=i,i.TYPE="105",i.READABLE_TYPE_NAME="connectToSuggestions",i.DESCRIPTOR_NAME="TrackChangesConnectMessage",i.DESCRIPTOR={fields:{documentId:{type:"string",id:1}}}},2679:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(t){super(),this.documentId=t}toJSON(){return{documentId:this.documentId}}static fromJSON(t){return new i(t.documentId)}}e.default=i,i.TYPE="102",i.READABLE_TYPE_NAME="getAllSuggestions",i.DESCRIPTOR_NAME="TrackChangesGetAllSuggestionMessage",i.DESCRIPTOR={fields:{documentId:{type:"string",id:1}}}},1659:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(t,e){super(),this.id=t,this.documentId=e}toJSON(){return{id:this.id,documentId:this.documentId}}static fromJSON(t){return new i(t.id,t.documentId)}}e.default=i,i.TYPE="103",i.READABLE_TYPE_NAME="getSuggestion",i.DESCRIPTOR_NAME="TrackChangesGetSuggestionMessage",i.DESCRIPTOR={fields:{id:{type:"string",id:1},documentId:{type:"string",id:2}}}},598:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(t,e,s,r,n,i=null){super(),this.id=t,this.documentId=e,this.hasComments=s,this.isHasCommentsModified=r,this.state=n,this.attributes=i}toJSON(){return{id:this.id,documentId:this.documentId,hasComments:this.hasComments,isHasCommentsModified:this.isHasCommentsModified,state:this.state,attributes:JSON.stringify(this.attributes)}}static fromJSON(t){return new i(t.id,t.documentId,t.hasComments,t.isHasCommentsModified,t.state,t.attributes?JSON.parse(t.attributes):null)}}e.default=i,i.TYPE="104",i.READABLE_TYPE_NAME="updateSuggestion",i.DESCRIPTOR_NAME="TrackChangesUpdateSuggestionMessage",i.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}}}},3111:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(t,e,s,r,n,i,o={},a=null){super(),this.id=t,this.authorId=e,this.type=s,this.hasComments=n,this.state=i,this.data=o,this.attributes=a,this.createdAt=r?new Date(r):void 0}toJSON(){var t;return{id:this.id,authorId:this.authorId,type:this.type,createdAt:null===(t=this.createdAt)||void 0===t?void 0:t.toISOString(),data:JSON.stringify(this.data),hasComments:this.hasComments,state:this.state,attributes:JSON.stringify(this.attributes)}}static fromJSON(t){return new i(t.id,t.authorId,t.type,t.createdAt,t.hasComments,t.state,JSON.parse(t.data),t.attributes?JSON.parse(t.attributes):null)}}e.default=i,i.DESCRIPTOR_NAME="TrackChangesAddSuggestionResponse",i.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}}}},701:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545)),i=r(s(1706));class o extends n.default{constructor(t,e,s){super(),this.channel=t,this._suggestions=e,this._suggestionsV2=s,this.suggestions=(null==s?void 0:s.length)?s:e}toJSON(){var t,e;return{channel:this.channel,suggestions:null===(t=this._suggestions)||void 0===t?void 0:t.map((t=>JSON.stringify(t))),suggestionsV2:null===(e=this._suggestionsV2)||void 0===e?void 0:e.map(i.default.toJSON)}}static fromJSON(t){var e,s;return new o(t.channel,null===(e=t.suggestions)||void 0===e?void 0:e.map((t=>JSON.parse(t))),null===(s=t.suggestionsV2)||void 0===s?void 0:s.map(i.default.fromJSON))}}e.default=o,o.DESCRIPTOR_NAME="TrackChangesConnectResponse",o.DESCRIPTOR={fields:{channel:{type:"string",id:1},suggestions:{type:"string",rule:"repeated",id:2},suggestionsV2:{type:"SuggestionDescriptor",rule:"repeated",id:3}}}},3390:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545)),i=r(s(1706));class o extends n.default{constructor(t,e){super(),this._suggestions=t,this._suggestionsV2=e,this.suggestions=(null==e?void 0:e.length)?e:t}toJSON(){var t,e;return{suggestions:null===(t=this._suggestions)||void 0===t?void 0:t.map((t=>JSON.stringify(t))),suggestionsV2:null===(e=this._suggestionsV2)||void 0===e?void 0:e.map(i.default.toJSON)}}static fromJSON(t){var e,s;return new o(null===(e=t.suggestions)||void 0===e?void 0:e.map(a),null===(s=t.suggestionsV2)||void 0===s?void 0:s.map(i.default.fromJSON))}}function a(t){const e=JSON.parse(t);return e.createdAt=e.createdAt?new Date(e.createdAt):void 0,e}e.default=o,o.DESCRIPTOR_NAME="TrackChangesGetAllSuggestionsResponse",o.DESCRIPTOR={fields:{suggestions:{type:"string",rule:"repeated",id:1},suggestionsV2:{type:"SuggestionDescriptor",rule:"repeated",id:2}}}},5930:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(t,e,s,r,n,i,o={},a=null){super(),this.id=t,this.authorId=e,this.type=s,this.hasComments=n,this.state=i,this.data=o,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(t){return new i(t.id,t.authorId,t.type,t.createdAt,t.hasComments,t.state,JSON.parse(t.data),t.attributes?JSON.parse(t.attributes):null)}}e.default=i,i.DESCRIPTOR_NAME="TrackChangesGetSuggestionResponse",i.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}}}},125:function(t,e,s){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,s,r){void 0===r&&(r=s),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[s]}})}:function(t,e,s,r){void 0===r&&(r=s),t[r]=e[s]}),n=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var s in t)"default"!==s&&Object.prototype.hasOwnProperty.call(t,s)&&r(e,t,s);return n(e,t),e},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e._SERVICE=void 0;const a=s(2209),c=o(s(3596)),u=o(s(597)),d=o(s(3111)),l=o(s(1659)),h=o(s(5930)),f=o(s(2679)),p=o(s(3390)),y=o(s(598)),m=o(s(144)),v=o(s(701)),x=o(s(357)),_=i(s(7158)),g=o(s(6314)),b=o(s(8801)),w=o(s(3268));e._SERVICE=10;class O{constructor(t){this._documentId=t,this._isConnected=!1}get isConnected(){return this._isConnected}async connect(t){if(this._isConnected)return;if(t.state!==_.WEB_SOCKET_GATEWAY_STATES.CONNECTED)throw new x.default("WebSocket Gateway is not connected.",t);const s=new m.default(this._documentId);this._wsGateway=t,this.stopListening(t,"change:state");const r=await t._sendRequest(e._SERVICE,m.default.TYPE,c.default.encode(s)),n=c.default.decode(r,v.default);return this.listenTo(t,"change:state",((t,e,s)=>this._onWsGatewayStateChange(s)),{priority:_.default._CHANGE_STATE_EVENT_PRIORITY}),this._connectToChannel(t,n.channel),this._isConnected=!0,this.fire("connected"),n.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(t,e,s,r=null,n){const i=new u.default(t,this._documentId,e,s,r,n),o=await this._sendRequest(u.default.TYPE,i);return c.default.decode(o,d.default)}async get(t,e=1){const s=new l.default(t,this._documentId);try{const t=await this._sendRequest(l.default.TYPE,s);return c.default.decode(t,h.default)}catch(s){if(s instanceof b.default&&"404"===s.code&&e<5)return await(r=100*e,new Promise((t=>{setTimeout(t,r)}))),this.get(t,e+1);if(s instanceof b.default)throw s;throw b.default.fromPublicError(s)}var r}async getAll(){const t=new f.default(this._documentId),e=await this._sendRequest(f.default.TYPE,t),{suggestions:s}=c.default.decode(e,p.default);return s}async update(t,e={}){const{hasComments:s,state:r,attributes:n}=e,i=void 0!==s,o=new y.default(t,this._documentId,s,i,r,n);await this._sendRequest(y.default.TYPE,o)}async batchUpdateState(t){const e=new w.default(t.ids,this._documentId,t.state);await this._sendRequest(w.default.TYPE,e)}_connectToChannel(t,e){this._channel=t._getChannel(O._SERVICE,e),this._channel&&this.listenTo(this._channel,this._channel.getEventName(y.default.TYPE),((t,e)=>{const s=c.default.decode(e,y.default);this.fire("suggestionUpdated",s)}))}_onWsGatewayStateChange(t){t===_.WEB_SOCKET_GATEWAY_STATES.DISCONNECTED&&this.disconnect()}_sendRequest(t,s){if(!this._wsGateway||!this._isConnected)throw new g.default("Track Changes",this);return this._wsGateway._sendRequest(e._SERVICE,t,c.default.encode(s))}}O._SERVICE=e._SERVICE,(0,a.mix)(O,a.EmitterMixin),e.default=O},7618:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(5945));class i extends n.default{}e.default=i,i.DESCRIPTOR_NAME="UserDescriptor",i.DESCRIPTOR={fields:{attributes:{rule:"repeated",type:"KeyValueDescriptor",id:1}}}},7204:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(t){super(),this.ids=t}toJSON(){return{ids:this.ids}}static fromJSON(t){return new i(t.ids)}}e.default=i,i.TYPE="22",i.READABLE_TYPE_NAME="getManyUsers",i.DESCRIPTOR_NAME="GetManyUsersMessage",i.DESCRIPTOR={fields:{ids:{id:1,type:"string",rule:"repeated"}}}},1779:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(t){super(),this.id=t}toJSON(){return{id:this.id}}static fromJSON(t){return new i(t.id)}}e.default=i,i.TYPE="21",i.READABLE_TYPE_NAME="getUser",i.DESCRIPTOR_NAME="GetUserMessage",i.DESCRIPTOR={fields:{id:{type:"string",id:1}}}},624:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(t){super(),this.users=t}toJSON(){return{users:this.users.map(o)}}static fromJSON(t){return new i(t.users.map(a))}}function o(t){return{attributes:Object.keys(t).map((e=>({key:e,value:JSON.stringify(t[e])})))}}function a(t){return t.attributes.reduce(((t,e)=>(t[e.key]=e.value?JSON.parse(e.value):null,t)),{})}e.default=i,i.DESCRIPTOR_NAME="GetManyUsersResponse",i.DESCRIPTOR={fields:{users:{rule:"repeated",type:"UserDescriptor",id:1}}}},2184:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(t){super(),this.attributes=t}toJSON(){return{attributes:Object.keys(this.attributes).map((t=>({key:t,value:JSON.stringify(this.attributes[t])})))}}static fromJSON(t){const e=t.attributes.reduce(((t,e)=>(t[e.key]=e.value?JSON.parse(e.value):null,t)),{});return new i(e)}}e.default=i,i.DESCRIPTOR_NAME="GetUserResponse",i.DESCRIPTOR={fields:{attributes:{rule:"repeated",type:"KeyValueDescriptor",id:1}}}},7530:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(1779)),i=r(s(2184)),o=r(s(3596)),a=r(s(7204)),c=r(s(624));class u{constructor(t={}){this._attributes=new Map;for(const e of Object.keys(t))"id"!==e?(this._attributes.set(e,t[e]),Object.defineProperty(this,e,{enumerable:!0,configurable:!1,get:()=>this._attributes.get(e)})):this.id=t.id}static fromData(t){return new u(t)}static async get(t,e){const s=new n.default(e);try{const e=await t._sendRequest(u._SERVICE,n.default.TYPE,o.default.encode(s)),r=o.default.decode(e,i.default);return new u(r.attributes)}catch(t){return new u({id:e})}}static async getMany(t,e){const s=new a.default(e);try{const e=await t._sendRequest(u._SERVICE,a.default.TYPE,o.default.encode(s));return o.default.decode(e,c.default).users.map((t=>new u(t)))}catch(t){return e.map((t=>new u({id:t})))}}}u._SERVICE=2,e.default=u},6754:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default="36.0.1"},1573:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=s(2209),i=r(s(3554)),o=r(s(3596));class a{constructor(t,e,s){this._channelName=t,this._wsGateway=e,this._socket=s,this._subscribeToChannel()}remove(){this._socket.off(this._channelName)}getEventName(t,e=!1){let s="";return e&&(s+="all:"),s+="event",t&&(s+=":"+t),s}_subscribeToChannel(){this._socket.on(this._channelName,(t=>{const e=o.default.decode(t,i.default);this.fire(this.getEventName(e.type,!0),e.data,e.socketId),e.socketId!==this._wsGateway.socketId&&this.fire(this.getEventName(e.type),e.data,e.socketId)}))}}(0,n.mix)(a,n.EmitterMixin),e.default=a},3554:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(t,e,s){super(),this.type=t,this.socketId=e,this.data=s}toJSON(){return{type:this.type,socketId:this.socketId,data:this.data}}static fromJSON(t){return new i(t.type,t.socketId,t.data)}}e.default=i,i.DESCRIPTOR_NAME="ChannelMessage",i.DESCRIPTOR={fields:{type:{type:"uint32",id:1},socketId:{type:"string",id:2},data:{type:"bytes",id:3}}}},8735:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(4990)),i=r(s(3596));e.default=class{encode(t,e,s,r="/",o={}){if(e.length>2)throw new Error("PacketParser supports only 2 elements in data");const a={type:t,data:e,id:s,nsp:r};return i.default.encode(n.default.create(a,o))}decode(t){const e=i.default.decode(t,n.default);return{packet:{id:e.id,type:e.type,data:e.packetData,nsp:e.nsp},options:{flags:e.options.flags,rooms:e.options.rooms,except:e.options.except}}}}},2854:function(t,e,s){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,s,r){void 0===r&&(r=s),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[s]}})}:function(t,e,s,r){void 0===r&&(r=s),t[r]=e[s]}),n=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var s in t)"default"!==s&&Object.prototype.hasOwnProperty.call(t,s)&&r(e,t,s);return n(e,t),e},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const a=o(s(799)),c=i(s(817));class u extends a.default{constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(t){return new u(t.data,t.data1)}static create(t,e){return new u(t,e)}}e.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}}}},4253:function(t,e,s){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,s,r){void 0===r&&(r=s),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[s]}})}:function(t,e,s,r){void 0===r&&(r=s),t[r]=e[s]}),n=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var s in t)"default"!==s&&Object.prototype.hasOwnProperty.call(t,s)&&r(e,t,s);return n(e,t),e},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const a=o(s(799)),c=i(s(817));class u extends a.default{constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(t){return new u(t.data,t.data1)}static create(t,e){return new u(t,e)}}e.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}}}},1433:function(t,e,s){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,s,r){void 0===r&&(r=s),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[s]}})}:function(t,e,s,r){void 0===r&&(r=s),t[r]=e[s]}),n=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var s in t)"default"!==s&&Object.prototype.hasOwnProperty.call(t,s)&&r(e,t,s);return n(e,t),e},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const a=o(s(799)),c=i(s(817));class u extends a.default{constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(t){return new u(t.data,t.data1)}static create(t,e){return new u(t,e)}}e.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}}}},2272:function(t,e,s){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,s,r){void 0===r&&(r=s),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[s]}})}:function(t,e,s,r){void 0===r&&(r=s),t[r]=e[s]}),n=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var s in t)"default"!==s&&Object.prototype.hasOwnProperty.call(t,s)&&r(e,t,s);return n(e,t),e},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const a=o(s(799)),c=i(s(817));class u extends a.default{constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data,data1:this.data1?JSON.stringify(this.data1):void 0}}static fromJSON(t){return new u(t.data,t.data1&&JSON.parse(t.data1))}static create(t,e){return new u(t,e)}}e.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}}}},1692:function(t,e,s){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,s,r){void 0===r&&(r=s),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[s]}})}:function(t,e,s,r){void 0===r&&(r=s),t[r]=e[s]}),n=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var s in t)"default"!==s&&Object.prototype.hasOwnProperty.call(t,s)&&r(e,t,s);return n(e,t),e},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const a=o(s(799)),c=i(s(817));class u extends a.default{constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(t){return new u(t.data,t.data1)}static create(t,e){return new u(t,e)}}e.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}}}},7239:function(t,e,s){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,s,r){void 0===r&&(r=s),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[s]}})}:function(t,e,s,r){void 0===r&&(r=s),t[r]=e[s]}),n=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var s in t)"default"!==s&&Object.prototype.hasOwnProperty.call(t,s)&&r(e,t,s);return n(e,t),e},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const a=o(s(799)),c=i(s(817));class u extends a.default{constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data?JSON.stringify(this.data):void 0,data1:this.data1}}static fromJSON(t){return new u(t.data&&JSON.parse(t.data),t.data1)}static create(t,e){return new u(t,e)}}e.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}}}},9075:function(t,e,s){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,s,r){void 0===r&&(r=s),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[s]}})}:function(t,e,s,r){void 0===r&&(r=s),t[r]=e[s]}),n=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var s in t)"default"!==s&&Object.prototype.hasOwnProperty.call(t,s)&&r(e,t,s);return n(e,t),e},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const a=o(s(799)),c=i(s(817));class u extends a.default{constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data?JSON.stringify(this.data):void 0,data1:this.data1?JSON.stringify(this.data1):void 0}}static fromJSON(t){return new u(t.data&&JSON.parse(t.data),t.data1&&JSON.parse(t.data1))}static create(t,e){return new u(t,e)}}e.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}}}},799:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{static create(t,e){throw new TypeError("Must be implemented in a child class!")}}e.default=i,t.exports=i},4990:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3596)),i=r(s(3545)),o=r(s(338)),a=r(s(817)),c=r(s(4253)),u=r(s(6335)),d=r(s(2854)),l=r(s(9769)),h=r(s(2272)),f=r(s(9075)),p=r(s(7239)),y=r(s(1797)),m=r(s(1694)),v=r(s(1433)),x=r(s(1692)),_=[c.default,u.default,d.default,l.default,h.default,f.default,p.default,y.default,m.default,v.default,x.default].reduce(((t,e)=>(t[e.TYPE]=e,t)),{});class g extends i.default{constructor(t,e,s,r="/",n=new o.default){super(),this.type=t,this.data=e,this.id=s,this.nsp=r,this.options=n}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 t=n.default.encode(this.options),e=n.default.encode(this.data);return{type:this.type+10*this.data.constructor.TYPE,id:this.id,nsp:"/"===this.nsp?void 0:this.nsp,data:e,options:t}}static fromJSON(t){const e=Math.floor(t.type/10);return new g(t.type-10*e,n.default.decode(t.data,_[e]),t.id,t.nsp,t.options?n.default.decode(t.options,o.default):new o.default)}static create(t,e={}){var s;const r=a.default.getPacketType(a.default.getType(t.data[0]),a.default.getType(null!==(s=t.data[1])&&void 0!==s?s:t.data[0]));return new g(t.type,_[r].create(t.data[0],t.data[1]),t.id,t.nsp,new o.default(e.flags,e.rooms,e.except))}}e.default=g,g.TYPE=10,g.DESCRIPTOR_NAME="PacketMessage",g.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}}}},338:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(3545));class i extends n.default{constructor(t,e=[],s=[]){super(),this.flags=t,this.rooms=e,this.except=s}toJSON(){var t,e;return{flags:this.flags?JSON.stringify(this.flags):void 0,rooms:(null===(t=this.rooms)||void 0===t?void 0:t.length)?this.rooms:void 0,except:(null===(e=this.except)||void 0===e?void 0:e.length)?this.except:void 0}}static fromJSON(t){return new i(t.flags&&JSON.parse(t.flags),t.rooms,t.except)}}e.default=i,i.TYPE=11,i.DESCRIPTOR_NAME="PacketOptionsMessage",i.DESCRIPTOR={fields:{flags:{type:"string",id:1},rooms:{type:"string",id:2,rule:"repeated"},except:{type:"string",id:3,rule:"repeated"}}}},6335:function(t,e,s){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,s,r){void 0===r&&(r=s),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[s]}})}:function(t,e,s,r){void 0===r&&(r=s),t[r]=e[s]}),n=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var s in t)"default"!==s&&Object.prototype.hasOwnProperty.call(t,s)&&r(e,t,s);return n(e,t),e},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const a=o(s(799)),c=i(s(817));class u extends a.default{constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(t){return new u(t.data,t.data1)}static create(t,e){return new u(t,e)}}e.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}}}},1694:function(t,e,s){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,s,r){void 0===r&&(r=s),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[s]}})}:function(t,e,s,r){void 0===r&&(r=s),t[r]=e[s]}),n=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var s in t)"default"!==s&&Object.prototype.hasOwnProperty.call(t,s)&&r(e,t,s);return n(e,t),e},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const a=o(s(799)),c=i(s(817));class u extends a.default{constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(t){return new u(t.data,t.data1)}static create(t,e){return new u(t,e)}}e.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}}}},9769:function(t,e,s){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,s,r){void 0===r&&(r=s),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[s]}})}:function(t,e,s,r){void 0===r&&(r=s),t[r]=e[s]}),n=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var s in t)"default"!==s&&Object.prototype.hasOwnProperty.call(t,s)&&r(e,t,s);return n(e,t),e},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const a=o(s(799)),c=i(s(817));class u extends a.default{constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data,data1:this.data1?JSON.stringify(this.data1):void 0}}static fromJSON(t){return new u(t.data,t.data1&&JSON.parse(t.data1))}static create(t,e){return new u(t,e)}}e.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}}}},1797:function(t,e,s){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,s,r){void 0===r&&(r=s),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[s]}})}:function(t,e,s,r){void 0===r&&(r=s),t[r]=e[s]}),n=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var s in t)"default"!==s&&Object.prototype.hasOwnProperty.call(t,s)&&r(e,t,s);return n(e,t),e},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const a=o(s(799)),c=i(s(817));class u extends a.default{constructor(t,e){super(),this.data=t,this.data1=e}toJSON(){return{data:this.data,data1:this.data1}}static fromJSON(t){return new u(t.data,t.data1)}static create(t,e){return new u(t,e)}}e.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}}}},2069:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Decoder=e.Encoder=e.ENCODED_TYPES=void 0;const n=s(170),i=r(s(8735)),o=r(s(817));e.ENCODED_TYPES=[n.PacketType.EVENT,n.PacketType.ACK,n.PacketType.BINARY_ACK,n.PacketType.BINARY_EVENT];class a extends n.Encoder{constructor(t=new i.default){super(),this._packetParser=t}encode(t){if(e.ENCODED_TYPES.includes(t.type))try{return[this._packetParser.encode(t.type,t.data,t.id,t.nsp)]}catch(t){console.error("Can not properly serialize or deserialize messages. Check the original error.",{originalError:{message:t.message}})}return super.encode(t)}}e.Encoder=a;class c extends n.Decoder{constructor(t=new i.default){super(),this._packetParser=t}add(t){if(!o.default.isBuffer(t))return super.add(t);let e;try{e=this._packetParser.decode(t).packet}catch(e){return super.add(t)}super.emitReserved("decoded",e)}}e.Decoder=c},817:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MessageDataTypes=void 0;const s=!("undefined"==typeof process||!process.versions||!process.versions.node);var r,n;(n=r=e.MessageDataTypes||(e.MessageDataTypes={}))[n.BUFFER=1]="BUFFER",n[n.STRING=2]="STRING",n[n.NUMBER=3]="NUMBER",n[n.OBJECT=4]="OBJECT";class i{static getPacketType(...t){let e=0;for(let s=0;s<t.length;s++)e+=t[s]*Math.pow(10,t.length-s-1);return e}static getType(t){if(i.isBuffer(t))return r.BUFFER;const e=typeof t;return"string"===e?r.STRING:"number"===e?r.NUMBER:r.OBJECT}static isBuffer(t){return s&&Buffer.isBuffer(t)||t instanceof ArrayBuffer||t instanceof Uint8Array||this._isBufferView(t)}static _isBufferView(t){return"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer}}e.default=i},1113:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(357));class i{constructor(t,e){this._context=t,this._deferredPromise=function(){let t,e;const s=new Promise(((s,r)=>{t=s,e=r}));return{resolve:t,reject:e,promise:s}}(),this.timeout=setTimeout((()=>this.error(new n.default("Request timeout.",this._context))),e)}get promise(){return this._deferredPromise.promise}response(t){this._deferredPromise.resolve(t)}error(t){this._deferredPromise.reject(t)}}e.default=class{constructor(t){this._context=t,this._requests=new Set}async send(t,e=1e4){const s=this._createRequest(e);try{return t(s),await s.promise}finally{this._finishRequest(s)}}errorAll(t){for(const e of this._requests)e.error(t)}_createRequest(t){const e=new i(this._context,t);return this._requests.add(e),e}_finishRequest(t){this._requests.delete(t),clearTimeout(t.timeout)}}},7158:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.WEB_SOCKET_GATEWAY_STATES=void 0;const n=s(8623),i=r(s(9655)),o=s(2209),a=r(s(1573)),c=r(s(7530)),u=r(s(6754)),d=r(s(357)),l=r(s(8801)),h=s(2069),f=r(s(1113));var p,y;(y=p=e.WEB_SOCKET_GATEWAY_STATES||(e.WEB_SOCKET_GATEWAY_STATES={})).DISCONNECTED="disconnected",y.CONNECTING="connecting",y.CONNECTED="connected";class m{constructor(t,e,s={},r=n.io,o=c.default.get){if(this._token=e,this._options=s,this._connectionProvider=r,this._userFactory=o,this._requestsManager=new f.default(this),this._channels=new Map,this._connectionAttempt=0,!t)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,i.default)(t.replace(/^(?!(?:\w+:)?\/\/)/,"https://")),this.set("state","disconnected"),this.set("socketId",void 0),this.set("me",void 0),this.on("change:state",(async(t,e,s)=>{var r;if(s!==m.STATE_CONNECTED){if(s===m.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(t){}}),{priority:m._CHANGE_STATE_EVENT_PRIORITY}),this.on("error",((t,e)=>{this._options.onError?this._options.onError(e):console.error(e)}))}get sessionId(){return this.socketId}disconnect(){var t;this.state!==p.DISCONNECTED&&(null===(t=this._socket)||void 0===t||t.disconnect(),this._socket=void 0,this.state=p.DISCONNECTED)}async reconnect(){this._socket||this.state!==p.DISCONNECTED||(await this._token.refreshToken(),await this._connect())}static async connect(t,e="local.cs.dev:443/ws-v2",s={},r=n.io,i=c.default.get){const o=new m(e,t,s,r,i);return await o._connect(),o}_sendRequest(t,e,s){if(!t)throw new d.default("`serviceName` must be provided.",this);if(this.state!==m.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(s.length+2),n=new Uint8Array(r);return n[0]=t,n[1]=parseInt(e),n.set(s,2),this._emit(1,n)}_getChannel(t,e){const s=""+t+e;return!this._channels.has(s)&&this._socket&&this._channels.set(s,new a.default(s,this,this._socket)),this._channels.get(s)}_connect(){return new Promise(((t,e)=>{const s=this._setupSocket();!this.socketId&&s.io.on("reconnect_error",(()=>{this._reconnectionAttemptError(e)})),s.once("connect",(async()=>{try{await this._onConnect(),t()}catch(t){e(t)}})),s.connect()}))}_getPortByProtocol(t){return["http:","ws:"].includes(t)?80:443}_setupSocket(){var t;if(this._socket)return this._socket;const e=this._url.port||this._getPortByProtocol(this._url.protocol),s=(this._url.protocol||"https:")+"//"+this._url.hostname+":"+e,r=this._connectionProvider(s,{parser:{Encoder:h.Encoder,Decoder:h.Decoder},path:"/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!==(t=this._options.agent)&&void 0!==t&&t,closeOnBeforeunload:!1});return this.state=p.CONNECTING,r.on("connect",(()=>{this.socketId=r.id})),r.on("connect_error",this._onError.bind(this)),r.on("disconnect",this._onDisconnect.bind(this)),r.io.on("reconnect",this._onReconnect.bind(this)),r.io.on("reconnect_attempt",(t=>{this.state=p.CONNECTING,this._connectionAttempt=t})),r.on("unauthorized",this._onUnauthorized.bind(this)),this._socket=r,r}_emit(t,e){const s=this._socket;return this._requestsManager.send((r=>{s.emit(t,e,((t,e)=>{if(t)return r.error(l.default.fromPublicError(t));r.response(e)}))}),this._options.requestTimeout)}_addAuthData(t,e){this._socketAuth={environmentId:t,userId:e,isAuthenticated:!0}}_removeAuthData(){this._socketAuth=void 0}async _onConnect(){await this._authenticate(this._token.value),this.state=p.CONNECTED;const t=async(t,e,s)=>{try{await this._authenticate(s)}catch(t){}};this._token.on("change:value",t),this._socket.io.off("reconnect_error"),this.on("disconnect",(()=>{this._token.off("change:value",t)}))}async _onReconnect(){await this._token.refreshToken(),await this._onConnect()}_onDisconnect(){this.state=p.DISCONNECTED,this._connectionAttempt=0,this.fire("disconnect");for(const t of this._channels.values())t.remove();this._channels.clear(),void 0===this._options.autoReconnect||this._options.autoReconnect||(this._socket=void 0)}_onError(t){console.warn("Connection to WebSocket server failed. Details: ",{originalError:t})}_reconnectionAttemptError(t){this._connectionAttempt>=2&&(this.disconnect(),t(d.default.fromPublicError({message:"The number of initial connection attempts exceeded.",explanation:"Three initial connection attempts failed. It can be caused by a 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:t}){this._removeAuthData(),this.fire("error",l.default.fromPublicError(t))}async _authenticate(t){try{const e=await this._emit(2,{token:t});this._addAuthData(e.environmentId,e.userId)}catch(t){throw this._removeAuthData(),t}}}m.STATE_DISCONNECTED=p.DISCONNECTED,m.STATE_CONNECTING=p.CONNECTING,m.STATE_CONNECTED=p.CONNECTED,m._CHANGE_STATE_EVENT_PRIORITY=o.priorities.get("highest")+999999,(0,o.mix)(m,o.ObservableMixin),e.default=m},9933:(t,e,s)=>{"use strict";t.exports=s(6386)},2777:(t,e,s)=>{"use strict";var r=e,n=s(238),i=s(7886);function o(t,e,s,r){if(e.resolvedType)if(e.resolvedType instanceof n){t("switch(d%s){",r);for(var i=e.resolvedType.values,o=Object.keys(i),a=0;a<o.length;++a)e.repeated&&i[o[a]]===e.typeDefault&&t("default:"),t("case%j:",o[a])("case %i:",i[o[a]])("m%s=%j",r,i[o[a]])("break");t("}")}else t('if(typeof d%s!=="object")',r)("throw TypeError(%j)",e.fullName+": object expected")("m%s=types[%i].fromObject(d%s)",r,s,r);else{var c=!1;switch(e.type){case"double":case"float":t("m%s=Number(d%s)",r,r);break;case"uint32":case"fixed32":t("m%s=d%s>>>0",r,r);break;case"int32":case"sint32":case"sfixed32":t("m%s=d%s|0",r,r);break;case"uint64":c=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":t("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j",r,r,c)('else if(typeof d%s==="string")',r)("m%s=parseInt(d%s,10)",r,r)('else if(typeof d%s==="number")',r)("m%s=d%s",r,r)('else if(typeof d%s==="object")',r)("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)",r,r,r,c?"true":"");break;case"bytes":t('if(typeof d%s==="string")',r)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)",r,r,r)("else if(d%s.length)",r)("m%s=d%s",r,r);break;case"string":t("m%s=String(d%s)",r,r);break;case"bool":t("m%s=Boolean(d%s)",r,r)}}return t}function a(t,e,s,r){if(e.resolvedType)e.resolvedType instanceof n?t("d%s=o.enums===String?types[%i].values[m%s]:m%s",r,s,r,r):t("d%s=types[%i].toObject(m%s,o)",r,s,r);else{var i=!1;switch(e.type){case"double":case"float":t("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s",r,r,r,r);break;case"uint64":i=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":t('if(typeof m%s==="number")',r)("d%s=o.longs===String?String(m%s):m%s",r,r,r)("else")("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s",r,r,r,r,i?"true":"",r);break;case"bytes":t("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s",r,r,r,r,r);break;default:t("d%s=m%s",r,r)}}return t}r.fromObject=function(t){var e=t.fieldsArray,s=i.codegen(["d"],t.name+"$fromObject")("if(d instanceof this.ctor)")("return d");if(!e.length)return s("return new this.ctor");s("var m=new this.ctor");for(var r=0;r<e.length;++r){var a=e[r].resolve(),c=i.safeProp(a.name);a.map?(s("if(d%s){",c)('if(typeof d%s!=="object")',c)("throw TypeError(%j)",a.fullName+": object expected")("m%s={}",c)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){",c),o(s,a,r,c+"[ks[i]]")("}")("}")):a.repeated?(s("if(d%s){",c)("if(!Array.isArray(d%s))",c)("throw TypeError(%j)",a.fullName+": array expected")("m%s=[]",c)("for(var i=0;i<d%s.length;++i){",c),o(s,a,r,c+"[i]")("}")("}")):(a.resolvedType instanceof n||s("if(d%s!=null){",c),o(s,a,r,c),a.resolvedType instanceof n||s("}"))}return s("return m")},r.toObject=function(t){var e=t.fieldsArray.slice().sort(i.compareFieldsById);if(!e.length)return i.codegen()("return {}");for(var s=i.codegen(["m","o"],t.name+"$toObject")("if(!o)")("o={}")("var d={}"),r=[],o=[],c=[],u=0;u<e.length;++u)e[u].partOf||(e[u].resolve().repeated?r:e[u].map?o:c).push(e[u]);if(r.length){for(s("if(o.arrays||o.defaults){"),u=0;u<r.length;++u)s("d%s=[]",i.safeProp(r[u].name));s("}")}if(o.length){for(s("if(o.objects||o.defaults){"),u=0;u<o.length;++u)s("d%s={}",i.safeProp(o[u].name));s("}")}if(c.length){for(s("if(o.defaults){"),u=0;u<c.length;++u){var d=c[u],l=i.safeProp(d.name);if(d.resolvedType instanceof n)s("d%s=o.enums===String?%j:%j",l,d.resolvedType.valuesById[d.typeDefault],d.typeDefault);else if(d.long)s("if(util.Long){")("var n=new util.Long(%i,%i,%j)",d.typeDefault.low,d.typeDefault.high,d.typeDefault.unsigned)("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n",l)("}else")("d%s=o.longs===String?%j:%i",l,d.typeDefault.toString(),d.typeDefault.toNumber());else if(d.bytes){var h="["+Array.prototype.slice.call(d.typeDefault).join(",")+"]";s("if(o.bytes===String)d%s=%j",l,String.fromCharCode.apply(String,d.typeDefault))("else{")("d%s=%s",l,h)("if(o.bytes!==Array)d%s=util.newBuffer(d%s)",l,l)("}")}else s("d%s=%j",l,d.typeDefault)}s("}")}var f=!1;for(u=0;u<e.length;++u){d=e[u];var p=t._fieldsArray.indexOf(d);l=i.safeProp(d.name);d.map?(f||(f=!0,s("var ks2")),s("if(m%s&&(ks2=Object.keys(m%s)).length){",l,l)("d%s={}",l)("for(var j=0;j<ks2.length;++j){"),a(s,d,p,l+"[ks2[j]]")("}")):d.repeated?(s("if(m%s&&m%s.length){",l,l)("d%s=[]",l)("for(var j=0;j<m%s.length;++j){",l),a(s,d,p,l+"[j]")("}")):(s("if(m%s!=null&&m.hasOwnProperty(%j)){",l,d.name),a(s,d,p,l),d.partOf&&s("if(o.oneofs)")("d%s=%j",i.safeProp(d.partOf.name),d.name)),s("}")}return s("return d")}},8159:(t,e,s)=>{"use strict";t.exports=function(t){var e=i.codegen(["r","l"],t.name+"$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new this.ctor"+(t.fieldsArray.filter((function(t){return t.map})).length?",k,value":""))("while(r.pos<c){")("var t=r.uint32()");t.group&&e("if((t&7)===4)")("break");e("switch(t>>>3){");for(var s=0;s<t.fieldsArray.length;++s){var a=t._fieldsArray[s].resolve(),c=a.resolvedType instanceof r?"int32":a.type,u="m"+i.safeProp(a.name);e("case %i:",a.id),a.map?(e("if(%s===util.emptyObject)",u)("%s={}",u)("var c2 = r.uint32()+r.pos"),void 0!==n.defaults[a.keyType]?e("k=%j",n.defaults[a.keyType]):e("k=null"),void 0!==n.defaults[c]?e("value=%j",n.defaults[c]):e("value=null"),e("while(r.pos<c2){")("var tag2=r.uint32()")("switch(tag2>>>3){")("case 1: k=r.%s(); break",a.keyType)("case 2:"),void 0===n.basic[c]?e("value=types[%i].decode(r,r.uint32())",s):e("value=r.%s()",c),e("break")("default:")("r.skipType(tag2&7)")("break")("}")("}"),void 0!==n.long[a.keyType]?e('%s[typeof k==="object"?util.longToHash(k):k]=value',u):e("%s[k]=value",u)):a.repeated?(e("if(!(%s&&%s.length))",u,u)("%s=[]",u),void 0!==n.packed[c]&&e("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())",u,c)("}else"),void 0===n.basic[c]?e(a.resolvedType.group?"%s.push(types[%i].decode(r))":"%s.push(types[%i].decode(r,r.uint32()))",u,s):e("%s.push(r.%s())",u,c)):void 0===n.basic[c]?e(a.resolvedType.group?"%s=types[%i].decode(r)":"%s=types[%i].decode(r,r.uint32())",u,s):e("%s=r.%s()",u,c),e("break")}for(e("default:")("r.skipType(t&7)")("break")("}")("}"),s=0;s<t._fieldsArray.length;++s){var d=t._fieldsArray[s];d.required&&e("if(!m.hasOwnProperty(%j))",d.name)("throw util.ProtocolError(%j,{instance:m})",o(d))}return e("return m")};var r=s(238),n=s(8372),i=s(7886);function o(t){return"missing required '"+t.name+"'"}},8357:(t,e,s)=>{"use strict";t.exports=function(t){for(var e,s=i.codegen(["m","w"],t.name+"$encode")("if(!w)")("w=Writer.create()"),a=t.fieldsArray.slice().sort(i.compareFieldsById),c=0;c<a.length;++c){var u=a[c].resolve(),d=t._fieldsArray.indexOf(u),l=u.resolvedType instanceof r?"int32":u.type,h=n.basic[l];e="m"+i.safeProp(u.name),u.map?(s("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){",e,u.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",e)("w.uint32(%i).fork().uint32(%i).%s(ks[i])",(u.id<<3|2)>>>0,8|n.mapKey[u.keyType],u.keyType),void 0===h?s("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",d,e):s(".uint32(%i).%s(%s[ks[i]]).ldelim()",16|h,l,e),s("}")("}")):u.repeated?(s("if(%s!=null&&%s.length){",e,e),u.packed&&void 0!==n.packed[l]?s("w.uint32(%i).fork()",(u.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",e)("w.%s(%s[i])",l,e)("w.ldelim()"):(s("for(var i=0;i<%s.length;++i)",e),void 0===h?o(s,u,d,e+"[i]"):s("w.uint32(%i).%s(%s[i])",(u.id<<3|h)>>>0,l,e)),s("}")):(u.optional&&s("if(%s!=null&&Object.hasOwnProperty.call(m,%j))",e,u.name),void 0===h?o(s,u,d,e):s("w.uint32(%i).%s(%s)",(u.id<<3|h)>>>0,l,e))}return s("return w")};var r=s(238),n=s(8372),i=s(7886);function o(t,e,s,r){return e.resolvedType.group?t("types[%i].encode(%s,w.uint32(%i)).uint32(%i)",s,r,(e.id<<3|3)>>>0,(e.id<<3|4)>>>0):t("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()",s,r,(e.id<<3|2)>>>0)}},238:(t,e,s)=>{"use strict";t.exports=o;var r=s(6913);((o.prototype=Object.create(r.prototype)).constructor=o).className="Enum";var n=s(9587),i=s(7886);function o(t,e,s,n,i){if(r.call(this,t,s),e&&"object"!=typeof e)throw TypeError("values must be an object");if(this.valuesById={},this.values=Object.create(this.valuesById),this.comment=n,this.comments=i||{},this.reserved=void 0,e)for(var o=Object.keys(e),a=0;a<o.length;++a)"number"==typeof e[o[a]]&&(this.valuesById[this.values[o[a]]=e[o[a]]]=o[a])}o.fromJSON=function(t,e){var s=new o(t,e.values,e.options,e.comment,e.comments);return s.reserved=e.reserved,s},o.prototype.toJSON=function(t){var e=!!t&&Boolean(t.keepComments);return i.toObject(["options",this.options,"values",this.values,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"comment",e?this.comment:void 0,"comments",e?this.comments:void 0])},o.prototype.add=function(t,e,s){if(!i.isString(t))throw TypeError("name must be a string");if(!i.isInteger(e))throw TypeError("id must be an integer");if(void 0!==this.values[t])throw Error("duplicate name '"+t+"' in "+this);if(this.isReservedId(e))throw Error("id "+e+" is reserved in "+this);if(this.isReservedName(t))throw Error("name '"+t+"' is reserved in "+this);if(void 0!==this.valuesById[e]){if(!this.options||!this.options.allow_alias)throw Error("duplicate id "+e+" in "+this);this.values[t]=e}else this.valuesById[this.values[t]=e]=t;return this.comments[t]=s||null,this},o.prototype.remove=function(t){if(!i.isString(t))throw TypeError("name must be a string");var e=this.values[t];if(null==e)throw Error("name '"+t+"' does not exist in "+this);return delete this.valuesById[e],delete this.values[t],delete this.comments[t],this},o.prototype.isReservedId=function(t){return n.isReservedId(this.reserved,t)},o.prototype.isReservedName=function(t){return n.isReservedName(this.reserved,t)}},5263:(t,e,s)=>{"use strict";t.exports=u;var r=s(6913);((u.prototype=Object.create(r.prototype)).constructor=u).className="Field";var n,i=s(238),o=s(8372),a=s(7886),c=/^required|optional|repeated$/;function u(t,e,s,n,i,u,d){if(a.isObject(n)?(d=i,u=n,n=i=void 0):a.isObject(i)&&(d=u,u=i,i=void 0),r.call(this,t,u),!a.isInteger(e)||e<0)throw TypeError("id must be a non-negative integer");if(!a.isString(s))throw TypeError("type must be a string");if(void 0!==n&&!c.test(n=n.toString().toLowerCase()))throw TypeError("rule must be a string rule");if(void 0!==i&&!a.isString(i))throw TypeError("extend must be a string");"proto3_optional"===n&&(n="optional"),this.rule=n&&"optional"!==n?n:void 0,this.type=s,this.id=e,this.extend=i||void 0,this.required="required"===n,this.optional=!this.required,this.repeated="repeated"===n,this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=!!a.Long&&void 0!==o.long[s],this.bytes="bytes"===s,this.resolvedType=null,this.extensionField=null,this.declaringField=null,this._packed=null,this.comment=d}u.fromJSON=function(t,e){return new u(t,e.id,e.type,e.rule,e.extend,e.options,e.comment)},Object.defineProperty(u.prototype,"packed",{get:function(){return null===this._packed&&(this._packed=!1!==this.getOption("packed")),this._packed}}),u.prototype.setOption=function(t,e,s){return"packed"===t&&(this._packed=null),r.prototype.setOption.call(this,t,e,s)},u.prototype.toJSON=function(t){var e=!!t&&Boolean(t.keepComments);return a.toObject(["rule","optional"!==this.rule&&this.rule||void 0,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",e?this.comment:void 0])},u.prototype.resolve=function(){if(this.resolved)return this;if(void 0===(this.typeDefault=o.defaults[this.type])&&(this.resolvedType=(this.declaringField?this.declaringField.parent:this.parent).lookupTypeOrEnum(this.type),this.resolvedType instanceof n?this.typeDefault=null:this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]),this.options&&null!=this.options.default&&(this.typeDefault=this.options.default,this.resolvedType instanceof i&&"string"==typeof this.typeDefault&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.options&&(!0!==this.options.packed&&(void 0===this.options.packed||!this.resolvedType||this.resolvedType instanceof i)||delete this.options.packed,Object.keys(this.options).length||(this.options=void 0)),this.long)this.typeDefault=a.Long.fromNumber(this.typeDefault,"u"===this.type.charAt(0)),Object.freeze&&Object.freeze(this.typeDefault);else if(this.bytes&&"string"==typeof this.typeDefault){var t;a.base64.test(this.typeDefault)?a.base64.decode(this.typeDefault,t=a.newBuffer(a.base64.length(this.typeDefault)),0):a.utf8.write(this.typeDefault,t=a.newBuffer(a.utf8.length(this.typeDefault)),0),this.typeDefault=t}return this.map?this.defaultValue=a.emptyObject:this.repeated?this.defaultValue=a.emptyArray:this.defaultValue=this.typeDefault,this.parent instanceof n&&(this.parent.ctor.prototype[this.name]=this.defaultValue),r.prototype.resolve.call(this)},u.d=function(t,e,s,r){return"function"==typeof e?e=a.decorateType(e).name:e&&"object"==typeof e&&(e=a.decorateEnum(e).name),function(n,i){a.decorateType(n.constructor).add(new u(i,t,e,s,{default:r}))}},u._configure=function(t){n=t}},6386:(t,e,s)=>{"use strict";var r=t.exports=s(2877);r.build="light",r.load=function(t,e,s){return"function"==typeof e?(s=e,e=new r.Root):e||(e=new r.Root),e.load(t,s)},r.loadSync=function(t,e){return e||(e=new r.Root),e.loadSync(t)},r.encoder=s(8357),r.decoder=s(8159),r.verifier=s(5669),r.converter=s(2777),r.ReflectionObject=s(6913),r.Namespace=s(9587),r.Root=s(6720),r.Enum=s(238),r.Type=s(396),r.Field=s(5263),r.OneOf=s(8930),r.MapField=s(6977),r.Service=s(5280),r.Method=s(9455),r.Message=s(5986),r.wrappers=s(2016),r.types=s(8372),r.util=s(7886),r.ReflectionObject._configure(r.Root),r.Namespace._configure(r.Type,r.Service,r.Enum),r.Root._configure(r.Type),r.Field._configure(r.Type)},2877:(t,e,s)=>{"use strict";var r=e;function n(){r.util._configure(),r.Writer._configure(r.BufferWriter),r.Reader._configure(r.BufferReader)}r.build="minimal",r.Writer=s(3117),r.BufferWriter=s(4766),r.Reader=s(9924),r.BufferReader=s(6515),r.util=s(4652),r.rpc=s(8607),r.roots=s(9188),r.configure=n,n()},6977:(t,e,s)=>{"use strict";t.exports=o;var r=s(5263);((o.prototype=Object.create(r.prototype)).constructor=o).className="MapField";var n=s(8372),i=s(7886);function o(t,e,s,n,o,a){if(r.call(this,t,e,n,void 0,void 0,o,a),!i.isString(s))throw TypeError("keyType must be a string");this.keyType=s,this.resolvedKeyType=null,this.map=!0}o.fromJSON=function(t,e){return new o(t,e.id,e.keyType,e.type,e.options,e.comment)},o.prototype.toJSON=function(t){var e=!!t&&Boolean(t.keepComments);return i.toObject(["keyType",this.keyType,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",e?this.comment:void 0])},o.prototype.resolve=function(){if(this.resolved)return this;if(void 0===n.mapKey[this.keyType])throw Error("invalid key type: "+this.keyType);return r.prototype.resolve.call(this)},o.d=function(t,e,s){return"function"==typeof s?s=i.decorateType(s).name:s&&"object"==typeof s&&(s=i.decorateEnum(s).name),function(r,n){i.decorateType(r.constructor).add(new o(n,t,e,s))}}},5986:(t,e,s)=>{"use strict";t.exports=n;var r=s(4652);function n(t){if(t)for(var e=Object.keys(t),s=0;s<e.length;++s)this[e[s]]=t[e[s]]}n.create=function(t){return this.$type.create(t)},n.encode=function(t,e){return this.$type.encode(t,e)},n.encodeDelimited=function(t,e){return this.$type.encodeDelimited(t,e)},n.decode=function(t){return this.$type.decode(t)},n.decodeDelimited=function(t){return this.$type.decodeDelimited(t)},n.verify=function(t){return this.$type.verify(t)},n.fromObject=function(t){return this.$type.fromObject(t)},n.toObject=function(t,e){return this.$type.toObject(t,e)},n.prototype.toJSON=function(){return this.$type.toObject(this,r.toJSONOptions)}},9455:(t,e,s)=>{"use strict";t.exports=i;var r=s(6913);((i.prototype=Object.create(r.prototype)).constructor=i).className="Method";var n=s(7886);function i(t,e,s,i,o,a,c,u,d){if(n.isObject(o)?(c=o,o=a=void 0):n.isObject(a)&&(c=a,a=void 0),void 0!==e&&!n.isString(e))throw TypeError("type must be a string");if(!n.isString(s))throw TypeError("requestType must be a string");if(!n.isString(i))throw TypeError("responseType must be a string");r.call(this,t,c),this.type=e||"rpc",this.requestType=s,this.requestStream=!!o||void 0,this.responseType=i,this.responseStream=!!a||void 0,this.resolvedRequestType=null,this.resolvedResponseType=null,this.comment=u,this.parsedOptions=d}i.fromJSON=function(t,e){return new i(t,e.type,e.requestType,e.responseType,e.requestStream,e.responseStream,e.options,e.comment,e.parsedOptions)},i.prototype.toJSON=function(t){var e=!!t&&Boolean(t.keepComments);return n.toObject(["type","rpc"!==this.type&&this.type||void 0,"requestType",this.requestType,"requestStream",this.requestStream,"responseType",this.responseType,"responseStream",this.responseStream,"options",this.options,"comment",e?this.comment:void 0,"parsedOptions",this.parsedOptions])},i.prototype.resolve=function(){return this.resolved?this:(this.resolvedRequestType=this.parent.lookupType(this.requestType),this.resolvedResponseType=this.parent.lookupType(this.responseType),r.prototype.resolve.call(this))}},9587:(t,e,s)=>{"use strict";t.exports=l;var r=s(6913);((l.prototype=Object.create(r.prototype)).constructor=l).className="Namespace";var n,i,o,a=s(5263),c=s(8930),u=s(7886);function d(t,e){if(t&&t.length){for(var s={},r=0;r<t.length;++r)s[t[r].name]=t[r].toJSON(e);return s}}function l(t,e){r.call(this,t,e),this.nested=void 0,this._nestedArray=null}function h(t){return t._nestedArray=null,t}l.fromJSON=function(t,e){return new l(t,e.options).addJSON(e.nested)},l.arrayToJSON=d,l.isReservedId=function(t,e){if(t)for(var s=0;s<t.length;++s)if("string"!=typeof t[s]&&t[s][0]<=e&&t[s][1]>e)return!0;return!1},l.isReservedName=function(t,e){if(t)for(var s=0;s<t.length;++s)if(t[s]===e)return!0;return!1},Object.defineProperty(l.prototype,"nestedArray",{get:function(){return this._nestedArray||(this._nestedArray=u.toArray(this.nested))}}),l.prototype.toJSON=function(t){return u.toObject(["options",this.options,"nested",d(this.nestedArray,t)])},l.prototype.addJSON=function(t){if(t)for(var e,s=Object.keys(t),r=0;r<s.length;++r)e=t[s[r]],this.add((void 0!==e.fields?n.fromJSON:void 0!==e.values?o.fromJSON:void 0!==e.methods?i.fromJSON:void 0!==e.id?a.fromJSON:l.fromJSON)(s[r],e));return this},l.prototype.get=function(t){return this.nested&&this.nested[t]||null},l.prototype.getEnum=function(t){if(this.nested&&this.nested[t]instanceof o)return this.nested[t].values;throw Error("no such enum: "+t)},l.prototype.add=function(t){if(!(t instanceof a&&void 0!==t.extend||t instanceof n||t instanceof o||t instanceof i||t instanceof l||t instanceof c))throw TypeError("object must be a valid nested object");if(this.nested){var e=this.get(t.name);if(e){if(!(e instanceof l&&t instanceof l)||e instanceof n||e instanceof i)throw Error("duplicate name '"+t.name+"' in "+this);for(var s=e.nestedArray,r=0;r<s.length;++r)t.add(s[r]);this.remove(e),this.nested||(this.nested={}),t.setOptions(e.options,!0)}}else this.nested={};return this.nested[t.name]=t,t.onAdd(this),h(this)},l.prototype.remove=function(t){if(!(t instanceof r))throw TypeError("object must be a ReflectionObject");if(t.parent!==this)throw Error(t+" is not a member of "+this);return delete this.nested[t.name],Object.keys(this.nested).length||(this.nested=void 0),t.onRemove(this),h(this)},l.prototype.define=function(t,e){if(u.isString(t))t=t.split(".");else if(!Array.isArray(t))throw TypeError("illegal path");if(t&&t.length&&""===t[0])throw Error("path must be relative");for(var s=this;t.length>0;){var r=t.shift();if(s.nested&&s.nested[r]){if(!((s=s.nested[r])instanceof l))throw Error("path conflicts with non-namespace objects")}else s.add(s=new l(r))}return e&&s.addJSON(e),s},l.prototype.resolveAll=function(){for(var t=this.nestedArray,e=0;e<t.length;)t[e]instanceof l?t[e++].resolveAll():t[e++].resolve();return this.resolve()},l.prototype.lookup=function(t,e,s){if("boolean"==typeof e?(s=e,e=void 0):e&&!Array.isArray(e)&&(e=[e]),u.isString(t)&&t.length){if("."===t)return this.root;t=t.split(".")}else if(!t.length)return this;if(""===t[0])return this.root.lookup(t.slice(1),e);var r=this.get(t[0]);if(r){if(1===t.length){if(!e||e.indexOf(r.constructor)>-1)return r}else if(r instanceof l&&(r=r.lookup(t.slice(1),e,!0)))return r}else for(var n=0;n<this.nestedArray.length;++n)if(this._nestedArray[n]instanceof l&&(r=this._nestedArray[n].lookup(t,e,!0)))return r;return null===this.parent||s?null:this.parent.lookup(t,e)},l.prototype.lookupType=function(t){var e=this.lookup(t,[n]);if(!e)throw Error("no such type: "+t);return e},l.prototype.lookupEnum=function(t){var e=this.lookup(t,[o]);if(!e)throw Error("no such Enum '"+t+"' in "+this);return e},l.prototype.lookupTypeOrEnum=function(t){var e=this.lookup(t,[n,o]);if(!e)throw Error("no such Type or Enum '"+t+"' in "+this);return e},l.prototype.lookupService=function(t){var e=this.lookup(t,[i]);if(!e)throw Error("no such Service '"+t+"' in "+this);return e},l._configure=function(t,e,s){n=t,i=e,o=s}},6913:(t,e,s)=>{"use strict";t.exports=i,i.className="ReflectionObject";var r,n=s(7886);function i(t,e){if(!n.isString(t))throw TypeError("name must be a string");if(e&&!n.isObject(e))throw TypeError("options must be an object");this.options=e,this.parsedOptions=null,this.name=t,this.parent=null,this.resolved=!1,this.comment=null,this.filename=null}Object.defineProperties(i.prototype,{root:{get:function(){for(var t=this;null!==t.parent;)t=t.parent;return t}},fullName:{get:function(){for(var t=[this.name],e=this.parent;e;)t.unshift(e.name),e=e.parent;return t.join(".")}}}),i.prototype.toJSON=function(){throw Error()},i.prototype.onAdd=function(t){this.parent&&this.parent!==t&&this.parent.remove(this),this.parent=t,this.resolved=!1;var e=t.root;e instanceof r&&e._handleAdd(this)},i.prototype.onRemove=function(t){var e=t.root;e instanceof r&&e._handleRemove(this),this.parent=null,this.resolved=!1},i.prototype.resolve=function(){return this.resolved||this.root instanceof r&&(this.resolved=!0),this},i.prototype.getOption=function(t){if(this.options)return this.options[t]},i.prototype.setOption=function(t,e,s){return s&&this.options&&void 0!==this.options[t]||((this.options||(this.options={}))[t]=e),this},i.prototype.setParsedOption=function(t,e,s){this.parsedOptions||(this.parsedOptions=[]);var r=this.parsedOptions;if(s){var i=r.find((function(e){return Object.prototype.hasOwnProperty.call(e,t)}));if(i){var o=i[t];n.setProperty(o,s,e)}else(i={})[t]=n.setProperty({},s,e),r.push(i)}else{var a={};a[t]=e,r.push(a)}return this},i.prototype.setOptions=function(t,e){if(t)for(var s=Object.keys(t),r=0;r<s.length;++r)this.setOption(s[r],t[s[r]],e);return this},i.prototype.toString=function(){var t=this.constructor.className,e=this.fullName;return e.length?t+" "+e:t},i._configure=function(t){r=t}},8930:(t,e,s)=>{"use strict";t.exports=o;var r=s(6913);((o.prototype=Object.create(r.prototype)).constructor=o).className="OneOf";var n=s(5263),i=s(7886);function o(t,e,s,n){if(Array.isArray(e)||(s=e,e=void 0),r.call(this,t,s),void 0!==e&&!Array.isArray(e))throw TypeError("fieldNames must be an Array");this.oneof=e||[],this.fieldsArray=[],this.comment=n}function a(t){if(t.parent)for(var e=0;e<t.fieldsArray.length;++e)t.fieldsArray[e].parent||t.parent.add(t.fieldsArray[e])}o.fromJSON=function(t,e){return new o(t,e.oneof,e.options,e.comment)},o.prototype.toJSON=function(t){var e=!!t&&Boolean(t.keepComments);return i.toObject(["options",this.options,"oneof",this.oneof,"comment",e?this.comment:void 0])},o.prototype.add=function(t){if(!(t instanceof n))throw TypeError("field must be a Field");return t.parent&&t.parent!==this.parent&&t.parent.remove(t),this.oneof.push(t.name),this.fieldsArray.push(t),t.partOf=this,a(this),this},o.prototype.remove=function(t){if(!(t instanceof n))throw TypeError("field must be a Field");var e=this.fieldsArray.indexOf(t);if(e<0)throw Error(t+" is not a member of "+this);return this.fieldsArray.splice(e,1),(e=this.oneof.indexOf(t.name))>-1&&this.oneof.splice(e,1),t.partOf=null,this},o.prototype.onAdd=function(t){r.prototype.onAdd.call(this,t);for(var e=0;e<this.oneof.length;++e){var s=t.get(this.oneof[e]);s&&!s.partOf&&(s.partOf=this,this.fieldsArray.push(s))}a(this)},o.prototype.onRemove=function(t){for(var e,s=0;s<this.fieldsArray.length;++s)(e=this.fieldsArray[s]).parent&&e.parent.remove(e);r.prototype.onRemove.call(this,t)},o.d=function(){for(var t=new Array(arguments.length),e=0;e<arguments.length;)t[e]=arguments[e++];return function(e,s){i.decorateType(e.constructor).add(new o(s,t)),Object.defineProperty(e,s,{get:i.oneOfGetter(t),set:i.oneOfSetter(t)})}}},9924:(t,e,s)=>{"use strict";t.exports=c;var r,n=s(4652),i=n.LongBits,o=n.utf8;function a(t,e){return RangeError("index out of range: "+t.pos+" + "+(e||1)+" > "+t.len)}function c(t){this.buf=t,this.pos=0,this.len=t.length}var u,d="undefined"!=typeof Uint8Array?function(t){if(t instanceof Uint8Array||Array.isArray(t))return new c(t);throw Error("illegal buffer")}:function(t){if(Array.isArray(t))return new c(t);throw Error("illegal buffer")},l=function(){return n.Buffer?function(t){return(c.create=function(t){return n.Buffer.isBuffer(t)?new r(t):d(t)})(t)}:d};function h(){var t=new i(0,0),e=0;if(!(this.len-this.pos>4)){for(;e<3;++e){if(this.pos>=this.len)throw a(this);if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*e)>>>0,this.buf[this.pos++]<128)return t}return t.lo=(t.lo|(127&this.buf[this.pos++])<<7*e)>>>0,t}for(;e<4;++e)if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*e)>>>0,this.buf[this.pos++]<128)return t;if(t.lo=(t.lo|(127&this.buf[this.pos])<<28)>>>0,t.hi=(t.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return t;if(e=0,this.len-this.pos>4){for(;e<5;++e)if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*e+3)>>>0,this.buf[this.pos++]<128)return t}else for(;e<5;++e){if(this.pos>=this.len)throw a(this);if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*e+3)>>>0,this.buf[this.pos++]<128)return t}throw Error("invalid varint encoding")}function f(t,e){return(t[e-4]|t[e-3]<<8|t[e-2]<<16|t[e-1]<<24)>>>0}function p(){if(this.pos+8>this.len)throw a(this,8);return new i(f(this.buf,this.pos+=4),f(this.buf,this.pos+=4))}c.create=l(),c.prototype._slice=n.Array.prototype.subarray||n.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 t=this.uint32();return t>>>1^-(1&t)|0},c.prototype.bool=function(){return 0!==this.uint32()},c.prototype.fixed32=function(){if(this.pos+4>this.len)throw a(this,4);return f(this.buf,this.pos+=4)},c.prototype.sfixed32=function(){if(this.pos+4>this.len)throw a(this,4);return 0|f(this.buf,this.pos+=4)},c.prototype.float=function(){if(this.pos+4>this.len)throw a(this,4);var t=n.float.readFloatLE(this.buf,this.pos);return this.pos+=4,t},c.prototype.double=function(){if(this.pos+8>this.len)throw a(this,4);var t=n.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,t},c.prototype.bytes=function(){var t=this.uint32(),e=this.pos,s=this.pos+t;if(s>this.len)throw a(this,t);return this.pos+=t,Array.isArray(this.buf)?this.buf.slice(e,s):e===s?new this.buf.constructor(0):this._slice.call(this.buf,e,s)},c.prototype.string=function(){var t=this.bytes();return o.read(t,0,t.length)},c.prototype.skip=function(t){if("number"==typeof t){if(this.pos+t>this.len)throw a(this,t);this.pos+=t}else do{if(this.pos>=this.len)throw a(this)}while(128&this.buf[this.pos++]);return this},c.prototype.skipType=function(t){switch(t){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(t=7&this.uint32());)this.skipType(t);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+t+" at offset "+this.pos)}return this},c._configure=function(t){r=t,c.create=l(),r._configure();var e=n.Long?"toLong":"toNumber";n.merge(c.prototype,{int64:function(){return h.call(this)[e](!1)},uint64:function(){return h.call(this)[e](!0)},sint64:function(){return h.call(this).zzDecode()[e](!1)},fixed64:function(){return p.call(this)[e](!0)},sfixed64:function(){return p.call(this)[e](!1)}})}},6515:(t,e,s)=>{"use strict";t.exports=i;var r=s(9924);(i.prototype=Object.create(r.prototype)).constructor=i;var n=s(4652);function i(t){r.call(this,t)}i._configure=function(){n.Buffer&&(i.prototype._slice=n.Buffer.prototype.slice)},i.prototype.string=function(){var t=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+t,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+t,this.len))},i._configure()},6720:(t,e,s)=>{"use strict";t.exports=l;var r=s(9587);((l.prototype=Object.create(r.prototype)).constructor=l).className="Root";var n,i,o,a=s(5263),c=s(238),u=s(8930),d=s(7886);function l(t){r.call(this,"",t),this.deferred=[],this.files=[]}function h(){}l.fromJSON=function(t,e){return e||(e=new l),t.options&&e.setOptions(t.options),e.addJSON(t.nested)},l.prototype.resolvePath=d.path.resolve,l.prototype.fetch=d.fetch,l.prototype.load=function t(e,s,r){"function"==typeof s&&(r=s,s=void 0);var n=this;if(!r)return d.asPromise(t,n,e,s);var a=r===h;function c(t,e){if(r){var s=r;if(r=null,a)throw t;s(t,e)}}function u(t){var e=t.lastIndexOf("google/protobuf/");if(e>-1){var s=t.substring(e);if(s in o)return s}return null}function l(t,e){try{if(d.isString(e)&&"{"===e.charAt(0)&&(e=JSON.parse(e)),d.isString(e)){i.filename=t;var r,o=i(e,n,s),l=0;if(o.imports)for(;l<o.imports.length;++l)(r=u(o.imports[l])||n.resolvePath(t,o.imports[l]))&&f(r);if(o.weakImports)for(l=0;l<o.weakImports.length;++l)(r=u(o.weakImports[l])||n.resolvePath(t,o.weakImports[l]))&&f(r,!0)}else n.setOptions(e.options).addJSON(e.nested)}catch(t){c(t)}a||p||c(null,n)}function f(t,e){if(!(n.files.indexOf(t)>-1))if(n.files.push(t),t in o)a?l(t,o[t]):(++p,setTimeout((function(){--p,l(t,o[t])})));else if(a){var s;try{s=d.fs.readFileSync(t).toString("utf8")}catch(t){return void(e||c(t))}l(t,s)}else++p,n.fetch(t,(function(s,i){--p,r&&(s?e?p||c(null,n):c(s):l(t,i))}))}var p=0;d.isString(e)&&(e=[e]);for(var y,m=0;m<e.length;++m)(y=n.resolvePath("",e[m]))&&f(y);if(a)return n;p||c(null,n)},l.prototype.loadSync=function(t,e){if(!d.isNode)throw Error("not supported");return this.load(t,e,h)},l.prototype.resolveAll=function(){if(this.deferred.length)throw Error("unresolvable extensions: "+this.deferred.map((function(t){return"'extend "+t.extend+"' in "+t.parent.fullName})).join(", "));return r.prototype.resolveAll.call(this)};var f=/^[A-Z]/;function p(t,e){var s=e.parent.lookup(e.extend);if(s){var r=new a(e.fullName,e.id,e.type,e.rule,void 0,e.options);return r.declaringField=e,e.extensionField=r,s.add(r),!0}return!1}l.prototype._handleAdd=function(t){if(t instanceof a)void 0===t.extend||t.extensionField||p(0,t)||this.deferred.push(t);else if(t instanceof c)f.test(t.name)&&(t.parent[t.name]=t.values);else if(!(t instanceof u)){if(t instanceof n)for(var e=0;e<this.deferred.length;)p(0,this.deferred[e])?this.deferred.splice(e,1):++e;for(var s=0;s<t.nestedArray.length;++s)this._handleAdd(t._nestedArray[s]);f.test(t.name)&&(t.parent[t.name]=t)}},l.prototype._handleRemove=function(t){if(t instanceof a){if(void 0!==t.extend)if(t.extensionField)t.extensionField.parent.remove(t.extensionField),t.extensionField=null;else{var e=this.deferred.indexOf(t);e>-1&&this.deferred.splice(e,1)}}else if(t instanceof c)f.test(t.name)&&delete t.parent[t.name];else if(t instanceof r){for(var s=0;s<t.nestedArray.length;++s)this._handleRemove(t._nestedArray[s]);f.test(t.name)&&delete t.parent[t.name]}},l._configure=function(t,e,s){n=t,i=e,o=s}},9188:t=>{"use strict";t.exports={}},8607:(t,e,s)=>{"use strict";e.Service=s(8887)},8887:(t,e,s)=>{"use strict";t.exports=n;var r=s(4652);function n(t,e,s){if("function"!=typeof t)throw TypeError("rpcImpl must be a function");r.EventEmitter.call(this),this.rpcImpl=t,this.requestDelimited=Boolean(e),this.responseDelimited=Boolean(s)}(n.prototype=Object.create(r.EventEmitter.prototype)).constructor=n,n.prototype.rpcCall=function t(e,s,n,i,o){if(!i)throw TypeError("request must be specified");var a=this;if(!o)return r.asPromise(t,a,e,s,n,i);if(a.rpcImpl)try{return a.rpcImpl(e,s[a.requestDelimited?"encodeDelimited":"encode"](i).finish(),(function(t,s){if(t)return a.emit("error",t,e),o(t);if(null!==s){if(!(s instanceof n))try{s=n[a.responseDelimited?"decodeDelimited":"decode"](s)}catch(t){return a.emit("error",t,e),o(t)}return a.emit("data",s,e),o(null,s)}a.end(!0)}))}catch(t){return a.emit("error",t,e),void setTimeout((function(){o(t)}),0)}else setTimeout((function(){o(Error("already ended"))}),0)},n.prototype.end=function(t){return this.rpcImpl&&(t||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},5280:(t,e,s)=>{"use strict";t.exports=a;var r=s(9587);((a.prototype=Object.create(r.prototype)).constructor=a).className="Service";var n=s(9455),i=s(7886),o=s(8607);function a(t,e){r.call(this,t,e),this.methods={},this._methodsArray=null}function c(t){return t._methodsArray=null,t}a.fromJSON=function(t,e){var s=new a(t,e.options);if(e.methods)for(var r=Object.keys(e.methods),i=0;i<r.length;++i)s.add(n.fromJSON(r[i],e.methods[r[i]]));return e.nested&&s.addJSON(e.nested),s.comment=e.comment,s},a.prototype.toJSON=function(t){var e=r.prototype.toJSON.call(this,t),s=!!t&&Boolean(t.keepComments);return i.toObject(["options",e&&e.options||void 0,"methods",r.arrayToJSON(this.methodsArray,t)||{},"nested",e&&e.nested||void 0,"comment",s?this.comment:void 0])},Object.defineProperty(a.prototype,"methodsArray",{get:function(){return this._methodsArray||(this._methodsArray=i.toArray(this.methods))}}),a.prototype.get=function(t){return this.methods[t]||r.prototype.get.call(this,t)},a.prototype.resolveAll=function(){for(var t=this.methodsArray,e=0;e<t.length;++e)t[e].resolve();return r.prototype.resolve.call(this)},a.prototype.add=function(t){if(this.get(t.name))throw Error("duplicate name '"+t.name+"' in "+this);return t instanceof n?(this.methods[t.name]=t,t.parent=this,c(this)):r.prototype.add.call(this,t)},a.prototype.remove=function(t){if(t instanceof n){if(this.methods[t.name]!==t)throw Error(t+" is not a member of "+this);return delete this.methods[t.name],t.parent=null,c(this)}return r.prototype.remove.call(this,t)},a.prototype.create=function(t,e,s){for(var r,n=new o.Service(t,e,s),a=0;a<this.methodsArray.length;++a){var c=i.lcFirst((r=this._methodsArray[a]).resolve().name).replace(/[^$\w_]/g,"");n[c]=i.codegen(["r","c"],i.isReserved(c)?c+"_":c)("return this.rpcCall(m,q,s,r,c)")({m:r,q:r.resolvedRequestType.ctor,s:r.resolvedResponseType.ctor})}return n}},396:(t,e,s)=>{"use strict";t.exports=x;var r=s(9587);((x.prototype=Object.create(r.prototype)).constructor=x).className="Type";var n=s(238),i=s(8930),o=s(5263),a=s(6977),c=s(5280),u=s(5986),d=s(9924),l=s(3117),h=s(7886),f=s(8357),p=s(8159),y=s(5669),m=s(2777),v=s(2016);function x(t,e){r.call(this,t,e),this.fields={},this.oneofs=void 0,this.extensions=void 0,this.reserved=void 0,this.group=void 0,this._fieldsById=null,this._fieldsArray=null,this._oneofsArray=null,this._ctor=null}function _(t){return t._fieldsById=t._fieldsArray=t._oneofsArray=null,delete t.encode,delete t.decode,delete t.verify,t}Object.defineProperties(x.prototype,{fieldsById:{get:function(){if(this._fieldsById)return this._fieldsById;this._fieldsById={};for(var t=Object.keys(this.fields),e=0;e<t.length;++e){var s=this.fields[t[e]],r=s.id;if(this._fieldsById[r])throw Error("duplicate id "+r+" in "+this);this._fieldsById[r]=s}return this._fieldsById}},fieldsArray:{get:function(){return this._fieldsArray||(this._fieldsArray=h.toArray(this.fields))}},oneofsArray:{get:function(){return this._oneofsArray||(this._oneofsArray=h.toArray(this.oneofs))}},ctor:{get:function(){return this._ctor||(this.ctor=x.generateConstructor(this)())},set:function(t){var e=t.prototype;e instanceof u||((t.prototype=new u).constructor=t,h.merge(t.prototype,e)),t.$type=t.prototype.$type=this,h.merge(t,u,!0),this._ctor=t;for(var s=0;s<this.fieldsArray.length;++s)this._fieldsArray[s].resolve();var r={};for(s=0;s<this.oneofsArray.length;++s)r[this._oneofsArray[s].resolve().name]={get:h.oneOfGetter(this._oneofsArray[s].oneof),set:h.oneOfSetter(this._oneofsArray[s].oneof)};s&&Object.defineProperties(t.prototype,r)}}}),x.generateConstructor=function(t){for(var e,s=h.codegen(["p"],t.name),r=0;r<t.fieldsArray.length;++r)(e=t._fieldsArray[r]).map?s("this%s={}",h.safeProp(e.name)):e.repeated&&s("this%s=[]",h.safeProp(e.name));return s("if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)")("this[ks[i]]=p[ks[i]]")},x.fromJSON=function(t,e){var s=new x(t,e.options);s.extensions=e.extensions,s.reserved=e.reserved;for(var u=Object.keys(e.fields),d=0;d<u.length;++d)s.add((void 0!==e.fields[u[d]].keyType?a.fromJSON:o.fromJSON)(u[d],e.fields[u[d]]));if(e.oneofs)for(u=Object.keys(e.oneofs),d=0;d<u.length;++d)s.add(i.fromJSON(u[d],e.oneofs[u[d]]));if(e.nested)for(u=Object.keys(e.nested),d=0;d<u.length;++d){var l=e.nested[u[d]];s.add((void 0!==l.id?o.fromJSON:void 0!==l.fields?x.fromJSON:void 0!==l.values?n.fromJSON:void 0!==l.methods?c.fromJSON:r.fromJSON)(u[d],l))}return e.extensions&&e.extensions.length&&(s.extensions=e.extensions),e.reserved&&e.reserved.length&&(s.reserved=e.reserved),e.group&&(s.group=!0),e.comment&&(s.comment=e.comment),s},x.prototype.toJSON=function(t){var e=r.prototype.toJSON.call(this,t),s=!!t&&Boolean(t.keepComments);return h.toObject(["options",e&&e.options||void 0,"oneofs",r.arrayToJSON(this.oneofsArray,t),"fields",r.arrayToJSON(this.fieldsArray.filter((function(t){return!t.declaringField})),t)||{},"extensions",this.extensions&&this.extensions.length?this.extensions:void 0,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"group",this.group||void 0,"nested",e&&e.nested||void 0,"comment",s?this.comment:void 0])},x.prototype.resolveAll=function(){for(var t=this.fieldsArray,e=0;e<t.length;)t[e++].resolve();var s=this.oneofsArray;for(e=0;e<s.length;)s[e++].resolve();return r.prototype.resolveAll.call(this)},x.prototype.get=function(t){return this.fields[t]||this.oneofs&&this.oneofs[t]||this.nested&&this.nested[t]||null},x.prototype.add=function(t){if(this.get(t.name))throw Error("duplicate name '"+t.name+"' in "+this);if(t instanceof o&&void 0===t.extend){if(this._fieldsById?this._fieldsById[t.id]:this.fieldsById[t.id])throw Error("duplicate id "+t.id+" in "+this);if(this.isReservedId(t.id))throw Error("id "+t.id+" is reserved in "+this);if(this.isReservedName(t.name))throw Error("name '"+t.name+"' is reserved in "+this);return t.parent&&t.parent.remove(t),this.fields[t.name]=t,t.message=this,t.onAdd(this),_(this)}return t instanceof i?(this.oneofs||(this.oneofs={}),this.oneofs[t.name]=t,t.onAdd(this),_(this)):r.prototype.add.call(this,t)},x.prototype.remove=function(t){if(t instanceof o&&void 0===t.extend){if(!this.fields||this.fields[t.name]!==t)throw Error(t+" is not a member of "+this);return delete this.fields[t.name],t.parent=null,t.onRemove(this),_(this)}if(t instanceof i){if(!this.oneofs||this.oneofs[t.name]!==t)throw Error(t+" is not a member of "+this);return delete this.oneofs[t.name],t.parent=null,t.onRemove(this),_(this)}return r.prototype.remove.call(this,t)},x.prototype.isReservedId=function(t){return r.isReservedId(this.reserved,t)},x.prototype.isReservedName=function(t){return r.isReservedName(this.reserved,t)},x.prototype.create=function(t){return new this.ctor(t)},x.prototype.setup=function(){for(var t=this.fullName,e=[],s=0;s<this.fieldsArray.length;++s)e.push(this._fieldsArray[s].resolve().resolvedType);this.encode=f(this)({Writer:l,types:e,util:h}),this.decode=p(this)({Reader:d,types:e,util:h}),this.verify=y(this)({types:e,util:h}),this.fromObject=m.fromObject(this)({types:e,util:h}),this.toObject=m.toObject(this)({types:e,util:h});var r=v[t];if(r){var n=Object.create(this);n.fromObject=this.fromObject,this.fromObject=r.fromObject.bind(n),n.toObject=this.toObject,this.toObject=r.toObject.bind(n)}return this},x.prototype.encode=function(t,e){return this.setup().encode(t,e)},x.prototype.encodeDelimited=function(t,e){return this.encode(t,e&&e.len?e.fork():e).ldelim()},x.prototype.decode=function(t,e){return this.setup().decode(t,e)},x.prototype.decodeDelimited=function(t){return t instanceof d||(t=d.create(t)),this.decode(t,t.uint32())},x.prototype.verify=function(t){return this.setup().verify(t)},x.prototype.fromObject=function(t){return this.setup().fromObject(t)},x.prototype.toObject=function(t,e){return this.setup().toObject(t,e)},x.d=function(t){return function(e){h.decorateType(e,t)}}},8372:(t,e,s)=>{"use strict";var r=e,n=s(7886),i=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];function o(t,e){var s=0,r={};for(e|=0;s<t.length;)r[i[s+e]]=t[s++];return r}r.basic=o([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]),r.defaults=o([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",n.emptyArray,null]),r.long=o([0,0,0,1,1],7),r.mapKey=o([0,0,0,5,5,0,0,0,1,1,0,2],2),r.packed=o([1,5,0,0,0,5,5,0,0,0,1,1,0])},7886:(t,e,s)=>{"use strict";var r,n,i=t.exports=s(4652),o=s(9188);i.codegen=s(6348),i.fetch=s(7803),i.path=s(1272),i.fs=i.inquire("fs"),i.toArray=function(t){if(t){for(var e=Object.keys(t),s=new Array(e.length),r=0;r<e.length;)s[r]=t[e[r++]];return s}return[]},i.toObject=function(t){for(var e={},s=0;s<t.length;){var r=t[s++],n=t[s++];void 0!==n&&(e[r]=n)}return e};var a=/\\/g,c=/"/g;i.isReserved=function(t){return/^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/.test(t)},i.safeProp=function(t){return!/^[$\w_]+$/.test(t)||i.isReserved(t)?'["'+t.replace(a,"\\\\").replace(c,'\\"')+'"]':"."+t},i.ucFirst=function(t){return t.charAt(0).toUpperCase()+t.substring(1)};var u=/_([a-z])/g;i.camelCase=function(t){return t.substring(0,1)+t.substring(1).replace(u,(function(t,e){return e.toUpperCase()}))},i.compareFieldsById=function(t,e){return t.id-e.id},i.decorateType=function(t,e){if(t.$type)return e&&t.$type.name!==e&&(i.decorateRoot.remove(t.$type),t.$type.name=e,i.decorateRoot.add(t.$type)),t.$type;r||(r=s(396));var n=new r(e||t.name);return i.decorateRoot.add(n),n.ctor=t,Object.defineProperty(t,"$type",{value:n,enumerable:!1}),Object.defineProperty(t.prototype,"$type",{value:n,enumerable:!1}),n};var d=0;i.decorateEnum=function(t){if(t.$type)return t.$type;n||(n=s(238));var e=new n("Enum"+d++,t);return i.decorateRoot.add(e),Object.defineProperty(t,"$type",{value:e,enumerable:!1}),e},i.setProperty=function(t,e,s){if("object"!=typeof t)throw TypeError("dst must be an object");if(!e)throw TypeError("path must be specified");return function t(e,s,r){var n=s.shift();if("__proto__"===n)return e;if(s.length>0)e[n]=t(e[n]||{},s,r);else{var i=e[n];i&&(r=[].concat(i).concat(r)),e[n]=r}return e}(t,e=e.split("."),s)},Object.defineProperty(i,"decorateRoot",{get:function(){return o.decorated||(o.decorated=new(s(6720)))}})},1427:(t,e,s)=>{"use strict";t.exports=n;var r=s(4652);function n(t,e){this.lo=t>>>0,this.hi=e>>>0}var i=n.zero=new n(0,0);i.toNumber=function(){return 0},i.zzEncode=i.zzDecode=function(){return this},i.length=function(){return 1};var o=n.zeroHash="\0\0\0\0\0\0\0\0";n.fromNumber=function(t){if(0===t)return i;var e=t<0;e&&(t=-t);var s=t>>>0,r=(t-s)/4294967296>>>0;return e&&(r=~r>>>0,s=~s>>>0,++s>4294967295&&(s=0,++r>4294967295&&(r=0))),new n(s,r)},n.from=function(t){if("number"==typeof t)return n.fromNumber(t);if(r.isString(t)){if(!r.Long)return n.fromNumber(parseInt(t,10));t=r.Long.fromString(t)}return t.low||t.high?new n(t.low>>>0,t.high>>>0):i},n.prototype.toNumber=function(t){if(!t&&this.hi>>>31){var e=1+~this.lo>>>0,s=~this.hi>>>0;return e||(s=s+1>>>0),-(e+4294967296*s)}return this.lo+4294967296*this.hi},n.prototype.toLong=function(t){return r.Long?new r.Long(0|this.lo,0|this.hi,Boolean(t)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(t)}};var a=String.prototype.charCodeAt;n.fromHash=function(t){return t===o?i:new n((a.call(t,0)|a.call(t,1)<<8|a.call(t,2)<<16|a.call(t,3)<<24)>>>0,(a.call(t,4)|a.call(t,5)<<8|a.call(t,6)<<16|a.call(t,7)<<24)>>>0)},n.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)},n.prototype.zzEncode=function(){var t=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^t)>>>0,this.lo=(this.lo<<1^t)>>>0,this},n.prototype.zzDecode=function(){var t=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^t)>>>0,this.hi=(this.hi>>>1^t)>>>0,this},n.prototype.length=function(){var t=this.lo,e=(this.lo>>>28|this.hi<<4)>>>0,s=this.hi>>>24;return 0===s?0===e?t<16384?t<128?1:2:t<2097152?3:4:e<16384?e<128?5:6:e<2097152?7:8:s<128?9:10}},4652:function(t,e,s){"use strict";var r=e;function n(t,e,s){for(var r=Object.keys(e),n=0;n<r.length;++n)void 0!==t[r[n]]&&s||(t[r[n]]=e[r[n]]);return t}function i(t){function e(t,s){if(!(this instanceof e))return new e(t,s);Object.defineProperty(this,"message",{get:function(){return t}}),Error.captureStackTrace?Error.captureStackTrace(this,e):Object.defineProperty(this,"stack",{value:(new Error).stack||""}),s&&n(this,s)}return(e.prototype=Object.create(Error.prototype)).constructor=e,Object.defineProperty(e.prototype,"name",{get:function(){return t}}),e.prototype.toString=function(){return this.name+": "+this.message},e}r.asPromise=s(537),r.base64=s(9745),r.EventEmitter=s(4459),r.float=s(897),r.inquire=s(3229),r.utf8=s(113),r.pool=s(7986),r.LongBits=s(1427),r.isNode=Boolean(void 0!==s.g&&s.g&&s.g.process&&s.g.process.versions&&s.g.process.versions.node),r.global=r.isNode&&s.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(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},r.isString=function(t){return"string"==typeof t||t instanceof String},r.isObject=function(t){return t&&"object"==typeof t},r.isset=r.isSet=function(t,e){var s=t[e];return!(null==s||!t.hasOwnProperty(e))&&("object"!=typeof s||(Array.isArray(s)?s.length:Object.keys(s).length)>0)},r.Buffer=function(){try{var t=r.inquire("buffer").Buffer;return t.prototype.utf8Write?t:null}catch(t){return null}}(),r._Buffer_from=null,r._Buffer_allocUnsafe=null,r.newBuffer=function(t){return"number"==typeof t?r.Buffer?r._Buffer_allocUnsafe(t):new r.Array(t):r.Buffer?r._Buffer_from(t):"undefined"==typeof Uint8Array?t:new Uint8Array(t)},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(t){return t?r.LongBits.from(t).toHash():r.LongBits.zeroHash},r.longFromHash=function(t,e){var s=r.LongBits.fromHash(t);return r.Long?r.Long.fromBits(s.lo,s.hi,e):s.toNumber(Boolean(e))},r.merge=n,r.lcFirst=function(t){return t.charAt(0).toLowerCase()+t.substring(1)},r.newError=i,r.ProtocolError=i("ProtocolError"),r.oneOfGetter=function(t){for(var e={},s=0;s<t.length;++s)e[t[s]]=1;return function(){for(var t=Object.keys(this),s=t.length-1;s>-1;--s)if(1===e[t[s]]&&void 0!==this[t[s]]&&null!==this[t[s]])return t[s]}},r.oneOfSetter=function(t){return function(e){for(var s=0;s<t.length;++s)t[s]!==e&&delete this[t[s]]}},r.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},r._configure=function(){var t=r.Buffer;t?(r._Buffer_from=t.from!==Uint8Array.from&&t.from||function(e,s){return new t(e,s)},r._Buffer_allocUnsafe=t.allocUnsafe||function(e){return new t(e)}):r._Buffer_from=r._Buffer_allocUnsafe=null}},5669:(t,e,s)=>{"use strict";t.exports=function(t){var e=n.codegen(["m"],t.name+"$verify")('if(typeof m!=="object"||m===null)')("return%j","object expected"),s=t.oneofsArray,r={};s.length&&e("var p={}");for(var c=0;c<t.fieldsArray.length;++c){var u=t._fieldsArray[c].resolve(),d="m"+n.safeProp(u.name);if(u.optional&&e("if(%s!=null&&m.hasOwnProperty(%j)){",d,u.name),u.map)e("if(!util.isObject(%s))",d)("return%j",i(u,"object"))("var k=Object.keys(%s)",d)("for(var i=0;i<k.length;++i){"),a(e,u,"k[i]"),o(e,u,c,d+"[k[i]]")("}");else if(u.repeated)e("if(!Array.isArray(%s))",d)("return%j",i(u,"array"))("for(var i=0;i<%s.length;++i){",d),o(e,u,c,d+"[i]")("}");else{if(u.partOf){var l=n.safeProp(u.partOf.name);1===r[u.partOf.name]&&e("if(p%s===1)",l)("return%j",u.partOf.name+": multiple values"),r[u.partOf.name]=1,e("p%s=1",l)}o(e,u,c,d)}u.optional&&e("}")}return e("return null")};var r=s(238),n=s(7886);function i(t,e){return t.name+": "+e+(t.repeated&&"array"!==e?"[]":t.map&&"object"!==e?"{k:"+t.keyType+"}":"")+" expected"}function o(t,e,s,n){if(e.resolvedType)if(e.resolvedType instanceof r){t("switch(%s){",n)("default:")("return%j",i(e,"enum value"));for(var o=Object.keys(e.resolvedType.values),a=0;a<o.length;++a)t("case %i:",e.resolvedType.values[o[a]]);t("break")("}")}else t("{")("var e=types[%i].verify(%s);",s,n)("if(e)")("return%j+e",e.name+".")("}");else switch(e.type){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":t("if(!util.isInteger(%s))",n)("return%j",i(e,"integer"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":t("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))",n,n,n,n)("return%j",i(e,"integer|Long"));break;case"float":case"double":t('if(typeof %s!=="number")',n)("return%j",i(e,"number"));break;case"bool":t('if(typeof %s!=="boolean")',n)("return%j",i(e,"boolean"));break;case"string":t("if(!util.isString(%s))",n)("return%j",i(e,"string"));break;case"bytes":t('if(!(%s&&typeof %s.length==="number"||util.isString(%s)))',n,n,n)("return%j",i(e,"buffer"))}return t}function a(t,e,s){switch(e.keyType){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":t("if(!util.key32Re.test(%s))",s)("return%j",i(e,"integer key"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":t("if(!util.key64Re.test(%s))",s)("return%j",i(e,"integer|Long key"));break;case"bool":t("if(!util.key2Re.test(%s))",s)("return%j",i(e,"boolean key"))}return t}},2016:(t,e,s)=>{"use strict";var r=e,n=s(5986);r[".google.protobuf.Any"]={fromObject:function(t){if(t&&t["@type"]){var e=t["@type"].substring(t["@type"].lastIndexOf("/")+1),s=this.lookup(e);if(s){var r="."===t["@type"].charAt(0)?t["@type"].substr(1):t["@type"];return-1===r.indexOf("/")&&(r="/"+r),this.create({type_url:r,value:s.encode(s.fromObject(t)).finish()})}}return this.fromObject(t)},toObject:function(t,e){var s="",r="";if(e&&e.json&&t.type_url&&t.value){r=t.type_url.substring(t.type_url.lastIndexOf("/")+1),s=t.type_url.substring(0,t.type_url.lastIndexOf("/")+1);var i=this.lookup(r);i&&(t=i.decode(t.value))}if(!(t instanceof this.ctor)&&t instanceof n){var o=t.$type.toObject(t,e);return""===s&&(s="type.googleapis.com/"),r=s+("."===t.$type.fullName[0]?t.$type.fullName.substr(1):t.$type.fullName),o["@type"]=r,o}return this.toObject(t,e)}}},3117:(t,e,s)=>{"use strict";t.exports=l;var r,n=s(4652),i=n.LongBits,o=n.base64,a=n.utf8;function c(t,e,s){this.fn=t,this.len=e,this.next=void 0,this.val=s}function u(){}function d(t){this.head=t.head,this.tail=t.tail,this.len=t.len,this.next=t.states}function l(){this.len=0,this.head=new c(u,0,0),this.tail=this.head,this.states=null}var h=function(){return n.Buffer?function(){return(l.create=function(){return new r})()}:function(){return new l}};function f(t,e,s){e[s]=255&t}function p(t,e){this.len=t,this.next=void 0,this.val=e}function y(t,e,s){for(;t.hi;)e[s++]=127&t.lo|128,t.lo=(t.lo>>>7|t.hi<<25)>>>0,t.hi>>>=7;for(;t.lo>127;)e[s++]=127&t.lo|128,t.lo=t.lo>>>7;e[s++]=t.lo}function m(t,e,s){e[s]=255&t,e[s+1]=t>>>8&255,e[s+2]=t>>>16&255,e[s+3]=t>>>24}l.create=h(),l.alloc=function(t){return new n.Array(t)},n.Array!==Array&&(l.alloc=n.pool(l.alloc,n.Array.prototype.subarray)),l.prototype._push=function(t,e,s){return this.tail=this.tail.next=new c(t,e,s),this.len+=e,this},p.prototype=Object.create(c.prototype),p.prototype.fn=function(t,e,s){for(;t>127;)e[s++]=127&t|128,t>>>=7;e[s]=t},l.prototype.uint32=function(t){return this.len+=(this.tail=this.tail.next=new p((t>>>=0)<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)).len,this},l.prototype.int32=function(t){return t<0?this._push(y,10,i.fromNumber(t)):this.uint32(t)},l.prototype.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)},l.prototype.uint64=function(t){var e=i.from(t);return this._push(y,e.length(),e)},l.prototype.int64=l.prototype.uint64,l.prototype.sint64=function(t){var e=i.from(t).zzEncode();return this._push(y,e.length(),e)},l.prototype.bool=function(t){return this._push(f,1,t?1:0)},l.prototype.fixed32=function(t){return this._push(m,4,t>>>0)},l.prototype.sfixed32=l.prototype.fixed32,l.prototype.fixed64=function(t){var e=i.from(t);return this._push(m,4,e.lo)._push(m,4,e.hi)},l.prototype.sfixed64=l.prototype.fixed64,l.prototype.float=function(t){return this._push(n.float.writeFloatLE,4,t)},l.prototype.double=function(t){return this._push(n.float.writeDoubleLE,8,t)};var v=n.Array.prototype.set?function(t,e,s){e.set(t,s)}:function(t,e,s){for(var r=0;r<t.length;++r)e[s+r]=t[r]};l.prototype.bytes=function(t){var e=t.length>>>0;if(!e)return this._push(f,1,0);if(n.isString(t)){var s=l.alloc(e=o.length(t));o.decode(t,s,0),t=s}return this.uint32(e)._push(v,e,t)},l.prototype.string=function(t){var e=a.length(t);return e?this.uint32(e)._push(a.write,e,t):this._push(f,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 t=this.head,e=this.tail,s=this.len;return this.reset().uint32(s),s&&(this.tail.next=t.next,this.tail=e,this.len+=s),this},l.prototype.finish=function(){for(var t=this.head.next,e=this.constructor.alloc(this.len),s=0;t;)t.fn(t.val,e,s),s+=t.len,t=t.next;return e},l._configure=function(t){r=t,l.create=h(),r._configure()}},4766:(t,e,s)=>{"use strict";t.exports=i;var r=s(3117);(i.prototype=Object.create(r.prototype)).constructor=i;var n=s(4652);function i(){r.call(this)}function o(t,e,s){t.length<40?n.utf8.write(t,e,s):e.utf8Write?e.utf8Write(t,s):e.write(t,s)}i._configure=function(){i.alloc=n._Buffer_allocUnsafe,i.writeBytesBuffer=n.Buffer&&n.Buffer.prototype instanceof Uint8Array&&"set"===n.Buffer.prototype.set.name?function(t,e,s){e.set(t,s)}:function(t,e,s){if(t.copy)t.copy(e,s,0,t.length);else for(var r=0;r<t.length;)e[s++]=t[r++]}},i.prototype.bytes=function(t){n.isString(t)&&(t=n._Buffer_from(t,"base64"));var e=t.length>>>0;return this.uint32(e),e&&this._push(i.writeBytesBuffer,e,t),this},i.prototype.string=function(t){var e=n.Buffer.byteLength(t);return this.uint32(e),e&&this._push(o,e,t),this},i._configure()},537:t=>{"use strict";t.exports=function(t,e){var s=new Array(arguments.length-1),r=0,n=2,i=!0;for(;n<arguments.length;)s[r++]=arguments[n++];return new Promise((function(n,o){s[r]=function(t){if(i)if(i=!1,t)o(t);else{for(var e=new Array(arguments.length-1),s=0;s<e.length;)e[s++]=arguments[s];n.apply(null,e)}};try{t.apply(e||null,s)}catch(t){i&&(i=!1,o(t))}}))}},9745:(t,e)=>{"use strict";var s=e;s.length=function(t){var e=t.length;if(!e)return 0;for(var s=0;--e%4>1&&"="===t.charAt(e);)++s;return Math.ceil(3*t.length)/4-s};for(var r=new Array(64),n=new Array(123),i=0;i<64;)n[r[i]=i<26?i+65:i<52?i+71:i<62?i-4:i-59|43]=i++;s.encode=function(t,e,s){for(var n,i=null,o=[],a=0,c=0;e<s;){var u=t[e++];switch(c){case 0:o[a++]=r[u>>2],n=(3&u)<<4,c=1;break;case 1:o[a++]=r[n|u>>4],n=(15&u)<<2,c=2;break;case 2:o[a++]=r[n|u>>6],o[a++]=r[63&u],c=0}a>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,o)),a=0)}return c&&(o[a++]=r[n],o[a++]=61,1===c&&(o[a++]=61)),i?(a&&i.push(String.fromCharCode.apply(String,o.slice(0,a))),i.join("")):String.fromCharCode.apply(String,o.slice(0,a))};var o="invalid encoding";s.decode=function(t,e,s){for(var r,i=s,a=0,c=0;c<t.length;){var u=t.charCodeAt(c++);if(61===u&&a>1)break;if(void 0===(u=n[u]))throw Error(o);switch(a){case 0:r=u,a=1;break;case 1:e[s++]=r<<2|(48&u)>>4,r=u,a=2;break;case 2:e[s++]=(15&r)<<4|(60&u)>>2,r=u,a=3;break;case 3:e[s++]=(3&r)<<6|u,a=0}}if(1===a)throw Error(o);return s-i},s.test=function(t){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t)}},6348:t=>{"use strict";function e(t,s){"string"==typeof t&&(s=t,t=void 0);var r=[];function n(t){if("string"!=typeof t){var s=i();if(e.verbose&&console.log("codegen: "+s),s="return "+s,t){for(var o=Object.keys(t),a=new Array(o.length+1),c=new Array(o.length),u=0;u<o.length;)a[u]=o[u],c[u]=t[o[u++]];return a[u]=s,Function.apply(null,a).apply(null,c)}return Function(s)()}for(var d=new Array(arguments.length-1),l=0;l<d.length;)d[l]=arguments[++l];if(l=0,t=t.replace(/%([%dfijs])/g,(function(t,e){var s=d[l++];switch(e){case"d":case"f":return String(Number(s));case"i":return String(Math.floor(s));case"j":return JSON.stringify(s);case"s":return String(s)}return"%"})),l!==d.length)throw Error("parameter count mismatch");return r.push(t),n}function i(e){return"function "+(e||s||"")+"("+(t&&t.join(",")||"")+"){\n "+r.join("\n ")+"\n}"}return n.toString=i,n}t.exports=e,e.verbose=!1},4459:t=>{"use strict";function e(){this._listeners={}}t.exports=e,e.prototype.on=function(t,e,s){return(this._listeners[t]||(this._listeners[t]=[])).push({fn:e,ctx:s||this}),this},e.prototype.off=function(t,e){if(void 0===t)this._listeners={};else if(void 0===e)this._listeners[t]=[];else for(var s=this._listeners[t],r=0;r<s.length;)s[r].fn===e?s.splice(r,1):++r;return this},e.prototype.emit=function(t){var e=this._listeners[t];if(e){for(var s=[],r=1;r<arguments.length;)s.push(arguments[r++]);for(r=0;r<e.length;)e[r].fn.apply(e[r++].ctx,s)}return this}},7803:(t,e,s)=>{"use strict";t.exports=i;var r=s(537),n=s(3229)("fs");function i(t,e,s){return"function"==typeof e?(s=e,e={}):e||(e={}),s?!e.xhr&&n&&n.readFile?n.readFile(t,(function(r,n){return r&&"undefined"!=typeof XMLHttpRequest?i.xhr(t,e,s):r?s(r):s(null,e.binary?n:n.toString("utf8"))})):i.xhr(t,e,s):r(i,this,t,e)}i.xhr=function(t,e,s){var r=new XMLHttpRequest;r.onreadystatechange=function(){if(4===r.readyState){if(0!==r.status&&200!==r.status)return s(Error("status "+r.status));if(e.binary){var t=r.response;if(!t){t=[];for(var n=0;n<r.responseText.length;++n)t.push(255&r.responseText.charCodeAt(n))}return s(null,"undefined"!=typeof Uint8Array?new Uint8Array(t):t)}return s(null,r.responseText)}},e.binary&&("overrideMimeType"in r&&r.overrideMimeType("text/plain; charset=x-user-defined"),r.responseType="arraybuffer"),r.open("GET",t),r.send()}},897:t=>{"use strict";function e(t){return"undefined"!=typeof Float32Array?function(){var e=new Float32Array([-0]),s=new Uint8Array(e.buffer),r=128===s[3];function n(t,r,n){e[0]=t,r[n]=s[0],r[n+1]=s[1],r[n+2]=s[2],r[n+3]=s[3]}function i(t,r,n){e[0]=t,r[n]=s[3],r[n+1]=s[2],r[n+2]=s[1],r[n+3]=s[0]}function o(t,r){return s[0]=t[r],s[1]=t[r+1],s[2]=t[r+2],s[3]=t[r+3],e[0]}function a(t,r){return s[3]=t[r],s[2]=t[r+1],s[1]=t[r+2],s[0]=t[r+3],e[0]}t.writeFloatLE=r?n:i,t.writeFloatBE=r?i:n,t.readFloatLE=r?o:a,t.readFloatBE=r?a:o}():function(){function e(t,e,s,r){var n=e<0?1:0;if(n&&(e=-e),0===e)t(1/e>0?0:2147483648,s,r);else if(isNaN(e))t(2143289344,s,r);else if(e>34028234663852886e22)t((n<<31|2139095040)>>>0,s,r);else if(e<11754943508222875e-54)t((n<<31|Math.round(e/1401298464324817e-60))>>>0,s,r);else{var i=Math.floor(Math.log(e)/Math.LN2);t((n<<31|i+127<<23|8388607&Math.round(e*Math.pow(2,-i)*8388608))>>>0,s,r)}}function o(t,e,s){var r=t(e,s),n=2*(r>>31)+1,i=r>>>23&255,o=8388607&r;return 255===i?o?NaN:n*(1/0):0===i?1401298464324817e-60*n*o:n*Math.pow(2,i-150)*(o+8388608)}t.writeFloatLE=e.bind(null,s),t.writeFloatBE=e.bind(null,r),t.readFloatLE=o.bind(null,n),t.readFloatBE=o.bind(null,i)}(),"undefined"!=typeof Float64Array?function(){var e=new Float64Array([-0]),s=new Uint8Array(e.buffer),r=128===s[7];function n(t,r,n){e[0]=t,r[n]=s[0],r[n+1]=s[1],r[n+2]=s[2],r[n+3]=s[3],r[n+4]=s[4],r[n+5]=s[5],r[n+6]=s[6],r[n+7]=s[7]}function i(t,r,n){e[0]=t,r[n]=s[7],r[n+1]=s[6],r[n+2]=s[5],r[n+3]=s[4],r[n+4]=s[3],r[n+5]=s[2],r[n+6]=s[1],r[n+7]=s[0]}function o(t,r){return s[0]=t[r],s[1]=t[r+1],s[2]=t[r+2],s[3]=t[r+3],s[4]=t[r+4],s[5]=t[r+5],s[6]=t[r+6],s[7]=t[r+7],e[0]}function a(t,r){return s[7]=t[r],s[6]=t[r+1],s[5]=t[r+2],s[4]=t[r+3],s[3]=t[r+4],s[2]=t[r+5],s[1]=t[r+6],s[0]=t[r+7],e[0]}t.writeDoubleLE=r?n:i,t.writeDoubleBE=r?i:n,t.readDoubleLE=r?o:a,t.readDoubleBE=r?a:o}():function(){function e(t,e,s,r,n,i){var o=r<0?1:0;if(o&&(r=-r),0===r)t(0,n,i+e),t(1/r>0?0:2147483648,n,i+s);else if(isNaN(r))t(0,n,i+e),t(2146959360,n,i+s);else if(r>17976931348623157e292)t(0,n,i+e),t((o<<31|2146435072)>>>0,n,i+s);else{var a;if(r<22250738585072014e-324)t((a=r/5e-324)>>>0,n,i+e),t((o<<31|a/4294967296)>>>0,n,i+s);else{var c=Math.floor(Math.log(r)/Math.LN2);1024===c&&(c=1023),t(4503599627370496*(a=r*Math.pow(2,-c))>>>0,n,i+e),t((o<<31|c+1023<<20|1048576*a&1048575)>>>0,n,i+s)}}}function o(t,e,s,r,n){var i=t(r,n+e),o=t(r,n+s),a=2*(o>>31)+1,c=o>>>20&2047,u=4294967296*(1048575&o)+i;return 2047===c?u?NaN:a*(1/0):0===c?5e-324*a*u:a*Math.pow(2,c-1075)*(u+4503599627370496)}t.writeDoubleLE=e.bind(null,s,0,4),t.writeDoubleBE=e.bind(null,r,4,0),t.readDoubleLE=o.bind(null,n,0,4),t.readDoubleBE=o.bind(null,i,4,0)}(),t}function s(t,e,s){e[s]=255&t,e[s+1]=t>>>8&255,e[s+2]=t>>>16&255,e[s+3]=t>>>24}function r(t,e,s){e[s]=t>>>24,e[s+1]=t>>>16&255,e[s+2]=t>>>8&255,e[s+3]=255&t}function n(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24)>>>0}function i(t,e){return(t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3])>>>0}t.exports=e(e)},3229: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(t){}return null}module.exports=inquire},1272:(t,e)=>{"use strict";var s=e,r=s.isAbsolute=function(t){return/^(?:\/|\w+:)/.test(t)},n=s.normalize=function(t){var e=(t=t.replace(/\\/g,"/").replace(/\/{2,}/g,"/")).split("/"),s=r(t),n="";s&&(n=e.shift()+"/");for(var i=0;i<e.length;)".."===e[i]?i>0&&".."!==e[i-1]?e.splice(--i,2):s?e.splice(i,1):++i:"."===e[i]?e.splice(i,1):++i;return n+e.join("/")};s.resolve=function(t,e,s){return s||(e=n(e)),r(e)?e:(s||(t=n(t)),(t=t.replace(/(?:\/|^)[^/]+$/,"")).length?n(t+"/"+e):e)}},7986:t=>{"use strict";t.exports=function(t,e,s){var r=s||8192,n=r>>>1,i=null,o=r;return function(s){if(s<1||s>n)return t(s);o+s>r&&(i=t(r),o=0);var a=e.call(i,o,o+=s);return 7&o&&(o=1+(7|o)),a}}},113:(t,e)=>{"use strict";var s=e;s.length=function(t){for(var e=0,s=0,r=0;r<t.length;++r)(s=t.charCodeAt(r))<128?e+=1:s<2048?e+=2:55296==(64512&s)&&56320==(64512&t.charCodeAt(r+1))?(++r,e+=4):e+=3;return e},s.read=function(t,e,s){if(s-e<1)return"";for(var r,n=null,i=[],o=0;e<s;)(r=t[e++])<128?i[o++]=r:r>191&&r<224?i[o++]=(31&r)<<6|63&t[e++]:r>239&&r<365?(r=((7&r)<<18|(63&t[e++])<<12|(63&t[e++])<<6|63&t[e++])-65536,i[o++]=55296+(r>>10),i[o++]=56320+(1023&r)):i[o++]=(15&r)<<12|(63&t[e++])<<6|63&t[e++],o>8191&&((n||(n=[])).push(String.fromCharCode.apply(String,i)),o=0);return n?(o&&n.push(String.fromCharCode.apply(String,i.slice(0,o))),n.join("")):String.fromCharCode.apply(String,i.slice(0,o))},s.write=function(t,e,s){for(var r,n,i=s,o=0;o<t.length;++o)(r=t.charCodeAt(o))<128?e[s++]=r:r<2048?(e[s++]=r>>6|192,e[s++]=63&r|128):55296==(64512&r)&&56320==(64512&(n=t.charCodeAt(o+1)))?(r=65536+((1023&r)<<10)+(1023&n),++o,e[s++]=r>>18|240,e[s++]=r>>12&63|128,e[s++]=r>>6&63|128,e[s++]=63&r|128):(e[s++]=r>>12|224,e[s++]=r>>6&63|128,e[s++]=63&r|128);return s-i}},3717:(t,e)=>{function s(t){if(t)return function(t){for(var e in s.prototype)t[e]=s.prototype[e];return t}(t)}e.Emitter=s,s.prototype.on=s.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},s.prototype.once=function(t,e){function s(){this.off(t,s),e.apply(this,arguments)}return s.fn=e,this.on(t,s),this},s.prototype.off=s.prototype.removeListener=s.prototype.removeAllListeners=s.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var s,r=this._callbacks["$"+t];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var n=0;n<r.length;n++)if((s=r[n])===e||s.fn===e){r.splice(n,1);break}return 0===r.length&&delete this._callbacks["$"+t],this},s.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),s=this._callbacks["$"+t],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(s){r=0;for(var n=(s=s.slice(0)).length;r<n;++r)s[r].apply(this,e)}return this},s.prototype.emitReserved=s.prototype.emit,s.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},s.prototype.hasListeners=function(t){return!!this.listeners(t).length}},7672:t=>{function e(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}t.exports=e,e.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),s=Math.floor(e*this.jitter*t);t=0==(1&Math.floor(10*e))?t-s:t+s}return 0|Math.min(t,this.max)},e.prototype.reset=function(){this.attempts=0},e.prototype.setMin=function(t){this.ms=t},e.prototype.setMax=function(t){this.max=t},e.prototype.setJitter=function(t){this.jitter=t}},3286:(t,e,s)=>{"use strict";s.d(e,{Z:()=>i});var r=s(7758),n=s.n(r)()((function(t){return t[1]}));n.push([t.id,".ck.ck-balloon-panel.ck-tooltip{pointer-events:none;z-index:calc(var(--ck-z-modal) + 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)}.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-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.ck-presence-list--collapsed .ck-presence-list__list{margin-left:var(--ck-spacing-standard);min-width:calc(var(--ck-user-avatar-size)*1.5)}.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 + 5px)}.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(4){opacity:.35}.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(2){opacity:.75}.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:0;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}.ck-presence-list__balloon button.ck-presence-list__dropdown-list-item *,.ck-presence-list__list button.ck-presence-list__list-item *{cursor:pointer}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}",""]);const i=n},9940:(t,e,s)=>{"use strict";s.d(e,{Z:()=>i});var r=s(7758),n=s.n(r)()((function(t){return t[1]}));n.push([t.id,".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-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-placeholder .ck-user__marker{display:none}@keyframes fadeInLeft{0%{opacity:0;transform:translateX(-10px)}to{opacity:1;transform:translateX(0)}}",""]);const i=n},7758:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var s=t(e);return e[2]?"@media ".concat(e[2]," {").concat(s,"}"):s})).join("")},e.i=function(t,s,r){"string"==typeof t&&(t=[[null,t,""]]);var n={};if(r)for(var i=0;i<this.length;i++){var o=this[i][0];null!=o&&(n[o]=!0)}for(var a=0;a<t.length;a++){var c=[].concat(t[a]);r&&n[c[0]]||(s&&(c[2]?c[2]="".concat(s," and ").concat(c[2]):c[2]=s),e.push(c))}},e}},7154:t=>{var e=1e3,s=60*e,r=60*s,n=24*r,i=7*n,o=365.25*n;function a(t,e,s,r){var n=e>=1.5*s;return Math.round(t/s)+" "+r+(n?"s":"")}t.exports=function(t,c){c=c||{};var u=typeof t;if("string"===u&&t.length>0)return function(t){if((t=String(t)).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(t);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*o;case"weeks":case"week":case"w":return c*i;case"days":case"day":case"d":return c*n;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*s;case"seconds":case"second":case"secs":case"sec":case"s":return c*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}(t);if("number"===u&&isFinite(t))return c.long?function(t){var i=Math.abs(t);if(i>=n)return a(t,i,n,"day");if(i>=r)return a(t,i,r,"hour");if(i>=s)return a(t,i,s,"minute");if(i>=e)return a(t,i,e,"second");return t+" ms"}(t):function(t){var i=Math.abs(t);if(i>=n)return Math.round(t/n)+"d";if(i>=r)return Math.round(t/r)+"h";if(i>=s)return Math.round(t/s)+"m";if(i>=e)return Math.round(t/e)+"s";return t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},5579:(t,e,s)=>{e.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const s="color: "+this.color;e.splice(1,0,s,"color: inherit");let r=0,n=0;e[0].replace(/%[a-zA-Z%]/g,(t=>{"%%"!==t&&(r++,"%c"===t&&(n=r))})),e.splice(n,0,s)},e.save=function(t){try{t?e.storage.setItem("debug",t):e.storage.removeItem("debug")}catch(t){}},e.load=function(){let t;try{t=e.storage.getItem("debug")}catch(t){}!t&&"undefined"!=typeof process&&"env"in process&&(t=process.env.DEBUG);return t},e.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+)/)},e.storage=function(){try{return localStorage}catch(t){}}(),e.destroy=(()=>{let t=!1;return()=>{t||(t=!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`."))}})(),e.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"],e.log=console.debug||console.log||(()=>{}),t.exports=s(3847)(e);const{formatters:r}=t.exports;r.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},3847:(t,e,s)=>{t.exports=function(t){function e(t){let s,n,i,o=null;function a(...t){if(!a.enabled)return;const r=a,n=Number(new Date),i=n-(s||n);r.diff=i,r.prev=s,r.curr=n,s=n,t[0]=e.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");let o=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,((s,n)=>{if("%%"===s)return"%";o++;const i=e.formatters[n];if("function"==typeof i){const e=t[o];s=i.call(r,e),t.splice(o,1),o--}return s})),e.formatArgs.call(r,t);(r.log||e.log).apply(r,t)}return a.namespace=t,a.useColors=e.useColors(),a.color=e.selectColor(t),a.extend=r,a.destroy=e.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==o?o:(n!==e.namespaces&&(n=e.namespaces,i=e.enabled(t)),i),set:t=>{o=t}}),"function"==typeof e.init&&e.init(a),a}function r(t,s){const r=e(this.namespace+(void 0===s?":":s)+t);return r.log=this.log,r}function n(t){return t.toString().substring(2,t.toString().length-2).replace(/\.\*\?$/,"*")}return e.debug=e,e.default=e,e.coerce=function(t){if(t instanceof Error)return t.stack||t.message;return t},e.disable=function(){const t=[...e.names.map(n),...e.skips.map(n).map((t=>"-"+t))].join(",");return e.enable(""),t},e.enable=function(t){let s;e.save(t),e.namespaces=t,e.names=[],e.skips=[];const r=("string"==typeof t?t:"").split(/[\s,]+/),n=r.length;for(s=0;s<n;s++)r[s]&&("-"===(t=r[s].replace(/\*/g,".*?"))[0]?e.skips.push(new RegExp("^"+t.slice(1)+"$")):e.names.push(new RegExp("^"+t+"$")))},e.enabled=function(t){if("*"===t[t.length-1])return!0;let s,r;for(s=0,r=e.skips.length;s<r;s++)if(e.skips[s].test(t))return!1;for(s=0,r=e.names.length;s<r;s++)if(e.names[s].test(t))return!0;return!1},e.humanize=s(7154),e.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(t).forEach((s=>{e[s]=t[s]})),e.names=[],e.skips=[],e.formatters={},e.selectColor=function(t){let s=0;for(let e=0;e<t.length;e++)s=(s<<5)-s+t.charCodeAt(e),s|=0;return e.colors[Math.abs(s)%e.colors.length]},e.enable(e.load()),e}},4568:t=>{try{t.exports="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(e){t.exports=!1}},9827:(t,e)=>{e.encode=function(t){var e="";for(var s in t)t.hasOwnProperty(s)&&(e.length&&(e+="&"),e+=encodeURIComponent(s)+"="+encodeURIComponent(t[s]));return e},e.decode=function(t){for(var e={},s=t.split("&"),r=0,n=s.length;r<n;r++){var i=s[r].split("=");e[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return e}},5977:t=>{var e=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,s=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];t.exports=function(t){var r=t,n=t.indexOf("["),i=t.indexOf("]");-1!=n&&-1!=i&&(t=t.substring(0,n)+t.substring(n,i).replace(/:/g,";")+t.substring(i,t.length));for(var o,a,c=e.exec(t||""),u={},d=14;d--;)u[s[d]]=c[d]||"";return-1!=n&&-1!=i&&(u.source=r,u.host=u.host.substring(1,u.host.length-1).replace(/;/g,":"),u.authority=u.authority.replace("[","").replace("]","").replace(/;/g,":"),u.ipv6uri=!0),u.pathNames=function(t,e){var s=/\/{2,9}/g,r=e.replace(s,"/").split("/");"/"!=e.substr(0,1)&&0!==e.length||r.splice(0,1);"/"==e.substr(e.length-1,1)&&r.splice(r.length-1,1);return r}(0,u.path),u.queryKey=(o=u.query,a={},o.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,(function(t,e,s){e&&(a[e]=s)})),a),u}},6154:(t,e,s)=>{"use strict";t.exports=s(7278)},6274:(t,e,s)=>{"use strict";var r=e,n=s(4937),i=s(7572);function o(t,e,s,r){if(e.resolvedType)if(e.resolvedType instanceof n){t("switch(d%s){",r);for(var i=e.resolvedType.values,o=Object.keys(i),a=0;a<o.length;++a)e.repeated&&i[o[a]]===e.typeDefault&&t("default:"),t("case%j:",o[a])("case %i:",i[o[a]])("m%s=%j",r,i[o[a]])("break");t("}")}else t('if(typeof d%s!=="object")',r)("throw TypeError(%j)",e.fullName+": object expected")("m%s=types[%i].fromObject(d%s)",r,s,r);else{var c=!1;switch(e.type){case"double":case"float":t("m%s=Number(d%s)",r,r);break;case"uint32":case"fixed32":t("m%s=d%s>>>0",r,r);break;case"int32":case"sint32":case"sfixed32":t("m%s=d%s|0",r,r);break;case"uint64":c=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":t("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j",r,r,c)('else if(typeof d%s==="string")',r)("m%s=parseInt(d%s,10)",r,r)('else if(typeof d%s==="number")',r)("m%s=d%s",r,r)('else if(typeof d%s==="object")',r)("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)",r,r,r,c?"true":"");break;case"bytes":t('if(typeof d%s==="string")',r)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)",r,r,r)("else if(d%s.length >= 0)",r)("m%s=d%s",r,r);break;case"string":t("m%s=String(d%s)",r,r);break;case"bool":t("m%s=Boolean(d%s)",r,r)}}return t}function a(t,e,s,r){if(e.resolvedType)e.resolvedType instanceof n?t("d%s=o.enums===String?types[%i].values[m%s]:m%s",r,s,r,r):t("d%s=types[%i].toObject(m%s,o)",r,s,r);else{var i=!1;switch(e.type){case"double":case"float":t("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s",r,r,r,r);break;case"uint64":i=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":t('if(typeof m%s==="number")',r)("d%s=o.longs===String?String(m%s):m%s",r,r,r)("else")("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s",r,r,r,r,i?"true":"",r);break;case"bytes":t("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s",r,r,r,r,r);break;default:t("d%s=m%s",r,r)}}return t}r.fromObject=function(t){var e=t.fieldsArray,s=i.codegen(["d"],t.name+"$fromObject")("if(d instanceof this.ctor)")("return d");if(!e.length)return s("return new this.ctor");s("var m=new this.ctor");for(var r=0;r<e.length;++r){var a=e[r].resolve(),c=i.safeProp(a.name);a.map?(s("if(d%s){",c)('if(typeof d%s!=="object")',c)("throw TypeError(%j)",a.fullName+": object expected")("m%s={}",c)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){",c),o(s,a,r,c+"[ks[i]]")("}")("}")):a.repeated?(s("if(d%s){",c)("if(!Array.isArray(d%s))",c)("throw TypeError(%j)",a.fullName+": array expected")("m%s=[]",c)("for(var i=0;i<d%s.length;++i){",c),o(s,a,r,c+"[i]")("}")("}")):(a.resolvedType instanceof n||s("if(d%s!=null){",c),o(s,a,r,c),a.resolvedType instanceof n||s("}"))}return s("return m")},r.toObject=function(t){var e=t.fieldsArray.slice().sort(i.compareFieldsById);if(!e.length)return i.codegen()("return {}");for(var s=i.codegen(["m","o"],t.name+"$toObject")("if(!o)")("o={}")("var d={}"),r=[],o=[],c=[],u=0;u<e.length;++u)e[u].partOf||(e[u].resolve().repeated?r:e[u].map?o:c).push(e[u]);if(r.length){for(s("if(o.arrays||o.defaults){"),u=0;u<r.length;++u)s("d%s=[]",i.safeProp(r[u].name));s("}")}if(o.length){for(s("if(o.objects||o.defaults){"),u=0;u<o.length;++u)s("d%s={}",i.safeProp(o[u].name));s("}")}if(c.length){for(s("if(o.defaults){"),u=0;u<c.length;++u){var d=c[u],l=i.safeProp(d.name);if(d.resolvedType instanceof n)s("d%s=o.enums===String?%j:%j",l,d.resolvedType.valuesById[d.typeDefault],d.typeDefault);else if(d.long)s("if(util.Long){")("var n=new util.Long(%i,%i,%j)",d.typeDefault.low,d.typeDefault.high,d.typeDefault.unsigned)("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n",l)("}else")("d%s=o.longs===String?%j:%i",l,d.typeDefault.toString(),d.typeDefault.toNumber());else if(d.bytes){var h="["+Array.prototype.slice.call(d.typeDefault).join(",")+"]";s("if(o.bytes===String)d%s=%j",l,String.fromCharCode.apply(String,d.typeDefault))("else{")("d%s=%s",l,h)("if(o.bytes!==Array)d%s=util.newBuffer(d%s)",l,l)("}")}else s("d%s=%j",l,d.typeDefault)}s("}")}var f=!1;for(u=0;u<e.length;++u){d=e[u];var p=t._fieldsArray.indexOf(d);l=i.safeProp(d.name);d.map?(f||(f=!0,s("var ks2")),s("if(m%s&&(ks2=Object.keys(m%s)).length){",l,l)("d%s={}",l)("for(var j=0;j<ks2.length;++j){"),a(s,d,p,l+"[ks2[j]]")("}")):d.repeated?(s("if(m%s&&m%s.length){",l,l)("d%s=[]",l)("for(var j=0;j<m%s.length;++j){",l),a(s,d,p,l+"[j]")("}")):(s("if(m%s!=null&&m.hasOwnProperty(%j)){",l,d.name),a(s,d,p,l),d.partOf&&s("if(o.oneofs)")("d%s=%j",i.safeProp(d.partOf.name),d.name)),s("}")}return s("return d")}},4799:(t,e,s)=>{"use strict";t.exports=function(t){var e=i.codegen(["r","l"],t.name+"$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new this.ctor"+(t.fieldsArray.filter((function(t){return t.map})).length?",k,value":""))("while(r.pos<c){")("var t=r.uint32()");t.group&&e("if((t&7)===4)")("break");e("switch(t>>>3){");for(var s=0;s<t.fieldsArray.length;++s){var a=t._fieldsArray[s].resolve(),c=a.resolvedType instanceof r?"int32":a.type,u="m"+i.safeProp(a.name);e("case %i: {",a.id),a.map?(e("if(%s===util.emptyObject)",u)("%s={}",u)("var c2 = r.uint32()+r.pos"),void 0!==n.defaults[a.keyType]?e("k=%j",n.defaults[a.keyType]):e("k=null"),void 0!==n.defaults[c]?e("value=%j",n.defaults[c]):e("value=null"),e("while(r.pos<c2){")("var tag2=r.uint32()")("switch(tag2>>>3){")("case 1: k=r.%s(); break",a.keyType)("case 2:"),void 0===n.basic[c]?e("value=types[%i].decode(r,r.uint32())",s):e("value=r.%s()",c),e("break")("default:")("r.skipType(tag2&7)")("break")("}")("}"),void 0!==n.long[a.keyType]?e('%s[typeof k==="object"?util.longToHash(k):k]=value',u):e("%s[k]=value",u)):a.repeated?(e("if(!(%s&&%s.length))",u,u)("%s=[]",u),void 0!==n.packed[c]&&e("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())",u,c)("}else"),void 0===n.basic[c]?e(a.resolvedType.group?"%s.push(types[%i].decode(r))":"%s.push(types[%i].decode(r,r.uint32()))",u,s):e("%s.push(r.%s())",u,c)):void 0===n.basic[c]?e(a.resolvedType.group?"%s=types[%i].decode(r)":"%s=types[%i].decode(r,r.uint32())",u,s):e("%s=r.%s()",u,c),e("break")("}")}for(e("default:")("r.skipType(t&7)")("break")("}")("}"),s=0;s<t._fieldsArray.length;++s){var d=t._fieldsArray[s];d.required&&e("if(!m.hasOwnProperty(%j))",d.name)("throw util.ProtocolError(%j,{instance:m})",o(d))}return e("return m")};var r=s(4937),n=s(8997),i=s(7572);function o(t){return"missing required '"+t.name+"'"}},6382:(t,e,s)=>{"use strict";t.exports=function(t){for(var e,s=i.codegen(["m","w"],t.name+"$encode")("if(!w)")("w=Writer.create()"),a=t.fieldsArray.slice().sort(i.compareFieldsById),c=0;c<a.length;++c){var u=a[c].resolve(),d=t._fieldsArray.indexOf(u),l=u.resolvedType instanceof r?"int32":u.type,h=n.basic[l];e="m"+i.safeProp(u.name),u.map?(s("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){",e,u.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",e)("w.uint32(%i).fork().uint32(%i).%s(ks[i])",(u.id<<3|2)>>>0,8|n.mapKey[u.keyType],u.keyType),void 0===h?s("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",d,e):s(".uint32(%i).%s(%s[ks[i]]).ldelim()",16|h,l,e),s("}")("}")):u.repeated?(s("if(%s!=null&&%s.length){",e,e),u.packed&&void 0!==n.packed[l]?s("w.uint32(%i).fork()",(u.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",e)("w.%s(%s[i])",l,e)("w.ldelim()"):(s("for(var i=0;i<%s.length;++i)",e),void 0===h?o(s,u,d,e+"[i]"):s("w.uint32(%i).%s(%s[i])",(u.id<<3|h)>>>0,l,e)),s("}")):(u.optional&&s("if(%s!=null&&Object.hasOwnProperty.call(m,%j))",e,u.name),void 0===h?o(s,u,d,e):s("w.uint32(%i).%s(%s)",(u.id<<3|h)>>>0,l,e))}return s("return w")};var r=s(4937),n=s(8997),i=s(7572);function o(t,e,s,r){return e.resolvedType.group?t("types[%i].encode(%s,w.uint32(%i)).uint32(%i)",s,r,(e.id<<3|3)>>>0,(e.id<<3|4)>>>0):t("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()",s,r,(e.id<<3|2)>>>0)}},4937:(t,e,s)=>{"use strict";t.exports=o;var r=s(4154);((o.prototype=Object.create(r.prototype)).constructor=o).className="Enum";var n=s(512),i=s(7572);function o(t,e,s,n,i){if(r.call(this,t,s),e&&"object"!=typeof e)throw TypeError("values must be an object");if(this.valuesById={},this.values=Object.create(this.valuesById),this.comment=n,this.comments=i||{},this.reserved=void 0,e)for(var o=Object.keys(e),a=0;a<o.length;++a)"number"==typeof e[o[a]]&&(this.valuesById[this.values[o[a]]=e[o[a]]]=o[a])}o.fromJSON=function(t,e){var s=new o(t,e.values,e.options,e.comment,e.comments);return s.reserved=e.reserved,s},o.prototype.toJSON=function(t){var e=!!t&&Boolean(t.keepComments);return i.toObject(["options",this.options,"values",this.values,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"comment",e?this.comment:void 0,"comments",e?this.comments:void 0])},o.prototype.add=function(t,e,s){if(!i.isString(t))throw TypeError("name must be a string");if(!i.isInteger(e))throw TypeError("id must be an integer");if(void 0!==this.values[t])throw Error("duplicate name '"+t+"' in "+this);if(this.isReservedId(e))throw Error("id "+e+" is reserved in "+this);if(this.isReservedName(t))throw Error("name '"+t+"' is reserved in "+this);if(void 0!==this.valuesById[e]){if(!this.options||!this.options.allow_alias)throw Error("duplicate id "+e+" in "+this);this.values[t]=e}else this.valuesById[this.values[t]=e]=t;return this.comments[t]=s||null,this},o.prototype.remove=function(t){if(!i.isString(t))throw TypeError("name must be a string");var e=this.values[t];if(null==e)throw Error("name '"+t+"' does not exist in "+this);return delete this.valuesById[e],delete this.values[t],delete this.comments[t],this},o.prototype.isReservedId=function(t){return n.isReservedId(this.reserved,t)},o.prototype.isReservedName=function(t){return n.isReservedName(this.reserved,t)}},5891:(t,e,s)=>{"use strict";t.exports=u;var r=s(4154);((u.prototype=Object.create(r.prototype)).constructor=u).className="Field";var n,i=s(4937),o=s(8997),a=s(7572),c=/^required|optional|repeated$/;function u(t,e,s,n,i,u,d){if(a.isObject(n)?(d=i,u=n,n=i=void 0):a.isObject(i)&&(d=u,u=i,i=void 0),r.call(this,t,u),!a.isInteger(e)||e<0)throw TypeError("id must be a non-negative integer");if(!a.isString(s))throw TypeError("type must be a string");if(void 0!==n&&!c.test(n=n.toString().toLowerCase()))throw TypeError("rule must be a string rule");if(void 0!==i&&!a.isString(i))throw TypeError("extend must be a string");"proto3_optional"===n&&(n="optional"),this.rule=n&&"optional"!==n?n:void 0,this.type=s,this.id=e,this.extend=i||void 0,this.required="required"===n,this.optional=!this.required,this.repeated="repeated"===n,this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=!!a.Long&&void 0!==o.long[s],this.bytes="bytes"===s,this.resolvedType=null,this.extensionField=null,this.declaringField=null,this._packed=null,this.comment=d}u.fromJSON=function(t,e){return new u(t,e.id,e.type,e.rule,e.extend,e.options,e.comment)},Object.defineProperty(u.prototype,"packed",{get:function(){return null===this._packed&&(this._packed=!1!==this.getOption("packed")),this._packed}}),u.prototype.setOption=function(t,e,s){return"packed"===t&&(this._packed=null),r.prototype.setOption.call(this,t,e,s)},u.prototype.toJSON=function(t){var e=!!t&&Boolean(t.keepComments);return a.toObject(["rule","optional"!==this.rule&&this.rule||void 0,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",e?this.comment:void 0])},u.prototype.resolve=function(){if(this.resolved)return this;if(void 0===(this.typeDefault=o.defaults[this.type])?(this.resolvedType=(this.declaringField?this.declaringField.parent:this.parent).lookupTypeOrEnum(this.type),this.resolvedType instanceof n?this.typeDefault=null:this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]):this.options&&this.options.proto3_optional&&(this.typeDefault=null),this.options&&null!=this.options.default&&(this.typeDefault=this.options.default,this.resolvedType instanceof i&&"string"==typeof this.typeDefault&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.options&&(!0!==this.options.packed&&(void 0===this.options.packed||!this.resolvedType||this.resolvedType instanceof i)||delete this.options.packed,Object.keys(this.options).length||(this.options=void 0)),this.long)this.typeDefault=a.Long.fromNumber(this.typeDefault,"u"===this.type.charAt(0)),Object.freeze&&Object.freeze(this.typeDefault);else if(this.bytes&&"string"==typeof this.typeDefault){var t;a.base64.test(this.typeDefault)?a.base64.decode(this.typeDefault,t=a.newBuffer(a.base64.length(this.typeDefault)),0):a.utf8.write(this.typeDefault,t=a.newBuffer(a.utf8.length(this.typeDefault)),0),this.typeDefault=t}return this.map?this.defaultValue=a.emptyObject:this.repeated?this.defaultValue=a.emptyArray:this.defaultValue=this.typeDefault,this.parent instanceof n&&(this.parent.ctor.prototype[this.name]=this.defaultValue),r.prototype.resolve.call(this)},u.d=function(t,e,s,r){return"function"==typeof e?e=a.decorateType(e).name:e&&"object"==typeof e&&(e=a.decorateEnum(e).name),function(n,i){a.decorateType(n.constructor).add(new u(i,t,e,s,{default:r}))}},u._configure=function(t){n=t}},7278:(t,e,s)=>{"use strict";var r=t.exports=s(3278);r.build="light",r.load=function(t,e,s){return"function"==typeof e?(s=e,e=new r.Root):e||(e=new r.Root),e.load(t,s)},r.loadSync=function(t,e){return e||(e=new r.Root),e.loadSync(t)},r.encoder=s(6382),r.decoder=s(4799),r.verifier=s(8600),r.converter=s(6274),r.ReflectionObject=s(4154),r.Namespace=s(512),r.Root=s(2613),r.Enum=s(4937),r.Type=s(4560),r.Field=s(5891),r.OneOf=s(3044),r.MapField=s(8911),r.Service=s(877),r.Method=s(4935),r.Message=s(4777),r.wrappers=s(3375),r.types=s(8997),r.util=s(7572),r.ReflectionObject._configure(r.Root),r.Namespace._configure(r.Type,r.Service,r.Enum),r.Root._configure(r.Type),r.Field._configure(r.Type)},3278:(t,e,s)=>{"use strict";var r=e;function n(){r.util._configure(),r.Writer._configure(r.BufferWriter),r.Reader._configure(r.BufferReader)}r.build="minimal",r.Writer=s(2944),r.BufferWriter=s(2178),r.Reader=s(9867),r.BufferReader=s(2676),r.util=s(4155),r.rpc=s(3290),r.roots=s(284),r.configure=n,n()},8911:(t,e,s)=>{"use strict";t.exports=o;var r=s(5891);((o.prototype=Object.create(r.prototype)).constructor=o).className="MapField";var n=s(8997),i=s(7572);function o(t,e,s,n,o,a){if(r.call(this,t,e,n,void 0,void 0,o,a),!i.isString(s))throw TypeError("keyType must be a string");this.keyType=s,this.resolvedKeyType=null,this.map=!0}o.fromJSON=function(t,e){return new o(t,e.id,e.keyType,e.type,e.options,e.comment)},o.prototype.toJSON=function(t){var e=!!t&&Boolean(t.keepComments);return i.toObject(["keyType",this.keyType,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",e?this.comment:void 0])},o.prototype.resolve=function(){if(this.resolved)return this;if(void 0===n.mapKey[this.keyType])throw Error("invalid key type: "+this.keyType);return r.prototype.resolve.call(this)},o.d=function(t,e,s){return"function"==typeof s?s=i.decorateType(s).name:s&&"object"==typeof s&&(s=i.decorateEnum(s).name),function(r,n){i.decorateType(r.constructor).add(new o(n,t,e,s))}}},4777:(t,e,s)=>{"use strict";t.exports=n;var r=s(4155);function n(t){if(t)for(var e=Object.keys(t),s=0;s<e.length;++s)this[e[s]]=t[e[s]]}n.create=function(t){return this.$type.create(t)},n.encode=function(t,e){return this.$type.encode(t,e)},n.encodeDelimited=function(t,e){return this.$type.encodeDelimited(t,e)},n.decode=function(t){return this.$type.decode(t)},n.decodeDelimited=function(t){return this.$type.decodeDelimited(t)},n.verify=function(t){return this.$type.verify(t)},n.fromObject=function(t){return this.$type.fromObject(t)},n.toObject=function(t,e){return this.$type.toObject(t,e)},n.prototype.toJSON=function(){return this.$type.toObject(this,r.toJSONOptions)}},4935:(t,e,s)=>{"use strict";t.exports=i;var r=s(4154);((i.prototype=Object.create(r.prototype)).constructor=i).className="Method";var n=s(7572);function i(t,e,s,i,o,a,c,u,d){if(n.isObject(o)?(c=o,o=a=void 0):n.isObject(a)&&(c=a,a=void 0),void 0!==e&&!n.isString(e))throw TypeError("type must be a string");if(!n.isString(s))throw TypeError("requestType must be a string");if(!n.isString(i))throw TypeError("responseType must be a string");r.call(this,t,c),this.type=e||"rpc",this.requestType=s,this.requestStream=!!o||void 0,this.responseType=i,this.responseStream=!!a||void 0,this.resolvedRequestType=null,this.resolvedResponseType=null,this.comment=u,this.parsedOptions=d}i.fromJSON=function(t,e){return new i(t,e.type,e.requestType,e.responseType,e.requestStream,e.responseStream,e.options,e.comment,e.parsedOptions)},i.prototype.toJSON=function(t){var e=!!t&&Boolean(t.keepComments);return n.toObject(["type","rpc"!==this.type&&this.type||void 0,"requestType",this.requestType,"requestStream",this.requestStream,"responseType",this.responseType,"responseStream",this.responseStream,"options",this.options,"comment",e?this.comment:void 0,"parsedOptions",this.parsedOptions])},i.prototype.resolve=function(){return this.resolved?this:(this.resolvedRequestType=this.parent.lookupType(this.requestType),this.resolvedResponseType=this.parent.lookupType(this.responseType),r.prototype.resolve.call(this))}},512:(t,e,s)=>{"use strict";t.exports=d;var r=s(4154);((d.prototype=Object.create(r.prototype)).constructor=d).className="Namespace";var n,i,o,a=s(5891),c=s(7572);function u(t,e){if(t&&t.length){for(var s={},r=0;r<t.length;++r)s[t[r].name]=t[r].toJSON(e);return s}}function d(t,e){r.call(this,t,e),this.nested=void 0,this._nestedArray=null}function l(t){return t._nestedArray=null,t}d.fromJSON=function(t,e){return new d(t,e.options).addJSON(e.nested)},d.arrayToJSON=u,d.isReservedId=function(t,e){if(t)for(var s=0;s<t.length;++s)if("string"!=typeof t[s]&&t[s][0]<=e&&t[s][1]>e)return!0;return!1},d.isReservedName=function(t,e){if(t)for(var s=0;s<t.length;++s)if(t[s]===e)return!0;return!1},Object.defineProperty(d.prototype,"nestedArray",{get:function(){return this._nestedArray||(this._nestedArray=c.toArray(this.nested))}}),d.prototype.toJSON=function(t){return c.toObject(["options",this.options,"nested",u(this.nestedArray,t)])},d.prototype.addJSON=function(t){if(t)for(var e,s=Object.keys(t),r=0;r<s.length;++r)e=t[s[r]],this.add((void 0!==e.fields?n.fromJSON:void 0!==e.values?o.fromJSON:void 0!==e.methods?i.fromJSON:void 0!==e.id?a.fromJSON:d.fromJSON)(s[r],e));return this},d.prototype.get=function(t){return this.nested&&this.nested[t]||null},d.prototype.getEnum=function(t){if(this.nested&&this.nested[t]instanceof o)return this.nested[t].values;throw Error("no such enum: "+t)},d.prototype.add=function(t){if(!(t instanceof a&&void 0!==t.extend||t instanceof n||t instanceof o||t instanceof i||t instanceof d))throw TypeError("object must be a valid nested object");if(this.nested){var e=this.get(t.name);if(e){if(!(e instanceof d&&t instanceof d)||e instanceof n||e instanceof i)throw Error("duplicate name '"+t.name+"' in "+this);for(var s=e.nestedArray,r=0;r<s.length;++r)t.add(s[r]);this.remove(e),this.nested||(this.nested={}),t.setOptions(e.options,!0)}}else this.nested={};return this.nested[t.name]=t,t.onAdd(this),l(this)},d.prototype.remove=function(t){if(!(t instanceof r))throw TypeError("object must be a ReflectionObject");if(t.parent!==this)throw Error(t+" is not a member of "+this);return delete this.nested[t.name],Object.keys(this.nested).length||(this.nested=void 0),t.onRemove(this),l(this)},d.prototype.define=function(t,e){if(c.isString(t))t=t.split(".");else if(!Array.isArray(t))throw TypeError("illegal path");if(t&&t.length&&""===t[0])throw Error("path must be relative");for(var s=this;t.length>0;){var r=t.shift();if(s.nested&&s.nested[r]){if(!((s=s.nested[r])instanceof d))throw Error("path conflicts with non-namespace objects")}else s.add(s=new d(r))}return e&&s.addJSON(e),s},d.prototype.resolveAll=function(){for(var t=this.nestedArray,e=0;e<t.length;)t[e]instanceof d?t[e++].resolveAll():t[e++].resolve();return this.resolve()},d.prototype.lookup=function(t,e,s){if("boolean"==typeof e?(s=e,e=void 0):e&&!Array.isArray(e)&&(e=[e]),c.isString(t)&&t.length){if("."===t)return this.root;t=t.split(".")}else if(!t.length)return this;if(""===t[0])return this.root.lookup(t.slice(1),e);var r=this.get(t[0]);if(r){if(1===t.length){if(!e||e.indexOf(r.constructor)>-1)return r}else if(r instanceof d&&(r=r.lookup(t.slice(1),e,!0)))return r}else for(var n=0;n<this.nestedArray.length;++n)if(this._nestedArray[n]instanceof d&&(r=this._nestedArray[n].lookup(t,e,!0)))return r;return null===this.parent||s?null:this.parent.lookup(t,e)},d.prototype.lookupType=function(t){var e=this.lookup(t,[n]);if(!e)throw Error("no such type: "+t);return e},d.prototype.lookupEnum=function(t){var e=this.lookup(t,[o]);if(!e)throw Error("no such Enum '"+t+"' in "+this);return e},d.prototype.lookupTypeOrEnum=function(t){var e=this.lookup(t,[n,o]);if(!e)throw Error("no such Type or Enum '"+t+"' in "+this);return e},d.prototype.lookupService=function(t){var e=this.lookup(t,[i]);if(!e)throw Error("no such Service '"+t+"' in "+this);return e},d._configure=function(t,e,s){n=t,i=e,o=s}},4154:(t,e,s)=>{"use strict";t.exports=i,i.className="ReflectionObject";var r,n=s(7572);function i(t,e){if(!n.isString(t))throw TypeError("name must be a string");if(e&&!n.isObject(e))throw TypeError("options must be an object");this.options=e,this.parsedOptions=null,this.name=t,this.parent=null,this.resolved=!1,this.comment=null,this.filename=null}Object.defineProperties(i.prototype,{root:{get:function(){for(var t=this;null!==t.parent;)t=t.parent;return t}},fullName:{get:function(){for(var t=[this.name],e=this.parent;e;)t.unshift(e.name),e=e.parent;return t.join(".")}}}),i.prototype.toJSON=function(){throw Error()},i.prototype.onAdd=function(t){this.parent&&this.parent!==t&&this.parent.remove(this),this.parent=t,this.resolved=!1;var e=t.root;e instanceof r&&e._handleAdd(this)},i.prototype.onRemove=function(t){var e=t.root;e instanceof r&&e._handleRemove(this),this.parent=null,this.resolved=!1},i.prototype.resolve=function(){return this.resolved||this.root instanceof r&&(this.resolved=!0),this},i.prototype.getOption=function(t){if(this.options)return this.options[t]},i.prototype.setOption=function(t,e,s){return s&&this.options&&void 0!==this.options[t]||((this.options||(this.options={}))[t]=e),this},i.prototype.setParsedOption=function(t,e,s){this.parsedOptions||(this.parsedOptions=[]);var r=this.parsedOptions;if(s){var i=r.find((function(e){return Object.prototype.hasOwnProperty.call(e,t)}));if(i){var o=i[t];n.setProperty(o,s,e)}else(i={})[t]=n.setProperty({},s,e),r.push(i)}else{var a={};a[t]=e,r.push(a)}return this},i.prototype.setOptions=function(t,e){if(t)for(var s=Object.keys(t),r=0;r<s.length;++r)this.setOption(s[r],t[s[r]],e);return this},i.prototype.toString=function(){var t=this.constructor.className,e=this.fullName;return e.length?t+" "+e:t},i._configure=function(t){r=t}},3044:(t,e,s)=>{"use strict";t.exports=o;var r=s(4154);((o.prototype=Object.create(r.prototype)).constructor=o).className="OneOf";var n=s(5891),i=s(7572);function o(t,e,s,n){if(Array.isArray(e)||(s=e,e=void 0),r.call(this,t,s),void 0!==e&&!Array.isArray(e))throw TypeError("fieldNames must be an Array");this.oneof=e||[],this.fieldsArray=[],this.comment=n}function a(t){if(t.parent)for(var e=0;e<t.fieldsArray.length;++e)t.fieldsArray[e].parent||t.parent.add(t.fieldsArray[e])}o.fromJSON=function(t,e){return new o(t,e.oneof,e.options,e.comment)},o.prototype.toJSON=function(t){var e=!!t&&Boolean(t.keepComments);return i.toObject(["options",this.options,"oneof",this.oneof,"comment",e?this.comment:void 0])},o.prototype.add=function(t){if(!(t instanceof n))throw TypeError("field must be a Field");return t.parent&&t.parent!==this.parent&&t.parent.remove(t),this.oneof.push(t.name),this.fieldsArray.push(t),t.partOf=this,a(this),this},o.prototype.remove=function(t){if(!(t instanceof n))throw TypeError("field must be a Field");var e=this.fieldsArray.indexOf(t);if(e<0)throw Error(t+" is not a member of "+this);return this.fieldsArray.splice(e,1),(e=this.oneof.indexOf(t.name))>-1&&this.oneof.splice(e,1),t.partOf=null,this},o.prototype.onAdd=function(t){r.prototype.onAdd.call(this,t);for(var e=0;e<this.oneof.length;++e){var s=t.get(this.oneof[e]);s&&!s.partOf&&(s.partOf=this,this.fieldsArray.push(s))}a(this)},o.prototype.onRemove=function(t){for(var e,s=0;s<this.fieldsArray.length;++s)(e=this.fieldsArray[s]).parent&&e.parent.remove(e);r.prototype.onRemove.call(this,t)},o.d=function(){for(var t=new Array(arguments.length),e=0;e<arguments.length;)t[e]=arguments[e++];return function(e,s){i.decorateType(e.constructor).add(new o(s,t)),Object.defineProperty(e,s,{get:i.oneOfGetter(t),set:i.oneOfSetter(t)})}}},9867:(t,e,s)=>{"use strict";t.exports=c;var r,n=s(4155),i=n.LongBits,o=n.utf8;function a(t,e){return RangeError("index out of range: "+t.pos+" + "+(e||1)+" > "+t.len)}function c(t){this.buf=t,this.pos=0,this.len=t.length}var u,d="undefined"!=typeof Uint8Array?function(t){if(t instanceof Uint8Array||Array.isArray(t))return new c(t);throw Error("illegal buffer")}:function(t){if(Array.isArray(t))return new c(t);throw Error("illegal buffer")},l=function(){return n.Buffer?function(t){return(c.create=function(t){return n.Buffer.isBuffer(t)?new r(t):d(t)})(t)}:d};function h(){var t=new i(0,0),e=0;if(!(this.len-this.pos>4)){for(;e<3;++e){if(this.pos>=this.len)throw a(this);if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*e)>>>0,this.buf[this.pos++]<128)return t}return t.lo=(t.lo|(127&this.buf[this.pos++])<<7*e)>>>0,t}for(;e<4;++e)if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*e)>>>0,this.buf[this.pos++]<128)return t;if(t.lo=(t.lo|(127&this.buf[this.pos])<<28)>>>0,t.hi=(t.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return t;if(e=0,this.len-this.pos>4){for(;e<5;++e)if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*e+3)>>>0,this.buf[this.pos++]<128)return t}else for(;e<5;++e){if(this.pos>=this.len)throw a(this);if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*e+3)>>>0,this.buf[this.pos++]<128)return t}throw Error("invalid varint encoding")}function f(t,e){return(t[e-4]|t[e-3]<<8|t[e-2]<<16|t[e-1]<<24)>>>0}function p(){if(this.pos+8>this.len)throw a(this,8);return new i(f(this.buf,this.pos+=4),f(this.buf,this.pos+=4))}c.create=l(),c.prototype._slice=n.Array.prototype.subarray||n.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 t=this.uint32();return t>>>1^-(1&t)|0},c.prototype.bool=function(){return 0!==this.uint32()},c.prototype.fixed32=function(){if(this.pos+4>this.len)throw a(this,4);return f(this.buf,this.pos+=4)},c.prototype.sfixed32=function(){if(this.pos+4>this.len)throw a(this,4);return 0|f(this.buf,this.pos+=4)},c.prototype.float=function(){if(this.pos+4>this.len)throw a(this,4);var t=n.float.readFloatLE(this.buf,this.pos);return this.pos+=4,t},c.prototype.double=function(){if(this.pos+8>this.len)throw a(this,4);var t=n.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,t},c.prototype.bytes=function(){var t=this.uint32(),e=this.pos,s=this.pos+t;if(s>this.len)throw a(this,t);return this.pos+=t,Array.isArray(this.buf)?this.buf.slice(e,s):e===s?new this.buf.constructor(0):this._slice.call(this.buf,e,s)},c.prototype.string=function(){var t=this.bytes();return o.read(t,0,t.length)},c.prototype.skip=function(t){if("number"==typeof t){if(this.pos+t>this.len)throw a(this,t);this.pos+=t}else do{if(this.pos>=this.len)throw a(this)}while(128&this.buf[this.pos++]);return this},c.prototype.skipType=function(t){switch(t){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(t=7&this.uint32());)this.skipType(t);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+t+" at offset "+this.pos)}return this},c._configure=function(t){r=t,c.create=l(),r._configure();var e=n.Long?"toLong":"toNumber";n.merge(c.prototype,{int64:function(){return h.call(this)[e](!1)},uint64:function(){return h.call(this)[e](!0)},sint64:function(){return h.call(this).zzDecode()[e](!1)},fixed64:function(){return p.call(this)[e](!0)},sfixed64:function(){return p.call(this)[e](!1)}})}},2676:(t,e,s)=>{"use strict";t.exports=i;var r=s(9867);(i.prototype=Object.create(r.prototype)).constructor=i;var n=s(4155);function i(t){r.call(this,t)}i._configure=function(){n.Buffer&&(i.prototype._slice=n.Buffer.prototype.slice)},i.prototype.string=function(){var t=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+t,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+t,this.len))},i._configure()},2613:(t,e,s)=>{"use strict";t.exports=l;var r=s(512);((l.prototype=Object.create(r.prototype)).constructor=l).className="Root";var n,i,o,a=s(5891),c=s(4937),u=s(3044),d=s(7572);function l(t){r.call(this,"",t),this.deferred=[],this.files=[]}function h(){}l.fromJSON=function(t,e){return e||(e=new l),t.options&&e.setOptions(t.options),e.addJSON(t.nested)},l.prototype.resolvePath=d.path.resolve,l.prototype.fetch=d.fetch,l.prototype.load=function t(e,s,r){"function"==typeof s&&(r=s,s=void 0);var n=this;if(!r)return d.asPromise(t,n,e,s);var a=r===h;function c(t,e){if(r){var s=r;if(r=null,a)throw t;s(t,e)}}function u(t){var e=t.lastIndexOf("google/protobuf/");if(e>-1){var s=t.substring(e);if(s in o)return s}return null}function l(t,e){try{if(d.isString(e)&&"{"===e.charAt(0)&&(e=JSON.parse(e)),d.isString(e)){i.filename=t;var r,o=i(e,n,s),l=0;if(o.imports)for(;l<o.imports.length;++l)(r=u(o.imports[l])||n.resolvePath(t,o.imports[l]))&&f(r);if(o.weakImports)for(l=0;l<o.weakImports.length;++l)(r=u(o.weakImports[l])||n.resolvePath(t,o.weakImports[l]))&&f(r,!0)}else n.setOptions(e.options).addJSON(e.nested)}catch(t){c(t)}a||p||c(null,n)}function f(t,e){if(!(n.files.indexOf(t)>-1))if(n.files.push(t),t in o)a?l(t,o[t]):(++p,setTimeout((function(){--p,l(t,o[t])})));else if(a){var s;try{s=d.fs.readFileSync(t).toString("utf8")}catch(t){return void(e||c(t))}l(t,s)}else++p,n.fetch(t,(function(s,i){--p,r&&(s?e?p||c(null,n):c(s):l(t,i))}))}var p=0;d.isString(e)&&(e=[e]);for(var y,m=0;m<e.length;++m)(y=n.resolvePath("",e[m]))&&f(y);if(a)return n;p||c(null,n)},l.prototype.loadSync=function(t,e){if(!d.isNode)throw Error("not supported");return this.load(t,e,h)},l.prototype.resolveAll=function(){if(this.deferred.length)throw Error("unresolvable extensions: "+this.deferred.map((function(t){return"'extend "+t.extend+"' in "+t.parent.fullName})).join(", "));return r.prototype.resolveAll.call(this)};var f=/^[A-Z]/;function p(t,e){var s=e.parent.lookup(e.extend);if(s){var r=new a(e.fullName,e.id,e.type,e.rule,void 0,e.options);return r.declaringField=e,e.extensionField=r,s.add(r),!0}return!1}l.prototype._handleAdd=function(t){if(t instanceof a)void 0===t.extend||t.extensionField||p(0,t)||this.deferred.push(t);else if(t instanceof c)f.test(t.name)&&(t.parent[t.name]=t.values);else if(!(t instanceof u)){if(t instanceof n)for(var e=0;e<this.deferred.length;)p(0,this.deferred[e])?this.deferred.splice(e,1):++e;for(var s=0;s<t.nestedArray.length;++s)this._handleAdd(t._nestedArray[s]);f.test(t.name)&&(t.parent[t.name]=t)}},l.prototype._handleRemove=function(t){if(t instanceof a){if(void 0!==t.extend)if(t.extensionField)t.extensionField.parent.remove(t.extensionField),t.extensionField=null;else{var e=this.deferred.indexOf(t);e>-1&&this.deferred.splice(e,1)}}else if(t instanceof c)f.test(t.name)&&delete t.parent[t.name];else if(t instanceof r){for(var s=0;s<t.nestedArray.length;++s)this._handleRemove(t._nestedArray[s]);f.test(t.name)&&delete t.parent[t.name]}},l._configure=function(t,e,s){n=t,i=e,o=s}},284:t=>{"use strict";t.exports={}},3290:(t,e,s)=>{"use strict";e.Service=s(979)},979:(t,e,s)=>{"use strict";t.exports=n;var r=s(4155);function n(t,e,s){if("function"!=typeof t)throw TypeError("rpcImpl must be a function");r.EventEmitter.call(this),this.rpcImpl=t,this.requestDelimited=Boolean(e),this.responseDelimited=Boolean(s)}(n.prototype=Object.create(r.EventEmitter.prototype)).constructor=n,n.prototype.rpcCall=function t(e,s,n,i,o){if(!i)throw TypeError("request must be specified");var a=this;if(!o)return r.asPromise(t,a,e,s,n,i);if(a.rpcImpl)try{return a.rpcImpl(e,s[a.requestDelimited?"encodeDelimited":"encode"](i).finish(),(function(t,s){if(t)return a.emit("error",t,e),o(t);if(null!==s){if(!(s instanceof n))try{s=n[a.responseDelimited?"decodeDelimited":"decode"](s)}catch(t){return a.emit("error",t,e),o(t)}return a.emit("data",s,e),o(null,s)}a.end(!0)}))}catch(t){return a.emit("error",t,e),void setTimeout((function(){o(t)}),0)}else setTimeout((function(){o(Error("already ended"))}),0)},n.prototype.end=function(t){return this.rpcImpl&&(t||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},877:(t,e,s)=>{"use strict";t.exports=a;var r=s(512);((a.prototype=Object.create(r.prototype)).constructor=a).className="Service";var n=s(4935),i=s(7572),o=s(3290);function a(t,e){r.call(this,t,e),this.methods={},this._methodsArray=null}function c(t){return t._methodsArray=null,t}a.fromJSON=function(t,e){var s=new a(t,e.options);if(e.methods)for(var r=Object.keys(e.methods),i=0;i<r.length;++i)s.add(n.fromJSON(r[i],e.methods[r[i]]));return e.nested&&s.addJSON(e.nested),s.comment=e.comment,s},a.prototype.toJSON=function(t){var e=r.prototype.toJSON.call(this,t),s=!!t&&Boolean(t.keepComments);return i.toObject(["options",e&&e.options||void 0,"methods",r.arrayToJSON(this.methodsArray,t)||{},"nested",e&&e.nested||void 0,"comment",s?this.comment:void 0])},Object.defineProperty(a.prototype,"methodsArray",{get:function(){return this._methodsArray||(this._methodsArray=i.toArray(this.methods))}}),a.prototype.get=function(t){return this.methods[t]||r.prototype.get.call(this,t)},a.prototype.resolveAll=function(){for(var t=this.methodsArray,e=0;e<t.length;++e)t[e].resolve();return r.prototype.resolve.call(this)},a.prototype.add=function(t){if(this.get(t.name))throw Error("duplicate name '"+t.name+"' in "+this);return t instanceof n?(this.methods[t.name]=t,t.parent=this,c(this)):r.prototype.add.call(this,t)},a.prototype.remove=function(t){if(t instanceof n){if(this.methods[t.name]!==t)throw Error(t+" is not a member of "+this);return delete this.methods[t.name],t.parent=null,c(this)}return r.prototype.remove.call(this,t)},a.prototype.create=function(t,e,s){for(var r,n=new o.Service(t,e,s),a=0;a<this.methodsArray.length;++a){var c=i.lcFirst((r=this._methodsArray[a]).resolve().name).replace(/[^$\w_]/g,"");n[c]=i.codegen(["r","c"],i.isReserved(c)?c+"_":c)("return this.rpcCall(m,q,s,r,c)")({m:r,q:r.resolvedRequestType.ctor,s:r.resolvedResponseType.ctor})}return n}},4560:(t,e,s)=>{"use strict";t.exports=x;var r=s(512);((x.prototype=Object.create(r.prototype)).constructor=x).className="Type";var n=s(4937),i=s(3044),o=s(5891),a=s(8911),c=s(877),u=s(4777),d=s(9867),l=s(2944),h=s(7572),f=s(6382),p=s(4799),y=s(8600),m=s(6274),v=s(3375);function x(t,e){r.call(this,t,e),this.fields={},this.oneofs=void 0,this.extensions=void 0,this.reserved=void 0,this.group=void 0,this._fieldsById=null,this._fieldsArray=null,this._oneofsArray=null,this._ctor=null}function _(t){return t._fieldsById=t._fieldsArray=t._oneofsArray=null,delete t.encode,delete t.decode,delete t.verify,t}Object.defineProperties(x.prototype,{fieldsById:{get:function(){if(this._fieldsById)return this._fieldsById;this._fieldsById={};for(var t=Object.keys(this.fields),e=0;e<t.length;++e){var s=this.fields[t[e]],r=s.id;if(this._fieldsById[r])throw Error("duplicate id "+r+" in "+this);this._fieldsById[r]=s}return this._fieldsById}},fieldsArray:{get:function(){return this._fieldsArray||(this._fieldsArray=h.toArray(this.fields))}},oneofsArray:{get:function(){return this._oneofsArray||(this._oneofsArray=h.toArray(this.oneofs))}},ctor:{get:function(){return this._ctor||(this.ctor=x.generateConstructor(this)())},set:function(t){var e=t.prototype;e instanceof u||((t.prototype=new u).constructor=t,h.merge(t.prototype,e)),t.$type=t.prototype.$type=this,h.merge(t,u,!0),this._ctor=t;for(var s=0;s<this.fieldsArray.length;++s)this._fieldsArray[s].resolve();var r={};for(s=0;s<this.oneofsArray.length;++s)r[this._oneofsArray[s].resolve().name]={get:h.oneOfGetter(this._oneofsArray[s].oneof),set:h.oneOfSetter(this._oneofsArray[s].oneof)};s&&Object.defineProperties(t.prototype,r)}}}),x.generateConstructor=function(t){for(var e,s=h.codegen(["p"],t.name),r=0;r<t.fieldsArray.length;++r)(e=t._fieldsArray[r]).map?s("this%s={}",h.safeProp(e.name)):e.repeated&&s("this%s=[]",h.safeProp(e.name));return s("if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)")("this[ks[i]]=p[ks[i]]")},x.fromJSON=function(t,e){var s=new x(t,e.options);s.extensions=e.extensions,s.reserved=e.reserved;for(var u=Object.keys(e.fields),d=0;d<u.length;++d)s.add((void 0!==e.fields[u[d]].keyType?a.fromJSON:o.fromJSON)(u[d],e.fields[u[d]]));if(e.oneofs)for(u=Object.keys(e.oneofs),d=0;d<u.length;++d)s.add(i.fromJSON(u[d],e.oneofs[u[d]]));if(e.nested)for(u=Object.keys(e.nested),d=0;d<u.length;++d){var l=e.nested[u[d]];s.add((void 0!==l.id?o.fromJSON:void 0!==l.fields?x.fromJSON:void 0!==l.values?n.fromJSON:void 0!==l.methods?c.fromJSON:r.fromJSON)(u[d],l))}return e.extensions&&e.extensions.length&&(s.extensions=e.extensions),e.reserved&&e.reserved.length&&(s.reserved=e.reserved),e.group&&(s.group=!0),e.comment&&(s.comment=e.comment),s},x.prototype.toJSON=function(t){var e=r.prototype.toJSON.call(this,t),s=!!t&&Boolean(t.keepComments);return h.toObject(["options",e&&e.options||void 0,"oneofs",r.arrayToJSON(this.oneofsArray,t),"fields",r.arrayToJSON(this.fieldsArray.filter((function(t){return!t.declaringField})),t)||{},"extensions",this.extensions&&this.extensions.length?this.extensions:void 0,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"group",this.group||void 0,"nested",e&&e.nested||void 0,"comment",s?this.comment:void 0])},x.prototype.resolveAll=function(){for(var t=this.fieldsArray,e=0;e<t.length;)t[e++].resolve();var s=this.oneofsArray;for(e=0;e<s.length;)s[e++].resolve();return r.prototype.resolveAll.call(this)},x.prototype.get=function(t){return this.fields[t]||this.oneofs&&this.oneofs[t]||this.nested&&this.nested[t]||null},x.prototype.add=function(t){if(this.get(t.name))throw Error("duplicate name '"+t.name+"' in "+this);if(t instanceof o&&void 0===t.extend){if(this._fieldsById?this._fieldsById[t.id]:this.fieldsById[t.id])throw Error("duplicate id "+t.id+" in "+this);if(this.isReservedId(t.id))throw Error("id "+t.id+" is reserved in "+this);if(this.isReservedName(t.name))throw Error("name '"+t.name+"' is reserved in "+this);return t.parent&&t.parent.remove(t),this.fields[t.name]=t,t.message=this,t.onAdd(this),_(this)}return t instanceof i?(this.oneofs||(this.oneofs={}),this.oneofs[t.name]=t,t.onAdd(this),_(this)):r.prototype.add.call(this,t)},x.prototype.remove=function(t){if(t instanceof o&&void 0===t.extend){if(!this.fields||this.fields[t.name]!==t)throw Error(t+" is not a member of "+this);return delete this.fields[t.name],t.parent=null,t.onRemove(this),_(this)}if(t instanceof i){if(!this.oneofs||this.oneofs[t.name]!==t)throw Error(t+" is not a member of "+this);return delete this.oneofs[t.name],t.parent=null,t.onRemove(this),_(this)}return r.prototype.remove.call(this,t)},x.prototype.isReservedId=function(t){return r.isReservedId(this.reserved,t)},x.prototype.isReservedName=function(t){return r.isReservedName(this.reserved,t)},x.prototype.create=function(t){return new this.ctor(t)},x.prototype.setup=function(){for(var t=this.fullName,e=[],s=0;s<this.fieldsArray.length;++s)e.push(this._fieldsArray[s].resolve().resolvedType);this.encode=f(this)({Writer:l,types:e,util:h}),this.decode=p(this)({Reader:d,types:e,util:h}),this.verify=y(this)({types:e,util:h}),this.fromObject=m.fromObject(this)({types:e,util:h}),this.toObject=m.toObject(this)({types:e,util:h});var r=v[t];if(r){var n=Object.create(this);n.fromObject=this.fromObject,this.fromObject=r.fromObject.bind(n),n.toObject=this.toObject,this.toObject=r.toObject.bind(n)}return this},x.prototype.encode=function(t,e){return this.setup().encode(t,e)},x.prototype.encodeDelimited=function(t,e){return this.encode(t,e&&e.len?e.fork():e).ldelim()},x.prototype.decode=function(t,e){return this.setup().decode(t,e)},x.prototype.decodeDelimited=function(t){return t instanceof d||(t=d.create(t)),this.decode(t,t.uint32())},x.prototype.verify=function(t){return this.setup().verify(t)},x.prototype.fromObject=function(t){return this.setup().fromObject(t)},x.prototype.toObject=function(t,e){return this.setup().toObject(t,e)},x.d=function(t){return function(e){h.decorateType(e,t)}}},8997:(t,e,s)=>{"use strict";var r=e,n=s(7572),i=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];function o(t,e){var s=0,r={};for(e|=0;s<t.length;)r[i[s+e]]=t[s++];return r}r.basic=o([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]),r.defaults=o([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",n.emptyArray,null]),r.long=o([0,0,0,1,1],7),r.mapKey=o([0,0,0,5,5,0,0,0,1,1,0,2],2),r.packed=o([1,5,0,0,0,5,5,0,0,0,1,1,0])},7572:(t,e,s)=>{"use strict";var r,n,i=t.exports=s(4155),o=s(284);i.codegen=s(6348),i.fetch=s(7803),i.path=s(1272),i.fs=i.inquire("fs"),i.toArray=function(t){if(t){for(var e=Object.keys(t),s=new Array(e.length),r=0;r<e.length;)s[r]=t[e[r++]];return s}return[]},i.toObject=function(t){for(var e={},s=0;s<t.length;){var r=t[s++],n=t[s++];void 0!==n&&(e[r]=n)}return e};var a=/\\/g,c=/"/g;i.isReserved=function(t){return/^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/.test(t)},i.safeProp=function(t){return!/^[$\w_]+$/.test(t)||i.isReserved(t)?'["'+t.replace(a,"\\\\").replace(c,'\\"')+'"]':"."+t},i.ucFirst=function(t){return t.charAt(0).toUpperCase()+t.substring(1)};var u=/_([a-z])/g;i.camelCase=function(t){return t.substring(0,1)+t.substring(1).replace(u,(function(t,e){return e.toUpperCase()}))},i.compareFieldsById=function(t,e){return t.id-e.id},i.decorateType=function(t,e){if(t.$type)return e&&t.$type.name!==e&&(i.decorateRoot.remove(t.$type),t.$type.name=e,i.decorateRoot.add(t.$type)),t.$type;r||(r=s(4560));var n=new r(e||t.name);return i.decorateRoot.add(n),n.ctor=t,Object.defineProperty(t,"$type",{value:n,enumerable:!1}),Object.defineProperty(t.prototype,"$type",{value:n,enumerable:!1}),n};var d=0;i.decorateEnum=function(t){if(t.$type)return t.$type;n||(n=s(4937));var e=new n("Enum"+d++,t);return i.decorateRoot.add(e),Object.defineProperty(t,"$type",{value:e,enumerable:!1}),e},i.setProperty=function(t,e,s){if("object"!=typeof t)throw TypeError("dst must be an object");if(!e)throw TypeError("path must be specified");return function t(e,s,r){var n=s.shift();if("__proto__"===n)return e;if(s.length>0)e[n]=t(e[n]||{},s,r);else{var i=e[n];i&&(r=[].concat(i).concat(r)),e[n]=r}return e}(t,e=e.split("."),s)},Object.defineProperty(i,"decorateRoot",{get:function(){return o.decorated||(o.decorated=new(s(2613)))}})},8950:(t,e,s)=>{"use strict";t.exports=n;var r=s(4155);function n(t,e){this.lo=t>>>0,this.hi=e>>>0}var i=n.zero=new n(0,0);i.toNumber=function(){return 0},i.zzEncode=i.zzDecode=function(){return this},i.length=function(){return 1};var o=n.zeroHash="\0\0\0\0\0\0\0\0";n.fromNumber=function(t){if(0===t)return i;var e=t<0;e&&(t=-t);var s=t>>>0,r=(t-s)/4294967296>>>0;return e&&(r=~r>>>0,s=~s>>>0,++s>4294967295&&(s=0,++r>4294967295&&(r=0))),new n(s,r)},n.from=function(t){if("number"==typeof t)return n.fromNumber(t);if(r.isString(t)){if(!r.Long)return n.fromNumber(parseInt(t,10));t=r.Long.fromString(t)}return t.low||t.high?new n(t.low>>>0,t.high>>>0):i},n.prototype.toNumber=function(t){if(!t&&this.hi>>>31){var e=1+~this.lo>>>0,s=~this.hi>>>0;return e||(s=s+1>>>0),-(e+4294967296*s)}return this.lo+4294967296*this.hi},n.prototype.toLong=function(t){return r.Long?new r.Long(0|this.lo,0|this.hi,Boolean(t)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(t)}};var a=String.prototype.charCodeAt;n.fromHash=function(t){return t===o?i:new n((a.call(t,0)|a.call(t,1)<<8|a.call(t,2)<<16|a.call(t,3)<<24)>>>0,(a.call(t,4)|a.call(t,5)<<8|a.call(t,6)<<16|a.call(t,7)<<24)>>>0)},n.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)},n.prototype.zzEncode=function(){var t=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^t)>>>0,this.lo=(this.lo<<1^t)>>>0,this},n.prototype.zzDecode=function(){var t=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^t)>>>0,this.hi=(this.hi>>>1^t)>>>0,this},n.prototype.length=function(){var t=this.lo,e=(this.lo>>>28|this.hi<<4)>>>0,s=this.hi>>>24;return 0===s?0===e?t<16384?t<128?1:2:t<2097152?3:4:e<16384?e<128?5:6:e<2097152?7:8:s<128?9:10}},4155:function(t,e,s){"use strict";var r=e;function n(t,e,s){for(var r=Object.keys(e),n=0;n<r.length;++n)void 0!==t[r[n]]&&s||(t[r[n]]=e[r[n]]);return t}function i(t){function e(t,s){if(!(this instanceof e))return new e(t,s);Object.defineProperty(this,"message",{get:function(){return t}}),Error.captureStackTrace?Error.captureStackTrace(this,e):Object.defineProperty(this,"stack",{value:(new Error).stack||""}),s&&n(this,s)}return e.prototype=Object.create(Error.prototype,{constructor:{value:e,writable:!0,enumerable:!1,configurable:!0},name:{get:()=>t,set:void 0,enumerable:!1,configurable:!0},toString:{value(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),e}r.asPromise=s(537),r.base64=s(9745),r.EventEmitter=s(4459),r.float=s(897),r.inquire=s(3229),r.utf8=s(113),r.pool=s(7986),r.LongBits=s(8950),r.isNode=Boolean(void 0!==s.g&&s.g&&s.g.process&&s.g.process.versions&&s.g.process.versions.node),r.global=r.isNode&&s.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(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},r.isString=function(t){return"string"==typeof t||t instanceof String},r.isObject=function(t){return t&&"object"==typeof t},r.isset=r.isSet=function(t,e){var s=t[e];return!(null==s||!t.hasOwnProperty(e))&&("object"!=typeof s||(Array.isArray(s)?s.length:Object.keys(s).length)>0)},r.Buffer=function(){try{var t=r.inquire("buffer").Buffer;return t.prototype.utf8Write?t:null}catch(t){return null}}(),r._Buffer_from=null,r._Buffer_allocUnsafe=null,r.newBuffer=function(t){return"number"==typeof t?r.Buffer?r._Buffer_allocUnsafe(t):new r.Array(t):r.Buffer?r._Buffer_from(t):"undefined"==typeof Uint8Array?t:new Uint8Array(t)},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(t){return t?r.LongBits.from(t).toHash():r.LongBits.zeroHash},r.longFromHash=function(t,e){var s=r.LongBits.fromHash(t);return r.Long?r.Long.fromBits(s.lo,s.hi,e):s.toNumber(Boolean(e))},r.merge=n,r.lcFirst=function(t){return t.charAt(0).toLowerCase()+t.substring(1)},r.newError=i,r.ProtocolError=i("ProtocolError"),r.oneOfGetter=function(t){for(var e={},s=0;s<t.length;++s)e[t[s]]=1;return function(){for(var t=Object.keys(this),s=t.length-1;s>-1;--s)if(1===e[t[s]]&&void 0!==this[t[s]]&&null!==this[t[s]])return t[s]}},r.oneOfSetter=function(t){return function(e){for(var s=0;s<t.length;++s)t[s]!==e&&delete this[t[s]]}},r.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},r._configure=function(){var t=r.Buffer;t?(r._Buffer_from=t.from!==Uint8Array.from&&t.from||function(e,s){return new t(e,s)},r._Buffer_allocUnsafe=t.allocUnsafe||function(e){return new t(e)}):r._Buffer_from=r._Buffer_allocUnsafe=null}},8600:(t,e,s)=>{"use strict";t.exports=function(t){var e=n.codegen(["m"],t.name+"$verify")('if(typeof m!=="object"||m===null)')("return%j","object expected"),s=t.oneofsArray,r={};s.length&&e("var p={}");for(var c=0;c<t.fieldsArray.length;++c){var u=t._fieldsArray[c].resolve(),d="m"+n.safeProp(u.name);if(u.optional&&e("if(%s!=null&&m.hasOwnProperty(%j)){",d,u.name),u.map)e("if(!util.isObject(%s))",d)("return%j",i(u,"object"))("var k=Object.keys(%s)",d)("for(var i=0;i<k.length;++i){"),a(e,u,"k[i]"),o(e,u,c,d+"[k[i]]")("}");else if(u.repeated)e("if(!Array.isArray(%s))",d)("return%j",i(u,"array"))("for(var i=0;i<%s.length;++i){",d),o(e,u,c,d+"[i]")("}");else{if(u.partOf){var l=n.safeProp(u.partOf.name);1===r[u.partOf.name]&&e("if(p%s===1)",l)("return%j",u.partOf.name+": multiple values"),r[u.partOf.name]=1,e("p%s=1",l)}o(e,u,c,d)}u.optional&&e("}")}return e("return null")};var r=s(4937),n=s(7572);function i(t,e){return t.name+": "+e+(t.repeated&&"array"!==e?"[]":t.map&&"object"!==e?"{k:"+t.keyType+"}":"")+" expected"}function o(t,e,s,n){if(e.resolvedType)if(e.resolvedType instanceof r){t("switch(%s){",n)("default:")("return%j",i(e,"enum value"));for(var o=Object.keys(e.resolvedType.values),a=0;a<o.length;++a)t("case %i:",e.resolvedType.values[o[a]]);t("break")("}")}else t("{")("var e=types[%i].verify(%s);",s,n)("if(e)")("return%j+e",e.name+".")("}");else switch(e.type){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":t("if(!util.isInteger(%s))",n)("return%j",i(e,"integer"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":t("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))",n,n,n,n)("return%j",i(e,"integer|Long"));break;case"float":case"double":t('if(typeof %s!=="number")',n)("return%j",i(e,"number"));break;case"bool":t('if(typeof %s!=="boolean")',n)("return%j",i(e,"boolean"));break;case"string":t("if(!util.isString(%s))",n)("return%j",i(e,"string"));break;case"bytes":t('if(!(%s&&typeof %s.length==="number"||util.isString(%s)))',n,n,n)("return%j",i(e,"buffer"))}return t}function a(t,e,s){switch(e.keyType){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":t("if(!util.key32Re.test(%s))",s)("return%j",i(e,"integer key"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":t("if(!util.key64Re.test(%s))",s)("return%j",i(e,"integer|Long key"));break;case"bool":t("if(!util.key2Re.test(%s))",s)("return%j",i(e,"boolean key"))}return t}},3375:(t,e,s)=>{"use strict";var r=e,n=s(4777);r[".google.protobuf.Any"]={fromObject:function(t){if(t&&t["@type"]){var e=t["@type"].substring(t["@type"].lastIndexOf("/")+1),s=this.lookup(e);if(s){var r="."===t["@type"].charAt(0)?t["@type"].slice(1):t["@type"];return-1===r.indexOf("/")&&(r="/"+r),this.create({type_url:r,value:s.encode(s.fromObject(t)).finish()})}}return this.fromObject(t)},toObject:function(t,e){var s="",r="";if(e&&e.json&&t.type_url&&t.value){r=t.type_url.substring(t.type_url.lastIndexOf("/")+1),s=t.type_url.substring(0,t.type_url.lastIndexOf("/")+1);var i=this.lookup(r);i&&(t=i.decode(t.value))}if(!(t instanceof this.ctor)&&t instanceof n){var o=t.$type.toObject(t,e);return""===s&&(s="type.googleapis.com/"),r=s+("."===t.$type.fullName[0]?t.$type.fullName.slice(1):t.$type.fullName),o["@type"]=r,o}return this.toObject(t,e)}}},2944:(t,e,s)=>{"use strict";t.exports=l;var r,n=s(4155),i=n.LongBits,o=n.base64,a=n.utf8;function c(t,e,s){this.fn=t,this.len=e,this.next=void 0,this.val=s}function u(){}function d(t){this.head=t.head,this.tail=t.tail,this.len=t.len,this.next=t.states}function l(){this.len=0,this.head=new c(u,0,0),this.tail=this.head,this.states=null}var h=function(){return n.Buffer?function(){return(l.create=function(){return new r})()}:function(){return new l}};function f(t,e,s){e[s]=255&t}function p(t,e){this.len=t,this.next=void 0,this.val=e}function y(t,e,s){for(;t.hi;)e[s++]=127&t.lo|128,t.lo=(t.lo>>>7|t.hi<<25)>>>0,t.hi>>>=7;for(;t.lo>127;)e[s++]=127&t.lo|128,t.lo=t.lo>>>7;e[s++]=t.lo}function m(t,e,s){e[s]=255&t,e[s+1]=t>>>8&255,e[s+2]=t>>>16&255,e[s+3]=t>>>24}l.create=h(),l.alloc=function(t){return new n.Array(t)},n.Array!==Array&&(l.alloc=n.pool(l.alloc,n.Array.prototype.subarray)),l.prototype._push=function(t,e,s){return this.tail=this.tail.next=new c(t,e,s),this.len+=e,this},p.prototype=Object.create(c.prototype),p.prototype.fn=function(t,e,s){for(;t>127;)e[s++]=127&t|128,t>>>=7;e[s]=t},l.prototype.uint32=function(t){return this.len+=(this.tail=this.tail.next=new p((t>>>=0)<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)).len,this},l.prototype.int32=function(t){return t<0?this._push(y,10,i.fromNumber(t)):this.uint32(t)},l.prototype.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)},l.prototype.uint64=function(t){var e=i.from(t);return this._push(y,e.length(),e)},l.prototype.int64=l.prototype.uint64,l.prototype.sint64=function(t){var e=i.from(t).zzEncode();return this._push(y,e.length(),e)},l.prototype.bool=function(t){return this._push(f,1,t?1:0)},l.prototype.fixed32=function(t){return this._push(m,4,t>>>0)},l.prototype.sfixed32=l.prototype.fixed32,l.prototype.fixed64=function(t){var e=i.from(t);return this._push(m,4,e.lo)._push(m,4,e.hi)},l.prototype.sfixed64=l.prototype.fixed64,l.prototype.float=function(t){return this._push(n.float.writeFloatLE,4,t)},l.prototype.double=function(t){return this._push(n.float.writeDoubleLE,8,t)};var v=n.Array.prototype.set?function(t,e,s){e.set(t,s)}:function(t,e,s){for(var r=0;r<t.length;++r)e[s+r]=t[r]};l.prototype.bytes=function(t){var e=t.length>>>0;if(!e)return this._push(f,1,0);if(n.isString(t)){var s=l.alloc(e=o.length(t));o.decode(t,s,0),t=s}return this.uint32(e)._push(v,e,t)},l.prototype.string=function(t){var e=a.length(t);return e?this.uint32(e)._push(a.write,e,t):this._push(f,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 t=this.head,e=this.tail,s=this.len;return this.reset().uint32(s),s&&(this.tail.next=t.next,this.tail=e,this.len+=s),this},l.prototype.finish=function(){for(var t=this.head.next,e=this.constructor.alloc(this.len),s=0;t;)t.fn(t.val,e,s),s+=t.len,t=t.next;return e},l._configure=function(t){r=t,l.create=h(),r._configure()}},2178:(t,e,s)=>{"use strict";t.exports=i;var r=s(2944);(i.prototype=Object.create(r.prototype)).constructor=i;var n=s(4155);function i(){r.call(this)}function o(t,e,s){t.length<40?n.utf8.write(t,e,s):e.utf8Write?e.utf8Write(t,s):e.write(t,s)}i._configure=function(){i.alloc=n._Buffer_allocUnsafe,i.writeBytesBuffer=n.Buffer&&n.Buffer.prototype instanceof Uint8Array&&"set"===n.Buffer.prototype.set.name?function(t,e,s){e.set(t,s)}:function(t,e,s){if(t.copy)t.copy(e,s,0,t.length);else for(var r=0;r<t.length;)e[s++]=t[r++]}},i.prototype.bytes=function(t){n.isString(t)&&(t=n._Buffer_from(t,"base64"));var e=t.length>>>0;return this.uint32(e),e&&this._push(i.writeBytesBuffer,e,t),this},i.prototype.string=function(t){var e=n.Buffer.byteLength(t);return this.uint32(e),e&&this._push(o,e,t),this},i._configure()},1829:(t,e)=>{"use strict";var s=Object.prototype.hasOwnProperty;function r(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch(t){return null}}function n(t){try{return encodeURIComponent(t)}catch(t){return null}}e.stringify=function(t,e){e=e||"";var r,i,o=[];for(i in"string"!=typeof e&&(e="?"),t)if(s.call(t,i)){if((r=t[i])||null!=r&&!isNaN(r)||(r=""),i=n(i),r=n(r),null===i||null===r)continue;o.push(i+"="+r)}return o.length?e+o.join("&"):""},e.parse=function(t){for(var e,s=/([^=?#&]+)=?([^&]*)/g,n={};e=s.exec(t);){var i=r(e[1]),o=r(e[2]);null===i||null===o||i in n||(n[i]=o)}return n}},3722:t=>{"use strict";t.exports=function(t,e){if(e=e.split(":")[0],!(t=+t))return!1;switch(e){case"http":case"ws":return 80!==t;case"https":case"wss":return 443!==t;case"ftp":return 21!==t;case"gopher":return 70!==t;case"file":return!1}return 0!==t}},7594:(t,e,s)=>{"use strict";var r,n=function(){return void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r},i=function(){var t={};return function(e){if(void 0===t[e]){var s=document.querySelector(e);if(window.HTMLIFrameElement&&s instanceof window.HTMLIFrameElement)try{s=s.contentDocument.head}catch(t){s=null}t[e]=s}return t[e]}}(),o=[];function a(t){for(var e=-1,s=0;s<o.length;s++)if(o[s].identifier===t){e=s;break}return e}function c(t,e){for(var s={},r=[],n=0;n<t.length;n++){var i=t[n],c=e.base?i[0]+e.base:i[0],u=s[c]||0,d="".concat(c," ").concat(u);s[c]=u+1;var l=a(d),h={css:i[1],media:i[2],sourceMap:i[3]};-1!==l?(o[l].references++,o[l].updater(h)):o.push({identifier:d,updater:m(h,e),references:1}),r.push(d)}return r}function u(t){var e=document.createElement("style"),r=t.attributes||{};if(void 0===r.nonce){var n=s.nc;n&&(r.nonce=n)}if(Object.keys(r).forEach((function(t){e.setAttribute(t,r[t])})),"function"==typeof t.insert)t.insert(e);else{var o=i(t.insert||"head");if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(e)}return e}var d,l=(d=[],function(t,e){return d[t]=e,d.filter(Boolean).join("\n")});function h(t,e,s,r){var n=s?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;if(t.styleSheet)t.styleSheet.cssText=l(e,n);else{var i=document.createTextNode(n),o=t.childNodes;o[e]&&t.removeChild(o[e]),o.length?t.insertBefore(i,o[e]):t.appendChild(i)}}function f(t,e,s){var r=s.css,n=s.media,i=s.sourceMap;if(n?t.setAttribute("media",n):t.removeAttribute("media"),i&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),t.styleSheet)t.styleSheet.cssText=r;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(r))}}var p=null,y=0;function m(t,e){var s,r,n;if(e.singleton){var i=y++;s=p||(p=u(e)),r=h.bind(null,s,i,!1),n=h.bind(null,s,i,!0)}else s=u(e),r=f.bind(null,s,e),n=function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(s)};return r(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;r(t=e)}else n()}}t.exports=function(t,e){(e=e||{}).singleton||"boolean"==typeof e.singleton||(e.singleton=n());var s=c(t=t||[],e);return function(t){if(t=t||[],"[object Array]"===Object.prototype.toString.call(t)){for(var r=0;r<s.length;r++){var n=a(s[r]);o[n].references--}for(var i=c(t,e),u=0;u<s.length;u++){var d=a(s[u]);0===o[d].references&&(o[d].updater(),o.splice(d,1))}s=i}}}},9655:(t,e,s)=>{"use strict";var r=s(3722),n=s(1829),i=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,o=/[\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(t){return(t||"").toString().replace(i,"")}var h=[["#","hash"],["?","query"],function(t,e){return y(e.protocol)?t.replace(/\\/g,"/"):t},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],f={hash:1,query:1};function p(t){var e,r=("undefined"!=typeof window?window:void 0!==s.g?s.g:"undefined"!=typeof self?self:{}).location||{},n={},i=typeof(t=t||r);if("blob:"===t.protocol)n=new v(unescape(t.pathname),{});else if("string"===i)for(e in n=new v(t,{}),f)delete n[e];else if("object"===i){for(e in t)e in f||(n[e]=t[e]);void 0===n.slashes&&(n.slashes=a.test(t.href))}return n}function y(t){return"file:"===t||"ftp:"===t||"http:"===t||"https:"===t||"ws:"===t||"wss:"===t}function m(t,e){t=(t=l(t)).replace(o,""),e=e||{};var s,r=u.exec(t),n=r[1]?r[1].toLowerCase():"",i=!!r[2],a=!!r[3],c=0;return i?a?(s=r[2]+r[3]+r[4],c=r[2].length+r[3].length):(s=r[2]+r[4],c=r[2].length):a?(s=r[3]+r[4],c=r[3].length):s=r[4],"file:"===n?c>=2&&(s=s.slice(2)):y(n)?s=r[4]:n?i&&(s=s.slice(2)):c>=2&&y(e.protocol)&&(s=r[4]),{protocol:n,slashes:i||y(n),slashesCount:c,rest:s}}function v(t,e,s){if(t=(t=l(t)).replace(o,""),!(this instanceof v))return new v(t,e,s);var i,a,c,u,f,x,_=h.slice(),g=typeof e,b=this,w=0;for("object"!==g&&"string"!==g&&(s=e,e=null),s&&"function"!=typeof s&&(s=n.parse),i=!(a=m(t||"",e=p(e))).protocol&&!a.slashes,b.slashes=a.slashes||i&&e.slashes,b.protocol=a.protocol||e.protocol||"",t=a.rest,("file:"===a.protocol&&(2!==a.slashesCount||d.test(t))||!a.slashes&&(a.protocol||a.slashesCount<2||!y(b.protocol)))&&(_[3]=[/(.*)/,"pathname"]);w<_.length;w++)"function"!=typeof(u=_[w])?(c=u[0],x=u[1],c!=c?b[x]=t:"string"==typeof c?~(f="@"===c?t.lastIndexOf(c):t.indexOf(c))&&("number"==typeof u[2]?(b[x]=t.slice(0,f),t=t.slice(f+u[2])):(b[x]=t.slice(f),t=t.slice(0,f))):(f=c.exec(t))&&(b[x]=f[1],t=t.slice(0,f.index)),b[x]=b[x]||i&&u[3]&&e[x]||"",u[4]&&(b[x]=b[x].toLowerCase())):t=u(t,b);s&&(b.query=s(b.query)),i&&e.slashes&&"/"!==b.pathname.charAt(0)&&(""!==b.pathname||""!==e.pathname)&&(b.pathname=function(t,e){if(""===t)return e;for(var s=(e||"/").split("/").slice(0,-1).concat(t.split("/")),r=s.length,n=s[r-1],i=!1,o=0;r--;)"."===s[r]?s.splice(r,1):".."===s[r]?(s.splice(r,1),o++):o&&(0===r&&(i=!0),s.splice(r,1),o--);return i&&s.unshift(""),"."!==n&&".."!==n||s.push(""),s.join("/")}(b.pathname,e.pathname)),"/"!==b.pathname.charAt(0)&&y(b.protocol)&&(b.pathname="/"+b.pathname),r(b.port,b.protocol)||(b.host=b.hostname,b.port=""),b.username=b.password="",b.auth&&(~(f=b.auth.indexOf(":"))?(b.username=b.auth.slice(0,f),b.username=encodeURIComponent(decodeURIComponent(b.username)),b.password=b.auth.slice(f+1),b.password=encodeURIComponent(decodeURIComponent(b.password))):b.username=encodeURIComponent(decodeURIComponent(b.auth)),b.auth=b.password?b.username+":"+b.password:b.username),b.origin="file:"!==b.protocol&&y(b.protocol)&&b.host?b.protocol+"//"+b.host:"null",b.href=b.toString()}v.prototype={set:function(t,e,s){var i=this;switch(t){case"query":"string"==typeof e&&e.length&&(e=(s||n.parse)(e)),i[t]=e;break;case"port":i[t]=e,r(e,i.protocol)?e&&(i.host=i.hostname+":"+e):(i.host=i.hostname,i[t]="");break;case"hostname":i[t]=e,i.port&&(e+=":"+i.port),i.host=e;break;case"host":i[t]=e,c.test(e)?(e=e.split(":"),i.port=e.pop(),i.hostname=e.join(":")):(i.hostname=e,i.port="");break;case"protocol":i.protocol=e.toLowerCase(),i.slashes=!s;break;case"pathname":case"hash":if(e){var o="pathname"===t?"/":"#";i[t]=e.charAt(0)!==o?o+e:e}else i[t]=e;break;case"username":case"password":i[t]=encodeURIComponent(e);break;case"auth":var a=e.indexOf(":");~a?(i.username=e.slice(0,a),i.username=encodeURIComponent(decodeURIComponent(i.username)),i.password=e.slice(a+1),i.password=encodeURIComponent(decodeURIComponent(i.password))):i.username=encodeURIComponent(decodeURIComponent(e))}for(var u=0;u<h.length;u++){var d=h[u];d[4]&&(i[d[1]]=i[d[1]].toLowerCase())}return i.auth=i.password?i.username+":"+i.password:i.username,i.origin="file:"!==i.protocol&&y(i.protocol)&&i.host?i.protocol+"//"+i.host:"null",i.href=i.toString(),i},toString:function(t){t&&"function"==typeof t||(t=n.stringify);var e,s=this,r=s.host,i=s.protocol;i&&":"!==i.charAt(i.length-1)&&(i+=":");var o=i+(s.protocol&&s.slashes||y(s.protocol)?"//":"");return s.username?(o+=s.username,s.password&&(o+=":"+s.password),o+="@"):s.password?(o+=":"+s.password,o+="@"):"file:"!==s.protocol&&y(s.protocol)&&!r&&"/"!==s.pathname&&(o+="@"),(":"===r[r.length-1]||c.test(s.hostname)&&!s.port)&&(r+=":"),o+=r+s.pathname,(e="object"==typeof s.query?t(s.query):s.query)&&(o+="?"!==e.charAt(0)?"?"+e:e),s.hash&&(o+=s.hash),o}},v.extractProtocol=m,v.location=p,v.trimLeft=l,v.qs=n,t.exports=v},5003:(t,e,s)=>{"use strict";var r;s.r(e),s.d(e,{NIL:()=>N,parse:()=>m,stringify:()=>d,v1:()=>y,v3:()=>T,v4:()=>k,v5:()=>R,validate:()=>a,version:()=>j});var n=new Uint8Array(16);function i(){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(n)}const o=/^(?:[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(t){return"string"==typeof t&&o.test(t)};for(var c=[],u=0;u<256;++u)c.push((u+256).toString(16).substr(1));const d=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,s=(c[t[e+0]]+c[t[e+1]]+c[t[e+2]]+c[t[e+3]]+"-"+c[t[e+4]]+c[t[e+5]]+"-"+c[t[e+6]]+c[t[e+7]]+"-"+c[t[e+8]]+c[t[e+9]]+"-"+c[t[e+10]]+c[t[e+11]]+c[t[e+12]]+c[t[e+13]]+c[t[e+14]]+c[t[e+15]]).toLowerCase();if(!a(s))throw TypeError("Stringified UUID is invalid");return s};var l,h,f=0,p=0;const y=function(t,e,s){var r=e&&s||0,n=e||new Array(16),o=(t=t||{}).node||l,a=void 0!==t.clockseq?t.clockseq:h;if(null==o||null==a){var c=t.random||(t.rng||i)();null==o&&(o=l=[1|c[0],c[1],c[2],c[3],c[4],c[5]]),null==a&&(a=h=16383&(c[6]<<8|c[7]))}var u=void 0!==t.msecs?t.msecs:Date.now(),y=void 0!==t.nsecs?t.nsecs:p+1,m=u-f+(y-p)/1e4;if(m<0&&void 0===t.clockseq&&(a=a+1&16383),(m<0||u>f)&&void 0===t.nsecs&&(y=0),y>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");f=u,p=y,h=a;var v=(1e4*(268435455&(u+=122192928e5))+y)%4294967296;n[r++]=v>>>24&255,n[r++]=v>>>16&255,n[r++]=v>>>8&255,n[r++]=255&v;var x=u/4294967296*1e4&268435455;n[r++]=x>>>8&255,n[r++]=255&x,n[r++]=x>>>24&15|16,n[r++]=x>>>16&255,n[r++]=a>>>8|128,n[r++]=255&a;for(var _=0;_<6;++_)n[r+_]=o[_];return e||d(n)};const m=function(t){if(!a(t))throw TypeError("Invalid UUID");var e,s=new Uint8Array(16);return s[0]=(e=parseInt(t.slice(0,8),16))>>>24,s[1]=e>>>16&255,s[2]=e>>>8&255,s[3]=255&e,s[4]=(e=parseInt(t.slice(9,13),16))>>>8,s[5]=255&e,s[6]=(e=parseInt(t.slice(14,18),16))>>>8,s[7]=255&e,s[8]=(e=parseInt(t.slice(19,23),16))>>>8,s[9]=255&e,s[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,s[11]=e/4294967296&255,s[12]=e>>>24&255,s[13]=e>>>16&255,s[14]=e>>>8&255,s[15]=255&e,s};function v(t,e,s){function r(t,r,n,i){if("string"==typeof t&&(t=function(t){t=unescape(encodeURIComponent(t));for(var e=[],s=0;s<t.length;++s)e.push(t.charCodeAt(s));return e}(t)),"string"==typeof r&&(r=m(r)),16!==r.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var o=new Uint8Array(16+t.length);if(o.set(r),o.set(t,r.length),(o=s(o))[6]=15&o[6]|e,o[8]=63&o[8]|128,n){i=i||0;for(var a=0;a<16;++a)n[i+a]=o[a];return n}return d(o)}try{r.name=t}catch(t){}return r.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",r.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",r}function x(t){return 14+(t+64>>>9<<4)+1}function _(t,e){var s=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(s>>16)<<16|65535&s}function g(t,e,s,r,n,i){return _((o=_(_(e,t),_(r,i)))<<(a=n)|o>>>32-a,s);var o,a}function b(t,e,s,r,n,i,o){return g(e&s|~e&r,t,e,n,i,o)}function w(t,e,s,r,n,i,o){return g(e&r|s&~r,t,e,n,i,o)}function O(t,e,s,r,n,i,o){return g(e^s^r,t,e,n,i,o)}function S(t,e,s,r,n,i,o){return g(s^(e|~r),t,e,n,i,o)}const E=function(t){if("string"==typeof t){var e=unescape(encodeURIComponent(t));t=new Uint8Array(e.length);for(var s=0;s<e.length;++s)t[s]=e.charCodeAt(s)}return function(t){for(var e=[],s=32*t.length,r="0123456789abcdef",n=0;n<s;n+=8){var i=t[n>>5]>>>n%32&255,o=parseInt(r.charAt(i>>>4&15)+r.charAt(15&i),16);e.push(o)}return e}(function(t,e){t[e>>5]|=128<<e%32,t[x(e)-1]=e;for(var s=1732584193,r=-271733879,n=-1732584194,i=271733878,o=0;o<t.length;o+=16){var a=s,c=r,u=n,d=i;s=b(s,r,n,i,t[o],7,-680876936),i=b(i,s,r,n,t[o+1],12,-389564586),n=b(n,i,s,r,t[o+2],17,606105819),r=b(r,n,i,s,t[o+3],22,-1044525330),s=b(s,r,n,i,t[o+4],7,-176418897),i=b(i,s,r,n,t[o+5],12,1200080426),n=b(n,i,s,r,t[o+6],17,-1473231341),r=b(r,n,i,s,t[o+7],22,-45705983),s=b(s,r,n,i,t[o+8],7,1770035416),i=b(i,s,r,n,t[o+9],12,-1958414417),n=b(n,i,s,r,t[o+10],17,-42063),r=b(r,n,i,s,t[o+11],22,-1990404162),s=b(s,r,n,i,t[o+12],7,1804603682),i=b(i,s,r,n,t[o+13],12,-40341101),n=b(n,i,s,r,t[o+14],17,-1502002290),s=w(s,r=b(r,n,i,s,t[o+15],22,1236535329),n,i,t[o+1],5,-165796510),i=w(i,s,r,n,t[o+6],9,-1069501632),n=w(n,i,s,r,t[o+11],14,643717713),r=w(r,n,i,s,t[o],20,-373897302),s=w(s,r,n,i,t[o+5],5,-701558691),i=w(i,s,r,n,t[o+10],9,38016083),n=w(n,i,s,r,t[o+15],14,-660478335),r=w(r,n,i,s,t[o+4],20,-405537848),s=w(s,r,n,i,t[o+9],5,568446438),i=w(i,s,r,n,t[o+14],9,-1019803690),n=w(n,i,s,r,t[o+3],14,-187363961),r=w(r,n,i,s,t[o+8],20,1163531501),s=w(s,r,n,i,t[o+13],5,-1444681467),i=w(i,s,r,n,t[o+2],9,-51403784),n=w(n,i,s,r,t[o+7],14,1735328473),s=O(s,r=w(r,n,i,s,t[o+12],20,-1926607734),n,i,t[o+5],4,-378558),i=O(i,s,r,n,t[o+8],11,-2022574463),n=O(n,i,s,r,t[o+11],16,1839030562),r=O(r,n,i,s,t[o+14],23,-35309556),s=O(s,r,n,i,t[o+1],4,-1530992060),i=O(i,s,r,n,t[o+4],11,1272893353),n=O(n,i,s,r,t[o+7],16,-155497632),r=O(r,n,i,s,t[o+10],23,-1094730640),s=O(s,r,n,i,t[o+13],4,681279174),i=O(i,s,r,n,t[o],11,-358537222),n=O(n,i,s,r,t[o+3],16,-722521979),r=O(r,n,i,s,t[o+6],23,76029189),s=O(s,r,n,i,t[o+9],4,-640364487),i=O(i,s,r,n,t[o+12],11,-421815835),n=O(n,i,s,r,t[o+15],16,530742520),s=S(s,r=O(r,n,i,s,t[o+2],23,-995338651),n,i,t[o],6,-198630844),i=S(i,s,r,n,t[o+7],10,1126891415),n=S(n,i,s,r,t[o+14],15,-1416354905),r=S(r,n,i,s,t[o+5],21,-57434055),s=S(s,r,n,i,t[o+12],6,1700485571),i=S(i,s,r,n,t[o+3],10,-1894986606),n=S(n,i,s,r,t[o+10],15,-1051523),r=S(r,n,i,s,t[o+1],21,-2054922799),s=S(s,r,n,i,t[o+8],6,1873313359),i=S(i,s,r,n,t[o+15],10,-30611744),n=S(n,i,s,r,t[o+6],15,-1560198380),r=S(r,n,i,s,t[o+13],21,1309151649),s=S(s,r,n,i,t[o+4],6,-145523070),i=S(i,s,r,n,t[o+11],10,-1120210379),n=S(n,i,s,r,t[o+2],15,718787259),r=S(r,n,i,s,t[o+9],21,-343485551),s=_(s,a),r=_(r,c),n=_(n,u),i=_(i,d)}return[s,r,n,i]}(function(t){if(0===t.length)return[];for(var e=8*t.length,s=new Uint32Array(x(e)),r=0;r<e;r+=8)s[r>>5]|=(255&t[r/8])<<r%32;return s}(t),8*t.length))};const T=v("v3",48,E);const k=function(t,e,s){var r=(t=t||{}).random||(t.rng||i)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,e){s=s||0;for(var n=0;n<16;++n)e[s+n]=r[n];return e}return d(r)};function C(t,e,s,r){switch(t){case 0:return e&s^~e&r;case 1:case 3:return e^s^r;case 2:return e&s^e&r^s&r}}function I(t,e){return t<<e|t>>>32-e}const A=function(t){var e=[1518500249,1859775393,2400959708,3395469782],s=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof t){var r=unescape(encodeURIComponent(t));t=[];for(var n=0;n<r.length;++n)t.push(r.charCodeAt(n))}else Array.isArray(t)||(t=Array.prototype.slice.call(t));t.push(128);for(var i=t.length/4+2,o=Math.ceil(i/16),a=new Array(o),c=0;c<o;++c){for(var u=new Uint32Array(16),d=0;d<16;++d)u[d]=t[64*c+4*d]<<24|t[64*c+4*d+1]<<16|t[64*c+4*d+2]<<8|t[64*c+4*d+3];a[c]=u}a[o-1][14]=8*(t.length-1)/Math.pow(2,32),a[o-1][14]=Math.floor(a[o-1][14]),a[o-1][15]=8*(t.length-1)&4294967295;for(var l=0;l<o;++l){for(var h=new Uint32Array(80),f=0;f<16;++f)h[f]=a[l][f];for(var p=16;p<80;++p)h[p]=I(h[p-3]^h[p-8]^h[p-14]^h[p-16],1);for(var y=s[0],m=s[1],v=s[2],x=s[3],_=s[4],g=0;g<80;++g){var b=Math.floor(g/20),w=I(y,5)+C(b,m,v,x)+_+e[b]+h[g]>>>0;_=x,x=v,v=I(m,30)>>>0,m=y,y=w}s[0]=s[0]+y>>>0,s[1]=s[1]+m>>>0,s[2]=s[2]+v>>>0,s[3]=s[3]+x>>>0,s[4]=s[4]+_>>>0}return[s[0]>>24&255,s[0]>>16&255,s[0]>>8&255,255&s[0],s[1]>>24&255,s[1]>>16&255,s[1]>>8&255,255&s[1],s[2]>>24&255,s[2]>>16&255,s[2]>>8&255,255&s[2],s[3]>>24&255,s[3]>>16&255,s[3]>>8&255,255&s[3],s[4]>>24&255,s[4]>>16&255,s[4]>>8&255,255&s[4]]};const R=v("v5",80,A),N="00000000-0000-0000-0000-000000000000";const j=function(t){if(!a(t))throw TypeError("Invalid UUID");return parseInt(t.substr(14,1),16)}},9347:t=>{"use strict";var e,s="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),r={},n=0,i=0;function o(t){var e="";do{e=s[t%64]+e,t=Math.floor(t/64)}while(t>0);return e}function a(){var t=o(+new Date);return t!==e?(n=0,e=t):t+"."+o(n++)}for(;i<64;i++)r[s[i]]=i;a.encode=o,a.decode=function(t){var e=0;for(i=0;i<t.length;i++)e=64*e+r[t.charAt(i)];return e},t.exports=a},2417:(t,e,s)=>{t.exports=s(7720)("./src/collaboration-core.js")},2704:(t,e,s)=>{t.exports=s(7079)("./src/core.js")},1492:(t,e,s)=>{t.exports=s(7079)("./src/engine.js")},9273:(t,e,s)=>{t.exports=s(7079)("./src/ui.js")},2209:(t,e,s)=>{t.exports=s(7079)("./src/utils.js")},7720:t=>{"use strict";t.exports=CKEditor5.collaborationDll},7079:t=>{"use strict";t.exports=CKEditor5.dll},66:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")()},5769:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.installTimerFunctions=e.transports=e.Transport=e.protocol=e.Socket=void 0;const r=s(1187);Object.defineProperty(e,"Socket",{enumerable:!0,get:function(){return r.Socket}}),e.protocol=r.Socket.protocol;var n=s(4291);Object.defineProperty(e,"Transport",{enumerable:!0,get:function(){return n.Transport}});var i=s(6449);Object.defineProperty(e,"transports",{enumerable:!0,get:function(){return i.transports}});var o=s(102);Object.defineProperty(e,"installTimerFunctions",{enumerable:!0,get:function(){return o.installTimerFunctions}})},1187:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Socket=void 0;const n=s(6449),i=s(102),o=r(s(9827)),a=r(s(5977)),c=r(s(5579)),u=s(3717),d=s(4755),l=(0,c.default)("engine.io-client:socket");class h extends u.Emitter{constructor(t,e={}){super(),t&&"object"==typeof t&&(e=t,t=null),t?(t=(0,a.default)(t),e.hostname=t.host,e.secure="https"===t.protocol||"wss"===t.protocol,e.port=t.port,t.query&&(e.query=t.query)):e.host&&(e.hostname=(0,a.default)(e.host).host),(0,i.installTimerFunctions)(this,e),this.secure=null!=e.secure?e.secure:"undefined"!=typeof location&&"https:"===location.protocol,e.hostname&&!e.port&&(e.port=this.secure?"443":"80"),this.hostname=e.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=e.port||("undefined"!=typeof location&&location.port?location.port:this.secure?"443":"80"),this.transports=e.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},e),this.opts.path=this.opts.path.replace(/\/$/,"")+"/","string"==typeof this.opts.query&&(this.opts.query=o.default.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&&addEventListener("beforeunload",(()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())}),!1),"localhost"!==this.hostname&&(this.offlineEventListener=()=>{this.onClose("transport close")},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){l('creating transport "%s"',t);const e=function(t){const e={};for(let s in t)t.hasOwnProperty(s)&&(e[s]=t[s]);return e}(this.opts.query);e.EIO=d.protocol,e.transport=t,this.id&&(e.sid=this.id);const s=Object.assign({},this.opts.transportOptions[t],this.opts,{query:e,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return l("options: %j",s),new n.transports[t](s)}open(){let t;if(this.opts.rememberUpgrade&&h.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))t="websocket";else{if(0===this.transports.length)return void this.setTimeoutFn((()=>{this.emitReserved("error","No transports available")}),0);t=this.transports[0]}this.readyState="opening";try{t=this.createTransport(t)}catch(t){return l("error while creating transport: %s",t),this.transports.shift(),void this.open()}t.open(),this.setTransport(t)}setTransport(t){l("setting transport %s",t.name),this.transport&&(l("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",(()=>{this.onClose("transport close")}))}probe(t){l('probing transport "%s"',t);let e=this.createTransport(t),s=!1;h.priorWebsocketSuccess=!1;const r=()=>{s||(l('probe transport "%s" opened',t),e.send([{type:"ping",data:"probe"}]),e.once("packet",(r=>{if(!s)if("pong"===r.type&&"probe"===r.data){if(l('probe transport "%s" pong',t),this.upgrading=!0,this.emitReserved("upgrading",e),!e)return;h.priorWebsocketSuccess="websocket"===e.name,l('pausing current transport "%s"',this.transport.name),this.transport.pause((()=>{s||"closed"!==this.readyState&&(l("changing transport and sending upgrade packet"),u(),this.setTransport(e),e.send([{type:"upgrade"}]),this.emitReserved("upgrade",e),e=null,this.upgrading=!1,this.flush())}))}else{l('probe transport "%s" failed',t);const s=new Error("probe error");s.transport=e.name,this.emitReserved("upgradeError",s)}})))};function n(){s||(s=!0,u(),e.close(),e=null)}const i=s=>{const r=new Error("probe error: "+s);r.transport=e.name,n(),l('probe transport "%s" failed because of error: %s',t,s),this.emitReserved("upgradeError",r)};function o(){i("transport closed")}function a(){i("socket closed")}function c(t){e&&t.name!==e.name&&(l('"%s" works - aborting "%s"',t.name,e.name),n())}const u=()=>{e.removeListener("open",r),e.removeListener("error",i),e.removeListener("close",o),this.off("close",a),this.off("upgrading",c)};e.once("open",r),e.once("error",i),e.once("close",o),this.once("close",a),this.once("upgrading",c),e.open()}onOpen(){if(l("socket open"),this.readyState="open",h.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush(),"open"===this.readyState&&this.opts.upgrade&&this.transport.pause){l("starting upgrade probes");let t=0;const e=this.upgrades.length;for(;t<e;t++)this.probe(this.upgrades[t])}}onPacket(t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(l('socket receive: type "%s", data "%s"',t.type,t.data),this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this.resetPingTimeout(),this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const e=new Error("server error");e.code=t.data,this.onError(e);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data)}else l('packet received with socket readyState "%s"',this.readyState)}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this.upgrades=this.filterUpgrades(t.upgrades),this.pingInterval=t.pingInterval,this.pingTimeout=t.pingTimeout,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(){"closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length&&(l("flushing %d packets in socket",this.writeBuffer.length),this.transport.send(this.writeBuffer),this.prevBufferLen=this.writeBuffer.length,this.emitReserved("flush"))}write(t,e,s){return this.sendPacket("message",t,e,s),this}send(t,e,s){return this.sendPacket("message",t,e,s),this}sendPacket(t,e,s,r){if("function"==typeof e&&(r=e,e=void 0),"function"==typeof s&&(r=s,s=null),"closing"===this.readyState||"closed"===this.readyState)return;(s=s||{}).compress=!1!==s.compress;const n={type:t,data:e,options:s};this.emitReserved("packetCreate",n),this.writeBuffer.push(n),r&&this.once("flush",r),this.flush()}close(){const t=()=>{this.onClose("forced close"),l("socket closing - telling transport to close"),this.transport.close()},e=()=>{this.off("upgrade",e),this.off("upgradeError",e),t()},s=()=>{this.once("upgrade",e),this.once("upgradeError",e)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",(()=>{this.upgrading?s():t()})):this.upgrading?s():t()),this}onError(t){l("socket error %j",t),h.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,e){"opening"!==this.readyState&&"open"!==this.readyState&&"closing"!==this.readyState||(l('socket close with reason: "%s"',t),this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),"function"==typeof removeEventListener&&removeEventListener("offline",this.offlineEventListener,!1),this.readyState="closed",this.id=null,this.emitReserved("close",t,e),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const e=[];let s=0;const r=t.length;for(;s<r;s++)~this.transports.indexOf(t[s])&&e.push(t[s]);return e}}e.Socket=h,h.protocol=d.protocol},4291:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Transport=void 0;const n=s(4755),i=s(3717),o=s(102),a=(0,r(s(5579)).default)("engine.io-client:transport");class c extends i.Emitter{constructor(t){super(),this.writable=!1,(0,o.installTimerFunctions)(this,t),this.opts=t,this.query=t.query,this.readyState="",this.socket=t.socket}onError(t,e){const s=new Error(t);return s.type="TransportError",s.description=e,super.emit("error",s),this}open(){return"closed"!==this.readyState&&""!==this.readyState||(this.readyState="opening",this.doOpen()),this}close(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this}send(t){"open"===this.readyState?this.write(t):a("transport is not open, discarding packets")}onOpen(){this.readyState="open",this.writable=!0,super.emit("open")}onData(t){const e=(0,n.decodePacket)(t,this.socket.binaryType);this.onPacket(e)}onPacket(t){super.emit("packet",t)}onClose(){this.readyState="closed",super.emit("close")}}e.Transport=c},6449:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.transports=void 0;const r=s(9814),n=s(4199);e.transports={websocket:n.WS,polling:r.XHR}},9814:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Request=e.XHR=void 0;const n=r(s(4582)),i=r(s(5579)),o=r(s(66)),a=s(102),c=s(3717),u=s(3737),d=(0,i.default)("engine.io-client:polling-xhr");function l(){}const h=null!=new n.default({xdomain:!1}).responseType;class f extends u.Polling{constructor(t){if(super(t),"undefined"!=typeof location){const e="https:"===location.protocol;let s=location.port;s||(s=e?"443":"80"),this.xd="undefined"!=typeof location&&t.hostname!==location.hostname||s!==t.port,this.xs=t.secure!==e}const e=t&&t.forceBase64;this.supportsBinary=h&&!e}request(t={}){return Object.assign(t,{xd:this.xd,xs:this.xs},this.opts),new p(this.uri(),t)}doWrite(t,e){const s=this.request({method:"POST",data:t});s.on("success",e),s.on("error",(t=>{this.onError("xhr post error",t)}))}doPoll(){d("xhr poll");const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(t=>{this.onError("xhr poll error",t)})),this.pollXhr=t}}e.XHR=f;class p extends c.Emitter{constructor(t,e){super(),(0,a.installTimerFunctions)(this,e),this.opts=e,this.method=e.method||"GET",this.uri=t,this.async=!1!==e.async,this.data=void 0!==e.data?e.data:null,this.create()}create(){const t=(0,a.pick)(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd,t.xscheme=!!this.opts.xs;const e=this.xhr=new n.default(t);try{d("xhr open %s: %s",this.method,this.uri),e.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){e.setDisableHeaderCheck&&e.setDisableHeaderCheck(!0);for(let t in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(t)&&e.setRequestHeader(t,this.opts.extraHeaders[t])}}catch(t){}if("POST"===this.method)try{e.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(t){}try{e.setRequestHeader("Accept","*/*")}catch(t){}"withCredentials"in e&&(e.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(e.timeout=this.opts.requestTimeout),e.onreadystatechange=()=>{4===e.readyState&&(200===e.status||1223===e.status?this.onLoad():this.setTimeoutFn((()=>{this.onError("number"==typeof e.status?e.status:0)}),0))},d("xhr data %s",this.data),e.send(this.data)}catch(t){return void this.setTimeoutFn((()=>{this.onError(t)}),0)}"undefined"!=typeof document&&(this.index=p.requestsCount++,p.requests[this.index]=this)}onSuccess(){this.emit("success"),this.cleanup()}onData(t){this.emit("data",t),this.onSuccess()}onError(t){this.emit("error",t),this.cleanup(!0)}cleanup(t){if(void 0!==this.xhr&&null!==this.xhr){if(this.xhr.onreadystatechange=l,t)try{this.xhr.abort()}catch(t){}"undefined"!=typeof document&&delete p.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;null!==t&&this.onData(t)}abort(){this.cleanup()}}if(e.Request=p,p.requestsCount=0,p.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",y);else if("function"==typeof addEventListener){const t="onpagehide"in o.default?"pagehide":"unload";addEventListener(t,y,!1)}function y(){for(let t in p.requests)p.requests.hasOwnProperty(t)&&p.requests[t].abort()}},3737:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Polling=void 0;const n=s(4291),i=r(s(5579)),o=r(s(9347)),a=r(s(9827)),c=s(4755),u=(0,i.default)("engine.io-client:polling");class d extends n.Transport{constructor(){super(...arguments),this.polling=!1}get name(){return"polling"}doOpen(){this.poll()}pause(t){this.readyState="pausing";const e=()=>{u("paused"),this.readyState="paused",t()};if(this.polling||!this.writable){let t=0;this.polling&&(u("we are currently polling - waiting to pause"),t++,this.once("pollComplete",(function(){u("pre-pause polling complete"),--t||e()}))),this.writable||(u("we are currently writing - waiting to pause"),t++,this.once("drain",(function(){u("pre-pause writing complete"),--t||e()})))}else e()}poll(){u("polling"),this.polling=!0,this.doPoll(),this.emit("poll")}onData(t){u("polling got data %s",t);(0,c.decodePayload)(t,this.socket.binaryType).forEach((t=>{if("opening"===this.readyState&&"open"===t.type&&this.onOpen(),"close"===t.type)return this.onClose(),!1;this.onPacket(t)})),"closed"!==this.readyState&&(this.polling=!1,this.emit("pollComplete"),"open"===this.readyState?this.poll():u('ignoring poll - transport state "%s"',this.readyState))}doClose(){const t=()=>{u("writing close packet"),this.write([{type:"close"}])};"open"===this.readyState?(u("transport open - closing"),t()):(u("transport not open - deferring close"),this.once("open",t))}write(t){this.writable=!1,(0,c.encodePayload)(t,(t=>{this.doWrite(t,(()=>{this.writable=!0,this.emit("drain")}))}))}uri(){let t=this.query||{};const e=this.opts.secure?"https":"http";let s="";!1!==this.opts.timestampRequests&&(t[this.opts.timestampParam]=(0,o.default)()),this.supportsBinary||t.sid||(t.b64=1),this.opts.port&&("https"===e&&443!==Number(this.opts.port)||"http"===e&&80!==Number(this.opts.port))&&(s=":"+this.opts.port);const r=a.default.encode(t);return e+"://"+(-1!==this.opts.hostname.indexOf(":")?"["+this.opts.hostname+"]":this.opts.hostname)+s+this.opts.path+(r.length?"?"+r:"")}}e.Polling=d},9233:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.defaultBinaryType=e.usingBrowserWebSocket=e.WebSocket=e.nextTick=void 0;const n=r(s(66));e.nextTick="function"==typeof Promise&&"function"==typeof Promise.resolve?t=>Promise.resolve().then(t):(t,e)=>e(t,0),e.WebSocket=n.default.WebSocket||n.default.MozWebSocket,e.usingBrowserWebSocket=!0,e.defaultBinaryType="arraybuffer"},4199:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.WS=void 0;const n=s(4291),i=r(s(9827)),o=r(s(9347)),a=s(102),c=s(9233),u=r(s(5579)),d=s(4755),l=(0,u.default)("engine.io-client:websocket"),h="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase();class f extends n.Transport{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),e=this.opts.protocols,s=h?{}:(0,a.pick)(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(s.headers=this.opts.extraHeaders);try{this.ws=c.usingBrowserWebSocket&&!h?e?new c.WebSocket(t,e):new c.WebSocket(t):new c.WebSocket(t,e,s)}catch(t){return this.emit("error",t)}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=this.onClose.bind(this),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let e=0;e<t.length;e++){const s=t[e],r=e===t.length-1;(0,d.encodePacket)(s,this.supportsBinary,(t=>{const e={};if(!c.usingBrowserWebSocket&&(s.options&&(e.compress=s.options.compress),this.opts.perMessageDeflate)){("string"==typeof t?Buffer.byteLength(t):t.length)<this.opts.perMessageDeflate.threshold&&(e.compress=!1)}try{c.usingBrowserWebSocket?this.ws.send(t):this.ws.send(t,e)}catch(t){l("websocket closed before onclose event")}r&&(0,c.nextTick)((()=>{this.writable=!0,this.emit("drain")}),this.setTimeoutFn)}))}}doClose(){void 0!==this.ws&&(this.ws.close(),this.ws=null)}uri(){let t=this.query||{};const e=this.opts.secure?"wss":"ws";let s="";this.opts.port&&("wss"===e&&443!==Number(this.opts.port)||"ws"===e&&80!==Number(this.opts.port))&&(s=":"+this.opts.port),this.opts.timestampRequests&&(t[this.opts.timestampParam]=(0,o.default)()),this.supportsBinary||(t.b64=1);const r=i.default.encode(t);return e+"://"+(-1!==this.opts.hostname.indexOf(":")?"["+this.opts.hostname+"]":this.opts.hostname)+s+this.opts.path+(r.length?"?"+r:"")}check(){return!(!c.WebSocket||"__initialize"in c.WebSocket&&this.name===f.prototype.name)}}e.WS=f},4582:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s(4568)),i=r(s(66));e.default=function(t){const e=t.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!e||n.default))return new XMLHttpRequest}catch(t){}if(!e)try{return new(i.default[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(t){}}},102:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.installTimerFunctions=e.pick=void 0;const n=r(s(66));e.pick=function(t,...e){return e.reduce(((e,s)=>(t.hasOwnProperty(s)&&(e[s]=t[s]),e)),{})};const i=setTimeout,o=clearTimeout;e.installTimerFunctions=function(t,e){e.useNativeTimers?(t.setTimeoutFn=i.bind(n.default),t.clearTimeoutFn=o.bind(n.default)):(t.setTimeoutFn=setTimeout.bind(n.default),t.clearTimeoutFn=clearTimeout.bind(n.default))}},9782:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ERROR_PACKET=e.PACKET_TYPES_REVERSE=e.PACKET_TYPES=void 0;const s=Object.create(null);e.PACKET_TYPES=s,s.open="0",s.close="1",s.ping="2",s.pong="3",s.message="4",s.upgrade="5",s.noop="6";const r=Object.create(null);e.PACKET_TYPES_REVERSE=r,Object.keys(s).forEach((t=>{r[s[t]]=t}));e.ERROR_PACKET={type:"error",data:"parser error"}},6502:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.decode=e.encode=void 0;const s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r="undefined"==typeof Uint8Array?[]:new Uint8Array(256);for(let t=0;t<s.length;t++)r[s.charCodeAt(t)]=t;e.encode=t=>{let e,r=new Uint8Array(t),n=r.length,i="";for(e=0;e<n;e+=3)i+=s[r[e]>>2],i+=s[(3&r[e])<<4|r[e+1]>>4],i+=s[(15&r[e+1])<<2|r[e+2]>>6],i+=s[63&r[e+2]];return n%3==2?i=i.substring(0,i.length-1)+"=":n%3==1&&(i=i.substring(0,i.length-2)+"=="),i};e.decode=t=>{let e,s,n,i,o,a=.75*t.length,c=t.length,u=0;"="===t[t.length-1]&&(a--,"="===t[t.length-2]&&a--);const d=new ArrayBuffer(a),l=new Uint8Array(d);for(e=0;e<c;e+=4)s=r[t.charCodeAt(e)],n=r[t.charCodeAt(e+1)],i=r[t.charCodeAt(e+2)],o=r[t.charCodeAt(e+3)],l[u++]=s<<2|n>>4,l[u++]=(15&n)<<4|i>>2,l[u++]=(3&i)<<6|63&o;return d}},3108:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=s(9782),n=s(6502),i="function"==typeof ArrayBuffer,o=(t,e)=>{if(i){const s=(0,n.decode)(t);return a(s,e)}return{base64:!0,data:t}},a=(t,e)=>"blob"===e&&t instanceof ArrayBuffer?new Blob([t]):t;e.default=(t,e)=>{if("string"!=typeof t)return{type:"message",data:a(t,e)};const s=t.charAt(0);if("b"===s)return{type:"message",data:o(t.substring(1),e)};return r.PACKET_TYPES_REVERSE[s]?t.length>1?{type:r.PACKET_TYPES_REVERSE[s],data:t.substring(1)}:{type:r.PACKET_TYPES_REVERSE[s]}:r.ERROR_PACKET}},4895:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=s(9782),n="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),i="function"==typeof ArrayBuffer,o=(t,e)=>{const s=new FileReader;return s.onload=function(){const t=s.result.split(",")[1];e("b"+t)},s.readAsDataURL(t)};e.default=({type:t,data:e},s,a)=>{return n&&e instanceof Blob?s?a(e):o(e,a):i&&(e instanceof ArrayBuffer||(c=e,"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(c):c&&c.buffer instanceof ArrayBuffer))?s?a(e):o(new Blob([e]),a):a(r.PACKET_TYPES[t]+(e||""));var c}},4755:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.decodePayload=e.decodePacket=e.encodePayload=e.encodePacket=e.protocol=void 0;const r=s(4895);e.encodePacket=r.default;const n=s(3108);e.decodePacket=n.default;const i=String.fromCharCode(30);e.encodePayload=(t,e)=>{const s=t.length,n=new Array(s);let o=0;t.forEach(((t,a)=>{(0,r.default)(t,!1,(t=>{n[a]=t,++o===s&&e(n.join(i))}))}))};e.decodePayload=(t,e)=>{const s=t.split(i),r=[];for(let t=0;t<s.length;t++){const i=(0,n.default)(s[t],e);if(r.push(i),"error"===i.type)break}return r},e.protocol=4},8623:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.connect=e.io=e.Socket=e.Manager=e.protocol=void 0;const n=s(4197),i=s(3288);Object.defineProperty(e,"Manager",{enumerable:!0,get:function(){return i.Manager}});const o=s(3232);Object.defineProperty(e,"Socket",{enumerable:!0,get:function(){return o.Socket}});const a=r(s(5579)).default("socket.io-client"),c={};function u(t,e){"object"==typeof t&&(e=t,t=void 0),e=e||{};const s=n.url(t,e.path||"/socket.io"),r=s.source,o=s.id,u=s.path,d=c[o]&&u in c[o].nsps;let l;return e.forceNew||e["force new connection"]||!1===e.multiplex||d?(a("ignoring socket cache for %s",r),l=new i.Manager(r,e)):(c[o]||(a("new io instance for %s",r),c[o]=new i.Manager(r,e)),l=c[o]),s.query&&!e.query&&(e.query=s.queryKey),l.socket(s.path,e)}e.io=u,e.connect=u,e.default=u,Object.assign(u,{Manager:i.Manager,Socket:o.Socket,io:u,connect:u});var d=s(170);Object.defineProperty(e,"protocol",{enumerable:!0,get:function(){return d.protocol}}),t.exports=u},3288:function(t,e,s){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,s,r){void 0===r&&(r=s),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[s]}})}:function(t,e,s,r){void 0===r&&(r=s),t[r]=e[s]}),n=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var s in t)"default"!==s&&Object.prototype.hasOwnProperty.call(t,s)&&r(e,t,s);return n(e,t),e},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Manager=void 0;const a=s(5769),c=s(3232),u=i(s(170)),d=s(6263),l=o(s(7672)),h=s(3717),f=o(s(5579)).default("socket.io-client:manager");class p extends h.Emitter{constructor(t,e){var s;super(),this.nsps={},this.subs=[],t&&"object"==typeof t&&(e=t,t=void 0),(e=e||{}).path=e.path||"/socket.io",this.opts=e,a.installTimerFunctions(this,e),this.reconnection(!1!==e.reconnection),this.reconnectionAttempts(e.reconnectionAttempts||1/0),this.reconnectionDelay(e.reconnectionDelay||1e3),this.reconnectionDelayMax(e.reconnectionDelayMax||5e3),this.randomizationFactor(null!==(s=e.randomizationFactor)&&void 0!==s?s:.5),this.backoff=new l.default({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==e.timeout?2e4:e.timeout),this._readyState="closed",this.uri=t;const r=e.parser||u;this.encoder=new r.Encoder,this.decoder=new r.Decoder,this._autoConnect=!1!==e.autoConnect,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return void 0===t?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var e;return void 0===t?this._reconnectionDelay:(this._reconnectionDelay=t,null===(e=this.backoff)||void 0===e||e.setMin(t),this)}randomizationFactor(t){var e;return void 0===t?this._randomizationFactor:(this._randomizationFactor=t,null===(e=this.backoff)||void 0===e||e.setJitter(t),this)}reconnectionDelayMax(t){var e;return void 0===t?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,null===(e=this.backoff)||void 0===e||e.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}open(t){if(f("readyState %s",this._readyState),~this._readyState.indexOf("open"))return this;f("opening %s",this.uri),this.engine=new a.Socket(this.uri,this.opts);const e=this.engine,s=this;this._readyState="opening",this.skipReconnect=!1;const r=d.on(e,"open",(function(){s.onopen(),t&&t()})),n=d.on(e,"error",(e=>{f("error"),s.cleanup(),s._readyState="closed",this.emitReserved("error",e),t?t(e):s.maybeReconnectOnOpen()}));if(!1!==this._timeout){const t=this._timeout;f("connect attempt will timeout after %d",t),0===t&&r();const s=this.setTimeoutFn((()=>{f("connect attempt timed out after %d",t),r(),e.close(),e.emit("error",new Error("timeout"))}),t);this.opts.autoUnref&&s.unref(),this.subs.push((function(){clearTimeout(s)}))}return this.subs.push(r),this.subs.push(n),this}connect(t){return this.open(t)}onopen(){f("open"),this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(d.on(t,"ping",this.onping.bind(this)),d.on(t,"data",this.ondata.bind(this)),d.on(t,"error",this.onerror.bind(this)),d.on(t,"close",this.onclose.bind(this)),d.on(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){this.decoder.add(t)}ondecoded(t){this.emitReserved("packet",t)}onerror(t){f("error",t),this.emitReserved("error",t)}socket(t,e){let s=this.nsps[t];return s||(s=new c.Socket(this,t,e),this.nsps[t]=s),s}_destroy(t){const e=Object.keys(this.nsps);for(const t of e){if(this.nsps[t].active)return void f("socket %s is still active, skipping close",t)}this._close()}_packet(t){f("writing packet %j",t);const e=this.encoder.encode(t);for(let s=0;s<e.length;s++)this.engine.write(e[s],t.options)}cleanup(){f("cleanup"),this.subs.forEach((t=>t())),this.subs.length=0,this.decoder.destroy()}_close(){f("disconnect"),this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t){f("closed due to %s",t),this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)f("reconnect failed"),this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const e=this.backoff.duration();f("will wait %dms before reconnect attempt",e),this._reconnecting=!0;const s=this.setTimeoutFn((()=>{t.skipReconnect||(f("attempting reconnect"),this.emitReserved("reconnect_attempt",t.backoff.attempts),t.skipReconnect||t.open((e=>{e?(f("reconnect attempt error"),t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",e)):(f("reconnect success"),t.onreconnect())})))}),e);this.opts.autoUnref&&s.unref(),this.subs.push((function(){clearTimeout(s)}))}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}e.Manager=p},6263:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.on=void 0,e.on=function(t,e,s){return t.on(e,s),function(){t.off(e,s)}}},3232:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Socket=void 0;const n=s(170),i=s(6263),o=s(3717),a=r(s(5579)).default("socket.io-client:socket"),c=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class u extends o.Emitter{constructor(t,e,s){super(),this.connected=!1,this.disconnected=!0,this.receiveBuffer=[],this.sendBuffer=[],this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=e,s&&s.auth&&(this.auth=s.auth),this.io._autoConnect&&this.open()}subEvents(){if(this.subs)return;const t=this.io;this.subs=[i.on(t,"open",this.onopen.bind(this)),i.on(t,"packet",this.onpacket.bind(this)),i.on(t,"error",this.onerror.bind(this)),i.on(t,"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(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...e){if(c.hasOwnProperty(t))throw new Error('"'+t+'" is a reserved event name');e.unshift(t);const s={type:n.PacketType.EVENT,data:e,options:{}};if(s.options.compress=!1!==this.flags.compress,"function"==typeof e[e.length-1]){const t=this.ids++;a("emitting packet with ack id %d",t);const r=e.pop();this._registerAckCallback(t,r),s.id=t}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.packet(s):this.sendBuffer.push(s),this.flags={},this}_registerAckCallback(t,e){const s=this.flags.timeout;if(void 0===s)return void(this.acks[t]=e);const r=this.io.setTimeoutFn((()=>{delete this.acks[t];for(let e=0;e<this.sendBuffer.length;e++)this.sendBuffer[e].id===t&&(a("removing packet with ack id %d from the buffer",t),this.sendBuffer.splice(e,1));a("event with ack id %d has timed out after %d ms",t,s),e.call(this,new Error("operation has timed out"))}),s);this.acks[t]=(...t)=>{this.io.clearTimeoutFn(r),e.apply(this,[null,...t])}}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){a("transport is open - connecting"),"function"==typeof this.auth?this.auth((t=>{this.packet({type:n.PacketType.CONNECT,data:t})})):this.packet({type:n.PacketType.CONNECT,data:this.auth})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t){a("close (%s)",t),this.connected=!1,this.disconnected=!0,delete this.id,this.emitReserved("disconnect",t)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case n.PacketType.CONNECT:if(t.data&&t.data.sid){const e=t.data.sid;this.onconnect(e)}else 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 n.PacketType.EVENT:case n.PacketType.BINARY_EVENT:this.onevent(t);break;case n.PacketType.ACK:case n.PacketType.BINARY_ACK:this.onack(t);break;case n.PacketType.DISCONNECT:this.ondisconnect();break;case n.PacketType.CONNECT_ERROR:this.destroy();const e=new Error(t.data.message);e.data=t.data.data,this.emitReserved("connect_error",e)}}onevent(t){const e=t.data||[];a("emitting event %j",e),null!=t.id&&(a("attaching ack callback to event"),e.push(this.ack(t.id))),this.connected?this.emitEvent(e):this.receiveBuffer.push(Object.freeze(e))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const e=this._anyListeners.slice();for(const s of e)s.apply(this,t)}super.emit.apply(this,t)}ack(t){const e=this;let s=!1;return function(...r){s||(s=!0,a("sending ack %j",r),e.packet({type:n.PacketType.ACK,id:t,data:r}))}}onack(t){const e=this.acks[t.id];"function"==typeof e?(a("calling ack %s with %j",t.id,t.data),e.apply(this,t.data),delete this.acks[t.id]):a("bad ack %s",t.id)}onconnect(t){a("socket connected with id %s",t),this.id=t,this.connected=!0,this.disconnected=!1,this.emitBuffered(),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach((t=>this.emitEvent(t))),this.receiveBuffer=[],this.sendBuffer.forEach((t=>this.packet(t))),this.sendBuffer=[]}ondisconnect(){a("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach((t=>t())),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&(a("performing disconnect (%s)",this.nsp),this.packet({type:n.PacketType.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const e=this._anyListeners;for(let s=0;s<e.length;s++)if(t===e[s])return e.splice(s,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}}e.Socket=u},4197:function(t,e,s){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.url=void 0;const n=r(s(5977)),i=r(s(5579)).default("socket.io-client:url");e.url=function(t,e="",s){let r=t;s=s||"undefined"!=typeof location&&location,null==t&&(t=s.protocol+"//"+s.host),"string"==typeof t&&("/"===t.charAt(0)&&(t="/"===t.charAt(1)?s.protocol+t:s.host+t),/^(https?|wss?):\/\//.test(t)||(i("protocol-less url %s",t),t=void 0!==s?s.protocol+"//"+t:"https://"+t),i("parse %s",t),r=n.default(t)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const o=-1!==r.host.indexOf(":")?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+o+":"+r.port+e,r.href=r.protocol+"://"+o+(s&&s.port===r.port?"":":"+r.port),r}},2830:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.reconstructPacket=e.deconstructPacket=void 0;const r=s(3980);function n(t,e){if(!t)return t;if(r.isBinary(t)){const s={_placeholder:!0,num:e.length};return e.push(t),s}if(Array.isArray(t)){const s=new Array(t.length);for(let r=0;r<t.length;r++)s[r]=n(t[r],e);return s}if("object"==typeof t&&!(t instanceof Date)){const s={};for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(s[r]=n(t[r],e));return s}return t}function i(t,e){if(!t)return t;if(t&&t._placeholder)return e[t.num];if(Array.isArray(t))for(let s=0;s<t.length;s++)t[s]=i(t[s],e);else if("object"==typeof t)for(const s in t)Object.prototype.hasOwnProperty.call(t,s)&&(t[s]=i(t[s],e));return t}e.deconstructPacket=function(t){const e=[],s=t.data,r=t;return r.data=n(s,e),r.attachments=e.length,{packet:r,buffers:e}},e.reconstructPacket=function(t,e){return t.data=i(t.data,e),t.attachments=void 0,t}},170:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Decoder=e.Encoder=e.PacketType=e.protocol=void 0;const r=s(3717),n=s(2830),i=s(3980),o=s(5579).default("socket.io-parser");var a;e.protocol=5,function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"}(a=e.PacketType||(e.PacketType={}));e.Encoder=class{encode(t){return o("encoding packet %j",t),t.type!==a.EVENT&&t.type!==a.ACK||!i.hasBinary(t)?[this.encodeAsString(t)]:(t.type=t.type===a.EVENT?a.BINARY_EVENT:a.BINARY_ACK,this.encodeAsBinary(t))}encodeAsString(t){let e=""+t.type;return t.type!==a.BINARY_EVENT&&t.type!==a.BINARY_ACK||(e+=t.attachments+"-"),t.nsp&&"/"!==t.nsp&&(e+=t.nsp+","),null!=t.id&&(e+=t.id),null!=t.data&&(e+=JSON.stringify(t.data)),o("encoded %j as %s",t,e),e}encodeAsBinary(t){const e=n.deconstructPacket(t),s=this.encodeAsString(e.packet),r=e.buffers;return r.unshift(s),r}};class c extends r.Emitter{constructor(){super()}add(t){let e;if("string"==typeof t)e=this.decodeString(t),e.type===a.BINARY_EVENT||e.type===a.BINARY_ACK?(this.reconstructor=new u(e),0===e.attachments&&super.emitReserved("decoded",e)):super.emitReserved("decoded",e);else{if(!i.isBinary(t)&&!t.base64)throw new Error("Unknown type: "+t);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");e=this.reconstructor.takeBinaryData(t),e&&(this.reconstructor=null,super.emitReserved("decoded",e))}}decodeString(t){let e=0;const s={type:Number(t.charAt(0))};if(void 0===a[s.type])throw new Error("unknown packet type "+s.type);if(s.type===a.BINARY_EVENT||s.type===a.BINARY_ACK){const r=e+1;for(;"-"!==t.charAt(++e)&&e!=t.length;);const n=t.substring(r,e);if(n!=Number(n)||"-"!==t.charAt(e))throw new Error("Illegal attachments");s.attachments=Number(n)}if("/"===t.charAt(e+1)){const r=e+1;for(;++e;){if(","===t.charAt(e))break;if(e===t.length)break}s.nsp=t.substring(r,e)}else s.nsp="/";const r=t.charAt(e+1);if(""!==r&&Number(r)==r){const r=e+1;for(;++e;){const s=t.charAt(e);if(null==s||Number(s)!=s){--e;break}if(e===t.length)break}s.id=Number(t.substring(r,e+1))}if(t.charAt(++e)){const r=function(t){try{return JSON.parse(t)}catch(t){return!1}}(t.substr(e));if(!c.isPayloadValid(s.type,r))throw new Error("invalid payload");s.data=r}return o("decoded %s as %j",t,s),s}static isPayloadValid(t,e){switch(t){case a.CONNECT:return"object"==typeof e;case a.DISCONNECT:return void 0===e;case a.CONNECT_ERROR:return"string"==typeof e||"object"==typeof e;case a.EVENT:case a.BINARY_EVENT:return Array.isArray(e)&&e.length>0;case a.ACK:case a.BINARY_ACK:return Array.isArray(e)}}destroy(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}e.Decoder=c;class u{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const t=n.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}},3980:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hasBinary=e.isBinary=void 0;const s="function"==typeof ArrayBuffer,r=Object.prototype.toString,n="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===r.call(Blob),i="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===r.call(File);function o(t){return s&&(t instanceof ArrayBuffer||(t=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer)(t))||n&&t instanceof Blob||i&&t instanceof File}e.isBinary=o,e.hasBinary=function t(e,s){if(!e||"object"!=typeof e)return!1;if(Array.isArray(e)){for(let s=0,r=e.length;s<r;s++)if(t(e[s]))return!0;return!1}if(o(e))return!0;if(e.toJSON&&"function"==typeof e.toJSON&&1===arguments.length)return t(e.toJSON(),!0);for(const s in e)if(Object.prototype.hasOwnProperty.call(e,s)&&t(e[s]))return!0;return!1}}},__webpack_module_cache__={};function __webpack_require__(t){var e=__webpack_module_cache__[t];if(void 0!==e)return e.exports;var s=__webpack_module_cache__[t]={id:t,exports:{}};return __webpack_modules__[t].call(s.exports,s,s.exports,__webpack_require__),s.exports}__webpack_require__.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return __webpack_require__.d(e,{a:e}),e},__webpack_require__.d=(t,e)=>{for(var s in e)__webpack_require__.o(e,s)&&!__webpack_require__.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),__webpack_require__.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),__webpack_require__.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},__webpack_require__.nc=void 0;var __webpack_exports__={};(()=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{CloudServicesCommentsAdapter:()=>Li,CloudServicesRevisionHistoryAdapter:()=>_o,CloudServicesTrackChangesAdapter:()=>Zi,PresenceList:()=>ba,RealTimeCollaborativeComments:()=>no,RealTimeCollaborativeEditing:()=>Pi,RealTimeCollaborativeRevisionHistory:()=>Eo,RealTimeCollaborativeTrackChanges:()=>uo});var t=__webpack_require__(2704),e=__webpack_require__(2209),s=__webpack_require__(1492),r=__webpack_require__(9273),n=__webpack_require__(2417),i=__webpack_require__(7158),o=__webpack_require__.n(i);const a=["disconnect","stopListening","bind","then","cloudServices.connectionTimeout","disconnected","connection","WebSocketGateway","create","limitExceeded","cloudServices.requestTimeout","offline","init","change:me","listenTo","config","from","context","reconnect","requires","_reconnectionStack","function","webSocketUrl","isInReconnectionStack","_shouldPluginsReconnect","get","cloudservices-reconnection-error","delete","_isBrowserOffline","pluginName","destroy","addToReconnectionStack","plugins","cloudservices-init","state","connect","define","CloudServices","catch","has","removeFromReconnectionStack","all","initialReconnectionInterval","websocketgateway-missing-websocket-url","code","connected","error","constructor","showWarning","websocketgateway-invalid-plugin-interface","Connected users limit exceeded","set","connecting","_domEmitter","token"];var c,u;c=a,u=280,function(t){for(;--t;)c.push(c.shift())}(++u);const d=function(t,e){return a[t-=0]};class l extends t.ContextPlugin{static get[d("0xe")](){return[d("0x20"),r.Notification]}static get pluginName(){return d("0x2")}[d("0x7")](){const t=this[d("0xc")],s=t[d("0x1b")][d("0x14")](d("0x20")),n=t[d("0x1b")][d("0x14")](r.Notification);if(!s[d("0x31")])throw new e.CKEditorError("websocketgateway-missing-token",this);if(!s[d("0x11")])throw new e.CKEditorError(d("0x26"),this);return this.set(d("0x1d"),d("0x2f")),this[d("0x2e")](d("0x17"),!1),this._reconnectionStack=new Set,this[d("0x13")]=!1,this._domEmitter=Object[d("0x3")](e.DomEmitterMixin),this._domEmitter[d("0x9")](window,d("0x6"),(()=>this[d("0x17")]=!0)),this[d("0x30")].listenTo(window,"online",(()=>this[d("0x17")]=!1)),this[d("0xc")][d("0xa")].define(d("0x36"),10),this.context[d("0xa")][d("0x1f")]("cloudServices.requestTimeout",20),l[d("0x2")][d("0x1e")](s[d("0x31")],s[d("0x11")],{disconnectOnUnload:!1,timeout:1e3*this[d("0xc")][d("0xa")].get(d("0x36")),requestTimeout:1e3*this[d("0xc")][d("0xa")][d("0x14")](d("0x5"))})[d("0x35")]((t=>{if(this[d("0x1")]=t,this[d("0x34")](d("0x1d")).to(t,d("0x1d"),this,"_isBrowserOffline",((t,e)=>(d("0x28")!==t&&(this[d("0x13")]=!0),e||d("0x28")!==t?"disconnected":d("0x0")==this[d("0x1d")]&&this[d("0x13")]?(this._shouldPluginsReconnect=!1,this._reconnect(),d("0x2f")):"connected"))),this[d("0x1")].on("error",((t,s)=>{if(d("0x4")!==s[d("0x27")])throw console[d("0x29")](s),new e.CKEditorError(d("0x1c"),null,{originalError:s});n[d("0x2b")]("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.",{title:d("0x2d"),namespace:"real-time-collaboration"})})),!t.me)return new Promise((e=>t.on(d("0x8"),e)))})).catch((t=>{throw console[d("0x29")](t),new e.CKEditorError(d("0x1c"),null,{originalError:t})}))}[d("0x1a")](t){if(d("0x10")!=typeof t[d("0xd")])throw new e.CKEditorError(d("0x2c"),this);if(this[d("0x12")](t))throw new e.CKEditorError("websocketgateway-plugin-already-registered",this,{name:t[d("0x2a")][d("0x18")]});this._reconnectionStack.add(t)}[d("0x23")](t){this._reconnectionStack[d("0x16")](t)}[d("0x12")](t){return this[d("0xf")][d("0x22")](t)}_reconnect(){return this[d("0x1")][d("0xd")]()[d("0x35")]((()=>Promise[d("0x24")](Array[d("0xb")](this[d("0xf")],(t=>t[d("0xd")]())))))[d("0x35")]((()=>this[d("0x1d")]="connected"))[d("0x21")]((t=>{throw console[d("0x29")](t),new e.CKEditorError(d("0x15"),this[d("0xc")])}))}destroy(){this[d("0x1")]&&this[d("0x1")][d("0x32")](),this[d("0x1d")]=d("0x0"),this._domEmitter[d("0x33")](),super[d("0x19")]()}}l[d("0x2")]=o(),l[d("0x25")]=1e3;const h=["init","sessions-register-already-registered","getUserSessions","context","connection","assign","set","requires","_users","remove","_handleSessionAdd","add","delete","addUser","pluginName","role","sessionAdd:","size","values","user","getUser","_registeredSessions","_handleSessionRemove","has","_uniqueUsersCount","defineMe","connected","allConnectedUsers","get","clear","_createUser","channelSessions","unregister","Sessions","channelConnectedUsers","state","plugins","register","stopListening","change:state","sessionId"];var f,p;f=h,p=224,function(t){for(;--t;)f.push(f.shift())}(++p);const y=function(t,e){return h[t-=0]};class m extends t.ContextPlugin{static get[y("0x24")](){return y("0xe")}static get[y("0x1d")](){return[l,n.Users]}[y("0x16")](){const t=this[y("0x19")],s=t[y("0x11")][y("0x9")](l);this.channelSessions=new Map,this[y("0xf")]=new Map,this[y("0x8")]=new e.Collection,this[y("0x2")]=new Map,this._uniqueUsersCount=0,this[y("0x1e")]=t[y("0x11")].get(n.Users),this.listenTo(s,y("0x14"),((t,e,s)=>{if(y("0x7")!==s)this[y("0xc")].forEach((t=>t[y("0xa")]())),this.channelConnectedUsers.forEach((t=>t[y("0xa")]())),this[y("0x8")][y("0xa")]();else for(const[t,e]of this._registeredSessions)for(const s of e)this[y("0x20")](t,s)})),this[y("0xb")](s.connection.me,!0)}[y("0x12")](t,s){if(this[y("0x2")][y("0x4")](t))throw new e.CKEditorError(y("0x17"),null,{channelId:t});this[y("0x2")][y("0x1c")](t,s),this[y("0xc")][y("0x1c")](t,new e.Collection),this[y("0xf")][y("0x1c")](t,new e.Collection),this.listenTo(s,"add",((e,s)=>this._handleSessionAdd(t,s))),this.listenTo(s,"remove",((e,s)=>this[y("0x3")](t,s)));for(const e of s)this[y("0x20")](t,e)}[y("0xd")](t){if(!this[y("0x2")].has(t))throw new e.CKEditorError("sessions-unregister-not-exist",null,{channelId:t});const s=this[y("0x2")][y("0x9")](t);this[y("0x13")](s);for(const e of s)y("0x7")===this[y("0x19")].plugins[y("0x9")](l)[y("0x10")]&&this._handleSessionRemove(t,e);this[y("0x2")][y("0x22")](t),this[y("0xc")].delete(t),this[y("0xf")].delete(t)}get mySessionId(){return this[y("0x19")][y("0x11")][y("0x9")](l)[y("0x1a")][y("0x15")]}getUserBySessionId(t){for(const e of this[y("0xc")].values())for(const s of e)if(s.id===t)return s[y("0x0")]}[y("0x18")](t,e){const s=e?[this[y("0xc")][y("0x9")](e)]:this.channelSessions[y("0x28")](),r=new Set;for(const e of s)for(const s of e)s[y("0x0")].id===t.id&&r[y("0x21")](s.id);return r}getUserRole(t){for(const e of this[y("0xc")][y("0x28")]())for(const s of e)if(s.user===t)return s[y("0x25")]}[y("0x20")](t,e){if(y("0x7")!==this[y("0x19")].plugins[y("0x9")](l)[y("0x10")])return;const s=e[y("0x0")],r=this._users[y("0x1")](s.id)||this[y("0xb")](s),n=Object[y("0x1b")]({},e,{user:r});this.channelSessions[y("0x9")](t).add(n);const i=this.channelConnectedUsers[y("0x9")](t);i[y("0x4")](r.id)||i[y("0x21")](r),this[y("0x8")].has(r.id)||this[y("0x8")][y("0x21")](r),this.fire(y("0x26")+t,{channelId:t,session:n})}_handleSessionRemove(t,e){if(y("0x7")!==this[y("0x19")][y("0x11")][y("0x9")](l)[y("0x10")])return;const s=this[y("0xf")].get(t),r=e[y("0x0")];this.channelSessions[y("0x9")](t)[y("0x1f")](e.id),s[y("0x4")](r.id)&&!this.getUserSessions(r,t)[y("0x27")]&&s[y("0x1f")](r.id),this.allConnectedUsers.get(r.id)&&!this[y("0x18")](r)[y("0x27")]&&this.allConnectedUsers[y("0x1f")](r.id)}[y("0xb")](t,e){const s=this[y("0x1e")][y("0x23")](t);return e&&this._users[y("0x6")](t.id),s.orderNumber=this[y("0x5")]++,s}}var v=__webpack_require__(7594),x=__webpack_require__.n(v),_=__webpack_require__(9940),g={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};x()(_.Z,g);_.Z.locals;const b=["isLimit","change","editing","user:range","schema","getRange","for","fromRange","createUserMarkerOperations","model","hasContent","markerRange","requires","hasDomSelection","startsWith","markerName","isInline",'&#8203;<span class="ck-user__marker-line"><span class="ck-user__marker-dot"></span></span>',"ck-user__selection","user:position:","innerHTML","isCollapsed","contenteditable","createRange","setCustomProperty","markerToElement","pluginName","user:position","getAttribute","type","undo","newRange","getSelectionClass","getUserBySessionId","tableCell","color","user:","start","checkChild","isObject","get","addMarker","removeMarker","createUIElement","set","UserMarkers","init","change:range","marker","end","getStart","mySessionId","userPositionMarker","commands","isSimilar","getFirstRange","element","getNearestSelectionRange","deletionPosition","document","priority","updateMarker","applyOperation","_createdBatches","plugins","afterInit","view","editor","size","selection","getCustomProperty","split","getMarkerClass","span","data-session-id","highest","clear","batch","detach","name","update:user:range","toRange","markers","$graveyard","user:range:","orderNumber","editingDowncast","has","enqueueChange","toDomElement","root","conversion","reconvertMarker","rootName","oldRange"];var w,O;w=b,O=292,function(t){for(;--t;)w.push(w.shift())}(++O);const S=function(t,e){return b[t-=0]};class E extends t.Plugin{static get[S("0x5")](){return[m]}static get[S("0x13")](){return S("0x26")}[S("0x27")](){const t=this[S("0x3c")],e=t[S("0x39")][S("0x21")](m);t[S("0x54")][S("0x5e")](S("0x4f"))[S("0x12")]({model:S("0x14"),view:(s,{writer:r})=>function(t,e,s,r){const n=t[S("0x8")][S("0x40")](":")[2],i=s[S("0x1a")](n);if(!i||n===s[S("0x2c")])return;if(!r[S("0x2")][S("0x5c")][S("0x1f")](t[S("0x4")][S("0x1e")],"$text"))return;const o={class:"ck-user__marker "+i[S("0x1c")][S("0x41")](),"data-name":i[S("0x48")],"data-session-id":n},a=r.model.markers[S("0x21")](t[S("0x8")])[S("0x2b")](),c=a.nodeAfter,u=r[S("0x2")][S("0x5c")];if(c&&u[S("0x20")](c)&&u[S("0x9")](c)&&!r.model[S("0x4b")][S("0x21")]("user:range:"+n)[S("0x5d")]()[S("0xe")])return;const d=a.parent;r.model[S("0x5c")][S("0x58")](d)&&!r[S("0x2")][S("0x3")](d)&&(o[S("0xf")]=!1);const l=function(t,e){const s=t[S("0x24")](S("0x42"),e);return t[S("0x11")](S("0x2d"),!0,s),s.render=function(t){const e=this[S("0x52")](t);return e[S("0xd")]=S("0xa"),e},s[S("0x2f")]=function(t){return this[S("0x3f")](S("0x2d"))&&t.getCustomProperty("userPositionMarker")&&this[S("0x15")](S("0x43"))==t[S("0x15")](S("0x43"))},s}(e,o);return l[S("0x35")]=1e3+i[S("0x4e")],l}(s,r,e,t)}),t[S("0x54")][S("0x5e")](S("0x4f")).markerToHighlight({model:S("0x5b"),view:t=>function(t,e){const s=t[S("0x8")][S("0x40")](":")[2];if(s===e[S("0x2c")])return;const r=e[S("0x1a")](s);return r?{id:s,classes:[S("0xb"),r[S("0x1c")][S("0x19")]()],attributes:{"data-session-id":s},priority:2e3+r[S("0x4e")]}:{id:s}}(t,e)}),function(t){const e=t[S("0x2")],r=new Map,n=t[S("0x39")].get(m);e[S("0x4b")].on(S("0x49"),((i,o,a,c)=>{if(!c&&r[S("0x21")](o[S("0x48")]))return r[S("0x21")](o[S("0x48")])[S("0x47")](),void r.delete(o.name);const u=o[S("0x48")][S("0x40")](":")[2];if(u===n[S("0x2c")])return;const d="user:position:"+u;e.markers[S("0x50")](d)&&t[S("0x5a")][S("0x55")](d),o.on("change:range",((t,n,i)=>{if(S("0x4c")!=n[S("0x53")][S("0x56")]&&S("0x4c")==o[S("0x5d")]()[S("0x53")][S("0x56")]&&!r[S("0x50")](o[S("0x48")])){const t=e[S("0x5c")][S("0x32")](i.deletionPosition);if(t){const n=s.LiveRange[S("0x0")](t);r[S("0x25")](o[S("0x48")],n),n.on(S("0x28"),((t,s,i)=>{if("$graveyard"==n[S("0x53")][S("0x56")]){const t=e[S("0x5c")][S("0x32")](i[S("0x33")]);t?(n[S("0x1e")]=t.start,n[S("0x2a")]=t[S("0x2a")]):(r.delete(o[S("0x48")]),n.detach())}}))}}}))})),e.document.on(S("0x59"),(()=>{r[S("0x3d")]>0&&e[S("0x51")]({isUndoable:!1},(t=>{for(const[s,n]of r)S("0x4c")==e[S("0x4b")][S("0x21")](s)[S("0x5d")]()[S("0x53")][S("0x56")]&&(T(s.split(":")[2],n[S("0x4a")](),e,t),n[S("0x47")]());r[S("0x45")]()}))}))}(t)}[S("0x3a")](){const t=this[S("0x3c")],e=t[S("0x2e")][S("0x21")](S("0x17"));e&&t[S("0x2")].on(S("0x37"),((s,r)=>{const n=r[0];if(S("0x29")!=n[S("0x16")]||!n.name[S("0x7")](S("0x1d")))return;const i=n[S("0x46")];e[S("0x38")].has(i)&&(n[S("0x18")]=n[S("0x57")]?t[S("0x2")][S("0x10")](n[S("0x57")].start,n[S("0x57")][S("0x2a")]):null)}),{priority:S("0x44")})}[S("0x1")](){const t=this.editor,e=t[S("0x2")][S("0x34")],s=t[S("0x39")][S("0x21")](m);t[S("0x2")][S("0x51")]({isUndoable:!1},(r=>{const n=S("0x4d")+s[S("0x2c")],i=S("0xc")+s[S("0x2c")],o=t[S("0x2")][S("0x4b")].has(n);t[S("0x5a")][S("0x3b")][S("0x6")]?T(s[S("0x2c")],e[S("0x3e")][S("0x30")](),t[S("0x2")],r):o&&(r[S("0x23")](n),r[S("0x23")](i))}))}}function T(t,e,s,r){const n=S("0x4d")+t,i=S("0xc")+t,o=e.getContainedElement();let a=e.start;o&&o.is(S("0x31"),S("0x1b"))&&(a=function(t,e){for(const s of t.getPositions())if(e.schema.checkChild(s,"$text"))return s}(e,s),e=r[S("0x10")](a)),a=r[S("0x10")](a),s[S("0x4b")].has(n)?(r[S("0x36")](n,{range:e}),r[S("0x36")](i,{range:a})):(r.addMarker(n,{range:e,usingOperation:!0}),r[S("0x22")](i,{range:a,usingOperation:!0}))}function k(t,e,s){const r=t.t;switch(e){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"},s)}}var C=__webpack_require__(9933),I=__webpack_require__.n(C);const A=function(){this.__data__=[],this.size=0};const R=function(t,e){return t===e||t!=t&&e!=e};const N=function(t,e){for(var s=t.length;s--;)if(R(t[s][0],e))return s;return-1};var j=Array.prototype.splice;const P=function(t){var e=this.__data__,s=N(e,t);return!(s<0)&&(s==e.length-1?e.pop():j.call(e,s,1),--this.size,!0)};const D=function(t){var e=this.__data__,s=N(e,t);return s<0?void 0:e[s][1]};const M=function(t){return N(this.__data__,t)>-1};const B=function(t,e){var s=this.__data__,r=N(s,t);return r<0?(++this.size,s.push([t,e])):s[r][1]=e,this};function J(t){var e=-1,s=null==t?0:t.length;for(this.clear();++e<s;){var r=t[e];this.set(r[0],r[1])}}J.prototype.clear=A,J.prototype.delete=P,J.prototype.get=D,J.prototype.has=M,J.prototype.set=B;const V=J;const U=function(){this.__data__=new V,this.size=0};const F=function(t){var e=this.__data__,s=e.delete(t);return this.size=e.size,s};const q=function(t){return this.__data__.get(t)};const L=function(t){return this.__data__.has(t)};const Y="object"==typeof global&&global&&global.Object===Object&&global;var z="object"==typeof self&&self&&self.Object===Object&&self;const G=Y||z||Function("return this")();const $=G.Symbol;var W=Object.prototype,H=W.hasOwnProperty,K=W.toString,Z=$?$.toStringTag:void 0;const X=function(t){var e=H.call(t,Z),s=t[Z];try{t[Z]=void 0;var r=!0}catch(t){}var n=K.call(t);return r&&(e?t[Z]=s:delete t[Z]),n};var Q=Object.prototype.toString;const tt=function(t){return Q.call(t)};var et=$?$.toStringTag:void 0;const st=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":et&&et in Object(t)?X(t):tt(t)};const rt=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)};const nt=function(t){if(!rt(t))return!1;var e=st(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e};const it=G["__core-js_shared__"];var ot,at=(ot=/[^.]+$/.exec(it&&it.keys&&it.keys.IE_PROTO||""))?"Symbol(src)_1."+ot:"";const ct=function(t){return!!at&&at in t};var ut=Function.prototype.toString;const dt=function(t){if(null!=t){try{return ut.call(t)}catch(t){}try{return t+""}catch(t){}}return""};var lt=/^\[object .+?Constructor\]$/,ht=Function.prototype,ft=Object.prototype,pt=ht.toString,yt=ft.hasOwnProperty,mt=RegExp("^"+pt.call(yt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const vt=function(t){return!(!rt(t)||ct(t))&&(nt(t)?mt:lt).test(dt(t))};const xt=function(t,e){return null==t?void 0:t[e]};const _t=function(t,e){var s=xt(t,e);return vt(s)?s:void 0};const gt=_t(G,"Map");const bt=_t(Object,"create");const wt=function(){this.__data__=bt?bt(null):{},this.size=0};const Ot=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e};var St=Object.prototype.hasOwnProperty;const Et=function(t){var e=this.__data__;if(bt){var s=e[t];return"__lodash_hash_undefined__"===s?void 0:s}return St.call(e,t)?e[t]:void 0};var Tt=Object.prototype.hasOwnProperty;const kt=function(t){var e=this.__data__;return bt?void 0!==e[t]:Tt.call(e,t)};const Ct=function(t,e){var s=this.__data__;return this.size+=this.has(t)?0:1,s[t]=bt&&void 0===e?"__lodash_hash_undefined__":e,this};function It(t){var e=-1,s=null==t?0:t.length;for(this.clear();++e<s;){var r=t[e];this.set(r[0],r[1])}}It.prototype.clear=wt,It.prototype.delete=Ot,It.prototype.get=Et,It.prototype.has=kt,It.prototype.set=Ct;const At=It;const Rt=function(){this.size=0,this.__data__={hash:new At,map:new(gt||V),string:new At}};const Nt=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};const jt=function(t,e){var s=t.__data__;return Nt(e)?s["string"==typeof e?"string":"hash"]:s.map};const Pt=function(t){var e=jt(this,t).delete(t);return this.size-=e?1:0,e};const Dt=function(t){return jt(this,t).get(t)};const Mt=function(t){return jt(this,t).has(t)};const Bt=function(t,e){var s=jt(this,t),r=s.size;return s.set(t,e),this.size+=s.size==r?0:1,this};function Jt(t){var e=-1,s=null==t?0:t.length;for(this.clear();++e<s;){var r=t[e];this.set(r[0],r[1])}}Jt.prototype.clear=Rt,Jt.prototype.delete=Pt,Jt.prototype.get=Dt,Jt.prototype.has=Mt,Jt.prototype.set=Bt;const Vt=Jt;const Ut=function(t,e){var s=this.__data__;if(s instanceof V){var r=s.__data__;if(!gt||r.length<199)return r.push([t,e]),this.size=++s.size,this;s=this.__data__=new Vt(r)}return s.set(t,e),this.size=s.size,this};function Ft(t){var e=this.__data__=new V(t);this.size=e.size}Ft.prototype.clear=U,Ft.prototype.delete=F,Ft.prototype.get=q,Ft.prototype.has=L,Ft.prototype.set=Ut;const qt=Ft;const Lt=function(t,e){for(var s=-1,r=null==t?0:t.length;++s<r&&!1!==e(t[s],s,t););return t};const Yt=function(){try{var t=_t(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();const zt=function(t,e,s){"__proto__"==e&&Yt?Yt(t,e,{configurable:!0,enumerable:!0,value:s,writable:!0}):t[e]=s};var Gt=Object.prototype.hasOwnProperty;const $t=function(t,e,s){var r=t[e];Gt.call(t,e)&&R(r,s)&&(void 0!==s||e in t)||zt(t,e,s)};const Wt=function(t,e,s,r){var n=!s;s||(s={});for(var i=-1,o=e.length;++i<o;){var a=e[i],c=r?r(s[a],t[a],a,s,t):void 0;void 0===c&&(c=t[a]),n?zt(s,a,c):$t(s,a,c)}return s};const Ht=function(t,e){for(var s=-1,r=Array(t);++s<t;)r[s]=e(s);return r};const Kt=function(t){return null!=t&&"object"==typeof t};const Zt=function(t){return Kt(t)&&"[object Arguments]"==st(t)};var Xt=Object.prototype,Qt=Xt.hasOwnProperty,te=Xt.propertyIsEnumerable;const ee=Zt(function(){return arguments}())?Zt:function(t){return Kt(t)&&Qt.call(t,"callee")&&!te.call(t,"callee")};const se=Array.isArray;const re=function(){return!1};var ne="object"==typeof exports&&exports&&!exports.nodeType&&exports,ie=ne&&"object"==typeof module&&module&&!module.nodeType&&module,oe=ie&&ie.exports===ne?G.Buffer:void 0;const ae=(oe?oe.isBuffer:void 0)||re;var ce=/^(?:0|[1-9]\d*)$/;const ue=function(t,e){var s=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==s||"symbol"!=s&&ce.test(t))&&t>-1&&t%1==0&&t<e};const de=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991};var le={};le["[object Float32Array]"]=le["[object Float64Array]"]=le["[object Int8Array]"]=le["[object Int16Array]"]=le["[object Int32Array]"]=le["[object Uint8Array]"]=le["[object Uint8ClampedArray]"]=le["[object Uint16Array]"]=le["[object Uint32Array]"]=!0,le["[object Arguments]"]=le["[object Array]"]=le["[object ArrayBuffer]"]=le["[object Boolean]"]=le["[object DataView]"]=le["[object Date]"]=le["[object Error]"]=le["[object Function]"]=le["[object Map]"]=le["[object Number]"]=le["[object Object]"]=le["[object RegExp]"]=le["[object Set]"]=le["[object String]"]=le["[object WeakMap]"]=!1;const he=function(t){return Kt(t)&&de(t.length)&&!!le[st(t)]};const fe=function(t){return function(e){return t(e)}};var pe="object"==typeof exports&&exports&&!exports.nodeType&&exports,ye=pe&&"object"==typeof module&&module&&!module.nodeType&&module,me=ye&&ye.exports===pe&&Y.process;const ve=function(){try{var t=ye&&ye.require&&ye.require("util").types;return t||me&&me.binding&&me.binding("util")}catch(t){}}();var xe=ve&&ve.isTypedArray;const _e=xe?fe(xe):he;var ge=Object.prototype.hasOwnProperty;const be=function(t,e){var s=se(t),r=!s&&ee(t),n=!s&&!r&&ae(t),i=!s&&!r&&!n&&_e(t),o=s||r||n||i,a=o?Ht(t.length,String):[],c=a.length;for(var u in t)!e&&!ge.call(t,u)||o&&("length"==u||n&&("offset"==u||"parent"==u)||i&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||ue(u,c))||a.push(u);return a};var we=Object.prototype;const Oe=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||we)};const Se=function(t,e){return function(s){return t(e(s))}};const Ee=Se(Object.keys,Object);var Te=Object.prototype.hasOwnProperty;const ke=function(t){if(!Oe(t))return Ee(t);var e=[];for(var s in Object(t))Te.call(t,s)&&"constructor"!=s&&e.push(s);return e};const Ce=function(t){return null!=t&&de(t.length)&&!nt(t)};const Ie=function(t){return Ce(t)?be(t):ke(t)};const Ae=function(t,e){return t&&Wt(e,Ie(e),t)};const Re=function(t){var e=[];if(null!=t)for(var s in Object(t))e.push(s);return e};var Ne=Object.prototype.hasOwnProperty;const je=function(t){if(!rt(t))return Re(t);var e=Oe(t),s=[];for(var r in t)("constructor"!=r||!e&&Ne.call(t,r))&&s.push(r);return s};const Pe=function(t){return Ce(t)?be(t,!0):je(t)};const De=function(t,e){return t&&Wt(e,Pe(e),t)};var Me="object"==typeof exports&&exports&&!exports.nodeType&&exports,Be=Me&&"object"==typeof module&&module&&!module.nodeType&&module,Je=Be&&Be.exports===Me?G.Buffer:void 0,Ve=Je?Je.allocUnsafe:void 0;const Ue=function(t,e){if(e)return t.slice();var s=t.length,r=Ve?Ve(s):new t.constructor(s);return t.copy(r),r};const Fe=function(t,e){var s=-1,r=t.length;for(e||(e=Array(r));++s<r;)e[s]=t[s];return e};const qe=function(t,e){for(var s=-1,r=null==t?0:t.length,n=0,i=[];++s<r;){var o=t[s];e(o,s,t)&&(i[n++]=o)}return i};const Le=function(){return[]};var Ye=Object.prototype.propertyIsEnumerable,ze=Object.getOwnPropertySymbols;const Ge=ze?function(t){return null==t?[]:(t=Object(t),qe(ze(t),(function(e){return Ye.call(t,e)})))}:Le;const $e=function(t,e){return Wt(t,Ge(t),e)};const We=function(t,e){for(var s=-1,r=e.length,n=t.length;++s<r;)t[n+s]=e[s];return t};const He=Se(Object.getPrototypeOf,Object);const Ke=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)We(e,Ge(t)),t=He(t);return e}:Le;const Ze=function(t,e){return Wt(t,Ke(t),e)};const Xe=function(t,e,s){var r=e(t);return se(t)?r:We(r,s(t))};const Qe=function(t){return Xe(t,Ie,Ge)};const ts=function(t){return Xe(t,Pe,Ke)};const es=_t(G,"DataView");const ss=_t(G,"Promise");const rs=_t(G,"Set");const ns=_t(G,"WeakMap");var is="[object Map]",os="[object Promise]",as="[object Set]",cs="[object WeakMap]",us="[object DataView]",ds=dt(es),ls=dt(gt),hs=dt(ss),fs=dt(rs),ps=dt(ns),ys=st;(es&&ys(new es(new ArrayBuffer(1)))!=us||gt&&ys(new gt)!=is||ss&&ys(ss.resolve())!=os||rs&&ys(new rs)!=as||ns&&ys(new ns)!=cs)&&(ys=function(t){var e=st(t),s="[object Object]"==e?t.constructor:void 0,r=s?dt(s):"";if(r)switch(r){case ds:return us;case ls:return is;case hs:return os;case fs:return as;case ps:return cs}return e});const ms=ys;var vs=Object.prototype.hasOwnProperty;const xs=function(t){var e=t.length,s=new t.constructor(e);return e&&"string"==typeof t[0]&&vs.call(t,"index")&&(s.index=t.index,s.input=t.input),s};const _s=G.Uint8Array;const gs=function(t){var e=new t.constructor(t.byteLength);return new _s(e).set(new _s(t)),e};const bs=function(t,e){var s=e?gs(t.buffer):t.buffer;return new t.constructor(s,t.byteOffset,t.byteLength)};var ws=/\w*$/;const Os=function(t){var e=new t.constructor(t.source,ws.exec(t));return e.lastIndex=t.lastIndex,e};var Ss=$?$.prototype:void 0,Es=Ss?Ss.valueOf:void 0;const Ts=function(t){return Es?Object(Es.call(t)):{}};const ks=function(t,e){var s=e?gs(t.buffer):t.buffer;return new t.constructor(s,t.byteOffset,t.length)};const Cs=function(t,e,s){var r=t.constructor;switch(e){case"[object ArrayBuffer]":return gs(t);case"[object Boolean]":case"[object Date]":return new r(+t);case"[object DataView]":return bs(t,s);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 ks(t,s);case"[object Map]":case"[object Set]":return new r;case"[object Number]":case"[object String]":return new r(t);case"[object RegExp]":return Os(t);case"[object Symbol]":return Ts(t)}};var Is=Object.create;const As=function(){function t(){}return function(e){if(!rt(e))return{};if(Is)return Is(e);t.prototype=e;var s=new t;return t.prototype=void 0,s}}();const Rs=function(t){return"function"!=typeof t.constructor||Oe(t)?{}:As(He(t))};const Ns=function(t){return Kt(t)&&"[object Map]"==ms(t)};var js=ve&&ve.isMap;const Ps=js?fe(js):Ns;const Ds=function(t){return Kt(t)&&"[object Set]"==ms(t)};var Ms=ve&&ve.isSet;const Bs=Ms?fe(Ms):Ds;var Js="[object Arguments]",Vs="[object Function]",Us="[object Object]",Fs={};Fs[Js]=Fs["[object Array]"]=Fs["[object ArrayBuffer]"]=Fs["[object DataView]"]=Fs["[object Boolean]"]=Fs["[object Date]"]=Fs["[object Float32Array]"]=Fs["[object Float64Array]"]=Fs["[object Int8Array]"]=Fs["[object Int16Array]"]=Fs["[object Int32Array]"]=Fs["[object Map]"]=Fs["[object Number]"]=Fs["[object Object]"]=Fs["[object RegExp]"]=Fs["[object Set]"]=Fs["[object String]"]=Fs["[object Symbol]"]=Fs["[object Uint8Array]"]=Fs["[object Uint8ClampedArray]"]=Fs["[object Uint16Array]"]=Fs["[object Uint32Array]"]=!0,Fs["[object Error]"]=Fs[Vs]=Fs["[object WeakMap]"]=!1;const qs=function t(e,s,r,n,i,o){var a,c=1&s,u=2&s,d=4&s;if(r&&(a=i?r(e,n,i,o):r(e)),void 0!==a)return a;if(!rt(e))return e;var l=se(e);if(l){if(a=xs(e),!c)return Fe(e,a)}else{var h=ms(e),f=h==Vs||"[object GeneratorFunction]"==h;if(ae(e))return Ue(e,c);if(h==Us||h==Js||f&&!i){if(a=u||f?{}:Rs(e),!c)return u?Ze(e,De(a,e)):$e(e,Ae(a,e))}else{if(!Fs[h])return i?e:{};a=Cs(e,h,c)}}o||(o=new qt);var p=o.get(e);if(p)return p;o.set(e,a),Bs(e)?e.forEach((function(n){a.add(t(n,s,r,n,e,o))})):Ps(e)&&e.forEach((function(n,i){a.set(i,t(n,s,r,i,e,o))}));var y=l?void 0:(d?u?ts:Qe:u?Pe:Ie)(e);return Lt(y||e,(function(n,i){y&&(n=e[i=n]),$t(a,i,t(n,s,r,i,e,o))})),a};const Ls=function(t){return qs(t,5)},Ys=["lookupType","fromJSON","decode","toObject","compress","registerDescriptor","nested","_protobufRoot","decompress","finish","_protobuf","_description","encode","create"];var zs,Gs;zs=Ys,Gs=383,function(t){for(;--t;)zs.push(zs.shift())}(++Gs);const $s=function(t,e){return Ys[t-=0]};class Ws{constructor(){this[$s("0x6")]={nested:{}}}[$s("0x0")](t,e){this[$s("0x6")][$s("0x1")][t]=Ls(e)}build(){this[$s("0x2")]=I().Root[$s("0xa")](this[$s("0x6")])}getDescriptor(t){if(!this[$s("0x2")])throw new e.CKEditorError("protobuffactory-cannot-get-descriptor-before-build",this);return new Hs(this._protobufRoot[$s("0x9")](t))}}class Hs{constructor(t){this[$s("0x5")]=t}[$s("0xd")](t){const e=this[$s("0x5")].verify(t);if(e)throw Error(e);return this._protobuf[$s("0x7")](this._protobuf[$s("0x8")](t))[$s("0x4")]()}[$s("0x3")](t){return this[$s("0x5")][$s("0xc")](this[$s("0x5")][$s("0xb")](t),{oneofs:!0})}}var Ks,Zs,Xs=["string","uint32","repeated","Position","bool"];Ks=Xs,Zs=328,function(t){for(;--t;)Ks.push(Ks.shift())}(++Zs);var Qs=function(t,e){return Xs[t-=0]};const tr={Position:{fields:{root:{type:Qs("0x2"),id:1},rootMain:{type:"bool",id:2},rootGraveyard:{type:"bool",id:3},path:{rule:Qs("0x4"),type:Qs("0x3"),id:4},stickiness:{type:Qs("0x2"),id:5}}},Range:{fields:{start:{type:Qs("0x0"),id:1},end:{type:Qs("0x0"),id:2}}},Element:{fields:{name:{type:Qs("0x2"),id:1},children:{rule:Qs("0x4"),type:"Element",id:2},data:{type:Qs("0x2"),id:3},attributesBoolean:{keyType:"string",type:Qs("0x1"),id:4},attributesJson:{type:"string",id:5}}}};const er=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this};const sr=function(t){return this.__data__.has(t)};function rr(t){var e=-1,s=null==t?0:t.length;for(this.__data__=new Vt;++e<s;)this.add(t[e])}rr.prototype.add=rr.prototype.push=er,rr.prototype.has=sr;const nr=rr;const ir=function(t,e){for(var s=-1,r=null==t?0:t.length;++s<r;)if(e(t[s],s,t))return!0;return!1};const or=function(t,e){return t.has(e)};const ar=function(t,e,s,r,n,i){var o=1&s,a=t.length,c=e.length;if(a!=c&&!(o&&c>a))return!1;var u=i.get(t),d=i.get(e);if(u&&d)return u==e&&d==t;var l=-1,h=!0,f=2&s?new nr:void 0;for(i.set(t,e),i.set(e,t);++l<a;){var p=t[l],y=e[l];if(r)var m=o?r(y,p,l,e,t,i):r(p,y,l,t,e,i);if(void 0!==m){if(m)continue;h=!1;break}if(f){if(!ir(e,(function(t,e){if(!or(f,e)&&(p===t||n(p,t,s,r,i)))return f.push(e)}))){h=!1;break}}else if(p!==y&&!n(p,y,s,r,i)){h=!1;break}}return i.delete(t),i.delete(e),h};const cr=function(t){var e=-1,s=Array(t.size);return t.forEach((function(t,r){s[++e]=[r,t]})),s};const ur=function(t){var e=-1,s=Array(t.size);return t.forEach((function(t){s[++e]=t})),s};var dr=$?$.prototype:void 0,lr=dr?dr.valueOf:void 0;const hr=function(t,e,s,r,n,i,o){switch(s){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!i(new _s(t),new _s(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return R(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var a=cr;case"[object Set]":var c=1&r;if(a||(a=ur),t.size!=e.size&&!c)return!1;var u=o.get(t);if(u)return u==e;r|=2,o.set(t,e);var d=ar(a(t),a(e),r,n,i,o);return o.delete(t),d;case"[object Symbol]":if(lr)return lr.call(t)==lr.call(e)}return!1};var fr=Object.prototype.hasOwnProperty;const pr=function(t,e,s,r,n,i){var o=1&s,a=Qe(t),c=a.length;if(c!=Qe(e).length&&!o)return!1;for(var u=c;u--;){var d=a[u];if(!(o?d in e:fr.call(e,d)))return!1}var l=i.get(t),h=i.get(e);if(l&&h)return l==e&&h==t;var f=!0;i.set(t,e),i.set(e,t);for(var p=o;++u<c;){var y=t[d=a[u]],m=e[d];if(r)var v=o?r(m,y,d,e,t,i):r(y,m,d,t,e,i);if(!(void 0===v?y===m||n(y,m,s,r,i):v)){f=!1;break}p||(p="constructor"==d)}if(f&&!p){var x=t.constructor,_=e.constructor;x==_||!("constructor"in t)||!("constructor"in e)||"function"==typeof x&&x instanceof x&&"function"==typeof _&&_ instanceof _||(f=!1)}return i.delete(t),i.delete(e),f};var yr="[object Arguments]",mr="[object Array]",vr="[object Object]",xr=Object.prototype.hasOwnProperty;const _r=function(t,e,s,r,n,i){var o=se(t),a=se(e),c=o?mr:ms(t),u=a?mr:ms(e),d=(c=c==yr?vr:c)==vr,l=(u=u==yr?vr:u)==vr,h=c==u;if(h&&ae(t)){if(!ae(e))return!1;o=!0,d=!1}if(h&&!d)return i||(i=new qt),o||_e(t)?ar(t,e,s,r,n,i):hr(t,e,c,s,r,n,i);if(!(1&s)){var f=d&&xr.call(t,"__wrapped__"),p=l&&xr.call(e,"__wrapped__");if(f||p){var y=f?t.value():t,m=p?e.value():e;return i||(i=new qt),n(y,m,s,r,i)}}return!!h&&(i||(i=new qt),pr(t,e,s,r,n,i))};const gr=function t(e,s,r,n,i){return e===s||(null==e||null==s||!Kt(e)&&!Kt(s)?e!=e&&s!=s:_r(e,s,r,n,t,i))};const br=function(t,e){return gr(t,e)},wr=["main","$graveyard","rootGraveyard","rootMain","nodes","root","path"];var Or,Sr;Or=wr,Sr=498,function(t){for(;--t;)Or.push(Or.shift())}(++Sr);const Er=function(t,e){return wr[t-=0]};function Tr(t,e){const s=Ls(t);return s.path[s[Er("0x5")].length-1]+=e,s}function kr(t,e){return t[Er("0x4")]===e[Er("0x4")]&&br(t[Er("0x5")],e[Er("0x5")])}function Cr(t){Ar(t,(t=>("main"==t[Er("0x4")]?(t[Er("0x2")]=!0,delete t.root):Er("0x0")==t[Er("0x4")]&&(t[Er("0x1")]=!0,delete t[Er("0x4")]),t)))}function Ir(t){Ar(t,(t=>(t[Er("0x2")]?(t[Er("0x4")]=Er("0x6"),delete t.rootMain):t[Er("0x1")]&&(t[Er("0x4")]=Er("0x0"),delete t[Er("0x1")]),t)))}function Ar(t,e){for(const s in t){const r=t[s];Er("0x3")!==s&&rt(r)&&(r[Er("0x5")]&&(r[Er("0x4")]||r[Er("0x2")]||r[Er("0x1")])?t[s]=e(r):Ar(r,e))}return t}const Rr=["__className","push","buffers","shift","compress","_protobufDescriptor","types","decompress","operationName"];var Nr,jr;Nr=Rr,jr=295,function(t){for(;--t;)Nr.push(Nr.shift())}(++jr);const Pr=function(t,e){return Rr[t-=0]};class Dr{constructor(t,e,s){this.id=t,this[Pr("0x1")]=e,this[Pr("0x7")]=s}[Pr("0x6")](t,e){const s=e.shift();Cr(s),t[Pr("0x4")].push(this[Pr("0x7")].compress(s)),t[Pr("0x8")][Pr("0x3")](this.id)}[Pr("0x0")](t,e){e.types.shift();const s=this[Pr("0x7")][Pr("0x0")](e[Pr("0x4")][Pr("0x5")]());Ir(s),s[Pr("0x2")]=this[Pr("0x1")],t.push(s)}}const Mr=["string","Range","shift","decompress","push","newValue","operationName","compress","stringify","boolean","__className","_protobufDescriptor","description","Boolean","bool","oldValue"];var Br,Jr;Br=Mr,Jr=447,function(t){for(;--t;)Br.push(Br.shift())}(++Jr);const Vr=function(t,e){return Mr[t-=0]};class Ur extends Dr{static get[Vr("0xd")](){return{fields:{range:{type:Vr("0x2"),id:1},key:{type:"string",id:2},oldValueBoolean:{type:Vr("0xf"),id:3},oldValueJson:{type:Vr("0x1"),id:4},newValueBoolean:{type:"bool",id:5},newValueJson:{type:Vr("0x1"),id:6},wasUndone:{type:"bool",id:7}}}}[Vr("0x8")](t,e){const s=e[Vr("0x3")]();Fr(Vr("0x0"),s),Fr(Vr("0x6"),s),Cr(s),t.buffers[Vr("0x5")](this[Vr("0xc")][Vr("0x8")](s)),t.types[Vr("0x5")](this.id)}decompress(t,e){const{types:s,buffers:r}=e,n=this[Vr("0xc")][Vr("0x4")](r[Vr("0x3")]());s.shift(),qr(Vr("0x0"),n),qr("newValue",n),Ir(n),n[Vr("0xb")]=this[Vr("0x7")],t[Vr("0x5")](n)}}function Fr(t,e){const s=e[t];Vr("0xa")==typeof s?e[t+"Boolean"]=s:e[t+"Json"]=JSON[Vr("0x9")](s)}function qr(t,e){const s=t+"Json";e[s]?(e[t]=JSON.parse(e[s]),delete e[s]):(e[t]=e[t+Vr("0xe")],delete e[t+Vr("0xe")])}const Lr=["every","keys","__className","stringify","shift","_protobufDescriptor","children","bool","parse","buffers","push","attributesJson","repeated","Position","decompress","description","Element","attributes","compress","operationName","attributesBoolean","nodes"];var Yr,zr;Yr=Lr,zr=415,function(t){for(;--t;)Yr.push(Yr.shift())}(++zr);const Gr=function(t,e){return Lr[t-=0]};class $r extends Dr{static get[Gr("0x12")](){return{fields:{position:{type:Gr("0x10"),id:1},nodes:{rule:Gr("0xf"),type:Gr("0x13"),id:2},shouldReceiveAttributes:{type:Gr("0xa"),id:3},wasUndone:{type:Gr("0xa"),id:4}}}}[Gr("0x15")](t,e){const s=e[Gr("0x7")]();Wr(s[Gr("0x2")]),Cr(s),t[Gr("0xc")][Gr("0xd")](this[Gr("0x8")][Gr("0x15")](s)),t.types.push(this.id)}[Gr("0x11")](t,e){const{types:s,buffers:r}=e,n=this[Gr("0x8")][Gr("0x11")](r.shift());s.shift(),n.nodes||(n[Gr("0x2")]=[]),Hr(n[Gr("0x2")]),Ir(n),n[Gr("0x5")]=this[Gr("0x0")],t[Gr("0xd")](n)}}function Wr(t){for(const e of t){if(e[Gr("0x14")]){const t=e[Gr("0x14")];Kr(t)?e.attributesBoolean=t:e.attributesJson=JSON[Gr("0x6")](t)}e[Gr("0x9")]&&Wr(e.children)}}function Hr(t){for(const e of t)(e[Gr("0x1")]||e[Gr("0xe")])&&(e.attributesBoolean?(e.attributes=e[Gr("0x1")],delete e[Gr("0x1")]):(e[Gr("0x14")]=JSON[Gr("0xb")](e[Gr("0xe")]),delete e[Gr("0xe")])),e[Gr("0x9")]&&Hr(e[Gr("0x9")])}function Kr(t){return Object[Gr("0x4")](t)[Gr("0x3")]((e=>"boolean"==typeof t[e]))}const Zr=["string","oldRange","Range","bool","newRange","length","description","decompress"];var Xr,Qr;Xr=Zr,Qr=327,function(t){for(;--t;)Xr.push(Xr.shift())}(++Qr);const tn=function(t,e){return Zr[t-=0]};class en extends Dr{static get[tn("0x7")](){return{fields:{name:{type:tn("0x1"),id:1},oldRange:{type:tn("0x3"),id:2},newRange:{type:"Range",id:3},affectsData:{type:tn("0x4"),id:4},wasUndone:{type:tn("0x4"),id:5}}}}[tn("0x0")](t,e){super[tn("0x0")](t,e);const s=t[t[tn("0x6")]-1];s[tn("0x2")]||(s[tn("0x2")]=null),s.newRange||(s[tn("0x5")]=null)}}var sn,rn,nn=["uint32","bool","Position"];sn=nn,rn=335,function(t){for(;--t;)sn.push(sn.shift())}(++rn);var on=function(t,e){return nn[t-=0]};class an extends Dr{static get description(){return{fields:{sourcePosition:{type:on("0x0"),id:1},targetPosition:{type:on("0x0"),id:2},graveyardPosition:{type:on("0x0"),id:3},howMany:{type:on("0x1"),id:4},wasUndone:{type:on("0x2"),id:5}}}}}var cn,un,dn=["Position","uint32","bool"];cn=dn,un=260,function(t){for(;--t;)cn.push(cn.shift())}(++un);var ln=function(t,e){return dn[t-=0]};class hn extends Dr{static get description(){return{fields:{sourcePosition:{type:ln("0x1"),id:1},howMany:{type:ln("0x2"),id:2},targetPosition:{type:"Position",id:3},wasUndone:{type:ln("0x0"),id:4}}}}}var fn,pn,yn=["description","bool","string"];fn=yn,pn=451,function(t){for(;--t;)fn.push(fn.shift())}(++pn);var mn=function(t,e){return yn[t-=0]};class vn extends Dr{static get[mn("0x2")](){return{fields:{position:{type:"Position",id:1},oldName:{type:mn("0x1"),id:2},newName:{type:"string",id:3},wasUndone:{type:mn("0x0"),id:4}}}}}const xn=["description","fields","root"];var _n,gn;_n=xn,gn=433,function(t){for(;--t;)_n.push(_n.shift())}(++gn);const bn=function(t,e){return xn[t-=0]};class wn extends Ur{static get[bn("0x2")](){const t=Ur[bn("0x2")];return delete t[bn("0x0")].range,t[bn("0x0")][bn("0x1")]={type:"string",id:1},t}}var On,Sn,En=["Position","uint32","description"];On=En,Sn=174,function(t){for(;--t;)On.push(On.shift())}(++Sn);var Tn=function(t,e){return En[t-=0]};class kn extends Dr{static get[Tn("0x2")](){return{fields:{splitPosition:{type:"Position",id:1},graveyardPosition:{type:Tn("0x0"),id:2},howMany:{type:Tn("0x1"),id:3},insertionPosition:{type:"Position",id:4},wasUndone:{type:"bool",id:5}}}}}var Cn,In,An=["types","decompress","push","shift"];Cn=An,In=252,function(t){for(;--t;)Cn.push(Cn.shift())}(++In);var Rn=function(t,e){return An[t-=0]};class Nn extends Dr{compress(t,e){e[Rn("0x3")](),t.types.push(this.id)}[Rn("0x1")](t,e){e[Rn("0x0")][Rn("0x3")](),t[Rn("0x2")]({__className:this.operationName})}}const jn=["compress","startsWith","decompress","name","MarkerOperation","length","__className","_omittedNamespace"];var Pn,Dn;Pn=jn,Dn=250,function(t){for(;--t;)Pn.push(Pn.shift())}(++Dn);const Mn=function(t,e){return jn[t-=0]};class Bn extends en{constructor(t,e,s,r){super(t,e,s),this._omittedNamespace=r+":"}[Mn("0x6")](t,e){return!(Mn("0x2")!=e[0][Mn("0x4")]||!e[0].name[Mn("0x7")](this._omittedNamespace)||(e[0][Mn("0x1")]=e[0].name.replace(new RegExp("^"+this._omittedNamespace),""),super[Mn("0x6")](t,e),0))}decompress(t,e){super[Mn("0x0")](t,e);const s=t[t[Mn("0x3")]-1];s[Mn("0x1")]=this[Mn("0x5")]+s[Mn("0x1")]}}const Jn=["_splitCurrent","shift","compress","length","buffers","push","_compressSingleOperation","_decompressSingleOperation","types","_combineNext"];var Vn,Un;Vn=Jn,Un=232,function(t){for(;--t;)Vn.push(Vn.shift())}(++Un);const Fn=function(t,e){return Jn[t-=0]};class qn{constructor(t,e){this.id=t,this._context=e}[Fn("0x0")](t,e){let s;for(;e[Fn("0x1")]>1&&this._compareOperations(e[0],e[1]);)s?(s=this[Fn("0x7")](e[Fn("0x9")](),s),t[Fn("0x6")][Fn("0x3")](0)):(s=Ls(e[Fn("0x9")]()),t[Fn("0x6")][Fn("0x3")](this.id));return!!s&&(s=this[Fn("0x7")](e[Fn("0x9")](),s),t[Fn("0x6")][Fn("0x3")](0),t[Fn("0x2")][Fn("0x3")](this[Fn("0x4")](s)),!0)}decompress(t,e){const s=this[Fn("0x5")](e);for(;0==e[Fn("0x6")][0];)e[Fn("0x6")].shift(),t[Fn("0x3")](this[Fn("0x8")](s));t[Fn("0x3")](s)}}const Ln=["InsertOperation","length","decompress","_compareOperations","value","_getCompressorByName","_decompressSingleOperation","substr","every","data","__className","wasUndone","buffers","position","next","_context","attributes","nodes","keys","iterator","_combineNext"];var Yn,zn;Yn=Ln,zn=468,function(t){for(;--t;)Yn.push(Yn.shift())}(++zn);const Gn=function(t,e){return Ln[t-=0]};class $n extends qn{[Gn("0xe")](t,e){return e[Gn("0xb")][0][Gn("0x3")]+=t[Gn("0xb")][0][Gn("0x3")],e}_splitCurrent(t){const e=Ls(t),s=e[Gn("0xb")][0],r=t.nodes[0],n=r[Gn("0x3")][Symbol[Gn("0xd")]]()[Gn("0x8")]()[Gn("0x13")],i=n.length;return s[Gn("0x3")]=n,r[Gn("0x3")]=r[Gn("0x3")][Gn("0x1")](i),t[Gn("0x7")]=Tr(t[Gn("0x7")],i),e}[Gn("0x12")](t,e){if(Wn(t)&&Wn(e)){const s=t.nodes[0][Gn("0x3")][Gn("0x10")],r=kr(Tr(t[Gn("0x7")],s),e[Gn("0x7")]),n=t.nodes[0],i=e.nodes[0];return r&&function(t,e){const s=Object[Gn("0xc")](t[Gn("0xa")]||{}),r=Object.keys(e[Gn("0xa")]||{});return s[Gn("0x10")]===r[Gn("0x10")]&&s[Gn("0x2")]((s=>e[Gn("0xa")][s]&&e[Gn("0xa")][s]===t[Gn("0xa")][s]))}(n,i)}return!1}_compressSingleOperation(t){const e={types:[],buffers:[],baseVersion:0};return this[Gn("0x9")][Gn("0x14")](Gn("0xf")).compress(e,[t]),e[Gn("0x6")][0]}[Gn("0x0")](t){const e=[];return this[Gn("0x9")][Gn("0x14")](Gn("0xf"))[Gn("0x11")](e,t),e[0]}}function Wn(t){return"InsertOperation"==t[Gn("0x4")]&&1==t.nodes[Gn("0x10")]&&t[Gn("0xb")][0][Gn("0x3")]&&!t[Gn("0x5")]&&1==Array.from(t[Gn("0xb")][0][Gn("0x3")])[Gn("0x10")]}const Hn=["root","_compareOperations","_compressSingleOperation","__className","_decompressSingleOperation","targetPosition","decompress","sourcePosition","howMany","MoveOperation","_splitCurrent","_getCompressorByName","_context"];var Kn,Zn;Kn=Hn,Zn=256,function(t){for(;--t;)Kn.push(Kn.shift())}(++Zn);const Xn=function(t,e){return Hn[t-=0]};class Qn extends qn{_combineNext(t,e){return e[Xn("0xc")]++,e.sourcePosition=Ls(t[Xn("0xb")]),e}[Xn("0x1")](t){const e=Ls(t);return t[Xn("0xc")]--,e[Xn("0xc")]=1,e[Xn("0xb")]=Tr(e.sourcePosition,t[Xn("0xc")]),e}[Xn("0x5")](t,e){return!(!ti(t)||!ti(e))&&kr(Tr(t[Xn("0xb")],-1),e[Xn("0xb")])&&kr(t.targetPosition,e[Xn("0x9")])}[Xn("0x6")](t){const e={types:[],buffers:[],baseVersion:0};return this[Xn("0x3")][Xn("0x2")](Xn("0x0")).compress(e,[t]),e.buffers[0]}[Xn("0x8")](t){const e=[];return this._context[Xn("0x2")](Xn("0x0"))[Xn("0xa")](e,t),e[0]}}function ti(t){return Xn("0x0")==t[Xn("0x7")]&&"$graveyard"==t[Xn("0x9")][Xn("0x4")]&&1==t[Xn("0xc")]&&!t.wasUndone}const ei=["__className","MoveOperation","root","targetPosition","decompress","_combineNext","sourcePosition","_context","buffers","_decompressSingleOperation","wasUndone","_compareOperations","$graveyard","howMany","_getCompressorByName","compress","_splitCurrent"];var si,ri;si=ei,ri=299,function(t){for(;--t;)si.push(si.shift())}(++ri);const ni=function(t,e){return ei[t-=0]};class ii extends qn{[ni("0xc")](t,e){return e[ni("0x3")]++,e}[ni("0x6")](t){const e=Ls(t);return e[ni("0x3")]=1,t[ni("0x3")]--,e}[ni("0x1")](t,e){return!(!oi(t)||!oi(e))&&kr(t[ni("0xd")],e.sourcePosition)&&kr(t[ni("0xa")],e.targetPosition)}_compressSingleOperation(t){const e={types:[],buffers:[],baseVersion:0};return this._context[ni("0x4")]("MoveOperation")[ni("0x5")](e,[t]),e[ni("0xf")][0]}[ni("0x10")](t){const e=[];return this[ni("0xe")][ni("0x4")](ni("0x8"))[ni("0xb")](e,t),e[0]}}function oi(t){return ni("0x8")==t[ni("0x7")]&&ni("0x2")==t[ni("0xa")][ni("0x9")]&&1==t[ni("0x3")]&&!t[ni("0x0")]}const ai=["oldRange","decompress","user:","stickiness","split","name","_compressSingleOperation","_decompressSingleOperation","push","_getCompressorByName","compress","end","startsWith","newRange","buffers","_context","types","__className","start","shift","MarkerOperation"];var ci,ui;ci=ai,ui=124,function(t){for(;--t;)ci.push(ci.shift())}(++ui);const di=function(t,e){return ai[t-=0]};class li extends qn{compress(t,e){if(s=e[0],r=e[1],!(s&&r&&di("0x1")==s[di("0x13")]&&di("0x1")==r[di("0x13")]&&s[di("0x7")][di("0xe")](di("0x4"))&&r[di("0x7")][di("0xe")]("user:")&&s[di("0x7")]!=r[di("0x7")]))return!1;var s,r;const n=e[di("0x0")]();return n[di("0x2")]=null,n[di("0xf")]&&kr(n.newRange[di("0x14")],n[di("0xf")][di("0xd")])&&(n[di("0xf")][di("0xd")]=null),e[di("0x0")](),t[di("0x12")][di("0xa")](this.id),t[di("0x12")][di("0xa")](0),t[di("0x10")][di("0xa")](this[di("0x8")](n)),!0}[di("0x3")](t,e){const s=this._decompressSingleOperation(e);s[di("0xf")]&&!s[di("0xf")][di("0xd")]&&(s[di("0xf")][di("0xd")]=Ls(s.newRange[di("0x14")]));const r=Ls(s);r[di("0xf")]&&(r[di("0xf")].start[di("0x5")]="toNone",r.newRange[di("0xd")]=Ls(r[di("0xf")][di("0x14")])),r[di("0x7")]="user:position:"+r.name[di("0x6")](":")[2],e[di("0x12")][di("0x0")](),t[di("0xa")](s),t.push(r)}[di("0x8")](t){const e={types:[],buffers:[],baseVersion:0};return this[di("0x11")]._getCompressorByName(di("0x1"))[di("0xc")](e,[t]),e.buffers[0]}[di("0x9")](t){const e=[];return this[di("0x11")][di("0xb")](di("0x1"))[di("0x3")](e,t),e[0]}}const hi=["_compressorById","_protobufFactory","forEach","_compressorByName","UserSelectionAction","length","_registerCompressor","Range","types","baseVersion","suggestion","ForwardDeletingAction","CommentMarkerOperation","AttributeOperation","_getCompressorByName","compress","no-operations-provided","Position","set","MergeOperation","RenameOperation","_registerActionCompressor","MoveOperation","DeletingAction","SuggestionMarkerOperation","RootAttributeOperation","description","SplitOperation","build","MarkerOperation","registerDescriptor","comment","_registerOperationCompressor","getDescriptor","get","InsertOperation","TypingAction","Element","NoOperation","decompress"];var fi,pi;fi=hi,pi=366,function(t){for(;--t;)fi.push(fi.shift())}(++pi);const yi=function(t,e){return hi[t-=0]};class mi{constructor(){this[yi("0x22")]=new Map,this[yi("0x25")]=new Map,this[yi("0x23")]=new Ws,this[yi("0x23")][yi("0x18")](yi("0xb"),tr[yi("0xb")]),this._protobufFactory[yi("0x18")](yi("0x1"),tr[yi("0x1")]),this._protobufFactory.registerDescriptor(yi("0x1f"),tr.Element),this._protobufFactory[yi("0x18")](yi("0x7"),Ur.description),this[yi("0x23")][yi("0x18")](yi("0x1d"),$r[yi("0x14")]),this[yi("0x23")][yi("0x18")](yi("0x17"),en[yi("0x14")]),this[yi("0x23")].registerDescriptor(yi("0xd"),an[yi("0x14")]),this[yi("0x23")][yi("0x18")]("MoveOperation",hn[yi("0x14")]),this[yi("0x23")][yi("0x18")](yi("0xe"),vn[yi("0x14")]),this[yi("0x23")].registerDescriptor(yi("0x13"),wn[yi("0x14")]),this._protobufFactory[yi("0x18")](yi("0x15"),kn[yi("0x14")]),this[yi("0x23")][yi("0x16")](),this._registerCompressor(1,yi("0x20"),new Nn(1,yi("0x20"))),this._registerOperationCompressor(10,"AttributeOperation",Ur),this[yi("0x1a")](11,"InsertOperation",$r),this[yi("0x1a")](12,yi("0x17"),en),this[yi("0x1a")](13,yi("0xd"),an),this[yi("0x1a")](14,yi("0x10"),hn),this[yi("0x1a")](15,"RenameOperation",vn),this[yi("0x1a")](16,yi("0x13"),wn),this[yi("0x1a")](17,yi("0x15"),kn);const t=this[yi("0x23")][yi("0x1b")](yi("0x17"));this[yi("0x0")](18,"CommentMarkerOperation",new Bn(18,yi("0x17"),t,yi("0x19"))),this[yi("0x0")](19,"SuggestionMarkerOperation",new Bn(19,yi("0x17"),t,yi("0x4"))),this._registerActionCompressor(100,yi("0x1e"),$n),this[yi("0xf")](101,yi("0x11"),Qn),this._registerActionCompressor(102,yi("0x5"),ii),this[yi("0xf")](103,yi("0x26"),li)}[yi("0x1a")](t,e,s){const r=new s(t,e,this[yi("0x23")][yi("0x1b")](e));this[yi("0x0")](t,e,r)}[yi("0xf")](t,e,s){const r=new s(t,this);this[yi("0x0")](t,e,r)}[yi("0x0")](t,e,s){this[yi("0x22")][yi("0xc")](t,s),this[yi("0x25")][yi("0xc")](e,s)}_getCompressorByName(t){return this._compressorByName[yi("0x1c")](t)}[yi("0x9")](t){if(!t||!t[0])throw new e.CKEditorError(yi("0xa"),this);const s={types:[],buffers:[],baseVersion:t[0].baseVersion};for(;t[yi("0x27")];)this[yi("0x8")]("UserSelectionAction").compress(s,t)||this[yi("0x8")](yi("0x1e"))[yi("0x9")](s,t)||this._getCompressorByName("DeletingAction")[yi("0x9")](s,t)||this[yi("0x8")](yi("0x5"))[yi("0x9")](s,t)||this[yi("0x8")](yi("0x6"))[yi("0x9")](s,t)||this[yi("0x8")](yi("0x12")).compress(s,t)||this._getCompressorByName(t[0].__className)[yi("0x9")](s,t);return s}[yi("0x21")](t){const e=[];for(;t.types[yi("0x27")];)this[yi("0x22")][yi("0x1c")](t[yi("0x2")][0])[yi("0x21")](e,t);return e[yi("0x24")](((e,s)=>e[yi("0x3")]=t.baseVersion+s)),e}}var vi=__webpack_require__(7622),xi=__webpack_require__.n(vi),_i=__webpack_require__(7530),gi=__webpack_require__.n(_i);const bi=["_setPendingAction","_handleInitialConnectionData","getConnectedSessions","_clearPendingAction","_saveOperationInBuffer","_initSessionsHandling","locale","_operationToId","_lastServerVersion","connected","change:range","wasUndone","real-time-collaboration","_pendingAction","409","push","lastDocumentSession","editor","sessionId","addUser","_compressOperations","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.","roots","define","startsWith","disconnect","_sendBufferedOperationsDelayed","realtimecollaborationclient-initservice-internal-error","type","keys","suppressErrorInCollaboration","high","_setUpDataInit","realtimecollaborationclient-sendbufferedoperations","serverHistory","_updateServerHistory","RealTimeCollaborationClient","getOperationAuthor","slice","change:_isEditingAllowed","_compressor","getOperations","model","compress","size","_isPendingUpdate","stop","_handleReconnectionError","unregister","has","destroy","_service","_authorId","collaboration-missing-channelid","addToReconnectionStack","initData","rtc-destroyed","_operationIdentifier","_offset","sendOperations","_currentBufferDelay","map","disconnected","error","_handleReceivedOperations","decompress","_isEditingAllowed","realtimecollaborationclient-init-non-existent-root","currentDocumentSession","_ignoredOperations","requires","The document details could not be taken during the reconnection. To not lose your content save it locally and refresh the editor.","connection","_handleExternalOperations","view","reset","userId","_channelId","data","sessionAdd:","document","baseVersion","_initThrowingOnDataSet","editing","_decompressOperations","pluginName","getMany","_assignOperationsMetaData","remove","return","code","init","_hasSynchronizationProblem","listenTo","showWarning","realtimecollaborationclient-init-document-already-initialized","_sendBufferedOperationsDelayId","permissions","wereChangesApplied","apply","404","fromJSON","register","finally","_getOperationsFromInitData","cloudDocumentVersion","message","isUndoneOperation","isDocumentOperation","_knownOperations","_disconnectService","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.","reconnection: flushed session","CollaborativeEditingService","realtimecollaborationclient-editor-setdata-and-editor-data-set-are-forbidden-in-real-time-collaboration","add","createdAt","createUserMarkerOperations","markers","_isConnected","length","realtimecollaborationclient-initservice-incorrect-server-operation","getUser","path","reconnect","isEnabled","setIdForTheLastOperation","metadata","applyOperation","offset","operationsReceived","_handleServerResponse","ready","round","removeFromReconnectionStack","from","realtimecollaborationclient-handleserverresponse","state","getIdOfTheLastOperation","_connectAfterSessionHasBeenFlushed","lastSyncVersion","set","_crash","catch","parse","createPositionAt","history","_shouldSendSelectionUpdate","rtc-offline","_shouldSendUpdate","forEach","_handleSendingSelectionMarkers","off","cloud-services-internal-error: Request timeout.","_connectService","start","end","realtimecollaborationclient-init-session-connection-error","marker","channelSessions","_document","toJSON","CommentsOnly","_hasSelectionChanged","_applyOperationsSet","_isDisconnection","_sendBufferedOperations","plugins","_bufferedOperations","_baseBufferDelay","setPermissions","enqueueChange","bind","isReadOnly","selection","filter","Synchronization issue","The document cannot be connected back to the server. To not lose your content save it locally and refresh the editor.","fire","version","get","change:hasDomSelection","createRange","_isInit","realtimecollaborationclient-init-connection-failed","_lastSyncedOperationId","addOperation","enableReadOnlyMode","then","_fetchMissingUsers","lastOperationId","collaboration.channelId","_disconnectionOperations","_refreshUserSelectionMarkers","disableReadOnlyMode","batch","sessionCreatedAt","config"];var wi,Oi;wi=bi,Oi=359,function(t){for(;--t;)wi.push(wi.shift())}(++Oi);const Si=function(t,e){return bi[t-=0]};let Ei=1;class Ti extends t.Plugin{static get[Si("0x6b")](){return[l,m,E,t.PendingActions,n.Users,r.Notification]}static get[Si("0x7a")](){return Si("0x49")}get[Si("0x8e")](){return this[Si("0x2d")]+this._offset}get[Si("0x2d")](){return this[Si("0x47")].version-this[Si("0x5f")]}get[Si("0xb1")](){const t=this[Si("0x47")][Si("0x4e")]();for(let e=t[Si("0x9d")]-1;e>=0;e--){const s=t[e];if(!this[Si("0x1f")][Si("0x56")](s))return s[Si("0x76")]+1-this[Si("0x5f")]}return 0}[Si("0x80")](){const t=this[Si("0x36")],r=t.plugins[Si("0x13")](n.Users),i=t[Si("0x6")][Si("0x13")](l);if(this[Si("0x5f")]=0,this[Si("0x37")]=null,this[Si("0x47")]=new s.History,this[Si("0x36")][Si("0x24")][Si("0x3c")]("collaboration",{}),this[Si("0x72")]=t[Si("0x24")][Si("0x13")](Si("0x1e")),!this[Si("0x72")])throw new e.CKEditorError(Si("0x5a"),this);this[Si("0x82")](r,Si("0x4a"),((t,e)=>{const s=e[0];s[Si("0x59")]&&(t[Si("0x7e")]=r[Si("0x9f")](s._authorId),t.stop()),null===s[Si("0x59")]&&(t.return=null,t[Si("0x53")]())}),{priority:Si("0x44")});const o=t[Si("0x24")].get("cloudServices.bundleVersion")||e.version;this._service=new(Ti[Si("0x96")])(o,this._channelId),this[Si("0xc5")]=this[Si("0x36")][Si("0x4f")][Si("0x75")],this[Si("0x4d")]=new mi,this[Si("0x7")]=[],this[Si("0x92")]=new WeakSet,this[Si("0xb2")](Si("0x52"),!1),this[Si("0xb2")](Si("0x81"),!1),this[Si("0x32")]=null,this._hasSelectionChanged=!1,this[Si("0x85")]=null,this._baseBufferDelay=300,this[Si("0x61")]=this[Si("0x8")],this[Si("0x18")]=null,this[Si("0x1f")]=new WeakSet,this._operationIdentifier=new Ii(this[Si("0x1f")]),this[Si("0x82")](t.model[Si("0x75")][Si("0xd")],Si("0x2f"),((t,e)=>{e.directChange&&this[Si("0x20")]()})),this[Si("0x82")](t[Si("0x78")][Si("0x6f")],Si("0x14"),(()=>{this[Si("0x20")]()})),this._initThrowingOnDataSet(),t.model.on("applyOperation",((t,e)=>{const s=e[0];s[Si("0x91")]&&(this[Si("0x29")](s),this._shouldSendUpdate()&&this[Si("0x3f")]())})),this._setUpDataInit(),this[Si("0xb")]("_isEditingAllowed").to(i,Si("0xae"),this,"_hasSynchronizationProblem",((t,e)=>Si("0x2e")===t&&!e)),this.on(Si("0x4c"),(()=>{this[Si("0x67")]?t[Si("0x21")](Si("0xb9")):t[Si("0x1a")](Si("0xb9"))})),this[Si("0x67")]?t[Si("0x21")]("rtc-offline"):t[Si("0x1a")](Si("0xb9")),this.set(Si("0x9c"),!1)}async[Si("0xa1")](){const t=this[Si("0x36")][Si("0x6")][Si("0x13")](m),e=this.editor[Si("0x6")].get(l);try{this[Si("0x52")]=!0,t[Si("0x55")](this[Si("0x72")]);const s=await this[Si("0x58")].reconnect(e[Si("0x6d")],this.lastSyncVersion);await this._handleReconnectionResponse(s)&&(this._isPendingUpdate=!1,this[Si("0x28")]());const r=await this[Si("0x58")].getConnectedSessions();t.register(this[Si("0x72")],r),this[Si("0xbc")](),this[Si("0x9c")]=!0}catch(t){if(r=t,Si("0x89")===r[Si("0x7f")]&&this[Si("0x37")])await this[Si("0xb0")]();else if(s=t,Si("0x33")===s[Si("0x7f")]){const t=k(this[Si("0x36")].locale,Si("0x10"));this[Si("0x54")](t)}else{if(!(t instanceof ki))throw t;this._handleReconnectionError()}}var s,r}[Si("0x57")](){const t=this.editor[Si("0x6")].get(l),e=this[Si("0x36")].plugins[Si("0x13")](m);this[Si("0x36")][Si("0x1a")](Si("0x5d")),e[Si("0xc4")][Si("0x56")](this[Si("0x72")])&&e.unregister(this[Si("0x72")]),t[Si("0xab")](this),this[Si("0x93")](),super[Si("0x57")]()}async _handleReconnectionResponse(t){if(this[Si("0x37")]!==t[Si("0x37")]&&this._lastSyncedOperationId!==t[Si("0x1d")])throw new ki;return this[Si("0x37")]=t[Si("0x37")],this[Si("0xa8")]([],{...t,wereChangesApplied:!1,data:t[Si("0x73")]},Si("0xa1"))}async[Si("0xbf")](t,e=!1){const{connection:s}=this.editor.plugins.get(l);Ti[Si("0x96")][Si("0x27")](s,this[Si("0x72")])[Si("0x1b")]((t=>this[Si("0x2a")](t))).catch((t=>{this[Si("0xb3")](Si("0xc2"),t)})),this[Si("0x82")](this[Si("0x58")],Si("0xa7"),this._handleReceivedOperations[Si("0xb")](this)),this.listenTo(this[Si("0x58")],Si("0x64"),((t,e)=>{this[Si("0xb3")](Si("0x40"),e)})),this.listenTo(this._service,Si("0x63"),(()=>{this[Si("0x9c")]=!1}));const r=this._operationIdentifier.getIdOfTheLastOperation(t),n=await this[Si("0x58")].connect(s,this[Si("0x39")](t),r);if(this[Si("0x37")]=n[Si("0x37")],n[Si("0x87")]&&(this._isPendingUpdate=!1,this._clearPendingAction()),e){if(!n[Si("0x87")])return void this._handleReconnectionError();this[Si("0x47")][Si("0x70")](),this._offset=n[Si("0xa6")],this.serverHistory[Si("0x12")]=this[Si("0x5f")],await this[Si("0xa8")](t,n,Si("0x95"))}else await this[Si("0x26")](n,t);this[Si("0xbc")](),this._isConnected=!0}[Si("0xbc")](){const t=this.editor[Si("0x6")][Si("0x13")](m),e=t[Si("0xc4")][Si("0x13")](this[Si("0x72")]);e&&e[Si("0x9d")]>1?(this._hasSelectionChanged=!0,this[Si("0x3f")]()):this[Si("0x82")](t,Si("0x74")+this[Si("0x72")],(e=>{t[Si("0xc4")][Si("0x13")](this[Si("0x72")])[Si("0x9d")]>1&&(this[Si("0x2")]=!0,this[Si("0x3f")](),e[Si("0xbd")]())}))}async[Si("0x65")](t,e,s,r){if(!this._isPendingUpdate&&this[Si("0xc5")][Si("0x12")]==e){const t=this[Si("0x79")](s,r);await this[Si("0x1c")](t),this[Si("0x6e")](t,e,s[Si("0x1d")])||this[Si("0xb3")](Si("0x9e"))}}async[Si("0xb0")](){this[Si("0x93")]();const{locale:t}=this[Si("0x36")];let e;try{e=await this[Si("0x58")].getDocumentDetails()}catch(e){const s=k(t,Si("0x6c"));return void this[Si("0x54")](s)}const s=e[Si("0x69")]||e[Si("0x35")];if(this[Si("0x18")]===s[Si("0x1d")])await this._connectService(this[Si("0x36")][Si("0x4f")].document[Si("0xb7")][Si("0x4e")](),!0);else{const e=k(t,Si("0x94"));this[Si("0x54")](e)}}_disconnectService(){this[Si("0x58")][Si("0x3e")](),this._bufferedOperations=[],clearTimeout(this._sendBufferedOperationsDelay),this.stopListening(this._service)}[Si("0x2a")](t){const e=this[Si("0x36")].plugins[Si("0x13")](m);this[Si("0x82")](e,Si("0x74")+this[Si("0x72")],((t,{session:s})=>{if(s.id===e.mySessionId){t.off();const e=this.editor[Si("0x6")][Si("0x56")](Si("0x1"))&&this[Si("0x36")][Si("0x6")][Si("0x13")](Si("0x1"));let r=s[Si("0x86")];e&&e[Si("0xa2")]&&(r=r.filter((t=>"document:write"!==t))),this[Si("0x36")][Si("0x6")].get("Permissions")[Si("0x9")](r,this[Si("0x72")])}})),e[Si("0x8b")](this[Si("0x72")],t)}[Si("0x77")](){const t=this.editor.data[Si("0xb2")];this[Si("0x36")][Si("0x73")][Si("0xb2")]=(...s)=>{if(!s[s[Si("0x9d")]-1][Si("0x43")])throw new e.CKEditorError(Si("0x97"),this);t[Si("0x88")](this.editor.data,s)}}[Si("0x45")](){this[Si("0x36")][Si("0x73")].on("init",((t,[s])=>{if(this[Si("0xc5")][Si("0x12")])throw new e.CKEditorError(Si("0x84"),this);t[Si("0x53")](),this[Si("0x25")]();const r=this[Si("0x8d")](s);t[Si("0x7e")]=this._connectService(r)[Si("0x1b")]((()=>{this[Si("0x36")][Si("0x6")][Si("0x13")](l)[Si("0x5b")](this),this[Si("0x36")][Si("0x73")][Si("0x11")](Si("0xa9"))}))[Si("0xb4")]((t=>this[Si("0xb3")](Si("0x17"),t)))[Si("0x8c")]((()=>this._clearPendingAction()))}),{priority:Si("0x44")})}async[Si("0x1c")](t){const e=this.editor.plugins[Si("0x13")](n.Users),{connection:s}=this[Si("0x36")].plugins[Si("0x13")](l),r=new Set;for(const s of t){const t=s[Si("0x59")];t&&!e[Si("0x9f")](t)&&r[Si("0x98")](t)}if(0===r[Si("0x51")])return;const i=await gi()[Si("0x7b")](s,Array[Si("0xac")](r));for(const t of i)e[Si("0x9f")](t.id)||e[Si("0x38")](t)}[Si("0x8d")](t){const r=this[Si("0x36")][Si("0x4f")],n=[];let i=0;const o="string"==typeof t?{main:t}:t;for(const t of Object[Si("0x42")](o)){if(!this._document[Si("0x3b")].has(t))throw new e.CKEditorError(Si("0x68"),this);const a=this[Si("0x36")].data[Si("0xb5")](o[t]),c=this[Si("0xc5")].getRoot(t),u=new s.InsertOperation(r[Si("0xb6")](c,0),a,i++);n[Si("0x34")](u);for(const[t,e]of a[Si("0x9b")]){const o=r[Si("0x15")](r.createPositionFromPath(c,e[Si("0xc0")].path.slice()),r.createPositionFromPath(c,e[Si("0xc1")][Si("0xa0")].slice())),a=new s.MarkerOperation(t,null,o,r[Si("0x9b")],!0,i++);n.push(a)}}return n}async[Si("0x26")](t,e){let s;this[Si("0x5f")]=t[Si("0xa6")];const r=t.wereChangesApplied&&!t.initData,n=r?0:t[Si("0x73")][Si("0x76")];if(r)s=e,s.forEach((e=>{e[Si("0x99")]=t[Si("0x23")],e._isInit=!0,e._authorId=null})),this._applyOperationsSet(s,r);else{if(t[Si("0x5c")]){const e=this[Si("0x8d")](t.initData);this._document[Si("0xb7")].version=-e[Si("0x9d")],e[Si("0xbb")]((s=>{s[Si("0x76")]-=e[Si("0x9d")],s[Si("0x99")]=t[Si("0x23")],s[Si("0x16")]=!0,s[Si("0x59")]=null})),this._applyOperationsSet(e,!0),this[Si("0x47")][Si("0x12")]=-e[Si("0x9d")]+this._offset,this[Si("0x48")](e)}this[Si("0xc5")][Si("0xb7")][Si("0x12")]=n,s=this[Si("0x79")](t.data,t[Si("0xa4")]),await this[Si("0x1c")](s),this[Si("0x3")](s,r)}t.lastOperationId&&(this[Si("0x5e")][Si("0xa3")](s,t[Si("0x1d")]),this[Si("0x18")]=t.lastOperationId),this[Si("0x47")][Si("0x12")]=n+this[Si("0x5f")],this[Si("0x48")](s)}[Si("0xb3")](t,s){throw this[Si("0x52")]=!0,s&&console[Si("0x64")](s),new e.CKEditorError(t,this.editor)}_saveOperationInBuffer(t){this[Si("0x92")][Si("0x56")](t)||(this[Si("0x92")].add(t),this[Si("0x7")][Si("0x34")](t),this[Si("0x32")]||Si("0xc3")==t.type&&!t.affectsData||this._setPendingAction())}[Si("0x3f")](t=!1){!t&&this[Si("0x52")]||(this[Si("0x52")]=!0,clearTimeout(this._sendBufferedOperationsDelayId),this[Si("0x85")]=setTimeout((()=>{this._sendBufferedOperations().then((t=>{t&&(this[Si("0x28")](),this[Si("0x52")]=!1)}))[Si("0xb4")]((t=>{if(this[Si("0x28")](),this[Si("0x52")]=!1,!((e=t)[Si("0x8f")][Si("0x3d")]("cloud-services-internal-error: Not connected.")||e[Si("0x8f")].startsWith("cloud-services-internal-error: Collaborative Editing Service is not connected.")||e[Si("0x8f")].startsWith(Si("0xbe"))))throw t;var e}))}),this._currentBufferDelay))}async[Si("0x5")](){const t=this[Si("0x36")][Si("0x6")].get(E);if(this[Si("0xb8")]()&&(t[Si("0x9a")](),this[Si("0x2")]=!1),!this._shouldSendUpdate())return!0;const e=[...this[Si("0x7")]];for(const t of e)t[Si("0x30")]=this[Si("0xc5")][Si("0xb7")][Si("0x90")](t);const s=this[Si("0x5e")].getIdOfTheLastOperation(e),r=Ei++,n=this._compressOperations(e),i=await this[Si("0x58")][Si("0x60")](n,n[Si("0x76")],s);try{return await this[Si("0xa8")](e,i,r)}catch(t){return this[Si("0xb3")](Si("0x46"),t)}}async[Si("0xa8")](t,e,s){if(e[Si("0x64")])throw e[Si("0x64")];let r=!1;if(e[Si("0x87")]){e[Si("0x1d")]&&(this._lastSyncedOperationId=e[Si("0x1d")]),this[Si("0x7")]=this[Si("0x7")][Si("0xe")]((e=>!t.includes(e)));for(const s of t)s[Si("0x99")]=e.lastOperationAcceptedAt;this[Si("0x48")](t),r=!0,this._currentBufferDelay=this._baseBufferDelay}else{const t=this[Si("0x79")](e[Si("0x73")],e[Si("0xa4")])[Si("0xe")]((t=>t[Si("0x76")]>=this[Si("0x2d")]));await this[Si("0x1c")](t),r=this[Si("0x6e")](t,e[Si("0x12")],e[Si("0x1d")]),this._currentBufferDelay=Math[Si("0xaa")](this[Si("0x61")]/2)}return r?!this._shouldSendUpdate()||(this[Si("0x3f")](!0),!1):this[Si("0xb3")](Si("0xad"))}_handleExternalOperations(t,e,r){try{const n={document:this[Si("0xc5")],useRelations:!1,padWithNoOps:!0},{operationsA:i,operationsB:o,originalOperations:a}=(0,s.transformSets)(t,this._bufferedOperations,n);Ci(i,this[Si("0xc5")][Si("0x12")]),Ci(o,e);for(const t of i){const e=a[Si("0x13")](t);t[Si("0x59")]=e?e[Si("0x59")]:null}r&&(this[Si("0x5e")][Si("0xa3")](t,r),this[Si("0x18")]=r),this[Si("0x7")]=[...o],this[Si("0x3")](i),this._updateServerHistory(t)}catch(t){return console.error(t),!1}return!0}[Si("0x3")](t,e=!1){this[Si("0x36")][Si("0x4f")][Si("0xa")]({isUndoable:!1,isLocal:!1},(e=>{for(const s of t)this._knownOperations[Si("0x98")](s),e[Si("0x22")][Si("0x19")](s),this[Si("0x36")].model[Si("0xa5")](s)}))}[Si("0x48")](t){t[Si("0xbb")]((t=>{const e=t.clone();e._authorId=t._authorId,e[Si("0x16")]=!!t[Si("0x16")],e[Si("0x99")]=t.createdAt,e[Si("0x76")]+=this[Si("0x5f")],t[Si("0x4")]&&this[Si("0x1f")][Si("0x98")](e),this[Si("0x47")][Si("0x19")](e)}))}[Si("0x54")](t){const e=this[Si("0x36")][Si("0x6")][Si("0x13")]("Notification"),s=this.editor[Si("0x2b")];t||(t=k(s,Si("0x3a"))),e[Si("0x83")](t,{title:k(s,Si("0xf")),namespace:Si("0x31")}),this[Si("0x81")]=!0,clearTimeout(this[Si("0x85")]),this[Si("0x7")]=[],this.editor[Si("0x6")][Si("0x13")](l)[Si("0x57")]()}[Si("0x25")](){this[Si("0x32")]||(this[Si("0x32")]=this.editor[Si("0x6")][Si("0x13")](t.PendingActions).add(k(this.editor[Si("0x2b")],"PENDING_ACTION_SENDING_DATA")))}_clearPendingAction(){this[Si("0x32")]&&(this.editor.plugins[Si("0x13")](t.PendingActions)[Si("0x7d")](this[Si("0x32")]),this[Si("0x32")]=null)}[Si("0x39")](t){const e=t[Si("0x62")]((t=>t[Si("0x0")]()));return this[Si("0x4d")][Si("0x50")](e)}[Si("0x79")](t,e){const r=this[Si("0x4d")][Si("0x66")](t)[Si("0x62")](((t,r)=>{const n=s.OperationFactory[Si("0x8a")](t,this[Si("0xc5")]);return n[Si("0x30")]=t.wasUndone,"cs:removeUser"===e[r].type&&(n[Si("0x4")]=!0),n}));return this._assignOperationsMetaData(r,e),r}[Si("0x7c")](t,e){for(let s=0;s<t[Si("0x9d")];s++)Si("0x80")==e[s][Si("0x41")]?(t[s][Si("0x16")]=!0,t[s][Si("0x59")]=null):(t[s]._isInit=!1,t[s][Si("0x59")]=e[s][Si("0x71")]),t[s][Si("0x99")]=e[s][Si("0x99")]}[Si("0x20")](){this[Si("0x2")]=!0,this[Si("0xb8")]()&&this[Si("0x3f")]()}[Si("0xb8")](){const t=this.editor.plugins.get(m)[Si("0xc4")][Si("0x13")](this[Si("0x72")]);return!this[Si("0x36")][Si("0xc")]&&t&&t.length>1&&this._hasSelectionChanged}[Si("0xba")](){return this[Si("0x7")][Si("0x9d")]>0||this[Si("0xb8")]()}}class ki extends Error{}function Ci(t,e){for(const s of t)s[Si("0x76")]=e++}Ti.CollaborativeEditingService=xi();class Ii{constructor(t){this[Si("0x6a")]=t,this._operationToId=new WeakMap}[Si("0xaf")](t){let s=t.length;for(;s--;){const r=t[s];if(!this[Si("0x6a")][Si("0x56")](r)){if(!this[Si("0x2c")].has(r)){const t=(0,e.uid)()[Si("0x4b")](1,18);this[Si("0x2c")][Si("0xb2")](r,t)}return this[Si("0x2c")][Si("0x13")](r)}}}[Si("0xa3")](t,e){if(!e)return;let s=t[Si("0x9d")];for(;s--;){const r=t[s];this[Si("0x6a")][Si("0x56")](r)||this._operationToId.set(r,e)}}}var Ai,Ri,Ni=["RealTimeCollaborativeEditing","requires"];Ai=Ni,Ri=154,function(t){for(;--t;)Ai.push(Ai.shift())}(++Ri);var ji=function(t,e){return Ni[t-=0]};class Pi extends t.Plugin{static get[ji("0x1")](){return[Ti]}static get pluginName(){return ji("0x0")}}var Di=__webpack_require__(125),Mi=__webpack_require__.n(Di),Bi=__webpack_require__(6042),Ji=__webpack_require__.n(Bi);const Vi=["cloudservicescommentsadapter-disconnect-not-exist","_setUpService","keys","update","mySessionId","catch","from","content","addUser","startsWith","cloud-services-internal-error: Not connected.","assign","reconnect","removeCommentThread","_getService","createdAt","updateComment","context","off","config","set","cloud-services-internal-error: Comments Service is not connected.","collaboration.channelId","getConnectedSessions","add","sessionAdd:","permissions","destroy","addCommentThread","size","404","getCommentThread","commentThreadId","CommentsService","plugins","listenTo","has","get","register","_fetchMissingUsersForThreads","commentRemoved","commentId","requires","getUser","addComment","CommentsRepository","remove","_connectService","comments","map","userId","connect","getComment","message","_terminateService","init","cloud-services-internal-error: Request timeout.","_services"];var Ui,Fi;Ui=Vi,Fi=201,function(t){for(;--t;)Ui.push(Ui.shift())}(++Fi);const qi=function(t,e){return Vi[t-=0]};class Li extends t.ContextPlugin{static get[qi("0xf")](){return[l,qi("0x12"),m,n.Users]}constructor(t){super(t),this[qi("0x1e")]=new Map}async[qi("0x1c")](){const e=this[qi("0x30")],s=e[qi("0x7")][qi("0xa")](qi("0x12"));if(e.plugins[qi("0xa")](l).addToReconnectionStack(this),s.adapter={getCommentThread:async({channelId:t,threadId:e})=>{const s=await this[qi("0x2d")](t)[qi("0x4")](e)[qi("0x24")](zi);return await this[qi("0xc")]([s]),{threadId:s[qi("0x5")],comments:s.comments[qi("0x16")](Gi)}},removeCommentThread:({channelId:t,threadId:e})=>this[qi("0x2d")](t)[qi("0x2c")](e)[qi("0x24")](Yi)[qi("0x24")](zi),addComment:({channelId:t,threadId:e,commentId:s,content:r,attributes:n})=>this[qi("0x2d")](t)[qi("0x11")](e,s,r,n)[qi("0x24")](zi),updateComment:({channelId:t,threadId:e,commentId:s,content:r,attributes:n})=>this[qi("0x2d")](t)[qi("0x2f")](e,s,r,n)[qi("0x24")](Yi)[qi("0x24")](zi),removeComment:({channelId:t,threadId:e,commentId:s})=>this[qi("0x2d")](t).removeComment(e,s)[qi("0x24")](Yi)[qi("0x24")](zi)},e instanceof t.Context){const t=e[qi("0x32")][qi("0xa")](qi("0x35")),s=e.plugins.get(m);await this[qi("0x20")](t);const r=await this[qi("0x1e")][qi("0xa")](t)[qi("0x36")]();this[qi("0x8")](s,qi("0x38")+t,((e,{session:r})=>{r.id===s[qi("0x23")]&&(e[qi("0x31")](),this[qi("0x30")].plugins[qi("0xa")]("Permissions").setPermissions(r[qi("0x39")],t))})),s[qi("0xb")](t,r)}}async[qi("0x20")](t){if(this[qi("0x1e")][qi("0x9")](t))throw new e.CKEditorError("cloudservicescommentsadapter-connect-already-connected",null,{channelId:t});const s=this[qi("0x30")][qi("0x7")][qi("0xa")]("CommentsRepository"),r=new(Li[qi("0x6")])(t);this[qi("0x1e")][qi("0x33")](t,r),this.listenTo(r,"commentThreadRemoved",((t,{commentThreadId:e})=>{const r=s[qi("0x4")](e);r&&r[qi("0x13")]({isFromAdapter:!0})})),this[qi("0x8")](r,"commentAdded",((e,r)=>{const n=r[qi("0x5")];s.hasCommentThread(n)||s[qi("0x1")]({channelId:t,threadId:n,isFromAdapter:!0});const i=s[qi("0x4")](n);i&&i[qi("0x11")](Object[qi("0x2a")](Gi(r),{isFromAdapter:!0}))})),this[qi("0x8")](r,"commentUpdated",((t,{commentThreadId:e,commentId:r,content:n,attributes:i})=>{const o=s[qi("0x4")](e);if(o){const t=o[qi("0x19")](r);t&&t.update({content:n,attributes:i,isFromAdapter:!0})}})),this[qi("0x8")](r,qi("0xd"),((t,{commentThreadId:e,commentId:r})=>{const n=s[qi("0x4")](e);if(n){const t=n[qi("0x19")](r);t&&t[qi("0x13")]({isFromAdapter:!0})}})),await this[qi("0x14")](t)}[qi("0x0")](){if(this[qi("0x30")]instanceof t.Context){const t=this[qi("0x30")][qi("0x32")][qi("0xa")]("collaboration.channelId");this[qi("0x1b")](t)}}_terminateService(t){if(!this[qi("0x1e")].has(t))throw new e.CKEditorError(qi("0x1f"),null,{channelId:t});this[qi("0x2d")](t).disconnect(),this[qi("0x1e")].delete(t)}async[qi("0x2b")](){for(const t of this[qi("0x1e")][qi("0x21")]())await this[qi("0x14")](t);if(this[qi("0x30")]instanceof t.Context){const t=this[qi("0x30")].config.get(qi("0x35")),e=this[qi("0x30")][qi("0x7")][qi("0xa")](m);e.unregister(t);const s=await this._services.get(t).getConnectedSessions();e.register(t,s)}}async[qi("0x14")](t){const{connection:e}=this.context[qi("0x7")][qi("0xa")](l),s=this[qi("0x30")][qi("0x7")][qi("0xa")](qi("0x12")),r=this[qi("0x1e")][qi("0xa")](t),n=await r[qi("0x18")](e);await this[qi("0xc")](n);const i=new Set(Array[qi("0x25")](s.getCommentThreads({channelId:t}),(t=>t.id)));for(const t of n)i.delete(t[qi("0x5")]);for(const t of i)s[qi("0x4")](t)[qi("0x13")]({isFromAdapter:!0});for(const e of n){let r=s[qi("0x4")](e.commentThreadId);r||(r=s[qi("0x1")]({channelId:t,threadId:e[qi("0x5")],isFromAdapter:!0}));const n=new Set(Array.from(r[qi("0x15")],(t=>t.id)));for(const t of e.comments)n.delete(t[qi("0xe")]);for(const t of n)r.getComment(t)[qi("0x13")]({isFromAdapter:!0});for(const t of e[qi("0x15")]){const e=r.getComment(t[qi("0xe")]);e?e.content!==t.content&&e[qi("0x22")]({content:t.content,isFromAdapter:!0}):r[qi("0x11")](Object[qi("0x2a")](Gi(t),{isFromAdapter:!0}))}}}_getService(t){if(!this._services[qi("0x9")](t))throw new e.CKEditorError("cloudservicescommentsadapter-service-not-exist",null,{channelId:t});return this._services[qi("0xa")](t)}async _fetchMissingUsersForThreads(t){const e=this[qi("0x30")][qi("0x7")][qi("0xa")](n.Users),{connection:s}=this[qi("0x30")][qi("0x7")][qi("0xa")](l),r=new Set;for(const{comments:s}of t)for(const{userId:t}of s)e.getUser(t)||r[qi("0x37")](t);if(0===r[qi("0x2")])return;const i=await gi().getMany(s,Array.from(r));for(const t of i)e[qi("0x10")](t.id)||e[qi("0x27")](t)}}async function Yi(t){if(qi("0x3")!==t.code)throw t}function zi(t){if((e=t)[qi("0x1a")][qi("0x28")](qi("0x34"))||e[qi("0x1a")][qi("0x28")](qi("0x29"))||e[qi("0x1a")].startsWith(qi("0x1d")))return new Promise((()=>{}));var e;throw t}function Gi(t){return{threadId:t[qi("0x5")],commentId:t[qi("0xe")],content:t[qi("0x26")],createdAt:t[qi("0x2e")],authorId:t[qi("0x17")],attributes:t.attributes}}Li.CommentsService=Ji();const $i=["catch","message","add","set","getMany","attributes","TrackChangesEditing","getUser","values","TrackChangesService","config","cloud-services-internal-error: Not connected.","_trackChangesService","plugins","_waitForServiceReady","update","state","type","addSuggestionData","requires","_fetchMissingUsersForThreads","find","hasSuggestion","startsWith","off","getSuggestion","addUser","connection","get","originalSuggestionId","delete","open","connect","_bufferedRequests","addToReconnectionStack","editor"];var Wi,Hi;Wi=$i,Hi=173,function(t){for(;--t;)Wi.push(Wi.shift())}(++Hi);const Ki=function(t,e){return $i[t-=0]};class Zi extends t.Plugin{static get[Ki("0x1a")](){return[Li,Ki("0xd"),l]}constructor(t){super(t),this[Ki("0x4")]=new Map}init(){const t=this[Ki("0x6")][Ki("0x14")].get(l),e=this[Ki("0x6")][Ki("0x14")].get(Ki("0xd")),s=this.editor[Ki("0x11")][Ki("0x23")]("collaboration.channelId");return this[Ki("0x13")]=new(Zi[Ki("0x10")])(s),e.adapter={getSuggestion:async t=>{await this[Ki("0x15")]();const e=await this[Ki("0x13")][Ki("0x23")](t)[Ki("0x7")](Xi);return await this[Ki("0x1b")]([e]),e},addSuggestion:async({id:t,type:e,data:s,originalSuggestionId:r,attributes:n})=>{await this[Ki("0x15")]();const i={id:t,type:e,data:s,originalSuggestionId:r,attributes:n},o=await this._trackChangesService[Ki("0x9")](t,e,s,r,n)[Ki("0x7")]((e=>{if(Qi(e))return new Promise((e=>{this[Ki("0x4")][Ki("0xa")](t,{resolve:e,suggestionData:i})}));throw e}));return this[Ki("0x4")][Ki("0x1")](t),o},updateSuggestion:async(t,e)=>{if(await this[Ki("0x15")](),Ki("0x2")!==e[Ki("0x17")])return this[Ki("0x13")][Ki("0x16")](t,e).catch(Xi)}},this.listenTo(this[Ki("0x13")],"suggestionUpdated",((t,s)=>{e.hasSuggestion(s.id)&&(e[Ki("0x20")](s.id)[Ki("0xc")]=s[Ki("0xc")])})),this[Ki("0x13")][Ki("0x3")](t[Ki("0x22")]).then((s=>(t[Ki("0x5")](this),this._fetchMissingUsersForThreads(s).then((()=>{for(const t of s)e[Ki("0x19")](t)._saved=!0})))))}async reconnect(){const t=this.editor[Ki("0x14")][Ki("0x23")](Ki("0xd")),{connection:e}=this[Ki("0x6")][Ki("0x14")][Ki("0x23")](l),s=await this[Ki("0x13")][Ki("0x3")](e);await this[Ki("0x1b")](s);for(const{suggestionData:t,resolve:e}of this[Ki("0x4")][Ki("0xf")]()){let r=s[Ki("0x1c")]((e=>e.id===t.id));r||(r=await this._trackChangesService[Ki("0x9")](t.id,t[Ki("0x18")],t.data,t[Ki("0x0")])),e(r)}for(const e of s)t[Ki("0x1d")](e.id)||t.addSuggestionData(e)}async[Ki("0x15")](){this._trackChangesService.isConnected||await new Promise((t=>{this.listenTo(this._trackChangesService,"connected",(e=>{e[Ki("0x1f")](),t()}))}))}async[Ki("0x1b")](t){const e=this[Ki("0x6")][Ki("0x14")].get(n.Users),{connection:s}=this.editor[Ki("0x14")][Ki("0x23")](l),r=new Set;for(const{authorId:s}of t)e.getUser(s)||r.add(s);if(0===r.size)return;const i=await gi()[Ki("0xb")](s,Array.from(r));for(const t of i)e[Ki("0xe")](t.id)||e[Ki("0x21")](t)}}function Xi(t){if(Qi(t))return new Promise((()=>{}));throw t}function Qi(t){return t[Ki("0x8")][Ki("0x1e")](Ki("0x12"))||t.message[Ki("0x1e")]("cloud-services-internal-error: Request timeout.")}Zi[Ki("0x10")]=Mi();const to=["init","Comments","data","CommentsRepository","config","pluginName","collaboration.channelId","connected","CommentsEditing","once","destroy","RealTimeCollaborativeComments","_terminateService","switchReadOnly","listenTo","editor","change:state","ready","get","plugins"];var eo,so;eo=to,so=232,function(t){for(;--t;)eo.push(eo.shift())}(++so);const ro=function(t,e){return to[t-=0]};class no extends t.Plugin{static get requires(){return[ro("0x9"),Li,Pi,l]}static get[ro("0xd")](){return ro("0x13")}[ro("0x8")](){const t=this[ro("0x3")][ro("0x7")][ro("0x6")](l),e=this[ro("0x3")][ro("0x7")][ro("0x6")](ro("0x10")),s=this.editor.plugins[ro("0x6")](Li);return this.editor[ro("0xa")][ro("0x11")](ro("0x5"),(()=>{this.listenTo(t,ro("0x4"),((t,s,r)=>{e.isThreadsLoadingPaused=ro("0xf")!==r}))})),this[ro("0x2")](t,ro("0x4"),((t,e,s)=>{this[ro("0x3")][ro("0x7")].get(ro("0xb"))[ro("0x1")](ro("0xf")!==s)})),s._setUpService(this[ro("0x3")][ro("0xc")][ro("0x6")]("collaboration.channelId"))}[ro("0x12")](){this[ro("0x3")].plugins[ro("0x6")](Li)[ro("0x0")](this.editor[ro("0xc")][ro("0x6")](ro("0xe"))),super[ro("0x12")]()}}var io,oo,ao=["requires","TrackChanges"];io=ao,oo=406,function(t){for(;--t;)io.push(io.shift())}(++oo);var co=function(t,e){return ao[t-=0]};class uo extends t.Plugin{static get[co("0x0")](){return[no,Zi,co("0x1")]}static get pluginName(){return"RealTimeCollaborativeTrackChanges"}}var lo=__webpack_require__(8811),ho=__webpack_require__.n(lo),fo=__webpack_require__(8689),po=__webpack_require__.n(fo);const yo=["listenTo","cloud-services-internal-error: Revision History Service is not connected.","fromVersion","_revisions","getUser","marker","getMany","isBundleUploaded","serverHistory","code","revisionsUpdated","_createCurrentRevision","baseVersion","_lastRequestId","_bufferedUpdates","Users","adapter","length","getOperations","_revisionHistoryService","_fixRevision","has","isConnected","_getLatestVersion","toVersion","plugins","diffData","change:_isPendingUpdate","message","get","authorsIds","setRevisionData","wrongRequestId","updateRevisions","_bufferUpdate","connected","RevisionHistoryService","state","currentRevision","_startingVersion","buildRevisionData","_preventResendingRevisionData","from","size","creatorId","_isPendingUpdate","config","then","getRevision","catch","_revisionTracker","_update","cloud-services-internal-error: Not connected.","_handleReconnectionError","addRevisionData","_waitForServiceReady","getRevisions","setSource","map","connect","authors","type","editor","max","_oldOffset","isEmptyCurrent","_isConnected","connection","_handleRevisionsUpdate","off","collaboration.channelId","addToReconnectionStack","init","RevisionTracker","_revisionDataBuilder","data","affectsData","repository","isEnabled","reconnect","destroy","_domEmitter","sessionId","bind","_fetchMissingUsers","startsWith","_getLatestVersionFromServerOperations","reverse"];var mo,vo;mo=yo,vo=289,function(t){for(;--t;)mo.push(mo.shift())}(++vo);const xo=function(t,e){return yo[t-=0]};class _o extends t.Plugin{static get requires(){return[l,Ti,"RevisionTracker",m,n.Users]}async[xo("0x2f")](){this[xo("0x4c")]=null,this[xo("0x19")]=this[xo("0x25")][xo("0x0")][xo("0x4")](xo("0x30"));const t=this[xo("0x25")][xo("0x0")][xo("0x4")](Ti),s=t.serverHistory,r=this.editor[xo("0x0")][xo("0x4")](l),n=this.editor[xo("0x15")][xo("0x4")](xo("0x2d"));this[xo("0x52")]=new(_o[xo("0xb")])(n),this[xo("0x19")][xo("0x20")]({history:s,getLatestVersion:()=>this[xo("0x56")](),getCurrentRevisionId:()=>t[xo("0x39")]});const i=this[xo("0x25")][xo("0x15")][xo("0x4")]("cloudServices.bundleVersion")||e.version,o=await po()[xo("0x46")](r.connection,i);this._revisionTracker[xo("0x4f")]={getRevision:async({revisionId:t})=>(await this._waitForServiceReady(),await this[xo("0x52")][xo("0x17")](t)),updateRevisions:async t=>{await this[xo("0x1e")]();const e=this[xo("0x19")][xo("0xd")];if(!o||1!==t[xo("0x50")]||t[0].id!==e.id){for(const s of t)s.id===e.id&&(s[xo("0x28")]=s[xo("0x41")]===s.toVersion);return this[xo("0x52")][xo("0x8")](t,this._lastRequestId)[xo("0x16")]((t=>{this[xo("0x4c")]=t}))[xo("0x18")]((e=>{if(!(go(e)||"400"===e[xo("0x48")]&&void 0!==e[xo("0x32")][xo("0x7")]))throw e;for(const e of t)!this._revisionTracker[xo("0x34")][xo("0x17")](e.id)||this[xo("0x19")][xo("0x9")](e.id,e,!1);if(go(e))throw e}))}}},this[xo("0x3f")](this[xo("0x52")],xo("0x49"),((t,{revisionsData:e,requestId:s})=>{Math[xo("0x26")](...e[xo("0x21")]((t=>t.toVersion)))>this._getLatestVersionFromServerOperations()-1?this._getLatestVersion()[xo("0x16")]((()=>{this[xo("0x2b")](e,s)})):this[xo("0x2b")](e,s)}));const{revisions:a,requestId:c}=await this[xo("0x52")][xo("0x22")](r[xo("0x2a")]);r[xo("0x2e")](this),this[xo("0x4c")]=c,await this[xo("0x3b")](a);for(const t of a)this[xo("0x19")].addRevisionData(t);this.listenTo(t,"change:_isConnected",((e,s,r)=>{r&&(this[xo("0x27")]=t._offset,e[xo("0x2c")]())})),this[xo("0x19")][xo("0x3a")](xo("0x35")).to(r,xo("0xc"),(t=>xo("0xa")===t))}async[xo("0x36")](){const t=this[xo("0x25")][xo("0x0")][xo("0x4")](l),e=this[xo("0x25")][xo("0x0")].get(Ti),s=async()=>{const s=this._revisionTracker[xo("0xd")],r=s.id,n=r!==e.sessionId;if(n){const t=e._offset-this[xo("0x27")],n=this._getLatestVersionFromServerOperations();if(this._revisionTracker[xo("0x31")].reInit(),s[xo("0x57")]+t!==n){const e=s[xo("0x41")]+t,r=this[xo("0x25")][xo("0x0")].get(xo("0x4e")),i=this._revisionTracker[xo("0xf")]({currentRevision:s,from:e,to:n});i.id=s.id;const o=i[xo("0x5")][xo("0x21")]((t=>r.getUser(t)));s[xo("0x1a")]({...i,authors:o},!0),this[xo("0x19")][xo("0x9")](s.id,i,!0)}this[xo("0x19")][xo("0xe")]=n,s[xo("0x57")]===s[xo("0x41")]&&!this[xo("0x19")][xo("0x4d")][xo("0x54")](r)&&this[xo("0x19")][xo("0x34")][xo("0x42")].remove(r),this._revisionTracker[xo("0x4a")](n)}const{revisions:i,requestId:o}=await this[xo("0x52")][xo("0x36")](t[xo("0x2a")],this[xo("0x4c")]);n&&i[xo("0x50")]>0?e[xo("0x1c")]():(await this[xo("0x3b")](i),this[xo("0x2b")](i,o),this[xo("0x19")].sendBufferedUpdates())};return e[xo("0x29")]?s():new Promise(((t,r)=>{e.once("change:_isConnected",(()=>{s().then(t).catch(r)}))}))}[xo("0x37")](){this[xo("0x38")]&&this[xo("0x38")].stopListening(),super[xo("0x37")]()}async[xo("0x1e")](){this[xo("0x52")][xo("0x55")]||await new Promise((t=>{this[xo("0x3f")](this[xo("0x52")],"connected",(e=>{e.off(),t()}))}))}[xo("0x3d")](){const t=this[xo("0x25")][xo("0x0")][xo("0x4")](Ti)[xo("0x47")];for(const e of t[xo("0x51")]()[xo("0x3e")]())if(xo("0x44")!==e[xo("0x24")]||e[xo("0x33")])return e[xo("0x4b")]+1}_getLatestVersion(){const t=this.editor[xo("0x0")].get(Ti);return new Promise((e=>{t[xo("0x14")]?t.once(xo("0x2"),(()=>{e(this[xo("0x3d")]())})):e(this[xo("0x3d")]())}))}[xo("0x2b")](t,e){const s=this[xo("0x19")].repository;this[xo("0x4c")]=e;for(const e of t){const t=s.getRevision(e.id);if(t){if((e[xo("0x41")]||e[xo("0x57")])&&(e[xo("0x1")]=null),t===this._revisionTracker.currentRevision){const s=Math[xo("0x26")](t.toVersion,e.toVersion),r=Math.max(t[xo("0x41")],e.fromVersion);let n;t[xo("0x57")]===e[xo("0x57")]&&t.fromVersion===e[xo("0x41")]?(n=!0,this[xo("0x10")](e)):e[xo("0x57")]===s&&e[xo("0x41")]===r?n=!1:(t[xo("0x57")]===s&&t.fromVersion===r||this[xo("0x53")]({revision:t,from:r,to:s}),n=!0),n&&(delete e[xo("0x41")],delete e[xo("0x57")],delete e[xo("0x1")],delete e.createdAt,delete e[xo("0x5")])}this[xo("0x19")][xo("0x6")](e),this[xo("0x10")](e)}else this[xo("0x19")][xo("0x1d")](e)}const r=s[xo("0x1f")]();r[xo("0x3e")]();for(let t=0;t<r[xo("0x50")]-1;t++){const e=r[t],s=r[t+1];if(e[xo("0x41")]<s[xo("0x57")]){const t=s[xo("0x57")],r=Math[xo("0x26")](t,e.toVersion);this[xo("0x53")]({revision:e,from:t,to:r})}}}[xo("0x53")]({revision:t,from:e,to:s}={}){const r=this.editor[xo("0x0")][xo("0x4")](xo("0x4e")),n=this._revisionTracker[xo("0xf")]({revision:t,from:e,to:s});n[xo("0x23")]=n.authorsIds.map((t=>r[xo("0x43")](t))),t[xo("0x1a")](n)}_preventResendingRevisionData(t){const e={};e.id=t.id;for(const s of Object.keys(t))"id"!==s&&(e[s]=void 0);this[xo("0x19")][xo("0x9")](e.id,e,!0)}async[xo("0x3b")](t){const e=this[xo("0x25")][xo("0x0")][xo("0x4")](n.Users),{connection:s}=this.editor.plugins[xo("0x4")](l),r=new Set;for(const e of t){for(const t of e[xo("0x5")])o(t);e[xo("0x13")]&&o(e[xo("0x13")])}if(0===r[xo("0x12")])return;const i=await gi()[xo("0x45")](s,Array[xo("0x11")](r));for(const t of i)e[xo("0x43")](t.id)||e.addUser(t);function o(t){e.getUser(t)||r.add(t)}}}function go(t){return t.message[xo("0x3c")](xo("0x40"))||t[xo("0x3")][xo("0x3c")](xo("0x1b"))||t[xo("0x3")][xo("0x3c")]("cloud-services-internal-error: Request timeout.")}_o[xo("0xb")]=ho();var bo,wo,Oo=["requires","RevisionHistory","RealTimeCollaborativeRevisionHistory"];bo=Oo,wo=139,function(t){for(;--t;)bo.push(bo.shift())}(++wo);var So=function(t,e){return Oo[t-=0]};class Eo extends t.Plugin{static get[So("0x2")](){return[So("0x0"),_o,Pi]}static get pluginName(){return So("0x1")}}var To=Function.prototype,ko=Object.prototype,Co=To.toString,Io=ko.hasOwnProperty,Ao=Co.call(Object);const Ro=function(t){if(!Kt(t)||"[object Object]"!=st(t))return!1;var e=He(t);if(null===e)return!0;var s=Io.call(e,"constructor")&&e.constructor;return"function"==typeof s&&s instanceof s&&Co.call(s)==Ao};const No=function(t){return Kt(t)&&1===t.nodeType&&!Ro(t)},jo=["set","CONNECTED_USERS","div","bindTemplate","setTemplate","usersCount","ck-presence-list__counter--hidden","isHidden"];var Po,Do;Po=jo,Do=197,function(t){for(;--t;)Po.push(Po.shift())}(++Do);const Mo=function(t,e){return jo[t-=0]};class Bo extends r.View{constructor(t){super(t);const e=this[Mo("0x6")];this[Mo("0x3")](Mo("0x0"),0),this[Mo("0x3")](Mo("0x2"),!0),this[Mo("0x7")]({tag:Mo("0x5"),attributes:{class:["ck","ck-presence-list__counter",e.if(Mo("0x2"),Mo("0x1"))]},children:[{text:e.to(Mo("0x0"),(e=>k(t,Mo("0x4"),e)))}]})}}const Jo=["bindTemplate","fire","div","items","createCollection"];var Vo,Uo;Vo=Jo,Uo=286,function(t){for(;--t;)Vo.push(Vo.shift())}(++Uo);const Fo=function(t,e){return Jo[t-=0]};class qo extends r.View{constructor(t){super(t),this[Fo("0x2")]=this[Fo("0x3")]();const e=this[Fo("0x4")];this.setTemplate({tag:Fo("0x1"),attributes:{class:["ck","ck-presence-list__list"]},children:this.items,on:{click:e.to((()=>this[Fo("0x0")]("execute")))}})}}var Lo=__webpack_require__(3286),Yo={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};x()(Lo.Z,Yo);Lo.Z.locals;const zo=["set","tooltipPosition","ck-rounded-corners","isCollapsed","counterView","listenTo","ck-reset","first","items","bindTemplate","inlineListView","locale","div","ck-presence-list","ck-presence-list--collapsed"];var Go,$o;Go=zo,$o=276,function(t){for(;--t;)Go.push(Go.shift())}(++$o);const Wo=function(t,e){return zo[t-=0]};class Ho extends r.View{constructor(t){super(t);const e=this[Wo("0x3")];this[Wo("0x9")](Wo("0xc"),!0),this.counterView=new Bo(this[Wo("0x5")]),this.inlineListView=new qo(t),this[Wo("0xe")](this[Wo("0x4")].items,"change",(()=>{for(const t of this[Wo("0x4")][Wo("0x2")])t.tooltipPosition="s";this[Wo("0x4")][Wo("0x2")][Wo("0x1")]&&(this[Wo("0x4")][Wo("0x2")].first[Wo("0xa")]="se")})),this.setTemplate({tag:Wo("0x6"),attributes:{class:["ck",Wo("0x7"),Wo("0x0"),Wo("0xb"),e.if(Wo("0xc"),Wo("0x8"))]},children:[this[Wo("0xd")],this.inlineListView]})}}var Ko,Zo,Xo=["createCollection","div","ck-presence-list__dropdown-list","ck-presence-list__dropdown-list-wrapper","items","setTemplate"];Ko=Xo,Zo=181,function(t){for(;--t;)Ko.push(Ko.shift())}(++Zo);var Qo=function(t,e){return Xo[t-=0]};class ta extends r.View{constructor(t){super(t),this[Qo("0x3")]=this[Qo("0x5")](),this[Qo("0x4")]({tag:Qo("0x0"),attributes:{class:["ck",Qo("0x1")]},children:[{tag:Qo("0x0"),attributes:{class:["ck",Qo("0x2")]},children:this[Qo("0x3")]}]})}}const ea=["userView","ck-user__full-name","setTemplate","name","div","fire","getBackgroundColorClass","ck-presence-list__dropdown-list-item","color","execute","span"];var sa,ra;sa=ea,ra=349,function(t){for(;--t;)sa.push(sa.shift())}(++ra);const na=function(t,e){return ea[t-=0]};class ia extends r.View{constructor(t,e,s){super(t);const r=this.bindTemplate;this[na("0x3")]=new n.UserView(t,e);const i={tag:na("0x7"),attributes:{class:["ck",na("0xa")]},children:[this.userView,{tag:"span",attributes:{class:["ck",na("0x4")]},children:[{text:e[na("0x6")]}]},{tag:na("0x2"),attributes:{class:["ck","ck-presence-list__marker",e[na("0x0")][na("0x9")]()],"aria-hidden":"true"}}]};s&&(i.tag="button",i.on={click:r.to((()=>this[na("0x8")](na("0x1"))))}),this[na("0x5")](i)}}const oa=["span","ck-presence-list__marker","getBackgroundColorClass","color","setTemplate","true","div","tooltipPosition","execute","ck-presence-list__list-item__tooltip","fire","set","tag","hasTooltip","userView","button","markerView"];var aa,ca;aa=oa,ca=440,function(t){for(;--t;)aa.push(aa.shift())}(++ca);const ua=function(t,e){return oa[t-=0]};class da extends r.View{constructor(t,e,s){super(t);const r=this.bindTemplate;this[ua("0xd")](ua("0xf"),!0),this[ua("0xd")](ua("0x9"),""),this.userView=new n.UserView(t,e),this[ua("0x1")]=new la(t,e);const i={tag:ua("0x8"),attributes:{class:["ck","ck-presence-list__list-item"],"data-cke-tooltip-text":this[ua("0x10")].name,"data-cke-tooltip-position":r.to(ua("0x9")),"data-cke-tooltip-disabled":r.to(ua("0xf"),(t=>!t)),"data-cke-tooltip-class":ua("0xb")},children:[this[ua("0x10")],this.markerView]};s&&(i[ua("0xe")]=ua("0x0"),i.on={click:r.to((()=>this[ua("0xc")](ua("0xa"))))}),this[ua("0x6")](i)}}class la extends r.View{constructor(t,e){super(t),this[ua("0x6")]({tag:ua("0x2"),attributes:{class:["ck",ua("0x3"),e[ua("0x5")][ua("0x4")]()],"aria-hidden":ua("0x7")}})}}const ha=["from","isCollapsed","attachToDom","get","locale","presenceList.container","listenTo","balloonPanelView","presenceList.collapseAt","onClick","_handleUserAdd","items","showDropdown","pin","init","context","plugins","execute","lastConnectedUsers","presenceList","presencelist-missing-container","counterView","bindTo","render","usersCount","define","using","number","element","view","remove","hasTooltip","detachFromDom","presenceDropdownView","length","destroy","_allConnectedUsers","allConnectedUsers","bind","config","bodyCollection","requires","appendChild","presencelist-collapseat-invalid-format","hideDropdown","content","inlineListView","add"];var fa,pa;fa=ha,pa=391,function(t){for(;--t;)fa.push(fa.shift())}(++pa);const ya=function(t,e){return ha[t-=0]};class ma extends t.ContextPlugin{constructor(t){super(t),t[ya("0x20")][ya("0x12")]("presenceList",{collapseAt:6});const s=t[ya("0x20")][ya("0x2c")](ya("0x1"));if(ya("0x14")!=typeof s)throw new e.CKEditorError(ya("0x24"),this);if(s<1)throw new e.CKEditorError(ya("0x24"),this)}static get[ya("0x22")](){return[m]}[ya("0x7")](){const t=this[ya("0x8")];this[ya("0x1d")]=t[ya("0x9")][ya("0x2c")](m)[ya("0x1e")],this.set(ya("0x11"),0),this[ya("0xb")]=new e.Collection,this.balloonPanelView=new r.BalloonPanelView,this[ya("0x0")].class="ck ck-presence-list__balloon",this[ya("0x16")]=this._createView(),this[ya("0x1a")]=void 0;for(const t of this[ya("0x1d")])this[ya("0x3")](t);this[ya("0x2f")](this[ya("0x1d")],"add",((t,e)=>{this[ya("0x3")](e)})),this[ya("0x2f")](this[ya("0x1d")],ya("0x17"),((t,e)=>{this._handleUserRemove(e)}))}_createView(){const t=this[ya("0x8")],s=new Ho(this[ya("0x8")][ya("0x2d")]),n=this.balloonPanelView;if(!No(t.config[ya("0x2c")](ya("0x2e"))))throw new e.CKEditorError(ya("0xd"),this);return s[ya("0xe")][ya("0x1f")](ya("0x11")).to(this),s[ya("0x1f")](ya("0x2a")).to(this,ya("0x11"),(e=>{const r=e>=t[ya("0x20")].get(ya("0x1"));return s[ya("0xe")].isHidden=!(1==e||r),r||this[ya("0x25")](),r})),s.inlineListView[ya("0x4")].bindTo(this[ya("0xb")]).using((e=>{const r=t[ya("0x20")].get(ya("0xc")),n=new da(t[ya("0x2d")],e,r[ya("0x2")]);return n[ya("0x1f")](ya("0x18")).to(s,ya("0x2a"),(t=>!t)),r[ya("0x2")]&&this[ya("0x2f")](n,ya("0xa"),(()=>{this[ya("0x16")][ya("0x2a")]||r[ya("0x2")](e,n[ya("0x15")])})),n})),this[ya("0x2f")](s.inlineListView,ya("0xa"),(()=>{this.presenceDropdownView?this[ya("0x25")]():this.view[ya("0x2a")]&&this[ya("0x5")]()})),s[ya("0x10")](),n[ya("0x10")](),(0,r.clickOutsideHandler)({emitter:s,activator:()=>n.isVisible,contextElements:[n.element,s[ya("0x27")][ya("0x15")]],callback:()=>this[ya("0x25")]()}),t[ya("0x20")][ya("0x2c")](ya("0x2e"))[ya("0x23")](s[ya("0x15")]),this[ya("0x21")]=new r.BodyCollection(this.context[ya("0x2d")]),this.bodyCollection[ya("0x2b")](),this[ya("0x21")].add(n),s}_handleUserAdd(t){this[ya("0x11")]++,5==this[ya("0xb")][ya("0x1b")]&&this[ya("0xb")][ya("0x17")](0),this[ya("0xb")].add(t)}_handleUserRemove(t){if(this[ya("0x11")]--,this.lastConnectedUsers.get(t.id)&&(this[ya("0xb")][ya("0x17")](t.id),this.lastConnectedUsers[ya("0x1b")]<this[ya("0x11")]))for(const t of Array[ya("0x29")](this[ya("0x1d")]).reverse())if(!this[ya("0xb")][ya("0x2c")](t.id))return void this[ya("0xb")].add(t,0)}[ya("0x5")](){if(this[ya("0x1a")])return;this.presenceDropdownView=new ta;const t=this[ya("0x8")][ya("0x20")][ya("0x2c")](ya("0xc"));this[ya("0x1a")][ya("0x4")][ya("0xf")](this[ya("0x1d")])[ya("0x13")]((e=>{const s=new ia(this.context[ya("0x2d")],e,!!t[ya("0x2")]);return t[ya("0x2")]&&this[ya("0x2f")](s,ya("0xa"),(()=>{t[ya("0x2")](e,s.element)})),s})),this.balloonPanelView[ya("0x26")][ya("0x28")](this[ya("0x1a")]),this[ya("0x0")][ya("0x6")]({target:this[ya("0x16")].inlineListView.element})}hideDropdown(){this.presenceDropdownView&&(this[ya("0x0")].unpin(),this.balloonPanelView[ya("0x26")][ya("0x17")](this[ya("0x1a")]),this[ya("0x1a")][ya("0x1c")](),this[ya("0x1a")]=void 0)}[ya("0x1c")](){super[ya("0x1c")](),this[ya("0x16")]&&this[ya("0x16")].isRendered&&this[ya("0x16")][ya("0x1c")](),this[ya("0x21")]&&this[ya("0x21")][ya("0x19")]()}}var va,xa,_a=["requires","pluginName","PresenceList"];va=_a,xa=168,function(t){for(;--t;)va.push(va.shift())}(++xa);var ga=function(t,e){return _a[t-=0]};class ba extends t.ContextPlugin{static get[ga("0x0")](){return[m,ma]}static get[ga("0x1")](){return ga("0x2")}}})(),(window.CKEditor5=window.CKEditor5||{}).realTimeCollaboration=__webpack_exports__})();