@univerjs-pro/live-share 0.22.0 → 0.22.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/facade.js +1 -1
- package/lib/cjs/index.js +1 -1
- package/lib/es/facade.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/facade.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +10 -10
package/lib/cjs/facade.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x5dd9ed=_0x55a9;(function(_0x4f432d,_0x3a3319){const _0x31b991=_0x55a9,_0x343ccf=_0x4f432d();while(!![]){try{const _0x42f8e5=-parseInt(_0x31b991(0x1bf))/0x1*(parseInt(_0x31b991(0x1c9))/0x2)+parseInt(_0x31b991(0x1cd))/0x3+-parseInt(_0x31b991(0x1b4))/0x4+-parseInt(_0x31b991(0x1d1))/0x5*(-parseInt(_0x31b991(0x1bb))/0x6)+parseInt(_0x31b991(0x1b5))/0x7*(parseInt(_0x31b991(0x1d9))/0x8)+parseInt(_0x31b991(0x1de))/0x9*(-parseInt(_0x31b991(0x1c2))/0xa)+parseInt(_0x31b991(0x1b6))/0xb*(-parseInt(_0x31b991(0x1c6))/0xc);if(_0x42f8e5===_0x3a3319)break;else _0x343ccf['push'](_0x343ccf['shift']());}catch(_0x52c600){_0x343ccf['push'](_0x343ccf['shift']());}}}(_0x3def,0x22498));function _0x55a9(_0x3d29eb,_0x41b2c6){_0x3d29eb=_0x3d29eb-0x1af;const _0x3defa0=_0x3def();let _0x55a904=_0x3defa0[_0x3d29eb];return _0x55a904;}let _univerjs_pro_live_share=require('@univerjs-pro/live-share'),_univerjs_core=require('@univerjs/core'),_univerjs_core_facade=require('@univerjs/core/facade');function _0x3def(){const _0x3c2b4a=['LiveShareController','8XcuGLO','_initialize','_injector','IDLE','symbol','963STWpvZ','UNIVER_SHEET','iterator','prototype','getLiveShareStatus','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','LiveShareStatusEnum','96420QlYXMI','1740445QWduSn','2248741VsDQsJ','getStatus','string','defineProperty','FUniver','1049250GnGBlq','object','default','call','89819wJQmEh','toPrimitive','LiveShareStatus','11060vLxvyw','UniverInstanceType','getLiveShareCoordinatorSync','extend','12qHUtcu','startPresenting','_liveShareController','2ELZuKO','FEnum','get','constructor','460881fhsfdK','tryStartPresenting','stopPresenting','getCurrentUnitOfType','5ZWYxor','stopFollowing','getUnitId','No\x20active\x20workbook\x20found.','No\x20LiveShareCoordinator\x20found\x20for\x20the\x20active\x20workbook.','function','IUniverInstanceService'];_0x3def=function(){return _0x3c2b4a;};return _0x3def();}function _typeof(_0x48ee9f){'@babel/helpers - typeof';const _0x470141=_0x55a9;return _typeof=_0x470141(0x1d6)==typeof Symbol&&_0x470141(0x1dd)==typeof Symbol[_0x470141(0x1af)]?function(_0x256d37){return typeof _0x256d37;}:function(_0x105b01){const _0x400a70=_0x470141;return _0x105b01&&_0x400a70(0x1d6)==typeof Symbol&&_0x105b01[_0x400a70(0x1cc)]===Symbol&&_0x105b01!==Symbol[_0x400a70(0x1b0)]?_0x400a70(0x1dd):typeof _0x105b01;},_typeof(_0x48ee9f);}function toPrimitive(_0x3de1cd,_0x11de14){const _0x513dba=_0x55a9;if(_0x513dba(0x1bc)!=_typeof(_0x3de1cd)||!_0x3de1cd)return _0x3de1cd;var _0x2a6d63=_0x3de1cd[Symbol[_0x513dba(0x1c0)]];if(void 0x0!==_0x2a6d63){var _0x42c972=_0x2a6d63[_0x513dba(0x1be)](_0x3de1cd,_0x11de14||_0x513dba(0x1bd));if(_0x513dba(0x1bc)!=_typeof(_0x42c972))return _0x42c972;throw new TypeError(_0x513dba(0x1b2));}return(_0x513dba(0x1b8)===_0x11de14?String:Number)(_0x3de1cd);}function toPropertyKey(_0x333eee){var _0x298eaf=toPrimitive(_0x333eee,'string');return'symbol'==_typeof(_0x298eaf)?_0x298eaf:_0x298eaf+'';}function _defineProperty(_0x52e6d2,_0x5efbd2,_0x4159c0){const _0x19833e=_0x55a9;return(_0x5efbd2=toPropertyKey(_0x5efbd2))in _0x52e6d2?Object[_0x19833e(0x1b9)](_0x52e6d2,_0x5efbd2,{'value':_0x4159c0,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x52e6d2[_0x5efbd2]=_0x4159c0,_0x52e6d2;}var FUniverLiveShareMixin=class extends _univerjs_core_facade[_0x5dd9ed(0x1ba)]{constructor(..._0x5585aa){const _0x7b9f7c=_0x5dd9ed;super(..._0x5585aa),_defineProperty(this,_0x7b9f7c(0x1c8),void 0x0);}[_0x5dd9ed(0x1da)](_0x66d675){const _0x13699f=_0x5dd9ed;this[_0x13699f(0x1c8)]=_0x66d675[_0x13699f(0x1cb)](_univerjs_pro_live_share[_0x13699f(0x1d8)]);}[_0x5dd9ed(0x1b1)](){const _0x48b225=_0x5dd9ed;var _0x11487d;const _0x813050=this[_0x48b225(0x1db)][_0x48b225(0x1cb)](_univerjs_core[_0x48b225(0x1d7)])[_0x48b225(0x1d0)](_univerjs_core[_0x48b225(0x1c3)][_0x48b225(0x1df)]);if(!_0x813050)throw new Error(_0x48b225(0x1d4));const _0x4e8a70=_0x813050[_0x48b225(0x1d3)](),_0x11b613=this[_0x48b225(0x1c8)][_0x48b225(0x1c4)](_0x4e8a70);return(_0x11487d=_0x11b613===null||_0x11b613===void 0x0?void 0x0:_0x11b613[_0x48b225(0x1b7)]())!==null&&_0x11487d!==void 0x0?_0x11487d:_univerjs_pro_live_share[_0x48b225(0x1c1)][_0x48b225(0x1dc)];}['startFollowing'](){const _0x5cfcee=_0x5dd9ed,_0x420d41=this[_0x5cfcee(0x1db)]['get'](_univerjs_core[_0x5cfcee(0x1d7)])['getCurrentUnitOfType'](_univerjs_core[_0x5cfcee(0x1c3)][_0x5cfcee(0x1df)]);if(!_0x420d41)throw new Error(_0x5cfcee(0x1d4));const _0x2462a8=_0x420d41[_0x5cfcee(0x1d3)](),_0x557e2e=this[_0x5cfcee(0x1c8)][_0x5cfcee(0x1c4)](_0x2462a8);if(!_0x557e2e)throw new Error('No\x20LiveShareCoordinator\x20found\x20for\x20the\x20active\x20workbook.');_0x557e2e['startFollowing']();}['stopFollowing'](){const _0x8eba8=_0x5dd9ed,_0x4a15f=this['_injector'][_0x8eba8(0x1cb)](_univerjs_core[_0x8eba8(0x1d7)])[_0x8eba8(0x1d0)](_univerjs_core[_0x8eba8(0x1c3)][_0x8eba8(0x1df)]);if(!_0x4a15f)throw new Error(_0x8eba8(0x1d4));const _0x5c2f95=_0x4a15f[_0x8eba8(0x1d3)](),_0x199087=this[_0x8eba8(0x1c8)][_0x8eba8(0x1c4)](_0x5c2f95);if(!_0x199087)throw new Error(_0x8eba8(0x1d5));_0x199087[_0x8eba8(0x1d2)]();}[_0x5dd9ed(0x1c7)](){const _0x5b7117=_0x5dd9ed,_0x51e816=this[_0x5b7117(0x1db)][_0x5b7117(0x1cb)](_univerjs_core[_0x5b7117(0x1d7)])[_0x5b7117(0x1d0)](_univerjs_core[_0x5b7117(0x1c3)][_0x5b7117(0x1df)]);if(!_0x51e816)throw new Error(_0x5b7117(0x1d4));const _0x1cd62f=_0x51e816['getUnitId'](),_0x539ce8=this['_liveShareController'][_0x5b7117(0x1c4)](_0x1cd62f);if(!_0x539ce8)throw new Error(_0x5b7117(0x1d5));_0x539ce8[_0x5b7117(0x1ce)]();}[_0x5dd9ed(0x1cf)](){const _0x9e0fc6=_0x5dd9ed,_0x158165=this[_0x9e0fc6(0x1db)][_0x9e0fc6(0x1cb)](_univerjs_core[_0x9e0fc6(0x1d7)])[_0x9e0fc6(0x1d0)](_univerjs_core[_0x9e0fc6(0x1c3)]['UNIVER_SHEET']);if(!_0x158165)throw new Error(_0x9e0fc6(0x1d4));const _0x2a72ee=_0x158165[_0x9e0fc6(0x1d3)](),_0x959fc=this[_0x9e0fc6(0x1c8)][_0x9e0fc6(0x1c4)](_0x2a72ee);if(!_0x959fc)throw new Error(_0x9e0fc6(0x1d5));_0x959fc['stopPresenting']();}};_univerjs_core_facade[_0x5dd9ed(0x1ba)]['extend'](FUniverLiveShareMixin);var FLiveShareEnumMixin=class extends _univerjs_core_facade[_0x5dd9ed(0x1ca)]{get[_0x5dd9ed(0x1b3)](){const _0x6b437f=_0x5dd9ed;return _univerjs_pro_live_share[_0x6b437f(0x1c1)];}};_univerjs_core_facade['FEnum'][_0x5dd9ed(0x1c5)](FLiveShareEnumMixin);
|
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0xd7441f=_0x2cb6;(function(_0x5a9006,_0x5d59f1){const _0x2035d7=_0x2cb6,_0x8e148d=_0x5a9006();while(!![]){try{const _0x54c597=parseInt(_0x2035d7(0x20c))/0x1*(parseInt(_0x2035d7(0x249))/0x2)+-parseInt(_0x2035d7(0x238))/0x3+-parseInt(_0x2035d7(0x231))/0x4+-parseInt(_0x2035d7(0x21c))/0x5*(parseInt(_0x2035d7(0x22d))/0x6)+-parseInt(_0x2035d7(0x228))/0x7+-parseInt(_0x2035d7(0x1d3))/0x8*(parseInt(_0x2035d7(0x206))/0x9)+-parseInt(_0x2035d7(0x1ea))/0xa*(-parseInt(_0x2035d7(0x1fe))/0xb);if(_0x54c597===_0x5d59f1)break;else _0x8e148d['push'](_0x8e148d['shift']());}catch(_0x2a5f23){_0x8e148d['push'](_0x8e148d['shift']());}}}(_0x4bcd,0xbb915),Object[_0xd7441f(0x1c4)](exports,Symbol[_0xd7441f(0x224)],{'value':_0xd7441f(0x1b6)}));let _univerjs_core=require('@univerjs/core'),_univerjs_ui=require('@univerjs/ui'),_univerjs_design=require('@univerjs/design'),_univerjs_icons=require('@univerjs/icons'),react=require('react'),_univerjs_pro_collaboration=require('@univerjs-pro/collaboration'),_univerjs_pro_collaboration_client=require('@univerjs-pro/collaboration-client'),_univerjs_sheets=require('@univerjs/sheets'),rxjs=require('rxjs'),rxjs_operators=require('rxjs/operators'),react_jsx_runtime=require('react/jsx-runtime'),_univerjs_sheets_ui=require('@univerjs/sheets-ui');function _typeof(_0x3b56c7){'@babel/helpers - typeof';const _0x1556cc=_0xd7441f;return _typeof=_0x1556cc(0x216)==typeof Symbol&&_0x1556cc(0x24c)==typeof Symbol[_0x1556cc(0x1c5)]?function(_0x3ca755){return typeof _0x3ca755;}:function(_0x23eee2){const _0x15b256=_0x1556cc;return _0x23eee2&&_0x15b256(0x216)==typeof Symbol&&_0x23eee2[_0x15b256(0x274)]===Symbol&&_0x23eee2!==Symbol[_0x15b256(0x262)]?_0x15b256(0x24c):typeof _0x23eee2;},_typeof(_0x3b56c7);}function toPrimitive(_0x3dd46f,_0x759b4e){const _0x40021a=_0xd7441f;if(_0x40021a(0x26f)!=_typeof(_0x3dd46f)||!_0x3dd46f)return _0x3dd46f;var _0x1cd169=_0x3dd46f[Symbol['toPrimitive']];if(void 0x0!==_0x1cd169){var _0x83bb07=_0x1cd169[_0x40021a(0x1be)](_0x3dd46f,_0x759b4e||_0x40021a(0x252));if(_0x40021a(0x26f)!=_typeof(_0x83bb07))return _0x83bb07;throw new TypeError(_0x40021a(0x1b2));}return('string'===_0x759b4e?String:Number)(_0x3dd46f);}function toPropertyKey(_0x2ff4a2){const _0x2bf297=_0xd7441f;var _0xef1847=toPrimitive(_0x2ff4a2,_0x2bf297(0x23f));return _0x2bf297(0x24c)==_typeof(_0xef1847)?_0xef1847:_0xef1847+'';}function _defineProperty(_0x16e56c,_0x211888,_0x1eccf8){const _0x23f685=_0xd7441f;return(_0x211888=toPropertyKey(_0x211888))in _0x16e56c?Object[_0x23f685(0x1c4)](_0x16e56c,_0x211888,{'value':_0x1eccf8,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x16e56c[_0x211888]=_0x1eccf8,_0x16e56c;}var LiveShareService=class extends _univerjs_core[_0xd7441f(0x23a)]{constructor(..._0x448106){const _0x471be1=_0xd7441f;super(..._0x448106),_defineProperty(this,'_sharedOperations',new Set()),_defineProperty(this,_0x471be1(0x261),new Set());}[_0xd7441f(0x1ce)](_0x1ad5b6){const _0x2e371c=_0xd7441f;return this[_0x2e371c(0x1e9)]['add'](_0x1ad5b6),(0x0,_univerjs_core[_0x2e371c(0x1c8)])(()=>this[_0x2e371c(0x1e9)][_0x2e371c(0x1d5)](_0x1ad5b6));}[_0xd7441f(0x1ed)](_0x4175a1){const _0x44037f=_0xd7441f;return this[_0x44037f(0x261)][_0x44037f(0x204)](_0x4175a1),(0x0,_univerjs_core[_0x44037f(0x1c8)])(()=>this['_reporters'][_0x44037f(0x1d5)](_0x4175a1));}[_0xd7441f(0x213)](_0x352820){const _0x3bf1f7=_0xd7441f;return this[_0x3bf1f7(0x1e9)][_0x3bf1f7(0x22c)](_0x352820);}[_0xd7441f(0x219)](_0x339036){const _0x546dc9=_0xd7441f;return Array[_0x546dc9(0x264)](this[_0x546dc9(0x261)])[_0x546dc9(0x226)](_0x5e6157=>_0x5e6157(_0x339036));}};function __decorateParam(_0x51286f,_0x12f374){return function(_0x2944e9,_0x24403e){_0x12f374(_0x2944e9,_0x24403e,_0x51286f);};}function __decorate(_0x2c9c4f,_0x1c3229,_0x438856,_0x4cf7d9){const _0xc76f46=_0xd7441f;var _0x2f153e=arguments[_0xc76f46(0x20b)],_0xf87ecc=_0x2f153e<0x3?_0x1c3229:_0x4cf7d9===null?_0x4cf7d9=Object[_0xc76f46(0x26b)](_0x1c3229,_0x438856):_0x4cf7d9,_0x198ab4;if(typeof Reflect==='object'&&typeof Reflect['decorate']===_0xc76f46(0x216))_0xf87ecc=Reflect[_0xc76f46(0x200)](_0x2c9c4f,_0x1c3229,_0x438856,_0x4cf7d9);else{for(var _0x20fa47=_0x2c9c4f[_0xc76f46(0x20b)]-0x1;_0x20fa47>=0x0;_0x20fa47--)if(_0x198ab4=_0x2c9c4f[_0x20fa47])_0xf87ecc=(_0x2f153e<0x3?_0x198ab4(_0xf87ecc):_0x2f153e>0x3?_0x198ab4(_0x1c3229,_0x438856,_0xf87ecc):_0x198ab4(_0x1c3229,_0x438856))||_0xf87ecc;}return _0x2f153e>0x3&&_0xf87ecc&&Object[_0xc76f46(0x1c4)](_0x1c3229,_0x438856,_0xf87ecc),_0xf87ecc;}let LiveShareController=class LiveShareController extends _univerjs_core[_0xd7441f(0x232)]{constructor(_0x54ad84,_0x27e36d,_0x494122){const _0x50b4ed=_0xd7441f;super(),this[_0x50b4ed(0x1e0)]=_0x54ad84,this[_0x50b4ed(0x253)]=_0x27e36d,this['_collabSessionService']=_0x494122,_defineProperty(this,_0x50b4ed(0x207),new Map()),this[_0x50b4ed(0x1f9)]();}async[_0xd7441f(0x1cc)](_0xe148e5){const _0x4e799c=_0xd7441f;if(!this['_entities'][_0x4e799c(0x22c)](_0xe148e5))await this[_0x4e799c(0x235)](_0xe148e5);return this[_0x4e799c(0x207)]['get'](_0xe148e5);}[_0xd7441f(0x210)](_0x283e7a){const _0x555314=_0xd7441f;var _0xf6ed37;return(_0xf6ed37=this['_entities'][_0x555314(0x1fa)](_0x283e7a))!==null&&_0xf6ed37!==void 0x0?_0xf6ed37:null;}[_0xd7441f(0x1f9)](){const _0xe81908=_0xd7441f;this[_0xe81908(0x1e0)][_0xe81908(0x1b9)](_univerjs_core[_0xe81908(0x1b7)][_0xe81908(0x1fd)])[_0xe81908(0x259)]((0x0,rxjs_operators[_0xe81908(0x246)])(this[_0xe81908(0x1b5)]))['subscribe'](async _0x5589c0=>{const _0x18425e=_0xe81908,_0x6daaef=_0x5589c0[_0x18425e(0x266)][_0x18425e(0x1cb)]();if(this[_0x18425e(0x207)][_0x18425e(0x22c)](_0x6daaef))return;this[_0x18425e(0x235)](_0x6daaef);}),this[_0xe81908(0x1e0)][_0xe81908(0x1e8)](_univerjs_core['UniverInstanceType'][_0xe81908(0x1fd)])[_0xe81908(0x259)]((0x0,rxjs_operators[_0xe81908(0x246)])(this[_0xe81908(0x1b5)]))[_0xe81908(0x1bf)](_0x1fd50b=>{const _0x2b8a1a=_0xe81908,_0x5a0b6f=_0x1fd50b[_0x2b8a1a(0x1cb)](),_0x5d8d87=this[_0x2b8a1a(0x207)][_0x2b8a1a(0x1fa)](_0x5a0b6f);_0x5d8d87===null||_0x5d8d87===void 0x0||_0x5d8d87['dispose']();});}async[_0xd7441f(0x235)](_0x47620b){const _0x544b51=_0xd7441f,_0x284af0=await this['_collabSessionService'][_0x544b51(0x1ff)](_0x47620b),_0x477b3d=this[_0x544b51(0x253)][_0x544b51(0x240)](LiveShareCoordinator,_0x47620b,_0x284af0);return _0x477b3d[_0x544b51(0x24b)](),this['_entities']['set'](_0x47620b,_0x477b3d),_0x477b3d;}};LiveShareController=__decorate([__decorateParam(0x0,_univerjs_core[_0xd7441f(0x1c6)]),__decorateParam(0x1,(0x0,_univerjs_core[_0xd7441f(0x220)])(_univerjs_core[_0xd7441f(0x1d8)])),__decorateParam(0x2,(0x0,_univerjs_core['Inject'])(_univerjs_pro_collaboration_client[_0xd7441f(0x23d)]))],LiveShareController);let LiveShareStatus=function(_0x702988){const _0x32ff06=_0xd7441f;return _0x702988[_0x32ff06(0x241)]=_0x32ff06(0x230),_0x702988[_0x32ff06(0x20a)]=_0x32ff06(0x21b),_0x702988[_0x32ff06(0x222)]=_0x32ff06(0x1b1),_0x702988['NOT_FOLLOWING']=_0x32ff06(0x25b),_0x702988['PRESENTING']=_0x32ff06(0x1d0),_0x702988;}({});const SAME_OPERATION_SHARE_INTERVAL_KEY=_0xd7441f(0x26c),DEFAULT_SAME_OPERATION_SHARE_INTERVAL=0xc8;function _0x4bcd(){const _0x4f626d=['2PWaXkU','SetWorksheetActiveOperation','init','symbol','UNIVER_UNKNOWN','_commandDisposable','_handleNewChangeSets','_startFollowing','_handleTerminate','default','_injector','next','ICommandService','touchDependencies','operations','set','pipe','LiveShareService','not-following','_fetchOperations','DependentOn','useDependency','setConfig','You\x27are\x20offline.','_reporters','prototype','forEach','from','You\x27re\x20presenting\x20the\x20document','unit','LIVESHARE_NEW_HOST','unsubscribe','getConfig','IConfigService','getOwnPropertyDescriptor','SAME_OPERATION_SHARE_INTERVAL','stopPresenting','tryStartPresenting','object','unitId','_liveShareService','univer-box-border\x20univer-min-w-60\x20univer-bg-gray-900\x20univer-px-4\x20univer-py-3\x20univer-text-gray-900\x20dark:!univer-bg-white\x20dark:!univer-text-white','_configService','constructor','You\x27re\x20following\x20the\x20presenter','executeCommand','onRendered','stringify','LIVESHARE_REQUEST_HOST','following','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','SetZoomRatioOperation','univer-border-none\x20univer-text-gray-600\x20univer-outline-none','dispose$','Module','UniverInstanceType','data','getTypeOfUnitAdded$','_uiPartsService','LIVESHARE_FETCH_OPERATIONS','mutations','_handleOnline','call','subscribe','clsx','Start\x20following','_presenter','asObservable','defineProperty','iterator','IUniverInstanceService','stopFollowing','toDisposable','_status','dispose','getUnitId','getLiveShareCoordinator','_unitID','registerSharedOperation','reverse','presenting','find','SessionStatus','272QXZguS','live-share.config','delete','LiveShareCoordinator','disposeWithMe','Injector','Dropdown','button','Subject','InsertSheetMutation','BehaviorSubject','then','getCurrentTypeOfUnit$','_univerInstanceService','ONLINE','merge','clear','_beIdle','IUIPartsService','useState','_stopPresenting','getTypeOfUnitDisposed$','_sharedOperations','21363110EkBNNF','UNIVER_LIVE_SHARE_PLUGIN','parse','registerInitialStateReporter','Plugin','univer-mb-3\x20univer-w-full\x20univer-text-sm','onStarting','You\x27re\x20not\x20following\x20the\x20presenter','CommandType','_handleNewHost','_commandService','parseProtocolChangeset','values','DesktopLiveShareController','_mountLiveShare','_init','get','connectInjector','LIVESHARE_OPERATION','UNIVER_SHEET','22NHzYel','requireSession','decorate','text','_handleOperation','packageName','add','LiveShareStatus','328257sqbLbK','_entities','_status$','getMemberID','IDLE','length','630233dRoZgm','send','jsxs','Present\x20this\x20document','getLiveShareCoordinatorSync','getStatus','sessionStatus$','shouldShareOperation','CollaborationEvent','_config','function','current','status$','getInitialStates','_collabSession','idle','216005KzuEIY','jsx','sheet','Fragment','Inject','DisposableCollection','FOLLOWING','NEW_CHANGESETS','toStringTag','useEffect','map','pluginName','1348109mbMWbt','HEADER_MENU','version','startFollowing','has','12FgJJWN','Start','LiveShareIcon','offline','5273184rQernk','RxDisposable','_stopFollowing','type','_startLiveShareCoordinator','getValue','Button','3891633pmxJUn','params','Disposable','LiveShareController','presenter','CollaborationSessionService','complete','string','createInstance','OFFLINE','override','_handleOffline','univer-size-4','UniverLiveSharePlugin','takeUntil','_startPresenting','div'];_0x4bcd=function(){return _0x4f626d;};return _0x4bcd();}function _0x2cb6(_0x38ca3a,_0x219238){_0x38ca3a=_0x38ca3a-0x1ad;const _0x4bcd07=_0x4bcd();let _0x2cb676=_0x4bcd07[_0x38ca3a];return _0x2cb676;}let LiveShareCoordinator=class LiveShareCoordinator extends _univerjs_core[_0xd7441f(0x232)]{get[_0xd7441f(0x1c9)](){const _0x10f926=_0xd7441f;return this[_0x10f926(0x208)][_0x10f926(0x236)]();}constructor(_0x13e635,_0x4907bd,_0x274a3e,_0xa479bd,_0x749889){const _0x4edc77=_0xd7441f;super(),this['_unitID']=_0x13e635,this[_0x4edc77(0x21a)]=_0x4907bd,this[_0x4edc77(0x273)]=_0x274a3e,this[_0x4edc77(0x271)]=_0xa479bd,this['_commandService']=_0x749889,_defineProperty(this,'_status$',new rxjs[(_0x4edc77(0x1dd))](_0x4edc77(0x21b))),_defineProperty(this,'status$',this[_0x4edc77(0x208)][_0x4edc77(0x1c3)]()),_defineProperty(this,_0x4edc77(0x1f9),![]),_defineProperty(this,_0x4edc77(0x24e),null),_defineProperty(this,_0x4edc77(0x1c2),null);}[_0xd7441f(0x1ca)](){const _0x20a2bf=_0xd7441f;var _0x41f02d;(_0x41f02d=this['_commandDisposable'])===null||_0x41f02d===void 0x0||_0x41f02d[_0x20a2bf(0x1ca)](),this['_status$'][_0x20a2bf(0x254)](_0x20a2bf(0x21b)),this[_0x20a2bf(0x208)]['complete']();}[_0xd7441f(0x211)](){const _0x42e473=_0xd7441f;return this[_0x42e473(0x1c9)];}['init'](){const _0x549916=_0xd7441f;if(this['_init'])return;this[_0x549916(0x1f9)]=!![],this[_0x549916(0x21a)][_0x549916(0x212)][_0x549916(0x259)]((0x0,rxjs_operators[_0x549916(0x246)])(this['dispose$']))[_0x549916(0x1bf)](_0xbfb8c9=>{const _0x2a7294=_0x549916;switch(_0xbfb8c9){case _univerjs_pro_collaboration_client['SessionStatus'][_0x2a7294(0x241)]:this[_0x2a7294(0x243)]();break;case _univerjs_pro_collaboration_client[_0x2a7294(0x1d2)][_0x2a7294(0x1e1)]:this[_0x2a7294(0x1bd)]();break;default:}}),this['_collabSession']['event$'][_0x549916(0x259)]((0x0,rxjs_operators['takeUntil'])(this[_0x549916(0x1b5)]))[_0x549916(0x1bf)](_0x2b67c2=>{const _0x206c5c=_0x549916,{eventID:_0xd75ab}=_0x2b67c2;switch(_0xd75ab){case _univerjs_pro_collaboration[_0x206c5c(0x214)][_0x206c5c(0x267)]:this[_0x206c5c(0x1f3)](_0x2b67c2);break;case _univerjs_pro_collaboration[_0x206c5c(0x214)]['LIVESHARE_OPERATION']:this[_0x206c5c(0x202)](_0x2b67c2);break;case _univerjs_pro_collaboration[_0x206c5c(0x214)]['LIVESHARE_TERMINATE']:this[_0x206c5c(0x251)]();break;case _univerjs_pro_collaboration[_0x206c5c(0x214)][_0x206c5c(0x223)]:this[_0x206c5c(0x24f)](_0x2b67c2);break;default:}});}['tryStartPresenting'](){const _0x54d65b=_0xd7441f;this[_0x54d65b(0x21a)][_0x54d65b(0x20d)]({'eventID':_univerjs_pro_collaboration[_0x54d65b(0x214)][_0x54d65b(0x1b0)],'data':{'unitID':this[_0x54d65b(0x1cd)],'userID':this[_0x54d65b(0x21a)][_0x54d65b(0x209)]()}},this[_0x54d65b(0x1cd)]);}['stopPresenting'](){const _0x2b3614=_0xd7441f;this[_0x2b3614(0x1c9)]===_0x2b3614(0x1d0)&&(this['_status$']['next'](_0x2b3614(0x21b)),this[_0x2b3614(0x21a)][_0x2b3614(0x20d)]({'eventID':_univerjs_pro_collaboration[_0x2b3614(0x214)]['LIVESHARE_TERMINATE'],'data':{'unitID':this[_0x2b3614(0x1cd)]}},this[_0x2b3614(0x1cd)]));}[_0xd7441f(0x22b)](){const _0xc23b96=_0xd7441f;if(this[_0xc23b96(0x1c9)]!=='not-following')return;this['_status$'][_0xc23b96(0x254)]('following'),this['_startFollowing']();}['stopFollowing'](){const _0x22dc07=_0xd7441f;if(this[_0x22dc07(0x1c9)]!==_0x22dc07(0x1b1))return;this[_0x22dc07(0x233)]();}[_0xd7441f(0x1f3)](_0x4605dc){const _0x176a9c=_0xd7441f,{presenter:_0x35e328}=_0x4605dc['data'],_0x5b8d6b=this[_0x176a9c(0x21a)][_0x176a9c(0x209)]();this[_0x176a9c(0x1c2)]=_0x35e328;if(_0x35e328===_0x5b8d6b)this[_0x176a9c(0x233)](),this[_0x176a9c(0x247)]();else this[_0x176a9c(0x1c9)]!=='not-following'&&(this['_stopPresenting'](),this[_0x176a9c(0x250)]());}[_0xd7441f(0x25c)](){const _0x54d1fa=_0xd7441f,_0x246f9b={'eventID':_univerjs_pro_collaboration[_0x54d1fa(0x214)][_0x54d1fa(0x1bb)]};this['_collabSession'][_0x54d1fa(0x20d)](_0x246f9b,this['_unitID']);}[_0xd7441f(0x251)](){const _0x19b0b5=_0xd7441f;this[_0x19b0b5(0x1c2)]=null;if(this[_0x19b0b5(0x1c9)]!==_0x19b0b5(0x1d0))this['_beIdle']();}[_0xd7441f(0x24f)](_0xb340ee){const _0x3d25f9=_0xd7441f;if(this[_0x3d25f9(0x1c9)]==='following'&&this[_0x3d25f9(0x1c2)]===_0xb340ee[_0x3d25f9(0x1b8)]['memberID']){const _0x3013b9=(0x0,_univerjs_pro_collaboration[_0x3d25f9(0x1f5)])(_0xb340ee[_0x3d25f9(0x1b8)])[_0x3d25f9(0x1bc)][_0x3d25f9(0x1cf)]()[_0x3d25f9(0x1d1)](_0x3e7589=>_0x3e7589['id']===_univerjs_sheets[_0x3d25f9(0x1dc)]['id']);if(_0x3013b9){const _0x4aee45=_0x3013b9['params'][_0x3d25f9(0x270)],_0x240454=_0x3013b9['params'][_0x3d25f9(0x21e)]['id'];setTimeout(()=>{const _0x1c04b0=_0x3d25f9;this[_0x1c04b0(0x1f4)]['executeCommand'](_univerjs_sheets[_0x1c04b0(0x24a)]['id'],{'unitId':_0x4aee45,'subUnitId':_0x240454},{'fromCollab':!![]});});}}}[_0xd7441f(0x247)](){const _0xe8c458=_0xd7441f;this[_0xe8c458(0x208)][_0xe8c458(0x254)](_0xe8c458(0x1d0));const _0x197380=new Map(),_0x28f074=this[_0xe8c458(0x24e)]=new _univerjs_core[(_0xe8c458(0x221))]();_0x28f074['add']((0x0,_univerjs_core['toDisposable'])(()=>{const _0x156fe4=_0xe8c458;_0x197380['forEach'](_0x2cb8d1=>_0x2cb8d1[_0x156fe4(0x23e)]()),_0x197380[_0x156fe4(0x1e3)]();})),_0x28f074[_0xe8c458(0x204)](this[_0xe8c458(0x1f4)]['onCommandExecuted'](_0x3a66f5=>{const _0x49370b=_0xe8c458;if(_0x3a66f5[_0x49370b(0x234)]!==_univerjs_core[_0x49370b(0x1f2)]['OPERATION']||!this[_0x49370b(0x271)][_0x49370b(0x213)](_0x3a66f5['id']))return;const {id:_0x1809f0}=_0x3a66f5;let _0x7b8c4f;if(!_0x197380[_0x49370b(0x22c)](_0x1809f0)){var _0x2f86e3;_0x7b8c4f=new rxjs[(_0x49370b(0x1db))](),_0x197380[_0x49370b(0x258)](_0x1809f0,_0x7b8c4f),_0x7b8c4f['pipe']((0x0,rxjs_operators['throttleTime'])((_0x2f86e3=this[_0x49370b(0x273)][_0x49370b(0x269)]('SAME_OPERATION_SHARE_INTERVAL'))!==null&&_0x2f86e3!==void 0x0?_0x2f86e3:DEFAULT_SAME_OPERATION_SHARE_INTERVAL,void 0x0,{'trailing':!![],'leading':!![]}))[_0x49370b(0x1bf)](_0x2319d0=>{const _0x215bbf=_0x49370b;this[_0x215bbf(0x21a)][_0x215bbf(0x20d)]({'eventID':_univerjs_pro_collaboration[_0x215bbf(0x214)][_0x215bbf(0x1fc)],'data':{'unitID':this[_0x215bbf(0x1cd)],'operations':{[_0x2319d0['id']]:{'id':_0x2319d0['id'],'params':JSON[_0x215bbf(0x1af)](_0x2319d0[_0x215bbf(0x239)])}}}},this['_unitID']);});}else _0x7b8c4f=_0x197380['get'](_0x1809f0);_0x7b8c4f[_0x49370b(0x254)](_0x3a66f5);})),this[_0xe8c458(0x271)]['getInitialStates'](this[_0xe8c458(0x1cd)])[_0xe8c458(0x263)](_0x46fabb=>this[_0xe8c458(0x21a)][_0xe8c458(0x20d)]({'eventID':_univerjs_pro_collaboration[_0xe8c458(0x214)][_0xe8c458(0x1fc)],'data':{'unitID':this[_0xe8c458(0x1cd)],'operations':{[_0x46fabb['id']]:{'id':_0x46fabb['id'],'params':JSON[_0xe8c458(0x1af)](_0x46fabb[_0xe8c458(0x239)])}}}},this[_0xe8c458(0x1cd)]));}[_0xd7441f(0x1e7)](){const _0x5733e4=_0xd7441f;var _0x36bcc3;this[_0x5733e4(0x208)][_0x5733e4(0x254)](_0x5733e4(0x21b)),(_0x36bcc3=this['_commandDisposable'])===null||_0x36bcc3===void 0x0||_0x36bcc3['dispose'](),this[_0x5733e4(0x24e)]=null;}[_0xd7441f(0x250)](){const _0x25ba98=_0xd7441f;var _0x37128f;(_0x37128f=this[_0x25ba98(0x24e)])===null||_0x37128f===void 0x0||_0x37128f[_0x25ba98(0x1ca)](),this[_0x25ba98(0x208)][_0x25ba98(0x254)](_0x25ba98(0x1b1));}[_0xd7441f(0x1e4)](){const _0x2b9b22=_0xd7441f;var _0x5df956;this[_0x2b9b22(0x208)][_0x2b9b22(0x254)]('idle'),(_0x5df956=this[_0x2b9b22(0x24e)])===null||_0x5df956===void 0x0||_0x5df956[_0x2b9b22(0x1ca)](),this[_0x2b9b22(0x24e)]=null;}[_0xd7441f(0x233)](){const _0x40c782=_0xd7441f;var _0x2cdc35;this['_status$']['next'](_0x40c782(0x25b)),(_0x2cdc35=this['_commandDisposable'])===null||_0x2cdc35===void 0x0||_0x2cdc35['dispose']();}['_handleOperation'](_0x183be4){const _0x11192b=_0xd7441f;if([_0x11192b(0x1d0),'not-following',_0x11192b(0x230)]['includes'](this[_0x11192b(0x1c9)]))return;if(!_0x183be4['data'][_0x11192b(0x23c)]||_0x183be4[_0x11192b(0x1b8)][_0x11192b(0x23c)]===this[_0x11192b(0x21a)][_0x11192b(0x209)]())return;if(this[_0x11192b(0x1c9)]===_0x11192b(0x21b))this['_startFollowing']();const _0x1eb994=_0x183be4[_0x11192b(0x1b8)][_0x11192b(0x257)];Object[_0x11192b(0x1f6)](_0x1eb994)[_0x11192b(0x263)](_0x3a64a1=>{const _0x30227d=_0x11192b;this[_0x30227d(0x1f4)][_0x30227d(0x1ad)](_0x3a64a1['id'],_0x3a64a1[_0x30227d(0x239)]?JSON[_0x30227d(0x1ec)](_0x3a64a1[_0x30227d(0x239)]):null,{'fromCollab':!![]});});}[_0xd7441f(0x243)](){const _0x50f64e=_0xd7441f;var _0x2bc916;this['_status$']['next']('offline'),(_0x2bc916=this[_0x50f64e(0x24e)])===null||_0x2bc916===void 0x0||_0x2bc916['dispose']();}[_0xd7441f(0x1bd)](){const _0x5f1581=_0xd7441f;this[_0x5f1581(0x208)][_0x5f1581(0x254)](_0x5f1581(0x21b)),this[_0x5f1581(0x25c)]();}};LiveShareCoordinator=__decorate([__decorateParam(0x2,_univerjs_core[_0xd7441f(0x26a)]),__decorateParam(0x3,(0x0,_univerjs_core['Inject'])(LiveShareService)),__decorateParam(0x4,_univerjs_core[_0xd7441f(0x255)])],LiveShareCoordinator);function LiveShare(){const _0x2e0eaf=_0xd7441f,_0x565c64=(0x0,_univerjs_ui['useDependency'])(LiveShareController),_0x29082f=(0x0,_univerjs_ui[_0x2e0eaf(0x25e)])(_univerjs_core['IUniverInstanceService']),_0x11d64c=(0x0,_univerjs_ui['useObservable'])(()=>_0x29082f[_0x2e0eaf(0x1df)](_univerjs_core[_0x2e0eaf(0x1b7)][_0x2e0eaf(0x1fd)]),void 0x0,![],[]),[_0x489e65,_0xbd0910]=(0x0,react[_0x2e0eaf(0x1e6)])(null),[_0x6ce115,_0x1e00ba]=(0x0,react[_0x2e0eaf(0x1e6)])(_0x2e0eaf(0x21b)),_0x3726b4=(0x0,react['useRef'])(null);(0x0,react[_0x2e0eaf(0x225)])(()=>{const _0x2c585=_0x2e0eaf;if(_0x11d64c)_0x565c64[_0x2c585(0x1cc)](_0x11d64c[_0x2c585(0x1cb)]())[_0x2c585(0x1de)](_0x130f2f=>{const _0x385627=_0x2c585;_0xbd0910(_0x130f2f),_0x3726b4['current']=_0x130f2f[_0x385627(0x218)][_0x385627(0x1bf)](_0x2cc9a9=>{_0x1e00ba(_0x2cc9a9);});});return()=>{const _0x13ba27=_0x2c585;var _0x25a09e;(_0x25a09e=_0x3726b4[_0x13ba27(0x217)])===null||_0x25a09e===void 0x0||_0x25a09e[_0x13ba27(0x268)](),_0x3726b4['current']=null;};},[_0x11d64c,_0x565c64]);if(!_0x489e65)return null;return(0x0,react_jsx_runtime[_0x2e0eaf(0x21d)])(_univerjs_design[_0x2e0eaf(0x1d9)],{'align':'end','disabled':_0x6ce115==='offline','className':_0x2e0eaf(0x272),'overlay':(0x0,react_jsx_runtime[_0x2e0eaf(0x21d)])(LiveShareDropdown,{'status':_0x6ce115,'coordinator':_0x489e65}),'children':(0x0,react_jsx_runtime[_0x2e0eaf(0x21d)])(_0x2e0eaf(0x1da),{'className':(0x0,_univerjs_design[_0x2e0eaf(0x1c0)])(_0x2e0eaf(0x1b4),{'univer-cursor-not-allowed':_0x6ce115===_0x2e0eaf(0x230),'univer-cursor-pointer\x20hover:univer-bg-gray-400':_0x6ce115!==_0x2e0eaf(0x230)}),'type':_0x2e0eaf(0x1da),'children':(0x0,react_jsx_runtime[_0x2e0eaf(0x21d)])(_univerjs_icons[_0x2e0eaf(0x22f)],{'className':_0x2e0eaf(0x244)})})});}function LiveShareDropdown(_0x9d6d47){const _0x350fe6=_0xd7441f,{status:_0x4c1082,coordinator:_0x14455a}=_0x9d6d47;switch(_0x4c1082){case _0x350fe6(0x21b):return(0x0,react_jsx_runtime[_0x350fe6(0x21d)])(Idle,{'coordinator':_0x14455a});case _0x350fe6(0x1b1):return(0x0,react_jsx_runtime[_0x350fe6(0x21d)])(Following,{'coordinator':_0x14455a});case _0x350fe6(0x25b):return(0x0,react_jsx_runtime['jsx'])(NotFollowing,{'coordinator':_0x14455a});case _0x350fe6(0x230):return(0x0,react_jsx_runtime[_0x350fe6(0x21d)])(Offline,{});case _0x350fe6(0x1d0):return(0x0,react_jsx_runtime[_0x350fe6(0x21d)])(Presenting,{'coordinator':_0x14455a});default:return null;}}function Idle(_0xc90d56){const _0x5ef980=_0xd7441f,{coordinator:_0x542fd6}=_0xc90d56;return(0x0,react_jsx_runtime[_0x5ef980(0x20e)])(react_jsx_runtime[_0x5ef980(0x21f)],{'children':[(0x0,react_jsx_runtime[_0x5ef980(0x21d)])(_0x5ef980(0x248),{'className':_0x5ef980(0x1ef),'children':_0x5ef980(0x20f)}),(0x0,react_jsx_runtime['jsx'])(_univerjs_design['Button'],{'onClick':()=>_0x542fd6[_0x5ef980(0x26e)](),'children':_0x5ef980(0x22e)})]});}function Following(_0x186b53){const _0x315f6a=_0xd7441f,{coordinator:_0x26e975}=_0x186b53;return(0x0,react_jsx_runtime[_0x315f6a(0x20e)])(react_jsx_runtime[_0x315f6a(0x21f)],{'children':[(0x0,react_jsx_runtime[_0x315f6a(0x21d)])(_0x315f6a(0x248),{'className':'univer-mb-3\x20univer-w-full\x20univer-text-sm','children':_0x315f6a(0x275)}),(0x0,react_jsx_runtime['jsx'])(_univerjs_design[_0x315f6a(0x237)],{'onClick':()=>_0x26e975[_0x315f6a(0x1c7)](),'children':'Stop\x20following'})]});}function NotFollowing(_0x153083){const _0x5b565c=_0xd7441f,{coordinator:_0x33252f}=_0x153083;return(0x0,react_jsx_runtime[_0x5b565c(0x20e)])(react_jsx_runtime[_0x5b565c(0x21f)],{'children':[(0x0,react_jsx_runtime[_0x5b565c(0x21d)])(_0x5b565c(0x248),{'className':'univer-mb-3\x20univer-w-full\x20univer-text-sm','children':_0x5b565c(0x1f1)}),(0x0,react_jsx_runtime['jsx'])(_univerjs_design[_0x5b565c(0x237)],{'variant':_0x5b565c(0x201),'onClick':()=>_0x33252f[_0x5b565c(0x22b)](),'children':_0x5b565c(0x1c1)})]});}function Presenting(_0x3fa25b){const _0x294c07=_0xd7441f,{coordinator:_0x1543fe}=_0x3fa25b;return(0x0,react_jsx_runtime['jsxs'])(react_jsx_runtime[_0x294c07(0x21f)],{'children':[(0x0,react_jsx_runtime[_0x294c07(0x21d)])(_0x294c07(0x248),{'className':_0x294c07(0x1ef),'children':_0x294c07(0x265)}),(0x0,react_jsx_runtime['jsx'])(_univerjs_design['Button'],{'variant':'default','onClick':()=>_0x1543fe[_0x294c07(0x26d)](),'children':'Stop\x20presenting'})]});}function Offline(){const _0x433564=_0xd7441f;return(0x0,react_jsx_runtime[_0x433564(0x21d)])(react_jsx_runtime[_0x433564(0x21f)],{'children':_0x433564(0x260)});}let DesktopLiveShareController=class DesktopLiveShareController extends _univerjs_core[_0xd7441f(0x23a)]{constructor(_0x4d6fb6,_0x1e1253){const _0x123161=_0xd7441f;super(),this['_injector']=_0x4d6fb6,this[_0x123161(0x1ba)]=_0x1e1253,this[_0x123161(0x1f8)]();}[_0xd7441f(0x1f8)](){const _0x1b3700=_0xd7441f;this[_0x1b3700(0x1d7)](this[_0x1b3700(0x1ba)]['registerComponent'](_univerjs_ui['BuiltInUIPart'][_0x1b3700(0x229)],()=>(0x0,_univerjs_ui[_0x1b3700(0x1fb)])(LiveShare,this['_injector'])));}};DesktopLiveShareController=__decorate([__decorateParam(0x0,(0x0,_univerjs_core[_0xd7441f(0x220)])(_univerjs_core[_0xd7441f(0x1d8)])),__decorateParam(0x1,_univerjs_ui[_0xd7441f(0x1e5)])],DesktopLiveShareController);var name='@univerjs-pro/live-share',version='0.22.0';const LIVE_SHARE_PLUGIN_CONFIG_KEY=_0xd7441f(0x1d4),configSymbol=Symbol(LIVE_SHARE_PLUGIN_CONFIG_KEY),defaultPluginConfig={};let LiveShareCoreExtensionsController=class LiveShareCoreExtensionsController extends _univerjs_core[_0xd7441f(0x23a)]{constructor(_0x2d6b44){const _0x35c9af=_0xd7441f;super(),this[_0x35c9af(0x271)]=_0x2d6b44,this[_0x35c9af(0x1f9)]();}[_0xd7441f(0x1f9)](){const _0x2e3750=_0xd7441f;[_univerjs_sheets_ui[_0x2e3750(0x1b3)]['id'],_univerjs_sheets_ui['SetScrollOperation']['id'],_univerjs_sheets['SetWorksheetActiveOperation']['id']]['forEach'](_0x2a88f1=>{const _0x334ac6=_0x2e3750;this[_0x334ac6(0x1d7)](this['_liveShareService']['registerSharedOperation'](_0x2a88f1));});}};LiveShareCoreExtensionsController=__decorate([__decorateParam(0x0,(0x0,_univerjs_core['Inject'])(LiveShareService))],LiveShareCoreExtensionsController);let UniverLiveSharePlugin=class UniverLiveSharePlugin extends _univerjs_core[_0xd7441f(0x1ee)]{constructor(_0x1ce938=defaultPluginConfig,_0x22d878,_0x5d7df6){const _0x22c8dc=_0xd7441f;super(),this[_0x22c8dc(0x215)]=_0x1ce938,this[_0x22c8dc(0x253)]=_0x22d878,this['_configService']=_0x5d7df6;const {..._0x33465f}=(0x0,_univerjs_core[_0x22c8dc(0x1e2)])({},defaultPluginConfig,this[_0x22c8dc(0x215)]);this[_0x22c8dc(0x273)][_0x22c8dc(0x25f)](LIVE_SHARE_PLUGIN_CONFIG_KEY,_0x33465f);}[_0xd7441f(0x1f0)](){const _0x532e4f=_0xd7441f;(0x0,_univerjs_core['registerDependencies'])(this[_0x532e4f(0x253)],(0x0,_univerjs_core['mergeOverrideWithDependencies'])([[LiveShareService],[LiveShareController],[LiveShareCoreExtensionsController],[DesktopLiveShareController]],this['_config'][_0x532e4f(0x242)])),(0x0,_univerjs_core['touchDependencies'])(this[_0x532e4f(0x253)],[[LiveShareCoreExtensionsController]]);}[_0xd7441f(0x1ae)](){const _0x3d967a=_0xd7441f;(0x0,_univerjs_core[_0x3d967a(0x256)])(this['_injector'],[[DesktopLiveShareController]]);}};_defineProperty(UniverLiveSharePlugin,_0xd7441f(0x234),_univerjs_core['UniverInstanceType'][_0xd7441f(0x24d)]),_defineProperty(UniverLiveSharePlugin,_0xd7441f(0x227),_0xd7441f(0x1eb)),_defineProperty(UniverLiveSharePlugin,_0xd7441f(0x203),name),_defineProperty(UniverLiveSharePlugin,_0xd7441f(0x22a),version),UniverLiveSharePlugin=__decorate([(0x0,_univerjs_core[_0xd7441f(0x25d)])(_univerjs_pro_collaboration_client['UniverCollaborationClientPlugin']),__decorateParam(0x1,(0x0,_univerjs_core[_0xd7441f(0x220)])(_univerjs_core['Injector'])),__decorateParam(0x2,_univerjs_core['IConfigService'])],UniverLiveSharePlugin),Object[_0xd7441f(0x1c4)](exports,_0xd7441f(0x1f7),{'enumerable':!![],'get':function(){return DesktopLiveShareController;}}),exports['LiveShare']=LiveShare,Object['defineProperty'](exports,_0xd7441f(0x23b),{'enumerable':!![],'get':function(){return LiveShareController;}}),Object[_0xd7441f(0x1c4)](exports,_0xd7441f(0x1d6),{'enumerable':!![],'get':function(){return LiveShareCoordinator;}}),exports[_0xd7441f(0x25a)]=LiveShareService,exports[_0xd7441f(0x205)]=LiveShareStatus,Object[_0xd7441f(0x1c4)](exports,_0xd7441f(0x245),{'enumerable':!![],'get':function(){return UniverLiveSharePlugin;}});
|
|
1
|
+
const _0xe3eeb7=_0x5543;(function(_0x5a316a,_0xde6b57){const _0x38f6f9=_0x5543,_0x5ce3f0=_0x5a316a();while(!![]){try{const _0x1eb4a5=-parseInt(_0x38f6f9(0x105))/0x1*(-parseInt(_0x38f6f9(0x11b))/0x2)+parseInt(_0x38f6f9(0x9d))/0x3+-parseInt(_0x38f6f9(0xe3))/0x4*(-parseInt(_0x38f6f9(0x7c))/0x5)+parseInt(_0x38f6f9(0x12b))/0x6*(parseInt(_0x38f6f9(0xbf))/0x7)+parseInt(_0x38f6f9(0x124))/0x8*(parseInt(_0x38f6f9(0xb2))/0x9)+-parseInt(_0x38f6f9(0xff))/0xa*(parseInt(_0x38f6f9(0x122))/0xb)+parseInt(_0x38f6f9(0x73))/0xc*(-parseInt(_0x38f6f9(0x10b))/0xd);if(_0x1eb4a5===_0xde6b57)break;else _0x5ce3f0['push'](_0x5ce3f0['shift']());}catch(_0x58f587){_0x5ce3f0['push'](_0x5ce3f0['shift']());}}}(_0x1cd4,0x83895),Object[_0xe3eeb7(0x10c)](exports,Symbol['toStringTag'],{'value':_0xe3eeb7(0x91)}));let _univerjs_core=require('@univerjs/core'),_univerjs_ui=require('@univerjs/ui'),_univerjs_design=require('@univerjs/design'),_univerjs_icons=require('@univerjs/icons'),react=require('react'),_univerjs_pro_collaboration=require('@univerjs-pro/collaboration'),_univerjs_pro_collaboration_client=require('@univerjs-pro/collaboration-client'),_univerjs_sheets=require('@univerjs/sheets'),rxjs=require('rxjs'),rxjs_operators=require('rxjs/operators'),react_jsx_runtime=require('react/jsx-runtime'),_univerjs_sheets_ui=require('@univerjs/sheets-ui');function _typeof(_0x4b8295){'@babel/helpers - typeof';const _0x3a1641=_0xe3eeb7;return _typeof=_0x3a1641(0xbd)==typeof Symbol&&_0x3a1641(0x94)==typeof Symbol[_0x3a1641(0x9b)]?function(_0x452362){return typeof _0x452362;}:function(_0x2fb376){const _0x5ec810=_0x3a1641;return _0x2fb376&&_0x5ec810(0xbd)==typeof Symbol&&_0x2fb376[_0x5ec810(0xa8)]===Symbol&&_0x2fb376!==Symbol[_0x5ec810(0x102)]?'symbol':typeof _0x2fb376;},_typeof(_0x4b8295);}function toPrimitive(_0x3b7c4a,_0x3455aa){const _0x3381c6=_0xe3eeb7;if(_0x3381c6(0xd5)!=_typeof(_0x3b7c4a)||!_0x3b7c4a)return _0x3b7c4a;var _0x27a4ec=_0x3b7c4a[Symbol['toPrimitive']];if(void 0x0!==_0x27a4ec){var _0x15fce8=_0x27a4ec[_0x3381c6(0xf5)](_0x3b7c4a,_0x3455aa||_0x3381c6(0x8e));if(_0x3381c6(0xd5)!=_typeof(_0x15fce8))return _0x15fce8;throw new TypeError(_0x3381c6(0xdd));}return(_0x3381c6(0x88)===_0x3455aa?String:Number)(_0x3b7c4a);}function toPropertyKey(_0x4f5500){const _0x5a6af7=_0xe3eeb7;var _0x29d6e2=toPrimitive(_0x4f5500,'string');return _0x5a6af7(0x94)==_typeof(_0x29d6e2)?_0x29d6e2:_0x29d6e2+'';}function _defineProperty(_0x57757a,_0x154b81,_0x22702f){const _0x415b0a=_0xe3eeb7;return(_0x154b81=toPropertyKey(_0x154b81))in _0x57757a?Object[_0x415b0a(0x10c)](_0x57757a,_0x154b81,{'value':_0x22702f,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x57757a[_0x154b81]=_0x22702f,_0x57757a;}var LiveShareService=class extends _univerjs_core[_0xe3eeb7(0x85)]{constructor(..._0x1cabd6){const _0x1c6b4e=_0xe3eeb7;super(..._0x1cabd6),_defineProperty(this,'_sharedOperations',new Set()),_defineProperty(this,_0x1c6b4e(0xde),new Set());}[_0xe3eeb7(0xb1)](_0x276b6b){const _0x21db79=_0xe3eeb7;return this[_0x21db79(0x8a)][_0x21db79(0x6d)](_0x276b6b),(0x0,_univerjs_core['toDisposable'])(()=>this[_0x21db79(0x8a)][_0x21db79(0xc1)](_0x276b6b));}[_0xe3eeb7(0xd9)](_0x3fd418){const _0x4c3bb3=_0xe3eeb7;return this['_reporters'][_0x4c3bb3(0x6d)](_0x3fd418),(0x0,_univerjs_core['toDisposable'])(()=>this['_reporters'][_0x4c3bb3(0xc1)](_0x3fd418));}[_0xe3eeb7(0x87)](_0x26e1e0){const _0x3a5308=_0xe3eeb7;return this[_0x3a5308(0x8a)][_0x3a5308(0xe9)](_0x26e1e0);}[_0xe3eeb7(0xbb)](_0x216024){const _0x536a11=_0xe3eeb7;return Array['from'](this[_0x536a11(0xde)])[_0x536a11(0xce)](_0x65b0ce=>_0x65b0ce(_0x216024));}};function __decorateParam(_0x31abe2,_0x1e1e6d){return function(_0x298410,_0x1ca876){_0x1e1e6d(_0x298410,_0x1ca876,_0x31abe2);};}function __decorate(_0x1840a2,_0x4b5f5e,_0x3b2435,_0x365e28){const _0x3642cd=_0xe3eeb7;var _0x15dcdf=arguments[_0x3642cd(0x6c)],_0x258331=_0x15dcdf<0x3?_0x4b5f5e:_0x365e28===null?_0x365e28=Object[_0x3642cd(0xf2)](_0x4b5f5e,_0x3b2435):_0x365e28,_0x152ff7;if(typeof Reflect===_0x3642cd(0xd5)&&typeof Reflect[_0x3642cd(0x81)]==='function')_0x258331=Reflect[_0x3642cd(0x81)](_0x1840a2,_0x4b5f5e,_0x3b2435,_0x365e28);else{for(var _0x10e01d=_0x1840a2[_0x3642cd(0x6c)]-0x1;_0x10e01d>=0x0;_0x10e01d--)if(_0x152ff7=_0x1840a2[_0x10e01d])_0x258331=(_0x15dcdf<0x3?_0x152ff7(_0x258331):_0x15dcdf>0x3?_0x152ff7(_0x4b5f5e,_0x3b2435,_0x258331):_0x152ff7(_0x4b5f5e,_0x3b2435))||_0x258331;}return _0x15dcdf>0x3&&_0x258331&&Object[_0x3642cd(0x10c)](_0x4b5f5e,_0x3b2435,_0x258331),_0x258331;}function _0x5543(_0x1f3a27,_0x83ab79){_0x1f3a27=_0x1f3a27-0x68;const _0x1cd411=_0x1cd4();let _0x5543ca=_0x1cd411[_0x1f3a27];return _0x5543ca;}let LiveShareController=class LiveShareController extends _univerjs_core[_0xe3eeb7(0x6f)]{constructor(_0x471970,_0x4065ee,_0x548881){const _0x42b2d8=_0xe3eeb7;super(),this[_0x42b2d8(0xb0)]=_0x471970,this[_0x42b2d8(0xa3)]=_0x4065ee,this[_0x42b2d8(0x86)]=_0x548881,_defineProperty(this,'_entities',new Map()),this['_init']();}async[_0xe3eeb7(0x7f)](_0x2fba91){const _0x2927cf=_0xe3eeb7;if(!this[_0x2927cf(0xba)][_0x2927cf(0xe9)](_0x2fba91))await this['_startLiveShareCoordinator'](_0x2fba91);return this[_0x2927cf(0xba)][_0x2927cf(0x127)](_0x2fba91);}[_0xe3eeb7(0xe6)](_0x4688b4){const _0x2736f1=_0xe3eeb7;var _0x521038;return(_0x521038=this[_0x2736f1(0xba)][_0x2736f1(0x127)](_0x4688b4))!==null&&_0x521038!==void 0x0?_0x521038:null;}[_0xe3eeb7(0xb8)](){const _0x4c0d8b=_0xe3eeb7;this[_0x4c0d8b(0xb0)][_0x4c0d8b(0xfc)](_univerjs_core[_0x4c0d8b(0x8f)][_0x4c0d8b(0x7d)])[_0x4c0d8b(0x74)]((0x0,rxjs_operators[_0x4c0d8b(0xf4)])(this[_0x4c0d8b(0x89)]))[_0x4c0d8b(0xac)](async _0x3bc524=>{const _0x46f540=_0x4c0d8b,_0x1149eb=_0x3bc524[_0x46f540(0xcc)][_0x46f540(0x6b)]();if(this[_0x46f540(0xba)][_0x46f540(0xe9)](_0x1149eb))return;this['_startLiveShareCoordinator'](_0x1149eb);}),this[_0x4c0d8b(0xb0)]['getTypeOfUnitDisposed$'](_univerjs_core[_0x4c0d8b(0x8f)]['UNIVER_SHEET'])[_0x4c0d8b(0x74)]((0x0,rxjs_operators[_0x4c0d8b(0xf4)])(this[_0x4c0d8b(0x89)]))[_0x4c0d8b(0xac)](_0x5347cc=>{const _0x702a79=_0x4c0d8b,_0x2e692d=_0x5347cc['getUnitId'](),_0x4a9a2b=this[_0x702a79(0xba)][_0x702a79(0x127)](_0x2e692d);_0x4a9a2b===null||_0x4a9a2b===void 0x0||_0x4a9a2b[_0x702a79(0xc7)]();});}async[_0xe3eeb7(0x107)](_0x2e7487){const _0x138493=_0xe3eeb7,_0x54d8ea=await this[_0x138493(0x86)][_0x138493(0x100)](_0x2e7487),_0x5458f5=this['_injector'][_0x138493(0xf8)](LiveShareCoordinator,_0x2e7487,_0x54d8ea);return _0x5458f5[_0x138493(0xa6)](),this[_0x138493(0xba)][_0x138493(0xfd)](_0x2e7487,_0x5458f5),_0x5458f5;}};LiveShareController=__decorate([__decorateParam(0x0,_univerjs_core['IUniverInstanceService']),__decorateParam(0x1,(0x0,_univerjs_core[_0xe3eeb7(0xad)])(_univerjs_core[_0xe3eeb7(0xe8)])),__decorateParam(0x2,(0x0,_univerjs_core[_0xe3eeb7(0xad)])(_univerjs_pro_collaboration_client['CollaborationSessionService']))],LiveShareController);let LiveShareStatus=function(_0x352236){const _0x2c8d80=_0xe3eeb7;return _0x352236[_0x2c8d80(0xda)]=_0x2c8d80(0xea),_0x352236[_0x2c8d80(0xcd)]='idle',_0x352236[_0x2c8d80(0xec)]=_0x2c8d80(0x75),_0x352236[_0x2c8d80(0xcf)]=_0x2c8d80(0xe7),_0x352236[_0x2c8d80(0x9e)]='presenting',_0x352236;}({});const SAME_OPERATION_SHARE_INTERVAL_KEY=_0xe3eeb7(0x108),DEFAULT_SAME_OPERATION_SHARE_INTERVAL=0xc8;let LiveShareCoordinator=class LiveShareCoordinator extends _univerjs_core[_0xe3eeb7(0x6f)]{get['_status'](){const _0x1a47dd=_0xe3eeb7;return this[_0x1a47dd(0x109)]['getValue']();}constructor(_0x18b0e5,_0x45f893,_0x3b8248,_0x402f8d,_0x42bea2){const _0x525ed6=_0xe3eeb7;super(),this['_unitID']=_0x18b0e5,this[_0x525ed6(0xb7)]=_0x45f893,this[_0x525ed6(0x7a)]=_0x3b8248,this[_0x525ed6(0xfa)]=_0x402f8d,this[_0x525ed6(0x9a)]=_0x42bea2,_defineProperty(this,'_status$',new rxjs['BehaviorSubject'](_0x525ed6(0x9c))),_defineProperty(this,_0x525ed6(0xfe),this[_0x525ed6(0x109)]['asObservable']()),_defineProperty(this,_0x525ed6(0xb8),![]),_defineProperty(this,_0x525ed6(0xa4),null),_defineProperty(this,_0x525ed6(0xdc),null);}['dispose'](){const _0x14ca08=_0xe3eeb7;var _0x43f559;(_0x43f559=this[_0x14ca08(0xa4)])===null||_0x43f559===void 0x0||_0x43f559[_0x14ca08(0xc7)](),this['_status$'][_0x14ca08(0x8c)](_0x14ca08(0x9c)),this[_0x14ca08(0x109)][_0x14ca08(0x10f)]();}[_0xe3eeb7(0xdf)](){return this['_status'];}[_0xe3eeb7(0xa6)](){const _0x4fe7e6=_0xe3eeb7;if(this[_0x4fe7e6(0xb8)])return;this[_0x4fe7e6(0xb8)]=!![],this[_0x4fe7e6(0xb7)]['sessionStatus$'][_0x4fe7e6(0x74)]((0x0,rxjs_operators[_0x4fe7e6(0xf4)])(this['dispose$']))[_0x4fe7e6(0xac)](_0x42cbbf=>{const _0x4ae044=_0x4fe7e6;switch(_0x42cbbf){case _univerjs_pro_collaboration_client[_0x4ae044(0xa0)][_0x4ae044(0xda)]:this[_0x4ae044(0x11c)]();break;case _univerjs_pro_collaboration_client['SessionStatus'][_0x4ae044(0x97)]:this['_handleOnline']();break;default:}}),this[_0x4fe7e6(0xb7)][_0x4fe7e6(0x118)][_0x4fe7e6(0x74)]((0x0,rxjs_operators[_0x4fe7e6(0xf4)])(this[_0x4fe7e6(0x89)]))[_0x4fe7e6(0xac)](_0x4dbdcf=>{const _0x3043c3=_0x4fe7e6,{eventID:_0x50c49b}=_0x4dbdcf;switch(_0x50c49b){case _univerjs_pro_collaboration['CollaborationEvent'][_0x3043c3(0x79)]:this[_0x3043c3(0xfb)](_0x4dbdcf);break;case _univerjs_pro_collaboration[_0x3043c3(0x76)][_0x3043c3(0x92)]:this['_handleOperation'](_0x4dbdcf);break;case _univerjs_pro_collaboration['CollaborationEvent'][_0x3043c3(0x71)]:this[_0x3043c3(0x117)]();break;case _univerjs_pro_collaboration['CollaborationEvent'][_0x3043c3(0x114)]:this[_0x3043c3(0x119)](_0x4dbdcf);break;default:}});}[_0xe3eeb7(0x96)](){const _0x5f5b5e=_0xe3eeb7;this[_0x5f5b5e(0xb7)][_0x5f5b5e(0x10a)]({'eventID':_univerjs_pro_collaboration[_0x5f5b5e(0x76)][_0x5f5b5e(0x11e)],'data':{'unitID':this['_unitID'],'userID':this['_collabSession']['getMemberID']()}},this[_0x5f5b5e(0x12c)]);}[_0xe3eeb7(0xc8)](){const _0x56615c=_0xe3eeb7;this[_0x56615c(0xb3)]===_0x56615c(0x12a)&&(this[_0x56615c(0x109)][_0x56615c(0x8c)](_0x56615c(0x9c)),this['_collabSession'][_0x56615c(0x10a)]({'eventID':_univerjs_pro_collaboration[_0x56615c(0x76)]['LIVESHARE_TERMINATE'],'data':{'unitID':this[_0x56615c(0x12c)]}},this[_0x56615c(0x12c)]));}[_0xe3eeb7(0x129)](){const _0x3cc055=_0xe3eeb7;if(this[_0x3cc055(0xb3)]!=='not-following')return;this[_0x3cc055(0x109)]['next']('following'),this[_0x3cc055(0x68)]();}[_0xe3eeb7(0x128)](){const _0x228714=_0xe3eeb7;if(this[_0x228714(0xb3)]!==_0x228714(0x75))return;this['_stopFollowing']();}[_0xe3eeb7(0xfb)](_0x519f59){const _0x14f427=_0xe3eeb7,{presenter:_0x2e6f9d}=_0x519f59[_0x14f427(0xc9)],_0x5c0283=this[_0x14f427(0xb7)][_0x14f427(0x120)]();this[_0x14f427(0xdc)]=_0x2e6f9d;if(_0x2e6f9d===_0x5c0283)this[_0x14f427(0x11f)](),this[_0x14f427(0xca)]();else this['_status']!==_0x14f427(0xe7)&&(this[_0x14f427(0x80)](),this[_0x14f427(0x68)]());}[_0xe3eeb7(0xa1)](){const _0x2b145b=_0xe3eeb7,_0x23574d={'eventID':_univerjs_pro_collaboration[_0x2b145b(0x76)][_0x2b145b(0x103)]};this['_collabSession']['send'](_0x23574d,this[_0x2b145b(0x12c)]);}['_handleTerminate'](){const _0x294907=_0xe3eeb7;this[_0x294907(0xdc)]=null;if(this['_status']!==_0x294907(0x12a))this['_beIdle']();}[_0xe3eeb7(0x119)](_0x52d002){const _0x4dedda=_0xe3eeb7;if(this['_status']===_0x4dedda(0x75)&&this['_presenter']===_0x52d002['data'][_0x4dedda(0xf0)]){const _0x3c3eca=(0x0,_univerjs_pro_collaboration['parseProtocolChangeset'])(_0x52d002[_0x4dedda(0xc9)])[_0x4dedda(0x111)]['reverse']()[_0x4dedda(0xef)](_0x3e5ba2=>_0x3e5ba2['id']===_univerjs_sheets['InsertSheetMutation']['id']);if(_0x3c3eca){const _0x3f37d9=_0x3c3eca[_0x4dedda(0xf1)][_0x4dedda(0x70)],_0x4e1929=_0x3c3eca[_0x4dedda(0xf1)][_0x4dedda(0xf6)]['id'];setTimeout(()=>{const _0x27e00c=_0x4dedda;this[_0x27e00c(0x9a)]['executeCommand'](_univerjs_sheets[_0x27e00c(0x126)]['id'],{'unitId':_0x3f37d9,'subUnitId':_0x4e1929},{'fromCollab':!![]});});}}}[_0xe3eeb7(0xca)](){const _0x53b7aa=_0xe3eeb7;this[_0x53b7aa(0x109)][_0x53b7aa(0x8c)](_0x53b7aa(0x12a));const _0x54ec2e=new Map(),_0x2a1255=this[_0x53b7aa(0xa4)]=new _univerjs_core[(_0x53b7aa(0xa9))]();_0x2a1255['add']((0x0,_univerjs_core[_0x53b7aa(0xe4)])(()=>{const _0x17a085=_0x53b7aa;_0x54ec2e[_0x17a085(0xc6)](_0x3d924b=>_0x3d924b[_0x17a085(0x10f)]()),_0x54ec2e[_0x17a085(0x8d)]();})),_0x2a1255['add'](this[_0x53b7aa(0x9a)][_0x53b7aa(0xc2)](_0x370e57=>{const _0x6d366d=_0x53b7aa;if(_0x370e57[_0x6d366d(0xf3)]!==_univerjs_core['CommandType']['OPERATION']||!this[_0x6d366d(0xfa)]['shouldShareOperation'](_0x370e57['id']))return;const {id:_0x262ddf}=_0x370e57;let _0x404c00;if(!_0x54ec2e[_0x6d366d(0xe9)](_0x262ddf)){var _0x2f9787;_0x404c00=new rxjs[(_0x6d366d(0xe0))](),_0x54ec2e[_0x6d366d(0xfd)](_0x262ddf,_0x404c00),_0x404c00[_0x6d366d(0x74)]((0x0,rxjs_operators['throttleTime'])((_0x2f9787=this[_0x6d366d(0x7a)][_0x6d366d(0xc0)](_0x6d366d(0x108)))!==null&&_0x2f9787!==void 0x0?_0x2f9787:DEFAULT_SAME_OPERATION_SHARE_INTERVAL,void 0x0,{'trailing':!![],'leading':!![]}))[_0x6d366d(0xac)](_0x451a87=>{const _0xa88d80=_0x6d366d;this[_0xa88d80(0xb7)][_0xa88d80(0x10a)]({'eventID':_univerjs_pro_collaboration[_0xa88d80(0x76)][_0xa88d80(0x92)],'data':{'unitID':this['_unitID'],'operations':{[_0x451a87['id']]:{'id':_0x451a87['id'],'params':JSON[_0xa88d80(0x121)](_0x451a87[_0xa88d80(0xf1)])}}}},this[_0xa88d80(0x12c)]);});}else _0x404c00=_0x54ec2e['get'](_0x262ddf);_0x404c00[_0x6d366d(0x8c)](_0x370e57);})),this['_liveShareService'][_0x53b7aa(0xbb)](this[_0x53b7aa(0x12c)])[_0x53b7aa(0xc6)](_0xaff352=>this[_0x53b7aa(0xb7)][_0x53b7aa(0x10a)]({'eventID':_univerjs_pro_collaboration[_0x53b7aa(0x76)][_0x53b7aa(0x92)],'data':{'unitID':this[_0x53b7aa(0x12c)],'operations':{[_0xaff352['id']]:{'id':_0xaff352['id'],'params':JSON['stringify'](_0xaff352[_0x53b7aa(0xf1)])}}}},this[_0x53b7aa(0x12c)]));}['_stopPresenting'](){const _0x3e5304=_0xe3eeb7;var _0x33c857;this[_0x3e5304(0x109)]['next'](_0x3e5304(0x9c)),(_0x33c857=this[_0x3e5304(0xa4)])===null||_0x33c857===void 0x0||_0x33c857[_0x3e5304(0xc7)](),this[_0x3e5304(0xa4)]=null;}[_0xe3eeb7(0x68)](){const _0x47c7bf=_0xe3eeb7;var _0x1808b9;(_0x1808b9=this[_0x47c7bf(0xa4)])===null||_0x1808b9===void 0x0||_0x1808b9['dispose'](),this['_status$']['next']('following');}['_beIdle'](){const _0x98091a=_0xe3eeb7;var _0x3f2d86;this['_status$']['next'](_0x98091a(0x9c)),(_0x3f2d86=this[_0x98091a(0xa4)])===null||_0x3f2d86===void 0x0||_0x3f2d86['dispose'](),this[_0x98091a(0xa4)]=null;}[_0xe3eeb7(0x11f)](){const _0x44cd43=_0xe3eeb7;var _0x158375;this[_0x44cd43(0x109)][_0x44cd43(0x8c)](_0x44cd43(0xe7)),(_0x158375=this[_0x44cd43(0xa4)])===null||_0x158375===void 0x0||_0x158375[_0x44cd43(0xc7)]();}['_handleOperation'](_0x1ee5a8){const _0x2a311b=_0xe3eeb7;if(['presenting',_0x2a311b(0xe7),_0x2a311b(0xea)]['includes'](this[_0x2a311b(0xb3)]))return;if(!_0x1ee5a8[_0x2a311b(0xc9)]['presenter']||_0x1ee5a8[_0x2a311b(0xc9)][_0x2a311b(0xdb)]===this[_0x2a311b(0xb7)][_0x2a311b(0x120)]())return;if(this['_status']===_0x2a311b(0x9c))this[_0x2a311b(0x68)]();const _0x581628=_0x1ee5a8[_0x2a311b(0xc9)][_0x2a311b(0xae)];Object[_0x2a311b(0xbc)](_0x581628)[_0x2a311b(0xc6)](_0x349888=>{const _0x37209e=_0x2a311b;this[_0x37209e(0x9a)][_0x37209e(0xaa)](_0x349888['id'],_0x349888[_0x37209e(0xf1)]?JSON[_0x37209e(0x112)](_0x349888['params']):null,{'fromCollab':!![]});});}[_0xe3eeb7(0x11c)](){const _0x891848=_0xe3eeb7;var _0x2ea55b;this['_status$'][_0x891848(0x8c)](_0x891848(0xea)),(_0x2ea55b=this[_0x891848(0xa4)])===null||_0x2ea55b===void 0x0||_0x2ea55b[_0x891848(0xc7)]();}[_0xe3eeb7(0x8b)](){const _0x22e37c=_0xe3eeb7;this[_0x22e37c(0x109)]['next'](_0x22e37c(0x9c)),this[_0x22e37c(0xa1)]();}};LiveShareCoordinator=__decorate([__decorateParam(0x2,_univerjs_core[_0xe3eeb7(0x72)]),__decorateParam(0x3,(0x0,_univerjs_core['Inject'])(LiveShareService)),__decorateParam(0x4,_univerjs_core['ICommandService'])],LiveShareCoordinator);function LiveShare(){const _0x3a9363=_0xe3eeb7,_0x571d0d=(0x0,_univerjs_ui['useDependency'])(LiveShareController),_0xa44256=(0x0,_univerjs_ui[_0x3a9363(0x11a)])(_univerjs_core['IUniverInstanceService']),_0x33e47d=(0x0,_univerjs_ui[_0x3a9363(0x116)])(()=>_0xa44256[_0x3a9363(0xd3)](_univerjs_core['UniverInstanceType'][_0x3a9363(0x7d)]),void 0x0,![],[]),[_0x4d49e8,_0x59fdb8]=(0x0,react['useState'])(null),[_0x890f46,_0x2d9c45]=(0x0,react['useState'])(_0x3a9363(0x9c)),_0x65bfd5=(0x0,react[_0x3a9363(0xc3)])(null);(0x0,react['useEffect'])(()=>{const _0x554937=_0x3a9363;if(_0x33e47d)_0x571d0d['getLiveShareCoordinator'](_0x33e47d[_0x554937(0x6b)]())[_0x554937(0x11d)](_0x3f1174=>{const _0x4f2d8d=_0x554937;_0x59fdb8(_0x3f1174),_0x65bfd5[_0x4f2d8d(0xaf)]=_0x3f1174[_0x4f2d8d(0xfe)][_0x4f2d8d(0xac)](_0x190210=>{_0x2d9c45(_0x190210);});});return()=>{const _0x1c2929=_0x554937;var _0x4eceb7;(_0x4eceb7=_0x65bfd5[_0x1c2929(0xaf)])===null||_0x4eceb7===void 0x0||_0x4eceb7[_0x1c2929(0xd4)](),_0x65bfd5[_0x1c2929(0xaf)]=null;};},[_0x33e47d,_0x571d0d]);if(!_0x4d49e8)return null;return(0x0,react_jsx_runtime[_0x3a9363(0xeb)])(_univerjs_design[_0x3a9363(0x93)],{'align':_0x3a9363(0x84),'disabled':_0x890f46==='offline','className':_0x3a9363(0x7b),'overlay':(0x0,react_jsx_runtime[_0x3a9363(0xeb)])(LiveShareDropdown,{'status':_0x890f46,'coordinator':_0x4d49e8}),'children':(0x0,react_jsx_runtime[_0x3a9363(0xeb)])(_0x3a9363(0x78),{'className':(0x0,_univerjs_design[_0x3a9363(0x123)])('univer-border-none\x20univer-text-gray-600\x20univer-outline-none',{'univer-cursor-not-allowed':_0x890f46==='offline','univer-cursor-pointer\x20hover:univer-bg-gray-400':_0x890f46!==_0x3a9363(0xea)}),'type':_0x3a9363(0x78),'children':(0x0,react_jsx_runtime[_0x3a9363(0xeb)])(_univerjs_icons[_0x3a9363(0xb9)],{'className':'univer-size-4'})})});}function LiveShareDropdown(_0x5c4269){const _0x591185=_0xe3eeb7,{status:_0x13e768,coordinator:_0x36d71a}=_0x5c4269;switch(_0x13e768){case _0x591185(0x9c):return(0x0,react_jsx_runtime[_0x591185(0xeb)])(Idle,{'coordinator':_0x36d71a});case _0x591185(0x75):return(0x0,react_jsx_runtime[_0x591185(0xeb)])(Following,{'coordinator':_0x36d71a});case _0x591185(0xe7):return(0x0,react_jsx_runtime[_0x591185(0xeb)])(NotFollowing,{'coordinator':_0x36d71a});case'offline':return(0x0,react_jsx_runtime[_0x591185(0xeb)])(Offline,{});case _0x591185(0x12a):return(0x0,react_jsx_runtime['jsx'])(Presenting,{'coordinator':_0x36d71a});default:return null;}}function Idle(_0xeb9666){const _0xe4e9cf=_0xe3eeb7,{coordinator:_0x26a2e0}=_0xeb9666;return(0x0,react_jsx_runtime[_0xe4e9cf(0xee)])(react_jsx_runtime[_0xe4e9cf(0x69)],{'children':[(0x0,react_jsx_runtime[_0xe4e9cf(0xeb)])(_0xe4e9cf(0x106),{'className':_0xe4e9cf(0xed),'children':_0xe4e9cf(0x98)}),(0x0,react_jsx_runtime[_0xe4e9cf(0xeb)])(_univerjs_design[_0xe4e9cf(0xd7)],{'onClick':()=>_0x26a2e0['tryStartPresenting'](),'children':_0xe4e9cf(0x101)})]});}function Following(_0x3b808c){const _0x3632d5=_0xe3eeb7,{coordinator:_0x23a992}=_0x3b808c;return(0x0,react_jsx_runtime[_0x3632d5(0xee)])(react_jsx_runtime[_0x3632d5(0x69)],{'children':[(0x0,react_jsx_runtime[_0x3632d5(0xeb)])(_0x3632d5(0x106),{'className':_0x3632d5(0xed),'children':_0x3632d5(0x90)}),(0x0,react_jsx_runtime['jsx'])(_univerjs_design['Button'],{'onClick':()=>_0x23a992[_0x3632d5(0x128)](),'children':_0x3632d5(0xc5)})]});}function NotFollowing(_0xd119b1){const _0x49a00d=_0xe3eeb7,{coordinator:_0x7ec25b}=_0xd119b1;return(0x0,react_jsx_runtime[_0x49a00d(0xee)])(react_jsx_runtime[_0x49a00d(0x69)],{'children':[(0x0,react_jsx_runtime[_0x49a00d(0xeb)])(_0x49a00d(0x106),{'className':_0x49a00d(0xed),'children':_0x49a00d(0xcb)}),(0x0,react_jsx_runtime['jsx'])(_univerjs_design['Button'],{'variant':_0x49a00d(0xa7),'onClick':()=>_0x7ec25b[_0x49a00d(0x129)](),'children':_0x49a00d(0xd2)})]});}function _0x1cd4(){const _0x5e00d2=['_mountLiveShare','_liveShareService','_handleNewHost','getTypeOfUnitAdded$','set','status$','820860UYmbnL','requireSession','Start','prototype','LIVESHARE_FETCH_OPERATIONS','LiveShareService','3XymrJO','div','_startLiveShareCoordinator','SAME_OPERATION_SHARE_INTERVAL','_status$','send','1750151LqFXDQ','defineProperty','registerComponent','onRendered','complete','live-share.config','mutations','parse','touchDependencies','NEW_CHANGESETS','_uiPartsService','useObservable','_handleTerminate','event$','_handleNewChangeSets','useDependency','583312tNLprF','_handleOffline','then','LIVESHARE_REQUEST_HOST','_stopFollowing','getMemberID','stringify','99tGZXoW','clsx','100952psHkPk','Stop\x20presenting','SetWorksheetActiveOperation','get','stopFollowing','startFollowing','presenting','734610xkAjYU','_unitID','_startFollowing','Fragment','BuiltInUIPart','getUnitId','length','add','LiveShareController','RxDisposable','unitId','LIVESHARE_TERMINATE','IConfigService','24Xpdtas','pipe','following','CollaborationEvent','You\x27re\x20presenting\x20the\x20document','button','LIVESHARE_NEW_HOST','_configService','univer-box-border\x20univer-min-w-60\x20univer-bg-gray-900\x20univer-px-4\x20univer-py-3\x20univer-text-gray-900\x20dark:!univer-bg-white\x20dark:!univer-text-white','2530uOMhxZ','UNIVER_SHEET','UniverLiveSharePlugin','getLiveShareCoordinator','_stopPresenting','decorate','SetZoomRatioOperation','IUIPartsService','end','Disposable','_collabSessionService','shouldShareOperation','string','dispose$','_sharedOperations','_handleOnline','next','clear','default','UniverInstanceType','You\x27re\x20following\x20the\x20presenter','Module','LIVESHARE_OPERATION','Dropdown','symbol','merge','tryStartPresenting','ONLINE','Present\x20this\x20document','connectInjector','_commandService','iterator','idle','246213KqnAMW','PRESENTING','LiveShare','SessionStatus','_fetchOperations','setConfig','_injector','_commandDisposable','UniverCollaborationClientPlugin','init','text','constructor','DisposableCollection','executeCommand','LiveShareStatus','subscribe','Inject','operations','current','_univerInstanceService','registerSharedOperation','63RTeMWG','_status','0.22.1','_config','HEADER_MENU','_collabSession','_init','LiveShareIcon','_entities','getInitialStates','values','function','UNIVER_UNKNOWN','7UuZtXL','getConfig','delete','onCommandExecuted','useRef','override','Stop\x20following','forEach','dispose','stopPresenting','data','_startPresenting','You\x27re\x20not\x20following\x20the\x20presenter','unit','IDLE','map','NOT_FOLLOWING','LiveShareCoordinator','SetScrollOperation','Start\x20following','getCurrentTypeOfUnit$','unsubscribe','object','disposeWithMe','Button','mergeOverrideWithDependencies','registerInitialStateReporter','OFFLINE','presenter','_presenter','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','_reporters','getStatus','Subject','registerDependencies','onStarting','2996iOBFMa','toDisposable','DependentOn','getLiveShareCoordinatorSync','not-following','Injector','has','offline','jsx','FOLLOWING','univer-mb-3\x20univer-w-full\x20univer-text-sm','jsxs','find','memberID','params','getOwnPropertyDescriptor','type','takeUntil','call','sheet','packageName','createInstance'];_0x1cd4=function(){return _0x5e00d2;};return _0x1cd4();}function Presenting(_0x5d8b01){const _0x4b7af6=_0xe3eeb7,{coordinator:_0x18453c}=_0x5d8b01;return(0x0,react_jsx_runtime['jsxs'])(react_jsx_runtime[_0x4b7af6(0x69)],{'children':[(0x0,react_jsx_runtime[_0x4b7af6(0xeb)])('div',{'className':_0x4b7af6(0xed),'children':_0x4b7af6(0x77)}),(0x0,react_jsx_runtime[_0x4b7af6(0xeb)])(_univerjs_design[_0x4b7af6(0xd7)],{'variant':_0x4b7af6(0x8e),'onClick':()=>_0x18453c['stopPresenting'](),'children':_0x4b7af6(0x125)})]});}function Offline(){const _0x3ffbae=_0xe3eeb7;return(0x0,react_jsx_runtime['jsx'])(react_jsx_runtime[_0x3ffbae(0x69)],{'children':'You\x27are\x20offline.'});}let DesktopLiveShareController=class DesktopLiveShareController extends _univerjs_core['Disposable']{constructor(_0x57031e,_0x53dd02){const _0x3cc75e=_0xe3eeb7;super(),this[_0x3cc75e(0xa3)]=_0x57031e,this['_uiPartsService']=_0x53dd02,this[_0x3cc75e(0xf9)]();}[_0xe3eeb7(0xf9)](){const _0x3027c0=_0xe3eeb7;this[_0x3027c0(0xd6)](this[_0x3027c0(0x115)][_0x3027c0(0x10d)](_univerjs_ui[_0x3027c0(0x6a)][_0x3027c0(0xb6)],()=>(0x0,_univerjs_ui[_0x3027c0(0x99)])(LiveShare,this[_0x3027c0(0xa3)])));}};DesktopLiveShareController=__decorate([__decorateParam(0x0,(0x0,_univerjs_core['Inject'])(_univerjs_core[_0xe3eeb7(0xe8)])),__decorateParam(0x1,_univerjs_ui[_0xe3eeb7(0x83)])],DesktopLiveShareController);var name='@univerjs-pro/live-share',version=_0xe3eeb7(0xb4);const LIVE_SHARE_PLUGIN_CONFIG_KEY=_0xe3eeb7(0x110),configSymbol=Symbol(LIVE_SHARE_PLUGIN_CONFIG_KEY),defaultPluginConfig={};let LiveShareCoreExtensionsController=class LiveShareCoreExtensionsController extends _univerjs_core[_0xe3eeb7(0x85)]{constructor(_0x27fd63){const _0x56fe2f=_0xe3eeb7;super(),this[_0x56fe2f(0xfa)]=_0x27fd63,this[_0x56fe2f(0xb8)]();}[_0xe3eeb7(0xb8)](){const _0x29c0c9=_0xe3eeb7;[_univerjs_sheets_ui[_0x29c0c9(0x82)]['id'],_univerjs_sheets_ui[_0x29c0c9(0xd1)]['id'],_univerjs_sheets[_0x29c0c9(0x126)]['id']][_0x29c0c9(0xc6)](_0x4b842e=>{const _0x4c2b21=_0x29c0c9;this['disposeWithMe'](this[_0x4c2b21(0xfa)][_0x4c2b21(0xb1)](_0x4b842e));});}};LiveShareCoreExtensionsController=__decorate([__decorateParam(0x0,(0x0,_univerjs_core[_0xe3eeb7(0xad)])(LiveShareService))],LiveShareCoreExtensionsController);let UniverLiveSharePlugin=class UniverLiveSharePlugin extends _univerjs_core['Plugin']{constructor(_0x266ade=defaultPluginConfig,_0x31ac92,_0x1f6476){const _0xa5d645=_0xe3eeb7;super(),this['_config']=_0x266ade,this[_0xa5d645(0xa3)]=_0x31ac92,this[_0xa5d645(0x7a)]=_0x1f6476;const {..._0x1be53c}=(0x0,_univerjs_core[_0xa5d645(0x95)])({},defaultPluginConfig,this['_config']);this[_0xa5d645(0x7a)][_0xa5d645(0xa2)](LIVE_SHARE_PLUGIN_CONFIG_KEY,_0x1be53c);}[_0xe3eeb7(0xe2)](){const _0x3b7b96=_0xe3eeb7;(0x0,_univerjs_core[_0x3b7b96(0xe1)])(this[_0x3b7b96(0xa3)],(0x0,_univerjs_core[_0x3b7b96(0xd8)])([[LiveShareService],[LiveShareController],[LiveShareCoreExtensionsController],[DesktopLiveShareController]],this[_0x3b7b96(0xb5)][_0x3b7b96(0xc4)])),(0x0,_univerjs_core['touchDependencies'])(this[_0x3b7b96(0xa3)],[[LiveShareCoreExtensionsController]]);}[_0xe3eeb7(0x10e)](){const _0x3395eb=_0xe3eeb7;(0x0,_univerjs_core[_0x3395eb(0x113)])(this['_injector'],[[DesktopLiveShareController]]);}};_defineProperty(UniverLiveSharePlugin,_0xe3eeb7(0xf3),_univerjs_core[_0xe3eeb7(0x8f)][_0xe3eeb7(0xbe)]),_defineProperty(UniverLiveSharePlugin,'pluginName','UNIVER_LIVE_SHARE_PLUGIN'),_defineProperty(UniverLiveSharePlugin,_0xe3eeb7(0xf7),name),_defineProperty(UniverLiveSharePlugin,'version',version),UniverLiveSharePlugin=__decorate([(0x0,_univerjs_core[_0xe3eeb7(0xe5)])(_univerjs_pro_collaboration_client[_0xe3eeb7(0xa5)]),__decorateParam(0x1,(0x0,_univerjs_core[_0xe3eeb7(0xad)])(_univerjs_core[_0xe3eeb7(0xe8)])),__decorateParam(0x2,_univerjs_core['IConfigService'])],UniverLiveSharePlugin),Object[_0xe3eeb7(0x10c)](exports,'DesktopLiveShareController',{'enumerable':!![],'get':function(){return DesktopLiveShareController;}}),exports[_0xe3eeb7(0x9f)]=LiveShare,Object[_0xe3eeb7(0x10c)](exports,_0xe3eeb7(0x6e),{'enumerable':!![],'get':function(){return LiveShareController;}}),Object[_0xe3eeb7(0x10c)](exports,_0xe3eeb7(0xd0),{'enumerable':!![],'get':function(){return LiveShareCoordinator;}}),exports[_0xe3eeb7(0x104)]=LiveShareService,exports[_0xe3eeb7(0xab)]=LiveShareStatus,Object['defineProperty'](exports,_0xe3eeb7(0x7e),{'enumerable':!![],'get':function(){return UniverLiveSharePlugin;}});
|
package/lib/es/facade.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x577b64=_0xf136;(function(_0x46cd5a,_0x21bfaf){const _0x17b415=_0xf136,_0x33e13b=_0x46cd5a();while(!![]){try{const _0x5092aa=-parseInt(_0x17b415(0x82))/0x1+-parseInt(_0x17b415(0x8c))/0x2+-parseInt(_0x17b415(0x87))/0x3+parseInt(_0x17b415(0x90))/0x4+parseInt(_0x17b415(0xa1))/0x5*(-parseInt(_0x17b415(0x89))/0x6)+-parseInt(_0x17b415(0x97))/0x7*(parseInt(_0x17b415(0x8a))/0x8)+parseInt(_0x17b415(0x9a))/0x9;if(_0x5092aa===_0x21bfaf)break;else _0x33e13b['push'](_0x33e13b['shift']());}catch(_0x9b5a7a){_0x33e13b['push'](_0x33e13b['shift']());}}}(_0x41b2,0xd6974));import{LiveShareController,LiveShareStatus}from'@univerjs-pro/live-share';import{IUniverInstanceService,UniverInstanceType}from'@univerjs/core';import{FEnum,FUniver}from'@univerjs/core/facade';function _typeof(_0x3db5b9){'@babel/helpers - typeof';const _0x2b1c78=_0xf136;return _typeof='function'==typeof Symbol&&_0x2b1c78(0x9e)==typeof Symbol[_0x2b1c78(0x98)]?function(_0x2d5db4){return typeof _0x2d5db4;}:function(_0x294f45){const _0x2cb417=_0x2b1c78;return _0x294f45&&_0x2cb417(0x7f)==typeof Symbol&&_0x294f45[_0x2cb417(0x80)]===Symbol&&_0x294f45!==Symbol[_0x2cb417(0x8e)]?_0x2cb417(0x9e):typeof _0x294f45;},_typeof(_0x3db5b9);}function toPrimitive(_0x3e4268,_0x2b9c64){const _0x5d395e=_0xf136;if(_0x5d395e(0x91)!=_typeof(_0x3e4268)||!_0x3e4268)return _0x3e4268;var _0x2dd354=_0x3e4268[Symbol[_0x5d395e(0x94)]];if(void 0x0!==_0x2dd354){var _0x59fb6d=_0x2dd354[_0x5d395e(0xa3)](_0x3e4268,_0x2b9c64||'default');if(_0x5d395e(0x91)!=_typeof(_0x59fb6d))return _0x59fb6d;throw new TypeError(_0x5d395e(0x84));}return('string'===_0x2b9c64?String:Number)(_0x3e4268);}function _0x41b2(){const _0x1d9a57=['symbol','No\x20LiveShareCoordinator\x20found\x20for\x20the\x20active\x20workbook.','string','20iiGveK','UNIVER_SHEET','call','getUnitId','function','constructor','defineProperty','547729HaKvwp','getLiveShareCoordinatorSync','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','_injector','stopFollowing','3961062CioUAF','startPresenting','1731954zcQuTx','8BHJzKD','getLiveShareStatus','3240926pYVZbE','extend','prototype','stopPresenting','3379260ZlStYZ','object','_initialize','IDLE','toPrimitive','getStatus','No\x20active\x20workbook\x20found.','6861967gcYEkU','iterator','getCurrentUnitOfType','50918508JEHzGd','get','LiveShareStatusEnum','_liveShareController'];_0x41b2=function(){return _0x1d9a57;};return _0x41b2();}function toPropertyKey(_0x5aa7d8){const _0x42a5a0=_0xf136;var _0x1e208f=toPrimitive(_0x5aa7d8,_0x42a5a0(0xa0));return _0x42a5a0(0x9e)==_typeof(_0x1e208f)?_0x1e208f:_0x1e208f+'';}function _defineProperty(_0x358782,_0x35db95,_0x404bd5){const _0x6aed92=_0xf136;return(_0x35db95=toPropertyKey(_0x35db95))in _0x358782?Object[_0x6aed92(0x81)](_0x358782,_0x35db95,{'value':_0x404bd5,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x358782[_0x35db95]=_0x404bd5,_0x358782;}function _0xf136(_0x59d746,_0x1fbe78){_0x59d746=_0x59d746-0x7f;const _0x41b252=_0x41b2();let _0xf13608=_0x41b252[_0x59d746];return _0xf13608;}var FUniverLiveShareMixin=class extends FUniver{constructor(..._0x6baefb){const _0x11174f=_0xf136;super(..._0x6baefb),_defineProperty(this,_0x11174f(0x9d),void 0x0);}[_0x577b64(0x92)](_0x34d99c){const _0x3697f3=_0x577b64;this['_liveShareController']=_0x34d99c[_0x3697f3(0x9b)](LiveShareController);}[_0x577b64(0x8b)](){const _0x1fa16d=_0x577b64;var _0x3ba970;const _0x14a02d=this['_injector'][_0x1fa16d(0x9b)](IUniverInstanceService)[_0x1fa16d(0x99)](UniverInstanceType[_0x1fa16d(0xa2)]);if(!_0x14a02d)throw new Error(_0x1fa16d(0x96));const _0x566689=_0x14a02d[_0x1fa16d(0xa4)](),_0x1583e3=this[_0x1fa16d(0x9d)][_0x1fa16d(0x83)](_0x566689);return(_0x3ba970=_0x1583e3===null||_0x1583e3===void 0x0?void 0x0:_0x1583e3[_0x1fa16d(0x95)]())!==null&&_0x3ba970!==void 0x0?_0x3ba970:LiveShareStatus[_0x1fa16d(0x93)];}['startFollowing'](){const _0x481ffc=_0x577b64,_0x4ab63c=this[_0x481ffc(0x85)][_0x481ffc(0x9b)](IUniverInstanceService)[_0x481ffc(0x99)](UniverInstanceType['UNIVER_SHEET']);if(!_0x4ab63c)throw new Error('No\x20active\x20workbook\x20found.');const _0x5f35f5=_0x4ab63c['getUnitId'](),_0x2ce582=this['_liveShareController'][_0x481ffc(0x83)](_0x5f35f5);if(!_0x2ce582)throw new Error(_0x481ffc(0x9f));_0x2ce582['startFollowing']();}[_0x577b64(0x86)](){const _0x38ea3f=_0x577b64,_0x1fba28=this['_injector'][_0x38ea3f(0x9b)](IUniverInstanceService)['getCurrentUnitOfType'](UniverInstanceType['UNIVER_SHEET']);if(!_0x1fba28)throw new Error(_0x38ea3f(0x96));const _0x3c3cd3=_0x1fba28[_0x38ea3f(0xa4)](),_0x4b464e=this[_0x38ea3f(0x9d)][_0x38ea3f(0x83)](_0x3c3cd3);if(!_0x4b464e)throw new Error('No\x20LiveShareCoordinator\x20found\x20for\x20the\x20active\x20workbook.');_0x4b464e[_0x38ea3f(0x86)]();}[_0x577b64(0x88)](){const _0x4e3fe0=_0x577b64,_0x195cde=this['_injector'][_0x4e3fe0(0x9b)](IUniverInstanceService)[_0x4e3fe0(0x99)](UniverInstanceType[_0x4e3fe0(0xa2)]);if(!_0x195cde)throw new Error(_0x4e3fe0(0x96));const _0x3eb104=_0x195cde[_0x4e3fe0(0xa4)](),_0x270dd9=this[_0x4e3fe0(0x9d)]['getLiveShareCoordinatorSync'](_0x3eb104);if(!_0x270dd9)throw new Error(_0x4e3fe0(0x9f));_0x270dd9['tryStartPresenting']();}[_0x577b64(0x8f)](){const _0x2f4ac1=_0x577b64,_0x1eaea7=this['_injector'][_0x2f4ac1(0x9b)](IUniverInstanceService)[_0x2f4ac1(0x99)](UniverInstanceType['UNIVER_SHEET']);if(!_0x1eaea7)throw new Error(_0x2f4ac1(0x96));const _0x51a18f=_0x1eaea7['getUnitId'](),_0x1b2366=this[_0x2f4ac1(0x9d)][_0x2f4ac1(0x83)](_0x51a18f);if(!_0x1b2366)throw new Error('No\x20LiveShareCoordinator\x20found\x20for\x20the\x20active\x20workbook.');_0x1b2366['stopPresenting']();}};FUniver['extend'](FUniverLiveShareMixin);var FLiveShareEnumMixin=class extends FEnum{get[_0x577b64(0x9c)](){return LiveShareStatus;}};FEnum[_0x577b64(0x8d)](FLiveShareEnumMixin);export{};
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x5be165=_0x4fca;(function(_0x4a7376,_0x11a968){const _0x59ce72=_0x4fca,_0x27e75f=_0x4a7376();while(!![]){try{const _0x1d80b8=parseInt(_0x59ce72(0x1ec))/0x1+-parseInt(_0x59ce72(0x214))/0x2+-parseInt(_0x59ce72(0x20b))/0x3+-parseInt(_0x59ce72(0x203))/0x4+parseInt(_0x59ce72(0x1c8))/0x5+parseInt(_0x59ce72(0x1f9))/0x6+parseInt(_0x59ce72(0x1e7))/0x7;if(_0x1d80b8===_0x11a968)break;else _0x27e75f['push'](_0x27e75f['shift']());}catch(_0x1b0f87){_0x27e75f['push'](_0x27e75f['shift']());}}}(_0x59c0,0xa5efb));import{CommandType,DependentOn,Disposable,DisposableCollection,ICommandService,IConfigService,IUniverInstanceService,Inject,Injector,Plugin,RxDisposable,UniverInstanceType,merge,mergeOverrideWithDependencies,registerDependencies,toDisposable,touchDependencies}from'@univerjs/core';function _0x59c0(){const _0x24f3da=['_init','status$','_status$','then','div','_status','presenting','operations','stopFollowing','0.22.0','_univerInstanceService','UNIVER_UNKNOWN','constructor','PRESENTING','LIVESHARE_FETCH_OPERATIONS','dispose','getStatus','getConfig','_beIdle','@univerjs-pro/live-share','getLiveShareCoordinatorSync','LIVESHARE_TERMINATE','getValue','stopPresenting','IDLE','override','onStarting','1985945xWNIsI','_collabSession','get','Stop\x20presenting','delete','end','OPERATION','init','following','tryStartPresenting','symbol','packageName','_startLiveShareCoordinator','getMemberID','length','not-following','event$','clear','values','decorate','map','params','getOwnPropertyDescriptor','onRendered','mutations','_handleTerminate','offline','unit','_liveShareService','presenter','registerInitialStateReporter','2792454pqEcjw','pipe','FOLLOWING','object','_handleNewChangeSets','1159722cHCnst','_collabSessionService','NOT_FOLLOWING','from','_config','You\x27re\x20following\x20the\x20presenter','_handleOnline','_commandDisposable','data','executeCommand','has','_handleOperation','univer-box-border\x20univer-min-w-60\x20univer-bg-gray-900\x20univer-px-4\x20univer-py-3\x20univer-text-gray-900\x20dark:!univer-bg-white\x20dark:!univer-text-white','5970798DiXtyo','_presenter','live-share.config','registerComponent','NEW_CHANGESETS','_entities','reverse','UNIVER_SHEET','setConfig','Present\x20this\x20document','3102720zCJjmE','_stopFollowing','LIVESHARE_REQUEST_HOST','disposeWithMe','_uiPartsService','createInstance','shouldShareOperation','current','2748324AabLPn','Start','includes','_startPresenting','next','default','send','forEach','dispose$','1159006lVNGJb','sheet','_handleOffline','stringify','univer-mb-3\x20univer-w-full\x20univer-text-sm','getTypeOfUnitDisposed$','getUnitId','_injector','UNIVER_LIVE_SHARE_PLUGIN','memberID','getInitialStates','Stop\x20following','_startFollowing','complete','requireSession','Start\x20following','startFollowing','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','function','_handleNewHost','registerSharedOperation','You\x27are\x20offline.','add','find','_sharedOperations','SAME_OPERATION_SHARE_INTERVAL','_mountLiveShare','text','toPrimitive','_unitID','getLiveShareCoordinator','idle','OFFLINE','_reporters','unitId','pluginName','type','defineProperty','subscribe','version','unsubscribe','univer-size-4','button','getTypeOfUnitAdded$','HEADER_MENU','_commandService','_configService','getCurrentTypeOfUnit$','string','onCommandExecuted','You\x27re\x20presenting\x20the\x20document'];_0x59c0=function(){return _0x24f3da;};return _0x59c0();}import{BuiltInUIPart,IUIPartsService,connectInjector,useDependency,useObservable}from'@univerjs/ui';import{Button,Dropdown,clsx}from'@univerjs/design';import{LiveShareIcon}from'@univerjs/icons';import{useEffect,useRef,useState}from'react';import{CollaborationEvent,parseProtocolChangeset}from'@univerjs-pro/collaboration';import{CollaborationSessionService,SessionStatus,UniverCollaborationClientPlugin}from'@univerjs-pro/collaboration-client';import{InsertSheetMutation,SetWorksheetActiveOperation}from'@univerjs/sheets';import{BehaviorSubject,Subject}from'rxjs';import{takeUntil,throttleTime}from'rxjs/operators';import{Fragment,jsx,jsxs}from'react/jsx-runtime';import{SetScrollOperation,SetZoomRatioOperation}from'@univerjs/sheets-ui';function _typeof(_0x287f77){'@babel/helpers - typeof';const _0x31c33d=_0x4fca;return _typeof=_0x31c33d(0x226)==typeof Symbol&&_0x31c33d(0x1d2)==typeof Symbol['iterator']?function(_0x4f48ec){return typeof _0x4f48ec;}:function(_0x15e04f){const _0x125810=_0x31c33d;return _0x15e04f&&_0x125810(0x226)==typeof Symbol&&_0x15e04f[_0x125810(0x253)]===Symbol&&_0x15e04f!==Symbol['prototype']?_0x125810(0x1d2):typeof _0x15e04f;},_typeof(_0x287f77);}function toPrimitive(_0x281270,_0x5ab4b5){const _0x3e020f=_0x4fca;if('object'!=_typeof(_0x281270)||!_0x281270)return _0x281270;var _0x4de7cd=_0x281270[Symbol[_0x3e020f(0x230)]];if(void 0x0!==_0x4de7cd){var _0x995c2=_0x4de7cd['call'](_0x281270,_0x5ab4b5||_0x3e020f(0x210));if(_0x3e020f(0x1ea)!=_typeof(_0x995c2))return _0x995c2;throw new TypeError(_0x3e020f(0x225));}return(_0x3e020f(0x244)===_0x5ab4b5?String:Number)(_0x281270);}function toPropertyKey(_0x263b0e){const _0x3b6256=_0x4fca;var _0x1fd35b=toPrimitive(_0x263b0e,_0x3b6256(0x244));return'symbol'==_typeof(_0x1fd35b)?_0x1fd35b:_0x1fd35b+'';}function _defineProperty(_0x8dd6d8,_0x1736e8,_0x4bf663){const _0x506b26=_0x4fca;return(_0x1736e8=toPropertyKey(_0x1736e8))in _0x8dd6d8?Object[_0x506b26(0x239)](_0x8dd6d8,_0x1736e8,{'value':_0x4bf663,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x8dd6d8[_0x1736e8]=_0x4bf663,_0x8dd6d8;}var LiveShareService=class extends Disposable{constructor(..._0x369656){const _0x5cc742=_0x4fca;super(..._0x369656),_defineProperty(this,_0x5cc742(0x22c),new Set()),_defineProperty(this,_0x5cc742(0x235),new Set());}[_0x5be165(0x228)](_0x11ad02){const _0xf471ac=_0x5be165;return this[_0xf471ac(0x22c)][_0xf471ac(0x22a)](_0x11ad02),toDisposable(()=>this[_0xf471ac(0x22c)][_0xf471ac(0x1cc)](_0x11ad02));}[_0x5be165(0x1e6)](_0x39eca0){const _0x3ab20b=_0x5be165;return this[_0x3ab20b(0x235)][_0x3ab20b(0x22a)](_0x39eca0),toDisposable(()=>this[_0x3ab20b(0x235)][_0x3ab20b(0x1cc)](_0x39eca0));}[_0x5be165(0x209)](_0x38ccf6){const _0x5a1352=_0x5be165;return this['_sharedOperations'][_0x5a1352(0x1f6)](_0x38ccf6);}[_0x5be165(0x21e)](_0x3e376a){const _0x22340c=_0x5be165;return Array[_0x22340c(0x1ef)](this['_reporters'])[_0x22340c(0x1dc)](_0x287b0b=>_0x287b0b(_0x3e376a));}};function __decorateParam(_0x4070a8,_0x22e655){return function(_0x19361b,_0x22e499){_0x22e655(_0x19361b,_0x22e499,_0x4070a8);};}function __decorate(_0x5d0e82,_0x36becb,_0x1c56fc,_0x21a6cb){const _0x207949=_0x5be165;var _0x17c06d=arguments[_0x207949(0x1d6)],_0x45b5cf=_0x17c06d<0x3?_0x36becb:_0x21a6cb===null?_0x21a6cb=Object[_0x207949(0x1de)](_0x36becb,_0x1c56fc):_0x21a6cb,_0x2b6837;if(typeof Reflect===_0x207949(0x1ea)&&typeof Reflect[_0x207949(0x1db)]==='function')_0x45b5cf=Reflect['decorate'](_0x5d0e82,_0x36becb,_0x1c56fc,_0x21a6cb);else{for(var _0x331844=_0x5d0e82[_0x207949(0x1d6)]-0x1;_0x331844>=0x0;_0x331844--)if(_0x2b6837=_0x5d0e82[_0x331844])_0x45b5cf=(_0x17c06d<0x3?_0x2b6837(_0x45b5cf):_0x17c06d>0x3?_0x2b6837(_0x36becb,_0x1c56fc,_0x45b5cf):_0x2b6837(_0x36becb,_0x1c56fc))||_0x45b5cf;}return _0x17c06d>0x3&&_0x45b5cf&&Object[_0x207949(0x239)](_0x36becb,_0x1c56fc,_0x45b5cf),_0x45b5cf;}let LiveShareController=class LiveShareController extends RxDisposable{constructor(_0x3748fe,_0x252440,_0x1d5cd4){const _0x1dbd1a=_0x5be165;super(),this['_univerInstanceService']=_0x3748fe,this[_0x1dbd1a(0x21b)]=_0x252440,this[_0x1dbd1a(0x1ed)]=_0x1d5cd4,_defineProperty(this,_0x1dbd1a(0x1fe),new Map()),this[_0x1dbd1a(0x247)]();}async['getLiveShareCoordinator'](_0x471f7a){const _0x1d1c09=_0x5be165;if(!this['_entities'][_0x1d1c09(0x1f6)](_0x471f7a))await this[_0x1d1c09(0x1d4)](_0x471f7a);return this[_0x1d1c09(0x1fe)][_0x1d1c09(0x1ca)](_0x471f7a);}[_0x5be165(0x1c1)](_0x38ec36){const _0x523381=_0x5be165;var _0x26d35f;return(_0x26d35f=this['_entities'][_0x523381(0x1ca)](_0x38ec36))!==null&&_0x26d35f!==void 0x0?_0x26d35f:null;}[_0x5be165(0x247)](){const _0x8e82bb=_0x5be165;this['_univerInstanceService'][_0x8e82bb(0x23f)](UniverInstanceType[_0x8e82bb(0x200)])[_0x8e82bb(0x1e8)](takeUntil(this['dispose$']))[_0x8e82bb(0x23a)](async _0x1096b1=>{const _0x3bb56a=_0x8e82bb,_0x56eca7=_0x1096b1[_0x3bb56a(0x1e3)][_0x3bb56a(0x21a)]();if(this[_0x3bb56a(0x1fe)]['has'](_0x56eca7))return;this[_0x3bb56a(0x1d4)](_0x56eca7);}),this[_0x8e82bb(0x251)][_0x8e82bb(0x219)](UniverInstanceType['UNIVER_SHEET'])[_0x8e82bb(0x1e8)](takeUntil(this['dispose$']))[_0x8e82bb(0x23a)](_0x1e2faf=>{const _0xea3819=_0x8e82bb,_0x27229a=_0x1e2faf['getUnitId'](),_0x180433=this[_0xea3819(0x1fe)][_0xea3819(0x1ca)](_0x27229a);_0x180433===null||_0x180433===void 0x0||_0x180433['dispose']();});}async['_startLiveShareCoordinator'](_0x2129dd){const _0x444357=_0x5be165,_0x1d4e35=await this['_collabSessionService'][_0x444357(0x222)](_0x2129dd),_0xb30aa=this['_injector'][_0x444357(0x208)](LiveShareCoordinator,_0x2129dd,_0x1d4e35);return _0xb30aa[_0x444357(0x1cf)](),this['_entities']['set'](_0x2129dd,_0xb30aa),_0xb30aa;}};LiveShareController=__decorate([__decorateParam(0x0,IUniverInstanceService),__decorateParam(0x1,Inject(Injector)),__decorateParam(0x2,Inject(CollaborationSessionService))],LiveShareController);let LiveShareStatus=function(_0x11daed){const _0x55288b=_0x5be165;return _0x11daed[_0x55288b(0x234)]=_0x55288b(0x1e2),_0x11daed[_0x55288b(0x1c5)]=_0x55288b(0x233),_0x11daed[_0x55288b(0x1e9)]='following',_0x11daed[_0x55288b(0x1ee)]='not-following',_0x11daed[_0x55288b(0x254)]=_0x55288b(0x24d),_0x11daed;}({});const SAME_OPERATION_SHARE_INTERVAL_KEY=_0x5be165(0x22d),DEFAULT_SAME_OPERATION_SHARE_INTERVAL=0xc8;let LiveShareCoordinator=class LiveShareCoordinator extends RxDisposable{get[_0x5be165(0x24c)](){const _0x11187a=_0x5be165;return this[_0x11187a(0x249)][_0x11187a(0x1c3)]();}constructor(_0x578a20,_0x128d95,_0x1d6215,_0x4648b3,_0x4ef5d2){const _0x1ffea0=_0x5be165;super(),this[_0x1ffea0(0x231)]=_0x578a20,this[_0x1ffea0(0x1c9)]=_0x128d95,this[_0x1ffea0(0x242)]=_0x1d6215,this['_liveShareService']=_0x4648b3,this['_commandService']=_0x4ef5d2,_defineProperty(this,'_status$',new BehaviorSubject('idle')),_defineProperty(this,_0x1ffea0(0x248),this[_0x1ffea0(0x249)]['asObservable']()),_defineProperty(this,_0x1ffea0(0x247),![]),_defineProperty(this,'_commandDisposable',null),_defineProperty(this,'_presenter',null);}[_0x5be165(0x256)](){const _0x3c7480=_0x5be165;var _0xa4e82c;(_0xa4e82c=this[_0x3c7480(0x1f3)])===null||_0xa4e82c===void 0x0||_0xa4e82c[_0x3c7480(0x256)](),this[_0x3c7480(0x249)][_0x3c7480(0x20f)](_0x3c7480(0x233)),this[_0x3c7480(0x249)][_0x3c7480(0x221)]();}[_0x5be165(0x257)](){const _0x1bb4c5=_0x5be165;return this[_0x1bb4c5(0x24c)];}[_0x5be165(0x1cf)](){const _0x29bd97=_0x5be165;if(this['_init'])return;this['_init']=!![],this[_0x29bd97(0x1c9)]['sessionStatus$'][_0x29bd97(0x1e8)](takeUntil(this['dispose$']))[_0x29bd97(0x23a)](_0x2d08c1=>{const _0x38fdf3=_0x29bd97;switch(_0x2d08c1){case SessionStatus[_0x38fdf3(0x234)]:this[_0x38fdf3(0x216)]();break;case SessionStatus['ONLINE']:this[_0x38fdf3(0x1f2)]();break;default:}}),this['_collabSession'][_0x29bd97(0x1d8)][_0x29bd97(0x1e8)](takeUntil(this[_0x29bd97(0x213)]))['subscribe'](_0x25bf34=>{const _0x3ff15a=_0x29bd97,{eventID:_0x4e0894}=_0x25bf34;switch(_0x4e0894){case CollaborationEvent['LIVESHARE_NEW_HOST']:this[_0x3ff15a(0x227)](_0x25bf34);break;case CollaborationEvent['LIVESHARE_OPERATION']:this[_0x3ff15a(0x1f7)](_0x25bf34);break;case CollaborationEvent[_0x3ff15a(0x1c2)]:this[_0x3ff15a(0x1e1)]();break;case CollaborationEvent[_0x3ff15a(0x1fd)]:this[_0x3ff15a(0x1eb)](_0x25bf34);break;default:}});}['tryStartPresenting'](){const _0x1cd8da=_0x5be165;this['_collabSession'][_0x1cd8da(0x211)]({'eventID':CollaborationEvent[_0x1cd8da(0x205)],'data':{'unitID':this[_0x1cd8da(0x231)],'userID':this[_0x1cd8da(0x1c9)][_0x1cd8da(0x1d5)]()}},this['_unitID']);}[_0x5be165(0x1c4)](){const _0x50a298=_0x5be165;this[_0x50a298(0x24c)]==='presenting'&&(this[_0x50a298(0x249)]['next']('idle'),this[_0x50a298(0x1c9)][_0x50a298(0x211)]({'eventID':CollaborationEvent[_0x50a298(0x1c2)],'data':{'unitID':this[_0x50a298(0x231)]}},this['_unitID']));}[_0x5be165(0x224)](){const _0x50d594=_0x5be165;if(this[_0x50d594(0x24c)]!==_0x50d594(0x1d7))return;this[_0x50d594(0x249)]['next']('following'),this[_0x50d594(0x220)]();}[_0x5be165(0x24f)](){const _0x19677c=_0x5be165;if(this[_0x19677c(0x24c)]!==_0x19677c(0x1d0))return;this[_0x19677c(0x204)]();}[_0x5be165(0x227)](_0x531f3e){const _0x4de19e=_0x5be165,{presenter:_0x3e8d38}=_0x531f3e[_0x4de19e(0x1f4)],_0x32469d=this['_collabSession'][_0x4de19e(0x1d5)]();this[_0x4de19e(0x1fa)]=_0x3e8d38;if(_0x3e8d38===_0x32469d)this[_0x4de19e(0x204)](),this[_0x4de19e(0x20e)]();else this[_0x4de19e(0x24c)]!==_0x4de19e(0x1d7)&&(this['_stopPresenting'](),this['_startFollowing']());}['_fetchOperations'](){const _0x37f31a=_0x5be165,_0x577b7c={'eventID':CollaborationEvent[_0x37f31a(0x255)]};this[_0x37f31a(0x1c9)]['send'](_0x577b7c,this[_0x37f31a(0x231)]);}[_0x5be165(0x1e1)](){const _0x464fc1=_0x5be165;this[_0x464fc1(0x1fa)]=null;if(this[_0x464fc1(0x24c)]!=='presenting')this[_0x464fc1(0x1bf)]();}['_handleNewChangeSets'](_0x10fbbc){const _0x21d838=_0x5be165;if(this[_0x21d838(0x24c)]==='following'&&this['_presenter']===_0x10fbbc[_0x21d838(0x1f4)][_0x21d838(0x21d)]){const _0x53ef00=parseProtocolChangeset(_0x10fbbc[_0x21d838(0x1f4)])[_0x21d838(0x1e0)][_0x21d838(0x1ff)]()[_0x21d838(0x22b)](_0x257818=>_0x257818['id']===InsertSheetMutation['id']);if(_0x53ef00){const _0x1aa63=_0x53ef00[_0x21d838(0x1dd)][_0x21d838(0x236)],_0x158abd=_0x53ef00['params'][_0x21d838(0x215)]['id'];setTimeout(()=>{const _0x4ac1f0=_0x21d838;this[_0x4ac1f0(0x241)][_0x4ac1f0(0x1f5)](SetWorksheetActiveOperation['id'],{'unitId':_0x1aa63,'subUnitId':_0x158abd},{'fromCollab':!![]});});}}}[_0x5be165(0x20e)](){const _0x3a82f1=_0x5be165;this['_status$'][_0x3a82f1(0x20f)](_0x3a82f1(0x24d));const _0x3b7e37=new Map(),_0x5a8d91=this[_0x3a82f1(0x1f3)]=new DisposableCollection();_0x5a8d91[_0x3a82f1(0x22a)](toDisposable(()=>{const _0x518d1a=_0x3a82f1;_0x3b7e37[_0x518d1a(0x212)](_0x4e6b97=>_0x4e6b97[_0x518d1a(0x221)]()),_0x3b7e37[_0x518d1a(0x1d9)]();})),_0x5a8d91[_0x3a82f1(0x22a)](this['_commandService'][_0x3a82f1(0x245)](_0x329ecb=>{const _0x4315c6=_0x3a82f1;if(_0x329ecb[_0x4315c6(0x238)]!==CommandType[_0x4315c6(0x1ce)]||!this['_liveShareService']['shouldShareOperation'](_0x329ecb['id']))return;const {id:_0x585d7d}=_0x329ecb;let _0x5d64c6;if(!_0x3b7e37[_0x4315c6(0x1f6)](_0x585d7d)){var _0x4be7a7;_0x5d64c6=new Subject(),_0x3b7e37['set'](_0x585d7d,_0x5d64c6),_0x5d64c6[_0x4315c6(0x1e8)](throttleTime((_0x4be7a7=this[_0x4315c6(0x242)][_0x4315c6(0x1be)](_0x4315c6(0x22d)))!==null&&_0x4be7a7!==void 0x0?_0x4be7a7:DEFAULT_SAME_OPERATION_SHARE_INTERVAL,void 0x0,{'trailing':!![],'leading':!![]}))[_0x4315c6(0x23a)](_0x29a891=>{const _0x31ea28=_0x4315c6;this[_0x31ea28(0x1c9)][_0x31ea28(0x211)]({'eventID':CollaborationEvent['LIVESHARE_OPERATION'],'data':{'unitID':this[_0x31ea28(0x231)],'operations':{[_0x29a891['id']]:{'id':_0x29a891['id'],'params':JSON['stringify'](_0x29a891['params'])}}}},this['_unitID']);});}else _0x5d64c6=_0x3b7e37[_0x4315c6(0x1ca)](_0x585d7d);_0x5d64c6[_0x4315c6(0x20f)](_0x329ecb);})),this[_0x3a82f1(0x1e4)]['getInitialStates'](this[_0x3a82f1(0x231)])[_0x3a82f1(0x212)](_0x3aea65=>this[_0x3a82f1(0x1c9)][_0x3a82f1(0x211)]({'eventID':CollaborationEvent['LIVESHARE_OPERATION'],'data':{'unitID':this['_unitID'],'operations':{[_0x3aea65['id']]:{'id':_0x3aea65['id'],'params':JSON[_0x3a82f1(0x217)](_0x3aea65[_0x3a82f1(0x1dd)])}}}},this[_0x3a82f1(0x231)]));}['_stopPresenting'](){const _0x2e26c7=_0x5be165;var _0x3ff1d7;this['_status$'][_0x2e26c7(0x20f)](_0x2e26c7(0x233)),(_0x3ff1d7=this[_0x2e26c7(0x1f3)])===null||_0x3ff1d7===void 0x0||_0x3ff1d7['dispose'](),this[_0x2e26c7(0x1f3)]=null;}['_startFollowing'](){const _0x4e0b29=_0x5be165;var _0x1b4d30;(_0x1b4d30=this[_0x4e0b29(0x1f3)])===null||_0x1b4d30===void 0x0||_0x1b4d30[_0x4e0b29(0x256)](),this[_0x4e0b29(0x249)][_0x4e0b29(0x20f)](_0x4e0b29(0x1d0));}[_0x5be165(0x1bf)](){const _0x4d3699=_0x5be165;var _0x9f4aac;this['_status$'][_0x4d3699(0x20f)](_0x4d3699(0x233)),(_0x9f4aac=this[_0x4d3699(0x1f3)])===null||_0x9f4aac===void 0x0||_0x9f4aac['dispose'](),this[_0x4d3699(0x1f3)]=null;}[_0x5be165(0x204)](){const _0x321f3c=_0x5be165;var _0x769bb7;this[_0x321f3c(0x249)][_0x321f3c(0x20f)](_0x321f3c(0x1d7)),(_0x769bb7=this['_commandDisposable'])===null||_0x769bb7===void 0x0||_0x769bb7[_0x321f3c(0x256)]();}['_handleOperation'](_0x58666b){const _0x13f377=_0x5be165;if([_0x13f377(0x24d),_0x13f377(0x1d7),_0x13f377(0x1e2)][_0x13f377(0x20d)](this[_0x13f377(0x24c)]))return;if(!_0x58666b[_0x13f377(0x1f4)][_0x13f377(0x1e5)]||_0x58666b[_0x13f377(0x1f4)]['presenter']===this[_0x13f377(0x1c9)]['getMemberID']())return;if(this[_0x13f377(0x24c)]===_0x13f377(0x233))this[_0x13f377(0x220)]();const _0x3017ee=_0x58666b[_0x13f377(0x1f4)][_0x13f377(0x24e)];Object[_0x13f377(0x1da)](_0x3017ee)[_0x13f377(0x212)](_0x344fff=>{const _0x7e2e81=_0x13f377;this[_0x7e2e81(0x241)]['executeCommand'](_0x344fff['id'],_0x344fff[_0x7e2e81(0x1dd)]?JSON['parse'](_0x344fff[_0x7e2e81(0x1dd)]):null,{'fromCollab':!![]});});}['_handleOffline'](){const _0x3f6dc8=_0x5be165;var _0x261b6e;this[_0x3f6dc8(0x249)][_0x3f6dc8(0x20f)](_0x3f6dc8(0x1e2)),(_0x261b6e=this[_0x3f6dc8(0x1f3)])===null||_0x261b6e===void 0x0||_0x261b6e[_0x3f6dc8(0x256)]();}[_0x5be165(0x1f2)](){const _0x2fbf0b=_0x5be165;this[_0x2fbf0b(0x249)]['next'](_0x2fbf0b(0x233)),this['_fetchOperations']();}};LiveShareCoordinator=__decorate([__decorateParam(0x2,IConfigService),__decorateParam(0x3,Inject(LiveShareService)),__decorateParam(0x4,ICommandService)],LiveShareCoordinator);function LiveShare(){const _0x5cf6d9=_0x5be165,_0x31ff37=useDependency(LiveShareController),_0xdd83c5=useDependency(IUniverInstanceService),_0xe64d2=useObservable(()=>_0xdd83c5[_0x5cf6d9(0x243)](UniverInstanceType[_0x5cf6d9(0x200)]),void 0x0,![],[]),[_0x393262,_0x67173d]=useState(null),[_0x48a93d,_0x1b8bf6]=useState(_0x5cf6d9(0x233)),_0x20121d=useRef(null);useEffect(()=>{const _0x138429=_0x5cf6d9;if(_0xe64d2)_0x31ff37[_0x138429(0x232)](_0xe64d2[_0x138429(0x21a)]())[_0x138429(0x24a)](_0x1d6069=>{const _0x51b1fc=_0x138429;_0x67173d(_0x1d6069),_0x20121d[_0x51b1fc(0x20a)]=_0x1d6069[_0x51b1fc(0x248)][_0x51b1fc(0x23a)](_0x58b0c2=>{_0x1b8bf6(_0x58b0c2);});});return()=>{const _0x14b56a=_0x138429;var _0x3b7826;(_0x3b7826=_0x20121d[_0x14b56a(0x20a)])===null||_0x3b7826===void 0x0||_0x3b7826[_0x14b56a(0x23c)](),_0x20121d[_0x14b56a(0x20a)]=null;};},[_0xe64d2,_0x31ff37]);if(!_0x393262)return null;return jsx(Dropdown,{'align':_0x5cf6d9(0x1cd),'disabled':_0x48a93d==='offline','className':_0x5cf6d9(0x1f8),'overlay':jsx(LiveShareDropdown,{'status':_0x48a93d,'coordinator':_0x393262}),'children':jsx(_0x5cf6d9(0x23e),{'className':clsx('univer-border-none\x20univer-text-gray-600\x20univer-outline-none',{'univer-cursor-not-allowed':_0x48a93d===_0x5cf6d9(0x1e2),'univer-cursor-pointer\x20hover:univer-bg-gray-400':_0x48a93d!==_0x5cf6d9(0x1e2)}),'type':'button','children':jsx(LiveShareIcon,{'className':_0x5cf6d9(0x23d)})})});}function LiveShareDropdown(_0x4bf670){const _0x2e39bc=_0x5be165,{status:_0x4b19a7,coordinator:_0x389698}=_0x4bf670;switch(_0x4b19a7){case'idle':return jsx(Idle,{'coordinator':_0x389698});case _0x2e39bc(0x1d0):return jsx(Following,{'coordinator':_0x389698});case _0x2e39bc(0x1d7):return jsx(NotFollowing,{'coordinator':_0x389698});case _0x2e39bc(0x1e2):return jsx(Offline,{});case'presenting':return jsx(Presenting,{'coordinator':_0x389698});default:return null;}}function _0x4fca(_0x53ca86,_0x28f239){_0x53ca86=_0x53ca86-0x1be;const _0x59c08f=_0x59c0();let _0x4fcafb=_0x59c08f[_0x53ca86];return _0x4fcafb;}function Idle(_0x5615f2){const _0x214859=_0x5be165,{coordinator:_0x3f59cb}=_0x5615f2;return jsxs(Fragment,{'children':[jsx('div',{'className':_0x214859(0x218),'children':_0x214859(0x202)}),jsx(Button,{'onClick':()=>_0x3f59cb[_0x214859(0x1d1)](),'children':_0x214859(0x20c)})]});}function Following(_0x535c47){const _0x417415=_0x5be165,{coordinator:_0x5a04d4}=_0x535c47;return jsxs(Fragment,{'children':[jsx(_0x417415(0x24b),{'className':_0x417415(0x218),'children':_0x417415(0x1f1)}),jsx(Button,{'onClick':()=>_0x5a04d4['stopFollowing'](),'children':_0x417415(0x21f)})]});}function NotFollowing(_0x531b8f){const _0xc5e6a0=_0x5be165,{coordinator:_0x5405ae}=_0x531b8f;return jsxs(Fragment,{'children':[jsx(_0xc5e6a0(0x24b),{'className':_0xc5e6a0(0x218),'children':'You\x27re\x20not\x20following\x20the\x20presenter'}),jsx(Button,{'variant':_0xc5e6a0(0x22f),'onClick':()=>_0x5405ae[_0xc5e6a0(0x224)](),'children':_0xc5e6a0(0x223)})]});}function Presenting(_0x2f1771){const _0x27bf36=_0x5be165,{coordinator:_0x5de55d}=_0x2f1771;return jsxs(Fragment,{'children':[jsx(_0x27bf36(0x24b),{'className':_0x27bf36(0x218),'children':_0x27bf36(0x246)}),jsx(Button,{'variant':_0x27bf36(0x210),'onClick':()=>_0x5de55d[_0x27bf36(0x1c4)](),'children':_0x27bf36(0x1cb)})]});}function Offline(){const _0x2122ee=_0x5be165;return jsx(Fragment,{'children':_0x2122ee(0x229)});}let DesktopLiveShareController=class DesktopLiveShareController extends Disposable{constructor(_0x4a6fa8,_0x113278){const _0x56e126=_0x5be165;super(),this[_0x56e126(0x21b)]=_0x4a6fa8,this[_0x56e126(0x207)]=_0x113278,this['_mountLiveShare']();}[_0x5be165(0x22e)](){const _0x23b495=_0x5be165;this['disposeWithMe'](this['_uiPartsService'][_0x23b495(0x1fc)](BuiltInUIPart[_0x23b495(0x240)],()=>connectInjector(LiveShare,this[_0x23b495(0x21b)])));}};DesktopLiveShareController=__decorate([__decorateParam(0x0,Inject(Injector)),__decorateParam(0x1,IUIPartsService)],DesktopLiveShareController);var name=_0x5be165(0x1c0),version=_0x5be165(0x250);const LIVE_SHARE_PLUGIN_CONFIG_KEY=_0x5be165(0x1fb),configSymbol=Symbol(LIVE_SHARE_PLUGIN_CONFIG_KEY),defaultPluginConfig={};let LiveShareCoreExtensionsController=class LiveShareCoreExtensionsController extends Disposable{constructor(_0x57fc86){const _0x2992b9=_0x5be165;super(),this[_0x2992b9(0x1e4)]=_0x57fc86,this[_0x2992b9(0x247)]();}[_0x5be165(0x247)](){const _0x2ba892=_0x5be165;[SetZoomRatioOperation['id'],SetScrollOperation['id'],SetWorksheetActiveOperation['id']][_0x2ba892(0x212)](_0x483e55=>{const _0x24a2b6=_0x2ba892;this[_0x24a2b6(0x206)](this['_liveShareService']['registerSharedOperation'](_0x483e55));});}};LiveShareCoreExtensionsController=__decorate([__decorateParam(0x0,Inject(LiveShareService))],LiveShareCoreExtensionsController);let UniverLiveSharePlugin=class UniverLiveSharePlugin extends Plugin{constructor(_0x78ca72=defaultPluginConfig,_0x317b09,_0xd14575){const _0x116bbf=_0x5be165;super(),this[_0x116bbf(0x1f0)]=_0x78ca72,this[_0x116bbf(0x21b)]=_0x317b09,this[_0x116bbf(0x242)]=_0xd14575;const {..._0x2e998a}=merge({},defaultPluginConfig,this[_0x116bbf(0x1f0)]);this[_0x116bbf(0x242)][_0x116bbf(0x201)](LIVE_SHARE_PLUGIN_CONFIG_KEY,_0x2e998a);}[_0x5be165(0x1c7)](){const _0x4984fb=_0x5be165;registerDependencies(this[_0x4984fb(0x21b)],mergeOverrideWithDependencies([[LiveShareService],[LiveShareController],[LiveShareCoreExtensionsController],[DesktopLiveShareController]],this[_0x4984fb(0x1f0)][_0x4984fb(0x1c6)])),touchDependencies(this[_0x4984fb(0x21b)],[[LiveShareCoreExtensionsController]]);}[_0x5be165(0x1df)](){touchDependencies(this['_injector'],[[DesktopLiveShareController]]);}};_defineProperty(UniverLiveSharePlugin,_0x5be165(0x238),UniverInstanceType[_0x5be165(0x252)]),_defineProperty(UniverLiveSharePlugin,_0x5be165(0x237),_0x5be165(0x21c)),_defineProperty(UniverLiveSharePlugin,_0x5be165(0x1d3),name),_defineProperty(UniverLiveSharePlugin,_0x5be165(0x23b),version),UniverLiveSharePlugin=__decorate([DependentOn(UniverCollaborationClientPlugin),__decorateParam(0x1,Inject(Injector)),__decorateParam(0x2,IConfigService)],UniverLiveSharePlugin);export{DesktopLiveShareController,LiveShare,LiveShareController,LiveShareCoordinator,LiveShareService,LiveShareStatus,UniverLiveSharePlugin};
|
|
1
|
+
const _0x43267f=_0x5e07;(function(_0x1f2c2c,_0x43cf11){const _0x53af28=_0x5e07,_0x3f8716=_0x1f2c2c();while(!![]){try{const _0x23ce05=-parseInt(_0x53af28(0x1c0))/0x1*(parseInt(_0x53af28(0x1b9))/0x2)+-parseInt(_0x53af28(0x1e5))/0x3+-parseInt(_0x53af28(0x193))/0x4*(parseInt(_0x53af28(0x206))/0x5)+parseInt(_0x53af28(0x1a3))/0x6*(-parseInt(_0x53af28(0x20c))/0x7)+parseInt(_0x53af28(0x1c9))/0x8*(parseInt(_0x53af28(0x1f9))/0x9)+-parseInt(_0x53af28(0x20a))/0xa+parseInt(_0x53af28(0x207))/0xb;if(_0x23ce05===_0x43cf11)break;else _0x3f8716['push'](_0x3f8716['shift']());}catch(_0x569f30){_0x3f8716['push'](_0x3f8716['shift']());}}}(_0x6cd2,0xb195c));import{CommandType,DependentOn,Disposable,DisposableCollection,ICommandService,IConfigService,IUniverInstanceService,Inject,Injector,Plugin,RxDisposable,UniverInstanceType,merge,mergeOverrideWithDependencies,registerDependencies,toDisposable,touchDependencies}from'@univerjs/core';import{BuiltInUIPart,IUIPartsService,connectInjector,useDependency,useObservable}from'@univerjs/ui';import{Button,Dropdown,clsx}from'@univerjs/design';import{LiveShareIcon}from'@univerjs/icons';import{useEffect,useRef,useState}from'react';import{CollaborationEvent,parseProtocolChangeset}from'@univerjs-pro/collaboration';import{CollaborationSessionService,SessionStatus,UniverCollaborationClientPlugin}from'@univerjs-pro/collaboration-client';import{InsertSheetMutation,SetWorksheetActiveOperation}from'@univerjs/sheets';import{BehaviorSubject,Subject}from'rxjs';import{takeUntil,throttleTime}from'rxjs/operators';import{Fragment,jsx,jsxs}from'react/jsx-runtime';import{SetScrollOperation,SetZoomRatioOperation}from'@univerjs/sheets-ui';function _typeof(_0x3259cf){'@babel/helpers - typeof';const _0x52bde7=_0x5e07;return _typeof='function'==typeof Symbol&&_0x52bde7(0x1b2)==typeof Symbol['iterator']?function(_0x4e48fe){return typeof _0x4e48fe;}:function(_0x412a12){const _0x464e5c=_0x52bde7;return _0x412a12&&_0x464e5c(0x1ef)==typeof Symbol&&_0x412a12[_0x464e5c(0x1ab)]===Symbol&&_0x412a12!==Symbol[_0x464e5c(0x1c8)]?_0x464e5c(0x1b2):typeof _0x412a12;},_typeof(_0x3259cf);}function toPrimitive(_0x2cd61c,_0x9056d2){const _0x4b4caf=_0x5e07;if(_0x4b4caf(0x1a0)!=_typeof(_0x2cd61c)||!_0x2cd61c)return _0x2cd61c;var _0x43a311=_0x2cd61c[Symbol[_0x4b4caf(0x1c7)]];if(void 0x0!==_0x43a311){var _0x24d425=_0x43a311['call'](_0x2cd61c,_0x9056d2||_0x4b4caf(0x1d3));if(_0x4b4caf(0x1a0)!=_typeof(_0x24d425))return _0x24d425;throw new TypeError(_0x4b4caf(0x1b1));}return(_0x4b4caf(0x1dc)===_0x9056d2?String:Number)(_0x2cd61c);}function toPropertyKey(_0x1346e8){const _0x388902=_0x5e07;var _0x329a8e=toPrimitive(_0x1346e8,_0x388902(0x1dc));return _0x388902(0x1b2)==_typeof(_0x329a8e)?_0x329a8e:_0x329a8e+'';}function _defineProperty(_0x193b00,_0xb67046,_0x1a790f){const _0x585e14=_0x5e07;return(_0xb67046=toPropertyKey(_0xb67046))in _0x193b00?Object[_0x585e14(0x1c4)](_0x193b00,_0xb67046,{'value':_0x1a790f,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x193b00[_0xb67046]=_0x1a790f,_0x193b00;}var LiveShareService=class extends Disposable{constructor(..._0x279850){const _0x34bfc2=_0x5e07;super(..._0x279850),_defineProperty(this,_0x34bfc2(0x1fa),new Set()),_defineProperty(this,_0x34bfc2(0x1ac),new Set());}[_0x43267f(0x1db)](_0x781920){const _0xac4616=_0x43267f;return this[_0xac4616(0x1fa)]['add'](_0x781920),toDisposable(()=>this['_sharedOperations'][_0xac4616(0x200)](_0x781920));}[_0x43267f(0x1ca)](_0x46d0fc){const _0x4c5160=_0x43267f;return this[_0x4c5160(0x1ac)][_0x4c5160(0x183)](_0x46d0fc),toDisposable(()=>this['_reporters'][_0x4c5160(0x200)](_0x46d0fc));}['shouldShareOperation'](_0x1f1729){const _0x5fc19=_0x43267f;return this[_0x5fc19(0x1fa)]['has'](_0x1f1729);}[_0x43267f(0x1e9)](_0x4d618e){const _0x3a63b5=_0x43267f;return Array[_0x3a63b5(0x187)](this['_reporters'])[_0x3a63b5(0x1a1)](_0x1bc215=>_0x1bc215(_0x4d618e));}};function _0x5e07(_0x3ab236,_0x4100de){_0x3ab236=_0x3ab236-0x177;const _0x6cd26f=_0x6cd2();let _0x5e07a5=_0x6cd26f[_0x3ab236];return _0x5e07a5;}function __decorateParam(_0x4e9fe7,_0x33be22){return function(_0x9d2488,_0x3a7382){_0x33be22(_0x9d2488,_0x3a7382,_0x4e9fe7);};}function __decorate(_0x29fa24,_0x53b74c,_0x1efd38,_0x3358b6){const _0x556cb7=_0x43267f;var _0x3bdeb6=arguments[_0x556cb7(0x181)],_0x1872a2=_0x3bdeb6<0x3?_0x53b74c:_0x3358b6===null?_0x3358b6=Object[_0x556cb7(0x1a2)](_0x53b74c,_0x1efd38):_0x3358b6,_0x25103d;if(typeof Reflect===_0x556cb7(0x1a0)&&typeof Reflect[_0x556cb7(0x17d)]===_0x556cb7(0x1ef))_0x1872a2=Reflect[_0x556cb7(0x17d)](_0x29fa24,_0x53b74c,_0x1efd38,_0x3358b6);else{for(var _0x1d2318=_0x29fa24['length']-0x1;_0x1d2318>=0x0;_0x1d2318--)if(_0x25103d=_0x29fa24[_0x1d2318])_0x1872a2=(_0x3bdeb6<0x3?_0x25103d(_0x1872a2):_0x3bdeb6>0x3?_0x25103d(_0x53b74c,_0x1efd38,_0x1872a2):_0x25103d(_0x53b74c,_0x1efd38))||_0x1872a2;}return _0x3bdeb6>0x3&&_0x1872a2&&Object[_0x556cb7(0x1c4)](_0x53b74c,_0x1efd38,_0x1872a2),_0x1872a2;}let LiveShareController=class LiveShareController extends RxDisposable{constructor(_0x2140b2,_0x3fc587,_0x584ca4){const _0xaea04=_0x43267f;super(),this[_0xaea04(0x1d6)]=_0x2140b2,this['_injector']=_0x3fc587,this[_0xaea04(0x1b6)]=_0x584ca4,_defineProperty(this,'_entities',new Map()),this[_0xaea04(0x1e3)]();}async[_0x43267f(0x209)](_0x18a67d){const _0x32d49a=_0x43267f;if(!this[_0x32d49a(0x17e)][_0x32d49a(0x1cf)](_0x18a67d))await this[_0x32d49a(0x1d1)](_0x18a67d);return this[_0x32d49a(0x17e)]['get'](_0x18a67d);}[_0x43267f(0x1ff)](_0x46286e){const _0x73143b=_0x43267f;var _0x14b673;return(_0x14b673=this[_0x73143b(0x17e)][_0x73143b(0x1cd)](_0x46286e))!==null&&_0x14b673!==void 0x0?_0x14b673:null;}[_0x43267f(0x1e3)](){const _0x5c8079=_0x43267f;this[_0x5c8079(0x1d6)][_0x5c8079(0x197)](UniverInstanceType[_0x5c8079(0x1a8)])['pipe'](takeUntil(this[_0x5c8079(0x1be)]))[_0x5c8079(0x20b)](async _0x4e889a=>{const _0x46f815=_0x5c8079,_0x4cea86=_0x4e889a[_0x46f815(0x1bc)][_0x46f815(0x1da)]();if(this[_0x46f815(0x17e)][_0x46f815(0x1cf)](_0x4cea86))return;this[_0x46f815(0x1d1)](_0x4cea86);}),this[_0x5c8079(0x1d6)]['getTypeOfUnitDisposed$'](UniverInstanceType[_0x5c8079(0x1a8)])[_0x5c8079(0x1e1)](takeUntil(this['dispose$']))[_0x5c8079(0x20b)](_0x56517c=>{const _0x1d0d8f=_0x5c8079,_0x597160=_0x56517c[_0x1d0d8f(0x1da)](),_0x257bfe=this['_entities'][_0x1d0d8f(0x1cd)](_0x597160);_0x257bfe===null||_0x257bfe===void 0x0||_0x257bfe[_0x1d0d8f(0x1ce)]();});}async[_0x43267f(0x1d1)](_0x1f7800){const _0x3c87d7=_0x43267f,_0x31bdd=await this['_collabSessionService'][_0x3c87d7(0x18f)](_0x1f7800),_0x17abb8=this[_0x3c87d7(0x1c2)][_0x3c87d7(0x1ea)](LiveShareCoordinator,_0x1f7800,_0x31bdd);return _0x17abb8[_0x3c87d7(0x1fd)](),this[_0x3c87d7(0x17e)][_0x3c87d7(0x1e8)](_0x1f7800,_0x17abb8),_0x17abb8;}};LiveShareController=__decorate([__decorateParam(0x0,IUniverInstanceService),__decorateParam(0x1,Inject(Injector)),__decorateParam(0x2,Inject(CollaborationSessionService))],LiveShareController);let LiveShareStatus=function(_0xe4315){const _0x514b6a=_0x43267f;return _0xe4315[_0x514b6a(0x1f5)]='offline',_0xe4315['IDLE']=_0x514b6a(0x1f3),_0xe4315['FOLLOWING']=_0x514b6a(0x1e2),_0xe4315[_0x514b6a(0x1e0)]='not-following',_0xe4315[_0x514b6a(0x184)]=_0x514b6a(0x1b7),_0xe4315;}({});const SAME_OPERATION_SHARE_INTERVAL_KEY=_0x43267f(0x1e4),DEFAULT_SAME_OPERATION_SHARE_INTERVAL=0xc8;let LiveShareCoordinator=class LiveShareCoordinator extends RxDisposable{get[_0x43267f(0x19c)](){const _0x1ce33f=_0x43267f;return this[_0x1ce33f(0x1ad)][_0x1ce33f(0x1f4)]();}constructor(_0x55e21b,_0x40d5b5,_0xde803f,_0x326f17,_0x359f2f){const _0x227f9e=_0x43267f;super(),this[_0x227f9e(0x1de)]=_0x55e21b,this[_0x227f9e(0x1c6)]=_0x40d5b5,this[_0x227f9e(0x1ec)]=_0xde803f,this['_liveShareService']=_0x326f17,this['_commandService']=_0x359f2f,_defineProperty(this,_0x227f9e(0x1ad),new BehaviorSubject(_0x227f9e(0x1f3))),_defineProperty(this,_0x227f9e(0x1a6),this[_0x227f9e(0x1ad)][_0x227f9e(0x203)]()),_defineProperty(this,_0x227f9e(0x1e3),![]),_defineProperty(this,_0x227f9e(0x1ed),null),_defineProperty(this,_0x227f9e(0x194),null);}[_0x43267f(0x1ce)](){const _0x20cfc0=_0x43267f;var _0x57994b;(_0x57994b=this[_0x20cfc0(0x1ed)])===null||_0x57994b===void 0x0||_0x57994b[_0x20cfc0(0x1ce)](),this['_status$'][_0x20cfc0(0x201)](_0x20cfc0(0x1f3)),this[_0x20cfc0(0x1ad)][_0x20cfc0(0x1f2)]();}[_0x43267f(0x180)](){const _0x2a7d48=_0x43267f;return this[_0x2a7d48(0x19c)];}['init'](){const _0x2359c5=_0x43267f;if(this[_0x2359c5(0x1e3)])return;this[_0x2359c5(0x1e3)]=!![],this['_collabSession'][_0x2359c5(0x1b3)][_0x2359c5(0x1e1)](takeUntil(this[_0x2359c5(0x1be)]))[_0x2359c5(0x20b)](_0x5e63bc=>{const _0x327f39=_0x2359c5;switch(_0x5e63bc){case SessionStatus['OFFLINE']:this[_0x327f39(0x18c)]();break;case SessionStatus[_0x327f39(0x1c1)]:this['_handleOnline']();break;default:}}),this[_0x2359c5(0x1c6)][_0x2359c5(0x1df)][_0x2359c5(0x1e1)](takeUntil(this[_0x2359c5(0x1be)]))[_0x2359c5(0x20b)](_0x10d22a=>{const _0x57b989=_0x2359c5,{eventID:_0x9987a3}=_0x10d22a;switch(_0x9987a3){case CollaborationEvent['LIVESHARE_NEW_HOST']:this[_0x57b989(0x179)](_0x10d22a);break;case CollaborationEvent['LIVESHARE_OPERATION']:this[_0x57b989(0x190)](_0x10d22a);break;case CollaborationEvent[_0x57b989(0x1d0)]:this[_0x57b989(0x195)]();break;case CollaborationEvent['NEW_CHANGESETS']:this[_0x57b989(0x198)](_0x10d22a);break;default:}});}[_0x43267f(0x1dd)](){const _0x3207db=_0x43267f;this['_collabSession'][_0x3207db(0x17f)]({'eventID':CollaborationEvent['LIVESHARE_REQUEST_HOST'],'data':{'unitID':this['_unitID'],'userID':this['_collabSession'][_0x3207db(0x1a4)]()}},this[_0x3207db(0x1de)]);}['stopPresenting'](){const _0x5f2dc5=_0x43267f;this[_0x5f2dc5(0x19c)]===_0x5f2dc5(0x1b7)&&(this['_status$'][_0x5f2dc5(0x201)](_0x5f2dc5(0x1f3)),this[_0x5f2dc5(0x1c6)][_0x5f2dc5(0x17f)]({'eventID':CollaborationEvent[_0x5f2dc5(0x1d0)],'data':{'unitID':this[_0x5f2dc5(0x1de)]}},this['_unitID']));}['startFollowing'](){const _0x6cb0c4=_0x43267f;if(this[_0x6cb0c4(0x19c)]!==_0x6cb0c4(0x19f))return;this[_0x6cb0c4(0x1ad)]['next']('following'),this['_startFollowing']();}['stopFollowing'](){const _0x3f8a44=_0x43267f;if(this[_0x3f8a44(0x19c)]!=='following')return;this[_0x3f8a44(0x1ae)]();}[_0x43267f(0x179)](_0x1393a8){const _0x5be0cc=_0x43267f,{presenter:_0x473290}=_0x1393a8['data'],_0x4d56d6=this[_0x5be0cc(0x1c6)]['getMemberID']();this[_0x5be0cc(0x194)]=_0x473290;if(_0x473290===_0x4d56d6)this[_0x5be0cc(0x1ae)](),this[_0x5be0cc(0x205)]();else this[_0x5be0cc(0x19c)]!==_0x5be0cc(0x19f)&&(this[_0x5be0cc(0x1d2)](),this['_startFollowing']());}[_0x43267f(0x199)](){const _0x260446=_0x43267f,_0x54b420={'eventID':CollaborationEvent['LIVESHARE_FETCH_OPERATIONS']};this['_collabSession'][_0x260446(0x17f)](_0x54b420,this[_0x260446(0x1de)]);}[_0x43267f(0x195)](){const _0x4f0d63=_0x43267f;this[_0x4f0d63(0x194)]=null;if(this[_0x4f0d63(0x19c)]!==_0x4f0d63(0x1b7))this[_0x4f0d63(0x19b)]();}['_handleNewChangeSets'](_0x5132eb){const _0x5c9ce7=_0x43267f;if(this[_0x5c9ce7(0x19c)]===_0x5c9ce7(0x1e2)&&this[_0x5c9ce7(0x194)]===_0x5132eb[_0x5c9ce7(0x1bf)][_0x5c9ce7(0x1a9)]){const _0x2a1c4=parseProtocolChangeset(_0x5132eb['data'])['mutations'][_0x5c9ce7(0x1fb)]()[_0x5c9ce7(0x19a)](_0x6e761=>_0x6e761['id']===InsertSheetMutation['id']);if(_0x2a1c4){const _0x4e2ab8=_0x2a1c4['params'][_0x5c9ce7(0x204)],_0x3e70b6=_0x2a1c4[_0x5c9ce7(0x17c)][_0x5c9ce7(0x1e7)]['id'];setTimeout(()=>{const _0x4a583b=_0x5c9ce7;this[_0x4a583b(0x1d7)][_0x4a583b(0x19e)](SetWorksheetActiveOperation['id'],{'unitId':_0x4e2ab8,'subUnitId':_0x3e70b6},{'fromCollab':!![]});});}}}['_startPresenting'](){const _0x352bb0=_0x43267f;this[_0x352bb0(0x1ad)][_0x352bb0(0x201)](_0x352bb0(0x1b7));const _0x3138d2=new Map(),_0x447d4e=this[_0x352bb0(0x1ed)]=new DisposableCollection();_0x447d4e[_0x352bb0(0x183)](toDisposable(()=>{const _0x298c6a=_0x352bb0;_0x3138d2[_0x298c6a(0x1fc)](_0x3c9296=>_0x3c9296[_0x298c6a(0x1f2)]()),_0x3138d2['clear']();})),_0x447d4e[_0x352bb0(0x183)](this[_0x352bb0(0x1d7)][_0x352bb0(0x1b5)](_0x5c0668=>{const _0x308d65=_0x352bb0;if(_0x5c0668['type']!==CommandType[_0x308d65(0x1f7)]||!this[_0x308d65(0x1cc)]['shouldShareOperation'](_0x5c0668['id']))return;const {id:_0x5ce639}=_0x5c0668;let _0x483408;if(!_0x3138d2[_0x308d65(0x1cf)](_0x5ce639)){var _0x347730;_0x483408=new Subject(),_0x3138d2[_0x308d65(0x1e8)](_0x5ce639,_0x483408),_0x483408['pipe'](throttleTime((_0x347730=this[_0x308d65(0x1ec)][_0x308d65(0x185)](_0x308d65(0x1e4)))!==null&&_0x347730!==void 0x0?_0x347730:DEFAULT_SAME_OPERATION_SHARE_INTERVAL,void 0x0,{'trailing':!![],'leading':!![]}))[_0x308d65(0x20b)](_0x4a1dcd=>{const _0x272a2d=_0x308d65;this[_0x272a2d(0x1c6)][_0x272a2d(0x17f)]({'eventID':CollaborationEvent[_0x272a2d(0x192)],'data':{'unitID':this[_0x272a2d(0x1de)],'operations':{[_0x4a1dcd['id']]:{'id':_0x4a1dcd['id'],'params':JSON['stringify'](_0x4a1dcd[_0x272a2d(0x17c)])}}}},this[_0x272a2d(0x1de)]);});}else _0x483408=_0x3138d2['get'](_0x5ce639);_0x483408[_0x308d65(0x201)](_0x5c0668);})),this[_0x352bb0(0x1cc)][_0x352bb0(0x1e9)](this[_0x352bb0(0x1de)])['forEach'](_0x2d34e1=>this['_collabSession'][_0x352bb0(0x17f)]({'eventID':CollaborationEvent[_0x352bb0(0x192)],'data':{'unitID':this[_0x352bb0(0x1de)],'operations':{[_0x2d34e1['id']]:{'id':_0x2d34e1['id'],'params':JSON[_0x352bb0(0x1e6)](_0x2d34e1['params'])}}}},this['_unitID']));}[_0x43267f(0x1d2)](){const _0x9481db=_0x43267f;var _0x3d90fb;this['_status$'][_0x9481db(0x201)](_0x9481db(0x1f3)),(_0x3d90fb=this[_0x9481db(0x1ed)])===null||_0x3d90fb===void 0x0||_0x3d90fb[_0x9481db(0x1ce)](),this['_commandDisposable']=null;}[_0x43267f(0x1d8)](){const _0x1437d8=_0x43267f;var _0x261bdd;(_0x261bdd=this[_0x1437d8(0x1ed)])===null||_0x261bdd===void 0x0||_0x261bdd[_0x1437d8(0x1ce)](),this['_status$'][_0x1437d8(0x201)](_0x1437d8(0x1e2));}['_beIdle'](){const _0x538408=_0x43267f;var _0x2434d1;this[_0x538408(0x1ad)][_0x538408(0x201)](_0x538408(0x1f3)),(_0x2434d1=this[_0x538408(0x1ed)])===null||_0x2434d1===void 0x0||_0x2434d1[_0x538408(0x1ce)](),this[_0x538408(0x1ed)]=null;}['_stopFollowing'](){const _0xfd6c91=_0x43267f;var _0x6b0a87;this[_0xfd6c91(0x1ad)][_0xfd6c91(0x201)]('not-following'),(_0x6b0a87=this[_0xfd6c91(0x1ed)])===null||_0x6b0a87===void 0x0||_0x6b0a87[_0xfd6c91(0x1ce)]();}[_0x43267f(0x190)](_0x4f7def){const _0xe4d062=_0x43267f;if([_0xe4d062(0x1b7),'not-following',_0xe4d062(0x1f8)]['includes'](this[_0xe4d062(0x19c)]))return;if(!_0x4f7def[_0xe4d062(0x1bf)][_0xe4d062(0x17a)]||_0x4f7def[_0xe4d062(0x1bf)][_0xe4d062(0x17a)]===this[_0xe4d062(0x1c6)][_0xe4d062(0x1a4)]())return;if(this['_status']===_0xe4d062(0x1f3))this[_0xe4d062(0x1d8)]();const _0x501e4d=_0x4f7def[_0xe4d062(0x1bf)]['operations'];Object[_0xe4d062(0x202)](_0x501e4d)[_0xe4d062(0x1fc)](_0x25efbf=>{const _0x2692fa=_0xe4d062;this[_0x2692fa(0x1d7)][_0x2692fa(0x19e)](_0x25efbf['id'],_0x25efbf['params']?JSON[_0x2692fa(0x17b)](_0x25efbf[_0x2692fa(0x17c)]):null,{'fromCollab':!![]});});}['_handleOffline'](){const _0x498524=_0x43267f;var _0x2c2652;this[_0x498524(0x1ad)][_0x498524(0x201)]('offline'),(_0x2c2652=this['_commandDisposable'])===null||_0x2c2652===void 0x0||_0x2c2652[_0x498524(0x1ce)]();}[_0x43267f(0x178)](){const _0x2213d1=_0x43267f;this[_0x2213d1(0x1ad)][_0x2213d1(0x201)](_0x2213d1(0x1f3)),this[_0x2213d1(0x199)]();}};LiveShareCoordinator=__decorate([__decorateParam(0x2,IConfigService),__decorateParam(0x3,Inject(LiveShareService)),__decorateParam(0x4,ICommandService)],LiveShareCoordinator);function LiveShare(){const _0x5915e1=_0x43267f,_0x379895=useDependency(LiveShareController),_0x388630=useDependency(IUniverInstanceService),_0xdfd42=useObservable(()=>_0x388630[_0x5915e1(0x1ee)](UniverInstanceType[_0x5915e1(0x1a8)]),void 0x0,![],[]),[_0x4a50e5,_0x4b0bfe]=useState(null),[_0x58567e,_0x2ea0aa]=useState(_0x5915e1(0x1f3)),_0x3c623e=useRef(null);useEffect(()=>{const _0x11c4e8=_0x5915e1;if(_0xdfd42)_0x379895[_0x11c4e8(0x209)](_0xdfd42[_0x11c4e8(0x1da)]())[_0x11c4e8(0x1f1)](_0x508ef6=>{const _0x35fa11=_0x11c4e8;_0x4b0bfe(_0x508ef6),_0x3c623e['current']=_0x508ef6[_0x35fa11(0x1a6)][_0x35fa11(0x20b)](_0x201338=>{_0x2ea0aa(_0x201338);});});return()=>{const _0x1ea090=_0x11c4e8;var _0x2cdb36;(_0x2cdb36=_0x3c623e[_0x1ea090(0x191)])===null||_0x2cdb36===void 0x0||_0x2cdb36[_0x1ea090(0x208)](),_0x3c623e['current']=null;};},[_0xdfd42,_0x379895]);if(!_0x4a50e5)return null;return jsx(Dropdown,{'align':_0x5915e1(0x1bd),'disabled':_0x58567e==='offline','className':_0x5915e1(0x1af),'overlay':jsx(LiveShareDropdown,{'status':_0x58567e,'coordinator':_0x4a50e5}),'children':jsx(_0x5915e1(0x18e),{'className':clsx(_0x5915e1(0x18b),{'univer-cursor-not-allowed':_0x58567e===_0x5915e1(0x1f8),'univer-cursor-pointer\x20hover:univer-bg-gray-400':_0x58567e!=='offline'}),'type':_0x5915e1(0x18e),'children':jsx(LiveShareIcon,{'className':'univer-size-4'})})});}function LiveShareDropdown(_0x581a0f){const _0x3f13f6=_0x43267f,{status:_0x3beb37,coordinator:_0x52fff9}=_0x581a0f;switch(_0x3beb37){case _0x3f13f6(0x1f3):return jsx(Idle,{'coordinator':_0x52fff9});case _0x3f13f6(0x1e2):return jsx(Following,{'coordinator':_0x52fff9});case _0x3f13f6(0x19f):return jsx(NotFollowing,{'coordinator':_0x52fff9});case _0x3f13f6(0x1f8):return jsx(Offline,{});case _0x3f13f6(0x1b7):return jsx(Presenting,{'coordinator':_0x52fff9});default:return null;}}function Idle(_0x24c505){const _0x18e90c=_0x43267f,{coordinator:_0x44c050}=_0x24c505;return jsxs(Fragment,{'children':[jsx(_0x18e90c(0x1a7),{'className':_0x18e90c(0x1c5),'children':_0x18e90c(0x1a5)}),jsx(Button,{'onClick':()=>_0x44c050[_0x18e90c(0x1dd)](),'children':'Start'})]});}function Following(_0x40ab51){const _0x95a466=_0x43267f,{coordinator:_0x3700d7}=_0x40ab51;return jsxs(Fragment,{'children':[jsx(_0x95a466(0x1a7),{'className':_0x95a466(0x1c5),'children':_0x95a466(0x177)}),jsx(Button,{'onClick':()=>_0x3700d7[_0x95a466(0x1ba)](),'children':_0x95a466(0x1b8)})]});}function NotFollowing(_0x1a1126){const _0x7075a8=_0x43267f,{coordinator:_0x43a13a}=_0x1a1126;return jsxs(Fragment,{'children':[jsx('div',{'className':_0x7075a8(0x1c5),'children':'You\x27re\x20not\x20following\x20the\x20presenter'}),jsx(Button,{'variant':'text','onClick':()=>_0x43a13a[_0x7075a8(0x18d)](),'children':_0x7075a8(0x1bb)})]});}function Presenting(_0x211314){const _0x341385=_0x43267f,{coordinator:_0x54a9f1}=_0x211314;return jsxs(Fragment,{'children':[jsx(_0x341385(0x1a7),{'className':'univer-mb-3\x20univer-w-full\x20univer-text-sm','children':'You\x27re\x20presenting\x20the\x20document'}),jsx(Button,{'variant':_0x341385(0x1d3),'onClick':()=>_0x54a9f1['stopPresenting'](),'children':_0x341385(0x19d)})]});}function Offline(){const _0x5dd2da=_0x43267f;return jsx(Fragment,{'children':_0x5dd2da(0x1f6)});}let DesktopLiveShareController=class DesktopLiveShareController extends Disposable{constructor(_0xdf0abc,_0x755738){const _0x1057fa=_0x43267f;super(),this[_0x1057fa(0x1c2)]=_0xdf0abc,this[_0x1057fa(0x1d5)]=_0x755738,this[_0x1057fa(0x1f0)]();}['_mountLiveShare'](){const _0x227705=_0x43267f;this['disposeWithMe'](this[_0x227705(0x1d5)][_0x227705(0x1d4)](BuiltInUIPart[_0x227705(0x1eb)],()=>connectInjector(LiveShare,this[_0x227705(0x1c2)])));}};DesktopLiveShareController=__decorate([__decorateParam(0x0,Inject(Injector)),__decorateParam(0x1,IUIPartsService)],DesktopLiveShareController);var name=_0x43267f(0x1cb),version=_0x43267f(0x186);const LIVE_SHARE_PLUGIN_CONFIG_KEY=_0x43267f(0x1aa),configSymbol=Symbol(LIVE_SHARE_PLUGIN_CONFIG_KEY),defaultPluginConfig={};let LiveShareCoreExtensionsController=class LiveShareCoreExtensionsController extends Disposable{constructor(_0x2ea649){const _0x568715=_0x43267f;super(),this[_0x568715(0x1cc)]=_0x2ea649,this['_init']();}[_0x43267f(0x1e3)](){const _0x6b076e=_0x43267f;[SetZoomRatioOperation['id'],SetScrollOperation['id'],SetWorksheetActiveOperation['id']][_0x6b076e(0x1fc)](_0x59da6f=>{const _0x1f6df7=_0x6b076e;this[_0x1f6df7(0x1b4)](this[_0x1f6df7(0x1cc)]['registerSharedOperation'](_0x59da6f));});}};LiveShareCoreExtensionsController=__decorate([__decorateParam(0x0,Inject(LiveShareService))],LiveShareCoreExtensionsController);let UniverLiveSharePlugin=class UniverLiveSharePlugin extends Plugin{constructor(_0x49a16f=defaultPluginConfig,_0x292932,_0x12bbce){const _0xa6a956=_0x43267f;super(),this[_0xa6a956(0x1c3)]=_0x49a16f,this[_0xa6a956(0x1c2)]=_0x292932,this[_0xa6a956(0x1ec)]=_0x12bbce;const {..._0x173411}=merge({},defaultPluginConfig,this[_0xa6a956(0x1c3)]);this[_0xa6a956(0x1ec)][_0xa6a956(0x1fe)](LIVE_SHARE_PLUGIN_CONFIG_KEY,_0x173411);}[_0x43267f(0x182)](){const _0x1dde58=_0x43267f;registerDependencies(this['_injector'],mergeOverrideWithDependencies([[LiveShareService],[LiveShareController],[LiveShareCoreExtensionsController],[DesktopLiveShareController]],this[_0x1dde58(0x1c3)][_0x1dde58(0x1b0)])),touchDependencies(this[_0x1dde58(0x1c2)],[[LiveShareCoreExtensionsController]]);}[_0x43267f(0x196)](){touchDependencies(this['_injector'],[[DesktopLiveShareController]]);}};_defineProperty(UniverLiveSharePlugin,_0x43267f(0x188),UniverInstanceType[_0x43267f(0x1d9)]),_defineProperty(UniverLiveSharePlugin,_0x43267f(0x18a),'UNIVER_LIVE_SHARE_PLUGIN'),_defineProperty(UniverLiveSharePlugin,_0x43267f(0x189),name),_defineProperty(UniverLiveSharePlugin,'version',version),UniverLiveSharePlugin=__decorate([DependentOn(UniverCollaborationClientPlugin),__decorateParam(0x1,Inject(Injector)),__decorateParam(0x2,IConfigService)],UniverLiveSharePlugin);function _0x6cd2(){const _0x1b33c6=['decorate','_entities','send','getStatus','length','onStarting','add','PRESENTING','getConfig','0.22.1','from','type','packageName','pluginName','univer-border-none\x20univer-text-gray-600\x20univer-outline-none','_handleOffline','startFollowing','button','requireSession','_handleOperation','current','LIVESHARE_OPERATION','80528zMGMbf','_presenter','_handleTerminate','onRendered','getTypeOfUnitAdded$','_handleNewChangeSets','_fetchOperations','find','_beIdle','_status','Stop\x20presenting','executeCommand','not-following','object','map','getOwnPropertyDescriptor','6GCpiuj','getMemberID','Present\x20this\x20document','status$','div','UNIVER_SHEET','memberID','live-share.config','constructor','_reporters','_status$','_stopFollowing','univer-box-border\x20univer-min-w-60\x20univer-bg-gray-900\x20univer-px-4\x20univer-py-3\x20univer-text-gray-900\x20dark:!univer-bg-white\x20dark:!univer-text-white','override','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','symbol','sessionStatus$','disposeWithMe','onCommandExecuted','_collabSessionService','presenting','Stop\x20following','197486zrbRia','stopFollowing','Start\x20following','unit','end','dispose$','data','13VzTpHT','ONLINE','_injector','_config','defineProperty','univer-mb-3\x20univer-w-full\x20univer-text-sm','_collabSession','toPrimitive','prototype','5741336luInEw','registerInitialStateReporter','@univerjs-pro/live-share','_liveShareService','get','dispose','has','LIVESHARE_TERMINATE','_startLiveShareCoordinator','_stopPresenting','default','registerComponent','_uiPartsService','_univerInstanceService','_commandService','_startFollowing','UNIVER_UNKNOWN','getUnitId','registerSharedOperation','string','tryStartPresenting','_unitID','event$','NOT_FOLLOWING','pipe','following','_init','SAME_OPERATION_SHARE_INTERVAL','32865Pimxjy','stringify','sheet','set','getInitialStates','createInstance','HEADER_MENU','_configService','_commandDisposable','getCurrentTypeOfUnit$','function','_mountLiveShare','then','complete','idle','getValue','OFFLINE','You\x27are\x20offline.','OPERATION','offline','9PQLGOB','_sharedOperations','reverse','forEach','init','setConfig','getLiveShareCoordinatorSync','delete','next','values','asObservable','unitId','_startPresenting','215lnipAF','39734574xvxeGL','unsubscribe','getLiveShareCoordinator','6694850nowrcj','subscribe','5409166rRKXbR','You\x27re\x20following\x20the\x20presenter','_handleOnline','_handleNewHost','presenter','parse','params'];_0x6cd2=function(){return _0x1b33c6;};return _0x6cd2();}export{DesktopLiveShareController,LiveShare,LiveShareController,LiveShareCoordinator,LiveShareService,LiveShareStatus,UniverLiveSharePlugin};
|
package/lib/facade.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x577b64=_0xf136;(function(_0x46cd5a,_0x21bfaf){const _0x17b415=_0xf136,_0x33e13b=_0x46cd5a();while(!![]){try{const _0x5092aa=-parseInt(_0x17b415(0x82))/0x1+-parseInt(_0x17b415(0x8c))/0x2+-parseInt(_0x17b415(0x87))/0x3+parseInt(_0x17b415(0x90))/0x4+parseInt(_0x17b415(0xa1))/0x5*(-parseInt(_0x17b415(0x89))/0x6)+-parseInt(_0x17b415(0x97))/0x7*(parseInt(_0x17b415(0x8a))/0x8)+parseInt(_0x17b415(0x9a))/0x9;if(_0x5092aa===_0x21bfaf)break;else _0x33e13b['push'](_0x33e13b['shift']());}catch(_0x9b5a7a){_0x33e13b['push'](_0x33e13b['shift']());}}}(_0x41b2,0xd6974));import{LiveShareController,LiveShareStatus}from'@univerjs-pro/live-share';import{IUniverInstanceService,UniverInstanceType}from'@univerjs/core';import{FEnum,FUniver}from'@univerjs/core/facade';function _typeof(_0x3db5b9){'@babel/helpers - typeof';const _0x2b1c78=_0xf136;return _typeof='function'==typeof Symbol&&_0x2b1c78(0x9e)==typeof Symbol[_0x2b1c78(0x98)]?function(_0x2d5db4){return typeof _0x2d5db4;}:function(_0x294f45){const _0x2cb417=_0x2b1c78;return _0x294f45&&_0x2cb417(0x7f)==typeof Symbol&&_0x294f45[_0x2cb417(0x80)]===Symbol&&_0x294f45!==Symbol[_0x2cb417(0x8e)]?_0x2cb417(0x9e):typeof _0x294f45;},_typeof(_0x3db5b9);}function toPrimitive(_0x3e4268,_0x2b9c64){const _0x5d395e=_0xf136;if(_0x5d395e(0x91)!=_typeof(_0x3e4268)||!_0x3e4268)return _0x3e4268;var _0x2dd354=_0x3e4268[Symbol[_0x5d395e(0x94)]];if(void 0x0!==_0x2dd354){var _0x59fb6d=_0x2dd354[_0x5d395e(0xa3)](_0x3e4268,_0x2b9c64||'default');if(_0x5d395e(0x91)!=_typeof(_0x59fb6d))return _0x59fb6d;throw new TypeError(_0x5d395e(0x84));}return('string'===_0x2b9c64?String:Number)(_0x3e4268);}function _0x41b2(){const _0x1d9a57=['symbol','No\x20LiveShareCoordinator\x20found\x20for\x20the\x20active\x20workbook.','string','20iiGveK','UNIVER_SHEET','call','getUnitId','function','constructor','defineProperty','547729HaKvwp','getLiveShareCoordinatorSync','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','_injector','stopFollowing','3961062CioUAF','startPresenting','1731954zcQuTx','8BHJzKD','getLiveShareStatus','3240926pYVZbE','extend','prototype','stopPresenting','3379260ZlStYZ','object','_initialize','IDLE','toPrimitive','getStatus','No\x20active\x20workbook\x20found.','6861967gcYEkU','iterator','getCurrentUnitOfType','50918508JEHzGd','get','LiveShareStatusEnum','_liveShareController'];_0x41b2=function(){return _0x1d9a57;};return _0x41b2();}function toPropertyKey(_0x5aa7d8){const _0x42a5a0=_0xf136;var _0x1e208f=toPrimitive(_0x5aa7d8,_0x42a5a0(0xa0));return _0x42a5a0(0x9e)==_typeof(_0x1e208f)?_0x1e208f:_0x1e208f+'';}function _defineProperty(_0x358782,_0x35db95,_0x404bd5){const _0x6aed92=_0xf136;return(_0x35db95=toPropertyKey(_0x35db95))in _0x358782?Object[_0x6aed92(0x81)](_0x358782,_0x35db95,{'value':_0x404bd5,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x358782[_0x35db95]=_0x404bd5,_0x358782;}function _0xf136(_0x59d746,_0x1fbe78){_0x59d746=_0x59d746-0x7f;const _0x41b252=_0x41b2();let _0xf13608=_0x41b252[_0x59d746];return _0xf13608;}var FUniverLiveShareMixin=class extends FUniver{constructor(..._0x6baefb){const _0x11174f=_0xf136;super(..._0x6baefb),_defineProperty(this,_0x11174f(0x9d),void 0x0);}[_0x577b64(0x92)](_0x34d99c){const _0x3697f3=_0x577b64;this['_liveShareController']=_0x34d99c[_0x3697f3(0x9b)](LiveShareController);}[_0x577b64(0x8b)](){const _0x1fa16d=_0x577b64;var _0x3ba970;const _0x14a02d=this['_injector'][_0x1fa16d(0x9b)](IUniverInstanceService)[_0x1fa16d(0x99)](UniverInstanceType[_0x1fa16d(0xa2)]);if(!_0x14a02d)throw new Error(_0x1fa16d(0x96));const _0x566689=_0x14a02d[_0x1fa16d(0xa4)](),_0x1583e3=this[_0x1fa16d(0x9d)][_0x1fa16d(0x83)](_0x566689);return(_0x3ba970=_0x1583e3===null||_0x1583e3===void 0x0?void 0x0:_0x1583e3[_0x1fa16d(0x95)]())!==null&&_0x3ba970!==void 0x0?_0x3ba970:LiveShareStatus[_0x1fa16d(0x93)];}['startFollowing'](){const _0x481ffc=_0x577b64,_0x4ab63c=this[_0x481ffc(0x85)][_0x481ffc(0x9b)](IUniverInstanceService)[_0x481ffc(0x99)](UniverInstanceType['UNIVER_SHEET']);if(!_0x4ab63c)throw new Error('No\x20active\x20workbook\x20found.');const _0x5f35f5=_0x4ab63c['getUnitId'](),_0x2ce582=this['_liveShareController'][_0x481ffc(0x83)](_0x5f35f5);if(!_0x2ce582)throw new Error(_0x481ffc(0x9f));_0x2ce582['startFollowing']();}[_0x577b64(0x86)](){const _0x38ea3f=_0x577b64,_0x1fba28=this['_injector'][_0x38ea3f(0x9b)](IUniverInstanceService)['getCurrentUnitOfType'](UniverInstanceType['UNIVER_SHEET']);if(!_0x1fba28)throw new Error(_0x38ea3f(0x96));const _0x3c3cd3=_0x1fba28[_0x38ea3f(0xa4)](),_0x4b464e=this[_0x38ea3f(0x9d)][_0x38ea3f(0x83)](_0x3c3cd3);if(!_0x4b464e)throw new Error('No\x20LiveShareCoordinator\x20found\x20for\x20the\x20active\x20workbook.');_0x4b464e[_0x38ea3f(0x86)]();}[_0x577b64(0x88)](){const _0x4e3fe0=_0x577b64,_0x195cde=this['_injector'][_0x4e3fe0(0x9b)](IUniverInstanceService)[_0x4e3fe0(0x99)](UniverInstanceType[_0x4e3fe0(0xa2)]);if(!_0x195cde)throw new Error(_0x4e3fe0(0x96));const _0x3eb104=_0x195cde[_0x4e3fe0(0xa4)](),_0x270dd9=this[_0x4e3fe0(0x9d)]['getLiveShareCoordinatorSync'](_0x3eb104);if(!_0x270dd9)throw new Error(_0x4e3fe0(0x9f));_0x270dd9['tryStartPresenting']();}[_0x577b64(0x8f)](){const _0x2f4ac1=_0x577b64,_0x1eaea7=this['_injector'][_0x2f4ac1(0x9b)](IUniverInstanceService)[_0x2f4ac1(0x99)](UniverInstanceType['UNIVER_SHEET']);if(!_0x1eaea7)throw new Error(_0x2f4ac1(0x96));const _0x51a18f=_0x1eaea7['getUnitId'](),_0x1b2366=this[_0x2f4ac1(0x9d)][_0x2f4ac1(0x83)](_0x51a18f);if(!_0x1b2366)throw new Error('No\x20LiveShareCoordinator\x20found\x20for\x20the\x20active\x20workbook.');_0x1b2366['stopPresenting']();}};FUniver['extend'](FUniverLiveShareMixin);var FLiveShareEnumMixin=class extends FEnum{get[_0x577b64(0x9c)](){return LiveShareStatus;}};FEnum[_0x577b64(0x8d)](FLiveShareEnumMixin);export{};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x5be165=_0x4fca;(function(_0x4a7376,_0x11a968){const _0x59ce72=_0x4fca,_0x27e75f=_0x4a7376();while(!![]){try{const _0x1d80b8=parseInt(_0x59ce72(0x1ec))/0x1+-parseInt(_0x59ce72(0x214))/0x2+-parseInt(_0x59ce72(0x20b))/0x3+-parseInt(_0x59ce72(0x203))/0x4+parseInt(_0x59ce72(0x1c8))/0x5+parseInt(_0x59ce72(0x1f9))/0x6+parseInt(_0x59ce72(0x1e7))/0x7;if(_0x1d80b8===_0x11a968)break;else _0x27e75f['push'](_0x27e75f['shift']());}catch(_0x1b0f87){_0x27e75f['push'](_0x27e75f['shift']());}}}(_0x59c0,0xa5efb));import{CommandType,DependentOn,Disposable,DisposableCollection,ICommandService,IConfigService,IUniverInstanceService,Inject,Injector,Plugin,RxDisposable,UniverInstanceType,merge,mergeOverrideWithDependencies,registerDependencies,toDisposable,touchDependencies}from'@univerjs/core';function _0x59c0(){const _0x24f3da=['_init','status$','_status$','then','div','_status','presenting','operations','stopFollowing','0.22.0','_univerInstanceService','UNIVER_UNKNOWN','constructor','PRESENTING','LIVESHARE_FETCH_OPERATIONS','dispose','getStatus','getConfig','_beIdle','@univerjs-pro/live-share','getLiveShareCoordinatorSync','LIVESHARE_TERMINATE','getValue','stopPresenting','IDLE','override','onStarting','1985945xWNIsI','_collabSession','get','Stop\x20presenting','delete','end','OPERATION','init','following','tryStartPresenting','symbol','packageName','_startLiveShareCoordinator','getMemberID','length','not-following','event$','clear','values','decorate','map','params','getOwnPropertyDescriptor','onRendered','mutations','_handleTerminate','offline','unit','_liveShareService','presenter','registerInitialStateReporter','2792454pqEcjw','pipe','FOLLOWING','object','_handleNewChangeSets','1159722cHCnst','_collabSessionService','NOT_FOLLOWING','from','_config','You\x27re\x20following\x20the\x20presenter','_handleOnline','_commandDisposable','data','executeCommand','has','_handleOperation','univer-box-border\x20univer-min-w-60\x20univer-bg-gray-900\x20univer-px-4\x20univer-py-3\x20univer-text-gray-900\x20dark:!univer-bg-white\x20dark:!univer-text-white','5970798DiXtyo','_presenter','live-share.config','registerComponent','NEW_CHANGESETS','_entities','reverse','UNIVER_SHEET','setConfig','Present\x20this\x20document','3102720zCJjmE','_stopFollowing','LIVESHARE_REQUEST_HOST','disposeWithMe','_uiPartsService','createInstance','shouldShareOperation','current','2748324AabLPn','Start','includes','_startPresenting','next','default','send','forEach','dispose$','1159006lVNGJb','sheet','_handleOffline','stringify','univer-mb-3\x20univer-w-full\x20univer-text-sm','getTypeOfUnitDisposed$','getUnitId','_injector','UNIVER_LIVE_SHARE_PLUGIN','memberID','getInitialStates','Stop\x20following','_startFollowing','complete','requireSession','Start\x20following','startFollowing','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','function','_handleNewHost','registerSharedOperation','You\x27are\x20offline.','add','find','_sharedOperations','SAME_OPERATION_SHARE_INTERVAL','_mountLiveShare','text','toPrimitive','_unitID','getLiveShareCoordinator','idle','OFFLINE','_reporters','unitId','pluginName','type','defineProperty','subscribe','version','unsubscribe','univer-size-4','button','getTypeOfUnitAdded$','HEADER_MENU','_commandService','_configService','getCurrentTypeOfUnit$','string','onCommandExecuted','You\x27re\x20presenting\x20the\x20document'];_0x59c0=function(){return _0x24f3da;};return _0x59c0();}import{BuiltInUIPart,IUIPartsService,connectInjector,useDependency,useObservable}from'@univerjs/ui';import{Button,Dropdown,clsx}from'@univerjs/design';import{LiveShareIcon}from'@univerjs/icons';import{useEffect,useRef,useState}from'react';import{CollaborationEvent,parseProtocolChangeset}from'@univerjs-pro/collaboration';import{CollaborationSessionService,SessionStatus,UniverCollaborationClientPlugin}from'@univerjs-pro/collaboration-client';import{InsertSheetMutation,SetWorksheetActiveOperation}from'@univerjs/sheets';import{BehaviorSubject,Subject}from'rxjs';import{takeUntil,throttleTime}from'rxjs/operators';import{Fragment,jsx,jsxs}from'react/jsx-runtime';import{SetScrollOperation,SetZoomRatioOperation}from'@univerjs/sheets-ui';function _typeof(_0x287f77){'@babel/helpers - typeof';const _0x31c33d=_0x4fca;return _typeof=_0x31c33d(0x226)==typeof Symbol&&_0x31c33d(0x1d2)==typeof Symbol['iterator']?function(_0x4f48ec){return typeof _0x4f48ec;}:function(_0x15e04f){const _0x125810=_0x31c33d;return _0x15e04f&&_0x125810(0x226)==typeof Symbol&&_0x15e04f[_0x125810(0x253)]===Symbol&&_0x15e04f!==Symbol['prototype']?_0x125810(0x1d2):typeof _0x15e04f;},_typeof(_0x287f77);}function toPrimitive(_0x281270,_0x5ab4b5){const _0x3e020f=_0x4fca;if('object'!=_typeof(_0x281270)||!_0x281270)return _0x281270;var _0x4de7cd=_0x281270[Symbol[_0x3e020f(0x230)]];if(void 0x0!==_0x4de7cd){var _0x995c2=_0x4de7cd['call'](_0x281270,_0x5ab4b5||_0x3e020f(0x210));if(_0x3e020f(0x1ea)!=_typeof(_0x995c2))return _0x995c2;throw new TypeError(_0x3e020f(0x225));}return(_0x3e020f(0x244)===_0x5ab4b5?String:Number)(_0x281270);}function toPropertyKey(_0x263b0e){const _0x3b6256=_0x4fca;var _0x1fd35b=toPrimitive(_0x263b0e,_0x3b6256(0x244));return'symbol'==_typeof(_0x1fd35b)?_0x1fd35b:_0x1fd35b+'';}function _defineProperty(_0x8dd6d8,_0x1736e8,_0x4bf663){const _0x506b26=_0x4fca;return(_0x1736e8=toPropertyKey(_0x1736e8))in _0x8dd6d8?Object[_0x506b26(0x239)](_0x8dd6d8,_0x1736e8,{'value':_0x4bf663,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x8dd6d8[_0x1736e8]=_0x4bf663,_0x8dd6d8;}var LiveShareService=class extends Disposable{constructor(..._0x369656){const _0x5cc742=_0x4fca;super(..._0x369656),_defineProperty(this,_0x5cc742(0x22c),new Set()),_defineProperty(this,_0x5cc742(0x235),new Set());}[_0x5be165(0x228)](_0x11ad02){const _0xf471ac=_0x5be165;return this[_0xf471ac(0x22c)][_0xf471ac(0x22a)](_0x11ad02),toDisposable(()=>this[_0xf471ac(0x22c)][_0xf471ac(0x1cc)](_0x11ad02));}[_0x5be165(0x1e6)](_0x39eca0){const _0x3ab20b=_0x5be165;return this[_0x3ab20b(0x235)][_0x3ab20b(0x22a)](_0x39eca0),toDisposable(()=>this[_0x3ab20b(0x235)][_0x3ab20b(0x1cc)](_0x39eca0));}[_0x5be165(0x209)](_0x38ccf6){const _0x5a1352=_0x5be165;return this['_sharedOperations'][_0x5a1352(0x1f6)](_0x38ccf6);}[_0x5be165(0x21e)](_0x3e376a){const _0x22340c=_0x5be165;return Array[_0x22340c(0x1ef)](this['_reporters'])[_0x22340c(0x1dc)](_0x287b0b=>_0x287b0b(_0x3e376a));}};function __decorateParam(_0x4070a8,_0x22e655){return function(_0x19361b,_0x22e499){_0x22e655(_0x19361b,_0x22e499,_0x4070a8);};}function __decorate(_0x5d0e82,_0x36becb,_0x1c56fc,_0x21a6cb){const _0x207949=_0x5be165;var _0x17c06d=arguments[_0x207949(0x1d6)],_0x45b5cf=_0x17c06d<0x3?_0x36becb:_0x21a6cb===null?_0x21a6cb=Object[_0x207949(0x1de)](_0x36becb,_0x1c56fc):_0x21a6cb,_0x2b6837;if(typeof Reflect===_0x207949(0x1ea)&&typeof Reflect[_0x207949(0x1db)]==='function')_0x45b5cf=Reflect['decorate'](_0x5d0e82,_0x36becb,_0x1c56fc,_0x21a6cb);else{for(var _0x331844=_0x5d0e82[_0x207949(0x1d6)]-0x1;_0x331844>=0x0;_0x331844--)if(_0x2b6837=_0x5d0e82[_0x331844])_0x45b5cf=(_0x17c06d<0x3?_0x2b6837(_0x45b5cf):_0x17c06d>0x3?_0x2b6837(_0x36becb,_0x1c56fc,_0x45b5cf):_0x2b6837(_0x36becb,_0x1c56fc))||_0x45b5cf;}return _0x17c06d>0x3&&_0x45b5cf&&Object[_0x207949(0x239)](_0x36becb,_0x1c56fc,_0x45b5cf),_0x45b5cf;}let LiveShareController=class LiveShareController extends RxDisposable{constructor(_0x3748fe,_0x252440,_0x1d5cd4){const _0x1dbd1a=_0x5be165;super(),this['_univerInstanceService']=_0x3748fe,this[_0x1dbd1a(0x21b)]=_0x252440,this[_0x1dbd1a(0x1ed)]=_0x1d5cd4,_defineProperty(this,_0x1dbd1a(0x1fe),new Map()),this[_0x1dbd1a(0x247)]();}async['getLiveShareCoordinator'](_0x471f7a){const _0x1d1c09=_0x5be165;if(!this['_entities'][_0x1d1c09(0x1f6)](_0x471f7a))await this[_0x1d1c09(0x1d4)](_0x471f7a);return this[_0x1d1c09(0x1fe)][_0x1d1c09(0x1ca)](_0x471f7a);}[_0x5be165(0x1c1)](_0x38ec36){const _0x523381=_0x5be165;var _0x26d35f;return(_0x26d35f=this['_entities'][_0x523381(0x1ca)](_0x38ec36))!==null&&_0x26d35f!==void 0x0?_0x26d35f:null;}[_0x5be165(0x247)](){const _0x8e82bb=_0x5be165;this['_univerInstanceService'][_0x8e82bb(0x23f)](UniverInstanceType[_0x8e82bb(0x200)])[_0x8e82bb(0x1e8)](takeUntil(this['dispose$']))[_0x8e82bb(0x23a)](async _0x1096b1=>{const _0x3bb56a=_0x8e82bb,_0x56eca7=_0x1096b1[_0x3bb56a(0x1e3)][_0x3bb56a(0x21a)]();if(this[_0x3bb56a(0x1fe)]['has'](_0x56eca7))return;this[_0x3bb56a(0x1d4)](_0x56eca7);}),this[_0x8e82bb(0x251)][_0x8e82bb(0x219)](UniverInstanceType['UNIVER_SHEET'])[_0x8e82bb(0x1e8)](takeUntil(this['dispose$']))[_0x8e82bb(0x23a)](_0x1e2faf=>{const _0xea3819=_0x8e82bb,_0x27229a=_0x1e2faf['getUnitId'](),_0x180433=this[_0xea3819(0x1fe)][_0xea3819(0x1ca)](_0x27229a);_0x180433===null||_0x180433===void 0x0||_0x180433['dispose']();});}async['_startLiveShareCoordinator'](_0x2129dd){const _0x444357=_0x5be165,_0x1d4e35=await this['_collabSessionService'][_0x444357(0x222)](_0x2129dd),_0xb30aa=this['_injector'][_0x444357(0x208)](LiveShareCoordinator,_0x2129dd,_0x1d4e35);return _0xb30aa[_0x444357(0x1cf)](),this['_entities']['set'](_0x2129dd,_0xb30aa),_0xb30aa;}};LiveShareController=__decorate([__decorateParam(0x0,IUniverInstanceService),__decorateParam(0x1,Inject(Injector)),__decorateParam(0x2,Inject(CollaborationSessionService))],LiveShareController);let LiveShareStatus=function(_0x11daed){const _0x55288b=_0x5be165;return _0x11daed[_0x55288b(0x234)]=_0x55288b(0x1e2),_0x11daed[_0x55288b(0x1c5)]=_0x55288b(0x233),_0x11daed[_0x55288b(0x1e9)]='following',_0x11daed[_0x55288b(0x1ee)]='not-following',_0x11daed[_0x55288b(0x254)]=_0x55288b(0x24d),_0x11daed;}({});const SAME_OPERATION_SHARE_INTERVAL_KEY=_0x5be165(0x22d),DEFAULT_SAME_OPERATION_SHARE_INTERVAL=0xc8;let LiveShareCoordinator=class LiveShareCoordinator extends RxDisposable{get[_0x5be165(0x24c)](){const _0x11187a=_0x5be165;return this[_0x11187a(0x249)][_0x11187a(0x1c3)]();}constructor(_0x578a20,_0x128d95,_0x1d6215,_0x4648b3,_0x4ef5d2){const _0x1ffea0=_0x5be165;super(),this[_0x1ffea0(0x231)]=_0x578a20,this[_0x1ffea0(0x1c9)]=_0x128d95,this[_0x1ffea0(0x242)]=_0x1d6215,this['_liveShareService']=_0x4648b3,this['_commandService']=_0x4ef5d2,_defineProperty(this,'_status$',new BehaviorSubject('idle')),_defineProperty(this,_0x1ffea0(0x248),this[_0x1ffea0(0x249)]['asObservable']()),_defineProperty(this,_0x1ffea0(0x247),![]),_defineProperty(this,'_commandDisposable',null),_defineProperty(this,'_presenter',null);}[_0x5be165(0x256)](){const _0x3c7480=_0x5be165;var _0xa4e82c;(_0xa4e82c=this[_0x3c7480(0x1f3)])===null||_0xa4e82c===void 0x0||_0xa4e82c[_0x3c7480(0x256)](),this[_0x3c7480(0x249)][_0x3c7480(0x20f)](_0x3c7480(0x233)),this[_0x3c7480(0x249)][_0x3c7480(0x221)]();}[_0x5be165(0x257)](){const _0x1bb4c5=_0x5be165;return this[_0x1bb4c5(0x24c)];}[_0x5be165(0x1cf)](){const _0x29bd97=_0x5be165;if(this['_init'])return;this['_init']=!![],this[_0x29bd97(0x1c9)]['sessionStatus$'][_0x29bd97(0x1e8)](takeUntil(this['dispose$']))[_0x29bd97(0x23a)](_0x2d08c1=>{const _0x38fdf3=_0x29bd97;switch(_0x2d08c1){case SessionStatus[_0x38fdf3(0x234)]:this[_0x38fdf3(0x216)]();break;case SessionStatus['ONLINE']:this[_0x38fdf3(0x1f2)]();break;default:}}),this['_collabSession'][_0x29bd97(0x1d8)][_0x29bd97(0x1e8)](takeUntil(this[_0x29bd97(0x213)]))['subscribe'](_0x25bf34=>{const _0x3ff15a=_0x29bd97,{eventID:_0x4e0894}=_0x25bf34;switch(_0x4e0894){case CollaborationEvent['LIVESHARE_NEW_HOST']:this[_0x3ff15a(0x227)](_0x25bf34);break;case CollaborationEvent['LIVESHARE_OPERATION']:this[_0x3ff15a(0x1f7)](_0x25bf34);break;case CollaborationEvent[_0x3ff15a(0x1c2)]:this[_0x3ff15a(0x1e1)]();break;case CollaborationEvent[_0x3ff15a(0x1fd)]:this[_0x3ff15a(0x1eb)](_0x25bf34);break;default:}});}['tryStartPresenting'](){const _0x1cd8da=_0x5be165;this['_collabSession'][_0x1cd8da(0x211)]({'eventID':CollaborationEvent[_0x1cd8da(0x205)],'data':{'unitID':this[_0x1cd8da(0x231)],'userID':this[_0x1cd8da(0x1c9)][_0x1cd8da(0x1d5)]()}},this['_unitID']);}[_0x5be165(0x1c4)](){const _0x50a298=_0x5be165;this[_0x50a298(0x24c)]==='presenting'&&(this[_0x50a298(0x249)]['next']('idle'),this[_0x50a298(0x1c9)][_0x50a298(0x211)]({'eventID':CollaborationEvent[_0x50a298(0x1c2)],'data':{'unitID':this[_0x50a298(0x231)]}},this['_unitID']));}[_0x5be165(0x224)](){const _0x50d594=_0x5be165;if(this[_0x50d594(0x24c)]!==_0x50d594(0x1d7))return;this[_0x50d594(0x249)]['next']('following'),this[_0x50d594(0x220)]();}[_0x5be165(0x24f)](){const _0x19677c=_0x5be165;if(this[_0x19677c(0x24c)]!==_0x19677c(0x1d0))return;this[_0x19677c(0x204)]();}[_0x5be165(0x227)](_0x531f3e){const _0x4de19e=_0x5be165,{presenter:_0x3e8d38}=_0x531f3e[_0x4de19e(0x1f4)],_0x32469d=this['_collabSession'][_0x4de19e(0x1d5)]();this[_0x4de19e(0x1fa)]=_0x3e8d38;if(_0x3e8d38===_0x32469d)this[_0x4de19e(0x204)](),this[_0x4de19e(0x20e)]();else this[_0x4de19e(0x24c)]!==_0x4de19e(0x1d7)&&(this['_stopPresenting'](),this['_startFollowing']());}['_fetchOperations'](){const _0x37f31a=_0x5be165,_0x577b7c={'eventID':CollaborationEvent[_0x37f31a(0x255)]};this[_0x37f31a(0x1c9)]['send'](_0x577b7c,this[_0x37f31a(0x231)]);}[_0x5be165(0x1e1)](){const _0x464fc1=_0x5be165;this[_0x464fc1(0x1fa)]=null;if(this[_0x464fc1(0x24c)]!=='presenting')this[_0x464fc1(0x1bf)]();}['_handleNewChangeSets'](_0x10fbbc){const _0x21d838=_0x5be165;if(this[_0x21d838(0x24c)]==='following'&&this['_presenter']===_0x10fbbc[_0x21d838(0x1f4)][_0x21d838(0x21d)]){const _0x53ef00=parseProtocolChangeset(_0x10fbbc[_0x21d838(0x1f4)])[_0x21d838(0x1e0)][_0x21d838(0x1ff)]()[_0x21d838(0x22b)](_0x257818=>_0x257818['id']===InsertSheetMutation['id']);if(_0x53ef00){const _0x1aa63=_0x53ef00[_0x21d838(0x1dd)][_0x21d838(0x236)],_0x158abd=_0x53ef00['params'][_0x21d838(0x215)]['id'];setTimeout(()=>{const _0x4ac1f0=_0x21d838;this[_0x4ac1f0(0x241)][_0x4ac1f0(0x1f5)](SetWorksheetActiveOperation['id'],{'unitId':_0x1aa63,'subUnitId':_0x158abd},{'fromCollab':!![]});});}}}[_0x5be165(0x20e)](){const _0x3a82f1=_0x5be165;this['_status$'][_0x3a82f1(0x20f)](_0x3a82f1(0x24d));const _0x3b7e37=new Map(),_0x5a8d91=this[_0x3a82f1(0x1f3)]=new DisposableCollection();_0x5a8d91[_0x3a82f1(0x22a)](toDisposable(()=>{const _0x518d1a=_0x3a82f1;_0x3b7e37[_0x518d1a(0x212)](_0x4e6b97=>_0x4e6b97[_0x518d1a(0x221)]()),_0x3b7e37[_0x518d1a(0x1d9)]();})),_0x5a8d91[_0x3a82f1(0x22a)](this['_commandService'][_0x3a82f1(0x245)](_0x329ecb=>{const _0x4315c6=_0x3a82f1;if(_0x329ecb[_0x4315c6(0x238)]!==CommandType[_0x4315c6(0x1ce)]||!this['_liveShareService']['shouldShareOperation'](_0x329ecb['id']))return;const {id:_0x585d7d}=_0x329ecb;let _0x5d64c6;if(!_0x3b7e37[_0x4315c6(0x1f6)](_0x585d7d)){var _0x4be7a7;_0x5d64c6=new Subject(),_0x3b7e37['set'](_0x585d7d,_0x5d64c6),_0x5d64c6[_0x4315c6(0x1e8)](throttleTime((_0x4be7a7=this[_0x4315c6(0x242)][_0x4315c6(0x1be)](_0x4315c6(0x22d)))!==null&&_0x4be7a7!==void 0x0?_0x4be7a7:DEFAULT_SAME_OPERATION_SHARE_INTERVAL,void 0x0,{'trailing':!![],'leading':!![]}))[_0x4315c6(0x23a)](_0x29a891=>{const _0x31ea28=_0x4315c6;this[_0x31ea28(0x1c9)][_0x31ea28(0x211)]({'eventID':CollaborationEvent['LIVESHARE_OPERATION'],'data':{'unitID':this[_0x31ea28(0x231)],'operations':{[_0x29a891['id']]:{'id':_0x29a891['id'],'params':JSON['stringify'](_0x29a891['params'])}}}},this['_unitID']);});}else _0x5d64c6=_0x3b7e37[_0x4315c6(0x1ca)](_0x585d7d);_0x5d64c6[_0x4315c6(0x20f)](_0x329ecb);})),this[_0x3a82f1(0x1e4)]['getInitialStates'](this[_0x3a82f1(0x231)])[_0x3a82f1(0x212)](_0x3aea65=>this[_0x3a82f1(0x1c9)][_0x3a82f1(0x211)]({'eventID':CollaborationEvent['LIVESHARE_OPERATION'],'data':{'unitID':this['_unitID'],'operations':{[_0x3aea65['id']]:{'id':_0x3aea65['id'],'params':JSON[_0x3a82f1(0x217)](_0x3aea65[_0x3a82f1(0x1dd)])}}}},this[_0x3a82f1(0x231)]));}['_stopPresenting'](){const _0x2e26c7=_0x5be165;var _0x3ff1d7;this['_status$'][_0x2e26c7(0x20f)](_0x2e26c7(0x233)),(_0x3ff1d7=this[_0x2e26c7(0x1f3)])===null||_0x3ff1d7===void 0x0||_0x3ff1d7['dispose'](),this[_0x2e26c7(0x1f3)]=null;}['_startFollowing'](){const _0x4e0b29=_0x5be165;var _0x1b4d30;(_0x1b4d30=this[_0x4e0b29(0x1f3)])===null||_0x1b4d30===void 0x0||_0x1b4d30[_0x4e0b29(0x256)](),this[_0x4e0b29(0x249)][_0x4e0b29(0x20f)](_0x4e0b29(0x1d0));}[_0x5be165(0x1bf)](){const _0x4d3699=_0x5be165;var _0x9f4aac;this['_status$'][_0x4d3699(0x20f)](_0x4d3699(0x233)),(_0x9f4aac=this[_0x4d3699(0x1f3)])===null||_0x9f4aac===void 0x0||_0x9f4aac['dispose'](),this[_0x4d3699(0x1f3)]=null;}[_0x5be165(0x204)](){const _0x321f3c=_0x5be165;var _0x769bb7;this[_0x321f3c(0x249)][_0x321f3c(0x20f)](_0x321f3c(0x1d7)),(_0x769bb7=this['_commandDisposable'])===null||_0x769bb7===void 0x0||_0x769bb7[_0x321f3c(0x256)]();}['_handleOperation'](_0x58666b){const _0x13f377=_0x5be165;if([_0x13f377(0x24d),_0x13f377(0x1d7),_0x13f377(0x1e2)][_0x13f377(0x20d)](this[_0x13f377(0x24c)]))return;if(!_0x58666b[_0x13f377(0x1f4)][_0x13f377(0x1e5)]||_0x58666b[_0x13f377(0x1f4)]['presenter']===this[_0x13f377(0x1c9)]['getMemberID']())return;if(this[_0x13f377(0x24c)]===_0x13f377(0x233))this[_0x13f377(0x220)]();const _0x3017ee=_0x58666b[_0x13f377(0x1f4)][_0x13f377(0x24e)];Object[_0x13f377(0x1da)](_0x3017ee)[_0x13f377(0x212)](_0x344fff=>{const _0x7e2e81=_0x13f377;this[_0x7e2e81(0x241)]['executeCommand'](_0x344fff['id'],_0x344fff[_0x7e2e81(0x1dd)]?JSON['parse'](_0x344fff[_0x7e2e81(0x1dd)]):null,{'fromCollab':!![]});});}['_handleOffline'](){const _0x3f6dc8=_0x5be165;var _0x261b6e;this[_0x3f6dc8(0x249)][_0x3f6dc8(0x20f)](_0x3f6dc8(0x1e2)),(_0x261b6e=this[_0x3f6dc8(0x1f3)])===null||_0x261b6e===void 0x0||_0x261b6e[_0x3f6dc8(0x256)]();}[_0x5be165(0x1f2)](){const _0x2fbf0b=_0x5be165;this[_0x2fbf0b(0x249)]['next'](_0x2fbf0b(0x233)),this['_fetchOperations']();}};LiveShareCoordinator=__decorate([__decorateParam(0x2,IConfigService),__decorateParam(0x3,Inject(LiveShareService)),__decorateParam(0x4,ICommandService)],LiveShareCoordinator);function LiveShare(){const _0x5cf6d9=_0x5be165,_0x31ff37=useDependency(LiveShareController),_0xdd83c5=useDependency(IUniverInstanceService),_0xe64d2=useObservable(()=>_0xdd83c5[_0x5cf6d9(0x243)](UniverInstanceType[_0x5cf6d9(0x200)]),void 0x0,![],[]),[_0x393262,_0x67173d]=useState(null),[_0x48a93d,_0x1b8bf6]=useState(_0x5cf6d9(0x233)),_0x20121d=useRef(null);useEffect(()=>{const _0x138429=_0x5cf6d9;if(_0xe64d2)_0x31ff37[_0x138429(0x232)](_0xe64d2[_0x138429(0x21a)]())[_0x138429(0x24a)](_0x1d6069=>{const _0x51b1fc=_0x138429;_0x67173d(_0x1d6069),_0x20121d[_0x51b1fc(0x20a)]=_0x1d6069[_0x51b1fc(0x248)][_0x51b1fc(0x23a)](_0x58b0c2=>{_0x1b8bf6(_0x58b0c2);});});return()=>{const _0x14b56a=_0x138429;var _0x3b7826;(_0x3b7826=_0x20121d[_0x14b56a(0x20a)])===null||_0x3b7826===void 0x0||_0x3b7826[_0x14b56a(0x23c)](),_0x20121d[_0x14b56a(0x20a)]=null;};},[_0xe64d2,_0x31ff37]);if(!_0x393262)return null;return jsx(Dropdown,{'align':_0x5cf6d9(0x1cd),'disabled':_0x48a93d==='offline','className':_0x5cf6d9(0x1f8),'overlay':jsx(LiveShareDropdown,{'status':_0x48a93d,'coordinator':_0x393262}),'children':jsx(_0x5cf6d9(0x23e),{'className':clsx('univer-border-none\x20univer-text-gray-600\x20univer-outline-none',{'univer-cursor-not-allowed':_0x48a93d===_0x5cf6d9(0x1e2),'univer-cursor-pointer\x20hover:univer-bg-gray-400':_0x48a93d!==_0x5cf6d9(0x1e2)}),'type':'button','children':jsx(LiveShareIcon,{'className':_0x5cf6d9(0x23d)})})});}function LiveShareDropdown(_0x4bf670){const _0x2e39bc=_0x5be165,{status:_0x4b19a7,coordinator:_0x389698}=_0x4bf670;switch(_0x4b19a7){case'idle':return jsx(Idle,{'coordinator':_0x389698});case _0x2e39bc(0x1d0):return jsx(Following,{'coordinator':_0x389698});case _0x2e39bc(0x1d7):return jsx(NotFollowing,{'coordinator':_0x389698});case _0x2e39bc(0x1e2):return jsx(Offline,{});case'presenting':return jsx(Presenting,{'coordinator':_0x389698});default:return null;}}function _0x4fca(_0x53ca86,_0x28f239){_0x53ca86=_0x53ca86-0x1be;const _0x59c08f=_0x59c0();let _0x4fcafb=_0x59c08f[_0x53ca86];return _0x4fcafb;}function Idle(_0x5615f2){const _0x214859=_0x5be165,{coordinator:_0x3f59cb}=_0x5615f2;return jsxs(Fragment,{'children':[jsx('div',{'className':_0x214859(0x218),'children':_0x214859(0x202)}),jsx(Button,{'onClick':()=>_0x3f59cb[_0x214859(0x1d1)](),'children':_0x214859(0x20c)})]});}function Following(_0x535c47){const _0x417415=_0x5be165,{coordinator:_0x5a04d4}=_0x535c47;return jsxs(Fragment,{'children':[jsx(_0x417415(0x24b),{'className':_0x417415(0x218),'children':_0x417415(0x1f1)}),jsx(Button,{'onClick':()=>_0x5a04d4['stopFollowing'](),'children':_0x417415(0x21f)})]});}function NotFollowing(_0x531b8f){const _0xc5e6a0=_0x5be165,{coordinator:_0x5405ae}=_0x531b8f;return jsxs(Fragment,{'children':[jsx(_0xc5e6a0(0x24b),{'className':_0xc5e6a0(0x218),'children':'You\x27re\x20not\x20following\x20the\x20presenter'}),jsx(Button,{'variant':_0xc5e6a0(0x22f),'onClick':()=>_0x5405ae[_0xc5e6a0(0x224)](),'children':_0xc5e6a0(0x223)})]});}function Presenting(_0x2f1771){const _0x27bf36=_0x5be165,{coordinator:_0x5de55d}=_0x2f1771;return jsxs(Fragment,{'children':[jsx(_0x27bf36(0x24b),{'className':_0x27bf36(0x218),'children':_0x27bf36(0x246)}),jsx(Button,{'variant':_0x27bf36(0x210),'onClick':()=>_0x5de55d[_0x27bf36(0x1c4)](),'children':_0x27bf36(0x1cb)})]});}function Offline(){const _0x2122ee=_0x5be165;return jsx(Fragment,{'children':_0x2122ee(0x229)});}let DesktopLiveShareController=class DesktopLiveShareController extends Disposable{constructor(_0x4a6fa8,_0x113278){const _0x56e126=_0x5be165;super(),this[_0x56e126(0x21b)]=_0x4a6fa8,this[_0x56e126(0x207)]=_0x113278,this['_mountLiveShare']();}[_0x5be165(0x22e)](){const _0x23b495=_0x5be165;this['disposeWithMe'](this['_uiPartsService'][_0x23b495(0x1fc)](BuiltInUIPart[_0x23b495(0x240)],()=>connectInjector(LiveShare,this[_0x23b495(0x21b)])));}};DesktopLiveShareController=__decorate([__decorateParam(0x0,Inject(Injector)),__decorateParam(0x1,IUIPartsService)],DesktopLiveShareController);var name=_0x5be165(0x1c0),version=_0x5be165(0x250);const LIVE_SHARE_PLUGIN_CONFIG_KEY=_0x5be165(0x1fb),configSymbol=Symbol(LIVE_SHARE_PLUGIN_CONFIG_KEY),defaultPluginConfig={};let LiveShareCoreExtensionsController=class LiveShareCoreExtensionsController extends Disposable{constructor(_0x57fc86){const _0x2992b9=_0x5be165;super(),this[_0x2992b9(0x1e4)]=_0x57fc86,this[_0x2992b9(0x247)]();}[_0x5be165(0x247)](){const _0x2ba892=_0x5be165;[SetZoomRatioOperation['id'],SetScrollOperation['id'],SetWorksheetActiveOperation['id']][_0x2ba892(0x212)](_0x483e55=>{const _0x24a2b6=_0x2ba892;this[_0x24a2b6(0x206)](this['_liveShareService']['registerSharedOperation'](_0x483e55));});}};LiveShareCoreExtensionsController=__decorate([__decorateParam(0x0,Inject(LiveShareService))],LiveShareCoreExtensionsController);let UniverLiveSharePlugin=class UniverLiveSharePlugin extends Plugin{constructor(_0x78ca72=defaultPluginConfig,_0x317b09,_0xd14575){const _0x116bbf=_0x5be165;super(),this[_0x116bbf(0x1f0)]=_0x78ca72,this[_0x116bbf(0x21b)]=_0x317b09,this[_0x116bbf(0x242)]=_0xd14575;const {..._0x2e998a}=merge({},defaultPluginConfig,this[_0x116bbf(0x1f0)]);this[_0x116bbf(0x242)][_0x116bbf(0x201)](LIVE_SHARE_PLUGIN_CONFIG_KEY,_0x2e998a);}[_0x5be165(0x1c7)](){const _0x4984fb=_0x5be165;registerDependencies(this[_0x4984fb(0x21b)],mergeOverrideWithDependencies([[LiveShareService],[LiveShareController],[LiveShareCoreExtensionsController],[DesktopLiveShareController]],this[_0x4984fb(0x1f0)][_0x4984fb(0x1c6)])),touchDependencies(this[_0x4984fb(0x21b)],[[LiveShareCoreExtensionsController]]);}[_0x5be165(0x1df)](){touchDependencies(this['_injector'],[[DesktopLiveShareController]]);}};_defineProperty(UniverLiveSharePlugin,_0x5be165(0x238),UniverInstanceType[_0x5be165(0x252)]),_defineProperty(UniverLiveSharePlugin,_0x5be165(0x237),_0x5be165(0x21c)),_defineProperty(UniverLiveSharePlugin,_0x5be165(0x1d3),name),_defineProperty(UniverLiveSharePlugin,_0x5be165(0x23b),version),UniverLiveSharePlugin=__decorate([DependentOn(UniverCollaborationClientPlugin),__decorateParam(0x1,Inject(Injector)),__decorateParam(0x2,IConfigService)],UniverLiveSharePlugin);export{DesktopLiveShareController,LiveShare,LiveShareController,LiveShareCoordinator,LiveShareService,LiveShareStatus,UniverLiveSharePlugin};
|
|
1
|
+
const _0x43267f=_0x5e07;(function(_0x1f2c2c,_0x43cf11){const _0x53af28=_0x5e07,_0x3f8716=_0x1f2c2c();while(!![]){try{const _0x23ce05=-parseInt(_0x53af28(0x1c0))/0x1*(parseInt(_0x53af28(0x1b9))/0x2)+-parseInt(_0x53af28(0x1e5))/0x3+-parseInt(_0x53af28(0x193))/0x4*(parseInt(_0x53af28(0x206))/0x5)+parseInt(_0x53af28(0x1a3))/0x6*(-parseInt(_0x53af28(0x20c))/0x7)+parseInt(_0x53af28(0x1c9))/0x8*(parseInt(_0x53af28(0x1f9))/0x9)+-parseInt(_0x53af28(0x20a))/0xa+parseInt(_0x53af28(0x207))/0xb;if(_0x23ce05===_0x43cf11)break;else _0x3f8716['push'](_0x3f8716['shift']());}catch(_0x569f30){_0x3f8716['push'](_0x3f8716['shift']());}}}(_0x6cd2,0xb195c));import{CommandType,DependentOn,Disposable,DisposableCollection,ICommandService,IConfigService,IUniverInstanceService,Inject,Injector,Plugin,RxDisposable,UniverInstanceType,merge,mergeOverrideWithDependencies,registerDependencies,toDisposable,touchDependencies}from'@univerjs/core';import{BuiltInUIPart,IUIPartsService,connectInjector,useDependency,useObservable}from'@univerjs/ui';import{Button,Dropdown,clsx}from'@univerjs/design';import{LiveShareIcon}from'@univerjs/icons';import{useEffect,useRef,useState}from'react';import{CollaborationEvent,parseProtocolChangeset}from'@univerjs-pro/collaboration';import{CollaborationSessionService,SessionStatus,UniverCollaborationClientPlugin}from'@univerjs-pro/collaboration-client';import{InsertSheetMutation,SetWorksheetActiveOperation}from'@univerjs/sheets';import{BehaviorSubject,Subject}from'rxjs';import{takeUntil,throttleTime}from'rxjs/operators';import{Fragment,jsx,jsxs}from'react/jsx-runtime';import{SetScrollOperation,SetZoomRatioOperation}from'@univerjs/sheets-ui';function _typeof(_0x3259cf){'@babel/helpers - typeof';const _0x52bde7=_0x5e07;return _typeof='function'==typeof Symbol&&_0x52bde7(0x1b2)==typeof Symbol['iterator']?function(_0x4e48fe){return typeof _0x4e48fe;}:function(_0x412a12){const _0x464e5c=_0x52bde7;return _0x412a12&&_0x464e5c(0x1ef)==typeof Symbol&&_0x412a12[_0x464e5c(0x1ab)]===Symbol&&_0x412a12!==Symbol[_0x464e5c(0x1c8)]?_0x464e5c(0x1b2):typeof _0x412a12;},_typeof(_0x3259cf);}function toPrimitive(_0x2cd61c,_0x9056d2){const _0x4b4caf=_0x5e07;if(_0x4b4caf(0x1a0)!=_typeof(_0x2cd61c)||!_0x2cd61c)return _0x2cd61c;var _0x43a311=_0x2cd61c[Symbol[_0x4b4caf(0x1c7)]];if(void 0x0!==_0x43a311){var _0x24d425=_0x43a311['call'](_0x2cd61c,_0x9056d2||_0x4b4caf(0x1d3));if(_0x4b4caf(0x1a0)!=_typeof(_0x24d425))return _0x24d425;throw new TypeError(_0x4b4caf(0x1b1));}return(_0x4b4caf(0x1dc)===_0x9056d2?String:Number)(_0x2cd61c);}function toPropertyKey(_0x1346e8){const _0x388902=_0x5e07;var _0x329a8e=toPrimitive(_0x1346e8,_0x388902(0x1dc));return _0x388902(0x1b2)==_typeof(_0x329a8e)?_0x329a8e:_0x329a8e+'';}function _defineProperty(_0x193b00,_0xb67046,_0x1a790f){const _0x585e14=_0x5e07;return(_0xb67046=toPropertyKey(_0xb67046))in _0x193b00?Object[_0x585e14(0x1c4)](_0x193b00,_0xb67046,{'value':_0x1a790f,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x193b00[_0xb67046]=_0x1a790f,_0x193b00;}var LiveShareService=class extends Disposable{constructor(..._0x279850){const _0x34bfc2=_0x5e07;super(..._0x279850),_defineProperty(this,_0x34bfc2(0x1fa),new Set()),_defineProperty(this,_0x34bfc2(0x1ac),new Set());}[_0x43267f(0x1db)](_0x781920){const _0xac4616=_0x43267f;return this[_0xac4616(0x1fa)]['add'](_0x781920),toDisposable(()=>this['_sharedOperations'][_0xac4616(0x200)](_0x781920));}[_0x43267f(0x1ca)](_0x46d0fc){const _0x4c5160=_0x43267f;return this[_0x4c5160(0x1ac)][_0x4c5160(0x183)](_0x46d0fc),toDisposable(()=>this['_reporters'][_0x4c5160(0x200)](_0x46d0fc));}['shouldShareOperation'](_0x1f1729){const _0x5fc19=_0x43267f;return this[_0x5fc19(0x1fa)]['has'](_0x1f1729);}[_0x43267f(0x1e9)](_0x4d618e){const _0x3a63b5=_0x43267f;return Array[_0x3a63b5(0x187)](this['_reporters'])[_0x3a63b5(0x1a1)](_0x1bc215=>_0x1bc215(_0x4d618e));}};function _0x5e07(_0x3ab236,_0x4100de){_0x3ab236=_0x3ab236-0x177;const _0x6cd26f=_0x6cd2();let _0x5e07a5=_0x6cd26f[_0x3ab236];return _0x5e07a5;}function __decorateParam(_0x4e9fe7,_0x33be22){return function(_0x9d2488,_0x3a7382){_0x33be22(_0x9d2488,_0x3a7382,_0x4e9fe7);};}function __decorate(_0x29fa24,_0x53b74c,_0x1efd38,_0x3358b6){const _0x556cb7=_0x43267f;var _0x3bdeb6=arguments[_0x556cb7(0x181)],_0x1872a2=_0x3bdeb6<0x3?_0x53b74c:_0x3358b6===null?_0x3358b6=Object[_0x556cb7(0x1a2)](_0x53b74c,_0x1efd38):_0x3358b6,_0x25103d;if(typeof Reflect===_0x556cb7(0x1a0)&&typeof Reflect[_0x556cb7(0x17d)]===_0x556cb7(0x1ef))_0x1872a2=Reflect[_0x556cb7(0x17d)](_0x29fa24,_0x53b74c,_0x1efd38,_0x3358b6);else{for(var _0x1d2318=_0x29fa24['length']-0x1;_0x1d2318>=0x0;_0x1d2318--)if(_0x25103d=_0x29fa24[_0x1d2318])_0x1872a2=(_0x3bdeb6<0x3?_0x25103d(_0x1872a2):_0x3bdeb6>0x3?_0x25103d(_0x53b74c,_0x1efd38,_0x1872a2):_0x25103d(_0x53b74c,_0x1efd38))||_0x1872a2;}return _0x3bdeb6>0x3&&_0x1872a2&&Object[_0x556cb7(0x1c4)](_0x53b74c,_0x1efd38,_0x1872a2),_0x1872a2;}let LiveShareController=class LiveShareController extends RxDisposable{constructor(_0x2140b2,_0x3fc587,_0x584ca4){const _0xaea04=_0x43267f;super(),this[_0xaea04(0x1d6)]=_0x2140b2,this['_injector']=_0x3fc587,this[_0xaea04(0x1b6)]=_0x584ca4,_defineProperty(this,'_entities',new Map()),this[_0xaea04(0x1e3)]();}async[_0x43267f(0x209)](_0x18a67d){const _0x32d49a=_0x43267f;if(!this[_0x32d49a(0x17e)][_0x32d49a(0x1cf)](_0x18a67d))await this[_0x32d49a(0x1d1)](_0x18a67d);return this[_0x32d49a(0x17e)]['get'](_0x18a67d);}[_0x43267f(0x1ff)](_0x46286e){const _0x73143b=_0x43267f;var _0x14b673;return(_0x14b673=this[_0x73143b(0x17e)][_0x73143b(0x1cd)](_0x46286e))!==null&&_0x14b673!==void 0x0?_0x14b673:null;}[_0x43267f(0x1e3)](){const _0x5c8079=_0x43267f;this[_0x5c8079(0x1d6)][_0x5c8079(0x197)](UniverInstanceType[_0x5c8079(0x1a8)])['pipe'](takeUntil(this[_0x5c8079(0x1be)]))[_0x5c8079(0x20b)](async _0x4e889a=>{const _0x46f815=_0x5c8079,_0x4cea86=_0x4e889a[_0x46f815(0x1bc)][_0x46f815(0x1da)]();if(this[_0x46f815(0x17e)][_0x46f815(0x1cf)](_0x4cea86))return;this[_0x46f815(0x1d1)](_0x4cea86);}),this[_0x5c8079(0x1d6)]['getTypeOfUnitDisposed$'](UniverInstanceType[_0x5c8079(0x1a8)])[_0x5c8079(0x1e1)](takeUntil(this['dispose$']))[_0x5c8079(0x20b)](_0x56517c=>{const _0x1d0d8f=_0x5c8079,_0x597160=_0x56517c[_0x1d0d8f(0x1da)](),_0x257bfe=this['_entities'][_0x1d0d8f(0x1cd)](_0x597160);_0x257bfe===null||_0x257bfe===void 0x0||_0x257bfe[_0x1d0d8f(0x1ce)]();});}async[_0x43267f(0x1d1)](_0x1f7800){const _0x3c87d7=_0x43267f,_0x31bdd=await this['_collabSessionService'][_0x3c87d7(0x18f)](_0x1f7800),_0x17abb8=this[_0x3c87d7(0x1c2)][_0x3c87d7(0x1ea)](LiveShareCoordinator,_0x1f7800,_0x31bdd);return _0x17abb8[_0x3c87d7(0x1fd)](),this[_0x3c87d7(0x17e)][_0x3c87d7(0x1e8)](_0x1f7800,_0x17abb8),_0x17abb8;}};LiveShareController=__decorate([__decorateParam(0x0,IUniverInstanceService),__decorateParam(0x1,Inject(Injector)),__decorateParam(0x2,Inject(CollaborationSessionService))],LiveShareController);let LiveShareStatus=function(_0xe4315){const _0x514b6a=_0x43267f;return _0xe4315[_0x514b6a(0x1f5)]='offline',_0xe4315['IDLE']=_0x514b6a(0x1f3),_0xe4315['FOLLOWING']=_0x514b6a(0x1e2),_0xe4315[_0x514b6a(0x1e0)]='not-following',_0xe4315[_0x514b6a(0x184)]=_0x514b6a(0x1b7),_0xe4315;}({});const SAME_OPERATION_SHARE_INTERVAL_KEY=_0x43267f(0x1e4),DEFAULT_SAME_OPERATION_SHARE_INTERVAL=0xc8;let LiveShareCoordinator=class LiveShareCoordinator extends RxDisposable{get[_0x43267f(0x19c)](){const _0x1ce33f=_0x43267f;return this[_0x1ce33f(0x1ad)][_0x1ce33f(0x1f4)]();}constructor(_0x55e21b,_0x40d5b5,_0xde803f,_0x326f17,_0x359f2f){const _0x227f9e=_0x43267f;super(),this[_0x227f9e(0x1de)]=_0x55e21b,this[_0x227f9e(0x1c6)]=_0x40d5b5,this[_0x227f9e(0x1ec)]=_0xde803f,this['_liveShareService']=_0x326f17,this['_commandService']=_0x359f2f,_defineProperty(this,_0x227f9e(0x1ad),new BehaviorSubject(_0x227f9e(0x1f3))),_defineProperty(this,_0x227f9e(0x1a6),this[_0x227f9e(0x1ad)][_0x227f9e(0x203)]()),_defineProperty(this,_0x227f9e(0x1e3),![]),_defineProperty(this,_0x227f9e(0x1ed),null),_defineProperty(this,_0x227f9e(0x194),null);}[_0x43267f(0x1ce)](){const _0x20cfc0=_0x43267f;var _0x57994b;(_0x57994b=this[_0x20cfc0(0x1ed)])===null||_0x57994b===void 0x0||_0x57994b[_0x20cfc0(0x1ce)](),this['_status$'][_0x20cfc0(0x201)](_0x20cfc0(0x1f3)),this[_0x20cfc0(0x1ad)][_0x20cfc0(0x1f2)]();}[_0x43267f(0x180)](){const _0x2a7d48=_0x43267f;return this[_0x2a7d48(0x19c)];}['init'](){const _0x2359c5=_0x43267f;if(this[_0x2359c5(0x1e3)])return;this[_0x2359c5(0x1e3)]=!![],this['_collabSession'][_0x2359c5(0x1b3)][_0x2359c5(0x1e1)](takeUntil(this[_0x2359c5(0x1be)]))[_0x2359c5(0x20b)](_0x5e63bc=>{const _0x327f39=_0x2359c5;switch(_0x5e63bc){case SessionStatus['OFFLINE']:this[_0x327f39(0x18c)]();break;case SessionStatus[_0x327f39(0x1c1)]:this['_handleOnline']();break;default:}}),this[_0x2359c5(0x1c6)][_0x2359c5(0x1df)][_0x2359c5(0x1e1)](takeUntil(this[_0x2359c5(0x1be)]))[_0x2359c5(0x20b)](_0x10d22a=>{const _0x57b989=_0x2359c5,{eventID:_0x9987a3}=_0x10d22a;switch(_0x9987a3){case CollaborationEvent['LIVESHARE_NEW_HOST']:this[_0x57b989(0x179)](_0x10d22a);break;case CollaborationEvent['LIVESHARE_OPERATION']:this[_0x57b989(0x190)](_0x10d22a);break;case CollaborationEvent[_0x57b989(0x1d0)]:this[_0x57b989(0x195)]();break;case CollaborationEvent['NEW_CHANGESETS']:this[_0x57b989(0x198)](_0x10d22a);break;default:}});}[_0x43267f(0x1dd)](){const _0x3207db=_0x43267f;this['_collabSession'][_0x3207db(0x17f)]({'eventID':CollaborationEvent['LIVESHARE_REQUEST_HOST'],'data':{'unitID':this['_unitID'],'userID':this['_collabSession'][_0x3207db(0x1a4)]()}},this[_0x3207db(0x1de)]);}['stopPresenting'](){const _0x5f2dc5=_0x43267f;this[_0x5f2dc5(0x19c)]===_0x5f2dc5(0x1b7)&&(this['_status$'][_0x5f2dc5(0x201)](_0x5f2dc5(0x1f3)),this[_0x5f2dc5(0x1c6)][_0x5f2dc5(0x17f)]({'eventID':CollaborationEvent[_0x5f2dc5(0x1d0)],'data':{'unitID':this[_0x5f2dc5(0x1de)]}},this['_unitID']));}['startFollowing'](){const _0x6cb0c4=_0x43267f;if(this[_0x6cb0c4(0x19c)]!==_0x6cb0c4(0x19f))return;this[_0x6cb0c4(0x1ad)]['next']('following'),this['_startFollowing']();}['stopFollowing'](){const _0x3f8a44=_0x43267f;if(this[_0x3f8a44(0x19c)]!=='following')return;this[_0x3f8a44(0x1ae)]();}[_0x43267f(0x179)](_0x1393a8){const _0x5be0cc=_0x43267f,{presenter:_0x473290}=_0x1393a8['data'],_0x4d56d6=this[_0x5be0cc(0x1c6)]['getMemberID']();this[_0x5be0cc(0x194)]=_0x473290;if(_0x473290===_0x4d56d6)this[_0x5be0cc(0x1ae)](),this[_0x5be0cc(0x205)]();else this[_0x5be0cc(0x19c)]!==_0x5be0cc(0x19f)&&(this[_0x5be0cc(0x1d2)](),this['_startFollowing']());}[_0x43267f(0x199)](){const _0x260446=_0x43267f,_0x54b420={'eventID':CollaborationEvent['LIVESHARE_FETCH_OPERATIONS']};this['_collabSession'][_0x260446(0x17f)](_0x54b420,this[_0x260446(0x1de)]);}[_0x43267f(0x195)](){const _0x4f0d63=_0x43267f;this[_0x4f0d63(0x194)]=null;if(this[_0x4f0d63(0x19c)]!==_0x4f0d63(0x1b7))this[_0x4f0d63(0x19b)]();}['_handleNewChangeSets'](_0x5132eb){const _0x5c9ce7=_0x43267f;if(this[_0x5c9ce7(0x19c)]===_0x5c9ce7(0x1e2)&&this[_0x5c9ce7(0x194)]===_0x5132eb[_0x5c9ce7(0x1bf)][_0x5c9ce7(0x1a9)]){const _0x2a1c4=parseProtocolChangeset(_0x5132eb['data'])['mutations'][_0x5c9ce7(0x1fb)]()[_0x5c9ce7(0x19a)](_0x6e761=>_0x6e761['id']===InsertSheetMutation['id']);if(_0x2a1c4){const _0x4e2ab8=_0x2a1c4['params'][_0x5c9ce7(0x204)],_0x3e70b6=_0x2a1c4[_0x5c9ce7(0x17c)][_0x5c9ce7(0x1e7)]['id'];setTimeout(()=>{const _0x4a583b=_0x5c9ce7;this[_0x4a583b(0x1d7)][_0x4a583b(0x19e)](SetWorksheetActiveOperation['id'],{'unitId':_0x4e2ab8,'subUnitId':_0x3e70b6},{'fromCollab':!![]});});}}}['_startPresenting'](){const _0x352bb0=_0x43267f;this[_0x352bb0(0x1ad)][_0x352bb0(0x201)](_0x352bb0(0x1b7));const _0x3138d2=new Map(),_0x447d4e=this[_0x352bb0(0x1ed)]=new DisposableCollection();_0x447d4e[_0x352bb0(0x183)](toDisposable(()=>{const _0x298c6a=_0x352bb0;_0x3138d2[_0x298c6a(0x1fc)](_0x3c9296=>_0x3c9296[_0x298c6a(0x1f2)]()),_0x3138d2['clear']();})),_0x447d4e[_0x352bb0(0x183)](this[_0x352bb0(0x1d7)][_0x352bb0(0x1b5)](_0x5c0668=>{const _0x308d65=_0x352bb0;if(_0x5c0668['type']!==CommandType[_0x308d65(0x1f7)]||!this[_0x308d65(0x1cc)]['shouldShareOperation'](_0x5c0668['id']))return;const {id:_0x5ce639}=_0x5c0668;let _0x483408;if(!_0x3138d2[_0x308d65(0x1cf)](_0x5ce639)){var _0x347730;_0x483408=new Subject(),_0x3138d2[_0x308d65(0x1e8)](_0x5ce639,_0x483408),_0x483408['pipe'](throttleTime((_0x347730=this[_0x308d65(0x1ec)][_0x308d65(0x185)](_0x308d65(0x1e4)))!==null&&_0x347730!==void 0x0?_0x347730:DEFAULT_SAME_OPERATION_SHARE_INTERVAL,void 0x0,{'trailing':!![],'leading':!![]}))[_0x308d65(0x20b)](_0x4a1dcd=>{const _0x272a2d=_0x308d65;this[_0x272a2d(0x1c6)][_0x272a2d(0x17f)]({'eventID':CollaborationEvent[_0x272a2d(0x192)],'data':{'unitID':this[_0x272a2d(0x1de)],'operations':{[_0x4a1dcd['id']]:{'id':_0x4a1dcd['id'],'params':JSON['stringify'](_0x4a1dcd[_0x272a2d(0x17c)])}}}},this[_0x272a2d(0x1de)]);});}else _0x483408=_0x3138d2['get'](_0x5ce639);_0x483408[_0x308d65(0x201)](_0x5c0668);})),this[_0x352bb0(0x1cc)][_0x352bb0(0x1e9)](this[_0x352bb0(0x1de)])['forEach'](_0x2d34e1=>this['_collabSession'][_0x352bb0(0x17f)]({'eventID':CollaborationEvent[_0x352bb0(0x192)],'data':{'unitID':this[_0x352bb0(0x1de)],'operations':{[_0x2d34e1['id']]:{'id':_0x2d34e1['id'],'params':JSON[_0x352bb0(0x1e6)](_0x2d34e1['params'])}}}},this['_unitID']));}[_0x43267f(0x1d2)](){const _0x9481db=_0x43267f;var _0x3d90fb;this['_status$'][_0x9481db(0x201)](_0x9481db(0x1f3)),(_0x3d90fb=this[_0x9481db(0x1ed)])===null||_0x3d90fb===void 0x0||_0x3d90fb[_0x9481db(0x1ce)](),this['_commandDisposable']=null;}[_0x43267f(0x1d8)](){const _0x1437d8=_0x43267f;var _0x261bdd;(_0x261bdd=this[_0x1437d8(0x1ed)])===null||_0x261bdd===void 0x0||_0x261bdd[_0x1437d8(0x1ce)](),this['_status$'][_0x1437d8(0x201)](_0x1437d8(0x1e2));}['_beIdle'](){const _0x538408=_0x43267f;var _0x2434d1;this[_0x538408(0x1ad)][_0x538408(0x201)](_0x538408(0x1f3)),(_0x2434d1=this[_0x538408(0x1ed)])===null||_0x2434d1===void 0x0||_0x2434d1[_0x538408(0x1ce)](),this[_0x538408(0x1ed)]=null;}['_stopFollowing'](){const _0xfd6c91=_0x43267f;var _0x6b0a87;this[_0xfd6c91(0x1ad)][_0xfd6c91(0x201)]('not-following'),(_0x6b0a87=this[_0xfd6c91(0x1ed)])===null||_0x6b0a87===void 0x0||_0x6b0a87[_0xfd6c91(0x1ce)]();}[_0x43267f(0x190)](_0x4f7def){const _0xe4d062=_0x43267f;if([_0xe4d062(0x1b7),'not-following',_0xe4d062(0x1f8)]['includes'](this[_0xe4d062(0x19c)]))return;if(!_0x4f7def[_0xe4d062(0x1bf)][_0xe4d062(0x17a)]||_0x4f7def[_0xe4d062(0x1bf)][_0xe4d062(0x17a)]===this[_0xe4d062(0x1c6)][_0xe4d062(0x1a4)]())return;if(this['_status']===_0xe4d062(0x1f3))this[_0xe4d062(0x1d8)]();const _0x501e4d=_0x4f7def[_0xe4d062(0x1bf)]['operations'];Object[_0xe4d062(0x202)](_0x501e4d)[_0xe4d062(0x1fc)](_0x25efbf=>{const _0x2692fa=_0xe4d062;this[_0x2692fa(0x1d7)][_0x2692fa(0x19e)](_0x25efbf['id'],_0x25efbf['params']?JSON[_0x2692fa(0x17b)](_0x25efbf[_0x2692fa(0x17c)]):null,{'fromCollab':!![]});});}['_handleOffline'](){const _0x498524=_0x43267f;var _0x2c2652;this[_0x498524(0x1ad)][_0x498524(0x201)]('offline'),(_0x2c2652=this['_commandDisposable'])===null||_0x2c2652===void 0x0||_0x2c2652[_0x498524(0x1ce)]();}[_0x43267f(0x178)](){const _0x2213d1=_0x43267f;this[_0x2213d1(0x1ad)][_0x2213d1(0x201)](_0x2213d1(0x1f3)),this[_0x2213d1(0x199)]();}};LiveShareCoordinator=__decorate([__decorateParam(0x2,IConfigService),__decorateParam(0x3,Inject(LiveShareService)),__decorateParam(0x4,ICommandService)],LiveShareCoordinator);function LiveShare(){const _0x5915e1=_0x43267f,_0x379895=useDependency(LiveShareController),_0x388630=useDependency(IUniverInstanceService),_0xdfd42=useObservable(()=>_0x388630[_0x5915e1(0x1ee)](UniverInstanceType[_0x5915e1(0x1a8)]),void 0x0,![],[]),[_0x4a50e5,_0x4b0bfe]=useState(null),[_0x58567e,_0x2ea0aa]=useState(_0x5915e1(0x1f3)),_0x3c623e=useRef(null);useEffect(()=>{const _0x11c4e8=_0x5915e1;if(_0xdfd42)_0x379895[_0x11c4e8(0x209)](_0xdfd42[_0x11c4e8(0x1da)]())[_0x11c4e8(0x1f1)](_0x508ef6=>{const _0x35fa11=_0x11c4e8;_0x4b0bfe(_0x508ef6),_0x3c623e['current']=_0x508ef6[_0x35fa11(0x1a6)][_0x35fa11(0x20b)](_0x201338=>{_0x2ea0aa(_0x201338);});});return()=>{const _0x1ea090=_0x11c4e8;var _0x2cdb36;(_0x2cdb36=_0x3c623e[_0x1ea090(0x191)])===null||_0x2cdb36===void 0x0||_0x2cdb36[_0x1ea090(0x208)](),_0x3c623e['current']=null;};},[_0xdfd42,_0x379895]);if(!_0x4a50e5)return null;return jsx(Dropdown,{'align':_0x5915e1(0x1bd),'disabled':_0x58567e==='offline','className':_0x5915e1(0x1af),'overlay':jsx(LiveShareDropdown,{'status':_0x58567e,'coordinator':_0x4a50e5}),'children':jsx(_0x5915e1(0x18e),{'className':clsx(_0x5915e1(0x18b),{'univer-cursor-not-allowed':_0x58567e===_0x5915e1(0x1f8),'univer-cursor-pointer\x20hover:univer-bg-gray-400':_0x58567e!=='offline'}),'type':_0x5915e1(0x18e),'children':jsx(LiveShareIcon,{'className':'univer-size-4'})})});}function LiveShareDropdown(_0x581a0f){const _0x3f13f6=_0x43267f,{status:_0x3beb37,coordinator:_0x52fff9}=_0x581a0f;switch(_0x3beb37){case _0x3f13f6(0x1f3):return jsx(Idle,{'coordinator':_0x52fff9});case _0x3f13f6(0x1e2):return jsx(Following,{'coordinator':_0x52fff9});case _0x3f13f6(0x19f):return jsx(NotFollowing,{'coordinator':_0x52fff9});case _0x3f13f6(0x1f8):return jsx(Offline,{});case _0x3f13f6(0x1b7):return jsx(Presenting,{'coordinator':_0x52fff9});default:return null;}}function Idle(_0x24c505){const _0x18e90c=_0x43267f,{coordinator:_0x44c050}=_0x24c505;return jsxs(Fragment,{'children':[jsx(_0x18e90c(0x1a7),{'className':_0x18e90c(0x1c5),'children':_0x18e90c(0x1a5)}),jsx(Button,{'onClick':()=>_0x44c050[_0x18e90c(0x1dd)](),'children':'Start'})]});}function Following(_0x40ab51){const _0x95a466=_0x43267f,{coordinator:_0x3700d7}=_0x40ab51;return jsxs(Fragment,{'children':[jsx(_0x95a466(0x1a7),{'className':_0x95a466(0x1c5),'children':_0x95a466(0x177)}),jsx(Button,{'onClick':()=>_0x3700d7[_0x95a466(0x1ba)](),'children':_0x95a466(0x1b8)})]});}function NotFollowing(_0x1a1126){const _0x7075a8=_0x43267f,{coordinator:_0x43a13a}=_0x1a1126;return jsxs(Fragment,{'children':[jsx('div',{'className':_0x7075a8(0x1c5),'children':'You\x27re\x20not\x20following\x20the\x20presenter'}),jsx(Button,{'variant':'text','onClick':()=>_0x43a13a[_0x7075a8(0x18d)](),'children':_0x7075a8(0x1bb)})]});}function Presenting(_0x211314){const _0x341385=_0x43267f,{coordinator:_0x54a9f1}=_0x211314;return jsxs(Fragment,{'children':[jsx(_0x341385(0x1a7),{'className':'univer-mb-3\x20univer-w-full\x20univer-text-sm','children':'You\x27re\x20presenting\x20the\x20document'}),jsx(Button,{'variant':_0x341385(0x1d3),'onClick':()=>_0x54a9f1['stopPresenting'](),'children':_0x341385(0x19d)})]});}function Offline(){const _0x5dd2da=_0x43267f;return jsx(Fragment,{'children':_0x5dd2da(0x1f6)});}let DesktopLiveShareController=class DesktopLiveShareController extends Disposable{constructor(_0xdf0abc,_0x755738){const _0x1057fa=_0x43267f;super(),this[_0x1057fa(0x1c2)]=_0xdf0abc,this[_0x1057fa(0x1d5)]=_0x755738,this[_0x1057fa(0x1f0)]();}['_mountLiveShare'](){const _0x227705=_0x43267f;this['disposeWithMe'](this[_0x227705(0x1d5)][_0x227705(0x1d4)](BuiltInUIPart[_0x227705(0x1eb)],()=>connectInjector(LiveShare,this[_0x227705(0x1c2)])));}};DesktopLiveShareController=__decorate([__decorateParam(0x0,Inject(Injector)),__decorateParam(0x1,IUIPartsService)],DesktopLiveShareController);var name=_0x43267f(0x1cb),version=_0x43267f(0x186);const LIVE_SHARE_PLUGIN_CONFIG_KEY=_0x43267f(0x1aa),configSymbol=Symbol(LIVE_SHARE_PLUGIN_CONFIG_KEY),defaultPluginConfig={};let LiveShareCoreExtensionsController=class LiveShareCoreExtensionsController extends Disposable{constructor(_0x2ea649){const _0x568715=_0x43267f;super(),this[_0x568715(0x1cc)]=_0x2ea649,this['_init']();}[_0x43267f(0x1e3)](){const _0x6b076e=_0x43267f;[SetZoomRatioOperation['id'],SetScrollOperation['id'],SetWorksheetActiveOperation['id']][_0x6b076e(0x1fc)](_0x59da6f=>{const _0x1f6df7=_0x6b076e;this[_0x1f6df7(0x1b4)](this[_0x1f6df7(0x1cc)]['registerSharedOperation'](_0x59da6f));});}};LiveShareCoreExtensionsController=__decorate([__decorateParam(0x0,Inject(LiveShareService))],LiveShareCoreExtensionsController);let UniverLiveSharePlugin=class UniverLiveSharePlugin extends Plugin{constructor(_0x49a16f=defaultPluginConfig,_0x292932,_0x12bbce){const _0xa6a956=_0x43267f;super(),this[_0xa6a956(0x1c3)]=_0x49a16f,this[_0xa6a956(0x1c2)]=_0x292932,this[_0xa6a956(0x1ec)]=_0x12bbce;const {..._0x173411}=merge({},defaultPluginConfig,this[_0xa6a956(0x1c3)]);this[_0xa6a956(0x1ec)][_0xa6a956(0x1fe)](LIVE_SHARE_PLUGIN_CONFIG_KEY,_0x173411);}[_0x43267f(0x182)](){const _0x1dde58=_0x43267f;registerDependencies(this['_injector'],mergeOverrideWithDependencies([[LiveShareService],[LiveShareController],[LiveShareCoreExtensionsController],[DesktopLiveShareController]],this[_0x1dde58(0x1c3)][_0x1dde58(0x1b0)])),touchDependencies(this[_0x1dde58(0x1c2)],[[LiveShareCoreExtensionsController]]);}[_0x43267f(0x196)](){touchDependencies(this['_injector'],[[DesktopLiveShareController]]);}};_defineProperty(UniverLiveSharePlugin,_0x43267f(0x188),UniverInstanceType[_0x43267f(0x1d9)]),_defineProperty(UniverLiveSharePlugin,_0x43267f(0x18a),'UNIVER_LIVE_SHARE_PLUGIN'),_defineProperty(UniverLiveSharePlugin,_0x43267f(0x189),name),_defineProperty(UniverLiveSharePlugin,'version',version),UniverLiveSharePlugin=__decorate([DependentOn(UniverCollaborationClientPlugin),__decorateParam(0x1,Inject(Injector)),__decorateParam(0x2,IConfigService)],UniverLiveSharePlugin);function _0x6cd2(){const _0x1b33c6=['decorate','_entities','send','getStatus','length','onStarting','add','PRESENTING','getConfig','0.22.1','from','type','packageName','pluginName','univer-border-none\x20univer-text-gray-600\x20univer-outline-none','_handleOffline','startFollowing','button','requireSession','_handleOperation','current','LIVESHARE_OPERATION','80528zMGMbf','_presenter','_handleTerminate','onRendered','getTypeOfUnitAdded$','_handleNewChangeSets','_fetchOperations','find','_beIdle','_status','Stop\x20presenting','executeCommand','not-following','object','map','getOwnPropertyDescriptor','6GCpiuj','getMemberID','Present\x20this\x20document','status$','div','UNIVER_SHEET','memberID','live-share.config','constructor','_reporters','_status$','_stopFollowing','univer-box-border\x20univer-min-w-60\x20univer-bg-gray-900\x20univer-px-4\x20univer-py-3\x20univer-text-gray-900\x20dark:!univer-bg-white\x20dark:!univer-text-white','override','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','symbol','sessionStatus$','disposeWithMe','onCommandExecuted','_collabSessionService','presenting','Stop\x20following','197486zrbRia','stopFollowing','Start\x20following','unit','end','dispose$','data','13VzTpHT','ONLINE','_injector','_config','defineProperty','univer-mb-3\x20univer-w-full\x20univer-text-sm','_collabSession','toPrimitive','prototype','5741336luInEw','registerInitialStateReporter','@univerjs-pro/live-share','_liveShareService','get','dispose','has','LIVESHARE_TERMINATE','_startLiveShareCoordinator','_stopPresenting','default','registerComponent','_uiPartsService','_univerInstanceService','_commandService','_startFollowing','UNIVER_UNKNOWN','getUnitId','registerSharedOperation','string','tryStartPresenting','_unitID','event$','NOT_FOLLOWING','pipe','following','_init','SAME_OPERATION_SHARE_INTERVAL','32865Pimxjy','stringify','sheet','set','getInitialStates','createInstance','HEADER_MENU','_configService','_commandDisposable','getCurrentTypeOfUnit$','function','_mountLiveShare','then','complete','idle','getValue','OFFLINE','You\x27are\x20offline.','OPERATION','offline','9PQLGOB','_sharedOperations','reverse','forEach','init','setConfig','getLiveShareCoordinatorSync','delete','next','values','asObservable','unitId','_startPresenting','215lnipAF','39734574xvxeGL','unsubscribe','getLiveShareCoordinator','6694850nowrcj','subscribe','5409166rRKXbR','You\x27re\x20following\x20the\x20presenter','_handleOnline','_handleNewHost','presenter','parse','params'];_0x6cd2=function(){return _0x1b33c6;};return _0x6cd2();}export{DesktopLiveShareController,LiveShare,LiveShareController,LiveShareCoordinator,LiveShareService,LiveShareStatus,UniverLiveSharePlugin};
|
package/lib/umd/facade.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _0x99f0(_0x5d1ad9,_0x1813ea){_0x5d1ad9=_0x5d1ad9-0xa0;const _0x134561=_0x1345();let _0x99f0a7=_0x134561[_0x5d1ad9];return _0x99f0a7;}function _0x1345(){const _0x1674f5=['extend','string','_injector','getCurrentUnitOfType','constructor','_initialize','184435ZkZFLi','stopPresenting','54257ByAUXm','amd','object','@univerjs-pro/live-share','UNIVER_SHEET','4491850ruhIVc','1671003yiZqyZ','tryStartPresenting','startFollowing','iterator','UniverCoreFacade','IDLE','FUniver','stopFollowing','IUniverInstanceService','4eEVSsi','getStatus','LiveShareStatus','120808jLDsJj','get','defineProperty','getUnitId','getLiveShareCoordinatorSync','toPrimitive','UniverCore','getLiveShareStatus','startPresenting','No\x20active\x20workbook\x20found.','2217sjMVFz','symbol','LiveShareStatusEnum','6tBdQOv','@univerjs/core','_liveShareController','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','prototype','LiveShareController','200yhlTdY','3803535oMxuBj','function','UniverInstanceType','@univerjs/core/facade','No\x20LiveShareCoordinator\x20found\x20for\x20the\x20active\x20workbook.'];_0x1345=function(){return _0x1674f5;};return _0x1345();}(function(_0x121f7e,_0x291651){const _0x926413=_0x99f0,_0x543a6b=_0x121f7e();while(!![]){try{const _0xd4f129=-parseInt(_0x926413(0xbb))/0x1*(parseInt(_0x926413(0xae))/0x2)+parseInt(_0x926413(0xa5))/0x3+parseInt(_0x926413(0xb1))/0x4+-parseInt(_0x926413(0xd0))/0x5*(-parseInt(_0x926413(0xbe))/0x6)+parseInt(_0x926413(0xd2))/0x7*(-parseInt(_0x926413(0xc4))/0x8)+-parseInt(_0x926413(0xc5))/0x9+parseInt(_0x926413(0xa4))/0xa;if(_0xd4f129===_0x291651)break;else _0x543a6b['push'](_0x543a6b['shift']());}catch(_0x573cf5){_0x543a6b['push'](_0x543a6b['shift']());}}}(_0x1345,0x6e763),function(_0x28b4ab,_0x4d19fb){const _0x4df53e=_0x99f0;typeof exports==_0x4df53e(0xa1)&&typeof module<'u'?_0x4d19fb(require(`@univerjs-pro/live-share`),require(`@univerjs/core`),require(`@univerjs/core/facade`)):typeof define=='function'&&define[_0x4df53e(0xa0)]?define([_0x4df53e(0xa2),_0x4df53e(0xbf),_0x4df53e(0xc8)],_0x4d19fb):(_0x28b4ab=typeof globalThis<'u'?globalThis:_0x28b4ab||self,_0x4d19fb(_0x28b4ab['UniverProLiveShare'],_0x28b4ab[_0x4df53e(0xb7)],_0x28b4ab[_0x4df53e(0xa9)]));}(this,function(_0x1253e5,_0x5a2c5f,_0x207100){const _0x1ce06b=_0x99f0;function _0xb47be7(_0x1f47ea){'@babel/helpers - typeof';const _0x499ff1=_0x99f0;return _0xb47be7=typeof Symbol==_0x499ff1(0xc6)&&typeof Symbol[_0x499ff1(0xa8)]=='symbol'?function(_0x56df43){return typeof _0x56df43;}:function(_0x2efb0f){const _0x12e409=_0x499ff1;return _0x2efb0f&&typeof Symbol==_0x12e409(0xc6)&&_0x2efb0f[_0x12e409(0xce)]===Symbol&&_0x2efb0f!==Symbol[_0x12e409(0xc2)]?_0x12e409(0xbc):typeof _0x2efb0f;},_0xb47be7(_0x1f47ea);}function _0x2d62eb(_0xf59180,_0x67c1e1){const _0x597e05=_0x99f0;if(_0xb47be7(_0xf59180)!=_0x597e05(0xa1)||!_0xf59180)return _0xf59180;var _0x49af89=_0xf59180[Symbol[_0x597e05(0xb6)]];if(_0x49af89!==void 0x0){var _0x3a0816=_0x49af89['call'](_0xf59180,_0x67c1e1||'default');if(_0xb47be7(_0x3a0816)!='object')return _0x3a0816;throw TypeError(_0x597e05(0xc1));}return(_0x67c1e1===_0x597e05(0xcb)?String:Number)(_0xf59180);}function _0x1d2a77(_0x4ce16e){const _0x28fe26=_0x99f0;var _0x4daef8=_0x2d62eb(_0x4ce16e,'string');return _0xb47be7(_0x4daef8)==_0x28fe26(0xbc)?_0x4daef8:_0x4daef8+'';}function _0xe8166a(_0x234fe2,_0x5d4539,_0x204c35){const _0x59a2ed=_0x99f0;return(_0x5d4539=_0x1d2a77(_0x5d4539))in _0x234fe2?Object[_0x59a2ed(0xb3)](_0x234fe2,_0x5d4539,{'value':_0x204c35,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x234fe2[_0x5d4539]=_0x204c35,_0x234fe2;}var _0x2a3f48=class extends _0x207100[_0x1ce06b(0xab)]{constructor(..._0x3d9b41){const _0x5421a4=_0x1ce06b;super(..._0x3d9b41),_0xe8166a(this,_0x5421a4(0xc0),void 0x0);}[_0x1ce06b(0xcf)](_0x1d6325){const _0x3cf84c=_0x1ce06b;this['_liveShareController']=_0x1d6325[_0x3cf84c(0xb2)](_0x1253e5[_0x3cf84c(0xc3)]);}[_0x1ce06b(0xb8)](){const _0x208f3c=_0x1ce06b;var _0x4faa8d;let _0x50c20d=this[_0x208f3c(0xcc)]['get'](_0x5a2c5f['IUniverInstanceService'])[_0x208f3c(0xcd)](_0x5a2c5f[_0x208f3c(0xc7)]['UNIVER_SHEET']);if(!_0x50c20d)throw Error(_0x208f3c(0xba));let _0x54481e=_0x50c20d['getUnitId'](),_0x5ab2c9=this[_0x208f3c(0xc0)][_0x208f3c(0xb5)](_0x54481e);return(_0x4faa8d=_0x5ab2c9==null?void 0x0:_0x5ab2c9[_0x208f3c(0xaf)]())==null?_0x1253e5[_0x208f3c(0xb0)][_0x208f3c(0xaa)]:_0x4faa8d;}[_0x1ce06b(0xa7)](){const _0x43162e=_0x1ce06b;let _0x28ae8a=this['_injector'][_0x43162e(0xb2)](_0x5a2c5f[_0x43162e(0xad)])[_0x43162e(0xcd)](_0x5a2c5f[_0x43162e(0xc7)][_0x43162e(0xa3)]);if(!_0x28ae8a)throw Error('No\x20active\x20workbook\x20found.');let _0x558f07=_0x28ae8a['getUnitId'](),_0x38ed1d=this['_liveShareController'][_0x43162e(0xb5)](_0x558f07);if(!_0x38ed1d)throw Error('No\x20LiveShareCoordinator\x20found\x20for\x20the\x20active\x20workbook.');_0x38ed1d[_0x43162e(0xa7)]();}['stopFollowing'](){const _0x3fb7df=_0x1ce06b;let _0x4fa168=this['_injector'][_0x3fb7df(0xb2)](_0x5a2c5f[_0x3fb7df(0xad)])[_0x3fb7df(0xcd)](_0x5a2c5f[_0x3fb7df(0xc7)][_0x3fb7df(0xa3)]);if(!_0x4fa168)throw Error(_0x3fb7df(0xba));let _0x646929=_0x4fa168[_0x3fb7df(0xb4)](),_0x20d7aa=this[_0x3fb7df(0xc0)][_0x3fb7df(0xb5)](_0x646929);if(!_0x20d7aa)throw Error(_0x3fb7df(0xc9));_0x20d7aa[_0x3fb7df(0xac)]();}[_0x1ce06b(0xb9)](){const _0x1eef50=_0x1ce06b;let _0xda0adf=this[_0x1eef50(0xcc)][_0x1eef50(0xb2)](_0x5a2c5f[_0x1eef50(0xad)])[_0x1eef50(0xcd)](_0x5a2c5f[_0x1eef50(0xc7)]['UNIVER_SHEET']);if(!_0xda0adf)throw Error(_0x1eef50(0xba));let _0xeb8eaf=_0xda0adf[_0x1eef50(0xb4)](),_0x33a92e=this['_liveShareController'][_0x1eef50(0xb5)](_0xeb8eaf);if(!_0x33a92e)throw Error(_0x1eef50(0xc9));_0x33a92e[_0x1eef50(0xa6)]();}[_0x1ce06b(0xd1)](){const _0x504846=_0x1ce06b;let _0x7a839e=this[_0x504846(0xcc)][_0x504846(0xb2)](_0x5a2c5f['IUniverInstanceService'])[_0x504846(0xcd)](_0x5a2c5f['UniverInstanceType']['UNIVER_SHEET']);if(!_0x7a839e)throw Error(_0x504846(0xba));let _0x4c2990=_0x7a839e['getUnitId'](),_0x639777=this['_liveShareController'][_0x504846(0xb5)](_0x4c2990);if(!_0x639777)throw Error('No\x20LiveShareCoordinator\x20found\x20for\x20the\x20active\x20workbook.');_0x639777[_0x504846(0xd1)]();}};_0x207100[_0x1ce06b(0xab)][_0x1ce06b(0xca)](_0x2a3f48);var _0xa1ec05=class extends _0x207100['FEnum']{get[_0x1ce06b(0xbd)](){return _0x1253e5['LiveShareStatus'];}};_0x207100['FEnum'][_0x1ce06b(0xca)](_0xa1ec05);}));
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x1512(){const _0x3a0b43=['M9.20459\x204.90474C9.20459\x204.64763\x209.35535\x204.54174\x209.54053\x204.68737L11.2643\x206.04046C11.4495\x206.18609\x2011.4495\x206.42299\x2011.2643\x206.56789L9.55334\x207.90706C9.36755\x208.05269\x209.20386\x207.90499\x209.20386\x207.68969V6.96785H8.94446C8.19543\x206.96785\x206.72595\x207.28347\x206.37646\x207.89174C6.30786\x208.00322\x206.23572\x207.97884\x206.23572\x207.89174C6.25073\x206.80828\x208.0918\x205.58895\x209.17383\x205.58895H9.20459V4.90474Z','You\x27re\x20following\x20the\x20presenter','following','asObservable','univerjs-icon\x20univerjs-icon-','_init','shouldShareOperation','OFFLINE','_reporters','memberID','_handleTerminate','merge','registerComponent','getCurrentTypeOfUnit$','live-share.config','_commandService','default','unit','_injector','replace','_entities','_stopPresenting','registerSharedOperation','mutations','jsx','from','jsxs','9710883LdmCIG','IConfigService','LiveShareService','throttleTime','useRef','none','subscribe','getUnitId','string','LiveShareController','OPERATION','call','univer-border-none\x20univer-text-gray-600\x20univer-outline-none','SetWorksheetActiveOperation','not-following','attrs','UniverLiveSharePlugin','getTypeOfUnitDisposed$','executeCommand','clsx','getConfig','UniverInstanceType','getTypeOfUnitAdded$','init','idle','303740qxZogW','_mountLiveShare','data','getLiveShareCoordinator','140HgLWQf','unsubscribe','displayName','substring','has','connectInjector','takeUntil','offline','operations','length','includes','univer-size-4','div','rxjs','sheet','parse','event$','presenter','children','rxjs/operators','Stop\x20presenting','_beIdle','_stopFollowing','setConfig','univer-mb-3\x20univer-w-full\x20univer-text-sm','react','object','_handleOffline','_configService','unitId','SAME_OPERATION_SHARE_INTERVAL','Present\x20this\x20document','RxDisposable','362360IDYpYE','_startLiveShareCoordinator','_unitID','SetZoomRatioOperation','SessionStatus','get','send','params','Subject','_handleOnline','LIVESHARE_REQUEST_HOST','UniverProCollaborationClient','3bZtJte','requireSession','toString','InsertSheetMutation','PRESENTING','registerInitialStateReporter','327502Utbvnb','_status$','IUIPartsService','DesktopLiveShareController','end','find','toDisposable','getMemberID','NEW_CHANGESETS','LIVESHARE_FETCH_OPERATIONS','getInitialStates','xlink:href','defineProperty','_handleNewHost','UNIVER_UNKNOWN','You\x27re\x20not\x20following\x20the\x20presenter','3505NeJzin','Start\x20following','Button','decorate','iterator','M1.98682\x202.73096C1.98682\x202.17867\x202.43457\x201.73096\x202.98682\x201.73096H14.9868C15.5391\x201.73096\x2015.9868\x202.17867\x2015.9868\x202.73096V9.90105C15.9868\x2010.4533\x2015.5391\x2010.901\x2014.9868\x2010.901H9.62183V13.5577H12.9868C13.3375\x2013.5577\x2013.6218\x2013.842\x2013.6218\x2014.1927C13.6218\x2014.5434\x2013.3375\x2014.8277\x2012.9868\x2014.8277H4.98682C4.63611\x2014.8277\x204.35181\x2014.5434\x204.35181\x2014.1927C4.35181\x2013.842\x204.63611\x2013.5577\x204.98682\x2013.5577H8.35181V10.901H2.98682C2.43457\x2010.901\x201.98682\x2010.4533\x201.98682\x209.90105V2.73096ZM3.25684\x209.63106V3.00095H14.7168V9.63106H3.25684Z','complete','Injector','colorChannel1','_handleOperation','tryStartPresenting','UniverSheetsUi','_presenter','548qJXkPB','UniverProLiveShare','_fetchOperations','onCommandExecuted','_sharedOperations','presenting','LiveShareIcon','HEADER_MENU','assign','parseProtocolChangeset','@univerjs-pro/collaboration-client','useState','mask','getValue','_status','stopPresenting','button','_startFollowing','add','fill','path','prototype','0.22.0','IUniverInstanceService','NOT_FOLLOWING','status$','createElement','stopFollowing','useObservable','delete','evenodd','2269188TRUIog','DisposableCollection','@univerjs/sheets-ui','_startPresenting','_handleNewChangeSets','next','Stop\x20following','UniverCore','BehaviorSubject','symbol','@univerjs-pro/collaboration','touchDependencies','UNIVER_SHEET','version','1em','UNIVER_LIVE_SHARE_PLUGIN','Disposable','React','UniverDesign','onRendered','forEach','random','_liveShareService','ONLINE','stringify','entries','_univerInstanceService','704BTbAay','DependentOn','_collabSession','type','UniverUi','createInstance','startFollowing','dispose','current','currentColor','CollaborationSessionService','CollaborationEvent','_config','@univerjs/sheets','http://www.w3.org/2000/svg','pipe','_commandDisposable','useDependency','Module','map','url(#$1','toStringTag','1088647Wnsvse','LIVESHARE_TERMINATE','Inject','function','dispose$','idSuffix','exports','disposeWithMe','@univerjs/design','UniverCollaborationClientPlugin','mergeOverrideWithDependencies','Fragment','LIVESHARE_OPERATION','tag','pluginName','_collabSessionService','operators'];_0x1512=function(){return _0x3a0b43;};return _0x1512();}function _0x48e8(_0x4747f9,_0x22eaab){_0x4747f9=_0x4747f9-0x104;const _0x1512b1=_0x1512();let _0x48e8d4=_0x1512b1[_0x4747f9];return _0x48e8d4;}(function(_0x3e0a55,_0x2db7dc){const _0x346e1d=_0x48e8,_0x4d943b=_0x3e0a55();while(!![]){try{const _0x117b54=-parseInt(_0x346e1d(0x159))/0x1+-parseInt(_0x346e1d(0x1d5))/0x2*(parseInt(_0x346e1d(0x1cf))/0x3)+-parseInt(_0x346e1d(0x109))/0x4*(-parseInt(_0x346e1d(0x1e5))/0x5)+-parseInt(_0x346e1d(0x128))/0x6+parseInt(_0x346e1d(0x1a2))/0x7*(-parseInt(_0x346e1d(0x1c3))/0x8)+parseInt(_0x346e1d(0x185))/0x9+parseInt(_0x346e1d(0x19e))/0xa*(parseInt(_0x346e1d(0x143))/0xb);if(_0x117b54===_0x2db7dc)break;else _0x4d943b['push'](_0x4d943b['shift']());}catch(_0x226996){_0x4d943b['push'](_0x4d943b['shift']());}}}(_0x1512,0x8e340),function(_0x2fc07d,_0x108d90){const _0x2490bb=_0x48e8;typeof exports==_0x2490bb(0x1bc)&&typeof module<'u'?_0x108d90(exports,require(`@univerjs/core`),require(`@univerjs/ui`),require(`@univerjs/design`),require(`react`),require(`@univerjs-pro/collaboration`),require(`@univerjs-pro/collaboration-client`),require(`@univerjs/sheets`),require(`rxjs`),require(`rxjs/operators`),require(`react/jsx-runtime`),require(`@univerjs/sheets-ui`)):typeof define==_0x2490bb(0x15c)&&define['amd']?define([_0x2490bb(0x15f),'@univerjs/core','@univerjs/ui',_0x2490bb(0x161),_0x2490bb(0x1bb),_0x2490bb(0x132),_0x2490bb(0x113),_0x2490bb(0x150),_0x2490bb(0x1af),_0x2490bb(0x1b5),'react/jsx-runtime',_0x2490bb(0x12a)],_0x108d90):(_0x2fc07d=typeof globalThis<'u'?globalThis:_0x2fc07d||self,_0x108d90(_0x2fc07d[_0x2490bb(0x10a)]={},_0x2fc07d[_0x2490bb(0x12f)],_0x2fc07d[_0x2490bb(0x147)],_0x2fc07d[_0x2490bb(0x13a)],_0x2fc07d[_0x2490bb(0x139)],_0x2fc07d['UniverProCollaboration'],_0x2fc07d[_0x2490bb(0x1ce)],_0x2fc07d['UniverSheets'],_0x2fc07d['rxjs'],_0x2fc07d[_0x2490bb(0x1af)][_0x2490bb(0x169)],_0x2fc07d[_0x2490bb(0x139)],_0x2fc07d[_0x2490bb(0x107)]));}(this,function(_0xc15b9e,_0x4e18f2,_0x335fa2,_0x1800f3,_0x24b107,_0x6e132a,_0x3c1f2e,_0x31b923,_0x199065,_0x5a9512,_0x456158,_0x51ce4c){const _0x148399=_0x48e8;Object[_0x148399(0x1e1)](_0xc15b9e,Symbol[_0x148399(0x158)],{'value':_0x148399(0x155)});function _0x3ecbff({ref:_0x2d9aa0,..._0x3dbcfe}){const _0x18fd45=_0x148399;let {icon:_0x398289,id:_0x365985,className:_0x4b048e,extend:_0x4775da,..._0x253dd2}=_0x3dbcfe,_0x41ff61=(_0x18fd45(0x16e)+_0x365985+'\x20'+(_0x4b048e||''))['trim'](),_0x1d5052=(0x0,_0x24b107[_0x18fd45(0x189)])('_'+_0x211d64());return _0x2af984(_0x398289,''+_0x365985,{'defIds':_0x398289['defIds'],'idSuffix':_0x1d5052[_0x18fd45(0x14b)]},{'ref':_0x2d9aa0,'className':_0x41ff61,..._0x253dd2},_0x4775da);}function _0x2af984(_0x3bd26e,_0x414a54,_0x1ea40,_0x359ad4,_0x49dc2f){const _0x4373ff=_0x148399;return(0x0,_0x24b107[_0x4373ff(0x123)])(_0x3bd26e[_0x4373ff(0x166)],{'key':_0x414a54,..._0x312091(_0x3bd26e,_0x1ea40,_0x49dc2f),..._0x359ad4},(_0x291e5d(_0x3bd26e,_0x1ea40)[_0x4373ff(0x1b4)]||[])[_0x4373ff(0x156)]((_0x1495ed,_0x35ab2c)=>_0x2af984(_0x1495ed,_0x414a54+'-'+_0x3bd26e[_0x4373ff(0x166)]+'-'+_0x35ab2c,_0x1ea40,void 0x0,_0x49dc2f)));}function _0x312091(_0x5686e8,_0x12ae56,_0x45ce2f){const _0x1f9374=_0x148399;let _0x1aed90={..._0x5686e8[_0x1f9374(0x194)]};_0x45ce2f!=null&&_0x45ce2f[_0x1f9374(0x104)]&&_0x1aed90[_0x1f9374(0x11c)]==='colorChannel1'&&(_0x1aed90[_0x1f9374(0x11c)]=_0x45ce2f[_0x1f9374(0x104)]),_0x5686e8[_0x1f9374(0x166)]===_0x1f9374(0x115)&&_0x1aed90['id']&&(_0x1aed90['id']+=_0x12ae56[_0x1f9374(0x15e)]),Object['entries'](_0x1aed90)[_0x1f9374(0x13c)](([_0x2c06bf,_0x5279a2])=>{const _0x37315b=_0x1f9374;_0x2c06bf===_0x37315b(0x115)&&typeof _0x5279a2=='string'&&(_0x1aed90[_0x2c06bf]=_0x5279a2[_0x37315b(0x17d)](/url\(#(.*)\)/,_0x37315b(0x157)+_0x12ae56['idSuffix']+')'));});let {defIds:_0x1d9ad4}=_0x12ae56;return!_0x1d9ad4||_0x1d9ad4[_0x1f9374(0x1ab)]===0x0?_0x1aed90:(_0x5686e8[_0x1f9374(0x166)]==='use'&&_0x1aed90[_0x1f9374(0x1e0)]&&(_0x1aed90[_0x1f9374(0x1e0)]+=_0x12ae56[_0x1f9374(0x15e)]),Object[_0x1f9374(0x141)](_0x1aed90)[_0x1f9374(0x13c)](([_0x3f0ba6,_0x5293b5])=>{const _0x4fc74f=_0x1f9374;typeof _0x5293b5=='string'&&(_0x1aed90[_0x3f0ba6]=_0x5293b5[_0x4fc74f(0x17d)](/url\(#(.*)\)/,_0x4fc74f(0x157)+_0x12ae56[_0x4fc74f(0x15e)]+')'));}),_0x1aed90);}function _0x291e5d(_0x5068ac,_0x1fd9db){const _0x20dd7d=_0x148399;var _0x3658ca;let {defIds:_0x5ef924}=_0x1fd9db;return!_0x5ef924||_0x5ef924['length']===0x0?_0x5068ac:_0x5068ac[_0x20dd7d(0x166)]==='defs'&&(_0x3658ca=_0x5068ac[_0x20dd7d(0x1b4)])!=null&&_0x3658ca[_0x20dd7d(0x1ab)]?{..._0x5068ac,'children':_0x5068ac['children']['map'](_0x3d8c13=>typeof _0x3d8c13[_0x20dd7d(0x194)]['id']==_0x20dd7d(0x18d)&&_0x5ef924&&_0x5ef924[_0x20dd7d(0x1ac)](_0x3d8c13[_0x20dd7d(0x194)]['id'])?{..._0x3d8c13,'attrs':{..._0x3d8c13[_0x20dd7d(0x194)],'id':_0x3d8c13[_0x20dd7d(0x194)]['id']+_0x1fd9db[_0x20dd7d(0x15e)]}}:_0x3d8c13)}:_0x5068ac;}function _0x211d64(){const _0x3622ce=_0x148399;return Math[_0x3622ce(0x13d)]()[_0x3622ce(0x1d1)](0x24)[_0x3622ce(0x1a5)](0x2,0x8);}_0x3ecbff[_0x148399(0x1a4)]='UniverIcon';let _0x25c234={'tag':'svg','attrs':{'xmlns':_0x148399(0x151),'fill':_0x148399(0x18a),'viewBox':'0\x200\x2017\x2017','width':_0x148399(0x136),'height':'1em'},'children':[{'tag':_0x148399(0x11d),'attrs':{'fill':'currentColor','d':_0x148399(0x16a)}},{'tag':'path','attrs':{'fill':_0x148399(0x14c),'d':_0x148399(0x1ea),'fillRule':_0x148399(0x127),'clipRule':_0x148399(0x127)}}]},_0x45c7ad=(0x0,_0x24b107['forwardRef'])(function(_0x1b943a,_0x29ea65){const _0x40863f=_0x148399;return(0x0,_0x24b107[_0x40863f(0x123)])(_0x3ecbff,Object[_0x40863f(0x111)]({},_0x1b943a,{'id':'live-share-icon','ref':_0x29ea65,'icon':_0x25c234}));});_0x45c7ad[_0x148399(0x1a4)]=_0x148399(0x10f);function _0x47c655(_0x2ccfb7){'@babel/helpers - typeof';const _0x7553c3=_0x148399;return _0x47c655=typeof Symbol==_0x7553c3(0x15c)&&typeof Symbol[_0x7553c3(0x1e9)]==_0x7553c3(0x131)?function(_0x1881c9){return typeof _0x1881c9;}:function(_0x482cc1){const _0x4569d1=_0x7553c3;return _0x482cc1&&typeof Symbol==_0x4569d1(0x15c)&&_0x482cc1['constructor']===Symbol&&_0x482cc1!==Symbol[_0x4569d1(0x11e)]?'symbol':typeof _0x482cc1;},_0x47c655(_0x2ccfb7);}function _0x2ac6d6(_0x18f232,_0x4661e9){const _0x546d84=_0x148399;if(_0x47c655(_0x18f232)!=_0x546d84(0x1bc)||!_0x18f232)return _0x18f232;var _0x13693a=_0x18f232[Symbol['toPrimitive']];if(_0x13693a!==void 0x0){var _0x54fcdc=_0x13693a[_0x546d84(0x190)](_0x18f232,_0x4661e9||_0x546d84(0x17a));if(_0x47c655(_0x54fcdc)!=_0x546d84(0x1bc))return _0x54fcdc;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x4661e9===_0x546d84(0x18d)?String:Number)(_0x18f232);}function _0x45e005(_0x18f625){const _0x965d3=_0x148399;var _0x3741eb=_0x2ac6d6(_0x18f625,_0x965d3(0x18d));return _0x47c655(_0x3741eb)=='symbol'?_0x3741eb:_0x3741eb+'';}function _0x4a8b38(_0x369612,_0x272864,_0x4e5fe1){return(_0x272864=_0x45e005(_0x272864))in _0x369612?Object['defineProperty'](_0x369612,_0x272864,{'value':_0x4e5fe1,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x369612[_0x272864]=_0x4e5fe1,_0x369612;}var _0x570c9e=class extends _0x4e18f2[_0x148399(0x138)]{constructor(..._0x450788){const _0x3a621c=_0x148399;super(..._0x450788),_0x4a8b38(this,_0x3a621c(0x10d),new Set()),_0x4a8b38(this,_0x3a621c(0x172),new Set());}[_0x148399(0x180)](_0x16b268){const _0x43878e=_0x148399;return this[_0x43878e(0x10d)]['add'](_0x16b268),(0x0,_0x4e18f2[_0x43878e(0x1db)])(()=>this[_0x43878e(0x10d)]['delete'](_0x16b268));}[_0x148399(0x1d4)](_0x96698e){const _0x3e038d=_0x148399;return this[_0x3e038d(0x172)][_0x3e038d(0x11b)](_0x96698e),(0x0,_0x4e18f2[_0x3e038d(0x1db)])(()=>this[_0x3e038d(0x172)][_0x3e038d(0x126)](_0x96698e));}[_0x148399(0x170)](_0xfd1929){const _0x519124=_0x148399;return this[_0x519124(0x10d)][_0x519124(0x1a6)](_0xfd1929);}[_0x148399(0x1df)](_0xbbcb7){const _0x54abcc=_0x148399;return Array[_0x54abcc(0x183)](this[_0x54abcc(0x172)])[_0x54abcc(0x156)](_0x44e49f=>_0x44e49f(_0xbbcb7));}};function _0x1cd8ab(_0x4e023a,_0x2b951a){return function(_0x246c0b,_0x31ff23){_0x2b951a(_0x246c0b,_0x31ff23,_0x4e023a);};}function _0xd70ace(_0x428fdb,_0x5778a3,_0x86fa64,_0x30b9d1){const _0x471c95=_0x148399;var _0xd88ec3=arguments[_0x471c95(0x1ab)],_0xfeb70=_0xd88ec3<0x3?_0x5778a3:_0x30b9d1===null?_0x30b9d1=Object['getOwnPropertyDescriptor'](_0x5778a3,_0x86fa64):_0x30b9d1,_0x10ca8f;if(typeof Reflect=='object'&&typeof Reflect[_0x471c95(0x1e8)]==_0x471c95(0x15c))_0xfeb70=Reflect[_0x471c95(0x1e8)](_0x428fdb,_0x5778a3,_0x86fa64,_0x30b9d1);else{for(var _0x202948=_0x428fdb[_0x471c95(0x1ab)]-0x1;_0x202948>=0x0;_0x202948--)(_0x10ca8f=_0x428fdb[_0x202948])&&(_0xfeb70=(_0xd88ec3<0x3?_0x10ca8f(_0xfeb70):_0xd88ec3>0x3?_0x10ca8f(_0x5778a3,_0x86fa64,_0xfeb70):_0x10ca8f(_0x5778a3,_0x86fa64))||_0xfeb70);}return _0xd88ec3>0x3&&_0xfeb70&&Object[_0x471c95(0x1e1)](_0x5778a3,_0x86fa64,_0xfeb70),_0xfeb70;}let _0x30797e=class extends _0x4e18f2[_0x148399(0x1c2)]{constructor(_0x77e54c,_0x3d4992,_0x560f39){const _0x1ff9e7=_0x148399;super(),this[_0x1ff9e7(0x142)]=_0x77e54c,this[_0x1ff9e7(0x17c)]=_0x3d4992,this[_0x1ff9e7(0x168)]=_0x560f39,_0x4a8b38(this,'_entities',new Map()),this['_init']();}async[_0x148399(0x1a1)](_0x2176ab){const _0x570bb8=_0x148399;return this[_0x570bb8(0x17e)][_0x570bb8(0x1a6)](_0x2176ab)||await this[_0x570bb8(0x1c4)](_0x2176ab),this[_0x570bb8(0x17e)]['get'](_0x2176ab);}['getLiveShareCoordinatorSync'](_0x4f8634){const _0x558dc7=_0x148399;var _0x4e8302;return(_0x4e8302=this[_0x558dc7(0x17e)][_0x558dc7(0x1c8)](_0x4f8634))==null?null:_0x4e8302;}[_0x148399(0x16f)](){const _0x2f16b8=_0x148399;this[_0x2f16b8(0x142)][_0x2f16b8(0x19b)](_0x4e18f2[_0x2f16b8(0x19a)][_0x2f16b8(0x134)])[_0x2f16b8(0x152)]((0x0,_0x5a9512[_0x2f16b8(0x1a8)])(this[_0x2f16b8(0x15d)]))['subscribe'](async _0x3de898=>{const _0x3c6ba4=_0x2f16b8;let _0x137aaa=_0x3de898[_0x3c6ba4(0x17b)][_0x3c6ba4(0x18c)]();this[_0x3c6ba4(0x17e)][_0x3c6ba4(0x1a6)](_0x137aaa)||this['_startLiveShareCoordinator'](_0x137aaa);}),this['_univerInstanceService'][_0x2f16b8(0x196)](_0x4e18f2[_0x2f16b8(0x19a)]['UNIVER_SHEET'])[_0x2f16b8(0x152)]((0x0,_0x5a9512[_0x2f16b8(0x1a8)])(this[_0x2f16b8(0x15d)]))['subscribe'](_0x3e2c5c=>{const _0xb3d9ae=_0x2f16b8;let _0x1acc78=_0x3e2c5c['getUnitId'](),_0x1e7415=this[_0xb3d9ae(0x17e)][_0xb3d9ae(0x1c8)](_0x1acc78);_0x1e7415==null||_0x1e7415[_0xb3d9ae(0x14a)]();});}async['_startLiveShareCoordinator'](_0x25369f){const _0x2e89c6=_0x148399;let _0xa82433=await this[_0x2e89c6(0x168)][_0x2e89c6(0x1d0)](_0x25369f),_0x4f5301=this[_0x2e89c6(0x17c)][_0x2e89c6(0x148)](_0x316b3f,_0x25369f,_0xa82433);return _0x4f5301[_0x2e89c6(0x19c)](),this[_0x2e89c6(0x17e)]['set'](_0x25369f,_0x4f5301),_0x4f5301;}};_0x30797e=_0xd70ace([_0x1cd8ab(0x0,_0x4e18f2[_0x148399(0x120)]),_0x1cd8ab(0x1,(0x0,_0x4e18f2[_0x148399(0x15b)])(_0x4e18f2[_0x148399(0x1ec)])),_0x1cd8ab(0x2,(0x0,_0x4e18f2[_0x148399(0x15b)])(_0x3c1f2e[_0x148399(0x14d)]))],_0x30797e);let _0x4be03d=function(_0x5034ed){const _0x26fa34=_0x148399;return _0x5034ed[_0x26fa34(0x171)]=_0x26fa34(0x1a9),_0x5034ed['IDLE']='idle',_0x5034ed['FOLLOWING']='following',_0x5034ed[_0x26fa34(0x121)]='not-following',_0x5034ed[_0x26fa34(0x1d3)]=_0x26fa34(0x10e),_0x5034ed;}({}),_0x316b3f=class extends _0x4e18f2[_0x148399(0x1c2)]{get['_status'](){const _0x503de5=_0x148399;return this['_status$'][_0x503de5(0x116)]();}constructor(_0x1fd9bf,_0x1090ad,_0x231d38,_0x42ff79,_0x2a5267){const _0x25637c=_0x148399;super(),this[_0x25637c(0x1c5)]=_0x1fd9bf,this['_collabSession']=_0x1090ad,this[_0x25637c(0x1be)]=_0x231d38,this[_0x25637c(0x13e)]=_0x42ff79,this[_0x25637c(0x179)]=_0x2a5267,_0x4a8b38(this,'_status$',new _0x199065[(_0x25637c(0x130))](_0x25637c(0x19d))),_0x4a8b38(this,_0x25637c(0x122),this[_0x25637c(0x1d6)][_0x25637c(0x16d)]()),_0x4a8b38(this,_0x25637c(0x16f),!0x1),_0x4a8b38(this,'_commandDisposable',null),_0x4a8b38(this,_0x25637c(0x108),null);}[_0x148399(0x14a)](){const _0xaf121b=_0x148399;var _0x402fa6;(_0x402fa6=this[_0xaf121b(0x153)])==null||_0x402fa6[_0xaf121b(0x14a)](),this[_0xaf121b(0x1d6)][_0xaf121b(0x12d)](_0xaf121b(0x19d)),this[_0xaf121b(0x1d6)]['complete']();}['getStatus'](){return this['_status'];}[_0x148399(0x19c)](){const _0x1974e5=_0x148399;this['_init']||(this[_0x1974e5(0x16f)]=!0x0,this[_0x1974e5(0x145)]['sessionStatus$'][_0x1974e5(0x152)]((0x0,_0x5a9512['takeUntil'])(this[_0x1974e5(0x15d)]))[_0x1974e5(0x18b)](_0x2f7b6e=>{const _0x5d1350=_0x1974e5;switch(_0x2f7b6e){case _0x3c1f2e[_0x5d1350(0x1c7)]['OFFLINE']:this['_handleOffline']();break;case _0x3c1f2e[_0x5d1350(0x1c7)][_0x5d1350(0x13f)]:this[_0x5d1350(0x1cc)]();break;default:}}),this[_0x1974e5(0x145)][_0x1974e5(0x1b2)][_0x1974e5(0x152)]((0x0,_0x5a9512[_0x1974e5(0x1a8)])(this[_0x1974e5(0x15d)]))[_0x1974e5(0x18b)](_0x22cfb0=>{const _0x143099=_0x1974e5;let {eventID:_0x55c634}=_0x22cfb0;switch(_0x55c634){case _0x6e132a[_0x143099(0x14e)]['LIVESHARE_NEW_HOST']:this[_0x143099(0x1e2)](_0x22cfb0);break;case _0x6e132a[_0x143099(0x14e)]['LIVESHARE_OPERATION']:this[_0x143099(0x105)](_0x22cfb0);break;case _0x6e132a['CollaborationEvent'][_0x143099(0x15a)]:this[_0x143099(0x174)]();break;case _0x6e132a['CollaborationEvent'][_0x143099(0x1dd)]:this['_handleNewChangeSets'](_0x22cfb0);break;default:}}));}['tryStartPresenting'](){const _0x5e6fc0=_0x148399;this[_0x5e6fc0(0x145)][_0x5e6fc0(0x1c9)]({'eventID':_0x6e132a[_0x5e6fc0(0x14e)][_0x5e6fc0(0x1cd)],'data':{'unitID':this[_0x5e6fc0(0x1c5)],'userID':this[_0x5e6fc0(0x145)][_0x5e6fc0(0x1dc)]()}},this[_0x5e6fc0(0x1c5)]);}[_0x148399(0x118)](){const _0x392486=_0x148399;this[_0x392486(0x117)]===_0x392486(0x10e)&&(this[_0x392486(0x1d6)][_0x392486(0x12d)](_0x392486(0x19d)),this[_0x392486(0x145)]['send']({'eventID':_0x6e132a['CollaborationEvent'][_0x392486(0x15a)],'data':{'unitID':this[_0x392486(0x1c5)]}},this[_0x392486(0x1c5)]));}[_0x148399(0x149)](){const _0x599047=_0x148399;this['_status']===_0x599047(0x193)&&(this[_0x599047(0x1d6)][_0x599047(0x12d)]('following'),this['_startFollowing']());}[_0x148399(0x124)](){const _0xfa7102=_0x148399;this[_0xfa7102(0x117)]===_0xfa7102(0x16c)&&this[_0xfa7102(0x1b8)]();}[_0x148399(0x1e2)](_0x54e042){const _0x3dfe2e=_0x148399;let {presenter:_0x5d92ab}=_0x54e042['data'],_0x493005=this['_collabSession'][_0x3dfe2e(0x1dc)]();this[_0x3dfe2e(0x108)]=_0x5d92ab,_0x5d92ab===_0x493005?(this[_0x3dfe2e(0x1b8)](),this[_0x3dfe2e(0x12b)]()):this['_status']!==_0x3dfe2e(0x193)&&(this['_stopPresenting'](),this[_0x3dfe2e(0x11a)]());}[_0x148399(0x10b)](){const _0x433c72=_0x148399;let _0x12da21={'eventID':_0x6e132a[_0x433c72(0x14e)][_0x433c72(0x1de)]};this['_collabSession'][_0x433c72(0x1c9)](_0x12da21,this[_0x433c72(0x1c5)]);}[_0x148399(0x174)](){const _0xb42c8c=_0x148399;this[_0xb42c8c(0x108)]=null,this['_status']!=='presenting'&&this[_0xb42c8c(0x1b7)]();}[_0x148399(0x12c)](_0x11778f){const _0x25fb70=_0x148399;if(this['_status']===_0x25fb70(0x16c)&&this[_0x25fb70(0x108)]===_0x11778f[_0x25fb70(0x1a0)][_0x25fb70(0x173)]){let _0x25b816=(0x0,_0x6e132a[_0x25fb70(0x112)])(_0x11778f['data'])[_0x25fb70(0x181)]['reverse']()[_0x25fb70(0x1da)](_0x17694a=>_0x17694a['id']===_0x31b923[_0x25fb70(0x1d2)]['id']);if(_0x25b816){let _0x77890d=_0x25b816['params'][_0x25fb70(0x1bf)],_0x274c38=_0x25b816[_0x25fb70(0x1ca)][_0x25fb70(0x1b0)]['id'];setTimeout(()=>{const _0x274c7f=_0x25fb70;this[_0x274c7f(0x179)]['executeCommand'](_0x31b923[_0x274c7f(0x192)]['id'],{'unitId':_0x77890d,'subUnitId':_0x274c38},{'fromCollab':!0x0});});}}}[_0x148399(0x12b)](){const _0x5e0a57=_0x148399;this['_status$']['next'](_0x5e0a57(0x10e));let _0x305f91=new Map(),_0x2ab762=this[_0x5e0a57(0x153)]=new _0x4e18f2[(_0x5e0a57(0x129))]();_0x2ab762[_0x5e0a57(0x11b)]((0x0,_0x4e18f2[_0x5e0a57(0x1db)])(()=>{const _0x151462=_0x5e0a57;_0x305f91[_0x151462(0x13c)](_0x290a26=>_0x290a26[_0x151462(0x1eb)]()),_0x305f91['clear']();})),_0x2ab762[_0x5e0a57(0x11b)](this[_0x5e0a57(0x179)][_0x5e0a57(0x10c)](_0x4b29b7=>{const _0x479603=_0x5e0a57;if(_0x4b29b7[_0x479603(0x146)]!==_0x4e18f2['CommandType'][_0x479603(0x18f)]||!this[_0x479603(0x13e)]['shouldShareOperation'](_0x4b29b7['id']))return;let {id:_0x310da5}=_0x4b29b7,_0x269ad5;if(_0x305f91['has'](_0x310da5))_0x269ad5=_0x305f91[_0x479603(0x1c8)](_0x310da5);else{var _0x115369;_0x269ad5=new _0x199065[(_0x479603(0x1cb))](),_0x305f91['set'](_0x310da5,_0x269ad5),_0x269ad5[_0x479603(0x152)]((0x0,_0x5a9512[_0x479603(0x188)])((_0x115369=this[_0x479603(0x1be)][_0x479603(0x199)](_0x479603(0x1c0)))==null?0xc8:_0x115369,void 0x0,{'trailing':!0x0,'leading':!0x0}))[_0x479603(0x18b)](_0x1408cb=>{const _0x5616bc=_0x479603;this[_0x5616bc(0x145)][_0x5616bc(0x1c9)]({'eventID':_0x6e132a[_0x5616bc(0x14e)]['LIVESHARE_OPERATION'],'data':{'unitID':this['_unitID'],'operations':{[_0x1408cb['id']]:{'id':_0x1408cb['id'],'params':JSON['stringify'](_0x1408cb[_0x5616bc(0x1ca)])}}}},this[_0x5616bc(0x1c5)]);});}_0x269ad5[_0x479603(0x12d)](_0x4b29b7);})),this[_0x5e0a57(0x13e)][_0x5e0a57(0x1df)](this['_unitID'])[_0x5e0a57(0x13c)](_0x5685a2=>this[_0x5e0a57(0x145)][_0x5e0a57(0x1c9)]({'eventID':_0x6e132a[_0x5e0a57(0x14e)][_0x5e0a57(0x165)],'data':{'unitID':this[_0x5e0a57(0x1c5)],'operations':{[_0x5685a2['id']]:{'id':_0x5685a2['id'],'params':JSON[_0x5e0a57(0x140)](_0x5685a2[_0x5e0a57(0x1ca)])}}}},this[_0x5e0a57(0x1c5)]));}[_0x148399(0x17f)](){const _0xcc429c=_0x148399;var _0x28b07d;this['_status$'][_0xcc429c(0x12d)](_0xcc429c(0x19d)),(_0x28b07d=this[_0xcc429c(0x153)])==null||_0x28b07d[_0xcc429c(0x14a)](),this[_0xcc429c(0x153)]=null;}[_0x148399(0x11a)](){const _0xee3cb3=_0x148399;var _0x55689b;(_0x55689b=this[_0xee3cb3(0x153)])==null||_0x55689b[_0xee3cb3(0x14a)](),this[_0xee3cb3(0x1d6)][_0xee3cb3(0x12d)](_0xee3cb3(0x16c));}[_0x148399(0x1b7)](){const _0x40596f=_0x148399;var _0x36bfbf;this[_0x40596f(0x1d6)][_0x40596f(0x12d)](_0x40596f(0x19d)),(_0x36bfbf=this[_0x40596f(0x153)])==null||_0x36bfbf['dispose'](),this[_0x40596f(0x153)]=null;}[_0x148399(0x1b8)](){const _0x23b8d6=_0x148399;var _0x3ab02c;this['_status$'][_0x23b8d6(0x12d)](_0x23b8d6(0x193)),(_0x3ab02c=this[_0x23b8d6(0x153)])==null||_0x3ab02c[_0x23b8d6(0x14a)]();}[_0x148399(0x105)](_0x498788){const _0x2faaeb=_0x148399;if(['presenting',_0x2faaeb(0x193),_0x2faaeb(0x1a9)][_0x2faaeb(0x1ac)](this[_0x2faaeb(0x117)])||!_0x498788['data'][_0x2faaeb(0x1b3)]||_0x498788[_0x2faaeb(0x1a0)]['presenter']===this[_0x2faaeb(0x145)][_0x2faaeb(0x1dc)]())return;this[_0x2faaeb(0x117)]===_0x2faaeb(0x19d)&&this[_0x2faaeb(0x11a)]();let _0x6e0cca=_0x498788['data'][_0x2faaeb(0x1aa)];Object['values'](_0x6e0cca)['forEach'](_0x27b1ad=>{const _0xd4c1a4=_0x2faaeb;this[_0xd4c1a4(0x179)][_0xd4c1a4(0x197)](_0x27b1ad['id'],_0x27b1ad[_0xd4c1a4(0x1ca)]?JSON[_0xd4c1a4(0x1b1)](_0x27b1ad[_0xd4c1a4(0x1ca)]):null,{'fromCollab':!0x0});});}[_0x148399(0x1bd)](){const _0x2b61fc=_0x148399;var _0xfa4499;this[_0x2b61fc(0x1d6)]['next'](_0x2b61fc(0x1a9)),(_0xfa4499=this[_0x2b61fc(0x153)])==null||_0xfa4499[_0x2b61fc(0x14a)]();}[_0x148399(0x1cc)](){const _0x22f6a6=_0x148399;this['_status$'][_0x22f6a6(0x12d)](_0x22f6a6(0x19d)),this[_0x22f6a6(0x10b)]();}};_0x316b3f=_0xd70ace([_0x1cd8ab(0x2,_0x4e18f2[_0x148399(0x186)]),_0x1cd8ab(0x3,(0x0,_0x4e18f2[_0x148399(0x15b)])(_0x570c9e)),_0x1cd8ab(0x4,_0x4e18f2['ICommandService'])],_0x316b3f);function _0x5822fc(){const _0x3f52b3=_0x148399;let _0x565aaa=(0x0,_0x335fa2['useDependency'])(_0x30797e),_0x4f7c78=(0x0,_0x335fa2[_0x3f52b3(0x154)])(_0x4e18f2[_0x3f52b3(0x120)]),_0x4287b4=(0x0,_0x335fa2[_0x3f52b3(0x125)])(()=>_0x4f7c78[_0x3f52b3(0x177)](_0x4e18f2['UniverInstanceType']['UNIVER_SHEET']),void 0x0,!0x1,[]),[_0x23c34e,_0x15933c]=(0x0,_0x24b107['useState'])(null),[_0x752978,_0x59b42a]=(0x0,_0x24b107[_0x3f52b3(0x114)])('idle'),_0x52dd89=(0x0,_0x24b107['useRef'])(null);return(0x0,_0x24b107['useEffect'])(()=>(_0x4287b4&&_0x565aaa[_0x3f52b3(0x1a1)](_0x4287b4[_0x3f52b3(0x18c)]())['then'](_0x42851e=>{const _0x4d2cb6=_0x3f52b3;_0x15933c(_0x42851e),_0x52dd89[_0x4d2cb6(0x14b)]=_0x42851e[_0x4d2cb6(0x122)][_0x4d2cb6(0x18b)](_0x4bec62=>{_0x59b42a(_0x4bec62);});}),()=>{const _0x53434d=_0x3f52b3;var _0x354ef0;(_0x354ef0=_0x52dd89[_0x53434d(0x14b)])==null||_0x354ef0[_0x53434d(0x1a3)](),_0x52dd89['current']=null;}),[_0x4287b4,_0x565aaa]),_0x23c34e?(0x0,_0x456158['jsx'])(_0x1800f3['Dropdown'],{'align':_0x3f52b3(0x1d9),'disabled':_0x752978==='offline','className':'univer-box-border\x20univer-min-w-60\x20univer-bg-gray-900\x20univer-px-4\x20univer-py-3\x20univer-text-gray-900\x20dark:!univer-bg-white\x20dark:!univer-text-white','overlay':(0x0,_0x456158['jsx'])(_0x236146,{'status':_0x752978,'coordinator':_0x23c34e}),'children':(0x0,_0x456158[_0x3f52b3(0x182)])(_0x3f52b3(0x119),{'className':(0x0,_0x1800f3[_0x3f52b3(0x198)])(_0x3f52b3(0x191),{'univer-cursor-not-allowed':_0x752978==='offline','univer-cursor-pointer\x20hover:univer-bg-gray-400':_0x752978!==_0x3f52b3(0x1a9)}),'type':_0x3f52b3(0x119),'children':(0x0,_0x456158[_0x3f52b3(0x182)])(_0x45c7ad,{'className':_0x3f52b3(0x1ad)})})}):null;}function _0x236146(_0x3340c1){const _0x4ad164=_0x148399;let {status:_0x26d02d,coordinator:_0x312aaa}=_0x3340c1;switch(_0x26d02d){case'idle':return(0x0,_0x456158[_0x4ad164(0x182)])(_0x339e4e,{'coordinator':_0x312aaa});case _0x4ad164(0x16c):return(0x0,_0x456158[_0x4ad164(0x182)])(_0x16a35e,{'coordinator':_0x312aaa});case _0x4ad164(0x193):return(0x0,_0x456158[_0x4ad164(0x182)])(_0x4f433a,{'coordinator':_0x312aaa});case'offline':return(0x0,_0x456158[_0x4ad164(0x182)])(_0x5e7788,{});case _0x4ad164(0x10e):return(0x0,_0x456158[_0x4ad164(0x182)])(_0x394f5e,{'coordinator':_0x312aaa});default:return null;}}function _0x339e4e(_0x2a5217){const _0xd57334=_0x148399;let {coordinator:_0x597b45}=_0x2a5217;return(0x0,_0x456158[_0xd57334(0x184)])(_0x456158[_0xd57334(0x164)],{'children':[(0x0,_0x456158[_0xd57334(0x182)])(_0xd57334(0x1ae),{'className':_0xd57334(0x1ba),'children':_0xd57334(0x1c1)}),(0x0,_0x456158[_0xd57334(0x182)])(_0x1800f3[_0xd57334(0x1e7)],{'onClick':()=>_0x597b45[_0xd57334(0x106)](),'children':'Start'})]});}function _0x16a35e(_0x319381){const _0x46ebcb=_0x148399;let {coordinator:_0x40e198}=_0x319381;return(0x0,_0x456158[_0x46ebcb(0x184)])(_0x456158[_0x46ebcb(0x164)],{'children':[(0x0,_0x456158[_0x46ebcb(0x182)])(_0x46ebcb(0x1ae),{'className':_0x46ebcb(0x1ba),'children':_0x46ebcb(0x16b)}),(0x0,_0x456158[_0x46ebcb(0x182)])(_0x1800f3['Button'],{'onClick':()=>_0x40e198[_0x46ebcb(0x124)](),'children':_0x46ebcb(0x12e)})]});}function _0x4f433a(_0x4987e5){const _0x49c41b=_0x148399;let {coordinator:_0x21eaf6}=_0x4987e5;return(0x0,_0x456158['jsxs'])(_0x456158[_0x49c41b(0x164)],{'children':[(0x0,_0x456158[_0x49c41b(0x182)])('div',{'className':'univer-mb-3\x20univer-w-full\x20univer-text-sm','children':_0x49c41b(0x1e4)}),(0x0,_0x456158['jsx'])(_0x1800f3[_0x49c41b(0x1e7)],{'variant':'text','onClick':()=>_0x21eaf6[_0x49c41b(0x149)](),'children':_0x49c41b(0x1e6)})]});}function _0x394f5e(_0x453865){const _0x128cb1=_0x148399;let {coordinator:_0x238f35}=_0x453865;return(0x0,_0x456158['jsxs'])(_0x456158['Fragment'],{'children':[(0x0,_0x456158[_0x128cb1(0x182)])(_0x128cb1(0x1ae),{'className':_0x128cb1(0x1ba),'children':'You\x27re\x20presenting\x20the\x20document'}),(0x0,_0x456158['jsx'])(_0x1800f3[_0x128cb1(0x1e7)],{'variant':_0x128cb1(0x17a),'onClick':()=>_0x238f35[_0x128cb1(0x118)](),'children':_0x128cb1(0x1b6)})]});}function _0x5e7788(){const _0x5be2d2=_0x148399;return(0x0,_0x456158[_0x5be2d2(0x182)])(_0x456158[_0x5be2d2(0x164)],{'children':'You\x27are\x20offline.'});}let _0x26f28a=class extends _0x4e18f2[_0x148399(0x138)]{constructor(_0x9deb25,_0x263de4){const _0x3f19c1=_0x148399;super(),this[_0x3f19c1(0x17c)]=_0x9deb25,this['_uiPartsService']=_0x263de4,this[_0x3f19c1(0x19f)]();}[_0x148399(0x19f)](){const _0x2c4e38=_0x148399;this[_0x2c4e38(0x160)](this['_uiPartsService'][_0x2c4e38(0x176)](_0x335fa2['BuiltInUIPart'][_0x2c4e38(0x110)],()=>(0x0,_0x335fa2[_0x2c4e38(0x1a7)])(_0x5822fc,this[_0x2c4e38(0x17c)])));}};_0x26f28a=_0xd70ace([_0x1cd8ab(0x0,(0x0,_0x4e18f2['Inject'])(_0x4e18f2[_0x148399(0x1ec)])),_0x1cd8ab(0x1,_0x335fa2[_0x148399(0x1d7)])],_0x26f28a);var _0x15de9b='@univerjs-pro/live-share',_0xec43d7=_0x148399(0x11f);let _0x1ec066=_0x148399(0x178);Symbol(_0x1ec066);let _0x3a5d16={},_0x37d9a5=class extends _0x4e18f2[_0x148399(0x138)]{constructor(_0x19aa47){const _0x1411ab=_0x148399;super(),this[_0x1411ab(0x13e)]=_0x19aa47,this[_0x1411ab(0x16f)]();}[_0x148399(0x16f)](){const _0x4677e9=_0x148399;[_0x51ce4c[_0x4677e9(0x1c6)]['id'],_0x51ce4c['SetScrollOperation']['id'],_0x31b923[_0x4677e9(0x192)]['id']][_0x4677e9(0x13c)](_0xde950c=>{const _0x1d3776=_0x4677e9;this[_0x1d3776(0x160)](this[_0x1d3776(0x13e)][_0x1d3776(0x180)](_0xde950c));});}};_0x37d9a5=_0xd70ace([_0x1cd8ab(0x0,(0x0,_0x4e18f2['Inject'])(_0x570c9e))],_0x37d9a5);let _0x4b7028=class extends _0x4e18f2['Plugin']{constructor(_0xb1f7f4=_0x3a5d16,_0x31e181,_0x2a38da){const _0x4620ff=_0x148399;super(),this[_0x4620ff(0x14f)]=_0xb1f7f4,this[_0x4620ff(0x17c)]=_0x31e181,this[_0x4620ff(0x1be)]=_0x2a38da;let {..._0x204385}=(0x0,_0x4e18f2[_0x4620ff(0x175)])({},_0x3a5d16,this[_0x4620ff(0x14f)]);this['_configService'][_0x4620ff(0x1b9)](_0x1ec066,_0x204385);}['onStarting'](){const _0x47c596=_0x148399;(0x0,_0x4e18f2['registerDependencies'])(this['_injector'],(0x0,_0x4e18f2[_0x47c596(0x163)])([[_0x570c9e],[_0x30797e],[_0x37d9a5],[_0x26f28a]],this['_config']['override'])),(0x0,_0x4e18f2[_0x47c596(0x133)])(this['_injector'],[[_0x37d9a5]]);}[_0x148399(0x13b)](){const _0x32a963=_0x148399;(0x0,_0x4e18f2['touchDependencies'])(this[_0x32a963(0x17c)],[[_0x26f28a]]);}};_0x4a8b38(_0x4b7028,_0x148399(0x146),_0x4e18f2[_0x148399(0x19a)][_0x148399(0x1e3)]),_0x4a8b38(_0x4b7028,_0x148399(0x167),_0x148399(0x137)),_0x4a8b38(_0x4b7028,'packageName',_0x15de9b),_0x4a8b38(_0x4b7028,_0x148399(0x135),_0xec43d7),_0x4b7028=_0xd70ace([(0x0,_0x4e18f2[_0x148399(0x144)])(_0x3c1f2e[_0x148399(0x162)]),_0x1cd8ab(0x1,(0x0,_0x4e18f2[_0x148399(0x15b)])(_0x4e18f2['Injector'])),_0x1cd8ab(0x2,_0x4e18f2[_0x148399(0x186)])],_0x4b7028),Object[_0x148399(0x1e1)](_0xc15b9e,_0x148399(0x1d8),{'enumerable':!0x0,'get':function(){return _0x26f28a;}}),_0xc15b9e['LiveShare']=_0x5822fc,Object[_0x148399(0x1e1)](_0xc15b9e,_0x148399(0x18e),{'enumerable':!0x0,'get':function(){return _0x30797e;}}),Object[_0x148399(0x1e1)](_0xc15b9e,'LiveShareCoordinator',{'enumerable':!0x0,'get':function(){return _0x316b3f;}}),_0xc15b9e[_0x148399(0x187)]=_0x570c9e,_0xc15b9e['LiveShareStatus']=_0x4be03d,Object[_0x148399(0x1e1)](_0xc15b9e,_0x148399(0x195),{'enumerable':!0x0,'get':function(){return _0x4b7028;}});}));
|
|
1
|
+
function _0x4acf(_0x570229,_0x4d1e01){_0x570229=_0x570229-0xd9;const _0x533e7b=_0x533e();let _0x4acfc3=_0x533e7b[_0x570229];return _0x4acfc3;}function _0x533e(){const _0x5b3ea8=['getUnitId','_handleTerminate','_commandService','Subject','trim','Inject','_handleOffline','UNIVER_SHEET','_collabSessionService','version','fill','Disposable','543696zXlqSz','http://www.w3.org/2000/svg','next','UniverProCollaboration','LIVESHARE_TERMINATE','getInitialStates','Start','operators','defineProperty','executeCommand','LiveShareService','prototype','subscribe','UNIVER_LIVE_SHARE_PLUGIN','CollaborationSessionService','createElement','univer-border-none\x20univer-text-gray-600\x20univer-outline-none','dispose','Stop\x20presenting','decorate','useDependency','_status','set','Module','1em','current','length','displayName','LiveShare','idSuffix','pipe','Present\x20this\x20document','_startFollowing','Plugin','asObservable','_uiPartsService','PRESENTING','157391GlvwiP','following','_injector','map','3250140Grwnxu','dispose$','IUniverInstanceService','_entities','univer-mb-3\x20univer-w-full\x20univer-text-sm','assign','UniverInstanceType','12OhSufR','presenting','entries','LiveShareCoordinator','@univerjs-pro/collaboration-client','registerInitialStateReporter','path','_handleOperation','_liveShareService','add','Injector','FOLLOWING','onStarting','getConfig','init','@univerjs/design','has','DisposableCollection','jsxs','disposeWithMe','_status$','LiveShareStatus','useObservable','@univerjs-pro/live-share','unitId','attrs','complete','operations','NOT_FOLLOWING','IUIPartsService','shouldShareOperation','stringify','function','unsubscribe','HEADER_MENU','text','UniverSheets','delete','UniverIcon','forwardRef','forEach','mutations','sessionStatus$','button','getCurrentTypeOfUnit$','rxjs/operators','RxDisposable','OFFLINE','Stop\x20following','getStatus','Dropdown','M1.98682\x202.73096C1.98682\x202.17867\x202.43457\x201.73096\x202.98682\x201.73096H14.9868C15.5391\x201.73096\x2015.9868\x202.17867\x2015.9868\x202.73096V9.90105C15.9868\x2010.4533\x2015.5391\x2010.901\x2014.9868\x2010.901H9.62183V13.5577H12.9868C13.3375\x2013.5577\x2013.6218\x2013.842\x2013.6218\x2014.1927C13.6218\x2014.5434\x2013.3375\x2014.8277\x2012.9868\x2014.8277H4.98682C4.63611\x2014.8277\x204.35181\x2014.5434\x204.35181\x2014.1927C4.35181\x2013.842\x204.63611\x2013.5577\x204.98682\x2013.5577H8.35181V10.901H2.98682C2.43457\x2010.901\x201.98682\x2010.4533\x201.98682\x209.90105V2.73096ZM3.25684\x209.63106V3.00095H14.7168V9.63106H3.25684Z','@univerjs/ui','get','You\x27re\x20following\x20the\x20presenter','UniverCore','_startLiveShareCoordinator','react','_fetchOperations','data','stopPresenting','evenodd','ONLINE','react/jsx-runtime','SetScrollOperation','DependentOn','LIVESHARE_OPERATION','UniverUi','touchDependencies','React','SetZoomRatioOperation','use','div','constructor','_handleNewChangeSets','live-share-icon','UniverProLiveShare','_stopFollowing','_sharedOperations','clear','toString','_unitID','@univerjs-pro/collaboration','UNIVER_UNKNOWN','IConfigService','CommandType','ICommandService','UniverLiveSharePlugin','_mountLiveShare','values','mergeOverrideWithDependencies','xlink:href','@univerjs/core','rxjs','send','throttleTime','_handleNewHost','You\x27are\x20offline.','find','_handleOnline','sheet','registerSharedOperation','offline','univer-box-border\x20univer-min-w-60\x20univer-bg-gray-900\x20univer-px-4\x20univer-py-3\x20univer-text-gray-900\x20dark:!univer-bg-white\x20dark:!univer-text-white','_commandDisposable','not-following','4408554sxvDYQ','7rCNWSR','replace','2014340ZhZkFF','UniverSheetsUi','tryStartPresenting','BuiltInUIPart','children','string','SAME_OPERATION_SHARE_INTERVAL','registerDependencies','useRef','takeUntil','presenter','substring','LiveShareIcon','LIVESHARE_FETCH_OPERATIONS','symbol','UniverDesign','BehaviorSubject','requireSession','univerjs-icon\x20univerjs-icon-','@univerjs/sheets','@univerjs/sheets-ui','url(#$1','toDisposable','LIVESHARE_REQUEST_HOST','merge','getTypeOfUnitDisposed$','_reporters','6rhobYq','getMemberID','then','end','_stopPresenting','stopFollowing','_init','3440259tDQrPp','idle','startFollowing','params','tag','unit','SessionStatus','InsertSheetMutation','mask','getValue','_config','_configService','object','_presenter','getTypeOfUnitAdded$','You\x27re\x20not\x20following\x20the\x20presenter','event$','random','getOwnPropertyDescriptor','0.22.1','createInstance','colorChannel1','520611CkOjFX','useState','LiveShareController','Button','_univerInstanceService','CollaborationEvent','iterator','LIVESHARE_NEW_HOST','onRendered','type','getLiveShareCoordinator','_collabSession','You\x27re\x20presenting\x20the\x20document','amd','includes','jsx','DesktopLiveShareController','Fragment','exports','toPrimitive'];_0x533e=function(){return _0x5b3ea8;};return _0x533e();}(function(_0x516241,_0x55e86e){const _0x5ef80a=_0x4acf,_0x435f28=_0x516241();while(!![]){try{const _0x106090=-parseInt(_0x5ef80a(0x191))/0x1*(-parseInt(_0x5ef80a(0x12f))/0x2)+-parseInt(_0x5ef80a(0x14c))/0x3*(parseInt(_0x5ef80a(0x19c))/0x4)+parseInt(_0x5ef80a(0x195))/0x5+parseInt(_0x5ef80a(0x111))/0x6*(-parseInt(_0x5ef80a(0x112))/0x7)+-parseInt(_0x5ef80a(0x16c))/0x8+parseInt(_0x5ef80a(0x136))/0x9+parseInt(_0x5ef80a(0x114))/0xa;if(_0x106090===_0x55e86e)break;else _0x435f28['push'](_0x435f28['shift']());}catch(_0x400e44){_0x435f28['push'](_0x435f28['shift']());}}}(_0x533e,0x5d65a),function(_0x23e054,_0x130512){const _0x5e7845=_0x4acf;typeof exports==_0x5e7845(0x142)&&typeof module<'u'?_0x130512(exports,require(`@univerjs/core`),require(`@univerjs/ui`),require(`@univerjs/design`),require(`react`),require(`@univerjs-pro/collaboration`),require(`@univerjs-pro/collaboration-client`),require(`@univerjs/sheets`),require(`rxjs`),require(`rxjs/operators`),require(`react/jsx-runtime`),require(`@univerjs/sheets-ui`)):typeof define=='function'&&define[_0x5e7845(0x159)]?define([_0x5e7845(0x15e),_0x5e7845(0x103),_0x5e7845(0xdb),_0x5e7845(0x1ab),_0x5e7845(0xe0),_0x5e7845(0xf9),_0x5e7845(0x1a0),_0x5e7845(0x127),_0x5e7845(0x104),_0x5e7845(0x1c9),_0x5e7845(0xe6),_0x5e7845(0x128)],_0x130512):(_0x23e054=typeof globalThis<'u'?globalThis:_0x23e054||self,_0x130512(_0x23e054[_0x5e7845(0xf3)]={},_0x23e054[_0x5e7845(0xde)],_0x23e054[_0x5e7845(0xea)],_0x23e054[_0x5e7845(0x123)],_0x23e054[_0x5e7845(0xec)],_0x23e054[_0x5e7845(0x16f)],_0x23e054['UniverProCollaborationClient'],_0x23e054[_0x5e7845(0x1c0)],_0x23e054[_0x5e7845(0x104)],_0x23e054[_0x5e7845(0x104)][_0x5e7845(0x173)],_0x23e054[_0x5e7845(0xec)],_0x23e054[_0x5e7845(0x115)]));}(this,function(_0x509d14,_0x4ada4b,_0x5b77b0,_0x8a090e,_0x5362bb,_0x576a7e,_0x1689a6,_0x1decf1,_0x5c23ac,_0x27168d,_0x2ab539,_0x2743dd){const _0x668e97=_0x4acf;Object[_0x668e97(0x174)](_0x509d14,Symbol['toStringTag'],{'value':_0x668e97(0x183)});function _0x51e5a9({ref:_0xd8389f,..._0x3f5bcc}){const _0x45b05a=_0x668e97;let {icon:_0x5b8171,id:_0xa47585,className:_0x1ca155,extend:_0x543f12,..._0x3b2d89}=_0x3f5bcc,_0x466da8=(_0x45b05a(0x126)+_0xa47585+'\x20'+(_0x1ca155||''))[_0x45b05a(0x164)](),_0x449ed3=(0x0,_0x5362bb[_0x45b05a(0x11c)])('_'+_0x290875());return _0x2b1fa7(_0x5b8171,''+_0xa47585,{'defIds':_0x5b8171['defIds'],'idSuffix':_0x449ed3[_0x45b05a(0x185)]},{'ref':_0xd8389f,'className':_0x466da8,..._0x3b2d89},_0x543f12);}function _0x2b1fa7(_0x15e275,_0x32dd09,_0x4a393e,_0x60d50,_0x3fb241){const _0x4ed8a6=_0x668e97;return(0x0,_0x5362bb[_0x4ed8a6(0x17b)])(_0x15e275[_0x4ed8a6(0x13a)],{'key':_0x32dd09,..._0x14147a(_0x15e275,_0x4a393e,_0x3fb241),..._0x60d50},(_0x46134b(_0x15e275,_0x4a393e)[_0x4ed8a6(0x118)]||[])['map']((_0x18b00d,_0x292059)=>_0x2b1fa7(_0x18b00d,_0x32dd09+'-'+_0x15e275['tag']+'-'+_0x292059,_0x4a393e,void 0x0,_0x3fb241)));}function _0x14147a(_0x9e258,_0x2927ed,_0x354e13){const _0x287704=_0x668e97;let _0x573c8a={..._0x9e258[_0x287704(0x1b5)]};_0x354e13!=null&&_0x354e13['colorChannel1']&&_0x573c8a[_0x287704(0x16a)]===_0x287704(0x14b)&&(_0x573c8a[_0x287704(0x16a)]=_0x354e13[_0x287704(0x14b)]),_0x9e258[_0x287704(0x13a)]==='mask'&&_0x573c8a['id']&&(_0x573c8a['id']+=_0x2927ed[_0x287704(0x189)]),Object['entries'](_0x573c8a)['forEach'](([_0xdf1cfd,_0x326435])=>{const _0x197bfd=_0x287704;_0xdf1cfd===_0x197bfd(0x13e)&&typeof _0x326435==_0x197bfd(0x119)&&(_0x573c8a[_0xdf1cfd]=_0x326435['replace'](/url\(#(.*)\)/,_0x197bfd(0x129)+_0x2927ed['idSuffix']+')'));});let {defIds:_0x3ae0da}=_0x2927ed;return!_0x3ae0da||_0x3ae0da['length']===0x0?_0x573c8a:(_0x9e258['tag']===_0x287704(0xee)&&_0x573c8a[_0x287704(0x102)]&&(_0x573c8a[_0x287704(0x102)]+=_0x2927ed[_0x287704(0x189)]),Object[_0x287704(0x19e)](_0x573c8a)['forEach'](([_0x1fbcf5,_0x30e1ef])=>{const _0x331ed3=_0x287704;typeof _0x30e1ef==_0x331ed3(0x119)&&(_0x573c8a[_0x1fbcf5]=_0x30e1ef[_0x331ed3(0x113)](/url\(#(.*)\)/,'url(#$1'+_0x2927ed['idSuffix']+')'));}),_0x573c8a);}function _0x46134b(_0x58d2c0,_0x3fecc0){const _0xa1a401=_0x668e97;var _0x877a8b;let {defIds:_0x558c53}=_0x3fecc0;return!_0x558c53||_0x558c53[_0xa1a401(0x186)]===0x0?_0x58d2c0:_0x58d2c0[_0xa1a401(0x13a)]==='defs'&&(_0x877a8b=_0x58d2c0[_0xa1a401(0x118)])!=null&&_0x877a8b[_0xa1a401(0x186)]?{..._0x58d2c0,'children':_0x58d2c0[_0xa1a401(0x118)][_0xa1a401(0x194)](_0x213d0c=>typeof _0x213d0c[_0xa1a401(0x1b5)]['id']==_0xa1a401(0x119)&&_0x558c53&&_0x558c53[_0xa1a401(0x15a)](_0x213d0c[_0xa1a401(0x1b5)]['id'])?{..._0x213d0c,'attrs':{..._0x213d0c['attrs'],'id':_0x213d0c[_0xa1a401(0x1b5)]['id']+_0x3fecc0[_0xa1a401(0x189)]}}:_0x213d0c)}:_0x58d2c0;}function _0x290875(){const _0x3d8922=_0x668e97;return Math[_0x3d8922(0x147)]()[_0x3d8922(0xf7)](0x24)[_0x3d8922(0x11f)](0x2,0x8);}_0x51e5a9[_0x668e97(0x187)]=_0x668e97(0x1c2);let _0x2c545d={'tag':'svg','attrs':{'xmlns':_0x668e97(0x16d),'fill':'none','viewBox':'0\x200\x2017\x2017','width':'1em','height':_0x668e97(0x184)},'children':[{'tag':_0x668e97(0x1a2),'attrs':{'fill':'currentColor','d':'M9.20459\x204.90474C9.20459\x204.64763\x209.35535\x204.54174\x209.54053\x204.68737L11.2643\x206.04046C11.4495\x206.18609\x2011.4495\x206.42299\x2011.2643\x206.56789L9.55334\x207.90706C9.36755\x208.05269\x209.20386\x207.90499\x209.20386\x207.68969V6.96785H8.94446C8.19543\x206.96785\x206.72595\x207.28347\x206.37646\x207.89174C6.30786\x208.00322\x206.23572\x207.97884\x206.23572\x207.89174C6.25073\x206.80828\x208.0918\x205.58895\x209.17383\x205.58895H9.20459V4.90474Z'}},{'tag':_0x668e97(0x1a2),'attrs':{'fill':'currentColor','d':_0x668e97(0xda),'fillRule':'evenodd','clipRule':_0x668e97(0xe4)}}]},_0x2e5f60=(0x0,_0x5362bb[_0x668e97(0x1c3)])(function(_0x4059d7,_0x52fa6f){const _0x489bb5=_0x668e97;return(0x0,_0x5362bb['createElement'])(_0x51e5a9,Object[_0x489bb5(0x19a)]({},_0x4059d7,{'id':_0x489bb5(0xf2),'ref':_0x52fa6f,'icon':_0x2c545d}));});_0x2e5f60[_0x668e97(0x187)]=_0x668e97(0x120);function _0x1837a8(_0x944655){'@babel/helpers - typeof';const _0x1dee6a=_0x668e97;return _0x1837a8=typeof Symbol==_0x1dee6a(0x1bc)&&typeof Symbol[_0x1dee6a(0x152)]==_0x1dee6a(0x122)?function(_0x551b8b){return typeof _0x551b8b;}:function(_0x1fb617){const _0xf52961=_0x1dee6a;return _0x1fb617&&typeof Symbol==_0xf52961(0x1bc)&&_0x1fb617[_0xf52961(0xf0)]===Symbol&&_0x1fb617!==Symbol[_0xf52961(0x177)]?_0xf52961(0x122):typeof _0x1fb617;},_0x1837a8(_0x944655);}function _0x16b57b(_0x489494,_0xe7cfd1){const _0x23d001=_0x668e97;if(_0x1837a8(_0x489494)!=_0x23d001(0x142)||!_0x489494)return _0x489494;var _0x366f20=_0x489494[Symbol[_0x23d001(0x15f)]];if(_0x366f20!==void 0x0){var _0x30b4c5=_0x366f20['call'](_0x489494,_0xe7cfd1||'default');if(_0x1837a8(_0x30b4c5)!=_0x23d001(0x142))return _0x30b4c5;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0xe7cfd1===_0x23d001(0x119)?String:Number)(_0x489494);}function _0x3176b8(_0x31229e){const _0x410d20=_0x668e97;var _0x3b1aa4=_0x16b57b(_0x31229e,_0x410d20(0x119));return _0x1837a8(_0x3b1aa4)==_0x410d20(0x122)?_0x3b1aa4:_0x3b1aa4+'';}function _0x461446(_0x238763,_0x5a9c18,_0x5c0bb9){const _0x7d61f7=_0x668e97;return(_0x5a9c18=_0x3176b8(_0x5a9c18))in _0x238763?Object[_0x7d61f7(0x174)](_0x238763,_0x5a9c18,{'value':_0x5c0bb9,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x238763[_0x5a9c18]=_0x5c0bb9,_0x238763;}var _0x2e464f=class extends _0x4ada4b[_0x668e97(0x16b)]{constructor(..._0x18bf99){super(..._0x18bf99),_0x461446(this,'_sharedOperations',new Set()),_0x461446(this,'_reporters',new Set());}['registerSharedOperation'](_0x53c702){const _0x176a6e=_0x668e97;return this['_sharedOperations'][_0x176a6e(0x1a5)](_0x53c702),(0x0,_0x4ada4b[_0x176a6e(0x12a)])(()=>this[_0x176a6e(0xf5)][_0x176a6e(0x1c1)](_0x53c702));}[_0x668e97(0x1a1)](_0x4ce59c){const _0x9d72d9=_0x668e97;return this['_reporters'][_0x9d72d9(0x1a5)](_0x4ce59c),(0x0,_0x4ada4b[_0x9d72d9(0x12a)])(()=>this[_0x9d72d9(0x12e)][_0x9d72d9(0x1c1)](_0x4ce59c));}[_0x668e97(0x1ba)](_0x10eeb4){const _0xaca2b7=_0x668e97;return this[_0xaca2b7(0xf5)]['has'](_0x10eeb4);}[_0x668e97(0x171)](_0x3dd88f){const _0x5a36da=_0x668e97;return Array['from'](this[_0x5a36da(0x12e)])[_0x5a36da(0x194)](_0x555984=>_0x555984(_0x3dd88f));}};function _0x3f0d09(_0x26ebcb,_0x140c04){return function(_0x33bff2,_0x15707e){_0x140c04(_0x33bff2,_0x15707e,_0x26ebcb);};}function _0x1d30ee(_0x51a92e,_0x2183b5,_0x3d8f8c,_0x3978fb){const _0x5a2f28=_0x668e97;var _0x46cf52=arguments[_0x5a2f28(0x186)],_0x90f25a=_0x46cf52<0x3?_0x2183b5:_0x3978fb===null?_0x3978fb=Object[_0x5a2f28(0x148)](_0x2183b5,_0x3d8f8c):_0x3978fb,_0x4eddc7;if(typeof Reflect==_0x5a2f28(0x142)&&typeof Reflect['decorate']==_0x5a2f28(0x1bc))_0x90f25a=Reflect[_0x5a2f28(0x17f)](_0x51a92e,_0x2183b5,_0x3d8f8c,_0x3978fb);else{for(var _0x4c3fe6=_0x51a92e[_0x5a2f28(0x186)]-0x1;_0x4c3fe6>=0x0;_0x4c3fe6--)(_0x4eddc7=_0x51a92e[_0x4c3fe6])&&(_0x90f25a=(_0x46cf52<0x3?_0x4eddc7(_0x90f25a):_0x46cf52>0x3?_0x4eddc7(_0x2183b5,_0x3d8f8c,_0x90f25a):_0x4eddc7(_0x2183b5,_0x3d8f8c))||_0x90f25a);}return _0x46cf52>0x3&&_0x90f25a&&Object[_0x5a2f28(0x174)](_0x2183b5,_0x3d8f8c,_0x90f25a),_0x90f25a;}let _0x4b5a71=class extends _0x4ada4b['RxDisposable']{constructor(_0x5a057f,_0x3c7aea,_0xa88efe){const _0x39db74=_0x668e97;super(),this[_0x39db74(0x150)]=_0x5a057f,this[_0x39db74(0x193)]=_0x3c7aea,this[_0x39db74(0x168)]=_0xa88efe,_0x461446(this,_0x39db74(0x198),new Map()),this['_init']();}async[_0x668e97(0x156)](_0x137649){const _0x488916=_0x668e97;return this[_0x488916(0x198)][_0x488916(0x1ac)](_0x137649)||await this[_0x488916(0xdf)](_0x137649),this[_0x488916(0x198)][_0x488916(0xdc)](_0x137649);}['getLiveShareCoordinatorSync'](_0x152197){const _0x15395a=_0x668e97;var _0xd2ecd9;return(_0xd2ecd9=this[_0x15395a(0x198)][_0x15395a(0xdc)](_0x152197))==null?null:_0xd2ecd9;}[_0x668e97(0x135)](){const _0x2b5d8a=_0x668e97;this['_univerInstanceService'][_0x2b5d8a(0x144)](_0x4ada4b[_0x2b5d8a(0x19b)][_0x2b5d8a(0x167)])[_0x2b5d8a(0x18a)]((0x0,_0x27168d[_0x2b5d8a(0x11d)])(this['dispose$']))[_0x2b5d8a(0x178)](async _0x1350d7=>{const _0x5aeed0=_0x2b5d8a;let _0x2c0b44=_0x1350d7[_0x5aeed0(0x13b)][_0x5aeed0(0x160)]();this['_entities'][_0x5aeed0(0x1ac)](_0x2c0b44)||this[_0x5aeed0(0xdf)](_0x2c0b44);}),this['_univerInstanceService'][_0x2b5d8a(0x12d)](_0x4ada4b[_0x2b5d8a(0x19b)][_0x2b5d8a(0x167)])[_0x2b5d8a(0x18a)]((0x0,_0x27168d[_0x2b5d8a(0x11d)])(this[_0x2b5d8a(0x196)]))[_0x2b5d8a(0x178)](_0x207f64=>{const _0x13d004=_0x2b5d8a;let _0x50d9f9=_0x207f64[_0x13d004(0x160)](),_0x4421ff=this['_entities'][_0x13d004(0xdc)](_0x50d9f9);_0x4421ff==null||_0x4421ff[_0x13d004(0x17d)]();});}async[_0x668e97(0xdf)](_0x25d6ca){const _0x224a84=_0x668e97;let _0x43b7c9=await this[_0x224a84(0x168)][_0x224a84(0x125)](_0x25d6ca),_0x392083=this['_injector'][_0x224a84(0x14a)](_0x375e44,_0x25d6ca,_0x43b7c9);return _0x392083[_0x224a84(0x1aa)](),this[_0x224a84(0x198)]['set'](_0x25d6ca,_0x392083),_0x392083;}};_0x4b5a71=_0x1d30ee([_0x3f0d09(0x0,_0x4ada4b['IUniverInstanceService']),_0x3f0d09(0x1,(0x0,_0x4ada4b[_0x668e97(0x165)])(_0x4ada4b['Injector'])),_0x3f0d09(0x2,(0x0,_0x4ada4b[_0x668e97(0x165)])(_0x1689a6[_0x668e97(0x17a)]))],_0x4b5a71);let _0x568bf0=function(_0x3c44f8){const _0x58e4bd=_0x668e97;return _0x3c44f8[_0x58e4bd(0x1cb)]=_0x58e4bd(0x10d),_0x3c44f8['IDLE']=_0x58e4bd(0x137),_0x3c44f8[_0x58e4bd(0x1a7)]=_0x58e4bd(0x192),_0x3c44f8[_0x58e4bd(0x1b8)]=_0x58e4bd(0x110),_0x3c44f8[_0x58e4bd(0x190)]=_0x58e4bd(0x19d),_0x3c44f8;}({}),_0x375e44=class extends _0x4ada4b[_0x668e97(0x1ca)]{get[_0x668e97(0x181)](){const _0x364735=_0x668e97;return this[_0x364735(0x1b0)][_0x364735(0x13f)]();}constructor(_0x547358,_0x27e676,_0x2d1a06,_0xed2852,_0x56fcce){const _0x31fbf7=_0x668e97;super(),this['_unitID']=_0x547358,this[_0x31fbf7(0x157)]=_0x27e676,this[_0x31fbf7(0x141)]=_0x2d1a06,this[_0x31fbf7(0x1a4)]=_0xed2852,this[_0x31fbf7(0x162)]=_0x56fcce,_0x461446(this,_0x31fbf7(0x1b0),new _0x5c23ac[(_0x31fbf7(0x124))](_0x31fbf7(0x137))),_0x461446(this,'status$',this[_0x31fbf7(0x1b0)][_0x31fbf7(0x18e)]()),_0x461446(this,_0x31fbf7(0x135),!0x1),_0x461446(this,_0x31fbf7(0x10f),null),_0x461446(this,_0x31fbf7(0x143),null);}[_0x668e97(0x17d)](){const _0x510b38=_0x668e97;var _0x138c4b;(_0x138c4b=this[_0x510b38(0x10f)])==null||_0x138c4b[_0x510b38(0x17d)](),this[_0x510b38(0x1b0)]['next'](_0x510b38(0x137)),this[_0x510b38(0x1b0)][_0x510b38(0x1b6)]();}[_0x668e97(0x1cd)](){return this['_status'];}['init'](){const _0x3c2dc6=_0x668e97;this[_0x3c2dc6(0x135)]||(this[_0x3c2dc6(0x135)]=!0x0,this['_collabSession'][_0x3c2dc6(0x1c6)][_0x3c2dc6(0x18a)]((0x0,_0x27168d[_0x3c2dc6(0x11d)])(this[_0x3c2dc6(0x196)]))['subscribe'](_0x4de4ec=>{const _0x185d27=_0x3c2dc6;switch(_0x4de4ec){case _0x1689a6[_0x185d27(0x13c)][_0x185d27(0x1cb)]:this['_handleOffline']();break;case _0x1689a6['SessionStatus'][_0x185d27(0xe5)]:this['_handleOnline']();break;default:}}),this['_collabSession'][_0x3c2dc6(0x146)]['pipe']((0x0,_0x27168d['takeUntil'])(this[_0x3c2dc6(0x196)]))[_0x3c2dc6(0x178)](_0x148479=>{const _0x488033=_0x3c2dc6;let {eventID:_0x2b9c92}=_0x148479;switch(_0x2b9c92){case _0x576a7e['CollaborationEvent'][_0x488033(0x153)]:this[_0x488033(0x107)](_0x148479);break;case _0x576a7e[_0x488033(0x151)][_0x488033(0xe9)]:this[_0x488033(0x1a3)](_0x148479);break;case _0x576a7e[_0x488033(0x151)][_0x488033(0x170)]:this['_handleTerminate']();break;case _0x576a7e[_0x488033(0x151)]['NEW_CHANGESETS']:this[_0x488033(0xf1)](_0x148479);break;default:}}));}[_0x668e97(0x116)](){const _0x104cf2=_0x668e97;this[_0x104cf2(0x157)][_0x104cf2(0x105)]({'eventID':_0x576a7e[_0x104cf2(0x151)][_0x104cf2(0x12b)],'data':{'unitID':this[_0x104cf2(0xf8)],'userID':this[_0x104cf2(0x157)]['getMemberID']()}},this[_0x104cf2(0xf8)]);}[_0x668e97(0xe3)](){const _0x306558=_0x668e97;this[_0x306558(0x181)]===_0x306558(0x19d)&&(this[_0x306558(0x1b0)]['next'](_0x306558(0x137)),this[_0x306558(0x157)][_0x306558(0x105)]({'eventID':_0x576a7e['CollaborationEvent'][_0x306558(0x170)],'data':{'unitID':this[_0x306558(0xf8)]}},this[_0x306558(0xf8)]));}['startFollowing'](){const _0x2a9175=_0x668e97;this['_status']==='not-following'&&(this[_0x2a9175(0x1b0)][_0x2a9175(0x16e)]('following'),this[_0x2a9175(0x18c)]());}[_0x668e97(0x134)](){const _0xb04d4=_0x668e97;this[_0xb04d4(0x181)]===_0xb04d4(0x192)&&this['_stopFollowing']();}['_handleNewHost'](_0x4e2231){const _0x3c060e=_0x668e97;let {presenter:_0xd037a4}=_0x4e2231['data'],_0x2b8662=this[_0x3c060e(0x157)]['getMemberID']();this['_presenter']=_0xd037a4,_0xd037a4===_0x2b8662?(this[_0x3c060e(0xf4)](),this['_startPresenting']()):this['_status']!==_0x3c060e(0x110)&&(this['_stopPresenting'](),this[_0x3c060e(0x18c)]());}[_0x668e97(0xe1)](){const _0x147576=_0x668e97;let _0x458823={'eventID':_0x576a7e[_0x147576(0x151)][_0x147576(0x121)]};this[_0x147576(0x157)][_0x147576(0x105)](_0x458823,this[_0x147576(0xf8)]);}[_0x668e97(0x161)](){const _0x253c9e=_0x668e97;this[_0x253c9e(0x143)]=null,this[_0x253c9e(0x181)]!=='presenting'&&this['_beIdle']();}[_0x668e97(0xf1)](_0x1cc2e7){const _0xf391b0=_0x668e97;if(this[_0xf391b0(0x181)]===_0xf391b0(0x192)&&this[_0xf391b0(0x143)]===_0x1cc2e7[_0xf391b0(0xe2)]['memberID']){let _0x2c3c6c=(0x0,_0x576a7e['parseProtocolChangeset'])(_0x1cc2e7['data'])[_0xf391b0(0x1c5)]['reverse']()[_0xf391b0(0x109)](_0xd5f412=>_0xd5f412['id']===_0x1decf1[_0xf391b0(0x13d)]['id']);if(_0x2c3c6c){let _0x5b2174=_0x2c3c6c['params'][_0xf391b0(0x1b4)],_0x6c73ce=_0x2c3c6c[_0xf391b0(0x139)][_0xf391b0(0x10b)]['id'];setTimeout(()=>{const _0xbc6f1f=_0xf391b0;this[_0xbc6f1f(0x162)]['executeCommand'](_0x1decf1['SetWorksheetActiveOperation']['id'],{'unitId':_0x5b2174,'subUnitId':_0x6c73ce},{'fromCollab':!0x0});});}}}['_startPresenting'](){const _0x2a8bab=_0x668e97;this[_0x2a8bab(0x1b0)][_0x2a8bab(0x16e)](_0x2a8bab(0x19d));let _0x4ef9d0=new Map(),_0x2f4937=this[_0x2a8bab(0x10f)]=new _0x4ada4b[(_0x2a8bab(0x1ad))]();_0x2f4937[_0x2a8bab(0x1a5)]((0x0,_0x4ada4b[_0x2a8bab(0x12a)])(()=>{const _0x3bd13b=_0x2a8bab;_0x4ef9d0[_0x3bd13b(0x1c4)](_0x1a323b=>_0x1a323b['complete']()),_0x4ef9d0[_0x3bd13b(0xf6)]();})),_0x2f4937['add'](this[_0x2a8bab(0x162)]['onCommandExecuted'](_0x117ed1=>{const _0x330c91=_0x2a8bab;if(_0x117ed1[_0x330c91(0x155)]!==_0x4ada4b[_0x330c91(0xfc)]['OPERATION']||!this[_0x330c91(0x1a4)][_0x330c91(0x1ba)](_0x117ed1['id']))return;let {id:_0x295144}=_0x117ed1,_0x1c0f24;if(_0x4ef9d0['has'](_0x295144))_0x1c0f24=_0x4ef9d0[_0x330c91(0xdc)](_0x295144);else{var _0x1b1d71;_0x1c0f24=new _0x5c23ac[(_0x330c91(0x163))](),_0x4ef9d0[_0x330c91(0x182)](_0x295144,_0x1c0f24),_0x1c0f24['pipe']((0x0,_0x27168d[_0x330c91(0x106)])((_0x1b1d71=this[_0x330c91(0x141)][_0x330c91(0x1a9)](_0x330c91(0x11a)))==null?0xc8:_0x1b1d71,void 0x0,{'trailing':!0x0,'leading':!0x0}))[_0x330c91(0x178)](_0x223fde=>{const _0x1cb983=_0x330c91;this[_0x1cb983(0x157)][_0x1cb983(0x105)]({'eventID':_0x576a7e[_0x1cb983(0x151)][_0x1cb983(0xe9)],'data':{'unitID':this[_0x1cb983(0xf8)],'operations':{[_0x223fde['id']]:{'id':_0x223fde['id'],'params':JSON[_0x1cb983(0x1bb)](_0x223fde[_0x1cb983(0x139)])}}}},this[_0x1cb983(0xf8)]);});}_0x1c0f24['next'](_0x117ed1);})),this[_0x2a8bab(0x1a4)][_0x2a8bab(0x171)](this[_0x2a8bab(0xf8)])['forEach'](_0x4c850a=>this[_0x2a8bab(0x157)][_0x2a8bab(0x105)]({'eventID':_0x576a7e[_0x2a8bab(0x151)][_0x2a8bab(0xe9)],'data':{'unitID':this[_0x2a8bab(0xf8)],'operations':{[_0x4c850a['id']]:{'id':_0x4c850a['id'],'params':JSON[_0x2a8bab(0x1bb)](_0x4c850a[_0x2a8bab(0x139)])}}}},this['_unitID']));}[_0x668e97(0x133)](){const _0x535f65=_0x668e97;var _0x1fd202;this[_0x535f65(0x1b0)][_0x535f65(0x16e)](_0x535f65(0x137)),(_0x1fd202=this['_commandDisposable'])==null||_0x1fd202[_0x535f65(0x17d)](),this[_0x535f65(0x10f)]=null;}['_startFollowing'](){const _0x20bcb9=_0x668e97;var _0x1cb0ea;(_0x1cb0ea=this[_0x20bcb9(0x10f)])==null||_0x1cb0ea[_0x20bcb9(0x17d)](),this['_status$'][_0x20bcb9(0x16e)](_0x20bcb9(0x192));}['_beIdle'](){const _0x4b27fb=_0x668e97;var _0x5585fd;this[_0x4b27fb(0x1b0)]['next']('idle'),(_0x5585fd=this['_commandDisposable'])==null||_0x5585fd[_0x4b27fb(0x17d)](),this[_0x4b27fb(0x10f)]=null;}['_stopFollowing'](){const _0x151455=_0x668e97;var _0x58c848;this[_0x151455(0x1b0)]['next'](_0x151455(0x110)),(_0x58c848=this['_commandDisposable'])==null||_0x58c848[_0x151455(0x17d)]();}['_handleOperation'](_0x5b514b){const _0x2bf4c0=_0x668e97;if([_0x2bf4c0(0x19d),_0x2bf4c0(0x110),_0x2bf4c0(0x10d)][_0x2bf4c0(0x15a)](this['_status'])||!_0x5b514b['data'][_0x2bf4c0(0x11e)]||_0x5b514b['data'][_0x2bf4c0(0x11e)]===this[_0x2bf4c0(0x157)][_0x2bf4c0(0x130)]())return;this[_0x2bf4c0(0x181)]===_0x2bf4c0(0x137)&&this['_startFollowing']();let _0x5dd79e=_0x5b514b[_0x2bf4c0(0xe2)][_0x2bf4c0(0x1b7)];Object[_0x2bf4c0(0x100)](_0x5dd79e)[_0x2bf4c0(0x1c4)](_0x33cda4=>{const _0x39b57d=_0x2bf4c0;this[_0x39b57d(0x162)][_0x39b57d(0x175)](_0x33cda4['id'],_0x33cda4[_0x39b57d(0x139)]?JSON['parse'](_0x33cda4[_0x39b57d(0x139)]):null,{'fromCollab':!0x0});});}[_0x668e97(0x166)](){const _0xb08d3c=_0x668e97;var _0x31ff25;this['_status$'][_0xb08d3c(0x16e)](_0xb08d3c(0x10d)),(_0x31ff25=this[_0xb08d3c(0x10f)])==null||_0x31ff25[_0xb08d3c(0x17d)]();}[_0x668e97(0x10a)](){const _0x3ef1a9=_0x668e97;this[_0x3ef1a9(0x1b0)][_0x3ef1a9(0x16e)](_0x3ef1a9(0x137)),this[_0x3ef1a9(0xe1)]();}};_0x375e44=_0x1d30ee([_0x3f0d09(0x2,_0x4ada4b[_0x668e97(0xfb)]),_0x3f0d09(0x3,(0x0,_0x4ada4b['Inject'])(_0x2e464f)),_0x3f0d09(0x4,_0x4ada4b[_0x668e97(0xfd)])],_0x375e44);function _0x5304a6(){const _0x5daefb=_0x668e97;let _0x5adb8e=(0x0,_0x5b77b0[_0x5daefb(0x180)])(_0x4b5a71),_0x1b0ef6=(0x0,_0x5b77b0[_0x5daefb(0x180)])(_0x4ada4b[_0x5daefb(0x197)]),_0x1ca0c5=(0x0,_0x5b77b0[_0x5daefb(0x1b2)])(()=>_0x1b0ef6[_0x5daefb(0x1c8)](_0x4ada4b[_0x5daefb(0x19b)][_0x5daefb(0x167)]),void 0x0,!0x1,[]),[_0x5d4bf0,_0x3da85f]=(0x0,_0x5362bb[_0x5daefb(0x14d)])(null),[_0x3f2775,_0x3c5ec7]=(0x0,_0x5362bb[_0x5daefb(0x14d)])(_0x5daefb(0x137)),_0x2ab773=(0x0,_0x5362bb[_0x5daefb(0x11c)])(null);return(0x0,_0x5362bb['useEffect'])(()=>(_0x1ca0c5&&_0x5adb8e[_0x5daefb(0x156)](_0x1ca0c5[_0x5daefb(0x160)]())[_0x5daefb(0x131)](_0x1733db=>{_0x3da85f(_0x1733db),_0x2ab773['current']=_0x1733db['status$']['subscribe'](_0x62cb4c=>{_0x3c5ec7(_0x62cb4c);});}),()=>{const _0x32db82=_0x5daefb;var _0x2275cf;(_0x2275cf=_0x2ab773['current'])==null||_0x2275cf[_0x32db82(0x1bd)](),_0x2ab773[_0x32db82(0x185)]=null;}),[_0x1ca0c5,_0x5adb8e]),_0x5d4bf0?(0x0,_0x2ab539[_0x5daefb(0x15b)])(_0x8a090e[_0x5daefb(0xd9)],{'align':_0x5daefb(0x132),'disabled':_0x3f2775===_0x5daefb(0x10d),'className':_0x5daefb(0x10e),'overlay':(0x0,_0x2ab539[_0x5daefb(0x15b)])(_0x22c476,{'status':_0x3f2775,'coordinator':_0x5d4bf0}),'children':(0x0,_0x2ab539[_0x5daefb(0x15b)])(_0x5daefb(0x1c7),{'className':(0x0,_0x8a090e['clsx'])(_0x5daefb(0x17c),{'univer-cursor-not-allowed':_0x3f2775===_0x5daefb(0x10d),'univer-cursor-pointer\x20hover:univer-bg-gray-400':_0x3f2775!=='offline'}),'type':'button','children':(0x0,_0x2ab539[_0x5daefb(0x15b)])(_0x2e5f60,{'className':'univer-size-4'})})}):null;}function _0x22c476(_0x82fa53){const _0x3e9572=_0x668e97;let {status:_0x39eb34,coordinator:_0x51d2b2}=_0x82fa53;switch(_0x39eb34){case _0x3e9572(0x137):return(0x0,_0x2ab539['jsx'])(_0xb5b0f5,{'coordinator':_0x51d2b2});case _0x3e9572(0x192):return(0x0,_0x2ab539[_0x3e9572(0x15b)])(_0x513f6e,{'coordinator':_0x51d2b2});case _0x3e9572(0x110):return(0x0,_0x2ab539[_0x3e9572(0x15b)])(_0x2eb9e2,{'coordinator':_0x51d2b2});case'offline':return(0x0,_0x2ab539[_0x3e9572(0x15b)])(_0x358b38,{});case'presenting':return(0x0,_0x2ab539[_0x3e9572(0x15b)])(_0x39b430,{'coordinator':_0x51d2b2});default:return null;}}function _0xb5b0f5(_0x3ee953){const _0x43d2d6=_0x668e97;let {coordinator:_0x2fa69c}=_0x3ee953;return(0x0,_0x2ab539[_0x43d2d6(0x1ae)])(_0x2ab539[_0x43d2d6(0x15d)],{'children':[(0x0,_0x2ab539[_0x43d2d6(0x15b)])(_0x43d2d6(0xef),{'className':'univer-mb-3\x20univer-w-full\x20univer-text-sm','children':_0x43d2d6(0x18b)}),(0x0,_0x2ab539['jsx'])(_0x8a090e[_0x43d2d6(0x14f)],{'onClick':()=>_0x2fa69c[_0x43d2d6(0x116)](),'children':_0x43d2d6(0x172)})]});}function _0x513f6e(_0x200ae7){const _0x155fc5=_0x668e97;let {coordinator:_0x39562b}=_0x200ae7;return(0x0,_0x2ab539[_0x155fc5(0x1ae)])(_0x2ab539[_0x155fc5(0x15d)],{'children':[(0x0,_0x2ab539[_0x155fc5(0x15b)])('div',{'className':_0x155fc5(0x199),'children':_0x155fc5(0xdd)}),(0x0,_0x2ab539['jsx'])(_0x8a090e['Button'],{'onClick':()=>_0x39562b['stopFollowing'](),'children':_0x155fc5(0x1cc)})]});}function _0x2eb9e2(_0x551a5c){const _0x4ab5b6=_0x668e97;let {coordinator:_0x5860d5}=_0x551a5c;return(0x0,_0x2ab539[_0x4ab5b6(0x1ae)])(_0x2ab539[_0x4ab5b6(0x15d)],{'children':[(0x0,_0x2ab539['jsx'])(_0x4ab5b6(0xef),{'className':_0x4ab5b6(0x199),'children':_0x4ab5b6(0x145)}),(0x0,_0x2ab539[_0x4ab5b6(0x15b)])(_0x8a090e[_0x4ab5b6(0x14f)],{'variant':_0x4ab5b6(0x1bf),'onClick':()=>_0x5860d5[_0x4ab5b6(0x138)](),'children':'Start\x20following'})]});}function _0x39b430(_0x411358){const _0x42e27f=_0x668e97;let {coordinator:_0x59f0e4}=_0x411358;return(0x0,_0x2ab539[_0x42e27f(0x1ae)])(_0x2ab539[_0x42e27f(0x15d)],{'children':[(0x0,_0x2ab539[_0x42e27f(0x15b)])(_0x42e27f(0xef),{'className':_0x42e27f(0x199),'children':_0x42e27f(0x158)}),(0x0,_0x2ab539[_0x42e27f(0x15b)])(_0x8a090e[_0x42e27f(0x14f)],{'variant':'default','onClick':()=>_0x59f0e4[_0x42e27f(0xe3)](),'children':_0x42e27f(0x17e)})]});}function _0x358b38(){const _0x2ddf6f=_0x668e97;return(0x0,_0x2ab539['jsx'])(_0x2ab539[_0x2ddf6f(0x15d)],{'children':_0x2ddf6f(0x108)});}let _0x3ceac7=class extends _0x4ada4b[_0x668e97(0x16b)]{constructor(_0x3d1084,_0x40be2c){const _0x50f99f=_0x668e97;super(),this[_0x50f99f(0x193)]=_0x3d1084,this[_0x50f99f(0x18f)]=_0x40be2c,this[_0x50f99f(0xff)]();}['_mountLiveShare'](){const _0x27a0d6=_0x668e97;this['disposeWithMe'](this[_0x27a0d6(0x18f)]['registerComponent'](_0x5b77b0[_0x27a0d6(0x117)][_0x27a0d6(0x1be)],()=>(0x0,_0x5b77b0['connectInjector'])(_0x5304a6,this[_0x27a0d6(0x193)])));}};_0x3ceac7=_0x1d30ee([_0x3f0d09(0x0,(0x0,_0x4ada4b[_0x668e97(0x165)])(_0x4ada4b['Injector'])),_0x3f0d09(0x1,_0x5b77b0[_0x668e97(0x1b9)])],_0x3ceac7);var _0x21d473=_0x668e97(0x1b3),_0x277c6d=_0x668e97(0x149);let _0x30272c='live-share.config';Symbol(_0x30272c);let _0x5a6ea8={},_0x28a659=class extends _0x4ada4b[_0x668e97(0x16b)]{constructor(_0x241b7c){super(),this['_liveShareService']=_0x241b7c,this['_init']();}[_0x668e97(0x135)](){const _0x3bd495=_0x668e97;[_0x2743dd[_0x3bd495(0xed)]['id'],_0x2743dd[_0x3bd495(0xe7)]['id'],_0x1decf1['SetWorksheetActiveOperation']['id']][_0x3bd495(0x1c4)](_0x320708=>{const _0x1f1b78=_0x3bd495;this[_0x1f1b78(0x1af)](this['_liveShareService'][_0x1f1b78(0x10c)](_0x320708));});}};_0x28a659=_0x1d30ee([_0x3f0d09(0x0,(0x0,_0x4ada4b['Inject'])(_0x2e464f))],_0x28a659);let _0xfdf134=class extends _0x4ada4b[_0x668e97(0x18d)]{constructor(_0x2c46cc=_0x5a6ea8,_0x18bd58,_0x334320){const _0x5f24c1=_0x668e97;super(),this[_0x5f24c1(0x140)]=_0x2c46cc,this['_injector']=_0x18bd58,this[_0x5f24c1(0x141)]=_0x334320;let {..._0x7e778c}=(0x0,_0x4ada4b[_0x5f24c1(0x12c)])({},_0x5a6ea8,this['_config']);this[_0x5f24c1(0x141)]['setConfig'](_0x30272c,_0x7e778c);}[_0x668e97(0x1a8)](){const _0x5300b5=_0x668e97;(0x0,_0x4ada4b[_0x5300b5(0x11b)])(this[_0x5300b5(0x193)],(0x0,_0x4ada4b[_0x5300b5(0x101)])([[_0x2e464f],[_0x4b5a71],[_0x28a659],[_0x3ceac7]],this[_0x5300b5(0x140)]['override'])),(0x0,_0x4ada4b[_0x5300b5(0xeb)])(this[_0x5300b5(0x193)],[[_0x28a659]]);}[_0x668e97(0x154)](){const _0x2182d7=_0x668e97;(0x0,_0x4ada4b['touchDependencies'])(this[_0x2182d7(0x193)],[[_0x3ceac7]]);}};_0x461446(_0xfdf134,'type',_0x4ada4b[_0x668e97(0x19b)][_0x668e97(0xfa)]),_0x461446(_0xfdf134,'pluginName',_0x668e97(0x179)),_0x461446(_0xfdf134,'packageName',_0x21d473),_0x461446(_0xfdf134,_0x668e97(0x169),_0x277c6d),_0xfdf134=_0x1d30ee([(0x0,_0x4ada4b[_0x668e97(0xe8)])(_0x1689a6['UniverCollaborationClientPlugin']),_0x3f0d09(0x1,(0x0,_0x4ada4b[_0x668e97(0x165)])(_0x4ada4b[_0x668e97(0x1a6)])),_0x3f0d09(0x2,_0x4ada4b['IConfigService'])],_0xfdf134),Object[_0x668e97(0x174)](_0x509d14,_0x668e97(0x15c),{'enumerable':!0x0,'get':function(){return _0x3ceac7;}}),_0x509d14[_0x668e97(0x188)]=_0x5304a6,Object[_0x668e97(0x174)](_0x509d14,_0x668e97(0x14e),{'enumerable':!0x0,'get':function(){return _0x4b5a71;}}),Object[_0x668e97(0x174)](_0x509d14,_0x668e97(0x19f),{'enumerable':!0x0,'get':function(){return _0x375e44;}}),_0x509d14[_0x668e97(0x176)]=_0x2e464f,_0x509d14[_0x668e97(0x1b1)]=_0x568bf0,Object[_0x668e97(0x174)](_0x509d14,_0x668e97(0xfe),{'enumerable':!0x0,'get':function(){return _0xfdf134;}});}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/live-share",
|
|
3
|
-
"version": "0.22.
|
|
3
|
+
"version": "0.22.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Live share collaboration plugin for Univer Pro.",
|
|
6
6
|
"author": "DreamNum Co., Ltd. <developer@univer.ai>",
|
|
@@ -63,13 +63,13 @@
|
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
65
|
"@univerjs/icons": "^1.1.1",
|
|
66
|
-
"@univerjs
|
|
67
|
-
"@univerjs/
|
|
68
|
-
"@univerjs-pro/collaboration
|
|
69
|
-
"@univerjs/
|
|
70
|
-
"@univerjs/
|
|
71
|
-
"@univerjs/ui": "0.22.
|
|
72
|
-
"@univerjs/sheets": "0.22.
|
|
66
|
+
"@univerjs/core": "0.22.1",
|
|
67
|
+
"@univerjs/design": "0.22.1",
|
|
68
|
+
"@univerjs-pro/collaboration": "0.22.1",
|
|
69
|
+
"@univerjs-pro/collaboration-client": "0.22.1",
|
|
70
|
+
"@univerjs/sheets-ui": "0.22.1",
|
|
71
|
+
"@univerjs/ui": "0.22.1",
|
|
72
|
+
"@univerjs/sheets": "0.22.1"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
75
|
"postcss": "^8.5.10",
|
|
@@ -78,8 +78,8 @@
|
|
|
78
78
|
"tailwindcss": "^3.4.17",
|
|
79
79
|
"typescript": "^6.0.3",
|
|
80
80
|
"vitest": "^4.1.4",
|
|
81
|
-
"@univerjs-infra/shared": "0.22.
|
|
82
|
-
"@univerjs/protocol": "0.22.
|
|
81
|
+
"@univerjs-infra/shared": "0.22.1",
|
|
82
|
+
"@univerjs/protocol": "0.22.1"
|
|
83
83
|
},
|
|
84
84
|
"scripts": {
|
|
85
85
|
"test": "vitest run",
|