@univerjs-pro/collaboration-client-node 0.21.0 → 0.21.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +6 -6
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 _0xbacc9c=_0x2944;(function(_0x28092f,_0x4ff11a){const _0x1005b7=_0x2944,_0x37d692=_0x28092f();while(!![]){try{const _0x3683a6=parseInt(_0x1005b7(0x84))/0x1*(-parseInt(_0x1005b7(0xa8))/0x2)+parseInt(_0x1005b7(0xa4))/0x3+parseInt(_0x1005b7(0xb4))/0x4*(-parseInt(_0x1005b7(0x7e))/0x5)+-parseInt(_0x1005b7(0xb1))/0x6+parseInt(_0x1005b7(0xac))/0x7*(parseInt(_0x1005b7(0x89))/0x8)+parseInt(_0x1005b7(0xb8))/0x9+parseInt(_0x1005b7(0x8c))/0xa;if(_0x3683a6===_0x4ff11a)break;else _0x37d692['push'](_0x37d692['shift']());}catch(_0x584736){_0x37d692['push'](_0x37d692['shift']());}}}(_0x133a,0xbef4d),Object[_0xbacc9c(0x81)](exports,Symbol[_0xbacc9c(0x7b)],{'value':_0xbacc9c(0xa2)}));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=_0xbacc9c(0x90),configSymbol=Symbol(COLLABORATION_CLIENT_NODE_CONFIG_KEY),defaultPluginConfig={};var name=_0xbacc9c(0xb3),version=_0xbacc9c(0x8e);function __decorateParam(_0x26aeeb,_0x4d5e4f){return function(_0x28e5a7,_0x271a5b){_0x4d5e4f(_0x28e5a7,_0x271a5b,_0x26aeeb);};}function _0x2944(_0x1d15b7,_0x1feffa){_0x1d15b7=_0x1d15b7-0x7a;const _0x133adc=_0x133a();let _0x29440e=_0x133adc[_0x1d15b7];return _0x29440e;}function __decorate(_0x32d15d,_0x2a4c61,_0x253907,_0x325a3b){const _0x2ac987=_0xbacc9c;var _0x21bee8=arguments[_0x2ac987(0x96)],_0x443371=_0x21bee8<0x3?_0x2a4c61:_0x325a3b===null?_0x325a3b=Object[_0x2ac987(0x87)](_0x2a4c61,_0x253907):_0x325a3b,_0x5e05a8;if(typeof Reflect==='object'&&typeof Reflect[_0x2ac987(0x91)]===_0x2ac987(0xbf))_0x443371=Reflect[_0x2ac987(0x91)](_0x32d15d,_0x2a4c61,_0x253907,_0x325a3b);else{for(var _0x4d1049=_0x32d15d['length']-0x1;_0x4d1049>=0x0;_0x4d1049--)if(_0x5e05a8=_0x32d15d[_0x4d1049])_0x443371=(_0x21bee8<0x3?_0x5e05a8(_0x443371):_0x21bee8>0x3?_0x5e05a8(_0x2a4c61,_0x253907,_0x443371):_0x5e05a8(_0x2a4c61,_0x253907))||_0x443371;}return _0x21bee8>0x3&&_0x443371&&Object[_0x2ac987(0x81)](_0x2a4c61,_0x253907,_0x443371),_0x443371;}let NodeWebSocketService=class NodeWebSocketService extends _univerjs_core[_0xbacc9c(0xc3)]{constructor(_0x1c617d){const _0x1ef332=_0xbacc9c;super(),this[_0x1ef332(0x8b)]=_0x1c617d;}[_0xbacc9c(0xab)](_0xab7147){const _0x50c9d7=_0xbacc9c;var _0xb77d8b;const _0x1e7e9e=((_0xb77d8b=this[_0x50c9d7(0x8b)]['getConfig'](_univerjs_pro_collaboration_client[_0x50c9d7(0xbd)]))===null||_0xb77d8b===void 0x0?void 0x0:_0xb77d8b[_0x50c9d7(0xb6)])||{};try{const _0x5978de=new ws[(_0x50c9d7(0xbc))](_0xab7147,{'headers':{..._0x1e7e9e}}),_0x19b272=new _univerjs_core[(_0x50c9d7(0x9a))]();return{'URL':_0xab7147,'close':(_0x51c38e,_0x42a951)=>{const _0x5cf40e=_0x50c9d7;_0x5978de[_0x5cf40e(0xb9)](_0x51c38e,_0x42a951),_0x19b272[_0x5cf40e(0x85)]();},'send':_0x33091a=>{const _0x4b060e=_0x50c9d7;_0x5978de[_0x4b060e(0x8f)](_0x33091a);},'open$':new rxjs[(_0x50c9d7(0x9f))](_0x296e3f=>{const _0x27502d=_0x50c9d7,_0x446f96=_0x5b60e0=>_0x296e3f[_0x27502d(0xae)](_0x5b60e0);_0x5978de[_0x27502d(0x7f)](_0x27502d(0x7a),_0x446f96),_0x19b272['add']((0x0,_univerjs_core[_0x27502d(0x7d)])(()=>_0x5978de['removeEventListener']('open',_0x446f96)));})[_0x50c9d7(0x8d)]((0x0,rxjs[_0x50c9d7(0xbb)])()),'close$':new rxjs[(_0x50c9d7(0x9f))](_0x22c406=>{const _0x5efac4=_0x50c9d7,_0x350260=_0x3a16d5=>_0x22c406[_0x5efac4(0xae)](_0x3a16d5);_0x5978de[_0x5efac4(0x7f)]('close',_0x350260),_0x19b272[_0x5efac4(0xa5)]((0x0,_univerjs_core['toDisposable'])(()=>_0x5978de['removeEventListener'](_0x5efac4(0xb9),_0x350260)));})[_0x50c9d7(0x8d)]((0x0,rxjs['share'])()),'error$':new rxjs[(_0x50c9d7(0x9f))](_0xcc3713=>{const _0x4463a2=_0x50c9d7,_0x424d56=_0x3e2916=>_0xcc3713[_0x4463a2(0xae)](_0x3e2916);_0x5978de[_0x4463a2(0x7f)](_0x4463a2(0xb0),_0x424d56),_0x19b272[_0x4463a2(0xa5)]((0x0,_univerjs_core[_0x4463a2(0x7d)])(()=>_0x5978de['removeEventListener'](_0x4463a2(0xb0),_0x424d56)));})[_0x50c9d7(0x8d)]((0x0,rxjs[_0x50c9d7(0xbb)])()),'message$':new rxjs[(_0x50c9d7(0x9f))](_0xb51679=>{const _0x4f7a22=_0x50c9d7,_0x15070a=_0x2c1304=>_0xb51679[_0x4f7a22(0xae)](_0x2c1304);_0x5978de['addEventListener'](_0x4f7a22(0x7c),_0x15070a),_0x19b272['add']((0x0,_univerjs_core[_0x4f7a22(0x7d)])(()=>_0x5978de[_0x4f7a22(0xa3)]('message',_0x15070a)));})['pipe']((0x0,rxjs[_0x50c9d7(0xbb)])())};}catch(_0x10be02){return console['error'](_0x10be02),null;}}};NodeWebSocketService=__decorate([__decorateParam(0x0,_univerjs_core['IConfigService'])],NodeWebSocketService);function _typeof(_0x4573a1){'@babel/helpers - typeof';const _0x469be0=_0xbacc9c;return _typeof='function'==typeof Symbol&&_0x469be0(0x9d)==typeof Symbol[_0x469be0(0x88)]?function(_0x44986d){return typeof _0x44986d;}:function(_0x2b26d8){const _0x1236d0=_0x469be0;return _0x2b26d8&&'function'==typeof Symbol&&_0x2b26d8[_0x1236d0(0xa0)]===Symbol&&_0x2b26d8!==Symbol[_0x1236d0(0x99)]?_0x1236d0(0x9d):typeof _0x2b26d8;},_typeof(_0x4573a1);}function toPrimitive(_0x4440eb,_0x555771){const _0x36abde=_0xbacc9c;if(_0x36abde(0xa9)!=_typeof(_0x4440eb)||!_0x4440eb)return _0x4440eb;var _0x2ea076=_0x4440eb[Symbol['toPrimitive']];if(void 0x0!==_0x2ea076){var _0x3c0c38=_0x2ea076[_0x36abde(0xa1)](_0x4440eb,_0x555771||_0x36abde(0x83));if(_0x36abde(0xa9)!=_typeof(_0x3c0c38))return _0x3c0c38;throw new TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x36abde(0xaf)===_0x555771?String:Number)(_0x4440eb);}function toPropertyKey(_0x1922d9){const _0x5637d9=_0xbacc9c;var _0x34d2bd=toPrimitive(_0x1922d9,_0x5637d9(0xaf));return _0x5637d9(0x9d)==_typeof(_0x34d2bd)?_0x34d2bd:_0x34d2bd+'';}function _defineProperty(_0x1f34c0,_0x4095d9,_0x7f9068){const _0x4e27d0=_0xbacc9c;return(_0x4095d9=toPropertyKey(_0x4095d9))in _0x1f34c0?Object[_0x4e27d0(0x81)](_0x1f34c0,_0x4095d9,{'value':_0x7f9068,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x1f34c0[_0x4095d9]=_0x7f9068,_0x1f34c0;}let UniverCollaborationClientNodePlugin=class UniverCollaborationClientNodePlugin extends _univerjs_core[_0xbacc9c(0xb5)]{constructor(_0x2026f8=defaultPluginConfig,_0x4f761e,_0x1ff548){const _0x1e224a=_0xbacc9c;super(),this['_configService']=_0x4f761e,this[_0x1e224a(0x92)]=_0x1ff548,this['_configService'][_0x1e224a(0x9b)](COLLABORATION_CLIENT_NODE_CONFIG_KEY,_0x2026f8);}[_0xbacc9c(0x82)](){this['_registerDependencies']();}[_0xbacc9c(0x98)](){(0x0,_univerjs_core['registerDependencies'])(this['_injector'],[[_univerjs_network['ISocketService'],{'useClass':NodeWebSocketService}]]);}};_defineProperty(UniverCollaborationClientNodePlugin,_0xbacc9c(0xc2),_0xbacc9c(0x8a)),_defineProperty(UniverCollaborationClientNodePlugin,_0xbacc9c(0xb2),name),_defineProperty(UniverCollaborationClientNodePlugin,_0xbacc9c(0x80),version),UniverCollaborationClientNodePlugin=__decorate([(0x0,_univerjs_core[_0xbacc9c(0xc4)])(_univerjs_pro_collaboration_client[_0xbacc9c(0x93)]),__decorateParam(0x1,_univerjs_core[_0xbacc9c(0x97)]),__decorateParam(0x2,(0x0,_univerjs_core[_0xbacc9c(0xa6)])(_univerjs_core[_0xbacc9c(0x95)]))],UniverCollaborationClientNodePlugin);let NodeCollaborationSocketService=class NodeCollaborationSocketService extends _univerjs_pro_collaboration_client[_0xbacc9c(0x86)]{constructor(_0x871437,_0x402506,_0xcda330,_0x41129f,_0x57d007){const _0x4de9f6=_0xbacc9c;super(_0x871437,_0x402506,_0xcda330,_0x41129f,_0x57d007);const _0x5e1cf9=this[_0x4de9f6(0x8b)][_0x4de9f6(0xbe)](_univerjs_pro_collaboration_client[_0x4de9f6(0xbd)]);this[_0x4de9f6(0xa7)]['registerHTTPInterceptor']({'interceptor':(_0x3dbb72,_0x25dde8)=>{const _0xeac0f5=_0x4de9f6,_0x2adfa6=_0x3dbb72[_0xeac0f5(0xad)];if(_0x5e1cf9===null||_0x5e1cf9===void 0x0?void 0x0:_0x5e1cf9[_0xeac0f5(0xb6)]){for(const _0x4f7e90 in _0x5e1cf9[_0xeac0f5(0xb6)])_0x2adfa6[_0xeac0f5(0xaa)](_0x4f7e90,_0x5e1cf9[_0xeac0f5(0xb6)][_0x4f7e90]);}return _0x25dde8(_0x3dbb72);}});}async[_0xbacc9c(0xab)](_0x2a1e3a){const _0x2442ff=_0xbacc9c;return this[_0x2442ff(0xba)](_0x2a1e3a);}};function _0x133a(){const _0x58b922=['1644249BuXHlP','add','Inject','_httpService','2188LjpvfU','object','set','createSocket','14mCUUPC','headers','next','string','error','8721066pEdVCA','packageName','@univerjs-pro/collaboration-client-node','4928964qsAOuA','Plugin','customHeaders','HTTPService','172170neHWKh','close','_doCreateSocket','share','WebSocket','COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY','getConfig','function','NodeCollaborationSocketService','ILogService','pluginName','Disposable','DependentOn','open','toStringTag','message','toDisposable','5ZpZDIS','addEventListener','version','defineProperty','onStarting','default','1424rcZOVc','dispose','CollaborationSocketService','getOwnPropertyDescriptor','iterator','5698312ZDwXoE','UNIVER_COLLABORATION_CLIENT_NODE_PLUGIN','_configService','30339740MZhUfX','pipe','0.21.1','send','collaboration-client-node.config','decorate','_injector','UniverCollaborationClientPlugin','ISnapshotServerService','Injector','length','IConfigService','_registerDependencies','prototype','DisposableCollection','setConfig','COLLABORATION_CLIENT_NODE_CONFIG_KEY','symbol','UniverCollaborationClientNodePlugin','Observable','constructor','call','Module','removeEventListener'];_0x133a=function(){return _0x58b922;};return _0x133a();}NodeCollaborationSocketService=__decorate([__decorateParam(0x0,(0x0,_univerjs_core[_0xbacc9c(0xa6)])(_univerjs_core[_0xbacc9c(0x95)])),__decorateParam(0x1,(0x0,_univerjs_core['Inject'])(_univerjs_network[_0xbacc9c(0xb7)])),__decorateParam(0x2,_univerjs_core[_0xbacc9c(0x97)]),__decorateParam(0x3,_univerjs_core[_0xbacc9c(0xc1)]),__decorateParam(0x4,_univerjs_pro_collaboration[_0xbacc9c(0x94)])],NodeCollaborationSocketService),exports[_0xbacc9c(0x9c)]=COLLABORATION_CLIENT_NODE_CONFIG_KEY,Object['defineProperty'](exports,_0xbacc9c(0xc0),{'enumerable':!![],'get':function(){return NodeCollaborationSocketService;}}),Object['defineProperty'](exports,_0xbacc9c(0x9e),{'enumerable':!![],'get':function(){return UniverCollaborationClientNodePlugin;}});
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const _0x2ef05f=_0x3c15;(function(_0x1a6c8f,_0x7d5baa){const _0x58d63b=_0x3c15,_0x4f5ac6=_0x1a6c8f();while(!![]){try{const _0x3bd602=parseInt(_0x58d63b(0x91))/0x1+-parseInt(_0x58d63b(0xb2))/0x2+-parseInt(_0x58d63b(0xad))/0x3+parseInt(_0x58d63b(0x9f))/0x4+-parseInt(_0x58d63b(0x8f))/0x5*(-parseInt(_0x58d63b(0x98))/0x6)+parseInt(_0x58d63b(0x8e))/0x7*(parseInt(_0x58d63b(0xb1))/0x8)+parseInt(_0x58d63b(0xb0))/0x9*(-parseInt(_0x58d63b(0x8a))/0xa);if(_0x3bd602===_0x7d5baa)break;else _0x4f5ac6['push'](_0x4f5ac6['shift']());}catch(_0x5ca2b2){_0x4f5ac6['push'](_0x4f5ac6['shift']());}}}(_0x11a9,0xb29b0));function _0x3c15(_0x2ac3d9,_0x58a041){_0x2ac3d9=_0x2ac3d9-0x88;const _0x11a9bf=_0x11a9();let _0x3c15a0=_0x11a9bf[_0x2ac3d9];return _0x3c15a0;}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=_0x2ef05f(0xb8),configSymbol=Symbol(COLLABORATION_CLIENT_NODE_CONFIG_KEY),defaultPluginConfig={};var name=_0x2ef05f(0xb9),version=_0x2ef05f(0x88);function __decorateParam(_0x3cedae,_0x4cf1fe){return function(_0x1619e3,_0x1af0ff){_0x4cf1fe(_0x1619e3,_0x1af0ff,_0x3cedae);};}function __decorate(_0x23c579,_0x20710d,_0x50ab79,_0x47bf24){const _0x14abb1=_0x2ef05f;var _0x66313e=arguments['length'],_0x1ea79d=_0x66313e<0x3?_0x20710d:_0x47bf24===null?_0x47bf24=Object[_0x14abb1(0x89)](_0x20710d,_0x50ab79):_0x47bf24,_0x23c984;if(typeof Reflect===_0x14abb1(0xac)&&typeof Reflect[_0x14abb1(0xb6)]===_0x14abb1(0xa5))_0x1ea79d=Reflect[_0x14abb1(0xb6)](_0x23c579,_0x20710d,_0x50ab79,_0x47bf24);else{for(var _0x116bd6=_0x23c579[_0x14abb1(0x8b)]-0x1;_0x116bd6>=0x0;_0x116bd6--)if(_0x23c984=_0x23c579[_0x116bd6])_0x1ea79d=(_0x66313e<0x3?_0x23c984(_0x1ea79d):_0x66313e>0x3?_0x23c984(_0x20710d,_0x50ab79,_0x1ea79d):_0x23c984(_0x20710d,_0x50ab79))||_0x1ea79d;}return _0x66313e>0x3&&_0x1ea79d&&Object[_0x14abb1(0xb5)](_0x20710d,_0x50ab79,_0x1ea79d),_0x1ea79d;}let NodeWebSocketService=class NodeWebSocketService extends Disposable{constructor(_0x1c2c1d){const _0x1618e5=_0x2ef05f;super(),this[_0x1618e5(0x9b)]=_0x1c2c1d;}[_0x2ef05f(0xa9)](_0x4ec572){const _0x117f0f=_0x2ef05f;var _0x44380e;const _0x4a0914=((_0x44380e=this['_configService'][_0x117f0f(0x8d)](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY))===null||_0x44380e===void 0x0?void 0x0:_0x44380e[_0x117f0f(0x92)])||{};try{const _0xfffb92=new WebSocket(_0x4ec572,{'headers':{..._0x4a0914}}),_0x1df3f8=new DisposableCollection();return{'URL':_0x4ec572,'close':(_0x8382da,_0x34a552)=>{const _0x31da5c=_0x117f0f;_0xfffb92[_0x31da5c(0x93)](_0x8382da,_0x34a552),_0x1df3f8[_0x31da5c(0x97)]();},'send':_0x61709e=>{const _0x4b8f55=_0x117f0f;_0xfffb92[_0x4b8f55(0xb3)](_0x61709e);},'open$':new Observable(_0x190204=>{const _0xeb312b=_0x117f0f,_0x53c5d3=_0x1da09b=>_0x190204[_0xeb312b(0xaa)](_0x1da09b);_0xfffb92[_0xeb312b(0x99)]('open',_0x53c5d3),_0x1df3f8[_0xeb312b(0xa8)](toDisposable(()=>_0xfffb92[_0xeb312b(0xa6)](_0xeb312b(0xa2),_0x53c5d3)));})[_0x117f0f(0x90)](share()),'close$':new Observable(_0x56cbf6=>{const _0x40ab45=_0x117f0f,_0x4abcb0=_0x5aa3b2=>_0x56cbf6[_0x40ab45(0xaa)](_0x5aa3b2);_0xfffb92['addEventListener'](_0x40ab45(0x93),_0x4abcb0),_0x1df3f8[_0x40ab45(0xa8)](toDisposable(()=>_0xfffb92[_0x40ab45(0xa6)](_0x40ab45(0x93),_0x4abcb0)));})['pipe'](share()),'error$':new Observable(_0x48e07c=>{const _0x34b722=_0x117f0f,_0x3b4030=_0x4f9b4e=>_0x48e07c[_0x34b722(0xaa)](_0x4f9b4e);_0xfffb92[_0x34b722(0x99)]('error',_0x3b4030),_0x1df3f8['add'](toDisposable(()=>_0xfffb92[_0x34b722(0xa6)](_0x34b722(0xa0),_0x3b4030)));})['pipe'](share()),'message$':new Observable(_0x54a060=>{const _0x2a0b09=_0x117f0f,_0x957564=_0x90cf1e=>_0x54a060['next'](_0x90cf1e);_0xfffb92['addEventListener']('message',_0x957564),_0x1df3f8['add'](toDisposable(()=>_0xfffb92[_0x2a0b09(0xa6)](_0x2a0b09(0x96),_0x957564)));})[_0x117f0f(0x90)](share())};}catch(_0x2490fd){return console[_0x117f0f(0xa0)](_0x2490fd),null;}}};NodeWebSocketService=__decorate([__decorateParam(0x0,IConfigService)],NodeWebSocketService);function _typeof(_0x4dfceb){'@babel/helpers - typeof';const _0x385baa=_0x2ef05f;return _typeof=_0x385baa(0xa5)==typeof Symbol&&_0x385baa(0x9d)==typeof Symbol[_0x385baa(0xb4)]?function(_0x50db84){return typeof _0x50db84;}:function(_0x88a684){const _0x520cf2=_0x385baa;return _0x88a684&&_0x520cf2(0xa5)==typeof Symbol&&_0x88a684[_0x520cf2(0x9c)]===Symbol&&_0x88a684!==Symbol[_0x520cf2(0xa1)]?_0x520cf2(0x9d):typeof _0x88a684;},_typeof(_0x4dfceb);}function _0x11a9(){const _0x3da42c=['close','UNIVER_COLLABORATION_CLIENT_NODE_PLUGIN','_httpService','message','dispose','3714uBjlxI','addEventListener','string','_configService','constructor','symbol','toPrimitive','3606812ZpdIkz','error','prototype','open','setConfig','_registerDependencies','function','removeEventListener','pluginName','add','createSocket','next','onStarting','object','514053VRXHOg','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','default','85311TsnGzR','29392QwkvBT','899656MnQzaI','send','iterator','defineProperty','decorate','packageName','collaboration-client-node.config','@univerjs-pro/collaboration-client-node','_injector','0.21.1','getOwnPropertyDescriptor','870EVUssz','length','registerHTTPInterceptor','getConfig','1778wyNIGt','180zTFrRz','pipe','320237nQKavi','customHeaders'];_0x11a9=function(){return _0x3da42c;};return _0x11a9();}function toPrimitive(_0x135352,_0x978aca){const _0x15f5b4=_0x2ef05f;if('object'!=_typeof(_0x135352)||!_0x135352)return _0x135352;var _0x31ddd1=_0x135352[Symbol[_0x15f5b4(0x9e)]];if(void 0x0!==_0x31ddd1){var _0x15d8b9=_0x31ddd1['call'](_0x135352,_0x978aca||_0x15f5b4(0xaf));if(_0x15f5b4(0xac)!=_typeof(_0x15d8b9))return _0x15d8b9;throw new TypeError(_0x15f5b4(0xae));}return(_0x15f5b4(0x9a)===_0x978aca?String:Number)(_0x135352);}function toPropertyKey(_0x5f48b0){const _0x10de9e=_0x2ef05f;var _0x174bba=toPrimitive(_0x5f48b0,'string');return _0x10de9e(0x9d)==_typeof(_0x174bba)?_0x174bba:_0x174bba+'';}function _defineProperty(_0x35bf16,_0x5beac9,_0x49e365){return(_0x5beac9=toPropertyKey(_0x5beac9))in _0x35bf16?Object['defineProperty'](_0x35bf16,_0x5beac9,{'value':_0x49e365,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x35bf16[_0x5beac9]=_0x49e365,_0x35bf16;}let UniverCollaborationClientNodePlugin=class UniverCollaborationClientNodePlugin extends Plugin{constructor(_0xcfa692=defaultPluginConfig,_0x3dc1f1,_0x249e25){const _0x326fce=_0x2ef05f;super(),this[_0x326fce(0x9b)]=_0x3dc1f1,this['_injector']=_0x249e25,this[_0x326fce(0x9b)][_0x326fce(0xa3)](COLLABORATION_CLIENT_NODE_CONFIG_KEY,_0xcfa692);}[_0x2ef05f(0xab)](){const _0x5092cb=_0x2ef05f;this[_0x5092cb(0xa4)]();}['_registerDependencies'](){const _0x429b16=_0x2ef05f;registerDependencies(this[_0x429b16(0xba)],[[ISocketService,{'useClass':NodeWebSocketService}]]);}};_defineProperty(UniverCollaborationClientNodePlugin,_0x2ef05f(0xa7),_0x2ef05f(0x94)),_defineProperty(UniverCollaborationClientNodePlugin,_0x2ef05f(0xb7),name),_defineProperty(UniverCollaborationClientNodePlugin,'version',version),UniverCollaborationClientNodePlugin=__decorate([DependentOn(UniverCollaborationClientPlugin),__decorateParam(0x1,IConfigService),__decorateParam(0x2,Inject(Injector))],UniverCollaborationClientNodePlugin);let NodeCollaborationSocketService=class NodeCollaborationSocketService extends CollaborationSocketService{constructor(_0x500b8e,_0x1e9378,_0x2399d0,_0x513f7f,_0x1ffe37){const _0x51e796=_0x2ef05f;super(_0x500b8e,_0x1e9378,_0x2399d0,_0x513f7f,_0x1ffe37);const _0x437cb2=this['_configService'][_0x51e796(0x8d)](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY);this[_0x51e796(0x95)][_0x51e796(0x8c)]({'interceptor':(_0x30a1cb,_0x785d55)=>{const _0xbe0627=_0x51e796,_0x4a96a6=_0x30a1cb['headers'];if(_0x437cb2===null||_0x437cb2===void 0x0?void 0x0:_0x437cb2['customHeaders']){for(const _0x37eb08 in _0x437cb2['customHeaders'])_0x4a96a6['set'](_0x37eb08,_0x437cb2[_0xbe0627(0x92)][_0x37eb08]);}return _0x785d55(_0x30a1cb);}});}async[_0x2ef05f(0xa9)](_0x156dd4){return this['_doCreateSocket'](_0x156dd4);}};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
|
-
|
|
1
|
+
const _0x2ef05f=_0x3c15;(function(_0x1a6c8f,_0x7d5baa){const _0x58d63b=_0x3c15,_0x4f5ac6=_0x1a6c8f();while(!![]){try{const _0x3bd602=parseInt(_0x58d63b(0x91))/0x1+-parseInt(_0x58d63b(0xb2))/0x2+-parseInt(_0x58d63b(0xad))/0x3+parseInt(_0x58d63b(0x9f))/0x4+-parseInt(_0x58d63b(0x8f))/0x5*(-parseInt(_0x58d63b(0x98))/0x6)+parseInt(_0x58d63b(0x8e))/0x7*(parseInt(_0x58d63b(0xb1))/0x8)+parseInt(_0x58d63b(0xb0))/0x9*(-parseInt(_0x58d63b(0x8a))/0xa);if(_0x3bd602===_0x7d5baa)break;else _0x4f5ac6['push'](_0x4f5ac6['shift']());}catch(_0x5ca2b2){_0x4f5ac6['push'](_0x4f5ac6['shift']());}}}(_0x11a9,0xb29b0));function _0x3c15(_0x2ac3d9,_0x58a041){_0x2ac3d9=_0x2ac3d9-0x88;const _0x11a9bf=_0x11a9();let _0x3c15a0=_0x11a9bf[_0x2ac3d9];return _0x3c15a0;}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=_0x2ef05f(0xb8),configSymbol=Symbol(COLLABORATION_CLIENT_NODE_CONFIG_KEY),defaultPluginConfig={};var name=_0x2ef05f(0xb9),version=_0x2ef05f(0x88);function __decorateParam(_0x3cedae,_0x4cf1fe){return function(_0x1619e3,_0x1af0ff){_0x4cf1fe(_0x1619e3,_0x1af0ff,_0x3cedae);};}function __decorate(_0x23c579,_0x20710d,_0x50ab79,_0x47bf24){const _0x14abb1=_0x2ef05f;var _0x66313e=arguments['length'],_0x1ea79d=_0x66313e<0x3?_0x20710d:_0x47bf24===null?_0x47bf24=Object[_0x14abb1(0x89)](_0x20710d,_0x50ab79):_0x47bf24,_0x23c984;if(typeof Reflect===_0x14abb1(0xac)&&typeof Reflect[_0x14abb1(0xb6)]===_0x14abb1(0xa5))_0x1ea79d=Reflect[_0x14abb1(0xb6)](_0x23c579,_0x20710d,_0x50ab79,_0x47bf24);else{for(var _0x116bd6=_0x23c579[_0x14abb1(0x8b)]-0x1;_0x116bd6>=0x0;_0x116bd6--)if(_0x23c984=_0x23c579[_0x116bd6])_0x1ea79d=(_0x66313e<0x3?_0x23c984(_0x1ea79d):_0x66313e>0x3?_0x23c984(_0x20710d,_0x50ab79,_0x1ea79d):_0x23c984(_0x20710d,_0x50ab79))||_0x1ea79d;}return _0x66313e>0x3&&_0x1ea79d&&Object[_0x14abb1(0xb5)](_0x20710d,_0x50ab79,_0x1ea79d),_0x1ea79d;}let NodeWebSocketService=class NodeWebSocketService extends Disposable{constructor(_0x1c2c1d){const _0x1618e5=_0x2ef05f;super(),this[_0x1618e5(0x9b)]=_0x1c2c1d;}[_0x2ef05f(0xa9)](_0x4ec572){const _0x117f0f=_0x2ef05f;var _0x44380e;const _0x4a0914=((_0x44380e=this['_configService'][_0x117f0f(0x8d)](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY))===null||_0x44380e===void 0x0?void 0x0:_0x44380e[_0x117f0f(0x92)])||{};try{const _0xfffb92=new WebSocket(_0x4ec572,{'headers':{..._0x4a0914}}),_0x1df3f8=new DisposableCollection();return{'URL':_0x4ec572,'close':(_0x8382da,_0x34a552)=>{const _0x31da5c=_0x117f0f;_0xfffb92[_0x31da5c(0x93)](_0x8382da,_0x34a552),_0x1df3f8[_0x31da5c(0x97)]();},'send':_0x61709e=>{const _0x4b8f55=_0x117f0f;_0xfffb92[_0x4b8f55(0xb3)](_0x61709e);},'open$':new Observable(_0x190204=>{const _0xeb312b=_0x117f0f,_0x53c5d3=_0x1da09b=>_0x190204[_0xeb312b(0xaa)](_0x1da09b);_0xfffb92[_0xeb312b(0x99)]('open',_0x53c5d3),_0x1df3f8[_0xeb312b(0xa8)](toDisposable(()=>_0xfffb92[_0xeb312b(0xa6)](_0xeb312b(0xa2),_0x53c5d3)));})[_0x117f0f(0x90)](share()),'close$':new Observable(_0x56cbf6=>{const _0x40ab45=_0x117f0f,_0x4abcb0=_0x5aa3b2=>_0x56cbf6[_0x40ab45(0xaa)](_0x5aa3b2);_0xfffb92['addEventListener'](_0x40ab45(0x93),_0x4abcb0),_0x1df3f8[_0x40ab45(0xa8)](toDisposable(()=>_0xfffb92[_0x40ab45(0xa6)](_0x40ab45(0x93),_0x4abcb0)));})['pipe'](share()),'error$':new Observable(_0x48e07c=>{const _0x34b722=_0x117f0f,_0x3b4030=_0x4f9b4e=>_0x48e07c[_0x34b722(0xaa)](_0x4f9b4e);_0xfffb92[_0x34b722(0x99)]('error',_0x3b4030),_0x1df3f8['add'](toDisposable(()=>_0xfffb92[_0x34b722(0xa6)](_0x34b722(0xa0),_0x3b4030)));})['pipe'](share()),'message$':new Observable(_0x54a060=>{const _0x2a0b09=_0x117f0f,_0x957564=_0x90cf1e=>_0x54a060['next'](_0x90cf1e);_0xfffb92['addEventListener']('message',_0x957564),_0x1df3f8['add'](toDisposable(()=>_0xfffb92[_0x2a0b09(0xa6)](_0x2a0b09(0x96),_0x957564)));})[_0x117f0f(0x90)](share())};}catch(_0x2490fd){return console[_0x117f0f(0xa0)](_0x2490fd),null;}}};NodeWebSocketService=__decorate([__decorateParam(0x0,IConfigService)],NodeWebSocketService);function _typeof(_0x4dfceb){'@babel/helpers - typeof';const _0x385baa=_0x2ef05f;return _typeof=_0x385baa(0xa5)==typeof Symbol&&_0x385baa(0x9d)==typeof Symbol[_0x385baa(0xb4)]?function(_0x50db84){return typeof _0x50db84;}:function(_0x88a684){const _0x520cf2=_0x385baa;return _0x88a684&&_0x520cf2(0xa5)==typeof Symbol&&_0x88a684[_0x520cf2(0x9c)]===Symbol&&_0x88a684!==Symbol[_0x520cf2(0xa1)]?_0x520cf2(0x9d):typeof _0x88a684;},_typeof(_0x4dfceb);}function _0x11a9(){const _0x3da42c=['close','UNIVER_COLLABORATION_CLIENT_NODE_PLUGIN','_httpService','message','dispose','3714uBjlxI','addEventListener','string','_configService','constructor','symbol','toPrimitive','3606812ZpdIkz','error','prototype','open','setConfig','_registerDependencies','function','removeEventListener','pluginName','add','createSocket','next','onStarting','object','514053VRXHOg','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','default','85311TsnGzR','29392QwkvBT','899656MnQzaI','send','iterator','defineProperty','decorate','packageName','collaboration-client-node.config','@univerjs-pro/collaboration-client-node','_injector','0.21.1','getOwnPropertyDescriptor','870EVUssz','length','registerHTTPInterceptor','getConfig','1778wyNIGt','180zTFrRz','pipe','320237nQKavi','customHeaders'];_0x11a9=function(){return _0x3da42c;};return _0x11a9();}function toPrimitive(_0x135352,_0x978aca){const _0x15f5b4=_0x2ef05f;if('object'!=_typeof(_0x135352)||!_0x135352)return _0x135352;var _0x31ddd1=_0x135352[Symbol[_0x15f5b4(0x9e)]];if(void 0x0!==_0x31ddd1){var _0x15d8b9=_0x31ddd1['call'](_0x135352,_0x978aca||_0x15f5b4(0xaf));if(_0x15f5b4(0xac)!=_typeof(_0x15d8b9))return _0x15d8b9;throw new TypeError(_0x15f5b4(0xae));}return(_0x15f5b4(0x9a)===_0x978aca?String:Number)(_0x135352);}function toPropertyKey(_0x5f48b0){const _0x10de9e=_0x2ef05f;var _0x174bba=toPrimitive(_0x5f48b0,'string');return _0x10de9e(0x9d)==_typeof(_0x174bba)?_0x174bba:_0x174bba+'';}function _defineProperty(_0x35bf16,_0x5beac9,_0x49e365){return(_0x5beac9=toPropertyKey(_0x5beac9))in _0x35bf16?Object['defineProperty'](_0x35bf16,_0x5beac9,{'value':_0x49e365,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x35bf16[_0x5beac9]=_0x49e365,_0x35bf16;}let UniverCollaborationClientNodePlugin=class UniverCollaborationClientNodePlugin extends Plugin{constructor(_0xcfa692=defaultPluginConfig,_0x3dc1f1,_0x249e25){const _0x326fce=_0x2ef05f;super(),this[_0x326fce(0x9b)]=_0x3dc1f1,this['_injector']=_0x249e25,this[_0x326fce(0x9b)][_0x326fce(0xa3)](COLLABORATION_CLIENT_NODE_CONFIG_KEY,_0xcfa692);}[_0x2ef05f(0xab)](){const _0x5092cb=_0x2ef05f;this[_0x5092cb(0xa4)]();}['_registerDependencies'](){const _0x429b16=_0x2ef05f;registerDependencies(this[_0x429b16(0xba)],[[ISocketService,{'useClass':NodeWebSocketService}]]);}};_defineProperty(UniverCollaborationClientNodePlugin,_0x2ef05f(0xa7),_0x2ef05f(0x94)),_defineProperty(UniverCollaborationClientNodePlugin,_0x2ef05f(0xb7),name),_defineProperty(UniverCollaborationClientNodePlugin,'version',version),UniverCollaborationClientNodePlugin=__decorate([DependentOn(UniverCollaborationClientPlugin),__decorateParam(0x1,IConfigService),__decorateParam(0x2,Inject(Injector))],UniverCollaborationClientNodePlugin);let NodeCollaborationSocketService=class NodeCollaborationSocketService extends CollaborationSocketService{constructor(_0x500b8e,_0x1e9378,_0x2399d0,_0x513f7f,_0x1ffe37){const _0x51e796=_0x2ef05f;super(_0x500b8e,_0x1e9378,_0x2399d0,_0x513f7f,_0x1ffe37);const _0x437cb2=this['_configService'][_0x51e796(0x8d)](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY);this[_0x51e796(0x95)][_0x51e796(0x8c)]({'interceptor':(_0x30a1cb,_0x785d55)=>{const _0xbe0627=_0x51e796,_0x4a96a6=_0x30a1cb['headers'];if(_0x437cb2===null||_0x437cb2===void 0x0?void 0x0:_0x437cb2['customHeaders']){for(const _0x37eb08 in _0x437cb2['customHeaders'])_0x4a96a6['set'](_0x37eb08,_0x437cb2[_0xbe0627(0x92)][_0x37eb08]);}return _0x785d55(_0x30a1cb);}});}async[_0x2ef05f(0xa9)](_0x156dd4){return this['_doCreateSocket'](_0x156dd4);}};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(_0x440d5d,_0x1d523e){const _0x3929f3=_0x1c12,_0x4e2f9e=_0x440d5d();while(!![]){try{const _0x120067=parseInt(_0x3929f3(0x214))/0x1+-parseInt(_0x3929f3(0x210))/0x2+parseInt(_0x3929f3(0x21b))/0x3*(parseInt(_0x3929f3(0x1fc))/0x4)+-parseInt(_0x3929f3(0x20b))/0x5*(-parseInt(_0x3929f3(0x21e))/0x6)+-parseInt(_0x3929f3(0x201))/0x7*(-parseInt(_0x3929f3(0x23b))/0x8)+-parseInt(_0x3929f3(0x1ff))/0x9*(parseInt(_0x3929f3(0x23a))/0xa)+parseInt(_0x3929f3(0x217))/0xb*(parseInt(_0x3929f3(0x21d))/0xc);if(_0x120067===_0x1d523e)break;else _0x4e2f9e['push'](_0x4e2f9e['shift']());}catch(_0x86863d){_0x4e2f9e['push'](_0x4e2f9e['shift']());}}}(_0x35de,0x92352),function(_0x4d4e81,_0x35feba){const _0x33540f=_0x1c12;typeof exports=='object'&&typeof module<'u'?_0x35feba(exports,require(`@univerjs-pro/collaboration-client`),require(`@univerjs/core`),require(`@univerjs/network`),require(`rxjs`),require(`@univerjs-pro/collaboration`)):typeof define=='function'&&define[_0x33540f(0x1f4)]?define([_0x33540f(0x235),'@univerjs-pro/collaboration-client','@univerjs/core',_0x33540f(0x20a),'rxjs',_0x33540f(0x208)],_0x35feba):(_0x4d4e81=typeof globalThis<'u'?globalThis:_0x4d4e81||self,_0x35feba(_0x4d4e81[_0x33540f(0x1fb)]={},_0x4d4e81['UniverProCollaborationClient'],_0x4d4e81[_0x33540f(0x200)],_0x4d4e81[_0x33540f(0x207)],_0x4d4e81[_0x33540f(0x225)],_0x4d4e81['UniverProCollaboration']));}(this,function(_0x5001c6,_0x3b919e,_0x1975b9,_0x3afbd0,_0x2e6d63,_0x375af6){const _0x4cf1f9=_0x1c12;Object[_0x4cf1f9(0x224)](_0x5001c6,Symbol['toStringTag'],{'value':_0x4cf1f9(0x23d)});var _0x5d0f93=(_0x546a99,_0x1a0564)=>()=>(_0x1a0564||_0x546a99((_0x1a0564={'exports':{}})[_0x4cf1f9(0x235)],_0x1a0564),_0x1a0564[_0x4cf1f9(0x235)]);let _0xa8bf80='collaboration-client-node.config';Symbol(_0xa8bf80);let _0xcadcc2={};var _0x50b20b=_0x4cf1f9(0x215),_0x40facc=_0x4cf1f9(0x227),_0x206abd=_0x5d0f93((_0x3bf612,_0x1ea551)=>{const _0x27e266=_0x4cf1f9;_0x1ea551[_0x27e266(0x235)]=function(){const _0x480975=_0x27e266;throw Error(_0x480975(0x233));};})();function _0x3094f3(_0x1e5e1e,_0x30ddcd){return function(_0x31c4f7,_0x3d1aa7){_0x30ddcd(_0x31c4f7,_0x3d1aa7,_0x1e5e1e);};}function _0xa110b5(_0x20d047,_0x5c6ae6,_0x10305d,_0x18102e){const _0x569978=_0x4cf1f9;var _0x13bae5=arguments[_0x569978(0x1f3)],_0x191a2b=_0x13bae5<0x3?_0x5c6ae6:_0x18102e===null?_0x18102e=Object[_0x569978(0x1fa)](_0x5c6ae6,_0x10305d):_0x18102e,_0x2ecbc1;if(typeof Reflect==_0x569978(0x241)&&typeof Reflect[_0x569978(0x1f6)]==_0x569978(0x221))_0x191a2b=Reflect[_0x569978(0x1f6)](_0x20d047,_0x5c6ae6,_0x10305d,_0x18102e);else{for(var _0x4445dc=_0x20d047['length']-0x1;_0x4445dc>=0x0;_0x4445dc--)(_0x2ecbc1=_0x20d047[_0x4445dc])&&(_0x191a2b=(_0x13bae5<0x3?_0x2ecbc1(_0x191a2b):_0x13bae5>0x3?_0x2ecbc1(_0x5c6ae6,_0x10305d,_0x191a2b):_0x2ecbc1(_0x5c6ae6,_0x10305d))||_0x191a2b);}return _0x13bae5>0x3&&_0x191a2b&&Object[_0x569978(0x224)](_0x5c6ae6,_0x10305d,_0x191a2b),_0x191a2b;}let _0x32043b=class extends _0x1975b9[_0x4cf1f9(0x21a)]{constructor(_0x25c2b6){super(),this['_configService']=_0x25c2b6;}['createSocket'](_0x2233ae){const _0x1ca0c3=_0x4cf1f9;var _0x5c5ef3;let _0x1ea10f=((_0x5c5ef3=this[_0x1ca0c3(0x23e)]['getConfig'](_0x3b919e[_0x1ca0c3(0x1f5)]))==null?void 0x0:_0x5c5ef3[_0x1ca0c3(0x205)])||{};try{let _0x37828c=new _0x206abd[(_0x1ca0c3(0x239))](_0x2233ae,{'headers':{..._0x1ea10f}}),_0x5cc97a=new _0x1975b9[(_0x1ca0c3(0x231))]();return{'URL':_0x2233ae,'close':(_0xb72bcb,_0x2e8b52)=>{const _0x209de3=_0x1ca0c3;_0x37828c[_0x209de3(0x230)](_0xb72bcb,_0x2e8b52),_0x5cc97a['dispose']();},'send':_0x21651c=>{const _0x1546c5=_0x1ca0c3;_0x37828c[_0x1546c5(0x22f)](_0x21651c);},'open$':new _0x2e6d63[(_0x1ca0c3(0x21f))](_0x4b41d9=>{const _0x312a90=_0x1ca0c3;let _0x26f2fa=_0x46cd4a=>_0x4b41d9['next'](_0x46cd4a);_0x37828c['addEventListener'](_0x312a90(0x228),_0x26f2fa),_0x5cc97a['add']((0x0,_0x1975b9[_0x312a90(0x21c)])(()=>_0x37828c[_0x312a90(0x23c)](_0x312a90(0x228),_0x26f2fa)));})[_0x1ca0c3(0x20e)]((0x0,_0x2e6d63[_0x1ca0c3(0x238)])()),'close$':new _0x2e6d63[(_0x1ca0c3(0x21f))](_0x12a4c1=>{const _0x3a6e4b=_0x1ca0c3;let _0x10b5a0=_0xa49f48=>_0x12a4c1[_0x3a6e4b(0x22a)](_0xa49f48);_0x37828c[_0x3a6e4b(0x1fe)](_0x3a6e4b(0x230),_0x10b5a0),_0x5cc97a[_0x3a6e4b(0x234)]((0x0,_0x1975b9[_0x3a6e4b(0x21c)])(()=>_0x37828c[_0x3a6e4b(0x23c)](_0x3a6e4b(0x230),_0x10b5a0)));})[_0x1ca0c3(0x20e)]((0x0,_0x2e6d63['share'])()),'error$':new _0x2e6d63[(_0x1ca0c3(0x21f))](_0x263e17=>{const _0x10fe8a=_0x1ca0c3;let _0x42d2b5=_0xd05164=>_0x263e17[_0x10fe8a(0x22a)](_0xd05164);_0x37828c[_0x10fe8a(0x1fe)]('error',_0x42d2b5),_0x5cc97a['add']((0x0,_0x1975b9[_0x10fe8a(0x21c)])(()=>_0x37828c[_0x10fe8a(0x23c)](_0x10fe8a(0x222),_0x42d2b5)));})['pipe']((0x0,_0x2e6d63['share'])()),'message$':new _0x2e6d63[(_0x1ca0c3(0x21f))](_0x4bba5f=>{const _0x2b8f71=_0x1ca0c3;let _0x82575c=_0x5b9318=>_0x4bba5f['next'](_0x5b9318);_0x37828c['addEventListener'](_0x2b8f71(0x22d),_0x82575c),_0x5cc97a[_0x2b8f71(0x234)]((0x0,_0x1975b9[_0x2b8f71(0x21c)])(()=>_0x37828c['removeEventListener'](_0x2b8f71(0x22d),_0x82575c)));})['pipe']((0x0,_0x2e6d63[_0x1ca0c3(0x238)])())};}catch(_0x43a50f){return console[_0x1ca0c3(0x222)](_0x43a50f),null;}}};_0x32043b=_0xa110b5([_0x3094f3(0x0,_0x1975b9['IConfigService'])],_0x32043b);function _0xbc9cc1(_0x102b66){'@babel/helpers - typeof';const _0x13bea7=_0x4cf1f9;return _0xbc9cc1=typeof Symbol==_0x13bea7(0x221)&&typeof Symbol[_0x13bea7(0x20d)]==_0x13bea7(0x237)?function(_0x5b4b89){return typeof _0x5b4b89;}:function(_0x44cbc8){const _0x279137=_0x13bea7;return _0x44cbc8&&typeof Symbol==_0x279137(0x221)&&_0x44cbc8[_0x279137(0x219)]===Symbol&&_0x44cbc8!==Symbol[_0x279137(0x202)]?'symbol':typeof _0x44cbc8;},_0xbc9cc1(_0x102b66);}function _0xe0dac4(_0x20f3a5,_0x2a791d){const _0xa51290=_0x4cf1f9;if(_0xbc9cc1(_0x20f3a5)!='object'||!_0x20f3a5)return _0x20f3a5;var _0x584ad7=_0x20f3a5[Symbol[_0xa51290(0x223)]];if(_0x584ad7!==void 0x0){var _0x455131=_0x584ad7[_0xa51290(0x232)](_0x20f3a5,_0x2a791d||'default');if(_0xbc9cc1(_0x455131)!=_0xa51290(0x241))return _0x455131;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x2a791d==='string'?String:Number)(_0x20f3a5);}function _0x1fc0a6(_0x2c0edf){const _0xda71d1=_0x4cf1f9;var _0x445c61=_0xe0dac4(_0x2c0edf,_0xda71d1(0x211));return _0xbc9cc1(_0x445c61)==_0xda71d1(0x237)?_0x445c61:_0x445c61+'';}function _0x2cfa03(_0xfc1343,_0x425b61,_0x375e2e){const _0x42e933=_0x4cf1f9;return(_0x425b61=_0x1fc0a6(_0x425b61))in _0xfc1343?Object[_0x42e933(0x224)](_0xfc1343,_0x425b61,{'value':_0x375e2e,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0xfc1343[_0x425b61]=_0x375e2e,_0xfc1343;}let _0x41f03b=class extends _0x1975b9[_0x4cf1f9(0x203)]{constructor(_0x19a3bc=_0xcadcc2,_0x1b5de4,_0x3042e9){const _0x3d33a3=_0x4cf1f9;super(),this['_configService']=_0x1b5de4,this[_0x3d33a3(0x1f2)]=_0x3042e9,this['_configService'][_0x3d33a3(0x22e)](_0xa8bf80,_0x19a3bc);}[_0x4cf1f9(0x204)](){const _0x1d2544=_0x4cf1f9;this[_0x1d2544(0x229)]();}[_0x4cf1f9(0x229)](){const _0x513e85=_0x4cf1f9;(0x0,_0x1975b9[_0x513e85(0x1fd)])(this[_0x513e85(0x1f2)],[[_0x3afbd0[_0x513e85(0x240)],{'useClass':_0x32043b}]]);}};_0x2cfa03(_0x41f03b,_0x4cf1f9(0x20c),'UNIVER_COLLABORATION_CLIENT_NODE_PLUGIN'),_0x2cfa03(_0x41f03b,'packageName',_0x50b20b),_0x2cfa03(_0x41f03b,_0x4cf1f9(0x1f8),_0x40facc),_0x41f03b=_0xa110b5([(0x0,_0x1975b9[_0x4cf1f9(0x1f7)])(_0x3b919e[_0x4cf1f9(0x23f)]),_0x3094f3(0x1,_0x1975b9[_0x4cf1f9(0x20f)]),_0x3094f3(0x2,(0x0,_0x1975b9['Inject'])(_0x1975b9[_0x4cf1f9(0x226)]))],_0x41f03b);let _0x51cfbe=class extends _0x3b919e[_0x4cf1f9(0x1f9)]{constructor(_0x13a94a,_0x31b0bb,_0x5a9885,_0x231f2e,_0x39635d){const _0x722343=_0x4cf1f9;super(_0x13a94a,_0x31b0bb,_0x5a9885,_0x231f2e,_0x39635d);let _0x2270be=this[_0x722343(0x23e)]['getConfig'](_0x3b919e['COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY']);this[_0x722343(0x209)][_0x722343(0x212)]({'interceptor':(_0x5c0b19,_0x2f084d)=>{const _0x5880bf=_0x722343;let _0x595b97=_0x5c0b19[_0x5880bf(0x216)];if(_0x2270be!=null&&_0x2270be[_0x5880bf(0x205)]){for(let _0x579a24 in _0x2270be[_0x5880bf(0x205)])_0x595b97[_0x5880bf(0x213)](_0x579a24,_0x2270be['customHeaders'][_0x579a24]);}return _0x2f084d(_0x5c0b19);}});}async[_0x4cf1f9(0x236)](_0x22f9d6){return this['_doCreateSocket'](_0x22f9d6);}};_0x51cfbe=_0xa110b5([_0x3094f3(0x0,(0x0,_0x1975b9[_0x4cf1f9(0x22c)])(_0x1975b9[_0x4cf1f9(0x226)])),_0x3094f3(0x1,(0x0,_0x1975b9['Inject'])(_0x3afbd0['HTTPService'])),_0x3094f3(0x2,_0x1975b9['IConfigService']),_0x3094f3(0x3,_0x1975b9[_0x4cf1f9(0x220)]),_0x3094f3(0x4,_0x375af6['ISnapshotServerService'])],_0x51cfbe),_0x5001c6[_0x4cf1f9(0x218)]=_0xa8bf80,Object['defineProperty'](_0x5001c6,_0x4cf1f9(0x22b),{'enumerable':!0x0,'get':function(){return _0x51cfbe;}}),Object[_0x4cf1f9(0x224)](_0x5001c6,_0x4cf1f9(0x206),{'enumerable':!0x0,'get':function(){return _0x41f03b;}});}));function _0x1c12(_0x20a7f5,_0x546718){_0x20a7f5=_0x20a7f5-0x1f2;const _0x35dea1=_0x35de();let _0x1c12ae=_0x35dea1[_0x20a7f5];return _0x1c12ae;}function _0x35de(){const _0x2f631f=['315vCMKtr','UniverCore','2639sScPMt','prototype','Plugin','onStarting','customHeaders','UniverCollaborationClientNodePlugin','UniverNetwork','@univerjs-pro/collaboration','_httpService','@univerjs/network','327095sKHiHu','pluginName','iterator','pipe','IConfigService','2100914VwRdXN','string','registerHTTPInterceptor','set','834308diUyFa','@univerjs-pro/collaboration-client-node','headers','539HemhVu','COLLABORATION_CLIENT_NODE_CONFIG_KEY','constructor','Disposable','6tqrbHC','toDisposable','60972YXxHjb','18utLSdQ','Observable','ILogService','function','error','toPrimitive','defineProperty','rxjs','Injector','0.21.1','open','_registerDependencies','next','NodeCollaborationSocketService','Inject','message','setConfig','send','close','DisposableCollection','call','ws\x20does\x20not\x20work\x20in\x20the\x20browser.\x20Browser\x20clients\x20must\x20use\x20the\x20native\x20WebSocket\x20object','add','exports','createSocket','symbol','share','WebSocket','231460knRZoo','11784IABqbn','removeEventListener','Module','_configService','UniverCollaborationClientPlugin','ISocketService','object','_injector','length','amd','COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY','decorate','DependentOn','version','CollaborationSocketService','getOwnPropertyDescriptor','UniverProCollaborationClientNode','1249156DSTXBS','registerDependencies','addEventListener'];_0x35de=function(){return _0x2f631f;};return _0x35de();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/collaboration-client-node",
|
|
3
|
-
"version": "0.21.
|
|
3
|
+
"version": "0.21.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -46,17 +46,17 @@
|
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"ws": "8.20.0",
|
|
49
|
-
"@univerjs-pro/collaboration
|
|
50
|
-
"@univerjs
|
|
51
|
-
"@univerjs/
|
|
52
|
-
"@univerjs/network": "0.21.
|
|
49
|
+
"@univerjs-pro/collaboration": "0.21.1",
|
|
50
|
+
"@univerjs/core": "0.21.1",
|
|
51
|
+
"@univerjs-pro/collaboration-client": "0.21.1",
|
|
52
|
+
"@univerjs/network": "0.21.1"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@types/ws": "8.18.1",
|
|
56
56
|
"rxjs": "7.8.2",
|
|
57
57
|
"typescript": "^6.0.3",
|
|
58
58
|
"vitest": "^4.1.4",
|
|
59
|
-
"@univerjs-infra/shared": "0.21.
|
|
59
|
+
"@univerjs-infra/shared": "0.21.1"
|
|
60
60
|
},
|
|
61
61
|
"scripts": {
|
|
62
62
|
"test": "vitest run",
|