@univerjs-pro/collaboration-client 0.25.1 → 1.0.0-alpha.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.
Files changed (97) hide show
  1. package/lib/cjs/facade.js +1 -1
  2. package/lib/cjs/index.js +1 -1
  3. package/lib/cjs/locale/ar-SA.js +1 -1
  4. package/lib/cjs/locale/ca-ES.js +1 -1
  5. package/lib/cjs/locale/de-DE.js +1 -1
  6. package/lib/cjs/locale/en-US.js +1 -1
  7. package/lib/cjs/locale/es-ES.js +1 -1
  8. package/lib/cjs/locale/fa-IR.js +1 -1
  9. package/lib/cjs/locale/fr-FR.js +1 -1
  10. package/lib/cjs/locale/id-ID.js +1 -1
  11. package/lib/cjs/locale/it-IT.js +1 -1
  12. package/lib/cjs/locale/ja-JP.js +1 -1
  13. package/lib/cjs/locale/ko-KR.js +1 -1
  14. package/lib/cjs/locale/pl-PL.js +1 -1
  15. package/lib/cjs/locale/pt-BR.js +1 -1
  16. package/lib/cjs/locale/ru-RU.js +1 -1
  17. package/lib/cjs/locale/sk-SK.js +1 -1
  18. package/lib/cjs/locale/vi-VN.js +1 -1
  19. package/lib/cjs/locale/zh-CN.js +1 -1
  20. package/lib/cjs/locale/zh-HK.js +1 -1
  21. package/lib/cjs/locale/zh-TW.js +1 -1
  22. package/lib/es/facade.js +1 -1
  23. package/lib/es/index.js +1 -1
  24. package/lib/es/locale/ar-SA.js +1 -1
  25. package/lib/es/locale/ca-ES.js +1 -1
  26. package/lib/es/locale/de-DE.js +1 -1
  27. package/lib/es/locale/en-US.js +1 -1
  28. package/lib/es/locale/es-ES.js +1 -1
  29. package/lib/es/locale/fa-IR.js +1 -1
  30. package/lib/es/locale/fr-FR.js +1 -1
  31. package/lib/es/locale/id-ID.js +1 -1
  32. package/lib/es/locale/it-IT.js +1 -1
  33. package/lib/es/locale/ja-JP.js +1 -1
  34. package/lib/es/locale/ko-KR.js +1 -1
  35. package/lib/es/locale/pl-PL.js +1 -1
  36. package/lib/es/locale/pt-BR.js +1 -1
  37. package/lib/es/locale/ru-RU.js +1 -1
  38. package/lib/es/locale/sk-SK.js +1 -1
  39. package/lib/es/locale/vi-VN.js +1 -1
  40. package/lib/es/locale/zh-CN.js +1 -1
  41. package/lib/es/locale/zh-HK.js +1 -1
  42. package/lib/es/locale/zh-TW.js +1 -1
  43. package/lib/facade.js +1 -1
  44. package/lib/index.js +1 -1
  45. package/lib/locale/ar-SA.js +1 -1
  46. package/lib/locale/ca-ES.js +1 -1
  47. package/lib/locale/de-DE.js +1 -1
  48. package/lib/locale/en-US.js +1 -1
  49. package/lib/locale/es-ES.js +1 -1
  50. package/lib/locale/fa-IR.js +1 -1
  51. package/lib/locale/fr-FR.js +1 -1
  52. package/lib/locale/id-ID.js +1 -1
  53. package/lib/locale/it-IT.js +1 -1
  54. package/lib/locale/ja-JP.js +1 -1
  55. package/lib/locale/ko-KR.js +1 -1
  56. package/lib/locale/pl-PL.js +1 -1
  57. package/lib/locale/pt-BR.js +1 -1
  58. package/lib/locale/ru-RU.js +1 -1
  59. package/lib/locale/sk-SK.js +1 -1
  60. package/lib/locale/vi-VN.js +1 -1
  61. package/lib/locale/zh-CN.js +1 -1
  62. package/lib/locale/zh-HK.js +1 -1
  63. package/lib/locale/zh-TW.js +1 -1
  64. package/lib/types/config/config.d.ts +70 -0
  65. package/lib/types/controllers/collaboration/collaboration-entity.d.ts +15 -1
  66. package/lib/types/controllers/collaboration/utils/changeset-utils.d.ts +6 -14
  67. package/lib/types/facade/f-collaboration.d.ts +38 -25
  68. package/lib/types/index.d.ts +11 -7
  69. package/lib/types/locale/types.d.ts +3 -0
  70. package/lib/types/plugin.d.ts +1 -1
  71. package/lib/types/services/attachment-remote/attachment-io.service.d.ts +22 -0
  72. package/lib/types/services/attachment-remote/types.d.ts +23 -0
  73. package/lib/types/services/data-loader/data-loader.service.d.ts +3 -0
  74. package/lib/types/services/local-cache/local-cache.service.d.ts +1 -0
  75. package/lib/umd/facade.js +1 -1
  76. package/lib/umd/index.js +1 -1
  77. package/lib/umd/locale/ar-SA.js +1 -1
  78. package/lib/umd/locale/ca-ES.js +1 -1
  79. package/lib/umd/locale/de-DE.js +1 -1
  80. package/lib/umd/locale/en-US.js +1 -1
  81. package/lib/umd/locale/es-ES.js +1 -1
  82. package/lib/umd/locale/fa-IR.js +1 -1
  83. package/lib/umd/locale/fr-FR.js +1 -1
  84. package/lib/umd/locale/id-ID.js +1 -1
  85. package/lib/umd/locale/it-IT.js +1 -1
  86. package/lib/umd/locale/ja-JP.js +1 -1
  87. package/lib/umd/locale/ko-KR.js +1 -1
  88. package/lib/umd/locale/pl-PL.js +1 -1
  89. package/lib/umd/locale/pt-BR.js +1 -1
  90. package/lib/umd/locale/ru-RU.js +1 -1
  91. package/lib/umd/locale/sk-SK.js +1 -1
  92. package/lib/umd/locale/vi-VN.js +1 -1
  93. package/lib/umd/locale/zh-CN.js +1 -1
  94. package/lib/umd/locale/zh-HK.js +1 -1
  95. package/lib/umd/locale/zh-TW.js +1 -1
  96. package/package.json +16 -14
  97. package/lib/types/controllers/config.schema.d.ts +0 -64
@@ -1,3 +1,73 @@
1
+ import type { Ctor, DependencyOverride } from '@univerjs/core';
2
+ import type { IAttachmentUploadOptions } from '../services/attachment-remote/types';
3
+ import type { ICollaborationSocketService } from '../services/socket/collaboration-socket.service';
4
+ export declare const COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY = "collaboration-client.config";
5
+ export declare const configSymbol: unique symbol;
6
+ export interface IUniverCollaborationClientConfig {
7
+ /**
8
+ * Which socket should the plugin use to build connections to the collaborative engine.
9
+ * For normal cases, you should use `BrowserCollaborationSocketService` from the `collaboration-client-ui` plugin.
10
+ */
11
+ socketService: Ctor<ICollaborationSocketService>;
12
+ /**
13
+ * If the plugin should enable collaborative editing. Which means the client will exchange edits with
14
+ * the collaboration server. It this is set to false, the client will simply load data from the server.
15
+ *
16
+ * @default true
17
+ */
18
+ enableCollaboration?: boolean;
19
+ /**
20
+ * If offline editing is enabled.
21
+ * @default false
22
+ */
23
+ enableOfflineEditing?: boolean;
24
+ enableSingleActiveInstanceLock?: boolean;
25
+ enableAuthServer?: boolean;
26
+ /**
27
+ * Override internal modules with custom implementations.
28
+ */
29
+ override?: DependencyOverride;
30
+ sendChangesetTimeout?: number;
31
+ snapshotServerUrl?: string;
32
+ collabSubmitChangesetUrl?: string;
33
+ collabWebSocketUrl?: string;
34
+ /**
35
+ * The URL of the endpoint for getting the websocket session ticket.
36
+ */
37
+ wsSessionTicketUrl?: string;
38
+ loginUrlKey?: string;
39
+ retryConnectingInterval?: number;
40
+ authzUrl?: string;
41
+ /**
42
+ * The URL of the endpoint for downloading files.
43
+ * @default 'location.origin'
44
+ */
45
+ downloadEndpointUrl?: string;
46
+ uploadFileServerUrl?: string;
47
+ signUrlServerUrl?: string;
48
+ /**
49
+ * Shared attachment upload restrictions and optional custom uploader used by
50
+ * the collaboration attachment IO service.
51
+ */
52
+ attachment?: IAttachmentUploadOptions;
53
+ /**
54
+ * The URL of the endpoint for starting formula limit.
55
+ */
56
+ startFormulaLimitUrl?: string;
57
+ /**
58
+ * The URL of the endpoint for getting formula limit status.
59
+ */
60
+ getFormulaLimitStatusUrl?: string;
61
+ /**
62
+ * The URL of the endpoint for releasing formula limit.
63
+ */
64
+ releaseFormulaLimitUrl?: string;
65
+ /**
66
+ * The socket connection custom headers.
67
+ */
68
+ customHeaders?: Record<string, string>;
69
+ }
70
+ export declare const defaultPluginConfig: Omit<IUniverCollaborationClientConfig, 'socketService'>;
1
71
  /**
2
72
  * Default value for `SNAPSHOT_SERVER_URL_KEY`.
3
73
  *
@@ -4,6 +4,7 @@ import type { CollaborationSession } from '../../services/collaboration-session/
4
4
  import type { CollaborationState, ICollaborationStateHandler, SyncEditingCollabCursorHandler, TransformIMEHandler, TransformRemoteChangesetByIMECache, TransformRemoteChangesetByStateCache, TransformSelectionsHandler, TransformStateHandler } from './collaboration-state';
5
5
  import { CompressMutationService, RevisionService } from '@univerjs-pro/collaboration';
6
6
  import { ICommandService, ILogService, Injector, IPermissionService, IUniverInstanceService, LocaleService, RxDisposable } from '@univerjs/core';
7
+ import { DocStateChangeManagerService } from '@univerjs/docs';
7
8
  import { BehaviorSubject } from 'rxjs';
8
9
  import { CollaborationUIEventService } from '../../services/collaboration-ui-event/collaboration-ui-event';
9
10
  import { ILocalCacheService } from '../../services/local-cache/local-cache.service';
@@ -79,13 +80,20 @@ export interface IDocCollaborationEntityCallback {
79
80
  export declare class DocCollaborationEntity extends CollaborationEntity {
80
81
  readonly unitID: string;
81
82
  readonly type: UniverInstanceType;
83
+ private readonly _docStateChangeManagerService?;
82
84
  private _handlerCallback;
83
- constructor(unitID: string, type: UniverInstanceType, session: CollaborationSession, injector: Injector, compressMutationService: CompressMutationService, localeService: LocaleService, revisionService: RevisionService, eventService: CollaborationUIEventService, univerInstanceService: IUniverInstanceService, logService: ILogService, commandService: ICommandService, permissionService: IPermissionService, singleActiveUnitService?: ISingleActiveUnitService, localCacheService?: ILocalCacheService);
85
+ constructor(unitID: string, type: UniverInstanceType, session: CollaborationSession, injector: Injector, compressMutationService: CompressMutationService, localeService: LocaleService, revisionService: RevisionService, eventService: CollaborationUIEventService, univerInstanceService: IUniverInstanceService, logService: ILogService, commandService: ICommandService, permissionService: IPermissionService, _docStateChangeManagerService?: DocStateChangeManagerService | undefined, singleActiveUnitService?: ISingleActiveUnitService, localCacheService?: ILocalCacheService);
84
86
  addHandlerCallback(cb: IDocCollaborationEntityCallback): void;
85
87
  dispose(): void;
86
88
  protected _createHandler(): ICollaborationStateHandler;
87
89
  protected _init(): Promise<CollaborationState>;
88
90
  }
91
+ export declare class BaseCollaborationEntity extends CollaborationEntity {
92
+ readonly unitID: string;
93
+ readonly type: UniverInstanceType;
94
+ constructor(unitID: string, type: UniverInstanceType, session: CollaborationSession, injector: Injector, compressMutationService: CompressMutationService, localeService: LocaleService, revisionService: RevisionService, eventService: CollaborationUIEventService, univerInstanceService: IUniverInstanceService, logService: ILogService, commandService: ICommandService, permissionService: IPermissionService, singleActiveUnitService?: ISingleActiveUnitService, localCacheService?: ILocalCacheService);
95
+ protected _init(): Promise<CollaborationState>;
96
+ }
89
97
  export declare class SheetCollaborationEntity extends CollaborationEntity {
90
98
  readonly unitID: string;
91
99
  readonly type: UniverInstanceType;
@@ -94,3 +102,9 @@ export declare class SheetCollaborationEntity extends CollaborationEntity {
94
102
  protected _createHandler(): ICollaborationStateHandler;
95
103
  protected _init(): Promise<CollaborationState>;
96
104
  }
105
+ export declare class SlideCollaborationEntity extends CollaborationEntity {
106
+ readonly unitID: string;
107
+ readonly type: UniverInstanceType;
108
+ constructor(unitID: string, type: UniverInstanceType, session: CollaborationSession, injector: Injector, compressMutationService: CompressMutationService, localeService: LocaleService, revisionService: RevisionService, eventService: CollaborationUIEventService, univerInstanceService: IUniverInstanceService, logService: ILogService, commandService: ICommandService, permissionService: IPermissionService, singleActiveUnitService?: ISingleActiveUnitService, localCacheService?: ILocalCacheService);
109
+ protected _init(): Promise<CollaborationState>;
110
+ }
@@ -15,19 +15,11 @@ export declare function isSplitChunkMutation(mutation: IMutationInfo): boolean;
15
15
  * Mutations those should be assembled into a single changeset.
16
16
  */
17
17
  export declare const SINGLE_CHANGESET_MUTATIONS: Set<string>;
18
- /**
19
- * Assemble a changeset from a list of mutations.
20
- *
21
- * Split chunk mutations (marked with __splitChunk__) and single-changeset mutations
22
- * will be sent in a separate changeset.
23
- *
24
- * @param pendingMutations - The list of pending mutations to assemble
25
- * @param unitID - The unit ID
26
- * @param univerInstanceService - The universe instance service
27
- * @param revisionService - The revision service
28
- * @param memberService - The member service
29
- * @returns The assembled changeset and remaining pending mutations
30
- */
31
- export declare function assembleSheetChangeset(pendingMutations: IMutationInfo[], unitID: string, univerInstanceService: IUniverInstanceService, revisionService: RevisionService, memberService: MemberService): IAssembledChangeset;
18
+ export declare const SLIDE_SINGLE_CHANGESET_MUTATIONS: Set<string>;
19
+ export declare function takeMutationsForChangeset(pendingMutations: IMutationInfo[], singleChangesetMutations?: Set<string>): IMutationInfo[];
20
+ export declare function assembleMutationChangeset(pendingMutations: IMutationInfo[], unitID: string, univerInstanceService: IUniverInstanceService, revisionService: RevisionService, memberService: MemberService): IAssembledChangeset;
21
+ export declare const assembleSheetChangeset: typeof assembleMutationChangeset;
22
+ export declare function assembleBaseChangeset(pendingMutations: IMutationInfo[], unitID: string, univerInstanceService: IUniverInstanceService, revisionService: RevisionService, memberService: MemberService): IAssembledChangeset;
23
+ export declare function assembleSlideChangeset(pendingMutations: IMutationInfo[], unitID: string, univerInstanceService: IUniverInstanceService, revisionService: RevisionService, memberService: MemberService): IAssembledChangeset;
32
24
  export declare function assembleDocChangeset(pendingMutations: IMutationInfo[], unitID: string, univerInstanceService: IUniverInstanceService, revisionService: RevisionService, memberService: MemberService): IAssembledChangeset;
33
25
  export declare function createTimerObservable$<T>(ms: number, options: T): Observable<T>;
@@ -1,5 +1,8 @@
1
+ import type { FBase as FBaseFacade } from '@univerjs-pro/bases/facade';
1
2
  import type { ILogContext } from '@univerjs-pro/collaboration';
3
+ import type { FPresentation } from '@univerjs-pro/slides/facade';
2
4
  import type { IDisposable } from '@univerjs/core';
5
+ import type { FDocument } from '@univerjs/docs/facade';
3
6
  import type { IMember } from '@univerjs/protocol';
4
7
  import type { FWorkbook } from '@univerjs/sheets/facade';
5
8
  import { SnapshotService } from '@univerjs-pro/collaboration';
@@ -18,49 +21,59 @@ export declare class FCollaboration extends FBase {
18
21
  protected readonly _snapshotService: SnapshotService;
19
22
  protected readonly _collaborationController: CollaborationController;
20
23
  constructor(_handler: {
21
- getUniverSheet: (id: string) => FWorkbook | null;
24
+ getWorkbook: (id: string) => FWorkbook | null;
25
+ getDocument: (id: string) => FDocument | null;
26
+ getPresentation: (id: string) => FPresentation | null;
27
+ getBase: (id: string) => FBaseFacade | null;
22
28
  }, _injector: Injector, _univerInstanceService: IUniverInstanceService, _snapshotService: SnapshotService, _collaborationController: CollaborationController);
23
29
  /**
24
- * @returns {Promise<FWorkbook | null>} The {@link FWorkbook} or null if the active Univer Sheet cannot be loaded.
25
- *
26
- * @deprecated Use `loadActiveSheetAsync` instead.
30
+ * Load a Univer Sheet from the server with a unit ID.
31
+ * @param {string} unitId ID of the Univer Sheet that you would like to load.
32
+ * @param {ILogContext} [context] Optional context.
33
+ * @returns {Promise<FWorkbook | null>} The {@link FWorkbook} or null if ID cannot be associated with a Univer Sheet.
34
+ * @example
35
+ * ```typescript
36
+ * const collaboration = univerAPI.getCollaboration();
37
+ * const workbook = await collaboration.loadSheetAsync('your-unit-id');
38
+ * ```
27
39
  */
28
- loadActiveSheet(): Promise<FWorkbook | null>;
40
+ loadSheetAsync(unitId: string, context?: ILogContext): Promise<FWorkbook | null>;
29
41
  /**
30
- * Load the active Univer Sheet. It should be associated with the Uniscript Node.js Runtime.
31
- *
32
- * @returns {Promise<FWorkbook | null>} The {@link FWorkbook} or null if the active Univer Sheet cannot be loaded.
33
- * @throws {Error} If the method is not overridden.
34
- *
42
+ * Load a Univer Document from the server with a unit ID.
43
+ * @param {string} unitId ID of the Univer Document that you would like to load.
44
+ * @param {ILogContext} [context] Optional context.
45
+ * @returns {Promise<FDocument | null>} The {@link FDocument} or null if ID cannot be associated with a Univer Document.
35
46
  * @example
36
47
  * ```typescript
37
48
  * const collaboration = univerAPI.getCollaboration();
38
- * const workbook = await collaboration.loadActiveSheetAsync();
49
+ * const document = await collaboration.loadDocAsync('your-unit-id');
39
50
  * ```
40
51
  */
41
- loadActiveSheetAsync(): Promise<FWorkbook | null>;
52
+ loadDocAsync(unitId: string, context?: ILogContext): Promise<FDocument | null>;
42
53
  /**
43
- * @param {string} unitId The Id of the Univer Sheet that you would like to load.
44
- * @returns {Promise<FWorkbook | null>} The {@link FWorkbook} or null if the Univer Sheet cannot be loaded.
45
- *
46
- * @deprecated Use `loadSheetAsync` instead.
54
+ * Load a Univer Base from the server with a unit ID.
55
+ * @param {string} unitId ID of the Univer Base that you would like to load.
56
+ * @param {ILogContext} [context] Optional context.
57
+ * @returns {Promise<FBaseFacade | null>} The Base facade or null if ID cannot be associated with a Univer Base.
58
+ * @example
59
+ * ```typescript
60
+ * const collaboration = univerAPI.getCollaboration();
61
+ * const base = await collaboration.loadBaseAsync('your-unit-id');
62
+ * ```
47
63
  */
48
- loadSheet(unitId: string): Promise<FWorkbook | null>;
64
+ loadBaseAsync(unitId: string, context?: ILogContext): Promise<FBaseFacade | null>;
49
65
  /**
50
- * Load a Univer Sheet from the server with a unit ID.
51
- *
52
- * @param {string} unitId ID of the Univer Sheet that you would like to load.
66
+ * Load a Univer Slide from the server with a unit ID.
67
+ * @param {string} unitId ID of the Univer Slide that you would like to load.
53
68
  * @param {ILogContext} [context] Optional context.
54
- *
55
- * @returns {Promise<FWorkbook | null>} The {@link FWorkbook} or null if ID cannot be associated with a Univer Sheet.
56
- *
69
+ * @returns {Promise<FPresentation | null>} The {@link FPresentation} or null if ID cannot be associated with a Univer Slide.
57
70
  * @example
58
71
  * ```typescript
59
72
  * const collaboration = univerAPI.getCollaboration();
60
- * const workbook = await collaboration.loadSheetAsync('your-unit-id');
73
+ * const presentation = await collaboration.loadSlideAsync('your-unit-id');
61
74
  * ```
62
75
  */
63
- loadSheetAsync(unitId: string, context?: ILogContext): Promise<FWorkbook | null>;
76
+ loadSlideAsync(unitId: string, context?: ILogContext): Promise<FPresentation | null>;
64
77
  /**
65
78
  * Subscribe collaborators of a Univer file.
66
79
  *
@@ -1,19 +1,23 @@
1
1
  export { DEFAULT_WS_SESSION_TICKET_URL, HEARTBEAT_INTERVAL_KEY, HEARTBEAT_TIMEOUT_KEY, LOCAL_CACHE_INTERVAL, LOCAL_CACHE_INTERVAL_KEY, RETRY_CONNECTING_MAX_COUNT_KEY, } from './config/config';
2
- export { DEFAULT_COLLAB_WEB_SOCKET_URL, DEFAULT_REMOTE_UNISCRIPT_EXECUTION_ENDPOINT, REMOTE_UNISCRIPT_EXECUTION_ENDPOINT_KEY } from './config/config';
3
- export { CollaborationEntity, DocCollaborationEntity, type IDocCollaborationEntityCallback, SheetCollaborationEntity } from './controllers/collaboration/collaboration-entity';
4
- export { AwaitingState, AwaitingWithPendingState, CollaborationStatus, ConflictState, FetchingMissState, OfflineState, PendingState, SyncedState } from './controllers/collaboration/collaboration-state';
2
+ export { DEFAULT_COLLAB_WEB_SOCKET_URL, DEFAULT_REMOTE_UNISCRIPT_EXECUTION_ENDPOINT, REMOTE_UNISCRIPT_EXECUTION_ENDPOINT_KEY, } from './config/config';
3
+ export type { IUniverCollaborationClientConfig } from './config/config';
4
+ export { COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY } from './config/config';
5
+ export { CollaborationEntity, DocCollaborationEntity, SheetCollaborationEntity, } from './controllers/collaboration/collaboration-entity';
6
+ export type { IDocCollaborationEntityCallback } from './controllers/collaboration/collaboration-entity';
7
+ export { AwaitingState, AwaitingWithPendingState, CollaborationStatus, ConflictState, FetchingMissState, OfflineState, PendingState, SyncedState, } from './controllers/collaboration/collaboration-state';
5
8
  export { CollaborationController } from './controllers/collaboration/collaboration.controller';
6
- export type { IUniverCollaborationClientConfig } from './controllers/config.schema';
7
- export { COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY } from './controllers/config.schema';
8
9
  export { UniverCollaborationClientPlugin } from './plugin';
10
+ export { AttachmentSourceType, CollaborationAttachmentIoService, IAttachmentIoService, } from './services/attachment-remote/attachment-io.service';
11
+ export type { AttachmentValue, IAttachmentIoService as IAttachmentIoServiceType, IAttachmentUploadOptions, IAttachmentValue, } from './services/attachment-remote/attachment-io.service';
9
12
  export { AuthzIoHttpService } from './services/auth-server/authz-io-http.service';
10
13
  export { CollaborationSession, SessionStatus } from './services/collaboration-session/collaboration-session';
11
14
  export { CollaborationSessionService } from './services/collaboration-session/collaboration-session.service';
12
- export { CollaborationUIEventId, CollaborationUIEventService } from './services/collaboration-ui-event/collaboration-ui-event';
15
+ export { CollaborationUIEventId, CollaborationUIEventService, } from './services/collaboration-ui-event/collaboration-ui-event';
13
16
  export { CommentService } from './services/comment/comment.service';
14
17
  export { DataLoaderService } from './services/data-loader/data-loader.service';
15
18
  export { CollaborationImageIoService } from './services/image-remote/image-io.service';
16
- export { getLocalCacheKey, ILocalCacheService, type IUnitCacheData } from './services/local-cache/local-cache.service';
19
+ export { getLocalCacheKey, ILocalCacheService } from './services/local-cache/local-cache.service';
20
+ export type { IUnitCacheData } from './services/local-cache/local-cache.service';
17
21
  export { MemberService } from './services/member/member.service';
18
22
  export { MentionIoHttpService } from './services/mention-server/mention-io-http.service';
19
23
  export { INetworkConditionService } from './services/network-condition/network-condition.service';
@@ -0,0 +1,3 @@
1
+ import type { LocaleLeafKeys } from '@univerjs/core';
2
+ import type enUS from './en-US';
3
+ export type LocaleKey = LocaleLeafKeys<typeof enUS>;
@@ -1,4 +1,4 @@
1
- import type { IUniverCollaborationClientConfig } from './controllers/config.schema';
1
+ import type { IUniverCollaborationClientConfig } from './config/config';
2
2
  import { IConfigService, ILogService, Injector, Plugin } from '@univerjs/core';
3
3
  export declare class UniverCollaborationClientPlugin extends Plugin {
4
4
  private readonly _config;
@@ -0,0 +1,22 @@
1
+ import type { AttachmentValue, IAttachmentUploadOptions, IAttachmentValue } from './types';
2
+ import { IConfigService, IUniverInstanceService } from '@univerjs/core';
3
+ import { HTTPService } from '@univerjs/network';
4
+ import { AttachmentSourceType } from './types';
5
+ export { AttachmentSourceType };
6
+ export type { AttachmentValue, IAttachmentUploadOptions, IAttachmentValue };
7
+ export interface IAttachmentIoService {
8
+ getUploadOptions(): IAttachmentUploadOptions;
9
+ saveAttachment(file: File): Promise<IAttachmentValue>;
10
+ }
11
+ export declare const IAttachmentIoService: import("@wendellhu/redi").IdentifierDecorator<IAttachmentIoService>;
12
+ export declare class CollaborationAttachmentIoService implements IAttachmentIoService {
13
+ private readonly _httpService;
14
+ private readonly _configService;
15
+ private readonly _univerInstanceService;
16
+ constructor(_httpService: HTTPService, _configService: IConfigService, _univerInstanceService: IUniverInstanceService);
17
+ getUploadOptions(): IAttachmentUploadOptions;
18
+ saveAttachment(file: File): Promise<IAttachmentValue>;
19
+ private _upload;
20
+ private _getUploadFileURL;
21
+ private _getConfig;
22
+ }
@@ -0,0 +1,23 @@
1
+ export declare enum AttachmentSourceType {
2
+ URL = "URL",
3
+ UUID = "UUID",
4
+ BASE64 = "BASE64"
5
+ }
6
+ export interface IAttachmentValue {
7
+ id: string;
8
+ name: string;
9
+ mimeType?: string;
10
+ size?: number;
11
+ width?: number;
12
+ height?: number;
13
+ sourceType?: AttachmentSourceType;
14
+ source?: string;
15
+ base64?: string;
16
+ thumbnail?: string;
17
+ }
18
+ export type AttachmentValue = IAttachmentValue;
19
+ export interface IAttachmentUploadOptions {
20
+ accept?: string[];
21
+ maxSize?: number;
22
+ upload?: (file: File) => Promise<IAttachmentValue>;
23
+ }
@@ -15,8 +15,11 @@ export declare class DataLoaderService extends RxDisposable {
15
15
  private readonly _snapshotService;
16
16
  private readonly _localCacheService?;
17
17
  private readonly _unitInfo$;
18
+ private readonly _unitLoaded$;
18
19
  readonly unitInfo$: import("rxjs").Observable<IUnitInfo | null>;
20
+ readonly unitLoaded$: import("rxjs").Observable<UnitModel<object, UniverInstanceType>>;
19
21
  constructor(_logService: ILogService, _snapshotService: SnapshotService, _localCacheService?: ILocalCacheService | undefined);
22
+ dispose(): void;
20
23
  loadUnitOfRevision(unitId: string, type: UniverInstanceType, rev: number): Promise<UnitModel | null>;
21
24
  loadUnit(unitId: string, type: UniverInstanceType, subUnitId?: string): Promise<UnitModel | null>;
22
25
  }
@@ -10,6 +10,7 @@ export interface IUnitCacheData {
10
10
  export interface ILocalCacheService {
11
11
  loadOfflineData(unitID: string): Promise<Nullable<IUnitCacheData>>;
12
12
  saveOfflineData(unitID: string, data: IUnitCacheData): Promise<boolean>;
13
+ backupOfflineData?(unitID: string, reason: string): Promise<void>;
13
14
  updateOfflineData(unitID: string, type: UniverInstanceType, awaitingChangeset: Nullable<IChangeset>, pendingMutations: IMutationInfo[]): void;
14
15
  disableLocalCache(): void;
15
16
  enableLocalCache(): void;
package/lib/umd/facade.js CHANGED
@@ -1 +1 @@
1
- function _0x4f16(){const _0x29acf8=['subscribe','status','FUniver','@univerjs/core/facade','DataLoaderService','switchMap','loadUnit','defineProperty','325794JvYJue','toStringTag','values','state','toDisposable','fireEvent','FEnum','get','1070DDCmXa','getUnitId','FEventName','getUniverSheet','@univerjs/core','getOwnPropertyDescriptor','1068KZzCay','CollaborationStatusChanged','waitForRoom$','NOT_COLLAB','_snapshotService','60950nFpDsF','readyForCollab','CollaborationStatus','UniverCore','CollaborationController','loadActiveSheetAsync','MemberService','Event','amd','94208kHjwrE','UniverProCollaboration','subscribeCollaborators','412344huXKZH','_handler','@univerjs-pro/collaboration-client','extend','16qknCHf','17435sMSzOf','object','loadServerUnitOfRevision','loadActiveSheet','2685ODKUVJ','add','FBase','getCollabEntity','28fXpNqk','from','function','_univerInstanceService','getFocusedUnit','createInstance','UniverCoreFacade','[FCollaboration]:\x20this\x20method\x20should\x20be\x20override.','_injector','entityInit$','rxjs','Inject','UniverProCollaborationClient','_collaborationController','loadSheetAsync','pipe','FCollaboration','disposeWithMe','IUniverInstanceService','status$','623331demgjY','registerEventHandler'];_0x4f16=function(){return _0x29acf8;};return _0x4f16();}function _0x2ed8(_0x3fbedd,_0x240bf){_0x3fbedd=_0x3fbedd-0x13b;const _0x4f169a=_0x4f16();let _0x2ed8a6=_0x4f169a[_0x3fbedd];return _0x2ed8a6;}(function(_0x4ea820,_0x3b7886){const _0x2c0583=_0x2ed8,_0x3ca6e2=_0x4ea820();while(!![]){try{const _0x11c233=-parseInt(_0x2c0583(0x140))/0x1+-parseInt(_0x2c0583(0x181))/0x2+-parseInt(_0x2c0583(0x143))/0x3+parseInt(_0x2c0583(0x17c))/0x4*(-parseInt(_0x2c0583(0x14c))/0x5)+parseInt(_0x2c0583(0x16e))/0x6*(parseInt(_0x2c0583(0x150))/0x7)+-parseInt(_0x2c0583(0x147))/0x8*(-parseInt(_0x2c0583(0x164))/0x9)+-parseInt(_0x2c0583(0x176))/0xa*(-parseInt(_0x2c0583(0x148))/0xb);if(_0x11c233===_0x3b7886)break;else _0x3ca6e2['push'](_0x3ca6e2['shift']());}catch(_0x2007a0){_0x3ca6e2['push'](_0x3ca6e2['shift']());}}}(_0x4f16,0x1d3f7),function(_0x3ba047,_0x5c5b1a){const _0xc2a6b8=_0x2ed8;typeof exports==_0xc2a6b8(0x149)&&typeof module<'u'?_0x5c5b1a(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs/core/facade'),require('@univerjs/core'),require('@univerjs-pro/collaboration'),require('rxjs')):typeof define==_0xc2a6b8(0x152)&&define[_0xc2a6b8(0x13f)]?define(['exports',_0xc2a6b8(0x145),_0xc2a6b8(0x169),_0xc2a6b8(0x17a),'@univerjs-pro/collaboration',_0xc2a6b8(0x15a)],_0x5c5b1a):(_0x3ba047=typeof globalThis<'u'?globalThis:_0x3ba047||self,_0x5c5b1a(_0x3ba047['UniverProCollaborationClientFacade']={},_0x3ba047[_0xc2a6b8(0x15c)],_0x3ba047[_0xc2a6b8(0x156)],_0x3ba047[_0xc2a6b8(0x184)],_0x3ba047[_0xc2a6b8(0x141)],_0x3ba047[_0xc2a6b8(0x15a)]));}(this,function(_0x42c08a,_0x38453c,_0x3f5874,_0x49ed18,_0x2ca723,_0x5b2425){const _0x524525=_0x2ed8;Object['defineProperty'](_0x42c08a,Symbol[_0x524525(0x16f)],{'value':'Module'});var _0x14f7a4=class extends _0x3f5874[_0x524525(0x174)]{get[_0x524525(0x183)](){const _0x82585b=_0x524525;return _0x38453c[_0x82585b(0x183)];}};_0x3f5874[_0x524525(0x174)]['extend'](_0x14f7a4);var _0x20f11a=class extends _0x3f5874['FEventName']{get[_0x524525(0x17d)](){const _0x15d362=_0x524525;return _0x15d362(0x17d);}};_0x3f5874[_0x524525(0x178)][_0x524525(0x146)](_0x20f11a);function _0x44aa76(_0x4856d3,_0x5d5d4f){return function(_0x55ffff,_0x3cef31){_0x5d5d4f(_0x55ffff,_0x3cef31,_0x4856d3);};}function _0xae4797(_0x32b7b5,_0x2c320d,_0x462cd8,_0x4ac79c){const _0x1cd8b2=_0x524525;var _0xb2efa1=arguments['length'],_0x5ce362=_0xb2efa1<0x3?_0x2c320d:_0x4ac79c===null?_0x4ac79c=Object[_0x1cd8b2(0x17b)](_0x2c320d,_0x462cd8):_0x4ac79c,_0xe3d0cb;if(typeof Reflect==_0x1cd8b2(0x149)&&typeof Reflect['decorate']=='function')_0x5ce362=Reflect['decorate'](_0x32b7b5,_0x2c320d,_0x462cd8,_0x4ac79c);else{for(var _0x544419=_0x32b7b5['length']-0x1;_0x544419>=0x0;_0x544419--)(_0xe3d0cb=_0x32b7b5[_0x544419])&&(_0x5ce362=(_0xb2efa1<0x3?_0xe3d0cb(_0x5ce362):_0xb2efa1>0x3?_0xe3d0cb(_0x2c320d,_0x462cd8,_0x5ce362):_0xe3d0cb(_0x2c320d,_0x462cd8))||_0x5ce362);}return _0xb2efa1>0x3&&_0x5ce362&&Object[_0x1cd8b2(0x16d)](_0x2c320d,_0x462cd8,_0x5ce362),_0x5ce362;}let _0x1c820e=class extends _0x3f5874[_0x524525(0x14e)]{constructor(_0x127b57,_0x49b281,_0x20650f,_0x41fd07,_0x4f403a){const _0x2867d9=_0x524525;super(),this[_0x2867d9(0x144)]=_0x127b57,this[_0x2867d9(0x158)]=_0x49b281,this[_0x2867d9(0x153)]=_0x20650f,this['_snapshotService']=_0x41fd07,this[_0x2867d9(0x15d)]=_0x4f403a;}async[_0x524525(0x14b)](){const _0x4ed2e3=_0x524525;return this[_0x4ed2e3(0x13c)]();}async[_0x524525(0x13c)](){const _0xe7c737=_0x524525;throw Error(_0xe7c737(0x157));}async['loadSheet'](_0x379904){const _0x59aaf0=_0x524525;return this[_0x59aaf0(0x15e)](_0x379904);}async['loadSheetAsync'](_0x58bbad,_0x31799a){const _0x58cae0=_0x524525;return await this[_0x58cae0(0x180)]['loadSheet'](_0x58bbad,0x0,_0x31799a)?(await this[_0x58cae0(0x15d)][_0x58cae0(0x182)](_0x58bbad),this[_0x58cae0(0x144)]['getUniverSheet'](_0x58bbad)):null;}[_0x524525(0x142)](_0x19b9ba,_0x5961f8){const _0x17f850=_0x524525;return(0x0,_0x49ed18[_0x17f850(0x172)])(this[_0x17f850(0x158)][_0x17f850(0x175)](_0x38453c[_0x17f850(0x13d)])[_0x17f850(0x17e)](_0x19b9ba)[_0x17f850(0x15f)]((0x0,_0x5b2425[_0x17f850(0x16b)])(_0x7223b7=>_0x7223b7['members$']))['subscribe'](_0x337cfb=>_0x5961f8(Array[_0x17f850(0x151)](_0x337cfb[_0x17f850(0x170)]()))));}['getCollaborationStatus'](_0x5e823e){const _0x5b8782=_0x524525;var _0x3dcf85;let _0x2c8c6d;if(_0x5e823e)_0x2c8c6d=_0x5e823e;else{let _0x1215d7=this['_univerInstanceService'][_0x5b8782(0x154)]();_0x2c8c6d=_0x1215d7==null?void 0x0:_0x1215d7[_0x5b8782(0x177)]();}if(!_0x2c8c6d)return _0x38453c['CollaborationStatus'][_0x5b8782(0x17f)];let _0xd1b217=this['_collaborationController'][_0x5b8782(0x14f)](_0x2c8c6d);return(_0x3dcf85=_0xd1b217==null?void 0x0:_0xd1b217[_0x5b8782(0x171)][_0x5b8782(0x167)])==null?_0x38453c['CollaborationStatus'][_0x5b8782(0x17f)]:_0x3dcf85;}};_0x1c820e=_0xae4797([_0x44aa76(0x1,(0x0,_0x49ed18[_0x524525(0x15b)])(_0x49ed18['Injector'])),_0x44aa76(0x2,_0x49ed18[_0x524525(0x162)]),_0x44aa76(0x3,(0x0,_0x49ed18[_0x524525(0x15b)])(_0x2ca723['SnapshotService'])),_0x44aa76(0x4,(0x0,_0x49ed18[_0x524525(0x15b)])(_0x38453c[_0x524525(0x13b)]))],_0x1c820e);var _0x243ed0=class extends _0x3f5874[_0x524525(0x168)]{['_initialize'](_0x12f827){const _0x5d11db=_0x524525;let _0x306700=_0x12f827['get'](_0x38453c[_0x5d11db(0x13b)]);this[_0x5d11db(0x161)](this[_0x5d11db(0x165)](this['Event'][_0x5d11db(0x17d)],()=>{const _0x3fa8eb=_0x5d11db;let _0xcedb33=new _0x49ed18['DisposableCollection'](),_0x6343d6=_0x306700[_0x3fa8eb(0x159)][_0x3fa8eb(0x166)](_0x2ce3ed=>{const _0x109296=_0x3fa8eb;let _0x4628d1=_0x2ce3ed[_0x109296(0x163)][_0x109296(0x166)](_0x6b54db=>{const _0x24b04c=_0x109296;let _0x4784cb={'unitId':_0x2ce3ed['unitID'],'status':_0x6b54db};this[_0x24b04c(0x173)](this[_0x24b04c(0x13e)]['CollaborationStatusChanged'],_0x4784cb);});_0xcedb33['add']((0x0,_0x49ed18[_0x109296(0x172)])(_0x4628d1));});return _0xcedb33[_0x3fa8eb(0x14d)]((0x0,_0x49ed18[_0x3fa8eb(0x172)])(_0x6343d6)),_0xcedb33;}));}['getCollaboration'](){const _0x31557e=_0x524525;return this['_injector'][_0x31557e(0x155)](_0x1c820e,{'getUniverSheet':_0x1ef89d=>this[_0x31557e(0x179)](_0x1ef89d)});}['loadServerUnit'](_0x56e962,_0xaadb01,_0xf24483){const _0x43e9f4=_0x524525;return this[_0x43e9f4(0x158)]['get'](_0x38453c[_0x43e9f4(0x16a)])[_0x43e9f4(0x16c)](_0x56e962,_0xaadb01,_0xf24483);}[_0x524525(0x14a)](_0x43ae30,_0x1c15ad,_0x54dbb5){const _0x4065b8=_0x524525;return this[_0x4065b8(0x158)][_0x4065b8(0x175)](_0x38453c[_0x4065b8(0x16a)])['loadUnitOfRevision'](_0x43ae30,_0x1c15ad,_0x54dbb5);}};_0x3f5874['FUniver'][_0x524525(0x146)](_0x243ed0),Object['defineProperty'](_0x42c08a,_0x524525(0x160),{'enumerable':!0x0,'get':function(){return _0x1c820e;}});}));
1
+ function _0x4322(_0x1d64c9,_0xa85045){_0x1d64c9=_0x1d64c9-0x1bb;const _0x3879e1=_0x3879();let _0x432296=_0x3879e1[_0x1d64c9];return _0x432296;}function _0x3879(){const _0x334e76=['CollaborationStatusChanged','FUniver','7gfrpiM','disposeWithMe','3971902CoQkJP','length','_handler','loadSlide','@univerjs/core/facade','decorate','add','_collaborationController','getCollaboration','defineProperty','FEventName','DataLoaderService','readyForCollab','877693tHCBnH','values','@univerjs/core','loadServerUnitOfRevision','Injector','toStringTag','registerEventHandler','entityInit$','_snapshotService','loadBaseAsync','FEnum','exports','loadUnitOfRevision','UniverProCollaborationClient','36IGCIcv','CollaborationController','UniverProCollaboration','973168TxITEy','toDisposable','getDocument','_injector','IUniverInstanceService','FCollaboration','pipe','1173096NKrbST','10YDSxUF','FBase','getFocusedUnit','CollaborationStatus','MemberService','object','loadSheet','getCollabEntity','2697955uaBdgN','subscribe','getWorkbook','state','loadBase','loadDocAsync','getPresentation','@univerjs-pro/collaboration','status$','function','18WXIyuR','switchMap','@univerjs-pro/collaboration-client','amd','948928IpHQyh','unitID','getUnitId','6939366asFhbS','Inject','createInstance','get','Event','DisposableCollection','loadDoc','_initialize','NOT_COLLAB','getOwnPropertyDescriptor','rxjs','extend','getBase'];_0x3879=function(){return _0x334e76;};return _0x3879();}(function(_0xd33a76,_0x59fe51){const _0x5f39f4=_0x4322,_0x482e71=_0xd33a76();while(!![]){try{const _0xafcf71=parseInt(_0x5f39f4(0x1c0))/0x1+-parseInt(_0x5f39f4(0x1d8))/0x2+parseInt(_0x5f39f4(0x1eb))/0x3*(parseInt(_0x5f39f4(0x1d1))/0x4)+-parseInt(_0x5f39f4(0x1e1))/0x5+-parseInt(_0x5f39f4(0x1f2))/0x6*(parseInt(_0x5f39f4(0x201))/0x7)+-parseInt(_0x5f39f4(0x1ef))/0x8*(-parseInt(_0x5f39f4(0x1ce))/0x9)+-parseInt(_0x5f39f4(0x1d9))/0xa*(-parseInt(_0x5f39f4(0x203))/0xb);if(_0xafcf71===_0x59fe51)break;else _0x482e71['push'](_0x482e71['shift']());}catch(_0x45c4e6){_0x482e71['push'](_0x482e71['shift']());}}}(_0x3879,0xd95b3),function(_0x3a1e6e,_0x1d5742){const _0x557fb1=_0x4322;typeof exports==_0x557fb1(0x1de)&&typeof module<'u'?_0x1d5742(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs/core/facade'),require('@univerjs/core'),require('@univerjs-pro/collaboration'),require('rxjs')):typeof define==_0x557fb1(0x1ea)&&define[_0x557fb1(0x1ee)]?define([_0x557fb1(0x1cb),_0x557fb1(0x1ed),_0x557fb1(0x207),_0x557fb1(0x1c2),_0x557fb1(0x1e8),'rxjs'],_0x1d5742):(_0x3a1e6e=typeof globalThis<'u'?globalThis:_0x3a1e6e||self,_0x1d5742(_0x3a1e6e['UniverProCollaborationClientFacade']={},_0x3a1e6e[_0x557fb1(0x1cd)],_0x3a1e6e['UniverCoreFacade'],_0x3a1e6e['UniverCore'],_0x3a1e6e[_0x557fb1(0x1d0)],_0x3a1e6e[_0x557fb1(0x1fc)]));}(this,function(_0x35a544,_0x1ad98c,_0x131f9c,_0x80d3a0,_0x1a6ca0,_0x4d9d27){const _0x4c1a34=_0x4322;Object[_0x4c1a34(0x1bc)](_0x35a544,Symbol[_0x4c1a34(0x1c5)],{'value':'Module'});var _0x771dcd=class extends _0x131f9c[_0x4c1a34(0x1ca)]{get[_0x4c1a34(0x1dc)](){const _0x5e5025=_0x4c1a34;return _0x1ad98c[_0x5e5025(0x1dc)];}};_0x131f9c[_0x4c1a34(0x1ca)]['extend'](_0x771dcd);var _0x5213d3=class extends _0x131f9c[_0x4c1a34(0x1bd)]{get['CollaborationStatusChanged'](){const _0x5b53da=_0x4c1a34;return _0x5b53da(0x1ff);}};_0x131f9c[_0x4c1a34(0x1bd)][_0x4c1a34(0x1fd)](_0x5213d3);function _0x494468(_0x1d276a,_0x1f2d10){return function(_0x5a99b9,_0x3fee8a){_0x1f2d10(_0x5a99b9,_0x3fee8a,_0x1d276a);};}function _0x3abfd8(_0x10d3ad,_0x10065,_0x2b7495,_0x536fa6){const _0x35bc15=_0x4c1a34;var _0x17f015=arguments[_0x35bc15(0x204)],_0x297848=_0x17f015<0x3?_0x10065:_0x536fa6===null?_0x536fa6=Object[_0x35bc15(0x1fb)](_0x10065,_0x2b7495):_0x536fa6,_0x4de904;if(typeof Reflect=='object'&&typeof Reflect[_0x35bc15(0x208)]==_0x35bc15(0x1ea))_0x297848=Reflect[_0x35bc15(0x208)](_0x10d3ad,_0x10065,_0x2b7495,_0x536fa6);else{for(var _0x4d43fd=_0x10d3ad['length']-0x1;_0x4d43fd>=0x0;_0x4d43fd--)(_0x4de904=_0x10d3ad[_0x4d43fd])&&(_0x297848=(_0x17f015<0x3?_0x4de904(_0x297848):_0x17f015>0x3?_0x4de904(_0x10065,_0x2b7495,_0x297848):_0x4de904(_0x10065,_0x2b7495))||_0x297848);}return _0x17f015>0x3&&_0x297848&&Object[_0x35bc15(0x1bc)](_0x10065,_0x2b7495,_0x297848),_0x297848;}let _0x4eb2b5=class extends _0x131f9c[_0x4c1a34(0x1da)]{constructor(_0x542b71,_0x4772ac,_0x343266,_0x4fdbfd,_0x38e1bd){const _0x2a820b=_0x4c1a34;super(),this[_0x2a820b(0x205)]=_0x542b71,this[_0x2a820b(0x1d4)]=_0x4772ac,this['_univerInstanceService']=_0x343266,this[_0x2a820b(0x1c8)]=_0x4fdbfd,this[_0x2a820b(0x20a)]=_0x38e1bd;}async['loadSheetAsync'](_0x125406,_0x11eae5){const _0x14591f=_0x4c1a34;return await this[_0x14591f(0x1c8)][_0x14591f(0x1df)](_0x125406,0x0,_0x11eae5)?(await this['_collaborationController'][_0x14591f(0x1bf)](_0x125406),this[_0x14591f(0x205)][_0x14591f(0x1e3)](_0x125406)):null;}async[_0x4c1a34(0x1e6)](_0x2c5cb3,_0x401f68){const _0x1f4807=_0x4c1a34;return await this['_snapshotService'][_0x1f4807(0x1f8)](_0x2c5cb3,0x0,_0x401f68)?(await this[_0x1f4807(0x20a)][_0x1f4807(0x1bf)](_0x2c5cb3),this[_0x1f4807(0x205)]['getDocument'](_0x2c5cb3)):null;}async[_0x4c1a34(0x1c9)](_0x55c7f8,_0x5d71b1){const _0x220ef7=_0x4c1a34;return await this[_0x220ef7(0x1c8)][_0x220ef7(0x1e5)](_0x55c7f8,0x0,_0x5d71b1)?(await this[_0x220ef7(0x20a)]['readyForCollab'](_0x55c7f8),this[_0x220ef7(0x205)]['getBase'](_0x55c7f8)):null;}async['loadSlideAsync'](_0x48c220,_0x2e3cdd){const _0x253c6d=_0x4c1a34;return await this['_snapshotService'][_0x253c6d(0x206)](_0x48c220,0x0,_0x2e3cdd)?(await this[_0x253c6d(0x20a)]['readyForCollab'](_0x48c220),this[_0x253c6d(0x205)][_0x253c6d(0x1e7)](_0x48c220)):null;}['subscribeCollaborators'](_0x179493,_0x5c1d53){const _0x2490e4=_0x4c1a34;return(0x0,_0x80d3a0[_0x2490e4(0x1d2)])(this[_0x2490e4(0x1d4)][_0x2490e4(0x1f5)](_0x1ad98c[_0x2490e4(0x1dd)])['waitForRoom$'](_0x179493)[_0x2490e4(0x1d7)]((0x0,_0x4d9d27[_0x2490e4(0x1ec)])(_0x36d168=>_0x36d168['members$']))[_0x2490e4(0x1e2)](_0x2731ef=>_0x5c1d53(Array['from'](_0x2731ef[_0x2490e4(0x1c1)]()))));}['getCollaborationStatus'](_0x44ad64){const _0x24ef74=_0x4c1a34;var _0xb1ec65;let _0x427fa0;if(_0x44ad64)_0x427fa0=_0x44ad64;else{let _0x4fce71=this['_univerInstanceService'][_0x24ef74(0x1db)]();_0x427fa0=_0x4fce71==null?void 0x0:_0x4fce71[_0x24ef74(0x1f1)]();}if(!_0x427fa0)return _0x1ad98c[_0x24ef74(0x1dc)]['NOT_COLLAB'];let _0x421dfe=this[_0x24ef74(0x20a)][_0x24ef74(0x1e0)](_0x427fa0);return(_0xb1ec65=_0x421dfe==null?void 0x0:_0x421dfe[_0x24ef74(0x1e4)]['status'])==null?_0x1ad98c[_0x24ef74(0x1dc)][_0x24ef74(0x1fa)]:_0xb1ec65;}};_0x4eb2b5=_0x3abfd8([_0x494468(0x1,(0x0,_0x80d3a0[_0x4c1a34(0x1f3)])(_0x80d3a0[_0x4c1a34(0x1c4)])),_0x494468(0x2,_0x80d3a0[_0x4c1a34(0x1d5)]),_0x494468(0x3,(0x0,_0x80d3a0['Inject'])(_0x1a6ca0['SnapshotService'])),_0x494468(0x4,(0x0,_0x80d3a0[_0x4c1a34(0x1f3)])(_0x1ad98c[_0x4c1a34(0x1cf)]))],_0x4eb2b5);var _0x193672=class extends _0x131f9c[_0x4c1a34(0x200)]{[_0x4c1a34(0x1f9)](_0x55789a){const _0x24de41=_0x4c1a34;let _0x510a2f=_0x55789a[_0x24de41(0x1f5)](_0x1ad98c[_0x24de41(0x1cf)]);this[_0x24de41(0x202)](this[_0x24de41(0x1c6)](this[_0x24de41(0x1f6)]['CollaborationStatusChanged'],()=>{const _0x490391=_0x24de41;let _0xfb34d6=new _0x80d3a0[(_0x490391(0x1f7))](),_0x2f228c=_0x510a2f[_0x490391(0x1c7)]['subscribe'](_0x50737f=>{const _0x2c07cc=_0x490391;let _0x28a30b=_0x50737f[_0x2c07cc(0x1e9)][_0x2c07cc(0x1e2)](_0x1336cb=>{const _0x1e0542=_0x2c07cc;let _0x166f14={'unitId':_0x50737f[_0x1e0542(0x1f0)],'status':_0x1336cb};this['fireEvent'](this[_0x1e0542(0x1f6)][_0x1e0542(0x1ff)],_0x166f14);});_0xfb34d6[_0x2c07cc(0x209)]((0x0,_0x80d3a0[_0x2c07cc(0x1d2)])(_0x28a30b));});return _0xfb34d6[_0x490391(0x209)]((0x0,_0x80d3a0[_0x490391(0x1d2)])(_0x2f228c)),_0xfb34d6;}));}[_0x4c1a34(0x1bb)](){const _0x119bf1=_0x4c1a34;return this[_0x119bf1(0x1d4)][_0x119bf1(0x1f4)](_0x4eb2b5,{'getWorkbook':_0x4c8241=>this['getWorkbook'](_0x4c8241),'getDocument':_0x497a3a=>this[_0x119bf1(0x1d3)](_0x497a3a),'getPresentation':_0x5af403=>this['getPresentation'](_0x5af403),'getBase':_0x1f962c=>this[_0x119bf1(0x1fe)](_0x1f962c)});}['loadServerUnit'](_0x14f5d3,_0xb52ab,_0x268edf){const _0x901334=_0x4c1a34;return this[_0x901334(0x1d4)][_0x901334(0x1f5)](_0x1ad98c[_0x901334(0x1be)])['loadUnit'](_0x14f5d3,_0xb52ab,_0x268edf);}[_0x4c1a34(0x1c3)](_0x3825b9,_0x354efa,_0x3a42fd){const _0x4777bd=_0x4c1a34;return this['_injector'][_0x4777bd(0x1f5)](_0x1ad98c[_0x4777bd(0x1be)])[_0x4777bd(0x1cc)](_0x3825b9,_0x354efa,_0x3a42fd);}};_0x131f9c[_0x4c1a34(0x200)][_0x4c1a34(0x1fd)](_0x193672),Object[_0x4c1a34(0x1bc)](_0x35a544,_0x4c1a34(0x1d6),{'enumerable':!0x0,'get':function(){return _0x4eb2b5;}});}));