@univerjs-pro/collaboration-client-node 0.21.0 → 0.21.1-insiders.20260509-bf98cad

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/README.md CHANGED
@@ -1,16 +1,36 @@
1
- # @univerjs/collaboration-client-node
1
+ # @univerjs-pro/collaboration-client-node
2
2
 
3
- [![npm version](https://img.shields.io/npm/v/@univerjs/collaboration-client-node)](https://npmjs.org/packages/@univerjs/collaboration-client-node)
4
- [![license](https://img.shields.io/npm/l/@univerjs/collaboration-client-node)](https://img.shields.io/npm/l/@univerjs/collaboration-client-node)
3
+ [![npm version](https://img.shields.io/npm/v/@univerjs-pro/collaboration-client-node?style=flat-square)](https://npmjs.com/package/@univerjs-pro/collaboration-client-node)
4
+ [![downloads](https://img.shields.io/npm/dm/@univerjs-pro/collaboration-client-node?style=flat-square)](https://npmjs.com/package/@univerjs-pro/collaboration-client-node)
5
5
 
6
- ## Introduction
6
+ `@univerjs-pro/collaboration-client-node` provides node.js collaboration client plugin for Univer Pro.
7
7
 
8
- > TODO: Introduction
8
+ ## Package Overview
9
+
10
+ | Package | UMD global | CSS | Locales | Facade entry |
11
+ | --- | --- | :---: | :---: | :---: |
12
+ | `@univerjs-pro/collaboration-client-node` | `UniverProCollaborationClientNode` | No | No | No |
13
+
14
+ ## Installation
15
+
16
+ ```sh
17
+ pnpm add @univerjs-pro/collaboration-client-node
18
+ # or
19
+ npm install @univerjs-pro/collaboration-client-node
20
+ ```
21
+
22
+ Keep all `@univerjs/*` and `@univerjs-pro/*` packages on the same version.
9
23
 
10
24
  ## Usage
11
25
 
12
- ### Installation
26
+ ```ts
27
+ import { UniverCollaborationClientNodePlugin } from '@univerjs-pro/collaboration-client-node';
13
28
 
14
- ```shell
15
- npm i @univerjs/collaboration-client-node
29
+ univer.registerPlugin(UniverCollaborationClientNodePlugin);
16
30
  ```
31
+
32
+ ## Resources
33
+
34
+ - [Documentation](https://docs.univer.ai/guides/pro)
35
+ - [NPM package](https://npmjs.com/package/@univerjs-pro/collaboration-client-node)
36
+
package/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- const _0x4f36aa=_0x523b;(function(_0x47b3fb,_0x4f9c4d){const _0xe7a8b2=_0x523b,_0x59b32b=_0x47b3fb();while(!![]){try{const _0x390b55=-parseInt(_0xe7a8b2(0x121))/0x1+parseInt(_0xe7a8b2(0xfa))/0x2*(parseInt(_0xe7a8b2(0x127))/0x3)+-parseInt(_0xe7a8b2(0x126))/0x4*(-parseInt(_0xe7a8b2(0xf9))/0x5)+-parseInt(_0xe7a8b2(0x12b))/0x6*(-parseInt(_0xe7a8b2(0x12e))/0x7)+-parseInt(_0xe7a8b2(0x11d))/0x8+-parseInt(_0xe7a8b2(0x119))/0x9+parseInt(_0xe7a8b2(0x133))/0xa;if(_0x390b55===_0x4f9c4d)break;else _0x59b32b['push'](_0x59b32b['shift']());}catch(_0x2370b3){_0x59b32b['push'](_0x59b32b['shift']());}}}(_0x5dcf,0xeeacb),Object[_0x4f36aa(0x129)](exports,Symbol[_0x4f36aa(0x102)],{'value':_0x4f36aa(0x11b)}));function _0x523b(_0x2450ee,_0x809ea0){_0x2450ee=_0x2450ee-0xf5;const _0x5dcf1b=_0x5dcf();let _0x523b1d=_0x5dcf1b[_0x2450ee];return _0x523b1d;}let _univerjs_pro_collaboration_client=require('@univerjs-pro/collaboration-client'),_univerjs_core=require('@univerjs/core'),_univerjs_network=require('@univerjs/network'),rxjs=require('rxjs'),ws=require('ws'),_univerjs_pro_collaboration=require('@univerjs-pro/collaboration');function _0x5dcf(){const _0x43e549=['set','4rlxylh','4107SgRJkq','customHeaders','defineProperty','addEventListener','1091586wjlFZQ','close','headers','7rbGYND','DependentOn','CollaborationSocketService','length','_registerDependencies','10241190chDDBX','ISocketService','next','string','collaboration-client-node.config','COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY','@univerjs-pro/collaboration-client-node','DisposableCollection','prototype','share','2768770zBkRbE','1826irwwjr','Observable','error','decorate','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','send','Injector','IConfigService','toStringTag','createSocket','constructor','0.21.0','object','message','symbol','getConfig','UniverCollaborationClientNodePlugin','iterator','setConfig','_doCreateSocket','toPrimitive','add','_configService','function','ILogService','registerDependencies','default','pluginName','removeEventListener','WebSocket','version','785178KTMqhj','Inject','Module','Disposable','3070080NcNgxg','registerHTTPInterceptor','open','_injector','1561088kiIvrU','toDisposable','COLLABORATION_CLIENT_NODE_CONFIG_KEY','pipe'];_0x5dcf=function(){return _0x43e549;};return _0x5dcf();}const COLLABORATION_CLIENT_NODE_CONFIG_KEY=_0x4f36aa(0x137),configSymbol=Symbol(COLLABORATION_CLIENT_NODE_CONFIG_KEY),defaultPluginConfig={};var name=_0x4f36aa(0xf5),version=_0x4f36aa(0x105);function __decorateParam(_0x4422b2,_0x1ba76e){return function(_0x4a82ac,_0x51a6d4){_0x1ba76e(_0x4a82ac,_0x51a6d4,_0x4422b2);};}function __decorate(_0x495a98,_0x42173d,_0xf8be12,_0x90d76){const _0x4d64fc=_0x4f36aa;var _0xa8399d=arguments['length'],_0xd2d796=_0xa8399d<0x3?_0x42173d:_0x90d76===null?_0x90d76=Object['getOwnPropertyDescriptor'](_0x42173d,_0xf8be12):_0x90d76,_0x1cd7f1;if(typeof Reflect==='object'&&typeof Reflect[_0x4d64fc(0xfd)]===_0x4d64fc(0x111))_0xd2d796=Reflect['decorate'](_0x495a98,_0x42173d,_0xf8be12,_0x90d76);else{for(var _0x1835c6=_0x495a98[_0x4d64fc(0x131)]-0x1;_0x1835c6>=0x0;_0x1835c6--)if(_0x1cd7f1=_0x495a98[_0x1835c6])_0xd2d796=(_0xa8399d<0x3?_0x1cd7f1(_0xd2d796):_0xa8399d>0x3?_0x1cd7f1(_0x42173d,_0xf8be12,_0xd2d796):_0x1cd7f1(_0x42173d,_0xf8be12))||_0xd2d796;}return _0xa8399d>0x3&&_0xd2d796&&Object[_0x4d64fc(0x129)](_0x42173d,_0xf8be12,_0xd2d796),_0xd2d796;}let NodeWebSocketService=class NodeWebSocketService extends _univerjs_core[_0x4f36aa(0x11c)]{constructor(_0xaee6a4){const _0x59f94d=_0x4f36aa;super(),this[_0x59f94d(0x110)]=_0xaee6a4;}[_0x4f36aa(0x103)](_0x5d85e2){const _0x53d256=_0x4f36aa;var _0x319f80;const _0x24bd2e=((_0x319f80=this[_0x53d256(0x110)]['getConfig'](_univerjs_pro_collaboration_client[_0x53d256(0x138)]))===null||_0x319f80===void 0x0?void 0x0:_0x319f80['customHeaders'])||{};try{const _0x79c372=new ws[(_0x53d256(0x117))](_0x5d85e2,{'headers':{..._0x24bd2e}}),_0x446940=new _univerjs_core[(_0x53d256(0xf6))]();return{'URL':_0x5d85e2,'close':(_0x107b48,_0x3daedb)=>{const _0x91c8ce=_0x53d256;_0x79c372[_0x91c8ce(0x12c)](_0x107b48,_0x3daedb),_0x446940['dispose']();},'send':_0x40afe6=>{const _0x8ed8bd=_0x53d256;_0x79c372[_0x8ed8bd(0xff)](_0x40afe6);},'open$':new rxjs['Observable'](_0x467f73=>{const _0x5bfe92=_0x53d256,_0x7b782f=_0xe0828c=>_0x467f73[_0x5bfe92(0x135)](_0xe0828c);_0x79c372[_0x5bfe92(0x12a)](_0x5bfe92(0x11f),_0x7b782f),_0x446940['add']((0x0,_univerjs_core['toDisposable'])(()=>_0x79c372['removeEventListener']('open',_0x7b782f)));})[_0x53d256(0x124)]((0x0,rxjs[_0x53d256(0xf8)])()),'close$':new rxjs['Observable'](_0xcb84b9=>{const _0x3b8382=_0x53d256,_0x2c11ed=_0x274021=>_0xcb84b9[_0x3b8382(0x135)](_0x274021);_0x79c372['addEventListener'](_0x3b8382(0x12c),_0x2c11ed),_0x446940[_0x3b8382(0x10f)]((0x0,_univerjs_core[_0x3b8382(0x122)])(()=>_0x79c372[_0x3b8382(0x116)](_0x3b8382(0x12c),_0x2c11ed)));})[_0x53d256(0x124)]((0x0,rxjs[_0x53d256(0xf8)])()),'error$':new rxjs['Observable'](_0x6efb13=>{const _0x104b99=_0x53d256,_0x20a4dd=_0x967327=>_0x6efb13[_0x104b99(0x135)](_0x967327);_0x79c372['addEventListener'](_0x104b99(0xfc),_0x20a4dd),_0x446940[_0x104b99(0x10f)]((0x0,_univerjs_core[_0x104b99(0x122)])(()=>_0x79c372[_0x104b99(0x116)]('error',_0x20a4dd)));})[_0x53d256(0x124)]((0x0,rxjs[_0x53d256(0xf8)])()),'message$':new rxjs[(_0x53d256(0xfb))](_0xbb7fd3=>{const _0x333f6e=_0x53d256,_0x30e841=_0x480531=>_0xbb7fd3['next'](_0x480531);_0x79c372[_0x333f6e(0x12a)](_0x333f6e(0x107),_0x30e841),_0x446940[_0x333f6e(0x10f)]((0x0,_univerjs_core[_0x333f6e(0x122)])(()=>_0x79c372[_0x333f6e(0x116)](_0x333f6e(0x107),_0x30e841)));})[_0x53d256(0x124)]((0x0,rxjs[_0x53d256(0xf8)])())};}catch(_0x155522){return console[_0x53d256(0xfc)](_0x155522),null;}}};NodeWebSocketService=__decorate([__decorateParam(0x0,_univerjs_core[_0x4f36aa(0x101)])],NodeWebSocketService);function _typeof(_0x278017){'@babel/helpers - typeof';const _0x16e276=_0x4f36aa;return _typeof=_0x16e276(0x111)==typeof Symbol&&'symbol'==typeof Symbol[_0x16e276(0x10b)]?function(_0xc03c69){return typeof _0xc03c69;}:function(_0x3cd201){const _0x5a508b=_0x16e276;return _0x3cd201&&_0x5a508b(0x111)==typeof Symbol&&_0x3cd201[_0x5a508b(0x104)]===Symbol&&_0x3cd201!==Symbol[_0x5a508b(0xf7)]?_0x5a508b(0x108):typeof _0x3cd201;},_typeof(_0x278017);}function toPrimitive(_0x453a5f,_0x4fac5d){const _0x1df45b=_0x4f36aa;if(_0x1df45b(0x106)!=_typeof(_0x453a5f)||!_0x453a5f)return _0x453a5f;var _0x5f44f6=_0x453a5f[Symbol[_0x1df45b(0x10e)]];if(void 0x0!==_0x5f44f6){var _0x4e360e=_0x5f44f6['call'](_0x453a5f,_0x4fac5d||_0x1df45b(0x114));if(_0x1df45b(0x106)!=_typeof(_0x4e360e))return _0x4e360e;throw new TypeError(_0x1df45b(0xfe));}return(_0x1df45b(0x136)===_0x4fac5d?String:Number)(_0x453a5f);}function toPropertyKey(_0x481dcf){const _0x1df7eb=_0x4f36aa;var _0x4a0ffb=toPrimitive(_0x481dcf,_0x1df7eb(0x136));return'symbol'==_typeof(_0x4a0ffb)?_0x4a0ffb:_0x4a0ffb+'';}function _defineProperty(_0x41ad0e,_0x1878a8,_0x4bc0e1){const _0xe7d420=_0x4f36aa;return(_0x1878a8=toPropertyKey(_0x1878a8))in _0x41ad0e?Object[_0xe7d420(0x129)](_0x41ad0e,_0x1878a8,{'value':_0x4bc0e1,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x41ad0e[_0x1878a8]=_0x4bc0e1,_0x41ad0e;}let UniverCollaborationClientNodePlugin=class UniverCollaborationClientNodePlugin extends _univerjs_core['Plugin']{constructor(_0x356d00=defaultPluginConfig,_0x2dcafd,_0x3d4757){const _0x40034a=_0x4f36aa;super(),this[_0x40034a(0x110)]=_0x2dcafd,this[_0x40034a(0x120)]=_0x3d4757,this[_0x40034a(0x110)][_0x40034a(0x10c)](COLLABORATION_CLIENT_NODE_CONFIG_KEY,_0x356d00);}['onStarting'](){const _0x52976f=_0x4f36aa;this[_0x52976f(0x132)]();}['_registerDependencies'](){const _0x216d01=_0x4f36aa;(0x0,_univerjs_core[_0x216d01(0x113)])(this[_0x216d01(0x120)],[[_univerjs_network[_0x216d01(0x134)],{'useClass':NodeWebSocketService}]]);}};_defineProperty(UniverCollaborationClientNodePlugin,_0x4f36aa(0x115),'UNIVER_COLLABORATION_CLIENT_NODE_PLUGIN'),_defineProperty(UniverCollaborationClientNodePlugin,'packageName',name),_defineProperty(UniverCollaborationClientNodePlugin,_0x4f36aa(0x118),version),UniverCollaborationClientNodePlugin=__decorate([(0x0,_univerjs_core[_0x4f36aa(0x12f)])(_univerjs_pro_collaboration_client['UniverCollaborationClientPlugin']),__decorateParam(0x1,_univerjs_core['IConfigService']),__decorateParam(0x2,(0x0,_univerjs_core[_0x4f36aa(0x11a)])(_univerjs_core[_0x4f36aa(0x100)]))],UniverCollaborationClientNodePlugin);let NodeCollaborationSocketService=class NodeCollaborationSocketService extends _univerjs_pro_collaboration_client[_0x4f36aa(0x130)]{constructor(_0x2ce838,_0x3113bc,_0x231244,_0x5675de,_0x39643a){const _0xead07b=_0x4f36aa;super(_0x2ce838,_0x3113bc,_0x231244,_0x5675de,_0x39643a);const _0x4007be=this[_0xead07b(0x110)][_0xead07b(0x109)](_univerjs_pro_collaboration_client[_0xead07b(0x138)]);this['_httpService'][_0xead07b(0x11e)]({'interceptor':(_0x5ba0c5,_0x190203)=>{const _0xfefb88=_0xead07b,_0x183010=_0x5ba0c5[_0xfefb88(0x12d)];if(_0x4007be===null||_0x4007be===void 0x0?void 0x0:_0x4007be[_0xfefb88(0x128)]){for(const _0x4fc840 in _0x4007be[_0xfefb88(0x128)])_0x183010[_0xfefb88(0x125)](_0x4fc840,_0x4007be[_0xfefb88(0x128)][_0x4fc840]);}return _0x190203(_0x5ba0c5);}});}async[_0x4f36aa(0x103)](_0x214765){const _0x36e0cd=_0x4f36aa;return this[_0x36e0cd(0x10d)](_0x214765);}};NodeCollaborationSocketService=__decorate([__decorateParam(0x0,(0x0,_univerjs_core['Inject'])(_univerjs_core[_0x4f36aa(0x100)])),__decorateParam(0x1,(0x0,_univerjs_core[_0x4f36aa(0x11a)])(_univerjs_network['HTTPService'])),__decorateParam(0x2,_univerjs_core['IConfigService']),__decorateParam(0x3,_univerjs_core[_0x4f36aa(0x112)]),__decorateParam(0x4,_univerjs_pro_collaboration['ISnapshotServerService'])],NodeCollaborationSocketService),exports[_0x4f36aa(0x123)]=COLLABORATION_CLIENT_NODE_CONFIG_KEY,Object[_0x4f36aa(0x129)](exports,'NodeCollaborationSocketService',{'enumerable':!![],'get':function(){return NodeCollaborationSocketService;}}),Object[_0x4f36aa(0x129)](exports,_0x4f36aa(0x10a),{'enumerable':!![],'get':function(){return UniverCollaborationClientNodePlugin;}});
1
+ const _0x15268d=_0x69bd;(function(_0x245e64,_0x4c4edc){const _0x516697=_0x69bd,_0x144a09=_0x245e64();while(!![]){try{const _0x42fd57=-parseInt(_0x516697(0x1c9))/0x1+-parseInt(_0x516697(0x1eb))/0x2*(-parseInt(_0x516697(0x1db))/0x3)+parseInt(_0x516697(0x1cb))/0x4+-parseInt(_0x516697(0x1f5))/0x5*(-parseInt(_0x516697(0x1e9))/0x6)+-parseInt(_0x516697(0x1d6))/0x7*(-parseInt(_0x516697(0x1f3))/0x8)+-parseInt(_0x516697(0x1f2))/0x9+-parseInt(_0x516697(0x1e5))/0xa;if(_0x42fd57===_0x4c4edc)break;else _0x144a09['push'](_0x144a09['shift']());}catch(_0x225fc1){_0x144a09['push'](_0x144a09['shift']());}}}(_0x48ff,0x35739),Object[_0x15268d(0x1d3)](exports,Symbol[_0x15268d(0x1c6)],{'value':_0x15268d(0x1f8)}));let _univerjs_pro_collaboration_client=require('@univerjs-pro/collaboration-client'),_univerjs_core=require('@univerjs/core'),_univerjs_network=require('@univerjs/network'),rxjs=require('rxjs'),ws=require('ws'),_univerjs_pro_collaboration=require('@univerjs-pro/collaboration');const COLLABORATION_CLIENT_NODE_CONFIG_KEY=_0x15268d(0x1b7),configSymbol=Symbol(COLLABORATION_CLIENT_NODE_CONFIG_KEY),defaultPluginConfig={};var name=_0x15268d(0x1c8),version='0.21.1-insiders.20260509-bf98cad';function __decorateParam(_0x12a69d,_0xa4c514){return function(_0x2916fb,_0x2ec864){_0xa4c514(_0x2916fb,_0x2ec864,_0x12a69d);};}function __decorate(_0x58a667,_0x3a4429,_0x527caa,_0x4c4a00){const _0x2836f5=_0x15268d;var _0x58fab0=arguments[_0x2836f5(0x1b2)],_0x15798f=_0x58fab0<0x3?_0x3a4429:_0x4c4a00===null?_0x4c4a00=Object['getOwnPropertyDescriptor'](_0x3a4429,_0x527caa):_0x4c4a00,_0x1c71a7;if(typeof Reflect===_0x2836f5(0x1f1)&&typeof Reflect['decorate']===_0x2836f5(0x1de))_0x15798f=Reflect[_0x2836f5(0x1dd)](_0x58a667,_0x3a4429,_0x527caa,_0x4c4a00);else{for(var _0x15bc4f=_0x58a667['length']-0x1;_0x15bc4f>=0x0;_0x15bc4f--)if(_0x1c71a7=_0x58a667[_0x15bc4f])_0x15798f=(_0x58fab0<0x3?_0x1c71a7(_0x15798f):_0x58fab0>0x3?_0x1c71a7(_0x3a4429,_0x527caa,_0x15798f):_0x1c71a7(_0x3a4429,_0x527caa))||_0x15798f;}return _0x58fab0>0x3&&_0x15798f&&Object['defineProperty'](_0x3a4429,_0x527caa,_0x15798f),_0x15798f;}let NodeWebSocketService=class NodeWebSocketService extends _univerjs_core[_0x15268d(0x1d9)]{constructor(_0x3ae95c){super(),this['_configService']=_0x3ae95c;}['createSocket'](_0x1990f7){const _0x53767e=_0x15268d;var _0x1998b1;const _0x3c7ea9=((_0x1998b1=this[_0x53767e(0x1c5)][_0x53767e(0x1da)](_univerjs_pro_collaboration_client[_0x53767e(0x1e4)]))===null||_0x1998b1===void 0x0?void 0x0:_0x1998b1[_0x53767e(0x1cc)])||{};try{const _0x1fea17=new ws[(_0x53767e(0x1b3))](_0x1990f7,{'headers':{..._0x3c7ea9}}),_0x39b39c=new _univerjs_core[(_0x53767e(0x1ba))]();return{'URL':_0x1990f7,'close':(_0x39133a,_0xae385)=>{const _0x252a20=_0x53767e;_0x1fea17[_0x252a20(0x1c1)](_0x39133a,_0xae385),_0x39b39c[_0x252a20(0x1c0)]();},'send':_0x4097ef=>{const _0x919021=_0x53767e;_0x1fea17[_0x919021(0x1d2)](_0x4097ef);},'open$':new rxjs['Observable'](_0xa392b7=>{const _0x2214f5=_0x53767e,_0x16c071=_0x252c51=>_0xa392b7[_0x2214f5(0x1ec)](_0x252c51);_0x1fea17[_0x2214f5(0x1ef)]('open',_0x16c071),_0x39b39c['add']((0x0,_univerjs_core[_0x2214f5(0x1e7)])(()=>_0x1fea17['removeEventListener']('open',_0x16c071)));})[_0x53767e(0x1be)]((0x0,rxjs['share'])()),'close$':new rxjs[(_0x53767e(0x1b9))](_0x337fb1=>{const _0x32881a=_0x53767e,_0x42d2e1=_0x2481a=>_0x337fb1['next'](_0x2481a);_0x1fea17[_0x32881a(0x1ef)](_0x32881a(0x1c1),_0x42d2e1),_0x39b39c[_0x32881a(0x1c7)]((0x0,_univerjs_core[_0x32881a(0x1e7)])(()=>_0x1fea17[_0x32881a(0x1b4)](_0x32881a(0x1c1),_0x42d2e1)));})[_0x53767e(0x1be)]((0x0,rxjs[_0x53767e(0x1ca)])()),'error$':new rxjs[(_0x53767e(0x1b9))](_0x2c8de0=>{const _0x2b9b70=_0x53767e,_0x257a20=_0x139bdd=>_0x2c8de0[_0x2b9b70(0x1ec)](_0x139bdd);_0x1fea17[_0x2b9b70(0x1ef)](_0x2b9b70(0x1e6),_0x257a20),_0x39b39c[_0x2b9b70(0x1c7)]((0x0,_univerjs_core[_0x2b9b70(0x1e7)])(()=>_0x1fea17[_0x2b9b70(0x1b4)]('error',_0x257a20)));})['pipe']((0x0,rxjs[_0x53767e(0x1ca)])()),'message$':new rxjs['Observable'](_0x14ff48=>{const _0x1bcc97=_0x53767e,_0x4716ac=_0x241d08=>_0x14ff48[_0x1bcc97(0x1ec)](_0x241d08);_0x1fea17[_0x1bcc97(0x1ef)](_0x1bcc97(0x1e1),_0x4716ac),_0x39b39c[_0x1bcc97(0x1c7)]((0x0,_univerjs_core[_0x1bcc97(0x1e7)])(()=>_0x1fea17[_0x1bcc97(0x1b4)](_0x1bcc97(0x1e1),_0x4716ac)));})[_0x53767e(0x1be)]((0x0,rxjs[_0x53767e(0x1ca)])())};}catch(_0x572aa7){return console[_0x53767e(0x1e6)](_0x572aa7),null;}}};function _0x69bd(_0x414688,_0x1baf70){_0x414688=_0x414688-0x1b2;const _0x48ff01=_0x48ff();let _0x69bd71=_0x48ff01[_0x414688];return _0x69bd71;}NodeWebSocketService=__decorate([__decorateParam(0x0,_univerjs_core[_0x15268d(0x1b5)])],NodeWebSocketService);function _typeof(_0x39dbeb){'@babel/helpers - typeof';const _0x2d410f=_0x15268d;return _typeof='function'==typeof Symbol&&_0x2d410f(0x1c2)==typeof Symbol[_0x2d410f(0x1bb)]?function(_0x26c74d){return typeof _0x26c74d;}:function(_0x196406){const _0x3961be=_0x2d410f;return _0x196406&&_0x3961be(0x1de)==typeof Symbol&&_0x196406[_0x3961be(0x1cd)]===Symbol&&_0x196406!==Symbol[_0x3961be(0x1ce)]?_0x3961be(0x1c2):typeof _0x196406;},_typeof(_0x39dbeb);}function toPrimitive(_0x8c900d,_0x382e52){const _0x1d7af6=_0x15268d;if(_0x1d7af6(0x1f1)!=_typeof(_0x8c900d)||!_0x8c900d)return _0x8c900d;var _0x5e5a61=_0x8c900d[Symbol[_0x1d7af6(0x1d4)]];if(void 0x0!==_0x5e5a61){var _0x1edbf1=_0x5e5a61[_0x1d7af6(0x1c4)](_0x8c900d,_0x382e52||_0x1d7af6(0x1e3));if(_0x1d7af6(0x1f1)!=_typeof(_0x1edbf1))return _0x1edbf1;throw new TypeError(_0x1d7af6(0x1d7));}return('string'===_0x382e52?String:Number)(_0x8c900d);}function _0x48ff(){const _0x5d9cc1=['decorate','function','set','headers','message','packageName','default','COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY','3823080xpMnfj','error','toDisposable','NodeCollaborationSocketService','212376hVMAjx','ISocketService','10WlLsgo','next','_registerDependencies','DependentOn','addEventListener','Plugin','object','57132hhtzuU','11128eHBPMc','_injector','5usfuKo','UniverCollaborationClientNodePlugin','Inject','Module','length','WebSocket','removeEventListener','IConfigService','string','collaboration-client-node.config','Injector','Observable','DisposableCollection','iterator','UNIVER_COLLABORATION_CLIENT_NODE_PLUGIN','UniverCollaborationClientPlugin','pipe','registerHTTPInterceptor','dispose','close','symbol','version','call','_configService','toStringTag','add','@univerjs-pro/collaboration-client-node','206847XZdCNY','share','1619448GBxtAf','customHeaders','constructor','prototype','onStarting','_doCreateSocket','HTTPService','send','defineProperty','toPrimitive','_httpService','1869moSnml','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','ISnapshotServerService','Disposable','getConfig','1671UzotWM','COLLABORATION_CLIENT_NODE_CONFIG_KEY'];_0x48ff=function(){return _0x5d9cc1;};return _0x48ff();}function toPropertyKey(_0x7984ce){const _0x1a5809=_0x15268d;var _0x447b04=toPrimitive(_0x7984ce,_0x1a5809(0x1b6));return _0x1a5809(0x1c2)==_typeof(_0x447b04)?_0x447b04:_0x447b04+'';}function _defineProperty(_0xd01f8b,_0x587105,_0x1076d0){const _0xc97e5=_0x15268d;return(_0x587105=toPropertyKey(_0x587105))in _0xd01f8b?Object[_0xc97e5(0x1d3)](_0xd01f8b,_0x587105,{'value':_0x1076d0,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0xd01f8b[_0x587105]=_0x1076d0,_0xd01f8b;}let UniverCollaborationClientNodePlugin=class UniverCollaborationClientNodePlugin extends _univerjs_core[_0x15268d(0x1f0)]{constructor(_0x130cd1=defaultPluginConfig,_0x3457f3,_0x290f29){const _0x1c8170=_0x15268d;super(),this[_0x1c8170(0x1c5)]=_0x3457f3,this[_0x1c8170(0x1f4)]=_0x290f29,this[_0x1c8170(0x1c5)]['setConfig'](COLLABORATION_CLIENT_NODE_CONFIG_KEY,_0x130cd1);}[_0x15268d(0x1cf)](){const _0x331976=_0x15268d;this[_0x331976(0x1ed)]();}['_registerDependencies'](){const _0x5ec68e=_0x15268d;(0x0,_univerjs_core['registerDependencies'])(this['_injector'],[[_univerjs_network[_0x5ec68e(0x1ea)],{'useClass':NodeWebSocketService}]]);}};_defineProperty(UniverCollaborationClientNodePlugin,'pluginName',_0x15268d(0x1bc)),_defineProperty(UniverCollaborationClientNodePlugin,_0x15268d(0x1e2),name),_defineProperty(UniverCollaborationClientNodePlugin,_0x15268d(0x1c3),version),UniverCollaborationClientNodePlugin=__decorate([(0x0,_univerjs_core[_0x15268d(0x1ee)])(_univerjs_pro_collaboration_client[_0x15268d(0x1bd)]),__decorateParam(0x1,_univerjs_core[_0x15268d(0x1b5)]),__decorateParam(0x2,(0x0,_univerjs_core[_0x15268d(0x1f7)])(_univerjs_core['Injector']))],UniverCollaborationClientNodePlugin);let NodeCollaborationSocketService=class NodeCollaborationSocketService extends _univerjs_pro_collaboration_client['CollaborationSocketService']{constructor(_0x141fc9,_0x45ce86,_0x3e3f1e,_0x580d04,_0x31b828){const _0x18cb68=_0x15268d;super(_0x141fc9,_0x45ce86,_0x3e3f1e,_0x580d04,_0x31b828);const _0x344cad=this[_0x18cb68(0x1c5)][_0x18cb68(0x1da)](_univerjs_pro_collaboration_client[_0x18cb68(0x1e4)]);this[_0x18cb68(0x1d5)][_0x18cb68(0x1bf)]({'interceptor':(_0x2fe3f2,_0x2b9903)=>{const _0x528f87=_0x18cb68,_0x82a1b5=_0x2fe3f2[_0x528f87(0x1e0)];if(_0x344cad===null||_0x344cad===void 0x0?void 0x0:_0x344cad[_0x528f87(0x1cc)]){for(const _0x3dffc8 in _0x344cad[_0x528f87(0x1cc)])_0x82a1b5[_0x528f87(0x1df)](_0x3dffc8,_0x344cad[_0x528f87(0x1cc)][_0x3dffc8]);}return _0x2b9903(_0x2fe3f2);}});}async['createSocket'](_0x13abea){const _0x1cfea9=_0x15268d;return this[_0x1cfea9(0x1d0)](_0x13abea);}};NodeCollaborationSocketService=__decorate([__decorateParam(0x0,(0x0,_univerjs_core[_0x15268d(0x1f7)])(_univerjs_core[_0x15268d(0x1b8)])),__decorateParam(0x1,(0x0,_univerjs_core['Inject'])(_univerjs_network[_0x15268d(0x1d1)])),__decorateParam(0x2,_univerjs_core[_0x15268d(0x1b5)]),__decorateParam(0x3,_univerjs_core['ILogService']),__decorateParam(0x4,_univerjs_pro_collaboration[_0x15268d(0x1d8)])],NodeCollaborationSocketService),exports[_0x15268d(0x1dc)]=COLLABORATION_CLIENT_NODE_CONFIG_KEY,Object[_0x15268d(0x1d3)](exports,_0x15268d(0x1e8),{'enumerable':!![],'get':function(){return NodeCollaborationSocketService;}}),Object[_0x15268d(0x1d3)](exports,_0x15268d(0x1f6),{'enumerable':!![],'get':function(){return UniverCollaborationClientNodePlugin;}});
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- function _0x38e5(){const _0x5497e8=['registerHTTPInterceptor','78977520ZbmtSm','set','error','setConfig','next','pipe','@univerjs-pro/collaboration-client-node','toPrimitive','pluginName','0.21.0','close','open','2553956jNIkkS','400141jZpzdK','2602490Tffnub','174DlmcdP','headers','9951890oaTLky','send','symbol','defineProperty','decorate','removeEventListener','string','_configService','_registerDependencies','dispose','customHeaders','version','packageName','462709SRbyRu','object','add','_injector','getConfig','_httpService','8HbDrEX','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','length','15980076UtfGSI','addEventListener','message','prototype','function','createSocket','collaboration-client-node.config','3MotcBd'];_0x38e5=function(){return _0x5497e8;};return _0x38e5();}const _0x54e3f2=_0x5c0a;(function(_0x3642c8,_0x1d2724){const _0x2faec2=_0x5c0a,_0x58191a=_0x3642c8();while(!![]){try{const _0x47815e=parseInt(_0x2faec2(0x139))/0x1+-parseInt(_0x2faec2(0x159))/0x2+parseInt(_0x2faec2(0x149))/0x3*(-parseInt(_0x2faec2(0x157))/0x4)+-parseInt(_0x2faec2(0x15c))/0x5+-parseInt(_0x2faec2(0x15a))/0x6*(parseInt(_0x2faec2(0x158))/0x7)+-parseInt(_0x2faec2(0x13f))/0x8*(parseInt(_0x2faec2(0x142))/0x9)+parseInt(_0x2faec2(0x14b))/0xa;if(_0x47815e===_0x1d2724)break;else _0x58191a['push'](_0x58191a['shift']());}catch(_0x17eb6e){_0x58191a['push'](_0x58191a['shift']());}}}(_0x38e5,0xf36c2));import{COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY,CollaborationSocketService,UniverCollaborationClientPlugin}from'@univerjs-pro/collaboration-client';import{DependentOn,Disposable,DisposableCollection,IConfigService,ILogService,Inject,Injector,Plugin,registerDependencies,toDisposable}from'@univerjs/core';import{HTTPService,ISocketService}from'@univerjs/network';import{Observable,share}from'rxjs';import{WebSocket}from'ws';import{ISnapshotServerService}from'@univerjs-pro/collaboration';function _0x5c0a(_0x1074cd,_0x2a36a4){_0x1074cd=_0x1074cd-0x132;const _0x38e596=_0x38e5();let _0x5c0af9=_0x38e596[_0x1074cd];return _0x5c0af9;}const COLLABORATION_CLIENT_NODE_CONFIG_KEY=_0x54e3f2(0x148),configSymbol=Symbol(COLLABORATION_CLIENT_NODE_CONFIG_KEY),defaultPluginConfig={};var name=_0x54e3f2(0x151),version=_0x54e3f2(0x154);function __decorateParam(_0x505fb6,_0x3903f5){return function(_0x320c6e,_0x44991c){_0x3903f5(_0x320c6e,_0x44991c,_0x505fb6);};}function __decorate(_0x5d2c98,_0x42d70e,_0xc81142,_0xe0282){const _0x28b4a3=_0x54e3f2;var _0x11c550=arguments['length'],_0x5c5c90=_0x11c550<0x3?_0x42d70e:_0xe0282===null?_0xe0282=Object['getOwnPropertyDescriptor'](_0x42d70e,_0xc81142):_0xe0282,_0x336380;if(typeof Reflect===_0x28b4a3(0x13a)&&typeof Reflect[_0x28b4a3(0x160)]===_0x28b4a3(0x146))_0x5c5c90=Reflect[_0x28b4a3(0x160)](_0x5d2c98,_0x42d70e,_0xc81142,_0xe0282);else{for(var _0x159871=_0x5d2c98[_0x28b4a3(0x141)]-0x1;_0x159871>=0x0;_0x159871--)if(_0x336380=_0x5d2c98[_0x159871])_0x5c5c90=(_0x11c550<0x3?_0x336380(_0x5c5c90):_0x11c550>0x3?_0x336380(_0x42d70e,_0xc81142,_0x5c5c90):_0x336380(_0x42d70e,_0xc81142))||_0x5c5c90;}return _0x11c550>0x3&&_0x5c5c90&&Object[_0x28b4a3(0x15f)](_0x42d70e,_0xc81142,_0x5c5c90),_0x5c5c90;}let NodeWebSocketService=class NodeWebSocketService extends Disposable{constructor(_0x49760f){const _0xf0aae9=_0x54e3f2;super(),this[_0xf0aae9(0x133)]=_0x49760f;}['createSocket'](_0x5660a1){const _0x48ac5b=_0x54e3f2;var _0x561ea5;const _0xbeb955=((_0x561ea5=this[_0x48ac5b(0x133)][_0x48ac5b(0x13d)](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY))===null||_0x561ea5===void 0x0?void 0x0:_0x561ea5['customHeaders'])||{};try{const _0x15d69c=new WebSocket(_0x5660a1,{'headers':{..._0xbeb955}}),_0xed5f33=new DisposableCollection();return{'URL':_0x5660a1,'close':(_0x48273f,_0x2cf328)=>{const _0x155e28=_0x48ac5b;_0x15d69c[_0x155e28(0x155)](_0x48273f,_0x2cf328),_0xed5f33[_0x155e28(0x135)]();},'send':_0x584164=>{const _0x5da18a=_0x48ac5b;_0x15d69c[_0x5da18a(0x15d)](_0x584164);},'open$':new Observable(_0x1b8dfb=>{const _0x55afc5=_0x48ac5b,_0x1a457c=_0x245c5=>_0x1b8dfb['next'](_0x245c5);_0x15d69c[_0x55afc5(0x143)](_0x55afc5(0x156),_0x1a457c),_0xed5f33[_0x55afc5(0x13b)](toDisposable(()=>_0x15d69c['removeEventListener'](_0x55afc5(0x156),_0x1a457c)));})[_0x48ac5b(0x150)](share()),'close$':new Observable(_0x287d20=>{const _0x15d0c8=_0x48ac5b,_0x1c243c=_0x36fa9c=>_0x287d20[_0x15d0c8(0x14f)](_0x36fa9c);_0x15d69c[_0x15d0c8(0x143)](_0x15d0c8(0x155),_0x1c243c),_0xed5f33[_0x15d0c8(0x13b)](toDisposable(()=>_0x15d69c[_0x15d0c8(0x161)](_0x15d0c8(0x155),_0x1c243c)));})[_0x48ac5b(0x150)](share()),'error$':new Observable(_0x3a9ae7=>{const _0x2d3c51=_0x48ac5b,_0x3130d5=_0x59ac47=>_0x3a9ae7[_0x2d3c51(0x14f)](_0x59ac47);_0x15d69c[_0x2d3c51(0x143)](_0x2d3c51(0x14d),_0x3130d5),_0xed5f33[_0x2d3c51(0x13b)](toDisposable(()=>_0x15d69c[_0x2d3c51(0x161)]('error',_0x3130d5)));})[_0x48ac5b(0x150)](share()),'message$':new Observable(_0x37dc61=>{const _0x1ea12e=_0x48ac5b,_0x33d206=_0x566fff=>_0x37dc61[_0x1ea12e(0x14f)](_0x566fff);_0x15d69c[_0x1ea12e(0x143)](_0x1ea12e(0x144),_0x33d206),_0xed5f33[_0x1ea12e(0x13b)](toDisposable(()=>_0x15d69c[_0x1ea12e(0x161)](_0x1ea12e(0x144),_0x33d206)));})[_0x48ac5b(0x150)](share())};}catch(_0x10e592){return console[_0x48ac5b(0x14d)](_0x10e592),null;}}};NodeWebSocketService=__decorate([__decorateParam(0x0,IConfigService)],NodeWebSocketService);function _typeof(_0x135c9d){'@babel/helpers - typeof';const _0x50f3aa=_0x54e3f2;return _typeof=_0x50f3aa(0x146)==typeof Symbol&&_0x50f3aa(0x15e)==typeof Symbol['iterator']?function(_0x684525){return typeof _0x684525;}:function(_0x224ecf){const _0x53a1d8=_0x50f3aa;return _0x224ecf&&_0x53a1d8(0x146)==typeof Symbol&&_0x224ecf['constructor']===Symbol&&_0x224ecf!==Symbol[_0x53a1d8(0x145)]?_0x53a1d8(0x15e):typeof _0x224ecf;},_typeof(_0x135c9d);}function toPrimitive(_0x5d941b,_0x5c9393){const _0x5b7526=_0x54e3f2;if(_0x5b7526(0x13a)!=_typeof(_0x5d941b)||!_0x5d941b)return _0x5d941b;var _0x3c5688=_0x5d941b[Symbol[_0x5b7526(0x152)]];if(void 0x0!==_0x3c5688){var _0x2ac5af=_0x3c5688['call'](_0x5d941b,_0x5c9393||'default');if('object'!=_typeof(_0x2ac5af))return _0x2ac5af;throw new TypeError(_0x5b7526(0x140));}return(_0x5b7526(0x132)===_0x5c9393?String:Number)(_0x5d941b);}function toPropertyKey(_0x2c9813){const _0x409e04=_0x54e3f2;var _0x56cbc8=toPrimitive(_0x2c9813,_0x409e04(0x132));return _0x409e04(0x15e)==_typeof(_0x56cbc8)?_0x56cbc8:_0x56cbc8+'';}function _defineProperty(_0x3e7b5a,_0xafd7f3,_0x51fbac){const _0x25378f=_0x54e3f2;return(_0xafd7f3=toPropertyKey(_0xafd7f3))in _0x3e7b5a?Object[_0x25378f(0x15f)](_0x3e7b5a,_0xafd7f3,{'value':_0x51fbac,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x3e7b5a[_0xafd7f3]=_0x51fbac,_0x3e7b5a;}let UniverCollaborationClientNodePlugin=class UniverCollaborationClientNodePlugin extends Plugin{constructor(_0x1030ac=defaultPluginConfig,_0x148179,_0x4bac78){const _0x115e04=_0x54e3f2;super(),this[_0x115e04(0x133)]=_0x148179,this[_0x115e04(0x13c)]=_0x4bac78,this[_0x115e04(0x133)][_0x115e04(0x14e)](COLLABORATION_CLIENT_NODE_CONFIG_KEY,_0x1030ac);}['onStarting'](){const _0x54271d=_0x54e3f2;this[_0x54271d(0x134)]();}[_0x54e3f2(0x134)](){const _0x12d1bc=_0x54e3f2;registerDependencies(this[_0x12d1bc(0x13c)],[[ISocketService,{'useClass':NodeWebSocketService}]]);}};_defineProperty(UniverCollaborationClientNodePlugin,_0x54e3f2(0x153),'UNIVER_COLLABORATION_CLIENT_NODE_PLUGIN'),_defineProperty(UniverCollaborationClientNodePlugin,_0x54e3f2(0x138),name),_defineProperty(UniverCollaborationClientNodePlugin,_0x54e3f2(0x137),version),UniverCollaborationClientNodePlugin=__decorate([DependentOn(UniverCollaborationClientPlugin),__decorateParam(0x1,IConfigService),__decorateParam(0x2,Inject(Injector))],UniverCollaborationClientNodePlugin);let NodeCollaborationSocketService=class NodeCollaborationSocketService extends CollaborationSocketService{constructor(_0x582f1a,_0x159a6e,_0x2f7925,_0x6c4882,_0x2a6088){const _0x7bdae1=_0x54e3f2;super(_0x582f1a,_0x159a6e,_0x2f7925,_0x6c4882,_0x2a6088);const _0x2ee5be=this[_0x7bdae1(0x133)][_0x7bdae1(0x13d)](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY);this[_0x7bdae1(0x13e)][_0x7bdae1(0x14a)]({'interceptor':(_0x50756b,_0x5863db)=>{const _0x4da666=_0x7bdae1,_0x55ac27=_0x50756b[_0x4da666(0x15b)];if(_0x2ee5be===null||_0x2ee5be===void 0x0?void 0x0:_0x2ee5be[_0x4da666(0x136)]){for(const _0x54e2ef in _0x2ee5be[_0x4da666(0x136)])_0x55ac27[_0x4da666(0x14c)](_0x54e2ef,_0x2ee5be['customHeaders'][_0x54e2ef]);}return _0x5863db(_0x50756b);}});}async[_0x54e3f2(0x147)](_0x519797){return this['_doCreateSocket'](_0x519797);}};NodeCollaborationSocketService=__decorate([__decorateParam(0x0,Inject(Injector)),__decorateParam(0x1,Inject(HTTPService)),__decorateParam(0x2,IConfigService),__decorateParam(0x3,ILogService),__decorateParam(0x4,ISnapshotServerService)],NodeCollaborationSocketService);export{COLLABORATION_CLIENT_NODE_CONFIG_KEY,NodeCollaborationSocketService,UniverCollaborationClientNodePlugin};
1
+ const _0x386ee4=_0x28f0;(function(_0x4a98ae,_0x5e6799){const _0x9974a8=_0x28f0,_0x57b3c1=_0x4a98ae();while(!![]){try{const _0x5ea448=-parseInt(_0x9974a8(0xbd))/0x1+parseInt(_0x9974a8(0xae))/0x2*(-parseInt(_0x9974a8(0xbb))/0x3)+-parseInt(_0x9974a8(0x92))/0x4+-parseInt(_0x9974a8(0x9c))/0x5+parseInt(_0x9974a8(0x93))/0x6+-parseInt(_0x9974a8(0x97))/0x7+parseInt(_0x9974a8(0x96))/0x8;if(_0x5ea448===_0x5e6799)break;else _0x57b3c1['push'](_0x57b3c1['shift']());}catch(_0x9eedb4){_0x57b3c1['push'](_0x57b3c1['shift']());}}}(_0x4bdf,0xcddc0));import{COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY,CollaborationSocketService,UniverCollaborationClientPlugin}from'@univerjs-pro/collaboration-client';import{DependentOn,Disposable,DisposableCollection,IConfigService,ILogService,Inject,Injector,Plugin,registerDependencies,toDisposable}from'@univerjs/core';import{HTTPService,ISocketService}from'@univerjs/network';import{Observable,share}from'rxjs';import{WebSocket}from'ws';import{ISnapshotServerService}from'@univerjs-pro/collaboration';const COLLABORATION_CLIENT_NODE_CONFIG_KEY='collaboration-client-node.config',configSymbol=Symbol(COLLABORATION_CLIENT_NODE_CONFIG_KEY),defaultPluginConfig={};var name=_0x386ee4(0xb8),version=_0x386ee4(0xa9);function __decorateParam(_0x39d8bd,_0x40f698){return function(_0x299751,_0x1c3880){_0x40f698(_0x299751,_0x1c3880,_0x39d8bd);};}function __decorate(_0x57e7ee,_0x35bde0,_0x14a93d,_0x5f3987){const _0x3067f4=_0x386ee4;var _0x49d9b4=arguments[_0x3067f4(0xba)],_0x6c9ab4=_0x49d9b4<0x3?_0x35bde0:_0x5f3987===null?_0x5f3987=Object[_0x3067f4(0x99)](_0x35bde0,_0x14a93d):_0x5f3987,_0x81d5ae;if(typeof Reflect===_0x3067f4(0x9a)&&typeof Reflect[_0x3067f4(0x98)]===_0x3067f4(0xab))_0x6c9ab4=Reflect[_0x3067f4(0x98)](_0x57e7ee,_0x35bde0,_0x14a93d,_0x5f3987);else{for(var _0x13278d=_0x57e7ee[_0x3067f4(0xba)]-0x1;_0x13278d>=0x0;_0x13278d--)if(_0x81d5ae=_0x57e7ee[_0x13278d])_0x6c9ab4=(_0x49d9b4<0x3?_0x81d5ae(_0x6c9ab4):_0x49d9b4>0x3?_0x81d5ae(_0x35bde0,_0x14a93d,_0x6c9ab4):_0x81d5ae(_0x35bde0,_0x14a93d))||_0x6c9ab4;}return _0x49d9b4>0x3&&_0x6c9ab4&&Object[_0x3067f4(0xb6)](_0x35bde0,_0x14a93d,_0x6c9ab4),_0x6c9ab4;}let NodeWebSocketService=class NodeWebSocketService extends Disposable{constructor(_0x18ea24){const _0x44acbf=_0x386ee4;super(),this[_0x44acbf(0xb2)]=_0x18ea24;}[_0x386ee4(0xa2)](_0x5a01fa){const _0x347a2d=_0x386ee4;var _0x172d1c;const _0x51cea2=((_0x172d1c=this[_0x347a2d(0xb2)]['getConfig'](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY))===null||_0x172d1c===void 0x0?void 0x0:_0x172d1c[_0x347a2d(0x90)])||{};try{const _0x3f5244=new WebSocket(_0x5a01fa,{'headers':{..._0x51cea2}}),_0x38cfcb=new DisposableCollection();return{'URL':_0x5a01fa,'close':(_0x356adf,_0x50a3cb)=>{const _0x55c56a=_0x347a2d;_0x3f5244[_0x55c56a(0x95)](_0x356adf,_0x50a3cb),_0x38cfcb[_0x55c56a(0xa5)]();},'send':_0x36b23f=>{const _0x2301bf=_0x347a2d;_0x3f5244[_0x2301bf(0x9f)](_0x36b23f);},'open$':new Observable(_0x362ba0=>{const _0x2b0faf=_0x347a2d,_0x4c4021=_0x4c6903=>_0x362ba0[_0x2b0faf(0xa1)](_0x4c6903);_0x3f5244[_0x2b0faf(0xac)](_0x2b0faf(0xa0),_0x4c4021),_0x38cfcb[_0x2b0faf(0x9d)](toDisposable(()=>_0x3f5244['removeEventListener'](_0x2b0faf(0xa0),_0x4c4021)));})['pipe'](share()),'close$':new Observable(_0x2af1c2=>{const _0x4f5eca=_0x347a2d,_0x54b4a4=_0x5063f1=>_0x2af1c2[_0x4f5eca(0xa1)](_0x5063f1);_0x3f5244[_0x4f5eca(0xac)](_0x4f5eca(0x95),_0x54b4a4),_0x38cfcb[_0x4f5eca(0x9d)](toDisposable(()=>_0x3f5244[_0x4f5eca(0xa8)]('close',_0x54b4a4)));})[_0x347a2d(0xa7)](share()),'error$':new Observable(_0x402b15=>{const _0x526a9d=_0x347a2d,_0xeb3932=_0x979ae4=>_0x402b15[_0x526a9d(0xa1)](_0x979ae4);_0x3f5244['addEventListener'](_0x526a9d(0xb0),_0xeb3932),_0x38cfcb[_0x526a9d(0x9d)](toDisposable(()=>_0x3f5244[_0x526a9d(0xa8)](_0x526a9d(0xb0),_0xeb3932)));})[_0x347a2d(0xa7)](share()),'message$':new Observable(_0x1329f6=>{const _0x3d371e=_0x347a2d,_0x2ce5e0=_0x295059=>_0x1329f6[_0x3d371e(0xa1)](_0x295059);_0x3f5244[_0x3d371e(0xac)](_0x3d371e(0xbc),_0x2ce5e0),_0x38cfcb[_0x3d371e(0x9d)](toDisposable(()=>_0x3f5244[_0x3d371e(0xa8)](_0x3d371e(0xbc),_0x2ce5e0)));})['pipe'](share())};}catch(_0x39807e){return console[_0x347a2d(0xb0)](_0x39807e),null;}}};NodeWebSocketService=__decorate([__decorateParam(0x0,IConfigService)],NodeWebSocketService);function _0x28f0(_0x937245,_0x48fefd){_0x937245=_0x937245-0x8d;const _0x4bdf38=_0x4bdf();let _0x28f030=_0x4bdf38[_0x937245];return _0x28f030;}function _typeof(_0x4e7a35){'@babel/helpers - typeof';const _0xc8d05c=_0x386ee4;return _typeof=_0xc8d05c(0xab)==typeof Symbol&&_0xc8d05c(0xb1)==typeof Symbol[_0xc8d05c(0xad)]?function(_0x11f856){return typeof _0x11f856;}:function(_0x592816){const _0x293c87=_0xc8d05c;return _0x592816&&_0x293c87(0xab)==typeof Symbol&&_0x592816['constructor']===Symbol&&_0x592816!==Symbol['prototype']?_0x293c87(0xb1):typeof _0x592816;},_typeof(_0x4e7a35);}function toPrimitive(_0x25fefe,_0x266f99){const _0x5006c1=_0x386ee4;if(_0x5006c1(0x9a)!=_typeof(_0x25fefe)||!_0x25fefe)return _0x25fefe;var _0x1e862e=_0x25fefe[Symbol[_0x5006c1(0x9e)]];if(void 0x0!==_0x1e862e){var _0x4fcc18=_0x1e862e[_0x5006c1(0x91)](_0x25fefe,_0x266f99||_0x5006c1(0xa6));if('object'!=_typeof(_0x4fcc18))return _0x4fcc18;throw new TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x5006c1(0xaa)===_0x266f99?String:Number)(_0x25fefe);}function _0x4bdf(){const _0x3197b9=['decorate','getOwnPropertyDescriptor','object','_registerDependencies','2526975xmcgNP','add','toPrimitive','send','open','next','createSocket','pluginName','onStarting','dispose','default','pipe','removeEventListener','0.21.1-insiders.20260509-bf98cad','string','function','addEventListener','iterator','63146IWpSIk','set','error','symbol','_configService','_injector','UNIVER_COLLABORATION_CLIENT_NODE_PLUGIN','headers','defineProperty','version','@univerjs-pro/collaboration-client-node','setConfig','length','93ItjKBC','message','141323MZNhdG','_doCreateSocket','registerHTTPInterceptor','getConfig','customHeaders','call','3784596dqTLld','5804496OCPEXw','_httpService','close','30320312VEXMwi','9398375xgbYHZ'];_0x4bdf=function(){return _0x3197b9;};return _0x4bdf();}function toPropertyKey(_0x181f6e){const _0x43fc83=_0x386ee4;var _0x172a41=toPrimitive(_0x181f6e,'string');return _0x43fc83(0xb1)==_typeof(_0x172a41)?_0x172a41:_0x172a41+'';}function _defineProperty(_0x58b2fe,_0x3817fc,_0x3b7b43){const _0x18973f=_0x386ee4;return(_0x3817fc=toPropertyKey(_0x3817fc))in _0x58b2fe?Object[_0x18973f(0xb6)](_0x58b2fe,_0x3817fc,{'value':_0x3b7b43,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x58b2fe[_0x3817fc]=_0x3b7b43,_0x58b2fe;}let UniverCollaborationClientNodePlugin=class UniverCollaborationClientNodePlugin extends Plugin{constructor(_0x3a8a94=defaultPluginConfig,_0x129151,_0x2aeb13){const _0x1fde2b=_0x386ee4;super(),this[_0x1fde2b(0xb2)]=_0x129151,this[_0x1fde2b(0xb3)]=_0x2aeb13,this['_configService'][_0x1fde2b(0xb9)](COLLABORATION_CLIENT_NODE_CONFIG_KEY,_0x3a8a94);}[_0x386ee4(0xa4)](){const _0x2abe6b=_0x386ee4;this[_0x2abe6b(0x9b)]();}[_0x386ee4(0x9b)](){const _0x1fb843=_0x386ee4;registerDependencies(this[_0x1fb843(0xb3)],[[ISocketService,{'useClass':NodeWebSocketService}]]);}};_defineProperty(UniverCollaborationClientNodePlugin,_0x386ee4(0xa3),_0x386ee4(0xb4)),_defineProperty(UniverCollaborationClientNodePlugin,'packageName',name),_defineProperty(UniverCollaborationClientNodePlugin,_0x386ee4(0xb7),version),UniverCollaborationClientNodePlugin=__decorate([DependentOn(UniverCollaborationClientPlugin),__decorateParam(0x1,IConfigService),__decorateParam(0x2,Inject(Injector))],UniverCollaborationClientNodePlugin);let NodeCollaborationSocketService=class NodeCollaborationSocketService extends CollaborationSocketService{constructor(_0x380289,_0x42d39f,_0x195615,_0x3e4ece,_0x48a747){const _0x2e140e=_0x386ee4;super(_0x380289,_0x42d39f,_0x195615,_0x3e4ece,_0x48a747);const _0x461b9d=this[_0x2e140e(0xb2)][_0x2e140e(0x8f)](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY);this[_0x2e140e(0x94)][_0x2e140e(0x8e)]({'interceptor':(_0x545bbf,_0x5e50f8)=>{const _0x180a40=_0x2e140e,_0x273259=_0x545bbf[_0x180a40(0xb5)];if(_0x461b9d===null||_0x461b9d===void 0x0?void 0x0:_0x461b9d['customHeaders']){for(const _0x374eaa in _0x461b9d[_0x180a40(0x90)])_0x273259[_0x180a40(0xaf)](_0x374eaa,_0x461b9d['customHeaders'][_0x374eaa]);}return _0x5e50f8(_0x545bbf);}});}async[_0x386ee4(0xa2)](_0x18f1ee){const _0x1eb931=_0x386ee4;return this[_0x1eb931(0x8d)](_0x18f1ee);}};NodeCollaborationSocketService=__decorate([__decorateParam(0x0,Inject(Injector)),__decorateParam(0x1,Inject(HTTPService)),__decorateParam(0x2,IConfigService),__decorateParam(0x3,ILogService),__decorateParam(0x4,ISnapshotServerService)],NodeCollaborationSocketService);export{COLLABORATION_CLIENT_NODE_CONFIG_KEY,NodeCollaborationSocketService,UniverCollaborationClientNodePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- function _0x38e5(){const _0x5497e8=['registerHTTPInterceptor','78977520ZbmtSm','set','error','setConfig','next','pipe','@univerjs-pro/collaboration-client-node','toPrimitive','pluginName','0.21.0','close','open','2553956jNIkkS','400141jZpzdK','2602490Tffnub','174DlmcdP','headers','9951890oaTLky','send','symbol','defineProperty','decorate','removeEventListener','string','_configService','_registerDependencies','dispose','customHeaders','version','packageName','462709SRbyRu','object','add','_injector','getConfig','_httpService','8HbDrEX','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','length','15980076UtfGSI','addEventListener','message','prototype','function','createSocket','collaboration-client-node.config','3MotcBd'];_0x38e5=function(){return _0x5497e8;};return _0x38e5();}const _0x54e3f2=_0x5c0a;(function(_0x3642c8,_0x1d2724){const _0x2faec2=_0x5c0a,_0x58191a=_0x3642c8();while(!![]){try{const _0x47815e=parseInt(_0x2faec2(0x139))/0x1+-parseInt(_0x2faec2(0x159))/0x2+parseInt(_0x2faec2(0x149))/0x3*(-parseInt(_0x2faec2(0x157))/0x4)+-parseInt(_0x2faec2(0x15c))/0x5+-parseInt(_0x2faec2(0x15a))/0x6*(parseInt(_0x2faec2(0x158))/0x7)+-parseInt(_0x2faec2(0x13f))/0x8*(parseInt(_0x2faec2(0x142))/0x9)+parseInt(_0x2faec2(0x14b))/0xa;if(_0x47815e===_0x1d2724)break;else _0x58191a['push'](_0x58191a['shift']());}catch(_0x17eb6e){_0x58191a['push'](_0x58191a['shift']());}}}(_0x38e5,0xf36c2));import{COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY,CollaborationSocketService,UniverCollaborationClientPlugin}from'@univerjs-pro/collaboration-client';import{DependentOn,Disposable,DisposableCollection,IConfigService,ILogService,Inject,Injector,Plugin,registerDependencies,toDisposable}from'@univerjs/core';import{HTTPService,ISocketService}from'@univerjs/network';import{Observable,share}from'rxjs';import{WebSocket}from'ws';import{ISnapshotServerService}from'@univerjs-pro/collaboration';function _0x5c0a(_0x1074cd,_0x2a36a4){_0x1074cd=_0x1074cd-0x132;const _0x38e596=_0x38e5();let _0x5c0af9=_0x38e596[_0x1074cd];return _0x5c0af9;}const COLLABORATION_CLIENT_NODE_CONFIG_KEY=_0x54e3f2(0x148),configSymbol=Symbol(COLLABORATION_CLIENT_NODE_CONFIG_KEY),defaultPluginConfig={};var name=_0x54e3f2(0x151),version=_0x54e3f2(0x154);function __decorateParam(_0x505fb6,_0x3903f5){return function(_0x320c6e,_0x44991c){_0x3903f5(_0x320c6e,_0x44991c,_0x505fb6);};}function __decorate(_0x5d2c98,_0x42d70e,_0xc81142,_0xe0282){const _0x28b4a3=_0x54e3f2;var _0x11c550=arguments['length'],_0x5c5c90=_0x11c550<0x3?_0x42d70e:_0xe0282===null?_0xe0282=Object['getOwnPropertyDescriptor'](_0x42d70e,_0xc81142):_0xe0282,_0x336380;if(typeof Reflect===_0x28b4a3(0x13a)&&typeof Reflect[_0x28b4a3(0x160)]===_0x28b4a3(0x146))_0x5c5c90=Reflect[_0x28b4a3(0x160)](_0x5d2c98,_0x42d70e,_0xc81142,_0xe0282);else{for(var _0x159871=_0x5d2c98[_0x28b4a3(0x141)]-0x1;_0x159871>=0x0;_0x159871--)if(_0x336380=_0x5d2c98[_0x159871])_0x5c5c90=(_0x11c550<0x3?_0x336380(_0x5c5c90):_0x11c550>0x3?_0x336380(_0x42d70e,_0xc81142,_0x5c5c90):_0x336380(_0x42d70e,_0xc81142))||_0x5c5c90;}return _0x11c550>0x3&&_0x5c5c90&&Object[_0x28b4a3(0x15f)](_0x42d70e,_0xc81142,_0x5c5c90),_0x5c5c90;}let NodeWebSocketService=class NodeWebSocketService extends Disposable{constructor(_0x49760f){const _0xf0aae9=_0x54e3f2;super(),this[_0xf0aae9(0x133)]=_0x49760f;}['createSocket'](_0x5660a1){const _0x48ac5b=_0x54e3f2;var _0x561ea5;const _0xbeb955=((_0x561ea5=this[_0x48ac5b(0x133)][_0x48ac5b(0x13d)](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY))===null||_0x561ea5===void 0x0?void 0x0:_0x561ea5['customHeaders'])||{};try{const _0x15d69c=new WebSocket(_0x5660a1,{'headers':{..._0xbeb955}}),_0xed5f33=new DisposableCollection();return{'URL':_0x5660a1,'close':(_0x48273f,_0x2cf328)=>{const _0x155e28=_0x48ac5b;_0x15d69c[_0x155e28(0x155)](_0x48273f,_0x2cf328),_0xed5f33[_0x155e28(0x135)]();},'send':_0x584164=>{const _0x5da18a=_0x48ac5b;_0x15d69c[_0x5da18a(0x15d)](_0x584164);},'open$':new Observable(_0x1b8dfb=>{const _0x55afc5=_0x48ac5b,_0x1a457c=_0x245c5=>_0x1b8dfb['next'](_0x245c5);_0x15d69c[_0x55afc5(0x143)](_0x55afc5(0x156),_0x1a457c),_0xed5f33[_0x55afc5(0x13b)](toDisposable(()=>_0x15d69c['removeEventListener'](_0x55afc5(0x156),_0x1a457c)));})[_0x48ac5b(0x150)](share()),'close$':new Observable(_0x287d20=>{const _0x15d0c8=_0x48ac5b,_0x1c243c=_0x36fa9c=>_0x287d20[_0x15d0c8(0x14f)](_0x36fa9c);_0x15d69c[_0x15d0c8(0x143)](_0x15d0c8(0x155),_0x1c243c),_0xed5f33[_0x15d0c8(0x13b)](toDisposable(()=>_0x15d69c[_0x15d0c8(0x161)](_0x15d0c8(0x155),_0x1c243c)));})[_0x48ac5b(0x150)](share()),'error$':new Observable(_0x3a9ae7=>{const _0x2d3c51=_0x48ac5b,_0x3130d5=_0x59ac47=>_0x3a9ae7[_0x2d3c51(0x14f)](_0x59ac47);_0x15d69c[_0x2d3c51(0x143)](_0x2d3c51(0x14d),_0x3130d5),_0xed5f33[_0x2d3c51(0x13b)](toDisposable(()=>_0x15d69c[_0x2d3c51(0x161)]('error',_0x3130d5)));})[_0x48ac5b(0x150)](share()),'message$':new Observable(_0x37dc61=>{const _0x1ea12e=_0x48ac5b,_0x33d206=_0x566fff=>_0x37dc61[_0x1ea12e(0x14f)](_0x566fff);_0x15d69c[_0x1ea12e(0x143)](_0x1ea12e(0x144),_0x33d206),_0xed5f33[_0x1ea12e(0x13b)](toDisposable(()=>_0x15d69c[_0x1ea12e(0x161)](_0x1ea12e(0x144),_0x33d206)));})[_0x48ac5b(0x150)](share())};}catch(_0x10e592){return console[_0x48ac5b(0x14d)](_0x10e592),null;}}};NodeWebSocketService=__decorate([__decorateParam(0x0,IConfigService)],NodeWebSocketService);function _typeof(_0x135c9d){'@babel/helpers - typeof';const _0x50f3aa=_0x54e3f2;return _typeof=_0x50f3aa(0x146)==typeof Symbol&&_0x50f3aa(0x15e)==typeof Symbol['iterator']?function(_0x684525){return typeof _0x684525;}:function(_0x224ecf){const _0x53a1d8=_0x50f3aa;return _0x224ecf&&_0x53a1d8(0x146)==typeof Symbol&&_0x224ecf['constructor']===Symbol&&_0x224ecf!==Symbol[_0x53a1d8(0x145)]?_0x53a1d8(0x15e):typeof _0x224ecf;},_typeof(_0x135c9d);}function toPrimitive(_0x5d941b,_0x5c9393){const _0x5b7526=_0x54e3f2;if(_0x5b7526(0x13a)!=_typeof(_0x5d941b)||!_0x5d941b)return _0x5d941b;var _0x3c5688=_0x5d941b[Symbol[_0x5b7526(0x152)]];if(void 0x0!==_0x3c5688){var _0x2ac5af=_0x3c5688['call'](_0x5d941b,_0x5c9393||'default');if('object'!=_typeof(_0x2ac5af))return _0x2ac5af;throw new TypeError(_0x5b7526(0x140));}return(_0x5b7526(0x132)===_0x5c9393?String:Number)(_0x5d941b);}function toPropertyKey(_0x2c9813){const _0x409e04=_0x54e3f2;var _0x56cbc8=toPrimitive(_0x2c9813,_0x409e04(0x132));return _0x409e04(0x15e)==_typeof(_0x56cbc8)?_0x56cbc8:_0x56cbc8+'';}function _defineProperty(_0x3e7b5a,_0xafd7f3,_0x51fbac){const _0x25378f=_0x54e3f2;return(_0xafd7f3=toPropertyKey(_0xafd7f3))in _0x3e7b5a?Object[_0x25378f(0x15f)](_0x3e7b5a,_0xafd7f3,{'value':_0x51fbac,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x3e7b5a[_0xafd7f3]=_0x51fbac,_0x3e7b5a;}let UniverCollaborationClientNodePlugin=class UniverCollaborationClientNodePlugin extends Plugin{constructor(_0x1030ac=defaultPluginConfig,_0x148179,_0x4bac78){const _0x115e04=_0x54e3f2;super(),this[_0x115e04(0x133)]=_0x148179,this[_0x115e04(0x13c)]=_0x4bac78,this[_0x115e04(0x133)][_0x115e04(0x14e)](COLLABORATION_CLIENT_NODE_CONFIG_KEY,_0x1030ac);}['onStarting'](){const _0x54271d=_0x54e3f2;this[_0x54271d(0x134)]();}[_0x54e3f2(0x134)](){const _0x12d1bc=_0x54e3f2;registerDependencies(this[_0x12d1bc(0x13c)],[[ISocketService,{'useClass':NodeWebSocketService}]]);}};_defineProperty(UniverCollaborationClientNodePlugin,_0x54e3f2(0x153),'UNIVER_COLLABORATION_CLIENT_NODE_PLUGIN'),_defineProperty(UniverCollaborationClientNodePlugin,_0x54e3f2(0x138),name),_defineProperty(UniverCollaborationClientNodePlugin,_0x54e3f2(0x137),version),UniverCollaborationClientNodePlugin=__decorate([DependentOn(UniverCollaborationClientPlugin),__decorateParam(0x1,IConfigService),__decorateParam(0x2,Inject(Injector))],UniverCollaborationClientNodePlugin);let NodeCollaborationSocketService=class NodeCollaborationSocketService extends CollaborationSocketService{constructor(_0x582f1a,_0x159a6e,_0x2f7925,_0x6c4882,_0x2a6088){const _0x7bdae1=_0x54e3f2;super(_0x582f1a,_0x159a6e,_0x2f7925,_0x6c4882,_0x2a6088);const _0x2ee5be=this[_0x7bdae1(0x133)][_0x7bdae1(0x13d)](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY);this[_0x7bdae1(0x13e)][_0x7bdae1(0x14a)]({'interceptor':(_0x50756b,_0x5863db)=>{const _0x4da666=_0x7bdae1,_0x55ac27=_0x50756b[_0x4da666(0x15b)];if(_0x2ee5be===null||_0x2ee5be===void 0x0?void 0x0:_0x2ee5be[_0x4da666(0x136)]){for(const _0x54e2ef in _0x2ee5be[_0x4da666(0x136)])_0x55ac27[_0x4da666(0x14c)](_0x54e2ef,_0x2ee5be['customHeaders'][_0x54e2ef]);}return _0x5863db(_0x50756b);}});}async[_0x54e3f2(0x147)](_0x519797){return this['_doCreateSocket'](_0x519797);}};NodeCollaborationSocketService=__decorate([__decorateParam(0x0,Inject(Injector)),__decorateParam(0x1,Inject(HTTPService)),__decorateParam(0x2,IConfigService),__decorateParam(0x3,ILogService),__decorateParam(0x4,ISnapshotServerService)],NodeCollaborationSocketService);export{COLLABORATION_CLIENT_NODE_CONFIG_KEY,NodeCollaborationSocketService,UniverCollaborationClientNodePlugin};
1
+ const _0x386ee4=_0x28f0;(function(_0x4a98ae,_0x5e6799){const _0x9974a8=_0x28f0,_0x57b3c1=_0x4a98ae();while(!![]){try{const _0x5ea448=-parseInt(_0x9974a8(0xbd))/0x1+parseInt(_0x9974a8(0xae))/0x2*(-parseInt(_0x9974a8(0xbb))/0x3)+-parseInt(_0x9974a8(0x92))/0x4+-parseInt(_0x9974a8(0x9c))/0x5+parseInt(_0x9974a8(0x93))/0x6+-parseInt(_0x9974a8(0x97))/0x7+parseInt(_0x9974a8(0x96))/0x8;if(_0x5ea448===_0x5e6799)break;else _0x57b3c1['push'](_0x57b3c1['shift']());}catch(_0x9eedb4){_0x57b3c1['push'](_0x57b3c1['shift']());}}}(_0x4bdf,0xcddc0));import{COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY,CollaborationSocketService,UniverCollaborationClientPlugin}from'@univerjs-pro/collaboration-client';import{DependentOn,Disposable,DisposableCollection,IConfigService,ILogService,Inject,Injector,Plugin,registerDependencies,toDisposable}from'@univerjs/core';import{HTTPService,ISocketService}from'@univerjs/network';import{Observable,share}from'rxjs';import{WebSocket}from'ws';import{ISnapshotServerService}from'@univerjs-pro/collaboration';const COLLABORATION_CLIENT_NODE_CONFIG_KEY='collaboration-client-node.config',configSymbol=Symbol(COLLABORATION_CLIENT_NODE_CONFIG_KEY),defaultPluginConfig={};var name=_0x386ee4(0xb8),version=_0x386ee4(0xa9);function __decorateParam(_0x39d8bd,_0x40f698){return function(_0x299751,_0x1c3880){_0x40f698(_0x299751,_0x1c3880,_0x39d8bd);};}function __decorate(_0x57e7ee,_0x35bde0,_0x14a93d,_0x5f3987){const _0x3067f4=_0x386ee4;var _0x49d9b4=arguments[_0x3067f4(0xba)],_0x6c9ab4=_0x49d9b4<0x3?_0x35bde0:_0x5f3987===null?_0x5f3987=Object[_0x3067f4(0x99)](_0x35bde0,_0x14a93d):_0x5f3987,_0x81d5ae;if(typeof Reflect===_0x3067f4(0x9a)&&typeof Reflect[_0x3067f4(0x98)]===_0x3067f4(0xab))_0x6c9ab4=Reflect[_0x3067f4(0x98)](_0x57e7ee,_0x35bde0,_0x14a93d,_0x5f3987);else{for(var _0x13278d=_0x57e7ee[_0x3067f4(0xba)]-0x1;_0x13278d>=0x0;_0x13278d--)if(_0x81d5ae=_0x57e7ee[_0x13278d])_0x6c9ab4=(_0x49d9b4<0x3?_0x81d5ae(_0x6c9ab4):_0x49d9b4>0x3?_0x81d5ae(_0x35bde0,_0x14a93d,_0x6c9ab4):_0x81d5ae(_0x35bde0,_0x14a93d))||_0x6c9ab4;}return _0x49d9b4>0x3&&_0x6c9ab4&&Object[_0x3067f4(0xb6)](_0x35bde0,_0x14a93d,_0x6c9ab4),_0x6c9ab4;}let NodeWebSocketService=class NodeWebSocketService extends Disposable{constructor(_0x18ea24){const _0x44acbf=_0x386ee4;super(),this[_0x44acbf(0xb2)]=_0x18ea24;}[_0x386ee4(0xa2)](_0x5a01fa){const _0x347a2d=_0x386ee4;var _0x172d1c;const _0x51cea2=((_0x172d1c=this[_0x347a2d(0xb2)]['getConfig'](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY))===null||_0x172d1c===void 0x0?void 0x0:_0x172d1c[_0x347a2d(0x90)])||{};try{const _0x3f5244=new WebSocket(_0x5a01fa,{'headers':{..._0x51cea2}}),_0x38cfcb=new DisposableCollection();return{'URL':_0x5a01fa,'close':(_0x356adf,_0x50a3cb)=>{const _0x55c56a=_0x347a2d;_0x3f5244[_0x55c56a(0x95)](_0x356adf,_0x50a3cb),_0x38cfcb[_0x55c56a(0xa5)]();},'send':_0x36b23f=>{const _0x2301bf=_0x347a2d;_0x3f5244[_0x2301bf(0x9f)](_0x36b23f);},'open$':new Observable(_0x362ba0=>{const _0x2b0faf=_0x347a2d,_0x4c4021=_0x4c6903=>_0x362ba0[_0x2b0faf(0xa1)](_0x4c6903);_0x3f5244[_0x2b0faf(0xac)](_0x2b0faf(0xa0),_0x4c4021),_0x38cfcb[_0x2b0faf(0x9d)](toDisposable(()=>_0x3f5244['removeEventListener'](_0x2b0faf(0xa0),_0x4c4021)));})['pipe'](share()),'close$':new Observable(_0x2af1c2=>{const _0x4f5eca=_0x347a2d,_0x54b4a4=_0x5063f1=>_0x2af1c2[_0x4f5eca(0xa1)](_0x5063f1);_0x3f5244[_0x4f5eca(0xac)](_0x4f5eca(0x95),_0x54b4a4),_0x38cfcb[_0x4f5eca(0x9d)](toDisposable(()=>_0x3f5244[_0x4f5eca(0xa8)]('close',_0x54b4a4)));})[_0x347a2d(0xa7)](share()),'error$':new Observable(_0x402b15=>{const _0x526a9d=_0x347a2d,_0xeb3932=_0x979ae4=>_0x402b15[_0x526a9d(0xa1)](_0x979ae4);_0x3f5244['addEventListener'](_0x526a9d(0xb0),_0xeb3932),_0x38cfcb[_0x526a9d(0x9d)](toDisposable(()=>_0x3f5244[_0x526a9d(0xa8)](_0x526a9d(0xb0),_0xeb3932)));})[_0x347a2d(0xa7)](share()),'message$':new Observable(_0x1329f6=>{const _0x3d371e=_0x347a2d,_0x2ce5e0=_0x295059=>_0x1329f6[_0x3d371e(0xa1)](_0x295059);_0x3f5244[_0x3d371e(0xac)](_0x3d371e(0xbc),_0x2ce5e0),_0x38cfcb[_0x3d371e(0x9d)](toDisposable(()=>_0x3f5244[_0x3d371e(0xa8)](_0x3d371e(0xbc),_0x2ce5e0)));})['pipe'](share())};}catch(_0x39807e){return console[_0x347a2d(0xb0)](_0x39807e),null;}}};NodeWebSocketService=__decorate([__decorateParam(0x0,IConfigService)],NodeWebSocketService);function _0x28f0(_0x937245,_0x48fefd){_0x937245=_0x937245-0x8d;const _0x4bdf38=_0x4bdf();let _0x28f030=_0x4bdf38[_0x937245];return _0x28f030;}function _typeof(_0x4e7a35){'@babel/helpers - typeof';const _0xc8d05c=_0x386ee4;return _typeof=_0xc8d05c(0xab)==typeof Symbol&&_0xc8d05c(0xb1)==typeof Symbol[_0xc8d05c(0xad)]?function(_0x11f856){return typeof _0x11f856;}:function(_0x592816){const _0x293c87=_0xc8d05c;return _0x592816&&_0x293c87(0xab)==typeof Symbol&&_0x592816['constructor']===Symbol&&_0x592816!==Symbol['prototype']?_0x293c87(0xb1):typeof _0x592816;},_typeof(_0x4e7a35);}function toPrimitive(_0x25fefe,_0x266f99){const _0x5006c1=_0x386ee4;if(_0x5006c1(0x9a)!=_typeof(_0x25fefe)||!_0x25fefe)return _0x25fefe;var _0x1e862e=_0x25fefe[Symbol[_0x5006c1(0x9e)]];if(void 0x0!==_0x1e862e){var _0x4fcc18=_0x1e862e[_0x5006c1(0x91)](_0x25fefe,_0x266f99||_0x5006c1(0xa6));if('object'!=_typeof(_0x4fcc18))return _0x4fcc18;throw new TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x5006c1(0xaa)===_0x266f99?String:Number)(_0x25fefe);}function _0x4bdf(){const _0x3197b9=['decorate','getOwnPropertyDescriptor','object','_registerDependencies','2526975xmcgNP','add','toPrimitive','send','open','next','createSocket','pluginName','onStarting','dispose','default','pipe','removeEventListener','0.21.1-insiders.20260509-bf98cad','string','function','addEventListener','iterator','63146IWpSIk','set','error','symbol','_configService','_injector','UNIVER_COLLABORATION_CLIENT_NODE_PLUGIN','headers','defineProperty','version','@univerjs-pro/collaboration-client-node','setConfig','length','93ItjKBC','message','141323MZNhdG','_doCreateSocket','registerHTTPInterceptor','getConfig','customHeaders','call','3784596dqTLld','5804496OCPEXw','_httpService','close','30320312VEXMwi','9398375xgbYHZ'];_0x4bdf=function(){return _0x3197b9;};return _0x4bdf();}function toPropertyKey(_0x181f6e){const _0x43fc83=_0x386ee4;var _0x172a41=toPrimitive(_0x181f6e,'string');return _0x43fc83(0xb1)==_typeof(_0x172a41)?_0x172a41:_0x172a41+'';}function _defineProperty(_0x58b2fe,_0x3817fc,_0x3b7b43){const _0x18973f=_0x386ee4;return(_0x3817fc=toPropertyKey(_0x3817fc))in _0x58b2fe?Object[_0x18973f(0xb6)](_0x58b2fe,_0x3817fc,{'value':_0x3b7b43,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x58b2fe[_0x3817fc]=_0x3b7b43,_0x58b2fe;}let UniverCollaborationClientNodePlugin=class UniverCollaborationClientNodePlugin extends Plugin{constructor(_0x3a8a94=defaultPluginConfig,_0x129151,_0x2aeb13){const _0x1fde2b=_0x386ee4;super(),this[_0x1fde2b(0xb2)]=_0x129151,this[_0x1fde2b(0xb3)]=_0x2aeb13,this['_configService'][_0x1fde2b(0xb9)](COLLABORATION_CLIENT_NODE_CONFIG_KEY,_0x3a8a94);}[_0x386ee4(0xa4)](){const _0x2abe6b=_0x386ee4;this[_0x2abe6b(0x9b)]();}[_0x386ee4(0x9b)](){const _0x1fb843=_0x386ee4;registerDependencies(this[_0x1fb843(0xb3)],[[ISocketService,{'useClass':NodeWebSocketService}]]);}};_defineProperty(UniverCollaborationClientNodePlugin,_0x386ee4(0xa3),_0x386ee4(0xb4)),_defineProperty(UniverCollaborationClientNodePlugin,'packageName',name),_defineProperty(UniverCollaborationClientNodePlugin,_0x386ee4(0xb7),version),UniverCollaborationClientNodePlugin=__decorate([DependentOn(UniverCollaborationClientPlugin),__decorateParam(0x1,IConfigService),__decorateParam(0x2,Inject(Injector))],UniverCollaborationClientNodePlugin);let NodeCollaborationSocketService=class NodeCollaborationSocketService extends CollaborationSocketService{constructor(_0x380289,_0x42d39f,_0x195615,_0x3e4ece,_0x48a747){const _0x2e140e=_0x386ee4;super(_0x380289,_0x42d39f,_0x195615,_0x3e4ece,_0x48a747);const _0x461b9d=this[_0x2e140e(0xb2)][_0x2e140e(0x8f)](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY);this[_0x2e140e(0x94)][_0x2e140e(0x8e)]({'interceptor':(_0x545bbf,_0x5e50f8)=>{const _0x180a40=_0x2e140e,_0x273259=_0x545bbf[_0x180a40(0xb5)];if(_0x461b9d===null||_0x461b9d===void 0x0?void 0x0:_0x461b9d['customHeaders']){for(const _0x374eaa in _0x461b9d[_0x180a40(0x90)])_0x273259[_0x180a40(0xaf)](_0x374eaa,_0x461b9d['customHeaders'][_0x374eaa]);}return _0x5e50f8(_0x545bbf);}});}async[_0x386ee4(0xa2)](_0x18f1ee){const _0x1eb931=_0x386ee4;return this[_0x1eb931(0x8d)](_0x18f1ee);}};NodeCollaborationSocketService=__decorate([__decorateParam(0x0,Inject(Injector)),__decorateParam(0x1,Inject(HTTPService)),__decorateParam(0x2,IConfigService),__decorateParam(0x3,ILogService),__decorateParam(0x4,ISnapshotServerService)],NodeCollaborationSocketService);export{COLLABORATION_CLIENT_NODE_CONFIG_KEY,NodeCollaborationSocketService,UniverCollaborationClientNodePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- (function(_0x5346b9,_0x256e75){const _0x38aaa1=_0x3077,_0x1ddfe4=_0x5346b9();while(!![]){try{const _0x193f3d=-parseInt(_0x38aaa1(0x189))/0x1*(-parseInt(_0x38aaa1(0x16b))/0x2)+-parseInt(_0x38aaa1(0x19a))/0x3+-parseInt(_0x38aaa1(0x1b4))/0x4+parseInt(_0x38aaa1(0x182))/0x5*(-parseInt(_0x38aaa1(0x185))/0x6)+parseInt(_0x38aaa1(0x1b7))/0x7*(parseInt(_0x38aaa1(0x191))/0x8)+-parseInt(_0x38aaa1(0x199))/0x9+parseInt(_0x38aaa1(0x1a4))/0xa;if(_0x193f3d===_0x256e75)break;else _0x1ddfe4['push'](_0x1ddfe4['shift']());}catch(_0x51253b){_0x1ddfe4['push'](_0x1ddfe4['shift']());}}}(_0x46f6,0x55e8c),function(_0x200c1,_0x51befa){const _0x1bd68b=_0x3077;typeof exports==_0x1bd68b(0x194)&&typeof module<'u'?_0x51befa(exports,require(`@univerjs-pro/collaboration-client`),require(`@univerjs/core`),require(`@univerjs/network`),require(`rxjs`),require(`@univerjs-pro/collaboration`)):typeof define=='function'&&define['amd']?define(['exports',_0x1bd68b(0x168),_0x1bd68b(0x16c),_0x1bd68b(0x180),_0x1bd68b(0x1b3),_0x1bd68b(0x1aa)],_0x51befa):(_0x200c1=typeof globalThis<'u'?globalThis:_0x200c1||self,_0x51befa(_0x200c1[_0x1bd68b(0x178)]={},_0x200c1[_0x1bd68b(0x186)],_0x200c1[_0x1bd68b(0x170)],_0x200c1[_0x1bd68b(0x167)],_0x200c1[_0x1bd68b(0x1b3)],_0x200c1[_0x1bd68b(0x19e)]));}(this,function(_0x4773bf,_0x3ad14c,_0x44f04f,_0x327f9f,_0x33d629,_0x530390){const _0x1954c4=_0x3077;Object[_0x1954c4(0x171)](_0x4773bf,Symbol['toStringTag'],{'value':_0x1954c4(0x1ad)});var _0x405301=(_0x1e3517,_0x3f05dd)=>()=>(_0x3f05dd||_0x1e3517((_0x3f05dd={'exports':{}})[_0x1954c4(0x175)],_0x3f05dd),_0x3f05dd[_0x1954c4(0x175)]);let _0xc0b994=_0x1954c4(0x18e);Symbol(_0xc0b994);let _0x13b522={};var _0x157ab2=_0x1954c4(0x1a2),_0x59e422=_0x1954c4(0x19c),_0xd8a412=_0x405301((_0x4ff0e9,_0x4b71ab)=>{_0x4b71ab['exports']=function(){const _0x3c010b=_0x3077;throw Error(_0x3c010b(0x17a));};})();function _0x2d9674(_0x1a34de,_0x6974e8){return function(_0x545a92,_0x23d1c7){_0x6974e8(_0x545a92,_0x23d1c7,_0x1a34de);};}function _0x1d5965(_0x12e056,_0x487422,_0x39ea06,_0x2886ea){const _0x3e6ae8=_0x1954c4;var _0x3a0ac8=arguments[_0x3e6ae8(0x181)],_0x58129e=_0x3a0ac8<0x3?_0x487422:_0x2886ea===null?_0x2886ea=Object['getOwnPropertyDescriptor'](_0x487422,_0x39ea06):_0x2886ea,_0x4026fe;if(typeof Reflect=='object'&&typeof Reflect['decorate']=='function')_0x58129e=Reflect[_0x3e6ae8(0x169)](_0x12e056,_0x487422,_0x39ea06,_0x2886ea);else{for(var _0x5cec26=_0x12e056[_0x3e6ae8(0x181)]-0x1;_0x5cec26>=0x0;_0x5cec26--)(_0x4026fe=_0x12e056[_0x5cec26])&&(_0x58129e=(_0x3a0ac8<0x3?_0x4026fe(_0x58129e):_0x3a0ac8>0x3?_0x4026fe(_0x487422,_0x39ea06,_0x58129e):_0x4026fe(_0x487422,_0x39ea06))||_0x58129e);}return _0x3a0ac8>0x3&&_0x58129e&&Object['defineProperty'](_0x487422,_0x39ea06,_0x58129e),_0x58129e;}let _0x2386b4=class extends _0x44f04f[_0x1954c4(0x187)]{constructor(_0x2441ce){super(),this['_configService']=_0x2441ce;}[_0x1954c4(0x17c)](_0x5155ad){const _0x1d6b75=_0x1954c4;var _0x1eeff1;let _0x532a78=((_0x1eeff1=this[_0x1d6b75(0x1b2)][_0x1d6b75(0x17b)](_0x3ad14c['COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY']))==null?void 0x0:_0x1eeff1[_0x1d6b75(0x174)])||{};try{let _0x2c7494=new _0xd8a412[(_0x1d6b75(0x1ae))](_0x5155ad,{'headers':{..._0x532a78}}),_0x284cb3=new _0x44f04f[(_0x1d6b75(0x183))]();return{'URL':_0x5155ad,'close':(_0x34d1f4,_0x40bd52)=>{const _0x1fbc3b=_0x1d6b75;_0x2c7494[_0x1fbc3b(0x1ab)](_0x34d1f4,_0x40bd52),_0x284cb3[_0x1fbc3b(0x1a3)]();},'send':_0x472c10=>{const _0x230037=_0x1d6b75;_0x2c7494[_0x230037(0x193)](_0x472c10);},'open$':new _0x33d629['Observable'](_0x4adab5=>{const _0x4f1500=_0x1d6b75;let _0x4fb718=_0x56dc50=>_0x4adab5[_0x4f1500(0x16f)](_0x56dc50);_0x2c7494[_0x4f1500(0x188)]('open',_0x4fb718),_0x284cb3[_0x4f1500(0x1a1)]((0x0,_0x44f04f[_0x4f1500(0x1a0)])(()=>_0x2c7494['removeEventListener']('open',_0x4fb718)));})[_0x1d6b75(0x17d)]((0x0,_0x33d629[_0x1d6b75(0x19d)])()),'close$':new _0x33d629[(_0x1d6b75(0x190))](_0x51367e=>{const _0x3e3df0=_0x1d6b75;let _0x284bd7=_0x12e220=>_0x51367e['next'](_0x12e220);_0x2c7494[_0x3e3df0(0x188)](_0x3e3df0(0x1ab),_0x284bd7),_0x284cb3['add']((0x0,_0x44f04f[_0x3e3df0(0x1a0)])(()=>_0x2c7494[_0x3e3df0(0x1af)]('close',_0x284bd7)));})[_0x1d6b75(0x17d)]((0x0,_0x33d629[_0x1d6b75(0x19d)])()),'error$':new _0x33d629[(_0x1d6b75(0x190))](_0x18d1c1=>{const _0x45ddf0=_0x1d6b75;let _0x3c10d5=_0x1cc463=>_0x18d1c1['next'](_0x1cc463);_0x2c7494[_0x45ddf0(0x188)]('error',_0x3c10d5),_0x284cb3[_0x45ddf0(0x1a1)]((0x0,_0x44f04f['toDisposable'])(()=>_0x2c7494[_0x45ddf0(0x1af)](_0x45ddf0(0x16a),_0x3c10d5)));})[_0x1d6b75(0x17d)]((0x0,_0x33d629[_0x1d6b75(0x19d)])()),'message$':new _0x33d629[(_0x1d6b75(0x190))](_0x1d3044=>{const _0x2b690c=_0x1d6b75;let _0x9931d8=_0x5b225f=>_0x1d3044[_0x2b690c(0x16f)](_0x5b225f);_0x2c7494[_0x2b690c(0x188)](_0x2b690c(0x196),_0x9931d8),_0x284cb3['add']((0x0,_0x44f04f[_0x2b690c(0x1a0)])(()=>_0x2c7494['removeEventListener'](_0x2b690c(0x196),_0x9931d8)));})[_0x1d6b75(0x17d)]((0x0,_0x33d629[_0x1d6b75(0x19d)])())};}catch(_0x2865ab){return console['error'](_0x2865ab),null;}}};_0x2386b4=_0x1d5965([_0x2d9674(0x0,_0x44f04f[_0x1954c4(0x1b1)])],_0x2386b4);function _0x3921df(_0x100f27){'@babel/helpers - typeof';const _0x1d8288=_0x1954c4;return _0x3921df=typeof Symbol==_0x1d8288(0x195)&&typeof Symbol[_0x1d8288(0x18c)]=='symbol'?function(_0x1b7d68){return typeof _0x1b7d68;}:function(_0x410781){const _0x5a71a3=_0x1d8288;return _0x410781&&typeof Symbol==_0x5a71a3(0x195)&&_0x410781[_0x5a71a3(0x179)]===Symbol&&_0x410781!==Symbol[_0x5a71a3(0x1a7)]?'symbol':typeof _0x410781;},_0x3921df(_0x100f27);}function _0x57a234(_0x13f68c,_0x17909f){const _0x3e34d6=_0x1954c4;if(_0x3921df(_0x13f68c)!=_0x3e34d6(0x194)||!_0x13f68c)return _0x13f68c;var _0xcfed16=_0x13f68c[Symbol[_0x3e34d6(0x18b)]];if(_0xcfed16!==void 0x0){var _0xb3456d=_0xcfed16[_0x3e34d6(0x18f)](_0x13f68c,_0x17909f||'default');if(_0x3921df(_0xb3456d)!=_0x3e34d6(0x194))return _0xb3456d;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x17909f===_0x3e34d6(0x197)?String:Number)(_0x13f68c);}function _0x540ad0(_0x354d3f){const _0x5cce27=_0x1954c4;var _0x2667b9=_0x57a234(_0x354d3f,_0x5cce27(0x197));return _0x3921df(_0x2667b9)=='symbol'?_0x2667b9:_0x2667b9+'';}function _0x286827(_0x3c9e25,_0x15ed36,_0x2c4066){const _0x7524fe=_0x1954c4;return(_0x15ed36=_0x540ad0(_0x15ed36))in _0x3c9e25?Object[_0x7524fe(0x171)](_0x3c9e25,_0x15ed36,{'value':_0x2c4066,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x3c9e25[_0x15ed36]=_0x2c4066,_0x3c9e25;}let _0x5c4ac2=class extends _0x44f04f[_0x1954c4(0x1ac)]{constructor(_0x564756=_0x13b522,_0x308cf9,_0x3d9f7b){const _0x1b395d=_0x1954c4;super(),this['_configService']=_0x308cf9,this[_0x1b395d(0x177)]=_0x3d9f7b,this[_0x1b395d(0x1b2)][_0x1b395d(0x1b6)](_0xc0b994,_0x564756);}[_0x1954c4(0x173)](){const _0x1403ad=_0x1954c4;this[_0x1403ad(0x198)]();}[_0x1954c4(0x198)](){const _0xd3bca=_0x1954c4;(0x0,_0x44f04f[_0xd3bca(0x1b5)])(this[_0xd3bca(0x177)],[[_0x327f9f[_0xd3bca(0x1b0)],{'useClass':_0x2386b4}]]);}};_0x286827(_0x5c4ac2,_0x1954c4(0x1a5),'UNIVER_COLLABORATION_CLIENT_NODE_PLUGIN'),_0x286827(_0x5c4ac2,_0x1954c4(0x18a),_0x157ab2),_0x286827(_0x5c4ac2,_0x1954c4(0x17f),_0x59e422),_0x5c4ac2=_0x1d5965([(0x0,_0x44f04f[_0x1954c4(0x192)])(_0x3ad14c[_0x1954c4(0x1a8)]),_0x2d9674(0x1,_0x44f04f[_0x1954c4(0x1b1)]),_0x2d9674(0x2,(0x0,_0x44f04f['Inject'])(_0x44f04f[_0x1954c4(0x16d)]))],_0x5c4ac2);let _0x45d57c=class extends _0x3ad14c[_0x1954c4(0x1a9)]{constructor(_0x208f33,_0x1b0d3b,_0x5429b8,_0x4e7032,_0x324cda){const _0x2cf032=_0x1954c4;super(_0x208f33,_0x1b0d3b,_0x5429b8,_0x4e7032,_0x324cda);let _0x497906=this[_0x2cf032(0x1b2)][_0x2cf032(0x17b)](_0x3ad14c['COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY']);this[_0x2cf032(0x172)][_0x2cf032(0x1a6)]({'interceptor':(_0x10409a,_0x3aeacb)=>{const _0x3b2951=_0x2cf032;let _0x13953a=_0x10409a[_0x3b2951(0x19b)];if(_0x497906!=null&&_0x497906[_0x3b2951(0x174)]){for(let _0x260e48 in _0x497906['customHeaders'])_0x13953a['set'](_0x260e48,_0x497906['customHeaders'][_0x260e48]);}return _0x3aeacb(_0x10409a);}});}async['createSocket'](_0x236544){const _0x330be3=_0x1954c4;return this[_0x330be3(0x18d)](_0x236544);}};_0x45d57c=_0x1d5965([_0x2d9674(0x0,(0x0,_0x44f04f[_0x1954c4(0x176)])(_0x44f04f[_0x1954c4(0x16d)])),_0x2d9674(0x1,(0x0,_0x44f04f[_0x1954c4(0x176)])(_0x327f9f[_0x1954c4(0x166)])),_0x2d9674(0x2,_0x44f04f[_0x1954c4(0x1b1)]),_0x2d9674(0x3,_0x44f04f[_0x1954c4(0x184)]),_0x2d9674(0x4,_0x530390[_0x1954c4(0x16e)])],_0x45d57c),_0x4773bf[_0x1954c4(0x19f)]=_0xc0b994,Object[_0x1954c4(0x171)](_0x4773bf,_0x1954c4(0x17e),{'enumerable':!0x0,'get':function(){return _0x45d57c;}}),Object[_0x1954c4(0x171)](_0x4773bf,'UniverCollaborationClientNodePlugin',{'enumerable':!0x0,'get':function(){return _0x5c4ac2;}});}));function _0x3077(_0x50605f,_0x4d8534){_0x50605f=_0x50605f-0x166;const _0x46f60f=_0x46f6();let _0x307703=_0x46f60f[_0x50605f];return _0x307703;}function _0x46f6(){const _0x18bed6=['getConfig','createSocket','pipe','NodeCollaborationSocketService','version','@univerjs/network','length','75KOnpRw','DisposableCollection','ILogService','83724ewNKQh','UniverProCollaborationClient','Disposable','addEventListener','93XAMfcY','packageName','toPrimitive','iterator','_doCreateSocket','collaboration-client-node.config','call','Observable','227136oGOACa','DependentOn','send','object','function','message','string','_registerDependencies','4576176FpYcto','2037465dNMwqQ','headers','0.21.0','share','UniverProCollaboration','COLLABORATION_CLIENT_NODE_CONFIG_KEY','toDisposable','add','@univerjs-pro/collaboration-client-node','dispose','9438730ifvgJh','pluginName','registerHTTPInterceptor','prototype','UniverCollaborationClientPlugin','CollaborationSocketService','@univerjs-pro/collaboration','close','Plugin','Module','WebSocket','removeEventListener','ISocketService','IConfigService','_configService','rxjs','231524cqtJgk','registerDependencies','setConfig','112sgHatw','HTTPService','UniverNetwork','@univerjs-pro/collaboration-client','decorate','error','8786imMUAZ','@univerjs/core','Injector','ISnapshotServerService','next','UniverCore','defineProperty','_httpService','onStarting','customHeaders','exports','Inject','_injector','UniverProCollaborationClientNode','constructor','ws\x20does\x20not\x20work\x20in\x20the\x20browser.\x20Browser\x20clients\x20must\x20use\x20the\x20native\x20WebSocket\x20object'];_0x46f6=function(){return _0x18bed6;};return _0x46f6();}
1
+ function _0x1810(_0x571867,_0x333871){_0x571867=_0x571867-0x119;const _0x3d080e=_0x3d08();let _0x1810cd=_0x3d080e[_0x571867];return _0x1810cd;}(function(_0x97767f,_0x331619){const _0x22eb88=_0x1810,_0x52bee7=_0x97767f();while(!![]){try{const _0x54dbf8=-parseInt(_0x22eb88(0x157))/0x1*(-parseInt(_0x22eb88(0x164))/0x2)+parseInt(_0x22eb88(0x132))/0x3+parseInt(_0x22eb88(0x124))/0x4*(parseInt(_0x22eb88(0x145))/0x5)+parseInt(_0x22eb88(0x128))/0x6+-parseInt(_0x22eb88(0x127))/0x7*(-parseInt(_0x22eb88(0x14f))/0x8)+parseInt(_0x22eb88(0x12b))/0x9*(-parseInt(_0x22eb88(0x15b))/0xa)+parseInt(_0x22eb88(0x12d))/0xb*(-parseInt(_0x22eb88(0x11a))/0xc);if(_0x54dbf8===_0x331619)break;else _0x52bee7['push'](_0x52bee7['shift']());}catch(_0x9f27b4){_0x52bee7['push'](_0x52bee7['shift']());}}}(_0x3d08,0xf205b),function(_0x4f878c,_0x352926){const _0x1b6691=_0x1810;typeof exports==_0x1b6691(0x14d)&&typeof module<'u'?_0x352926(exports,require(`@univerjs-pro/collaboration-client`),require(`@univerjs/core`),require(`@univerjs/network`),require(`rxjs`),require(`@univerjs-pro/collaboration`)):typeof define==_0x1b6691(0x120)&&define[_0x1b6691(0x15c)]?define([_0x1b6691(0x139),_0x1b6691(0x12e),_0x1b6691(0x141),'@univerjs/network',_0x1b6691(0x14c),'@univerjs-pro/collaboration'],_0x352926):(_0x4f878c=typeof globalThis<'u'?globalThis:_0x4f878c||self,_0x352926(_0x4f878c[_0x1b6691(0x126)]={},_0x4f878c['UniverProCollaborationClient'],_0x4f878c['UniverCore'],_0x4f878c[_0x1b6691(0x161)],_0x4f878c['rxjs'],_0x4f878c[_0x1b6691(0x130)]));}(this,function(_0x317361,_0x1b64af,_0x292451,_0x247a47,_0x1828b1,_0x8dd1fb){const _0x8f8549=_0x1810;Object[_0x8f8549(0x15f)](_0x317361,Symbol[_0x8f8549(0x13d)],{'value':_0x8f8549(0x13a)});var _0x5039c2=(_0x3e2c0a,_0x56662a)=>()=>(_0x56662a||(_0x3e2c0a((_0x56662a={'exports':{}})[_0x8f8549(0x139)],_0x56662a),_0x3e2c0a=null),_0x56662a[_0x8f8549(0x139)]);let _0x2f808a=_0x8f8549(0x11c);Symbol(_0x2f808a);let _0x33f385={};var _0xb34b46=_0x8f8549(0x138),_0x18c2fc=_0x8f8549(0x12a),_0x492710=_0x5039c2((_0xb5a5dc,_0x141006)=>{const _0x3b84e6=_0x8f8549;_0x141006[_0x3b84e6(0x139)]=function(){throw Error('ws\x20does\x20not\x20work\x20in\x20the\x20browser.\x20Browser\x20clients\x20must\x20use\x20the\x20native\x20WebSocket\x20object');};})();function _0x88f2e9(_0x5dca85,_0x36337c){return function(_0x1c6812,_0x55d43c){_0x36337c(_0x1c6812,_0x55d43c,_0x5dca85);};}function _0x520fc1(_0x404faf,_0x3ae859,_0x1e9d88,_0x432811){const _0x457bbe=_0x8f8549;var _0x43a28c=arguments['length'],_0x9861a1=_0x43a28c<0x3?_0x3ae859:_0x432811===null?_0x432811=Object[_0x457bbe(0x13e)](_0x3ae859,_0x1e9d88):_0x432811,_0x102f91;if(typeof Reflect=='object'&&typeof Reflect[_0x457bbe(0x12c)]==_0x457bbe(0x120))_0x9861a1=Reflect['decorate'](_0x404faf,_0x3ae859,_0x1e9d88,_0x432811);else{for(var _0x1e6688=_0x404faf[_0x457bbe(0x148)]-0x1;_0x1e6688>=0x0;_0x1e6688--)(_0x102f91=_0x404faf[_0x1e6688])&&(_0x9861a1=(_0x43a28c<0x3?_0x102f91(_0x9861a1):_0x43a28c>0x3?_0x102f91(_0x3ae859,_0x1e9d88,_0x9861a1):_0x102f91(_0x3ae859,_0x1e9d88))||_0x9861a1);}return _0x43a28c>0x3&&_0x9861a1&&Object[_0x457bbe(0x15f)](_0x3ae859,_0x1e9d88,_0x9861a1),_0x9861a1;}let _0x1bc040=class extends _0x292451[_0x8f8549(0x13c)]{constructor(_0x281826){super(),this['_configService']=_0x281826;}[_0x8f8549(0x142)](_0x42cc5d){const _0x17afa7=_0x8f8549;var _0x26843b;let _0x5c18c0=((_0x26843b=this[_0x17afa7(0x122)][_0x17afa7(0x143)](_0x1b64af['COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY']))==null?void 0x0:_0x26843b[_0x17afa7(0x147)])||{};try{let _0x3fbb4a=new _0x492710[(_0x17afa7(0x15d))](_0x42cc5d,{'headers':{..._0x5c18c0}}),_0x139cdf=new _0x292451[(_0x17afa7(0x163))]();return{'URL':_0x42cc5d,'close':(_0x570d8d,_0x272992)=>{const _0x46a7f3=_0x17afa7;_0x3fbb4a[_0x46a7f3(0x149)](_0x570d8d,_0x272992),_0x139cdf[_0x46a7f3(0x125)]();},'send':_0x1f29a7=>{const _0x1304c0=_0x17afa7;_0x3fbb4a[_0x1304c0(0x134)](_0x1f29a7);},'open$':new _0x1828b1['Observable'](_0x5b7783=>{const _0x4dfdfb=_0x17afa7;let _0x269b71=_0x8cf0c2=>_0x5b7783[_0x4dfdfb(0x14b)](_0x8cf0c2);_0x3fbb4a[_0x4dfdfb(0x146)](_0x4dfdfb(0x11d),_0x269b71),_0x139cdf[_0x4dfdfb(0x152)]((0x0,_0x292451['toDisposable'])(()=>_0x3fbb4a[_0x4dfdfb(0x129)](_0x4dfdfb(0x11d),_0x269b71)));})['pipe']((0x0,_0x1828b1[_0x17afa7(0x14e)])()),'close$':new _0x1828b1['Observable'](_0x321710=>{const _0xa0cf5d=_0x17afa7;let _0x503869=_0x4b0780=>_0x321710[_0xa0cf5d(0x14b)](_0x4b0780);_0x3fbb4a[_0xa0cf5d(0x146)](_0xa0cf5d(0x149),_0x503869),_0x139cdf[_0xa0cf5d(0x152)]((0x0,_0x292451[_0xa0cf5d(0x168)])(()=>_0x3fbb4a['removeEventListener'](_0xa0cf5d(0x149),_0x503869)));})[_0x17afa7(0x133)]((0x0,_0x1828b1[_0x17afa7(0x14e)])()),'error$':new _0x1828b1[(_0x17afa7(0x150))](_0x2a6383=>{const _0x479783=_0x17afa7;let _0x4b40f7=_0x56ad8a=>_0x2a6383[_0x479783(0x14b)](_0x56ad8a);_0x3fbb4a[_0x479783(0x146)](_0x479783(0x123),_0x4b40f7),_0x139cdf[_0x479783(0x152)]((0x0,_0x292451['toDisposable'])(()=>_0x3fbb4a[_0x479783(0x129)](_0x479783(0x123),_0x4b40f7)));})['pipe']((0x0,_0x1828b1[_0x17afa7(0x14e)])()),'message$':new _0x1828b1['Observable'](_0x13f670=>{const _0x536a03=_0x17afa7;let _0x328cd0=_0x2f756c=>_0x13f670[_0x536a03(0x14b)](_0x2f756c);_0x3fbb4a[_0x536a03(0x146)](_0x536a03(0x162),_0x328cd0),_0x139cdf[_0x536a03(0x152)]((0x0,_0x292451[_0x536a03(0x168)])(()=>_0x3fbb4a[_0x536a03(0x129)](_0x536a03(0x162),_0x328cd0)));})['pipe']((0x0,_0x1828b1[_0x17afa7(0x14e)])())};}catch(_0x289846){return console[_0x17afa7(0x123)](_0x289846),null;}}};_0x1bc040=_0x520fc1([_0x88f2e9(0x0,_0x292451[_0x8f8549(0x119)])],_0x1bc040);function _0x87e516(_0x2868d1){'@babel/helpers - typeof';const _0x5505f5=_0x8f8549;return _0x87e516=typeof Symbol==_0x5505f5(0x120)&&typeof Symbol[_0x5505f5(0x158)]==_0x5505f5(0x166)?function(_0x1cbe44){return typeof _0x1cbe44;}:function(_0x52d2df){const _0x1979a8=_0x5505f5;return _0x52d2df&&typeof Symbol=='function'&&_0x52d2df[_0x1979a8(0x160)]===Symbol&&_0x52d2df!==Symbol['prototype']?'symbol':typeof _0x52d2df;},_0x87e516(_0x2868d1);}function _0x46c5e3(_0x51d04e,_0x3843f1){const _0x21a1e7=_0x8f8549;if(_0x87e516(_0x51d04e)!='object'||!_0x51d04e)return _0x51d04e;var _0xb6e343=_0x51d04e[Symbol[_0x21a1e7(0x11e)]];if(_0xb6e343!==void 0x0){var _0x2fa060=_0xb6e343[_0x21a1e7(0x11f)](_0x51d04e,_0x3843f1||'default');if(_0x87e516(_0x2fa060)!='object')return _0x2fa060;throw TypeError(_0x21a1e7(0x165));}return(_0x3843f1===_0x21a1e7(0x159)?String:Number)(_0x51d04e);}function _0x1f8b16(_0x39b2f9){const _0x5ea6ce=_0x8f8549;var _0x4a01a4=_0x46c5e3(_0x39b2f9,_0x5ea6ce(0x159));return _0x87e516(_0x4a01a4)=='symbol'?_0x4a01a4:_0x4a01a4+'';}function _0x3db3c1(_0xa86214,_0x2551cd,_0x4a249d){const _0x3579fc=_0x8f8549;return(_0x2551cd=_0x1f8b16(_0x2551cd))in _0xa86214?Object[_0x3579fc(0x15f)](_0xa86214,_0x2551cd,{'value':_0x4a249d,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0xa86214[_0x2551cd]=_0x4a249d,_0xa86214;}let _0x143e35=class extends _0x292451['Plugin']{constructor(_0x234183=_0x33f385,_0x3cd8ba,_0x14735e){const _0x32c9ff=_0x8f8549;super(),this['_configService']=_0x3cd8ba,this[_0x32c9ff(0x135)]=_0x14735e,this[_0x32c9ff(0x122)][_0x32c9ff(0x167)](_0x2f808a,_0x234183);}[_0x8f8549(0x155)](){const _0x13dc89=_0x8f8549;this[_0x13dc89(0x144)]();}[_0x8f8549(0x144)](){const _0x57b527=_0x8f8549;(0x0,_0x292451[_0x57b527(0x131)])(this[_0x57b527(0x135)],[[_0x247a47[_0x57b527(0x11b)],{'useClass':_0x1bc040}]]);}};_0x3db3c1(_0x143e35,'pluginName',_0x8f8549(0x153)),_0x3db3c1(_0x143e35,'packageName',_0xb34b46),_0x3db3c1(_0x143e35,_0x8f8549(0x140),_0x18c2fc),_0x143e35=_0x520fc1([(0x0,_0x292451[_0x8f8549(0x15e)])(_0x1b64af['UniverCollaborationClientPlugin']),_0x88f2e9(0x1,_0x292451[_0x8f8549(0x119)]),_0x88f2e9(0x2,(0x0,_0x292451[_0x8f8549(0x121)])(_0x292451[_0x8f8549(0x12f)]))],_0x143e35);let _0xbe8deb=class extends _0x1b64af[_0x8f8549(0x13f)]{constructor(_0x1bbe0f,_0x3ee144,_0x2bfcb3,_0x100740,_0x2d3935){const _0x422a11=_0x8f8549;super(_0x1bbe0f,_0x3ee144,_0x2bfcb3,_0x100740,_0x2d3935);let _0xc9b65e=this['_configService'][_0x422a11(0x143)](_0x1b64af[_0x422a11(0x154)]);this['_httpService']['registerHTTPInterceptor']({'interceptor':(_0x3ede8c,_0xcff772)=>{const _0x37de1d=_0x422a11;let _0x482ebb=_0x3ede8c[_0x37de1d(0x151)];if(_0xc9b65e!=null&&_0xc9b65e['customHeaders']){for(let _0x225308 in _0xc9b65e[_0x37de1d(0x147)])_0x482ebb[_0x37de1d(0x13b)](_0x225308,_0xc9b65e[_0x37de1d(0x147)][_0x225308]);}return _0xcff772(_0x3ede8c);}});}async[_0x8f8549(0x142)](_0x3efa6f){return this['_doCreateSocket'](_0x3efa6f);}};_0xbe8deb=_0x520fc1([_0x88f2e9(0x0,(0x0,_0x292451[_0x8f8549(0x121)])(_0x292451[_0x8f8549(0x12f)])),_0x88f2e9(0x1,(0x0,_0x292451[_0x8f8549(0x121)])(_0x247a47[_0x8f8549(0x136)])),_0x88f2e9(0x2,_0x292451['IConfigService']),_0x88f2e9(0x3,_0x292451[_0x8f8549(0x137)]),_0x88f2e9(0x4,_0x8dd1fb[_0x8f8549(0x15a)])],_0xbe8deb),_0x317361[_0x8f8549(0x169)]=_0x2f808a,Object[_0x8f8549(0x15f)](_0x317361,_0x8f8549(0x14a),{'enumerable':!0x0,'get':function(){return _0xbe8deb;}}),Object['defineProperty'](_0x317361,_0x8f8549(0x156),{'enumerable':!0x0,'get':function(){return _0x143e35;}});}));function _0x3d08(){const _0x310403=['registerDependencies','4989486yvekvB','pipe','send','_injector','HTTPService','ILogService','@univerjs-pro/collaboration-client-node','exports','Module','set','Disposable','toStringTag','getOwnPropertyDescriptor','CollaborationSocketService','version','@univerjs/core','createSocket','getConfig','_registerDependencies','167495vZJjXq','addEventListener','customHeaders','length','close','NodeCollaborationSocketService','next','rxjs','object','share','13332552aJpkyW','Observable','headers','add','UNIVER_COLLABORATION_CLIENT_NODE_PLUGIN','COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY','onStarting','UniverCollaborationClientNodePlugin','7XozLoE','iterator','string','ISnapshotServerService','5045650FlePru','amd','WebSocket','DependentOn','defineProperty','constructor','UniverNetwork','message','DisposableCollection','136874zRLCuC','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','symbol','setConfig','toDisposable','COLLABORATION_CLIENT_NODE_CONFIG_KEY','IConfigService','96CpnbeT','ISocketService','collaboration-client-node.config','open','toPrimitive','call','function','Inject','_configService','error','164EwWYUg','dispose','UniverProCollaborationClientNode','7kEXTLF','11790570mHvNQM','removeEventListener','0.21.1-insiders.20260509-bf98cad','9rwteLz','decorate','7770752wzWHuz','@univerjs-pro/collaboration-client','Injector','UniverProCollaboration'];_0x3d08=function(){return _0x310403;};return _0x3d08();}
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@univerjs-pro/collaboration-client-node",
3
- "version": "0.21.0",
3
+ "version": "0.21.1-insiders.20260509-bf98cad",
4
4
  "private": false,
5
- "description": "",
6
- "author": "DreamNum <developer@univer.ai>",
5
+ "description": "Node.js collaboration client plugin for Univer Pro.",
6
+ "author": "DreamNum Co., Ltd. <developer@univer.ai>",
7
7
  "funding": {
8
8
  "type": "opencollective",
9
9
  "url": "https://opencollective.com/univer"
@@ -16,7 +16,13 @@
16
16
  "bugs": {
17
17
  "url": "https://github.com/dream-num/univer/issues"
18
18
  },
19
- "keywords": [],
19
+ "keywords": [
20
+ "univer",
21
+ "univer-pro",
22
+ "collaboration",
23
+ "nodejs",
24
+ "client"
25
+ ],
20
26
  "exports": {
21
27
  ".": {
22
28
  "import": "./lib/es/index.js",
@@ -46,17 +52,17 @@
46
52
  },
47
53
  "dependencies": {
48
54
  "ws": "8.20.0",
49
- "@univerjs-pro/collaboration-client": "0.21.0",
50
- "@univerjs-pro/collaboration": "0.21.0",
51
- "@univerjs/core": "0.21.0",
52
- "@univerjs/network": "0.21.0"
55
+ "@univerjs-pro/collaboration": "0.21.1-insiders.20260509-bf98cad",
56
+ "@univerjs/network": "0.21.1-insiders.20260509-bf98cad",
57
+ "@univerjs-pro/collaboration-client": "0.21.1-insiders.20260509-bf98cad",
58
+ "@univerjs/core": "0.21.1-insiders.20260509-bf98cad"
53
59
  },
54
60
  "devDependencies": {
55
61
  "@types/ws": "8.18.1",
56
62
  "rxjs": "7.8.2",
57
63
  "typescript": "^6.0.3",
58
64
  "vitest": "^4.1.4",
59
- "@univerjs-infra/shared": "0.21.0"
65
+ "@univerjs-infra/shared": "0.21.1"
60
66
  },
61
67
  "scripts": {
62
68
  "test": "vitest run",