@univerjs-pro/collaboration-client 1.0.0-beta.0 → 1.0.0-beta.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.
- package/lib/cjs/facade.js +1 -1
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/locale/ar-SA.js +1 -1
- package/lib/cjs/locale/ca-ES.js +1 -1
- package/lib/cjs/locale/de-DE.js +1 -1
- package/lib/cjs/locale/en-US.js +1 -1
- package/lib/cjs/locale/es-ES.js +1 -1
- package/lib/cjs/locale/fa-IR.js +1 -1
- package/lib/cjs/locale/fr-FR.js +1 -1
- package/lib/cjs/locale/id-ID.js +1 -1
- package/lib/cjs/locale/it-IT.js +1 -1
- package/lib/cjs/locale/ja-JP.js +1 -1
- package/lib/cjs/locale/ko-KR.js +1 -1
- package/lib/cjs/locale/pl-PL.js +1 -1
- package/lib/cjs/locale/pt-BR.js +1 -1
- package/lib/cjs/locale/ru-RU.js +1 -1
- package/lib/cjs/locale/sk-SK.js +1 -1
- package/lib/cjs/locale/vi-VN.js +1 -1
- package/lib/cjs/locale/zh-CN.js +1 -1
- package/lib/cjs/locale/zh-HK.js +1 -1
- package/lib/cjs/locale/zh-TW.js +1 -1
- package/lib/es/facade.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/es/locale/ar-SA.js +1 -1
- package/lib/es/locale/ca-ES.js +1 -1
- package/lib/es/locale/de-DE.js +1 -1
- package/lib/es/locale/en-US.js +1 -1
- package/lib/es/locale/es-ES.js +1 -1
- package/lib/es/locale/fa-IR.js +1 -1
- package/lib/es/locale/fr-FR.js +1 -1
- package/lib/es/locale/id-ID.js +1 -1
- package/lib/es/locale/it-IT.js +1 -1
- package/lib/es/locale/ja-JP.js +1 -1
- package/lib/es/locale/ko-KR.js +1 -1
- package/lib/es/locale/pl-PL.js +1 -1
- package/lib/es/locale/pt-BR.js +1 -1
- package/lib/es/locale/ru-RU.js +1 -1
- package/lib/es/locale/sk-SK.js +1 -1
- package/lib/es/locale/vi-VN.js +1 -1
- package/lib/es/locale/zh-CN.js +1 -1
- package/lib/es/locale/zh-HK.js +1 -1
- package/lib/es/locale/zh-TW.js +1 -1
- package/lib/facade.js +1 -1
- package/lib/index.js +1 -1
- package/lib/locale/ar-SA.js +1 -1
- package/lib/locale/ca-ES.js +1 -1
- package/lib/locale/de-DE.js +1 -1
- package/lib/locale/en-US.js +1 -1
- package/lib/locale/es-ES.js +1 -1
- package/lib/locale/fa-IR.js +1 -1
- package/lib/locale/fr-FR.js +1 -1
- package/lib/locale/id-ID.js +1 -1
- package/lib/locale/it-IT.js +1 -1
- package/lib/locale/ja-JP.js +1 -1
- package/lib/locale/ko-KR.js +1 -1
- package/lib/locale/pl-PL.js +1 -1
- package/lib/locale/pt-BR.js +1 -1
- package/lib/locale/ru-RU.js +1 -1
- package/lib/locale/sk-SK.js +1 -1
- package/lib/locale/vi-VN.js +1 -1
- package/lib/locale/zh-CN.js +1 -1
- package/lib/locale/zh-HK.js +1 -1
- package/lib/locale/zh-TW.js +1 -1
- package/lib/types/facade/f-collaboration.d.ts +14 -0
- package/lib/types/services/undoredo/collaborative-undoredo.service.d.ts +2 -2
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +1 -1
- package/lib/umd/locale/ar-SA.js +1 -1
- package/lib/umd/locale/ca-ES.js +1 -1
- package/lib/umd/locale/de-DE.js +1 -1
- package/lib/umd/locale/en-US.js +1 -1
- package/lib/umd/locale/es-ES.js +1 -1
- package/lib/umd/locale/fa-IR.js +1 -1
- package/lib/umd/locale/fr-FR.js +1 -1
- package/lib/umd/locale/id-ID.js +1 -1
- package/lib/umd/locale/it-IT.js +1 -1
- package/lib/umd/locale/ja-JP.js +1 -1
- package/lib/umd/locale/ko-KR.js +1 -1
- package/lib/umd/locale/pl-PL.js +1 -1
- package/lib/umd/locale/pt-BR.js +1 -1
- package/lib/umd/locale/ru-RU.js +1 -1
- package/lib/umd/locale/sk-SK.js +1 -1
- package/lib/umd/locale/vi-VN.js +1 -1
- package/lib/umd/locale/zh-CN.js +1 -1
- package/lib/umd/locale/zh-HK.js +1 -1
- package/lib/umd/locale/zh-TW.js +1 -1
- package/package.json +15 -15
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x2e02fc=_0x1bad;(function(_0x176cab,_0x429b90){const _0x1bb2d0=_0x1bad,_0x2f7370=_0x176cab();while(!![]){try{const _0x5e1f29=parseInt(_0x1bb2d0(0xe9))/0x1*(parseInt(_0x1bb2d0(0x1b9))/0x2)+parseInt(_0x1bb2d0(0x1e1))/0x3+parseInt(_0x1bb2d0(0x10a))/0x4+-parseInt(_0x1bb2d0(0x247))/0x5+-parseInt(_0x1bb2d0(0x24f))/0x6*(-parseInt(_0x1bb2d0(0x184))/0x7)+-parseInt(_0x1bb2d0(0x10b))/0x8+-parseInt(_0x1bb2d0(0x25f))/0x9;if(_0x5e1f29===_0x429b90)break;else _0x2f7370['push'](_0x2f7370['shift']());}catch(_0x57962f){_0x2f7370['push'](_0x2f7370['shift']());}}}(_0x2699,0xb1811));import{CollaborationEvent as _0x150d16,CompressMutationService as _0xe47be4,EmptyMutationInfo as _0x220092,ISnapshotServerService as _0xa027ef,ITransformService as _0x40dc20,RevisionService as _0x4b0edd,SnapshotService as _0x4240b0,UniverCollaborationPlugin as _0x2a63ac,b64DecodeUnicode as _0x561a6b,isTransformChangesetsSuccess as _0x113617,isTransformMutationsWithChangesetFailure as _0x3892b2,isTransformMutationsWithChangesetSuccess as _0x2eee33,mapDocumentTypeToUniverInstanceType as _0x2c0a6c,parseChangesetToProtocol as _0xe3775b,parseProtocolChangeset as _0x93473e,textEncoder as _0x4363eb,uuidv4 as _0x500aaf}from'@univerjs-pro/collaboration';function _0x2699(){const _0x10921d=['[serializeCombRequest]:\x20should\x20not\x20fall\x20into\x20default\x20branch!','AWAITING','9220NwhWSM','emitEvent','MSG_FOR_ERROR','loadOfflineData','onSyncEditingCollabCursor','_scheduleCompleteTimestamp','_getSendChangesetTimeout','UNIVER_BASE','LIVESHARE_FETCH_OPERATIONS','saveChangeset','liveShareNewHost','add','open$','/new_changes','forEach','_registerDependencies','synced','size','_state','/unit/','_socketChannels','onload','getCurrentSelections','_collaborationPaused','_updateLocalCache','resend','downloadEndpointUrl','sendHeartbeatTimer','[CollaborationSocketService]:\x20failed\x20to\x20get\x20web\x20socket\x20factory!','responseType','GLOBAL_ROOMS_CNT_EXCEEDS','requireSession','asObservable','_httpService','LIVESHARE_TERMINATE','_telemetryInfo','_getSignURL','charCodeAt','encrypt','UNIVER_SLIDE','2701968JECSZs','readyForCollab','onStateChange','HEARTBEAT','patch','members$','pending','conflict','status$','toLocal','_clearLocalCache','objectActions','getTypeOfUnitAdded$','_stopTelemetryCollaborationNewChangeset','NEW_CHANGESETS','constructor','saveSheetBlock','_hasSessionsForEndpoint','_tryReconnect','localeService','_showConflictNotification','_resendTimer','Unknown\x20type.\x20Will\x20not\x20load\x20files\x20from\x20remote\x20address.','FETCH_MISS','_getAPIPrefix','localCacheService','_transformStack','send','\x0aCurrent:\x20','1.0.0-beta.0','origin','workbook','_config','getCurrentUser','_disableEditing','getUnitType','result','_clearHeartbeatTimer','_cfgEnableObjInherit','_onJoinRoomEvent','textRanges','liveShareOperation','_getLoginPath','univer-pro.collaboration-client-adapter-service','_transformAndApplyRemoteChangeset','transformUndoRedo','encodeURIComponent','_permissionService','LIVESHARE_OPERATION','ERROR_EXCEED_SIZE','_resendTimeout','_queuedRemoteChangesets','parse','[UniverCollaborationClientPlugin]','name','signUrlServerUrl','loadSheet','[PendingState]:\x20received\x20acknowledgement.','x-univer-host','session','transformMutationsWithChangeset','HEARTBEAT_TIMEOUT','create','confirm','error$','subscribe','getCollabEntity$','/object/','_transformUndoredo','_clearScheduledTask','defineProperty','setShowComponents','_type','code','socket\x20open.','apply','_userManagerService','PENDING','_entities','UNIVER_PDF','decorate','onMissingChangesets','function','revision','_sendHeartbeat','timeoutTimer','close$','[CollaborationUndoRedoService]','onStarting','_toggleOffline','_createInitialState','_collaborationUIEventService','src','getUploadOptions','_docStateChangeManagerService','compose','get','findIndex','SUBMIT_CHANGESET_TIMEOUT','_handler','objectID','objects','6157400VTToNU','_handleRemoteChangesets','_isEchoedAwaitingChangeset','/object','_onLocalMutation','members','_sessionChannels','_configService','6QZRYIm','action','baseRev','COMPRESS_MUTATION_APPLY','fetch_missing','pluginName','resolveUnit','CLOSE_ROOM','_onCombEvent','post','dispose','duration','find','accept','_resendWithTimeout','onTransformSelections','123363TkFyTv','SYNCED','reject','[CollaborationState]:\x20apply\x20error!','_upload','getCurrentRevOfUnit','sessionStatus','UNIVER_SHEET','allowed','_unlockTransition','UPDATE_PERMISSION_OBJ','fetching\x20the\x20latest\x20document\x20from\x20the\x20server.','_initMergeInterceptor','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','_acknowledgeAwaitingIfReady','some','_init','getLatestCsReqIdBySid','_initUnitPermissionChange','OFFLINE','reqId','_incrementRevisionNumber','getTime','href','saveAttachment','_socket','getValue','{fileID}','tables','onLocalMutation','loadBoard','UPDATE_CURSOR','title','upload','avatar','updateMember','uniscriptRunEvent','hasOwnProperty','COLLABORATION_CHANGESET_TRANSLATION_REQUIRED','_sheetTransformSelectionsService','unitLoaded$','getCfgEnableObjInherit','_onOffline','_members$','FAIL','_getSocketChannel','close','_decreaseWaiting','requestParams','toRemote','?url=','fetchMiss','c1Prime','url','_fetchMissChangesets','save\x20fail\x20reason\x20is\x20','unitType','[CollaborationAttachmentIoService]:\x20attachment\x20exceeds\x20max\x20size.','unitId','COMPRESS_MUTATION_SEND','joinRsp','_sessionStatus$','_onRemoteChangeset','_updateState','state$','offline','_clearUndo','removeMember','CHANGESET_SHOULD_RETRY','getUnitStatus$','waitForRoom$','RECV','message$','_status$','getUnitId','LOCAL_CACHE_INTERVAL','HELLO','_createHandler','incrementRevOfUnit','onlyLocal','encode','text-x','_substituteRedoStack','session.room-cnt-exceeds','collaborators','userID','not_collab','IDLE','setConfig','push','/universer-api/user/session-ticket','every','JOIN_ROOM_NOT_EXISTS','_redoStacks','_tryEnsureSocket','_getUndoStack','/-/object/-/batch_allowed','_listenToNetworkCondition','_startCollaboration','onRemoteChangeset','values','indexOf','FileId','_onRemoteACK','min','[SyncedState]:\x20invalid\x20calling\x20to\x20`resend`.','has','[OfflineState]:\x20received\x20acknowledgement.','_maxTotalRetryTimeout','This\x20method\x20should\x20not\x20be\x20called\x20on\x20the\x20client\x20side!','error','_getCurrentRevision','PERMISSION_REJ','_transformRemoteChangesetByIMECache','createCollaborator','you\x20should\x20override\x20\x22IUndoRedoService\x22\x20provided\x20in\x20\x22core\x22\x20package!','endpoint','_state$','unit-cache-','cmd','ERROR_IMAGE','Error\x20on\x20receiving\x20event','&to=','[CollaborationEntity]:\x20cannot\x20lock\x20transition\x20twice!\x20This\x20is\x20an\x20implementation\x20error,\x20meaning\x20you\x20transit\x20the\x20collaboration\x20state\x20again\x20in\x20the\x20process\x20of\x20a\x20previous\x20transition.\x20This\x20should\x20never\x20happen.','stopTime','_instanceService','file','filter','getRoom','OTHER_CLIENT_EDITING','[CollaborationSession]:\x20should\x20not\x20send\x20message\x20when\x20the\x20session\x20is\x20offline!','transformSelections','SHOULD_CLOSE_CONN','getFocusedUnit','_acknowledgeAwaiting','SOCKET_FAILED_RETRY','telemetry\x20info\x20is\x20not\x20initialized','selections','set','_changesetSessionId','_univerInstanceService','loadSlide','saveImage','/-/object/list','unitID','capture','_initDependencies','uploadFileServerUrl','_lockTransition','online$','csAckEvent','_getConfig','getResourcesRequest','collaboration-client.local-cache-service','&assign=','enableSingleActiveInstanceLock','ws://127.0.0.1:8000/universer-api/comb/connect','toggleOffline','_isPermissionRej','onSendChangeset','replace','_transformRemoteChangesetByStateCache','_telemetryService','univer-pro.collaboration-client-socket-service','clear','endsWith','_socketService','LIVESHARE_NEW_HOST','/universer-api/file/{fileID}/sign-url','_createSocket','_waitCount','batchAllowed','Univer','_initCloseConn','_joinRoom','onRemoteRetry','prototype','_onConflict','JOIN_ROOM_FULL','UNIVER_DOC','addHandlerCallback','_event$','permissionRejEvent','executeCommand','headers','/allowed','_rescheduleHeartbeat','[AuthServerService]:\x20you\x20should\x20provide\x20authentication\x20info\x20on\x20Node.js.','_scheduleCollaborationTimeoutTimer','_createInitialStateImpl','session.room-permission-denied','[OfflineState]:\x20received\x20changeset.','pipe','univer-pro.collaboration-client.single-active-unit-service','_replaceFileID','changesets','/rev/','mutations','_updateStatus','withCredentials','_shouldReportTelemetry','session.join-failed','addImageSourceCache','sid','INGEST','[OfflineState]:\x20invalid\x20calling\x20to\x20`resend`.','append','/universer-api/snapshot/','event$','splice','createInstance','_onConnectionOpen','fetchMissingChangesets','/role','listCollaborators','_imageSourceCache','retryConnectingTimer','_startTelemetryCollaborationNewChangeset','[PendingState]:\x20invalid\x20calling\x20to\x20`resend`.','_onFetchMissResult','onTransformState','ONLINE','_transformIMECache','_pendingMutations','UNIVER_BOARD','_exhaustRemoteChangesetQueue','call','updatePermissionObjEvent','interceptor','&source=','onCommentUpdate','_entityInit$','_change$','toggleOnline','SUCCUSS','onRemoteRej','_HTTPService','/collaborator','_removeRoom','startTime','UnitEmbedded','getSnapshotAPIPath','maxSize','data','USERS_LEAVE','awaitingChangeset','rev','reconnect','_emitMembers','fromCollab','_acknowledgedAwaitingRevision','type','changeset','_clearTimeoutTimer','_commandService','_transformStateCache','loginUrlKey','delete','_changesetReqId','_snapshotServerService','joinEvent','[CollaborationSession]','range','_memberService','_localeService','_eventService','_waitForHeartbeatResponse','sessionStatus$','_roomCreated$','stringify','complete','string','method','[SyncedState]:\x20received\x20rejection.','isPermissionRej','missingChangesets','[CollaborationAttachmentIoService]:\x20attachment\x20type\x20is\x20not\x20accepted.','getImage','infoRsp','RETRY_CONNECTING_MAX_COUNT','BASE64','_compressMutationService','[OfflineState]:\x20received\x20rejection.','disposeWithMe','onRemoteAck','[CollaborationEntity]:\x20initial\x20state\x20has\x20been\x20created\x20before.\x20You\x20should\x20not\x20call\x20\x22init\x22\x20twice.','_throwTelemetryCollaborationNewChangeset','/universer-api/stream/file/upload','_revisionService','objectType','getInterceptPoints','iterator','unit','startsWith','object','PERSON','\x0aAfter:\x20','LEAVE','People','_clearCollaborationTimeoutTimer','collaMsg','ERROR_IMAGE_TYPE','updateOfflineData','getConfig','unsubscribe','newCsEvent','_socketMessageSubscription','endpointKey','onMissedChangesetFetched','onTransformRemoteChangesetByStateCache','193fVfjOC','reduce','saveSnapshot','catch','onTransformIME','CHANGESET_ACK','refreshPermission','_networkConditionService','onMutationExecutedForCollab','state','memberID','_transformService','collaboration-client.config','getWorkbookSelections','editingUnit','getCollabEntity','_getRedoStack','collaboration_new_changeset','_undoRedoService','_unitLoaded$','disableLocalCache','_onMessage','getSheetId','[FetchMissState]:\x20missing\x20changesets\x20response\x20still\x20has\x20revision\x20gaps.','CHANGESET_REJ','_syncEditingCollabCursor','_identity','_snapshotService','_roomMembers','_substituteUndoStack','retryCount','_onConnectionFailed','_initRequestHeader','2651884vOsnkv','7051384qYhQyW','_sendingTimer','snapshotServerUrl','version','[CollaborationSessionService]','[CollaborationEntity]','_onRecvEvent','REMOTE_UNISCRIPT_EXECUTION_ENDPOINT','_collaborationSessionService','_collaborationTimeoutTimer','toPrimitive','authzUrl','subUnitId','_executeRemoteChangeset','_sessions','collabSubmitChangesetUrl','appendMutation','socketService','_onRemoteRejected','?size=','[SyncedState]:\x20received\x20acknowledgement.','socket$','readAsDataURL','_localCacheService','hostname','JOIN','_getDownloadEndpointURL','socketReady','_replayCachedMutations','getDeserializedSheetBlock','change$','getAllMembers','AWAITING_WITH_PENDING','CONFLICT','m2Prime','sheets','_createSession','JOIN_ROOM_FAILED','put','originalMeta','blockRanges','submit\x20changeset\x20error!','_members','onTransformRemoteChangesetByIMECache','_awaitingChangeset','[CollaborationController]:\x20invalid\x20univer\x20type:\x20','sendChangesetTimeout','_commentUpdate$','SNAPSHOT_URL_KEY','_onRemoteRetry','roles','init','_checkMissing','_commentService','deepClone','UNISCRIPT_RUN','[CollaborationEntity]:\x20invalid\x20state\x20transition!\x20State\x20transferred\x20from\x20is\x20not\x20the\x20current\x20state.\x0aBefore:\x20','_transitionLocked','[PendingState]:\x20unhandled\x20univer\x20type:\x20','[PendingState]:\x20received\x20rejection.','_unitInfo$','_clearRetryConnectingTimer','/universer-api/comb','_remoteChangesetQueue','[ConflictState]:\x20invalid\x20calling\x20to\x20`resend`.','roomInfos','length','Cannot\x20assemble\x20a\x20changeset\x20from\x20multiple\x20mutations\x20of\x20different\x20types:\x20','retryConnectingInterval','_submitChangeset','/block/','isArray','_injector','awaiting','createSocket','fetchThroughInterceptors','_doCreateSocket','csRejEvent','_logService','closeSession','c2Prime','unitInfo$','getTypeOfUnitDisposed$','setCfgEnableObjInherit','fetching\x20missing\x20changesets\x20from\x20','next','eventID','PERMISSION_DENIED','_getAPIPrefixPath','update','_schedule','now','NO_OTHER_CLIENTS_EDITING','\x20in\x20_schedule.','params','copyFileMeta','candidateSocket','__Key__','registerHTTPInterceptor','MUTATION','target','[DataLoaderService]','UUID','JOINING','_transformSelections','actions','connection\x20error','SUBMIT_CHANGESET','/universer-api/authz','override','_resolveSessionIdentity','PSEUDO_FETCH_MISSING_RESULT','list','unknown','setWaitCount','_getUploadFileURL','putCollaborators','slice','debug','backupOfflineData','HEARTBEAT_INTERVAL','2802170dplRZo','_singleActiveUnitService','getSheetBlock','includes','leaveEvent','subject','awaiting_with_pending','body','USERS_ENTER','UNIVER_COLLABORATION_CLIENT_PLUGIN','collabWebSocketUrl','location','SOCKET_FAILED','commentUpdate$','getImageSourceCache','_getCtorByUniverInstanceType','[FetchMissState]','_onUserJoin','_applyRemoteChangeset','updatePermissionPoint','[FetchingMissState]:\x20not\x20expected\x20to\x20receive\x20ack\x20when\x20`this._awaitingChangeset`\x20is\x20null!','transformChangesets','getMember','_adapter','resolve','from','symbol','routeKey','enableOfflineEditing','socketMessageSubscription','[FetchingMissState]:\x20invalid\x20calling\x20to\x20`resend`.','_pendingSessions','LIVESHARE_REQUEST_HOST','then','localUnitId','COMMENT_UPDATE','map','dispose$','entries','socket\x20close','_onUserLeave','toString','docStateChange$','floor','[CollaborationSocketService]:\x20failed\x20to\x20create\x20socket!','loadUnitOfRevision','FETCH_MISSING','_sender','_handlerCallback','sort','status'];_0x2699=function(){return _0x10921d;};return _0x2699();}import{CommandType as _0x459936,DependentOn as _0x448075,Disposable as _0x5af3d8,DisposableCollection as _0x38ef99,IAuthzIoService as _0x15b06a,ICommandService as _0xdb365f,IConfigService as _0x39e8ee,IContextService as _0x52f7ed,IImageIoService as _0x3360d2,ILogService as _0x3efc4d,IMentionIOService as _0x174385,IPermissionService as _0x5a8b72,IUndoRedoService as _0x3ec71c,IUniverInstanceService as _0x4a3eaa,ImageSourceType as _0x14dae6,ImageUploadStatusType as _0x9e94a,Inject as _0x17057e,Injector as _0x346ad7,JSONX as _0x1a46f0,LocalUndoRedoService as _0x2600d3,LocaleService as _0xc4a55f,MentionType as _0x117e44,Optional as _0x48242e,Plugin as _0xd08f3f,Quantity as _0x39c84c,Rectangle as _0x1155df,RxDisposable as _0x57b019,Tools as _0x26ff2b,UniverInstanceType as _0x51bdab,UserManagerService as _0x5dc14f,Workbook as _0x3f5b28,createIdentifier as _0x3a76ad,generateRandomId as _0x1f7675,isInternalEditorID as _0xfbb9de,merge as _0x3cc59d,mergeOverrideWithDependencies as _0x4eac85,registerDependencies as _0x29b435,resolveWithBasePath as _0x52c301,sequenceExecute as _0x31dabd,toDisposable as _0x28ef5c,touchDependencies as _0xa3b29f}from'@univerjs/core';import{DocStateChangeManagerService as _0x16ea30,RichTextEditingMutation as _0x520df5}from'@univerjs/docs';import{InsertSheetMutation as _0x5d986e,SetSelectionsOperation as _0xacf3a9,SheetPermissionInitController as _0x541c12,SheetsSelectionsService as _0x5ca689,WorkbookEditablePermission as _0x424e79}from'@univerjs/sheets';import{BehaviorSubject as _0xdf7e62,ReplaySubject as _0x308a5d,Subject as _0x4301b4,concatMap as _0x36b238,firstValueFrom as _0x1f8387,map as _0x374338,merge as _0x123d67,of as _0x2031cc,shareReplay as _0x5a2c81,take as _0x2d16fe,takeUntil as _0x1a7089}from'rxjs';import{CmdRspCode as _0x2b2822,CombCmd as _0x6e704b,ErrorCode as _0x9d8468,FileSource as _0x254240}from'@univerjs/protocol';import{ITelemetryService as _0x2b2645}from'@univerjs/telemetry';import{delay as _0xb401f1,filter as _0x2cbad7,map as _0x12aa0e,take as _0x411165,takeUntil as _0x1c3f84}from'rxjs/operators';import{AddSlidePageMutation as _0xa104c5,EnsureSlideMasterPageMutation as _0x3a316a,MoveSlidePageMutation as _0x458bda,RemoveSlidePageMutation as _0x5bb114}from'@univerjs-pro/slides';import{HTTPRequest as _0x34760a,HTTPService as _0x340ce5,ISocketService as _0x12b950,MergeInterceptorFactory as _0x3bb06f,ThresholdInterceptorFactory as _0x16d444,UniverNetworkPlugin as _0x113f06}from'@univerjs/network';import{UniverLicensePlugin as _0x2b8da7,getGlobalObject as _0x12bc02}from'@univerjs-pro/license';import{cbc as _0x52616c}from'@noble/ciphers/aes.js';import{concatBytes as _0x33086b,randomBytes as _0x1fc815,utf8ToBytes as _0x47a29a}from'@noble/ciphers/utils.js';import{DRAWING_IMAGE_ALLOW_IMAGE_LIST as _0xf74efc,getDrawingImageAllowSize as _0x236ef3}from'@univerjs/drawing';const R='collaboration-client.config',ft={},pt=_0x2e02fc(0x2fb),mt=_0x2e02fc(0x2b9),ht='HEARTBEAT_INTERVAL',gt=_0x2e02fc(0x21e),_t=_0x2e02fc(0xca),vt=_0x2e02fc(0x2aa),yt=0x3e8,bt=_0x2e02fc(0x112),xt='/universer-api/uniscript';function St(_0x50ebac){const _0x2bed7f=_0x2e02fc;return JSON[_0x2bed7f(0xc0)](_0x50ebac)[_0x2bed7f(0x14d)];}function Ct(_0x2e2a15){'@babel/helpers - typeof';const _0x4e3b31=_0x2e02fc;return Ct=typeof Symbol==_0x4e3b31(0x233)&&typeof Symbol[_0x4e3b31(0xd6)]==_0x4e3b31(0x19e)?function(_0x3972cb){return typeof _0x3972cb;}:function(_0x29da95){const _0x37a720=_0x4e3b31;return _0x29da95&&typeof Symbol==_0x37a720(0x233)&&_0x29da95[_0x37a720(0x1f0)]===Symbol&&_0x29da95!==Symbol[_0x37a720(0x30f)]?'symbol':typeof _0x29da95;},Ct(_0x2e2a15);}function wt(_0x3f85c8,_0x4bf8c0){const _0x49b8ff=_0x2e02fc;if(Ct(_0x3f85c8)!=_0x49b8ff(0xd9)||!_0x3f85c8)return _0x3f85c8;var _0x2615f6=_0x3f85c8[Symbol[_0x49b8ff(0x115)]];if(_0x2615f6!==void 0x0){var _0x28b9bf=_0x2615f6['call'](_0x3f85c8,_0x4bf8c0||'default');if(Ct(_0x28b9bf)!=_0x49b8ff(0xd9))return _0x28b9bf;throw TypeError(_0x49b8ff(0x26c));}return(_0x4bf8c0==='string'?String:Number)(_0x3f85c8);}function Tt(_0x234ff3){const _0x2d3a51=_0x2e02fc;var _0x2673ae=wt(_0x234ff3,_0x2d3a51(0xc2));return Ct(_0x2673ae)=='symbol'?_0x2673ae:_0x2673ae+'';}function z(_0x355053,_0x5afa4a,_0x3d56c1){const _0x34192c=_0x2e02fc;return(_0x5afa4a=Tt(_0x5afa4a))in _0x355053?Object[_0x34192c(0x227)](_0x355053,_0x5afa4a,{'value':_0x3d56c1,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x355053[_0x5afa4a]=_0x3d56c1,_0x355053;}let Et=function(_0x62b7c2){const _0x243520=_0x2e02fc;return _0x62b7c2['OTHER_CLIENT_EDITING']=_0x243520(0x2e0),_0x62b7c2[_0x243520(0x162)]='PERMISSION_DENIED',_0x62b7c2['CONFLICT']='CONFLICT',_0x62b7c2[_0x243520(0x256)]=_0x243520(0x256),_0x62b7c2['JOIN_ROOM_FAILED']=_0x243520(0x130),_0x62b7c2[_0x243520(0x2e6)]='SOCKET_FAILED_RETRY',_0x62b7c2['SOCKET_FAILED']=_0x243520(0x190),_0x62b7c2[_0x243520(0x243)]=_0x243520(0x243),_0x62b7c2;}({});var B=class{constructor(){const _0x17dc7e=_0x2e02fc;z(this,'_event$',new _0x4301b4()),z(this,_0x17dc7e(0x83),this['_event$'][_0x17dc7e(0x1d9)]());}['emitEvent'](_0x3eb4e1){const _0x11afd1=_0x2e02fc;this[_0x11afd1(0x314)][_0x11afd1(0x160)](_0x3eb4e1);}},Dt=class{constructor(){const _0x473f8d=_0x2e02fc;z(this,_0x473f8d(0x13a),new _0x4301b4()),z(this,_0x473f8d(0x191),this[_0x473f8d(0x13a)][_0x473f8d(0x1d9)]());}[_0x2e02fc(0x99)](_0x12ed87){const _0x630ead=_0x2e02fc;this[_0x630ead(0x13a)][_0x630ead(0x160)](_0x12ed87);}};function V(_0x49e5f8,_0x4b0901){return function(_0x5f8f06,_0x354cde){_0x4b0901(_0x5f8f06,_0x354cde,_0x49e5f8);};}function H(_0x1ededa,_0xe2901f,_0x42aaea,_0x356eb0){const _0x19ed33=_0x2e02fc;var _0x131c11=arguments[_0x19ed33(0x14d)],_0x1f7ee5=_0x131c11<0x3?_0xe2901f:_0x356eb0===null?_0x356eb0=Object['getOwnPropertyDescriptor'](_0xe2901f,_0x42aaea):_0x356eb0,_0x43ac86;if(typeof Reflect==_0x19ed33(0xd9)&&typeof Reflect[_0x19ed33(0x231)]=='function')_0x1f7ee5=Reflect['decorate'](_0x1ededa,_0xe2901f,_0x42aaea,_0x356eb0);else{for(var _0x4aea2a=_0x1ededa[_0x19ed33(0x14d)]-0x1;_0x4aea2a>=0x0;_0x4aea2a--)(_0x43ac86=_0x1ededa[_0x4aea2a])&&(_0x1f7ee5=(_0x131c11<0x3?_0x43ac86(_0x1f7ee5):_0x131c11>0x3?_0x43ac86(_0xe2901f,_0x42aaea,_0x1f7ee5):_0x43ac86(_0xe2901f,_0x42aaea))||_0x1f7ee5);}return _0x131c11>0x3&&_0x1f7ee5&&Object[_0x19ed33(0x227)](_0xe2901f,_0x42aaea,_0x1f7ee5),_0x1f7ee5;}let Ot=class extends _0x5af3d8{constructor(_0x3309b7){const _0x52ce3a=_0x2e02fc;super(),this[_0x52ce3a(0x2eb)]=_0x3309b7,z(this,_0x52ce3a(0x105),new Map()),z(this,_0x52ce3a(0xbf),new _0x4301b4()),this['disposeWithMe'](_0x123d67(this[_0x52ce3a(0x2eb)][_0x52ce3a(0x15d)](_0x51bdab[_0x52ce3a(0x266)])[_0x52ce3a(0x31f)](_0x12aa0e(_0x3bc861=>_0x3bc861['getUnitId']())),this[_0x52ce3a(0x2eb)]['getTypeOfUnitDisposed$'](_0x51bdab[_0x52ce3a(0x312)])[_0x52ce3a(0x31f)](_0x12aa0e(_0x3177f0=>_0x3177f0['getUnitId']())),this[_0x52ce3a(0x2eb)][_0x52ce3a(0x15d)](_0x51bdab[_0x52ce3a(0x93)])[_0x52ce3a(0x31f)](_0x12aa0e(_0x303046=>_0x303046['getUnitId']())),this[_0x52ce3a(0x2eb)][_0x52ce3a(0x15d)](_0x51bdab[_0x52ce3a(0x1c0)])[_0x52ce3a(0x31f)](_0x12aa0e(_0x4656ec=>_0x4656ec[_0x52ce3a(0x2a9)]())))[_0x52ce3a(0x222)](_0x38e503=>this[_0x52ce3a(0xa1)](_0x38e503)));}[_0x2e02fc(0x2a5)](_0x5f3e8c){const _0x3e9530=_0x2e02fc;return this[_0x3e9530(0x105)]['has'](_0x5f3e8c)?_0x2031cc(this[_0x3e9530(0x105)][_0x3e9530(0x241)](_0x5f3e8c)):this['_roomCreated$'][_0x3e9530(0x31f)](_0x12aa0e(_0x26b99b=>{const _0x13b648=_0x3e9530;if(_0x26b99b===_0x5f3e8c)return this['_roomMembers'][_0x13b648(0x241)](_0x26b99b);}));}[_0x2e02fc(0x282)](_0x5ac5cb,_0x14259a){const _0x3ad34e=_0x2e02fc;let _0x3c0fa3=this[_0x3ad34e(0x105)][_0x3ad34e(0x241)](_0x5ac5cb);_0x3c0fa3||(_0x3c0fa3=new kt(),this['_roomMembers'][_0x3ad34e(0x2e9)](_0x5ac5cb,_0x3c0fa3),this[_0x3ad34e(0xbf)][_0x3ad34e(0x160)](_0x5ac5cb)),_0x3c0fa3[_0x3ad34e(0x282)](_0x14259a);}[_0x2e02fc(0x2a2)](_0x581469,_0x1312a5){const _0x243892=_0x2e02fc;let _0x1cd654=this['_roomMembers'][_0x243892(0x241)](_0x581469);_0x1cd654&&_0x1cd654[_0x243892(0x2a2)](_0x1312a5);}[_0x2e02fc(0x2df)](_0x415364){const _0x11a1d4=_0x2e02fc;return this['_roomMembers'][_0x11a1d4(0x241)](_0x415364);}[_0x2e02fc(0x19a)](_0x52a871,_0x2164a9){const _0x53eaea=_0x2e02fc;let _0x348b78=this[_0x53eaea(0x105)]['get'](_0x52a871);if(_0x348b78)return _0x348b78[_0x53eaea(0x19a)](_0x2164a9);}['_removeRoom'](_0x20add5){const _0x40e2a9=_0x2e02fc;let _0x408476=this[_0x40e2a9(0x105)][_0x40e2a9(0x241)](_0x20add5);_0x408476&&(_0x408476[_0x40e2a9(0x259)](),this['_roomMembers']['delete'](_0x20add5));}[_0x2e02fc(0x259)](){const _0x219cdb=_0x2e02fc;this[_0x219cdb(0x105)][_0x219cdb(0x1c7)](_0x309371=>_0x309371['dispose']()),this[_0x219cdb(0x105)][_0x219cdb(0x303)](),this[_0x219cdb(0xbf)][_0x219cdb(0xc1)]();}};Ot=H([V(0x0,_0x4a3eaa)],Ot);var kt=class extends _0x5af3d8{constructor(..._0x4d8721){const _0x22ee25=_0x2e02fc;super(..._0x4d8721),z(this,_0x22ee25(0x135),new Map()),z(this,_0x22ee25(0x28a),new _0xdf7e62(this['_members'])),z(this,_0x22ee25(0x1e6),this[_0x22ee25(0x28a)]['asObservable']());}[_0x2e02fc(0x259)](){const _0x3af947=_0x2e02fc;this['_members'][_0x3af947(0x303)](),this[_0x3af947(0x28a)][_0x3af947(0xc1)]();}['updateMember'](_0x290e28){const _0x1a17d1=_0x2e02fc;this[_0x1a17d1(0x135)][_0x1a17d1(0x2e9)](_0x290e28[_0x1a17d1(0xf3)],_0x290e28),this[_0x1a17d1(0xab)]();}['removeMember'](_0x15b98c){const _0x34b691=_0x2e02fc;this['_members'][_0x34b691(0xb4)](_0x15b98c),this[_0x34b691(0xab)]();}['getMember'](_0x4da2ce){const _0x3a769e=_0x2e02fc;return this[_0x3a769e(0x135)][_0x3a769e(0x241)](_0x4da2ce);}[_0x2e02fc(0x12a)](){const _0x2caf64=_0x2e02fc;return Array[_0x2caf64(0x19d)](this['_members'][_0x2caf64(0x2c3)]());}['_emitMembers'](){const _0x1bec65=_0x2e02fc;this[_0x1bec65(0x28a)][_0x1bec65(0x160)](this[_0x1bec65(0x135)]);}};function At(_0x26b5c6,_0x5f07c0){const _0x3a96b4=_0x2e02fc;if(Mt(_0x26b5c6))return _0x5f07c0;if(_0x5f07c0['eventID']===_0x150d16[_0x3a96b4(0x176)]){let _0x336afb=Lt(_0x26b5c6),_0x2a12e2=_0x5f07c0;return{..._0x2a12e2,'data':{..._0x2a12e2[_0x3a96b4(0xa6)],'unitID':_0x26b5c6[_0x3a96b4(0x16f)][_0x3a96b4(0x299)],'unitType':_0x26b5c6['target'][_0x3a96b4(0x297)]??_0x2a12e2['data']['unitType'],'changeset':_0x336afb[_0x3a96b4(0x290)](_0x2a12e2[_0x3a96b4(0xa6)][_0x3a96b4(0xaf)],Rt(_0x26b5c6))}};}if(_0x5f07c0[_0x3a96b4(0x161)]===_0x150d16[_0x3a96b4(0x1b2)]){let _0x20cc93=_0x5f07c0;return{..._0x20cc93,'data':{..._0x20cc93['data'],'unitID':_0x26b5c6[_0x3a96b4(0x16f)][_0x3a96b4(0x299)],'unitType':_0x26b5c6[_0x3a96b4(0x16f)][_0x3a96b4(0x297)]??_0x20cc93['data']['unitType']}};}return _0x5f07c0;}function jt(_0x323b23,_0x71616a){const _0xce8e41=_0x2e02fc;if(Mt(_0x323b23))return[_0x71616a];switch(_0x71616a[_0xce8e41(0x161)]){case _0x150d16[_0xce8e41(0x1ef)]:return[Nt(_0x323b23,_0x71616a)];case _0x150d16[_0xce8e41(0x17a)]:return[Ft(_0x323b23,_0x71616a)];case _0x150d16[_0xce8e41(0x2a3)]:return[Pt(_0x323b23,_0x71616a)];default:return[_0x71616a];}}function Mt(_0x1d011d){const _0x18bd7c=_0x2e02fc;return _0x1d011d[_0x18bd7c(0x16f)][_0x18bd7c(0x2d3)]==null&&_0x1d011d[_0x18bd7c(0x16f)][_0x18bd7c(0x299)]===_0x1d011d[_0x18bd7c(0x1a6)]&&!_0x1d011d['changeset'];}function Nt(_0x4edeb7,_0x317cb3){const _0x373acd=_0x2e02fc;return{..._0x317cb3,'data':_0xe3775b(It(_0x4edeb7,_0x93473e(_0x317cb3[_0x373acd(0xa6)])))};}function Pt(_0x1fdb5a,_0x591350){const _0xd0cad6=_0x2e02fc;return{..._0x591350,'data':It(_0x1fdb5a,_0x591350[_0xd0cad6(0xa6)])};}function Ft(_0x473f5a,_0x399e1b){const _0xa6ad28=_0x2e02fc;let _0x39a621=_0x399e1b[_0xa6ad28(0xa6)];return{..._0x399e1b,'data':{..._0x39a621,'changesets':_0x39a621[_0xa6ad28(0x322)][_0xa6ad28(0x1a8)](_0x4e5b9e=>_0xe3775b(It(_0x473f5a,_0x93473e(_0x4e5b9e))))}};}function It(_0x178bd2,_0x791029){const _0x3a1bf0=_0x2e02fc;return Lt(_0x178bd2)[_0x3a1bf0(0x1ea)](_0x791029,Rt(_0x178bd2));}function Lt(_0x46443d){const _0x684353=_0x2e02fc;if(!_0x46443d[_0x684353(0xaf)])throw Error(_0x684353(0x285));return _0x46443d[_0x684353(0xaf)];}function Rt(_0x2f8c22){const _0x200526=_0x2e02fc;return{'localUnitId':_0x2f8c22[_0x200526(0x1a6)],'unitType':_0x2f8c22[_0x200526(0x297)],'target':_0x2f8c22[_0x200526(0x16f)]};}let zt=function(_0x1b2816){const _0x499592=_0x2e02fc;return _0x1b2816[_0x1b2816[_0x499592(0x2b6)]=0x0]=_0x499592(0x2b6),_0x1b2816[_0x1b2816[_0x499592(0x172)]=0x1]='JOINING',_0x1b2816[_0x1b2816[_0x499592(0x272)]=0x2]=_0x499592(0x272),_0x1b2816[_0x1b2816[_0x499592(0x90)]=0x3]='ONLINE',_0x1b2816;}({});const Bt={[_0x2b2822[_0x2e02fc(0x28b)]]:_0x2e02fc(0x328),[_0x2b2822[_0x2e02fc(0x311)]]:'session.room-full',[_0x2b2822[_0x2e02fc(0x2bb)]]:'session.room-not-exists',[_0x2b2822['JOIN_ROOM_PERMISSION_DENIED']]:_0x2e02fc(0x31d),[_0x2b2822[_0x2e02fc(0x1d7)]]:_0x2e02fc(0x2b2)};let Vt=class extends _0x57b019{get['sessionStatus'](){const _0x2f2d5b=_0x2e02fc;return this[_0x2f2d5b(0x29c)][_0x2f2d5b(0x279)]();}constructor(_0x1e9b10,_0x399704,_0x589d21,_0x11d6e4,_0x25688b,_0x56cc3d,_0x3eb06c,_0xeb1bd7){const _0x2904cc=_0x2e02fc;super(),this[_0x2904cc(0x103)]=_0x1e9b10,this[_0x2904cc(0x159)]=_0x589d21,this[_0x2904cc(0x24e)]=_0x11d6e4,this['_memberService']=_0x25688b,this[_0x2904cc(0x140)]=_0x56cc3d,this[_0x2904cc(0x23c)]=_0x3eb06c,this['_telemetryService']=_0xeb1bd7,z(this,'_sessionStatus$',new _0xdf7e62(0x0)),z(this,_0x2904cc(0xbe),this['_sessionStatus$'][_0x2904cc(0x1d9)]()),z(this,_0x2904cc(0x314),new _0x4301b4()),z(this,_0x2904cc(0x83),this[_0x2904cc(0x314)][_0x2904cc(0x1d9)]()),z(this,'_socket',void 0x0),z(this,_0x2904cc(0xe5),void 0x0),z(this,'_collaborationTimeoutTimer',void 0x0),z(this,_0x2904cc(0x327),!0x1),z(this,_0x2904cc(0x1dc),null),this[_0x2904cc(0x327)]=!!this[_0x2904cc(0x301)],_0x399704['pipe'](_0x1a7089(this[_0x2904cc(0x1a9)]))[_0x2904cc(0x222)](_0x2bc18c=>{const _0x461ffd=_0x2904cc;if(_0x2bc18c!==void 0x0){if(this[_0x461ffd(0x278)]=_0x2bc18c,_0x2bc18c)this[_0x461ffd(0x30d)](_0x2bc18c),this[_0x461ffd(0xe5)]=_0x2bc18c[_0x461ffd(0x2a7)][_0x461ffd(0x222)](_0x96aef6=>{const _0x55b5cf=_0x461ffd;_0x96aef6['routeKey']===this[_0x55b5cf(0x103)]['target'][_0x55b5cf(0x299)]&&this[_0x55b5cf(0x257)](_0x96aef6);});else{var _0x3dcc08;this[_0x461ffd(0xd1)](),this[_0x461ffd(0x29c)][_0x461ffd(0x160)](0x2),(_0x3dcc08=this[_0x461ffd(0xe5)])==null||_0x3dcc08[_0x461ffd(0xe3)](),this[_0x461ffd(0xe5)]=null;}}});}['getMemberID'](){const _0x579175=_0x2e02fc;var _0x27c048;return((_0x27c048=this[_0x579175(0x278)])==null?void 0x0:_0x27c048[_0x579175(0xf3)])??null;}[_0x2e02fc(0x259)](){const _0x286779=_0x2e02fc;super['dispose'](),this[_0x286779(0x28d)](),this['dispose$'][_0x286779(0x160)](),this['dispose$'][_0x286779(0xc1)]();}['close'](){const _0x2221d3=_0x2e02fc;var _0x4024e7;this[_0x2221d3(0xd1)](),(_0x4024e7=this[_0x2221d3(0x278)])==null||_0x4024e7[_0x2221d3(0x1fc)]({'cmd':_0x6e704b[_0x2221d3(0xdc)],'data':{'roomID':this[_0x2221d3(0x103)][_0x2221d3(0x16f)][_0x2221d3(0x299)]}}),this[_0x2221d3(0x314)]['complete'](),this['_sessionStatus$'][_0x2221d3(0xc1)]();}['_onCombEvent'](_0x1334e8){const _0x103eb5=_0x2e02fc;_0x1334e8[_0x103eb5(0x2d6)]===_0x6e704b['JOIN']?this['_onJoinRoomEvent'](_0x1334e8):_0x1334e8[_0x103eb5(0x2d6)]===_0x6e704b[_0x103eb5(0x2a6)]&&this[_0x103eb5(0x111)](_0x1334e8);}[_0x2e02fc(0x30d)](_0x4e7045){const _0x20ae5b=_0x2e02fc;this[_0x20ae5b(0x29c)][_0x20ae5b(0x160)](0x1),_0x4e7045[_0x20ae5b(0x1fc)]({'cmd':_0x6e704b[_0x20ae5b(0x124)],'routeKey':this[_0x20ae5b(0x103)][_0x20ae5b(0x16f)][_0x20ae5b(0x299)],'routeType':'','data':{'rooms':[{'roomID':this[_0x20ae5b(0x103)]['target']['unitId']}]}});}[_0x2e02fc(0x208)](_0x33f199){const _0x1126de=_0x2e02fc;var _0x5c381e;if(_0x33f199['code']in Bt){this[_0x1126de(0x23c)]['emitEvent']({'id':'JOIN_ROOM_FAILED','data':Bt[_0x33f199[_0x1126de(0x22a)]]}),this[_0x1126de(0x29c)][_0x1126de(0x160)](0x2);return;}this['_sessionStatus$'][_0x1126de(0x160)](0x3);let _0x5d2fa0=(_0x5c381e=_0x33f199[_0x1126de(0xa6)][_0x1126de(0x14c)][this[_0x1126de(0x103)][_0x1126de(0x16f)][_0x1126de(0x299)]])==null?void 0x0:_0x5c381e[_0x1126de(0x24c)];_0x5d2fa0&&_0x5d2fa0[_0x1126de(0x1c7)](_0x50e2aa=>this[_0x1126de(0xba)][_0x1126de(0x282)](this[_0x1126de(0x103)][_0x1126de(0x1a6)],_0x50e2aa));}[_0x2e02fc(0x111)](_0x5312e9){const _0x2adfd7=_0x2e02fc;try{let _0x50bad9=jt(this[_0x2adfd7(0x103)],_0x5312e9[_0x2adfd7(0xa6)]);for(let _0x3f5839 of _0x50bad9)switch(_0x3f5839[_0x2adfd7(0x161)]){case _0x150d16['USERS_ENTER']:this[_0x2adfd7(0x195)](_0x3f5839),this[_0x2adfd7(0x314)][_0x2adfd7(0x160)](_0x3f5839);break;case _0x150d16[_0x2adfd7(0xa7)]:this['_onUserLeave'](_0x3f5839),this[_0x2adfd7(0x314)][_0x2adfd7(0x160)](_0x3f5839);break;case _0x150d16[_0x2adfd7(0xee)]:case _0x150d16[_0x2adfd7(0x2a3)]:this[_0x2adfd7(0x1ee)](),this[_0x2adfd7(0xde)](),this['_event$'][_0x2adfd7(0x160)](_0x3f5839);break;case _0x150d16[_0x2adfd7(0x1bb)]:this[_0x2adfd7(0x159)][_0x2adfd7(0x2cd)](_0x2adfd7(0x296)+JSON[_0x2adfd7(0xc0)](_0x3f5839)),this[_0x2adfd7(0x314)][_0x2adfd7(0x160)](_0x3f5839);break;case _0x150d16[_0x2adfd7(0x1a7)]:this[_0x2adfd7(0x140)][_0x2adfd7(0x99)](_0x3f5839[_0x2adfd7(0xa6)]),this[_0x2adfd7(0x314)][_0x2adfd7(0x160)](_0x3f5839);break;default:this['_event$'][_0x2adfd7(0x160)](_0x3f5839);}}catch(_0x2c5d6b){this[_0x2adfd7(0x159)][_0x2adfd7(0x2cd)](_0x2c5d6b,_0x5312e9);}}[_0x2e02fc(0x195)](_0x58ff25){const _0x53252d=_0x2e02fc;this[_0x53252d(0xba)][_0x53252d(0x282)](this['_identity'][_0x53252d(0x1a6)],_0x58ff25['data']);}[_0x2e02fc(0x1ac)](_0x256968){const _0xfd5619=_0x2e02fc;this[_0xfd5619(0xba)]['removeMember'](this['_identity'][_0xfd5619(0x1a6)],_0x256968[_0xfd5619(0xa6)]['memberID']);}async[_0x2e02fc(0x1fc)](_0x13b498,_0x1601c7){const _0x5bdc90=_0x2e02fc;if(this[_0x5bdc90(0x265)]!==0x3||!this[_0x5bdc90(0x278)])throw Error(_0x5bdc90(0x2e1));try{let _0x2725bd=At(this[_0x5bdc90(0x103)],_0x13b498);_0x2725bd['eventID']===_0x150d16[_0x5bdc90(0x176)]&&(this[_0x5bdc90(0x31b)](),this['_startTelemetryCollaborationNewChangeset'](_0x2725bd)),this[_0x5bdc90(0x278)][_0x5bdc90(0x1fc)]({'cmd':_0x6e704b[_0x5bdc90(0x7f)],'routeKey':this[_0x5bdc90(0x103)][_0x5bdc90(0x16f)][_0x5bdc90(0x299)],'routeType':'','data':_0x2725bd});}catch(_0x38a29f){this[_0x5bdc90(0x159)][_0x5bdc90(0x2cd)](_0x38a29f);}}['_scheduleCollaborationTimeoutTimer'](){const _0x7a924a=_0x2e02fc;this[_0x7a924a(0x114)]=setTimeout(()=>{const _0x5055c8=_0x7a924a;this[_0x5055c8(0x114)]=null,this[_0x5055c8(0x23c)][_0x5055c8(0x1ba)]({'id':_0x5055c8(0x243)});},this['_configService'][_0x7a924a(0xe2)](_0x7a924a(0x21e))??0x4e20);}[_0x2e02fc(0xde)](){const _0x53d0e5=_0x2e02fc;this['_collaborationTimeoutTimer']&&=(clearTimeout(this[_0x53d0e5(0x114)]),null);}[_0x2e02fc(0x8c)](_0x3df41f){const _0x1a9722=_0x2e02fc;if(!this[_0x1a9722(0x327)])return;let {data:_0x2a6094}=_0x3df41f,{unitID:_0x4406f8,changeset:_0x174a38}=_0x2a6094,{mutations:_0x4f99fd,type:_0x2e47b9}=_0x174a38;this[_0x1a9722(0x1dc)]={'unitId':_0x4406f8,'type':_0x2e47b9,'startTime':performance[_0x1a9722(0x166)](),'stopTime':0x0,'duration':0x0,'size':St(_0x4f99fd)};}['_stopTelemetryCollaborationNewChangeset'](){const _0xc0012c=_0x2e02fc;if(this[_0xc0012c(0x327)]){if(!this['_telemetryInfo']){this[_0xc0012c(0x159)][_0xc0012c(0x2cd)](_0xc0012c(0xb8),_0xc0012c(0x2e7));return;}this[_0xc0012c(0x1dc)][_0xc0012c(0x2db)]=performance[_0xc0012c(0x166)](),this[_0xc0012c(0x1dc)][_0xc0012c(0x25a)]=this[_0xc0012c(0x1dc)][_0xc0012c(0x2db)]-this[_0xc0012c(0x1dc)][_0xc0012c(0xa2)],this[_0xc0012c(0x301)][_0xc0012c(0x2f0)](_0xc0012c(0xfa),this[_0xc0012c(0x1dc)]),this[_0xc0012c(0x1dc)]=null;}}[_0x2e02fc(0xd1)](){const _0x460d8f=_0x2e02fc;this[_0x460d8f(0x1dc)]=null;}};Vt=H([V(0x2,_0x3efc4d),V(0x3,_0x39e8ee),V(0x4,_0x17057e(Ot)),V(0x5,_0x17057e(Dt)),V(0x6,_0x17057e(B)),V(0x7,_0x48242e(_0x2b2645))],Vt);const U=_0x3a76ad(_0x2e02fc(0x2f8));function Ht(_0x3b2cb3){const _0x1b3a9f=_0x2e02fc;return _0x1b3a9f(0x2d5)+_0x3b2cb3;}function Ut(_0x5784a7){const _0x5a795e=_0x2e02fc;let {unitID:_0x10c9a2,mutations:_0xe8a80c}=_0x5784a7;return{'unitId':_0x10c9a2,'subUnitId':_0xe8a80c[_0x5a795e(0x14d)]>0x0?_0xe8a80c[0x0][_0x5a795e(0x169)][_0x5a795e(0x117)]:null};}let Wt=class{constructor(_0x23fda1,_0x37c992,_0x2a8026){const _0x29dac9=_0x2e02fc;this[_0x29dac9(0x153)]=_0x23fda1,this[_0x29dac9(0xf4)]=_0x37c992,this[_0x29dac9(0x2dc)]=_0x2a8026;}[_0x2e02fc(0x2e2)](_0x57c622){const _0x50e478=_0x2e02fc;var _0x38863b,_0x2efbd5;let _0x334ba9=this[_0x50e478(0x153)]['get'](_0x5ca689),{unitId:_0x14b51e,subUnitId:_0x2cdc23}=Ut(_0x57c622),_0x3a6f8f=_0x334ba9==null?void 0x0:_0x334ba9[_0x50e478(0xf6)](_0x14b51e)[_0x50e478(0x1cf)](),_0x68402c=(_0x38863b=this[_0x50e478(0x2dc)]['getUnit'](_0x14b51e))==null||(_0x38863b=_0x38863b['getActiveSheet']())==null?void 0x0:_0x38863b[_0x50e478(0xff)]();if(_0x3a6f8f[_0x50e478(0x14d)]===0x0||!_0x14b51e||!_0x2cdc23)return;let _0x3fe282=[{'id':_0xacf3a9['id'],'params':{'unitId':_0x14b51e,'subUnitId':_0x68402c,'selections':_0x26ff2b[_0x50e478(0x141)](_0x3a6f8f)}}],_0x4f7baf=this['_transformService'][_0x50e478(0x21d)](_0x57c622,_0x3fe282);if(!_0x2eee33(_0x4f7baf))throw _0x4f7baf[_0x50e478(0x2cd)];let _0x4553b5=(_0x2efbd5=_0x4f7baf[_0x50e478(0x12d)][0x0])==null||(_0x2efbd5=_0x2efbd5[_0x50e478(0x169)])==null?void 0x0:_0x2efbd5[_0x50e478(0x2e8)];if(Array[_0x50e478(0x152)](_0x4553b5)&&_0x4553b5['length']){if(_0x4553b5[_0x50e478(0x14d)]===_0x3fe282[0x0][_0x50e478(0x169)][_0x50e478(0x2e8)]['length']&&_0x4553b5[_0x50e478(0x2ba)]((_0x5e3b39,_0x567b31)=>_0x1155df['equals'](_0x5e3b39[_0x50e478(0xb9)],_0x3fe282[0x0][_0x50e478(0x169)]['selections'][_0x567b31][_0x50e478(0xb9)])))return;this[_0x50e478(0x153)][_0x50e478(0x241)](_0xdb365f)['executeCommand'](_0xacf3a9['id'],{'unitId':_0x14b51e,'subUnitId':_0x68402c,'selections':_0x4553b5});}}};Wt=H([V(0x0,_0x17057e(_0x346ad7)),V(0x1,_0x40dc20),V(0x2,_0x4a3eaa)],Wt);const W=_0x3a76ad(_0x2e02fc(0x320));let Gt=function(_0x428a1f){const _0x46c99c=_0x2e02fc;return _0x428a1f[_0x428a1f[_0x46c99c(0x167)]=0x0]=_0x46c99c(0x167),_0x428a1f[_0x428a1f['OTHER_CLIENTS_EDITING']=0x1]='OTHER_CLIENTS_EDITING',_0x428a1f;}({});function Kt(_0xa58ee2){const _0x255aa8=_0x2e02fc;var _0x402f4e;return!!((_0x402f4e=_0xa58ee2[_0x255aa8(0x169)])!=null&&_0x402f4e['__splitChunk__']);}const qt=new Set([_0x5d986e['id']]),Jt=new Set([_0xa104c5['id'],_0x3a316a['id'],_0x458bda['id'],_0x5bb114['id']]);function Yt(_0x252ddb,_0x2833de=qt){const _0x3d4b74=_0x2e02fc;let _0x1fa24d=[];for(let _0x433697 of _0x252ddb){if(_0x2833de['has'](_0x433697['id'])){if(_0x1fa24d[_0x3d4b74(0x14d)]>0x0)break;_0x1fa24d[_0x3d4b74(0x2b8)](_0x433697);break;}if(Kt(_0x433697)){if(_0x1fa24d['length']>0x0)break;_0x1fa24d[_0x3d4b74(0x2b8)](_0x433697);break;}_0x1fa24d['push'](_0x433697);}return _0x1fa24d;}function Xt(_0x1a0d1e,_0x4bab8c,_0x5a2a40,_0x4d0df2,_0x5cd361){const _0x2ee092=_0x2e02fc;let _0x2eb6d1=Yt(_0x1a0d1e),_0x5587a0=_0x5cd361[_0x2ee092(0x202)](),_0x4cffa1=(_0x5587a0==null?void 0x0:_0x5587a0[_0x2ee092(0x2b4)])??_0x2ee092(0x17c),_0x28c4fc=(_0x5587a0==null?void 0x0:_0x5587a0[_0x2ee092(0xf3)])??_0x2ee092(0x17c);return{'changeset':{'unitID':_0x4bab8c,'type':_0x2c0a6c(_0x5a2a40[_0x2ee092(0x204)](_0x4bab8c)),'baseRev':_0x4d0df2[_0x2ee092(0x264)](_0x4bab8c),'revision':0x0,'userID':_0x4cffa1,'memberID':_0x28c4fc,'mutations':_0x2eb6d1},'pendingMutations':_0x1a0d1e[_0x2ee092(0x180)](_0x2eb6d1['length'])};}const Zt=Xt;function Qt(_0x65707c,_0x1a9bf1,_0x6f5d01,_0x3aae2c,_0x1b1c2d){const _0xc3f1d8=_0x2e02fc;let _0xdd2e32=Yt(_0x65707c,Jt),_0x2a9447=_0x1b1c2d[_0xc3f1d8(0x202)](),_0x455471=(_0x2a9447==null?void 0x0:_0x2a9447[_0xc3f1d8(0x2b4)])??_0xc3f1d8(0x17c),_0x1435a9=(_0x2a9447==null?void 0x0:_0x2a9447['memberID'])??_0xc3f1d8(0x17c);return{'changeset':{'unitID':_0x1a9bf1,'type':_0x2c0a6c(_0x6f5d01[_0xc3f1d8(0x204)](_0x1a9bf1)),'baseRev':_0x3aae2c[_0xc3f1d8(0x264)](_0x1a9bf1),'revision':0x0,'userID':_0x455471,'memberID':_0x1435a9,'mutations':_0xdd2e32},'pendingMutations':_0x65707c['slice'](_0xdd2e32[_0xc3f1d8(0x14d)])};}function $t(_0x1a2005,_0x103cef,_0x5aca79,_0x330f88,_0xe64b44){const _0x361acd=_0x2e02fc;let _0x1b6fdb=_0x1a2005[_0x361acd(0xea)]((_0x20130b,_0x1615f9)=>{const _0x3a9796=_0x361acd;let _0x28a31f=_0x20130b[_0x20130b[_0x3a9796(0x14d)]-0x1],{id:_0xa66476}=_0x28a31f??{},{id:_0x424523,type:_0x217960}=_0x1615f9,_0x1b25a5=_0x1615f9[_0x3a9796(0x169)];if(_0xa66476&&_0xa66476!==_0x424523)throw Error(_0x3a9796(0x14e)+_0xa66476+'\x20-\x20'+_0x424523+'.');if(!_0x28a31f)return[{'id':_0x424523,'type':_0x217960,'params':{'unitId':_0x1b25a5[_0x3a9796(0x299)],'textRanges':_0x1b25a5['textRanges'],'actions':_0x1b25a5[_0x3a9796(0x174)]}}];let _0x301413=_0x28a31f['params'];return en(_0x301413,_0x1b25a5)?[..._0x20130b[_0x3a9796(0x180)](0x0,-0x1),{..._0x28a31f,'id':_0x424523,'type':_0x217960,'params':{'unitId':_0x1b25a5[_0x3a9796(0x299)],'textRanges':_0x1b25a5[_0x3a9796(0x209)],'actions':_0x1a46f0[_0x3a9796(0x240)](_0x301413[_0x3a9796(0x174)],_0x1b25a5[_0x3a9796(0x174)])}}]:[..._0x20130b,{'id':_0x424523,'type':_0x217960,'params':{'unitId':_0x1b25a5[_0x3a9796(0x299)],'textRanges':_0x1b25a5[_0x3a9796(0x209)],'actions':_0x1b25a5['actions']}}];},[]),_0x55c4cc=_0xe64b44[_0x361acd(0x202)](),_0x580e6b=(_0x55c4cc==null?void 0x0:_0x55c4cc[_0x361acd(0x2b4)])??_0x361acd(0x17c),_0x459989=(_0x55c4cc==null?void 0x0:_0x55c4cc[_0x361acd(0xf3)])??_0x361acd(0x17c);return{'changeset':{'unitID':_0x103cef,'type':_0x2c0a6c(_0x5aca79[_0x361acd(0x204)](_0x103cef)),'baseRev':_0x330f88[_0x361acd(0x264)](_0x103cef),'revision':0x0,'userID':_0x580e6b,'memberID':_0x459989,'mutations':_0x1b6fdb},'pendingMutations':_0x1a2005[_0x361acd(0x180)](_0x1a2005[_0x361acd(0x14d)])};}function en(_0x1c6532,_0x3108dd){const _0x215bd5=_0x2e02fc;return!tn(_0x1c6532)&&!tn(_0x3108dd)&&nn(_0x1c6532[_0x215bd5(0x174)],_0x3108dd['actions']);}function tn(_0x2c402d){return _0x2c402d['isCompositionEnd']!==void 0x0;}function nn(_0xdae12a,_0x3cfdab){return rn(_0xdae12a)&&rn(_0x3cfdab)&&!on(_0xdae12a)&&!on(_0x3cfdab)&&!an(_0xdae12a)&&!an(_0x3cfdab);}function rn(_0x5f4c91){const _0x463572=_0x2e02fc;return sn(_0x5f4c91)[_0x463572(0x26e)](_0x38e964=>cn(_0x38e964)&&_0x38e964['et']===_0x463572(0x2b0));}function an(_0x58aa25){const _0x28418d=_0x2e02fc;return sn(_0x58aa25)['some'](_0x155962=>Array[_0x28418d(0x152)](_0x155962)||typeof _0x155962==_0x28418d(0xc2)||typeof _0x155962=='number');}function on(_0x15c805){const _0x1fa5ac=_0x2e02fc;return sn(_0x15c805)[_0x1fa5ac(0x26e)](_0x4f8b7b=>!cn(_0x4f8b7b)||_0x4f8b7b['et']!==_0x1fa5ac(0x2b0)||!Array[_0x1fa5ac(0x152)](_0x4f8b7b['e'])?!0x1:_0x4f8b7b['e'][_0x1fa5ac(0x26e)](_0x2acaca=>!cn(_0x2acaca)||!cn(_0x2acaca[_0x1fa5ac(0x18b)])?!0x1:Object['prototype'][_0x1fa5ac(0x284)][_0x1fa5ac(0x95)](_0x2acaca[_0x1fa5ac(0x18b)],_0x1fa5ac(0x27b))||Object[_0x1fa5ac(0x30f)][_0x1fa5ac(0x284)][_0x1fa5ac(0x95)](_0x2acaca['body'],'columnGroups')||Object['prototype'][_0x1fa5ac(0x284)][_0x1fa5ac(0x95)](_0x2acaca[_0x1fa5ac(0x18b)],_0x1fa5ac(0x133))));}function sn(_0x61ab64){const _0x517f63=_0x2e02fc;if(!Array[_0x517f63(0x152)](_0x61ab64))return[];let _0x3e70ae=_0x61ab64[_0x517f63(0x187)](_0x517f63(0x18b))?_0x61ab64:_0x61ab64[_0x517f63(0x25b)](_0x5d7f6f=>Array[_0x517f63(0x152)](_0x5d7f6f)&&_0x5d7f6f[_0x517f63(0x187)](_0x517f63(0x18b)));if(!Array[_0x517f63(0x152)](_0x3e70ae))return[];let _0x5a6eae=_0x3e70ae[_0x517f63(0x2c4)](_0x517f63(0x18b));return _0x5a6eae===-0x1?[]:_0x3e70ae['slice'](_0x5a6eae+0x1);}function cn(_0x50323c){const _0x4d97f9=_0x2e02fc;return typeof _0x50323c==_0x4d97f9(0xd9)&&!!_0x50323c&&!Array['isArray'](_0x50323c);}function ln(_0x15382d,_0x1a80f5){let _0x3ef684=new _0x308a5d(0x1);return setTimeout(()=>_0x3ef684['next'](_0x1a80f5),_0x15382d),_0x3ef684['asObservable']()['pipe'](_0x2d16fe(0x1));}var un,dn,fn;let pn=function(_0xe255bf){const _0x473e1d=_0x2e02fc;return _0xe255bf['NOT_COLLAB']=_0x473e1d(0x2b5),_0xe255bf[_0x473e1d(0x260)]=_0x473e1d(0x1c9),_0xe255bf[_0x473e1d(0x22e)]='pending',_0xe255bf[_0x473e1d(0x1b8)]='awaiting',_0xe255bf[_0x473e1d(0x12b)]=_0x473e1d(0x18a),_0xe255bf[_0x473e1d(0x1f8)]=_0x473e1d(0x253),_0xe255bf[_0x473e1d(0x12c)]='conflict',_0xe255bf[_0x473e1d(0x272)]='offline',_0xe255bf;}({});const mn=0x4e20,hn=0x2bf20;var G=class{constructor(_0x2e6fcb,_0x18f110,_0x16c384,_0x1e5da9,_0x2c0a6f,_0x4ec6c5,_0x1b28f9,_0x31de93,_0x334148){const _0x5951cc=_0x2e02fc;this[_0x5951cc(0x2ef)]=_0x2e6fcb,this['type']=_0x18f110,this[_0x5951cc(0x244)]=_0x2c0a6f,this[_0x5951cc(0xb1)]=_0x4ec6c5,this[_0x5951cc(0xfb)]=_0x1b28f9,this[_0x5951cc(0xd3)]=_0x31de93,this[_0x5951cc(0x122)]=_0x334148,z(this,'_awaitingChangeset',null),z(this,_0x5951cc(0x92),[]),this[_0x5951cc(0x137)]=_0x16c384,this[_0x5951cc(0x92)]=_0x1e5da9;}['_checkMissing'](_0x2c86c6){const _0x3aca40=_0x2e02fc;let _0x2bce7e=this[_0x3aca40(0xd3)][_0x3aca40(0x264)](this['unitID']);return _0x2c86c6['revision']>_0x2bce7e+0x1?(this[_0x3aca40(0x244)]['onMissingChangesets']({'from':_0x2bce7e,'to':_0x2c86c6[_0x3aca40(0x234)]-0x1}),!0x0):!0x1;}[_0x2e02fc(0x225)](_0x297292){const _0x395d29=_0x2e02fc;this['_undoRedoService'][_0x395d29(0x20e)](this['unitID'],_0x297292);}['_transformSelections'](_0x4a173b){const _0xc582b3=_0x2e02fc;var _0x9d8a4c,_0x52ca78;(_0x9d8a4c=(_0x52ca78=this[_0xc582b3(0x244)])[_0xc582b3(0x25e)])==null||_0x9d8a4c[_0xc582b3(0x95)](_0x52ca78,_0x4a173b);}[_0x2e02fc(0x91)](_0x57f9c4){const _0x45027c=_0x2e02fc;var _0x8c6777,_0x1d2558;return(_0x8c6777=(_0x1d2558=this[_0x45027c(0x244)])[_0x45027c(0xed)])==null?void 0x0:_0x8c6777[_0x45027c(0x95)](_0x1d2558,_0x57f9c4);}['_transformStateCache'](_0x54fd21){const _0x7bc892=_0x2e02fc;var _0x25c948,_0x432c12;return(_0x25c948=(_0x432c12=this[_0x7bc892(0x244)])[_0x7bc892(0x8f)])==null?void 0x0:_0x25c948[_0x7bc892(0x95)](_0x432c12,_0x54fd21);}[_0x2e02fc(0x2d0)](_0x59e369){const _0x58ac5f=_0x2e02fc;var _0x386b6a,_0x2b7ec4;return((_0x386b6a=(_0x2b7ec4=this[_0x58ac5f(0x244)])[_0x58ac5f(0x136)])==null?void 0x0:_0x386b6a['call'](_0x2b7ec4,_0x59e369))??_0x59e369;}[_0x2e02fc(0x300)](_0x5561a7){const _0x4b679b=_0x2e02fc;var _0x1d686a,_0x14ead4;return((_0x1d686a=(_0x14ead4=this[_0x4b679b(0x244)])[_0x4b679b(0xe8)])==null?void 0x0:_0x1d686a[_0x4b679b(0x95)](_0x14ead4,_0x5561a7))??_0x5561a7;}['_syncEditingCollabCursor'](_0x4f58c5){const _0x408309=_0x2e02fc;if(this[_0x408309(0xae)]===_0x51bdab['UNIVER_DOC']){let {unitID:_0x4604c1,mutations:_0x4849a5,memberID:_0x37cbcc}=_0x4f58c5,_0xf0cd87=_0x4849a5[_0x408309(0x14d)]>0x0?_0x4849a5[0x0][_0x408309(0x169)][_0x408309(0x209)]:[];if(Array[_0x408309(0x152)](_0xf0cd87)&&_0xf0cd87[_0x408309(0x14d)]>0x0){var _0x1d36ff,_0x50cab5;(_0x1d36ff=(_0x50cab5=this[_0x408309(0x244)])['onSyncEditingCollabCursor'])==null||_0x1d36ff[_0x408309(0x95)](_0x50cab5,{'unitID':_0x4604c1,'memberID':_0x37cbcc,'textRanges':_0xf0cd87});}}}['_updateLocalCache'](){const _0x234cb3=_0x2e02fc;var _0x2ae6da;(_0x2ae6da=this['_localCacheService'])==null||_0x2ae6da[_0x234cb3(0xe1)](this[_0x234cb3(0x2ef)],this[_0x234cb3(0xae)],this[_0x234cb3(0x137)],this[_0x234cb3(0x92)]);}[_0x2e02fc(0x2ce)](){const _0x5151d0=_0x2e02fc;return this[_0x5151d0(0xd3)][_0x5151d0(0x264)](this['unitID']);}[_0x2e02fc(0x274)](){const _0x2cad12=_0x2e02fc;this[_0x2cad12(0xd3)][_0x2cad12(0x2ad)](this[_0x2cad12(0x2ef)]);}[_0x2e02fc(0x118)](_0x42e0a3){const _0x1846f9=_0x2e02fc;let _0x2f6883=this[_0x1846f9(0x2d0)](_0x42e0a3);_0x2f6883=this[_0x1846f9(0x300)](_0x2f6883);let _0x50b34b=_0x31dabd(_0x2f6883['mutations'],this[_0x1846f9(0xb1)],{'fromCollab':!0x0});if(!_0x50b34b['result'])throw _0x50b34b[_0x1846f9(0x2cd)]instanceof Error?_0x50b34b['error']:Error(_0x50b34b[_0x1846f9(0x2cd)]??_0x1846f9(0x262));this['_transformIMECache'](_0x2f6883),this[_0x1846f9(0xb2)](_0x2f6883),this['_transformUndoredo'](_0x42e0a3),this[_0x1846f9(0x173)](_0x2f6883),this[_0x1846f9(0x102)](_0x2f6883),this[_0x1846f9(0x274)]();}};let K=class extends G{constructor(_0x2317ca,_0x1dc3c8,_0x3bc61d,_0x23858a,_0x456a3b,_0x9b2b2d,_0x591051,_0x350d88,_0x2b14e4,_0x1cedf7){const _0x33d9ca=_0x2e02fc;super(_0x2317ca,_0x1dc3c8,null,[],_0x3bc61d,_0x591051,_0x9b2b2d,_0x23858a,_0x1cedf7),this[_0x33d9ca(0x153)]=_0x456a3b,this[_0x33d9ca(0x159)]=_0x350d88,this[_0x33d9ca(0xf4)]=_0x2b14e4,this[_0x33d9ca(0x1fa)]=_0x1cedf7,z(this,_0x33d9ca(0x1b6),'synced');}[_0x2e02fc(0x11b)](_0x1bcbd2){const _0x2b9c78=_0x2e02fc;let _0x14eb63=this[_0x2b9c78(0x153)]['createInstance'](q,this[_0x2b9c78(0x2ef)],this['type'],[_0x1bcbd2],this[_0x2b9c78(0x244)]);return _0x14eb63[_0x2b9c78(0x165)](),_0x14eb63['_updateLocalCache'](),_0x14eb63;}[_0x2e02fc(0x2c2)](_0x5ce403){const _0x584bd4=_0x2e02fc;if(this[_0x584bd4(0x13f)](_0x5ce403))return this['_injector'][_0x584bd4(0x85)](Q,this['unitID'],this['type'],null,[],null,[_0x5ce403],this[_0x584bd4(0x244)]);try{let _0x1c01dc=this['_transformService'][_0x584bd4(0x21d)](_0x5ce403,[_0x220092]);if(_0x2eee33(_0x1c01dc)){let {c1Prime:_0x4afde1}=_0x1c01dc;return this[_0x584bd4(0x118)](_0x4afde1),this;}throw _0x1c01dc['error'];}catch(_0x29ea19){return this[_0x584bd4(0x159)]['error'](_0x29ea19),this[_0x584bd4(0x310)](!0x1);}}[_0x2e02fc(0x310)](_0x460fef){const _0x1414d3=_0x2e02fc;return this[_0x1414d3(0x153)][_0x1414d3(0x85)](X,this[_0x1414d3(0x2ef)],this[_0x1414d3(0xae)],null,[],this[_0x1414d3(0x244)],_0x460fef);}[_0x2e02fc(0xcf)](_0x2e2ec4){const _0x893606=_0x2e02fc;if(_0x2e2ec4[_0x893606(0x234)]<=this[_0x893606(0x2ce)]())return this;throw Error(_0x893606(0x11f));}[_0x2e02fc(0x9e)](){const _0x29751d=_0x2e02fc;throw Error(_0x29751d(0xc4));}['onRemoteRetry'](){return this;}[_0x2e02fc(0x2fc)](){const _0x28dc56=_0x2e02fc;return this['_injector'][_0x28dc56(0x85)](Z,this[_0x28dc56(0x2ef)],this[_0x28dc56(0xae)],null,[],this[_0x28dc56(0x244)]);}[_0x2e02fc(0x9c)](){return this;}[_0x2e02fc(0x1d2)](){const _0x3cb789=_0x2e02fc;throw Error(_0x3cb789(0x2c8));}[_0x2e02fc(0x292)](){const _0x12f2b0=_0x2e02fc;let _0x1c241d=this[_0x12f2b0(0xd3)][_0x12f2b0(0x264)](this[_0x12f2b0(0x2ef)]);return this[_0x12f2b0(0x244)]['onMissingChangesets']({'from':_0x1c241d,'to':0x0}),this['_injector'][_0x12f2b0(0x85)](Q,this['unitID'],this[_0x12f2b0(0xae)],null,[],null,[],this[_0x12f2b0(0x244)]);}};K=H([V(0x3,_0x17057e(_0x4b0edd)),V(0x4,_0x17057e(_0x346ad7)),V(0x5,_0x3ec71c),V(0x6,_0xdb365f),V(0x7,_0x3efc4d),V(0x8,_0x40dc20),V(0x9,_0x48242e(U))],K);let q=un=class extends G{constructor(_0x3dc318,_0x56bf23,_0xb009e2,_0x32139c,_0x8fd3f6,_0x312b1f,_0x11d9fd,_0x560e02,_0x5bb14f,_0x482974,_0x5a1e79,_0x4875b8,_0x617cb0,_0x348272){const _0x484c80=_0x2e02fc;super(_0x3dc318,_0x56bf23,null,_0xb009e2,_0x32139c,_0x5bb14f,_0x617cb0,_0x312b1f,_0x348272),this[_0x484c80(0x153)]=_0x8fd3f6,this[_0x484c80(0x22d)]=_0x11d9fd,this[_0x484c80(0x159)]=_0x560e02,this[_0x484c80(0x24e)]=_0x482974,this['_transformService']=_0x5a1e79,this[_0x484c80(0x2eb)]=_0x4875b8,z(this,_0x484c80(0x1b6),_0x484c80(0x1e7)),z(this,_0x484c80(0x1be),null),z(this,_0x484c80(0x10c),null);}[_0x2e02fc(0x11b)](_0x1e8328){const _0x599580=_0x2e02fc;return this[_0x599580(0x92)][_0x599580(0x2b8)](_0x1e8328),this['_updateLocalCache'](),this;}[_0x2e02fc(0x2c2)](_0x469727){const _0x548312=_0x2e02fc;if(this[_0x548312(0x13f)](_0x469727))return this[_0x548312(0x226)](),this[_0x548312(0x153)][_0x548312(0x85)](Q,this[_0x548312(0x2ef)],this[_0x548312(0xae)],null,this[_0x548312(0x92)],null,[_0x469727],this[_0x548312(0x244)]);try{let _0x48e9ae=this['_transformService'][_0x548312(0x21d)](_0x469727,this[_0x548312(0x92)]);if(_0x2eee33(_0x48e9ae)){let {c1Prime:_0x26d7f9,m2Prime:_0x125f33}=_0x48e9ae;this[_0x548312(0x118)](_0x26d7f9);let _0x7fd76d=this[_0x548312(0x153)][_0x548312(0x85)](un,this[_0x548312(0x2ef)],this[_0x548312(0xae)],_0x125f33,this['_handler']);this[_0x548312(0x226)]();let _0x13f038=new Date()['getTime'](),_0x445507=this[_0x548312(0x1be)]?Math['max'](this['_scheduleCompleteTimestamp']-_0x13f038,0x0):this[_0x548312(0x1bf)]();return _0x7fd76d[_0x548312(0x165)](_0x445507),_0x7fd76d;}throw _0x48e9ae[_0x548312(0x2cd)];}catch(_0x1af109){return this[_0x548312(0x159)][_0x548312(0x2cd)](_0x1af109),this[_0x548312(0x310)](!0x1);}}['onRemoteAck'](_0x301117){const _0x9bc12f=_0x2e02fc;if(_0x301117[_0x9bc12f(0x234)]<=this[_0x9bc12f(0x2ce)]())return this;throw Error(_0x9bc12f(0x21a));}[_0x2e02fc(0x9e)](){const _0x139ce6=_0x2e02fc;throw Error(_0x139ce6(0x146));}[_0x2e02fc(0x30e)](){return this;}[_0x2e02fc(0x2fc)](){const _0xd79e74=_0x2e02fc;return this['_clearScheduledTask'](),this[_0xd79e74(0x153)][_0xd79e74(0x85)](Z,this[_0xd79e74(0x2ef)],this[_0xd79e74(0xae)],null,this[_0xd79e74(0x92)],this['_handler']);}['toggleOnline'](){return this;}[_0x2e02fc(0x165)](_0x78fbe7){const _0x1c947b=_0x2e02fc;let _0x33a1e4=_0x78fbe7??this['_getSendChangesetTimeout']();this['_scheduleCompleteTimestamp']=new Date()[_0x1c947b(0x275)]()+_0x33a1e4,this[_0x1c947b(0x10c)]=setTimeout(()=>{const _0x2b7d29=_0x1c947b;this[_0x2b7d29(0x226)]();let _0x31ed11=null;switch(this[_0x2b7d29(0xae)]){case _0x51bdab[_0x2b7d29(0x266)]:_0x31ed11=Xt(this[_0x2b7d29(0x92)],this[_0x2b7d29(0x2ef)],this[_0x2b7d29(0x2eb)],this[_0x2b7d29(0xd3)],this[_0x2b7d29(0x22d)]);break;case _0x51bdab[_0x2b7d29(0x312)]:_0x31ed11=this[_0x2b7d29(0x92)]['every'](_0x298024=>_0x298024['id']===_0x520df5['id'])?$t(this[_0x2b7d29(0x92)],this[_0x2b7d29(0x2ef)],this[_0x2b7d29(0x2eb)],this['_revisionService'],this[_0x2b7d29(0x22d)]):Xt(this[_0x2b7d29(0x92)],this[_0x2b7d29(0x2ef)],this[_0x2b7d29(0x2eb)],this['_revisionService'],this[_0x2b7d29(0x22d)]);break;case _0x51bdab[_0x2b7d29(0x1e0)]:_0x31ed11=Qt(this[_0x2b7d29(0x92)],this['unitID'],this[_0x2b7d29(0x2eb)],this[_0x2b7d29(0xd3)],this['_userManagerService']);break;case _0x51bdab[_0x2b7d29(0x230)]:_0x31ed11=Zt(this['_pendingMutations'],this[_0x2b7d29(0x2ef)],this[_0x2b7d29(0x2eb)],this[_0x2b7d29(0xd3)],this[_0x2b7d29(0x22d)]);break;case _0x51bdab['UNIVER_BOARD']:_0x31ed11=Xt(this[_0x2b7d29(0x92)],this['unitID'],this[_0x2b7d29(0x2eb)],this[_0x2b7d29(0xd3)],this[_0x2b7d29(0x22d)]);break;case _0x51bdab[_0x2b7d29(0x1c0)]:_0x31ed11=Xt(this[_0x2b7d29(0x92)],this[_0x2b7d29(0x2ef)],this[_0x2b7d29(0x2eb)],this[_0x2b7d29(0xd3)],this['_userManagerService']);break;default:throw Error(_0x2b7d29(0x145)+this[_0x2b7d29(0xae)]+_0x2b7d29(0x168));}let {changeset:_0x1b317e,pendingMutations:_0x2b4507}=_0x31ed11;this[_0x2b7d29(0x244)]['onSendChangeset'](_0x1b317e);let _0x390cfd=_0x2b4507[_0x2b7d29(0x14d)]?this[_0x2b7d29(0x153)][_0x2b7d29(0x85)](Y,this[_0x2b7d29(0x2ef)],this[_0x2b7d29(0xae)],_0x1b317e,_0x2b4507,this[_0x2b7d29(0x244)],void 0x0):this[_0x2b7d29(0x153)][_0x2b7d29(0x85)](J,this[_0x2b7d29(0x2ef)],this[_0x2b7d29(0xae)],_0x1b317e,this['_handler']);_0x390cfd[_0x2b7d29(0x1d1)](),this[_0x2b7d29(0x244)][_0x2b7d29(0x1e3)](this,_0x390cfd);},_0x33a1e4);}['_getSendChangesetTimeout'](){const _0xac531f=_0x2e02fc;let _0x5efa20=this['_configService'][_0xac531f(0xe2)](R);return(_0x5efa20==null?void 0x0:_0x5efa20[_0xac531f(0x139)])??0x7d0;}[_0x2e02fc(0x1d2)](){const _0x4fe12b=_0x2e02fc;throw Error(_0x4fe12b(0x8d));}['_clearScheduledTask'](){const _0x450f69=_0x2e02fc;this[_0x450f69(0x10c)]!=null&&(clearTimeout(this[_0x450f69(0x10c)]),this[_0x450f69(0x10c)]=null);}['_onConflict'](_0x11c0b4){const _0x801205=_0x2e02fc;return this[_0x801205(0x226)](),this['_injector'][_0x801205(0x85)](X,this[_0x801205(0x2ef)],this['type'],null,this[_0x801205(0x92)],this[_0x801205(0x244)],_0x11c0b4);}};q=un=H([V(0x4,_0x17057e(_0x346ad7)),V(0x5,_0x17057e(_0x4b0edd)),V(0x6,_0x17057e(_0x5dc14f)),V(0x7,_0x3efc4d),V(0x8,_0xdb365f),V(0x9,_0x39e8ee),V(0xa,_0x40dc20),V(0xb,_0x4a3eaa),V(0xc,_0x3ec71c),V(0xd,_0x48242e(U))],q);let J=dn=class extends G{constructor(_0x4fe976,_0x530dec,_0x2f5ca9,_0x205b48,_0x525dea,_0x2642ed,_0x5621b7,_0x4de4e6,_0x456435,_0x38ae9f,_0x29eb0d){const _0x4e8199=_0x2e02fc;super(_0x4fe976,_0x530dec,_0x2f5ca9,[],_0x205b48,_0x5621b7,_0x38ae9f,_0x2642ed,_0x29eb0d),this[_0x4e8199(0x153)]=_0x525dea,this['_logService']=_0x4de4e6,this[_0x4e8199(0xf4)]=_0x456435,z(this,_0x4e8199(0x1b6),_0x4e8199(0x154)),z(this,'_resendTimeout',0x0),z(this,_0x4e8199(0x2cb),0x0),z(this,_0x4e8199(0x1f6),void 0x0),z(this,_0x4e8199(0x1b3),void 0x0);}['appendMutation'](_0x495208){const _0x3dcabc=_0x2e02fc;this[_0x3dcabc(0x226)]();let _0xbc10a9=this[_0x3dcabc(0x153)]['createInstance'](Y,this[_0x3dcabc(0x2ef)],this[_0x3dcabc(0xae)],this['_awaitingChangeset'],[_0x495208],this[_0x3dcabc(0x244)],this[_0x3dcabc(0x1f6)]);return _0xbc10a9[_0x3dcabc(0x1d1)](),_0xbc10a9;}[_0x2e02fc(0x2c2)](_0xe1e252){const _0x470d9f=_0x2e02fc;if(this[_0x470d9f(0x13f)](_0xe1e252))return this[_0x470d9f(0x226)](),this[_0x470d9f(0x153)][_0x470d9f(0x85)](Q,this[_0x470d9f(0x2ef)],this['type'],this[_0x470d9f(0x137)],[],null,[_0xe1e252],this[_0x470d9f(0x244)]);try{let _0x33bb96=this['_transformService'][_0x470d9f(0x199)]([_0xe1e252],[this[_0x470d9f(0x137)]],!0x1);if(_0x113617(_0x33bb96)){let {c1Prime:_0x3b2fce,c2Prime:_0x4833b8}=_0x33bb96;this[_0x470d9f(0x118)](_0x3b2fce[0x0]),_0x4833b8[0x0][_0x470d9f(0x251)]=this['_getCurrentRevision'](),this[_0x470d9f(0x226)]();let _0x21803c=this['_injector'][_0x470d9f(0x85)](dn,this[_0x470d9f(0x2ef)],this[_0x470d9f(0xae)],_0x4833b8[0x0],this['_handler']);return _0x21803c[_0x470d9f(0x1d1)](),_0x21803c;}throw _0x33bb96[_0x470d9f(0x2cd)];}catch(_0x364e71){return this[_0x470d9f(0x159)][_0x470d9f(0x2cd)](_0x364e71),this[_0x470d9f(0x310)](!0x1);}}['onRemoteAck'](_0x44ec26){const _0x37a21c=_0x2e02fc;this[_0x37a21c(0x226)]();let _0x4d7554=this[_0x37a21c(0xd3)][_0x37a21c(0x264)](this[_0x37a21c(0x2ef)]);if(_0x44ec26[_0x37a21c(0x234)]<=_0x4d7554)return this;if(this['_checkMissing'](_0x44ec26))return this[_0x37a21c(0x153)][_0x37a21c(0x85)](Q,this[_0x37a21c(0x2ef)],this[_0x37a21c(0xae)],this[_0x37a21c(0x137)],[],_0x44ec26[_0x37a21c(0x234)],[],this[_0x37a21c(0x244)]);this[_0x37a21c(0x274)]();let _0x392d68=this['_injector'][_0x37a21c(0x85)](K,this['unitID'],this[_0x37a21c(0xae)],this[_0x37a21c(0x244)]);return _0x392d68['_updateLocalCache'](),_0x392d68;}[_0x2e02fc(0x9e)](_0x2ee9a9){const _0x5d3d5f=_0x2e02fc;return this[_0x5d3d5f(0x310)](!!(_0x2ee9a9!=null&&_0x2ee9a9[_0x5d3d5f(0xc5)]));}['onRemoteRetry'](_0x19c9c5){const _0x5b75a2=_0x2e02fc;return this[_0x5b75a2(0x2cb)]>hn?this['toggleOffline']():(this[_0x5b75a2(0x1f6)]=ln(this['_resendTimeout'],{'timeout':this[_0x5b75a2(0x213)],'reqId':_0x19c9c5[_0x5b75a2(0x273)]}),this[_0x5b75a2(0x1b3)]=this[_0x5b75a2(0x1f6)]['subscribe'](({reqId:_0x21509d,timeout:_0xc06a1a})=>{const _0x59e580=_0x5b75a2;this[_0x59e580(0x25d)](_0x21509d,_0xc06a1a);}),this);}[_0x2e02fc(0x2fc)](){const _0x27d813=_0x2e02fc;return this['_clearScheduledTask'](),this['_injector'][_0x27d813(0x85)](Z,this[_0x27d813(0x2ef)],this['type'],this[_0x27d813(0x137)],[],this[_0x27d813(0x244)]);}[_0x2e02fc(0x9c)](){return this;}['resend'](){const _0x18a285=_0x2e02fc;this[_0x18a285(0x244)][_0x18a285(0x2fe)](this[_0x18a285(0x137)]);}[_0x2e02fc(0x310)](_0x5a4dba){const _0x2eb865=_0x2e02fc;return this[_0x2eb865(0x226)](),this['_injector'][_0x2eb865(0x85)](X,this[_0x2eb865(0x2ef)],this[_0x2eb865(0xae)],this['_awaitingChangeset'],[],this['_handler'],_0x5a4dba);}['_resendWithTimeout'](_0x13dbba,_0x545be6){const _0x27add7=_0x2e02fc;var _0x429c9e;_0x13dbba===((_0x429c9e=this[_0x27add7(0x137)])==null?void 0x0:_0x429c9e[_0x27add7(0x273)])&&(this['resend'](),this[_0x27add7(0x213)]=_0x545be6===0x0?0x3e8:Math[_0x27add7(0x2c7)](_0x545be6*0x2,mn),this[_0x27add7(0x2cb)]+=this[_0x27add7(0x213)]);}['_clearScheduledTask'](){const _0x3729a3=_0x2e02fc;var _0x117447;(_0x117447=this['_sender'])==null||_0x117447[_0x3729a3(0xe3)](),this[_0x3729a3(0x213)]=0x0,this[_0x3729a3(0x2cb)]=0x0;}};J=dn=H([V(0x4,_0x17057e(_0x346ad7)),V(0x5,_0x17057e(_0x4b0edd)),V(0x6,_0xdb365f),V(0x7,_0x3efc4d),V(0x8,_0x40dc20),V(0x9,_0x3ec71c),V(0xa,_0x48242e(U))],J);let Y=fn=class extends G{constructor(_0x54919b,_0x1abbde,_0x465e0e,_0x1dc15d,_0x51d616,_0x17bc9e,_0x583a01,_0x4501aa,_0x3ea68d,_0x3ca180,_0x42e46b,_0x2d2597,_0x3a476c){const _0x1e1f34=_0x2e02fc;super(_0x54919b,_0x1abbde,_0x465e0e,_0x1dc15d,_0x51d616,_0x3ea68d,_0x2d2597,_0x4501aa,_0x3a476c),this[_0x1e1f34(0x153)]=_0x583a01,this['_logService']=_0x3ca180,this[_0x1e1f34(0xf4)]=_0x42e46b,this['localCacheService']=_0x3a476c,z(this,_0x1e1f34(0x1b6),'awaiting_with_pending'),z(this,'_resendTimeout',0x0),z(this,_0x1e1f34(0x2cb),0x0),z(this,_0x1e1f34(0x1f6),void 0x0),z(this,_0x1e1f34(0x1b3),void 0x0),_0x17bc9e&&(this[_0x1e1f34(0x1f6)]=_0x17bc9e,this[_0x1e1f34(0x1b3)]=this[_0x1e1f34(0x1f6)][_0x1e1f34(0x222)](({reqId:_0x2fefbe,timeout:_0x5a181c})=>{const _0x31c74b=_0x1e1f34;this[_0x31c74b(0x25d)](_0x2fefbe,_0x5a181c);}));}[_0x2e02fc(0x11b)](_0x2cbee2){const _0x5d3e06=_0x2e02fc;return this[_0x5d3e06(0x92)][_0x5d3e06(0x2b8)](_0x2cbee2),this;}[_0x2e02fc(0x2c2)](_0x4a9616){const _0x4a7c7c=_0x2e02fc;if(this[_0x4a7c7c(0x13f)](_0x4a9616))return this[_0x4a7c7c(0x226)](),this[_0x4a7c7c(0x153)][_0x4a7c7c(0x85)](Q,this['unitID'],this[_0x4a7c7c(0xae)],this[_0x4a7c7c(0x137)],this[_0x4a7c7c(0x92)],null,[_0x4a9616],this[_0x4a7c7c(0x244)]);try{let _0x452063=this[_0x4a7c7c(0xf4)][_0x4a7c7c(0x199)]([_0x4a9616],[this[_0x4a7c7c(0x137)]],!0x1);if(_0x113617(_0x452063)){let {c1Prime:_0x5e119b,c2Prime:_0x7945a8}=_0x452063,_0x37f16e=this[_0x4a7c7c(0xf4)][_0x4a7c7c(0x21d)](_0x5e119b[0x0],this[_0x4a7c7c(0x92)]);if(_0x2eee33(_0x37f16e)){let {c1Prime:_0x78682c,m2Prime:_0x27187b}=_0x37f16e;return this['_executeRemoteChangeset'](_0x78682c),_0x7945a8[0x0][_0x4a7c7c(0x251)]=this[_0x4a7c7c(0x2ce)](),this[_0x4a7c7c(0x226)](),this[_0x4a7c7c(0x153)][_0x4a7c7c(0x85)](fn,this[_0x4a7c7c(0x2ef)],this[_0x4a7c7c(0xae)],_0x7945a8[0x0],_0x27187b,this[_0x4a7c7c(0x244)],void 0x0);}throw _0x37f16e[_0x4a7c7c(0x2cd)];}throw _0x452063[_0x4a7c7c(0x2cd)];}catch(_0x15862a){return this[_0x4a7c7c(0x159)][_0x4a7c7c(0x2cd)](_0x15862a),this['_onConflict'](!0x1);}}[_0x2e02fc(0xcf)](_0x1fa24b){const _0x224118=_0x2e02fc;this[_0x224118(0x226)]();let _0x4597b9=this['_getCurrentRevision']();if(_0x1fa24b[_0x224118(0x234)]<=_0x4597b9)return this;if(this[_0x224118(0x13f)](_0x1fa24b))return this[_0x224118(0x153)][_0x224118(0x85)](Q,this['unitID'],this[_0x224118(0xae)],this[_0x224118(0x137)],this[_0x224118(0x92)],_0x1fa24b[_0x224118(0x234)],[],this[_0x224118(0x244)]);this[_0x224118(0x274)]();let _0x2fb2cc=this[_0x224118(0x153)][_0x224118(0x85)](q,this[_0x224118(0x2ef)],this[_0x224118(0xae)],this[_0x224118(0x92)],this['_handler']);return _0x2fb2cc[_0x224118(0x165)](),_0x2fb2cc['_updateLocalCache'](),_0x2fb2cc;}[_0x2e02fc(0x9e)](_0x2d3f88){const _0x737025=_0x2e02fc;return this['_onConflict'](!!(_0x2d3f88!=null&&_0x2d3f88[_0x737025(0xc5)]));}[_0x2e02fc(0x30e)](_0x4ff967){const _0x16c09e=_0x2e02fc;return this[_0x16c09e(0x2cb)]>hn?this[_0x16c09e(0x2fc)]():(this[_0x16c09e(0x1f6)]=ln(this[_0x16c09e(0x213)],{'timeout':this[_0x16c09e(0x213)],'reqId':_0x4ff967[_0x16c09e(0x273)]}),this[_0x16c09e(0x1b3)]=this[_0x16c09e(0x1f6)][_0x16c09e(0x222)](({reqId:_0x5f0d58,timeout:_0x54542c})=>{this['_resendWithTimeout'](_0x5f0d58,_0x54542c);}),this);}[_0x2e02fc(0x2fc)](){const _0x350ae8=_0x2e02fc;return this['_clearScheduledTask'](),this[_0x350ae8(0x153)][_0x350ae8(0x85)](Z,this[_0x350ae8(0x2ef)],this['type'],this[_0x350ae8(0x137)],this[_0x350ae8(0x92)],this[_0x350ae8(0x244)]);}[_0x2e02fc(0x9c)](){return this;}[_0x2e02fc(0x1d2)](){const _0x3f1a3d=_0x2e02fc;this[_0x3f1a3d(0x244)]['onSendChangeset'](this['_awaitingChangeset']);}['_onConflict'](_0x280520){const _0x5bbe9d=_0x2e02fc;return this[_0x5bbe9d(0x226)](),this[_0x5bbe9d(0x153)][_0x5bbe9d(0x85)](X,this[_0x5bbe9d(0x2ef)],this[_0x5bbe9d(0xae)],null,this[_0x5bbe9d(0x92)],this[_0x5bbe9d(0x244)],_0x280520);}[_0x2e02fc(0x25d)](_0x1515ee,_0xdac641){const _0x41894b=_0x2e02fc;var _0xe3af67;_0x1515ee===((_0xe3af67=this[_0x41894b(0x137)])==null?void 0x0:_0xe3af67[_0x41894b(0x273)])&&(this['resend'](),this['_resendTimeout']=_0xdac641===0x0?0x3e8:Math[_0x41894b(0x2c7)](_0xdac641*0x2,mn),this[_0x41894b(0x2cb)]+=this[_0x41894b(0x213)]);}[_0x2e02fc(0x226)](){const _0x472c31=_0x2e02fc;var _0x13545c;(_0x13545c=this[_0x472c31(0x1b3)])==null||_0x13545c['unsubscribe'](),this['_resendTimeout']=0x0,this[_0x472c31(0x2cb)]=0x0;}};Y=fn=H([V(0x6,_0x17057e(_0x346ad7)),V(0x7,_0x17057e(_0x4b0edd)),V(0x8,_0xdb365f),V(0x9,_0x3efc4d),V(0xa,_0x40dc20),V(0xb,_0x3ec71c),V(0xc,_0x48242e(U))],Y);let X=class extends G{constructor(_0x5df87a,_0x2b5b34,_0x53a046,_0xe7fc1f,_0x456602,_0x89366a=!0x1,_0x3a52ae,_0x39e56b,_0x5ba952,_0x53641e,_0x1db49d,_0x54606c,_0x308a6c){const _0x4d49c4=_0x2e02fc;super(_0x5df87a,_0x2b5b34,_0x53a046,_0xe7fc1f,_0x456602,_0x39e56b,_0x5ba952,_0x53641e,_0x308a6c),this['_isPermissionRej']=_0x89366a,this[_0x4d49c4(0x210)]=_0x3a52ae,this['_localeService']=_0x1db49d,this[_0x4d49c4(0x23c)]=_0x54606c,this[_0x4d49c4(0x1fa)]=_0x308a6c,z(this,_0x4d49c4(0x1b6),_0x4d49c4(0x1e8)),this[_0x4d49c4(0x1f5)](),this[_0x4d49c4(0x1eb)](),this[_0x4d49c4(0x203)]();}[_0x2e02fc(0x11b)](){return this;}[_0x2e02fc(0x2c2)](){return this;}[_0x2e02fc(0xcf)](){return this;}['onRemoteRej'](){return this;}[_0x2e02fc(0x30e)](){return this;}['toggleOffline'](){return this;}[_0x2e02fc(0x9c)](){return this;}[_0x2e02fc(0x1d2)](){const _0x32bac3=_0x2e02fc;throw Error(_0x32bac3(0x14b));}[_0x2e02fc(0x1eb)](){const _0x1da8e3=_0x2e02fc;var _0x38781e,_0x161c96,_0x213605;(_0x38781e=this[_0x1da8e3(0x122)])==null||(_0x161c96=_0x38781e[_0x1da8e3(0x182)])==null||(_0x161c96=_0x161c96['call'](_0x38781e,this['unitID'],_0x1da8e3(0x1e8)))==null||_0x161c96[_0x1da8e3(0xec)](()=>void 0x0),(_0x213605=this[_0x1da8e3(0x122)])==null||_0x213605['updateOfflineData'](this['unitID'],this[_0x1da8e3(0xae)],null,[]);}['_showConflictNotification'](){const _0x5d923b=_0x2e02fc;this[_0x5d923b(0x2fd)]?this[_0x5d923b(0x23c)]['emitEvent']({'id':'PERMISSION_DENIED'}):this[_0x5d923b(0x23c)][_0x5d923b(0x1ba)]({'id':'CONFLICT'});}[_0x2e02fc(0x203)](){const _0x27896c=_0x2e02fc;this['_permissionService'][_0x27896c(0x197)](new _0x424e79(this[_0x27896c(0x2ef)])['id'],!0x1);}};X=H([V(0x6,_0x17057e(_0x5a8b72)),V(0x7,_0xdb365f),V(0x8,_0x3ec71c),V(0x9,_0x17057e(_0x4b0edd)),V(0xa,_0x17057e(_0xc4a55f)),V(0xb,_0x17057e(B)),V(0xc,_0x48242e(U))],X);let Z=class extends G{constructor(_0x4635e6,_0x3b3e50,_0x30c2ee,_0x243d53,_0x101bbd,_0x1ab612,_0x56d372,_0x388365,_0x43475c,_0x1e8a6d){const _0x2787c1=_0x2e02fc;super(_0x4635e6,_0x3b3e50,_0x30c2ee,_0x243d53,_0x101bbd,_0x388365,_0x43475c,_0x56d372,_0x1e8a6d),this[_0x2787c1(0x153)]=_0x1ab612,z(this,'status','offline');}[_0x2e02fc(0x11b)](_0x39f893){const _0x4e9a9c=_0x2e02fc;return this[_0x4e9a9c(0x92)][_0x4e9a9c(0x2b8)](_0x39f893),this[_0x4e9a9c(0x1d1)](),this;}[_0x2e02fc(0x2c2)](_0x4636f2){const _0x1e536e=_0x2e02fc;throw Error(_0x1e536e(0x31e));}['onRemoteAck'](){const _0xbe2021=_0x2e02fc;throw Error(_0xbe2021(0x2ca));}[_0x2e02fc(0x9e)](){const _0x1aa964=_0x2e02fc;throw Error(_0x1aa964(0xcd));}[_0x2e02fc(0x30e)](){return this;}[_0x2e02fc(0x2fc)](){return this;}[_0x2e02fc(0x9c)](){const _0x369887=_0x2e02fc;let {_injector:_0x21a8d3,_pendingMutations:_0x2c0836,_awaitingChangeset:_0x282c35,unitID:_0x5472ae,_handler:_0xc67087,type:_0x3d0e05}=this,_0x5c28cb=gn(_0x21a8d3,_0x5472ae,_0x3d0e05,_0x282c35,_0x2c0836,_0xc67087);return _0x5c28cb instanceof q?_0x5c28cb[_0x369887(0x165)]():(_0x5c28cb instanceof Y||_0x5c28cb instanceof J)&&_0x5c28cb[_0x369887(0x1d2)](),_0x5c28cb;}[_0x2e02fc(0x1d2)](){const _0x2151c6=_0x2e02fc;throw Error(_0x2151c6(0x80));}};Z=H([V(0x5,_0x17057e(_0x346ad7)),V(0x6,_0x17057e(_0x4b0edd)),V(0x7,_0xdb365f),V(0x8,_0x3ec71c),V(0x9,_0x48242e(U))],Z);let Q=class extends G{constructor(_0x2fd9a4,_0x1f3217,_0x4bd287,_0x25bba5,_0x17dc84,_0xf4c03,_0x1d7b01,_0x1ccac8,_0x2d9c3c,_0x48fd71,_0x1f7af8,_0xa798,_0x48b9fa,_0x385fe3){const _0x9d9769=_0x2e02fc;super(_0x2fd9a4,_0x1f3217,_0x4bd287,_0x25bba5,_0x1d7b01,_0x1f7af8,_0xa798,_0x2d9c3c,_0x385fe3),this[_0x9d9769(0xad)]=_0x17dc84,this['_queuedRemoteChangesets']=_0xf4c03,this[_0x9d9769(0x153)]=_0x1ccac8,this[_0x9d9769(0x159)]=_0x48fd71,this[_0x9d9769(0xf4)]=_0x48b9fa,this['localCacheService']=_0x385fe3,z(this,_0x9d9769(0x1b6),_0x9d9769(0x253));}[_0x2e02fc(0xe7)](_0x445500){const _0x115075=_0x2e02fc;try{if(this[_0x115075(0x248)](_0x445500)[_0x115075(0xc6)])throw Error(_0x115075(0x100));if(this[_0x115075(0x248)]([...this['_queuedRemoteChangesets']][_0x115075(0x1b5)]((_0x3f06e0,_0x5b493e)=>_0x3f06e0[_0x115075(0x234)]-_0x5b493e['revision']))[_0x115075(0xc6)])return this[_0x115075(0x214)]=[],this[_0x115075(0x1d1)](),this[_0x115075(0x244)][_0x115075(0x232)]({'from':this['_getCurrentRevision'](),'to':0x0}),this;let _0x10831b=this[_0x115075(0x137)],_0x34c682=this[_0x115075(0x92)],_0x55ab25;if(_0x10831b&&_0x34c682[_0x115075(0x14d)]!==0x0)_0x55ab25=this[_0x115075(0x153)]['createInstance'](Y,this['unitID'],this[_0x115075(0xae)],_0x10831b,_0x34c682,this[_0x115075(0x244)],void 0x0);else{if(_0x10831b&&_0x34c682['length']===0x0)_0x10831b['baseRev']=this['_getCurrentRevision'](),_0x55ab25=this['_injector'][_0x115075(0x85)](J,this[_0x115075(0x2ef)],this[_0x115075(0xae)],_0x10831b,this[_0x115075(0x244)]);else{if(_0x34c682[_0x115075(0x14d)]!==0x0){let _0x300023=this[_0x115075(0x153)][_0x115075(0x85)](q,this[_0x115075(0x2ef)],this[_0x115075(0xae)],_0x34c682,this[_0x115075(0x244)]);_0x300023[_0x115075(0x165)](),_0x55ab25=_0x300023;}else _0x55ab25=this[_0x115075(0x153)][_0x115075(0x85)](K,this[_0x115075(0x2ef)],this['type'],this[_0x115075(0x244)]);}}return _0x55ab25[_0x115075(0x1d1)](),_0x55ab25;}catch(_0x306347){return this['_logService']['error'](_0x115075(0x194),'failed\x20to\x20apply\x20missed\x20changesets!',_0x306347),this['_injector'][_0x115075(0x85)](X,this[_0x115075(0x2ef)],this[_0x115075(0xae)],this[_0x115075(0x137)],this[_0x115075(0x92)],this[_0x115075(0x244)],!0x1);}}[_0x2e02fc(0x248)](_0x1f375f){const _0x579f11=_0x2e02fc;this[_0x579f11(0x26d)]();for(let _0x12b658=0x0;_0x12b658<_0x1f375f[_0x579f11(0x14d)];_0x12b658++){let _0x3e80c0=_0x1f375f[_0x12b658],_0x1f24c4=this[_0x579f11(0x2ce)]();if(!(_0x3e80c0['revision']<=_0x1f24c4)){if(_0x3e80c0[_0x579f11(0x234)]>_0x1f24c4+0x1)return{'missingChangesets':!0x0};if(this[_0x579f11(0x249)](_0x3e80c0)){this['_acknowledgeAwaiting']();continue;}this[_0x579f11(0x20d)](_0x3e80c0),this[_0x579f11(0x26d)]();}}return{'missingChangesets':!0x1};}['_transformAndApplyRemoteChangeset'](_0x283409){const _0x49591c=_0x2e02fc;let _0x111064=_0x283409,_0x15581c=this[_0x49591c(0x137)];if(_0x15581c){let _0x4ff099=this[_0x49591c(0xf4)][_0x49591c(0x199)]([_0x283409],[_0x15581c],!0x1);if(!_0x113617(_0x4ff099))throw _0x4ff099['error'];_0x111064=_0x4ff099['c1Prime'][0x0],_0x15581c=_0x4ff099[_0x49591c(0x15b)][0x0];}let _0x44cd00=this[_0x49591c(0x92)];if(_0x44cd00[_0x49591c(0x14d)]){let _0x314bcf=this[_0x49591c(0xf4)][_0x49591c(0x21d)](_0x111064,_0x44cd00);if(!_0x2eee33(_0x314bcf))throw _0x314bcf[_0x49591c(0x2cd)];_0x111064=_0x314bcf[_0x49591c(0x293)],_0x44cd00=_0x314bcf[_0x49591c(0x12d)];}this['_executeRemoteChangeset'](_0x111064),_0x15581c&&(_0x15581c[_0x49591c(0x251)]=this['_getCurrentRevision']()),this[_0x49591c(0x137)]=_0x15581c,this[_0x49591c(0x92)]=_0x44cd00;}[_0x2e02fc(0x26d)](){const _0x3e8648=_0x2e02fc;if(!this[_0x3e8648(0x137)]||this[_0x3e8648(0xad)]==null)return;let _0x4df8a1=this[_0x3e8648(0x2ce)]();if(this[_0x3e8648(0xad)]<=_0x4df8a1)throw Error('[FetchingMissState]:\x20received\x20stale\x20ack\x20revision:\x20'+this['_acknowledgedAwaitingRevision']+'.');this[_0x3e8648(0xad)]===_0x4df8a1+0x1&&this['_acknowledgeAwaiting']();}[_0x2e02fc(0x2e5)](){const _0x3d3a00=_0x2e02fc;this[_0x3d3a00(0x274)](),this['_awaitingChangeset']=null,this[_0x3d3a00(0xad)]=null;}[_0x2e02fc(0x249)](_0x498af3){const _0x549f8c=_0x2e02fc;let _0x5b723d=this['_awaitingChangeset'];return!_0x5b723d||!_0x5b723d[_0x549f8c(0x7e)]||_0x5b723d['reqId']===null||_0x5b723d[_0x549f8c(0x273)]===void 0x0?!0x1:_0x498af3['unitID']===_0x5b723d[_0x549f8c(0x2ef)]&&_0x498af3[_0x549f8c(0x7e)]===_0x5b723d[_0x549f8c(0x7e)]&&_0x498af3['reqId']===_0x5b723d[_0x549f8c(0x273)];}[_0x2e02fc(0x1d2)](){const _0x2a3b4a=_0x2e02fc;throw Error(_0x2a3b4a(0x1a2));}[_0x2e02fc(0x11b)](_0x25346f){const _0x39ecd=_0x2e02fc;return this[_0x39ecd(0x92)][_0x39ecd(0x2b8)](_0x25346f),this;}[_0x2e02fc(0x2c2)](_0x423859){const _0x53bb1e=_0x2e02fc;return this[_0x53bb1e(0x214)][_0x53bb1e(0x2b8)](_0x423859),this;}[_0x2e02fc(0xcf)](_0x2a0515){const _0x5cfe3a=_0x2e02fc;if(this[_0x5cfe3a(0x137)]){let _0x783d59=this[_0x5cfe3a(0x2ce)]();return _0x2a0515[_0x5cfe3a(0x234)]<=_0x783d59||(_0x783d59+0x1===_0x2a0515[_0x5cfe3a(0x234)]?(this['_incrementRevisionNumber'](),this[_0x5cfe3a(0x137)]=null,this[_0x5cfe3a(0xad)]=null):this['_acknowledgedAwaitingRevision']=_0x2a0515[_0x5cfe3a(0x234)]),this;}if(_0x2a0515[_0x5cfe3a(0x234)]<=this[_0x5cfe3a(0x2ce)]())return this;throw Error(_0x5cfe3a(0x198));}[_0x2e02fc(0x9e)](_0xfa277d){const _0x470d78=_0x2e02fc;return this[_0x470d78(0x310)](!!(_0xfa277d!=null&&_0xfa277d['isPermissionRej']));}[_0x2e02fc(0x30e)](){return this;}['toggleOffline'](){const _0x1edc68=_0x2e02fc;return this[_0x1edc68(0x153)]['createInstance'](Z,this[_0x1edc68(0x2ef)],this[_0x1edc68(0xae)],this[_0x1edc68(0x137)],this[_0x1edc68(0x92)],this[_0x1edc68(0x244)]);}[_0x2e02fc(0x9c)](){return this;}[_0x2e02fc(0x310)](_0x1d7e51){const _0x255e10=_0x2e02fc;return this['_injector'][_0x255e10(0x85)](X,this[_0x255e10(0x2ef)],this['type'],this[_0x255e10(0x137)],this[_0x255e10(0x92)],this['_handler'],_0x1d7e51);}};Q=H([V(0x7,_0x17057e(_0x346ad7)),V(0x8,_0x17057e(_0x4b0edd)),V(0x9,_0x3efc4d),V(0xa,_0xdb365f),V(0xb,_0x3ec71c),V(0xc,_0x40dc20),V(0xd,_0x48242e(U))],Q);function gn(_0x2fef4b,_0x467ef3,_0x3c45f8,_0x5f264b,_0xef6585,_0x3cf472){const _0x21373c=_0x2e02fc;return _0x5f264b&&_0xef6585[_0x21373c(0x14d)]?_0x2fef4b[_0x21373c(0x85)](Y,_0x467ef3,_0x3c45f8,_0x5f264b,_0xef6585,_0x3cf472,void 0x0):_0x5f264b?_0x2fef4b[_0x21373c(0x85)](J,_0x467ef3,_0x3c45f8,_0x5f264b,_0x3cf472):_0xef6585[_0x21373c(0x14d)]?_0x2fef4b[_0x21373c(0x85)](q,_0x467ef3,_0x3c45f8,_0xef6585,_0x3cf472):_0x2fef4b[_0x21373c(0x85)](K,_0x467ef3,_0x3c45f8,_0x3cf472);}let $=class extends _0x57b019{get['state'](){return this['_state'];}constructor(_0x4aef9f,_0x4bebac,_0x4d0787,_0x463b18,_0x599cfb,_0x37f6f3,_0x4ca69f,_0x27e135,_0x12f234,_0x4074bd,_0x5accff,_0x11ecc8,_0x1d2776,_0x114234){const _0x74ea34=_0x2e02fc;super(),this['unitID']=_0x4aef9f,this[_0x74ea34(0x21c)]=_0x4bebac,this['_type']=_0x4d0787,this[_0x74ea34(0x153)]=_0x463b18,this[_0x74ea34(0xcc)]=_0x599cfb,this[_0x74ea34(0xbb)]=_0x37f6f3,this[_0x74ea34(0xd3)]=_0x4ca69f,this['_eventService']=_0x27e135,this['_univerInstanceService']=_0x12f234,this[_0x74ea34(0x159)]=_0x4074bd,this['_commandService']=_0x5accff,this['_permissionService']=_0x11ecc8,this[_0x74ea34(0x185)]=_0x1d2776,this[_0x74ea34(0x122)]=_0x114234,z(this,_0x74ea34(0x2d4),new _0xdf7e62(null)),z(this,'state$',this['_state$']['asObservable']()),z(this,_0x74ea34(0x1cb),void 0x0),z(this,'_collaborationPaused',!0x1),z(this,'_changesetSessionId',''),z(this,_0x74ea34(0xb5),0x0),z(this,_0x74ea34(0x1e9),this[_0x74ea34(0x29f)][_0x74ea34(0x31f)](_0x374338(_0x3943c9=>_0x3943c9?_0x3943c9[_0x74ea34(0x1b6)]:_0x74ea34(0x2a0)),_0x5a2c81({'bufferSize':0x1,'refCount':!0x0}))),z(this,_0x74ea34(0x144),!0x1),z(this,'_remoteChangesetQueue',[]);}async['init'](){const _0x36ca8f=_0x2e02fc;if(this[_0x36ca8f(0xf2)])throw Error(_0x36ca8f(0xd0));await this[_0x36ca8f(0x26f)]();}['pauseCollaboration'](){const _0xa2431=_0x2e02fc;return this[_0xa2431(0x1d0)]=!0x0,_0x28ef5c(()=>{const _0x5d8a3f=_0xa2431;this[_0x5d8a3f(0x1d0)]=!0x1,this['_exhaustRemoteChangesetQueue']();});}[_0x2e02fc(0x27c)](_0x37bbdc){const _0x588960=_0x2e02fc;this[_0x588960(0x24b)](_0x37bbdc);}[_0x2e02fc(0x29e)](_0x512a9d){const _0x5d1ba8=_0x2e02fc;this['_state']=_0x512a9d,this[_0x5d1ba8(0x2d4)][_0x5d1ba8(0x160)](_0x512a9d);}async['_init'](){const _0x439176=_0x2e02fc;if(this[_0x439176(0x29e)](await this[_0x439176(0x23b)]()),this[_0x439176(0x185)]){var _0x1cebcf;(_0x1cebcf=this[_0x439176(0x185)])==null||_0x1cebcf[_0x439176(0xf7)](this[_0x439176(0x2ef)]),this[_0x439176(0xce)](this[_0x439176(0x185)][_0x439176(0x2a4)](this[_0x439176(0x2ef)])[_0x439176(0x222)](_0x5add91=>{const _0x12bda2=_0x439176;this[_0x12bda2(0x159)][_0x12bda2(0x181)]('[CollaborationEntity]','editing\x20status\x20changed\x20to',_0x5add91),_0x5add91===0x1?(this[_0x12bda2(0xbc)][_0x12bda2(0x1ba)]({'id':'OTHER_CLIENT_EDITING'}),this[_0x12bda2(0x210)][_0x12bda2(0x197)](new _0x424e79(this[_0x12bda2(0x2ef)])['id'],!0x1),this['_permissionService'][_0x12bda2(0x228)](!0x1)):(this['_permissionService']['updatePermissionPoint'](new _0x424e79(this['unitID'])['id'],!0x0),this[_0x12bda2(0x210)][_0x12bda2(0x228)](!0x0));}));}let _0x1a2669=!0x1;return this[_0x439176(0xce)](this[_0x439176(0x21c)][_0x439176(0xbe)][_0x439176(0x222)](_0x13085=>{const _0x4a199f=_0x439176;_0x13085===0x3?this['_toggleOnline'](_0x1a2669):_0x13085===0x2&&(_0x1a2669=!0x0,this[_0x4a199f(0x23a)]());})),this['disposeWithMe'](this['session'][_0x439176(0x83)]['subscribe'](_0x4b907c=>{const _0x2ca5a2=_0x439176;try{switch(_0x4b907c[_0x2ca5a2(0x161)]){case _0x150d16['NEW_CHANGESETS']:this[_0x2ca5a2(0x29d)](_0x93473e(_0x4b907c[_0x2ca5a2(0xa6)]));break;case _0x150d16[_0x2ca5a2(0xee)]:this[_0x2ca5a2(0x2c6)](_0x4b907c[_0x2ca5a2(0xa6)]);break;case _0x150d16[_0x2ca5a2(0x101)]:this[_0x2ca5a2(0x11d)]();break;case _0x150d16[_0x2ca5a2(0x2a3)]:this['_onRemoteRetry'](_0x4b907c[_0x2ca5a2(0xa6)]);break;case _0x150d16[_0x2ca5a2(0x17a)]:this['_onFetchMissResult'](_0x4b907c[_0x2ca5a2(0xa6)][_0x2ca5a2(0x322)]['map'](_0x12731f=>_0x93473e(_0x12731f)));break;case _0x150d16[_0x2ca5a2(0x2cf)]:this[_0x2ca5a2(0x11d)]({'isPermissionRej':!0x0});break;case _0x150d16[_0x2ca5a2(0x142)]:break;}}catch(_0x525057){throw console['error'](_0x2ca5a2(0x2d8),_0x525057),_0x525057;}})),this[_0x439176(0x1cb)];}[_0x2e02fc(0x268)](){this['_transitionLocked']=!0x1;}[_0x2e02fc(0x2f3)](){const _0x96354f=_0x2e02fc;if(this[_0x96354f(0x144)])throw Error(_0x96354f(0x2da));this['_transitionLocked']=!0x0;}[_0x2e02fc(0x24b)](_0x2d946b){const _0x43a745=_0x2e02fc;this['_lockTransition'](),this[_0x43a745(0x29e)](this[_0x43a745(0x1cb)][_0x43a745(0x11b)](_0x2d946b)),this[_0x43a745(0x268)]();}[_0x2e02fc(0x29d)](_0x2e15cf){const _0x308c9b=_0x2e02fc;if(!(_0x2e15cf[_0x308c9b(0x234)]<=this['_revisionService'][_0x308c9b(0x264)](this['unitID']))){if(this[_0x308c9b(0x1d0)]){this['_remoteChangesetQueue'][_0x308c9b(0x2b8)](_0x2e15cf);return;}this[_0x308c9b(0x196)](_0x2e15cf);}}[_0x2e02fc(0x94)](){const _0x1329c0=_0x2e02fc;this[_0x1329c0(0x14a)][_0x1329c0(0x1c7)](_0x2f431e=>this[_0x1329c0(0x196)](_0x2f431e)),this['_remoteChangesetQueue']=[];}['_applyRemoteChangeset'](_0x5604bd){const _0x2f68b1=_0x2e02fc;let _0x3167b5=this[_0x2f68b1(0xcc)][_0x2f68b1(0x97)][_0x2f68b1(0x156)](this[_0x2f68b1(0xcc)]['interceptor'][_0x2f68b1(0xd5)]()[_0x2f68b1(0x252)])(_0x5604bd[_0x2f68b1(0x324)],null)||_0x5604bd['mutations'],_0x7863ca={..._0x5604bd,'mutations':_0x3167b5};this[_0x2f68b1(0x2f3)](),this[_0x2f68b1(0x29e)](this[_0x2f68b1(0x1cb)]['onRemoteChangeset'](_0x7863ca)),this[_0x2f68b1(0x268)]();}[_0x2e02fc(0x2c6)](_0x7fa88c){const _0x299349=_0x2e02fc;this['_lockTransition'](),this['_updateState'](this[_0x299349(0x1cb)][_0x299349(0xcf)](_0x7fa88c)),this[_0x299349(0x268)]();}[_0x2e02fc(0x11d)](_0x5b98b7){const _0x2a9f32=_0x2e02fc;this[_0x2a9f32(0x2f3)](),this[_0x2a9f32(0x29e)](this[_0x2a9f32(0x1cb)][_0x2a9f32(0x9e)](_0x5b98b7)),this[_0x2a9f32(0x268)]();}[_0x2e02fc(0x13c)](_0xcc6285){const _0x919fbd=_0x2e02fc;this['_lockTransition'](),this[_0x919fbd(0x29e)](this[_0x919fbd(0x1cb)]['onRemoteRetry'](_0xcc6285)),this[_0x919fbd(0x268)]();}[_0x2e02fc(0x8e)](_0x3825ec){const _0x8327c9=_0x2e02fc;if(!(this[_0x8327c9(0x1cb)]instanceof Q))throw TypeError('[CollaborationEntity]:\x20cannot\x20apply\x20missing\x20results\x20on\x20other\x20states!');let _0x83c130=_0x3825ec[_0x8327c9(0x1a8)](_0x22fdf1=>{const _0x270eed=_0x8327c9;let _0x4767e0=this[_0x270eed(0xcc)][_0x270eed(0x97)][_0x270eed(0x156)](this[_0x270eed(0xcc)][_0x270eed(0x97)][_0x270eed(0xd5)]()[_0x270eed(0x252)])(_0x22fdf1[_0x270eed(0x324)],null)||_0x22fdf1['mutations'];return{..._0x22fdf1,'mutations':_0x4767e0};});this[_0x8327c9(0x2f3)](),this[_0x8327c9(0x29e)](this[_0x8327c9(0x1cb)][_0x8327c9(0xe7)](_0x83c130)),this['_unlockTransition']();}[_0x2e02fc(0x23a)](){const _0x58b581=_0x2e02fc;this['_lockTransition'](),this['_updateState'](this['_state'][_0x58b581(0x2fc)]()),this[_0x58b581(0x268)]();}['_toggleOnline'](_0x228093=!0x1){const _0x328c4b=_0x2e02fc;this[_0x328c4b(0x2f3)](),this[_0x328c4b(0x29e)](this[_0x328c4b(0x1cb)][_0x328c4b(0x9c)]()),this[_0x328c4b(0x268)]();let _0x4b9d44=this[_0x328c4b(0x1cb)];_0x228093&&_0x4b9d44 instanceof K&&(this['_lockTransition'](),this[_0x328c4b(0x29e)](_0x4b9d44['fetchMiss']()),this[_0x328c4b(0x268)]());}async['_createInitialState'](){return new Promise(_0x653e8b=>{const _0x44e3d4=_0x1bad;this[_0x44e3d4(0x21c)][_0x44e3d4(0xbe)][_0x44e3d4(0x31f)](_0x2d16fe(0x1))['subscribe'](async _0x2d77f3=>{const _0x52fa8f=_0x44e3d4;_0x653e8b(await this[_0x52fa8f(0x31c)](_0x2d77f3===0x3));});});}[_0x2e02fc(0x2ac)](){const _0x42e0d6=_0x2e02fc;let _0x5aea14=this[_0x42e0d6(0x2ef)];return{'onStateChange':(_0x32991e,_0x52fb6b)=>{const _0x250937=_0x42e0d6;if(_0x32991e!==this['_state'])throw Error(_0x250937(0x143)+_0x32991e[_0x250937(0x1b6)]+_0x250937(0xdb)+_0x52fb6b[_0x250937(0x1b6)]+_0x250937(0x1fd)+this[_0x250937(0x1cb)][_0x250937(0x1b6)]);this[_0x250937(0x29e)](_0x52fb6b);},'onSendChangeset':_0x2a02a9=>{const _0x5a0be6=_0x42e0d6;_0x2a02a9[_0x5a0be6(0x7e)]||(_0x2a02a9[_0x5a0be6(0x7e)]=this[_0x5a0be6(0x2ea)],_0x2a02a9['reqId']=++this[_0x5a0be6(0xb5)]);let _0x2ade2b={'eventID':_0x150d16[_0x5a0be6(0x176)],'data':{'unitID':_0x2a02a9[_0x5a0be6(0x2ef)],'unitType':this[_0x5a0be6(0x229)],'changeset':_0x2a02a9,'memberID':this['session']['getMemberID']()}};this['session'][_0x5a0be6(0x1fc)](_0x2ade2b,this[_0x5a0be6(0x2ef)]);},'onMissingChangesets':({from:_0x40bf8e,to:_0x48d2cf})=>{const _0x4db9e4=_0x42e0d6;this[_0x4db9e4(0x159)][_0x4db9e4(0x181)](_0x4db9e4(0x110),_0x4db9e4(0x15f)+_0x40bf8e+'\x20to\x20'+_0x48d2cf);let _0x5031f9={'eventID':_0x150d16[_0x4db9e4(0x1b2)],'data':{'unitID':_0x5aea14,'unitType':this['_type'],'from':_0x40bf8e,'to':_0x48d2cf}};this[_0x4db9e4(0x21c)][_0x4db9e4(0x1fc)](_0x5031f9,this[_0x4db9e4(0x2ef)]);}};}async['_createInitialStateImpl'](_0x58dbc){const _0x499c83=_0x2e02fc;var _0x366d1f;let _0x1ce486=await((_0x366d1f=this[_0x499c83(0x122)])==null?void 0x0:_0x366d1f[_0x499c83(0x1bc)](this[_0x499c83(0x2ef)])),_0x83f1af=(_0x1ce486==null?void 0x0:_0x1ce486[_0x499c83(0x324)])??[],_0x2628b8=(_0x1ce486==null?void 0x0:_0x1ce486[_0x499c83(0xa8)])??null,_0x433f8e=!!(_0x2628b8!=null&&_0x2628b8[_0x499c83(0x7e)])&&!!(_0x2628b8!=null&&_0x2628b8[_0x499c83(0x273)]);this['_changesetSessionId']=_0x433f8e?_0x2628b8[_0x499c83(0x7e)]:_0x500aaf(),this[_0x499c83(0xb5)]=_0x433f8e?_0x2628b8['reqId']:0x0;let _0x4a1f7c=this[_0x499c83(0x2ef)];try{this[_0x499c83(0x127)](_0x2628b8,_0x83f1af);}catch(_0x3f3cfc){this[_0x499c83(0x159)][_0x499c83(0x2cd)](_0x3f3cfc);}let _0x36b2ff=this[_0x499c83(0x2ac)]();if(_0x58dbc){let _0x199227=gn(this['_injector'],_0x4a1f7c,this[_0x499c83(0x229)],_0x2628b8,_0x83f1af,_0x36b2ff);return _0x199227 instanceof q?_0x199227[_0x499c83(0x165)]():(_0x199227 instanceof Y||_0x199227 instanceof J)&&_0x199227[_0x499c83(0x1d2)](),_0x199227;}return this['_injector'][_0x499c83(0x85)](Z,_0x4a1f7c,this[_0x499c83(0x229)],_0x2628b8,_0x83f1af,_0x36b2ff);}['_replayCachedMutations'](_0x28285c,_0x4bf646){const _0x47644f=_0x2e02fc;var _0xaab4e2,_0x347d72;let _0x1b86fa=this[_0x47644f(0xcc)][_0x47644f(0x97)]['fetchThroughInterceptors'](this[_0x47644f(0xcc)][_0x47644f(0x97)][_0x47644f(0xd5)]()[_0x47644f(0x252)]);(_0xaab4e2=_0x1b86fa((_0x28285c==null?void 0x0:_0x28285c[_0x47644f(0x324)])||[],null))==null||_0xaab4e2['forEach'](_0x3bf6e5=>this[_0x47644f(0xb1)][_0x47644f(0x316)](_0x3bf6e5['id'],_0x3bf6e5['params'])),(_0x347d72=_0x1b86fa(_0x4bf646||[],null))==null||_0x347d72['forEach'](_0x2f0e01=>this[_0x47644f(0xb1)][_0x47644f(0x316)](_0x2f0e01['id'],_0x2f0e01[_0x47644f(0x169)]));}};$=H([V(0x3,_0x17057e(_0x346ad7)),V(0x4,_0x17057e(_0xe47be4)),V(0x5,_0x17057e(_0xc4a55f)),V(0x6,_0x17057e(_0x4b0edd)),V(0x7,_0x17057e(B)),V(0x8,_0x4a3eaa),V(0x9,_0x3efc4d),V(0xa,_0xdb365f),V(0xb,_0x5a8b72),V(0xc,_0x48242e(W)),V(0xd,_0x48242e(U))],$);let _n=class extends ${constructor(_0x2059fe,_0xde2538,_0x4967ad,_0x19c215,_0xdd509b,_0x12ba2b,_0x2cc137,_0x41b9fe,_0x445ede,_0x220753,_0x3392e2,_0x3b5d2a,_0x48a248,_0x1a9149,_0x57b290){const _0x5de2a6=_0x2e02fc;super(_0x2059fe,_0x4967ad,_0xde2538,_0x19c215,_0xdd509b,_0x12ba2b,_0x2cc137,_0x41b9fe,_0x445ede,_0x220753,_0x3392e2,_0x3b5d2a,_0x1a9149,_0x57b290),this[_0x5de2a6(0x2ef)]=_0x2059fe,this[_0x5de2a6(0xae)]=_0xde2538,this[_0x5de2a6(0x23f)]=_0x48a248,z(this,_0x5de2a6(0x1b4),null);}[_0x2e02fc(0x313)](_0x49ef03){const _0xa0087=_0x2e02fc;this[_0xa0087(0x1b4)]=_0x49ef03;}[_0x2e02fc(0x259)](){const _0x2275dc=_0x2e02fc;this['_handlerCallback']=null,super[_0x2275dc(0x259)]();}[_0x2e02fc(0x2ac)](){const _0x2a6b6b=_0x2e02fc;let _0x4b2a03=super[_0x2a6b6b(0x2ac)]();return _0x4b2a03[_0x2a6b6b(0xed)]=_0x49750e=>{const _0x4f018b=_0x2a6b6b;var _0x30cc56,_0x38afe8;return(_0x30cc56=this[_0x4f018b(0x1b4)])==null||(_0x38afe8=_0x30cc56[_0x4f018b(0xed)])==null?void 0x0:_0x38afe8['call'](_0x30cc56,_0x49750e);},_0x4b2a03[_0x2a6b6b(0x8f)]=_0xf15fce=>{const _0x5ba690=_0x2a6b6b;var _0x8e765,_0x27ae67;return(_0x8e765=this[_0x5ba690(0x1b4)])==null||(_0x27ae67=_0x8e765[_0x5ba690(0x8f)])==null?void 0x0:_0x27ae67[_0x5ba690(0x95)](_0x8e765,_0xf15fce);},_0x4b2a03['onTransformSelections']=_0xa9bb7d=>{const _0x4124c5=_0x2a6b6b;var _0x256739,_0x5d58c8;return(_0x256739=this[_0x4124c5(0x1b4)])==null||(_0x5d58c8=_0x256739[_0x4124c5(0x25e)])==null?void 0x0:_0x5d58c8[_0x4124c5(0x95)](_0x256739,_0xa9bb7d);},_0x4b2a03[_0x2a6b6b(0x1bd)]=_0x3ce916=>{const _0x5473d9=_0x2a6b6b;var _0x4ec5cb,_0x280134;return(_0x4ec5cb=this[_0x5473d9(0x1b4)])==null||(_0x280134=_0x4ec5cb['onSyncEditingCollabCursor'])==null?void 0x0:_0x280134[_0x5473d9(0x95)](_0x4ec5cb,_0x3ce916);},_0x4b2a03[_0x2a6b6b(0x136)]=_0x19764c=>{const _0x1b323d=_0x2a6b6b;var _0x3da8a8,_0x525e0d;return((_0x3da8a8=this[_0x1b323d(0x1b4)])==null||(_0x525e0d=_0x3da8a8['onTransformRemoteChangesetByIMECache'])==null?void 0x0:_0x525e0d[_0x1b323d(0x95)](_0x3da8a8,_0x19764c))??_0x19764c;},_0x4b2a03[_0x2a6b6b(0xe8)]=_0x281b1d=>{const _0x1841f9=_0x2a6b6b;var _0x5d0914,_0x40cc0e;return((_0x5d0914=this['_handlerCallback'])==null||(_0x40cc0e=_0x5d0914[_0x1841f9(0xe8)])==null?void 0x0:_0x40cc0e[_0x1841f9(0x95)](_0x5d0914,_0x281b1d))??_0x281b1d;},_0x4b2a03;}async[_0x2e02fc(0x26f)](){const _0x4d2807=_0x2e02fc;let _0x265b42=await super['_init']();return this[_0x4d2807(0xce)](this['_docStateChangeManagerService'][_0x4d2807(0x1ae)][_0x4d2807(0x222)](_0x2222f5=>{const _0x1b272e=_0x4d2807;if(_0x2222f5==null||_0x2222f5[_0x1b272e(0x299)]!==this['unitID'])return;let {commandId:_0x183410,redoState:_0x27b824,unitId:_0x51ce94}=_0x2222f5,_0x360ff7={'id':_0x183410,'type':_0x459936[_0x1b272e(0x16e)],'params':{'unitId':_0x51ce94,'actions':_0x27b824[_0x1b272e(0x174)],'textRanges':null}};this[_0x1b272e(0x24b)](_0x360ff7);})),this[_0x4d2807(0xce)](this[_0x4d2807(0xb1)]['onMutationExecutedForCollab']((_0x597404,_0x472bb7)=>{const _0x5a1ede=_0x4d2807;if(_0x597404[_0x5a1ede(0xae)]!==_0x459936[_0x5a1ede(0x16e)]||_0x472bb7!=null&&_0x472bb7[_0x5a1ede(0xac)]||_0x472bb7!=null&&_0x472bb7[_0x5a1ede(0x2ae)]||_0x597404['id']===_0x520df5['id'])return;let _0x3a2402=_0x597404[_0x5a1ede(0x169)];if((_0x3a2402==null?void 0x0:_0x3a2402['unitId'])!==this[_0x5a1ede(0x2ef)])return;let _0xa3ce32=_0x597404,_0x1fba28=this['_compressMutationService'][_0x5a1ede(0x97)][_0x5a1ede(0x156)](this['_compressMutationService'][_0x5a1ede(0x97)][_0x5a1ede(0xd5)]()['COMPRESS_MUTATION_SEND'])([_0xa3ce32],this[_0x5a1ede(0x2eb)])||[_0xa3ce32];this[_0x5a1ede(0x24b)](_0x1fba28[0x0]);})),_0x265b42;}};_n=H([V(0x3,_0x17057e(_0x346ad7)),V(0x4,_0x17057e(_0xe47be4)),V(0x5,_0x17057e(_0xc4a55f)),V(0x6,_0x17057e(_0x4b0edd)),V(0x7,_0x17057e(B)),V(0x8,_0x4a3eaa),V(0x9,_0x3efc4d),V(0xa,_0xdb365f),V(0xb,_0x5a8b72),V(0xc,_0x17057e(_0x16ea30)),V(0xd,_0x48242e(W)),V(0xe,_0x48242e(U))],_n);let vn=class extends ${constructor(_0xeaece3,_0x357232,_0x56a4f4,_0x4b3ff6,_0x5dbde0,_0x1526aa,_0x406045,_0x67f016,_0xa43e83,_0x1d30c1,_0x267f61,_0x526e51,_0xc02536,_0x167288){const _0x125529=_0x2e02fc;super(_0xeaece3,_0x56a4f4,_0x357232,_0x4b3ff6,_0x5dbde0,_0x1526aa,_0x406045,_0x67f016,_0xa43e83,_0x1d30c1,_0x267f61,_0x526e51,_0xc02536,_0x167288),this['unitID']=_0xeaece3,this[_0x125529(0xae)]=_0x357232;}async[_0x2e02fc(0x26f)](){const _0x2cc2e4=_0x2e02fc;let _0x62d4ca=await super[_0x2cc2e4(0x26f)]();return this[_0x2cc2e4(0xce)](this['_commandService'][_0x2cc2e4(0xf1)]((_0x5c2a21,_0x3e4417)=>{const _0x49a6d7=_0x2cc2e4;if(_0x5c2a21[_0x49a6d7(0xae)]!==_0x459936[_0x49a6d7(0x16e)]||_0x3e4417!=null&&_0x3e4417['fromCollab']||_0x3e4417!=null&&_0x3e4417['onlyLocal'])return;let _0x569dd0=_0x5c2a21[_0x49a6d7(0x169)];if((_0x569dd0==null?void 0x0:_0x569dd0[_0x49a6d7(0x299)])!==this['unitID'])return;let _0x2db589=_0x5c2a21,_0x557a1c=this[_0x49a6d7(0xcc)][_0x49a6d7(0x97)][_0x49a6d7(0x156)](this['_compressMutationService'][_0x49a6d7(0x97)]['getInterceptPoints']()[_0x49a6d7(0x29a)])([_0x2db589],this[_0x49a6d7(0x2eb)])||[_0x2db589];this[_0x49a6d7(0x24b)](_0x557a1c[0x0]);})),_0x62d4ca;}};vn=H([V(0x3,_0x17057e(_0x346ad7)),V(0x4,_0x17057e(_0xe47be4)),V(0x5,_0x17057e(_0xc4a55f)),V(0x6,_0x17057e(_0x4b0edd)),V(0x7,_0x17057e(B)),V(0x8,_0x4a3eaa),V(0x9,_0x3efc4d),V(0xa,_0xdb365f),V(0xb,_0x5a8b72),V(0xc,_0x48242e(W)),V(0xd,_0x48242e(U))],vn);let yn=class extends ${constructor(_0x4b143f,_0x2cf288,_0x559764,_0x463eb9,_0x5bbcdf,_0x4f67ab,_0x5a5b13,_0x1d9c7f,_0x587530,_0x4a7105,_0x1e4dd5,_0x4bcfb3,_0x170c15,_0x54f053,_0x3f0b16){const _0x1eef31=_0x2e02fc;super(_0x4b143f,_0x559764,_0x2cf288,_0x463eb9,_0x5bbcdf,_0x4f67ab,_0x5a5b13,_0x587530,_0x4a7105,_0x1e4dd5,_0x4bcfb3,_0x170c15,_0x54f053,_0x3f0b16),this[_0x1eef31(0x2ef)]=_0x4b143f,this[_0x1eef31(0xae)]=_0x2cf288,this[_0x1eef31(0x286)]=_0x1d9c7f;}[_0x2e02fc(0x2ac)](){const _0x17aca4=_0x2e02fc;let _0x1a991f=super[_0x17aca4(0x2ac)]();return _0x1a991f[_0x17aca4(0x25e)]=_0xefebb1=>this['_sheetTransformSelectionsService'][_0x17aca4(0x2e2)](_0xefebb1),_0x1a991f;}async[_0x2e02fc(0x26f)](){const _0x432dcf=_0x2e02fc;let _0x3845da=await super[_0x432dcf(0x26f)]();return this[_0x432dcf(0xce)](this[_0x432dcf(0xb1)][_0x432dcf(0xf1)]((_0x374bfa,_0xc058a9)=>{const _0x582c3=_0x432dcf;if(_0x374bfa[_0x582c3(0xae)]!==_0x459936[_0x582c3(0x16e)]||_0xc058a9!=null&&_0xc058a9[_0x582c3(0xac)]||_0xc058a9!=null&&_0xc058a9[_0x582c3(0x2ae)])return;let _0x2d4d22=_0x374bfa[_0x582c3(0x169)];if((_0x2d4d22==null?void 0x0:_0x2d4d22[_0x582c3(0x299)])!==this['unitID'])return;let _0x5548d3=_0x374bfa,_0x28d495=this['_compressMutationService'][_0x582c3(0x97)][_0x582c3(0x156)](this[_0x582c3(0xcc)][_0x582c3(0x97)][_0x582c3(0xd5)]()[_0x582c3(0x29a)])([_0x5548d3],this[_0x582c3(0x2eb)])||[_0x5548d3];this[_0x582c3(0x24b)](_0x28d495[0x0]);})),_0x3845da;}};yn=H([V(0x3,_0x17057e(_0x346ad7)),V(0x4,_0x17057e(_0xe47be4)),V(0x5,_0x17057e(_0xc4a55f)),V(0x6,_0x17057e(_0x4b0edd)),V(0x7,_0x17057e(Wt)),V(0x8,_0x17057e(B)),V(0x9,_0x4a3eaa),V(0xa,_0x3efc4d),V(0xb,_0xdb365f),V(0xc,_0x5a8b72),V(0xd,_0x48242e(W)),V(0xe,_0x48242e(U))],yn);let bn=class extends ${constructor(_0x8cf8cd,_0x1cd76f,_0x1c945e,_0x463b11,_0x227f85,_0x29df2e,_0x4b09bc,_0xda9122,_0x42b9d5,_0x30a16e,_0x27ca6e,_0x47c4ae,_0x1118a4,_0x59a1ed){const _0x48da61=_0x2e02fc;super(_0x8cf8cd,_0x1c945e,_0x1cd76f,_0x463b11,_0x227f85,_0x29df2e,_0x4b09bc,_0xda9122,_0x42b9d5,_0x30a16e,_0x27ca6e,_0x47c4ae,_0x1118a4,_0x59a1ed),this[_0x48da61(0x2ef)]=_0x8cf8cd,this[_0x48da61(0xae)]=_0x1cd76f;}async[_0x2e02fc(0x26f)](){const _0x2b0974=_0x2e02fc;let _0x563390=await super[_0x2b0974(0x26f)]();return this[_0x2b0974(0xce)](this[_0x2b0974(0xb1)]['onMutationExecutedForCollab']((_0x33bd61,_0x32ce38)=>{const _0x3adbbd=_0x2b0974;if(_0x33bd61[_0x3adbbd(0xae)]!==_0x459936[_0x3adbbd(0x16e)]||_0x32ce38!=null&&_0x32ce38[_0x3adbbd(0xac)]||_0x32ce38!=null&&_0x32ce38[_0x3adbbd(0x2ae)])return;let _0x5339b0=_0x33bd61[_0x3adbbd(0x169)];if((_0x5339b0==null?void 0x0:_0x5339b0['unitId'])!==this[_0x3adbbd(0x2ef)])return;let _0x1231f3=_0x33bd61,_0x201ecb=this[_0x3adbbd(0xcc)][_0x3adbbd(0x97)][_0x3adbbd(0x156)](this['_compressMutationService'][_0x3adbbd(0x97)]['getInterceptPoints']()['COMPRESS_MUTATION_SEND'])([_0x1231f3],this[_0x3adbbd(0x2eb)])||[_0x1231f3];this[_0x3adbbd(0x24b)](_0x201ecb[0x0]);})),_0x563390;}};bn=H([V(0x3,_0x17057e(_0x346ad7)),V(0x4,_0x17057e(_0xe47be4)),V(0x5,_0x17057e(_0xc4a55f)),V(0x6,_0x17057e(_0x4b0edd)),V(0x7,_0x17057e(B)),V(0x8,_0x4a3eaa),V(0x9,_0x3efc4d),V(0xa,_0xdb365f),V(0xb,_0x5a8b72),V(0xc,_0x48242e(W)),V(0xd,_0x48242e(U))],bn);let xn=class extends ${constructor(_0xd41dd8,_0x867902,_0x973275,_0x38ebe0,_0x576101,_0x2d37a0,_0xdd0e40,_0x234328,_0x5bb8a1,_0x224714,_0x23974c,_0xeb6ec,_0x20d61d,_0xcca02e){const _0x4ff03c=_0x2e02fc;super(_0xd41dd8,_0x973275,_0x867902,_0x38ebe0,_0x576101,_0x2d37a0,_0xdd0e40,_0x234328,_0x5bb8a1,_0x224714,_0x23974c,_0xeb6ec,_0x20d61d,_0xcca02e),this['unitID']=_0xd41dd8,this[_0x4ff03c(0xae)]=_0x867902;}async[_0x2e02fc(0x26f)](){const _0x3ea5ff=_0x2e02fc;let _0x40c1ce=await super[_0x3ea5ff(0x26f)]();return this[_0x3ea5ff(0xce)](this['_commandService'][_0x3ea5ff(0xf1)]((_0x24f370,_0x2230b4)=>{const _0x5df5aa=_0x3ea5ff;if(_0x24f370['type']!==_0x459936[_0x5df5aa(0x16e)]||_0x2230b4!=null&&_0x2230b4[_0x5df5aa(0xac)]||_0x2230b4!=null&&_0x2230b4[_0x5df5aa(0x2ae)])return;let _0x1cc5ab=_0x24f370['params'];if((_0x1cc5ab==null?void 0x0:_0x1cc5ab[_0x5df5aa(0x299)])!==this[_0x5df5aa(0x2ef)])return;let _0x5f2b31=_0x24f370,_0x4d01f7=this[_0x5df5aa(0xcc)][_0x5df5aa(0x97)][_0x5df5aa(0x156)](this['_compressMutationService']['interceptor'][_0x5df5aa(0xd5)]()[_0x5df5aa(0x29a)])([_0x5f2b31],this[_0x5df5aa(0x2eb)])||[_0x5f2b31];this[_0x5df5aa(0x24b)](_0x4d01f7[0x0]);})),_0x40c1ce;}};xn=H([V(0x3,_0x17057e(_0x346ad7)),V(0x4,_0x17057e(_0xe47be4)),V(0x5,_0x17057e(_0xc4a55f)),V(0x6,_0x17057e(_0x4b0edd)),V(0x7,_0x17057e(B)),V(0x8,_0x4a3eaa),V(0x9,_0x3efc4d),V(0xa,_0xdb365f),V(0xb,_0x5a8b72),V(0xc,_0x48242e(W)),V(0xd,_0x48242e(U))],xn);let Sn=class extends ${constructor(_0x54ae4b,_0x39ffb1,_0x7a1e9a,_0x129933,_0x28315c,_0x2f6e1b,_0x16255c,_0x50c55a,_0x4dbcd5,_0x5d03aa,_0x15c6a9,_0x28015f,_0x59000a,_0x494ceb){super(_0x54ae4b,_0x7a1e9a,_0x39ffb1,_0x129933,_0x28315c,_0x2f6e1b,_0x16255c,_0x50c55a,_0x4dbcd5,_0x5d03aa,_0x15c6a9,_0x28015f,_0x59000a,_0x494ceb),this['unitID']=_0x54ae4b,this['type']=_0x39ffb1;}async['_init'](){const _0x444425=_0x2e02fc;let _0x3dd418=await super[_0x444425(0x26f)]();return this[_0x444425(0xce)](this[_0x444425(0xb1)]['onMutationExecutedForCollab']((_0x54c764,_0x3f02c1)=>{const _0x61af2d=_0x444425;if(_0x54c764[_0x61af2d(0xae)]!==_0x459936['MUTATION']||_0x3f02c1!=null&&_0x3f02c1[_0x61af2d(0xac)]||_0x3f02c1!=null&&_0x3f02c1['onlyLocal'])return;let _0x5a9d0a=_0x54c764[_0x61af2d(0x169)];if((_0x5a9d0a==null?void 0x0:_0x5a9d0a[_0x61af2d(0x299)])!==this[_0x61af2d(0x2ef)])return;let _0xf6e0ec=_0x54c764,_0x40e89a=this['_compressMutationService'][_0x61af2d(0x97)][_0x61af2d(0x156)](this[_0x61af2d(0xcc)][_0x61af2d(0x97)]['getInterceptPoints']()[_0x61af2d(0x29a)])([_0xf6e0ec],this[_0x61af2d(0x2eb)])||[_0xf6e0ec];this[_0x61af2d(0x24b)](_0x40e89a[0x0]);})),_0x3dd418;}};Sn=H([V(0x3,_0x17057e(_0x346ad7)),V(0x4,_0x17057e(_0xe47be4)),V(0x5,_0x17057e(_0xc4a55f)),V(0x6,_0x17057e(_0x4b0edd)),V(0x7,_0x17057e(B)),V(0x8,_0x4a3eaa),V(0x9,_0x3efc4d),V(0xa,_0xdb365f),V(0xb,_0x5a8b72),V(0xc,_0x48242e(W)),V(0xd,_0x48242e(U))],Sn);const Cn=_0x3a76ad('univer-pro.collaboration-client.network-condition.service');function wn(_0xcb7a80){const _0xd06f75=_0x2e02fc;let _0x1fb08d=_0xcb7a80[_0xd06f75(0xa6)],_0x4582a3=JSON[_0xd06f75(0x215)](_0x1fb08d);switch(_0x4582a3['cmd']){case _0x6e704b['HEARTBEAT']:case _0x6e704b[_0xd06f75(0x2ab)]:{let _0x41a3d2=_0x4582a3[_0xd06f75(0xc9)];return{..._0x4582a3,'data':_0x41a3d2,'cmd':_0x4582a3[_0xd06f75(0x2d6)]};}case _0x6e704b[_0xd06f75(0x124)]:{let _0x4ec571=_0x4582a3[_0xd06f75(0x29b)];return{..._0x4582a3,'data':_0x4ec571,'cmd':_0x4582a3[_0xd06f75(0x2d6)]};}case _0x6e704b[_0xd06f75(0x2a6)]:{let _0x58b13b=_0x4582a3[_0xd06f75(0xdf)];switch(_0x58b13b['eventID']){case _0x150d16[_0xd06f75(0x2cf)]:var _0x254ac8;return{..._0x4582a3,'data':{..._0x58b13b,'data':(_0x254ac8=_0x58b13b[_0xd06f75(0x315)])==null?void 0x0:_0x254ac8['cs']},'cmd':_0x4582a3[_0xd06f75(0x2d6)]};case _0x150d16[_0xd06f75(0xee)]:var _0x2a92ca;return{..._0x4582a3,'data':{..._0x58b13b,'data':(_0x2a92ca=_0x58b13b[_0xd06f75(0x2f5)])==null?void 0x0:_0x2a92ca['cs']},'cmd':_0x4582a3[_0xd06f75(0x2d6)]};case _0x150d16['NEW_CHANGESETS']:var _0x18c037;return{..._0x4582a3,'data':{..._0x58b13b,'data':(_0x18c037=_0x58b13b[_0xd06f75(0xe4)])==null?void 0x0:_0x18c037['cs']},'cmd':_0x4582a3[_0xd06f75(0x2d6)]};case _0x150d16[_0xd06f75(0x101)]:var _0x28946b;return{..._0x4582a3,'data':{..._0x58b13b,'data':(_0x28946b=_0x58b13b[_0xd06f75(0x158)])==null?void 0x0:_0x28946b['cs']},'cmd':_0x4582a3[_0xd06f75(0x2d6)]};case _0x150d16[_0xd06f75(0x2a3)]:var _0x3cd35a;return{..._0x4582a3,'data':{..._0x58b13b,'data':(_0x3cd35a=_0x58b13b['csShouldRetryEvent'])==null?void 0x0:_0x3cd35a['cs']},'cmd':_0x4582a3[_0xd06f75(0x2d6)]};case _0x150d16['UPDATE_CURSOR']:return{..._0x4582a3,'data':{..._0x58b13b,'data':_0x58b13b['updateCursorEvent']},'cmd':_0x4582a3[_0xd06f75(0x2d6)]};case _0x150d16['USERS_ENTER']:return{..._0x4582a3,'data':{..._0x58b13b,'data':_0x58b13b[_0xd06f75(0xb7)]},'cmd':_0x4582a3['cmd']};case _0x150d16[_0xd06f75(0xa7)]:return{..._0x4582a3,'data':{..._0x58b13b,'data':_0x58b13b[_0xd06f75(0x188)]},'cmd':_0x4582a3[_0xd06f75(0x2d6)]};case _0x150d16[_0xd06f75(0x306)]:return{..._0x4582a3,'data':{..._0x58b13b,'data':_0x58b13b[_0xd06f75(0x1c3)]},'cmd':_0x4582a3[_0xd06f75(0x2d6)]};case _0x150d16[_0xd06f75(0x1c1)]:case _0x150d16['LIVESHARE_OPERATION']:return{..._0x4582a3,'data':{..._0x58b13b,'data':_0x58b13b[_0xd06f75(0x20a)]},'cmd':_0x4582a3['cmd']};case _0x150d16[_0xd06f75(0x1db)]:return{..._0x4582a3,'data':{..._0x58b13b,'data':_0x58b13b[_0xd06f75(0x1c3)]},'cmd':_0x4582a3[_0xd06f75(0x2d6)]};case _0x150d16[_0xd06f75(0x1bb)]:return{..._0x4582a3,'data':_0x58b13b,'cmd':_0x4582a3[_0xd06f75(0x2d6)]};case _0x150d16[_0xd06f75(0x1a7)]:return{..._0x4582a3,'data':{..._0x58b13b,'data':_0x58b13b['commentUpdateEvent']},'cmd':_0x4582a3[_0xd06f75(0x2d6)]};case _0x150d16['UPDATE_PERMISSION_OBJ']:return{..._0x4582a3,'data':{..._0x58b13b,'data':_0x58b13b[_0xd06f75(0x96)]},'cmd':_0x4582a3['cmd']};case _0x150d16[_0xd06f75(0x2e3)]:return{..._0x4582a3,'data':{..._0x58b13b,'data':_0x58b13b['shouldCloseConn']},'cmd':_0x4582a3[_0xd06f75(0x2d6)]};case _0x150d16[_0xd06f75(0x142)]:return{..._0x4582a3,'data':{..._0x58b13b,'data':_0x58b13b[_0xd06f75(0x283)]},'cmd':_0x4582a3['cmd']};default:return _0x4582a3;}}default:return _0x4582a3;}}function Tn(_0x4f1263){const _0x6f25b4=_0x2e02fc;switch(_0x4f1263[_0x6f25b4(0x2d6)]){case _0x6e704b[_0x6f25b4(0x1e4)]:case _0x6e704b[_0x6f25b4(0x2ab)]:return JSON[_0x6f25b4(0xc0)]({'cmd':_0x4f1263['cmd'],'routeKey':_0x4f1263[_0x6f25b4(0x19f)]});case _0x6e704b[_0x6f25b4(0x7f)]:{let _0x3de590;switch(_0x4f1263[_0x6f25b4(0xa6)][_0x6f25b4(0x161)]){case _0x150d16['UPDATE_CURSOR']:_0x3de590={'eventID':_0x150d16[_0x6f25b4(0x27e)],'updateCursorEvent':_0x4f1263[_0x6f25b4(0xa6)][_0x6f25b4(0xa6)]};break;case _0x150d16[_0x6f25b4(0xa7)]:_0x3de590={'eventID':_0x150d16[_0x6f25b4(0xa7)],'leaveEvent':_0x4f1263[_0x6f25b4(0xa6)][_0x6f25b4(0xa6)]};break;case _0x150d16[_0x6f25b4(0x18c)]:_0x3de590={'eventID':_0x150d16['USERS_ENTER'],'joinEvent':_0x4f1263['data'][_0x6f25b4(0xa6)]};break;case _0x150d16['LIVESHARE_NEW_HOST']:_0x3de590={'eventID':_0x150d16[_0x6f25b4(0x306)],'liveShareNewHost':_0x4f1263[_0x6f25b4(0xa6)]['data']};break;case _0x150d16[_0x6f25b4(0x211)]:_0x3de590={'eventID':_0x150d16['LIVESHARE_OPERATION'],'liveShareOperation':_0x4f1263[_0x6f25b4(0xa6)]['data']};break;case _0x150d16[_0x6f25b4(0x1db)]:_0x3de590={'eventID':_0x150d16[_0x6f25b4(0x1db)],'liveShareTerminate':_0x4f1263[_0x6f25b4(0xa6)]['data']};break;case _0x150d16[_0x6f25b4(0x1a4)]:_0x3de590={'eventID':_0x150d16['LIVESHARE_REQUEST_HOST'],'liveShareRequestHost':_0x4f1263['data'][_0x6f25b4(0xa6)]};break;case _0x150d16['LIVESHARE_FETCH_OPERATIONS']:_0x3de590={'eventID':_0x150d16[_0x6f25b4(0x1c1)]};break;default:_0x3de590={'eventID':_0x4f1263[_0x6f25b4(0xa6)][_0x6f25b4(0x161)]};}return JSON[_0x6f25b4(0xc0)]({'cmd':_0x4f1263['cmd'],'routeKey':_0x4f1263[_0x6f25b4(0x19f)],'collaMsg':_0x3de590});}case _0x6e704b['JOIN']:return JSON[_0x6f25b4(0xc0)]({'cmd':_0x4f1263[_0x6f25b4(0x2d6)],'routeKey':_0x4f1263['routeKey'],'joinReq':_0x4f1263['data']});case _0x6e704b['LEAVE']:return JSON[_0x6f25b4(0xc0)]({'cmd':_0x4f1263[_0x6f25b4(0x2d6)],'routeKey':_0x4f1263['routeKey'],'leaveReq':_0x4f1263[_0x6f25b4(0xa6)]});default:throw Error(_0x6f25b4(0x1b7));}}const En=_0x3a76ad(_0x2e02fc(0x302));function Dn(_0x50e906,_0x1be9f3,_0x3ccc4d){const _0x2f276a=_0x2e02fc;return _0x50e906+'/'+_0x1be9f3+_0x2f276a(0x1cc)+_0x3ccc4d+_0x2f276a(0x1c6);}let On=class extends _0x5af3d8{constructor(_0x1114ef,_0x52f996,_0x5536fa,_0x2cfc87,_0x57a5d6){const _0x4501b8=_0x2e02fc;super(),this[_0x4501b8(0x153)]=_0x1114ef,this[_0x4501b8(0x1da)]=_0x52f996,this[_0x4501b8(0x24e)]=_0x5536fa,this['_logService']=_0x2cfc87,this[_0x4501b8(0xb6)]=_0x57a5d6;}[_0x2e02fc(0x157)](_0xf73db4){const _0x186d3a=_0x2e02fc;let _0x304b1b=this[_0x186d3a(0x153)][_0x186d3a(0x241)](_0x12b950);if(!_0x304b1b)throw Error(_0x186d3a(0x1d5));let _0x15fa3a=_0x304b1b[_0x186d3a(0x155)](_0xf73db4);if(!_0x15fa3a)throw Error(_0x186d3a(0x1b0));let _0x5d1c24=new _0x38ef99(),_0x4fdcdc=new _0x4301b4();_0x5d1c24['add'](_0x15fa3a[_0x186d3a(0x237)]['subscribe'](_0x1831d4=>_0x4fdcdc[_0x186d3a(0x160)](_0x1831d4))),_0x5d1c24[_0x186d3a(0x1c4)](_0x28ef5c(()=>_0x4fdcdc[_0x186d3a(0xc1)]()));let _0x34f979=new _0x4301b4();_0x5d1c24[_0x186d3a(0x1c4)](_0x15fa3a[_0x186d3a(0x221)]['subscribe'](_0x5df31b=>_0x34f979[_0x186d3a(0x160)](_0x5df31b))),_0x5d1c24[_0x186d3a(0x1c4)](_0x28ef5c(()=>_0x34f979[_0x186d3a(0xc1)]()));let _0x423955=new _0x4301b4();_0x5d1c24['add'](_0x15fa3a[_0x186d3a(0x2a7)][_0x186d3a(0x222)](_0x55b98f=>{const _0x3a07f7=_0x186d3a;let _0x220bfa=wn(_0x55b98f);_0x423955[_0x3a07f7(0x160)](_0x220bfa);})),_0x5d1c24['add'](_0x28ef5c(()=>_0x423955[_0x186d3a(0xc1)]()));let _0x28a72b,_0x141eaf=()=>{const _0x3f5b80=_0x186d3a;_0x34f979[_0x3f5b80(0x160)](new Event('connection\x20error')),_0x4fdcdc['next'](new Event(_0x3f5b80(0x175))),_0x28a72b[_0x3f5b80(0x28d)]();};return _0x28a72b={'memberID':'','close$':_0x4fdcdc[_0x186d3a(0x1d9)](),'error$':_0x34f979[_0x186d3a(0x1d9)](),'open$':_0x15fa3a[_0x186d3a(0x1c5)],'message$':_0x423955['asObservable'](),'send':_0x55017d=>{const _0xb83e6=_0x186d3a;if(_0x55017d[_0xb83e6(0x2d6)]===_0x6e704b['INGEST']){if(_0x55017d[_0xb83e6(0xa6)][_0xb83e6(0x161)]===_0x150d16[_0xb83e6(0x176)]){this[_0xb83e6(0x150)](_0x28a72b,_0x55017d['data'])['catch'](_0x459270=>{const _0x138e7c=_0xb83e6;this[_0x138e7c(0x159)][_0x138e7c(0x2cd)](_0x459270),_0x141eaf();});return;}if(_0x55017d[_0xb83e6(0xa6)][_0xb83e6(0x161)]===_0x150d16[_0xb83e6(0x1b2)]){let _0x56bafb=_0x55017d[_0xb83e6(0xa6)];this['_fetchMissChangesets'](_0x56bafb)[_0xb83e6(0x1a5)](_0x32db5b=>{const _0x5bedf7=_0xb83e6;_0x423955['next']({'cmd':_0x6e704b[_0x5bedf7(0x2a6)],'code':_0x2b2822['OK'],'routeKey':_0x56bafb[_0x5bedf7(0xa6)][_0x5bedf7(0x2ef)],'routeType':'','data':{'eventID':_0x150d16['PSEUDO_FETCH_MISSING_RESULT'],'data':{'changesets':_0x32db5b}}});})['catch'](_0x58790b=>{const _0x4e601c=_0xb83e6;this[_0x4e601c(0x159)][_0x4e601c(0x2cd)](_0x58790b),_0x141eaf();});return;}}_0x15fa3a['send'](Tn(_0x55017d));},'close':()=>{const _0x3d038a=_0x186d3a;_0x15fa3a[_0x3d038a(0x28d)](),_0x5d1c24['dispose']();}},_0x28a72b;}async[_0x2e02fc(0x150)](_0x2acbe1,_0x1c3918){const _0x16701a=_0x2e02fc;let {unitType:_0x4a3ae7,unitID:_0x186351,changeset:_0x2f1b73}=_0x1c3918[_0x16701a(0xa6)],_0x448e92={'unitID':_0x186351,'memberID':_0x2acbe1['memberID'],'type':_0x4a3ae7,'changeset':_0xe3775b(_0x2f1b73)},_0x4391c5=this[_0x16701a(0x24e)][_0x16701a(0xe2)](R),_0x10c044=Dn((_0x4391c5==null?void 0x0:_0x4391c5[_0x16701a(0x11a)])??_0x16701a(0x149),_0x4a3ae7,_0x186351);try{await this[_0x16701a(0x1da)][_0x16701a(0x258)](_0x10c044,{'body':_0x448e92});}catch(_0xf2fbaa){throw this[_0x16701a(0x159)][_0x16701a(0x2cd)]('[CollaborationSession]',_0x16701a(0x134)),_0xf2fbaa;}}async[_0x2e02fc(0x295)](_0x14374d){const _0x10e876=_0x2e02fc;let {unitID:_0x5021a3,from:_0x281a5e,to:_0x499599,unitType:_0x1402ea}=_0x14374d['data'];return(await this['_snapshotServerService'][_0x10e876(0x87)]({'metadata':void 0x0},{'unitID':_0x5021a3,'type':_0x1402ea,'from':_0x281a5e,'to':_0x499599}))[_0x10e876(0x322)][_0x10e876(0x1a8)](_0x213211=>((_0x213211[_0x10e876(0x324)]===null||_0x213211[_0x10e876(0x324)]===void 0x0)&&(_0x213211[_0x10e876(0x324)]=[]),_0x213211));}};On=H([V(0x0,_0x17057e(_0x346ad7)),V(0x1,_0x17057e(_0x340ce5)),V(0x2,_0x39e8ee),V(0x3,_0x3efc4d),V(0x4,_0xa027ef)],On);const kn=_0x3a76ad(_0x2e02fc(0x20c));function An(_0x28c876={}){const _0x57f4ba=_0x2e02fc;return _0x28c876[_0x57f4ba(0x255)]?{'resolveUnit':_0x28c876['resolveUnit']}:{'resolveUnit':_0xf2f787=>({'target':{'unitId':_0xf2f787[_0x57f4ba(0x299)],'unitType':_0xf2f787['unitType']}})};}function jn(_0x73ffc0,_0x593b78,_0x277a4d){const _0x542be8=_0x2e02fc;let _0x49a91a=_0x277a4d['target'][_0x542be8(0x2d3)];if(_0x49a91a!=null&&_0x49a91a['trim']()==='')throw Error('COLLABORATION_ENDPOINT_INVALID');if(!_0x277a4d['target'][_0x542be8(0x299)])throw Error('COLLABORATION_SESSION_TARGET_UNIT_ID_REQUIRED');return{'localUnitId':_0x73ffc0,'unitType':_0x593b78,'target':{'endpoint':_0x49a91a,'unitId':_0x277a4d[_0x542be8(0x16f)][_0x542be8(0x299)],'unitType':_0x277a4d[_0x542be8(0x16f)][_0x542be8(0x297)]??_0x593b78},'changeset':_0x277a4d[_0x542be8(0xaf)]};}let Mn=class extends _0x5af3d8{constructor(_0x5a4cd3,_0x5b624c,_0x482b21,_0x1440a2,_0x21b253,_0x25f54d,_0x52c25c){const _0x52bf10=_0x2e02fc;super(),this[_0x52bf10(0x153)]=_0x5a4cd3,this['_logService']=_0x5b624c,this[_0x52bf10(0x24e)]=_0x482b21,this['_socketService']=_0x1440a2,this[_0x52bf10(0x23c)]=_0x21b253,this[_0x52bf10(0x19b)]=_0x25f54d,this[_0x52bf10(0xf0)]=_0x52c25c,z(this,_0x52bf10(0x119),new Map()),z(this,_0x52bf10(0x1a3),new Map()),z(this,'_sessionChannels',new Map()),z(this,_0x52bf10(0x1cd),new Map()),z(this,'socket$',this[_0x52bf10(0x28c)](void 0x0)['socket$'][_0x52bf10(0x1d9)]()),z(this,_0x52bf10(0x2a8),new _0xdf7e62(0x0)),z(this,'status$',this[_0x52bf10(0x2a8)]['asObservable']()),this[_0x52bf10(0x2c0)]();}['_listenToNetworkCondition'](){const _0x53d971=_0x2e02fc;this[_0x53d971(0xf0)]&&this[_0x53d971(0xce)](this[_0x53d971(0xf0)][_0x53d971(0x2f4)][_0x53d971(0x222)](_0x523523=>{const _0x7a20b3=_0x53d971;_0x523523&&this['reconnect'](),_0x523523||this[_0x7a20b3(0x1cd)][_0x7a20b3(0x1c7)](_0x12634e=>this[_0x7a20b3(0x289)](_0x12634e));}));}['dispose'](){const _0x237bc5=_0x2e02fc;super['dispose'](),this[_0x237bc5(0x1cd)][_0x237bc5(0x1c7)](_0x373477=>{const _0xc35822=_0x237bc5;var _0x401ab3,_0x44712a;(_0x401ab3=_0x373477['socketMessageSubscription'])==null||_0x401ab3['unsubscribe'](),_0x373477[_0xc35822(0x1a1)]=null,this['_clearRetryConnectingTimer'](_0x373477),this[_0xc35822(0xb0)](_0x373477),this[_0xc35822(0x206)](_0x373477),(_0x44712a=_0x373477[_0xc35822(0x120)]['getValue']())==null||_0x44712a['close'](),_0x373477[_0xc35822(0x120)][_0xc35822(0xc1)]();}),this[_0x237bc5(0x1cd)]['clear'](),this['_sessions'][_0x237bc5(0x1c7)](_0x57ec55=>_0x57ec55[_0x237bc5(0x259)]()),this[_0x237bc5(0x119)][_0x237bc5(0x303)](),this[_0x237bc5(0x24d)][_0x237bc5(0x303)](),this[_0x237bc5(0x2a8)][_0x237bc5(0xc1)]();}async[_0x2e02fc(0x1d8)](_0x1ded2a,_0x3c3b29){const _0x458af9=_0x2e02fc;if(this[_0x458af9(0x119)][_0x458af9(0x2c9)](_0x1ded2a))return this['_sessions'][_0x458af9(0x241)](_0x1ded2a);let _0x6817d8=this['_pendingSessions'][_0x458af9(0x241)](_0x1ded2a);if(_0x6817d8)return _0x6817d8;let _0x26603d=this[_0x458af9(0x12f)](_0x1ded2a,_0x3c3b29);this[_0x458af9(0x1a3)][_0x458af9(0x2e9)](_0x1ded2a,_0x26603d);try{return await _0x26603d;}finally{this[_0x458af9(0x1a3)][_0x458af9(0xb4)](_0x1ded2a);}}async[_0x2e02fc(0x12f)](_0x1f7699,_0x6b399a){const _0x4ccc9b=_0x2e02fc;let _0x5dd8a3=await this[_0x4ccc9b(0x179)](_0x1f7699,_0x6b399a),_0x500856=this[_0x4ccc9b(0x28c)](_0x5dd8a3['target'][_0x4ccc9b(0x2d3)]);this[_0x4ccc9b(0x2bd)](_0x500856);let _0x3bcdec=this[_0x4ccc9b(0x153)]['createInstance'](Vt,_0x5dd8a3,_0x500856[_0x4ccc9b(0x120)][_0x4ccc9b(0x1d9)]());return this[_0x4ccc9b(0x119)][_0x4ccc9b(0x2e9)](_0x1f7699,_0x3bcdec),this[_0x4ccc9b(0x24d)]['set'](_0x1f7699,_0x500856[_0x4ccc9b(0xe6)]),_0x3bcdec;}[_0x2e02fc(0x15a)](_0x12b398){const _0x49f1e1=_0x2e02fc;let _0x41198f=this['_sessions'][_0x49f1e1(0x241)](_0x12b398),_0x131f8b=this[_0x49f1e1(0x24d)][_0x49f1e1(0x241)](_0x12b398);if(_0x41198f&&(this[_0x49f1e1(0x119)][_0x49f1e1(0xb4)](_0x12b398),this[_0x49f1e1(0x24d)][_0x49f1e1(0xb4)](_0x12b398),_0x41198f['close']()),_0x131f8b&&!this[_0x49f1e1(0x1f2)](_0x131f8b)){var _0x1f6f6d;let _0x22e1cb=this[_0x49f1e1(0x1cd)][_0x49f1e1(0x241)](_0x131f8b);_0x22e1cb==null||(_0x1f6f6d=_0x22e1cb[_0x49f1e1(0x120)]['getValue']())==null||_0x1f6f6d['close']();}}[_0x2e02fc(0xaa)](){const _0x530f21=_0x2e02fc;(this['_socketChannels'][_0x530f21(0x1ca)]?[...this[_0x530f21(0x1cd)][_0x530f21(0x2c3)]()]:[this[_0x530f21(0x28c)](void 0x0)])[_0x530f21(0x1c7)](_0x3273fc=>{const _0x5ae858=_0x530f21;_0x3273fc['retryCount']=0x0,this[_0x5ae858(0x148)](_0x3273fc),this[_0x5ae858(0x1f3)](_0x3273fc);});}[_0x2e02fc(0x148)](_0x5d2108){const _0x1943a5=_0x2e02fc;_0x5d2108['retryConnectingTimer']!=null&&(clearTimeout(_0x5d2108[_0x1943a5(0x8b)]),_0x5d2108[_0x1943a5(0x8b)]=null);}async['_createSocket'](_0x283c8a){const _0x10656b=_0x2e02fc;let _0x23b10f=this[_0x10656b(0x24e)][_0x10656b(0xe2)](R),_0x2fbbf7=_0x283c8a['endpoint']??(_0x23b10f==null?void 0x0:_0x23b10f[_0x10656b(0x18e)])??_0x10656b(0x2fb),_0x5aa10=await this[_0x10656b(0x305)][_0x10656b(0x155)](_0x2fbbf7);return _0x283c8a[_0x10656b(0x16b)]=_0x5aa10,_0x5aa10;}async['_tryEnsureSocket'](_0x3699d4){const _0x3b4738=_0x2e02fc;try{let _0x4e2312=_0x3699d4[_0x3b4738(0x120)][_0x3b4738(0x279)]()??_0x3699d4['candidateSocket']??await this[_0x3b4738(0x308)](_0x3699d4);if(_0x4e2312){var _0x3555a9;let _0x3a477a=_0x4e2312[_0x3b4738(0x1fc)];_0x4e2312[_0x3b4738(0x1fc)]=_0x28757d=>(_0x28757d[_0x3b4738(0x2d6)]!==_0x6e704b[_0x3b4738(0xdc)]&&this['_rescheduleHeartbeat'](_0x3699d4),_0x3a477a[_0x3b4738(0x22c)](_0x4e2312,[_0x28757d])),(_0x3555a9=_0x3699d4[_0x3b4738(0x1a1)])==null||_0x3555a9['unsubscribe'](),_0x3699d4[_0x3b4738(0x1a1)]=null,_0x3699d4[_0x3b4738(0x1a1)]=_0x4e2312[_0x3b4738(0x2a7)]['subscribe'](_0x178a13=>this[_0x3b4738(0xfe)](_0x3699d4,_0x4e2312,_0x178a13)),_0x4e2312[_0x3b4738(0x221)][_0x3b4738(0x31f)](_0x411165(0x1))[_0x3b4738(0x222)](_0x340b32=>this[_0x3b4738(0x159)][_0x3b4738(0x2cd)]('[CollaborationSessionService]:\x20socket\x20error',_0x340b32)),_0x4e2312[_0x3b4738(0x1c5)][_0x3b4738(0x31f)](_0x411165(0x1))['subscribe'](()=>{const _0x29e0a8=_0x3b4738;this[_0x29e0a8(0x86)](_0x3699d4,_0x4e2312);}),_0x4e2312[_0x3b4738(0x237)][_0x3b4738(0x31f)](_0x411165(0x1))['subscribe'](_0x4881e5=>{const _0x41dbce=_0x3b4738;this['_logService'][_0x41dbce(0x181)](_0x41dbce(0x10f),_0x41dbce(0x1ab),_0x4881e5),this['_onConnectionFailed'](_0x3699d4);});}}catch(_0x4c8e92){this[_0x3b4738(0x159)]['error'](_0x4c8e92),this[_0x3b4738(0x108)](_0x3699d4);}}[_0x2e02fc(0x86)](_0x1a6c13,_0x1f648c){const _0x5cd645=_0x2e02fc;this[_0x5cd645(0x159)][_0x5cd645(0x181)](_0x5cd645(0x10f),_0x5cd645(0x22b)),_0x1f648c[_0x5cd645(0x1fc)]({'cmd':_0x6e704b[_0x5cd645(0x2ab)]}),this['_rescheduleHeartbeat'](_0x1a6c13);}[_0x2e02fc(0x289)](_0x31cf43){const _0x1641e1=_0x2e02fc;_0x31cf43[_0x1641e1(0x126)]=!0x1,_0x31cf43['candidateSocket']=null,this['_status$'][_0x1641e1(0x160)](0x2),_0x31cf43[_0x1641e1(0x120)]['next'](null),this[_0x1641e1(0xb0)](_0x31cf43),this['_clearHeartbeatTimer'](_0x31cf43);}['_onConnectionFailed'](_0x2e4bf2){const _0x217d3e=_0x2e02fc;this['_onOffline'](_0x2e4bf2),this[_0x217d3e(0x1f2)](_0x2e4bf2['endpointKey'])&&(_0x2e4bf2[_0x217d3e(0x107)]<(this[_0x217d3e(0x24e)][_0x217d3e(0xe2)](_0x217d3e(0xca))??0x3)?(this['_collaborationUIEventService'][_0x217d3e(0x1ba)]({'id':_0x217d3e(0x2e6)}),this['_tryReconnect'](_0x2e4bf2)):this[_0x217d3e(0x23c)][_0x217d3e(0x1ba)]({'id':'SOCKET_FAILED'}));}[_0x2e02fc(0x1f3)](_0x530c6c){const _0x23bb49=_0x2e02fc;let _0x54db1f=_0x530c6c[_0x23bb49(0x107)],_0x4c4e4d=this[_0x23bb49(0x24e)]['getConfig'](R),_0x3560e8=_0x54db1f===0x0?0x0:((_0x4c4e4d==null?void 0x0:_0x4c4e4d[_0x23bb49(0x14f)])??0x4e20)*0x2**_0x54db1f;_0x530c6c[_0x23bb49(0x8b)]=setTimeout(()=>{const _0x29df06=_0x23bb49;clearTimeout(_0x530c6c[_0x29df06(0x8b)]),_0x530c6c['retryConnectingTimer']=null,this['_tryEnsureSocket'](_0x530c6c);},_0x3560e8),_0x530c6c[_0x23bb49(0x107)]+=0x1;}async['_resolveSessionIdentity'](_0x30a277,_0x1cbdd1){const _0x317165=_0x2e02fc;return jn(_0x30a277,_0x1cbdd1,await this[_0x317165(0x19b)][_0x317165(0x255)]({'unitId':_0x30a277,'unitType':_0x1cbdd1}));}['_onMessage'](_0x2770d2,_0x101134,_0x45f666){const _0x5d3695=_0x2e02fc;let {cmd:_0x3181b1}=_0x45f666;_0x3181b1===_0x6e704b[_0x5d3695(0x2ab)]&&!_0x2770d2[_0x5d3695(0x126)]&&(_0x101134[_0x5d3695(0xf3)]=_0x45f666['data']['memberID'],_0x2770d2[_0x5d3695(0x120)][_0x5d3695(0x160)](_0x101134),this[_0x5d3695(0x2a8)][_0x5d3695(0x160)](0x3),_0x2770d2[_0x5d3695(0x126)]=!0x0,_0x2770d2[_0x5d3695(0x16b)]=null),_0x3181b1===_0x6e704b[_0x5d3695(0x1e4)]&&this[_0x5d3695(0xb0)](_0x2770d2),this[_0x5d3695(0x319)](_0x2770d2);}[_0x2e02fc(0x1f2)](_0x59976e){const _0x1baca0=_0x2e02fc;return[...this[_0x1baca0(0x24d)]['values']()]['some'](_0x195ab4=>_0x195ab4===_0x59976e);}['_getSocketChannel'](_0x40016e){const _0x35e3a4=_0x2e02fc;let _0x343126=_0x40016e??'',_0x3a17b9=this[_0x35e3a4(0x1cd)]['get'](_0x343126);if(_0x3a17b9)return _0x3a17b9;let _0x5b542f={'endpointKey':_0x343126,'endpoint':_0x40016e,'socket$':new _0xdf7e62(void 0x0),'candidateSocket':null,'socketReady':!0x1,'socketMessageSubscription':null,'retryConnectingTimer':null,'retryCount':0x0,'sendHeartbeatTimer':null,'timeoutTimer':null};return this[_0x35e3a4(0x1cd)]['set'](_0x343126,_0x5b542f),_0x5b542f;}[_0x2e02fc(0x319)](_0x308c82){const _0x27a6d7=_0x2e02fc;this[_0x27a6d7(0x206)](_0x308c82),_0x308c82[_0x27a6d7(0x1d4)]=setTimeout(()=>this[_0x27a6d7(0x235)](_0x308c82),this[_0x27a6d7(0x24e)]['getConfig'](_0x27a6d7(0x183))??0x7530);}[_0x2e02fc(0x235)](_0x222c59){const _0x4ec3ae=_0x2e02fc;_0x222c59['socket$'][_0x4ec3ae(0x279)]()[_0x4ec3ae(0x1fc)]({'cmd':_0x6e704b[_0x4ec3ae(0x1e4)]}),this[_0x4ec3ae(0xbd)](_0x222c59);}[_0x2e02fc(0xbd)](_0x169b7e){const _0x208925=_0x2e02fc;_0x169b7e[_0x208925(0x236)]=setTimeout(()=>this['_onConnectionFailed'](_0x169b7e),this[_0x208925(0x24e)][_0x208925(0xe2)](_0x208925(0x21e))??0x4e20);}[_0x2e02fc(0x206)](_0x2916e4){const _0x4de5f4=_0x2e02fc;_0x2916e4[_0x4de5f4(0x1d4)]!=null&&(clearTimeout(_0x2916e4[_0x4de5f4(0x1d4)]),_0x2916e4['sendHeartbeatTimer']=null);}[_0x2e02fc(0xb0)](_0x5ca22f){const _0x47d3d5=_0x2e02fc;_0x5ca22f[_0x47d3d5(0x236)]!=null&&(clearTimeout(_0x5ca22f[_0x47d3d5(0x236)]),_0x5ca22f[_0x47d3d5(0x236)]=null);}};Mn=H([V(0x0,_0x17057e(_0x346ad7)),V(0x1,_0x3efc4d),V(0x2,_0x39e8ee),V(0x3,En),V(0x4,_0x17057e(B)),V(0x5,kn),V(0x6,_0x48242e(Cn))],Mn);let Nn=class extends _0x57b019{constructor(_0x1283ab,_0x839ad3,_0x49c683,_0x570760){const _0x4d4755=_0x2e02fc;var _0x2b41ef;super(),this[_0x4d4755(0x153)]=_0x1283ab,this['_collabSessionService']=_0x839ad3,this[_0x4d4755(0x24e)]=_0x49c683,this[_0x4d4755(0x2eb)]=_0x570760,z(this,_0x4d4755(0x22f),new Map()),z(this,'_entityInit$',new _0x4301b4()),z(this,'entityInit$',this['_entityInit$'][_0x4d4755(0x1d9)]()),((_0x2b41ef=this[_0x4d4755(0x24e)][_0x4d4755(0xe2)](_0x4d4755(0xf5)))==null?void 0x0:_0x2b41ef['enableCollaboration'])!==!0x1&&this[_0x4d4755(0x26f)]();}[_0x2e02fc(0x259)](){const _0x40fc6e=_0x2e02fc;super[_0x40fc6e(0x259)](),this[_0x40fc6e(0x22f)][_0x40fc6e(0x1c7)](_0x4540a4=>_0x4540a4[_0x40fc6e(0x259)]()),this[_0x40fc6e(0x22f)][_0x40fc6e(0x303)]();}[_0x2e02fc(0xf8)](_0x8c72ca){const _0x3d36b9=_0x2e02fc;return this[_0x3d36b9(0x22f)]['get'](_0x8c72ca)??null;}[_0x2e02fc(0x223)](_0x3247fa){const _0x3a502b=_0x2e02fc;let _0x2ddd81=this[_0x3a502b(0xf8)](_0x3247fa);return _0x2ddd81?_0x2031cc(_0x2ddd81):this['_entityInit$'][_0x3a502b(0x31f)](_0x2cbad7(_0x37947d=>_0x37947d['unitID']===_0x3247fa));}[_0x2e02fc(0x1e2)](_0x27df24){const _0x2d71ab=_0x2e02fc;return _0x1f8387(this['getCollabEntity$'](_0x27df24)[_0x2d71ab(0x31f)](_0x12aa0e(()=>void 0x0)));}[_0x2e02fc(0x26f)](){const _0x3c980c=_0x2e02fc;this[_0x3c980c(0x2eb)][_0x3c980c(0x1ed)](_0x51bdab[_0x3c980c(0x266)])[_0x3c980c(0x31f)](_0x1a7089(this[_0x3c980c(0x1a9)]),_0xb401f1(0x10))[_0x3c980c(0x222)](async _0x2b2cff=>{const _0x2535de=_0x3c980c;let _0x488464=_0x2b2cff['unit']['getUnitId'](),_0x2eb419=await this[_0x2535de(0x2c1)](_0x488464,_0x51bdab['UNIVER_SHEET']);this[_0x2535de(0x22f)][_0x2535de(0x2e9)](_0x488464,_0x2eb419);}),this[_0x3c980c(0x2eb)][_0x3c980c(0x1ed)](_0x51bdab[_0x3c980c(0x312)])[_0x3c980c(0x31f)](_0x1a7089(this[_0x3c980c(0x1a9)]),_0xb401f1(0x10))[_0x3c980c(0x31f)](_0x2cbad7(_0x15208e=>!_0x15208e['unit']['getUnitId']()[_0x3c980c(0xd8)]('__')))[_0x3c980c(0x222)](async _0x423585=>{const _0x345a7c=_0x3c980c;let _0x34922e=_0x423585[_0x345a7c(0xd7)][_0x345a7c(0x2a9)](),_0x3ca4e2=await this[_0x345a7c(0x2c1)](_0x34922e,_0x51bdab[_0x345a7c(0x312)]);this['_entities'][_0x345a7c(0x2e9)](_0x34922e,_0x3ca4e2);}),this[_0x3c980c(0x2eb)][_0x3c980c(0x1ed)](_0x51bdab[_0x3c980c(0x1e0)])[_0x3c980c(0x31f)](_0x1a7089(this[_0x3c980c(0x1a9)]),_0xb401f1(0x10))[_0x3c980c(0x222)](async _0x23ab97=>{const _0x2fd746=_0x3c980c;let _0x5a6d02=_0x23ab97['unit'][_0x2fd746(0x2a9)](),_0x5720da=await this[_0x2fd746(0x2c1)](_0x5a6d02,_0x51bdab[_0x2fd746(0x1e0)]);this['_entities']['set'](_0x5a6d02,_0x5720da);}),this['_univerInstanceService']['getTypeOfUnitAdded$'](_0x51bdab['UNIVER_BOARD'])[_0x3c980c(0x31f)](_0x1a7089(this[_0x3c980c(0x1a9)]),_0xb401f1(0x10))[_0x3c980c(0x222)](async _0x31ac7d=>{const _0x1c575d=_0x3c980c;let _0x24ab39=_0x31ac7d['unit'][_0x1c575d(0x2a9)](),_0x1fc150=await this['_startCollaboration'](_0x24ab39,_0x51bdab[_0x1c575d(0x93)]);this['_entities']['set'](_0x24ab39,_0x1fc150);}),this['_univerInstanceService'][_0x3c980c(0x1ed)](_0x51bdab[_0x3c980c(0x1c0)])[_0x3c980c(0x31f)](_0x1a7089(this[_0x3c980c(0x1a9)]),_0xb401f1(0x10))[_0x3c980c(0x222)](async _0x40aeeb=>{const _0x192910=_0x3c980c;let _0x513763=_0x40aeeb[_0x192910(0xd7)][_0x192910(0x2a9)](),_0x51ec43=await this['_startCollaboration'](_0x513763,_0x51bdab[_0x192910(0x1c0)]);this[_0x192910(0x22f)][_0x192910(0x2e9)](_0x513763,_0x51ec43);}),this[_0x3c980c(0x2eb)]['getTypeOfUnitAdded$'](_0x51bdab['UNIVER_PDF'])[_0x3c980c(0x31f)](_0x1a7089(this['dispose$']),_0xb401f1(0x10))[_0x3c980c(0x222)](async _0xb67d54=>{const _0x1fcfc6=_0x3c980c;let _0x311a82=_0xb67d54['unit'][_0x1fcfc6(0x2a9)](),_0x1b1500=await this[_0x1fcfc6(0x2c1)](_0x311a82,_0x51bdab[_0x1fcfc6(0x230)]);this['_entities'][_0x1fcfc6(0x2e9)](_0x311a82,_0x1b1500);}),_0x123d67(this[_0x3c980c(0x2eb)]['getTypeOfUnitDisposed$'](_0x51bdab[_0x3c980c(0x266)]),this[_0x3c980c(0x2eb)][_0x3c980c(0x15d)](_0x51bdab[_0x3c980c(0x312)]),this['_univerInstanceService'][_0x3c980c(0x15d)](_0x51bdab['UNIVER_SLIDE']),this['_univerInstanceService'][_0x3c980c(0x15d)](_0x51bdab[_0x3c980c(0x93)]),this[_0x3c980c(0x2eb)][_0x3c980c(0x15d)](_0x51bdab[_0x3c980c(0x1c0)]),this['_univerInstanceService'][_0x3c980c(0x15d)](_0x51bdab[_0x3c980c(0x230)]))[_0x3c980c(0x31f)](_0x1a7089(this['dispose$']))[_0x3c980c(0x222)](_0x4f4351=>{const _0x1daaeb=_0x3c980c;let _0x3d4338=_0x4f4351[_0x1daaeb(0x2a9)](),_0x2f0ec9=this[_0x1daaeb(0x22f)][_0x1daaeb(0x241)](_0x3d4338);_0x2f0ec9&&(_0x2f0ec9[_0x1daaeb(0x259)](),this[_0x1daaeb(0x22f)][_0x1daaeb(0xb4)](_0x3d4338));});}async[_0x2e02fc(0x2c1)](_0x55f3b9,_0x29ac21){const _0x177096=_0x2e02fc;let _0x106af2=await this['_collabSessionService'][_0x177096(0x1d8)](_0x55f3b9),_0x2568a2=this['_injector'][_0x177096(0x85)](this[_0x177096(0x193)](_0x29ac21),_0x55f3b9,_0x29ac21,_0x106af2);return await _0x2568a2[_0x177096(0x13e)](),this[_0x177096(0x9a)][_0x177096(0x160)](_0x2568a2),_0x2568a2;}[_0x2e02fc(0x193)](_0x30f0eb){const _0x386f01=_0x2e02fc;switch(_0x30f0eb){case _0x51bdab[_0x386f01(0x312)]:return _n;case _0x51bdab['UNIVER_SHEET']:return yn;case _0x51bdab[_0x386f01(0x1e0)]:return bn;case _0x51bdab['UNIVER_BOARD']:return xn;case _0x51bdab[_0x386f01(0x1c0)]:return vn;case _0x51bdab[_0x386f01(0x230)]:return Sn;default:throw Error(_0x386f01(0x138)+_0x30f0eb);}}};Nn=H([V(0x0,_0x17057e(_0x346ad7)),V(0x1,_0x17057e(Mn)),V(0x2,_0x39e8ee),V(0x3,_0x4a3eaa)],Nn);var Pn='@univerjs-pro/collaboration-client',Fn=_0x2e02fc(0x1fe);let In=class extends _0x5af3d8{constructor(_0x56fbaa,_0x212e05){const _0x296575=_0x2e02fc;super(),this[_0x296575(0x2eb)]=_0x56fbaa,this[_0x296575(0x24e)]=_0x212e05,this[_0x296575(0x26f)]();}[_0x2e02fc(0x26f)](){const _0x4d95da=_0x2e02fc;this['disposeWithMe'](this['_univerInstanceService']['focused$'][_0x4d95da(0x222)](()=>{const _0x4517f1=_0x4d95da;let _0x5f12e9=this[_0x4517f1(0x2eb)][_0x4517f1(0x2e4)](),_0xf84f3=this[_0x4517f1(0x24e)][_0x4517f1(0xe2)]('DEFAULT_FILE_NAME')??_0x4517f1(0x30b);_0x5f12e9 instanceof _0x3f5b28&&(_0xf84f3=_0x5f12e9['name']),document[_0x4517f1(0x27f)]=_0xf84f3;}));}};In=H([V(0x0,_0x4a3eaa),V(0x1,_0x39e8ee)],In);const Ln=_0x3a76ad('base-ui.attachment-io.service');function _0x1bad(_0x4ef9e0,_0x43eba8){_0x4ef9e0=_0x4ef9e0-0x7d;const _0x269999=_0x2699();let _0x1badbb=_0x269999[_0x4ef9e0];return _0x1badbb;}let Rn=class{constructor(_0x10a131,_0x39a331,_0x1858f1){const _0x3984e7=_0x2e02fc;this[_0x3984e7(0x1da)]=_0x10a131,this['_configService']=_0x39a331,this[_0x3984e7(0x2eb)]=_0x1858f1;}[_0x2e02fc(0x23e)](){return this['_getConfig']()['attachment']??{};}async[_0x2e02fc(0x277)](_0x4394bb){const _0x255e6d=_0x2e02fc;let _0x3fc07d=this[_0x255e6d(0x23e)]();if(zn(_0x4394bb,_0x3fc07d),_0x3fc07d[_0x255e6d(0x280)])return _0x3fc07d[_0x255e6d(0x280)](_0x4394bb);let _0x963f6a=await this[_0x255e6d(0x263)](_0x4394bb);return{'id':_0x963f6a,'name':_0x4394bb[_0x255e6d(0x217)],'mimeType':_0x4394bb[_0x255e6d(0xae)],'size':_0x4394bb[_0x255e6d(0x1ca)],'sourceType':_0x14dae6[_0x255e6d(0x171)],'source':_0x963f6a};}async['getAttachmentUrl'](_0x525644,_0xc9a7bb){const _0x5b77d5=_0x2e02fc;if(_0xc9a7bb!==_0x14dae6[_0x5b77d5(0x171)])return _0x525644;let _0x1e4782=(await this[_0x5b77d5(0x1da)][_0x5b77d5(0x241)](this[_0x5b77d5(0x1dd)]()[_0x5b77d5(0x2ff)](_0x5b77d5(0x27a),_0x525644)))[_0x5b77d5(0x18b)];if(_0x1e4782['error']&&_0x1e4782[_0x5b77d5(0x2cd)][_0x5b77d5(0x22a)]!==_0x9d8468['OK'])throw _0x1e4782[_0x5b77d5(0x2cd)];if(!_0x1e4782['url'])throw Error('[CollaborationAttachmentIoService]:\x20failed\x20to\x20resolve\x20attachment\x20URL.');return _0x52c301(_0x1e4782[_0x5b77d5(0x294)],this[_0x5b77d5(0x125)]());}async[_0x2e02fc(0x263)](_0x4f3d66){const _0x1c40f9=_0x2e02fc;let _0x107300=this[_0x1c40f9(0x2eb)][_0x1c40f9(0x2e4)](),_0x4ce393=_0x107300==null?void 0x0:_0x107300['getUnitId']();if(!_0x4ce393)throw Error('[CollaborationAttachmentIoService]:\x20unitId\x20is\x20not\x20found.');let _0x1f16e9=new FormData();_0x1f16e9[_0x1c40f9(0x81)](_0x1c40f9(0x2dd),_0x4f3d66);let _0x5c046d=this['_getUploadFileURL']()+_0x1c40f9(0x11e)+_0x4f3d66['size'][_0x1c40f9(0x1ad)]()+_0x1c40f9(0x98)+_0x254240[_0x1c40f9(0xa3)]+_0x1c40f9(0x2f9)+encodeURIComponent(_0x4ce393),_0x19ca4d=(await this['_httpService'][_0x1c40f9(0x258)](_0x5c046d,{'body':_0x1f16e9}))[_0x1c40f9(0x18b)][_0x1c40f9(0x2c5)];if(typeof _0x19ca4d!=_0x1c40f9(0xc2)||!_0x19ca4d)throw Error('[CollaborationAttachmentIoService]:\x20failed\x20to\x20upload\x20attachment.');return _0x19ca4d;}[_0x2e02fc(0x17e)](){const _0x58b1e5=_0x2e02fc;return this[_0x58b1e5(0x2f6)]()['uploadFileServerUrl']??_0x58b1e5(0xd2);}[_0x2e02fc(0x1dd)](){const _0x124151=_0x2e02fc;return this[_0x124151(0x2f6)]()[_0x124151(0x218)]??_0x124151(0x307);}[_0x2e02fc(0x125)](){const _0x30183a=_0x2e02fc;let _0x1dd7a5=this[_0x30183a(0x2f6)]();return _0x1dd7a5[_0x30183a(0x1d3)]?_0x1dd7a5[_0x30183a(0x1d3)]:typeof location<'u'?location[_0x30183a(0x1ff)]:_0x1dd7a5[_0x30183a(0x2f2)]??'';}[_0x2e02fc(0x2f6)](){const _0x4bda2f=_0x2e02fc;return this[_0x4bda2f(0x24e)][_0x4bda2f(0xe2)](_0x4bda2f(0xf5))??{};}};Rn=H([V(0x0,_0x17057e(_0x340ce5)),V(0x1,_0x17057e(_0x39e8ee)),V(0x2,_0x17057e(_0x4a3eaa))],Rn);function zn(_0x175336,_0x21e763){const _0x524df8=_0x2e02fc;var _0x5702c7;if(_0x21e763[_0x524df8(0xa5)]!=null&&_0x175336[_0x524df8(0x1ca)]>_0x21e763[_0x524df8(0xa5)])throw Error(_0x524df8(0x298));if((_0x5702c7=_0x21e763[_0x524df8(0x25c)])!=null&&_0x5702c7[_0x524df8(0x14d)]&&!_0x21e763[_0x524df8(0x25c)]['some'](_0xb5acfb=>_0x175336[_0x524df8(0xae)]===_0xb5acfb||_0x175336[_0x524df8(0x217)]['endsWith'](_0xb5acfb)||_0xb5acfb[_0x524df8(0x304)]('/*')&&_0x175336[_0x524df8(0xae)][_0x524df8(0xd8)](_0xb5acfb[_0x524df8(0x180)](0x0,-0x1))))throw Error(_0x524df8(0xc7));}let Bn=class{constructor(_0x43bdc6,_0x38e86a,_0x397c94){const _0x1b2454=_0x2e02fc;this[_0x1b2454(0x24e)]=_0x43bdc6,this[_0x1b2454(0x1da)]=_0x38e86a,this['localeService']=_0x397c94,this[_0x1b2454(0x13e)]();}[_0x2e02fc(0x13e)](){const _0x305e42=_0x2e02fc;this[_0x305e42(0x1da)][_0x305e42(0x16d)]({'priority':0x1,'interceptor':(_0x28acfb,_0x54efd6)=>_0x54efd6(_0x28acfb)['pipe'](_0x36b238(async _0x328d35=>{const _0x2ea2ac=_0x305e42;let _0x3743b5=_0x328d35;if(_0x3743b5['status']===0x191){if(typeof window>'u')throw Error(_0x2ea2ac(0x31a));if(window[_0x2ea2ac(0x220)](this[_0x2ea2ac(0x1f4)]['t']('collaboration-client.auth.needGotoLoginAlert'))){let _0x4668b7=window[_0x2ea2ac(0x20f)](window['location'][_0x2ea2ac(0x276)]);window[_0x2ea2ac(0x18f)]['href']=this[_0x2ea2ac(0x20b)]()+_0x2ea2ac(0x291)+_0x4668b7;}}return _0x3743b5;}))});}[_0x2e02fc(0x20b)](){const _0x5f3a90=_0x2e02fc;let _0x549a0d=this[_0x5f3a90(0x24e)][_0x5f3a90(0xe2)](R);return(_0x549a0d==null?void 0x0:_0x549a0d[_0x5f3a90(0xb3)])??'/universer-api/oidc/authpage';}};Bn=H([V(0x0,_0x39e8ee),V(0x1,_0x17057e(_0x340ce5)),V(0x2,_0x17057e(_0xc4a55f))],Bn);let Vn=class extends _0x5af3d8{constructor(_0x33224d,_0x4962a3){const _0xe30275=_0x2e02fc;super(),this['_HTTPService']=_0x33224d,this[_0xe30275(0x24e)]=_0x4962a3,z(this,_0xe30275(0x207),!0x1),this[_0xe30275(0x26b)]();}[_0x2e02fc(0x26b)](){const _0x204b37=_0x2e02fc;let _0x223e63=this;this['disposeWithMe'](this[_0x204b37(0x9f)][_0x204b37(0x16d)]({'priority':0x3e7,'interceptor':_0x3bb06f({'isMatch'(_0x2d46be){const _0x465a5f=_0x204b37;var _0x47c7eb;if(_0x2d46be[_0x465a5f(0xc3)]==='POST'&&(_0x47c7eb=_0x2d46be[_0x465a5f(0x28f)])!=null&&_0x47c7eb[_0x465a5f(0x18b)]){let {objectID:_0x37f638,objectType:_0x558f97}=_0x2d46be['requestParams']['body']||{};if(!_0x37f638||_0x558f97===void 0x0)return!0x1;let _0x324a0d=_0x223e63[_0x465a5f(0x163)]()+'/'+_0x558f97+_0x465a5f(0x224)+_0x37f638+_0x465a5f(0x318);if(_0x2d46be['url']===_0x324a0d)return!0x0;}return!0x1;},'getParamsFromRequest'(_0x288f88){var _0x241950;return(_0x241950=_0x288f88['requestParams'])==null?void 0x0:_0x241950['body'];},'mergeParamsToRequest'(_0x36b798,_0x238173){const _0x5918ca=_0x204b37;let _0x1306be=_0x223e63[_0x5918ca(0x163)]()+_0x5918ca(0x2bf),_0x438176=_0x36b798[_0x5918ca(0xea)]((_0x30b0e2,_0x14c812)=>{const _0x520619=_0x5918ca;let {unitID:_0x4218a1,objectID:_0x3984a8,objectType:_0x49d9a8,actions:_0x2afaa4}=_0x14c812;return _0x30b0e2[_0x4218a1]||(_0x30b0e2[_0x4218a1]={}),_0x30b0e2[_0x4218a1][_0x3984a8]||(_0x30b0e2[_0x4218a1][_0x3984a8]={'objectID':_0x3984a8,'objectType':_0x49d9a8,'actions':[]}),_0x30b0e2[_0x4218a1][_0x3984a8]['actions'][_0x520619(0x2b8)](..._0x2afaa4),_0x30b0e2;},{}),_0x8feea7=[];for(let _0x264588 in _0x438176)for(let _0x47d362 in _0x438176[_0x264588]){let {actions:_0xde3990,objectType:_0x23640f}=_0x438176[_0x264588][_0x47d362],_0x35c026=[...new Set(_0xde3990)];_0x8feea7['push']({'unitID':_0x264588,'objectID':_0x47d362,'objectType':_0x23640f,'actions':_0x35c026});}return new _0x34760a('POST',_0x1306be,{'headers':_0x238173[_0x5918ca(0x317)],'withCredentials':_0x238173[_0x5918ca(0x326)],'responseType':_0x238173[_0x5918ca(0x1d6)],'body':{'requests':_0x8feea7}});}},{'distributeResult'(_0x44653b,_0xd6fa){const _0x4d963d=_0x204b37;let {objectActions:_0x1c571e}=_0x44653b;return _0xd6fa[_0x4d963d(0x1a8)](_0x5428ee=>{const _0x48e9c1=_0x4d963d;let {unitID:_0x54a139,objectID:_0x14d760,actions:_0x19fc3b}=_0x5428ee,_0x16efe0=_0x1c571e[_0x48e9c1(0x25b)](_0x26e04b=>_0x26e04b[_0x48e9c1(0x2ef)]===_0x54a139&&_0x26e04b['objectID']===_0x14d760);return{'config':_0x5428ee,'result':{'actions':_0x19fc3b['map'](_0x35ad42=>_0x16efe0==null?void 0x0:_0x16efe0[_0x48e9c1(0x174)]['find'](_0x296af2=>_0x296af2[_0x48e9c1(0x250)]===_0x35ad42))[_0x48e9c1(0x2de)](_0x4e34f4=>!!_0x4e34f4),'error':_0x44653b[_0x48e9c1(0x2cd)]}};});}})}));}[_0x2e02fc(0x163)](){const _0x2ba059=_0x2e02fc;let _0x5bb59c=this[_0x2ba059(0x24e)]['getConfig'](R);return(_0x5bb59c==null?void 0x0:_0x5bb59c['authzUrl'])??_0x2ba059(0x177);}async[_0x2e02fc(0x21f)](_0x2d742f){const _0x49986e=_0x2e02fc;let _0x2bf981=this['_getAPIPrefixPath']()+'/'+_0x2d742f[_0x49986e(0xd4)]+_0x49986e(0x24a);return(await this[_0x49986e(0x9f)][_0x49986e(0x258)](_0x2bf981,{'body':_0x2d742f}))[_0x49986e(0x18b)][_0x49986e(0x245)]||'';}async[_0x2e02fc(0x17b)](_0xf3fe3e){const _0x56cf81=_0x2e02fc;let _0x21895b=this[_0x56cf81(0x163)]()+_0x56cf81(0x2ee);return(await this[_0x56cf81(0x9f)][_0x56cf81(0x258)](_0x21895b,{'body':_0xf3fe3e}))[_0x56cf81(0x18b)][_0x56cf81(0x246)];}async[_0x2e02fc(0x164)](_0x254695){const _0x2169ff=_0x2e02fc;var _0x148abf;let _0x2ab5f7=this[_0x2169ff(0x163)]()+'/'+_0x254695[_0x2169ff(0xd4)]+_0x2169ff(0x224)+_0x254695[_0x2169ff(0x245)],_0xaa0726=await this[_0x2169ff(0x9f)][_0x2169ff(0x131)](_0x2ab5f7,{'body':_0x254695});if((_0xaa0726==null||(_0x148abf=_0xaa0726[_0x2169ff(0x18b)])==null||(_0x148abf=_0x148abf[_0x2169ff(0x2cd)])==null?void 0x0:_0x148abf[_0x2169ff(0x22a)])!==0x1)throw Error('Failed\x20to\x20update\x20permission\x20point');}async[_0x2e02fc(0x267)](_0x16c9d2){const _0x321b0a=_0x2e02fc;let _0x45d0b9=this[_0x321b0a(0x163)]()+'/'+_0x16c9d2[_0x321b0a(0xd4)]+_0x321b0a(0x224)+_0x16c9d2[_0x321b0a(0x245)]+_0x321b0a(0x318);return(await this['_HTTPService'][_0x321b0a(0x258)](_0x45d0b9,{'body':_0x16c9d2}))['body'][_0x321b0a(0x174)];}async[_0x2e02fc(0x30a)](_0x20a603){const _0x125d32=_0x2e02fc;let _0x57e97c=this[_0x125d32(0x163)]()+'/-/object/-/batch_allowed';return(await this[_0x125d32(0x9f)]['post'](_0x57e97c,{'body':{'requests':_0x20a603}}))['body'][_0x125d32(0x1ec)];}async['listRoles'](_0x296e0d){const _0x1227cc=_0x2e02fc;let _0x1fc9bc=this['_getAPIPrefixPath']()+'/'+_0x296e0d[_0x1227cc(0xd4)]+_0x1227cc(0x88),_0x83e3d0=await this[_0x1227cc(0x9f)][_0x1227cc(0x258)](_0x1fc9bc,{'body':_0x296e0d});return{'roles':_0x83e3d0[_0x1227cc(0x18b)][_0x1227cc(0x13d)],'actions':_0x83e3d0['body'][_0x1227cc(0x174)]};}async['deleteCollaborator'](_0x320a31){const _0x29cddf=_0x2e02fc;let _0x1f6ec8=this[_0x29cddf(0x163)]()+'/collaborator';await this[_0x29cddf(0x9f)][_0x29cddf(0xb4)](_0x1f6ec8,{'params':{'collaboratorID':_0x320a31['collaboratorID'],'objectID':_0x320a31['objectID'],'unitID':_0x320a31[_0x29cddf(0x2ef)]}});}async['updateCollaborator'](_0x558d6d){const _0x24a877=_0x2e02fc;let _0x5e874c=this[_0x24a877(0x163)]()+_0x24a877(0xa0);await this[_0x24a877(0x9f)][_0x24a877(0x1e5)](_0x5e874c,{'body':_0x558d6d});}async[_0x2e02fc(0x2d1)](_0xd81cb4){const _0x1e62f6=_0x2e02fc;let _0x59af0f=this[_0x1e62f6(0x163)]()+'/collaborator';await this[_0x1e62f6(0x9f)][_0x1e62f6(0x258)](_0x59af0f,{'body':_0xd81cb4});}async[_0x2e02fc(0x89)](_0x5167ce){const _0x5219e6=_0x2e02fc;let _0xe00890=this[_0x5219e6(0x163)]()+_0x5219e6(0xa0),_0x212b86=await this[_0x5219e6(0x9f)][_0x5219e6(0x241)](_0xe00890,{'params':{'objectID':_0x5167ce[_0x5219e6(0x245)],'unitID':_0x5167ce[_0x5219e6(0x2ef)]}});return this[_0x5219e6(0x15e)](_0x212b86[_0x5219e6(0x18b)]['cfgEnableObjInherit']??!0x1),_0x212b86['body'][_0x5219e6(0x2b3)];}async[_0x2e02fc(0x17f)](_0x4cc78){const _0xfc4d5b=_0x2e02fc;let _0x1752a4=this[_0xfc4d5b(0x163)]()+'/collaborator';await this[_0xfc4d5b(0x9f)][_0xfc4d5b(0x131)](_0x1752a4,{'body':_0x4cc78});}[_0x2e02fc(0x15e)](_0x3031d8){const _0x4f13cc=_0x2e02fc;this[_0x4f13cc(0x207)]=_0x3031d8;}[_0x2e02fc(0x288)](){const _0x5a9e85=_0x2e02fc;return this[_0x5a9e85(0x207)];}};Vn=H([V(0x0,_0x17057e(_0x340ce5)),V(0x1,_0x17057e(_0x39e8ee))],Vn);function Hn(_0x85bc70){const _0x4d685a=_0x2e02fc;let _0x5085b1=atob(_0x85bc70),_0xffe51b=new Uint8Array(_0x5085b1['length']);for(let _0x1a8be5=0x0;_0x1a8be5<_0x5085b1[_0x4d685a(0x14d)];_0x1a8be5++)_0xffe51b[_0x1a8be5]=_0x5085b1[_0x4d685a(0x1de)](_0x1a8be5);return _0xffe51b;}function Un(_0x4fad10){const _0x15c545=_0x2e02fc;let _0xa9ca39='';for(let _0x13b60a=0x0;_0x13b60a<_0x4fad10[_0x15c545(0x14d)];_0x13b60a++)_0xa9ca39+=String['fromCharCode'](_0x4fad10[_0x13b60a]);return btoa(_0xa9ca39);}function Wn(_0x47a40a,_0x235b0e){const _0x3d2fac=_0x2e02fc;let _0x55cbf0=Hn(_0x235b0e),_0x595ff3=_0x1fc815(0x10);return Un(_0x33086b(_0x595ff3,_0x52616c(_0x55cbf0,_0x595ff3)[_0x3d2fac(0x1df)](_0x47a29a(_0x47a40a))));}function Gn(){const _0x1d6211=_0x2e02fc;let _0xf2240d=_0x12bc02()[_0x1d6211(0x16c)];if(typeof window<'u'&&window[_0x1d6211(0x18f)]!==void 0x0&&_0xf2240d){let _0x294a2b={'time':Math[_0x1d6211(0x1af)](Date['now']()/0x3e8),'domain':location[_0x1d6211(0x123)]};return Wn(JSON[_0x1d6211(0xc0)](_0x294a2b),_0xf2240d);}}let Kn=class{constructor(_0x4678b2){const _0x459b34=_0x2e02fc;this[_0x459b34(0x1da)]=_0x4678b2,this['_initRequestHeader']();}[_0x2e02fc(0x109)](){const _0x5c644f=_0x2e02fc;this[_0x5c644f(0x1da)][_0x5c644f(0x16d)]({'interceptor':(_0x1b9df1,_0x2cc725)=>{const _0x1dad9f=_0x5c644f;let _0x464b64=Gn();return _0x464b64&&_0x1b9df1['headers'][_0x1dad9f(0x2e9)](_0x1dad9f(0x21b),_0x464b64),_0x2cc725(_0x1b9df1);}});}};Kn=H([V(0x0,_0x17057e(_0x340ce5))],Kn);let qn=class extends _0x57b019{constructor(_0x3e2d0a,_0x35ce17,_0x66d862){const _0x37f767=_0x2e02fc;super(),this[_0x37f767(0x159)]=_0x3e2d0a,this['_snapshotService']=_0x35ce17,this['_localCacheService']=_0x66d862,z(this,_0x37f767(0x147),new _0xdf7e62(null)),z(this,_0x37f767(0xfc),new _0x4301b4()),z(this,_0x37f767(0x15c),this[_0x37f767(0x147)]['asObservable']()),z(this,_0x37f767(0x287),this[_0x37f767(0xfc)][_0x37f767(0x1d9)]());}[_0x2e02fc(0x259)](){const _0x83eea5=_0x2e02fc;super[_0x83eea5(0x259)](),this[_0x83eea5(0xfc)][_0x83eea5(0xc1)](),this['_unitInfo$']['complete']();}async[_0x2e02fc(0x1b1)](_0x281955,_0xf66288,_0x949ab8,_0x1a882f){const _0x274f40=_0x2e02fc;this[_0x274f40(0x147)]['next']({'unitId':_0x281955,'type':_0xf66288,'subUnitId':_0x1a882f});let _0x2804d5=null;switch(_0xf66288){case _0x51bdab[_0x274f40(0x266)]:_0x2804d5=await this[_0x274f40(0x104)][_0x274f40(0x219)](_0x281955,_0x949ab8,void 0x0,{'initialSubUnitId':_0x1a882f});break;case _0x51bdab['UNIVER_DOC']:_0x2804d5=await this[_0x274f40(0x104)]['loadDoc'](_0x281955,_0x949ab8);break;case _0x51bdab[_0x274f40(0x1e0)]:_0x2804d5=await this[_0x274f40(0x104)][_0x274f40(0x2ec)](_0x281955,_0x949ab8);break;case _0x51bdab[_0x274f40(0x93)]:_0x2804d5=await this[_0x274f40(0x104)][_0x274f40(0x27d)](_0x281955,_0x949ab8);break;case _0x51bdab['UNIVER_BASE']:_0x2804d5=await this[_0x274f40(0x104)]['loadBase'](_0x281955,_0x949ab8);break;case _0x51bdab[_0x274f40(0x230)]:_0x2804d5=await this[_0x274f40(0x104)]['loadPdf'](_0x281955,_0x949ab8);break;default:this[_0x274f40(0x159)][_0x274f40(0x2cd)](_0x274f40(0x170),_0x274f40(0x1f7));break;}return _0x2804d5&&this[_0x274f40(0xfc)]['next'](_0x2804d5),_0x2804d5;}async['loadUnit'](_0x492a4a,_0x198acd,_0x230fb9){const _0x43edc3=_0x2e02fc;var _0x2a3428;this[_0x43edc3(0x147)][_0x43edc3(0x160)]({'unitId':_0x492a4a,'type':_0x198acd,'subUnitId':_0x230fb9});let _0x7ffd60=0x0,_0x65016a=await((_0x2a3428=this['_localCacheService'])==null?void 0x0:_0x2a3428['loadOfflineData'](_0x492a4a));return _0x65016a&&(_0x65016a['awaitingChangeset']||_0x65016a[_0x43edc3(0x324)]['length']!==0x0)&&(_0x7ffd60=_0x65016a[_0x43edc3(0xa9)]),_0x7ffd60===0x0&&this['_logService']['debug'](_0x43edc3(0x170),_0x43edc3(0x26a)),this[_0x43edc3(0x1b1)](_0x492a4a,_0x198acd,_0x7ffd60,_0x230fb9);}};qn=H([V(0x0,_0x3efc4d),V(0x1,_0x17057e(_0x4240b0)),V(0x2,_0x48242e(U))],qn);let Jn=class{constructor(_0x3b71b7,_0x5e2b46,_0x16ae7b){const _0x59756c=_0x2e02fc;this[_0x59756c(0x1da)]=_0x3b71b7,this['_configService']=_0x5e2b46,this[_0x59756c(0x2eb)]=_0x16ae7b,z(this,_0x59756c(0x309),0x0),z(this,_0x59756c(0x9b),new _0x4301b4()),z(this,_0x59756c(0x129),this['_change$']),z(this,'_imageSourceCache',new Map());}[_0x2e02fc(0x17d)](_0x1093cf){const _0x270a9a=_0x2e02fc;this[_0x270a9a(0x309)]=_0x1093cf,this[_0x270a9a(0x9b)][_0x270a9a(0x160)](_0x1093cf);}[_0x2e02fc(0x192)](_0x3a1134,_0x2860af){const _0x30488a=_0x2e02fc;if(_0x2860af===_0x14dae6[_0x30488a(0xcb)]){let _0x185bfd=new Image();return _0x185bfd[_0x30488a(0x23d)]=_0x3a1134,_0x185bfd;}return this[_0x30488a(0x8a)][_0x30488a(0x241)](_0x3a1134);}[_0x2e02fc(0x7d)](_0x40f15c,_0x53cc2d,_0x5adca1){const _0x15a6fe=_0x2e02fc;_0x53cc2d!==_0x14dae6[_0x15a6fe(0xcb)]&&_0x5adca1!=null&&this[_0x15a6fe(0x8a)]['set'](_0x40f15c,_0x5adca1);}async[_0x2e02fc(0xc8)](_0x16b225){const _0x385f81=_0x2e02fc;try{let _0x15a012=this[_0x385f81(0x321)](this[_0x385f81(0x1dd)](),''+_0x16b225),_0x3b9425=(await this['_httpService']['get'](_0x15a012))[_0x385f81(0x18b)];if(_0x3b9425[_0x385f81(0x2cd)]&&_0x3b9425[_0x385f81(0x2cd)][_0x385f81(0x22a)]===_0x9d8468['OK']){let _0x5bf705=_0x52c301(_0x3b9425[_0x385f81(0x294)],this[_0x385f81(0x125)]());return Promise[_0x385f81(0x19c)](_0x5bf705);}return Promise[_0x385f81(0x261)](_0x3b9425['error']);}catch(_0x2e53c3){return Promise[_0x385f81(0x261)](_0x2e53c3);}}async[_0x2e02fc(0x2ed)](_0x134a2d){const _0x3d6567=_0x2e02fc;let _0x276523='';if(!_0xf74efc[_0x3d6567(0x187)](_0x134a2d['type']))return this[_0x3d6567(0x28e)](),Promise[_0x3d6567(0x261)](Error(_0x9e94a[_0x3d6567(0xe0)]));if(_0x134a2d[_0x3d6567(0x1ca)]>_0x236ef3())return this['_decreaseWaiting'](),Promise[_0x3d6567(0x261)](Error(_0x9e94a[_0x3d6567(0x212)]));try{let _0x3d5aff=new FormData();_0x3d5aff[_0x3d6567(0x81)]('file',_0x134a2d);let _0x14d702=this['_univerInstanceService'][_0x3d6567(0x2e4)](),_0x12fb51=_0x14d702==null?void 0x0:_0x14d702[_0x3d6567(0x2a9)]();if(!_0x12fb51)throw Error('unitId\x20is\x20not\x20found');let _0x30c5cc=this['_getUploadFileURL']()+_0x3d6567(0x11e)+_0x134a2d[_0x3d6567(0x1ca)]['toString']()+_0x3d6567(0x98)+_0x254240[_0x3d6567(0xa3)]+'&assign='+encodeURIComponent(_0x12fb51),_0x1a00ab={'body':_0x3d5aff},_0x135c57=(await this['_httpService'][_0x3d6567(0x258)](_0x30c5cc,_0x1a00ab))[_0x3d6567(0x18b)];if(typeof _0x135c57[_0x3d6567(0x2c5)]!=_0x3d6567(0xc2))return this[_0x3d6567(0x28e)](),Promise['reject'](Error(_0x9e94a[_0x3d6567(0x2d7)]));_0x276523=_0x135c57[_0x3d6567(0x2c5)];}catch{return this[_0x3d6567(0x28e)](),Promise[_0x3d6567(0x261)](Error(_0x9e94a[_0x3d6567(0x2d7)]));}return new Promise((_0x2da0dc,_0x30d1fb)=>{const _0x188de1=_0x3d6567;let _0x3c7c9a=new FileReader();_0x3c7c9a[_0x188de1(0x121)](_0x134a2d),_0x3c7c9a[_0x188de1(0x1ce)]=_0x286dc6=>{const _0x4c32c7=_0x188de1;var _0x12ee60;let _0x5f1daf=(_0x12ee60=_0x286dc6[_0x4c32c7(0x16f)])==null?void 0x0:_0x12ee60[_0x4c32c7(0x205)];if(_0x5f1daf==null){this[_0x4c32c7(0x28e)](),_0x30d1fb(Error(_0x9e94a['ERROR_IMAGE']));return;}_0x2da0dc({'imageId':_0x1f7675(0x6),'imageSourceType':_0x14dae6['UUID'],'source':_0x276523,'base64Cache':_0x5f1daf,'status':_0x9e94a[_0x4c32c7(0x9d)]}),this[_0x4c32c7(0x28e)]();};});}[_0x2e02fc(0x17e)](){const _0x6335f6=_0x2e02fc;let _0x53334e=this[_0x6335f6(0x24e)][_0x6335f6(0xe2)](R);return(_0x53334e==null?void 0x0:_0x53334e[_0x6335f6(0x2f2)])??_0x6335f6(0xd2);}['_getSignURL'](){const _0x237d78=_0x2e02fc;let _0x4c6181=this[_0x237d78(0x24e)][_0x237d78(0xe2)](R);return(_0x4c6181==null?void 0x0:_0x4c6181['signUrlServerUrl'])??_0x237d78(0x307);}['_getDownloadEndpointURL'](){const _0x4e9701=_0x2e02fc;let _0x5157aa=this[_0x4e9701(0x24e)][_0x4e9701(0xe2)](R);return(_0x5157aa==null?void 0x0:_0x5157aa[_0x4e9701(0x1d3)])??location[_0x4e9701(0x1ff)];}[_0x2e02fc(0x321)](_0x2e4b25,_0x190fb0){const _0x42c378=_0x2e02fc;return _0x2e4b25['replace'](_0x42c378(0x27a),_0x190fb0);}[_0x2e02fc(0x28e)](){const _0x4c16fa=_0x2e02fc;--this['_waitCount'],this[_0x4c16fa(0x9b)][_0x4c16fa(0x160)](this['_waitCount']);}};Jn=H([V(0x0,_0x17057e(_0x340ce5)),V(0x1,_0x39e8ee),V(0x2,_0x17057e(_0x4a3eaa))],Jn);let Yn=class{constructor(_0x15cea3,_0x1e27ce){const _0x564758=_0x2e02fc;this[_0x564758(0x24e)]=_0x15cea3,this[_0x564758(0x9f)]=_0x1e27ce;}[_0x2e02fc(0x163)](){const _0x29b980=_0x2e02fc;let _0x3d6e57=this[_0x29b980(0x24e)]['getConfig'](R);return(_0x3d6e57==null?void 0x0:_0x3d6e57[_0x29b980(0x116)])??_0x29b980(0x177);}async['list'](_0x3bffe8){const _0x2e7f17=_0x2e02fc;let _0x358f1f=this[_0x2e7f17(0x163)]()+_0x2e7f17(0xa0);return{'list':[{'title':_0x2e7f17(0xdd),'mentions':(await this[_0x2e7f17(0x9f)][_0x2e7f17(0x241)](_0x358f1f,{'params':{'objectID':_0x3bffe8[_0x2e7f17(0x299)],'unitID':_0x3bffe8[_0x2e7f17(0x299)]}}))['body'][_0x2e7f17(0x2b3)][_0x2e7f17(0x1a8)](_0xc8d2c8=>({'objectId':_0xc8d2c8['id'],'name':_0xc8d2c8[_0x2e7f17(0x189)][_0x2e7f17(0x217)],'metadata':{'icon':_0xc8d2c8[_0x2e7f17(0x189)][_0x2e7f17(0x281)]},'label':_0xc8d2c8[_0x2e7f17(0x189)]['name'],'objectType':_0x117e44['PERSON']})),'metadata':{},'type':_0x117e44[_0x2e7f17(0xda)]}]};}};Yn=H([V(0x0,_0x17057e(_0x39e8ee)),V(0x1,_0x17057e(_0x340ce5))],Yn);let Xn=class extends _0x57b019{constructor(_0x1a5825,_0x58110e,_0x138a22,_0x3eda1e,_0x54855d){const _0x410e0b=_0x2e02fc;super(),this[_0x410e0b(0x153)]=_0x1a5825,this[_0x410e0b(0x2eb)]=_0x58110e,this[_0x410e0b(0x210)]=_0x138a22,this['_collaborationSessionService']=_0x3eda1e,this[_0x410e0b(0x23c)]=_0x54855d,this[_0x410e0b(0x271)](),this['_initCloseConn']();}[_0x2e02fc(0x30c)](){const _0x578d9a=_0x2e02fc;let _0x13f69e=async _0x295499=>{const _0x349e9b=_0x1bad;(await this[_0x349e9b(0x113)]['requireSession'](_0x295499))[_0x349e9b(0x83)][_0x349e9b(0x31f)](_0x2cbad7(_0x2f9633=>_0x2f9633[_0x349e9b(0x161)]===_0x150d16[_0x349e9b(0x2e3)]),_0x1c3f84(this['dispose$']))[_0x349e9b(0x222)](_0x25ba5e=>{const _0x1d1a66=_0x349e9b;let {reason:_0x1ecf2f}=_0x25ba5e['data'];this[_0x1d1a66(0x23c)][_0x1d1a66(0x1ba)]({'id':'CLOSE_ROOM','data':_0x1ecf2f}),this[_0x1d1a66(0x210)][_0x1d1a66(0x197)](new _0x424e79(_0x295499)['id'],!0x1),this[_0x1d1a66(0x113)][_0x1d1a66(0x15a)](_0x295499);});};_0x123d67(this[_0x578d9a(0x2eb)][_0x578d9a(0x1ed)](_0x51bdab[_0x578d9a(0x266)]),this[_0x578d9a(0x2eb)][_0x578d9a(0x1ed)](_0x51bdab[_0x578d9a(0x312)]),this['_univerInstanceService'][_0x578d9a(0x1ed)](_0x51bdab[_0x578d9a(0x93)]),this[_0x578d9a(0x2eb)][_0x578d9a(0x1ed)](_0x51bdab[_0x578d9a(0x1c0)]))[_0x578d9a(0x31f)](_0x12aa0e(_0xc5ed7b=>_0xc5ed7b[_0x578d9a(0xd7)][_0x578d9a(0x2a9)]()),_0x2cbad7(_0x1ebbe0=>!_0xfbb9de(_0x1ebbe0)),_0x1c3f84(this[_0x578d9a(0x1a9)]))[_0x578d9a(0x222)](_0x57b622=>{_0x13f69e(_0x57b622);});}[_0x2e02fc(0x271)](){const _0x53bbfa=_0x2e02fc;let _0x18f7db=async _0x45ab0e=>{const _0x3a5819=_0x1bad;let _0x101083=await this[_0x3a5819(0x113)][_0x3a5819(0x1d8)](_0x45ab0e),_0x76c93c=this[_0x3a5819(0x153)]['get'](_0x541c12);_0x101083['event$'][_0x3a5819(0x31f)](_0x2cbad7(_0xea2aec=>_0xea2aec[_0x3a5819(0x161)]===_0x150d16[_0x3a5819(0x269)]),_0x1c3f84(this[_0x3a5819(0x1a9)]))[_0x3a5819(0x222)](_0x1fc3e1=>{const _0x4f3f17=_0x3a5819;let {objectId:_0x21801e}=_0x1fc3e1[_0x4f3f17(0xa6)];_0x21801e===_0x45ab0e?_0x76c93c['initWorkbookPermissionChange'](_0x45ab0e):_0x76c93c[_0x4f3f17(0xef)](_0x45ab0e,_0x21801e);});};_0x123d67(this[_0x53bbfa(0x2eb)]['getTypeOfUnitAdded$'](_0x51bdab[_0x53bbfa(0x266)]))['pipe'](_0x12aa0e(_0x378449=>_0x378449[_0x53bbfa(0xd7)][_0x53bbfa(0x2a9)]()),_0x2cbad7(_0x485644=>!_0xfbb9de(_0x485644)),_0x1c3f84(this[_0x53bbfa(0x1a9)]))[_0x53bbfa(0x222)](_0x322c1b=>{_0x18f7db(_0x322c1b);});}};Xn=H([V(0x0,_0x17057e(_0x346ad7)),V(0x1,_0x4a3eaa),V(0x2,_0x5a8b72),V(0x3,_0x17057e(Mn)),V(0x4,_0x17057e(B))],Xn);let Zn=class{constructor(_0x2e3115,_0x1b50ef){this['_configService']=_0x2e3115,this['_httpService']=_0x1b50ef;}async['getUnitOnRev'](_0x34020d,_0x47d439){const _0x5f52c1=_0x2e02fc;var _0x4887fa;let {unitID:_0x43f650,type:_0x3fe65c,revision:_0x1e53db=0x0}=_0x47d439,_0x977860=this['getSnapshotAPIPath']()+'/'+_0x3fe65c+_0x5f52c1(0x1cc)+_0x43f650+_0x5f52c1(0x323)+_0x1e53db,_0x24c1f1=(await this[_0x5f52c1(0x1da)][_0x5f52c1(0x241)](_0x977860))[_0x5f52c1(0x18b)],_0xbf779b=(_0x4887fa=_0x24c1f1['snapshot'])==null?void 0x0:_0x4887fa[_0x5f52c1(0x200)];if(_0xbf779b){let _0x3d4cb2=_0xbf779b==null?void 0x0:_0xbf779b[_0x5f52c1(0x132)];_0xbf779b[_0x5f52c1(0x132)]=_0x4363eb[_0x5f52c1(0x2af)](_0x561a6b(_0x3d4cb2)),Object[_0x5f52c1(0x1aa)](_0xbf779b[_0x5f52c1(0x12e)])[_0x5f52c1(0x1c7)](([,_0x6a74d1])=>{const _0x28136e=_0x5f52c1;let _0x3395e9=_0x6a74d1[_0x28136e(0x132)];_0x6a74d1['originalMeta']=_0x4363eb[_0x28136e(0x2af)](_0x561a6b(_0x3395e9));});}return _0x24c1f1;}async[_0x2e02fc(0x186)](_0x153175,_0x5b158c){const _0x3ad97d=_0x2e02fc;let {unitID:_0xd5316f,type:_0xae7c83,blockID:_0x403d1a}=_0x5b158c,_0x30de1b=this[_0x3ad97d(0x1f9)]()+'/'+_0xae7c83+'/unit/'+_0xd5316f+'/block/'+_0x403d1a;return(await this['_httpService']['get'](_0x30de1b))['body'];}async[_0x2e02fc(0x128)](_0x564db8,_0x10e185){const _0x284c4f=_0x2e02fc;let {unitID:_0x1bee6c,type:_0x3966f4,blockID:_0x3a0024}=_0x10e185,_0x329240=this[_0x284c4f(0x1f9)]()+_0x284c4f(0x151)+_0x3966f4+_0x284c4f(0x1cc)+_0x1bee6c+_0x284c4f(0x151)+_0x3a0024;return(await this['_httpService']['get'](_0x329240))[_0x284c4f(0x18b)];}async[_0x2e02fc(0x87)](_0x33c700,_0xf2009f){const _0x50e26b=_0x2e02fc;let {unitID:_0x185819,type:_0x280a77,from:_0x352718,to:_0x5b6521}=_0xf2009f,_0x1b2a20=this[_0x50e26b(0x1f9)]()+'/'+_0x280a77+_0x50e26b(0x1cc)+_0x185819+'/fetchmissing?from='+_0x352718+_0x50e26b(0x2d9)+_0x5b6521;return(await this[_0x50e26b(0x1da)]['get'](_0x1b2a20))[_0x50e26b(0x18b)];}[_0x2e02fc(0xa4)](){const _0x4570c6=_0x2e02fc;return this[_0x4570c6(0x24e)][_0x4570c6(0xe2)](_0x4570c6(0x13b))??this[_0x4570c6(0x1f9)]();}[_0x2e02fc(0x1f9)](){const _0x30a93a=_0x2e02fc;let _0x11b2bf=this[_0x30a93a(0x24e)][_0x30a93a(0xe2)](R);return(_0x11b2bf==null?void 0x0:_0x11b2bf[_0x30a93a(0x10d)])??'/universer-api/snapshot';}async[_0x2e02fc(0x2f7)](_0x5535f6,_0x3632c7){const _0x2a2609=_0x2e02fc;let _0x559f92=_0x2a2609(0x82)+_0x3632c7['type']+_0x2a2609(0x1cc)+_0x3632c7['unitID']+'/resources';return(await this[_0x2a2609(0x1da)][_0x2a2609(0x241)](_0x559f92,{'params':{'resourceId':JSON[_0x2a2609(0xc0)](_0x3632c7['resourceIDs'])}}))[_0x2a2609(0x18b)];}[_0x2e02fc(0xeb)](){const _0xbf1260=_0x2e02fc;throw Error(_0xbf1260(0x2cc));}['updateSnapshot'](){throw Error('This\x20method\x20should\x20not\x20be\x20called\x20on\x20the\x20client\x20side!');}[_0x2e02fc(0x1f1)](){throw Error('This\x20method\x20should\x20not\x20be\x20called\x20on\x20the\x20client\x20side!');}[_0x2e02fc(0x1c2)](){const _0x16641e=_0x2e02fc;throw Error(_0x16641e(0x2cc));}[_0x2e02fc(0x16a)](){const _0x26deab=_0x2e02fc;throw Error(_0x26deab(0x2cc));}[_0x2e02fc(0x270)](){const _0x23b9d0=_0x2e02fc;throw Error(_0x23b9d0(0x2cc));}};Zn=H([V(0x0,_0x39e8ee),V(0x1,_0x17057e(_0x340ce5))],Zn);let Qn=class extends _0x2600d3{constructor(_0x4f8e3f,_0x54574b,_0x9339a9,_0x1c1e82,_0x578f18){super(_0x4f8e3f,_0x54574b,_0x9339a9),this['_transformService']=_0x1c1e82,this['_logService']=_0x578f18;}[_0x2e02fc(0x20e)](_0x2d2a3c,_0x43b9cb){const _0xfb4b78=_0x2e02fc;let _0x2ab6c6=this[_0xfb4b78(0x2be)](_0x2d2a3c);if(_0x2ab6c6)try{let _0x3ebe4c=this[_0xfb4b78(0x1fb)](_0x2ab6c6,_0x43b9cb);this[_0xfb4b78(0x106)](_0x2d2a3c,_0x3ebe4c);}catch(_0x20004a){this[_0xfb4b78(0x159)][_0xfb4b78(0x2cd)](_0xfb4b78(0x238),_0x20004a),this['_clearUndo'](_0x2d2a3c);}let _0x1d016d=this['_getRedoStack'](_0x2d2a3c);if(_0x1d016d)try{let _0x1f230d=this[_0xfb4b78(0x1fb)](_0x1d016d,_0x43b9cb);this['_substituteRedoStack'](_0x2d2a3c,_0x1f230d);}catch(_0x288007){this[_0xfb4b78(0x159)][_0xfb4b78(0x2cd)](_0x288007),this['_clearRedo'](_0x2d2a3c);}}[_0x2e02fc(0x2a1)](_0x2517ce){const _0x4929e1=_0x2e02fc;let _0xe64150=this['_getUndoStack'](_0x2517ce);_0xe64150&&(_0xe64150[_0x4929e1(0x14d)]=0x0,this[_0x4929e1(0x325)]());}['_clearRedo'](_0x23ab12){const _0x560641=_0x2e02fc;let _0x767f52=this[_0x560641(0xf9)](_0x23ab12);_0x767f52&&(_0x767f52[_0x560641(0x14d)]=0x0,this['_updateStatus']());}[_0x2e02fc(0x106)](_0x1cd3e0,_0x3cf57f){const _0x7096e=_0x2e02fc;this['_undoStacks'][_0x7096e(0x2e9)](_0x1cd3e0,_0x3cf57f),this['_updateStatus']();}[_0x2e02fc(0x2b1)](_0x2cd636,_0x2db5ac){const _0x1a6e00=_0x2e02fc;this[_0x1a6e00(0x2bc)][_0x1a6e00(0x2e9)](_0x2cd636,_0x2db5ac),this[_0x1a6e00(0x325)]();}['_transformStack'](_0x36d973,_0x34c6fb){const _0x4fc729=_0x2e02fc;let _0xa70f68=[],_0x4a53c6=_0x34c6fb,_0x2c75ef=_0x34c6fb;for(let _0x18c43d=_0x36d973[_0x4fc729(0x14d)]-0x1;_0x18c43d>=0x0;_0x18c43d--){let {unitID:_0x8e8c26,undoMutations:_0x94e61f,redoMutations:_0x1b88a5}=_0x36d973[_0x18c43d],_0x5d5fb4=this[_0x4fc729(0xf4)]['transformMutationsWithChangeset'](_0x4a53c6,_0x94e61f),_0x2eb3ca=this['_transformService'][_0x4fc729(0x21d)](_0x2c75ef,_0x1b88a5);if(_0x3892b2(_0x5d5fb4)||_0x3892b2(_0x2eb3ca)){this[_0x4fc729(0x159)][_0x4fc729(0x2cd)](_0x4fc729(0x238),'transformStack\x20failed!',_0x5d5fb4,_0x2eb3ca);break;}_0x4a53c6=_0x5d5fb4['c1Prime'],_0x2c75ef=_0x2eb3ca[_0x4fc729(0x293)],_0xa70f68['push']({'unitID':_0x8e8c26,'undoMutations':_0x5d5fb4[_0x4fc729(0x12d)],'redoMutations':_0x2eb3ca[_0x4fc729(0x12d)]});}return _0xa70f68['reverse']();}};Qn=H([V(0x0,_0x4a3eaa),V(0x1,_0xdb365f),V(0x2,_0x52f7ed),V(0x3,_0x40dc20),V(0x4,_0x3efc4d)],Qn);let $n=class extends _0xd08f3f{constructor(_0x5bfaac=ft,_0x3e0ce5,_0x3aabc2,_0x565bb5){const _0x4a00c7=_0x2e02fc;super(),this[_0x4a00c7(0x201)]=_0x5bfaac,this[_0x4a00c7(0x159)]=_0x3e0ce5,this[_0x4a00c7(0x153)]=_0x3aabc2,this['_configService']=_0x565bb5;let {..._0xf48eb3}=_0x3cc59d({},ft,this[_0x4a00c7(0x201)]);if(!_0xf48eb3[_0x4a00c7(0x11c)])throw Error('[UniverCollaborationClientPlugin]:\x20you\x20must\x20provide\x20a\x20socketService\x20implementation\x20in\x20config!');this[_0x4a00c7(0x201)]=_0xf48eb3,this[_0x4a00c7(0x24e)][_0x4a00c7(0x2b7)](R,_0xf48eb3);}[_0x2e02fc(0x239)](){const _0x5bc33f=_0x2e02fc;this[_0x5bc33f(0x1c8)](),this[_0x5bc33f(0x2f1)]();}[_0x2e02fc(0x1c8)](){const _0x402079=_0x2e02fc;var _0x4394c8,_0x1c4721;this[_0x402079(0x153)][_0x402079(0x2c9)](_0x3ec71c)&&this[_0x402079(0x159)][_0x402079(0x2cd)](_0x402079(0x216),_0x402079(0x2d2));let _0x5c8f7c=_0x4eac85([[_0x3ec71c,{'useClass':Qn}],[kn,{'useValue':An()}],[Mn],[Ot],[Wt],[Bn],[Kn],[Dt],[Xn],[B],[qn],[En,{'useClass':this[_0x402079(0x201)]['socketService']}],[_0xa027ef,{'useClass':Zn}],[_0x15b06a,{'useClass':Vn}],[_0x3360d2,{'useClass':Jn}],[Ln,{'useClass':Rn}],[_0x174385,{'useClass':Yn}],[Nn],[In]],(_0x4394c8=this[_0x402079(0x201)])==null?void 0x0:_0x4394c8[_0x402079(0x178)]);if(!((_0x1c4721=this['_config'])!=null&&_0x1c4721[_0x402079(0x2fa)])){let _0xc6c9f4=_0x5c8f7c[_0x402079(0x242)](([_0x548783])=>_0x548783===W);_0xc6c9f4!==-0x1&&_0x5c8f7c[_0x402079(0x84)](_0xc6c9f4,0x1);}_0x29b435(this['_injector'],_0x5c8f7c);}[_0x2e02fc(0x2f1)](){const _0x229469=_0x2e02fc;var _0x13fcb3,_0x1d6943;if(this[_0x229469(0x153)]['get'](_0x340ce5)[_0x229469(0x16d)]({'priority':0x14,'interceptor':_0x16d444({'maxParallel':0x6})}),!((_0x13fcb3=this[_0x229469(0x201)])!=null&&_0x13fcb3[_0x229469(0x1a0)])){var _0x20a542;(_0x20a542=this[_0x229469(0x153)]['get'](U,_0x39c84c['OPTIONAL']))==null||_0x20a542[_0x229469(0xfd)]();}(_0x1d6943=this[_0x229469(0x201)])!=null&&_0x1d6943['enableAuthServer']&&_0xa3b29f(this['_injector'],[[Bn]]),_0xa3b29f(this[_0x229469(0x153)],[[Kn],[Nn],[Xn]]);}};z($n,_0x2e02fc(0x254),_0x2e02fc(0x18d)),z($n,'packageName',Pn),z($n,_0x2e02fc(0x10e),Fn),$n=H([_0x448075(_0x2b8da7,_0x113f06,_0x2a63ac),V(0x1,_0x3efc4d),V(0x2,_0x17057e(_0x346ad7)),V(0x3,_0x39e8ee)],$n);export{Vn as AuthzIoHttpService,J as AwaitingState,Y as AwaitingWithPendingState,vn as BaseCollaborationEntity,xn as BoardCollaborationEntity,R as COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY,Rn as CollaborationAttachmentIoService,Nn as CollaborationController,$ as CollaborationEntity,Jn as CollaborationImageIoService,Vt as CollaborationSession,Mn as CollaborationSessionService,On as CollaborationSocketService,pn as CollaborationStatus,Et as CollaborationUIEventId,B as CollaborationUIEventService,Qn as CollaborativeUndoRedoService,Dt as CommentService,X as ConflictState,pt as DEFAULT_COLLAB_WEB_SOCKET_URL,xt as DEFAULT_REMOTE_UNISCRIPT_EXECUTION_ENDPOINT,mt as DEFAULT_WS_SESSION_TICKET_URL,qn as DataLoaderService,_n as DocCollaborationEntity,Q as FetchingMissState,ht as HEARTBEAT_INTERVAL_KEY,gt as HEARTBEAT_TIMEOUT_KEY,Ln as IAttachmentIoService,kn as ICollaborationClientAdapterService,En as ICollaborationSocketService,U as ILocalCacheService,Cn as INetworkConditionService,W as ISingleActiveUnitService,yt as LOCAL_CACHE_INTERVAL,vt as LOCAL_CACHE_INTERVAL_KEY,Ot as MemberService,Yn as MentionIoHttpService,Z as OfflineState,Sn as PdfCollaborationEntity,q as PendingState,bt as REMOTE_UNISCRIPT_EXECUTION_ENDPOINT_KEY,_t as RETRY_CONNECTING_MAX_COUNT_KEY,zt as SessionStatus,yn as SheetCollaborationEntity,Wt as SheetTransformSelectionsService,bn as SlideCollaborationEntity,Zn as SnapshotServerOverHTTPService,K as SyncedState,Gt as UnitStatus,$n as UniverCollaborationClientPlugin,An as createUniverCollaborationAdapter,wn as deserializeToCombResponse,Ht as getLocalCacheKey,Tn as serializeCombRequest};
|
|
1
|
+
const _0x1f5521=_0x2b9e;(function(_0x2d550b,_0x7ed453){const _0x18992e=_0x2b9e,_0x1a9ca9=_0x2d550b();while(!![]){try{const _0x246aff=-parseInt(_0x18992e(0x35e))/0x1*(parseInt(_0x18992e(0x20b))/0x2)+parseInt(_0x18992e(0x1a2))/0x3+parseInt(_0x18992e(0x378))/0x4+parseInt(_0x18992e(0x291))/0x5+-parseInt(_0x18992e(0x27f))/0x6*(-parseInt(_0x18992e(0x332))/0x7)+-parseInt(_0x18992e(0x3b8))/0x8+parseInt(_0x18992e(0x3bc))/0x9;if(_0x246aff===_0x7ed453)break;else _0x1a9ca9['push'](_0x1a9ca9['shift']());}catch(_0x44e517){_0x1a9ca9['push'](_0x1a9ca9['shift']());}}}(_0x1cc8,0x65ab7));import{CollaborationEvent as _0x28cc07,CompressMutationService as _0x34fb2b,EmptyMutationInfo as _0x6877be,ISnapshotServerService as _0x223810,ITransformService as _0x30bd2c,RevisionService as _0x21335b,SnapshotService as _0xa106a3,UniverCollaborationPlugin as _0x3886aa,b64DecodeUnicode as _0x52c95b,isTransformChangesetsSuccess as _0x32b26c,isTransformMutationsWithChangesetFailure as _0xc4ea4b,isTransformMutationsWithChangesetSuccess as _0x71163b,mapDocumentTypeToUniverInstanceType as _0x242325,parseChangesetToProtocol as _0x53b382,parseProtocolChangeset as _0x50c9bb,textEncoder as _0x23efb2,uuidv4 as _0xf5037d}from'@univerjs-pro/collaboration';import{CommandType as _0x3ac237,DependentOn as _0x1a8c7d,Disposable as _0x13fb6a,DisposableCollection as _0x3f655f,IAuthzIoService as _0x389ebf,ICommandService as _0x24738d,IConfigService as _0x123a79,IContextService as _0x3d76ae,IImageIoService as _0x17ef7f,ILogService as _0x3849f9,IMentionIOService as _0x5ec686,IPermissionService as _0x51823a,IUndoRedoService as _0x143b1e,IUniverInstanceService as _0x238a9e,ImageSourceType as _0x36d131,ImageUploadStatusType as _0x5af30f,Inject as _0x32c7b6,Injector as _0xd2295f,JSONX as _0x4c7fe5,LocalUndoRedoService as _0xa29cff,LocaleService as _0xed8942,MentionType as _0xf50ac4,Optional as _0x100ce1,Plugin as _0x2c2938,Quantity as _0x5262c6,Rectangle as _0x224ddf,RxDisposable as _0x2fb3e4,Tools as _0x36c319,UniverInstanceType as _0x4f4a88,UserManagerService as _0x522a20,Workbook as _0x1005dd,createIdentifier as _0x382d48,generateRandomId as _0x3b00a4,isInternalEditorID as _0x395bd6,merge as _0x5b8bc5,mergeOverrideWithDependencies as _0x410d5e,registerDependencies as _0x3eca33,resolveWithBasePath as _0x3de6a3,sequenceExecute as _0x1f41b0,toDisposable as _0x1e0938,touchDependencies as _0x1c608a}from'@univerjs/core';function _0x2b9e(_0x222f0e,_0x5cfa4e){_0x222f0e=_0x222f0e-0x13e;const _0x1cc86d=_0x1cc8();let _0x2b9ee1=_0x1cc86d[_0x222f0e];return _0x2b9ee1;}import{DocStateChangeManagerService as _0x3382a8,RichTextEditingMutation as _0x47e1e8}from'@univerjs/docs';import{InsertSheetMutation as _0xe7917a,SetSelectionsOperation as _0x2d0b65,SheetPermissionInitController as _0x2ddc32,SheetsSelectionsService as _0x5859a2,WorkbookEditablePermission as _0x57781e}from'@univerjs/sheets';import{BehaviorSubject as _0x21afa9,ReplaySubject as _0x16703b,Subject as _0x548400,concatMap as _0x1b7252,firstValueFrom as _0x199bcd,map as _0x185b9d,merge as _0x48bcdd,of as _0x195754,shareReplay as _0x4f20dd,take as _0x14e08c,takeUntil as _0x10e0d6}from'rxjs';import{CmdRspCode as _0x2486d1,CombCmd as _0x45aed2,ErrorCode as _0x5caf42,FileSource as _0x52302f}from'@univerjs/protocol';import{ITelemetryService as _0x25a71a}from'@univerjs/telemetry';import{delay as _0x42710a,filter as _0x3dc9b5,map as _0x55a320,take as _0x12e312,takeUntil as _0x530203}from'rxjs/operators';import{AddSlidePageMutation as _0x2ee980,EnsureSlideMasterPageMutation as _0x4b2065,MoveSlidePageMutation as _0x223877,RemoveSlidePageMutation as _0x1e507d}from'@univerjs-pro/slides';import{HTTPRequest as _0x3570bd,HTTPService as _0x314f58,ISocketService as _0x1fbe1f,MergeInterceptorFactory as _0x113520,ThresholdInterceptorFactory as _0x12c387,UniverNetworkPlugin as _0x32578b}from'@univerjs/network';import{UniverLicensePlugin as _0x267699,getGlobalObject as _0x122e45}from'@univerjs-pro/license';import{cbc as _0x3a25ba}from'@noble/ciphers/aes.js';import{concatBytes as _0x27bfb1,randomBytes as _0x585ea6,utf8ToBytes as _0x499a8d}from'@noble/ciphers/utils.js';import{DRAWING_IMAGE_ALLOW_IMAGE_LIST as _0x10020d,getDrawingImageAllowSize as _0x57aa8f}from'@univerjs/drawing';const R=_0x1f5521(0x203),ft={},pt=_0x1f5521(0x1e7),mt=_0x1f5521(0x1b7),ht=_0x1f5521(0x305),gt='HEARTBEAT_TIMEOUT',_t=_0x1f5521(0x2a2),vt=_0x1f5521(0x354),yt=0x3e8,bt='REMOTE_UNISCRIPT_EXECUTION_ENDPOINT',xt=_0x1f5521(0x3b1);function St(_0x575a2a){const _0xc418fb=_0x1f5521;return JSON['stringify'](_0x575a2a)[_0xc418fb(0x316)];}function Ct(_0x5e17ea){'@babel/helpers - typeof';const _0xd001d8=_0x1f5521;return Ct=typeof Symbol==_0xd001d8(0x167)&&typeof Symbol[_0xd001d8(0x3ad)]=='symbol'?function(_0x52d4f7){return typeof _0x52d4f7;}:function(_0x278990){const _0x91e6ab=_0xd001d8;return _0x278990&&typeof Symbol=='function'&&_0x278990[_0x91e6ab(0x28e)]===Symbol&&_0x278990!==Symbol['prototype']?_0x91e6ab(0x397):typeof _0x278990;},Ct(_0x5e17ea);}function wt(_0x31ce4e,_0x477f21){const _0x11edd0=_0x1f5521;if(Ct(_0x31ce4e)!='object'||!_0x31ce4e)return _0x31ce4e;var _0x16bb4b=_0x31ce4e[Symbol['toPrimitive']];if(_0x16bb4b!==void 0x0){var _0x34b8ba=_0x16bb4b[_0x11edd0(0x359)](_0x31ce4e,_0x477f21||'default');if(Ct(_0x34b8ba)!=_0x11edd0(0x313))return _0x34b8ba;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x477f21===_0x11edd0(0x239)?String:Number)(_0x31ce4e);}function Tt(_0x3b1528){const _0x54a6e3=_0x1f5521;var _0x2359f2=wt(_0x3b1528,_0x54a6e3(0x239));return Ct(_0x2359f2)=='symbol'?_0x2359f2:_0x2359f2+'';}function z(_0x56f508,_0x4124b8,_0x5f175f){const _0x2e702f=_0x1f5521;return(_0x4124b8=Tt(_0x4124b8))in _0x56f508?Object[_0x2e702f(0x37b)](_0x56f508,_0x4124b8,{'value':_0x5f175f,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x56f508[_0x4124b8]=_0x5f175f,_0x56f508;}let Et=function(_0x5bea01){const _0x3c052e=_0x1f5521;return _0x5bea01[_0x3c052e(0x2af)]=_0x3c052e(0x2af),_0x5bea01[_0x3c052e(0x3af)]='PERMISSION_DENIED',_0x5bea01[_0x3c052e(0x32d)]='CONFLICT',_0x5bea01['CLOSE_ROOM']=_0x3c052e(0x338),_0x5bea01['JOIN_ROOM_FAILED']=_0x3c052e(0x2d2),_0x5bea01[_0x3c052e(0x2a0)]=_0x3c052e(0x2a0),_0x5bea01['SOCKET_FAILED']=_0x3c052e(0x20f),_0x5bea01[_0x3c052e(0x28b)]=_0x3c052e(0x28b),_0x5bea01;}({});var B=class{constructor(){const _0x508e71=_0x1f5521;z(this,_0x508e71(0x39f),new _0x548400()),z(this,_0x508e71(0x3d5),this[_0x508e71(0x39f)][_0x508e71(0x37a)]());}[_0x1f5521(0x205)](_0x4297b6){const _0x2437c2=_0x1f5521;this['_event$'][_0x2437c2(0x1ae)](_0x4297b6);}},Dt=class{constructor(){const _0x303d29=_0x1f5521;z(this,_0x303d29(0x296),new _0x548400()),z(this,'commentUpdate$',this[_0x303d29(0x296)]['asObservable']());}[_0x1f5521(0x256)](_0x2d148e){const _0x442e5c=_0x1f5521;this[_0x442e5c(0x296)]['next'](_0x2d148e);}};function V(_0x15713d,_0x20ee82){return function(_0x47a6b6,_0xdf7322){_0x20ee82(_0x47a6b6,_0xdf7322,_0x15713d);};}function H(_0x2ee748,_0x46c45b,_0x2c61a7,_0x578586){const _0x39e622=_0x1f5521;var _0x1d7a98=arguments[_0x39e622(0x316)],_0x39ac98=_0x1d7a98<0x3?_0x46c45b:_0x578586===null?_0x578586=Object[_0x39e622(0x14a)](_0x46c45b,_0x2c61a7):_0x578586,_0x3526db;if(typeof Reflect==_0x39e622(0x313)&&typeof Reflect[_0x39e622(0x29c)]==_0x39e622(0x167))_0x39ac98=Reflect[_0x39e622(0x29c)](_0x2ee748,_0x46c45b,_0x2c61a7,_0x578586);else{for(var _0x51b1d7=_0x2ee748['length']-0x1;_0x51b1d7>=0x0;_0x51b1d7--)(_0x3526db=_0x2ee748[_0x51b1d7])&&(_0x39ac98=(_0x1d7a98<0x3?_0x3526db(_0x39ac98):_0x1d7a98>0x3?_0x3526db(_0x46c45b,_0x2c61a7,_0x39ac98):_0x3526db(_0x46c45b,_0x2c61a7))||_0x39ac98);}return _0x1d7a98>0x3&&_0x39ac98&&Object[_0x39e622(0x37b)](_0x46c45b,_0x2c61a7,_0x39ac98),_0x39ac98;}let Ot=class extends _0x13fb6a{constructor(_0x55d843){const _0x7e437d=_0x1f5521;super(),this['_univerInstanceService']=_0x55d843,z(this,_0x7e437d(0x396),new Map()),z(this,_0x7e437d(0x176),new _0x548400()),this[_0x7e437d(0x34e)](_0x48bcdd(this['_univerInstanceService'][_0x7e437d(0x1fe)](_0x4f4a88[_0x7e437d(0x399)])[_0x7e437d(0x220)](_0x55a320(_0x83b2a6=>_0x83b2a6[_0x7e437d(0x3d7)]())),this[_0x7e437d(0x329)][_0x7e437d(0x1fe)](_0x4f4a88[_0x7e437d(0x33c)])[_0x7e437d(0x220)](_0x55a320(_0x5a7229=>_0x5a7229[_0x7e437d(0x3d7)]())),this[_0x7e437d(0x329)][_0x7e437d(0x1fe)](_0x4f4a88['UNIVER_BOARD'])['pipe'](_0x55a320(_0x285f4e=>_0x285f4e['getUnitId']())),this[_0x7e437d(0x329)][_0x7e437d(0x1fe)](_0x4f4a88[_0x7e437d(0x337)])[_0x7e437d(0x220)](_0x55a320(_0x41209e=>_0x41209e[_0x7e437d(0x3d7)]())))[_0x7e437d(0x2dc)](_0x386507=>this[_0x7e437d(0x1db)](_0x386507)));}[_0x1f5521(0x35c)](_0x152990){const _0x57d263=_0x1f5521;return this[_0x57d263(0x396)][_0x57d263(0x2de)](_0x152990)?_0x195754(this[_0x57d263(0x396)]['get'](_0x152990)):this[_0x57d263(0x176)]['pipe'](_0x55a320(_0x599e53=>{const _0x20e5b9=_0x57d263;if(_0x599e53===_0x152990)return this[_0x20e5b9(0x396)][_0x20e5b9(0x20c)](_0x599e53);}));}[_0x1f5521(0x3a0)](_0x413f51,_0x15dfe2){const _0x11d96d=_0x1f5521;let _0x7f341b=this[_0x11d96d(0x396)]['get'](_0x413f51);_0x7f341b||(_0x7f341b=new kt(),this[_0x11d96d(0x396)][_0x11d96d(0x16f)](_0x413f51,_0x7f341b),this['_roomCreated$'][_0x11d96d(0x1ae)](_0x413f51)),_0x7f341b[_0x11d96d(0x3a0)](_0x15dfe2);}['removeMember'](_0x4b5ae1,_0x68b8b){const _0x2bc5bb=_0x1f5521;let _0x134390=this[_0x2bc5bb(0x396)][_0x2bc5bb(0x20c)](_0x4b5ae1);_0x134390&&_0x134390[_0x2bc5bb(0x21d)](_0x68b8b);}['getRoom'](_0x2c8144){const _0x53e546=_0x1f5521;return this[_0x53e546(0x396)][_0x53e546(0x20c)](_0x2c8144);}['getMember'](_0x4bd4e1,_0x56c1fb){const _0x4c183e=_0x1f5521;let _0x1dd6fe=this[_0x4c183e(0x396)][_0x4c183e(0x20c)](_0x4bd4e1);if(_0x1dd6fe)return _0x1dd6fe[_0x4c183e(0x35f)](_0x56c1fb);}[_0x1f5521(0x1db)](_0x17a5b5){const _0x28315a=_0x1f5521;let _0x5b37d8=this[_0x28315a(0x396)][_0x28315a(0x20c)](_0x17a5b5);_0x5b37d8&&(_0x5b37d8[_0x28315a(0x1ee)](),this[_0x28315a(0x396)]['delete'](_0x17a5b5));}[_0x1f5521(0x1ee)](){const _0x5e7982=_0x1f5521;this[_0x5e7982(0x396)][_0x5e7982(0x154)](_0x48252a=>_0x48252a['dispose']()),this[_0x5e7982(0x396)][_0x5e7982(0x2bd)](),this[_0x5e7982(0x176)][_0x5e7982(0x185)]();}};Ot=H([V(0x0,_0x238a9e)],Ot);var kt=class extends _0x13fb6a{constructor(..._0xc1fdec){const _0x3a735f=_0x1f5521;super(..._0xc1fdec),z(this,_0x3a735f(0x362),new Map()),z(this,_0x3a735f(0x1e2),new _0x21afa9(this[_0x3a735f(0x362)])),z(this,_0x3a735f(0x143),this[_0x3a735f(0x1e2)][_0x3a735f(0x37a)]());}['dispose'](){const _0x565242=_0x1f5521;this[_0x565242(0x362)][_0x565242(0x2bd)](),this[_0x565242(0x1e2)][_0x565242(0x185)]();}[_0x1f5521(0x3a0)](_0x2d76f7){const _0x3c2987=_0x1f5521;this[_0x3c2987(0x362)][_0x3c2987(0x16f)](_0x2d76f7[_0x3c2987(0x235)],_0x2d76f7),this['_emitMembers']();}['removeMember'](_0x331b47){const _0x37d19d=_0x1f5521;this[_0x37d19d(0x362)][_0x37d19d(0x204)](_0x331b47),this[_0x37d19d(0x315)]();}[_0x1f5521(0x35f)](_0x4728f4){const _0x2d5a02=_0x1f5521;return this['_members'][_0x2d5a02(0x20c)](_0x4728f4);}[_0x1f5521(0x148)](){const _0x5b5136=_0x1f5521;return Array['from'](this[_0x5b5136(0x362)]['values']());}[_0x1f5521(0x315)](){const _0x1e554f=_0x1f5521;this[_0x1e554f(0x1e2)][_0x1e554f(0x1ae)](this[_0x1e554f(0x362)]);}};function At(_0x73b270,_0x12c97c){const _0x134ec0=_0x1f5521;if(Mt(_0x73b270))return _0x12c97c;if(_0x12c97c[_0x134ec0(0x1b1)]===_0x28cc07[_0x134ec0(0x168)]){let _0x5683eb=Lt(_0x73b270),_0x43d8fe=_0x12c97c;return{..._0x43d8fe,'data':{..._0x43d8fe[_0x134ec0(0x2cc)],'unitID':_0x73b270['target'][_0x134ec0(0x2c4)],'unitType':_0x73b270[_0x134ec0(0x1ef)]['unitType']??_0x43d8fe[_0x134ec0(0x2cc)][_0x134ec0(0x1e6)],'changeset':_0x5683eb[_0x134ec0(0x343)](_0x43d8fe[_0x134ec0(0x2cc)][_0x134ec0(0x361)],Rt(_0x73b270))}};}if(_0x12c97c[_0x134ec0(0x1b1)]===_0x28cc07['FETCH_MISSING']){let _0x142063=_0x12c97c;return{..._0x142063,'data':{..._0x142063[_0x134ec0(0x2cc)],'unitID':_0x73b270[_0x134ec0(0x1ef)]['unitId'],'unitType':_0x73b270[_0x134ec0(0x1ef)][_0x134ec0(0x1e6)]??_0x142063[_0x134ec0(0x2cc)][_0x134ec0(0x1e6)]}};}return _0x12c97c;}function jt(_0x28d57d,_0x5e773a){const _0x10979a=_0x1f5521;if(Mt(_0x28d57d))return[_0x5e773a];switch(_0x5e773a[_0x10979a(0x1b1)]){case _0x28cc07[_0x10979a(0x1ff)]:return[Nt(_0x28d57d,_0x5e773a)];case _0x28cc07[_0x10979a(0x3a4)]:return[Ft(_0x28d57d,_0x5e773a)];case _0x28cc07[_0x10979a(0x14b)]:return[Pt(_0x28d57d,_0x5e773a)];default:return[_0x5e773a];}}function Mt(_0x2e6289){const _0xd6497f=_0x1f5521;return _0x2e6289[_0xd6497f(0x1ef)][_0xd6497f(0x1b8)]==null&&_0x2e6289[_0xd6497f(0x1ef)]['unitId']===_0x2e6289[_0xd6497f(0x37d)]&&!_0x2e6289[_0xd6497f(0x361)];}function Nt(_0x5dbc3c,_0x32451d){const _0x2c6717=_0x1f5521;return{..._0x32451d,'data':_0x53b382(It(_0x5dbc3c,_0x50c9bb(_0x32451d[_0x2c6717(0x2cc)])))};}function Pt(_0x248863,_0x17033d){const _0x1da5e8=_0x1f5521;return{..._0x17033d,'data':It(_0x248863,_0x17033d[_0x1da5e8(0x2cc)])};}function Ft(_0x5bd44a,_0x37d892){const _0x1f1d54=_0x1f5521;let _0xca0397=_0x37d892[_0x1f1d54(0x2cc)];return{..._0x37d892,'data':{..._0xca0397,'changesets':_0xca0397[_0x1f1d54(0x25d)][_0x1f1d54(0x2ea)](_0x272938=>_0x53b382(It(_0x5bd44a,_0x50c9bb(_0x272938))))}};}function It(_0x29c42a,_0x4d400b){return Lt(_0x29c42a)['toLocal'](_0x4d400b,Rt(_0x29c42a));}function Lt(_0x10d0e6){const _0x388ee5=_0x1f5521;if(!_0x10d0e6[_0x388ee5(0x361)])throw Error(_0x388ee5(0x1c0));return _0x10d0e6['changeset'];}function Rt(_0x3c8707){const _0x32c64f=_0x1f5521;return{'localUnitId':_0x3c8707[_0x32c64f(0x37d)],'unitType':_0x3c8707['unitType'],'target':_0x3c8707['target']};}let zt=function(_0x1147fa){const _0x124c3d=_0x1f5521;return _0x1147fa[_0x1147fa[_0x124c3d(0x288)]=0x0]='IDLE',_0x1147fa[_0x1147fa[_0x124c3d(0x1e9)]=0x1]=_0x124c3d(0x1e9),_0x1147fa[_0x1147fa['OFFLINE']=0x2]='OFFLINE',_0x1147fa[_0x1147fa[_0x124c3d(0x33d)]=0x3]='ONLINE',_0x1147fa;}({});const Bt={[_0x2486d1['FAIL']]:_0x1f5521(0x18d),[_0x2486d1[_0x1f5521(0x2e7)]]:'session.room-full',[_0x2486d1[_0x1f5521(0x342)]]:_0x1f5521(0x385),[_0x2486d1[_0x1f5521(0x21f)]]:_0x1f5521(0x28a),[_0x2486d1[_0x1f5521(0x17b)]]:_0x1f5521(0x3d9)};let Vt=class extends _0x2fb3e4{get[_0x1f5521(0x350)](){const _0x317d21=_0x1f5521;return this[_0x317d21(0x39d)][_0x317d21(0x3ca)]();}constructor(_0x42de9,_0x95d6a6,_0x529fd5,_0xafc5e0,_0x1cc5d5,_0x2b7157,_0x38530b,_0x4a8940){const _0x36f18a=_0x1f5521;super(),this[_0x36f18a(0x216)]=_0x42de9,this[_0x36f18a(0x2dd)]=_0x529fd5,this[_0x36f18a(0x2a1)]=_0xafc5e0,this[_0x36f18a(0x37f)]=_0x1cc5d5,this['_commentService']=_0x2b7157,this['_collaborationUIEventService']=_0x38530b,this[_0x36f18a(0x307)]=_0x4a8940,z(this,_0x36f18a(0x39d),new _0x21afa9(0x0)),z(this,_0x36f18a(0x30a),this[_0x36f18a(0x39d)]['asObservable']()),z(this,'_event$',new _0x548400()),z(this,_0x36f18a(0x3d5),this[_0x36f18a(0x39f)][_0x36f18a(0x37a)]()),z(this,'_socket',void 0x0),z(this,'_socketMessageSubscription',void 0x0),z(this,_0x36f18a(0x14f),void 0x0),z(this,_0x36f18a(0x393),!0x1),z(this,_0x36f18a(0x1bc),null),this[_0x36f18a(0x393)]=!!this['_telemetryService'],_0x95d6a6[_0x36f18a(0x220)](_0x10e0d6(this[_0x36f18a(0x201)]))[_0x36f18a(0x2dc)](_0x1548e8=>{const _0x5d9600=_0x36f18a;if(_0x1548e8!==void 0x0){if(this[_0x5d9600(0x1de)]=_0x1548e8,_0x1548e8)this[_0x5d9600(0x335)](_0x1548e8),this[_0x5d9600(0x327)]=_0x1548e8[_0x5d9600(0x1ce)][_0x5d9600(0x2dc)](_0xf64745=>{const _0x352aaf=_0x5d9600;_0xf64745[_0x352aaf(0x294)]===this[_0x352aaf(0x216)][_0x352aaf(0x1ef)]['unitId']&&this[_0x352aaf(0x18a)](_0xf64745);});else{var _0x16d1f3;this[_0x5d9600(0x2c0)](),this[_0x5d9600(0x39d)][_0x5d9600(0x1ae)](0x2),(_0x16d1f3=this['_socketMessageSubscription'])==null||_0x16d1f3['unsubscribe'](),this[_0x5d9600(0x327)]=null;}}});}[_0x1f5521(0x371)](){const _0x4df25c=_0x1f5521;var _0x36c405;return((_0x36c405=this[_0x4df25c(0x1de)])==null?void 0x0:_0x36c405[_0x4df25c(0x235)])??null;}[_0x1f5521(0x1ee)](){const _0x543823=_0x1f5521;super[_0x543823(0x1ee)](),this[_0x543823(0x301)](),this[_0x543823(0x201)][_0x543823(0x1ae)](),this['dispose$'][_0x543823(0x185)]();}[_0x1f5521(0x301)](){const _0x2f80e2=_0x1f5521;var _0x2e8735;this[_0x2f80e2(0x2c0)](),(_0x2e8735=this[_0x2f80e2(0x1de)])==null||_0x2e8735[_0x2f80e2(0x3bb)]({'cmd':_0x45aed2[_0x2f80e2(0x297)],'data':{'roomID':this['_identity'][_0x2f80e2(0x1ef)][_0x2f80e2(0x2c4)]}}),this[_0x2f80e2(0x39f)][_0x2f80e2(0x185)](),this[_0x2f80e2(0x39d)][_0x2f80e2(0x185)]();}['_onCombEvent'](_0x19af50){const _0x140130=_0x1f5521;_0x19af50[_0x140130(0x381)]===_0x45aed2[_0x140130(0x23d)]?this[_0x140130(0x300)](_0x19af50):_0x19af50['cmd']===_0x45aed2[_0x140130(0x146)]&&this[_0x140130(0x325)](_0x19af50);}['_joinRoom'](_0x45bf6b){const _0x19304b=_0x1f5521;this[_0x19304b(0x39d)][_0x19304b(0x1ae)](0x1),_0x45bf6b['send']({'cmd':_0x45aed2[_0x19304b(0x23d)],'routeKey':this[_0x19304b(0x216)][_0x19304b(0x1ef)][_0x19304b(0x2c4)],'routeType':'','data':{'rooms':[{'roomID':this[_0x19304b(0x216)][_0x19304b(0x1ef)][_0x19304b(0x2c4)]}]}});}[_0x1f5521(0x300)](_0x226bcd){const _0x215b41=_0x1f5521;var _0x2cae61;if(_0x226bcd[_0x215b41(0x26d)]in Bt){this[_0x215b41(0x3a1)][_0x215b41(0x205)]({'id':_0x215b41(0x2d2),'data':Bt[_0x226bcd[_0x215b41(0x26d)]]}),this[_0x215b41(0x39d)][_0x215b41(0x1ae)](0x2);return;}this['_sessionStatus$'][_0x215b41(0x1ae)](0x3);let _0x105e14=(_0x2cae61=_0x226bcd[_0x215b41(0x2cc)][_0x215b41(0x2f1)][this[_0x215b41(0x216)][_0x215b41(0x1ef)][_0x215b41(0x2c4)]])==null?void 0x0:_0x2cae61[_0x215b41(0x375)];_0x105e14&&_0x105e14[_0x215b41(0x154)](_0x2894a4=>this[_0x215b41(0x37f)][_0x215b41(0x3a0)](this[_0x215b41(0x216)][_0x215b41(0x37d)],_0x2894a4));}[_0x1f5521(0x325)](_0x15dd12){const _0x192214=_0x1f5521;try{let _0x13d0d3=jt(this[_0x192214(0x216)],_0x15dd12['data']);for(let _0x4cc9ba of _0x13d0d3)switch(_0x4cc9ba['eventID']){case _0x28cc07['USERS_ENTER']:this[_0x192214(0x39a)](_0x4cc9ba),this[_0x192214(0x39f)][_0x192214(0x1ae)](_0x4cc9ba);break;case _0x28cc07[_0x192214(0x1af)]:this[_0x192214(0x208)](_0x4cc9ba),this['_event$'][_0x192214(0x1ae)](_0x4cc9ba);break;case _0x28cc07[_0x192214(0x19a)]:case _0x28cc07['CHANGESET_SHOULD_RETRY']:this[_0x192214(0x27a)](),this[_0x192214(0x140)](),this[_0x192214(0x39f)][_0x192214(0x1ae)](_0x4cc9ba);break;case _0x28cc07[_0x192214(0x164)]:this[_0x192214(0x2dd)][_0x192214(0x2fc)](_0x192214(0x1f2)+JSON[_0x192214(0x212)](_0x4cc9ba)),this['_event$'][_0x192214(0x1ae)](_0x4cc9ba);break;case _0x28cc07[_0x192214(0x2a8)]:this['_commentService'][_0x192214(0x256)](_0x4cc9ba[_0x192214(0x2cc)]),this[_0x192214(0x39f)][_0x192214(0x1ae)](_0x4cc9ba);break;default:this[_0x192214(0x39f)][_0x192214(0x1ae)](_0x4cc9ba);}}catch(_0x3c147f){this[_0x192214(0x2dd)][_0x192214(0x2fc)](_0x3c147f,_0x15dd12);}}[_0x1f5521(0x39a)](_0x523f14){const _0x138fdf=_0x1f5521;this[_0x138fdf(0x37f)][_0x138fdf(0x3a0)](this['_identity']['localUnitId'],_0x523f14[_0x138fdf(0x2cc)]);}['_onUserLeave'](_0x361079){const _0x522b4b=_0x1f5521;this[_0x522b4b(0x37f)]['removeMember'](this[_0x522b4b(0x216)][_0x522b4b(0x37d)],_0x361079[_0x522b4b(0x2cc)][_0x522b4b(0x235)]);}async['send'](_0x2e8a81,_0x4c83a3){const _0xadbf00=_0x1f5521;if(this[_0xadbf00(0x350)]!==0x3||!this[_0xadbf00(0x1de)])throw Error(_0xadbf00(0x318));try{let _0x5ea8c2=At(this[_0xadbf00(0x216)],_0x2e8a81);_0x5ea8c2[_0xadbf00(0x1b1)]===_0x28cc07[_0xadbf00(0x168)]&&(this['_scheduleCollaborationTimeoutTimer'](),this[_0xadbf00(0x376)](_0x5ea8c2)),this['_socket'][_0xadbf00(0x3bb)]({'cmd':_0x45aed2[_0xadbf00(0x2ee)],'routeKey':this[_0xadbf00(0x216)][_0xadbf00(0x1ef)]['unitId'],'routeType':'','data':_0x5ea8c2});}catch(_0xea1ab2){this[_0xadbf00(0x2dd)][_0xadbf00(0x2fc)](_0xea1ab2);}}['_scheduleCollaborationTimeoutTimer'](){const _0x22c3a9=_0x1f5521;this[_0x22c3a9(0x14f)]=setTimeout(()=>{const _0x377773=_0x22c3a9;this[_0x377773(0x14f)]=null,this[_0x377773(0x3a1)][_0x377773(0x205)]({'id':'SUBMIT_CHANGESET_TIMEOUT'});},this['_configService']['getConfig'](_0x22c3a9(0x3a3))??0x4e20);}[_0x1f5521(0x140)](){const _0x2d299b=_0x1f5521;this[_0x2d299b(0x14f)]&&=(clearTimeout(this[_0x2d299b(0x14f)]),null);}[_0x1f5521(0x376)](_0x242539){const _0x4f9de1=_0x1f5521;if(!this[_0x4f9de1(0x393)])return;let {data:_0x43433a}=_0x242539,{unitID:_0x1678a4,changeset:_0xf1f4ce}=_0x43433a,{mutations:_0x47abe7,type:_0x32621b}=_0xf1f4ce;this[_0x4f9de1(0x1bc)]={'unitId':_0x1678a4,'type':_0x32621b,'startTime':performance[_0x4f9de1(0x30b)](),'stopTime':0x0,'duration':0x0,'size':St(_0x47abe7)};}['_stopTelemetryCollaborationNewChangeset'](){const _0x428fd2=_0x1f5521;if(this[_0x428fd2(0x393)]){if(!this[_0x428fd2(0x1bc)]){this['_logService'][_0x428fd2(0x2fc)](_0x428fd2(0x1fa),_0x428fd2(0x29d));return;}this[_0x428fd2(0x1bc)][_0x428fd2(0x35b)]=performance[_0x428fd2(0x30b)](),this[_0x428fd2(0x1bc)]['duration']=this[_0x428fd2(0x1bc)]['stopTime']-this[_0x428fd2(0x1bc)]['startTime'],this[_0x428fd2(0x307)][_0x428fd2(0x1dc)](_0x428fd2(0x347),this['_telemetryInfo']),this[_0x428fd2(0x1bc)]=null;}}[_0x1f5521(0x2c0)](){const _0x5abc50=_0x1f5521;this[_0x5abc50(0x1bc)]=null;}};Vt=H([V(0x2,_0x3849f9),V(0x3,_0x123a79),V(0x4,_0x32c7b6(Ot)),V(0x5,_0x32c7b6(Dt)),V(0x6,_0x32c7b6(B)),V(0x7,_0x100ce1(_0x25a71a))],Vt);const U=_0x382d48(_0x1f5521(0x3b0));function Ht(_0x1699a7){const _0x19da34=_0x1f5521;return _0x19da34(0x22f)+_0x1699a7;}function Ut(_0x54f1ba){const _0x5aed0a=_0x1f5521;let {unitID:_0x16b717,mutations:_0x27c6e9}=_0x54f1ba;return{'unitId':_0x16b717,'subUnitId':_0x27c6e9[_0x5aed0a(0x316)]>0x0?_0x27c6e9[0x0][_0x5aed0a(0x366)][_0x5aed0a(0x2f2)]:null};}let Wt=class{constructor(_0x2ab1d4,_0x2b6fb1,_0x445adc){const _0x304ec1=_0x1f5521;this[_0x304ec1(0x391)]=_0x2ab1d4,this[_0x304ec1(0x2c5)]=_0x2b6fb1,this[_0x304ec1(0x249)]=_0x445adc;}['transformSelections'](_0x531bb2){const _0x1b5dbe=_0x1f5521;var _0x215a3e,_0x19fde5;let _0x56d4df=this[_0x1b5dbe(0x391)]['get'](_0x5859a2),{unitId:_0x4351d3,subUnitId:_0x379f22}=Ut(_0x531bb2),_0x454e97=_0x56d4df==null?void 0x0:_0x56d4df[_0x1b5dbe(0x2e8)](_0x4351d3)[_0x1b5dbe(0x358)](),_0x225061=(_0x215a3e=this['_instanceService']['getUnit'](_0x4351d3))==null||(_0x215a3e=_0x215a3e[_0x1b5dbe(0x27b)]())==null?void 0x0:_0x215a3e[_0x1b5dbe(0x190)]();if(_0x454e97['length']===0x0||!_0x4351d3||!_0x379f22)return;let _0x4d12f5=[{'id':_0x2d0b65['id'],'params':{'unitId':_0x4351d3,'subUnitId':_0x225061,'selections':_0x36c319['deepClone'](_0x454e97)}}],_0xdbf93a=this[_0x1b5dbe(0x2c5)][_0x1b5dbe(0x222)](_0x531bb2,_0x4d12f5);if(!_0x71163b(_0xdbf93a))throw _0xdbf93a[_0x1b5dbe(0x2fc)];let _0x4737b5=(_0x19fde5=_0xdbf93a[_0x1b5dbe(0x242)][0x0])==null||(_0x19fde5=_0x19fde5[_0x1b5dbe(0x366)])==null?void 0x0:_0x19fde5[_0x1b5dbe(0x31f)];if(Array['isArray'](_0x4737b5)&&_0x4737b5[_0x1b5dbe(0x316)]){if(_0x4737b5[_0x1b5dbe(0x316)]===_0x4d12f5[0x0][_0x1b5dbe(0x366)]['selections'][_0x1b5dbe(0x316)]&&_0x4737b5[_0x1b5dbe(0x15f)]((_0x146fcb,_0x356664)=>_0x224ddf[_0x1b5dbe(0x344)](_0x146fcb[_0x1b5dbe(0x23b)],_0x4d12f5[0x0][_0x1b5dbe(0x366)][_0x1b5dbe(0x31f)][_0x356664][_0x1b5dbe(0x23b)])))return;this['_injector'][_0x1b5dbe(0x20c)](_0x24738d)['executeCommand'](_0x2d0b65['id'],{'unitId':_0x4351d3,'subUnitId':_0x225061,'selections':_0x4737b5});}}};Wt=H([V(0x0,_0x32c7b6(_0xd2295f)),V(0x1,_0x30bd2c),V(0x2,_0x238a9e)],Wt);const W=_0x382d48(_0x1f5521(0x2a4));let Gt=function(_0x19436d){const _0x460f8=_0x1f5521;return _0x19436d[_0x19436d[_0x460f8(0x3cf)]=0x0]=_0x460f8(0x3cf),_0x19436d[_0x19436d['OTHER_CLIENTS_EDITING']=0x1]=_0x460f8(0x211),_0x19436d;}({});function Kt(_0x5c6048){const _0x1f477e=_0x1f5521;var _0x3d3c3a;return!!((_0x3d3c3a=_0x5c6048[_0x1f477e(0x366)])!=null&&_0x3d3c3a[_0x1f477e(0x24b)]);}const qt=new Set([_0xe7917a['id']]),Jt=new Set([_0x2ee980['id'],_0x4b2065['id'],_0x223877['id'],_0x1e507d['id']]);function Yt(_0x4148ec,_0x88917b=qt){const _0x1d6add=_0x1f5521;let _0x30dcb1=[];for(let _0xee4221 of _0x4148ec){if(_0x88917b[_0x1d6add(0x2de)](_0xee4221['id'])){if(_0x30dcb1[_0x1d6add(0x316)]>0x0)break;_0x30dcb1['push'](_0xee4221);break;}if(Kt(_0xee4221)){if(_0x30dcb1[_0x1d6add(0x316)]>0x0)break;_0x30dcb1[_0x1d6add(0x1cf)](_0xee4221);break;}_0x30dcb1['push'](_0xee4221);}return _0x30dcb1;}function Xt(_0x10be5d,_0x4a1287,_0x954e38,_0x2247f7,_0x470f51){const _0x852e=_0x1f5521;let _0x325052=Yt(_0x10be5d),_0x2e0171=_0x470f51[_0x852e(0x15e)](),_0x43e397=(_0x2e0171==null?void 0x0:_0x2e0171['userID'])??_0x852e(0x2e3),_0x442fa0=(_0x2e0171==null?void 0x0:_0x2e0171[_0x852e(0x235)])??'unknown';return{'changeset':{'unitID':_0x4a1287,'type':_0x242325(_0x954e38['getUnitType'](_0x4a1287)),'baseRev':_0x2247f7['getCurrentRevOfUnit'](_0x4a1287),'revision':0x0,'userID':_0x43e397,'memberID':_0x442fa0,'mutations':_0x325052},'pendingMutations':_0x10be5d[_0x852e(0x2ca)](_0x325052[_0x852e(0x316)])};}const Zt=Xt;function Qt(_0x5553f5,_0x3ba9ff,_0x494070,_0x49a65b,_0x2d007d){const _0x432a4d=_0x1f5521;let _0x297269=Yt(_0x5553f5,Jt),_0x979a1a=_0x2d007d[_0x432a4d(0x15e)](),_0x591b34=(_0x979a1a==null?void 0x0:_0x979a1a[_0x432a4d(0x200)])??'unknown',_0x13d693=(_0x979a1a==null?void 0x0:_0x979a1a['memberID'])??_0x432a4d(0x2e3);return{'changeset':{'unitID':_0x3ba9ff,'type':_0x242325(_0x494070[_0x432a4d(0x24d)](_0x3ba9ff)),'baseRev':_0x49a65b[_0x432a4d(0x2d5)](_0x3ba9ff),'revision':0x0,'userID':_0x591b34,'memberID':_0x13d693,'mutations':_0x297269},'pendingMutations':_0x5553f5[_0x432a4d(0x2ca)](_0x297269[_0x432a4d(0x316)])};}function $t(_0x377e3b,_0x55560a,_0x561ef6,_0x3c209d,_0x537f4a){const _0x1b1142=_0x1f5521;let _0x28f12f=_0x377e3b[_0x1b1142(0x18e)]((_0x1d2563,_0x272252)=>{const _0x4b9079=_0x1b1142;let _0x4a63ec=_0x1d2563[_0x1d2563[_0x4b9079(0x316)]-0x1],{id:_0xa8242c}=_0x4a63ec??{},{id:_0x49cd58,type:_0x210bdd}=_0x272252,_0x27c853=_0x272252[_0x4b9079(0x366)];if(_0xa8242c&&_0xa8242c!==_0x49cd58)throw Error(_0x4b9079(0x2bf)+_0xa8242c+_0x4b9079(0x386)+_0x49cd58+'.');if(!_0x4a63ec)return[{'id':_0x49cd58,'type':_0x210bdd,'params':{'unitId':_0x27c853[_0x4b9079(0x2c4)],'textRanges':_0x27c853['textRanges'],'actions':_0x27c853[_0x4b9079(0x1d6)]}}];let _0x4de8cd=_0x4a63ec[_0x4b9079(0x366)];return en(_0x4de8cd,_0x27c853)?[..._0x1d2563[_0x4b9079(0x2ca)](0x0,-0x1),{..._0x4a63ec,'id':_0x49cd58,'type':_0x210bdd,'params':{'unitId':_0x27c853[_0x4b9079(0x2c4)],'textRanges':_0x27c853[_0x4b9079(0x3da)],'actions':_0x4c7fe5['compose'](_0x4de8cd[_0x4b9079(0x1d6)],_0x27c853['actions'])}}]:[..._0x1d2563,{'id':_0x49cd58,'type':_0x210bdd,'params':{'unitId':_0x27c853[_0x4b9079(0x2c4)],'textRanges':_0x27c853[_0x4b9079(0x3da)],'actions':_0x27c853[_0x4b9079(0x1d6)]}}];},[]),_0x23078e=_0x537f4a['getCurrentUser'](),_0x3cefdd=(_0x23078e==null?void 0x0:_0x23078e[_0x1b1142(0x200)])??_0x1b1142(0x2e3),_0x563bdb=(_0x23078e==null?void 0x0:_0x23078e['memberID'])??_0x1b1142(0x2e3);return{'changeset':{'unitID':_0x55560a,'type':_0x242325(_0x561ef6['getUnitType'](_0x55560a)),'baseRev':_0x3c209d[_0x1b1142(0x2d5)](_0x55560a),'revision':0x0,'userID':_0x3cefdd,'memberID':_0x563bdb,'mutations':_0x28f12f},'pendingMutations':_0x377e3b['slice'](_0x377e3b['length'])};}function en(_0x4fc041,_0x55008a){const _0x1fa9e9=_0x1f5521;return!tn(_0x4fc041)&&!tn(_0x55008a)&&nn(_0x4fc041[_0x1fa9e9(0x1d6)],_0x55008a[_0x1fa9e9(0x1d6)]);}function tn(_0x21dc30){const _0x303394=_0x1f5521;return _0x21dc30[_0x303394(0x388)]!==void 0x0;}function nn(_0x1fe2ee,_0x105e1d){return rn(_0x1fe2ee)&&rn(_0x105e1d)&&!on(_0x1fe2ee)&&!on(_0x105e1d)&&!an(_0x1fe2ee)&&!an(_0x105e1d);}function rn(_0x2803c0){const _0x4b5821=_0x1f5521;return sn(_0x2803c0)['some'](_0x1e0618=>cn(_0x1e0618)&&_0x1e0618['et']===_0x4b5821(0x2a6));}function an(_0x40f8ba){const _0x5509d6=_0x1f5521;return sn(_0x40f8ba)[_0x5509d6(0x2ae)](_0x1f0aba=>Array[_0x5509d6(0x33b)](_0x1f0aba)||typeof _0x1f0aba==_0x5509d6(0x239)||typeof _0x1f0aba==_0x5509d6(0x193));}function on(_0xb021be){const _0x5bc41d=_0x1f5521;return sn(_0xb021be)[_0x5bc41d(0x2ae)](_0x19449c=>!cn(_0x19449c)||_0x19449c['et']!==_0x5bc41d(0x2a6)||!Array[_0x5bc41d(0x33b)](_0x19449c['e'])?!0x1:_0x19449c['e']['some'](_0xe65896=>!cn(_0xe65896)||!cn(_0xe65896['body'])?!0x1:Object['prototype']['hasOwnProperty']['call'](_0xe65896[_0x5bc41d(0x1c3)],_0x5bc41d(0x1ab))||Object[_0x5bc41d(0x155)]['hasOwnProperty'][_0x5bc41d(0x359)](_0xe65896[_0x5bc41d(0x1c3)],_0x5bc41d(0x17f))||Object['prototype'][_0x5bc41d(0x2c3)][_0x5bc41d(0x359)](_0xe65896['body'],_0x5bc41d(0x267))));}function sn(_0x475e12){const _0x21f793=_0x1f5521;if(!Array['isArray'](_0x475e12))return[];let _0xbbde9=_0x475e12['includes'](_0x21f793(0x1c3))?_0x475e12:_0x475e12['find'](_0x6281df=>Array[_0x21f793(0x33b)](_0x6281df)&&_0x6281df[_0x21f793(0x377)]('body'));if(!Array[_0x21f793(0x33b)](_0xbbde9))return[];let _0x1d1ee1=_0xbbde9[_0x21f793(0x348)](_0x21f793(0x1c3));return _0x1d1ee1===-0x1?[]:_0xbbde9[_0x21f793(0x2ca)](_0x1d1ee1+0x1);}function cn(_0x3965e7){const _0x224b5e=_0x1f5521;return typeof _0x3965e7=='object'&&!!_0x3965e7&&!Array[_0x224b5e(0x33b)](_0x3965e7);}function ln(_0x27a47b,_0x197b3b){const _0x58e8d9=_0x1f5521;let _0x43bdb9=new _0x16703b(0x1);return setTimeout(()=>_0x43bdb9[_0x58e8d9(0x1ae)](_0x197b3b),_0x27a47b),_0x43bdb9['asObservable']()[_0x58e8d9(0x220)](_0x14e08c(0x1));}var un,dn,fn;let pn=function(_0x4f250a){const _0x337f29=_0x1f5521;return _0x4f250a[_0x337f29(0x1bf)]=_0x337f29(0x336),_0x4f250a['SYNCED']=_0x337f29(0x319),_0x4f250a[_0x337f29(0x1a9)]='pending',_0x4f250a['AWAITING']='awaiting',_0x4f250a[_0x337f29(0x225)]='awaiting_with_pending',_0x4f250a[_0x337f29(0x360)]='fetch_missing',_0x4f250a[_0x337f29(0x32d)]='conflict',_0x4f250a[_0x337f29(0x32e)]=_0x337f29(0x269),_0x4f250a;}({});const mn=0x4e20,hn=0x2bf20;var G=class{constructor(_0x15b1be,_0x7421d7,_0x48fc79,_0x453cb1,_0xd6bdd,_0x105788,_0x47c74b,_0x5bea00,_0x114874){const _0x21de38=_0x1f5521;this['unitID']=_0x15b1be,this[_0x21de38(0x258)]=_0x7421d7,this[_0x21de38(0x2c7)]=_0xd6bdd,this['_commandService']=_0x105788,this[_0x21de38(0x2f9)]=_0x47c74b,this[_0x21de38(0x247)]=_0x5bea00,this[_0x21de38(0x2ab)]=_0x114874,z(this,_0x21de38(0x174),null),z(this,'_pendingMutations',[]),this[_0x21de38(0x174)]=_0x48fc79,this[_0x21de38(0x1fd)]=_0x453cb1;}[_0x1f5521(0x2b9)](_0xae0fc6){const _0x21b79e=_0x1f5521;let _0x2b457c=this['_revisionService']['getCurrentRevOfUnit'](this['unitID']);return _0xae0fc6[_0x21b79e(0x145)]>_0x2b457c+0x1?(this['_handler'][_0x21b79e(0x302)]({'from':_0x2b457c,'to':_0xae0fc6[_0x21b79e(0x145)]-0x1}),!0x0):!0x1;}[_0x1f5521(0x3c2)](_0x101faf){const _0xd8dc83=_0x1f5521;this['_undoRedoService'][_0xd8dc83(0x279)](this[_0xd8dc83(0x322)],_0x101faf);}[_0x1f5521(0x1cc)](_0x10acfe){const _0x44ea49=_0x1f5521;var _0xe0a870,_0x46acb5;(_0xe0a870=(_0x46acb5=this['_handler'])[_0x44ea49(0x339)])==null||_0xe0a870[_0x44ea49(0x359)](_0x46acb5,_0x10acfe);}['_transformIMECache'](_0x467cfb){const _0x3dfe4f=_0x1f5521;var _0x407e44,_0x488e24;return(_0x407e44=(_0x488e24=this[_0x3dfe4f(0x2c7)])[_0x3dfe4f(0x1ac)])==null?void 0x0:_0x407e44['call'](_0x488e24,_0x467cfb);}[_0x1f5521(0x2c9)](_0xe72e8c){const _0x138bdf=_0x1f5521;var _0xc03ddc,_0x4c8199;return(_0xc03ddc=(_0x4c8199=this[_0x138bdf(0x2c7)])[_0x138bdf(0x31e)])==null?void 0x0:_0xc03ddc[_0x138bdf(0x359)](_0x4c8199,_0xe72e8c);}[_0x1f5521(0x3e0)](_0x3c5401){const _0x370b82=_0x1f5521;var _0x18fcbb,_0x44350a;return((_0x18fcbb=(_0x44350a=this['_handler'])[_0x370b82(0x15b)])==null?void 0x0:_0x18fcbb[_0x370b82(0x359)](_0x44350a,_0x3c5401))??_0x3c5401;}['_transformRemoteChangesetByStateCache'](_0x194a95){const _0x4c54f0=_0x1f5521;var _0x2d5177,_0x1ea946;return((_0x2d5177=(_0x1ea946=this[_0x4c54f0(0x2c7)])[_0x4c54f0(0x236)])==null?void 0x0:_0x2d5177['call'](_0x1ea946,_0x194a95))??_0x194a95;}['_syncEditingCollabCursor'](_0x1a726e){const _0x1f0d8a=_0x1f5521;if(this[_0x1f0d8a(0x258)]===_0x4f4a88[_0x1f0d8a(0x33c)]){let {unitID:_0x3d61ee,mutations:_0x1237dc,memberID:_0x19eccf}=_0x1a726e,_0x5c9b92=_0x1237dc[_0x1f0d8a(0x316)]>0x0?_0x1237dc[0x0][_0x1f0d8a(0x366)][_0x1f0d8a(0x3da)]:[];if(Array['isArray'](_0x5c9b92)&&_0x5c9b92[_0x1f0d8a(0x316)]>0x0){var _0x9706bc,_0x4ee431;(_0x9706bc=(_0x4ee431=this[_0x1f0d8a(0x2c7)])[_0x1f0d8a(0x29b)])==null||_0x9706bc[_0x1f0d8a(0x359)](_0x4ee431,{'unitID':_0x3d61ee,'memberID':_0x19eccf,'textRanges':_0x5c9b92});}}}[_0x1f5521(0x30e)](){const _0x50f695=_0x1f5521;var _0x3d262a;(_0x3d262a=this[_0x50f695(0x2ab)])==null||_0x3d262a[_0x50f695(0x2d9)](this[_0x50f695(0x322)],this['type'],this[_0x50f695(0x174)],this['_pendingMutations']);}['_getCurrentRevision'](){const _0x571ac8=_0x1f5521;return this[_0x571ac8(0x247)][_0x571ac8(0x2d5)](this[_0x571ac8(0x322)]);}[_0x1f5521(0x2e9)](){const _0x432fe5=_0x1f5521;this[_0x432fe5(0x247)][_0x432fe5(0x292)](this[_0x432fe5(0x322)]);}[_0x1f5521(0x308)](_0x104317){const _0xd765bf=_0x1f5521;let _0x5e945f=this['_transformRemoteChangesetByIMECache'](_0x104317);_0x5e945f=this[_0xd765bf(0x29e)](_0x5e945f);let _0x239156=_0x1f41b0(_0x5e945f[_0xd765bf(0x17c)],this['_commandService'],{'fromCollab':!0x0});if(!_0x239156['result'])throw _0x239156[_0xd765bf(0x2fc)]instanceof Error?_0x239156[_0xd765bf(0x2fc)]:Error(_0x239156['error']??'[CollaborationState]:\x20apply\x20error!');this[_0xd765bf(0x241)](_0x5e945f),this[_0xd765bf(0x2c9)](_0x5e945f),this[_0xd765bf(0x3c2)](_0x104317),this['_transformSelections'](_0x5e945f),this['_syncEditingCollabCursor'](_0x5e945f),this['_incrementRevisionNumber']();}};let K=class extends G{constructor(_0x42096b,_0x5d50dc,_0x2fb83b,_0x165368,_0x4fd950,_0x52b8b2,_0x5ccbed,_0x5cda46,_0x4dfc31,_0x852496){const _0x1e9955=_0x1f5521;super(_0x42096b,_0x5d50dc,null,[],_0x2fb83b,_0x5ccbed,_0x52b8b2,_0x165368,_0x852496),this[_0x1e9955(0x391)]=_0x4fd950,this[_0x1e9955(0x2dd)]=_0x5cda46,this[_0x1e9955(0x2c5)]=_0x4dfc31,this[_0x1e9955(0x263)]=_0x852496,z(this,_0x1e9955(0x1fc),'synced');}[_0x1f5521(0x2b1)](_0xbfc6de){const _0x30a63f=_0x1f5521;let _0x1e5ab8=this[_0x30a63f(0x391)]['createInstance'](q,this[_0x30a63f(0x322)],this[_0x30a63f(0x258)],[_0xbfc6de],this[_0x30a63f(0x2c7)]);return _0x1e5ab8[_0x30a63f(0x2be)](),_0x1e5ab8['_updateLocalCache'](),_0x1e5ab8;}['onRemoteChangeset'](_0x45f96b){const _0x225db7=_0x1f5521;if(this['_checkMissing'](_0x45f96b))return this[_0x225db7(0x391)]['createInstance'](Q,this[_0x225db7(0x322)],this[_0x225db7(0x258)],null,[],null,[_0x45f96b],this[_0x225db7(0x2c7)]);try{let _0x130725=this[_0x225db7(0x2c5)]['transformMutationsWithChangeset'](_0x45f96b,[_0x6877be]);if(_0x71163b(_0x130725)){let {c1Prime:_0xa3a440}=_0x130725;return this[_0x225db7(0x308)](_0xa3a440),this;}throw _0x130725['error'];}catch(_0x54ab43){return this[_0x225db7(0x2dd)]['error'](_0x54ab43),this[_0x225db7(0x27e)](!0x1);}}[_0x1f5521(0x27e)](_0x4387b7){const _0x12ee03=_0x1f5521;return this[_0x12ee03(0x391)][_0x12ee03(0x351)](X,this[_0x12ee03(0x322)],this[_0x12ee03(0x258)],null,[],this[_0x12ee03(0x2c7)],_0x4387b7);}[_0x1f5521(0x2f5)](_0xa719ba){const _0x4d07d5=_0x1f5521;if(_0xa719ba[_0x4d07d5(0x145)]<=this['_getCurrentRevision']())return this;throw Error(_0x4d07d5(0x226));}[_0x1f5521(0x275)](){const _0x400976=_0x1f5521;throw Error(_0x400976(0x1c4));}['onRemoteRetry'](){return this;}[_0x1f5521(0x1f1)](){const _0x1b50e8=_0x1f5521;return this['_injector'][_0x1b50e8(0x351)](Z,this[_0x1b50e8(0x322)],this['type'],null,[],this[_0x1b50e8(0x2c7)]);}['toggleOnline'](){return this;}[_0x1f5521(0x3a6)](){const _0x287eb2=_0x1f5521;throw Error(_0x287eb2(0x369));}[_0x1f5521(0x28f)](){const _0x1c7ac1=_0x1f5521;let _0x1cc2cd=this['_revisionService'][_0x1c7ac1(0x2d5)](this[_0x1c7ac1(0x322)]);return this[_0x1c7ac1(0x2c7)][_0x1c7ac1(0x302)]({'from':_0x1cc2cd,'to':0x0}),this[_0x1c7ac1(0x391)][_0x1c7ac1(0x351)](Q,this[_0x1c7ac1(0x322)],this[_0x1c7ac1(0x258)],null,[],null,[],this[_0x1c7ac1(0x2c7)]);}};function _0x1cc8(){const _0x4a8ade=['_resendTimeout','removeMember','collaboration-client.auth.needGotoLoginAlert','JOIN_ROOM_PERMISSION_DENIED','pipe','requireSession','transformMutationsWithChangeset','getSnapshotAPIPath','executeCommand','AWAITING_WITH_PENDING','[SyncedState]:\x20received\x20acknowledgement.','onStateChange','_replayCachedMutations','_clearRedo','permissionRejEvent','_transitionLocked','_sendingTimer','BASE64','file','unit-cache-','HEARTBEAT','_fetchMissChangesets','status$','_initRequestHeader','getFocusedUnit','memberID','onTransformRemoteChangesetByStateCache','LIVESHARE_REQUEST_HOST','_queuedRemoteChangesets','string','HELLO','range','min','JOIN','open$','add','pluginName','_transformIMECache','m2Prime','result','findIndex','getCollabEntity','fromCollab','_revisionService','_sender','_instanceService','&to=','__splitChunk__','_localeService','getUnitType','_change$','deleteCollaborator','refreshPermission','enableOfflineEditing','toString','update','_initMergeInterceptor','_collaborationPaused','onCommentUpdate','loginUrlKey','type','/universer-api/snapshot','focused$','_clearScheduledTask','[CollaborationSocketService]:\x20failed\x20to\x20get\x20web\x20socket\x20factory!','changesets','/role','commentUpdateEvent','_onRemoteChangeset','filter','ERROR_IMAGE_TYPE','localCacheService','transformStack\x20failed!','_snapshotService','you\x20should\x20override\x20\x22IUndoRedoService\x22\x20provided\x20in\x20\x22core\x22\x20package!','blockRanges','backupOfflineData','offline','roles','loadBase','onlyLocal','code','close$','unsubscribe','_getUndoStack','[FetchMissState]','joinRsp','/universer-api/authz','snapshot','onRemoteRej','_acknowledgeAwaiting','onMutationExecutedForCollab','state$','transformUndoRedo','_stopTelemetryCollaborationNewChangeset','getActiveSheet','liveShareNewHost','leaveEvent','_onConflict','54Opgyxv','/allowed','saveSheetBlock','isPermissionRej','_lockTransition','_docStateChangeManagerService','_getCurrentRevision','LIVESHARE_FETCH_OPERATIONS','_getAPIPrefix','IDLE','packageName','session.room-permission-denied','SUBMIT_CHANGESET_TIMEOUT','_clearTimeoutTimer','_sessionChannels','constructor','fetchMiss','loadBoard','248750EwPtxh','incrementRevOfUnit','missingChangesets','routeKey','[CollaborationAttachmentIoService]:\x20failed\x20to\x20resolve\x20attachment\x20URL.','_commentUpdate$','LEAVE','createSocket','downloadEndpointUrl','_init','onSyncEditingCollabCursor','decorate','telemetry\x20info\x20is\x20not\x20initialized','_transformRemoteChangesetByStateCache','_acknowledgeAwaitingIfReady','SOCKET_FAILED_RETRY','_configService','RETRY_CONNECTING_MAX_COUNT','readAsDataURL','univer-pro.collaboration-client.single-active-unit-service','_onOffline','text-x','_unitLoaded$','COMMENT_UPDATE','_undoStacks','_exhaustRemoteChangesetQueue','_localCacheService','updateSnapshot','?size=','some','OTHER_CLIENT_EDITING','loadDoc','appendMutation','getCfgEnableObjInherit','enableAuthServer','_networkConditionService','max','[AuthServerService]:\x20you\x20should\x20provide\x20authentication\x20info\x20on\x20Node.js.','values','encode','_checkMissing','[CollaborationSocketService]:\x20failed\x20to\x20create\x20socket!','OPTIONAL','\x20in\x20_schedule.','clear','_schedule','Cannot\x20assemble\x20a\x20changeset\x20from\x20multiple\x20mutations\x20of\x20different\x20types:\x20','_throwTelemetryCollaborationNewChangeset','_createInitialStateImpl','init','hasOwnProperty','unitId','_transformService','updatePermissionObjEvent','_handler','resolve','_transformStateCache','slice','UNIVER_BOARD','data','_getSignURL','localeService','createCollaborator','socketMessageSubscription','FileId','JOIN_ROOM_FAILED','getSheetBlock','setConfig','getCurrentRevOfUnit','_collabSessionService','avatar','getImageSourceCache','updateOfflineData','closeSession','location','subscribe','_logService','has','put','_onRemoteACK','_getRedoStack','COMPRESS_MUTATION_SEND','unknown','state','_onRemoteRetry','saveImage','JOIN_ROOM_FULL','getWorkbookSelections','_incrementRevisionNumber','map','onMissedChangesetFetched','conflict','override','INGEST','authzUrl','_onRemoteRejected','roomInfos','subUnitId','transformSelections','splice','onRemoteAck','_tryReconnect','reqId','copyFileMeta','_undoRedoService','_waitCount','originalMeta','error','\x0aAfter:\x20','patch','_updateState','_onJoinRoomEvent','close','onMissingChangesets','objectID','getInterceptPoints','HEARTBEAT_INTERVAL','disableLocalCache','_telemetryService','_executeRemoteChangeset','@univerjs-pro/collaboration-client','sessionStatus$','now','loadPdf','_initDependencies','_updateLocalCache','objectType','_disableEditing','_eventService','replace','object','onRemoteRetry','_emitMembers','length','_httpService','[CollaborationSession]:\x20should\x20not\x20send\x20message\x20when\x20the\x20session\x20is\x20offline!','synced','_onFetchMissResult','getAttachmentUrl','reverse','subject','onTransformState','selections','_commandService','_unitInfo$','unitID','socket\x20open.','ERROR_IMAGE','_onRecvEvent','entityInit$','_socketMessageSubscription','collaboratorID','_univerInstanceService','fetchThroughInterceptors','readyForCollab','fromCharCode','CONFLICT','OFFLINE','_getUploadFileURL','/new_changes','method','125090CVyDSc','entries','_onConnectionOpen','_joinRoom','not_collab','UNIVER_BASE','CLOSE_ROOM','onTransformSelections','collaborators','isArray','UNIVER_DOC','ONLINE','_pendingSessions','endpointKey','/rev/','ERROR_EXCEED_SIZE','JOIN_ROOM_NOT_EXISTS','toRemote','equals','title','1.0.0-beta.1','collaboration_new_changeset','indexOf','_status$','_clearHeartbeatTimer','UNISCRIPT_RUN','_getSendChangesetTimeout','Unknown\x20type.\x20Will\x20not\x20load\x20files\x20from\x20remote\x20address.','disposeWithMe','_type','sessionStatus','createInstance','sendChangesetTimeout','_entities','LOCAL_CACHE_INTERVAL','connection\x20error','[PendingState]:\x20received\x20rejection.','Error\x20on\x20receiving\x20event','getCurrentSelections','call','debug','stopTime','waitForRoom$','This\x20method\x20should\x20not\x20be\x20called\x20on\x20the\x20client\x20side!','68268VqKcbJ','getMember','FETCH_MISS','changeset','_members','loadOfflineData','_config','POST','params','csRejEvent','USERS_ENTER','[SyncedState]:\x20invalid\x20calling\x20to\x20`resend`.','/universer-api/comb','session','_sheetTransformSelectionsService','_waitForHeartbeatResponse','UPDATE_PERMISSION_OBJ','_isPermissionRej','[CollaborationEntity]:\x20cannot\x20lock\x20transition\x20twice!\x20This\x20is\x20an\x20implementation\x20error,\x20meaning\x20you\x20transit\x20the\x20collaboration\x20state\x20again\x20in\x20the\x20process\x20of\x20a\x20previous\x20transition.\x20This\x20should\x20never\x20happen.','getMemberID','_resendTimer','SHOULD_CLOSE_CONN','_socketService','members','_startTelemetryCollaborationNewChangeset','includes','640056PKHCNH','awaitingChangeset','asObservable','defineProperty','_resolveSessionIdentity','localUnitId','FETCH_MISSING','_memberService','retryConnectingTimer','cmd','_initUnitPermissionChange','_createSession','_adapter','session.room-not-exists','\x20-\x20','LIVESHARE_TERMINATE','isCompositionEnd','url','MUTATION','_state','[CollaborationSessionService]','_doCreateSocket','/universer-api/snapshot/','getImage','_updateStatus','_injector','encodeURIComponent','_shouldReportTelemetry','[CollaborationEntity]','_rescheduleHeartbeat','_roomMembers','symbol','_createInitialState','UNIVER_SHEET','_onUserJoin','catch','/block/','_sessionStatus$','[DataLoaderService]','_event$','updateMember','_collaborationUIEventService','socket\x20close','HEARTBEAT_TIMEOUT','PSEUDO_FETCH_MISSING_RESULT','onload','resend','PERMISSION_REJ','listRoles','UPDATE_CURSOR','accept','then','_cfgEnableObjInherit','iterator','_singleActiveUnitService','PERMISSION_DENIED','collaboration-client.local-cache-service','/universer-api/uniscript','sendHeartbeatTimer','origin','getResourcesRequest','shouldCloseConn','[CollaborationUndoRedoService]','list','4679184PYwTji','UNIVER_PDF','People','send','9347490ePWwCV','saveAttachment','/universer-api/oidc/authpage','_getSocketChannel','getTime','_handlerCallback','_transformUndoredo','listCollaborators','_userManagerService','_onConnectionFailed','LIVESHARE_OPERATION','_initCloseConn','[UniverCollaborationClientPlugin]:\x20you\x20must\x20provide\x20a\x20socketService\x20implementation\x20in\x20config!','charCodeAt','getValue','sid','loadUnitOfRevision','setCfgEnableObjInherit','{fileID}','NO_OTHER_CLIENTS_EDITING','_getCtorByUniverInstanceType','[OfflineState]:\x20invalid\x20calling\x20to\x20`resend`.','_replaceFileID','_getAPIPrefixPath','parse','event$','_changesetSessionId','getUnitId','Failed\x20to\x20update\x20permission\x20point','session.room-cnt-exceeds','textRanges','_resendWithTimeout','_unlockTransition','socket$','rev','_clearLocalCache','_transformRemoteChangesetByIMECache','_entityInit$','socketService','_startCollaboration','_clearCollaborationTimeoutTimer','setWaitCount','_toggleOffline','members$','unit','revision','RECV','reject','getAllMembers','snapshotServerUrl','getOwnPropertyDescriptor','CHANGESET_SHOULD_RETRY','withCredentials','Univer','timeoutTimer','_collaborationTimeoutTimer','x-univer-host','signUrlServerUrl','_socketChannels','loadUnit','forEach','prototype','_createHandler','collabWebSocketUrl','_onMessage','_remoteChangesetQueue','_acknowledgedAwaitingRevision','onTransformRemoteChangesetByIMECache','initWorkbookPermissionChange','[FetchingMissState]:\x20received\x20stale\x20ack\x20revision:\x20','getCurrentUser','every','post','COMPRESS_MUTATION_APPLY','_collaborationSessionService','registerHTTPInterceptor','MSG_FOR_ERROR','interceptor','_sessions','function','SUBMIT_CHANGESET','_state$','&assign=','/unit/','upload','_imageSourceCache','addImageSourceCache','set','error$','_listenToNetworkCondition','retryConnectingInterval','startsWith','_awaitingChangeset','_handleRemoteChangesets','_roomCreated$','_scheduleCompleteTimestamp','?url=','_getConfig','[PendingState]:\x20unhandled\x20univer\x20type:\x20','GLOBAL_ROOMS_CNT_EXCEEDS','mutations','[OfflineState]:\x20received\x20rejection.','retryCount','columnGroups','fetch_missing','editing\x20status\x20changed\x20to','pauseCollaboration','c2Prime','_clearRetryConnectingTimer','complete','resolveUnit','_compressMutationService','failed\x20to\x20apply\x20missed\x20changesets!','_showConflictNotification','_onCombEvent','sort','updatePermissionPoint','session.join-failed','reduce','[FetchMissState]:\x20missing\x20changesets\x20response\x20still\x20has\x20revision\x20gaps.','getSheetId','append','/collaborator','number','UNIVER_SLIDE','_onLocalMutation','_redoStacks','_getDownloadEndpointURL','[serializeCombRequest]:\x20should\x20not\x20fall\x20into\x20default\x20branch!','transformChangesets','CHANGESET_ACK','&source=','\x20to\x20','[CollaborationEntity]:\x20initial\x20state\x20has\x20been\x20created\x20before.\x20You\x20should\x20not\x20call\x20\x22init\x22\x20twice.','getUnitOnRev','requestParams','/-/object/-/batch_allowed','_substituteRedoStack','1234047ttFvaH','_changesetReqId','_applyRemoteChangeset','newCsEvent','/universer-api/stream/file/upload','COLLABORATION_SESSION_TARGET_UNIT_ID_REQUIRED','baseRev','PENDING','csAckEvent','tables','onTransformIME','__Key__','next','USERS_LEAVE','/resources','eventID','attachment','resourceIDs','fetchMissingChangesets','/universer-api/file/{fileID}/sign-url','_isEchoedAwaitingChangeset','/universer-api/user/session-ticket','endpoint','COLLABORATION_ENDPOINT_INVALID','uniscriptRunEvent','[FetchingMissState]:\x20not\x20expected\x20to\x20receive\x20ack\x20when\x20`this._awaitingChangeset`\x20is\x20null!','_telemetryInfo','apply','getTypeOfUnitAdded$','NOT_COLLAB','COLLABORATION_CHANGESET_TRANSLATION_REQUIRED','socketReady','/object','body','[SyncedState]:\x20received\x20rejection.','CHANGESET_REJ','c1Prime','headers','onRemoteChangeset','maxSize','href','SNAPSHOT_URL_KEY','_transformSelections','_transformAndApplyRemoteChangeset','message$','push','_submitChangeset','getConfig','_hasSessionsForEndpoint','online$','_tryEnsureSocket','uploadFileServerUrl','actions','_substituteUndoStack','csShouldRetryEvent','_HTTPService','_decreaseWaiting','_removeRoom','capture','getCollabEntity$','_socket','getUploadOptions','\x0aCurrent:\x20','base-ui.attachment-io.service','_members$','candidateSocket','SUCCUSS','floor','unitType','ws://127.0.0.1:8000/universer-api/comb/connect','docStateChange$','JOINING','batchAllowed','PERSON','_toggleOnline','_permissionService','dispose','target','[CollaborationSessionService]:\x20socket\x20error','toggleOffline','save\x20fail\x20reason\x20is\x20','_transformStack','getUnitStatus$','onSendChangeset','saveSnapshot','endsWith','[CollaborationAttachmentIoService]:\x20failed\x20to\x20upload\x20attachment.','confirm','[CollaborationSession]','src','status','_pendingMutations','getTypeOfUnitDisposed$','NEW_CHANGESETS','userID','dispose$','[CollaborationEntity]:\x20invalid\x20state\x20transition!\x20State\x20transferred\x20from\x20is\x20not\x20the\x20current\x20state.\x0aBefore:\x20','collaboration-client.config','delete','emitEvent','_upload','setShowComponents','_onUserLeave','find','_sendHeartbeat','24ARBzvY','get','_maxTotalRetryTimeout','saveChangeset','SOCKET_FAILED','toggleOnline','OTHER_CLIENTS_EDITING','stringify','/object/','_getLoginPath','LIVESHARE_NEW_HOST','_identity','[CollaborationController]:\x20invalid\x20univer\x20type:\x20','name','_clearUndo','[OfflineState]:\x20received\x20changeset.','size'];_0x1cc8=function(){return _0x4a8ade;};return _0x1cc8();}K=H([V(0x3,_0x32c7b6(_0x21335b)),V(0x4,_0x32c7b6(_0xd2295f)),V(0x5,_0x143b1e),V(0x6,_0x24738d),V(0x7,_0x3849f9),V(0x8,_0x30bd2c),V(0x9,_0x100ce1(U))],K);let q=un=class extends G{constructor(_0x406c24,_0x36bf4a,_0x20565e,_0x184307,_0x1c31b7,_0x3102c7,_0x1a78d2,_0x7ed6b9,_0x347d43,_0x53015b,_0x66ae36,_0x19817a,_0x219994,_0x144a2c){const _0xb8ef69=_0x1f5521;super(_0x406c24,_0x36bf4a,null,_0x20565e,_0x184307,_0x347d43,_0x219994,_0x3102c7,_0x144a2c),this[_0xb8ef69(0x391)]=_0x1c31b7,this['_userManagerService']=_0x1a78d2,this[_0xb8ef69(0x2dd)]=_0x7ed6b9,this[_0xb8ef69(0x2a1)]=_0x53015b,this[_0xb8ef69(0x2c5)]=_0x66ae36,this[_0xb8ef69(0x329)]=_0x19817a,z(this,_0xb8ef69(0x1fc),'pending'),z(this,'_scheduleCompleteTimestamp',null),z(this,_0xb8ef69(0x22c),null);}[_0x1f5521(0x2b1)](_0x2106ce){const _0x5400b6=_0x1f5521;return this[_0x5400b6(0x1fd)][_0x5400b6(0x1cf)](_0x2106ce),this['_updateLocalCache'](),this;}[_0x1f5521(0x1c8)](_0x2b4b61){const _0x83950a=_0x1f5521;if(this[_0x83950a(0x2b9)](_0x2b4b61))return this[_0x83950a(0x25b)](),this[_0x83950a(0x391)][_0x83950a(0x351)](Q,this[_0x83950a(0x322)],this['type'],null,this[_0x83950a(0x1fd)],null,[_0x2b4b61],this[_0x83950a(0x2c7)]);try{let _0x44f43d=this[_0x83950a(0x2c5)]['transformMutationsWithChangeset'](_0x2b4b61,this[_0x83950a(0x1fd)]);if(_0x71163b(_0x44f43d)){let {c1Prime:_0x54a97c,m2Prime:_0x204dd4}=_0x44f43d;this['_executeRemoteChangeset'](_0x54a97c);let _0x4b266a=this[_0x83950a(0x391)][_0x83950a(0x351)](un,this[_0x83950a(0x322)],this['type'],_0x204dd4,this[_0x83950a(0x2c7)]);this[_0x83950a(0x25b)]();let _0x5c344b=new Date()['getTime'](),_0x5728b3=this[_0x83950a(0x177)]?Math[_0x83950a(0x2b5)](this[_0x83950a(0x177)]-_0x5c344b,0x0):this[_0x83950a(0x34c)]();return _0x4b266a[_0x83950a(0x2be)](_0x5728b3),_0x4b266a;}throw _0x44f43d[_0x83950a(0x2fc)];}catch(_0x3f743c){return this['_logService'][_0x83950a(0x2fc)](_0x3f743c),this[_0x83950a(0x27e)](!0x1);}}[_0x1f5521(0x2f5)](_0x270971){const _0x5664e7=_0x1f5521;if(_0x270971[_0x5664e7(0x145)]<=this[_0x5664e7(0x285)]())return this;throw Error('[PendingState]:\x20received\x20acknowledgement.');}[_0x1f5521(0x275)](){const _0x3d2eb0=_0x1f5521;throw Error(_0x3d2eb0(0x356));}['onRemoteRetry'](){return this;}[_0x1f5521(0x1f1)](){const _0x5d85f6=_0x1f5521;return this['_clearScheduledTask'](),this['_injector']['createInstance'](Z,this['unitID'],this[_0x5d85f6(0x258)],null,this[_0x5d85f6(0x1fd)],this['_handler']);}['toggleOnline'](){return this;}['_schedule'](_0x392b01){const _0x3dfe01=_0x1f5521;let _0x1392cb=_0x392b01??this[_0x3dfe01(0x34c)]();this[_0x3dfe01(0x177)]=new Date()[_0x3dfe01(0x3c0)]()+_0x1392cb,this[_0x3dfe01(0x22c)]=setTimeout(()=>{const _0x52bcaf=_0x3dfe01;this[_0x52bcaf(0x25b)]();let _0x4b460e=null;switch(this[_0x52bcaf(0x258)]){case _0x4f4a88[_0x52bcaf(0x399)]:_0x4b460e=Xt(this[_0x52bcaf(0x1fd)],this[_0x52bcaf(0x322)],this[_0x52bcaf(0x329)],this[_0x52bcaf(0x247)],this[_0x52bcaf(0x3c4)]);break;case _0x4f4a88[_0x52bcaf(0x33c)]:_0x4b460e=this[_0x52bcaf(0x1fd)][_0x52bcaf(0x15f)](_0x24280c=>_0x24280c['id']===_0x47e1e8['id'])?$t(this[_0x52bcaf(0x1fd)],this[_0x52bcaf(0x322)],this[_0x52bcaf(0x329)],this[_0x52bcaf(0x247)],this[_0x52bcaf(0x3c4)]):Xt(this[_0x52bcaf(0x1fd)],this[_0x52bcaf(0x322)],this[_0x52bcaf(0x329)],this[_0x52bcaf(0x247)],this[_0x52bcaf(0x3c4)]);break;case _0x4f4a88[_0x52bcaf(0x194)]:_0x4b460e=Qt(this[_0x52bcaf(0x1fd)],this[_0x52bcaf(0x322)],this[_0x52bcaf(0x329)],this['_revisionService'],this['_userManagerService']);break;case _0x4f4a88[_0x52bcaf(0x3b9)]:_0x4b460e=Zt(this[_0x52bcaf(0x1fd)],this['unitID'],this['_univerInstanceService'],this[_0x52bcaf(0x247)],this[_0x52bcaf(0x3c4)]);break;case _0x4f4a88[_0x52bcaf(0x2cb)]:_0x4b460e=Xt(this[_0x52bcaf(0x1fd)],this['unitID'],this[_0x52bcaf(0x329)],this[_0x52bcaf(0x247)],this[_0x52bcaf(0x3c4)]);break;case _0x4f4a88[_0x52bcaf(0x337)]:_0x4b460e=Xt(this[_0x52bcaf(0x1fd)],this[_0x52bcaf(0x322)],this['_univerInstanceService'],this[_0x52bcaf(0x247)],this['_userManagerService']);break;default:throw Error(_0x52bcaf(0x17a)+this[_0x52bcaf(0x258)]+_0x52bcaf(0x2bc));}let {changeset:_0x2fd117,pendingMutations:_0x5a2c09}=_0x4b460e;this[_0x52bcaf(0x2c7)][_0x52bcaf(0x1f5)](_0x2fd117);let _0x39701a=_0x5a2c09[_0x52bcaf(0x316)]?this[_0x52bcaf(0x391)]['createInstance'](Y,this[_0x52bcaf(0x322)],this[_0x52bcaf(0x258)],_0x2fd117,_0x5a2c09,this['_handler'],void 0x0):this[_0x52bcaf(0x391)]['createInstance'](J,this[_0x52bcaf(0x322)],this[_0x52bcaf(0x258)],_0x2fd117,this['_handler']);_0x39701a['_updateLocalCache'](),this[_0x52bcaf(0x2c7)][_0x52bcaf(0x227)](this,_0x39701a);},_0x1392cb);}['_getSendChangesetTimeout'](){const _0x43ff9c=_0x1f5521;let _0x56a703=this['_configService'][_0x43ff9c(0x1d1)](R);return(_0x56a703==null?void 0x0:_0x56a703[_0x43ff9c(0x352)])??0x7d0;}[_0x1f5521(0x3a6)](){throw Error('[PendingState]:\x20invalid\x20calling\x20to\x20`resend`.');}[_0x1f5521(0x25b)](){const _0x628072=_0x1f5521;this[_0x628072(0x22c)]!=null&&(clearTimeout(this[_0x628072(0x22c)]),this[_0x628072(0x22c)]=null);}[_0x1f5521(0x27e)](_0x2f5e9c){const _0x1b70b3=_0x1f5521;return this[_0x1b70b3(0x25b)](),this[_0x1b70b3(0x391)][_0x1b70b3(0x351)](X,this[_0x1b70b3(0x322)],this[_0x1b70b3(0x258)],null,this[_0x1b70b3(0x1fd)],this['_handler'],_0x2f5e9c);}};q=un=H([V(0x4,_0x32c7b6(_0xd2295f)),V(0x5,_0x32c7b6(_0x21335b)),V(0x6,_0x32c7b6(_0x522a20)),V(0x7,_0x3849f9),V(0x8,_0x24738d),V(0x9,_0x123a79),V(0xa,_0x30bd2c),V(0xb,_0x238a9e),V(0xc,_0x143b1e),V(0xd,_0x100ce1(U))],q);let J=dn=class extends G{constructor(_0x38fd5a,_0x270e7b,_0x237446,_0x4c907e,_0x55f58b,_0x1d655c,_0x28b821,_0x55d746,_0x52f75f,_0x41c9e9,_0x23b8f5){const _0xdea443=_0x1f5521;super(_0x38fd5a,_0x270e7b,_0x237446,[],_0x4c907e,_0x28b821,_0x41c9e9,_0x1d655c,_0x23b8f5),this[_0xdea443(0x391)]=_0x55f58b,this['_logService']=_0x55d746,this[_0xdea443(0x2c5)]=_0x52f75f,z(this,'status','awaiting'),z(this,_0xdea443(0x21c),0x0),z(this,_0xdea443(0x20d),0x0),z(this,_0xdea443(0x372),void 0x0),z(this,'_sender',void 0x0);}['appendMutation'](_0xb0bd73){const _0x3a90ff=_0x1f5521;this['_clearScheduledTask']();let _0x4ec6d9=this[_0x3a90ff(0x391)][_0x3a90ff(0x351)](Y,this[_0x3a90ff(0x322)],this[_0x3a90ff(0x258)],this['_awaitingChangeset'],[_0xb0bd73],this['_handler'],this[_0x3a90ff(0x372)]);return _0x4ec6d9[_0x3a90ff(0x30e)](),_0x4ec6d9;}[_0x1f5521(0x1c8)](_0x2e3a92){const _0x37976d=_0x1f5521;if(this[_0x37976d(0x2b9)](_0x2e3a92))return this[_0x37976d(0x25b)](),this['_injector'][_0x37976d(0x351)](Q,this[_0x37976d(0x322)],this['type'],this['_awaitingChangeset'],[],null,[_0x2e3a92],this[_0x37976d(0x2c7)]);try{let _0x1f578e=this[_0x37976d(0x2c5)][_0x37976d(0x199)]([_0x2e3a92],[this[_0x37976d(0x174)]],!0x1);if(_0x32b26c(_0x1f578e)){let {c1Prime:_0x501e59,c2Prime:_0x1b5f2b}=_0x1f578e;this[_0x37976d(0x308)](_0x501e59[0x0]),_0x1b5f2b[0x0][_0x37976d(0x1a8)]=this[_0x37976d(0x285)](),this[_0x37976d(0x25b)]();let _0x5416be=this[_0x37976d(0x391)][_0x37976d(0x351)](dn,this['unitID'],this['type'],_0x1b5f2b[0x0],this['_handler']);return _0x5416be['_updateLocalCache'](),_0x5416be;}throw _0x1f578e['error'];}catch(_0x14c96b){return this['_logService'][_0x37976d(0x2fc)](_0x14c96b),this[_0x37976d(0x27e)](!0x1);}}[_0x1f5521(0x2f5)](_0x4f38f2){const _0x828b6=_0x1f5521;this[_0x828b6(0x25b)]();let _0x55790e=this[_0x828b6(0x247)][_0x828b6(0x2d5)](this['unitID']);if(_0x4f38f2[_0x828b6(0x145)]<=_0x55790e)return this;if(this[_0x828b6(0x2b9)](_0x4f38f2))return this['_injector'][_0x828b6(0x351)](Q,this[_0x828b6(0x322)],this[_0x828b6(0x258)],this[_0x828b6(0x174)],[],_0x4f38f2[_0x828b6(0x145)],[],this[_0x828b6(0x2c7)]);this['_incrementRevisionNumber']();let _0x471000=this[_0x828b6(0x391)][_0x828b6(0x351)](K,this[_0x828b6(0x322)],this[_0x828b6(0x258)],this[_0x828b6(0x2c7)]);return _0x471000[_0x828b6(0x30e)](),_0x471000;}[_0x1f5521(0x275)](_0x1ef083){const _0xbf70b5=_0x1f5521;return this[_0xbf70b5(0x27e)](!!(_0x1ef083!=null&&_0x1ef083[_0xbf70b5(0x282)]));}[_0x1f5521(0x314)](_0x23b65c){const _0x39c5cf=_0x1f5521;return this[_0x39c5cf(0x20d)]>hn?this[_0x39c5cf(0x1f1)]():(this[_0x39c5cf(0x372)]=ln(this[_0x39c5cf(0x21c)],{'timeout':this['_resendTimeout'],'reqId':_0x23b65c[_0x39c5cf(0x2f7)]}),this[_0x39c5cf(0x248)]=this['_resendTimer'][_0x39c5cf(0x2dc)](({reqId:_0x327828,timeout:_0x1363f1})=>{this['_resendWithTimeout'](_0x327828,_0x1363f1);}),this);}[_0x1f5521(0x1f1)](){const _0x593360=_0x1f5521;return this[_0x593360(0x25b)](),this['_injector']['createInstance'](Z,this[_0x593360(0x322)],this[_0x593360(0x258)],this[_0x593360(0x174)],[],this[_0x593360(0x2c7)]);}[_0x1f5521(0x210)](){return this;}[_0x1f5521(0x3a6)](){const _0x214c19=_0x1f5521;this[_0x214c19(0x2c7)]['onSendChangeset'](this[_0x214c19(0x174)]);}[_0x1f5521(0x27e)](_0x10af3d){const _0xc99033=_0x1f5521;return this['_clearScheduledTask'](),this[_0xc99033(0x391)]['createInstance'](X,this['unitID'],this[_0xc99033(0x258)],this[_0xc99033(0x174)],[],this[_0xc99033(0x2c7)],_0x10af3d);}[_0x1f5521(0x3db)](_0x13ef5b,_0x12729a){const _0xe7380b=_0x1f5521;var _0x37738d;_0x13ef5b===((_0x37738d=this['_awaitingChangeset'])==null?void 0x0:_0x37738d[_0xe7380b(0x2f7)])&&(this[_0xe7380b(0x3a6)](),this['_resendTimeout']=_0x12729a===0x0?0x3e8:Math[_0xe7380b(0x23c)](_0x12729a*0x2,mn),this[_0xe7380b(0x20d)]+=this[_0xe7380b(0x21c)]);}[_0x1f5521(0x25b)](){const _0x27888a=_0x1f5521;var _0x13fff5;(_0x13fff5=this[_0x27888a(0x248)])==null||_0x13fff5['unsubscribe'](),this[_0x27888a(0x21c)]=0x0,this[_0x27888a(0x20d)]=0x0;}};J=dn=H([V(0x4,_0x32c7b6(_0xd2295f)),V(0x5,_0x32c7b6(_0x21335b)),V(0x6,_0x24738d),V(0x7,_0x3849f9),V(0x8,_0x30bd2c),V(0x9,_0x143b1e),V(0xa,_0x100ce1(U))],J);let Y=fn=class extends G{constructor(_0x174e55,_0x381d6a,_0x159225,_0x592f52,_0x5b7383,_0x3f904b,_0x186c5b,_0x39689a,_0x5e2489,_0x4d42bc,_0xfb6220,_0x1d992b,_0x54b24e){const _0x5d090e=_0x1f5521;super(_0x174e55,_0x381d6a,_0x159225,_0x592f52,_0x5b7383,_0x5e2489,_0x1d992b,_0x39689a,_0x54b24e),this[_0x5d090e(0x391)]=_0x186c5b,this[_0x5d090e(0x2dd)]=_0x4d42bc,this['_transformService']=_0xfb6220,this['localCacheService']=_0x54b24e,z(this,_0x5d090e(0x1fc),'awaiting_with_pending'),z(this,'_resendTimeout',0x0),z(this,_0x5d090e(0x20d),0x0),z(this,_0x5d090e(0x372),void 0x0),z(this,'_sender',void 0x0),_0x3f904b&&(this[_0x5d090e(0x372)]=_0x3f904b,this['_sender']=this['_resendTimer'][_0x5d090e(0x2dc)](({reqId:_0x2be6dc,timeout:_0x1cae8c})=>{const _0x6c530c=_0x5d090e;this[_0x6c530c(0x3db)](_0x2be6dc,_0x1cae8c);}));}[_0x1f5521(0x2b1)](_0x2a0950){const _0x20eede=_0x1f5521;return this['_pendingMutations'][_0x20eede(0x1cf)](_0x2a0950),this;}[_0x1f5521(0x1c8)](_0x53dcc4){const _0x2d8ff5=_0x1f5521;if(this[_0x2d8ff5(0x2b9)](_0x53dcc4))return this[_0x2d8ff5(0x25b)](),this['_injector']['createInstance'](Q,this[_0x2d8ff5(0x322)],this[_0x2d8ff5(0x258)],this[_0x2d8ff5(0x174)],this['_pendingMutations'],null,[_0x53dcc4],this['_handler']);try{let _0xe507a0=this[_0x2d8ff5(0x2c5)][_0x2d8ff5(0x199)]([_0x53dcc4],[this[_0x2d8ff5(0x174)]],!0x1);if(_0x32b26c(_0xe507a0)){let {c1Prime:_0x39ee9c,c2Prime:_0x378149}=_0xe507a0,_0x21728f=this['_transformService'][_0x2d8ff5(0x222)](_0x39ee9c[0x0],this[_0x2d8ff5(0x1fd)]);if(_0x71163b(_0x21728f)){let {c1Prime:_0x3262a1,m2Prime:_0x313590}=_0x21728f;return this['_executeRemoteChangeset'](_0x3262a1),_0x378149[0x0]['baseRev']=this[_0x2d8ff5(0x285)](),this['_clearScheduledTask'](),this['_injector'][_0x2d8ff5(0x351)](fn,this[_0x2d8ff5(0x322)],this[_0x2d8ff5(0x258)],_0x378149[0x0],_0x313590,this[_0x2d8ff5(0x2c7)],void 0x0);}throw _0x21728f['error'];}throw _0xe507a0['error'];}catch(_0x2f0038){return this[_0x2d8ff5(0x2dd)][_0x2d8ff5(0x2fc)](_0x2f0038),this[_0x2d8ff5(0x27e)](!0x1);}}[_0x1f5521(0x2f5)](_0x3abe06){const _0x2b009d=_0x1f5521;this[_0x2b009d(0x25b)]();let _0x169b82=this[_0x2b009d(0x285)]();if(_0x3abe06['revision']<=_0x169b82)return this;if(this[_0x2b009d(0x2b9)](_0x3abe06))return this['_injector'][_0x2b009d(0x351)](Q,this['unitID'],this['type'],this[_0x2b009d(0x174)],this[_0x2b009d(0x1fd)],_0x3abe06['revision'],[],this[_0x2b009d(0x2c7)]);this['_incrementRevisionNumber']();let _0x206047=this['_injector'][_0x2b009d(0x351)](q,this[_0x2b009d(0x322)],this[_0x2b009d(0x258)],this['_pendingMutations'],this[_0x2b009d(0x2c7)]);return _0x206047['_schedule'](),_0x206047['_updateLocalCache'](),_0x206047;}[_0x1f5521(0x275)](_0x4e37a1){const _0x3b0baa=_0x1f5521;return this[_0x3b0baa(0x27e)](!!(_0x4e37a1!=null&&_0x4e37a1[_0x3b0baa(0x282)]));}['onRemoteRetry'](_0x4e44c3){const _0x6a917b=_0x1f5521;return this['_maxTotalRetryTimeout']>hn?this['toggleOffline']():(this[_0x6a917b(0x372)]=ln(this['_resendTimeout'],{'timeout':this['_resendTimeout'],'reqId':_0x4e44c3[_0x6a917b(0x2f7)]}),this[_0x6a917b(0x248)]=this['_resendTimer'][_0x6a917b(0x2dc)](({reqId:_0x31f83f,timeout:_0x3706bb})=>{this['_resendWithTimeout'](_0x31f83f,_0x3706bb);}),this);}[_0x1f5521(0x1f1)](){const _0x4cd26c=_0x1f5521;return this[_0x4cd26c(0x25b)](),this[_0x4cd26c(0x391)][_0x4cd26c(0x351)](Z,this[_0x4cd26c(0x322)],this[_0x4cd26c(0x258)],this[_0x4cd26c(0x174)],this[_0x4cd26c(0x1fd)],this[_0x4cd26c(0x2c7)]);}['toggleOnline'](){return this;}['resend'](){const _0x1afed4=_0x1f5521;this['_handler'][_0x1afed4(0x1f5)](this[_0x1afed4(0x174)]);}['_onConflict'](_0x57e6ba){const _0x31d1fc=_0x1f5521;return this['_clearScheduledTask'](),this[_0x31d1fc(0x391)][_0x31d1fc(0x351)](X,this['unitID'],this['type'],null,this[_0x31d1fc(0x1fd)],this['_handler'],_0x57e6ba);}[_0x1f5521(0x3db)](_0x23c5d3,_0x3be7aa){const _0x4fb8b7=_0x1f5521;var _0x4264ba;_0x23c5d3===((_0x4264ba=this[_0x4fb8b7(0x174)])==null?void 0x0:_0x4264ba[_0x4fb8b7(0x2f7)])&&(this[_0x4fb8b7(0x3a6)](),this[_0x4fb8b7(0x21c)]=_0x3be7aa===0x0?0x3e8:Math[_0x4fb8b7(0x23c)](_0x3be7aa*0x2,mn),this[_0x4fb8b7(0x20d)]+=this[_0x4fb8b7(0x21c)]);}[_0x1f5521(0x25b)](){const _0x5d91d1=_0x1f5521;var _0xb828ba;(_0xb828ba=this[_0x5d91d1(0x248)])==null||_0xb828ba['unsubscribe'](),this[_0x5d91d1(0x21c)]=0x0,this[_0x5d91d1(0x20d)]=0x0;}};Y=fn=H([V(0x6,_0x32c7b6(_0xd2295f)),V(0x7,_0x32c7b6(_0x21335b)),V(0x8,_0x24738d),V(0x9,_0x3849f9),V(0xa,_0x30bd2c),V(0xb,_0x143b1e),V(0xc,_0x100ce1(U))],Y);let X=class extends G{constructor(_0x114d8a,_0x37d48a,_0x1ea857,_0x7eb290,_0x2808af,_0x348bc3=!0x1,_0x316b4f,_0x3b7b55,_0x28f17c,_0x2f4d48,_0x5e6ced,_0x9dfdd5,_0x529ee0){const _0x2ca5c4=_0x1f5521;super(_0x114d8a,_0x37d48a,_0x1ea857,_0x7eb290,_0x2808af,_0x3b7b55,_0x28f17c,_0x2f4d48,_0x529ee0),this[_0x2ca5c4(0x36f)]=_0x348bc3,this['_permissionService']=_0x316b4f,this[_0x2ca5c4(0x24c)]=_0x5e6ced,this[_0x2ca5c4(0x3a1)]=_0x9dfdd5,this['localCacheService']=_0x529ee0,z(this,_0x2ca5c4(0x1fc),_0x2ca5c4(0x2ec)),this[_0x2ca5c4(0x189)](),this[_0x2ca5c4(0x3df)](),this[_0x2ca5c4(0x310)]();}[_0x1f5521(0x2b1)](){return this;}[_0x1f5521(0x1c8)](){return this;}[_0x1f5521(0x2f5)](){return this;}[_0x1f5521(0x275)](){return this;}['onRemoteRetry'](){return this;}[_0x1f5521(0x1f1)](){return this;}['toggleOnline'](){return this;}[_0x1f5521(0x3a6)](){throw Error('[ConflictState]:\x20invalid\x20calling\x20to\x20`resend`.');}['_clearLocalCache'](){const _0x436d98=_0x1f5521;var _0x563edb,_0x4d3996,_0x19843d;(_0x563edb=this[_0x436d98(0x2ab)])==null||(_0x4d3996=_0x563edb[_0x436d98(0x268)])==null||(_0x4d3996=_0x4d3996[_0x436d98(0x359)](_0x563edb,this['unitID'],_0x436d98(0x2ec)))==null||_0x4d3996[_0x436d98(0x39b)](()=>void 0x0),(_0x19843d=this[_0x436d98(0x2ab)])==null||_0x19843d['updateOfflineData'](this[_0x436d98(0x322)],this[_0x436d98(0x258)],null,[]);}[_0x1f5521(0x189)](){const _0x393a50=_0x1f5521;this[_0x393a50(0x36f)]?this[_0x393a50(0x3a1)][_0x393a50(0x205)]({'id':_0x393a50(0x3af)}):this[_0x393a50(0x3a1)]['emitEvent']({'id':'CONFLICT'});}[_0x1f5521(0x310)](){const _0x92ede7=_0x1f5521;this[_0x92ede7(0x1ed)][_0x92ede7(0x18c)](new _0x57781e(this[_0x92ede7(0x322)])['id'],!0x1);}};X=H([V(0x6,_0x32c7b6(_0x51823a)),V(0x7,_0x24738d),V(0x8,_0x143b1e),V(0x9,_0x32c7b6(_0x21335b)),V(0xa,_0x32c7b6(_0xed8942)),V(0xb,_0x32c7b6(B)),V(0xc,_0x100ce1(U))],X);let Z=class extends G{constructor(_0x1c03b3,_0xe420c5,_0x5719c4,_0x2aeb35,_0x389917,_0x37c193,_0x339046,_0x8c7212,_0x28f175,_0x78865b){const _0x2d618b=_0x1f5521;super(_0x1c03b3,_0xe420c5,_0x5719c4,_0x2aeb35,_0x389917,_0x8c7212,_0x28f175,_0x339046,_0x78865b),this[_0x2d618b(0x391)]=_0x37c193,z(this,_0x2d618b(0x1fc),_0x2d618b(0x269));}[_0x1f5521(0x2b1)](_0x1d2d74){const _0x35bd7b=_0x1f5521;return this[_0x35bd7b(0x1fd)][_0x35bd7b(0x1cf)](_0x1d2d74),this['_updateLocalCache'](),this;}['onRemoteChangeset'](_0xdf37b7){const _0x86af44=_0x1f5521;throw Error(_0x86af44(0x21a));}[_0x1f5521(0x2f5)](){throw Error('[OfflineState]:\x20received\x20acknowledgement.');}[_0x1f5521(0x275)](){const _0x2a095c=_0x1f5521;throw Error(_0x2a095c(0x17d));}[_0x1f5521(0x314)](){return this;}['toggleOffline'](){return this;}[_0x1f5521(0x210)](){const _0x2835cc=_0x1f5521;let {_injector:_0x3a36c1,_pendingMutations:_0x43c80f,_awaitingChangeset:_0x46d065,unitID:_0x5440a3,_handler:_0x1a450a,type:_0x4423f5}=this,_0x54ea1d=gn(_0x3a36c1,_0x5440a3,_0x4423f5,_0x46d065,_0x43c80f,_0x1a450a);return _0x54ea1d instanceof q?_0x54ea1d[_0x2835cc(0x2be)]():(_0x54ea1d instanceof Y||_0x54ea1d instanceof J)&&_0x54ea1d['resend'](),_0x54ea1d;}[_0x1f5521(0x3a6)](){const _0x1e1b9b=_0x1f5521;throw Error(_0x1e1b9b(0x3d1));}};Z=H([V(0x5,_0x32c7b6(_0xd2295f)),V(0x6,_0x32c7b6(_0x21335b)),V(0x7,_0x24738d),V(0x8,_0x143b1e),V(0x9,_0x100ce1(U))],Z);let Q=class extends G{constructor(_0x94f7a1,_0x336b94,_0x5b0b30,_0x59b50d,_0x378fe7,_0x4fe006,_0x344781,_0x1aa62c,_0x544728,_0x21f295,_0x374e16,_0x5dd30d,_0x2dac2d,_0x1317f0){const _0x2fff32=_0x1f5521;super(_0x94f7a1,_0x336b94,_0x5b0b30,_0x59b50d,_0x344781,_0x374e16,_0x5dd30d,_0x544728,_0x1317f0),this[_0x2fff32(0x15a)]=_0x378fe7,this[_0x2fff32(0x238)]=_0x4fe006,this['_injector']=_0x1aa62c,this[_0x2fff32(0x2dd)]=_0x21f295,this['_transformService']=_0x2dac2d,this[_0x2fff32(0x263)]=_0x1317f0,z(this,_0x2fff32(0x1fc),_0x2fff32(0x180));}[_0x1f5521(0x2eb)](_0x25cbf0){const _0x513ae8=_0x1f5521;try{if(this[_0x513ae8(0x175)](_0x25cbf0)[_0x513ae8(0x293)])throw Error(_0x513ae8(0x18f));if(this[_0x513ae8(0x175)]([...this[_0x513ae8(0x238)]][_0x513ae8(0x18b)]((_0x4ca36a,_0x33b843)=>_0x4ca36a[_0x513ae8(0x145)]-_0x33b843[_0x513ae8(0x145)]))[_0x513ae8(0x293)])return this[_0x513ae8(0x238)]=[],this['_updateLocalCache'](),this[_0x513ae8(0x2c7)][_0x513ae8(0x302)]({'from':this['_getCurrentRevision'](),'to':0x0}),this;let _0x4fd90a=this['_awaitingChangeset'],_0x23c900=this[_0x513ae8(0x1fd)],_0x27118d;if(_0x4fd90a&&_0x23c900[_0x513ae8(0x316)]!==0x0)_0x27118d=this[_0x513ae8(0x391)][_0x513ae8(0x351)](Y,this['unitID'],this[_0x513ae8(0x258)],_0x4fd90a,_0x23c900,this[_0x513ae8(0x2c7)],void 0x0);else{if(_0x4fd90a&&_0x23c900[_0x513ae8(0x316)]===0x0)_0x4fd90a[_0x513ae8(0x1a8)]=this[_0x513ae8(0x285)](),_0x27118d=this[_0x513ae8(0x391)][_0x513ae8(0x351)](J,this[_0x513ae8(0x322)],this[_0x513ae8(0x258)],_0x4fd90a,this[_0x513ae8(0x2c7)]);else{if(_0x23c900[_0x513ae8(0x316)]!==0x0){let _0x48f1cb=this[_0x513ae8(0x391)][_0x513ae8(0x351)](q,this[_0x513ae8(0x322)],this[_0x513ae8(0x258)],_0x23c900,this[_0x513ae8(0x2c7)]);_0x48f1cb[_0x513ae8(0x2be)](),_0x27118d=_0x48f1cb;}else _0x27118d=this[_0x513ae8(0x391)][_0x513ae8(0x351)](K,this[_0x513ae8(0x322)],this[_0x513ae8(0x258)],this[_0x513ae8(0x2c7)]);}}return _0x27118d['_updateLocalCache'](),_0x27118d;}catch(_0x2a7e36){return this[_0x513ae8(0x2dd)][_0x513ae8(0x2fc)](_0x513ae8(0x271),_0x513ae8(0x188),_0x2a7e36),this[_0x513ae8(0x391)][_0x513ae8(0x351)](X,this[_0x513ae8(0x322)],this['type'],this[_0x513ae8(0x174)],this['_pendingMutations'],this[_0x513ae8(0x2c7)],!0x1);}}[_0x1f5521(0x175)](_0x4c3738){const _0x473013=_0x1f5521;this[_0x473013(0x29f)]();for(let _0x4759e4=0x0;_0x4759e4<_0x4c3738[_0x473013(0x316)];_0x4759e4++){let _0x35c9e4=_0x4c3738[_0x4759e4],_0xb04f3b=this[_0x473013(0x285)]();if(!(_0x35c9e4[_0x473013(0x145)]<=_0xb04f3b)){if(_0x35c9e4[_0x473013(0x145)]>_0xb04f3b+0x1)return{'missingChangesets':!0x0};if(this[_0x473013(0x1b6)](_0x35c9e4)){this[_0x473013(0x276)]();continue;}this[_0x473013(0x1cd)](_0x35c9e4),this[_0x473013(0x29f)]();}}return{'missingChangesets':!0x1};}['_transformAndApplyRemoteChangeset'](_0x5ae17e){const _0x56e04c=_0x1f5521;let _0x2f96a2=_0x5ae17e,_0x100ff9=this['_awaitingChangeset'];if(_0x100ff9){let _0x3328f9=this[_0x56e04c(0x2c5)][_0x56e04c(0x199)]([_0x5ae17e],[_0x100ff9],!0x1);if(!_0x32b26c(_0x3328f9))throw _0x3328f9[_0x56e04c(0x2fc)];_0x2f96a2=_0x3328f9[_0x56e04c(0x1c6)][0x0],_0x100ff9=_0x3328f9[_0x56e04c(0x183)][0x0];}let _0x3416e0=this[_0x56e04c(0x1fd)];if(_0x3416e0[_0x56e04c(0x316)]){let _0x453211=this[_0x56e04c(0x2c5)]['transformMutationsWithChangeset'](_0x2f96a2,_0x3416e0);if(!_0x71163b(_0x453211))throw _0x453211[_0x56e04c(0x2fc)];_0x2f96a2=_0x453211[_0x56e04c(0x1c6)],_0x3416e0=_0x453211[_0x56e04c(0x242)];}this[_0x56e04c(0x308)](_0x2f96a2),_0x100ff9&&(_0x100ff9[_0x56e04c(0x1a8)]=this['_getCurrentRevision']()),this['_awaitingChangeset']=_0x100ff9,this[_0x56e04c(0x1fd)]=_0x3416e0;}['_acknowledgeAwaitingIfReady'](){const _0xe2f71e=_0x1f5521;if(!this['_awaitingChangeset']||this[_0xe2f71e(0x15a)]==null)return;let _0x27bf82=this['_getCurrentRevision']();if(this['_acknowledgedAwaitingRevision']<=_0x27bf82)throw Error(_0xe2f71e(0x15d)+this[_0xe2f71e(0x15a)]+'.');this['_acknowledgedAwaitingRevision']===_0x27bf82+0x1&&this[_0xe2f71e(0x276)]();}['_acknowledgeAwaiting'](){const _0x3ccad5=_0x1f5521;this[_0x3ccad5(0x2e9)](),this[_0x3ccad5(0x174)]=null,this[_0x3ccad5(0x15a)]=null;}[_0x1f5521(0x1b6)](_0x356fb0){const _0x22b263=_0x1f5521;let _0x54dd31=this['_awaitingChangeset'];return!_0x54dd31||!_0x54dd31['sid']||_0x54dd31['reqId']===null||_0x54dd31['reqId']===void 0x0?!0x1:_0x356fb0[_0x22b263(0x322)]===_0x54dd31[_0x22b263(0x322)]&&_0x356fb0[_0x22b263(0x3cb)]===_0x54dd31[_0x22b263(0x3cb)]&&_0x356fb0[_0x22b263(0x2f7)]===_0x54dd31[_0x22b263(0x2f7)];}[_0x1f5521(0x3a6)](){throw Error('[FetchingMissState]:\x20invalid\x20calling\x20to\x20`resend`.');}[_0x1f5521(0x2b1)](_0x194071){const _0x5ca2b8=_0x1f5521;return this['_pendingMutations'][_0x5ca2b8(0x1cf)](_0x194071),this;}[_0x1f5521(0x1c8)](_0x312574){const _0x5dbae8=_0x1f5521;return this['_queuedRemoteChangesets'][_0x5dbae8(0x1cf)](_0x312574),this;}['onRemoteAck'](_0x971d55){const _0x2d0585=_0x1f5521;if(this[_0x2d0585(0x174)]){let _0x264f98=this[_0x2d0585(0x285)]();return _0x971d55[_0x2d0585(0x145)]<=_0x264f98||(_0x264f98+0x1===_0x971d55[_0x2d0585(0x145)]?(this[_0x2d0585(0x2e9)](),this[_0x2d0585(0x174)]=null,this[_0x2d0585(0x15a)]=null):this[_0x2d0585(0x15a)]=_0x971d55[_0x2d0585(0x145)]),this;}if(_0x971d55[_0x2d0585(0x145)]<=this[_0x2d0585(0x285)]())return this;throw Error(_0x2d0585(0x1bb));}[_0x1f5521(0x275)](_0x176b3d){const _0x38e28d=_0x1f5521;return this[_0x38e28d(0x27e)](!!(_0x176b3d!=null&&_0x176b3d[_0x38e28d(0x282)]));}['onRemoteRetry'](){return this;}[_0x1f5521(0x1f1)](){const _0x217551=_0x1f5521;return this[_0x217551(0x391)]['createInstance'](Z,this[_0x217551(0x322)],this['type'],this[_0x217551(0x174)],this[_0x217551(0x1fd)],this[_0x217551(0x2c7)]);}[_0x1f5521(0x210)](){return this;}[_0x1f5521(0x27e)](_0x52d654){const _0x496b0a=_0x1f5521;return this[_0x496b0a(0x391)]['createInstance'](X,this[_0x496b0a(0x322)],this[_0x496b0a(0x258)],this['_awaitingChangeset'],this[_0x496b0a(0x1fd)],this[_0x496b0a(0x2c7)],_0x52d654);}};Q=H([V(0x7,_0x32c7b6(_0xd2295f)),V(0x8,_0x32c7b6(_0x21335b)),V(0x9,_0x3849f9),V(0xa,_0x24738d),V(0xb,_0x143b1e),V(0xc,_0x30bd2c),V(0xd,_0x100ce1(U))],Q);function gn(_0x55e892,_0x45ba61,_0x5b368a,_0x15da9a,_0x21cd02,_0x51e18d){const _0x34bb03=_0x1f5521;return _0x15da9a&&_0x21cd02[_0x34bb03(0x316)]?_0x55e892['createInstance'](Y,_0x45ba61,_0x5b368a,_0x15da9a,_0x21cd02,_0x51e18d,void 0x0):_0x15da9a?_0x55e892[_0x34bb03(0x351)](J,_0x45ba61,_0x5b368a,_0x15da9a,_0x51e18d):_0x21cd02['length']?_0x55e892[_0x34bb03(0x351)](q,_0x45ba61,_0x5b368a,_0x21cd02,_0x51e18d):_0x55e892[_0x34bb03(0x351)](K,_0x45ba61,_0x5b368a,_0x51e18d);}let $=class extends _0x2fb3e4{get[_0x1f5521(0x2e4)](){const _0x236f2f=_0x1f5521;return this[_0x236f2f(0x38b)];}constructor(_0x15259a,_0xaa74ca,_0x362943,_0x427c86,_0x58dc6f,_0x22891b,_0x1762a3,_0x39294f,_0x209572,_0x17e9db,_0x56d45b,_0x5e1c35,_0x1a2969,_0x2fe06f){const _0x5598e7=_0x1f5521;super(),this[_0x5598e7(0x322)]=_0x15259a,this[_0x5598e7(0x36b)]=_0xaa74ca,this[_0x5598e7(0x34f)]=_0x362943,this[_0x5598e7(0x391)]=_0x427c86,this['_compressMutationService']=_0x58dc6f,this['_localeService']=_0x22891b,this['_revisionService']=_0x1762a3,this[_0x5598e7(0x311)]=_0x39294f,this[_0x5598e7(0x329)]=_0x209572,this[_0x5598e7(0x2dd)]=_0x17e9db,this[_0x5598e7(0x320)]=_0x56d45b,this[_0x5598e7(0x1ed)]=_0x5e1c35,this[_0x5598e7(0x3ae)]=_0x1a2969,this[_0x5598e7(0x2ab)]=_0x2fe06f,z(this,_0x5598e7(0x169),new _0x21afa9(null)),z(this,_0x5598e7(0x278),this[_0x5598e7(0x169)][_0x5598e7(0x37a)]()),z(this,'_state',void 0x0),z(this,_0x5598e7(0x255),!0x1),z(this,_0x5598e7(0x3d6),''),z(this,_0x5598e7(0x1a3),0x0),z(this,_0x5598e7(0x232),this['state$'][_0x5598e7(0x220)](_0x185b9d(_0x262dbd=>_0x262dbd?_0x262dbd['status']:_0x5598e7(0x269)),_0x4f20dd({'bufferSize':0x1,'refCount':!0x0}))),z(this,_0x5598e7(0x22b),!0x1),z(this,_0x5598e7(0x159),[]);}async[_0x1f5521(0x2c2)](){const _0xcfdfc4=_0x1f5521;if(this[_0xcfdfc4(0x2e4)])throw Error(_0xcfdfc4(0x19d));await this['_init']();}[_0x1f5521(0x182)](){const _0x16f692=_0x1f5521;return this[_0x16f692(0x255)]=!0x0,_0x1e0938(()=>{const _0x345ac5=_0x16f692;this[_0x345ac5(0x255)]=!0x1,this[_0x345ac5(0x2aa)]();});}['onLocalMutation'](_0x33e752){this['_onLocalMutation'](_0x33e752);}['_updateState'](_0x21f190){const _0x808a03=_0x1f5521;this[_0x808a03(0x38b)]=_0x21f190,this[_0x808a03(0x169)][_0x808a03(0x1ae)](_0x21f190);}async['_init'](){const _0x829c8=_0x1f5521;if(this[_0x829c8(0x2ff)](await this['_createInitialState']()),this[_0x829c8(0x3ae)]){var _0x55cb6f;(_0x55cb6f=this[_0x829c8(0x3ae)])==null||_0x55cb6f['editingUnit'](this[_0x829c8(0x322)]),this[_0x829c8(0x34e)](this[_0x829c8(0x3ae)][_0x829c8(0x1f4)](this['unitID'])[_0x829c8(0x2dc)](_0x4820da=>{const _0x3c3ad1=_0x829c8;this[_0x3c3ad1(0x2dd)]['debug'](_0x3c3ad1(0x394),_0x3c3ad1(0x181),_0x4820da),_0x4820da===0x1?(this[_0x3c3ad1(0x311)][_0x3c3ad1(0x205)]({'id':_0x3c3ad1(0x2af)}),this[_0x3c3ad1(0x1ed)][_0x3c3ad1(0x18c)](new _0x57781e(this[_0x3c3ad1(0x322)])['id'],!0x1),this[_0x3c3ad1(0x1ed)][_0x3c3ad1(0x207)](!0x1)):(this[_0x3c3ad1(0x1ed)][_0x3c3ad1(0x18c)](new _0x57781e(this[_0x3c3ad1(0x322)])['id'],!0x0),this[_0x3c3ad1(0x1ed)][_0x3c3ad1(0x207)](!0x0));}));}let _0x10ef51=!0x1;return this[_0x829c8(0x34e)](this[_0x829c8(0x36b)][_0x829c8(0x30a)][_0x829c8(0x2dc)](_0x4ce756=>{const _0x4c3359=_0x829c8;_0x4ce756===0x3?this[_0x4c3359(0x1ec)](_0x10ef51):_0x4ce756===0x2&&(_0x10ef51=!0x0,this[_0x4c3359(0x142)]());})),this['disposeWithMe'](this[_0x829c8(0x36b)][_0x829c8(0x3d5)][_0x829c8(0x2dc)](_0x462695=>{const _0x4a42fb=_0x829c8;try{switch(_0x462695[_0x4a42fb(0x1b1)]){case _0x28cc07[_0x4a42fb(0x1ff)]:this[_0x4a42fb(0x260)](_0x50c9bb(_0x462695['data']));break;case _0x28cc07[_0x4a42fb(0x19a)]:this[_0x4a42fb(0x2e0)](_0x462695[_0x4a42fb(0x2cc)]);break;case _0x28cc07[_0x4a42fb(0x1c5)]:this[_0x4a42fb(0x2f0)]();break;case _0x28cc07[_0x4a42fb(0x14b)]:this[_0x4a42fb(0x2e5)](_0x462695[_0x4a42fb(0x2cc)]);break;case _0x28cc07['PSEUDO_FETCH_MISSING_RESULT']:this['_onFetchMissResult'](_0x462695[_0x4a42fb(0x2cc)][_0x4a42fb(0x25d)][_0x4a42fb(0x2ea)](_0x32c1f2=>_0x50c9bb(_0x32c1f2)));break;case _0x28cc07[_0x4a42fb(0x3a7)]:this[_0x4a42fb(0x2f0)]({'isPermissionRej':!0x0});break;case _0x28cc07[_0x4a42fb(0x34b)]:break;}}catch(_0x42adb5){throw console[_0x4a42fb(0x2fc)](_0x4a42fb(0x357),_0x42adb5),_0x42adb5;}})),this[_0x829c8(0x38b)];}['_unlockTransition'](){const _0x4a2d8e=_0x1f5521;this[_0x4a2d8e(0x22b)]=!0x1;}[_0x1f5521(0x283)](){const _0x4f4d1b=_0x1f5521;if(this[_0x4f4d1b(0x22b)])throw Error(_0x4f4d1b(0x370));this[_0x4f4d1b(0x22b)]=!0x0;}[_0x1f5521(0x195)](_0xf2461a){const _0x2a117b=_0x1f5521;this[_0x2a117b(0x283)](),this[_0x2a117b(0x2ff)](this['_state'][_0x2a117b(0x2b1)](_0xf2461a)),this['_unlockTransition']();}['_onRemoteChangeset'](_0x43732c){const _0x16481d=_0x1f5521;if(!(_0x43732c[_0x16481d(0x145)]<=this[_0x16481d(0x247)]['getCurrentRevOfUnit'](this[_0x16481d(0x322)]))){if(this[_0x16481d(0x255)]){this[_0x16481d(0x159)][_0x16481d(0x1cf)](_0x43732c);return;}this[_0x16481d(0x1a4)](_0x43732c);}}[_0x1f5521(0x2aa)](){const _0x1eb10d=_0x1f5521;this[_0x1eb10d(0x159)]['forEach'](_0x2b8d60=>this[_0x1eb10d(0x1a4)](_0x2b8d60)),this[_0x1eb10d(0x159)]=[];}[_0x1f5521(0x1a4)](_0x4a3ec5){const _0x32f66a=_0x1f5521;let _0x2382ef=this[_0x32f66a(0x187)][_0x32f66a(0x165)][_0x32f66a(0x32a)](this[_0x32f66a(0x187)][_0x32f66a(0x165)][_0x32f66a(0x304)]()['COMPRESS_MUTATION_APPLY'])(_0x4a3ec5[_0x32f66a(0x17c)],null)||_0x4a3ec5[_0x32f66a(0x17c)],_0x57f138={..._0x4a3ec5,'mutations':_0x2382ef};this[_0x32f66a(0x283)](),this['_updateState'](this[_0x32f66a(0x38b)]['onRemoteChangeset'](_0x57f138)),this[_0x32f66a(0x3dc)]();}['_onRemoteACK'](_0x6ed843){const _0x2d3865=_0x1f5521;this[_0x2d3865(0x283)](),this[_0x2d3865(0x2ff)](this['_state']['onRemoteAck'](_0x6ed843)),this['_unlockTransition']();}['_onRemoteRejected'](_0xe2c4b8){const _0x36d11c=_0x1f5521;this['_lockTransition'](),this[_0x36d11c(0x2ff)](this['_state']['onRemoteRej'](_0xe2c4b8)),this['_unlockTransition']();}[_0x1f5521(0x2e5)](_0x2b29a4){const _0x194c26=_0x1f5521;this[_0x194c26(0x283)](),this[_0x194c26(0x2ff)](this[_0x194c26(0x38b)]['onRemoteRetry'](_0x2b29a4)),this[_0x194c26(0x3dc)]();}[_0x1f5521(0x31a)](_0xa97d4c){const _0x5d0836=_0x1f5521;if(!(this[_0x5d0836(0x38b)]instanceof Q))throw TypeError('[CollaborationEntity]:\x20cannot\x20apply\x20missing\x20results\x20on\x20other\x20states!');let _0x5c11fc=_0xa97d4c[_0x5d0836(0x2ea)](_0xd7dcfc=>{const _0x2bbbc0=_0x5d0836;let _0x3780a1=this[_0x2bbbc0(0x187)][_0x2bbbc0(0x165)][_0x2bbbc0(0x32a)](this[_0x2bbbc0(0x187)][_0x2bbbc0(0x165)][_0x2bbbc0(0x304)]()[_0x2bbbc0(0x161)])(_0xd7dcfc[_0x2bbbc0(0x17c)],null)||_0xd7dcfc[_0x2bbbc0(0x17c)];return{..._0xd7dcfc,'mutations':_0x3780a1};});this['_lockTransition'](),this[_0x5d0836(0x2ff)](this['_state'][_0x5d0836(0x2eb)](_0x5c11fc)),this[_0x5d0836(0x3dc)]();}[_0x1f5521(0x142)](){const _0x487efe=_0x1f5521;this[_0x487efe(0x283)](),this['_updateState'](this[_0x487efe(0x38b)][_0x487efe(0x1f1)]()),this[_0x487efe(0x3dc)]();}[_0x1f5521(0x1ec)](_0x2a5d3f=!0x1){const _0x4f3fb5=_0x1f5521;this['_lockTransition'](),this['_updateState'](this[_0x4f3fb5(0x38b)][_0x4f3fb5(0x210)]()),this[_0x4f3fb5(0x3dc)]();let _0x406137=this[_0x4f3fb5(0x38b)];_0x2a5d3f&&_0x406137 instanceof K&&(this[_0x4f3fb5(0x283)](),this[_0x4f3fb5(0x2ff)](_0x406137['fetchMiss']()),this[_0x4f3fb5(0x3dc)]());}async[_0x1f5521(0x398)](){return new Promise(_0x4243ef=>{const _0x38d73a=_0x2b9e;this[_0x38d73a(0x36b)][_0x38d73a(0x30a)]['pipe'](_0x14e08c(0x1))[_0x38d73a(0x2dc)](async _0x1795fb=>{const _0x2df588=_0x38d73a;_0x4243ef(await this[_0x2df588(0x2c1)](_0x1795fb===0x3));});});}[_0x1f5521(0x156)](){const _0x520e89=_0x1f5521;let _0x303507=this[_0x520e89(0x322)];return{'onStateChange':(_0x576243,_0x49fe48)=>{const _0x3f904f=_0x520e89;if(_0x576243!==this[_0x3f904f(0x38b)])throw Error(_0x3f904f(0x202)+_0x576243[_0x3f904f(0x1fc)]+_0x3f904f(0x2fd)+_0x49fe48['status']+_0x3f904f(0x1e0)+this[_0x3f904f(0x38b)]['status']);this['_updateState'](_0x49fe48);},'onSendChangeset':_0x39bdfc=>{const _0xf55c9=_0x520e89;_0x39bdfc[_0xf55c9(0x3cb)]||(_0x39bdfc[_0xf55c9(0x3cb)]=this['_changesetSessionId'],_0x39bdfc[_0xf55c9(0x2f7)]=++this[_0xf55c9(0x1a3)]);let _0x22ab0d={'eventID':_0x28cc07[_0xf55c9(0x168)],'data':{'unitID':_0x39bdfc[_0xf55c9(0x322)],'unitType':this[_0xf55c9(0x34f)],'changeset':_0x39bdfc,'memberID':this['session'][_0xf55c9(0x371)]()}};this[_0xf55c9(0x36b)][_0xf55c9(0x3bb)](_0x22ab0d,this[_0xf55c9(0x322)]);},'onMissingChangesets':({from:_0x346302,to:_0x520ffd})=>{const _0x22bb5e=_0x520e89;this[_0x22bb5e(0x2dd)][_0x22bb5e(0x35a)](_0x22bb5e(0x394),'fetching\x20missing\x20changesets\x20from\x20'+_0x346302+_0x22bb5e(0x19c)+_0x520ffd);let _0x59bdd9={'eventID':_0x28cc07['FETCH_MISSING'],'data':{'unitID':_0x303507,'unitType':this['_type'],'from':_0x346302,'to':_0x520ffd}};this[_0x22bb5e(0x36b)][_0x22bb5e(0x3bb)](_0x59bdd9,this[_0x22bb5e(0x322)]);}};}async['_createInitialStateImpl'](_0x41fa40){const _0x55a2fc=_0x1f5521;var _0x1ea1b1;let _0x290b45=await((_0x1ea1b1=this['_localCacheService'])==null?void 0x0:_0x1ea1b1[_0x55a2fc(0x363)](this[_0x55a2fc(0x322)])),_0x170d25=(_0x290b45==null?void 0x0:_0x290b45[_0x55a2fc(0x17c)])??[],_0x18a72f=(_0x290b45==null?void 0x0:_0x290b45['awaitingChangeset'])??null,_0x2f3621=!!(_0x18a72f!=null&&_0x18a72f[_0x55a2fc(0x3cb)])&&!!(_0x18a72f!=null&&_0x18a72f[_0x55a2fc(0x2f7)]);this[_0x55a2fc(0x3d6)]=_0x2f3621?_0x18a72f['sid']:_0xf5037d(),this[_0x55a2fc(0x1a3)]=_0x2f3621?_0x18a72f['reqId']:0x0;let _0x1cca9d=this['unitID'];try{this['_replayCachedMutations'](_0x18a72f,_0x170d25);}catch(_0x25068c){this[_0x55a2fc(0x2dd)][_0x55a2fc(0x2fc)](_0x25068c);}let _0x4a697b=this[_0x55a2fc(0x156)]();if(_0x41fa40){let _0x4955b9=gn(this[_0x55a2fc(0x391)],_0x1cca9d,this[_0x55a2fc(0x34f)],_0x18a72f,_0x170d25,_0x4a697b);return _0x4955b9 instanceof q?_0x4955b9[_0x55a2fc(0x2be)]():(_0x4955b9 instanceof Y||_0x4955b9 instanceof J)&&_0x4955b9[_0x55a2fc(0x3a6)](),_0x4955b9;}return this['_injector'][_0x55a2fc(0x351)](Z,_0x1cca9d,this['_type'],_0x18a72f,_0x170d25,_0x4a697b);}[_0x1f5521(0x228)](_0x3191b2,_0x3d9fdd){const _0x59b947=_0x1f5521;var _0x894461,_0x205d0b;let _0x1ce3f7=this[_0x59b947(0x187)]['interceptor'][_0x59b947(0x32a)](this[_0x59b947(0x187)][_0x59b947(0x165)][_0x59b947(0x304)]()[_0x59b947(0x161)]);(_0x894461=_0x1ce3f7((_0x3191b2==null?void 0x0:_0x3191b2[_0x59b947(0x17c)])||[],null))==null||_0x894461['forEach'](_0x58f84a=>this[_0x59b947(0x320)]['executeCommand'](_0x58f84a['id'],_0x58f84a[_0x59b947(0x366)])),(_0x205d0b=_0x1ce3f7(_0x3d9fdd||[],null))==null||_0x205d0b[_0x59b947(0x154)](_0x307fa2=>this['_commandService'][_0x59b947(0x224)](_0x307fa2['id'],_0x307fa2[_0x59b947(0x366)]));}};$=H([V(0x3,_0x32c7b6(_0xd2295f)),V(0x4,_0x32c7b6(_0x34fb2b)),V(0x5,_0x32c7b6(_0xed8942)),V(0x6,_0x32c7b6(_0x21335b)),V(0x7,_0x32c7b6(B)),V(0x8,_0x238a9e),V(0x9,_0x3849f9),V(0xa,_0x24738d),V(0xb,_0x51823a),V(0xc,_0x100ce1(W)),V(0xd,_0x100ce1(U))],$);let _n=class extends ${constructor(_0x4110d5,_0x202745,_0x5b6136,_0x8e11a7,_0x29dbf3,_0x2e031c,_0xfdbfd6,_0x19b47a,_0x3e83df,_0x3aef70,_0x50dbc7,_0x32faeb,_0xac168a,_0x1d0cfa,_0x5f48e8){const _0xe5cacb=_0x1f5521;super(_0x4110d5,_0x5b6136,_0x202745,_0x8e11a7,_0x29dbf3,_0x2e031c,_0xfdbfd6,_0x19b47a,_0x3e83df,_0x3aef70,_0x50dbc7,_0x32faeb,_0x1d0cfa,_0x5f48e8),this[_0xe5cacb(0x322)]=_0x4110d5,this['type']=_0x202745,this[_0xe5cacb(0x284)]=_0xac168a,z(this,_0xe5cacb(0x3c1),null);}['addHandlerCallback'](_0x4b85ec){const _0x215d72=_0x1f5521;this[_0x215d72(0x3c1)]=_0x4b85ec;}[_0x1f5521(0x1ee)](){const _0x4a5284=_0x1f5521;this[_0x4a5284(0x3c1)]=null,super[_0x4a5284(0x1ee)]();}['_createHandler'](){const _0x3534b7=_0x1f5521;let _0x141d51=super[_0x3534b7(0x156)]();return _0x141d51['onTransformIME']=_0x1e9741=>{const _0x161ccd=_0x3534b7;var _0x534f5a,_0x386e82;return(_0x534f5a=this[_0x161ccd(0x3c1)])==null||(_0x386e82=_0x534f5a[_0x161ccd(0x1ac)])==null?void 0x0:_0x386e82['call'](_0x534f5a,_0x1e9741);},_0x141d51[_0x3534b7(0x31e)]=_0x18669e=>{const _0x36f94f=_0x3534b7;var _0x84acfa,_0x558384;return(_0x84acfa=this[_0x36f94f(0x3c1)])==null||(_0x558384=_0x84acfa[_0x36f94f(0x31e)])==null?void 0x0:_0x558384[_0x36f94f(0x359)](_0x84acfa,_0x18669e);},_0x141d51[_0x3534b7(0x339)]=_0x582c73=>{const _0x44c810=_0x3534b7;var _0x159e75,_0x2c5660;return(_0x159e75=this[_0x44c810(0x3c1)])==null||(_0x2c5660=_0x159e75[_0x44c810(0x339)])==null?void 0x0:_0x2c5660[_0x44c810(0x359)](_0x159e75,_0x582c73);},_0x141d51[_0x3534b7(0x29b)]=_0x349e5c=>{const _0x130b3f=_0x3534b7;var _0x5c0d02,_0x2a2f09;return(_0x5c0d02=this[_0x130b3f(0x3c1)])==null||(_0x2a2f09=_0x5c0d02[_0x130b3f(0x29b)])==null?void 0x0:_0x2a2f09[_0x130b3f(0x359)](_0x5c0d02,_0x349e5c);},_0x141d51[_0x3534b7(0x15b)]=_0x18dead=>{const _0x9e41bb=_0x3534b7;var _0x39b3a4,_0x2d1bbb;return((_0x39b3a4=this[_0x9e41bb(0x3c1)])==null||(_0x2d1bbb=_0x39b3a4[_0x9e41bb(0x15b)])==null?void 0x0:_0x2d1bbb[_0x9e41bb(0x359)](_0x39b3a4,_0x18dead))??_0x18dead;},_0x141d51[_0x3534b7(0x236)]=_0x1a0150=>{const _0x3d1083=_0x3534b7;var _0x44e003,_0x21a95c;return((_0x44e003=this[_0x3d1083(0x3c1)])==null||(_0x21a95c=_0x44e003[_0x3d1083(0x236)])==null?void 0x0:_0x21a95c['call'](_0x44e003,_0x1a0150))??_0x1a0150;},_0x141d51;}async['_init'](){const _0x559f6d=_0x1f5521;let _0x270051=await super['_init']();return this[_0x559f6d(0x34e)](this['_docStateChangeManagerService'][_0x559f6d(0x1e8)]['subscribe'](_0xab2bef=>{const _0x29d04d=_0x559f6d;if(_0xab2bef==null||_0xab2bef[_0x29d04d(0x2c4)]!==this[_0x29d04d(0x322)])return;let {commandId:_0xcdd74b,redoState:_0x47d2d1,unitId:_0x1f4adc}=_0xab2bef,_0x59e87c={'id':_0xcdd74b,'type':_0x3ac237[_0x29d04d(0x38a)],'params':{'unitId':_0x1f4adc,'actions':_0x47d2d1[_0x29d04d(0x1d6)],'textRanges':null}};this['_onLocalMutation'](_0x59e87c);})),this['disposeWithMe'](this[_0x559f6d(0x320)][_0x559f6d(0x277)]((_0x4d2302,_0x1e6e69)=>{const _0x1feacd=_0x559f6d;if(_0x4d2302[_0x1feacd(0x258)]!==_0x3ac237[_0x1feacd(0x38a)]||_0x1e6e69!=null&&_0x1e6e69['fromCollab']||_0x1e6e69!=null&&_0x1e6e69[_0x1feacd(0x26c)]||_0x4d2302['id']===_0x47e1e8['id'])return;let _0x15a4d5=_0x4d2302[_0x1feacd(0x366)];if((_0x15a4d5==null?void 0x0:_0x15a4d5['unitId'])!==this[_0x1feacd(0x322)])return;let _0x12b9ff=_0x4d2302,_0x5040ae=this[_0x1feacd(0x187)][_0x1feacd(0x165)][_0x1feacd(0x32a)](this['_compressMutationService'][_0x1feacd(0x165)]['getInterceptPoints']()[_0x1feacd(0x2e2)])([_0x12b9ff],this[_0x1feacd(0x329)])||[_0x12b9ff];this[_0x1feacd(0x195)](_0x5040ae[0x0]);})),_0x270051;}};_n=H([V(0x3,_0x32c7b6(_0xd2295f)),V(0x4,_0x32c7b6(_0x34fb2b)),V(0x5,_0x32c7b6(_0xed8942)),V(0x6,_0x32c7b6(_0x21335b)),V(0x7,_0x32c7b6(B)),V(0x8,_0x238a9e),V(0x9,_0x3849f9),V(0xa,_0x24738d),V(0xb,_0x51823a),V(0xc,_0x32c7b6(_0x3382a8)),V(0xd,_0x100ce1(W)),V(0xe,_0x100ce1(U))],_n);let vn=class extends ${constructor(_0x54836d,_0x3b9c13,_0x4d32aa,_0x99b26d,_0x44ead6,_0x6bce31,_0x148112,_0x3befb2,_0x326cab,_0x49ba80,_0x2507ab,_0x46a4a6,_0x1a2a84,_0x2e90e1){const _0x126a3a=_0x1f5521;super(_0x54836d,_0x4d32aa,_0x3b9c13,_0x99b26d,_0x44ead6,_0x6bce31,_0x148112,_0x3befb2,_0x326cab,_0x49ba80,_0x2507ab,_0x46a4a6,_0x1a2a84,_0x2e90e1),this['unitID']=_0x54836d,this[_0x126a3a(0x258)]=_0x3b9c13;}async[_0x1f5521(0x29a)](){const _0x342e8e=_0x1f5521;let _0x13521f=await super[_0x342e8e(0x29a)]();return this[_0x342e8e(0x34e)](this['_commandService']['onMutationExecutedForCollab']((_0x1d71a6,_0x38b05a)=>{const _0x5a989a=_0x342e8e;if(_0x1d71a6[_0x5a989a(0x258)]!==_0x3ac237[_0x5a989a(0x38a)]||_0x38b05a!=null&&_0x38b05a[_0x5a989a(0x246)]||_0x38b05a!=null&&_0x38b05a['onlyLocal'])return;let _0xc3e86=_0x1d71a6[_0x5a989a(0x366)];if((_0xc3e86==null?void 0x0:_0xc3e86[_0x5a989a(0x2c4)])!==this[_0x5a989a(0x322)])return;let _0x254411=_0x1d71a6,_0x361308=this[_0x5a989a(0x187)][_0x5a989a(0x165)]['fetchThroughInterceptors'](this['_compressMutationService'][_0x5a989a(0x165)]['getInterceptPoints']()[_0x5a989a(0x2e2)])([_0x254411],this[_0x5a989a(0x329)])||[_0x254411];this['_onLocalMutation'](_0x361308[0x0]);})),_0x13521f;}};vn=H([V(0x3,_0x32c7b6(_0xd2295f)),V(0x4,_0x32c7b6(_0x34fb2b)),V(0x5,_0x32c7b6(_0xed8942)),V(0x6,_0x32c7b6(_0x21335b)),V(0x7,_0x32c7b6(B)),V(0x8,_0x238a9e),V(0x9,_0x3849f9),V(0xa,_0x24738d),V(0xb,_0x51823a),V(0xc,_0x100ce1(W)),V(0xd,_0x100ce1(U))],vn);let yn=class extends ${constructor(_0x1b6ed4,_0xdbec27,_0x179f90,_0x16de01,_0x5274a6,_0x5a6917,_0x53db24,_0x3c7412,_0x1bfe07,_0x3691cc,_0xce06f9,_0x274cce,_0x58aa26,_0x5477fd,_0x13ab9d){super(_0x1b6ed4,_0x179f90,_0xdbec27,_0x16de01,_0x5274a6,_0x5a6917,_0x53db24,_0x1bfe07,_0x3691cc,_0xce06f9,_0x274cce,_0x58aa26,_0x5477fd,_0x13ab9d),this['unitID']=_0x1b6ed4,this['type']=_0xdbec27,this['_sheetTransformSelectionsService']=_0x3c7412;}[_0x1f5521(0x156)](){const _0x2f3cc3=_0x1f5521;let _0x5234d2=super[_0x2f3cc3(0x156)]();return _0x5234d2['onTransformSelections']=_0x5bbcfa=>this[_0x2f3cc3(0x36c)][_0x2f3cc3(0x2f3)](_0x5bbcfa),_0x5234d2;}async['_init'](){const _0x45852e=_0x1f5521;let _0x5ef99f=await super['_init']();return this[_0x45852e(0x34e)](this[_0x45852e(0x320)]['onMutationExecutedForCollab']((_0x3ba8fe,_0x50f5e8)=>{const _0x5083f7=_0x45852e;if(_0x3ba8fe[_0x5083f7(0x258)]!==_0x3ac237[_0x5083f7(0x38a)]||_0x50f5e8!=null&&_0x50f5e8[_0x5083f7(0x246)]||_0x50f5e8!=null&&_0x50f5e8[_0x5083f7(0x26c)])return;let _0x119269=_0x3ba8fe[_0x5083f7(0x366)];if((_0x119269==null?void 0x0:_0x119269[_0x5083f7(0x2c4)])!==this[_0x5083f7(0x322)])return;let _0x182f0e=_0x3ba8fe,_0x188f13=this[_0x5083f7(0x187)]['interceptor']['fetchThroughInterceptors'](this[_0x5083f7(0x187)][_0x5083f7(0x165)][_0x5083f7(0x304)]()[_0x5083f7(0x2e2)])([_0x182f0e],this[_0x5083f7(0x329)])||[_0x182f0e];this[_0x5083f7(0x195)](_0x188f13[0x0]);})),_0x5ef99f;}};yn=H([V(0x3,_0x32c7b6(_0xd2295f)),V(0x4,_0x32c7b6(_0x34fb2b)),V(0x5,_0x32c7b6(_0xed8942)),V(0x6,_0x32c7b6(_0x21335b)),V(0x7,_0x32c7b6(Wt)),V(0x8,_0x32c7b6(B)),V(0x9,_0x238a9e),V(0xa,_0x3849f9),V(0xb,_0x24738d),V(0xc,_0x51823a),V(0xd,_0x100ce1(W)),V(0xe,_0x100ce1(U))],yn);let bn=class extends ${constructor(_0xf0ff18,_0x1ec106,_0x389dff,_0x1e88c5,_0x49bcfd,_0xcb4498,_0x220011,_0x263cf1,_0x4361c0,_0x2de9e8,_0x26fecf,_0x1d2d86,_0x4af098,_0x410a05){const _0x435500=_0x1f5521;super(_0xf0ff18,_0x389dff,_0x1ec106,_0x1e88c5,_0x49bcfd,_0xcb4498,_0x220011,_0x263cf1,_0x4361c0,_0x2de9e8,_0x26fecf,_0x1d2d86,_0x4af098,_0x410a05),this[_0x435500(0x322)]=_0xf0ff18,this[_0x435500(0x258)]=_0x1ec106;}async[_0x1f5521(0x29a)](){const _0x3f7769=_0x1f5521;let _0x2223f9=await super[_0x3f7769(0x29a)]();return this[_0x3f7769(0x34e)](this[_0x3f7769(0x320)][_0x3f7769(0x277)]((_0x89a2cb,_0x37aa83)=>{const _0x519c40=_0x3f7769;if(_0x89a2cb[_0x519c40(0x258)]!==_0x3ac237[_0x519c40(0x38a)]||_0x37aa83!=null&&_0x37aa83[_0x519c40(0x246)]||_0x37aa83!=null&&_0x37aa83[_0x519c40(0x26c)])return;let _0x7e68de=_0x89a2cb[_0x519c40(0x366)];if((_0x7e68de==null?void 0x0:_0x7e68de['unitId'])!==this[_0x519c40(0x322)])return;let _0x484264=_0x89a2cb,_0xa7fa37=this[_0x519c40(0x187)][_0x519c40(0x165)][_0x519c40(0x32a)](this[_0x519c40(0x187)][_0x519c40(0x165)]['getInterceptPoints']()['COMPRESS_MUTATION_SEND'])([_0x484264],this['_univerInstanceService'])||[_0x484264];this[_0x519c40(0x195)](_0xa7fa37[0x0]);})),_0x2223f9;}};bn=H([V(0x3,_0x32c7b6(_0xd2295f)),V(0x4,_0x32c7b6(_0x34fb2b)),V(0x5,_0x32c7b6(_0xed8942)),V(0x6,_0x32c7b6(_0x21335b)),V(0x7,_0x32c7b6(B)),V(0x8,_0x238a9e),V(0x9,_0x3849f9),V(0xa,_0x24738d),V(0xb,_0x51823a),V(0xc,_0x100ce1(W)),V(0xd,_0x100ce1(U))],bn);let xn=class extends ${constructor(_0x20dc54,_0x5c1721,_0xa9ce1c,_0x53aa86,_0x125d5e,_0x1e3f2f,_0x5874e9,_0x38873b,_0x4c31e3,_0x593d21,_0x3cd3d6,_0x3e79de,_0x643209,_0x4bc424){const _0xfed91a=_0x1f5521;super(_0x20dc54,_0xa9ce1c,_0x5c1721,_0x53aa86,_0x125d5e,_0x1e3f2f,_0x5874e9,_0x38873b,_0x4c31e3,_0x593d21,_0x3cd3d6,_0x3e79de,_0x643209,_0x4bc424),this[_0xfed91a(0x322)]=_0x20dc54,this['type']=_0x5c1721;}async[_0x1f5521(0x29a)](){const _0x202796=_0x1f5521;let _0x128c3c=await super[_0x202796(0x29a)]();return this['disposeWithMe'](this[_0x202796(0x320)][_0x202796(0x277)]((_0x1f637a,_0x1213c5)=>{const _0x23842e=_0x202796;if(_0x1f637a[_0x23842e(0x258)]!==_0x3ac237['MUTATION']||_0x1213c5!=null&&_0x1213c5[_0x23842e(0x246)]||_0x1213c5!=null&&_0x1213c5[_0x23842e(0x26c)])return;let _0xa06f11=_0x1f637a[_0x23842e(0x366)];if((_0xa06f11==null?void 0x0:_0xa06f11[_0x23842e(0x2c4)])!==this[_0x23842e(0x322)])return;let _0x30e9c0=_0x1f637a,_0x22b829=this[_0x23842e(0x187)][_0x23842e(0x165)][_0x23842e(0x32a)](this[_0x23842e(0x187)][_0x23842e(0x165)][_0x23842e(0x304)]()[_0x23842e(0x2e2)])([_0x30e9c0],this[_0x23842e(0x329)])||[_0x30e9c0];this['_onLocalMutation'](_0x22b829[0x0]);})),_0x128c3c;}};xn=H([V(0x3,_0x32c7b6(_0xd2295f)),V(0x4,_0x32c7b6(_0x34fb2b)),V(0x5,_0x32c7b6(_0xed8942)),V(0x6,_0x32c7b6(_0x21335b)),V(0x7,_0x32c7b6(B)),V(0x8,_0x238a9e),V(0x9,_0x3849f9),V(0xa,_0x24738d),V(0xb,_0x51823a),V(0xc,_0x100ce1(W)),V(0xd,_0x100ce1(U))],xn);let Sn=class extends ${constructor(_0xfbe574,_0x4f4be6,_0x5b2921,_0x1a6d98,_0x292aab,_0x3aa213,_0x3adec5,_0x217abc,_0x25ebda,_0x222ae9,_0x22ca9b,_0x363a31,_0x30ab5c,_0x439181){const _0x546a5b=_0x1f5521;super(_0xfbe574,_0x5b2921,_0x4f4be6,_0x1a6d98,_0x292aab,_0x3aa213,_0x3adec5,_0x217abc,_0x25ebda,_0x222ae9,_0x22ca9b,_0x363a31,_0x30ab5c,_0x439181),this[_0x546a5b(0x322)]=_0xfbe574,this['type']=_0x4f4be6;}async[_0x1f5521(0x29a)](){const _0x492721=_0x1f5521;let _0x425ffb=await super['_init']();return this[_0x492721(0x34e)](this[_0x492721(0x320)][_0x492721(0x277)]((_0x565a2b,_0x18692f)=>{const _0xab86d7=_0x492721;if(_0x565a2b[_0xab86d7(0x258)]!==_0x3ac237[_0xab86d7(0x38a)]||_0x18692f!=null&&_0x18692f[_0xab86d7(0x246)]||_0x18692f!=null&&_0x18692f[_0xab86d7(0x26c)])return;let _0x2ae222=_0x565a2b[_0xab86d7(0x366)];if((_0x2ae222==null?void 0x0:_0x2ae222[_0xab86d7(0x2c4)])!==this[_0xab86d7(0x322)])return;let _0x51fade=_0x565a2b,_0x8623e7=this[_0xab86d7(0x187)]['interceptor'][_0xab86d7(0x32a)](this[_0xab86d7(0x187)][_0xab86d7(0x165)]['getInterceptPoints']()[_0xab86d7(0x2e2)])([_0x51fade],this[_0xab86d7(0x329)])||[_0x51fade];this['_onLocalMutation'](_0x8623e7[0x0]);})),_0x425ffb;}};Sn=H([V(0x3,_0x32c7b6(_0xd2295f)),V(0x4,_0x32c7b6(_0x34fb2b)),V(0x5,_0x32c7b6(_0xed8942)),V(0x6,_0x32c7b6(_0x21335b)),V(0x7,_0x32c7b6(B)),V(0x8,_0x238a9e),V(0x9,_0x3849f9),V(0xa,_0x24738d),V(0xb,_0x51823a),V(0xc,_0x100ce1(W)),V(0xd,_0x100ce1(U))],Sn);const Cn=_0x382d48('univer-pro.collaboration-client.network-condition.service');function wn(_0x5d2416){const _0x244b85=_0x1f5521;let _0x5c1cfa=_0x5d2416[_0x244b85(0x2cc)],_0x240749=JSON[_0x244b85(0x3d4)](_0x5c1cfa);switch(_0x240749[_0x244b85(0x381)]){case _0x45aed2['HEARTBEAT']:case _0x45aed2['HELLO']:{let _0x44044e=_0x240749['infoRsp'];return{..._0x240749,'data':_0x44044e,'cmd':_0x240749[_0x244b85(0x381)]};}case _0x45aed2[_0x244b85(0x23d)]:{let _0x1a8cf4=_0x240749[_0x244b85(0x272)];return{..._0x240749,'data':_0x1a8cf4,'cmd':_0x240749['cmd']};}case _0x45aed2['RECV']:{let _0x168dfc=_0x240749['collaMsg'];switch(_0x168dfc['eventID']){case _0x28cc07[_0x244b85(0x3a7)]:var _0xdbce2b;return{..._0x240749,'data':{..._0x168dfc,'data':(_0xdbce2b=_0x168dfc[_0x244b85(0x22a)])==null?void 0x0:_0xdbce2b['cs']},'cmd':_0x240749[_0x244b85(0x381)]};case _0x28cc07['CHANGESET_ACK']:var _0x2bc10f;return{..._0x240749,'data':{..._0x168dfc,'data':(_0x2bc10f=_0x168dfc[_0x244b85(0x1aa)])==null?void 0x0:_0x2bc10f['cs']},'cmd':_0x240749[_0x244b85(0x381)]};case _0x28cc07['NEW_CHANGESETS']:var _0x52d92f;return{..._0x240749,'data':{..._0x168dfc,'data':(_0x52d92f=_0x168dfc[_0x244b85(0x1a5)])==null?void 0x0:_0x52d92f['cs']},'cmd':_0x240749[_0x244b85(0x381)]};case _0x28cc07['CHANGESET_REJ']:var _0x37a27b;return{..._0x240749,'data':{..._0x168dfc,'data':(_0x37a27b=_0x168dfc[_0x244b85(0x367)])==null?void 0x0:_0x37a27b['cs']},'cmd':_0x240749[_0x244b85(0x381)]};case _0x28cc07[_0x244b85(0x14b)]:var _0x2b6bb2;return{..._0x240749,'data':{..._0x168dfc,'data':(_0x2b6bb2=_0x168dfc[_0x244b85(0x1d8)])==null?void 0x0:_0x2b6bb2['cs']},'cmd':_0x240749[_0x244b85(0x381)]};case _0x28cc07[_0x244b85(0x3a9)]:return{..._0x240749,'data':{..._0x168dfc,'data':_0x168dfc['updateCursorEvent']},'cmd':_0x240749[_0x244b85(0x381)]};case _0x28cc07[_0x244b85(0x368)]:return{..._0x240749,'data':{..._0x168dfc,'data':_0x168dfc['joinEvent']},'cmd':_0x240749['cmd']};case _0x28cc07[_0x244b85(0x1af)]:return{..._0x240749,'data':{..._0x168dfc,'data':_0x168dfc[_0x244b85(0x27d)]},'cmd':_0x240749[_0x244b85(0x381)]};case _0x28cc07[_0x244b85(0x215)]:return{..._0x240749,'data':{..._0x168dfc,'data':_0x168dfc[_0x244b85(0x27c)]},'cmd':_0x240749[_0x244b85(0x381)]};case _0x28cc07[_0x244b85(0x286)]:case _0x28cc07['LIVESHARE_OPERATION']:return{..._0x240749,'data':{..._0x168dfc,'data':_0x168dfc['liveShareOperation']},'cmd':_0x240749[_0x244b85(0x381)]};case _0x28cc07['LIVESHARE_TERMINATE']:return{..._0x240749,'data':{..._0x168dfc,'data':_0x168dfc[_0x244b85(0x27c)]},'cmd':_0x240749[_0x244b85(0x381)]};case _0x28cc07[_0x244b85(0x164)]:return{..._0x240749,'data':_0x168dfc,'cmd':_0x240749[_0x244b85(0x381)]};case _0x28cc07[_0x244b85(0x2a8)]:return{..._0x240749,'data':{..._0x168dfc,'data':_0x168dfc[_0x244b85(0x25f)]},'cmd':_0x240749[_0x244b85(0x381)]};case _0x28cc07[_0x244b85(0x36e)]:return{..._0x240749,'data':{..._0x168dfc,'data':_0x168dfc[_0x244b85(0x2c6)]},'cmd':_0x240749[_0x244b85(0x381)]};case _0x28cc07[_0x244b85(0x373)]:return{..._0x240749,'data':{..._0x168dfc,'data':_0x168dfc[_0x244b85(0x3b5)]},'cmd':_0x240749[_0x244b85(0x381)]};case _0x28cc07['UNISCRIPT_RUN']:return{..._0x240749,'data':{..._0x168dfc,'data':_0x168dfc[_0x244b85(0x1ba)]},'cmd':_0x240749[_0x244b85(0x381)]};default:return _0x240749;}}default:return _0x240749;}}function Tn(_0x1dabf4){const _0x61320=_0x1f5521;switch(_0x1dabf4[_0x61320(0x381)]){case _0x45aed2[_0x61320(0x230)]:case _0x45aed2[_0x61320(0x23a)]:return JSON[_0x61320(0x212)]({'cmd':_0x1dabf4['cmd'],'routeKey':_0x1dabf4[_0x61320(0x294)]});case _0x45aed2[_0x61320(0x2ee)]:{let _0x49840f;switch(_0x1dabf4['data']['eventID']){case _0x28cc07[_0x61320(0x3a9)]:_0x49840f={'eventID':_0x28cc07[_0x61320(0x3a9)],'updateCursorEvent':_0x1dabf4[_0x61320(0x2cc)][_0x61320(0x2cc)]};break;case _0x28cc07[_0x61320(0x1af)]:_0x49840f={'eventID':_0x28cc07['USERS_LEAVE'],'leaveEvent':_0x1dabf4['data'][_0x61320(0x2cc)]};break;case _0x28cc07[_0x61320(0x368)]:_0x49840f={'eventID':_0x28cc07[_0x61320(0x368)],'joinEvent':_0x1dabf4[_0x61320(0x2cc)][_0x61320(0x2cc)]};break;case _0x28cc07[_0x61320(0x215)]:_0x49840f={'eventID':_0x28cc07[_0x61320(0x215)],'liveShareNewHost':_0x1dabf4[_0x61320(0x2cc)][_0x61320(0x2cc)]};break;case _0x28cc07[_0x61320(0x3c6)]:_0x49840f={'eventID':_0x28cc07[_0x61320(0x3c6)],'liveShareOperation':_0x1dabf4['data'][_0x61320(0x2cc)]};break;case _0x28cc07['LIVESHARE_TERMINATE']:_0x49840f={'eventID':_0x28cc07[_0x61320(0x387)],'liveShareTerminate':_0x1dabf4[_0x61320(0x2cc)][_0x61320(0x2cc)]};break;case _0x28cc07[_0x61320(0x237)]:_0x49840f={'eventID':_0x28cc07['LIVESHARE_REQUEST_HOST'],'liveShareRequestHost':_0x1dabf4[_0x61320(0x2cc)][_0x61320(0x2cc)]};break;case _0x28cc07[_0x61320(0x286)]:_0x49840f={'eventID':_0x28cc07[_0x61320(0x286)]};break;default:_0x49840f={'eventID':_0x1dabf4['data'][_0x61320(0x1b1)]};}return JSON[_0x61320(0x212)]({'cmd':_0x1dabf4[_0x61320(0x381)],'routeKey':_0x1dabf4[_0x61320(0x294)],'collaMsg':_0x49840f});}case _0x45aed2[_0x61320(0x23d)]:return JSON[_0x61320(0x212)]({'cmd':_0x1dabf4[_0x61320(0x381)],'routeKey':_0x1dabf4[_0x61320(0x294)],'joinReq':_0x1dabf4[_0x61320(0x2cc)]});case _0x45aed2['LEAVE']:return JSON['stringify']({'cmd':_0x1dabf4[_0x61320(0x381)],'routeKey':_0x1dabf4[_0x61320(0x294)],'leaveReq':_0x1dabf4[_0x61320(0x2cc)]});default:throw Error(_0x61320(0x198));}}const En=_0x382d48('univer-pro.collaboration-client-socket-service');function Dn(_0x45734f,_0x5c98a7,_0x375099){const _0xd8877d=_0x1f5521;return _0x45734f+'/'+_0x5c98a7+_0xd8877d(0x16b)+_0x375099+_0xd8877d(0x330);}let On=class extends _0x13fb6a{constructor(_0x2c7d2e,_0x2d0664,_0x36375f,_0x125885,_0x1857b6){const _0x5ae71f=_0x1f5521;super(),this[_0x5ae71f(0x391)]=_0x2c7d2e,this[_0x5ae71f(0x317)]=_0x2d0664,this[_0x5ae71f(0x2a1)]=_0x36375f,this['_logService']=_0x125885,this['_snapshotServerService']=_0x1857b6;}[_0x1f5521(0x38d)](_0x82f02f){const _0x345ee7=_0x1f5521;let _0x573dff=this[_0x345ee7(0x391)]['get'](_0x1fbe1f);if(!_0x573dff)throw Error(_0x345ee7(0x25c));let _0x2e6d1b=_0x573dff[_0x345ee7(0x298)](_0x82f02f);if(!_0x2e6d1b)throw Error(_0x345ee7(0x2ba));let _0x2c7adb=new _0x3f655f(),_0x7e9e71=new _0x548400();_0x2c7adb[_0x345ee7(0x23f)](_0x2e6d1b[_0x345ee7(0x26e)][_0x345ee7(0x2dc)](_0x3beb6f=>_0x7e9e71[_0x345ee7(0x1ae)](_0x3beb6f))),_0x2c7adb['add'](_0x1e0938(()=>_0x7e9e71[_0x345ee7(0x185)]()));let _0x525b16=new _0x548400();_0x2c7adb[_0x345ee7(0x23f)](_0x2e6d1b['error$']['subscribe'](_0x5df50e=>_0x525b16['next'](_0x5df50e))),_0x2c7adb[_0x345ee7(0x23f)](_0x1e0938(()=>_0x525b16[_0x345ee7(0x185)]()));let _0x587906=new _0x548400();_0x2c7adb['add'](_0x2e6d1b[_0x345ee7(0x1ce)][_0x345ee7(0x2dc)](_0xa1b88a=>{const _0x52efbd=_0x345ee7;let _0x4f300e=wn(_0xa1b88a);_0x587906[_0x52efbd(0x1ae)](_0x4f300e);})),_0x2c7adb['add'](_0x1e0938(()=>_0x587906[_0x345ee7(0x185)]()));let _0x28de1b,_0x5d3ceb=()=>{const _0x4d8524=_0x345ee7;_0x525b16[_0x4d8524(0x1ae)](new Event(_0x4d8524(0x355))),_0x7e9e71[_0x4d8524(0x1ae)](new Event(_0x4d8524(0x355))),_0x28de1b[_0x4d8524(0x301)]();};return _0x28de1b={'memberID':'','close$':_0x7e9e71['asObservable'](),'error$':_0x525b16['asObservable'](),'open$':_0x2e6d1b[_0x345ee7(0x23e)],'message$':_0x587906[_0x345ee7(0x37a)](),'send':_0x9baf42=>{const _0x13ae24=_0x345ee7;if(_0x9baf42['cmd']===_0x45aed2[_0x13ae24(0x2ee)]){if(_0x9baf42[_0x13ae24(0x2cc)][_0x13ae24(0x1b1)]===_0x28cc07[_0x13ae24(0x168)]){this[_0x13ae24(0x1d0)](_0x28de1b,_0x9baf42[_0x13ae24(0x2cc)])[_0x13ae24(0x39b)](_0x1eacee=>{const _0x5f0c04=_0x13ae24;this[_0x5f0c04(0x2dd)][_0x5f0c04(0x2fc)](_0x1eacee),_0x5d3ceb();});return;}if(_0x9baf42[_0x13ae24(0x2cc)]['eventID']===_0x28cc07[_0x13ae24(0x37e)]){let _0x38a879=_0x9baf42[_0x13ae24(0x2cc)];this[_0x13ae24(0x231)](_0x38a879)[_0x13ae24(0x3ab)](_0x346833=>{const _0x50466c=_0x13ae24;_0x587906['next']({'cmd':_0x45aed2[_0x50466c(0x146)],'code':_0x2486d1['OK'],'routeKey':_0x38a879[_0x50466c(0x2cc)][_0x50466c(0x322)],'routeType':'','data':{'eventID':_0x28cc07[_0x50466c(0x3a4)],'data':{'changesets':_0x346833}}});})[_0x13ae24(0x39b)](_0x29171e=>{const _0xf8eca5=_0x13ae24;this[_0xf8eca5(0x2dd)][_0xf8eca5(0x2fc)](_0x29171e),_0x5d3ceb();});return;}}_0x2e6d1b['send'](Tn(_0x9baf42));},'close':()=>{const _0x10c20d=_0x345ee7;_0x2e6d1b[_0x10c20d(0x301)](),_0x2c7adb[_0x10c20d(0x1ee)]();}},_0x28de1b;}async[_0x1f5521(0x1d0)](_0x16862,_0x375d9e){const _0x5d14bd=_0x1f5521;let {unitType:_0x583618,unitID:_0x19afb6,changeset:_0x3763d6}=_0x375d9e['data'],_0x2010d6={'unitID':_0x19afb6,'memberID':_0x16862[_0x5d14bd(0x235)],'type':_0x583618,'changeset':_0x53b382(_0x3763d6)},_0x5f2335=this[_0x5d14bd(0x2a1)][_0x5d14bd(0x1d1)](R),_0x44b296=Dn((_0x5f2335==null?void 0x0:_0x5f2335['collabSubmitChangesetUrl'])??_0x5d14bd(0x36a),_0x583618,_0x19afb6);try{await this[_0x5d14bd(0x317)][_0x5d14bd(0x160)](_0x44b296,{'body':_0x2010d6});}catch(_0x558951){throw this[_0x5d14bd(0x2dd)][_0x5d14bd(0x2fc)](_0x5d14bd(0x1fa),'submit\x20changeset\x20error!'),_0x558951;}}async[_0x1f5521(0x231)](_0x1d7cb5){const _0x48f3e8=_0x1f5521;let {unitID:_0x39a535,from:_0x487def,to:_0x4cbb3b,unitType:_0x5a2294}=_0x1d7cb5[_0x48f3e8(0x2cc)];return(await this['_snapshotServerService'][_0x48f3e8(0x1b4)]({'metadata':void 0x0},{'unitID':_0x39a535,'type':_0x5a2294,'from':_0x487def,'to':_0x4cbb3b}))[_0x48f3e8(0x25d)][_0x48f3e8(0x2ea)](_0x259125=>((_0x259125[_0x48f3e8(0x17c)]===null||_0x259125[_0x48f3e8(0x17c)]===void 0x0)&&(_0x259125[_0x48f3e8(0x17c)]=[]),_0x259125));}};On=H([V(0x0,_0x32c7b6(_0xd2295f)),V(0x1,_0x32c7b6(_0x314f58)),V(0x2,_0x123a79),V(0x3,_0x3849f9),V(0x4,_0x223810)],On);const kn=_0x382d48('univer-pro.collaboration-client-adapter-service');function An(_0x1d7a2d={}){const _0x216c15=_0x1f5521;return _0x1d7a2d[_0x216c15(0x186)]?{'resolveUnit':_0x1d7a2d['resolveUnit']}:{'resolveUnit':_0x556bc0=>({'target':{'unitId':_0x556bc0['unitId'],'unitType':_0x556bc0[_0x216c15(0x1e6)]}})};}function jn(_0x34fe4c,_0x5801c4,_0x553dd3){const _0x358ded=_0x1f5521;let _0x496819=_0x553dd3['target'][_0x358ded(0x1b8)];if(_0x496819!=null&&_0x496819['trim']()==='')throw Error(_0x358ded(0x1b9));if(!_0x553dd3[_0x358ded(0x1ef)][_0x358ded(0x2c4)])throw Error(_0x358ded(0x1a7));return{'localUnitId':_0x34fe4c,'unitType':_0x5801c4,'target':{'endpoint':_0x496819,'unitId':_0x553dd3[_0x358ded(0x1ef)][_0x358ded(0x2c4)],'unitType':_0x553dd3[_0x358ded(0x1ef)][_0x358ded(0x1e6)]??_0x5801c4},'changeset':_0x553dd3[_0x358ded(0x361)]};}let Mn=class extends _0x13fb6a{constructor(_0x1488ce,_0x10b8a0,_0x15df6a,_0x23661f,_0xc24119,_0x45df76,_0xfb6024){const _0x22fa33=_0x1f5521;super(),this[_0x22fa33(0x391)]=_0x1488ce,this[_0x22fa33(0x2dd)]=_0x10b8a0,this['_configService']=_0x15df6a,this['_socketService']=_0x23661f,this[_0x22fa33(0x3a1)]=_0xc24119,this[_0x22fa33(0x384)]=_0x45df76,this[_0x22fa33(0x2b4)]=_0xfb6024,z(this,_0x22fa33(0x166),new Map()),z(this,'_pendingSessions',new Map()),z(this,_0x22fa33(0x28d),new Map()),z(this,_0x22fa33(0x152),new Map()),z(this,_0x22fa33(0x3dd),this[_0x22fa33(0x3bf)](void 0x0)['socket$'][_0x22fa33(0x37a)]()),z(this,_0x22fa33(0x349),new _0x21afa9(0x0)),z(this,_0x22fa33(0x232),this['_status$'][_0x22fa33(0x37a)]()),this[_0x22fa33(0x171)]();}['_listenToNetworkCondition'](){const _0x54a864=_0x1f5521;this[_0x54a864(0x2b4)]&&this[_0x54a864(0x34e)](this['_networkConditionService'][_0x54a864(0x1d3)]['subscribe'](_0x5bd295=>{const _0x4811f9=_0x54a864;_0x5bd295&&this['reconnect'](),_0x5bd295||this[_0x4811f9(0x152)][_0x4811f9(0x154)](_0x58859d=>this[_0x4811f9(0x2a5)](_0x58859d));}));}[_0x1f5521(0x1ee)](){const _0x54c86e=_0x1f5521;super[_0x54c86e(0x1ee)](),this[_0x54c86e(0x152)][_0x54c86e(0x154)](_0x9088b7=>{const _0xb630cc=_0x54c86e;var _0xcf2290,_0x2fef78;(_0xcf2290=_0x9088b7[_0xb630cc(0x2d0)])==null||_0xcf2290['unsubscribe'](),_0x9088b7[_0xb630cc(0x2d0)]=null,this[_0xb630cc(0x184)](_0x9088b7),this[_0xb630cc(0x28c)](_0x9088b7),this[_0xb630cc(0x34a)](_0x9088b7),(_0x2fef78=_0x9088b7['socket$'][_0xb630cc(0x3ca)]())==null||_0x2fef78[_0xb630cc(0x301)](),_0x9088b7[_0xb630cc(0x3dd)][_0xb630cc(0x185)]();}),this['_socketChannels'][_0x54c86e(0x2bd)](),this[_0x54c86e(0x166)][_0x54c86e(0x154)](_0x125ac0=>_0x125ac0[_0x54c86e(0x1ee)]()),this['_sessions']['clear'](),this['_sessionChannels']['clear'](),this[_0x54c86e(0x349)][_0x54c86e(0x185)]();}async[_0x1f5521(0x221)](_0x880289,_0x1eec47){const _0x5aab69=_0x1f5521;if(this['_sessions']['has'](_0x880289))return this['_sessions'][_0x5aab69(0x20c)](_0x880289);let _0x5b1d9f=this[_0x5aab69(0x33e)][_0x5aab69(0x20c)](_0x880289);if(_0x5b1d9f)return _0x5b1d9f;let _0x1611c9=this[_0x5aab69(0x383)](_0x880289,_0x1eec47);this[_0x5aab69(0x33e)]['set'](_0x880289,_0x1611c9);try{return await _0x1611c9;}finally{this['_pendingSessions'][_0x5aab69(0x204)](_0x880289);}}async[_0x1f5521(0x383)](_0x4dba68,_0x50a7e6){const _0x300400=_0x1f5521;let _0x526bd6=await this['_resolveSessionIdentity'](_0x4dba68,_0x50a7e6),_0x50513f=this[_0x300400(0x3bf)](_0x526bd6[_0x300400(0x1ef)][_0x300400(0x1b8)]);this[_0x300400(0x1d4)](_0x50513f);let _0x3e9cb5=this[_0x300400(0x391)][_0x300400(0x351)](Vt,_0x526bd6,_0x50513f[_0x300400(0x3dd)]['asObservable']());return this[_0x300400(0x166)][_0x300400(0x16f)](_0x4dba68,_0x3e9cb5),this[_0x300400(0x28d)]['set'](_0x4dba68,_0x50513f[_0x300400(0x33f)]),_0x3e9cb5;}['closeSession'](_0x3fad62){const _0xbe0bf4=_0x1f5521;let _0x2ce926=this[_0xbe0bf4(0x166)][_0xbe0bf4(0x20c)](_0x3fad62),_0xaf0210=this[_0xbe0bf4(0x28d)][_0xbe0bf4(0x20c)](_0x3fad62);if(_0x2ce926&&(this[_0xbe0bf4(0x166)][_0xbe0bf4(0x204)](_0x3fad62),this[_0xbe0bf4(0x28d)][_0xbe0bf4(0x204)](_0x3fad62),_0x2ce926[_0xbe0bf4(0x301)]()),_0xaf0210&&!this[_0xbe0bf4(0x1d2)](_0xaf0210)){var _0xc5c7a3;let _0x5c7aff=this[_0xbe0bf4(0x152)][_0xbe0bf4(0x20c)](_0xaf0210);_0x5c7aff==null||(_0xc5c7a3=_0x5c7aff[_0xbe0bf4(0x3dd)][_0xbe0bf4(0x3ca)]())==null||_0xc5c7a3[_0xbe0bf4(0x301)]();}}['reconnect'](){const _0x284e74=_0x1f5521;(this['_socketChannels'][_0x284e74(0x21b)]?[...this[_0x284e74(0x152)][_0x284e74(0x2b7)]()]:[this[_0x284e74(0x3bf)](void 0x0)])[_0x284e74(0x154)](_0x30d59f=>{const _0xd23391=_0x284e74;_0x30d59f[_0xd23391(0x17e)]=0x0,this['_clearRetryConnectingTimer'](_0x30d59f),this[_0xd23391(0x2f6)](_0x30d59f);});}[_0x1f5521(0x184)](_0x46d797){const _0x349182=_0x1f5521;_0x46d797[_0x349182(0x380)]!=null&&(clearTimeout(_0x46d797[_0x349182(0x380)]),_0x46d797[_0x349182(0x380)]=null);}async['_createSocket'](_0x35b62c){const _0xd8d430=_0x1f5521;let _0x4d37e5=this[_0xd8d430(0x2a1)][_0xd8d430(0x1d1)](R),_0x54870c=_0x35b62c[_0xd8d430(0x1b8)]??(_0x4d37e5==null?void 0x0:_0x4d37e5[_0xd8d430(0x157)])??_0xd8d430(0x1e7),_0x253ebc=await this[_0xd8d430(0x374)][_0xd8d430(0x298)](_0x54870c);return _0x35b62c['candidateSocket']=_0x253ebc,_0x253ebc;}async[_0x1f5521(0x1d4)](_0xa66ad0){const _0x27e057=_0x1f5521;try{let _0x466d5e=_0xa66ad0['socket$'][_0x27e057(0x3ca)]()??_0xa66ad0[_0x27e057(0x1e3)]??await this['_createSocket'](_0xa66ad0);if(_0x466d5e){var _0x4ec82f;let _0x203896=_0x466d5e[_0x27e057(0x3bb)];_0x466d5e['send']=_0x45b693=>(_0x45b693[_0x27e057(0x381)]!==_0x45aed2['LEAVE']&&this[_0x27e057(0x395)](_0xa66ad0),_0x203896[_0x27e057(0x1bd)](_0x466d5e,[_0x45b693])),(_0x4ec82f=_0xa66ad0[_0x27e057(0x2d0)])==null||_0x4ec82f[_0x27e057(0x26f)](),_0xa66ad0[_0x27e057(0x2d0)]=null,_0xa66ad0[_0x27e057(0x2d0)]=_0x466d5e['message$'][_0x27e057(0x2dc)](_0x55b2c0=>this[_0x27e057(0x158)](_0xa66ad0,_0x466d5e,_0x55b2c0)),_0x466d5e[_0x27e057(0x170)]['pipe'](_0x12e312(0x1))[_0x27e057(0x2dc)](_0x19536f=>this['_logService'][_0x27e057(0x2fc)](_0x27e057(0x1f0),_0x19536f)),_0x466d5e['open$']['pipe'](_0x12e312(0x1))[_0x27e057(0x2dc)](()=>{const _0x3645af=_0x27e057;this[_0x3645af(0x334)](_0xa66ad0,_0x466d5e);}),_0x466d5e[_0x27e057(0x26e)][_0x27e057(0x220)](_0x12e312(0x1))[_0x27e057(0x2dc)](_0x59e110=>{const _0x42badf=_0x27e057;this[_0x42badf(0x2dd)][_0x42badf(0x35a)](_0x42badf(0x38c),_0x42badf(0x3a2),_0x59e110),this[_0x42badf(0x3c5)](_0xa66ad0);});}}catch(_0x16248e){this[_0x27e057(0x2dd)][_0x27e057(0x2fc)](_0x16248e),this['_onConnectionFailed'](_0xa66ad0);}}[_0x1f5521(0x334)](_0x3354a6,_0x1d8048){const _0x3adc5c=_0x1f5521;this['_logService'][_0x3adc5c(0x35a)](_0x3adc5c(0x38c),_0x3adc5c(0x323)),_0x1d8048[_0x3adc5c(0x3bb)]({'cmd':_0x45aed2[_0x3adc5c(0x23a)]}),this['_rescheduleHeartbeat'](_0x3354a6);}[_0x1f5521(0x2a5)](_0x3576be){const _0x443d6a=_0x1f5521;_0x3576be[_0x443d6a(0x1c1)]=!0x1,_0x3576be[_0x443d6a(0x1e3)]=null,this[_0x443d6a(0x349)][_0x443d6a(0x1ae)](0x2),_0x3576be[_0x443d6a(0x3dd)][_0x443d6a(0x1ae)](null),this[_0x443d6a(0x28c)](_0x3576be),this[_0x443d6a(0x34a)](_0x3576be);}[_0x1f5521(0x3c5)](_0x2984c2){const _0x55a1f7=_0x1f5521;this['_onOffline'](_0x2984c2),this['_hasSessionsForEndpoint'](_0x2984c2[_0x55a1f7(0x33f)])&&(_0x2984c2[_0x55a1f7(0x17e)]<(this['_configService'][_0x55a1f7(0x1d1)](_0x55a1f7(0x2a2))??0x3)?(this['_collaborationUIEventService'][_0x55a1f7(0x205)]({'id':_0x55a1f7(0x2a0)}),this[_0x55a1f7(0x2f6)](_0x2984c2)):this['_collaborationUIEventService'][_0x55a1f7(0x205)]({'id':'SOCKET_FAILED'}));}[_0x1f5521(0x2f6)](_0x5670e2){const _0xa05978=_0x1f5521;let _0x98abc6=_0x5670e2[_0xa05978(0x17e)],_0x21dd43=this['_configService'][_0xa05978(0x1d1)](R),_0x11900b=_0x98abc6===0x0?0x0:((_0x21dd43==null?void 0x0:_0x21dd43[_0xa05978(0x172)])??0x4e20)*0x2**_0x98abc6;_0x5670e2[_0xa05978(0x380)]=setTimeout(()=>{const _0x10b76e=_0xa05978;clearTimeout(_0x5670e2['retryConnectingTimer']),_0x5670e2[_0x10b76e(0x380)]=null,this[_0x10b76e(0x1d4)](_0x5670e2);},_0x11900b),_0x5670e2[_0xa05978(0x17e)]+=0x1;}async[_0x1f5521(0x37c)](_0x52f72c,_0x3492d9){const _0x3f5c1d=_0x1f5521;return jn(_0x52f72c,_0x3492d9,await this[_0x3f5c1d(0x384)][_0x3f5c1d(0x186)]({'unitId':_0x52f72c,'unitType':_0x3492d9}));}[_0x1f5521(0x158)](_0xaaee99,_0x53af3c,_0x164982){const _0x8993ba=_0x1f5521;let {cmd:_0x116103}=_0x164982;_0x116103===_0x45aed2[_0x8993ba(0x23a)]&&!_0xaaee99[_0x8993ba(0x1c1)]&&(_0x53af3c[_0x8993ba(0x235)]=_0x164982['data'][_0x8993ba(0x235)],_0xaaee99[_0x8993ba(0x3dd)][_0x8993ba(0x1ae)](_0x53af3c),this[_0x8993ba(0x349)][_0x8993ba(0x1ae)](0x3),_0xaaee99[_0x8993ba(0x1c1)]=!0x0,_0xaaee99['candidateSocket']=null),_0x116103===_0x45aed2[_0x8993ba(0x230)]&&this[_0x8993ba(0x28c)](_0xaaee99),this[_0x8993ba(0x395)](_0xaaee99);}[_0x1f5521(0x1d2)](_0x5b7ca5){const _0x3900b1=_0x1f5521;return[...this[_0x3900b1(0x28d)]['values']()][_0x3900b1(0x2ae)](_0x242f49=>_0x242f49===_0x5b7ca5);}['_getSocketChannel'](_0x252b26){const _0x4d19ed=_0x1f5521;let _0xb56752=_0x252b26??'',_0x8b5ab8=this[_0x4d19ed(0x152)][_0x4d19ed(0x20c)](_0xb56752);if(_0x8b5ab8)return _0x8b5ab8;let _0x112eb6={'endpointKey':_0xb56752,'endpoint':_0x252b26,'socket$':new _0x21afa9(void 0x0),'candidateSocket':null,'socketReady':!0x1,'socketMessageSubscription':null,'retryConnectingTimer':null,'retryCount':0x0,'sendHeartbeatTimer':null,'timeoutTimer':null};return this[_0x4d19ed(0x152)]['set'](_0xb56752,_0x112eb6),_0x112eb6;}[_0x1f5521(0x395)](_0x1f9d2e){const _0x368d17=_0x1f5521;this[_0x368d17(0x34a)](_0x1f9d2e),_0x1f9d2e['sendHeartbeatTimer']=setTimeout(()=>this[_0x368d17(0x20a)](_0x1f9d2e),this['_configService'][_0x368d17(0x1d1)](_0x368d17(0x305))??0x7530);}[_0x1f5521(0x20a)](_0x5c078a){const _0x3af08d=_0x1f5521;_0x5c078a[_0x3af08d(0x3dd)][_0x3af08d(0x3ca)]()['send']({'cmd':_0x45aed2[_0x3af08d(0x230)]}),this[_0x3af08d(0x36d)](_0x5c078a);}[_0x1f5521(0x36d)](_0x47523d){const _0x27a390=_0x1f5521;_0x47523d[_0x27a390(0x14e)]=setTimeout(()=>this[_0x27a390(0x3c5)](_0x47523d),this['_configService'][_0x27a390(0x1d1)](_0x27a390(0x3a3))??0x4e20);}[_0x1f5521(0x34a)](_0xc86519){const _0x593424=_0x1f5521;_0xc86519[_0x593424(0x3b2)]!=null&&(clearTimeout(_0xc86519['sendHeartbeatTimer']),_0xc86519['sendHeartbeatTimer']=null);}[_0x1f5521(0x28c)](_0x5837dc){const _0x223240=_0x1f5521;_0x5837dc[_0x223240(0x14e)]!=null&&(clearTimeout(_0x5837dc[_0x223240(0x14e)]),_0x5837dc['timeoutTimer']=null);}};Mn=H([V(0x0,_0x32c7b6(_0xd2295f)),V(0x1,_0x3849f9),V(0x2,_0x123a79),V(0x3,En),V(0x4,_0x32c7b6(B)),V(0x5,kn),V(0x6,_0x100ce1(Cn))],Mn);let Nn=class extends _0x2fb3e4{constructor(_0x14b777,_0x5e00d5,_0x2e90dd,_0x4890c5){const _0x1cac74=_0x1f5521;var _0xad7f37;super(),this[_0x1cac74(0x391)]=_0x14b777,this[_0x1cac74(0x2d6)]=_0x5e00d5,this[_0x1cac74(0x2a1)]=_0x2e90dd,this[_0x1cac74(0x329)]=_0x4890c5,z(this,_0x1cac74(0x353),new Map()),z(this,_0x1cac74(0x3e1),new _0x548400()),z(this,_0x1cac74(0x326),this[_0x1cac74(0x3e1)][_0x1cac74(0x37a)]()),((_0xad7f37=this[_0x1cac74(0x2a1)]['getConfig'](_0x1cac74(0x203)))==null?void 0x0:_0xad7f37['enableCollaboration'])!==!0x1&&this[_0x1cac74(0x29a)]();}[_0x1f5521(0x1ee)](){const _0x1adfc6=_0x1f5521;super[_0x1adfc6(0x1ee)](),this['_entities'][_0x1adfc6(0x154)](_0x2e5171=>_0x2e5171[_0x1adfc6(0x1ee)]()),this['_entities'][_0x1adfc6(0x2bd)]();}[_0x1f5521(0x245)](_0x35d81c){const _0x26b673=_0x1f5521;return this[_0x26b673(0x353)][_0x26b673(0x20c)](_0x35d81c)??null;}[_0x1f5521(0x1dd)](_0x1905c8){const _0x398c2b=_0x1f5521;let _0x47423c=this[_0x398c2b(0x245)](_0x1905c8);return _0x47423c?_0x195754(_0x47423c):this['_entityInit$'][_0x398c2b(0x220)](_0x3dc9b5(_0x42a953=>_0x42a953[_0x398c2b(0x322)]===_0x1905c8));}[_0x1f5521(0x32b)](_0xd0f694){const _0xc6cb2=_0x1f5521;return _0x199bcd(this[_0xc6cb2(0x1dd)](_0xd0f694)[_0xc6cb2(0x220)](_0x55a320(()=>void 0x0)));}[_0x1f5521(0x29a)](){const _0x30b8fe=_0x1f5521;this['_univerInstanceService']['getTypeOfUnitAdded$'](_0x4f4a88[_0x30b8fe(0x399)])['pipe'](_0x10e0d6(this['dispose$']),_0x42710a(0x10))[_0x30b8fe(0x2dc)](async _0x5e8d61=>{const _0x25b89a=_0x30b8fe;let _0x426e14=_0x5e8d61[_0x25b89a(0x144)][_0x25b89a(0x3d7)](),_0x1dd264=await this[_0x25b89a(0x13f)](_0x426e14,_0x4f4a88['UNIVER_SHEET']);this[_0x25b89a(0x353)]['set'](_0x426e14,_0x1dd264);}),this[_0x30b8fe(0x329)][_0x30b8fe(0x1be)](_0x4f4a88[_0x30b8fe(0x33c)])[_0x30b8fe(0x220)](_0x10e0d6(this['dispose$']),_0x42710a(0x10))[_0x30b8fe(0x220)](_0x3dc9b5(_0x50b1a2=>!_0x50b1a2[_0x30b8fe(0x144)][_0x30b8fe(0x3d7)]()[_0x30b8fe(0x173)]('__')))[_0x30b8fe(0x2dc)](async _0x16ea43=>{const _0xa905f6=_0x30b8fe;let _0x10b847=_0x16ea43[_0xa905f6(0x144)][_0xa905f6(0x3d7)](),_0x52e1b9=await this[_0xa905f6(0x13f)](_0x10b847,_0x4f4a88[_0xa905f6(0x33c)]);this[_0xa905f6(0x353)][_0xa905f6(0x16f)](_0x10b847,_0x52e1b9);}),this[_0x30b8fe(0x329)]['getTypeOfUnitAdded$'](_0x4f4a88[_0x30b8fe(0x194)])[_0x30b8fe(0x220)](_0x10e0d6(this[_0x30b8fe(0x201)]),_0x42710a(0x10))[_0x30b8fe(0x2dc)](async _0x2f0c16=>{const _0x48304a=_0x30b8fe;let _0x49b07f=_0x2f0c16[_0x48304a(0x144)][_0x48304a(0x3d7)](),_0x236207=await this[_0x48304a(0x13f)](_0x49b07f,_0x4f4a88[_0x48304a(0x194)]);this[_0x48304a(0x353)][_0x48304a(0x16f)](_0x49b07f,_0x236207);}),this[_0x30b8fe(0x329)][_0x30b8fe(0x1be)](_0x4f4a88[_0x30b8fe(0x2cb)])[_0x30b8fe(0x220)](_0x10e0d6(this[_0x30b8fe(0x201)]),_0x42710a(0x10))[_0x30b8fe(0x2dc)](async _0x200065=>{const _0x139e13=_0x30b8fe;let _0x373dc3=_0x200065['unit'][_0x139e13(0x3d7)](),_0x4ab74c=await this[_0x139e13(0x13f)](_0x373dc3,_0x4f4a88[_0x139e13(0x2cb)]);this[_0x139e13(0x353)][_0x139e13(0x16f)](_0x373dc3,_0x4ab74c);}),this['_univerInstanceService'][_0x30b8fe(0x1be)](_0x4f4a88[_0x30b8fe(0x337)])[_0x30b8fe(0x220)](_0x10e0d6(this[_0x30b8fe(0x201)]),_0x42710a(0x10))[_0x30b8fe(0x2dc)](async _0x5e174d=>{const _0x4a61a8=_0x30b8fe;let _0x22d527=_0x5e174d[_0x4a61a8(0x144)][_0x4a61a8(0x3d7)](),_0x26fd7d=await this[_0x4a61a8(0x13f)](_0x22d527,_0x4f4a88[_0x4a61a8(0x337)]);this['_entities']['set'](_0x22d527,_0x26fd7d);}),this[_0x30b8fe(0x329)]['getTypeOfUnitAdded$'](_0x4f4a88[_0x30b8fe(0x3b9)])[_0x30b8fe(0x220)](_0x10e0d6(this[_0x30b8fe(0x201)]),_0x42710a(0x10))[_0x30b8fe(0x2dc)](async _0x5ba56c=>{const _0x4d88a9=_0x30b8fe;let _0x3fa4fb=_0x5ba56c['unit']['getUnitId'](),_0x4783dc=await this[_0x4d88a9(0x13f)](_0x3fa4fb,_0x4f4a88['UNIVER_PDF']);this[_0x4d88a9(0x353)][_0x4d88a9(0x16f)](_0x3fa4fb,_0x4783dc);}),_0x48bcdd(this[_0x30b8fe(0x329)][_0x30b8fe(0x1fe)](_0x4f4a88[_0x30b8fe(0x399)]),this[_0x30b8fe(0x329)][_0x30b8fe(0x1fe)](_0x4f4a88['UNIVER_DOC']),this[_0x30b8fe(0x329)]['getTypeOfUnitDisposed$'](_0x4f4a88[_0x30b8fe(0x194)]),this[_0x30b8fe(0x329)][_0x30b8fe(0x1fe)](_0x4f4a88[_0x30b8fe(0x2cb)]),this['_univerInstanceService'][_0x30b8fe(0x1fe)](_0x4f4a88['UNIVER_BASE']),this[_0x30b8fe(0x329)]['getTypeOfUnitDisposed$'](_0x4f4a88[_0x30b8fe(0x3b9)]))[_0x30b8fe(0x220)](_0x10e0d6(this[_0x30b8fe(0x201)]))[_0x30b8fe(0x2dc)](_0x4a8848=>{const _0x113ddd=_0x30b8fe;let _0x87f700=_0x4a8848[_0x113ddd(0x3d7)](),_0x4feb8f=this[_0x113ddd(0x353)][_0x113ddd(0x20c)](_0x87f700);_0x4feb8f&&(_0x4feb8f['dispose'](),this[_0x113ddd(0x353)][_0x113ddd(0x204)](_0x87f700));});}async[_0x1f5521(0x13f)](_0x1f2f8e,_0x2aef24){const _0xb34a2a=_0x1f5521;let _0x2824b4=await this[_0xb34a2a(0x2d6)][_0xb34a2a(0x221)](_0x1f2f8e),_0x221cff=this[_0xb34a2a(0x391)][_0xb34a2a(0x351)](this['_getCtorByUniverInstanceType'](_0x2aef24),_0x1f2f8e,_0x2aef24,_0x2824b4);return await _0x221cff[_0xb34a2a(0x2c2)](),this[_0xb34a2a(0x3e1)]['next'](_0x221cff),_0x221cff;}[_0x1f5521(0x3d0)](_0x59c382){const _0x30cadf=_0x1f5521;switch(_0x59c382){case _0x4f4a88['UNIVER_DOC']:return _n;case _0x4f4a88[_0x30cadf(0x399)]:return yn;case _0x4f4a88['UNIVER_SLIDE']:return bn;case _0x4f4a88['UNIVER_BOARD']:return xn;case _0x4f4a88['UNIVER_BASE']:return vn;case _0x4f4a88[_0x30cadf(0x3b9)]:return Sn;default:throw Error(_0x30cadf(0x217)+_0x59c382);}}};Nn=H([V(0x0,_0x32c7b6(_0xd2295f)),V(0x1,_0x32c7b6(Mn)),V(0x2,_0x123a79),V(0x3,_0x238a9e)],Nn);var Pn=_0x1f5521(0x309),Fn=_0x1f5521(0x346);let In=class extends _0x13fb6a{constructor(_0x1ab00e,_0x39cd77){const _0x32f98c=_0x1f5521;super(),this[_0x32f98c(0x329)]=_0x1ab00e,this[_0x32f98c(0x2a1)]=_0x39cd77,this['_init']();}[_0x1f5521(0x29a)](){const _0x2222cf=_0x1f5521;this[_0x2222cf(0x34e)](this[_0x2222cf(0x329)][_0x2222cf(0x25a)][_0x2222cf(0x2dc)](()=>{const _0x1b142a=_0x2222cf;let _0x3cf655=this['_univerInstanceService'][_0x1b142a(0x234)](),_0x25fa61=this[_0x1b142a(0x2a1)]['getConfig']('DEFAULT_FILE_NAME')??_0x1b142a(0x14d);_0x3cf655 instanceof _0x1005dd&&(_0x25fa61=_0x3cf655[_0x1b142a(0x218)]),document[_0x1b142a(0x345)]=_0x25fa61;}));}};In=H([V(0x0,_0x238a9e),V(0x1,_0x123a79)],In);const Ln=_0x382d48(_0x1f5521(0x1e1));let Rn=class{constructor(_0x9f8b07,_0x55ac6d,_0x247b57){const _0xee9372=_0x1f5521;this[_0xee9372(0x317)]=_0x9f8b07,this['_configService']=_0x55ac6d,this[_0xee9372(0x329)]=_0x247b57;}[_0x1f5521(0x1df)](){const _0x1d97df=_0x1f5521;return this['_getConfig']()[_0x1d97df(0x1b2)]??{};}async[_0x1f5521(0x3bd)](_0x26fafd){const _0xeaa64c=_0x1f5521;let _0x3f85f6=this[_0xeaa64c(0x1df)]();if(zn(_0x26fafd,_0x3f85f6),_0x3f85f6[_0xeaa64c(0x16c)])return _0x3f85f6[_0xeaa64c(0x16c)](_0x26fafd);let _0xad0f7f=await this[_0xeaa64c(0x206)](_0x26fafd);return{'id':_0xad0f7f,'name':_0x26fafd[_0xeaa64c(0x218)],'mimeType':_0x26fafd[_0xeaa64c(0x258)],'size':_0x26fafd[_0xeaa64c(0x21b)],'sourceType':_0x36d131['UUID'],'source':_0xad0f7f};}async[_0x1f5521(0x31b)](_0x775aab,_0x46d216){const _0x8d077=_0x1f5521;if(_0x46d216!==_0x36d131['UUID'])return _0x775aab;let _0x13442f=(await this[_0x8d077(0x317)]['get'](this[_0x8d077(0x2cd)]()['replace'](_0x8d077(0x3ce),_0x775aab)))[_0x8d077(0x1c3)];if(_0x13442f[_0x8d077(0x2fc)]&&_0x13442f[_0x8d077(0x2fc)][_0x8d077(0x26d)]!==_0x5caf42['OK'])throw _0x13442f[_0x8d077(0x2fc)];if(!_0x13442f[_0x8d077(0x389)])throw Error(_0x8d077(0x295));return _0x3de6a3(_0x13442f[_0x8d077(0x389)],this[_0x8d077(0x197)]());}async['_upload'](_0x1901f1){const _0x1ec761=_0x1f5521;let _0x50f9f3=this['_univerInstanceService'][_0x1ec761(0x234)](),_0x5c7f62=_0x50f9f3==null?void 0x0:_0x50f9f3[_0x1ec761(0x3d7)]();if(!_0x5c7f62)throw Error('[CollaborationAttachmentIoService]:\x20unitId\x20is\x20not\x20found.');let _0x50c877=new FormData();_0x50c877[_0x1ec761(0x191)](_0x1ec761(0x22e),_0x1901f1);let _0x207117=this[_0x1ec761(0x32f)]()+_0x1ec761(0x2ad)+_0x1901f1[_0x1ec761(0x21b)][_0x1ec761(0x252)]()+'&source='+_0x52302f['UnitEmbedded']+_0x1ec761(0x16a)+encodeURIComponent(_0x5c7f62),_0x291088=(await this[_0x1ec761(0x317)][_0x1ec761(0x160)](_0x207117,{'body':_0x50c877}))[_0x1ec761(0x1c3)][_0x1ec761(0x2d1)];if(typeof _0x291088!=_0x1ec761(0x239)||!_0x291088)throw Error(_0x1ec761(0x1f8));return _0x291088;}[_0x1f5521(0x32f)](){const _0x3c58c2=_0x1f5521;return this[_0x3c58c2(0x179)]()[_0x3c58c2(0x1d5)]??_0x3c58c2(0x1a6);}['_getSignURL'](){const _0x3cb3e1=_0x1f5521;return this[_0x3cb3e1(0x179)]()[_0x3cb3e1(0x151)]??_0x3cb3e1(0x1b5);}[_0x1f5521(0x197)](){const _0xae4d73=_0x1f5521;let _0x577708=this[_0xae4d73(0x179)]();return _0x577708[_0xae4d73(0x299)]?_0x577708[_0xae4d73(0x299)]:typeof location<'u'?location[_0xae4d73(0x3b3)]:_0x577708[_0xae4d73(0x1d5)]??'';}[_0x1f5521(0x179)](){const _0x753efa=_0x1f5521;return this['_configService'][_0x753efa(0x1d1)]('collaboration-client.config')??{};}};Rn=H([V(0x0,_0x32c7b6(_0x314f58)),V(0x1,_0x32c7b6(_0x123a79)),V(0x2,_0x32c7b6(_0x238a9e))],Rn);function zn(_0x4d2afb,_0x5b42c8){const _0x48d3ef=_0x1f5521;var _0x3238a2;if(_0x5b42c8[_0x48d3ef(0x1c9)]!=null&&_0x4d2afb['size']>_0x5b42c8['maxSize'])throw Error('[CollaborationAttachmentIoService]:\x20attachment\x20exceeds\x20max\x20size.');if((_0x3238a2=_0x5b42c8[_0x48d3ef(0x3aa)])!=null&&_0x3238a2[_0x48d3ef(0x316)]&&!_0x5b42c8['accept'][_0x48d3ef(0x2ae)](_0x52ca5f=>_0x4d2afb[_0x48d3ef(0x258)]===_0x52ca5f||_0x4d2afb[_0x48d3ef(0x218)][_0x48d3ef(0x1f7)](_0x52ca5f)||_0x52ca5f[_0x48d3ef(0x1f7)]('/*')&&_0x4d2afb['type'][_0x48d3ef(0x173)](_0x52ca5f[_0x48d3ef(0x2ca)](0x0,-0x1))))throw Error('[CollaborationAttachmentIoService]:\x20attachment\x20type\x20is\x20not\x20accepted.');}let Bn=class{constructor(_0x1cacdc,_0x4c884f,_0x3722e8){const _0x2d1403=_0x1f5521;this[_0x2d1403(0x2a1)]=_0x1cacdc,this[_0x2d1403(0x317)]=_0x4c884f,this[_0x2d1403(0x2ce)]=_0x3722e8,this[_0x2d1403(0x2c2)]();}[_0x1f5521(0x2c2)](){const _0x54fc5e=_0x1f5521;this[_0x54fc5e(0x317)]['registerHTTPInterceptor']({'priority':0x1,'interceptor':(_0x5523a9,_0x137313)=>_0x137313(_0x5523a9)[_0x54fc5e(0x220)](_0x1b7252(async _0x3d5f5a=>{const _0x3fe44f=_0x54fc5e;let _0x5be999=_0x3d5f5a;if(_0x5be999[_0x3fe44f(0x1fc)]===0x191){if(typeof window>'u')throw Error(_0x3fe44f(0x2b6));if(window[_0x3fe44f(0x1f9)](this[_0x3fe44f(0x2ce)]['t'](_0x3fe44f(0x21e)))){let _0x93dd73=window[_0x3fe44f(0x392)](window['location']['href']);window[_0x3fe44f(0x2db)][_0x3fe44f(0x1ca)]=this[_0x3fe44f(0x214)]()+_0x3fe44f(0x178)+_0x93dd73;}}return _0x5be999;}))});}[_0x1f5521(0x214)](){const _0x3d519f=_0x1f5521;let _0x3032c5=this[_0x3d519f(0x2a1)][_0x3d519f(0x1d1)](R);return(_0x3032c5==null?void 0x0:_0x3032c5[_0x3d519f(0x257)])??_0x3d519f(0x3be);}};Bn=H([V(0x0,_0x123a79),V(0x1,_0x32c7b6(_0x314f58)),V(0x2,_0x32c7b6(_0xed8942))],Bn);let Vn=class extends _0x13fb6a{constructor(_0x5305d8,_0x35fd97){const _0x591de4=_0x1f5521;super(),this[_0x591de4(0x1d9)]=_0x5305d8,this[_0x591de4(0x2a1)]=_0x35fd97,z(this,'_cfgEnableObjInherit',!0x1),this[_0x591de4(0x254)]();}[_0x1f5521(0x254)](){const _0x5b427a=_0x1f5521;let _0x2188a5=this;this['disposeWithMe'](this['_HTTPService'][_0x5b427a(0x163)]({'priority':0x3e7,'interceptor':_0x113520({'isMatch'(_0x318a63){const _0x50ccc5=_0x5b427a;var _0x54a80d;if(_0x318a63[_0x50ccc5(0x331)]==='POST'&&(_0x54a80d=_0x318a63[_0x50ccc5(0x19f)])!=null&&_0x54a80d[_0x50ccc5(0x1c3)]){let {objectID:_0x3f1244,objectType:_0x19ef10}=_0x318a63[_0x50ccc5(0x19f)]['body']||{};if(!_0x3f1244||_0x19ef10===void 0x0)return!0x1;let _0xa7e7de=_0x2188a5[_0x50ccc5(0x3d3)]()+'/'+_0x19ef10+_0x50ccc5(0x213)+_0x3f1244+_0x50ccc5(0x280);if(_0x318a63['url']===_0xa7e7de)return!0x0;}return!0x1;},'getParamsFromRequest'(_0x477c60){const _0x223a0f=_0x5b427a;var _0x131478;return(_0x131478=_0x477c60[_0x223a0f(0x19f)])==null?void 0x0:_0x131478['body'];},'mergeParamsToRequest'(_0x578b5f,_0x20ba01){const _0x1cfe41=_0x5b427a;let _0x4cb814=_0x2188a5[_0x1cfe41(0x3d3)]()+_0x1cfe41(0x1a0),_0x4cd5ab=_0x578b5f[_0x1cfe41(0x18e)]((_0x4c295e,_0x5eadde)=>{const _0x318ae8=_0x1cfe41;let {unitID:_0x105028,objectID:_0x50edd6,objectType:_0x17abc8,actions:_0xecd677}=_0x5eadde;return _0x4c295e[_0x105028]||(_0x4c295e[_0x105028]={}),_0x4c295e[_0x105028][_0x50edd6]||(_0x4c295e[_0x105028][_0x50edd6]={'objectID':_0x50edd6,'objectType':_0x17abc8,'actions':[]}),_0x4c295e[_0x105028][_0x50edd6]['actions'][_0x318ae8(0x1cf)](..._0xecd677),_0x4c295e;},{}),_0x1e200e=[];for(let _0x591388 in _0x4cd5ab)for(let _0xacaee in _0x4cd5ab[_0x591388]){let {actions:_0xd8fc82,objectType:_0x143826}=_0x4cd5ab[_0x591388][_0xacaee],_0x5b7f8c=[...new Set(_0xd8fc82)];_0x1e200e[_0x1cfe41(0x1cf)]({'unitID':_0x591388,'objectID':_0xacaee,'objectType':_0x143826,'actions':_0x5b7f8c});}return new _0x3570bd(_0x1cfe41(0x365),_0x4cb814,{'headers':_0x20ba01['headers'],'withCredentials':_0x20ba01[_0x1cfe41(0x14c)],'responseType':_0x20ba01['responseType'],'body':{'requests':_0x1e200e}});}},{'distributeResult'(_0x42285e,_0x56e009){const _0x4bbfae=_0x5b427a;let {objectActions:_0x510b71}=_0x42285e;return _0x56e009[_0x4bbfae(0x2ea)](_0x2c7e40=>{const _0x181845=_0x4bbfae;let {unitID:_0x3e0191,objectID:_0x25dbaf,actions:_0x5376c3}=_0x2c7e40,_0x29a571=_0x510b71[_0x181845(0x209)](_0xbb18ec=>_0xbb18ec['unitID']===_0x3e0191&&_0xbb18ec[_0x181845(0x303)]===_0x25dbaf);return{'config':_0x2c7e40,'result':{'actions':_0x5376c3['map'](_0x46069e=>_0x29a571==null?void 0x0:_0x29a571['actions']['find'](_0x148b88=>_0x148b88['action']===_0x46069e))[_0x181845(0x261)](_0x308449=>!!_0x308449),'error':_0x42285e[_0x181845(0x2fc)]}};});}})}));}[_0x1f5521(0x3d3)](){const _0x2eb382=_0x1f5521;let _0x15b042=this[_0x2eb382(0x2a1)]['getConfig'](R);return(_0x15b042==null?void 0x0:_0x15b042[_0x2eb382(0x2ef)])??_0x2eb382(0x273);}async['create'](_0x425ed9){const _0x438b0f=_0x1f5521;let _0x3ee360=this[_0x438b0f(0x3d3)]()+'/'+_0x425ed9[_0x438b0f(0x30f)]+_0x438b0f(0x1c2);return(await this[_0x438b0f(0x1d9)][_0x438b0f(0x160)](_0x3ee360,{'body':_0x425ed9}))[_0x438b0f(0x1c3)][_0x438b0f(0x303)]||'';}async[_0x1f5521(0x3b7)](_0x34b248){const _0x4d4499=_0x1f5521;let _0x3f99c7=this['_getAPIPrefixPath']()+'/-/object/list';return(await this[_0x4d4499(0x1d9)][_0x4d4499(0x160)](_0x3f99c7,{'body':_0x34b248}))[_0x4d4499(0x1c3)]['objects'];}async[_0x1f5521(0x253)](_0x3c8d0f){const _0x36f399=_0x1f5521;var _0x1c6913;let _0x508906=this[_0x36f399(0x3d3)]()+'/'+_0x3c8d0f[_0x36f399(0x30f)]+'/object/'+_0x3c8d0f['objectID'],_0xb9661d=await this[_0x36f399(0x1d9)]['put'](_0x508906,{'body':_0x3c8d0f});if((_0xb9661d==null||(_0x1c6913=_0xb9661d[_0x36f399(0x1c3)])==null||(_0x1c6913=_0x1c6913[_0x36f399(0x2fc)])==null?void 0x0:_0x1c6913[_0x36f399(0x26d)])!==0x1)throw Error(_0x36f399(0x3d8));}async['allowed'](_0x4a87a6){const _0x458757=_0x1f5521;let _0x148315=this['_getAPIPrefixPath']()+'/'+_0x4a87a6[_0x458757(0x30f)]+_0x458757(0x213)+_0x4a87a6['objectID']+_0x458757(0x280);return(await this[_0x458757(0x1d9)][_0x458757(0x160)](_0x148315,{'body':_0x4a87a6}))[_0x458757(0x1c3)][_0x458757(0x1d6)];}async[_0x1f5521(0x1ea)](_0x106778){const _0x5b1a3b=_0x1f5521;let _0x365a38=this[_0x5b1a3b(0x3d3)]()+_0x5b1a3b(0x1a0);return(await this[_0x5b1a3b(0x1d9)][_0x5b1a3b(0x160)](_0x365a38,{'body':{'requests':_0x106778}}))[_0x5b1a3b(0x1c3)]['objectActions'];}async[_0x1f5521(0x3a8)](_0x137d5e){const _0x1044a8=_0x1f5521;let _0x133f00=this[_0x1044a8(0x3d3)]()+'/'+_0x137d5e[_0x1044a8(0x30f)]+_0x1044a8(0x25e),_0x5eacd7=await this['_HTTPService'][_0x1044a8(0x160)](_0x133f00,{'body':_0x137d5e});return{'roles':_0x5eacd7['body'][_0x1044a8(0x26a)],'actions':_0x5eacd7[_0x1044a8(0x1c3)]['actions']};}async[_0x1f5521(0x24f)](_0x4c40d0){const _0x1030ec=_0x1f5521;let _0x261862=this[_0x1030ec(0x3d3)]()+'/collaborator';await this[_0x1030ec(0x1d9)]['delete'](_0x261862,{'params':{'collaboratorID':_0x4c40d0[_0x1030ec(0x328)],'objectID':_0x4c40d0['objectID'],'unitID':_0x4c40d0[_0x1030ec(0x322)]}});}async['updateCollaborator'](_0x2a0017){const _0x367693=_0x1f5521;let _0x2c3735=this[_0x367693(0x3d3)]()+_0x367693(0x192);await this[_0x367693(0x1d9)][_0x367693(0x2fe)](_0x2c3735,{'body':_0x2a0017});}async[_0x1f5521(0x2cf)](_0x2d0df0){const _0x31935d=_0x1f5521;let _0x187969=this[_0x31935d(0x3d3)]()+_0x31935d(0x192);await this[_0x31935d(0x1d9)][_0x31935d(0x160)](_0x187969,{'body':_0x2d0df0});}async[_0x1f5521(0x3c3)](_0x2a14d5){const _0x35468e=_0x1f5521;let _0xc33a20=this['_getAPIPrefixPath']()+'/collaborator',_0x280690=await this[_0x35468e(0x1d9)]['get'](_0xc33a20,{'params':{'objectID':_0x2a14d5[_0x35468e(0x303)],'unitID':_0x2a14d5[_0x35468e(0x322)]}});return this[_0x35468e(0x3cd)](_0x280690['body']['cfgEnableObjInherit']??!0x1),_0x280690[_0x35468e(0x1c3)][_0x35468e(0x33a)];}async['putCollaborators'](_0x456d0d){const _0x44e2ad=_0x1f5521;let _0x1e2310=this[_0x44e2ad(0x3d3)]()+'/collaborator';await this[_0x44e2ad(0x1d9)][_0x44e2ad(0x2df)](_0x1e2310,{'body':_0x456d0d});}[_0x1f5521(0x3cd)](_0x530acd){const _0x2e5e42=_0x1f5521;this[_0x2e5e42(0x3ac)]=_0x530acd;}[_0x1f5521(0x2b2)](){const _0x586f7d=_0x1f5521;return this[_0x586f7d(0x3ac)];}};Vn=H([V(0x0,_0x32c7b6(_0x314f58)),V(0x1,_0x32c7b6(_0x123a79))],Vn);function Hn(_0x42021a){const _0x41db27=_0x1f5521;let _0x3536fe=atob(_0x42021a),_0x1f7865=new Uint8Array(_0x3536fe[_0x41db27(0x316)]);for(let _0x1021c0=0x0;_0x1021c0<_0x3536fe[_0x41db27(0x316)];_0x1021c0++)_0x1f7865[_0x1021c0]=_0x3536fe[_0x41db27(0x3c9)](_0x1021c0);return _0x1f7865;}function Un(_0x5df708){const _0x5a5453=_0x1f5521;let _0x8ea7a0='';for(let _0x2ecd46=0x0;_0x2ecd46<_0x5df708[_0x5a5453(0x316)];_0x2ecd46++)_0x8ea7a0+=String[_0x5a5453(0x32c)](_0x5df708[_0x2ecd46]);return btoa(_0x8ea7a0);}function Wn(_0x25c04a,_0x44924d){let _0x5af11d=Hn(_0x44924d),_0x2dc1da=_0x585ea6(0x10);return Un(_0x27bfb1(_0x2dc1da,_0x3a25ba(_0x5af11d,_0x2dc1da)['encrypt'](_0x499a8d(_0x25c04a))));}function Gn(){const _0x51ff97=_0x1f5521;let _0x3c4072=_0x122e45()[_0x51ff97(0x1ad)];if(typeof window<'u'&&window[_0x51ff97(0x2db)]!==void 0x0&&_0x3c4072){let _0x2b8b0c={'time':Math[_0x51ff97(0x1e5)](Date[_0x51ff97(0x30b)]()/0x3e8),'domain':location['hostname']};return Wn(JSON[_0x51ff97(0x212)](_0x2b8b0c),_0x3c4072);}}let Kn=class{constructor(_0x4191b7){const _0x1057fe=_0x1f5521;this['_httpService']=_0x4191b7,this[_0x1057fe(0x233)]();}[_0x1f5521(0x233)](){const _0x5d765b=_0x1f5521;this['_httpService'][_0x5d765b(0x163)]({'interceptor':(_0x28db17,_0x4cc5df)=>{const _0x51fc70=_0x5d765b;let _0x2feeab=Gn();return _0x2feeab&&_0x28db17[_0x51fc70(0x1c7)][_0x51fc70(0x16f)](_0x51fc70(0x150),_0x2feeab),_0x4cc5df(_0x28db17);}});}};Kn=H([V(0x0,_0x32c7b6(_0x314f58))],Kn);let qn=class extends _0x2fb3e4{constructor(_0x46aa7b,_0x4e3f04,_0xdbc692){const _0x5dd315=_0x1f5521;super(),this[_0x5dd315(0x2dd)]=_0x46aa7b,this['_snapshotService']=_0x4e3f04,this[_0x5dd315(0x2ab)]=_0xdbc692,z(this,_0x5dd315(0x321),new _0x21afa9(null)),z(this,_0x5dd315(0x2a7),new _0x548400()),z(this,'unitInfo$',this['_unitInfo$'][_0x5dd315(0x37a)]()),z(this,'unitLoaded$',this[_0x5dd315(0x2a7)][_0x5dd315(0x37a)]());}['dispose'](){const _0x3062e0=_0x1f5521;super[_0x3062e0(0x1ee)](),this[_0x3062e0(0x2a7)][_0x3062e0(0x185)](),this[_0x3062e0(0x321)][_0x3062e0(0x185)]();}async[_0x1f5521(0x3cc)](_0x4b33af,_0x3d592c,_0x4e61b0,_0x1f367b){const _0x44fa6c=_0x1f5521;this[_0x44fa6c(0x321)][_0x44fa6c(0x1ae)]({'unitId':_0x4b33af,'type':_0x3d592c,'subUnitId':_0x1f367b});let _0x2587a7=null;switch(_0x3d592c){case _0x4f4a88[_0x44fa6c(0x399)]:_0x2587a7=await this['_snapshotService']['loadSheet'](_0x4b33af,_0x4e61b0,void 0x0,{'initialSubUnitId':_0x1f367b});break;case _0x4f4a88['UNIVER_DOC']:_0x2587a7=await this[_0x44fa6c(0x265)][_0x44fa6c(0x2b0)](_0x4b33af,_0x4e61b0);break;case _0x4f4a88[_0x44fa6c(0x194)]:_0x2587a7=await this[_0x44fa6c(0x265)]['loadSlide'](_0x4b33af,_0x4e61b0);break;case _0x4f4a88[_0x44fa6c(0x2cb)]:_0x2587a7=await this[_0x44fa6c(0x265)][_0x44fa6c(0x290)](_0x4b33af,_0x4e61b0);break;case _0x4f4a88[_0x44fa6c(0x337)]:_0x2587a7=await this['_snapshotService'][_0x44fa6c(0x26b)](_0x4b33af,_0x4e61b0);break;case _0x4f4a88[_0x44fa6c(0x3b9)]:_0x2587a7=await this[_0x44fa6c(0x265)][_0x44fa6c(0x30c)](_0x4b33af,_0x4e61b0);break;default:this[_0x44fa6c(0x2dd)][_0x44fa6c(0x2fc)](_0x44fa6c(0x39e),_0x44fa6c(0x34d));break;}return _0x2587a7&&this[_0x44fa6c(0x2a7)][_0x44fa6c(0x1ae)](_0x2587a7),_0x2587a7;}async[_0x1f5521(0x153)](_0x53e383,_0x3d1464,_0x2cd9d1){const _0x3d901e=_0x1f5521;var _0x5f307f;this[_0x3d901e(0x321)][_0x3d901e(0x1ae)]({'unitId':_0x53e383,'type':_0x3d1464,'subUnitId':_0x2cd9d1});let _0x1a0e56=0x0,_0x109a9f=await((_0x5f307f=this[_0x3d901e(0x2ab)])==null?void 0x0:_0x5f307f['loadOfflineData'](_0x53e383));return _0x109a9f&&(_0x109a9f[_0x3d901e(0x379)]||_0x109a9f['mutations'][_0x3d901e(0x316)]!==0x0)&&(_0x1a0e56=_0x109a9f[_0x3d901e(0x3de)]),_0x1a0e56===0x0&&this['_logService'][_0x3d901e(0x35a)]('[DataLoaderService]','fetching\x20the\x20latest\x20document\x20from\x20the\x20server.'),this[_0x3d901e(0x3cc)](_0x53e383,_0x3d1464,_0x1a0e56,_0x2cd9d1);}};qn=H([V(0x0,_0x3849f9),V(0x1,_0x32c7b6(_0xa106a3)),V(0x2,_0x100ce1(U))],qn);let Jn=class{constructor(_0x19d2d4,_0x2bb49b,_0x37c4fa){const _0xbd0a9d=_0x1f5521;this[_0xbd0a9d(0x317)]=_0x19d2d4,this[_0xbd0a9d(0x2a1)]=_0x2bb49b,this[_0xbd0a9d(0x329)]=_0x37c4fa,z(this,_0xbd0a9d(0x2fa),0x0),z(this,_0xbd0a9d(0x24e),new _0x548400()),z(this,'change$',this[_0xbd0a9d(0x24e)]),z(this,_0xbd0a9d(0x16d),new Map());}[_0x1f5521(0x141)](_0x2fe372){const _0x19bc75=_0x1f5521;this[_0x19bc75(0x2fa)]=_0x2fe372,this['_change$'][_0x19bc75(0x1ae)](_0x2fe372);}[_0x1f5521(0x2d8)](_0x3f6e06,_0x539854){const _0x3c1d41=_0x1f5521;if(_0x539854===_0x36d131['BASE64']){let _0x683d8f=new Image();return _0x683d8f[_0x3c1d41(0x1fb)]=_0x3f6e06,_0x683d8f;}return this['_imageSourceCache'][_0x3c1d41(0x20c)](_0x3f6e06);}[_0x1f5521(0x16e)](_0x4b9596,_0x5d026f,_0x529e99){const _0x1d284c=_0x1f5521;_0x5d026f!==_0x36d131[_0x1d284c(0x22d)]&&_0x529e99!=null&&this[_0x1d284c(0x16d)]['set'](_0x4b9596,_0x529e99);}async[_0x1f5521(0x38f)](_0x27162a){const _0x551ffb=_0x1f5521;try{let _0x49ee6c=this[_0x551ffb(0x3d2)](this[_0x551ffb(0x2cd)](),''+_0x27162a),_0x42fed6=(await this['_httpService'][_0x551ffb(0x20c)](_0x49ee6c))[_0x551ffb(0x1c3)];if(_0x42fed6['error']&&_0x42fed6['error'][_0x551ffb(0x26d)]===_0x5caf42['OK']){let _0x13d8f1=_0x3de6a3(_0x42fed6[_0x551ffb(0x389)],this[_0x551ffb(0x197)]());return Promise[_0x551ffb(0x2c8)](_0x13d8f1);}return Promise[_0x551ffb(0x147)](_0x42fed6[_0x551ffb(0x2fc)]);}catch(_0x55c820){return Promise[_0x551ffb(0x147)](_0x55c820);}}async[_0x1f5521(0x2e6)](_0x5a3047){const _0x4b30b3=_0x1f5521;let _0x32864d='';if(!_0x10020d[_0x4b30b3(0x377)](_0x5a3047['type']))return this[_0x4b30b3(0x1da)](),Promise[_0x4b30b3(0x147)](Error(_0x5af30f[_0x4b30b3(0x262)]));if(_0x5a3047['size']>_0x57aa8f())return this[_0x4b30b3(0x1da)](),Promise[_0x4b30b3(0x147)](Error(_0x5af30f[_0x4b30b3(0x341)]));try{let _0x11e7d6=new FormData();_0x11e7d6[_0x4b30b3(0x191)](_0x4b30b3(0x22e),_0x5a3047);let _0x5115e5=this[_0x4b30b3(0x329)]['getFocusedUnit'](),_0x2d8ef2=_0x5115e5==null?void 0x0:_0x5115e5[_0x4b30b3(0x3d7)]();if(!_0x2d8ef2)throw Error('unitId\x20is\x20not\x20found');let _0x4470b3=this['_getUploadFileURL']()+_0x4b30b3(0x2ad)+_0x5a3047[_0x4b30b3(0x21b)][_0x4b30b3(0x252)]()+_0x4b30b3(0x19b)+_0x52302f['UnitEmbedded']+_0x4b30b3(0x16a)+encodeURIComponent(_0x2d8ef2),_0x2633e8={'body':_0x11e7d6},_0x526408=(await this[_0x4b30b3(0x317)][_0x4b30b3(0x160)](_0x4470b3,_0x2633e8))[_0x4b30b3(0x1c3)];if(typeof _0x526408[_0x4b30b3(0x2d1)]!='string')return this[_0x4b30b3(0x1da)](),Promise[_0x4b30b3(0x147)](Error(_0x5af30f[_0x4b30b3(0x324)]));_0x32864d=_0x526408[_0x4b30b3(0x2d1)];}catch{return this[_0x4b30b3(0x1da)](),Promise[_0x4b30b3(0x147)](Error(_0x5af30f['ERROR_IMAGE']));}return new Promise((_0x424a30,_0x230e4a)=>{const _0x142b92=_0x4b30b3;let _0x27a987=new FileReader();_0x27a987[_0x142b92(0x2a3)](_0x5a3047),_0x27a987[_0x142b92(0x3a5)]=_0x566f2c=>{const _0x329f3b=_0x142b92;var _0x5ba5ab;let _0x451efa=(_0x5ba5ab=_0x566f2c[_0x329f3b(0x1ef)])==null?void 0x0:_0x5ba5ab[_0x329f3b(0x243)];if(_0x451efa==null){this[_0x329f3b(0x1da)](),_0x230e4a(Error(_0x5af30f[_0x329f3b(0x324)]));return;}_0x424a30({'imageId':_0x3b00a4(0x6),'imageSourceType':_0x36d131['UUID'],'source':_0x32864d,'base64Cache':_0x451efa,'status':_0x5af30f[_0x329f3b(0x1e4)]}),this['_decreaseWaiting']();};});}[_0x1f5521(0x32f)](){const _0x12ffa6=_0x1f5521;let _0x11bbf0=this[_0x12ffa6(0x2a1)][_0x12ffa6(0x1d1)](R);return(_0x11bbf0==null?void 0x0:_0x11bbf0['uploadFileServerUrl'])??_0x12ffa6(0x1a6);}[_0x1f5521(0x2cd)](){const _0x65bc67=_0x1f5521;let _0x32d6f3=this[_0x65bc67(0x2a1)]['getConfig'](R);return(_0x32d6f3==null?void 0x0:_0x32d6f3[_0x65bc67(0x151)])??'/universer-api/file/{fileID}/sign-url';}[_0x1f5521(0x197)](){const _0x42319d=_0x1f5521;let _0x321750=this[_0x42319d(0x2a1)][_0x42319d(0x1d1)](R);return(_0x321750==null?void 0x0:_0x321750[_0x42319d(0x299)])??location['origin'];}[_0x1f5521(0x3d2)](_0x3542e5,_0x32a938){const _0xaa61fa=_0x1f5521;return _0x3542e5[_0xaa61fa(0x312)](_0xaa61fa(0x3ce),_0x32a938);}[_0x1f5521(0x1da)](){const _0x1f6357=_0x1f5521;--this[_0x1f6357(0x2fa)],this[_0x1f6357(0x24e)][_0x1f6357(0x1ae)](this[_0x1f6357(0x2fa)]);}};Jn=H([V(0x0,_0x32c7b6(_0x314f58)),V(0x1,_0x123a79),V(0x2,_0x32c7b6(_0x238a9e))],Jn);let Yn=class{constructor(_0x2d8124,_0x287518){const _0x1ad04e=_0x1f5521;this[_0x1ad04e(0x2a1)]=_0x2d8124,this[_0x1ad04e(0x1d9)]=_0x287518;}[_0x1f5521(0x3d3)](){const _0x247206=_0x1f5521;let _0x7a7874=this[_0x247206(0x2a1)][_0x247206(0x1d1)](R);return(_0x7a7874==null?void 0x0:_0x7a7874[_0x247206(0x2ef)])??_0x247206(0x273);}async['list'](_0x294f99){const _0x30fe04=_0x1f5521;let _0x150d82=this[_0x30fe04(0x3d3)]()+'/collaborator';return{'list':[{'title':_0x30fe04(0x3ba),'mentions':(await this['_HTTPService'][_0x30fe04(0x20c)](_0x150d82,{'params':{'objectID':_0x294f99[_0x30fe04(0x2c4)],'unitID':_0x294f99[_0x30fe04(0x2c4)]}}))['body']['collaborators']['map'](_0x1edeb9=>({'objectId':_0x1edeb9['id'],'name':_0x1edeb9[_0x30fe04(0x31d)][_0x30fe04(0x218)],'metadata':{'icon':_0x1edeb9[_0x30fe04(0x31d)][_0x30fe04(0x2d7)]},'label':_0x1edeb9[_0x30fe04(0x31d)]['name'],'objectType':_0xf50ac4[_0x30fe04(0x1eb)]})),'metadata':{},'type':_0xf50ac4[_0x30fe04(0x1eb)]}]};}};Yn=H([V(0x0,_0x32c7b6(_0x123a79)),V(0x1,_0x32c7b6(_0x314f58))],Yn);let Xn=class extends _0x2fb3e4{constructor(_0x20bd8d,_0x43cfe0,_0x54f732,_0x53f6b4,_0x1e1d4d){const _0x5f15c4=_0x1f5521;super(),this[_0x5f15c4(0x391)]=_0x20bd8d,this[_0x5f15c4(0x329)]=_0x43cfe0,this[_0x5f15c4(0x1ed)]=_0x54f732,this[_0x5f15c4(0x162)]=_0x53f6b4,this[_0x5f15c4(0x3a1)]=_0x1e1d4d,this[_0x5f15c4(0x382)](),this[_0x5f15c4(0x3c7)]();}[_0x1f5521(0x3c7)](){const _0x3ec21f=_0x1f5521;let _0x2513ba=async _0x20aed3=>{const _0x2231fa=_0x2b9e;(await this[_0x2231fa(0x162)][_0x2231fa(0x221)](_0x20aed3))['event$'][_0x2231fa(0x220)](_0x3dc9b5(_0x2841e9=>_0x2841e9[_0x2231fa(0x1b1)]===_0x28cc07[_0x2231fa(0x373)]),_0x530203(this['dispose$']))[_0x2231fa(0x2dc)](_0x30c53c=>{const _0x5f1eae=_0x2231fa;let {reason:_0x4a8601}=_0x30c53c[_0x5f1eae(0x2cc)];this[_0x5f1eae(0x3a1)][_0x5f1eae(0x205)]({'id':_0x5f1eae(0x338),'data':_0x4a8601}),this[_0x5f1eae(0x1ed)][_0x5f1eae(0x18c)](new _0x57781e(_0x20aed3)['id'],!0x1),this[_0x5f1eae(0x162)][_0x5f1eae(0x2da)](_0x20aed3);});};_0x48bcdd(this[_0x3ec21f(0x329)]['getTypeOfUnitAdded$'](_0x4f4a88[_0x3ec21f(0x399)]),this[_0x3ec21f(0x329)][_0x3ec21f(0x1be)](_0x4f4a88[_0x3ec21f(0x33c)]),this['_univerInstanceService'][_0x3ec21f(0x1be)](_0x4f4a88[_0x3ec21f(0x2cb)]),this[_0x3ec21f(0x329)][_0x3ec21f(0x1be)](_0x4f4a88[_0x3ec21f(0x337)]))[_0x3ec21f(0x220)](_0x55a320(_0x491b49=>_0x491b49[_0x3ec21f(0x144)][_0x3ec21f(0x3d7)]()),_0x3dc9b5(_0x3b6ce2=>!_0x395bd6(_0x3b6ce2)),_0x530203(this[_0x3ec21f(0x201)]))[_0x3ec21f(0x2dc)](_0x2b3403=>{_0x2513ba(_0x2b3403);});}['_initUnitPermissionChange'](){const _0x42a946=_0x1f5521;let _0x4c74d7=async _0x1e42f9=>{const _0x5f062a=_0x2b9e;let _0x42acc9=await this[_0x5f062a(0x162)][_0x5f062a(0x221)](_0x1e42f9),_0x106217=this[_0x5f062a(0x391)][_0x5f062a(0x20c)](_0x2ddc32);_0x42acc9['event$']['pipe'](_0x3dc9b5(_0x2e8336=>_0x2e8336[_0x5f062a(0x1b1)]===_0x28cc07[_0x5f062a(0x36e)]),_0x530203(this[_0x5f062a(0x201)]))[_0x5f062a(0x2dc)](_0x592805=>{const _0x12400f=_0x5f062a;let {objectId:_0x10f014}=_0x592805['data'];_0x10f014===_0x1e42f9?_0x106217[_0x12400f(0x15c)](_0x1e42f9):_0x106217[_0x12400f(0x250)](_0x1e42f9,_0x10f014);});};_0x48bcdd(this['_univerInstanceService'][_0x42a946(0x1be)](_0x4f4a88[_0x42a946(0x399)]))[_0x42a946(0x220)](_0x55a320(_0x10217b=>_0x10217b['unit'][_0x42a946(0x3d7)]()),_0x3dc9b5(_0x1cbad0=>!_0x395bd6(_0x1cbad0)),_0x530203(this[_0x42a946(0x201)]))[_0x42a946(0x2dc)](_0x11fbd2=>{_0x4c74d7(_0x11fbd2);});}};Xn=H([V(0x0,_0x32c7b6(_0xd2295f)),V(0x1,_0x238a9e),V(0x2,_0x51823a),V(0x3,_0x32c7b6(Mn)),V(0x4,_0x32c7b6(B))],Xn);let Zn=class{constructor(_0x379c88,_0x46de35){const _0x3a59de=_0x1f5521;this[_0x3a59de(0x2a1)]=_0x379c88,this['_httpService']=_0x46de35;}async[_0x1f5521(0x19e)](_0x5c2f3c,_0x2bf320){const _0x2e6104=_0x1f5521;var _0x484b13;let {unitID:_0x3e24fb,type:_0x26773d,revision:_0x3821e5=0x0}=_0x2bf320,_0x256385=this['getSnapshotAPIPath']()+'/'+_0x26773d+_0x2e6104(0x16b)+_0x3e24fb+_0x2e6104(0x340)+_0x3821e5,_0x7a98c4=(await this['_httpService'][_0x2e6104(0x20c)](_0x256385))[_0x2e6104(0x1c3)],_0xceee2f=(_0x484b13=_0x7a98c4[_0x2e6104(0x274)])==null?void 0x0:_0x484b13['workbook'];if(_0xceee2f){let _0x4efc24=_0xceee2f==null?void 0x0:_0xceee2f[_0x2e6104(0x2fb)];_0xceee2f['originalMeta']=_0x23efb2[_0x2e6104(0x2b8)](_0x52c95b(_0x4efc24)),Object[_0x2e6104(0x333)](_0xceee2f['sheets'])[_0x2e6104(0x154)](([,_0x153291])=>{const _0x893aa2=_0x2e6104;let _0xc507b5=_0x153291[_0x893aa2(0x2fb)];_0x153291[_0x893aa2(0x2fb)]=_0x23efb2[_0x893aa2(0x2b8)](_0x52c95b(_0xc507b5));});}return _0x7a98c4;}async[_0x1f5521(0x2d3)](_0x27f118,_0x5b3250){const _0xf12188=_0x1f5521;let {unitID:_0x1ef8eb,type:_0x4ddcb3,blockID:_0x23a731}=_0x5b3250,_0x73f2f9=this[_0xf12188(0x287)]()+'/'+_0x4ddcb3+_0xf12188(0x16b)+_0x1ef8eb+'/block/'+_0x23a731;return(await this[_0xf12188(0x317)]['get'](_0x73f2f9))['body'];}async['getDeserializedSheetBlock'](_0x22f7c2,_0x589d31){const _0x2038dd=_0x1f5521;let {unitID:_0x1b9259,type:_0x339c37,blockID:_0x6b0594}=_0x589d31,_0x42208d=this[_0x2038dd(0x287)]()+_0x2038dd(0x39c)+_0x339c37+_0x2038dd(0x16b)+_0x1b9259+_0x2038dd(0x39c)+_0x6b0594;return(await this['_httpService'][_0x2038dd(0x20c)](_0x42208d))['body'];}async['fetchMissingChangesets'](_0x385176,_0x35927d){const _0x2c1fa3=_0x1f5521;let {unitID:_0x200177,type:_0x570a1d,from:_0x4eff3e,to:_0x12adcb}=_0x35927d,_0x46fd6c=this[_0x2c1fa3(0x287)]()+'/'+_0x570a1d+'/unit/'+_0x200177+'/fetchmissing?from='+_0x4eff3e+_0x2c1fa3(0x24a)+_0x12adcb;return(await this[_0x2c1fa3(0x317)][_0x2c1fa3(0x20c)](_0x46fd6c))[_0x2c1fa3(0x1c3)];}[_0x1f5521(0x223)](){const _0x39eb96=_0x1f5521;return this['_configService'][_0x39eb96(0x1d1)](_0x39eb96(0x1cb))??this['_getAPIPrefix']();}['_getAPIPrefix'](){const _0x2bfc83=_0x1f5521;let _0x484bf1=this[_0x2bfc83(0x2a1)][_0x2bfc83(0x1d1)](R);return(_0x484bf1==null?void 0x0:_0x484bf1[_0x2bfc83(0x149)])??_0x2bfc83(0x259);}async[_0x1f5521(0x3b4)](_0x22fdc1,_0x4dfd54){const _0x2e4fb6=_0x1f5521;let _0x2e9d65=_0x2e4fb6(0x38e)+_0x4dfd54[_0x2e4fb6(0x258)]+_0x2e4fb6(0x16b)+_0x4dfd54[_0x2e4fb6(0x322)]+_0x2e4fb6(0x1b0);return(await this[_0x2e4fb6(0x317)][_0x2e4fb6(0x20c)](_0x2e9d65,{'params':{'resourceId':JSON[_0x2e4fb6(0x212)](_0x4dfd54[_0x2e4fb6(0x1b3)])}}))['body'];}[_0x1f5521(0x1f6)](){throw Error('This\x20method\x20should\x20not\x20be\x20called\x20on\x20the\x20client\x20side!');}[_0x1f5521(0x2ac)](){throw Error('This\x20method\x20should\x20not\x20be\x20called\x20on\x20the\x20client\x20side!');}[_0x1f5521(0x281)](){const _0x35f641=_0x1f5521;throw Error(_0x35f641(0x35d));}[_0x1f5521(0x20e)](){const _0x27afb0=_0x1f5521;throw Error(_0x27afb0(0x35d));}[_0x1f5521(0x2f8)](){const _0x176e50=_0x1f5521;throw Error(_0x176e50(0x35d));}['getLatestCsReqIdBySid'](){throw Error('This\x20method\x20should\x20not\x20be\x20called\x20on\x20the\x20client\x20side!');}};Zn=H([V(0x0,_0x123a79),V(0x1,_0x32c7b6(_0x314f58))],Zn);let Qn=class extends _0xa29cff{constructor(_0x42145f,_0x54eeeb,_0x34b561,_0x46295,_0x4aac16,_0x5a406b){const _0x402eb6=_0x1f5521;super(_0x42145f,_0x54eeeb,_0x34b561,_0x46295),this[_0x402eb6(0x2c5)]=_0x4aac16,this[_0x402eb6(0x2dd)]=_0x5a406b;}[_0x1f5521(0x279)](_0x19f7a6,_0x309c32){const _0x4ad890=_0x1f5521;let _0x465b02=this[_0x4ad890(0x270)](_0x19f7a6);if(_0x465b02)try{let _0x33dc3a=this[_0x4ad890(0x1f3)](_0x465b02,_0x309c32);this[_0x4ad890(0x1d7)](_0x19f7a6,_0x33dc3a);}catch(_0x583418){this[_0x4ad890(0x2dd)]['error']('[CollaborationUndoRedoService]',_0x583418),this[_0x4ad890(0x219)](_0x19f7a6);}let _0x5dd13e=this[_0x4ad890(0x2e1)](_0x19f7a6);if(_0x5dd13e)try{let _0x3df5c6=this[_0x4ad890(0x1f3)](_0x5dd13e,_0x309c32);this['_substituteRedoStack'](_0x19f7a6,_0x3df5c6);}catch(_0x5cb7aa){this['_logService'][_0x4ad890(0x2fc)](_0x5cb7aa),this[_0x4ad890(0x229)](_0x19f7a6);}}[_0x1f5521(0x219)](_0x143059){const _0x4c4b34=_0x1f5521;let _0x1e6b1c=this[_0x4c4b34(0x270)](_0x143059);_0x1e6b1c&&(_0x1e6b1c['length']=0x0,this[_0x4c4b34(0x390)]());}[_0x1f5521(0x229)](_0x1b8687){const _0x465574=_0x1f5521;let _0x1f939f=this['_getRedoStack'](_0x1b8687);_0x1f939f&&(_0x1f939f['length']=0x0,this[_0x465574(0x390)]());}[_0x1f5521(0x1d7)](_0x2b6ba7,_0x1888db){const _0xd162cc=_0x1f5521;this[_0xd162cc(0x2a9)][_0xd162cc(0x16f)](_0x2b6ba7,_0x1888db),this[_0xd162cc(0x390)]();}[_0x1f5521(0x1a1)](_0x45c841,_0x32b4fd){const _0x5e04ff=_0x1f5521;this[_0x5e04ff(0x196)][_0x5e04ff(0x16f)](_0x45c841,_0x32b4fd),this[_0x5e04ff(0x390)]();}[_0x1f5521(0x1f3)](_0x1ec16b,_0x1a9b36){const _0xb7d94d=_0x1f5521;let _0x381596=[],_0x5ae4b1=_0x1a9b36,_0x107ba5=_0x1a9b36;for(let _0x1f0b62=_0x1ec16b[_0xb7d94d(0x316)]-0x1;_0x1f0b62>=0x0;_0x1f0b62--){let {unitID:_0x480c6a,undoMutations:_0x30b37e,redoMutations:_0xc64442}=_0x1ec16b[_0x1f0b62],_0x1bcb71=this['_transformService'][_0xb7d94d(0x222)](_0x5ae4b1,_0x30b37e),_0x565782=this[_0xb7d94d(0x2c5)][_0xb7d94d(0x222)](_0x107ba5,_0xc64442);if(_0xc4ea4b(_0x1bcb71)||_0xc4ea4b(_0x565782)){this[_0xb7d94d(0x2dd)][_0xb7d94d(0x2fc)](_0xb7d94d(0x3b6),_0xb7d94d(0x264),_0x1bcb71,_0x565782);break;}_0x5ae4b1=_0x1bcb71['c1Prime'],_0x107ba5=_0x565782[_0xb7d94d(0x1c6)],_0x381596['push']({'unitID':_0x480c6a,'undoMutations':_0x1bcb71['m2Prime'],'redoMutations':_0x565782[_0xb7d94d(0x242)]});}return _0x381596[_0xb7d94d(0x31c)]();}};Qn=H([V(0x0,_0x238a9e),V(0x1,_0x24738d),V(0x2,_0x3d76ae),V(0x3,_0x123a79),V(0x4,_0x30bd2c),V(0x5,_0x3849f9)],Qn);let $n=class extends _0x2c2938{constructor(_0xb5a5d8=ft,_0x1a0928,_0x2af6aa,_0x1a2961){const _0x5e44b1=_0x1f5521;super(),this[_0x5e44b1(0x364)]=_0xb5a5d8,this[_0x5e44b1(0x2dd)]=_0x1a0928,this[_0x5e44b1(0x391)]=_0x2af6aa,this[_0x5e44b1(0x2a1)]=_0x1a2961;let {..._0x2f6a27}=_0x5b8bc5({},ft,this[_0x5e44b1(0x364)]);if(!_0x2f6a27[_0x5e44b1(0x13e)])throw Error(_0x5e44b1(0x3c8));this['_config']=_0x2f6a27,this[_0x5e44b1(0x2a1)][_0x5e44b1(0x2d4)](R,_0x2f6a27);}['onStarting'](){const _0x490f24=_0x1f5521;this['_registerDependencies'](),this[_0x490f24(0x30d)]();}['_registerDependencies'](){const _0x40db14=_0x1f5521;var _0xe3090f,_0x13b372;this['_injector']['has'](_0x143b1e)&&this['_logService'][_0x40db14(0x2fc)]('[UniverCollaborationClientPlugin]',_0x40db14(0x266));let _0xe9d0de=_0x410d5e([[_0x143b1e,{'useClass':Qn}],[kn,{'useValue':An()}],[Mn],[Ot],[Wt],[Bn],[Kn],[Dt],[Xn],[B],[qn],[En,{'useClass':this[_0x40db14(0x364)][_0x40db14(0x13e)]}],[_0x223810,{'useClass':Zn}],[_0x389ebf,{'useClass':Vn}],[_0x17ef7f,{'useClass':Jn}],[Ln,{'useClass':Rn}],[_0x5ec686,{'useClass':Yn}],[Nn],[In]],(_0xe3090f=this['_config'])==null?void 0x0:_0xe3090f[_0x40db14(0x2ed)]);if(!((_0x13b372=this[_0x40db14(0x364)])!=null&&_0x13b372['enableSingleActiveInstanceLock'])){let _0x1232da=_0xe9d0de[_0x40db14(0x244)](([_0xfb9f40])=>_0xfb9f40===W);_0x1232da!==-0x1&&_0xe9d0de[_0x40db14(0x2f4)](_0x1232da,0x1);}_0x3eca33(this[_0x40db14(0x391)],_0xe9d0de);}[_0x1f5521(0x30d)](){const _0x11056b=_0x1f5521;var _0x2ac724,_0x10ce29;if(this[_0x11056b(0x391)][_0x11056b(0x20c)](_0x314f58)[_0x11056b(0x163)]({'priority':0x14,'interceptor':_0x12c387({'maxParallel':0x6})}),!((_0x2ac724=this[_0x11056b(0x364)])!=null&&_0x2ac724[_0x11056b(0x251)])){var _0xb7dd4a;(_0xb7dd4a=this[_0x11056b(0x391)][_0x11056b(0x20c)](U,_0x5262c6[_0x11056b(0x2bb)]))==null||_0xb7dd4a[_0x11056b(0x306)]();}(_0x10ce29=this[_0x11056b(0x364)])!=null&&_0x10ce29[_0x11056b(0x2b3)]&&_0x1c608a(this[_0x11056b(0x391)],[[Bn]]),_0x1c608a(this[_0x11056b(0x391)],[[Kn],[Nn],[Xn]]);}};z($n,_0x1f5521(0x240),'UNIVER_COLLABORATION_CLIENT_PLUGIN'),z($n,_0x1f5521(0x289),Pn),z($n,'version',Fn),$n=H([_0x1a8c7d(_0x267699,_0x32578b,_0x3886aa),V(0x1,_0x3849f9),V(0x2,_0x32c7b6(_0xd2295f)),V(0x3,_0x123a79)],$n);export{Vn as AuthzIoHttpService,J as AwaitingState,Y as AwaitingWithPendingState,vn as BaseCollaborationEntity,xn as BoardCollaborationEntity,R as COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY,Rn as CollaborationAttachmentIoService,Nn as CollaborationController,$ as CollaborationEntity,Jn as CollaborationImageIoService,Vt as CollaborationSession,Mn as CollaborationSessionService,On as CollaborationSocketService,pn as CollaborationStatus,Et as CollaborationUIEventId,B as CollaborationUIEventService,Qn as CollaborativeUndoRedoService,Dt as CommentService,X as ConflictState,pt as DEFAULT_COLLAB_WEB_SOCKET_URL,xt as DEFAULT_REMOTE_UNISCRIPT_EXECUTION_ENDPOINT,mt as DEFAULT_WS_SESSION_TICKET_URL,qn as DataLoaderService,_n as DocCollaborationEntity,Q as FetchingMissState,ht as HEARTBEAT_INTERVAL_KEY,gt as HEARTBEAT_TIMEOUT_KEY,Ln as IAttachmentIoService,kn as ICollaborationClientAdapterService,En as ICollaborationSocketService,U as ILocalCacheService,Cn as INetworkConditionService,W as ISingleActiveUnitService,yt as LOCAL_CACHE_INTERVAL,vt as LOCAL_CACHE_INTERVAL_KEY,Ot as MemberService,Yn as MentionIoHttpService,Z as OfflineState,Sn as PdfCollaborationEntity,q as PendingState,bt as REMOTE_UNISCRIPT_EXECUTION_ENDPOINT_KEY,_t as RETRY_CONNECTING_MAX_COUNT_KEY,zt as SessionStatus,yn as SheetCollaborationEntity,Wt as SheetTransformSelectionsService,bn as SlideCollaborationEntity,Zn as SnapshotServerOverHTTPService,K as SyncedState,Gt as UnitStatus,$n as UniverCollaborationClientPlugin,An as createUniverCollaborationAdapter,wn as deserializeToCombResponse,Ht as getLocalCacheKey,Tn as serializeCombRequest};
|