@univerjs-pro/collaboration-client 1.2.0 → 1.3.0
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/controllers/collaboration/changeset-submitter.d.ts +2 -2
- package/lib/types/controllers/collaboration/collaboration-entity.d.ts +4 -4
- package/lib/types/controllers/collaboration/collaboration-state.d.ts +24 -22
- package/lib/types/facade/f-event.d.ts +3 -1
- package/lib/types/index.d.ts +1 -1
- package/lib/types/services/collaboration-session/collaboration-session.service.d.ts +1 -0
- package/lib/types/services/collaboration-ui-event/collaboration-ui-event.d.ts +2 -0
- 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/locale/zh-TW.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const _0x55fe3e=_0x2e9c;(function(_0x54a528,_0x4fa53e){const _0x372d0d=_0x2e9c,_0x23c32b=_0x54a528();while(!![]){try{const _0x2b9d4d=-parseInt(_0x372d0d(0x1d7))/0x1+-parseInt(_0x372d0d(0x1e3))/0x2+parseInt(_0x372d0d(0x1e6))/0x3*(parseInt(_0x372d0d(0x1e7))/0x4)+parseInt(_0x372d0d(0x1e4))/0x5*(parseInt(_0x372d0d(0x1e8))/0x6)+parseInt(_0x372d0d(0x1db))/0x7*(-parseInt(_0x372d0d(0x1ea))/0x8)+parseInt(_0x372d0d(0x1de))/0x9+parseInt(_0x372d0d(0x1e5))/0xa*(parseInt(_0x372d0d(0x1e1))/0xb);if(_0x2b9d4d===_0x4fa53e)break;else _0x23c32b['push'](_0x23c32b['shift']());}catch(_0x23893f){_0x23c32b['push'](_0x23c32b['shift']());}}}(_0x5550,0xa4bfc));function _0x2e9c(_0x45d2e6,_0x53c183){_0x45d2e6=_0x45d2e6-0x1d6;const _0x5550b4=_0x5550();let _0x2e9c68=_0x5550b4[_0x45d2e6];return _0x2e9c68;}function _0x5550(){const _0x6ce197=['加入協作失敗,您的編輯將暫存於本機。','已同步','加入協作失敗,請稍後重試,您的編輯將暫存於本機。','763sBFmFp','正在擷取伺服器資料...','您的登入已過期,點擊「確定」重新登入,點擊「取消」儲存您的本機編輯。','1868904wPqzeK','協作文件數量超過限制,您的編輯將暫存於本機。','您在另一個分頁開啟了同一個檔案。為避免資料遺失,此分頁將無法進行編輯。','77wsqWbA','由於協作房間已關閉,編輯權限已被收回。','2572836HKKqzU','20izMcQe','4001990XESZmW','33366YIeFtR','36eqiFNU','620052JIGYvm','伺服器未回應協作請求,您的編輯將儲存在本機。','70104KwXVLz','點擊重新連線','協作衝突','本機檔案','認證錯誤','連線失敗,請檢查您的網路。','編輯衝突','您的本機文件與伺服器文件存在衝突。請將您的本機編輯儲存至其他地方,因為重新整理頁面後將會遺失。','606118cSRilw'];_0x5550=function(){return _0x6ce197;};return _0x5550();}const e={'collaboration-client':{'collabClient':{'tooltip':{'reconnect':_0x55fe3e(0x1eb)}},'collabStatus':{'fetchMiss':_0x55fe3e(0x1dc),'conflict':_0x55fe3e(0x1f0),'notCollab':_0x55fe3e(0x1ed),'synced':_0x55fe3e(0x1d9),'syncing':'同步中...','offline':'已離線,編輯將儲存在本機'},'session':{'connection-failed':_0x55fe3e(0x1ef),'will-retry':'連線失敗,將在稍後重試連線。','room-full':'此文件協作人數已達上限,您的編輯將暫存於本機。','join-failed':_0x55fe3e(0x1da),'room-not-exists':_0x55fe3e(0x1d8),'room-permission-denied':'沒有協作權限,您的編輯將暫存於本機。','room-cnt-exceeds':_0x55fe3e(0x1df),'collaboration-timeout':_0x55fe3e(0x1e9)},'conflict':{'title':_0x55fe3e(0x1ec),'content':_0x55fe3e(0x1d6)},'permission':{'title':_0x55fe3e(0x1ee),'content':'您的操作與伺服器權限存在衝突。請將您的本機編輯儲存至其他地方,重新整理頁面後將會被捨棄。'},'collaboration':{'single-unit':{'warning':_0x55fe3e(0x1e0)},'closeRoom':_0x55fe3e(0x1e2)},'auth':{'needGotoLoginAlert':_0x55fe3e(0x1dd)}}};export{e as default};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { IChangeset } from '@univerjs-pro/collaboration';
|
|
2
2
|
import type { ICollaborationSendOptions } from '../../services/socket/collaboration-socket.service';
|
|
3
3
|
/** Why the awaiting changeset was sent again. */
|
|
4
|
-
export type ChangesetResendReason = 'ack_timeout' | 'should_retry' | 'reconnect' | 'request_failed';
|
|
4
|
+
export type ChangesetResendReason = 'ack_timeout' | 'should_retry' | 'reconnect' | 'request_failed' | 'license_editing_connections_exceeded';
|
|
5
5
|
/** Emitted every time an awaiting changeset is sent again. The first send is not an event. */
|
|
6
6
|
export interface IChangesetResendEvent {
|
|
7
7
|
unitID: string;
|
|
@@ -107,7 +107,7 @@ export declare class ChangesetSubmitter {
|
|
|
107
107
|
*/
|
|
108
108
|
armAckTimeout(): void;
|
|
109
109
|
/** The server asked for the changeset to be resent: replace the current timer with the short backoff. */
|
|
110
|
-
requestRetry(): void;
|
|
110
|
+
requestRetry(reason?: ChangesetResendReason): void;
|
|
111
111
|
/** The changeset was acknowledged, rejected or dropped. */
|
|
112
112
|
dispose(): void;
|
|
113
113
|
private _deliver;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { IDisposable, IMutationInfo, Nullable, UniverInstanceType } from '@univerjs/core';
|
|
2
2
|
import type { Observable } from 'rxjs';
|
|
3
|
-
import type { CollaborationSession } from '../../services/collaboration-session/collaboration-session';
|
|
4
|
-
import type { IUnitCacheData } from '../../services/local-cache/local-cache.service';
|
|
5
|
-
import type { IChangesetResendEvent } from './changeset-submitter';
|
|
6
|
-
import type { CollaborationState, ICollaborationStateHandler, IConflictInfo, PrepareTransformSelectionsHandler, SyncEditingCollabCursorHandler, TransformIMEHandler, TransformRemoteChangesetByIMECache, TransformRemoteChangesetByStateCache, TransformSelectionsHandler, TransformStateHandler } from './collaboration-state';
|
|
7
3
|
import { CompressMutationService, RevisionService } from '@univerjs-pro/collaboration';
|
|
8
4
|
import { ICommandService, ILogService, Injector, IPermissionService, IUniverInstanceService, LocaleService, RxDisposable } from '@univerjs/core';
|
|
9
5
|
import { DocStateChangeManagerService } from '@univerjs/docs';
|
|
10
6
|
import { BehaviorSubject } from 'rxjs';
|
|
7
|
+
import type { CollaborationSession } from '../../services/collaboration-session/collaboration-session';
|
|
8
|
+
import type { IUnitCacheData } from '../../services/local-cache/local-cache.service';
|
|
9
|
+
import type { IChangesetResendEvent } from './changeset-submitter';
|
|
10
|
+
import type { CollaborationState, ICollaborationStateHandler, IConflictInfo, PrepareTransformSelectionsHandler, SyncEditingCollabCursorHandler, TransformIMEHandler, TransformRemoteChangesetByIMECache, TransformRemoteChangesetByStateCache, TransformSelectionsHandler, TransformStateHandler } from './collaboration-state';
|
|
11
11
|
import { CollaborationUIEventService } from '../../services/collaboration-ui-event/collaboration-ui-event';
|
|
12
12
|
import { ILocalCacheService } from '../../services/local-cache/local-cache.service';
|
|
13
13
|
import { SheetTransformSelectionsService } from '../../services/range-selection/sheet-transform-selections.service';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { IAcknowledgedChangeset, IChangeset } from '@univerjs-pro/collaboration';
|
|
2
2
|
import type { IMutationInfo, Nullable } from '@univerjs/core';
|
|
3
|
+
import { ITransformService, RevisionService } from '@univerjs-pro/collaboration';
|
|
4
|
+
import { ICommandService, IConfigService, ILogService, Injector, IPermissionService, IUniverInstanceService, UniverInstanceType, UserManagerService } from '@univerjs/core';
|
|
3
5
|
import type { IUnitCacheData } from '../../services/local-cache/local-cache.service';
|
|
6
|
+
import type { ICollaborationSendOptions } from '../../services/socket/collaboration-socket.service';
|
|
4
7
|
import type { ICollaborativeUndoRedoService } from '../../services/undoredo/collaborative-undoredo.service';
|
|
5
8
|
import type { ChangesetResendInfo, ChangesetResendReason } from './changeset-submitter';
|
|
6
|
-
import type { ICollaborationSendOptions } from '../../services/socket/collaboration-socket.service';
|
|
7
|
-
import { ITransformService, RevisionService } from '@univerjs-pro/collaboration';
|
|
8
|
-
import { ICommandService, IConfigService, ILogService, Injector, IPermissionService, IUniverInstanceService, UniverInstanceType, UserManagerService } from '@univerjs/core';
|
|
9
9
|
import { CollaborationUIEventService } from '../../services/collaboration-ui-event/collaboration-ui-event';
|
|
10
10
|
import { ILocalCacheService } from '../../services/local-cache/local-cache.service';
|
|
11
11
|
import { ChangesetSubmitter } from './changeset-submitter';
|
|
@@ -52,6 +52,14 @@ export interface ICollaborationStateHandler {
|
|
|
52
52
|
maxAckTimeout?: number;
|
|
53
53
|
};
|
|
54
54
|
}
|
|
55
|
+
/** What the server sent with a `changeset_rej` or `permission_rej` event. */
|
|
56
|
+
export interface IRemoteRejection {
|
|
57
|
+
isPermissionRej: boolean;
|
|
58
|
+
/** The reason in words, when the server gave one. */
|
|
59
|
+
reason?: string;
|
|
60
|
+
/** The protocol error code, when the server gave one. */
|
|
61
|
+
code?: number;
|
|
62
|
+
}
|
|
55
63
|
/** Why a unit entered `ConflictState`. */
|
|
56
64
|
export type ConflictReason =
|
|
57
65
|
/** A remote changeset could not be transformed against the local edits. */
|
|
@@ -62,6 +70,8 @@ export type ConflictReason =
|
|
|
62
70
|
| 'changeset_rejected'
|
|
63
71
|
/** The server rejected the local changeset for lack of permission. */
|
|
64
72
|
| 'permission_rejected'
|
|
73
|
+
/** The server's License does not cover collaboration on this document type. */
|
|
74
|
+
| 'license_unit_type_rejected'
|
|
65
75
|
/** Another collaborator reverted the unit to a historical revision. */
|
|
66
76
|
| 'remote_revert';
|
|
67
77
|
/** The remote revert that caused a `remote_revert` conflict. */
|
|
@@ -151,13 +161,11 @@ export declare abstract class CollaborationState {
|
|
|
151
161
|
/**
|
|
152
162
|
* Received a rejection from the server, meaning that conflict could be resolved by the algorithm.
|
|
153
163
|
*/
|
|
154
|
-
abstract onRemoteRej(config?:
|
|
155
|
-
isPermissionRej: boolean;
|
|
156
|
-
}): CollaborationState;
|
|
164
|
+
abstract onRemoteRej(config?: IRemoteRejection): CollaborationState;
|
|
157
165
|
/**
|
|
158
166
|
* Received a retry message from the server, meaning that some unexpected error occurred in server.
|
|
159
167
|
*/
|
|
160
|
-
abstract onRemoteRetry(changeset: IChangeset): CollaborationState;
|
|
168
|
+
abstract onRemoteRetry(changeset: IChangeset, code?: number): CollaborationState;
|
|
161
169
|
abstract toggleOffline(): CollaborationState;
|
|
162
170
|
abstract toggleOnline(): CollaborationState;
|
|
163
171
|
/**
|
|
@@ -198,9 +206,9 @@ export declare abstract class CollaborationState {
|
|
|
198
206
|
/** The conflict info of an error thrown while transforming or applying a remote changeset. */
|
|
199
207
|
protected _conflictInfoFromError(error: unknown): IConflictInfo;
|
|
200
208
|
/** The conflict info of a rejection from the server. */
|
|
201
|
-
protected _rejectionInfo(config?:
|
|
202
|
-
|
|
203
|
-
|
|
209
|
+
protected _rejectionInfo(config?: IRemoteRejection): IConflictInfo;
|
|
210
|
+
/** The resend reason for a `changeset_should_retry`, by the code the server attached to it. */
|
|
211
|
+
protected _retryReason(code?: number): ChangesetResendReason;
|
|
204
212
|
/** Request the changesets after the current revision up to `revision`: left open, right closed. */
|
|
205
213
|
protected _requestMissingChangesets(revision: number): void;
|
|
206
214
|
/** Transform undo redo mutations in the undo redo stack. */
|
|
@@ -293,10 +301,8 @@ export declare class AwaitingState extends CollaborationState {
|
|
|
293
301
|
private _transformAndApply;
|
|
294
302
|
onRemoteAck(changeset: IAcknowledgedChangeset): CollaborationState;
|
|
295
303
|
private _toSynced;
|
|
296
|
-
onRemoteRej(config?:
|
|
297
|
-
|
|
298
|
-
}): CollaborationState;
|
|
299
|
-
onRemoteRetry(changeset: IChangeset): CollaborationState;
|
|
304
|
+
onRemoteRej(config?: IRemoteRejection): CollaborationState;
|
|
305
|
+
onRemoteRetry(changeset: IChangeset, code?: number): CollaborationState;
|
|
300
306
|
toggleOffline(): CollaborationState;
|
|
301
307
|
toggleOnline(): CollaborationState;
|
|
302
308
|
resend(reason?: ChangesetResendReason): void;
|
|
@@ -324,10 +330,8 @@ export declare class AwaitingWithPendingState extends CollaborationState {
|
|
|
324
330
|
onRemoteAck(changeset: IAcknowledgedChangeset): CollaborationState;
|
|
325
331
|
/** Transit to `PendingState` to schedule another sending task. */
|
|
326
332
|
private _toPending;
|
|
327
|
-
onRemoteRej(config?:
|
|
328
|
-
|
|
329
|
-
}): CollaborationState;
|
|
330
|
-
onRemoteRetry(changeset: IChangeset): CollaborationState;
|
|
333
|
+
onRemoteRej(config?: IRemoteRejection): CollaborationState;
|
|
334
|
+
onRemoteRetry(changeset: IChangeset, code?: number): CollaborationState;
|
|
331
335
|
toggleOffline(): CollaborationState;
|
|
332
336
|
toggleOnline(): CollaborationState;
|
|
333
337
|
resend(reason?: ChangesetResendReason): void;
|
|
@@ -434,10 +438,8 @@ export declare class FetchingMissState extends CollaborationState {
|
|
|
434
438
|
appendMutation(mutation: IMutationInfo<object>): CollaborationState;
|
|
435
439
|
onRemoteChangeset(changeset: IChangeset): CollaborationState;
|
|
436
440
|
onRemoteAck(changeset: IAcknowledgedChangeset): CollaborationState;
|
|
437
|
-
onRemoteRej(config?:
|
|
438
|
-
|
|
439
|
-
}): CollaborationState;
|
|
440
|
-
onRemoteRetry(changeset: IChangeset): CollaborationState;
|
|
441
|
+
onRemoteRej(config?: IRemoteRejection): CollaborationState;
|
|
442
|
+
onRemoteRetry(changeset: IChangeset, code?: number): CollaborationState;
|
|
441
443
|
toggleOffline(): CollaborationState;
|
|
442
444
|
toggleOnline(): CollaborationState;
|
|
443
445
|
private _onConflict;
|
|
@@ -15,7 +15,7 @@ export interface ICollaborationConflictEventParams extends IEventBase {
|
|
|
15
15
|
* - `remote_revert`: another collaborator reverted the unit to a historical revision
|
|
16
16
|
*/
|
|
17
17
|
reason: ConflictReason;
|
|
18
|
-
/** The error message,
|
|
18
|
+
/** The error message, or the reason the server gave when it rejected the changeset */
|
|
19
19
|
message?: string;
|
|
20
20
|
/** The revert that caused the conflict, when `reason` is `remote_revert` */
|
|
21
21
|
revert?: IRemoteRevertInfo;
|
|
@@ -56,6 +56,7 @@ export interface ICollaborationChangesetResendEventParams extends IEventBase {
|
|
|
56
56
|
* - `ack_timeout`: no acknowledgement arrived in time
|
|
57
57
|
* - `should_retry`: the server asked for the changeset to be resent
|
|
58
58
|
* - `reconnect`: the connection was restored or the changeset was restored from the local cache
|
|
59
|
+
* - `license_editing_connections_exceeded`: the server asked for a resend; its License editing connections were all in use
|
|
59
60
|
*/
|
|
60
61
|
reason: ChangesetResendReason;
|
|
61
62
|
/** How many times the changeset has been resent, counting this one */
|
|
@@ -98,6 +99,7 @@ export interface IFCollaborationEventNameMixin {
|
|
|
98
99
|
* const { unitId, reason, localChanges, cacheCleared } = event;
|
|
99
100
|
* if (localChanges) saveSomewhere(unitId, localChanges);
|
|
100
101
|
* if (reason === 'permission_rejected') return showNoPermission(unitId);
|
|
102
|
+
* if (reason === 'license_unit_type_rejected') return showLicenseLimit(unitId, event.message);
|
|
101
103
|
* if (cacheCleared) window.location.reload();
|
|
102
104
|
* });
|
|
103
105
|
* ```
|
package/lib/types/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export type { ChangesetResendReason, IChangesetResendEvent, IChangesetSubmitterO
|
|
|
7
7
|
export { BaseCollaborationEntity, BoardCollaborationEntity, CollaborationEntity, DocCollaborationEntity, PdfCollaborationEntity, SheetCollaborationEntity, SlideCollaborationEntity, } from './controllers/collaboration/collaboration-entity';
|
|
8
8
|
export type { ICollaborationConflictEvent, IDocCollaborationEntityCallback } from './controllers/collaboration/collaboration-entity';
|
|
9
9
|
export { AwaitingState, AwaitingWithPendingState, CollaborationStatus, ConflictState, FetchingMissState, OfflineState, PendingState, SyncedState, } from './controllers/collaboration/collaboration-state';
|
|
10
|
-
export type { ConflictReason, IConflictInfo, IRemoteRevertInfo, ISelectionTransformTransaction, } from './controllers/collaboration/collaboration-state';
|
|
10
|
+
export type { ConflictReason, IConflictInfo, IRemoteRejection, IRemoteRevertInfo, ISelectionTransformTransaction, } from './controllers/collaboration/collaboration-state';
|
|
11
11
|
export { CollaborationController } from './controllers/collaboration/collaboration.controller';
|
|
12
12
|
export { UniverCollaborationClientPlugin } from './plugin';
|
|
13
13
|
export { CollaborationAttachmentIoService, IAttachmentIoService, } from './services/attachment-remote/attachment-io.service';
|
|
@@ -59,6 +59,7 @@ export declare class CollaborationSessionService extends Disposable {
|
|
|
59
59
|
private _tryEnsureSocket;
|
|
60
60
|
private _onConnectionOpen;
|
|
61
61
|
private _onOffline;
|
|
62
|
+
private _onLicenseRejected;
|
|
62
63
|
private _onConnectionFailed;
|
|
63
64
|
private _tryReconnect;
|
|
64
65
|
private _resolveSessionIdentity;
|
|
@@ -18,6 +18,8 @@ export declare enum CollaborationUIEventId {
|
|
|
18
18
|
JOIN_ROOM_FAILED = "JOIN_ROOM_FAILED",
|
|
19
19
|
SOCKET_FAILED_RETRY = "SOCKET_FAILED_RETRY",
|
|
20
20
|
SOCKET_FAILED = "SOCKET_FAILED",
|
|
21
|
+
/** The server refused this page's domain under its License; no reconnect is scheduled until a manual one. */
|
|
22
|
+
LICENSE_DOMAIN_REJECTED = "LICENSE_DOMAIN_REJECTED",
|
|
21
23
|
/**
|
|
22
24
|
* @deprecated No longer emitted. Unacknowledged changesets are resent automatically; subscribe to
|
|
23
25
|
* `CollaborationEntity.changesetResend$` (or the `CollaborationChangesetResend` facade event) instead.
|
package/lib/umd/facade.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x1cd3(_0x16583b,_0x2b71db){_0x16583b=_0x16583b-0x65;const _0x1bc693=_0x1bc6();let _0x1cd3c4=_0x1bc693[_0x16583b];return _0x1cd3c4;}(function(_0x4e89f7,_0x16e981){const _0x20bd6f=_0x1cd3,_0x2e6630=_0x4e89f7();while(!![]){try{const _0x477958=parseInt(_0x20bd6f(0x73))/0x1*(parseInt(_0x20bd6f(0xd0))/0x2)+-parseInt(_0x20bd6f(0x8b))/0x3*(parseInt(_0x20bd6f(0x78))/0x4)+-parseInt(_0x20bd6f(0x6f))/0x5+parseInt(_0x20bd6f(0x99))/0x6*(parseInt(_0x20bd6f(0xdf))/0x7)+parseInt(_0x20bd6f(0xba))/0x8*(parseInt(_0x20bd6f(0x79))/0x9)+-parseInt(_0x20bd6f(0xab))/0xa*(-parseInt(_0x20bd6f(0x8d))/0xb)+-parseInt(_0x20bd6f(0xc6))/0xc;if(_0x477958===_0x16e981)break;else _0x2e6630['push'](_0x2e6630['shift']());}catch(_0x498982){_0x2e6630['push'](_0x2e6630['shift']());}}}(_0x1bc6,0x982c0),function(_0x22f909,_0x389c51){const _0x5d88df=_0x1cd3;typeof exports==_0x5d88df(0x67)&&typeof module<'u'?_0x389c51(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs/core/facade'),require('@univerjs/core'),require('rxjs')):typeof define==_0x5d88df(0xa5)&&define[_0x5d88df(0x9a)]?define([_0x5d88df(0x93),_0x5d88df(0xd4),_0x5d88df(0x83),'@univerjs/core',_0x5d88df(0xcf)],_0x389c51):(_0x22f909=typeof globalThis<'u'?globalThis:_0x22f909||self,_0x389c51(_0x22f909['UniverProCollaborationClientFacade']={},_0x22f909[_0x5d88df(0xb8)],_0x22f909[_0x5d88df(0xa6)],_0x22f909['UniverCore'],_0x22f909['rxjs']));}(this,function(_0x5f2bc9,_0x42eff0,_0x2db56a,_0x18b349,_0x4a3183){const _0xbf0c54=_0x1cd3;Object[_0xbf0c54(0x69)](_0x5f2bc9,Symbol[_0xbf0c54(0xda)],{'value':_0xbf0c54(0x6b)});var _0x4c8507=class extends _0x2db56a[_0xbf0c54(0xa3)]{get[_0xbf0c54(0x88)](){const _0x1fbc73=_0xbf0c54;return _0x42eff0[_0x1fbc73(0x88)];}};_0x2db56a[_0xbf0c54(0xa3)]['extend'](_0x4c8507);var _0x47cade=class extends _0x2db56a[_0xbf0c54(0xe0)]{get[_0xbf0c54(0xbe)](){return'CollaborationStatusChanged';}get[_0xbf0c54(0x7a)](){const _0x489fb5=_0xbf0c54;return _0x489fb5(0x7a);}get[_0xbf0c54(0xdb)](){const _0x49a8b8=_0xbf0c54;return _0x49a8b8(0xdb);}};_0x2db56a['FEventName'][_0xbf0c54(0xb2)](_0x47cade);function _0x2c160c(_0x12f4a0,_0x2062df){return function(_0x4a01ce,_0x25bbec){_0x2062df(_0x4a01ce,_0x25bbec,_0x12f4a0);};}function _0x3cb5b7(_0x599f43,_0x37696e,_0x290715,_0xaa97a5){const _0x461421=_0xbf0c54;var _0x2f5340=arguments[_0x461421(0xad)],_0x497a9d=_0x2f5340<0x3?_0x37696e:_0xaa97a5===null?_0xaa97a5=Object[_0x461421(0x77)](_0x37696e,_0x290715):_0xaa97a5,_0x38203a;if(typeof Reflect==_0x461421(0x67)&&typeof Reflect[_0x461421(0xc3)]=='function')_0x497a9d=Reflect['decorate'](_0x599f43,_0x37696e,_0x290715,_0xaa97a5);else{for(var _0x44e7d5=_0x599f43[_0x461421(0xad)]-0x1;_0x44e7d5>=0x0;_0x44e7d5--)(_0x38203a=_0x599f43[_0x44e7d5])&&(_0x497a9d=(_0x2f5340<0x3?_0x38203a(_0x497a9d):_0x2f5340>0x3?_0x38203a(_0x37696e,_0x290715,_0x497a9d):_0x38203a(_0x37696e,_0x290715))||_0x497a9d);}return _0x2f5340>0x3&&_0x497a9d&&Object[_0x461421(0x69)](_0x37696e,_0x290715,_0x497a9d),_0x497a9d;}let _0x50f853=class extends _0x2db56a[_0xbf0c54(0x91)]{constructor(_0x1be74d,_0x446077,_0x5be445,_0x54678f,_0x3a19ea){const _0x389786=_0xbf0c54;super(),this[_0x389786(0xb0)]=_0x1be74d,this[_0x389786(0x7f)]=_0x446077,this[_0x389786(0xac)]=_0x5be445,this[_0x389786(0xdd)]=_0x54678f,this[_0x389786(0xae)]=_0x3a19ea;}async[_0xbf0c54(0x87)](_0x4548be,_0x5a71b5){const _0x1e7d9a=_0xbf0c54;return await this[_0x1e7d9a(0xdd)]['loadUnit'](_0x4548be,_0x18b349[_0x1e7d9a(0xa7)][_0x1e7d9a(0xbb)],void 0x0,_0x5a71b5)?(await this[_0x1e7d9a(0xae)][_0x1e7d9a(0xd5)](_0x4548be),this[_0x1e7d9a(0xb0)][_0x1e7d9a(0x65)](_0x4548be)):null;}async[_0xbf0c54(0x6d)](_0x418fbe,_0x3c4e94){const _0x11a14b=_0xbf0c54;return await this[_0x11a14b(0xdd)][_0x11a14b(0x75)](_0x418fbe,_0x18b349[_0x11a14b(0xa7)][_0x11a14b(0x74)],void 0x0,_0x3c4e94)?(await this[_0x11a14b(0xae)][_0x11a14b(0xd5)](_0x418fbe),this[_0x11a14b(0xb0)]['getDocument'](_0x418fbe)):null;}async['loadBaseAsync'](_0x2fa50f,_0x432baf){const _0x5989ae=_0xbf0c54;return await this[_0x5989ae(0xdd)][_0x5989ae(0x75)](_0x2fa50f,_0x18b349[_0x5989ae(0xa7)][_0x5989ae(0xdc)],void 0x0,_0x432baf)?(await this['_collaborationController'][_0x5989ae(0xd5)](_0x2fa50f),this['_handler']['getBase'](_0x2fa50f)):null;}async['loadSlideAsync'](_0x13ccc2,_0x2215ad){const _0x525567=_0xbf0c54;return await this['_dataLoaderService'][_0x525567(0x75)](_0x13ccc2,_0x18b349[_0x525567(0xa7)][_0x525567(0xc5)],void 0x0,_0x2215ad)?(await this['_collaborationController'][_0x525567(0xd5)](_0x13ccc2),this['_handler'][_0x525567(0xc1)](_0x13ccc2)):null;}async[_0xbf0c54(0xc4)](_0x367ab3,_0x20d1a9){const _0x308b89=_0xbf0c54;return await this['_dataLoaderService'][_0x308b89(0x75)](_0x367ab3,_0x18b349[_0x308b89(0xa7)][_0x308b89(0x96)],void 0x0,_0x20d1a9)?(await this[_0x308b89(0xae)][_0x308b89(0xd5)](_0x367ab3),this[_0x308b89(0xb0)][_0x308b89(0xd8)](_0x367ab3)):null;}async[_0xbf0c54(0x94)](_0x100cb0,_0x3a57cd){const _0x13d134=_0xbf0c54;return await this[_0x13d134(0xdd)][_0x13d134(0x75)](_0x100cb0,_0x18b349[_0x13d134(0xa7)][_0x13d134(0xa0)],void 0x0,_0x3a57cd)?(await this[_0x13d134(0xae)]['readyForCollab'](_0x100cb0),this[_0x13d134(0xb0)]['getPdf'](_0x100cb0)):null;}[_0xbf0c54(0xce)](_0x21851d,_0x256b85){const _0x7b915b=_0xbf0c54;let _0x2e88e2=this[_0x7b915b(0x7f)][_0x7b915b(0xbc)](_0x42eff0[_0x7b915b(0x76)])[_0x7b915b(0xb9)](_0x21851d)['pipe']((0x0,_0x4a3183[_0x7b915b(0x6c)])(_0x50a3bd=>_0x50a3bd[_0x7b915b(0x82)]))['subscribe'](_0x309c00=>_0x256b85(Array[_0x7b915b(0x81)](_0x309c00[_0x7b915b(0xc7)]())));return(0x0,_0x18b349['toDisposable'])(_0x2e88e2);}[_0xbf0c54(0x98)](_0x1276c5){const _0x2363d8=_0xbf0c54;let _0x52ef64=this['_resolveUnitId'](_0x1276c5);if(!_0x52ef64)return _0x42eff0[_0x2363d8(0x88)][_0x2363d8(0x7d)];let _0x672b1d=this[_0x2363d8(0xae)][_0x2363d8(0x68)](_0x52ef64);return(_0x672b1d==null?void 0x0:_0x672b1d[_0x2363d8(0xb3)][_0x2363d8(0xa8)])??_0x42eff0[_0x2363d8(0x88)][_0x2363d8(0x7d)];}[_0xbf0c54(0x90)](_0x1d1219){const _0x1c3044=_0xbf0c54;let _0x52896b=this[_0x1c3044(0x6e)](_0x1d1219);return _0x52896b?this[_0x1c3044(0xae)][_0x1c3044(0x90)](_0x52896b):!0x1;}[_0xbf0c54(0xb4)](_0x148086,_0x53edc8={}){const _0x283abf=_0xbf0c54;let _0x341759=this[_0x283abf(0x6e)](_0x148086);if(!_0x341759)return Promise['reject'](Error('[FCollaboration]:\x20Cannot\x20flush\x20because\x20no\x20unit\x20is\x20focused\x20or\x20specified.'));let _0xa2ff1c=this[_0x283abf(0xae)][_0x283abf(0x68)](_0x341759);if(!_0xa2ff1c)return Promise[_0x283abf(0x66)](Error(_0x283abf(0xbf)+_0x341759+_0x283abf(0x85)));let _0x43bf95=_0xa2ff1c[_0x283abf(0xb3)][_0x283abf(0xa8)];if(_0x43bf95===_0x42eff0['CollaborationStatus'][_0x283abf(0xaa)])return Promise[_0x283abf(0x6a)]();let _0x1cef8e=_0x5acb6a(_0x341759,_0x43bf95);if(_0x1cef8e)return Promise[_0x283abf(0x66)](_0x1cef8e);let _0x2571a7=_0x53edc8[_0x283abf(0x9b)]??0x7530;return new Promise((_0x5caa5c,_0x5ac876)=>{const _0x52aac8=_0x283abf;let _0x2d6aeb=!0x1,_0x9d6ad3=null,_0x35136a=setTimeout(()=>{const _0x2a8065=_0x1cd3;_0x2d6aeb=!0x0,_0x9d6ad3==null||_0x9d6ad3[_0x2a8065(0x70)](),_0x5ac876(Error(_0x2a8065(0xd7)+_0x341759+_0x2a8065(0xa4)+_0x2571a7+_0x2a8065(0xd9)));},_0x2571a7),_0x4825a7=()=>{const _0x53baac=_0x1cd3;_0x2d6aeb=!0x0,clearTimeout(_0x35136a),_0x9d6ad3==null||_0x9d6ad3[_0x53baac(0x70)]();};_0x9d6ad3=_0xa2ff1c[_0x52aac8(0xc2)][_0x52aac8(0x9c)](_0x51c83f=>{const _0x240191=_0x52aac8;if(_0x2d6aeb)return;if(_0x51c83f===_0x42eff0[_0x240191(0x88)][_0x240191(0xaa)]){_0x4825a7(),_0x5caa5c();return;}let _0x488a4a=_0x5acb6a(_0x341759,_0x51c83f);_0x488a4a&&(_0x4825a7(),_0x5ac876(_0x488a4a));});});}['_resolveUnitId'](_0x294c0b){const _0x58d32f=_0xbf0c54;var _0x29bb68;return _0x294c0b||((_0x29bb68=this['_univerInstanceService']['getFocusedUnit']())==null?void 0x0:_0x29bb68[_0x58d32f(0x95)]());}};_0x50f853=_0x3cb5b7([_0x2c160c(0x1,(0x0,_0x18b349[_0xbf0c54(0x8e)])(_0x18b349[_0xbf0c54(0x7b)])),_0x2c160c(0x2,_0x18b349[_0xbf0c54(0xd6)]),_0x2c160c(0x3,(0x0,_0x18b349[_0xbf0c54(0x8e)])(_0x42eff0[_0xbf0c54(0x84)])),_0x2c160c(0x4,(0x0,_0x18b349[_0xbf0c54(0x8e)])(_0x42eff0[_0xbf0c54(0xb5)]))],_0x50f853);function _0x5acb6a(_0x40a592,_0x2b60ba){const _0x3395c4=_0xbf0c54;return _0x2b60ba===_0x42eff0[_0x3395c4(0x88)][_0x3395c4(0x80)]||_0x2b60ba===_0x42eff0['CollaborationStatus']['NOT_COLLAB']?Error(_0x3395c4(0xcd)+_0x40a592+_0x3395c4(0xcc)+_0x2b60ba+'.'):null;}var _0x2951a7=class extends _0x2db56a[_0xbf0c54(0x9f)]{[_0xbf0c54(0xa2)](_0x172df4){const _0x8ba8e4=_0xbf0c54;let _0x29e1fc=_0x172df4[_0x8ba8e4(0xbc)](_0x42eff0[_0x8ba8e4(0xb5)]);this[_0x8ba8e4(0xd1)](this[_0x8ba8e4(0xd2)](this[_0x8ba8e4(0x92)][_0x8ba8e4(0xbe)],()=>{const _0x5f07ed=_0x8ba8e4;let _0x2a82b1=new _0x18b349[(_0x5f07ed(0x8a))](),_0x446831=_0xfe9e90=>{const _0x210b1e=_0x5f07ed;let _0x389563=_0xfe9e90['status$'][_0x210b1e(0xb6)]((0x0,_0x4a3183[_0x210b1e(0x72)])())[_0x210b1e(0x9c)](_0x400e3d=>{const _0x319a7e=_0x210b1e;let _0x407517={'unitId':_0xfe9e90[_0x319a7e(0x86)],'status':_0x400e3d};this[_0x319a7e(0xb7)](this['Event']['CollaborationStatusChanged'],_0x407517);});_0x2a82b1[_0x210b1e(0x8f)]((0x0,_0x18b349[_0x210b1e(0x9e)])(_0x389563));};return _0x29e1fc[_0x5f07ed(0xa9)]()[_0x5f07ed(0xc8)](_0x446831),_0x2a82b1[_0x5f07ed(0x8f)]((0x0,_0x18b349[_0x5f07ed(0x9e)])(_0x29e1fc[_0x5f07ed(0x71)][_0x5f07ed(0x9c)](_0x446831))),_0x2a82b1;})),this[_0x8ba8e4(0xd1)](this[_0x8ba8e4(0xd2)](this[_0x8ba8e4(0x92)]['CollaborationConflict'],()=>{const _0x309c20=_0x8ba8e4;let _0x5d2ab2=new _0x18b349[(_0x309c20(0x8a))](),_0x11451b=_0x1232d0=>{const _0x22a571=_0x309c20;let _0x3c2e74=_0x1232d0[_0x22a571(0xde)]['subscribe'](_0x1ece67=>{const _0x3b9987=_0x22a571;let _0xcf0d31={'unitId':_0x1ece67[_0x3b9987(0x86)],'reason':_0x1ece67[_0x3b9987(0xb1)],'message':_0x1ece67[_0x3b9987(0x89)],'revert':_0x1ece67[_0x3b9987(0x7e)],'localChanges':_0x1ece67[_0x3b9987(0x7c)],'cacheCleared':_0x1ece67[_0x3b9987(0x8c)]};this[_0x3b9987(0xb7)](this['Event'][_0x3b9987(0x7a)],_0xcf0d31);});_0x5d2ab2[_0x22a571(0x8f)]((0x0,_0x18b349[_0x22a571(0x9e)])(_0x3c2e74));};return _0x29e1fc['getCollabEntities']()[_0x309c20(0xc8)](_0x11451b),_0x5d2ab2[_0x309c20(0x8f)]((0x0,_0x18b349[_0x309c20(0x9e)])(_0x29e1fc['entityInit$'][_0x309c20(0x9c)](_0x11451b))),_0x5d2ab2;})),this[_0x8ba8e4(0xd1)](this['registerEventHandler'](this[_0x8ba8e4(0x92)][_0x8ba8e4(0xdb)],()=>{const _0x1c81e0=_0x8ba8e4;let _0x526a33=new _0x18b349[(_0x1c81e0(0x8a))](),_0x41dded=_0x5d4ec4=>{const _0x327270=_0x1c81e0;let _0x143aaa=_0x5d4ec4['changesetResend$'][_0x327270(0x9c)](_0x221acc=>{const _0x4f1018=_0x327270;let _0x196f86={'unitId':_0x221acc['unitID'],'reqId':_0x221acc[_0x4f1018(0xc9)],'reason':_0x221acc[_0x4f1018(0xb1)],'attempt':_0x221acc[_0x4f1018(0xa1)],'elapsedMs':_0x221acc['elapsedMs'],'unsyncedMutationCount':_0x221acc[_0x4f1018(0xca)],'nextDelayMs':_0x221acc['nextDelayMs']};this['fireEvent'](this[_0x4f1018(0x92)][_0x4f1018(0xdb)],_0x196f86);});_0x526a33[_0x327270(0x8f)]((0x0,_0x18b349[_0x327270(0x9e)])(_0x143aaa));};return _0x29e1fc[_0x1c81e0(0xa9)]()[_0x1c81e0(0xc8)](_0x41dded),_0x526a33['add']((0x0,_0x18b349[_0x1c81e0(0x9e)])(_0x29e1fc['entityInit$'][_0x1c81e0(0x9c)](_0x41dded))),_0x526a33;}));}[_0xbf0c54(0xaf)](){const _0x1a6519=_0xbf0c54;return this[_0x1a6519(0x7f)][_0x1a6519(0xcb)](_0x50f853,{'getWorkbook':_0x12db00=>this[_0x1a6519(0x65)](_0x12db00),'getDocument':_0x215e1f=>this[_0x1a6519(0xbd)](_0x215e1f),'getPresentation':_0x2f2c58=>this[_0x1a6519(0xc1)](_0x2f2c58),'getBase':_0x1105ce=>this[_0x1a6519(0xd3)](_0x1105ce),'getBoard':_0x7b3951=>this[_0x1a6519(0xd8)](_0x7b3951),'getPdf':_0x1f63e5=>this[_0x1a6519(0x97)](_0x1f63e5)});}['loadServerUnit'](_0x14964f,_0x36643a,_0x4afa86){const _0x20e976=_0xbf0c54;return this['_injector'][_0x20e976(0xbc)](_0x42eff0[_0x20e976(0x84)])['loadUnit'](_0x14964f,_0x36643a,_0x4afa86);}[_0xbf0c54(0xc0)](_0x1c0013,_0x360a1b,_0x264fdb){const _0x4d337e=_0xbf0c54;return this[_0x4d337e(0x7f)][_0x4d337e(0xbc)](_0x42eff0[_0x4d337e(0x84)])['loadUnitOfRevision'](_0x1c0013,_0x360a1b,_0x264fdb);}};_0x2db56a['FUniver'][_0xbf0c54(0xb2)](_0x2951a7),Object['defineProperty'](_0x5f2bc9,_0xbf0c54(0x9d),{'enumerable':!0x0,'get':function(){return _0x50f853;}});}));function _0x1bc6(){const _0x3b85df=['121122CDbaGd','CollaborationConflict','Injector','localChanges','NOT_COLLAB','revert','_injector','CONFLICT','from','members$','@univerjs/core/facade','DataLoaderService','\x22\x20is\x20not\x20in\x20collaboration\x20mode.','unitID','loadSheetAsync','CollaborationStatus','message','DisposableCollection','1795485BrBjjo','cacheCleared','6280087AOdVlM','Inject','add','hasWritePending','FBase','Event','exports','loadPdfAsync','getUnitId','UNIVER_BOARD','getPdf','getCollaborationStatus','6VEwyOb','amd','timeout','subscribe','FCollaboration','toDisposable','FUniver','UNIVER_PDF','attempt','_initialize','FEnum','\x22\x20after\x20','function','UniverCoreFacade','UniverInstanceType','status','getCollabEntities','SYNCED','20bDKAda','_univerInstanceService','length','_collaborationController','getCollaboration','_handler','reason','extend','state','flush','CollaborationController','pipe','fireEvent','UniverProCollaborationClient','waitForRoom$','688eUwJXi','UNIVER_SHEET','get','getDocument','CollaborationStatusChanged','[FCollaboration]:\x20Unit\x20\x22','loadServerUnitOfRevision','getPresentation','status$','decorate','loadBoardAsync','UNIVER_SLIDE','13422876MRdLhK','values','forEach','reqId','unsyncedMutationCount','createInstance','\x22\x20while\x20collaboration\x20status\x20is\x20','[FCollaboration]:\x20Cannot\x20flush\x20unit\x20\x22','subscribeCollaborators','rxjs','1024pziyCm','disposeWithMe','registerEventHandler','getBase','@univerjs-pro/collaboration-client','readyForCollab','IUniverInstanceService','[FCollaboration]:\x20Timed\x20out\x20flushing\x20unit\x20\x22','getBoard','ms.','toStringTag','CollaborationChangesetResend','UNIVER_BASE','_dataLoaderService','conflict$','5726147tLtEWs','FEventName','getWorkbook','reject','object','getCollabEntity','defineProperty','resolve','Module','switchMap','loadDocAsync','_resolveUnitId','3904875bPnnOL','unsubscribe','entityInit$','distinctUntilChanged','8JOvtgF','UNIVER_DOC','loadUnit','MemberService','getOwnPropertyDescriptor','4sKbVIP'];_0x1bc6=function(){return _0x3b85df;};return _0x1bc6();}
|
|
1
|
+
(function(_0x4dea15,_0x1dd729){const _0x526174=_0x17b5,_0x37e073=_0x4dea15();while(!![]){try{const _0x35dab4=-parseInt(_0x526174(0x156))/0x1*(parseInt(_0x526174(0x146))/0x2)+-parseInt(_0x526174(0x17e))/0x3+-parseInt(_0x526174(0x11b))/0x4*(parseInt(_0x526174(0x17d))/0x5)+parseInt(_0x526174(0x14c))/0x6*(parseInt(_0x526174(0x169))/0x7)+-parseInt(_0x526174(0x13a))/0x8+parseInt(_0x526174(0x134))/0x9+parseInt(_0x526174(0x161))/0xa;if(_0x35dab4===_0x1dd729)break;else _0x37e073['push'](_0x37e073['shift']());}catch(_0x586608){_0x37e073['push'](_0x37e073['shift']());}}}(_0x19a3,0x55b0e),function(_0x18a468,_0x48014a){const _0x6476c1=_0x17b5;typeof exports==_0x6476c1(0x158)&&typeof module<'u'?_0x48014a(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs/core/facade'),require('@univerjs/core'),require('rxjs')):typeof define=='function'&&define['amd']?define([_0x6476c1(0x15a),_0x6476c1(0x122),'@univerjs/core/facade','@univerjs/core',_0x6476c1(0x16d)],_0x48014a):(_0x18a468=typeof globalThis<'u'?globalThis:_0x18a468||self,_0x48014a(_0x18a468['UniverProCollaborationClientFacade']={},_0x18a468[_0x6476c1(0x15f)],_0x18a468['UniverCoreFacade'],_0x18a468['UniverCore'],_0x18a468[_0x6476c1(0x16d)]));}(this,function(_0x1a9563,_0x3116ec,_0x5e3f0b,_0x55fa5b,_0x2a8999){const _0xd4bcc8=_0x17b5;Object[_0xd4bcc8(0x163)](_0x1a9563,Symbol[_0xd4bcc8(0x16b)],{'value':_0xd4bcc8(0x152)});var _0x314a94=class extends _0x5e3f0b[_0xd4bcc8(0x145)]{get[_0xd4bcc8(0x120)](){const _0xc53187=_0xd4bcc8;return _0x3116ec[_0xc53187(0x120)];}};_0x5e3f0b[_0xd4bcc8(0x145)][_0xd4bcc8(0x129)](_0x314a94);var _0x2ce332=class extends _0x5e3f0b[_0xd4bcc8(0x173)]{get[_0xd4bcc8(0x12a)](){const _0x54cd5b=_0xd4bcc8;return _0x54cd5b(0x12a);}get[_0xd4bcc8(0x136)](){const _0x3588a1=_0xd4bcc8;return _0x3588a1(0x136);}get['CollaborationChangesetResend'](){return'CollaborationChangesetResend';}};_0x5e3f0b[_0xd4bcc8(0x173)][_0xd4bcc8(0x129)](_0x2ce332);function _0x220f8c(_0x29a0d6,_0x26b32d){return function(_0x4d920c,_0x2aea01){_0x26b32d(_0x4d920c,_0x2aea01,_0x29a0d6);};}function _0x17ce5a(_0x46b383,_0x159458,_0x2f0cc6,_0x9bacaa){const _0x3ce176=_0xd4bcc8;var _0x6e5590=arguments['length'],_0x9188de=_0x6e5590<0x3?_0x159458:_0x9bacaa===null?_0x9bacaa=Object['getOwnPropertyDescriptor'](_0x159458,_0x2f0cc6):_0x9bacaa,_0x52ab3c;if(typeof Reflect==_0x3ce176(0x158)&&typeof Reflect[_0x3ce176(0x177)]==_0x3ce176(0x125))_0x9188de=Reflect[_0x3ce176(0x177)](_0x46b383,_0x159458,_0x2f0cc6,_0x9bacaa);else{for(var _0x3c49fd=_0x46b383[_0x3ce176(0x119)]-0x1;_0x3c49fd>=0x0;_0x3c49fd--)(_0x52ab3c=_0x46b383[_0x3c49fd])&&(_0x9188de=(_0x6e5590<0x3?_0x52ab3c(_0x9188de):_0x6e5590>0x3?_0x52ab3c(_0x159458,_0x2f0cc6,_0x9188de):_0x52ab3c(_0x159458,_0x2f0cc6))||_0x9188de);}return _0x6e5590>0x3&&_0x9188de&&Object[_0x3ce176(0x163)](_0x159458,_0x2f0cc6,_0x9188de),_0x9188de;}let _0x28a77d=class extends _0x5e3f0b[_0xd4bcc8(0x15d)]{constructor(_0x19fde2,_0x4710fd,_0xa70455,_0x287eec,_0x3b28f9){const _0x3386b6=_0xd4bcc8;super(),this['_handler']=_0x19fde2,this['_injector']=_0x4710fd,this['_univerInstanceService']=_0xa70455,this[_0x3386b6(0x166)]=_0x287eec,this[_0x3386b6(0x118)]=_0x3b28f9;}async[_0xd4bcc8(0x153)](_0x3c6171,_0x2995ba){const _0x109500=_0xd4bcc8;return await this[_0x109500(0x166)][_0x109500(0x12b)](_0x3c6171,_0x55fa5b[_0x109500(0x179)]['UNIVER_SHEET'],void 0x0,_0x2995ba)?(await this[_0x109500(0x118)][_0x109500(0x116)](_0x3c6171),this['_handler'][_0x109500(0x117)](_0x3c6171)):null;}async['loadDocAsync'](_0x3bea64,_0x3f0e8a){const _0x20fd6c=_0xd4bcc8;return await this[_0x20fd6c(0x166)]['loadUnit'](_0x3bea64,_0x55fa5b[_0x20fd6c(0x179)]['UNIVER_DOC'],void 0x0,_0x3f0e8a)?(await this[_0x20fd6c(0x118)][_0x20fd6c(0x116)](_0x3bea64),this['_handler']['getDocument'](_0x3bea64)):null;}async[_0xd4bcc8(0x17c)](_0x3d227c,_0x153c7b){const _0x5765cd=_0xd4bcc8;return await this[_0x5765cd(0x166)][_0x5765cd(0x12b)](_0x3d227c,_0x55fa5b[_0x5765cd(0x179)]['UNIVER_BASE'],void 0x0,_0x153c7b)?(await this[_0x5765cd(0x118)]['readyForCollab'](_0x3d227c),this[_0x5765cd(0x149)]['getBase'](_0x3d227c)):null;}async[_0xd4bcc8(0x13d)](_0x5950a0,_0x4028c6){const _0x22f484=_0xd4bcc8;return await this[_0x22f484(0x166)][_0x22f484(0x12b)](_0x5950a0,_0x55fa5b[_0x22f484(0x179)][_0x22f484(0x114)],void 0x0,_0x4028c6)?(await this[_0x22f484(0x118)][_0x22f484(0x116)](_0x5950a0),this[_0x22f484(0x149)][_0x22f484(0x14e)](_0x5950a0)):null;}async[_0xd4bcc8(0x11c)](_0x5a5ae8,_0x43ddc4){const _0x45761a=_0xd4bcc8;return await this[_0x45761a(0x166)]['loadUnit'](_0x5a5ae8,_0x55fa5b[_0x45761a(0x179)][_0x45761a(0x13f)],void 0x0,_0x43ddc4)?(await this[_0x45761a(0x118)][_0x45761a(0x116)](_0x5a5ae8),this[_0x45761a(0x149)][_0x45761a(0x144)](_0x5a5ae8)):null;}async[_0xd4bcc8(0x13e)](_0x15b94b,_0x198d72){const _0x546a57=_0xd4bcc8;return await this[_0x546a57(0x166)][_0x546a57(0x12b)](_0x15b94b,_0x55fa5b['UniverInstanceType']['UNIVER_PDF'],void 0x0,_0x198d72)?(await this[_0x546a57(0x118)][_0x546a57(0x116)](_0x15b94b),this[_0x546a57(0x149)][_0x546a57(0x150)](_0x15b94b)):null;}['subscribeCollaborators'](_0x225588,_0x2e6565){const _0x2e3574=_0xd4bcc8;let _0x133829=this[_0x2e3574(0x154)]['get'](_0x3116ec[_0x2e3574(0x137)])[_0x2e3574(0x124)](_0x225588)['pipe']((0x0,_0x2a8999[_0x2e3574(0x176)])(_0x4dee46=>_0x4dee46[_0x2e3574(0x135)]))[_0x2e3574(0x131)](_0x1a9740=>_0x2e6565(Array[_0x2e3574(0x171)](_0x1a9740[_0x2e3574(0x130)]())));return(0x0,_0x55fa5b[_0x2e3574(0x14a)])(_0x133829);}[_0xd4bcc8(0x16f)](_0x4e44ff){const _0x96535f=_0xd4bcc8;let _0x668ff2=this[_0x96535f(0x172)](_0x4e44ff);if(!_0x668ff2)return _0x3116ec[_0x96535f(0x120)][_0x96535f(0x143)];let _0x5e03e3=this[_0x96535f(0x118)][_0x96535f(0x140)](_0x668ff2);return(_0x5e03e3==null?void 0x0:_0x5e03e3[_0x96535f(0x164)]['status'])??_0x3116ec['CollaborationStatus'][_0x96535f(0x143)];}[_0xd4bcc8(0x15c)](_0xcf3a44){const _0xcfc81=_0xd4bcc8;let _0x463dae=this['_resolveUnitId'](_0xcf3a44);return _0x463dae?this[_0xcfc81(0x118)][_0xcfc81(0x15c)](_0x463dae):!0x1;}['flush'](_0x278cbf,_0x582ef0={}){const _0x5ae3d=_0xd4bcc8;let _0x555323=this['_resolveUnitId'](_0x278cbf);if(!_0x555323)return Promise['reject'](Error(_0x5ae3d(0x14b)));let _0x1756fd=this['_collaborationController'][_0x5ae3d(0x140)](_0x555323);if(!_0x1756fd)return Promise['reject'](Error(_0x5ae3d(0x178)+_0x555323+_0x5ae3d(0x13c)));let _0x33e6d3=_0x1756fd['state'][_0x5ae3d(0x147)];if(_0x33e6d3===_0x3116ec[_0x5ae3d(0x120)][_0x5ae3d(0x175)])return Promise[_0x5ae3d(0x115)]();let _0x194710=_0x1e70c3(_0x555323,_0x33e6d3);if(_0x194710)return Promise[_0x5ae3d(0x162)](_0x194710);let _0x39194d=_0x582ef0[_0x5ae3d(0x15e)]??0x7530;return new Promise((_0x3e0e34,_0x1abdda)=>{const _0x2ec7f3=_0x5ae3d;let _0x4956f4=!0x1,_0x191433=null,_0x12fdba=setTimeout(()=>{const _0x142acd=_0x17b5;_0x4956f4=!0x0,_0x191433==null||_0x191433[_0x142acd(0x15b)](),_0x1abdda(Error(_0x142acd(0x123)+_0x555323+_0x142acd(0x128)+_0x39194d+_0x142acd(0x16e)));},_0x39194d),_0x21c305=()=>{const _0x2a75cb=_0x17b5;_0x4956f4=!0x0,clearTimeout(_0x12fdba),_0x191433==null||_0x191433[_0x2a75cb(0x15b)]();};_0x191433=_0x1756fd['status$'][_0x2ec7f3(0x131)](_0x40fb6f=>{const _0x3e56d7=_0x2ec7f3;if(_0x4956f4)return;if(_0x40fb6f===_0x3116ec['CollaborationStatus'][_0x3e56d7(0x175)]){_0x21c305(),_0x3e0e34();return;}let _0x4fe745=_0x1e70c3(_0x555323,_0x40fb6f);_0x4fe745&&(_0x21c305(),_0x1abdda(_0x4fe745));});});}['_resolveUnitId'](_0x2b8153){const _0x5c5853=_0xd4bcc8;var _0x4edef5;return _0x2b8153||((_0x4edef5=this[_0x5c5853(0x12f)][_0x5c5853(0x17b)]())==null?void 0x0:_0x4edef5['getUnitId']());}};_0x28a77d=_0x17ce5a([_0x220f8c(0x1,(0x0,_0x55fa5b[_0xd4bcc8(0x11f)])(_0x55fa5b['Injector'])),_0x220f8c(0x2,_0x55fa5b[_0xd4bcc8(0x132)]),_0x220f8c(0x3,(0x0,_0x55fa5b[_0xd4bcc8(0x11f)])(_0x3116ec[_0xd4bcc8(0x165)])),_0x220f8c(0x4,(0x0,_0x55fa5b[_0xd4bcc8(0x11f)])(_0x3116ec[_0xd4bcc8(0x160)]))],_0x28a77d);function _0x1e70c3(_0x5564cd,_0x404c56){const _0x452281=_0xd4bcc8;return _0x404c56===_0x3116ec[_0x452281(0x120)]['CONFLICT']||_0x404c56===_0x3116ec[_0x452281(0x120)]['NOT_COLLAB']?Error(_0x452281(0x159)+_0x5564cd+_0x452281(0x11d)+_0x404c56+'.'):null;}var _0x241c5c=class extends _0x5e3f0b[_0xd4bcc8(0x126)]{[_0xd4bcc8(0x11a)](_0x22e9c0){const _0x2a2148=_0xd4bcc8;let _0x468f25=_0x22e9c0['get'](_0x3116ec['CollaborationController']);this[_0x2a2148(0x16a)](this[_0x2a2148(0x168)](this[_0x2a2148(0x139)]['CollaborationStatusChanged'],()=>{const _0x558c1c=_0x2a2148;let _0xcda015=new _0x55fa5b[(_0x558c1c(0x11e))](),_0x50cf07=_0x592e74=>{const _0x222eb8=_0x558c1c;let _0x2de0ee=_0x592e74['status$'][_0x222eb8(0x127)]((0x0,_0x2a8999[_0x222eb8(0x12c)])())[_0x222eb8(0x131)](_0x2aebf5=>{const _0x4cfaf4=_0x222eb8;let _0x2b3f4a={'unitId':_0x592e74['unitID'],'status':_0x2aebf5};this[_0x4cfaf4(0x121)](this[_0x4cfaf4(0x139)][_0x4cfaf4(0x12a)],_0x2b3f4a);});_0xcda015[_0x222eb8(0x141)]((0x0,_0x55fa5b['toDisposable'])(_0x2de0ee));};return _0x468f25[_0x558c1c(0x142)]()['forEach'](_0x50cf07),_0xcda015[_0x558c1c(0x141)]((0x0,_0x55fa5b[_0x558c1c(0x14a)])(_0x468f25[_0x558c1c(0x148)]['subscribe'](_0x50cf07))),_0xcda015;})),this['disposeWithMe'](this[_0x2a2148(0x168)](this[_0x2a2148(0x139)][_0x2a2148(0x136)],()=>{const _0xaee031=_0x2a2148;let _0x315571=new _0x55fa5b[(_0xaee031(0x11e))](),_0x125f40=_0x3b545f=>{const _0x59ed7d=_0xaee031;let _0x431c8a=_0x3b545f[_0x59ed7d(0x113)][_0x59ed7d(0x131)](_0x42c4e6=>{const _0x468e09=_0x59ed7d;let _0x48b804={'unitId':_0x42c4e6['unitID'],'reason':_0x42c4e6[_0x468e09(0x12d)],'message':_0x42c4e6[_0x468e09(0x12e)],'revert':_0x42c4e6[_0x468e09(0x13b)],'localChanges':_0x42c4e6['localChanges'],'cacheCleared':_0x42c4e6[_0x468e09(0x151)]};this[_0x468e09(0x121)](this[_0x468e09(0x139)][_0x468e09(0x136)],_0x48b804);});_0x315571[_0x59ed7d(0x141)]((0x0,_0x55fa5b[_0x59ed7d(0x14a)])(_0x431c8a));};return _0x468f25[_0xaee031(0x142)]()[_0xaee031(0x17a)](_0x125f40),_0x315571[_0xaee031(0x141)]((0x0,_0x55fa5b[_0xaee031(0x14a)])(_0x468f25[_0xaee031(0x148)][_0xaee031(0x131)](_0x125f40))),_0x315571;})),this[_0x2a2148(0x16a)](this['registerEventHandler'](this['Event'][_0x2a2148(0x170)],()=>{const _0x4f85de=_0x2a2148;let _0x93cc98=new _0x55fa5b['DisposableCollection'](),_0x40a7a8=_0x35be12=>{const _0x51b77c=_0x17b5;let _0x450ee1=_0x35be12[_0x51b77c(0x174)][_0x51b77c(0x131)](_0x8e30c0=>{const _0x404084=_0x51b77c;let _0x223c5c={'unitId':_0x8e30c0['unitID'],'reqId':_0x8e30c0['reqId'],'reason':_0x8e30c0[_0x404084(0x12d)],'attempt':_0x8e30c0[_0x404084(0x14f)],'elapsedMs':_0x8e30c0['elapsedMs'],'unsyncedMutationCount':_0x8e30c0['unsyncedMutationCount'],'nextDelayMs':_0x8e30c0[_0x404084(0x14d)]};this[_0x404084(0x121)](this[_0x404084(0x139)][_0x404084(0x170)],_0x223c5c);});_0x93cc98['add']((0x0,_0x55fa5b[_0x51b77c(0x14a)])(_0x450ee1));};return _0x468f25[_0x4f85de(0x142)]()[_0x4f85de(0x17a)](_0x40a7a8),_0x93cc98[_0x4f85de(0x141)]((0x0,_0x55fa5b[_0x4f85de(0x14a)])(_0x468f25[_0x4f85de(0x148)][_0x4f85de(0x131)](_0x40a7a8))),_0x93cc98;}));}['getCollaboration'](){const _0x24ce85=_0xd4bcc8;return this[_0x24ce85(0x154)]['createInstance'](_0x28a77d,{'getWorkbook':_0x3708cc=>this[_0x24ce85(0x117)](_0x3708cc),'getDocument':_0xa6f3b6=>this[_0x24ce85(0x167)](_0xa6f3b6),'getPresentation':_0x577d4a=>this[_0x24ce85(0x14e)](_0x577d4a),'getBase':_0x2f7823=>this[_0x24ce85(0x138)](_0x2f7823),'getBoard':_0xf6e3c0=>this['getBoard'](_0xf6e3c0),'getPdf':_0x527a8d=>this[_0x24ce85(0x150)](_0x527a8d)});}['loadServerUnit'](_0x8e08d4,_0x22c835,_0x5abb42){const _0x5483b2=_0xd4bcc8;return this[_0x5483b2(0x154)][_0x5483b2(0x133)](_0x3116ec[_0x5483b2(0x165)])[_0x5483b2(0x12b)](_0x8e08d4,_0x22c835,_0x5abb42);}[_0xd4bcc8(0x155)](_0x481147,_0x26a3ae,_0x1e120a){const _0x3d7461=_0xd4bcc8;return this[_0x3d7461(0x154)]['get'](_0x3116ec['DataLoaderService'])[_0x3d7461(0x16c)](_0x481147,_0x26a3ae,_0x1e120a);}};_0x5e3f0b[_0xd4bcc8(0x126)]['extend'](_0x241c5c),Object[_0xd4bcc8(0x163)](_0x1a9563,_0xd4bcc8(0x157),{'enumerable':!0x0,'get':function(){return _0x28a77d;}});}));function _0x17b5(_0x3d5e8c,_0x250a0f){_0x3d5e8c=_0x3d5e8c-0x113;const _0x19a30b=_0x19a3();let _0x17b595=_0x19a30b[_0x3d5e8c];return _0x17b595;}function _0x19a3(){const _0x360373=['getCollaborationStatus','CollaborationChangesetResend','from','_resolveUnitId','FEventName','changesetResend$','SYNCED','switchMap','decorate','[FCollaboration]:\x20Unit\x20\x22','UniverInstanceType','forEach','getFocusedUnit','loadBaseAsync','320DRxyVC','726015QxkKrt','conflict$','UNIVER_SLIDE','resolve','readyForCollab','getWorkbook','_collaborationController','length','_initialize','1368CZsQvv','loadBoardAsync','\x22\x20while\x20collaboration\x20status\x20is\x20','DisposableCollection','Inject','CollaborationStatus','fireEvent','@univerjs-pro/collaboration-client','[FCollaboration]:\x20Timed\x20out\x20flushing\x20unit\x20\x22','waitForRoom$','function','FUniver','pipe','\x22\x20after\x20','extend','CollaborationStatusChanged','loadUnit','distinctUntilChanged','reason','message','_univerInstanceService','values','subscribe','IUniverInstanceService','get','142416iJaXxX','members$','CollaborationConflict','MemberService','getBase','Event','4406840nGtmaT','revert','\x22\x20is\x20not\x20in\x20collaboration\x20mode.','loadSlideAsync','loadPdfAsync','UNIVER_BOARD','getCollabEntity','add','getCollabEntities','NOT_COLLAB','getBoard','FEnum','836810lVAAwy','status','entityInit$','_handler','toDisposable','[FCollaboration]:\x20Cannot\x20flush\x20because\x20no\x20unit\x20is\x20focused\x20or\x20specified.','71586iJvTFm','nextDelayMs','getPresentation','attempt','getPdf','cacheCleared','Module','loadSheetAsync','_injector','loadServerUnitOfRevision','1pXFQRn','FCollaboration','object','[FCollaboration]:\x20Cannot\x20flush\x20unit\x20\x22','exports','unsubscribe','hasWritePending','FBase','timeout','UniverProCollaborationClient','CollaborationController','15325260NVTwJn','reject','defineProperty','state','DataLoaderService','_dataLoaderService','getDocument','registerEventHandler','21uCdMZg','disposeWithMe','toStringTag','loadUnitOfRevision','rxjs','ms.'];_0x19a3=function(){return _0x360373;};return _0x19a3();}
|