@univerjs-pro/collaboration-client-node 1.0.0-alpha.2 → 1.0.0-alpha.3

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,9 +1,10 @@
1
1
  # @univerjs-pro/collaboration-client-node
2
2
 
3
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
+ [![license](https://img.shields.io/npm/l/@univerjs-pro/collaboration-client-node?style=flat-square)](https://npmjs.com/package/@univerjs-pro/collaboration-client-node)
4
5
  [![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
6
 
6
- `@univerjs-pro/collaboration-client-node` provides node.js collaboration client plugin for Univer Pro.
7
+ `@univerjs-pro/collaboration-client-node` is part of Univer Pro. Node.js collaboration client plugin for Univer Pro.
7
8
 
8
9
  ## Package Overview
9
10
 
@@ -29,8 +30,11 @@ import { UniverCollaborationClientNodePlugin } from '@univerjs-pro/collaboration
29
30
  univer.registerPlugin(UniverCollaborationClientNodePlugin);
30
31
  ```
31
32
 
33
+ ## Integration Notes
34
+
35
+ - Keep this package on the same version as the other `@univerjs/*` and `@univerjs-pro/*` packages in your application.
36
+
32
37
  ## Resources
33
38
 
34
39
  - [Documentation](https://docs.univer.ai/guides/pro)
35
40
  - [NPM package](https://npmjs.com/package/@univerjs-pro/collaboration-client-node)
36
-
package/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- const _0x1d3bd5=_0x1501;(function(_0xf1e57c,_0x29e850){const _0x55d5ec=_0x1501,_0x452b55=_0xf1e57c();while(!![]){try{const _0x27b127=parseInt(_0x55d5ec(0x1e3))/0x1*(-parseInt(_0x55d5ec(0x1f5))/0x2)+parseInt(_0x55d5ec(0x1d0))/0x3+parseInt(_0x55d5ec(0x20d))/0x4*(-parseInt(_0x55d5ec(0x1fc))/0x5)+-parseInt(_0x55d5ec(0x1e6))/0x6*(parseInt(_0x55d5ec(0x210))/0x7)+-parseInt(_0x55d5ec(0x211))/0x8+parseInt(_0x55d5ec(0x205))/0x9+parseInt(_0x55d5ec(0x20a))/0xa;if(_0x27b127===_0x29e850)break;else _0x452b55['push'](_0x452b55['shift']());}catch(_0x2c1d87){_0x452b55['push'](_0x452b55['shift']());}}}(_0x2408,0x19c99),Object[_0x1d3bd5(0x1f6)](exports,Symbol[_0x1d3bd5(0x20b)],{'value':_0x1d3bd5(0x1e8)}));let e=require('@univerjs-pro/collaboration-client'),t=require('@univerjs/core'),n=require('@univerjs/network'),r=require('rxjs'),i=require('ws'),a=require('@univerjs-pro/collaboration');const o=_0x1d3bd5(0x207),s={};var c='@univerjs-pro/collaboration-client-node',l=_0x1d3bd5(0x1e0);function u(_0x5efd39,_0x4685d1){return function(_0x418640,_0x1e403b){_0x4685d1(_0x418640,_0x1e403b,_0x5efd39);};}function d(_0xd3a500,_0x528fbd,_0x352565,_0x36b663){const _0x7b065=_0x1d3bd5;var _0x45d8cf=arguments[_0x7b065(0x1d7)],_0xa02ab0=_0x45d8cf<0x3?_0x528fbd:_0x36b663===null?_0x36b663=Object[_0x7b065(0x1fb)](_0x528fbd,_0x352565):_0x36b663,_0x2eb424;if(typeof Reflect=='object'&&typeof Reflect[_0x7b065(0x1e5)]==_0x7b065(0x1fd))_0xa02ab0=Reflect[_0x7b065(0x1e5)](_0xd3a500,_0x528fbd,_0x352565,_0x36b663);else{for(var _0x23995a=_0xd3a500[_0x7b065(0x1d7)]-0x1;_0x23995a>=0x0;_0x23995a--)(_0x2eb424=_0xd3a500[_0x23995a])&&(_0xa02ab0=(_0x45d8cf<0x3?_0x2eb424(_0xa02ab0):_0x45d8cf>0x3?_0x2eb424(_0x528fbd,_0x352565,_0xa02ab0):_0x2eb424(_0x528fbd,_0x352565))||_0xa02ab0);}return _0x45d8cf>0x3&&_0xa02ab0&&Object['defineProperty'](_0x528fbd,_0x352565,_0xa02ab0),_0xa02ab0;}let f=class extends t[_0x1d3bd5(0x1de)]{constructor(_0x19d578){super(),this['_configService']=_0x19d578;}[_0x1d3bd5(0x1e2)](_0x2c5fc1){const _0x33a5e3=_0x1d3bd5;var _0x2211c0;let _0x4cbce8=((_0x2211c0=this['_configService'][_0x33a5e3(0x200)](e['COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY']))==null?void 0x0:_0x2211c0[_0x33a5e3(0x1dd)])||{};try{let _0x2da3e4=new i[(_0x33a5e3(0x1ed))](_0x2c5fc1,{'headers':{..._0x4cbce8}}),_0x1c6ed7=new t[(_0x33a5e3(0x209))]();return{'URL':_0x2c5fc1,'close':(_0x5bb790,_0x5703ef)=>{const _0x5bac2e=_0x33a5e3;_0x2da3e4[_0x5bac2e(0x20e)](_0x5bb790,_0x5703ef),_0x1c6ed7['dispose']();},'send':_0x4a643b=>{const _0x465e17=_0x33a5e3;_0x2da3e4[_0x465e17(0x1f3)](_0x4a643b);},'open$':new r[(_0x33a5e3(0x1dc))](_0x52bb46=>{const _0x35f186=_0x33a5e3;let _0x2d45fc=_0x1ffef9=>_0x52bb46[_0x35f186(0x1ec)](_0x1ffef9);_0x2da3e4['addEventListener'](_0x35f186(0x1d6),_0x2d45fc),_0x1c6ed7[_0x35f186(0x212)]((0x0,t[_0x35f186(0x1f9)])(()=>_0x2da3e4[_0x35f186(0x201)](_0x35f186(0x1d6),_0x2d45fc)));})['pipe']((0x0,r['share'])()),'close$':new r[(_0x33a5e3(0x1dc))](_0xd16023=>{const _0x5cf0d9=_0x33a5e3;let _0x413b5e=_0xe6ba84=>_0xd16023['next'](_0xe6ba84);_0x2da3e4[_0x5cf0d9(0x1ff)](_0x5cf0d9(0x20e),_0x413b5e),_0x1c6ed7['add']((0x0,t[_0x5cf0d9(0x1f9)])(()=>_0x2da3e4[_0x5cf0d9(0x201)](_0x5cf0d9(0x20e),_0x413b5e)));})['pipe']((0x0,r[_0x33a5e3(0x1e4)])()),'error$':new r[(_0x33a5e3(0x1dc))](_0x151aab=>{const _0xaf31c1=_0x33a5e3;let _0x1557e0=_0x280aab=>_0x151aab[_0xaf31c1(0x1ec)](_0x280aab);_0x2da3e4['addEventListener'](_0xaf31c1(0x1fa),_0x1557e0),_0x1c6ed7[_0xaf31c1(0x212)]((0x0,t[_0xaf31c1(0x1f9)])(()=>_0x2da3e4[_0xaf31c1(0x201)]('error',_0x1557e0)));})['pipe']((0x0,r[_0x33a5e3(0x1e4)])()),'message$':new r[(_0x33a5e3(0x1dc))](_0x4df976=>{const _0x29f6c4=_0x33a5e3;let _0x2b9025=_0x145d3d=>_0x4df976[_0x29f6c4(0x1ec)](_0x145d3d);_0x2da3e4[_0x29f6c4(0x1ff)](_0x29f6c4(0x1db),_0x2b9025),_0x1c6ed7[_0x29f6c4(0x212)]((0x0,t['toDisposable'])(()=>_0x2da3e4[_0x29f6c4(0x201)](_0x29f6c4(0x1db),_0x2b9025)));})[_0x33a5e3(0x1cf)]((0x0,r[_0x33a5e3(0x1e4)])())};}catch(_0x3406f4){return console[_0x33a5e3(0x1fa)](_0x3406f4),null;}}};f=d([u(0x0,t['IConfigService'])],f);function p(_0x24b544){'@babel/helpers - typeof';const _0x58b7f3=_0x1d3bd5;return p=typeof Symbol==_0x58b7f3(0x1fd)&&typeof Symbol['iterator']==_0x58b7f3(0x1d2)?function(_0x4bbfc2){return typeof _0x4bbfc2;}:function(_0xca87ae){const _0x38a259=_0x58b7f3;return _0xca87ae&&typeof Symbol=='function'&&_0xca87ae[_0x38a259(0x1f0)]===Symbol&&_0xca87ae!==Symbol[_0x38a259(0x1fe)]?_0x38a259(0x1d2):typeof _0xca87ae;},p(_0x24b544);}function m(_0x4b5214,_0x5b3c57){const _0x42bf5f=_0x1d3bd5;if(p(_0x4b5214)!=_0x42bf5f(0x1ef)||!_0x4b5214)return _0x4b5214;var _0x179325=_0x4b5214[Symbol[_0x42bf5f(0x1f2)]];if(_0x179325!==void 0x0){var _0xe634ba=_0x179325[_0x42bf5f(0x1e1)](_0x4b5214,_0x5b3c57||_0x42bf5f(0x1d1));if(p(_0xe634ba)!=_0x42bf5f(0x1ef))return _0xe634ba;throw TypeError(_0x42bf5f(0x1d5));}return(_0x5b3c57===_0x42bf5f(0x20f)?String:Number)(_0x4b5214);}function _0x1501(_0x3b803f,_0x565da5){_0x3b803f=_0x3b803f-0x1ce;const _0x24084f=_0x2408();let _0x150128=_0x24084f[_0x3b803f];return _0x150128;}function h(_0x4819a8){const _0x232c5d=_0x1d3bd5;var _0x5964e2=m(_0x4819a8,_0x232c5d(0x20f));return p(_0x5964e2)==_0x232c5d(0x1d2)?_0x5964e2:_0x5964e2+'';}function g(_0xc39cd3,_0x524a86,_0x378efc){const _0x1295ed=_0x1d3bd5;return(_0x524a86=h(_0x524a86))in _0xc39cd3?Object[_0x1295ed(0x1f6)](_0xc39cd3,_0x524a86,{'value':_0x378efc,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0xc39cd3[_0x524a86]=_0x378efc,_0xc39cd3;}let _=class extends t['Plugin']{constructor(_0x3d4f0e=s,_0x1440b1,_0x448c80){const _0x5b4fc7=_0x1d3bd5;super(),this[_0x5b4fc7(0x1d8)]=_0x3d4f0e,this[_0x5b4fc7(0x208)]=_0x1440b1,this['_injector']=_0x448c80;let {..._0x583edf}=(0x0,t[_0x5b4fc7(0x1f4)])({},s,this[_0x5b4fc7(0x1d8)]);this[_0x5b4fc7(0x208)]['setConfig'](o,_0x583edf);}[_0x1d3bd5(0x1f1)](){this['_registerDependencies']();}['_registerDependencies'](){const _0x572151=_0x1d3bd5;(0x0,t[_0x572151(0x1f8)])(this['_injector'],[[n[_0x572151(0x1d4)],{'useClass':f}]]);}};function _0x2408(){const _0x5ab74e=['onStarting','toPrimitive','send','merge','2VfLGfp','defineProperty','COLLABORATION_CLIENT_NODE_CONFIG_KEY','registerDependencies','toDisposable','error','getOwnPropertyDescriptor','105945mNYeZk','function','prototype','addEventListener','getConfig','removeEventListener','ISnapshotServerService','NodeCollaborationSocketService','DependentOn','181305QAxYFW','IConfigService','collaboration-client-node.config','_configService','DisposableCollection','4809990dgfoIz','toStringTag','headers','36lZcwZv','close','string','21kxFyGj','1018976ihbrKy','add','UNIVER_COLLABORATION_CLIENT_NODE_PLUGIN','registerHTTPInterceptor','pipe','115908gPYLWt','default','symbol','_httpService','ISocketService','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','open','length','_config','version','Injector','message','Observable','customHeaders','Disposable','packageName','1.0.0-alpha.2','call','createSocket','84345DCeLCy','share','decorate','63474PBDuXJ','UniverCollaborationClientNodePlugin','Module','ILogService','pluginName','Inject','next','WebSocket','set','object','constructor'];_0x2408=function(){return _0x5ab74e;};return _0x2408();}g(_,_0x1d3bd5(0x1ea),_0x1d3bd5(0x213)),g(_,_0x1d3bd5(0x1df),c),g(_,_0x1d3bd5(0x1d9),l),_=d([(0x0,t[_0x1d3bd5(0x204)])(e['UniverCollaborationClientPlugin']),u(0x1,t[_0x1d3bd5(0x206)]),u(0x2,(0x0,t[_0x1d3bd5(0x1eb)])(t[_0x1d3bd5(0x1da)]))],_);let v=class extends e['CollaborationSocketService']{constructor(_0x5eb391,_0x54a489,_0x228a27,_0x180ec6,_0x36759e){const _0x38113c=_0x1d3bd5;super(_0x5eb391,_0x54a489,_0x228a27,_0x180ec6,_0x36759e);let _0x4cb4c6=this[_0x38113c(0x208)][_0x38113c(0x200)](e['COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY']);this[_0x38113c(0x1d3)][_0x38113c(0x1ce)]({'interceptor':(_0x5bf5a4,_0x36d711)=>{const _0x3ef562=_0x38113c;let _0x4ece52=_0x5bf5a4[_0x3ef562(0x20c)];if(_0x4cb4c6!=null&&_0x4cb4c6[_0x3ef562(0x1dd)]){for(let _0x57e72b in _0x4cb4c6[_0x3ef562(0x1dd)])_0x4ece52[_0x3ef562(0x1ee)](_0x57e72b,_0x4cb4c6[_0x3ef562(0x1dd)][_0x57e72b]);}return _0x36d711(_0x5bf5a4);}});}async[_0x1d3bd5(0x1e2)](_0x851d2d){return this['_doCreateSocket'](_0x851d2d);}};v=d([u(0x0,(0x0,t[_0x1d3bd5(0x1eb)])(t['Injector'])),u(0x1,(0x0,t['Inject'])(n['HTTPService'])),u(0x2,t['IConfigService']),u(0x3,t[_0x1d3bd5(0x1e9)]),u(0x4,a[_0x1d3bd5(0x202)])],v),exports[_0x1d3bd5(0x1f7)]=o,Object[_0x1d3bd5(0x1f6)](exports,_0x1d3bd5(0x203),{'enumerable':!0x0,'get':function(){return v;}}),Object[_0x1d3bd5(0x1f6)](exports,_0x1d3bd5(0x1e7),{'enumerable':!0x0,'get':function(){return _;}});
1
+ const _0x4653db=_0x1f7b;(function(_0x2c3c96,_0x435c1c){const _0x355a55=_0x1f7b,_0x421c03=_0x2c3c96();while(!![]){try{const _0x3609cb=-parseInt(_0x355a55(0xcf))/0x1+parseInt(_0x355a55(0xec))/0x2*(-parseInt(_0x355a55(0xf4))/0x3)+parseInt(_0x355a55(0xdc))/0x4*(parseInt(_0x355a55(0xe9))/0x5)+-parseInt(_0x355a55(0xf6))/0x6+parseInt(_0x355a55(0xd6))/0x7*(-parseInt(_0x355a55(0xef))/0x8)+-parseInt(_0x355a55(0xe1))/0x9*(parseInt(_0x355a55(0xde))/0xa)+parseInt(_0x355a55(0xd3))/0xb;if(_0x3609cb===_0x435c1c)break;else _0x421c03['push'](_0x421c03['shift']());}catch(_0x318738){_0x421c03['push'](_0x421c03['shift']());}}}(_0x36be,0x991d1),Object[_0x4653db(0x108)](exports,Symbol['toStringTag'],{'value':'Module'}));function _0x1f7b(_0x419e41,_0x151850){_0x419e41=_0x419e41-0xcf;const _0x36bef1=_0x36be();let _0x1f7b16=_0x36bef1[_0x419e41];return _0x1f7b16;}let e=require('@univerjs-pro/collaboration-client'),t=require('@univerjs/core'),n=require('@univerjs/network'),r=require('rxjs'),i=require('ws'),a=require('@univerjs-pro/collaboration');var o=_0x4653db(0x109),s=_0x4653db(0x103);const c={};function l(_0x187a78,_0x3da5a9){return function(_0x2f95ca,_0x694d4c){_0x3da5a9(_0x2f95ca,_0x694d4c,_0x187a78);};}function u(_0x397adc,_0x347ef1,_0x6a4925,_0x576bac){const _0x45f34c=_0x4653db;var _0x214e70=arguments['length'],_0x7f0ff7=_0x214e70<0x3?_0x347ef1:_0x576bac===null?_0x576bac=Object[_0x45f34c(0xe2)](_0x347ef1,_0x6a4925):_0x576bac,_0x567002;if(typeof Reflect=='object'&&typeof Reflect['decorate']==_0x45f34c(0x111))_0x7f0ff7=Reflect[_0x45f34c(0xfa)](_0x397adc,_0x347ef1,_0x6a4925,_0x576bac);else{for(var _0x105152=_0x397adc[_0x45f34c(0xd1)]-0x1;_0x105152>=0x0;_0x105152--)(_0x567002=_0x397adc[_0x105152])&&(_0x7f0ff7=(_0x214e70<0x3?_0x567002(_0x7f0ff7):_0x214e70>0x3?_0x567002(_0x347ef1,_0x6a4925,_0x7f0ff7):_0x567002(_0x347ef1,_0x6a4925))||_0x7f0ff7);}return _0x214e70>0x3&&_0x7f0ff7&&Object['defineProperty'](_0x347ef1,_0x6a4925,_0x7f0ff7),_0x7f0ff7;}let d=class extends t['Disposable']{constructor(_0x18826b){const _0x4d4425=_0x4653db;super(),this[_0x4d4425(0xd8)]=_0x18826b;}['createSocket'](_0x3c0758){const _0x5dbbe1=_0x4653db;var _0x38619e;let _0x2b4622=((_0x38619e=this[_0x5dbbe1(0xd8)][_0x5dbbe1(0xe8)](e[_0x5dbbe1(0xe6)]))==null?void 0x0:_0x38619e[_0x5dbbe1(0xee)])||{};try{let _0x5a9f50=new i[(_0x5dbbe1(0x10a))](_0x3c0758,{'headers':{..._0x2b4622}}),_0x1f43b1=new t[(_0x5dbbe1(0xfd))]();return{'URL':_0x3c0758,'close':(_0x2d649d,_0x2ddae8)=>{const _0x59a6e0=_0x5dbbe1;_0x5a9f50[_0x59a6e0(0xd2)](_0x2d649d,_0x2ddae8),_0x1f43b1['dispose']();},'send':_0x1e9c61=>{const _0x5cf16e=_0x5dbbe1;_0x5a9f50[_0x5cf16e(0x110)](_0x1e9c61);},'open$':new r[(_0x5dbbe1(0xdf))](_0xff261c=>{const _0x5bf1fa=_0x5dbbe1;let _0xbb38ca=_0x1a940f=>_0xff261c['next'](_0x1a940f);_0x5a9f50[_0x5bf1fa(0xe0)](_0x5bf1fa(0xed),_0xbb38ca),_0x1f43b1[_0x5bf1fa(0x10d)]((0x0,t['toDisposable'])(()=>_0x5a9f50[_0x5bf1fa(0xf2)]('open',_0xbb38ca)));})[_0x5dbbe1(0x107)]((0x0,r[_0x5dbbe1(0xe5)])()),'close$':new r[(_0x5dbbe1(0xdf))](_0x810bfe=>{const _0x3bba12=_0x5dbbe1;let _0x516232=_0x24b67d=>_0x810bfe[_0x3bba12(0x10b)](_0x24b67d);_0x5a9f50[_0x3bba12(0xe0)]('close',_0x516232),_0x1f43b1[_0x3bba12(0x10d)]((0x0,t['toDisposable'])(()=>_0x5a9f50[_0x3bba12(0xf2)](_0x3bba12(0xd2),_0x516232)));})[_0x5dbbe1(0x107)]((0x0,r[_0x5dbbe1(0xe5)])()),'error$':new r['Observable'](_0x16a2bf=>{const _0x22922e=_0x5dbbe1;let _0x3e0cbe=_0x41c49d=>_0x16a2bf[_0x22922e(0x10b)](_0x41c49d);_0x5a9f50[_0x22922e(0xe0)]('error',_0x3e0cbe),_0x1f43b1['add']((0x0,t[_0x22922e(0xf5)])(()=>_0x5a9f50['removeEventListener'](_0x22922e(0xdb),_0x3e0cbe)));})['pipe']((0x0,r[_0x5dbbe1(0xe5)])()),'message$':new r['Observable'](_0x416a85=>{const _0x328b8d=_0x5dbbe1;let _0x26e536=_0x2c46cf=>_0x416a85[_0x328b8d(0x10b)](_0x2c46cf);_0x5a9f50[_0x328b8d(0xe0)](_0x328b8d(0xd5),_0x26e536),_0x1f43b1[_0x328b8d(0x10d)]((0x0,t[_0x328b8d(0xf5)])(()=>_0x5a9f50[_0x328b8d(0xf2)]('message',_0x26e536)));})[_0x5dbbe1(0x107)]((0x0,r[_0x5dbbe1(0xe5)])())};}catch(_0x41cb06){return console[_0x5dbbe1(0xdb)](_0x41cb06),null;}}};d=u([l(0x0,t[_0x4653db(0x10e)])],d);function f(_0x385940){'@babel/helpers - typeof';const _0x349e96=_0x4653db;return f=typeof Symbol==_0x349e96(0x111)&&typeof Symbol[_0x349e96(0xf0)]==_0x349e96(0x102)?function(_0x2c0222){return typeof _0x2c0222;}:function(_0x4e2d1f){const _0x1ec8f6=_0x349e96;return _0x4e2d1f&&typeof Symbol==_0x1ec8f6(0x111)&&_0x4e2d1f[_0x1ec8f6(0x101)]===Symbol&&_0x4e2d1f!==Symbol['prototype']?_0x1ec8f6(0x102):typeof _0x4e2d1f;},f(_0x385940);}function _0x36be(){const _0x4250d0=['UNIVER_COLLABORATION_CLIENT_NODE_PLUGIN','registerDependencies','error','573364mJMCFE','string','2690OkNxlN','Observable','addEventListener','21636EXAuRk','getOwnPropertyDescriptor','headers','ILogService','share','COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY','registerHTTPInterceptor','getConfig','40REQjbr','_doCreateSocket','Plugin','8RNOgFo','open','customHeaders','809248BQYiiP','iterator','onStarting','removeEventListener','ISocketService','154158tqvibm','toDisposable','4488264zIsnGf','DependentOn','setConfig','default','decorate','_registerDependencies','_injector','DisposableCollection','HTTPService','UniverCollaborationClientPlugin','set','constructor','symbol','1.0.0-alpha.3','UniverCollaborationClientNodePlugin','CollaborationSocketService','_config','pipe','defineProperty','@univerjs-pro/collaboration-client-node','WebSocket','next','call','add','IConfigService','toPrimitive','send','function','454263ophVsr','createSocket','length','close','22448052gCGKVg','NodeCollaborationSocketService','message','35QVbTXi','Inject','_configService'];_0x36be=function(){return _0x4250d0;};return _0x36be();}function p(_0x1c7b6c,_0x129bbe){const _0x4b469a=_0x4653db;if(f(_0x1c7b6c)!='object'||!_0x1c7b6c)return _0x1c7b6c;var _0x5f3d39=_0x1c7b6c[Symbol[_0x4b469a(0x10f)]];if(_0x5f3d39!==void 0x0){var _0x20def6=_0x5f3d39[_0x4b469a(0x10c)](_0x1c7b6c,_0x129bbe||_0x4b469a(0xf9));if(f(_0x20def6)!='object')return _0x20def6;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x129bbe===_0x4b469a(0xdd)?String:Number)(_0x1c7b6c);}function m(_0x21ba46){const _0x55ca8f=_0x4653db;var _0x4b86e0=p(_0x21ba46,_0x55ca8f(0xdd));return f(_0x4b86e0)==_0x55ca8f(0x102)?_0x4b86e0:_0x4b86e0+'';}function h(_0x340009,_0x16b1c3,_0x54daf5){const _0x566780=_0x4653db;return(_0x16b1c3=m(_0x16b1c3))in _0x340009?Object[_0x566780(0x108)](_0x340009,_0x16b1c3,{'value':_0x54daf5,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x340009[_0x16b1c3]=_0x54daf5,_0x340009;}let g=class extends t[_0x4653db(0xeb)]{constructor(_0x22c255=c,_0x38b53e,_0x163fde){const _0x335194=_0x4653db;super(),this[_0x335194(0x106)]=_0x22c255,this[_0x335194(0xd8)]=_0x38b53e,this[_0x335194(0xfc)]=_0x163fde;let {..._0x5f59f1}=(0x0,t['merge'])({},c,this[_0x335194(0x106)]);this[_0x335194(0xd8)][_0x335194(0xf8)]('collaboration-client-node.config',_0x5f59f1);}[_0x4653db(0xf1)](){const _0x1de88e=_0x4653db;this[_0x1de88e(0xfb)]();}[_0x4653db(0xfb)](){const _0xbb4fef=_0x4653db;(0x0,t[_0xbb4fef(0xda)])(this[_0xbb4fef(0xfc)],[[n[_0xbb4fef(0xf3)],{'useClass':d}]]);}};h(g,'pluginName',_0x4653db(0xd9)),h(g,'packageName',o),h(g,'version',s),g=u([(0x0,t[_0x4653db(0xf7)])(e[_0x4653db(0xff)]),l(0x1,t[_0x4653db(0x10e)]),l(0x2,(0x0,t[_0x4653db(0xd7)])(t['Injector']))],g);let _=class extends e[_0x4653db(0x105)]{constructor(_0x41358e,_0x2b5d41,_0x5f2ff5,_0x4051c6,_0x48cd0a){const _0x223497=_0x4653db;super(_0x41358e,_0x2b5d41,_0x5f2ff5,_0x4051c6,_0x48cd0a);let _0x33c59a=this[_0x223497(0xd8)][_0x223497(0xe8)](e[_0x223497(0xe6)]);this['_httpService'][_0x223497(0xe7)]({'interceptor':(_0x174f7b,_0x2d76c8)=>{const _0x279b5f=_0x223497;let _0x4b35f1=_0x174f7b[_0x279b5f(0xe3)];if(_0x33c59a!=null&&_0x33c59a[_0x279b5f(0xee)]){for(let _0x1457da in _0x33c59a[_0x279b5f(0xee)])_0x4b35f1[_0x279b5f(0x100)](_0x1457da,_0x33c59a[_0x279b5f(0xee)][_0x1457da]);}return _0x2d76c8(_0x174f7b);}});}async[_0x4653db(0xd0)](_0x49c7a4){const _0x48b3a8=_0x4653db;return this[_0x48b3a8(0xea)](_0x49c7a4);}};_=u([l(0x0,(0x0,t[_0x4653db(0xd7)])(t['Injector'])),l(0x1,(0x0,t[_0x4653db(0xd7)])(n[_0x4653db(0xfe)])),l(0x2,t[_0x4653db(0x10e)]),l(0x3,t[_0x4653db(0xe4)]),l(0x4,a['ISnapshotServerService'])],_),Object[_0x4653db(0x108)](exports,_0x4653db(0xd4),{'enumerable':!0x0,'get':function(){return _;}}),Object['defineProperty'](exports,_0x4653db(0x104),{'enumerable':!0x0,'get':function(){return g;}});
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x57579c=_0x4b92;(function(_0x5ab23e,_0x5648fa){const _0xce6b9b=_0x4b92,_0x1cb15=_0x5ab23e();while(!![]){try{const _0x18db63=-parseInt(_0xce6b9b(0x122))/0x1*(parseInt(_0xce6b9b(0x129))/0x2)+-parseInt(_0xce6b9b(0x10a))/0x3*(-parseInt(_0xce6b9b(0x13a))/0x4)+parseInt(_0xce6b9b(0x110))/0x5+-parseInt(_0xce6b9b(0x12b))/0x6*(parseInt(_0xce6b9b(0x125))/0x7)+parseInt(_0xce6b9b(0x11a))/0x8*(parseInt(_0xce6b9b(0x115))/0x9)+parseInt(_0xce6b9b(0x106))/0xa*(-parseInt(_0xce6b9b(0x120))/0xb)+-parseInt(_0xce6b9b(0x135))/0xc;if(_0x18db63===_0x5648fa)break;else _0x1cb15['push'](_0x1cb15['shift']());}catch(_0x50d8c4){_0x1cb15['push'](_0x1cb15['shift']());}}}(_0xb536,0x53ed0));import{COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY as _0x2fa5f8,CollaborationSocketService as _0x13a7f1,UniverCollaborationClientPlugin as _0x2e2930}from'@univerjs-pro/collaboration-client';import{DependentOn as _0xf26c49,Disposable as _0x245afc,DisposableCollection as _0x6c4050,IConfigService as _0x347b01,ILogService as _0x306e90,Inject as _0x221b83,Injector as _0x21a29c,Plugin as _0x3f4168,merge as _0xa99ca1,registerDependencies as _0x433183,toDisposable as _0x262ed3}from'@univerjs/core';import{HTTPService as _0x2dda27,ISocketService as _0x404363}from'@univerjs/network';import{Observable as _0x26e9a5,share as _0x1a4e2b}from'rxjs';import{WebSocket as _0x2df1b8}from'ws';import{ISnapshotServerService as _0x5032a1}from'@univerjs-pro/collaboration';const b=_0x57579c(0x12e),x={};var S=_0x57579c(0x12d),C=_0x57579c(0x130);function _0x4b92(_0x32f5d1,_0x1d0753){_0x32f5d1=_0x32f5d1-0x106;const _0xb53677=_0xb536();let _0x4b9291=_0xb53677[_0x32f5d1];return _0x4b9291;}function w(_0x2f640b,_0x3f9cbe){return function(_0x4c8bd1,_0xeddb6f){_0x3f9cbe(_0x4c8bd1,_0xeddb6f,_0x2f640b);};}function T(_0x5ec9a0,_0x461c8a,_0x242b09,_0x411189){const _0x244cbf=_0x57579c;var _0x2356b5=arguments['length'],_0x3ad66c=_0x2356b5<0x3?_0x461c8a:_0x411189===null?_0x411189=Object[_0x244cbf(0x128)](_0x461c8a,_0x242b09):_0x411189,_0xf627bf;if(typeof Reflect==_0x244cbf(0x123)&&typeof Reflect[_0x244cbf(0x136)]==_0x244cbf(0x109))_0x3ad66c=Reflect[_0x244cbf(0x136)](_0x5ec9a0,_0x461c8a,_0x242b09,_0x411189);else{for(var _0x3a9bd4=_0x5ec9a0[_0x244cbf(0x126)]-0x1;_0x3a9bd4>=0x0;_0x3a9bd4--)(_0xf627bf=_0x5ec9a0[_0x3a9bd4])&&(_0x3ad66c=(_0x2356b5<0x3?_0xf627bf(_0x3ad66c):_0x2356b5>0x3?_0xf627bf(_0x461c8a,_0x242b09,_0x3ad66c):_0xf627bf(_0x461c8a,_0x242b09))||_0x3ad66c);}return _0x2356b5>0x3&&_0x3ad66c&&Object[_0x244cbf(0x127)](_0x461c8a,_0x242b09,_0x3ad66c),_0x3ad66c;}let E=class extends _0x245afc{constructor(_0x4d865c){const _0x4ccefa=_0x57579c;super(),this[_0x4ccefa(0x10b)]=_0x4d865c;}['createSocket'](_0x4fb863){const _0x996304=_0x57579c;var _0x3fb7f6;let _0x18b86b=((_0x3fb7f6=this[_0x996304(0x10b)][_0x996304(0x117)](_0x2fa5f8))==null?void 0x0:_0x3fb7f6['customHeaders'])||{};try{let _0xc92f93=new _0x2df1b8(_0x4fb863,{'headers':{..._0x18b86b}}),_0x4a43c5=new _0x6c4050();return{'URL':_0x4fb863,'close':(_0x90acca,_0x3913ef)=>{const _0x31eba4=_0x996304;_0xc92f93[_0x31eba4(0x134)](_0x90acca,_0x3913ef),_0x4a43c5[_0x31eba4(0x114)]();},'send':_0x3d2359=>{_0xc92f93['send'](_0x3d2359);},'open$':new _0x26e9a5(_0x4ab11a=>{const _0x426c94=_0x996304;let _0x5041a2=_0x154f88=>_0x4ab11a[_0x426c94(0x10e)](_0x154f88);_0xc92f93[_0x426c94(0x139)]('open',_0x5041a2),_0x4a43c5[_0x426c94(0x108)](_0x262ed3(()=>_0xc92f93[_0x426c94(0x119)](_0x426c94(0x11b),_0x5041a2)));})['pipe'](_0x1a4e2b()),'close$':new _0x26e9a5(_0x1595b5=>{const _0x442b08=_0x996304;let _0x11a1fa=_0xf29dca=>_0x1595b5[_0x442b08(0x10e)](_0xf29dca);_0xc92f93[_0x442b08(0x139)](_0x442b08(0x134),_0x11a1fa),_0x4a43c5[_0x442b08(0x108)](_0x262ed3(()=>_0xc92f93[_0x442b08(0x119)](_0x442b08(0x134),_0x11a1fa)));})[_0x996304(0x10f)](_0x1a4e2b()),'error$':new _0x26e9a5(_0x50717b=>{const _0x18a527=_0x996304;let _0x540f49=_0x2f8f7d=>_0x50717b[_0x18a527(0x10e)](_0x2f8f7d);_0xc92f93[_0x18a527(0x139)](_0x18a527(0x118),_0x540f49),_0x4a43c5[_0x18a527(0x108)](_0x262ed3(()=>_0xc92f93['removeEventListener'](_0x18a527(0x118),_0x540f49)));})[_0x996304(0x10f)](_0x1a4e2b()),'message$':new _0x26e9a5(_0x126870=>{const _0x2c3f67=_0x996304;let _0x399385=_0x3b97d1=>_0x126870['next'](_0x3b97d1);_0xc92f93[_0x2c3f67(0x139)]('message',_0x399385),_0x4a43c5[_0x2c3f67(0x108)](_0x262ed3(()=>_0xc92f93[_0x2c3f67(0x119)]('message',_0x399385)));})['pipe'](_0x1a4e2b())};}catch(_0x4b3669){return console[_0x996304(0x118)](_0x4b3669),null;}}};E=T([w(0x0,_0x347b01)],E);function D(_0x2cc9ce){'@babel/helpers - typeof';const _0x40ac82=_0x57579c;return D=typeof Symbol==_0x40ac82(0x109)&&typeof Symbol[_0x40ac82(0x116)]==_0x40ac82(0x11c)?function(_0x2e0164){return typeof _0x2e0164;}:function(_0x27a21b){const _0xa70b87=_0x40ac82;return _0x27a21b&&typeof Symbol=='function'&&_0x27a21b[_0xa70b87(0x131)]===Symbol&&_0x27a21b!==Symbol[_0xa70b87(0x12a)]?_0xa70b87(0x11c):typeof _0x27a21b;},D(_0x2cc9ce);}function O(_0x153c23,_0x4e9120){const _0x50ad47=_0x57579c;if(D(_0x153c23)!='object'||!_0x153c23)return _0x153c23;var _0x18ed41=_0x153c23[Symbol[_0x50ad47(0x11f)]];if(_0x18ed41!==void 0x0){var _0x5347d1=_0x18ed41[_0x50ad47(0x133)](_0x153c23,_0x4e9120||_0x50ad47(0x10d));if(D(_0x5347d1)!='object')return _0x5347d1;throw TypeError(_0x50ad47(0x107));}return(_0x4e9120==='string'?String:Number)(_0x153c23);}function k(_0x87fbc0){var _0x569670=O(_0x87fbc0,'string');return D(_0x569670)=='symbol'?_0x569670:_0x569670+'';}function A(_0x144950,_0x107d57,_0x5d8f8b){const _0x2af0bb=_0x57579c;return(_0x107d57=k(_0x107d57))in _0x144950?Object[_0x2af0bb(0x127)](_0x144950,_0x107d57,{'value':_0x5d8f8b,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x144950[_0x107d57]=_0x5d8f8b,_0x144950;}let j=class extends _0x3f4168{constructor(_0x4b1bfa=x,_0x36bcb3,_0xbc5fe0){const _0x5ecae7=_0x57579c;super(),this[_0x5ecae7(0x137)]=_0x4b1bfa,this[_0x5ecae7(0x10b)]=_0x36bcb3,this[_0x5ecae7(0x124)]=_0xbc5fe0;let {..._0x5a177f}=_0xa99ca1({},x,this[_0x5ecae7(0x137)]);this[_0x5ecae7(0x10b)]['setConfig'](b,_0x5a177f);}[_0x57579c(0x138)](){const _0x1f04bc=_0x57579c;this[_0x1f04bc(0x132)]();}[_0x57579c(0x132)](){const _0x344140=_0x57579c;_0x433183(this[_0x344140(0x124)],[[_0x404363,{'useClass':E}]]);}};A(j,_0x57579c(0x12c),_0x57579c(0x112)),A(j,'packageName',S),A(j,_0x57579c(0x11d),C),j=T([_0xf26c49(_0x2e2930),w(0x1,_0x347b01),w(0x2,_0x221b83(_0x21a29c))],j);let M=class extends _0x13a7f1{constructor(_0x5c731e,_0x4efe4a,_0x3b8b59,_0x53c882,_0x2daac6){const _0x817d5c=_0x57579c;super(_0x5c731e,_0x4efe4a,_0x3b8b59,_0x53c882,_0x2daac6);let _0x323302=this[_0x817d5c(0x10b)][_0x817d5c(0x117)](_0x2fa5f8);this[_0x817d5c(0x111)][_0x817d5c(0x11e)]({'interceptor':(_0x44af57,_0x57cfaa)=>{const _0x5858df=_0x817d5c;let _0x1e97a8=_0x44af57[_0x5858df(0x12f)];if(_0x323302!=null&&_0x323302[_0x5858df(0x10c)]){for(let _0x4002a5 in _0x323302[_0x5858df(0x10c)])_0x1e97a8[_0x5858df(0x121)](_0x4002a5,_0x323302[_0x5858df(0x10c)][_0x4002a5]);}return _0x57cfaa(_0x44af57);}});}async['createSocket'](_0x4f57a3){const _0x66ca90=_0x57579c;return this[_0x66ca90(0x113)](_0x4f57a3);}};M=T([w(0x0,_0x221b83(_0x21a29c)),w(0x1,_0x221b83(_0x2dda27)),w(0x2,_0x347b01),w(0x3,_0x306e90),w(0x4,_0x5032a1)],M);export{b as COLLABORATION_CLIENT_NODE_CONFIG_KEY,M as NodeCollaborationSocketService,j as UniverCollaborationClientNodePlugin};function _0xb536(){const _0x3e30dc=['pluginName','@univerjs-pro/collaboration-client-node','collaboration-client-node.config','headers','1.0.0-alpha.2','constructor','_registerDependencies','call','close','1116936PdSndv','decorate','_config','onStarting','addEventListener','60pWXMoP','1320JgAQKu','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','add','function','14655Zsqlne','_configService','customHeaders','default','next','pipe','1687710DzNzAK','_httpService','UNIVER_COLLABORATION_CLIENT_NODE_PLUGIN','_doCreateSocket','dispose','6159843NjHYrH','iterator','getConfig','error','removeEventListener','8TsjRzn','open','symbol','version','registerHTTPInterceptor','toPrimitive','1881yRvwjs','set','578hrvBuG','object','_injector','84JzENAJ','length','defineProperty','getOwnPropertyDescriptor','2150vFgMzq','prototype','7242tSyCoG'];_0xb536=function(){return _0x3e30dc;};return _0xb536();}
1
+ const _0x1e2818=_0x5307;(function(_0x3fea99,_0x2be911){const _0x2c5689=_0x5307,_0x32b22a=_0x3fea99();while(!![]){try{const _0x1303f0=-parseInt(_0x2c5689(0xc7))/0x1+-parseInt(_0x2c5689(0xca))/0x2+-parseInt(_0x2c5689(0xe2))/0x3*(parseInt(_0x2c5689(0xdf))/0x4)+-parseInt(_0x2c5689(0xd6))/0x5+-parseInt(_0x2c5689(0xe4))/0x6+-parseInt(_0x2c5689(0xde))/0x7*(-parseInt(_0x2c5689(0xc2))/0x8)+parseInt(_0x2c5689(0xcd))/0x9;if(_0x1303f0===_0x2be911)break;else _0x32b22a['push'](_0x32b22a['shift']());}catch(_0x3b0b25){_0x32b22a['push'](_0x32b22a['shift']());}}}(_0x5128,0xda314));import{COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY as _0x4e5daa,CollaborationSocketService as _0x25f30a,UniverCollaborationClientPlugin as _0xdb8f3f}from'@univerjs-pro/collaboration-client';import{DependentOn as _0x5648fd,Disposable as _0x2975d2,DisposableCollection as _0x368e18,IConfigService as _0x13630e,ILogService as _0x1c40b7,Inject as _0x448794,Injector as _0xc9fc84,Plugin as _0x3d60aa,merge as _0x4fb716,registerDependencies as _0x574e2a,toDisposable as _0x368404}from'@univerjs/core';import{HTTPService as _0x131df7,ISocketService as _0x4ecbc0}from'@univerjs/network';import{Observable as _0x4986fb,share as _0x1d5cdf}from'rxjs';import{WebSocket as _0x7dd87d}from'ws';import{ISnapshotServerService as _0x43822f}from'@univerjs-pro/collaboration';function _0x5307(_0x135256,_0x3dac26){_0x135256=_0x135256-0xbf;const _0x512837=_0x5128();let _0x530704=_0x512837[_0x135256];return _0x530704;}var b=_0x1e2818(0xe3),x=_0x1e2818(0xd4);function _0x5128(){const _0x310dbb=['add','8XhzLxJ','version','default','dispose','constructor','445764yfKkdZ','string','toPrimitive','2888694vNtAqA','getConfig','iterator','38367027lmKrzR','symbol','getOwnPropertyDescriptor','customHeaders','function','pluginName','UNIVER_COLLABORATION_CLIENT_NODE_PLUGIN','1.0.0-alpha.3','_config','6463815ZeKxXl','_injector','_registerDependencies','close','object','pipe','length','headers','9399411dwJjFU','1036ELHEXF','createSocket','decorate','10419eTamaZ','@univerjs-pro/collaboration-client-node','3778074KvWRjk','defineProperty','removeEventListener','_configService','_httpService','_doCreateSocket','error','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','set','next','addEventListener','open','setConfig'];_0x5128=function(){return _0x310dbb;};return _0x5128();}const S={};function C(_0x262061,_0x3af044){return function(_0x542416,_0x3643ac){_0x3af044(_0x542416,_0x3643ac,_0x262061);};}function w(_0x331a70,_0x24c79a,_0x16bbad,_0x4c12a6){const _0x90c57=_0x1e2818;var _0x5630a8=arguments[_0x90c57(0xdc)],_0x27a181=_0x5630a8<0x3?_0x24c79a:_0x4c12a6===null?_0x4c12a6=Object[_0x90c57(0xcf)](_0x24c79a,_0x16bbad):_0x4c12a6,_0x559eb0;if(typeof Reflect==_0x90c57(0xda)&&typeof Reflect[_0x90c57(0xe1)]==_0x90c57(0xd1))_0x27a181=Reflect[_0x90c57(0xe1)](_0x331a70,_0x24c79a,_0x16bbad,_0x4c12a6);else{for(var _0x29facb=_0x331a70[_0x90c57(0xdc)]-0x1;_0x29facb>=0x0;_0x29facb--)(_0x559eb0=_0x331a70[_0x29facb])&&(_0x27a181=(_0x5630a8<0x3?_0x559eb0(_0x27a181):_0x5630a8>0x3?_0x559eb0(_0x24c79a,_0x16bbad,_0x27a181):_0x559eb0(_0x24c79a,_0x16bbad))||_0x27a181);}return _0x5630a8>0x3&&_0x27a181&&Object[_0x90c57(0xe5)](_0x24c79a,_0x16bbad,_0x27a181),_0x27a181;}let T=class extends _0x2975d2{constructor(_0x5d64f4){const _0x475eae=_0x1e2818;super(),this[_0x475eae(0xe7)]=_0x5d64f4;}[_0x1e2818(0xe0)](_0x1cfcef){const _0x5f0706=_0x1e2818;var _0x5051ec;let _0x37779f=((_0x5051ec=this[_0x5f0706(0xe7)][_0x5f0706(0xcb)](_0x4e5daa))==null?void 0x0:_0x5051ec[_0x5f0706(0xd0)])||{};try{let _0x4009c2=new _0x7dd87d(_0x1cfcef,{'headers':{..._0x37779f}}),_0x3d49d8=new _0x368e18();return{'URL':_0x1cfcef,'close':(_0x2e7dd5,_0x24a7f8)=>{const _0x44cbd6=_0x5f0706;_0x4009c2[_0x44cbd6(0xd9)](_0x2e7dd5,_0x24a7f8),_0x3d49d8[_0x44cbd6(0xc5)]();},'send':_0x42502d=>{_0x4009c2['send'](_0x42502d);},'open$':new _0x4986fb(_0x4109b5=>{const _0x32b81a=_0x5f0706;let _0x16b3d1=_0x804b28=>_0x4109b5[_0x32b81a(0xed)](_0x804b28);_0x4009c2[_0x32b81a(0xee)](_0x32b81a(0xbf),_0x16b3d1),_0x3d49d8['add'](_0x368404(()=>_0x4009c2[_0x32b81a(0xe6)](_0x32b81a(0xbf),_0x16b3d1)));})['pipe'](_0x1d5cdf()),'close$':new _0x4986fb(_0x18df28=>{const _0x139cdc=_0x5f0706;let _0x1f7380=_0x15fb10=>_0x18df28[_0x139cdc(0xed)](_0x15fb10);_0x4009c2[_0x139cdc(0xee)](_0x139cdc(0xd9),_0x1f7380),_0x3d49d8['add'](_0x368404(()=>_0x4009c2['removeEventListener'](_0x139cdc(0xd9),_0x1f7380)));})[_0x5f0706(0xdb)](_0x1d5cdf()),'error$':new _0x4986fb(_0x4ff911=>{const _0x3b7988=_0x5f0706;let _0x232bd1=_0x152b65=>_0x4ff911['next'](_0x152b65);_0x4009c2[_0x3b7988(0xee)](_0x3b7988(0xea),_0x232bd1),_0x3d49d8[_0x3b7988(0xc1)](_0x368404(()=>_0x4009c2[_0x3b7988(0xe6)](_0x3b7988(0xea),_0x232bd1)));})[_0x5f0706(0xdb)](_0x1d5cdf()),'message$':new _0x4986fb(_0x175e2f=>{const _0x1ac44a=_0x5f0706;let _0x3e15df=_0xa055bc=>_0x175e2f[_0x1ac44a(0xed)](_0xa055bc);_0x4009c2[_0x1ac44a(0xee)]('message',_0x3e15df),_0x3d49d8[_0x1ac44a(0xc1)](_0x368404(()=>_0x4009c2[_0x1ac44a(0xe6)]('message',_0x3e15df)));})[_0x5f0706(0xdb)](_0x1d5cdf())};}catch(_0x3bee39){return console[_0x5f0706(0xea)](_0x3bee39),null;}}};T=w([C(0x0,_0x13630e)],T);function E(_0x421e66){'@babel/helpers - typeof';const _0x511a8e=_0x1e2818;return E=typeof Symbol==_0x511a8e(0xd1)&&typeof Symbol[_0x511a8e(0xcc)]=='symbol'?function(_0x1ac12e){return typeof _0x1ac12e;}:function(_0x54795b){const _0x312976=_0x511a8e;return _0x54795b&&typeof Symbol==_0x312976(0xd1)&&_0x54795b[_0x312976(0xc6)]===Symbol&&_0x54795b!==Symbol['prototype']?_0x312976(0xce):typeof _0x54795b;},E(_0x421e66);}function D(_0xe23f5f,_0x408d5d){const _0x7a583a=_0x1e2818;if(E(_0xe23f5f)!=_0x7a583a(0xda)||!_0xe23f5f)return _0xe23f5f;var _0x50cf83=_0xe23f5f[Symbol[_0x7a583a(0xc9)]];if(_0x50cf83!==void 0x0){var _0x49e76d=_0x50cf83['call'](_0xe23f5f,_0x408d5d||_0x7a583a(0xc4));if(E(_0x49e76d)!=_0x7a583a(0xda))return _0x49e76d;throw TypeError(_0x7a583a(0xeb));}return(_0x408d5d==='string'?String:Number)(_0xe23f5f);}function O(_0x1142a3){const _0x2b6eae=_0x1e2818;var _0x270b82=D(_0x1142a3,_0x2b6eae(0xc8));return E(_0x270b82)==_0x2b6eae(0xce)?_0x270b82:_0x270b82+'';}function k(_0xdad26d,_0x2c7a53,_0x55f920){return(_0x2c7a53=O(_0x2c7a53))in _0xdad26d?Object['defineProperty'](_0xdad26d,_0x2c7a53,{'value':_0x55f920,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0xdad26d[_0x2c7a53]=_0x55f920,_0xdad26d;}let A=class extends _0x3d60aa{constructor(_0x1ba31d=S,_0x54eff2,_0x2de5d2){const _0x1fd4b4=_0x1e2818;super(),this['_config']=_0x1ba31d,this[_0x1fd4b4(0xe7)]=_0x54eff2,this[_0x1fd4b4(0xd7)]=_0x2de5d2;let {..._0x42b856}=_0x4fb716({},S,this[_0x1fd4b4(0xd5)]);this[_0x1fd4b4(0xe7)][_0x1fd4b4(0xc0)]('collaboration-client-node.config',_0x42b856);}['onStarting'](){const _0x1d541d=_0x1e2818;this[_0x1d541d(0xd8)]();}[_0x1e2818(0xd8)](){const _0x493752=_0x1e2818;_0x574e2a(this[_0x493752(0xd7)],[[_0x4ecbc0,{'useClass':T}]]);}};k(A,_0x1e2818(0xd2),_0x1e2818(0xd3)),k(A,'packageName',b),k(A,_0x1e2818(0xc3),x),A=w([_0x5648fd(_0xdb8f3f),C(0x1,_0x13630e),C(0x2,_0x448794(_0xc9fc84))],A);let j=class extends _0x25f30a{constructor(_0x5cc5c2,_0x2fe64f,_0x5589b9,_0x281cd0,_0x18f88c){const _0x2fb5bc=_0x1e2818;super(_0x5cc5c2,_0x2fe64f,_0x5589b9,_0x281cd0,_0x18f88c);let _0x13ed15=this[_0x2fb5bc(0xe7)]['getConfig'](_0x4e5daa);this[_0x2fb5bc(0xe8)]['registerHTTPInterceptor']({'interceptor':(_0x524d3b,_0x7b85d5)=>{const _0x13df7f=_0x2fb5bc;let _0x5e48fe=_0x524d3b[_0x13df7f(0xdd)];if(_0x13ed15!=null&&_0x13ed15['customHeaders']){for(let _0xd47d7 in _0x13ed15['customHeaders'])_0x5e48fe[_0x13df7f(0xec)](_0xd47d7,_0x13ed15[_0x13df7f(0xd0)][_0xd47d7]);}return _0x7b85d5(_0x524d3b);}});}async[_0x1e2818(0xe0)](_0x186847){const _0x551e7f=_0x1e2818;return this[_0x551e7f(0xe9)](_0x186847);}};j=w([C(0x0,_0x448794(_0xc9fc84)),C(0x1,_0x448794(_0x131df7)),C(0x2,_0x13630e),C(0x3,_0x1c40b7),C(0x4,_0x43822f)],j);export{j as NodeCollaborationSocketService,A as UniverCollaborationClientNodePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x57579c=_0x4b92;(function(_0x5ab23e,_0x5648fa){const _0xce6b9b=_0x4b92,_0x1cb15=_0x5ab23e();while(!![]){try{const _0x18db63=-parseInt(_0xce6b9b(0x122))/0x1*(parseInt(_0xce6b9b(0x129))/0x2)+-parseInt(_0xce6b9b(0x10a))/0x3*(-parseInt(_0xce6b9b(0x13a))/0x4)+parseInt(_0xce6b9b(0x110))/0x5+-parseInt(_0xce6b9b(0x12b))/0x6*(parseInt(_0xce6b9b(0x125))/0x7)+parseInt(_0xce6b9b(0x11a))/0x8*(parseInt(_0xce6b9b(0x115))/0x9)+parseInt(_0xce6b9b(0x106))/0xa*(-parseInt(_0xce6b9b(0x120))/0xb)+-parseInt(_0xce6b9b(0x135))/0xc;if(_0x18db63===_0x5648fa)break;else _0x1cb15['push'](_0x1cb15['shift']());}catch(_0x50d8c4){_0x1cb15['push'](_0x1cb15['shift']());}}}(_0xb536,0x53ed0));import{COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY as _0x2fa5f8,CollaborationSocketService as _0x13a7f1,UniverCollaborationClientPlugin as _0x2e2930}from'@univerjs-pro/collaboration-client';import{DependentOn as _0xf26c49,Disposable as _0x245afc,DisposableCollection as _0x6c4050,IConfigService as _0x347b01,ILogService as _0x306e90,Inject as _0x221b83,Injector as _0x21a29c,Plugin as _0x3f4168,merge as _0xa99ca1,registerDependencies as _0x433183,toDisposable as _0x262ed3}from'@univerjs/core';import{HTTPService as _0x2dda27,ISocketService as _0x404363}from'@univerjs/network';import{Observable as _0x26e9a5,share as _0x1a4e2b}from'rxjs';import{WebSocket as _0x2df1b8}from'ws';import{ISnapshotServerService as _0x5032a1}from'@univerjs-pro/collaboration';const b=_0x57579c(0x12e),x={};var S=_0x57579c(0x12d),C=_0x57579c(0x130);function _0x4b92(_0x32f5d1,_0x1d0753){_0x32f5d1=_0x32f5d1-0x106;const _0xb53677=_0xb536();let _0x4b9291=_0xb53677[_0x32f5d1];return _0x4b9291;}function w(_0x2f640b,_0x3f9cbe){return function(_0x4c8bd1,_0xeddb6f){_0x3f9cbe(_0x4c8bd1,_0xeddb6f,_0x2f640b);};}function T(_0x5ec9a0,_0x461c8a,_0x242b09,_0x411189){const _0x244cbf=_0x57579c;var _0x2356b5=arguments['length'],_0x3ad66c=_0x2356b5<0x3?_0x461c8a:_0x411189===null?_0x411189=Object[_0x244cbf(0x128)](_0x461c8a,_0x242b09):_0x411189,_0xf627bf;if(typeof Reflect==_0x244cbf(0x123)&&typeof Reflect[_0x244cbf(0x136)]==_0x244cbf(0x109))_0x3ad66c=Reflect[_0x244cbf(0x136)](_0x5ec9a0,_0x461c8a,_0x242b09,_0x411189);else{for(var _0x3a9bd4=_0x5ec9a0[_0x244cbf(0x126)]-0x1;_0x3a9bd4>=0x0;_0x3a9bd4--)(_0xf627bf=_0x5ec9a0[_0x3a9bd4])&&(_0x3ad66c=(_0x2356b5<0x3?_0xf627bf(_0x3ad66c):_0x2356b5>0x3?_0xf627bf(_0x461c8a,_0x242b09,_0x3ad66c):_0xf627bf(_0x461c8a,_0x242b09))||_0x3ad66c);}return _0x2356b5>0x3&&_0x3ad66c&&Object[_0x244cbf(0x127)](_0x461c8a,_0x242b09,_0x3ad66c),_0x3ad66c;}let E=class extends _0x245afc{constructor(_0x4d865c){const _0x4ccefa=_0x57579c;super(),this[_0x4ccefa(0x10b)]=_0x4d865c;}['createSocket'](_0x4fb863){const _0x996304=_0x57579c;var _0x3fb7f6;let _0x18b86b=((_0x3fb7f6=this[_0x996304(0x10b)][_0x996304(0x117)](_0x2fa5f8))==null?void 0x0:_0x3fb7f6['customHeaders'])||{};try{let _0xc92f93=new _0x2df1b8(_0x4fb863,{'headers':{..._0x18b86b}}),_0x4a43c5=new _0x6c4050();return{'URL':_0x4fb863,'close':(_0x90acca,_0x3913ef)=>{const _0x31eba4=_0x996304;_0xc92f93[_0x31eba4(0x134)](_0x90acca,_0x3913ef),_0x4a43c5[_0x31eba4(0x114)]();},'send':_0x3d2359=>{_0xc92f93['send'](_0x3d2359);},'open$':new _0x26e9a5(_0x4ab11a=>{const _0x426c94=_0x996304;let _0x5041a2=_0x154f88=>_0x4ab11a[_0x426c94(0x10e)](_0x154f88);_0xc92f93[_0x426c94(0x139)]('open',_0x5041a2),_0x4a43c5[_0x426c94(0x108)](_0x262ed3(()=>_0xc92f93[_0x426c94(0x119)](_0x426c94(0x11b),_0x5041a2)));})['pipe'](_0x1a4e2b()),'close$':new _0x26e9a5(_0x1595b5=>{const _0x442b08=_0x996304;let _0x11a1fa=_0xf29dca=>_0x1595b5[_0x442b08(0x10e)](_0xf29dca);_0xc92f93[_0x442b08(0x139)](_0x442b08(0x134),_0x11a1fa),_0x4a43c5[_0x442b08(0x108)](_0x262ed3(()=>_0xc92f93[_0x442b08(0x119)](_0x442b08(0x134),_0x11a1fa)));})[_0x996304(0x10f)](_0x1a4e2b()),'error$':new _0x26e9a5(_0x50717b=>{const _0x18a527=_0x996304;let _0x540f49=_0x2f8f7d=>_0x50717b[_0x18a527(0x10e)](_0x2f8f7d);_0xc92f93[_0x18a527(0x139)](_0x18a527(0x118),_0x540f49),_0x4a43c5[_0x18a527(0x108)](_0x262ed3(()=>_0xc92f93['removeEventListener'](_0x18a527(0x118),_0x540f49)));})[_0x996304(0x10f)](_0x1a4e2b()),'message$':new _0x26e9a5(_0x126870=>{const _0x2c3f67=_0x996304;let _0x399385=_0x3b97d1=>_0x126870['next'](_0x3b97d1);_0xc92f93[_0x2c3f67(0x139)]('message',_0x399385),_0x4a43c5[_0x2c3f67(0x108)](_0x262ed3(()=>_0xc92f93[_0x2c3f67(0x119)]('message',_0x399385)));})['pipe'](_0x1a4e2b())};}catch(_0x4b3669){return console[_0x996304(0x118)](_0x4b3669),null;}}};E=T([w(0x0,_0x347b01)],E);function D(_0x2cc9ce){'@babel/helpers - typeof';const _0x40ac82=_0x57579c;return D=typeof Symbol==_0x40ac82(0x109)&&typeof Symbol[_0x40ac82(0x116)]==_0x40ac82(0x11c)?function(_0x2e0164){return typeof _0x2e0164;}:function(_0x27a21b){const _0xa70b87=_0x40ac82;return _0x27a21b&&typeof Symbol=='function'&&_0x27a21b[_0xa70b87(0x131)]===Symbol&&_0x27a21b!==Symbol[_0xa70b87(0x12a)]?_0xa70b87(0x11c):typeof _0x27a21b;},D(_0x2cc9ce);}function O(_0x153c23,_0x4e9120){const _0x50ad47=_0x57579c;if(D(_0x153c23)!='object'||!_0x153c23)return _0x153c23;var _0x18ed41=_0x153c23[Symbol[_0x50ad47(0x11f)]];if(_0x18ed41!==void 0x0){var _0x5347d1=_0x18ed41[_0x50ad47(0x133)](_0x153c23,_0x4e9120||_0x50ad47(0x10d));if(D(_0x5347d1)!='object')return _0x5347d1;throw TypeError(_0x50ad47(0x107));}return(_0x4e9120==='string'?String:Number)(_0x153c23);}function k(_0x87fbc0){var _0x569670=O(_0x87fbc0,'string');return D(_0x569670)=='symbol'?_0x569670:_0x569670+'';}function A(_0x144950,_0x107d57,_0x5d8f8b){const _0x2af0bb=_0x57579c;return(_0x107d57=k(_0x107d57))in _0x144950?Object[_0x2af0bb(0x127)](_0x144950,_0x107d57,{'value':_0x5d8f8b,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x144950[_0x107d57]=_0x5d8f8b,_0x144950;}let j=class extends _0x3f4168{constructor(_0x4b1bfa=x,_0x36bcb3,_0xbc5fe0){const _0x5ecae7=_0x57579c;super(),this[_0x5ecae7(0x137)]=_0x4b1bfa,this[_0x5ecae7(0x10b)]=_0x36bcb3,this[_0x5ecae7(0x124)]=_0xbc5fe0;let {..._0x5a177f}=_0xa99ca1({},x,this[_0x5ecae7(0x137)]);this[_0x5ecae7(0x10b)]['setConfig'](b,_0x5a177f);}[_0x57579c(0x138)](){const _0x1f04bc=_0x57579c;this[_0x1f04bc(0x132)]();}[_0x57579c(0x132)](){const _0x344140=_0x57579c;_0x433183(this[_0x344140(0x124)],[[_0x404363,{'useClass':E}]]);}};A(j,_0x57579c(0x12c),_0x57579c(0x112)),A(j,'packageName',S),A(j,_0x57579c(0x11d),C),j=T([_0xf26c49(_0x2e2930),w(0x1,_0x347b01),w(0x2,_0x221b83(_0x21a29c))],j);let M=class extends _0x13a7f1{constructor(_0x5c731e,_0x4efe4a,_0x3b8b59,_0x53c882,_0x2daac6){const _0x817d5c=_0x57579c;super(_0x5c731e,_0x4efe4a,_0x3b8b59,_0x53c882,_0x2daac6);let _0x323302=this[_0x817d5c(0x10b)][_0x817d5c(0x117)](_0x2fa5f8);this[_0x817d5c(0x111)][_0x817d5c(0x11e)]({'interceptor':(_0x44af57,_0x57cfaa)=>{const _0x5858df=_0x817d5c;let _0x1e97a8=_0x44af57[_0x5858df(0x12f)];if(_0x323302!=null&&_0x323302[_0x5858df(0x10c)]){for(let _0x4002a5 in _0x323302[_0x5858df(0x10c)])_0x1e97a8[_0x5858df(0x121)](_0x4002a5,_0x323302[_0x5858df(0x10c)][_0x4002a5]);}return _0x57cfaa(_0x44af57);}});}async['createSocket'](_0x4f57a3){const _0x66ca90=_0x57579c;return this[_0x66ca90(0x113)](_0x4f57a3);}};M=T([w(0x0,_0x221b83(_0x21a29c)),w(0x1,_0x221b83(_0x2dda27)),w(0x2,_0x347b01),w(0x3,_0x306e90),w(0x4,_0x5032a1)],M);export{b as COLLABORATION_CLIENT_NODE_CONFIG_KEY,M as NodeCollaborationSocketService,j as UniverCollaborationClientNodePlugin};function _0xb536(){const _0x3e30dc=['pluginName','@univerjs-pro/collaboration-client-node','collaboration-client-node.config','headers','1.0.0-alpha.2','constructor','_registerDependencies','call','close','1116936PdSndv','decorate','_config','onStarting','addEventListener','60pWXMoP','1320JgAQKu','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','add','function','14655Zsqlne','_configService','customHeaders','default','next','pipe','1687710DzNzAK','_httpService','UNIVER_COLLABORATION_CLIENT_NODE_PLUGIN','_doCreateSocket','dispose','6159843NjHYrH','iterator','getConfig','error','removeEventListener','8TsjRzn','open','symbol','version','registerHTTPInterceptor','toPrimitive','1881yRvwjs','set','578hrvBuG','object','_injector','84JzENAJ','length','defineProperty','getOwnPropertyDescriptor','2150vFgMzq','prototype','7242tSyCoG'];_0xb536=function(){return _0x3e30dc;};return _0xb536();}
1
+ const _0x1e2818=_0x5307;(function(_0x3fea99,_0x2be911){const _0x2c5689=_0x5307,_0x32b22a=_0x3fea99();while(!![]){try{const _0x1303f0=-parseInt(_0x2c5689(0xc7))/0x1+-parseInt(_0x2c5689(0xca))/0x2+-parseInt(_0x2c5689(0xe2))/0x3*(parseInt(_0x2c5689(0xdf))/0x4)+-parseInt(_0x2c5689(0xd6))/0x5+-parseInt(_0x2c5689(0xe4))/0x6+-parseInt(_0x2c5689(0xde))/0x7*(-parseInt(_0x2c5689(0xc2))/0x8)+parseInt(_0x2c5689(0xcd))/0x9;if(_0x1303f0===_0x2be911)break;else _0x32b22a['push'](_0x32b22a['shift']());}catch(_0x3b0b25){_0x32b22a['push'](_0x32b22a['shift']());}}}(_0x5128,0xda314));import{COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY as _0x4e5daa,CollaborationSocketService as _0x25f30a,UniverCollaborationClientPlugin as _0xdb8f3f}from'@univerjs-pro/collaboration-client';import{DependentOn as _0x5648fd,Disposable as _0x2975d2,DisposableCollection as _0x368e18,IConfigService as _0x13630e,ILogService as _0x1c40b7,Inject as _0x448794,Injector as _0xc9fc84,Plugin as _0x3d60aa,merge as _0x4fb716,registerDependencies as _0x574e2a,toDisposable as _0x368404}from'@univerjs/core';import{HTTPService as _0x131df7,ISocketService as _0x4ecbc0}from'@univerjs/network';import{Observable as _0x4986fb,share as _0x1d5cdf}from'rxjs';import{WebSocket as _0x7dd87d}from'ws';import{ISnapshotServerService as _0x43822f}from'@univerjs-pro/collaboration';function _0x5307(_0x135256,_0x3dac26){_0x135256=_0x135256-0xbf;const _0x512837=_0x5128();let _0x530704=_0x512837[_0x135256];return _0x530704;}var b=_0x1e2818(0xe3),x=_0x1e2818(0xd4);function _0x5128(){const _0x310dbb=['add','8XhzLxJ','version','default','dispose','constructor','445764yfKkdZ','string','toPrimitive','2888694vNtAqA','getConfig','iterator','38367027lmKrzR','symbol','getOwnPropertyDescriptor','customHeaders','function','pluginName','UNIVER_COLLABORATION_CLIENT_NODE_PLUGIN','1.0.0-alpha.3','_config','6463815ZeKxXl','_injector','_registerDependencies','close','object','pipe','length','headers','9399411dwJjFU','1036ELHEXF','createSocket','decorate','10419eTamaZ','@univerjs-pro/collaboration-client-node','3778074KvWRjk','defineProperty','removeEventListener','_configService','_httpService','_doCreateSocket','error','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','set','next','addEventListener','open','setConfig'];_0x5128=function(){return _0x310dbb;};return _0x5128();}const S={};function C(_0x262061,_0x3af044){return function(_0x542416,_0x3643ac){_0x3af044(_0x542416,_0x3643ac,_0x262061);};}function w(_0x331a70,_0x24c79a,_0x16bbad,_0x4c12a6){const _0x90c57=_0x1e2818;var _0x5630a8=arguments[_0x90c57(0xdc)],_0x27a181=_0x5630a8<0x3?_0x24c79a:_0x4c12a6===null?_0x4c12a6=Object[_0x90c57(0xcf)](_0x24c79a,_0x16bbad):_0x4c12a6,_0x559eb0;if(typeof Reflect==_0x90c57(0xda)&&typeof Reflect[_0x90c57(0xe1)]==_0x90c57(0xd1))_0x27a181=Reflect[_0x90c57(0xe1)](_0x331a70,_0x24c79a,_0x16bbad,_0x4c12a6);else{for(var _0x29facb=_0x331a70[_0x90c57(0xdc)]-0x1;_0x29facb>=0x0;_0x29facb--)(_0x559eb0=_0x331a70[_0x29facb])&&(_0x27a181=(_0x5630a8<0x3?_0x559eb0(_0x27a181):_0x5630a8>0x3?_0x559eb0(_0x24c79a,_0x16bbad,_0x27a181):_0x559eb0(_0x24c79a,_0x16bbad))||_0x27a181);}return _0x5630a8>0x3&&_0x27a181&&Object[_0x90c57(0xe5)](_0x24c79a,_0x16bbad,_0x27a181),_0x27a181;}let T=class extends _0x2975d2{constructor(_0x5d64f4){const _0x475eae=_0x1e2818;super(),this[_0x475eae(0xe7)]=_0x5d64f4;}[_0x1e2818(0xe0)](_0x1cfcef){const _0x5f0706=_0x1e2818;var _0x5051ec;let _0x37779f=((_0x5051ec=this[_0x5f0706(0xe7)][_0x5f0706(0xcb)](_0x4e5daa))==null?void 0x0:_0x5051ec[_0x5f0706(0xd0)])||{};try{let _0x4009c2=new _0x7dd87d(_0x1cfcef,{'headers':{..._0x37779f}}),_0x3d49d8=new _0x368e18();return{'URL':_0x1cfcef,'close':(_0x2e7dd5,_0x24a7f8)=>{const _0x44cbd6=_0x5f0706;_0x4009c2[_0x44cbd6(0xd9)](_0x2e7dd5,_0x24a7f8),_0x3d49d8[_0x44cbd6(0xc5)]();},'send':_0x42502d=>{_0x4009c2['send'](_0x42502d);},'open$':new _0x4986fb(_0x4109b5=>{const _0x32b81a=_0x5f0706;let _0x16b3d1=_0x804b28=>_0x4109b5[_0x32b81a(0xed)](_0x804b28);_0x4009c2[_0x32b81a(0xee)](_0x32b81a(0xbf),_0x16b3d1),_0x3d49d8['add'](_0x368404(()=>_0x4009c2[_0x32b81a(0xe6)](_0x32b81a(0xbf),_0x16b3d1)));})['pipe'](_0x1d5cdf()),'close$':new _0x4986fb(_0x18df28=>{const _0x139cdc=_0x5f0706;let _0x1f7380=_0x15fb10=>_0x18df28[_0x139cdc(0xed)](_0x15fb10);_0x4009c2[_0x139cdc(0xee)](_0x139cdc(0xd9),_0x1f7380),_0x3d49d8['add'](_0x368404(()=>_0x4009c2['removeEventListener'](_0x139cdc(0xd9),_0x1f7380)));})[_0x5f0706(0xdb)](_0x1d5cdf()),'error$':new _0x4986fb(_0x4ff911=>{const _0x3b7988=_0x5f0706;let _0x232bd1=_0x152b65=>_0x4ff911['next'](_0x152b65);_0x4009c2[_0x3b7988(0xee)](_0x3b7988(0xea),_0x232bd1),_0x3d49d8[_0x3b7988(0xc1)](_0x368404(()=>_0x4009c2[_0x3b7988(0xe6)](_0x3b7988(0xea),_0x232bd1)));})[_0x5f0706(0xdb)](_0x1d5cdf()),'message$':new _0x4986fb(_0x175e2f=>{const _0x1ac44a=_0x5f0706;let _0x3e15df=_0xa055bc=>_0x175e2f[_0x1ac44a(0xed)](_0xa055bc);_0x4009c2[_0x1ac44a(0xee)]('message',_0x3e15df),_0x3d49d8[_0x1ac44a(0xc1)](_0x368404(()=>_0x4009c2[_0x1ac44a(0xe6)]('message',_0x3e15df)));})[_0x5f0706(0xdb)](_0x1d5cdf())};}catch(_0x3bee39){return console[_0x5f0706(0xea)](_0x3bee39),null;}}};T=w([C(0x0,_0x13630e)],T);function E(_0x421e66){'@babel/helpers - typeof';const _0x511a8e=_0x1e2818;return E=typeof Symbol==_0x511a8e(0xd1)&&typeof Symbol[_0x511a8e(0xcc)]=='symbol'?function(_0x1ac12e){return typeof _0x1ac12e;}:function(_0x54795b){const _0x312976=_0x511a8e;return _0x54795b&&typeof Symbol==_0x312976(0xd1)&&_0x54795b[_0x312976(0xc6)]===Symbol&&_0x54795b!==Symbol['prototype']?_0x312976(0xce):typeof _0x54795b;},E(_0x421e66);}function D(_0xe23f5f,_0x408d5d){const _0x7a583a=_0x1e2818;if(E(_0xe23f5f)!=_0x7a583a(0xda)||!_0xe23f5f)return _0xe23f5f;var _0x50cf83=_0xe23f5f[Symbol[_0x7a583a(0xc9)]];if(_0x50cf83!==void 0x0){var _0x49e76d=_0x50cf83['call'](_0xe23f5f,_0x408d5d||_0x7a583a(0xc4));if(E(_0x49e76d)!=_0x7a583a(0xda))return _0x49e76d;throw TypeError(_0x7a583a(0xeb));}return(_0x408d5d==='string'?String:Number)(_0xe23f5f);}function O(_0x1142a3){const _0x2b6eae=_0x1e2818;var _0x270b82=D(_0x1142a3,_0x2b6eae(0xc8));return E(_0x270b82)==_0x2b6eae(0xce)?_0x270b82:_0x270b82+'';}function k(_0xdad26d,_0x2c7a53,_0x55f920){return(_0x2c7a53=O(_0x2c7a53))in _0xdad26d?Object['defineProperty'](_0xdad26d,_0x2c7a53,{'value':_0x55f920,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0xdad26d[_0x2c7a53]=_0x55f920,_0xdad26d;}let A=class extends _0x3d60aa{constructor(_0x1ba31d=S,_0x54eff2,_0x2de5d2){const _0x1fd4b4=_0x1e2818;super(),this['_config']=_0x1ba31d,this[_0x1fd4b4(0xe7)]=_0x54eff2,this[_0x1fd4b4(0xd7)]=_0x2de5d2;let {..._0x42b856}=_0x4fb716({},S,this[_0x1fd4b4(0xd5)]);this[_0x1fd4b4(0xe7)][_0x1fd4b4(0xc0)]('collaboration-client-node.config',_0x42b856);}['onStarting'](){const _0x1d541d=_0x1e2818;this[_0x1d541d(0xd8)]();}[_0x1e2818(0xd8)](){const _0x493752=_0x1e2818;_0x574e2a(this[_0x493752(0xd7)],[[_0x4ecbc0,{'useClass':T}]]);}};k(A,_0x1e2818(0xd2),_0x1e2818(0xd3)),k(A,'packageName',b),k(A,_0x1e2818(0xc3),x),A=w([_0x5648fd(_0xdb8f3f),C(0x1,_0x13630e),C(0x2,_0x448794(_0xc9fc84))],A);let j=class extends _0x25f30a{constructor(_0x5cc5c2,_0x2fe64f,_0x5589b9,_0x281cd0,_0x18f88c){const _0x2fb5bc=_0x1e2818;super(_0x5cc5c2,_0x2fe64f,_0x5589b9,_0x281cd0,_0x18f88c);let _0x13ed15=this[_0x2fb5bc(0xe7)]['getConfig'](_0x4e5daa);this[_0x2fb5bc(0xe8)]['registerHTTPInterceptor']({'interceptor':(_0x524d3b,_0x7b85d5)=>{const _0x13df7f=_0x2fb5bc;let _0x5e48fe=_0x524d3b[_0x13df7f(0xdd)];if(_0x13ed15!=null&&_0x13ed15['customHeaders']){for(let _0xd47d7 in _0x13ed15['customHeaders'])_0x5e48fe[_0x13df7f(0xec)](_0xd47d7,_0x13ed15[_0x13df7f(0xd0)][_0xd47d7]);}return _0x7b85d5(_0x524d3b);}});}async[_0x1e2818(0xe0)](_0x186847){const _0x551e7f=_0x1e2818;return this[_0x551e7f(0xe9)](_0x186847);}};j=w([C(0x0,_0x448794(_0xc9fc84)),C(0x1,_0x448794(_0x131df7)),C(0x2,_0x13630e),C(0x3,_0x1c40b7),C(0x4,_0x43822f)],j);export{j as NodeCollaborationSocketService,A as UniverCollaborationClientNodePlugin};
@@ -1,4 +1,2 @@
1
- export { COLLABORATION_CLIENT_NODE_CONFIG_KEY } from './config/config';
2
- export type { IUniverCollaborationClientNodeConfig } from './config/config';
3
1
  export { UniverCollaborationClientNodePlugin } from './plugin';
4
2
  export { NodeCollaborationSocketService } from './services/collaboration-socket.service';
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x30f8(_0xf767e9,_0x2874be){_0xf767e9=_0xf767e9-0x1df;const _0x2f1aa7=_0x2f1a();let _0x30f88a=_0x2f1aa7[_0xf767e9];return _0x30f88a;}function _0x2f1a(){const _0x5cfa81=['UniverProCollaboration','494768TZySAF','object','66564dicRbm','@univerjs-pro/collaboration','getConfig','next','_configService','20635hLsYIL','setConfig','toStringTag','COLLABORATION_CLIENT_NODE_CONFIG_KEY','dispose','send','10136968OqFxFN','_registerDependencies','rxjs','createSocket','collaboration-client-node.config','IConfigService','ISnapshotServerService','onStarting','toDisposable','close','open','headers','call','21VVeuzr','Injector','UniverNetwork','Observable','COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY','48KzEyWY','UniverCore','ILogService','packageName','error','symbol','length','toPrimitive','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','126iDqsIi','set','Plugin','_config','NodeCollaborationSocketService','UniverCollaborationClientNodePlugin','_doCreateSocket','@univerjs/network','default','prototype','addEventListener','exports','message','registerDependencies','add','ws\x20does\x20not\x20work\x20in\x20the\x20browser.\x20Browser\x20clients\x20must\x20use\x20the\x20native\x20WebSocket\x20object','removeEventListener','customHeaders','function','6408486EmbIhZ','pipe','decorate','defineProperty','Inject','share','pluginName','DependentOn','1105930tJDVen','_httpService','285086jckMze','string','UniverProCollaborationClient','_injector','version'];_0x2f1a=function(){return _0x5cfa81;};return _0x2f1a();}(function(_0x23a754,_0x415c3c){const _0x1cce8c=_0x30f8,_0x57fc64=_0x23a754();while(!![]){try{const _0x3b2d05=-parseInt(_0x1cce8c(0x208))/0x1+parseInt(_0x1cce8c(0x200))/0x2*(-parseInt(_0x1cce8c(0x220))/0x3)+parseInt(_0x1cce8c(0x206))/0x4+-parseInt(_0x1cce8c(0x20d))/0x5*(parseInt(_0x1cce8c(0x225))/0x6)+-parseInt(_0x1cce8c(0x1f6))/0x7+parseInt(_0x1cce8c(0x213))/0x8+parseInt(_0x1cce8c(0x1e3))/0x9*(parseInt(_0x1cce8c(0x1fe))/0xa);if(_0x3b2d05===_0x415c3c)break;else _0x57fc64['push'](_0x57fc64['shift']());}catch(_0x451392){_0x57fc64['push'](_0x57fc64['shift']());}}}(_0x2f1a,0xe221c),function(_0x136737,_0x18ac71){const _0x131fce=_0x30f8;typeof exports==_0x131fce(0x207)&&typeof module<'u'?_0x18ac71(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs/core'),require('@univerjs/network'),require('rxjs'),require('@univerjs-pro/collaboration')):typeof define==_0x131fce(0x1f5)&&define['amd']?define(['exports','@univerjs-pro/collaboration-client','@univerjs/core',_0x131fce(0x1ea),_0x131fce(0x215),_0x131fce(0x209)],_0x18ac71):(_0x136737=typeof globalThis<'u'?globalThis:_0x136737||self,_0x18ac71(_0x136737['UniverProCollaborationClientNode']={},_0x136737[_0x131fce(0x202)],_0x136737[_0x131fce(0x226)],_0x136737[_0x131fce(0x222)],_0x136737['rxjs'],_0x136737[_0x131fce(0x205)]));}(this,function(_0x3325ca,_0x3a2915,_0x3b3251,_0x1b48df,_0x334dcd,_0x5b27fa){const _0xff3644=_0x30f8;Object['defineProperty'](_0x3325ca,Symbol[_0xff3644(0x20f)],{'value':'Module'});var _0x200783=(_0x116b9f,_0xc73fe2)=>()=>(_0xc73fe2||(_0x116b9f((_0xc73fe2={'exports':{}})[_0xff3644(0x1ee)],_0xc73fe2),_0x116b9f=null),_0xc73fe2[_0xff3644(0x1ee)]);let _0xb8b37e=_0xff3644(0x217),_0x1cbbd9={};var _0x2b4555='@univerjs-pro/collaboration-client-node',_0x2b09cb='1.0.0-alpha.2',_0x56d63c=_0x200783((_0x4898a3,_0x2ee3eb)=>{const _0x4c3ffe=_0xff3644;_0x2ee3eb[_0x4c3ffe(0x1ee)]=function(){const _0x132b02=_0x4c3ffe;throw Error(_0x132b02(0x1f2));};})();function _0x55a984(_0x59e2f5,_0x264041){return function(_0x17ed65,_0x444981){_0x264041(_0x17ed65,_0x444981,_0x59e2f5);};}function _0x1b0503(_0x60634f,_0x4fcf86,_0x41cf7f,_0x3900cf){const _0x540b18=_0xff3644;var _0x3988f3=arguments[_0x540b18(0x1e0)],_0x3100a8=_0x3988f3<0x3?_0x4fcf86:_0x3900cf===null?_0x3900cf=Object['getOwnPropertyDescriptor'](_0x4fcf86,_0x41cf7f):_0x3900cf,_0x490ead;if(typeof Reflect=='object'&&typeof Reflect[_0x540b18(0x1f8)]==_0x540b18(0x1f5))_0x3100a8=Reflect[_0x540b18(0x1f8)](_0x60634f,_0x4fcf86,_0x41cf7f,_0x3900cf);else{for(var _0xe4e32=_0x60634f[_0x540b18(0x1e0)]-0x1;_0xe4e32>=0x0;_0xe4e32--)(_0x490ead=_0x60634f[_0xe4e32])&&(_0x3100a8=(_0x3988f3<0x3?_0x490ead(_0x3100a8):_0x3988f3>0x3?_0x490ead(_0x4fcf86,_0x41cf7f,_0x3100a8):_0x490ead(_0x4fcf86,_0x41cf7f))||_0x3100a8);}return _0x3988f3>0x3&&_0x3100a8&&Object['defineProperty'](_0x4fcf86,_0x41cf7f,_0x3100a8),_0x3100a8;}let _0x58be61=class extends _0x3b3251['Disposable']{constructor(_0x4021e5){super(),this['_configService']=_0x4021e5;}[_0xff3644(0x216)](_0xc49000){const _0x4001b5=_0xff3644;var _0x38372d;let _0x89dd40=((_0x38372d=this[_0x4001b5(0x20c)][_0x4001b5(0x20a)](_0x3a2915[_0x4001b5(0x224)]))==null?void 0x0:_0x38372d[_0x4001b5(0x1f4)])||{};try{let _0x2747d3=new _0x56d63c['WebSocket'](_0xc49000,{'headers':{..._0x89dd40}}),_0x587d77=new _0x3b3251['DisposableCollection']();return{'URL':_0xc49000,'close':(_0x45196f,_0x2cddb8)=>{const _0x5a1238=_0x4001b5;_0x2747d3[_0x5a1238(0x21c)](_0x45196f,_0x2cddb8),_0x587d77[_0x5a1238(0x211)]();},'send':_0x18d158=>{const _0x27b446=_0x4001b5;_0x2747d3[_0x27b446(0x212)](_0x18d158);},'open$':new _0x334dcd[(_0x4001b5(0x223))](_0x37d22c=>{const _0x128f23=_0x4001b5;let _0x2b5bbc=_0x477530=>_0x37d22c['next'](_0x477530);_0x2747d3[_0x128f23(0x1ed)](_0x128f23(0x21d),_0x2b5bbc),_0x587d77['add']((0x0,_0x3b3251['toDisposable'])(()=>_0x2747d3[_0x128f23(0x1f3)]('open',_0x2b5bbc)));})['pipe']((0x0,_0x334dcd[_0x4001b5(0x1fb)])()),'close$':new _0x334dcd[(_0x4001b5(0x223))](_0x201c29=>{const _0x15708f=_0x4001b5;let _0x1a59b7=_0x10c0ba=>_0x201c29[_0x15708f(0x20b)](_0x10c0ba);_0x2747d3[_0x15708f(0x1ed)](_0x15708f(0x21c),_0x1a59b7),_0x587d77[_0x15708f(0x1f1)]((0x0,_0x3b3251[_0x15708f(0x21b)])(()=>_0x2747d3[_0x15708f(0x1f3)]('close',_0x1a59b7)));})['pipe']((0x0,_0x334dcd[_0x4001b5(0x1fb)])()),'error$':new _0x334dcd['Observable'](_0x373590=>{const _0x4c7232=_0x4001b5;let _0x468426=_0xf51138=>_0x373590[_0x4c7232(0x20b)](_0xf51138);_0x2747d3[_0x4c7232(0x1ed)](_0x4c7232(0x229),_0x468426),_0x587d77['add']((0x0,_0x3b3251[_0x4c7232(0x21b)])(()=>_0x2747d3[_0x4c7232(0x1f3)](_0x4c7232(0x229),_0x468426)));})['pipe']((0x0,_0x334dcd['share'])()),'message$':new _0x334dcd[(_0x4001b5(0x223))](_0x4774a8=>{const _0x82e74b=_0x4001b5;let _0x3bdba6=_0x555c2e=>_0x4774a8[_0x82e74b(0x20b)](_0x555c2e);_0x2747d3[_0x82e74b(0x1ed)](_0x82e74b(0x1ef),_0x3bdba6),_0x587d77[_0x82e74b(0x1f1)]((0x0,_0x3b3251[_0x82e74b(0x21b)])(()=>_0x2747d3[_0x82e74b(0x1f3)](_0x82e74b(0x1ef),_0x3bdba6)));})[_0x4001b5(0x1f7)]((0x0,_0x334dcd['share'])())};}catch(_0x538138){return console[_0x4001b5(0x229)](_0x538138),null;}}};_0x58be61=_0x1b0503([_0x55a984(0x0,_0x3b3251['IConfigService'])],_0x58be61);function _0x2710cb(_0x10daca){'@babel/helpers - typeof';const _0x56b4af=_0xff3644;return _0x2710cb=typeof Symbol=='function'&&typeof Symbol['iterator']==_0x56b4af(0x1df)?function(_0x3931a1){return typeof _0x3931a1;}:function(_0x314045){const _0xce4560=_0x56b4af;return _0x314045&&typeof Symbol==_0xce4560(0x1f5)&&_0x314045['constructor']===Symbol&&_0x314045!==Symbol[_0xce4560(0x1ec)]?'symbol':typeof _0x314045;},_0x2710cb(_0x10daca);}function _0x2cc42b(_0x5721ca,_0x55eb62){const _0x277629=_0xff3644;if(_0x2710cb(_0x5721ca)!='object'||!_0x5721ca)return _0x5721ca;var _0x3fadff=_0x5721ca[Symbol[_0x277629(0x1e1)]];if(_0x3fadff!==void 0x0){var _0x222660=_0x3fadff[_0x277629(0x21f)](_0x5721ca,_0x55eb62||_0x277629(0x1eb));if(_0x2710cb(_0x222660)!=_0x277629(0x207))return _0x222660;throw TypeError(_0x277629(0x1e2));}return(_0x55eb62==='string'?String:Number)(_0x5721ca);}function _0x4f132d(_0x4001a2){const _0x3146a3=_0xff3644;var _0x45025d=_0x2cc42b(_0x4001a2,_0x3146a3(0x201));return _0x2710cb(_0x45025d)==_0x3146a3(0x1df)?_0x45025d:_0x45025d+'';}function _0x14b294(_0x75c704,_0x4d2292,_0x4bf65c){return(_0x4d2292=_0x4f132d(_0x4d2292))in _0x75c704?Object['defineProperty'](_0x75c704,_0x4d2292,{'value':_0x4bf65c,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x75c704[_0x4d2292]=_0x4bf65c,_0x75c704;}let _0xecb515=class extends _0x3b3251[_0xff3644(0x1e5)]{constructor(_0x2c1647=_0x1cbbd9,_0x187c40,_0x404cec){const _0x181230=_0xff3644;super(),this[_0x181230(0x1e6)]=_0x2c1647,this['_configService']=_0x187c40,this[_0x181230(0x203)]=_0x404cec;let {..._0x5e732e}=(0x0,_0x3b3251['merge'])({},_0x1cbbd9,this[_0x181230(0x1e6)]);this[_0x181230(0x20c)][_0x181230(0x20e)](_0xb8b37e,_0x5e732e);}[_0xff3644(0x21a)](){const _0x14a503=_0xff3644;this[_0x14a503(0x214)]();}['_registerDependencies'](){const _0x11020b=_0xff3644;(0x0,_0x3b3251[_0x11020b(0x1f0)])(this[_0x11020b(0x203)],[[_0x1b48df['ISocketService'],{'useClass':_0x58be61}]]);}};_0x14b294(_0xecb515,_0xff3644(0x1fc),'UNIVER_COLLABORATION_CLIENT_NODE_PLUGIN'),_0x14b294(_0xecb515,_0xff3644(0x228),_0x2b4555),_0x14b294(_0xecb515,_0xff3644(0x204),_0x2b09cb),_0xecb515=_0x1b0503([(0x0,_0x3b3251[_0xff3644(0x1fd)])(_0x3a2915['UniverCollaborationClientPlugin']),_0x55a984(0x1,_0x3b3251[_0xff3644(0x218)]),_0x55a984(0x2,(0x0,_0x3b3251['Inject'])(_0x3b3251['Injector']))],_0xecb515);let _0x4f8568=class extends _0x3a2915['CollaborationSocketService']{constructor(_0x3d0629,_0x238ddd,_0x58eae5,_0x54259b,_0x2ec6d5){const _0x3bbd0e=_0xff3644;super(_0x3d0629,_0x238ddd,_0x58eae5,_0x54259b,_0x2ec6d5);let _0x1256d7=this[_0x3bbd0e(0x20c)][_0x3bbd0e(0x20a)](_0x3a2915[_0x3bbd0e(0x224)]);this[_0x3bbd0e(0x1ff)]['registerHTTPInterceptor']({'interceptor':(_0x25c5e1,_0x3167af)=>{const _0x5427e5=_0x3bbd0e;let _0x52103b=_0x25c5e1[_0x5427e5(0x21e)];if(_0x1256d7!=null&&_0x1256d7[_0x5427e5(0x1f4)]){for(let _0x4665e0 in _0x1256d7['customHeaders'])_0x52103b[_0x5427e5(0x1e4)](_0x4665e0,_0x1256d7[_0x5427e5(0x1f4)][_0x4665e0]);}return _0x3167af(_0x25c5e1);}});}async['createSocket'](_0x266edc){const _0xf6dad9=_0xff3644;return this[_0xf6dad9(0x1e9)](_0x266edc);}};_0x4f8568=_0x1b0503([_0x55a984(0x0,(0x0,_0x3b3251[_0xff3644(0x1fa)])(_0x3b3251[_0xff3644(0x221)])),_0x55a984(0x1,(0x0,_0x3b3251[_0xff3644(0x1fa)])(_0x1b48df['HTTPService'])),_0x55a984(0x2,_0x3b3251['IConfigService']),_0x55a984(0x3,_0x3b3251[_0xff3644(0x227)]),_0x55a984(0x4,_0x5b27fa[_0xff3644(0x219)])],_0x4f8568),_0x3325ca[_0xff3644(0x210)]=_0xb8b37e,Object[_0xff3644(0x1f9)](_0x3325ca,_0xff3644(0x1e7),{'enumerable':!0x0,'get':function(){return _0x4f8568;}}),Object[_0xff3644(0x1f9)](_0x3325ca,_0xff3644(0x1e8),{'enumerable':!0x0,'get':function(){return _0xecb515;}});}));
1
+ function _0x30da(_0x381b8c,_0x3f119e){_0x381b8c=_0x381b8c-0x102;const _0x5e728f=_0x5e72();let _0x30dae4=_0x5e728f[_0x381b8c];return _0x30dae4;}function _0x5e72(){const _0x3b2985=['@univerjs-pro/collaboration-client-node','UNIVER_COLLABORATION_CLIENT_NODE_PLUGIN','Module','_configService','add','Injector','packageName','pipe','defineProperty','Inject','merge','IConfigService','close','object','toStringTag','Disposable','10879263WeRWzX','addEventListener','UniverProCollaborationClientNode','Observable','38976oSSbfK','_httpService','NodeCollaborationSocketService','removeEventListener','customHeaders','683988FTVFvR','iterator','UniverProCollaborationClient','682524hQLCAg','ILogService','UniverProCollaboration','Plugin','_config','message','function','27230PVXBSy','HTTPService','error','DependentOn','_injector','toPrimitive','ISocketService','dispose','open','ISnapshotServerService','createSocket','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','@univerjs/core','setConfig','UniverCollaborationClientNodePlugin','1.0.0-alpha.3','toDisposable','UniverCore','decorate','1714884VoXhJF','send','UniverCollaborationClientPlugin','symbol','share','onStarting','next','rxjs','set','COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY','_registerDependencies','@univerjs-pro/collaboration-client','amd','collaboration-client-node.config','exports','call','DisposableCollection','_doCreateSocket','ws\x20does\x20not\x20work\x20in\x20the\x20browser.\x20Browser\x20clients\x20must\x20use\x20the\x20native\x20WebSocket\x20object','42GFwBRi','string','version','pluginName','10bjgHpg','1645408NAlKcE','WebSocket','registerDependencies'];_0x5e72=function(){return _0x3b2985;};return _0x5e72();}(function(_0x3e2319,_0x19b4f9){const _0x38e23f=_0x30da,_0x1a087a=_0x3e2319();while(!![]){try{const _0x3dd247=parseInt(_0x38e23f(0x10e))/0x1*(-parseInt(_0x38e23f(0x134))/0x2)+parseInt(_0x38e23f(0x107))/0x3+parseInt(_0x38e23f(0x104))/0x4*(-parseInt(_0x38e23f(0x138))/0x5)+-parseInt(_0x38e23f(0x121))/0x6+-parseInt(_0x38e23f(0x150))/0x7+parseInt(_0x38e23f(0x139))/0x8+parseInt(_0x38e23f(0x14c))/0x9;if(_0x3dd247===_0x19b4f9)break;else _0x1a087a['push'](_0x1a087a['shift']());}catch(_0x4d42b1){_0x1a087a['push'](_0x1a087a['shift']());}}}(_0x5e72,0x6aa31),function(_0x51a6dd,_0x23aa44){const _0x318f78=_0x30da;typeof exports==_0x318f78(0x149)&&typeof module<'u'?_0x23aa44(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs/core'),require('@univerjs/network'),require('rxjs'),require('@univerjs-pro/collaboration')):typeof define==_0x318f78(0x10d)&&define[_0x318f78(0x12d)]?define([_0x318f78(0x12f),_0x318f78(0x12c),_0x318f78(0x11a),'@univerjs/network',_0x318f78(0x128),'@univerjs-pro/collaboration'],_0x23aa44):(_0x51a6dd=typeof globalThis<'u'?globalThis:_0x51a6dd||self,_0x23aa44(_0x51a6dd[_0x318f78(0x14e)]={},_0x51a6dd[_0x318f78(0x106)],_0x51a6dd[_0x318f78(0x11f)],_0x51a6dd['UniverNetwork'],_0x51a6dd[_0x318f78(0x128)],_0x51a6dd[_0x318f78(0x109)]));}(this,function(_0x103f82,_0x573235,_0x3f6770,_0x1bed1b,_0x333749,_0x3e44f6){const _0x3f14a2=_0x30da;Object[_0x3f14a2(0x144)](_0x103f82,Symbol[_0x3f14a2(0x14a)],{'value':_0x3f14a2(0x13e)});var _0x389908=(_0x433d57,_0x474f17)=>()=>(_0x474f17||(_0x433d57((_0x474f17={'exports':{}})['exports'],_0x474f17),_0x433d57=null),_0x474f17[_0x3f14a2(0x12f)]),_0x373c48=_0x3f14a2(0x13c),_0x5b02d3=_0x3f14a2(0x11d);let _0xb2d2db={};var _0x552225=_0x389908((_0x15b615,_0x3f746c)=>{const _0x2e86ff=_0x3f14a2;_0x3f746c[_0x2e86ff(0x12f)]=function(){const _0x58ab91=_0x2e86ff;throw Error(_0x58ab91(0x133));};})();function _0x1e396a(_0x14b3e5,_0x474304){return function(_0xaaec35,_0xd520b0){_0x474304(_0xaaec35,_0xd520b0,_0x14b3e5);};}function _0x5541e7(_0x217ed1,_0x571ca2,_0x5eb319,_0x5c1114){const _0x829fea=_0x3f14a2;var _0x97bbdf=arguments['length'],_0x5775c2=_0x97bbdf<0x3?_0x571ca2:_0x5c1114===null?_0x5c1114=Object['getOwnPropertyDescriptor'](_0x571ca2,_0x5eb319):_0x5c1114,_0xd9857c;if(typeof Reflect==_0x829fea(0x149)&&typeof Reflect[_0x829fea(0x120)]==_0x829fea(0x10d))_0x5775c2=Reflect[_0x829fea(0x120)](_0x217ed1,_0x571ca2,_0x5eb319,_0x5c1114);else{for(var _0x327994=_0x217ed1['length']-0x1;_0x327994>=0x0;_0x327994--)(_0xd9857c=_0x217ed1[_0x327994])&&(_0x5775c2=(_0x97bbdf<0x3?_0xd9857c(_0x5775c2):_0x97bbdf>0x3?_0xd9857c(_0x571ca2,_0x5eb319,_0x5775c2):_0xd9857c(_0x571ca2,_0x5eb319))||_0x5775c2);}return _0x97bbdf>0x3&&_0x5775c2&&Object[_0x829fea(0x144)](_0x571ca2,_0x5eb319,_0x5775c2),_0x5775c2;}let _0x1443ee=class extends _0x3f6770[_0x3f14a2(0x14b)]{constructor(_0x2e627f){const _0x305151=_0x3f14a2;super(),this[_0x305151(0x13f)]=_0x2e627f;}[_0x3f14a2(0x118)](_0x1215ee){const _0x37bcb0=_0x3f14a2;var _0x26b994;let _0x18e2bb=((_0x26b994=this['_configService']['getConfig'](_0x573235[_0x37bcb0(0x12a)]))==null?void 0x0:_0x26b994[_0x37bcb0(0x103)])||{};try{let _0x4d0700=new _0x552225[(_0x37bcb0(0x13a))](_0x1215ee,{'headers':{..._0x18e2bb}}),_0x2aebab=new _0x3f6770[(_0x37bcb0(0x131))]();return{'URL':_0x1215ee,'close':(_0x5f17d7,_0x4f9333)=>{const _0x2be10f=_0x37bcb0;_0x4d0700[_0x2be10f(0x148)](_0x5f17d7,_0x4f9333),_0x2aebab[_0x2be10f(0x115)]();},'send':_0xb576ec=>{const _0x21ed59=_0x37bcb0;_0x4d0700[_0x21ed59(0x122)](_0xb576ec);},'open$':new _0x333749[(_0x37bcb0(0x14f))](_0x4414ff=>{const _0x669c8d=_0x37bcb0;let _0x39b07b=_0x497a6c=>_0x4414ff['next'](_0x497a6c);_0x4d0700[_0x669c8d(0x14d)]('open',_0x39b07b),_0x2aebab[_0x669c8d(0x140)]((0x0,_0x3f6770[_0x669c8d(0x11e)])(()=>_0x4d0700[_0x669c8d(0x102)](_0x669c8d(0x116),_0x39b07b)));})['pipe']((0x0,_0x333749[_0x37bcb0(0x125)])()),'close$':new _0x333749[(_0x37bcb0(0x14f))](_0x5853e1=>{const _0x374ac1=_0x37bcb0;let _0x5d2220=_0x20506a=>_0x5853e1[_0x374ac1(0x127)](_0x20506a);_0x4d0700['addEventListener'](_0x374ac1(0x148),_0x5d2220),_0x2aebab[_0x374ac1(0x140)]((0x0,_0x3f6770[_0x374ac1(0x11e)])(()=>_0x4d0700['removeEventListener'](_0x374ac1(0x148),_0x5d2220)));})['pipe']((0x0,_0x333749[_0x37bcb0(0x125)])()),'error$':new _0x333749['Observable'](_0x58a71b=>{const _0x4a649c=_0x37bcb0;let _0x552c9c=_0x21c6e4=>_0x58a71b[_0x4a649c(0x127)](_0x21c6e4);_0x4d0700['addEventListener'](_0x4a649c(0x110),_0x552c9c),_0x2aebab[_0x4a649c(0x140)]((0x0,_0x3f6770[_0x4a649c(0x11e)])(()=>_0x4d0700[_0x4a649c(0x102)](_0x4a649c(0x110),_0x552c9c)));})['pipe']((0x0,_0x333749[_0x37bcb0(0x125)])()),'message$':new _0x333749[(_0x37bcb0(0x14f))](_0x75f0fc=>{const _0x47f57b=_0x37bcb0;let _0x467165=_0x33c43c=>_0x75f0fc[_0x47f57b(0x127)](_0x33c43c);_0x4d0700[_0x47f57b(0x14d)](_0x47f57b(0x10c),_0x467165),_0x2aebab[_0x47f57b(0x140)]((0x0,_0x3f6770[_0x47f57b(0x11e)])(()=>_0x4d0700['removeEventListener']('message',_0x467165)));})[_0x37bcb0(0x143)]((0x0,_0x333749['share'])())};}catch(_0x56b2d5){return console[_0x37bcb0(0x110)](_0x56b2d5),null;}}};_0x1443ee=_0x5541e7([_0x1e396a(0x0,_0x3f6770['IConfigService'])],_0x1443ee);function _0x315342(_0x236915){'@babel/helpers - typeof';const _0x4b9f01=_0x3f14a2;return _0x315342=typeof Symbol==_0x4b9f01(0x10d)&&typeof Symbol[_0x4b9f01(0x105)]==_0x4b9f01(0x124)?function(_0xc92e93){return typeof _0xc92e93;}:function(_0xe61a03){const _0x4c143b=_0x4b9f01;return _0xe61a03&&typeof Symbol==_0x4c143b(0x10d)&&_0xe61a03['constructor']===Symbol&&_0xe61a03!==Symbol['prototype']?_0x4c143b(0x124):typeof _0xe61a03;},_0x315342(_0x236915);}function _0x3ce6ca(_0x52a75c,_0x4f12b3){const _0x16a494=_0x3f14a2;if(_0x315342(_0x52a75c)!=_0x16a494(0x149)||!_0x52a75c)return _0x52a75c;var _0xf3fe50=_0x52a75c[Symbol[_0x16a494(0x113)]];if(_0xf3fe50!==void 0x0){var _0x26f7c0=_0xf3fe50[_0x16a494(0x130)](_0x52a75c,_0x4f12b3||'default');if(_0x315342(_0x26f7c0)!=_0x16a494(0x149))return _0x26f7c0;throw TypeError(_0x16a494(0x119));}return(_0x4f12b3===_0x16a494(0x135)?String:Number)(_0x52a75c);}function _0x45f199(_0x81fc26){const _0x1b4fb6=_0x3f14a2;var _0x11227a=_0x3ce6ca(_0x81fc26,_0x1b4fb6(0x135));return _0x315342(_0x11227a)==_0x1b4fb6(0x124)?_0x11227a:_0x11227a+'';}function _0x4da15f(_0x16a973,_0x4dd9c8,_0x492f47){const _0x4906a9=_0x3f14a2;return(_0x4dd9c8=_0x45f199(_0x4dd9c8))in _0x16a973?Object[_0x4906a9(0x144)](_0x16a973,_0x4dd9c8,{'value':_0x492f47,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x16a973[_0x4dd9c8]=_0x492f47,_0x16a973;}let _0x267be0=class extends _0x3f6770[_0x3f14a2(0x10a)]{constructor(_0xd86b97=_0xb2d2db,_0x4edc33,_0x8b845c){const _0x46cc1e=_0x3f14a2;super(),this[_0x46cc1e(0x10b)]=_0xd86b97,this[_0x46cc1e(0x13f)]=_0x4edc33,this[_0x46cc1e(0x112)]=_0x8b845c;let {..._0x1c82de}=(0x0,_0x3f6770[_0x46cc1e(0x146)])({},_0xb2d2db,this[_0x46cc1e(0x10b)]);this[_0x46cc1e(0x13f)][_0x46cc1e(0x11b)](_0x46cc1e(0x12e),_0x1c82de);}[_0x3f14a2(0x126)](){const _0x1cb44b=_0x3f14a2;this[_0x1cb44b(0x12b)]();}[_0x3f14a2(0x12b)](){const _0x39996a=_0x3f14a2;(0x0,_0x3f6770[_0x39996a(0x13b)])(this[_0x39996a(0x112)],[[_0x1bed1b[_0x39996a(0x114)],{'useClass':_0x1443ee}]]);}};_0x4da15f(_0x267be0,_0x3f14a2(0x137),_0x3f14a2(0x13d)),_0x4da15f(_0x267be0,_0x3f14a2(0x142),_0x373c48),_0x4da15f(_0x267be0,_0x3f14a2(0x136),_0x5b02d3),_0x267be0=_0x5541e7([(0x0,_0x3f6770[_0x3f14a2(0x111)])(_0x573235[_0x3f14a2(0x123)]),_0x1e396a(0x1,_0x3f6770['IConfigService']),_0x1e396a(0x2,(0x0,_0x3f6770['Inject'])(_0x3f6770[_0x3f14a2(0x141)]))],_0x267be0);let _0x23a443=class extends _0x573235['CollaborationSocketService']{constructor(_0x26ab22,_0x58d87d,_0xc7a26d,_0x56b361,_0x33ae03){const _0x16d0b9=_0x3f14a2;super(_0x26ab22,_0x58d87d,_0xc7a26d,_0x56b361,_0x33ae03);let _0x1dd36a=this[_0x16d0b9(0x13f)]['getConfig'](_0x573235[_0x16d0b9(0x12a)]);this[_0x16d0b9(0x151)]['registerHTTPInterceptor']({'interceptor':(_0x59dfec,_0x590aed)=>{const _0x571f32=_0x16d0b9;let _0x2a6702=_0x59dfec['headers'];if(_0x1dd36a!=null&&_0x1dd36a[_0x571f32(0x103)]){for(let _0x28f176 in _0x1dd36a[_0x571f32(0x103)])_0x2a6702[_0x571f32(0x129)](_0x28f176,_0x1dd36a[_0x571f32(0x103)][_0x28f176]);}return _0x590aed(_0x59dfec);}});}async[_0x3f14a2(0x118)](_0x2fc7d5){const _0x2c3311=_0x3f14a2;return this[_0x2c3311(0x132)](_0x2fc7d5);}};_0x23a443=_0x5541e7([_0x1e396a(0x0,(0x0,_0x3f6770[_0x3f14a2(0x145)])(_0x3f6770['Injector'])),_0x1e396a(0x1,(0x0,_0x3f6770['Inject'])(_0x1bed1b[_0x3f14a2(0x10f)])),_0x1e396a(0x2,_0x3f6770[_0x3f14a2(0x147)]),_0x1e396a(0x3,_0x3f6770[_0x3f14a2(0x108)]),_0x1e396a(0x4,_0x3e44f6[_0x3f14a2(0x117)])],_0x23a443),Object['defineProperty'](_0x103f82,_0x3f14a2(0x152),{'enumerable':!0x0,'get':function(){return _0x23a443;}}),Object['defineProperty'](_0x103f82,_0x3f14a2(0x11c),{'enumerable':!0x0,'get':function(){return _0x267be0;}});}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/collaboration-client-node",
3
- "version": "1.0.0-alpha.2",
3
+ "version": "1.0.0-alpha.3",
4
4
  "private": false,
5
5
  "description": "Node.js collaboration client plugin for Univer Pro.",
6
6
  "author": "DreamNum Co., Ltd. <developer@univer.ai>",
@@ -51,18 +51,18 @@
51
51
  "rxjs": ">=7.0.0"
52
52
  },
53
53
  "dependencies": {
54
- "ws": "8.20.1",
55
- "@univerjs-pro/collaboration": "1.0.0-alpha.2",
56
- "@univerjs-pro/collaboration-client": "1.0.0-alpha.2",
57
- "@univerjs/network": "1.0.0-alpha.2",
58
- "@univerjs/core": "1.0.0-alpha.2"
54
+ "ws": "8.21.0",
55
+ "@univerjs-pro/collaboration": "1.0.0-alpha.3",
56
+ "@univerjs/core": "1.0.0-alpha.3",
57
+ "@univerjs/network": "1.0.0-alpha.3",
58
+ "@univerjs-pro/collaboration-client": "1.0.0-alpha.3"
59
59
  },
60
60
  "devDependencies": {
61
61
  "@types/ws": "8.18.1",
62
62
  "rxjs": "7.8.2",
63
63
  "typescript": "^6.0.3",
64
- "vitest": "^4.1.9",
65
- "@univerjs-infra/shared": "1.0.0-alpha.2"
64
+ "vitest": "^4.1.10",
65
+ "@univerjs-infra/shared": "1.0.0-alpha.3"
66
66
  },
67
67
  "scripts": {
68
68
  "test": "vitest run",