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

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 CHANGED
@@ -1 +1 @@
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;}});
1
+ const _0x4e52e5=_0x5866;(function(_0xda1155,_0x51f188){const _0x406282=_0x5866,_0x2d6ab3=_0xda1155();while(!![]){try{const _0x4efcf0=parseInt(_0x406282(0xaa))/0x1+-parseInt(_0x406282(0x95))/0x2*(parseInt(_0x406282(0x8f))/0x3)+parseInt(_0x406282(0x86))/0x4+-parseInt(_0x406282(0x7b))/0x5*(parseInt(_0x406282(0x9b))/0x6)+parseInt(_0x406282(0x94))/0x7+parseInt(_0x406282(0xa3))/0x8*(-parseInt(_0x406282(0xa6))/0x9)+parseInt(_0x406282(0x75))/0xa*(parseInt(_0x406282(0xb1))/0xb);if(_0x4efcf0===_0x51f188)break;else _0x2d6ab3['push'](_0x2d6ab3['shift']());}catch(_0x2e7596){_0x2d6ab3['push'](_0x2d6ab3['shift']());}}}(_0x35d5,0x41348),Object[_0x4e52e5(0x80)](exports,Symbol['toStringTag'],{'value':_0x4e52e5(0x93)}));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');function _0x35d5(){const _0x26566d=['collaboration-client-node.config','NodeCollaborationSocketService','UniverCollaborationClientNodePlugin','dispose','setConfig','Injector','pluginName','decorate','packageName','5707180mVoOJZ','IConfigService','default','open','_injector','symbol','85JEPqvb','function','addEventListener','Inject','UNIVER_COLLABORATION_CLIENT_NODE_PLUGIN','defineProperty','object','call','_httpService','version','merge','473048XaycwK','registerDependencies','string','ISocketService','_configService','close','@univerjs-pro/collaboration-client-node','getConfig','_registerDependencies','15ewpZgX','pipe','CollaborationSocketService','COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY','Module','2511236egIjok','115438PNHzzB','createSocket','ILogService','Disposable','customHeaders','removeEventListener','97068ZBGFrE','send','share','_config','error','registerHTTPInterceptor','_doCreateSocket','UniverCollaborationClientPlugin','8JbPkjy','HTTPService','next','2384631sBUHoc','toPrimitive','message','length','47932PezmAm','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','add','toDisposable','set','Observable','headers','11YaLmAD'];_0x35d5=function(){return _0x26566d;};return _0x35d5();}var o=_0x4e52e5(0x8c),s='1.0.0-alpha.4';const c={};function l(_0x50f6d6,_0x2ba7fc){return function(_0x405c0a,_0x24e999){_0x2ba7fc(_0x405c0a,_0x24e999,_0x50f6d6);};}function u(_0x121c4f,_0x88e79b,_0x9ea0a4,_0x27dcd3){const _0x34536f=_0x4e52e5;var _0x5771a4=arguments['length'],_0x4ee2fb=_0x5771a4<0x3?_0x88e79b:_0x27dcd3===null?_0x27dcd3=Object['getOwnPropertyDescriptor'](_0x88e79b,_0x9ea0a4):_0x27dcd3,_0xe215d2;if(typeof Reflect==_0x34536f(0x81)&&typeof Reflect[_0x34536f(0x73)]=='function')_0x4ee2fb=Reflect[_0x34536f(0x73)](_0x121c4f,_0x88e79b,_0x9ea0a4,_0x27dcd3);else{for(var _0x477aef=_0x121c4f[_0x34536f(0xa9)]-0x1;_0x477aef>=0x0;_0x477aef--)(_0xe215d2=_0x121c4f[_0x477aef])&&(_0x4ee2fb=(_0x5771a4<0x3?_0xe215d2(_0x4ee2fb):_0x5771a4>0x3?_0xe215d2(_0x88e79b,_0x9ea0a4,_0x4ee2fb):_0xe215d2(_0x88e79b,_0x9ea0a4))||_0x4ee2fb);}return _0x5771a4>0x3&&_0x4ee2fb&&Object['defineProperty'](_0x88e79b,_0x9ea0a4,_0x4ee2fb),_0x4ee2fb;}let d=class extends t[_0x4e52e5(0x98)]{constructor(_0xb98865){const _0x396148=_0x4e52e5;super(),this[_0x396148(0x8a)]=_0xb98865;}[_0x4e52e5(0x96)](_0x44c42b){const _0x5dc784=_0x4e52e5;var _0x58c9c7;let _0x36de05=((_0x58c9c7=this[_0x5dc784(0x8a)][_0x5dc784(0x8d)](e['COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY']))==null?void 0x0:_0x58c9c7[_0x5dc784(0x99)])||{};try{let _0xb34855=new i['WebSocket'](_0x44c42b,{'headers':{..._0x36de05}}),_0x16748f=new t['DisposableCollection']();return{'URL':_0x44c42b,'close':(_0x520901,_0x2ea3a7)=>{const _0x5a37bb=_0x5dc784;_0xb34855[_0x5a37bb(0x8b)](_0x520901,_0x2ea3a7),_0x16748f[_0x5a37bb(0x6f)]();},'send':_0x2c0079=>{const _0x4046e8=_0x5dc784;_0xb34855[_0x4046e8(0x9c)](_0x2c0079);},'open$':new r[(_0x5dc784(0xaf))](_0x3ac6f9=>{const _0x2c826c=_0x5dc784;let _0x8651d0=_0x3efab1=>_0x3ac6f9[_0x2c826c(0xa5)](_0x3efab1);_0xb34855[_0x2c826c(0x7d)](_0x2c826c(0x78),_0x8651d0),_0x16748f['add']((0x0,t[_0x2c826c(0xad)])(()=>_0xb34855['removeEventListener'](_0x2c826c(0x78),_0x8651d0)));})['pipe']((0x0,r['share'])()),'close$':new r[(_0x5dc784(0xaf))](_0x314d5a=>{const _0x5ee0d6=_0x5dc784;let _0x3a9892=_0x46c029=>_0x314d5a['next'](_0x46c029);_0xb34855[_0x5ee0d6(0x7d)](_0x5ee0d6(0x8b),_0x3a9892),_0x16748f[_0x5ee0d6(0xac)]((0x0,t[_0x5ee0d6(0xad)])(()=>_0xb34855[_0x5ee0d6(0x9a)](_0x5ee0d6(0x8b),_0x3a9892)));})[_0x5dc784(0x90)]((0x0,r[_0x5dc784(0x9d)])()),'error$':new r[(_0x5dc784(0xaf))](_0x5ea0d5=>{const _0x3e831a=_0x5dc784;let _0xde9a75=_0x271453=>_0x5ea0d5[_0x3e831a(0xa5)](_0x271453);_0xb34855[_0x3e831a(0x7d)](_0x3e831a(0x9f),_0xde9a75),_0x16748f[_0x3e831a(0xac)]((0x0,t[_0x3e831a(0xad)])(()=>_0xb34855['removeEventListener']('error',_0xde9a75)));})['pipe']((0x0,r[_0x5dc784(0x9d)])()),'message$':new r[(_0x5dc784(0xaf))](_0x409bab=>{const _0x59c373=_0x5dc784;let _0x9bde1f=_0x3c87fc=>_0x409bab['next'](_0x3c87fc);_0xb34855[_0x59c373(0x7d)](_0x59c373(0xa8),_0x9bde1f),_0x16748f[_0x59c373(0xac)]((0x0,t[_0x59c373(0xad)])(()=>_0xb34855['removeEventListener'](_0x59c373(0xa8),_0x9bde1f)));})[_0x5dc784(0x90)]((0x0,r[_0x5dc784(0x9d)])())};}catch(_0x2c786c){return console[_0x5dc784(0x9f)](_0x2c786c),null;}}};d=u([l(0x0,t[_0x4e52e5(0x76)])],d);function f(_0x2e6163){'@babel/helpers - typeof';const _0x4c05ff=_0x4e52e5;return f=typeof Symbol==_0x4c05ff(0x7c)&&typeof Symbol['iterator']=='symbol'?function(_0x47337e){return typeof _0x47337e;}:function(_0x290c27){const _0x48ab9c=_0x4c05ff;return _0x290c27&&typeof Symbol==_0x48ab9c(0x7c)&&_0x290c27['constructor']===Symbol&&_0x290c27!==Symbol['prototype']?_0x48ab9c(0x7a):typeof _0x290c27;},f(_0x2e6163);}function p(_0x16ea83,_0x192747){const _0x9267ea=_0x4e52e5;if(f(_0x16ea83)!=_0x9267ea(0x81)||!_0x16ea83)return _0x16ea83;var _0x3ce328=_0x16ea83[Symbol[_0x9267ea(0xa7)]];if(_0x3ce328!==void 0x0){var _0x504d3b=_0x3ce328[_0x9267ea(0x82)](_0x16ea83,_0x192747||_0x9267ea(0x77));if(f(_0x504d3b)!=_0x9267ea(0x81))return _0x504d3b;throw TypeError(_0x9267ea(0xab));}return(_0x192747===_0x9267ea(0x88)?String:Number)(_0x16ea83);}function m(_0x4fd0ec){const _0x2102ce=_0x4e52e5;var _0x2eb727=p(_0x4fd0ec,_0x2102ce(0x88));return f(_0x2eb727)=='symbol'?_0x2eb727:_0x2eb727+'';}function h(_0x56c6ce,_0xa8e267,_0x5a1c0d){const _0xbee145=_0x4e52e5;return(_0xa8e267=m(_0xa8e267))in _0x56c6ce?Object[_0xbee145(0x80)](_0x56c6ce,_0xa8e267,{'value':_0x5a1c0d,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x56c6ce[_0xa8e267]=_0x5a1c0d,_0x56c6ce;}let g=class extends t['Plugin']{constructor(_0x400df6=c,_0x36e340,_0x4b7f46){const _0x1aae3e=_0x4e52e5;super(),this[_0x1aae3e(0x9e)]=_0x400df6,this[_0x1aae3e(0x8a)]=_0x36e340,this[_0x1aae3e(0x79)]=_0x4b7f46;let {..._0x57a018}=(0x0,t[_0x1aae3e(0x85)])({},c,this[_0x1aae3e(0x9e)]);this[_0x1aae3e(0x8a)][_0x1aae3e(0x70)](_0x1aae3e(0xb2),_0x57a018);}['onStarting'](){const _0x244f68=_0x4e52e5;this[_0x244f68(0x8e)]();}['_registerDependencies'](){const _0x449f04=_0x4e52e5;(0x0,t[_0x449f04(0x87)])(this[_0x449f04(0x79)],[[n[_0x449f04(0x89)],{'useClass':d}]]);}};h(g,_0x4e52e5(0x72),_0x4e52e5(0x7f)),h(g,_0x4e52e5(0x74),o),h(g,_0x4e52e5(0x84),s),g=u([(0x0,t['DependentOn'])(e[_0x4e52e5(0xa2)]),l(0x1,t['IConfigService']),l(0x2,(0x0,t[_0x4e52e5(0x7e)])(t['Injector']))],g);function _0x5866(_0x3d4013,_0x5dd379){_0x3d4013=_0x3d4013-0x6d;const _0x35d5bd=_0x35d5();let _0x5866df=_0x35d5bd[_0x3d4013];return _0x5866df;}let _=class extends e[_0x4e52e5(0x91)]{constructor(_0x4d6484,_0x3e1644,_0x1e29c9,_0x153cb4,_0x40396e){const _0x50f2ba=_0x4e52e5;super(_0x4d6484,_0x3e1644,_0x1e29c9,_0x153cb4,_0x40396e);let _0x5b3b29=this['_configService'][_0x50f2ba(0x8d)](e[_0x50f2ba(0x92)]);this[_0x50f2ba(0x83)][_0x50f2ba(0xa0)]({'interceptor':(_0x1cfe79,_0x5d0a6f)=>{const _0x438ce2=_0x50f2ba;let _0x8f989f=_0x1cfe79[_0x438ce2(0xb0)];if(_0x5b3b29!=null&&_0x5b3b29[_0x438ce2(0x99)]){for(let _0x258d09 in _0x5b3b29[_0x438ce2(0x99)])_0x8f989f[_0x438ce2(0xae)](_0x258d09,_0x5b3b29[_0x438ce2(0x99)][_0x258d09]);}return _0x5d0a6f(_0x1cfe79);}});}async['createSocket'](_0x56d8c2){const _0x6886af=_0x4e52e5;return this[_0x6886af(0xa1)](_0x56d8c2);}};_=u([l(0x0,(0x0,t[_0x4e52e5(0x7e)])(t[_0x4e52e5(0x71)])),l(0x1,(0x0,t[_0x4e52e5(0x7e)])(n[_0x4e52e5(0xa4)])),l(0x2,t[_0x4e52e5(0x76)]),l(0x3,t[_0x4e52e5(0x97)]),l(0x4,a['ISnapshotServerService'])],_),Object[_0x4e52e5(0x80)](exports,_0x4e52e5(0x6d),{'enumerable':!0x0,'get':function(){return _;}}),Object['defineProperty'](exports,_0x4e52e5(0x6e),{'enumerable':!0x0,'get':function(){return g;}});
package/lib/es/index.js CHANGED
@@ -1 +1 @@
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
+ const _0x38a325=_0x3c85;function _0x3c85(_0x533b41,_0x22113f){_0x533b41=_0x533b41-0x87;const _0xfd140f=_0xfd14();let _0x3c8521=_0xfd140f[_0x533b41];return _0x3c8521;}(function(_0x349876,_0x530780){const _0x2df364=_0x3c85,_0x138bce=_0x349876();while(!![]){try{const _0x14446c=-parseInt(_0x2df364(0xa1))/0x1+-parseInt(_0x2df364(0x94))/0x2+parseInt(_0x2df364(0xa2))/0x3*(-parseInt(_0x2df364(0xb0))/0x4)+-parseInt(_0x2df364(0x8f))/0x5+parseInt(_0x2df364(0x98))/0x6+parseInt(_0x2df364(0x8c))/0x7*(-parseInt(_0x2df364(0x9a))/0x8)+parseInt(_0x2df364(0xb2))/0x9;if(_0x14446c===_0x530780)break;else _0x138bce['push'](_0x138bce['shift']());}catch(_0x4a0246){_0x138bce['push'](_0x138bce['shift']());}}}(_0xfd14,0x22bbc));import{COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY as _0x4e3118,CollaborationSocketService as _0x5e933c,UniverCollaborationClientPlugin as _0x18cd7e}from'@univerjs-pro/collaboration-client';function _0xfd14(){const _0x2f5555=['removeEventListener','customHeaders','function','constructor','dispose','pipe','set','249244bhrNio','send','6744294uWSujf','prototype','headers','onStarting','defineProperty','getConfig','_registerDependencies','error','symbol','28KintsN','_configService','_doCreateSocket','365025BgBJfS','getOwnPropertyDescriptor','call','_injector','decorate','190862EBhcRr','UNIVER_COLLABORATION_CLIENT_NODE_PLUGIN','pluginName','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','536868KtzbLQ','string','472712KjCUEe','version','_httpService','add','length','message','next','229473EhvwId','3nIwHjf','_config','open','close','setConfig','addEventListener','object'];_0xfd14=function(){return _0x2f5555;};return _0xfd14();}import{DependentOn as _0x22b7ce,Disposable as _0x3bf9dd,DisposableCollection as _0x529636,IConfigService as _0x3968df,ILogService as _0x56462f,Inject as _0x1d2b31,Injector as _0x411600,Plugin as _0x3cfb58,merge as _0x366c6f,registerDependencies as _0x4c09cc,toDisposable as _0x527e8f}from'@univerjs/core';import{HTTPService as _0x6c90c6,ISocketService as _0x484a9b}from'@univerjs/network';import{Observable as _0x51b3c1,share as _0x22da56}from'rxjs';import{WebSocket as _0x1c91ad}from'ws';import{ISnapshotServerService as _0x1fd8cc}from'@univerjs-pro/collaboration';var b='@univerjs-pro/collaboration-client-node',x='1.0.0-alpha.4';const S={};function C(_0x5d2684,_0x2a8c0c){return function(_0xa59add,_0x333a14){_0x2a8c0c(_0xa59add,_0x333a14,_0x5d2684);};}function w(_0x2b1395,_0x4c1c90,_0x5ecb91,_0x13b562){const _0x439716=_0x3c85;var _0x3c6a5d=arguments[_0x439716(0x9e)],_0x3c2327=_0x3c6a5d<0x3?_0x4c1c90:_0x13b562===null?_0x13b562=Object[_0x439716(0x90)](_0x4c1c90,_0x5ecb91):_0x13b562,_0x927407;if(typeof Reflect==_0x439716(0xa8)&&typeof Reflect[_0x439716(0x93)]==_0x439716(0xab))_0x3c2327=Reflect['decorate'](_0x2b1395,_0x4c1c90,_0x5ecb91,_0x13b562);else{for(var _0x8ba523=_0x2b1395[_0x439716(0x9e)]-0x1;_0x8ba523>=0x0;_0x8ba523--)(_0x927407=_0x2b1395[_0x8ba523])&&(_0x3c2327=(_0x3c6a5d<0x3?_0x927407(_0x3c2327):_0x3c6a5d>0x3?_0x927407(_0x4c1c90,_0x5ecb91,_0x3c2327):_0x927407(_0x4c1c90,_0x5ecb91))||_0x3c2327);}return _0x3c6a5d>0x3&&_0x3c2327&&Object[_0x439716(0x87)](_0x4c1c90,_0x5ecb91,_0x3c2327),_0x3c2327;}let T=class extends _0x3bf9dd{constructor(_0x2a4771){super(),this['_configService']=_0x2a4771;}['createSocket'](_0x454122){const _0xbc6b85=_0x3c85;var _0x21a9c9;let _0x29b624=((_0x21a9c9=this[_0xbc6b85(0x8d)][_0xbc6b85(0x88)](_0x4e3118))==null?void 0x0:_0x21a9c9[_0xbc6b85(0xaa)])||{};try{let _0x95e8fc=new _0x1c91ad(_0x454122,{'headers':{..._0x29b624}}),_0x2f90cc=new _0x529636();return{'URL':_0x454122,'close':(_0x17b156,_0x497038)=>{const _0x87048f=_0xbc6b85;_0x95e8fc[_0x87048f(0xa5)](_0x17b156,_0x497038),_0x2f90cc[_0x87048f(0xad)]();},'send':_0x90a167=>{const _0x57e8d4=_0xbc6b85;_0x95e8fc[_0x57e8d4(0xb1)](_0x90a167);},'open$':new _0x51b3c1(_0x59ee8a=>{const _0x19fdc8=_0xbc6b85;let _0x498a55=_0x573f40=>_0x59ee8a['next'](_0x573f40);_0x95e8fc['addEventListener'](_0x19fdc8(0xa4),_0x498a55),_0x2f90cc[_0x19fdc8(0x9d)](_0x527e8f(()=>_0x95e8fc['removeEventListener'](_0x19fdc8(0xa4),_0x498a55)));})[_0xbc6b85(0xae)](_0x22da56()),'close$':new _0x51b3c1(_0x6d4154=>{const _0x3d944f=_0xbc6b85;let _0x54a2cb=_0x26835b=>_0x6d4154[_0x3d944f(0xa0)](_0x26835b);_0x95e8fc[_0x3d944f(0xa7)](_0x3d944f(0xa5),_0x54a2cb),_0x2f90cc[_0x3d944f(0x9d)](_0x527e8f(()=>_0x95e8fc[_0x3d944f(0xa9)](_0x3d944f(0xa5),_0x54a2cb)));})['pipe'](_0x22da56()),'error$':new _0x51b3c1(_0x266e4d=>{const _0x54c342=_0xbc6b85;let _0x45afae=_0x11a7db=>_0x266e4d[_0x54c342(0xa0)](_0x11a7db);_0x95e8fc['addEventListener']('error',_0x45afae),_0x2f90cc['add'](_0x527e8f(()=>_0x95e8fc[_0x54c342(0xa9)]('error',_0x45afae)));})[_0xbc6b85(0xae)](_0x22da56()),'message$':new _0x51b3c1(_0x2a88c1=>{const _0x4a6e37=_0xbc6b85;let _0x577ded=_0x313f66=>_0x2a88c1['next'](_0x313f66);_0x95e8fc['addEventListener'](_0x4a6e37(0x9f),_0x577ded),_0x2f90cc[_0x4a6e37(0x9d)](_0x527e8f(()=>_0x95e8fc[_0x4a6e37(0xa9)](_0x4a6e37(0x9f),_0x577ded)));})[_0xbc6b85(0xae)](_0x22da56())};}catch(_0x3fa4e8){return console[_0xbc6b85(0x8a)](_0x3fa4e8),null;}}};T=w([C(0x0,_0x3968df)],T);function E(_0x2f0ebc){'@babel/helpers - typeof';const _0x2a067b=_0x3c85;return E=typeof Symbol==_0x2a067b(0xab)&&typeof Symbol['iterator']==_0x2a067b(0x8b)?function(_0x15b0ee){return typeof _0x15b0ee;}:function(_0x45857a){const _0x4ef3cc=_0x2a067b;return _0x45857a&&typeof Symbol==_0x4ef3cc(0xab)&&_0x45857a[_0x4ef3cc(0xac)]===Symbol&&_0x45857a!==Symbol[_0x4ef3cc(0xb3)]?_0x4ef3cc(0x8b):typeof _0x45857a;},E(_0x2f0ebc);}function D(_0x35391e,_0x192854){const _0x54dcba=_0x3c85;if(E(_0x35391e)!=_0x54dcba(0xa8)||!_0x35391e)return _0x35391e;var _0x46b014=_0x35391e[Symbol['toPrimitive']];if(_0x46b014!==void 0x0){var _0x2dbe13=_0x46b014[_0x54dcba(0x91)](_0x35391e,_0x192854||'default');if(E(_0x2dbe13)!=_0x54dcba(0xa8))return _0x2dbe13;throw TypeError(_0x54dcba(0x97));}return(_0x192854===_0x54dcba(0x99)?String:Number)(_0x35391e);}function O(_0x5c1462){var _0x271500=D(_0x5c1462,'string');return E(_0x271500)=='symbol'?_0x271500:_0x271500+'';}function k(_0x1181e9,_0x705673,_0x1ee1a0){const _0x39d2be=_0x3c85;return(_0x705673=O(_0x705673))in _0x1181e9?Object[_0x39d2be(0x87)](_0x1181e9,_0x705673,{'value':_0x1ee1a0,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x1181e9[_0x705673]=_0x1ee1a0,_0x1181e9;}let A=class extends _0x3cfb58{constructor(_0x41d8e6=S,_0x5901d9,_0x222d91){const _0x51b3d1=_0x3c85;super(),this['_config']=_0x41d8e6,this[_0x51b3d1(0x8d)]=_0x5901d9,this[_0x51b3d1(0x92)]=_0x222d91;let {..._0x2e67ed}=_0x366c6f({},S,this[_0x51b3d1(0xa3)]);this['_configService'][_0x51b3d1(0xa6)]('collaboration-client-node.config',_0x2e67ed);}[_0x38a325(0xb5)](){const _0x18a548=_0x38a325;this[_0x18a548(0x89)]();}[_0x38a325(0x89)](){const _0x45112d=_0x38a325;_0x4c09cc(this[_0x45112d(0x92)],[[_0x484a9b,{'useClass':T}]]);}};k(A,_0x38a325(0x96),_0x38a325(0x95)),k(A,'packageName',b),k(A,_0x38a325(0x9b),x),A=w([_0x22b7ce(_0x18cd7e),C(0x1,_0x3968df),C(0x2,_0x1d2b31(_0x411600))],A);let j=class extends _0x5e933c{constructor(_0x3fc0e0,_0x304ad2,_0x3b2d27,_0x1f8281,_0x6bbb9e){const _0x4db6c8=_0x38a325;super(_0x3fc0e0,_0x304ad2,_0x3b2d27,_0x1f8281,_0x6bbb9e);let _0x22b7fa=this[_0x4db6c8(0x8d)]['getConfig'](_0x4e3118);this[_0x4db6c8(0x9c)]['registerHTTPInterceptor']({'interceptor':(_0x10ee17,_0x10c50f)=>{const _0x400991=_0x4db6c8;let _0x5fd8c9=_0x10ee17[_0x400991(0xb4)];if(_0x22b7fa!=null&&_0x22b7fa['customHeaders']){for(let _0x2bc82d in _0x22b7fa[_0x400991(0xaa)])_0x5fd8c9[_0x400991(0xaf)](_0x2bc82d,_0x22b7fa['customHeaders'][_0x2bc82d]);}return _0x10c50f(_0x10ee17);}});}async['createSocket'](_0xcb9cb5){const _0x11443b=_0x38a325;return this[_0x11443b(0x8e)](_0xcb9cb5);}};j=w([C(0x0,_0x1d2b31(_0x411600)),C(0x1,_0x1d2b31(_0x6c90c6)),C(0x2,_0x3968df),C(0x3,_0x56462f),C(0x4,_0x1fd8cc)],j);export{j as NodeCollaborationSocketService,A as UniverCollaborationClientNodePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
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
+ const _0x38a325=_0x3c85;function _0x3c85(_0x533b41,_0x22113f){_0x533b41=_0x533b41-0x87;const _0xfd140f=_0xfd14();let _0x3c8521=_0xfd140f[_0x533b41];return _0x3c8521;}(function(_0x349876,_0x530780){const _0x2df364=_0x3c85,_0x138bce=_0x349876();while(!![]){try{const _0x14446c=-parseInt(_0x2df364(0xa1))/0x1+-parseInt(_0x2df364(0x94))/0x2+parseInt(_0x2df364(0xa2))/0x3*(-parseInt(_0x2df364(0xb0))/0x4)+-parseInt(_0x2df364(0x8f))/0x5+parseInt(_0x2df364(0x98))/0x6+parseInt(_0x2df364(0x8c))/0x7*(-parseInt(_0x2df364(0x9a))/0x8)+parseInt(_0x2df364(0xb2))/0x9;if(_0x14446c===_0x530780)break;else _0x138bce['push'](_0x138bce['shift']());}catch(_0x4a0246){_0x138bce['push'](_0x138bce['shift']());}}}(_0xfd14,0x22bbc));import{COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY as _0x4e3118,CollaborationSocketService as _0x5e933c,UniverCollaborationClientPlugin as _0x18cd7e}from'@univerjs-pro/collaboration-client';function _0xfd14(){const _0x2f5555=['removeEventListener','customHeaders','function','constructor','dispose','pipe','set','249244bhrNio','send','6744294uWSujf','prototype','headers','onStarting','defineProperty','getConfig','_registerDependencies','error','symbol','28KintsN','_configService','_doCreateSocket','365025BgBJfS','getOwnPropertyDescriptor','call','_injector','decorate','190862EBhcRr','UNIVER_COLLABORATION_CLIENT_NODE_PLUGIN','pluginName','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','536868KtzbLQ','string','472712KjCUEe','version','_httpService','add','length','message','next','229473EhvwId','3nIwHjf','_config','open','close','setConfig','addEventListener','object'];_0xfd14=function(){return _0x2f5555;};return _0xfd14();}import{DependentOn as _0x22b7ce,Disposable as _0x3bf9dd,DisposableCollection as _0x529636,IConfigService as _0x3968df,ILogService as _0x56462f,Inject as _0x1d2b31,Injector as _0x411600,Plugin as _0x3cfb58,merge as _0x366c6f,registerDependencies as _0x4c09cc,toDisposable as _0x527e8f}from'@univerjs/core';import{HTTPService as _0x6c90c6,ISocketService as _0x484a9b}from'@univerjs/network';import{Observable as _0x51b3c1,share as _0x22da56}from'rxjs';import{WebSocket as _0x1c91ad}from'ws';import{ISnapshotServerService as _0x1fd8cc}from'@univerjs-pro/collaboration';var b='@univerjs-pro/collaboration-client-node',x='1.0.0-alpha.4';const S={};function C(_0x5d2684,_0x2a8c0c){return function(_0xa59add,_0x333a14){_0x2a8c0c(_0xa59add,_0x333a14,_0x5d2684);};}function w(_0x2b1395,_0x4c1c90,_0x5ecb91,_0x13b562){const _0x439716=_0x3c85;var _0x3c6a5d=arguments[_0x439716(0x9e)],_0x3c2327=_0x3c6a5d<0x3?_0x4c1c90:_0x13b562===null?_0x13b562=Object[_0x439716(0x90)](_0x4c1c90,_0x5ecb91):_0x13b562,_0x927407;if(typeof Reflect==_0x439716(0xa8)&&typeof Reflect[_0x439716(0x93)]==_0x439716(0xab))_0x3c2327=Reflect['decorate'](_0x2b1395,_0x4c1c90,_0x5ecb91,_0x13b562);else{for(var _0x8ba523=_0x2b1395[_0x439716(0x9e)]-0x1;_0x8ba523>=0x0;_0x8ba523--)(_0x927407=_0x2b1395[_0x8ba523])&&(_0x3c2327=(_0x3c6a5d<0x3?_0x927407(_0x3c2327):_0x3c6a5d>0x3?_0x927407(_0x4c1c90,_0x5ecb91,_0x3c2327):_0x927407(_0x4c1c90,_0x5ecb91))||_0x3c2327);}return _0x3c6a5d>0x3&&_0x3c2327&&Object[_0x439716(0x87)](_0x4c1c90,_0x5ecb91,_0x3c2327),_0x3c2327;}let T=class extends _0x3bf9dd{constructor(_0x2a4771){super(),this['_configService']=_0x2a4771;}['createSocket'](_0x454122){const _0xbc6b85=_0x3c85;var _0x21a9c9;let _0x29b624=((_0x21a9c9=this[_0xbc6b85(0x8d)][_0xbc6b85(0x88)](_0x4e3118))==null?void 0x0:_0x21a9c9[_0xbc6b85(0xaa)])||{};try{let _0x95e8fc=new _0x1c91ad(_0x454122,{'headers':{..._0x29b624}}),_0x2f90cc=new _0x529636();return{'URL':_0x454122,'close':(_0x17b156,_0x497038)=>{const _0x87048f=_0xbc6b85;_0x95e8fc[_0x87048f(0xa5)](_0x17b156,_0x497038),_0x2f90cc[_0x87048f(0xad)]();},'send':_0x90a167=>{const _0x57e8d4=_0xbc6b85;_0x95e8fc[_0x57e8d4(0xb1)](_0x90a167);},'open$':new _0x51b3c1(_0x59ee8a=>{const _0x19fdc8=_0xbc6b85;let _0x498a55=_0x573f40=>_0x59ee8a['next'](_0x573f40);_0x95e8fc['addEventListener'](_0x19fdc8(0xa4),_0x498a55),_0x2f90cc[_0x19fdc8(0x9d)](_0x527e8f(()=>_0x95e8fc['removeEventListener'](_0x19fdc8(0xa4),_0x498a55)));})[_0xbc6b85(0xae)](_0x22da56()),'close$':new _0x51b3c1(_0x6d4154=>{const _0x3d944f=_0xbc6b85;let _0x54a2cb=_0x26835b=>_0x6d4154[_0x3d944f(0xa0)](_0x26835b);_0x95e8fc[_0x3d944f(0xa7)](_0x3d944f(0xa5),_0x54a2cb),_0x2f90cc[_0x3d944f(0x9d)](_0x527e8f(()=>_0x95e8fc[_0x3d944f(0xa9)](_0x3d944f(0xa5),_0x54a2cb)));})['pipe'](_0x22da56()),'error$':new _0x51b3c1(_0x266e4d=>{const _0x54c342=_0xbc6b85;let _0x45afae=_0x11a7db=>_0x266e4d[_0x54c342(0xa0)](_0x11a7db);_0x95e8fc['addEventListener']('error',_0x45afae),_0x2f90cc['add'](_0x527e8f(()=>_0x95e8fc[_0x54c342(0xa9)]('error',_0x45afae)));})[_0xbc6b85(0xae)](_0x22da56()),'message$':new _0x51b3c1(_0x2a88c1=>{const _0x4a6e37=_0xbc6b85;let _0x577ded=_0x313f66=>_0x2a88c1['next'](_0x313f66);_0x95e8fc['addEventListener'](_0x4a6e37(0x9f),_0x577ded),_0x2f90cc[_0x4a6e37(0x9d)](_0x527e8f(()=>_0x95e8fc[_0x4a6e37(0xa9)](_0x4a6e37(0x9f),_0x577ded)));})[_0xbc6b85(0xae)](_0x22da56())};}catch(_0x3fa4e8){return console[_0xbc6b85(0x8a)](_0x3fa4e8),null;}}};T=w([C(0x0,_0x3968df)],T);function E(_0x2f0ebc){'@babel/helpers - typeof';const _0x2a067b=_0x3c85;return E=typeof Symbol==_0x2a067b(0xab)&&typeof Symbol['iterator']==_0x2a067b(0x8b)?function(_0x15b0ee){return typeof _0x15b0ee;}:function(_0x45857a){const _0x4ef3cc=_0x2a067b;return _0x45857a&&typeof Symbol==_0x4ef3cc(0xab)&&_0x45857a[_0x4ef3cc(0xac)]===Symbol&&_0x45857a!==Symbol[_0x4ef3cc(0xb3)]?_0x4ef3cc(0x8b):typeof _0x45857a;},E(_0x2f0ebc);}function D(_0x35391e,_0x192854){const _0x54dcba=_0x3c85;if(E(_0x35391e)!=_0x54dcba(0xa8)||!_0x35391e)return _0x35391e;var _0x46b014=_0x35391e[Symbol['toPrimitive']];if(_0x46b014!==void 0x0){var _0x2dbe13=_0x46b014[_0x54dcba(0x91)](_0x35391e,_0x192854||'default');if(E(_0x2dbe13)!=_0x54dcba(0xa8))return _0x2dbe13;throw TypeError(_0x54dcba(0x97));}return(_0x192854===_0x54dcba(0x99)?String:Number)(_0x35391e);}function O(_0x5c1462){var _0x271500=D(_0x5c1462,'string');return E(_0x271500)=='symbol'?_0x271500:_0x271500+'';}function k(_0x1181e9,_0x705673,_0x1ee1a0){const _0x39d2be=_0x3c85;return(_0x705673=O(_0x705673))in _0x1181e9?Object[_0x39d2be(0x87)](_0x1181e9,_0x705673,{'value':_0x1ee1a0,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x1181e9[_0x705673]=_0x1ee1a0,_0x1181e9;}let A=class extends _0x3cfb58{constructor(_0x41d8e6=S,_0x5901d9,_0x222d91){const _0x51b3d1=_0x3c85;super(),this['_config']=_0x41d8e6,this[_0x51b3d1(0x8d)]=_0x5901d9,this[_0x51b3d1(0x92)]=_0x222d91;let {..._0x2e67ed}=_0x366c6f({},S,this[_0x51b3d1(0xa3)]);this['_configService'][_0x51b3d1(0xa6)]('collaboration-client-node.config',_0x2e67ed);}[_0x38a325(0xb5)](){const _0x18a548=_0x38a325;this[_0x18a548(0x89)]();}[_0x38a325(0x89)](){const _0x45112d=_0x38a325;_0x4c09cc(this[_0x45112d(0x92)],[[_0x484a9b,{'useClass':T}]]);}};k(A,_0x38a325(0x96),_0x38a325(0x95)),k(A,'packageName',b),k(A,_0x38a325(0x9b),x),A=w([_0x22b7ce(_0x18cd7e),C(0x1,_0x3968df),C(0x2,_0x1d2b31(_0x411600))],A);let j=class extends _0x5e933c{constructor(_0x3fc0e0,_0x304ad2,_0x3b2d27,_0x1f8281,_0x6bbb9e){const _0x4db6c8=_0x38a325;super(_0x3fc0e0,_0x304ad2,_0x3b2d27,_0x1f8281,_0x6bbb9e);let _0x22b7fa=this[_0x4db6c8(0x8d)]['getConfig'](_0x4e3118);this[_0x4db6c8(0x9c)]['registerHTTPInterceptor']({'interceptor':(_0x10ee17,_0x10c50f)=>{const _0x400991=_0x4db6c8;let _0x5fd8c9=_0x10ee17[_0x400991(0xb4)];if(_0x22b7fa!=null&&_0x22b7fa['customHeaders']){for(let _0x2bc82d in _0x22b7fa[_0x400991(0xaa)])_0x5fd8c9[_0x400991(0xaf)](_0x2bc82d,_0x22b7fa['customHeaders'][_0x2bc82d]);}return _0x10c50f(_0x10ee17);}});}async['createSocket'](_0xcb9cb5){const _0x11443b=_0x38a325;return this[_0x11443b(0x8e)](_0xcb9cb5);}};j=w([C(0x0,_0x1d2b31(_0x411600)),C(0x1,_0x1d2b31(_0x6c90c6)),C(0x2,_0x3968df),C(0x3,_0x56462f),C(0x4,_0x1fd8cc)],j);export{j as NodeCollaborationSocketService,A as UniverCollaborationClientNodePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
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;}});}));
1
+ function _0x1edc(_0x13e9d1,_0x440ec5){_0x13e9d1=_0x13e9d1-0x1a8;const _0x468800=_0x4688();let _0x1edcb5=_0x468800[_0x13e9d1];return _0x1edcb5;}(function(_0x5b8cba,_0x586db7){const _0x5f4510=_0x1edc,_0x4b25a8=_0x5b8cba();while(!![]){try{const _0x4b5a61=parseInt(_0x5f4510(0x1ed))/0x1+-parseInt(_0x5f4510(0x1df))/0x2+-parseInt(_0x5f4510(0x1c5))/0x3+parseInt(_0x5f4510(0x1a8))/0x4*(parseInt(_0x5f4510(0x1f2))/0x5)+parseInt(_0x5f4510(0x1d1))/0x6*(-parseInt(_0x5f4510(0x1d7))/0x7)+-parseInt(_0x5f4510(0x1d6))/0x8*(-parseInt(_0x5f4510(0x1c8))/0x9)+-parseInt(_0x5f4510(0x1eb))/0xa;if(_0x4b5a61===_0x586db7)break;else _0x4b25a8['push'](_0x4b25a8['shift']());}catch(_0x3bac48){_0x4b25a8['push'](_0x4b25a8['shift']());}}}(_0x4688,0xe8e9e),function(_0x155683,_0x6417e5){const _0xed34f4=_0x1edc;typeof exports==_0xed34f4(0x1bf)&&typeof module<'u'?_0x6417e5(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs/core'),require('@univerjs/network'),require('rxjs'),require('@univerjs-pro/collaboration')):typeof define==_0xed34f4(0x1cb)&&define[_0xed34f4(0x1b8)]?define([_0xed34f4(0x1cf),'@univerjs-pro/collaboration-client',_0xed34f4(0x1ce),'@univerjs/network',_0xed34f4(0x1d0),_0xed34f4(0x1d9)],_0x6417e5):(_0x155683=typeof globalThis<'u'?globalThis:_0x155683||self,_0x6417e5(_0x155683[_0xed34f4(0x1b4)]={},_0x155683['UniverProCollaborationClient'],_0x155683['UniverCore'],_0x155683['UniverNetwork'],_0x155683['rxjs'],_0x155683['UniverProCollaboration']));}(this,function(_0x343940,_0x421c50,_0x2502f9,_0x1651f9,_0x39ba74,_0x30cbda){const _0x221ec9=_0x1edc;Object[_0x221ec9(0x1ec)](_0x343940,Symbol[_0x221ec9(0x1e6)],{'value':_0x221ec9(0x1e8)});var _0x25b16e=(_0x2bd488,_0x140c9d)=>()=>(_0x140c9d||(_0x2bd488((_0x140c9d={'exports':{}})[_0x221ec9(0x1cf)],_0x140c9d),_0x2bd488=null),_0x140c9d['exports']),_0x3a03f9=_0x221ec9(0x1a9),_0x35ae66=_0x221ec9(0x1ae);let _0x523178={};var _0x40af84=_0x25b16e((_0xaf1992,_0xbbdcd6)=>{_0xbbdcd6['exports']=function(){const _0x40cc46=_0x1edc;throw Error(_0x40cc46(0x1e2));};})();function _0x36b007(_0x56310d,_0x2b4975){return function(_0x3815a4,_0xa2a20d){_0x2b4975(_0x3815a4,_0xa2a20d,_0x56310d);};}function _0x41b19e(_0x10872e,_0x19d855,_0x4dadaa,_0x154aae){const _0x275312=_0x221ec9;var _0x15b1f7=arguments['length'],_0x21cbd8=_0x15b1f7<0x3?_0x19d855:_0x154aae===null?_0x154aae=Object[_0x275312(0x1ab)](_0x19d855,_0x4dadaa):_0x154aae,_0x33c2e1;if(typeof Reflect==_0x275312(0x1bf)&&typeof Reflect[_0x275312(0x1f1)]==_0x275312(0x1cb))_0x21cbd8=Reflect['decorate'](_0x10872e,_0x19d855,_0x4dadaa,_0x154aae);else{for(var _0x2ad23f=_0x10872e['length']-0x1;_0x2ad23f>=0x0;_0x2ad23f--)(_0x33c2e1=_0x10872e[_0x2ad23f])&&(_0x21cbd8=(_0x15b1f7<0x3?_0x33c2e1(_0x21cbd8):_0x15b1f7>0x3?_0x33c2e1(_0x19d855,_0x4dadaa,_0x21cbd8):_0x33c2e1(_0x19d855,_0x4dadaa))||_0x21cbd8);}return _0x15b1f7>0x3&&_0x21cbd8&&Object[_0x275312(0x1ec)](_0x19d855,_0x4dadaa,_0x21cbd8),_0x21cbd8;}let _0x418721=class extends _0x2502f9[_0x221ec9(0x1dc)]{constructor(_0x509adc){const _0x1ff7b5=_0x221ec9;super(),this[_0x1ff7b5(0x1c7)]=_0x509adc;}[_0x221ec9(0x1ac)](_0x4f9f84){const _0xa0e02d=_0x221ec9;var _0xc923d9;let _0x343483=((_0xc923d9=this[_0xa0e02d(0x1c7)][_0xa0e02d(0x1e1)](_0x421c50[_0xa0e02d(0x1b2)]))==null?void 0x0:_0xc923d9[_0xa0e02d(0x1e3)])||{};try{let _0x5a127b=new _0x40af84[(_0xa0e02d(0x1e5))](_0x4f9f84,{'headers':{..._0x343483}}),_0x1ca337=new _0x2502f9[(_0xa0e02d(0x1b5))]();return{'URL':_0x4f9f84,'close':(_0xfd46ef,_0x5bccdf)=>{const _0x358ac5=_0xa0e02d;_0x5a127b[_0x358ac5(0x1d4)](_0xfd46ef,_0x5bccdf),_0x1ca337['dispose']();},'send':_0x501ad1=>{const _0x23c3dd=_0xa0e02d;_0x5a127b[_0x23c3dd(0x1c6)](_0x501ad1);},'open$':new _0x39ba74['Observable'](_0x2075ca=>{const _0x464da8=_0xa0e02d;let _0x308500=_0xd0d1b3=>_0x2075ca[_0x464da8(0x1d3)](_0xd0d1b3);_0x5a127b['addEventListener']('open',_0x308500),_0x1ca337[_0x464da8(0x1d5)]((0x0,_0x2502f9['toDisposable'])(()=>_0x5a127b[_0x464da8(0x1de)]('open',_0x308500)));})['pipe']((0x0,_0x39ba74[_0xa0e02d(0x1c1)])()),'close$':new _0x39ba74[(_0xa0e02d(0x1e9))](_0x60ad1c=>{const _0x24c62c=_0xa0e02d;let _0x237524=_0x1972dd=>_0x60ad1c[_0x24c62c(0x1d3)](_0x1972dd);_0x5a127b['addEventListener']('close',_0x237524),_0x1ca337['add']((0x0,_0x2502f9['toDisposable'])(()=>_0x5a127b['removeEventListener']('close',_0x237524)));})[_0xa0e02d(0x1b6)]((0x0,_0x39ba74['share'])()),'error$':new _0x39ba74[(_0xa0e02d(0x1e9))](_0x349b11=>{const _0x13ffed=_0xa0e02d;let _0xd4649b=_0x499d1e=>_0x349b11[_0x13ffed(0x1d3)](_0x499d1e);_0x5a127b[_0x13ffed(0x1af)](_0x13ffed(0x1ea),_0xd4649b),_0x1ca337[_0x13ffed(0x1d5)]((0x0,_0x2502f9[_0x13ffed(0x1c2)])(()=>_0x5a127b[_0x13ffed(0x1de)](_0x13ffed(0x1ea),_0xd4649b)));})['pipe']((0x0,_0x39ba74[_0xa0e02d(0x1c1)])()),'message$':new _0x39ba74[(_0xa0e02d(0x1e9))](_0x346a8c=>{const _0x3063e7=_0xa0e02d;let _0xcca695=_0x3e5fec=>_0x346a8c[_0x3063e7(0x1d3)](_0x3e5fec);_0x5a127b['addEventListener'](_0x3063e7(0x1ca),_0xcca695),_0x1ca337[_0x3063e7(0x1d5)]((0x0,_0x2502f9['toDisposable'])(()=>_0x5a127b[_0x3063e7(0x1de)](_0x3063e7(0x1ca),_0xcca695)));})[_0xa0e02d(0x1b6)]((0x0,_0x39ba74['share'])())};}catch(_0x3f99bc){return console['error'](_0x3f99bc),null;}}};_0x418721=_0x41b19e([_0x36b007(0x0,_0x2502f9[_0x221ec9(0x1b1)])],_0x418721);function _0x37c14f(_0x3ffe3d){'@babel/helpers - typeof';const _0x3eb48d=_0x221ec9;return _0x37c14f=typeof Symbol==_0x3eb48d(0x1cb)&&typeof Symbol[_0x3eb48d(0x1bb)]==_0x3eb48d(0x1be)?function(_0x3cb755){return typeof _0x3cb755;}:function(_0x1d3567){const _0x1c235a=_0x3eb48d;return _0x1d3567&&typeof Symbol==_0x1c235a(0x1cb)&&_0x1d3567[_0x1c235a(0x1d8)]===Symbol&&_0x1d3567!==Symbol[_0x1c235a(0x1f0)]?_0x1c235a(0x1be):typeof _0x1d3567;},_0x37c14f(_0x3ffe3d);}function _0x3932dd(_0x4ab01b,_0x4c5f3d){const _0x1ec4bd=_0x221ec9;if(_0x37c14f(_0x4ab01b)!=_0x1ec4bd(0x1bf)||!_0x4ab01b)return _0x4ab01b;var _0x15dc2a=_0x4ab01b[Symbol[_0x1ec4bd(0x1b7)]];if(_0x15dc2a!==void 0x0){var _0x3f473b=_0x15dc2a['call'](_0x4ab01b,_0x4c5f3d||'default');if(_0x37c14f(_0x3f473b)!=_0x1ec4bd(0x1bf))return _0x3f473b;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x4c5f3d==='string'?String:Number)(_0x4ab01b);}function _0x2393c8(_0x2c1540){var _0x2a6486=_0x3932dd(_0x2c1540,'string');return _0x37c14f(_0x2a6486)=='symbol'?_0x2a6486:_0x2a6486+'';}function _0x4ce961(_0x3034b3,_0x5f436b,_0x97107c){const _0x902f5d=_0x221ec9;return(_0x5f436b=_0x2393c8(_0x5f436b))in _0x3034b3?Object[_0x902f5d(0x1ec)](_0x3034b3,_0x5f436b,{'value':_0x97107c,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x3034b3[_0x5f436b]=_0x97107c,_0x3034b3;}let _0x3af2a3=class extends _0x2502f9['Plugin']{constructor(_0x4b4a33=_0x523178,_0x68346d,_0x4e227d){const _0x47565e=_0x221ec9;super(),this['_config']=_0x4b4a33,this['_configService']=_0x68346d,this[_0x47565e(0x1c0)]=_0x4e227d;let {..._0x595cab}=(0x0,_0x2502f9[_0x47565e(0x1c3)])({},_0x523178,this[_0x47565e(0x1ef)]);this[_0x47565e(0x1c7)]['setConfig'](_0x47565e(0x1c9),_0x595cab);}['onStarting'](){const _0x553743=_0x221ec9;this[_0x553743(0x1cd)]();}[_0x221ec9(0x1cd)](){const _0x36b454=_0x221ec9;(0x0,_0x2502f9[_0x36b454(0x1d2)])(this[_0x36b454(0x1c0)],[[_0x1651f9[_0x36b454(0x1ee)],{'useClass':_0x418721}]]);}};_0x4ce961(_0x3af2a3,_0x221ec9(0x1ba),_0x221ec9(0x1cc)),_0x4ce961(_0x3af2a3,_0x221ec9(0x1b3),_0x3a03f9),_0x4ce961(_0x3af2a3,_0x221ec9(0x1e7),_0x35ae66),_0x3af2a3=_0x41b19e([(0x0,_0x2502f9[_0x221ec9(0x1da)])(_0x421c50[_0x221ec9(0x1e0)]),_0x36b007(0x1,_0x2502f9[_0x221ec9(0x1b1)]),_0x36b007(0x2,(0x0,_0x2502f9[_0x221ec9(0x1dd)])(_0x2502f9['Injector']))],_0x3af2a3);let _0x3573a4=class extends _0x421c50[_0x221ec9(0x1b9)]{constructor(_0x26d6ab,_0x1277c8,_0x1258a7,_0x45b7af,_0x582ce0){const _0x21acf3=_0x221ec9;super(_0x26d6ab,_0x1277c8,_0x1258a7,_0x45b7af,_0x582ce0);let _0x44cd70=this[_0x21acf3(0x1c7)][_0x21acf3(0x1e1)](_0x421c50[_0x21acf3(0x1b2)]);this[_0x21acf3(0x1e4)][_0x21acf3(0x1bd)]({'interceptor':(_0x3d3f20,_0xc35d88)=>{const _0x13bea1=_0x21acf3;let _0x3a426f=_0x3d3f20[_0x13bea1(0x1c4)];if(_0x44cd70!=null&&_0x44cd70['customHeaders']){for(let _0x699328 in _0x44cd70[_0x13bea1(0x1e3)])_0x3a426f[_0x13bea1(0x1aa)](_0x699328,_0x44cd70['customHeaders'][_0x699328]);}return _0xc35d88(_0x3d3f20);}});}async[_0x221ec9(0x1ac)](_0x56c628){const _0x36b062=_0x221ec9;return this[_0x36b062(0x1ad)](_0x56c628);}};_0x3573a4=_0x41b19e([_0x36b007(0x0,(0x0,_0x2502f9[_0x221ec9(0x1dd)])(_0x2502f9['Injector'])),_0x36b007(0x1,(0x0,_0x2502f9[_0x221ec9(0x1dd)])(_0x1651f9[_0x221ec9(0x1db)])),_0x36b007(0x2,_0x2502f9[_0x221ec9(0x1b1)]),_0x36b007(0x3,_0x2502f9['ILogService']),_0x36b007(0x4,_0x30cbda[_0x221ec9(0x1b0)])],_0x3573a4),Object[_0x221ec9(0x1ec)](_0x343940,_0x221ec9(0x1bc),{'enumerable':!0x0,'get':function(){return _0x3573a4;}}),Object[_0x221ec9(0x1ec)](_0x343940,'UniverCollaborationClientNodePlugin',{'enumerable':!0x0,'get':function(){return _0x3af2a3;}});}));function _0x4688(){const _0xdc550f=['pluginName','iterator','NodeCollaborationSocketService','registerHTTPInterceptor','symbol','object','_injector','share','toDisposable','merge','headers','554748TfheGu','send','_configService','3220605ofTWYZ','collaboration-client-node.config','message','function','UNIVER_COLLABORATION_CLIENT_NODE_PLUGIN','_registerDependencies','@univerjs/core','exports','rxjs','1518MTDWbm','registerDependencies','next','close','add','24AVburg','17857VJLdhO','constructor','@univerjs-pro/collaboration','DependentOn','HTTPService','Disposable','Inject','removeEventListener','1064042grpAQS','UniverCollaborationClientPlugin','getConfig','ws\x20does\x20not\x20work\x20in\x20the\x20browser.\x20Browser\x20clients\x20must\x20use\x20the\x20native\x20WebSocket\x20object','customHeaders','_httpService','WebSocket','toStringTag','version','Module','Observable','error','13168950YEEAuB','defineProperty','1782992MhqhLV','ISocketService','_config','prototype','decorate','5aCKxNu','3106888fSGUrc','@univerjs-pro/collaboration-client-node','set','getOwnPropertyDescriptor','createSocket','_doCreateSocket','1.0.0-alpha.4','addEventListener','ISnapshotServerService','IConfigService','COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY','packageName','UniverProCollaborationClientNode','DisposableCollection','pipe','toPrimitive','amd','CollaborationSocketService'];_0x4688=function(){return _0xdc550f;};return _0x4688();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/collaboration-client-node",
3
- "version": "1.0.0-alpha.3",
3
+ "version": "1.0.0-alpha.4",
4
4
  "private": false,
5
5
  "description": "Node.js collaboration client plugin for Univer Pro.",
6
6
  "author": "DreamNum Co., Ltd. <developer@univer.ai>",
@@ -52,17 +52,17 @@
52
52
  },
53
53
  "dependencies": {
54
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"
55
+ "@univerjs-pro/collaboration": "1.0.0-alpha.4",
56
+ "@univerjs-pro/collaboration-client": "1.0.0-alpha.4",
57
+ "@univerjs/core": "1.0.0-alpha.4",
58
+ "@univerjs/network": "1.0.0-alpha.4"
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
64
  "vitest": "^4.1.10",
65
- "@univerjs-infra/shared": "1.0.0-alpha.3"
65
+ "@univerjs-infra/shared": "1.0.0-alpha.4"
66
66
  },
67
67
  "scripts": {
68
68
  "test": "vitest run",