@univerjs-pro/live-share 0.22.1 → 0.23.0

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 CHANGED
@@ -1 +1 @@
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);
1
+ const _0x8aa14=_0x4a91;(function(_0x2026e0,_0x290fbe){const _0xef1d6c=_0x4a91,_0x37dcd5=_0x2026e0();while(!![]){try{const _0x3bacee=-parseInt(_0xef1d6c(0x106))/0x1+parseInt(_0xef1d6c(0xf1))/0x2*(-parseInt(_0xef1d6c(0x108))/0x3)+parseInt(_0xef1d6c(0xfe))/0x4+parseInt(_0xef1d6c(0x109))/0x5*(-parseInt(_0xef1d6c(0x10f))/0x6)+parseInt(_0xef1d6c(0x100))/0x7+parseInt(_0xef1d6c(0x107))/0x8*(-parseInt(_0xef1d6c(0xf8))/0x9)+parseInt(_0xef1d6c(0xf7))/0xa;if(_0x3bacee===_0x290fbe)break;else _0x37dcd5['push'](_0x37dcd5['shift']());}catch(_0x11c35c){_0x37dcd5['push'](_0x37dcd5['shift']());}}}(_0x1b01,0x645d4));function _0x4a91(_0x52f9a2,_0x2ff015){_0x52f9a2=_0x52f9a2-0xe7;const _0x1b0198=_0x1b01();let _0x4a91d9=_0x1b0198[_0x52f9a2];return _0x4a91d9;}let e=require(`@univerjs-pro/live-share`),t=require(`@univerjs/core`),n=require(`@univerjs/core/facade`);function r(_0x5278b8){'@babel/helpers - typeof';const _0x3d7acc=_0x4a91;return r=typeof Symbol==_0x3d7acc(0xf5)&&typeof Symbol[_0x3d7acc(0xfb)]==_0x3d7acc(0xf2)?function(_0x1f7b0b){return typeof _0x1f7b0b;}:function(_0x517f2a){const _0x1ff661=_0x3d7acc;return _0x517f2a&&typeof Symbol==_0x1ff661(0xf5)&&_0x517f2a['constructor']===Symbol&&_0x517f2a!==Symbol['prototype']?_0x1ff661(0xf2):typeof _0x517f2a;},r(_0x5278b8);}function i(_0x1ccc24,_0x48f462){const _0x2cbd9c=_0x4a91;if(r(_0x1ccc24)!=_0x2cbd9c(0xfa)||!_0x1ccc24)return _0x1ccc24;var _0x57df43=_0x1ccc24[Symbol['toPrimitive']];if(_0x57df43!==void 0x0){var _0x1e2be8=_0x57df43[_0x2cbd9c(0xf4)](_0x1ccc24,_0x48f462||_0x2cbd9c(0xee));if(r(_0x1e2be8)!=_0x2cbd9c(0xfa))return _0x1e2be8;throw TypeError(_0x2cbd9c(0xe8));}return(_0x48f462==='string'?String:Number)(_0x1ccc24);}function a(_0x11203){const _0x133609=_0x4a91;var _0x463bc0=i(_0x11203,_0x133609(0xf9));return r(_0x463bc0)==_0x133609(0xf2)?_0x463bc0:_0x463bc0+'';}function _0x1b01(){const _0x25dd62=['startFollowing','stopFollowing','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','UNIVER_SHEET','UniverInstanceType','No\x20LiveShareCoordinator\x20found\x20for\x20the\x20active\x20workbook.','LiveShareStatus','FEnum','default','_injector','IUniverInstanceService','106KAjqGK','symbol','getUnitId','call','function','tryStartPresenting','9403570vivkkx','45wHMtMG','string','object','iterator','get','startPresenting','2138592DxyXBJ','extend','3025190sYEjAF','LiveShareStatusEnum','getLiveShareCoordinatorSync','No\x20active\x20workbook\x20found.','getStatus','_liveShareController','238830FQOJjK','832072ZAvhAP','38091qBvXPO','321335LRyAsB','stopPresenting','_initialize','getCurrentUnitOfType','defineProperty','getLiveShareStatus','6UyRmNi','LiveShareController','FUniver'];_0x1b01=function(){return _0x25dd62;};return _0x1b01();}function o(_0x4aef7d,_0x363e6c,_0x571e56){const _0x3a2dfe=_0x4a91;return(_0x363e6c=a(_0x363e6c))in _0x4aef7d?Object[_0x3a2dfe(0x10d)](_0x4aef7d,_0x363e6c,{'value':_0x571e56,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x4aef7d[_0x363e6c]=_0x571e56,_0x4aef7d;}var s=class extends n[_0x8aa14(0x111)]{constructor(..._0x370392){const _0x43776a=_0x8aa14;super(..._0x370392),o(this,_0x43776a(0x105),void 0x0);}[_0x8aa14(0x10b)](_0x2d2534){const _0x1faf41=_0x8aa14;this['_liveShareController']=_0x2d2534[_0x1faf41(0xfc)](e[_0x1faf41(0x110)]);}[_0x8aa14(0x10e)](){const _0x547fa0=_0x8aa14;var _0x35582d;let _0x21067=this[_0x547fa0(0xef)]['get'](t['IUniverInstanceService'])[_0x547fa0(0x10c)](t['UniverInstanceType'][_0x547fa0(0xe9)]);if(!_0x21067)throw Error(_0x547fa0(0x103));let _0x5439b1=_0x21067['getUnitId'](),_0x125e9f=this[_0x547fa0(0x105)]['getLiveShareCoordinatorSync'](_0x5439b1);return(_0x35582d=_0x125e9f==null?void 0x0:_0x125e9f[_0x547fa0(0x104)]())==null?e[_0x547fa0(0xec)]['IDLE']:_0x35582d;}['startFollowing'](){const _0x560e43=_0x8aa14;let _0x1dce19=this[_0x560e43(0xef)][_0x560e43(0xfc)](t[_0x560e43(0xf0)])[_0x560e43(0x10c)](t['UniverInstanceType'][_0x560e43(0xe9)]);if(!_0x1dce19)throw Error('No\x20active\x20workbook\x20found.');let _0xfd495f=_0x1dce19['getUnitId'](),_0x53603a=this['_liveShareController'][_0x560e43(0x102)](_0xfd495f);if(!_0x53603a)throw Error('No\x20LiveShareCoordinator\x20found\x20for\x20the\x20active\x20workbook.');_0x53603a[_0x560e43(0x112)]();}[_0x8aa14(0xe7)](){const _0x23b40c=_0x8aa14;let _0x45c47f=this[_0x23b40c(0xef)][_0x23b40c(0xfc)](t['IUniverInstanceService'])[_0x23b40c(0x10c)](t[_0x23b40c(0xea)]['UNIVER_SHEET']);if(!_0x45c47f)throw Error(_0x23b40c(0x103));let _0x30a403=_0x45c47f[_0x23b40c(0xf3)](),_0x30f87c=this[_0x23b40c(0x105)][_0x23b40c(0x102)](_0x30a403);if(!_0x30f87c)throw Error(_0x23b40c(0xeb));_0x30f87c['stopFollowing']();}[_0x8aa14(0xfd)](){const _0x3d4c63=_0x8aa14;let _0x179ce2=this[_0x3d4c63(0xef)][_0x3d4c63(0xfc)](t['IUniverInstanceService'])[_0x3d4c63(0x10c)](t['UniverInstanceType'][_0x3d4c63(0xe9)]);if(!_0x179ce2)throw Error(_0x3d4c63(0x103));let _0x2df96c=_0x179ce2[_0x3d4c63(0xf3)](),_0x371d6d=this['_liveShareController']['getLiveShareCoordinatorSync'](_0x2df96c);if(!_0x371d6d)throw Error(_0x3d4c63(0xeb));_0x371d6d[_0x3d4c63(0xf6)]();}[_0x8aa14(0x10a)](){const _0x476525=_0x8aa14;let _0x2ba5bd=this[_0x476525(0xef)]['get'](t['IUniverInstanceService'])[_0x476525(0x10c)](t['UniverInstanceType'][_0x476525(0xe9)]);if(!_0x2ba5bd)throw Error('No\x20active\x20workbook\x20found.');let _0x390a31=_0x2ba5bd['getUnitId'](),_0x2698af=this[_0x476525(0x105)]['getLiveShareCoordinatorSync'](_0x390a31);if(!_0x2698af)throw Error(_0x476525(0xeb));_0x2698af[_0x476525(0x10a)]();}};n[_0x8aa14(0x111)][_0x8aa14(0xff)](s);var c=class extends n[_0x8aa14(0xed)]{get[_0x8aa14(0x101)](){const _0x57c4df=_0x8aa14;return e[_0x57c4df(0xec)];}};n[_0x8aa14(0xed)][_0x8aa14(0xff)](c);
package/lib/cjs/index.js CHANGED
@@ -1 +1 @@
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;}});
1
+ const _0x1ad569=_0x1de6;(function(_0x5eb7bc,_0x362090){const _0x4f0536=_0x1de6,_0x5dfbff=_0x5eb7bc();while(!![]){try{const _0x4115d9=parseInt(_0x4f0536(0x212))/0x1*(-parseInt(_0x4f0536(0x20b))/0x2)+-parseInt(_0x4f0536(0x27d))/0x3+parseInt(_0x4f0536(0x26d))/0x4*(-parseInt(_0x4f0536(0x201))/0x5)+-parseInt(_0x4f0536(0x290))/0x6*(parseInt(_0x4f0536(0x291))/0x7)+parseInt(_0x4f0536(0x215))/0x8+-parseInt(_0x4f0536(0x1f9))/0x9*(parseInt(_0x4f0536(0x20c))/0xa)+parseInt(_0x4f0536(0x1cf))/0xb;if(_0x4115d9===_0x362090)break;else _0x5dfbff['push'](_0x5dfbff['shift']());}catch(_0x1de494){_0x5dfbff['push'](_0x5dfbff['shift']());}}}(_0xb178,0x861cb),Object[_0x1ad569(0x1d3)](exports,Symbol[_0x1ad569(0x208)],{'value':_0x1ad569(0x203)}));let e=require(`@univerjs/core`),t=require(`@univerjs/ui`),n=require(`@univerjs/design`),r=require(`@univerjs/icons`),i=require(`react`),a=require(`@univerjs-pro/collaboration`),o=require(`@univerjs-pro/collaboration-client`),s=require(`@univerjs/sheets`),c=require(`rxjs`),l=require(`rxjs/operators`),u=require(`react/jsx-runtime`),d=require(`@univerjs/sheets-ui`);function f(_0x1b5c11){'@babel/helpers - typeof';const _0x17fd71=_0x1ad569;return f=typeof Symbol=='function'&&typeof Symbol[_0x17fd71(0x20d)]=='symbol'?function(_0x10f71c){return typeof _0x10f71c;}:function(_0x236208){const _0x31b389=_0x17fd71;return _0x236208&&typeof Symbol=='function'&&_0x236208[_0x31b389(0x234)]===Symbol&&_0x236208!==Symbol[_0x31b389(0x27e)]?_0x31b389(0x27f):typeof _0x236208;},f(_0x1b5c11);}function p(_0x27051e,_0x1bea6a){const _0x416e69=_0x1ad569;if(f(_0x27051e)!=_0x416e69(0x261)||!_0x27051e)return _0x27051e;var _0x39b38e=_0x27051e[Symbol[_0x416e69(0x274)]];if(_0x39b38e!==void 0x0){var _0x1b5477=_0x39b38e['call'](_0x27051e,_0x1bea6a||_0x416e69(0x1da));if(f(_0x1b5477)!=_0x416e69(0x261))return _0x1b5477;throw TypeError(_0x416e69(0x23f));}return(_0x1bea6a===_0x416e69(0x28a)?String:Number)(_0x27051e);}function m(_0x541983){const _0x57f1bf=_0x1ad569;var _0x45e64e=p(_0x541983,_0x57f1bf(0x28a));return f(_0x45e64e)==_0x57f1bf(0x27f)?_0x45e64e:_0x45e64e+'';}function h(_0x255e9b,_0xf75fc4,_0x5e1ae4){const _0x2661d0=_0x1ad569;return(_0xf75fc4=m(_0xf75fc4))in _0x255e9b?Object[_0x2661d0(0x1d3)](_0x255e9b,_0xf75fc4,{'value':_0x5e1ae4,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x255e9b[_0xf75fc4]=_0x5e1ae4,_0x255e9b;}var g=class extends e[_0x1ad569(0x281)]{constructor(..._0x1aedb1){const _0x152872=_0x1ad569;super(..._0x1aedb1),h(this,_0x152872(0x231),new Set()),h(this,_0x152872(0x1e7),new Set());}[_0x1ad569(0x251)](_0x53e99c){const _0x407533=_0x1ad569;return this[_0x407533(0x231)][_0x407533(0x254)](_0x53e99c),(0x0,e[_0x407533(0x21e)])(()=>this['_sharedOperations'][_0x407533(0x226)](_0x53e99c));}[_0x1ad569(0x229)](_0x541a2e){const _0x4be466=_0x1ad569;return this[_0x4be466(0x1e7)][_0x4be466(0x254)](_0x541a2e),(0x0,e[_0x4be466(0x21e)])(()=>this[_0x4be466(0x1e7)]['delete'](_0x541a2e));}[_0x1ad569(0x237)](_0xce98dc){const _0x54da42=_0x1ad569;return this[_0x54da42(0x231)][_0x54da42(0x21d)](_0xce98dc);}[_0x1ad569(0x241)](_0x1f32f0){const _0x2e35e8=_0x1ad569;return Array[_0x2e35e8(0x269)](this[_0x2e35e8(0x1e7)])['map'](_0x2ec88f=>_0x2ec88f(_0x1f32f0));}};function _(_0x358479,_0x5914a8){return function(_0xc58062,_0x5598a2){_0x5914a8(_0xc58062,_0x5598a2,_0x358479);};}function v(_0x596658,_0x5862c9,_0x99bd9e,_0x62a41f){const _0x2191f0=_0x1ad569;var _0x81732c=arguments[_0x2191f0(0x23b)],_0x313d82=_0x81732c<0x3?_0x5862c9:_0x62a41f===null?_0x62a41f=Object[_0x2191f0(0x1fe)](_0x5862c9,_0x99bd9e):_0x62a41f,_0x1c0e3e;if(typeof Reflect=='object'&&typeof Reflect[_0x2191f0(0x23d)]==_0x2191f0(0x268))_0x313d82=Reflect[_0x2191f0(0x23d)](_0x596658,_0x5862c9,_0x99bd9e,_0x62a41f);else{for(var _0x4c9e8e=_0x596658[_0x2191f0(0x23b)]-0x1;_0x4c9e8e>=0x0;_0x4c9e8e--)(_0x1c0e3e=_0x596658[_0x4c9e8e])&&(_0x313d82=(_0x81732c<0x3?_0x1c0e3e(_0x313d82):_0x81732c>0x3?_0x1c0e3e(_0x5862c9,_0x99bd9e,_0x313d82):_0x1c0e3e(_0x5862c9,_0x99bd9e))||_0x313d82);}return _0x81732c>0x3&&_0x313d82&&Object[_0x2191f0(0x1d3)](_0x5862c9,_0x99bd9e,_0x313d82),_0x313d82;}let y=class extends e[_0x1ad569(0x223)]{constructor(_0x5f292e,_0x9a276a,_0xbcad77){const _0x1107e8=_0x1ad569;super(),this['_univerInstanceService']=_0x5f292e,this['_injector']=_0x9a276a,this[_0x1107e8(0x270)]=_0xbcad77,h(this,_0x1107e8(0x1d7),new Map()),this[_0x1107e8(0x209)]();}async['getLiveShareCoordinator'](_0x5650c5){const _0x559a65=_0x1ad569;return this['_entities'][_0x559a65(0x21d)](_0x5650c5)||await this['_startLiveShareCoordinator'](_0x5650c5),this[_0x559a65(0x1d7)][_0x559a65(0x24e)](_0x5650c5);}[_0x1ad569(0x277)](_0x26ffc7){const _0x4f8f0a=_0x1ad569;var _0x6a913d;return(_0x6a913d=this[_0x4f8f0a(0x1d7)][_0x4f8f0a(0x24e)](_0x26ffc7))==null?null:_0x6a913d;}[_0x1ad569(0x209)](){const _0xd47e66=_0x1ad569;this[_0xd47e66(0x1f0)][_0xd47e66(0x1fc)](e[_0xd47e66(0x217)][_0xd47e66(0x21a)])[_0xd47e66(0x287)]((0x0,l['takeUntil'])(this[_0xd47e66(0x210)]))['subscribe'](async _0x1e93a6=>{const _0x44c8d6=_0xd47e66;let _0x42f5a5=_0x1e93a6[_0x44c8d6(0x264)][_0x44c8d6(0x280)]();this['_entities'][_0x44c8d6(0x21d)](_0x42f5a5)||this[_0x44c8d6(0x249)](_0x42f5a5);}),this[_0xd47e66(0x1f0)][_0xd47e66(0x272)](e[_0xd47e66(0x217)][_0xd47e66(0x21a)])['pipe']((0x0,l[_0xd47e66(0x1d0)])(this[_0xd47e66(0x210)]))[_0xd47e66(0x247)](_0x56ecf5=>{const _0x4f9139=_0xd47e66;let _0x4c68b5=_0x56ecf5[_0x4f9139(0x280)](),_0x186b0c=this[_0x4f9139(0x1d7)]['get'](_0x4c68b5);_0x186b0c==null||_0x186b0c[_0x4f9139(0x26c)]();});}async[_0x1ad569(0x249)](_0x20160d){const _0x2b36db=_0x1ad569;let _0x2dfacd=await this[_0x2b36db(0x270)][_0x2b36db(0x255)](_0x20160d),_0xc92dfa=this['_injector'][_0x2b36db(0x24c)](x,_0x20160d,_0x2dfacd);return _0xc92dfa[_0x2b36db(0x266)](),this[_0x2b36db(0x1d7)][_0x2b36db(0x273)](_0x20160d,_0xc92dfa),_0xc92dfa;}};y=v([_(0x0,e[_0x1ad569(0x22a)]),_(0x1,(0x0,e[_0x1ad569(0x22f)])(e[_0x1ad569(0x1f2)])),_(0x2,(0x0,e[_0x1ad569(0x22f)])(o[_0x1ad569(0x1ef)]))],y);let b=function(_0x164e2e){const _0x2dfc54=_0x1ad569;return _0x164e2e[_0x2dfc54(0x1fd)]=_0x2dfc54(0x271),_0x164e2e[_0x2dfc54(0x1e2)]=_0x2dfc54(0x22c),_0x164e2e[_0x2dfc54(0x232)]='following',_0x164e2e[_0x2dfc54(0x292)]=_0x2dfc54(0x26e),_0x164e2e[_0x2dfc54(0x22e)]='presenting',_0x164e2e;}({}),x=class extends e[_0x1ad569(0x223)]{get[_0x1ad569(0x259)](){const _0x5cc90f=_0x1ad569;return this[_0x5cc90f(0x242)][_0x5cc90f(0x23a)]();}constructor(_0x52513c,_0x1837e7,_0x167c89,_0x1445af,_0x14fd4a){const _0x25f146=_0x1ad569;super(),this[_0x25f146(0x288)]=_0x52513c,this[_0x25f146(0x283)]=_0x1837e7,this[_0x25f146(0x1e1)]=_0x167c89,this[_0x25f146(0x21c)]=_0x1445af,this[_0x25f146(0x1e3)]=_0x14fd4a,h(this,'_status$',new c[(_0x25f146(0x28b))]('idle')),h(this,'status$',this['_status$']['asObservable']()),h(this,_0x25f146(0x209),!0x1),h(this,_0x25f146(0x205),null),h(this,_0x25f146(0x28e),null);}['dispose'](){const _0x250844=_0x1ad569;var _0x239237;(_0x239237=this['_commandDisposable'])==null||_0x239237['dispose'](),this[_0x250844(0x242)][_0x250844(0x218)](_0x250844(0x22c)),this[_0x250844(0x242)][_0x250844(0x285)]();}['getStatus'](){const _0x1fc20b=_0x1ad569;return this[_0x1fc20b(0x259)];}[_0x1ad569(0x266)](){const _0x1d72e2=_0x1ad569;this[_0x1d72e2(0x209)]||(this[_0x1d72e2(0x209)]=!0x0,this[_0x1d72e2(0x283)][_0x1d72e2(0x265)][_0x1d72e2(0x287)]((0x0,l[_0x1d72e2(0x1d0)])(this[_0x1d72e2(0x210)]))[_0x1d72e2(0x247)](_0xb90481=>{const _0x586a74=_0x1d72e2;switch(_0xb90481){case o[_0x586a74(0x1ed)][_0x586a74(0x1fd)]:this[_0x586a74(0x224)]();break;case o[_0x586a74(0x1ed)][_0x586a74(0x23c)]:this[_0x586a74(0x1eb)]();break;default:}}),this['_collabSession'][_0x1d72e2(0x216)][_0x1d72e2(0x287)]((0x0,l[_0x1d72e2(0x1d0)])(this['dispose$']))[_0x1d72e2(0x247)](_0x3e7691=>{const _0x1f0856=_0x1d72e2;let {eventID:_0xb858a0}=_0x3e7691;switch(_0xb858a0){case a[_0x1f0856(0x220)][_0x1f0856(0x1ec)]:this[_0x1f0856(0x1d1)](_0x3e7691);break;case a[_0x1f0856(0x220)][_0x1f0856(0x278)]:this[_0x1f0856(0x1db)](_0x3e7691);break;case a[_0x1f0856(0x220)][_0x1f0856(0x22d)]:this[_0x1f0856(0x206)]();break;case a[_0x1f0856(0x220)]['NEW_CHANGESETS']:this[_0x1f0856(0x1df)](_0x3e7691);break;default:}}));}[_0x1ad569(0x28c)](){const _0x5ec63e=_0x1ad569;this[_0x5ec63e(0x283)]['send']({'eventID':a['CollaborationEvent'][_0x5ec63e(0x1fa)],'data':{'unitID':this[_0x5ec63e(0x288)],'userID':this['_collabSession'][_0x5ec63e(0x1d8)]()}},this[_0x5ec63e(0x288)]);}['stopPresenting'](){const _0x573d22=_0x1ad569;this[_0x573d22(0x259)]===_0x573d22(0x253)&&(this[_0x573d22(0x242)][_0x573d22(0x218)](_0x573d22(0x22c)),this[_0x573d22(0x283)][_0x573d22(0x239)]({'eventID':a['CollaborationEvent'][_0x573d22(0x22d)],'data':{'unitID':this[_0x573d22(0x288)]}},this['_unitID']));}[_0x1ad569(0x262)](){const _0x3fbd96=_0x1ad569;this[_0x3fbd96(0x259)]===_0x3fbd96(0x26e)&&(this[_0x3fbd96(0x242)][_0x3fbd96(0x218)]('following'),this[_0x3fbd96(0x263)]());}[_0x1ad569(0x1ea)](){const _0x2a2b78=_0x1ad569;this[_0x2a2b78(0x259)]==='following'&&this[_0x2a2b78(0x26b)]();}[_0x1ad569(0x1d1)](_0x219751){const _0x26d4ca=_0x1ad569;let {presenter:_0x2a350e}=_0x219751[_0x26d4ca(0x1e0)],_0x5a14ec=this[_0x26d4ca(0x283)][_0x26d4ca(0x1d8)]();this[_0x26d4ca(0x28e)]=_0x2a350e,_0x2a350e===_0x5a14ec?(this[_0x26d4ca(0x26b)](),this[_0x26d4ca(0x1d6)]()):this[_0x26d4ca(0x259)]!==_0x26d4ca(0x26e)&&(this['_stopPresenting'](),this[_0x26d4ca(0x263)]());}[_0x1ad569(0x22b)](){const _0x3dec9b=_0x1ad569;let _0x38ba1d={'eventID':a[_0x3dec9b(0x220)][_0x3dec9b(0x207)]};this[_0x3dec9b(0x283)]['send'](_0x38ba1d,this['_unitID']);}['_handleTerminate'](){const _0x21bba3=_0x1ad569;this[_0x21bba3(0x28e)]=null,this['_status']!==_0x21bba3(0x253)&&this[_0x21bba3(0x24b)]();}[_0x1ad569(0x1df)](_0x8afc7a){const _0x2be6ea=_0x1ad569;if(this[_0x2be6ea(0x259)]===_0x2be6ea(0x28f)&&this[_0x2be6ea(0x28e)]===_0x8afc7a[_0x2be6ea(0x1e0)][_0x2be6ea(0x25d)]){let _0x274ffb=(0x0,a['parseProtocolChangeset'])(_0x8afc7a[_0x2be6ea(0x1e0)])[_0x2be6ea(0x1f1)][_0x2be6ea(0x202)]()[_0x2be6ea(0x213)](_0x3451c5=>_0x3451c5['id']===s[_0x2be6ea(0x25c)]['id']);if(_0x274ffb){let _0x3bbcfe=_0x274ffb['params'][_0x2be6ea(0x258)],_0x24cebe=_0x274ffb['params'][_0x2be6ea(0x286)]['id'];setTimeout(()=>{const _0x5ba575=_0x2be6ea;this[_0x5ba575(0x1e3)][_0x5ba575(0x24f)](s[_0x5ba575(0x1e5)]['id'],{'unitId':_0x3bbcfe,'subUnitId':_0x24cebe},{'fromCollab':!0x0});});}}}['_startPresenting'](){const _0x89dd23=_0x1ad569;this[_0x89dd23(0x242)]['next']('presenting');let _0x241164=new Map(),_0x506ee6=this['_commandDisposable']=new e['DisposableCollection']();_0x506ee6[_0x89dd23(0x254)]((0x0,e[_0x89dd23(0x21e)])(()=>{const _0x4f7b79=_0x89dd23;_0x241164[_0x4f7b79(0x284)](_0x571b3b=>_0x571b3b['complete']()),_0x241164['clear']();})),_0x506ee6[_0x89dd23(0x254)](this[_0x89dd23(0x1e3)][_0x89dd23(0x1f8)](_0x16aa45=>{const _0xa42ae8=_0x89dd23;if(_0x16aa45[_0xa42ae8(0x204)]!==e[_0xa42ae8(0x25f)][_0xa42ae8(0x233)]||!this['_liveShareService'][_0xa42ae8(0x237)](_0x16aa45['id']))return;let {id:_0x468c40}=_0x16aa45,_0x37f3b4;if(_0x241164['has'](_0x468c40))_0x37f3b4=_0x241164[_0xa42ae8(0x24e)](_0x468c40);else{var _0x1bcdf6;_0x37f3b4=new c['Subject'](),_0x241164[_0xa42ae8(0x273)](_0x468c40,_0x37f3b4),_0x37f3b4[_0xa42ae8(0x287)]((0x0,l[_0xa42ae8(0x225)])((_0x1bcdf6=this[_0xa42ae8(0x1e1)][_0xa42ae8(0x24a)](_0xa42ae8(0x243)))==null?0xc8:_0x1bcdf6,void 0x0,{'trailing':!0x0,'leading':!0x0}))[_0xa42ae8(0x247)](_0x24c94d=>{const _0x4a7aaf=_0xa42ae8;this[_0x4a7aaf(0x283)][_0x4a7aaf(0x239)]({'eventID':a[_0x4a7aaf(0x220)][_0x4a7aaf(0x278)],'data':{'unitID':this['_unitID'],'operations':{[_0x24c94d['id']]:{'id':_0x24c94d['id'],'params':JSON[_0x4a7aaf(0x256)](_0x24c94d[_0x4a7aaf(0x25a)])}}}},this['_unitID']);});}_0x37f3b4[_0xa42ae8(0x218)](_0x16aa45);})),this[_0x89dd23(0x21c)]['getInitialStates'](this[_0x89dd23(0x288)])[_0x89dd23(0x284)](_0x563aff=>this[_0x89dd23(0x283)]['send']({'eventID':a[_0x89dd23(0x220)][_0x89dd23(0x278)],'data':{'unitID':this['_unitID'],'operations':{[_0x563aff['id']]:{'id':_0x563aff['id'],'params':JSON[_0x89dd23(0x256)](_0x563aff['params'])}}}},this['_unitID']));}[_0x1ad569(0x20a)](){const _0x2364b3=_0x1ad569;var _0x30a912;this['_status$'][_0x2364b3(0x218)]('idle'),(_0x30a912=this['_commandDisposable'])==null||_0x30a912[_0x2364b3(0x26c)](),this[_0x2364b3(0x205)]=null;}['_startFollowing'](){const _0x1ca7e3=_0x1ad569;var _0x48f0ad;(_0x48f0ad=this[_0x1ca7e3(0x205)])==null||_0x48f0ad[_0x1ca7e3(0x26c)](),this['_status$'][_0x1ca7e3(0x218)](_0x1ca7e3(0x28f));}[_0x1ad569(0x24b)](){const _0x452c89=_0x1ad569;var _0x3e83ad;this[_0x452c89(0x242)][_0x452c89(0x218)](_0x452c89(0x22c)),(_0x3e83ad=this[_0x452c89(0x205)])==null||_0x3e83ad[_0x452c89(0x26c)](),this['_commandDisposable']=null;}[_0x1ad569(0x26b)](){const _0x2a13ff=_0x1ad569;var _0x1f1e61;this['_status$'][_0x2a13ff(0x218)](_0x2a13ff(0x26e)),(_0x1f1e61=this[_0x2a13ff(0x205)])==null||_0x1f1e61[_0x2a13ff(0x26c)]();}[_0x1ad569(0x1db)](_0x5e6712){const _0xff2482=_0x1ad569;if([_0xff2482(0x253),_0xff2482(0x26e),_0xff2482(0x271)][_0xff2482(0x257)](this[_0xff2482(0x259)])||!_0x5e6712[_0xff2482(0x1e0)]['presenter']||_0x5e6712[_0xff2482(0x1e0)][_0xff2482(0x221)]===this[_0xff2482(0x283)][_0xff2482(0x1d8)]())return;this['_status']==='idle'&&this[_0xff2482(0x263)]();let _0x4dd101=_0x5e6712[_0xff2482(0x1e0)][_0xff2482(0x250)];Object[_0xff2482(0x1dc)](_0x4dd101)['forEach'](_0x2988c9=>{const _0x3f0471=_0xff2482;this[_0x3f0471(0x1e3)]['executeCommand'](_0x2988c9['id'],_0x2988c9[_0x3f0471(0x25a)]?JSON[_0x3f0471(0x1d5)](_0x2988c9[_0x3f0471(0x25a)]):null,{'fromCollab':!0x0});});}[_0x1ad569(0x224)](){const _0x3d3f61=_0x1ad569;var _0x61b969;this[_0x3d3f61(0x242)][_0x3d3f61(0x218)](_0x3d3f61(0x271)),(_0x61b969=this[_0x3d3f61(0x205)])==null||_0x61b969['dispose']();}[_0x1ad569(0x1eb)](){const _0x51ad78=_0x1ad569;this[_0x51ad78(0x242)][_0x51ad78(0x218)](_0x51ad78(0x22c)),this['_fetchOperations']();}};x=v([_(0x2,e[_0x1ad569(0x276)]),_(0x3,(0x0,e[_0x1ad569(0x22f)])(g)),_(0x4,e['ICommandService'])],x);function S(){const _0x4fb8c7=_0x1ad569;let _0x5dc4de=(0x0,t[_0x4fb8c7(0x21f)])(y),_0x4492fd=(0x0,t[_0x4fb8c7(0x21f)])(e['IUniverInstanceService']),_0x36faf0=(0x0,t[_0x4fb8c7(0x21b)])(()=>_0x4492fd[_0x4fb8c7(0x214)](e[_0x4fb8c7(0x217)][_0x4fb8c7(0x21a)]),void 0x0,!0x1,[]),[_0x3326b9,_0x4bbf5e]=(0x0,i[_0x4fb8c7(0x275)])(null),[_0x521451,_0x428c20]=(0x0,i[_0x4fb8c7(0x275)])(_0x4fb8c7(0x22c)),_0x100dc5=(0x0,i[_0x4fb8c7(0x1e4)])(null);return(0x0,i[_0x4fb8c7(0x267)])(()=>(_0x36faf0&&_0x5dc4de[_0x4fb8c7(0x1fb)](_0x36faf0[_0x4fb8c7(0x280)]())['then'](_0x1affa9=>{const _0x48bffb=_0x4fb8c7;_0x4bbf5e(_0x1affa9),_0x100dc5[_0x48bffb(0x23e)]=_0x1affa9[_0x48bffb(0x27c)][_0x48bffb(0x247)](_0x1db954=>{_0x428c20(_0x1db954);});}),()=>{const _0xe77d35=_0x4fb8c7;var _0x279c69;(_0x279c69=_0x100dc5[_0xe77d35(0x23e)])==null||_0x279c69[_0xe77d35(0x289)](),_0x100dc5[_0xe77d35(0x23e)]=null;}),[_0x36faf0,_0x5dc4de]),_0x3326b9?(0x0,u[_0x4fb8c7(0x222)])(n[_0x4fb8c7(0x1f3)],{'align':_0x4fb8c7(0x260),'disabled':_0x521451==='offline','className':_0x4fb8c7(0x1f7),'overlay':(0x0,u['jsx'])(C,{'status':_0x521451,'coordinator':_0x3326b9}),'children':(0x0,u[_0x4fb8c7(0x222)])('button',{'className':(0x0,n[_0x4fb8c7(0x228)])('univer-border-none\x20univer-text-gray-600\x20univer-outline-none',{'univer-cursor-not-allowed':_0x521451==='offline','univer-cursor-pointer\x20hover:univer-bg-gray-400':_0x521451!=='offline'}),'type':_0x4fb8c7(0x1cd),'children':(0x0,u['jsx'])(r[_0x4fb8c7(0x1f6)],{'className':_0x4fb8c7(0x1e6)})})}):null;}function C(_0x4bef37){const _0x383efe=_0x1ad569;let {status:_0x360bb6,coordinator:_0x399b55}=_0x4bef37;switch(_0x360bb6){case _0x383efe(0x22c):return(0x0,u[_0x383efe(0x222)])(w,{'coordinator':_0x399b55});case _0x383efe(0x28f):return(0x0,u[_0x383efe(0x222)])(T,{'coordinator':_0x399b55});case _0x383efe(0x26e):return(0x0,u[_0x383efe(0x222)])(E,{'coordinator':_0x399b55});case _0x383efe(0x271):return(0x0,u[_0x383efe(0x222)])(O,{});case _0x383efe(0x253):return(0x0,u[_0x383efe(0x222)])(D,{'coordinator':_0x399b55});default:return null;}}function w(_0x3bae0a){const _0x20e185=_0x1ad569;let {coordinator:_0x2212c6}=_0x3bae0a;return(0x0,u['jsxs'])(u[_0x20e185(0x26a)],{'children':[(0x0,u[_0x20e185(0x222)])(_0x20e185(0x1ff),{'className':'univer-mb-3\x20univer-w-full\x20univer-text-sm','children':_0x20e185(0x1e8)}),(0x0,u[_0x20e185(0x222)])(n[_0x20e185(0x240)],{'onClick':()=>_0x2212c6[_0x20e185(0x28c)](),'children':_0x20e185(0x1d9)})]});}function T(_0x45931f){const _0x4c3793=_0x1ad569;let {coordinator:_0x28f4db}=_0x45931f;return(0x0,u[_0x4c3793(0x27b)])(u[_0x4c3793(0x26a)],{'children':[(0x0,u['jsx'])(_0x4c3793(0x1ff),{'className':_0x4c3793(0x1de),'children':_0x4c3793(0x1ee)}),(0x0,u[_0x4c3793(0x222)])(n[_0x4c3793(0x240)],{'onClick':()=>_0x28f4db[_0x4c3793(0x1ea)](),'children':_0x4c3793(0x244)})]});}function E(_0x1ac8cb){const _0x26e859=_0x1ad569;let {coordinator:_0x5500ff}=_0x1ac8cb;return(0x0,u['jsxs'])(u[_0x26e859(0x26a)],{'children':[(0x0,u['jsx'])('div',{'className':'univer-mb-3\x20univer-w-full\x20univer-text-sm','children':_0x26e859(0x1d4)}),(0x0,u['jsx'])(n[_0x26e859(0x240)],{'variant':'text','onClick':()=>_0x5500ff[_0x26e859(0x262)](),'children':_0x26e859(0x20f)})]});}function D(_0x35c66e){const _0x25c918=_0x1ad569;let {coordinator:_0x5b2d13}=_0x35c66e;return(0x0,u[_0x25c918(0x27b)])(u[_0x25c918(0x26a)],{'children':[(0x0,u['jsx'])(_0x25c918(0x1ff),{'className':'univer-mb-3\x20univer-w-full\x20univer-text-sm','children':_0x25c918(0x1d2)}),(0x0,u[_0x25c918(0x222)])(n[_0x25c918(0x240)],{'variant':_0x25c918(0x1da),'onClick':()=>_0x5b2d13[_0x25c918(0x211)](),'children':'Stop\x20presenting'})]});}function O(){const _0x4efc73=_0x1ad569;return(0x0,u[_0x4efc73(0x222)])(u[_0x4efc73(0x26a)],{'children':'You\x27are\x20offline.'});}let k=class extends e[_0x1ad569(0x281)]{constructor(_0x4950bb,_0x48f7d6){const _0x40f9f2=_0x1ad569;super(),this[_0x40f9f2(0x1cc)]=_0x4950bb,this[_0x40f9f2(0x20e)]=_0x48f7d6,this[_0x40f9f2(0x219)]();}[_0x1ad569(0x219)](){const _0x12578a=_0x1ad569;this['disposeWithMe'](this[_0x12578a(0x20e)][_0x12578a(0x293)](t['BuiltInUIPart'][_0x12578a(0x1ce)],()=>(0x0,t['connectInjector'])(S,this['_injector'])));}};function _0xb178(){const _0x387b34=['type','_commandDisposable','_handleTerminate','LIVESHARE_FETCH_OPERATIONS','toStringTag','_init','_stopPresenting','165014ffLptF','10eHKNFU','iterator','_uiPartsService','Start\x20following','dispose$','stopPresenting','3qgGkzV','find','getCurrentTypeOfUnit$','4333784BBPbuq','event$','UniverInstanceType','next','_mountLiveShare','UNIVER_SHEET','useObservable','_liveShareService','has','toDisposable','useDependency','CollaborationEvent','presenter','jsx','RxDisposable','_handleOffline','throttleTime','delete','packageName','clsx','registerInitialStateReporter','IUniverInstanceService','_fetchOperations','idle','LIVESHARE_TERMINATE','PRESENTING','Inject','0.23.0','_sharedOperations','FOLLOWING','OPERATION','constructor','override','SetScrollOperation','shouldShareOperation','UNIVER_LIVE_SHARE_PLUGIN','send','getValue','length','ONLINE','decorate','current','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','Button','getInitialStates','_status$','SAME_OPERATION_SHARE_INTERVAL','Stop\x20following','onRendered','IUIPartsService','subscribe','LiveShare','_startLiveShareCoordinator','getConfig','_beIdle','createInstance','UniverLiveSharePlugin','get','executeCommand','operations','registerSharedOperation','DependentOn','presenting','add','requireSession','stringify','includes','unitId','_status','params','pluginName','InsertSheetMutation','memberID','UniverCollaborationClientPlugin','CommandType','end','object','startFollowing','_startFollowing','unit','sessionStatus$','init','useEffect','function','from','Fragment','_stopFollowing','dispose','6884hWxEFM','not-following','touchDependencies','_collabSessionService','offline','getTypeOfUnitDisposed$','set','toPrimitive','useState','IConfigService','getLiveShareCoordinatorSync','LIVESHARE_OPERATION','setConfig','registerDependencies','jsxs','status$','451902nSXHQW','prototype','symbol','getUnitId','Disposable','_config','_collabSession','forEach','complete','sheet','pipe','_unitID','unsubscribe','string','BehaviorSubject','tryStartPresenting','DesktopLiveShareController','_presenter','following','54sFYUFW','209209UXgvIz','NOT_FOLLOWING','registerComponent','_injector','button','HEADER_MENU','20099794WvWTAd','takeUntil','_handleNewHost','You\x27re\x20presenting\x20the\x20document','defineProperty','You\x27re\x20not\x20following\x20the\x20presenter','parse','_startPresenting','_entities','getMemberID','Start','default','_handleOperation','values','LiveShareCoordinator','univer-mb-3\x20univer-w-full\x20univer-text-sm','_handleNewChangeSets','data','_configService','IDLE','_commandService','useRef','SetWorksheetActiveOperation','univer-size-4','_reporters','Present\x20this\x20document','merge','stopFollowing','_handleOnline','LIVESHARE_NEW_HOST','SessionStatus','You\x27re\x20following\x20the\x20presenter','CollaborationSessionService','_univerInstanceService','mutations','Injector','Dropdown','LiveShareService','live-share.config','LiveShareIcon','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','onCommandExecuted','5989257obwxrs','LIVESHARE_REQUEST_HOST','getLiveShareCoordinator','getTypeOfUnitAdded$','OFFLINE','getOwnPropertyDescriptor','div','SetZoomRatioOperation','1415kzbVnk','reverse','Module'];_0xb178=function(){return _0x387b34;};return _0xb178();}k=v([_(0x0,(0x0,e[_0x1ad569(0x22f)])(e[_0x1ad569(0x1f2)])),_(0x1,t[_0x1ad569(0x246)])],k);var A='@univerjs-pro/live-share',j=_0x1ad569(0x230);const M=_0x1ad569(0x1f5);Symbol(M);const N={};let P=class extends e[_0x1ad569(0x281)]{constructor(_0x3d2bf3){const _0x37bbcd=_0x1ad569;super(),this[_0x37bbcd(0x21c)]=_0x3d2bf3,this[_0x37bbcd(0x209)]();}[_0x1ad569(0x209)](){const _0x54a214=_0x1ad569;[d[_0x54a214(0x200)]['id'],d[_0x54a214(0x236)]['id'],s[_0x54a214(0x1e5)]['id']][_0x54a214(0x284)](_0x2e190f=>{const _0x9d501a=_0x54a214;this['disposeWithMe'](this[_0x9d501a(0x21c)][_0x9d501a(0x251)](_0x2e190f));});}};function _0x1de6(_0x47bbc8,_0x2530eb){_0x47bbc8=_0x47bbc8-0x1cc;const _0xb1788f=_0xb178();let _0x1de6ec=_0xb1788f[_0x47bbc8];return _0x1de6ec;}P=v([_(0x0,(0x0,e['Inject'])(g))],P);let F=class extends e['Plugin']{constructor(_0x116fb2=N,_0x107cc4,_0xd66e53){const _0xa3c8fc=_0x1ad569;super(),this[_0xa3c8fc(0x282)]=_0x116fb2,this[_0xa3c8fc(0x1cc)]=_0x107cc4,this['_configService']=_0xd66e53;let {..._0x49f4f0}=(0x0,e[_0xa3c8fc(0x1e9)])({},N,this['_config']);this['_configService'][_0xa3c8fc(0x279)](M,_0x49f4f0);}['onStarting'](){const _0xc356d8=_0x1ad569;(0x0,e[_0xc356d8(0x27a)])(this[_0xc356d8(0x1cc)],(0x0,e['mergeOverrideWithDependencies'])([[g],[y],[P],[k]],this[_0xc356d8(0x282)][_0xc356d8(0x235)])),(0x0,e[_0xc356d8(0x26f)])(this[_0xc356d8(0x1cc)],[[P]]);}[_0x1ad569(0x245)](){const _0x9644bb=_0x1ad569;(0x0,e['touchDependencies'])(this[_0x9644bb(0x1cc)],[[k]]);}};h(F,_0x1ad569(0x204),e['UniverInstanceType']['UNIVER_UNKNOWN']),h(F,_0x1ad569(0x25b),_0x1ad569(0x238)),h(F,_0x1ad569(0x227),A),h(F,'version',j),F=v([(0x0,e[_0x1ad569(0x252)])(o[_0x1ad569(0x25e)]),_(0x1,(0x0,e[_0x1ad569(0x22f)])(e[_0x1ad569(0x1f2)])),_(0x2,e[_0x1ad569(0x276)])],F),Object[_0x1ad569(0x1d3)](exports,_0x1ad569(0x28d),{'enumerable':!0x0,'get':function(){return k;}}),exports[_0x1ad569(0x248)]=S,Object['defineProperty'](exports,'LiveShareController',{'enumerable':!0x0,'get':function(){return y;}}),Object['defineProperty'](exports,_0x1ad569(0x1dd),{'enumerable':!0x0,'get':function(){return x;}}),exports[_0x1ad569(0x1f4)]=g,exports['LiveShareStatus']=b,Object['defineProperty'](exports,_0x1ad569(0x24d),{'enumerable':!0x0,'get':function(){return F;}});
package/lib/es/facade.js CHANGED
@@ -1 +1 @@
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{};
1
+ const _0x2b2793=_0xfb7e;function _0x2c5b(){const _0x3e0a9b=['3017034IkGHGY','217cqbwht','getStatus','330968eyFqaa','call','_liveShareController','No\x20active\x20workbook\x20found.','25818NbfjtG','UNIVER_SHEET','_injector','startPresenting','getCurrentUnitOfType','283806ThXkUl','constructor','1945ocvhKN','default','327324oUaYST','stopPresenting','getLiveShareStatus','getLiveShareCoordinatorSync','get','1340126yuXMoq','tryStartPresenting','symbol','function','270PYSTYI','477GumFMJ','_initialize','startFollowing','1023QSlcJG','14596STYEhl','prototype','extend','toPrimitive','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','getUnitId','iterator','No\x20LiveShareCoordinator\x20found\x20for\x20the\x20active\x20workbook.','IDLE','string','stopFollowing'];_0x2c5b=function(){return _0x3e0a9b;};return _0x2c5b();}(function(_0xc6e297,_0x387d01){const _0x5b1b04=_0xfb7e,_0x3d036b=_0xc6e297();while(!![]){try{const _0x34f92b=-parseInt(_0x5b1b04(0x1df))/0x1+parseInt(_0x5b1b04(0x1f3))/0x2+-parseInt(_0x5b1b04(0x1e4))/0x3*(parseInt(_0x5b1b04(0x1e8))/0x4)+-parseInt(_0x5b1b04(0x1d8))/0x5*(-parseInt(_0x5b1b04(0x1fa))/0x6)+parseInt(_0x5b1b04(0x1f4))/0x7*(parseInt(_0x5b1b04(0x1f6))/0x8)+-parseInt(_0x5b1b04(0x1d6))/0x9*(-parseInt(_0x5b1b04(0x1e3))/0xa)+-parseInt(_0x5b1b04(0x1e7))/0xb*(parseInt(_0x5b1b04(0x1da))/0xc);if(_0x34f92b===_0x387d01)break;else _0x3d036b['push'](_0x3d036b['shift']());}catch(_0x222e32){_0x3d036b['push'](_0x3d036b['shift']());}}}(_0x2c5b,0xd1c59));import{LiveShareController as _0xef4ec4,LiveShareStatus as _0x3acb3b}from'@univerjs-pro/live-share';import{IUniverInstanceService as _0xcb238d,UniverInstanceType as _0x29e678}from'@univerjs/core';function _0xfb7e(_0x56337f,_0x22fb1a){_0x56337f=_0x56337f-0x1d3;const _0x2c5b12=_0x2c5b();let _0xfb7ebc=_0x2c5b12[_0x56337f];return _0xfb7ebc;}import{FEnum as _0x4164bf,FUniver as _0x82965a}from'@univerjs/core/facade';function o(_0x13af00){'@babel/helpers - typeof';const _0x35659d=_0xfb7e;return o=typeof Symbol==_0x35659d(0x1e2)&&typeof Symbol[_0x35659d(0x1ee)]=='symbol'?function(_0x33c036){return typeof _0x33c036;}:function(_0x355214){const _0x392fa6=_0x35659d;return _0x355214&&typeof Symbol==_0x392fa6(0x1e2)&&_0x355214[_0x392fa6(0x1d7)]===Symbol&&_0x355214!==Symbol[_0x392fa6(0x1e9)]?_0x392fa6(0x1e1):typeof _0x355214;},o(_0x13af00);}function s(_0x4ee508,_0x227648){const _0x49533c=_0xfb7e;if(o(_0x4ee508)!='object'||!_0x4ee508)return _0x4ee508;var _0x26682a=_0x4ee508[Symbol[_0x49533c(0x1eb)]];if(_0x26682a!==void 0x0){var _0x386776=_0x26682a[_0x49533c(0x1f7)](_0x4ee508,_0x227648||_0x49533c(0x1d9));if(o(_0x386776)!='object')return _0x386776;throw TypeError(_0x49533c(0x1ec));}return(_0x227648===_0x49533c(0x1f1)?String:Number)(_0x4ee508);}function c(_0x412104){const _0x4edc78=_0xfb7e;var _0x3fc70b=s(_0x412104,_0x4edc78(0x1f1));return o(_0x3fc70b)==_0x4edc78(0x1e1)?_0x3fc70b:_0x3fc70b+'';}function l(_0x404db2,_0x5dc862,_0x47c5d9){return(_0x5dc862=c(_0x5dc862))in _0x404db2?Object['defineProperty'](_0x404db2,_0x5dc862,{'value':_0x47c5d9,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x404db2[_0x5dc862]=_0x47c5d9,_0x404db2;}var u=class extends _0x82965a{constructor(..._0x454747){const _0x59e190=_0xfb7e;super(..._0x454747),l(this,_0x59e190(0x1f8),void 0x0);}[_0x2b2793(0x1e5)](_0xcbb598){const _0xd09ac9=_0x2b2793;this[_0xd09ac9(0x1f8)]=_0xcbb598[_0xd09ac9(0x1de)](_0xef4ec4);}[_0x2b2793(0x1dc)](){const _0x4152e9=_0x2b2793;var _0x1bee29;let _0x59b522=this['_injector'][_0x4152e9(0x1de)](_0xcb238d)[_0x4152e9(0x1d5)](_0x29e678['UNIVER_SHEET']);if(!_0x59b522)throw Error(_0x4152e9(0x1f9));let _0x5e84f4=_0x59b522[_0x4152e9(0x1ed)](),_0x8c4df1=this[_0x4152e9(0x1f8)][_0x4152e9(0x1dd)](_0x5e84f4);return(_0x1bee29=_0x8c4df1==null?void 0x0:_0x8c4df1[_0x4152e9(0x1f5)]())==null?_0x3acb3b[_0x4152e9(0x1f0)]:_0x1bee29;}[_0x2b2793(0x1e6)](){const _0x5095aa=_0x2b2793;let _0x33636b=this[_0x5095aa(0x1d3)][_0x5095aa(0x1de)](_0xcb238d)[_0x5095aa(0x1d5)](_0x29e678[_0x5095aa(0x1fb)]);if(!_0x33636b)throw Error(_0x5095aa(0x1f9));let _0x158f25=_0x33636b[_0x5095aa(0x1ed)](),_0x45d0a1=this[_0x5095aa(0x1f8)]['getLiveShareCoordinatorSync'](_0x158f25);if(!_0x45d0a1)throw Error(_0x5095aa(0x1ef));_0x45d0a1['startFollowing']();}['stopFollowing'](){const _0x7b297=_0x2b2793;let _0x4870c1=this['_injector'][_0x7b297(0x1de)](_0xcb238d)[_0x7b297(0x1d5)](_0x29e678['UNIVER_SHEET']);if(!_0x4870c1)throw Error(_0x7b297(0x1f9));let _0x405d70=_0x4870c1[_0x7b297(0x1ed)](),_0x4809a1=this[_0x7b297(0x1f8)][_0x7b297(0x1dd)](_0x405d70);if(!_0x4809a1)throw Error('No\x20LiveShareCoordinator\x20found\x20for\x20the\x20active\x20workbook.');_0x4809a1[_0x7b297(0x1f2)]();}[_0x2b2793(0x1d4)](){const _0x126d9f=_0x2b2793;let _0x3611e9=this['_injector'][_0x126d9f(0x1de)](_0xcb238d)[_0x126d9f(0x1d5)](_0x29e678[_0x126d9f(0x1fb)]);if(!_0x3611e9)throw Error('No\x20active\x20workbook\x20found.');let _0x3102aa=_0x3611e9[_0x126d9f(0x1ed)](),_0x3fc61d=this['_liveShareController'][_0x126d9f(0x1dd)](_0x3102aa);if(!_0x3fc61d)throw Error(_0x126d9f(0x1ef));_0x3fc61d[_0x126d9f(0x1e0)]();}[_0x2b2793(0x1db)](){const _0x3d92e2=_0x2b2793;let _0x48364c=this['_injector']['get'](_0xcb238d)[_0x3d92e2(0x1d5)](_0x29e678[_0x3d92e2(0x1fb)]);if(!_0x48364c)throw Error('No\x20active\x20workbook\x20found.');let _0xa08bc=_0x48364c[_0x3d92e2(0x1ed)](),_0x59c961=this['_liveShareController'][_0x3d92e2(0x1dd)](_0xa08bc);if(!_0x59c961)throw Error(_0x3d92e2(0x1ef));_0x59c961['stopPresenting']();}};_0x82965a[_0x2b2793(0x1ea)](u);var d=class extends _0x4164bf{get['LiveShareStatusEnum'](){return _0x3acb3b;}};_0x4164bf[_0x2b2793(0x1ea)](d);export{};
package/lib/es/index.js CHANGED
@@ -1 +1 @@
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};
1
+ const _0x1ceb6f=_0xf242;(function(_0x3b1cf9,_0x30260b){const _0x5cd423=_0xf242,_0x347ef9=_0x3b1cf9();while(!![]){try{const _0x471c79=parseInt(_0x5cd423(0x1f5))/0x1+-parseInt(_0x5cd423(0x19d))/0x2+-parseInt(_0x5cd423(0x1db))/0x3+-parseInt(_0x5cd423(0x189))/0x4*(parseInt(_0x5cd423(0x1c7))/0x5)+parseInt(_0x5cd423(0x1ae))/0x6*(parseInt(_0x5cd423(0x184))/0x7)+parseInt(_0x5cd423(0x1a9))/0x8+-parseInt(_0x5cd423(0x210))/0x9;if(_0x471c79===_0x30260b)break;else _0x347ef9['push'](_0x347ef9['shift']());}catch(_0xb63a8a){_0x347ef9['push'](_0x347ef9['shift']());}}}(_0x3ce7,0x8734e));import{CommandType as _0x13e285,DependentOn as _0x99e981,Disposable as _0x49320b,DisposableCollection as _0x5a4b9d,ICommandService as _0x2b3864,IConfigService as _0x2bf9f3,IUniverInstanceService as _0x43e007,Inject as _0x478c03,Injector as _0x31717f,Plugin as _0x58c46d,RxDisposable as _0x49b881,UniverInstanceType as _0xaf5923,merge as _0x3d1d44,mergeOverrideWithDependencies as _0x352515,registerDependencies as _0x25e916,toDisposable as _0x5e1636,touchDependencies as _0x837966}from'@univerjs/core';import{BuiltInUIPart as _0x6407ff,IUIPartsService as _0x5acf09,connectInjector as _0x17807b,useDependency as _0x5d2936,useObservable as _0x4b13c5}from'@univerjs/ui';import{Button as _0x45d162,Dropdown as _0x5e1365,clsx as _0x21aa0f}from'@univerjs/design';import{LiveShareIcon as _0xee1e9c}from'@univerjs/icons';import{useEffect as _0x37bb14,useRef as _0x54f12e,useState as _0x2cbf33}from'react';import{CollaborationEvent as _0xc2fe54,parseProtocolChangeset as _0x5a7fff}from'@univerjs-pro/collaboration';import{CollaborationSessionService as _0x11c673,SessionStatus as _0x51afad,UniverCollaborationClientPlugin as _0x558de1}from'@univerjs-pro/collaboration-client';import{InsertSheetMutation as _0x598b51,SetWorksheetActiveOperation as _0x1a55e4}from'@univerjs/sheets';import{BehaviorSubject as _0x35a652,Subject as _0x1eeb39}from'rxjs';import{takeUntil as _0x1df922,throttleTime as _0xdaccc4}from'rxjs/operators';import{Fragment as _0x75d924,jsx as _0xad4a0d,jsxs as _0x1069d8}from'react/jsx-runtime';import{SetScrollOperation as _0x541869,SetZoomRatioOperation as _0x4c9a92}from'@univerjs/sheets-ui';function L(_0x502970){'@babel/helpers - typeof';const _0x5e7438=_0xf242;return L=typeof Symbol==_0x5e7438(0x1aa)&&typeof Symbol['iterator']=='symbol'?function(_0x3b1ddb){return typeof _0x3b1ddb;}:function(_0xa315e9){const _0x37421e=_0x5e7438;return _0xa315e9&&typeof Symbol==_0x37421e(0x1aa)&&_0xa315e9[_0x37421e(0x1a8)]===Symbol&&_0xa315e9!==Symbol[_0x37421e(0x200)]?_0x37421e(0x208):typeof _0xa315e9;},L(_0x502970);}function R(_0x2069b4,_0x5afd55){const _0x50ac9c=_0xf242;if(L(_0x2069b4)!=_0x50ac9c(0x1f1)||!_0x2069b4)return _0x2069b4;var _0x310f51=_0x2069b4[Symbol[_0x50ac9c(0x1c5)]];if(_0x310f51!==void 0x0){var _0x2d0ef7=_0x310f51[_0x50ac9c(0x1d8)](_0x2069b4,_0x5afd55||_0x50ac9c(0x19e));if(L(_0x2d0ef7)!='object')return _0x2d0ef7;throw TypeError(_0x50ac9c(0x191));}return(_0x5afd55===_0x50ac9c(0x1be)?String:Number)(_0x2069b4);}function z(_0x29aedc){const _0xbb8dea=_0xf242;var _0x31cee0=R(_0x29aedc,_0xbb8dea(0x1be));return L(_0x31cee0)==_0xbb8dea(0x208)?_0x31cee0:_0x31cee0+'';}function B(_0x3adf98,_0x508364,_0x13822a){return(_0x508364=z(_0x508364))in _0x3adf98?Object['defineProperty'](_0x3adf98,_0x508364,{'value':_0x13822a,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x3adf98[_0x508364]=_0x13822a,_0x3adf98;}var V=class extends _0x49320b{constructor(..._0x1f2c5b){const _0x3edb34=_0xf242;super(..._0x1f2c5b),B(this,_0x3edb34(0x18e),new Set()),B(this,_0x3edb34(0x1cd),new Set());}[_0x1ceb6f(0x1d0)](_0x430b44){const _0x1dc732=_0x1ceb6f;return this[_0x1dc732(0x18e)][_0x1dc732(0x1fc)](_0x430b44),_0x5e1636(()=>this[_0x1dc732(0x18e)]['delete'](_0x430b44));}[_0x1ceb6f(0x1f4)](_0x30dbb3){const _0x38abe2=_0x1ceb6f;return this[_0x38abe2(0x1cd)]['add'](_0x30dbb3),_0x5e1636(()=>this[_0x38abe2(0x1cd)][_0x38abe2(0x1af)](_0x30dbb3));}[_0x1ceb6f(0x190)](_0x291aa3){const _0x11880e=_0x1ceb6f;return this['_sharedOperations'][_0x11880e(0x20a)](_0x291aa3);}['getInitialStates'](_0x2e5ee0){const _0x350403=_0x1ceb6f;return Array[_0x350403(0x187)](this['_reporters'])[_0x350403(0x19a)](_0x4cafe1=>_0x4cafe1(_0x2e5ee0));}};function H(_0x44db13,_0x1922eb){return function(_0x51f62f,_0xd9aa90){_0x1922eb(_0x51f62f,_0xd9aa90,_0x44db13);};}function U(_0x5c3ad2,_0x17ec96,_0xb7a8f3,_0x5e3061){const _0x124f31=_0x1ceb6f;var _0x25e8d9=arguments[_0x124f31(0x211)],_0x542298=_0x25e8d9<0x3?_0x17ec96:_0x5e3061===null?_0x5e3061=Object[_0x124f31(0x204)](_0x17ec96,_0xb7a8f3):_0x5e3061,_0x421246;if(typeof Reflect==_0x124f31(0x1f1)&&typeof Reflect[_0x124f31(0x1e8)]==_0x124f31(0x1aa))_0x542298=Reflect['decorate'](_0x5c3ad2,_0x17ec96,_0xb7a8f3,_0x5e3061);else{for(var _0x5b963c=_0x5c3ad2['length']-0x1;_0x5b963c>=0x0;_0x5b963c--)(_0x421246=_0x5c3ad2[_0x5b963c])&&(_0x542298=(_0x25e8d9<0x3?_0x421246(_0x542298):_0x25e8d9>0x3?_0x421246(_0x17ec96,_0xb7a8f3,_0x542298):_0x421246(_0x17ec96,_0xb7a8f3))||_0x542298);}return _0x25e8d9>0x3&&_0x542298&&Object[_0x124f31(0x1ad)](_0x17ec96,_0xb7a8f3,_0x542298),_0x542298;}let W=class extends _0x49b881{constructor(_0x4d23df,_0xf7099a,_0x4edc27){const _0x35bdfa=_0x1ceb6f;super(),this[_0x35bdfa(0x195)]=_0x4d23df,this[_0x35bdfa(0x1ab)]=_0xf7099a,this['_collabSessionService']=_0x4edc27,B(this,_0x35bdfa(0x1ff),new Map()),this[_0x35bdfa(0x1fd)]();}async[_0x1ceb6f(0x1de)](_0x58f453){const _0xd25627=_0x1ceb6f;return this[_0xd25627(0x1ff)][_0xd25627(0x20a)](_0x58f453)||await this['_startLiveShareCoordinator'](_0x58f453),this[_0xd25627(0x1ff)][_0xd25627(0x1a6)](_0x58f453);}['getLiveShareCoordinatorSync'](_0x234adb){const _0x1a5a96=_0x1ceb6f;var _0x28268e;return(_0x28268e=this[_0x1a5a96(0x1ff)][_0x1a5a96(0x1a6)](_0x234adb))==null?null:_0x28268e;}[_0x1ceb6f(0x1fd)](){const _0xb8758d=_0x1ceb6f;this[_0xb8758d(0x195)][_0xb8758d(0x18d)](_0xaf5923['UNIVER_SHEET'])['pipe'](_0x1df922(this['dispose$']))[_0xb8758d(0x1ec)](async _0x1377fe=>{const _0x1b1a24=_0xb8758d;let _0xae6b80=_0x1377fe[_0x1b1a24(0x1fa)][_0x1b1a24(0x194)]();this[_0x1b1a24(0x1ff)][_0x1b1a24(0x20a)](_0xae6b80)||this[_0x1b1a24(0x199)](_0xae6b80);}),this[_0xb8758d(0x195)][_0xb8758d(0x1a4)](_0xaf5923[_0xb8758d(0x1f6)])[_0xb8758d(0x180)](_0x1df922(this[_0xb8758d(0x19f)]))[_0xb8758d(0x1ec)](_0x270781=>{const _0x1c37d0=_0xb8758d;let _0x30907c=_0x270781[_0x1c37d0(0x194)](),_0x580051=this[_0x1c37d0(0x1ff)][_0x1c37d0(0x1a6)](_0x30907c);_0x580051==null||_0x580051['dispose']();});}async[_0x1ceb6f(0x199)](_0x3b7753){const _0xe28cad=_0x1ceb6f;let _0x1ea5d5=await this[_0xe28cad(0x1fe)]['requireSession'](_0x3b7753),_0x2ce62f=this[_0xe28cad(0x1ab)][_0xe28cad(0x1e4)](K,_0x3b7753,_0x1ea5d5);return _0x2ce62f[_0xe28cad(0x1ed)](),this[_0xe28cad(0x1ff)][_0xe28cad(0x1c8)](_0x3b7753,_0x2ce62f),_0x2ce62f;}};W=U([H(0x0,_0x43e007),H(0x1,_0x478c03(_0x31717f)),H(0x2,_0x478c03(_0x11c673))],W);let G=function(_0x77396e){const _0xe15eaa=_0x1ceb6f;return _0x77396e[_0xe15eaa(0x1a3)]=_0xe15eaa(0x1a1),_0x77396e[_0xe15eaa(0x183)]='idle',_0x77396e[_0xe15eaa(0x17f)]=_0xe15eaa(0x1b1),_0x77396e[_0xe15eaa(0x1c0)]=_0xe15eaa(0x186),_0x77396e['PRESENTING']=_0xe15eaa(0x1f3),_0x77396e;}({}),K=class extends _0x49b881{get[_0x1ceb6f(0x1b3)](){const _0x334a44=_0x1ceb6f;return this[_0x334a44(0x1da)][_0x334a44(0x1cf)]();}constructor(_0x1dd1ec,_0x2aa674,_0x37d1d3,_0x37f69,_0x1ac378){const _0x368346=_0x1ceb6f;super(),this[_0x368346(0x1eb)]=_0x1dd1ec,this[_0x368346(0x209)]=_0x2aa674,this[_0x368346(0x1dc)]=_0x37d1d3,this[_0x368346(0x1d4)]=_0x37f69,this['_commandService']=_0x1ac378,B(this,'_status$',new _0x35a652('idle')),B(this,_0x368346(0x1dd),this['_status$'][_0x368346(0x1bc)]()),B(this,_0x368346(0x1fd),!0x1),B(this,'_commandDisposable',null),B(this,_0x368346(0x19b),null);}[_0x1ceb6f(0x1e3)](){const _0x5b274e=_0x1ceb6f;var _0x5bdca0;(_0x5bdca0=this['_commandDisposable'])==null||_0x5bdca0[_0x5b274e(0x1e3)](),this[_0x5b274e(0x1da)]['next'](_0x5b274e(0x20f)),this[_0x5b274e(0x1da)]['complete']();}[_0x1ceb6f(0x1d5)](){const _0x79685d=_0x1ceb6f;return this[_0x79685d(0x1b3)];}[_0x1ceb6f(0x1ed)](){const _0x194672=_0x1ceb6f;this[_0x194672(0x1fd)]||(this['_init']=!0x0,this[_0x194672(0x209)]['sessionStatus$'][_0x194672(0x180)](_0x1df922(this['dispose$']))['subscribe'](_0x407ac0=>{const _0x3c2b3d=_0x194672;switch(_0x407ac0){case _0x51afad[_0x3c2b3d(0x1a3)]:this[_0x3c2b3d(0x18b)]();break;case _0x51afad[_0x3c2b3d(0x1e1)]:this[_0x3c2b3d(0x1f0)]();break;default:}}),this['_collabSession'][_0x194672(0x1b5)]['pipe'](_0x1df922(this[_0x194672(0x19f)]))[_0x194672(0x1ec)](_0x5c331f=>{const _0x3fd5f6=_0x194672;let {eventID:_0x3c949c}=_0x5c331f;switch(_0x3c949c){case _0xc2fe54[_0x3fd5f6(0x1bd)]:this[_0x3fd5f6(0x1ee)](_0x5c331f);break;case _0xc2fe54[_0x3fd5f6(0x193)]:this[_0x3fd5f6(0x192)](_0x5c331f);break;case _0xc2fe54['LIVESHARE_TERMINATE']:this[_0x3fd5f6(0x20b)]();break;case _0xc2fe54['NEW_CHANGESETS']:this[_0x3fd5f6(0x1e0)](_0x5c331f);break;default:}}));}[_0x1ceb6f(0x182)](){const _0x28fb1e=_0x1ceb6f;this['_collabSession'][_0x28fb1e(0x1cc)]({'eventID':_0xc2fe54[_0x28fb1e(0x1bf)],'data':{'unitID':this['_unitID'],'userID':this['_collabSession'][_0x28fb1e(0x19c)]()}},this[_0x28fb1e(0x1eb)]);}[_0x1ceb6f(0x1ca)](){const _0x3de99b=_0x1ceb6f;this[_0x3de99b(0x1b3)]==='presenting'&&(this['_status$'][_0x3de99b(0x20e)](_0x3de99b(0x20f)),this['_collabSession'][_0x3de99b(0x1cc)]({'eventID':_0xc2fe54[_0x3de99b(0x1ba)],'data':{'unitID':this['_unitID']}},this[_0x3de99b(0x1eb)]));}[_0x1ceb6f(0x1c4)](){const _0x40cb96=_0x1ceb6f;this[_0x40cb96(0x1b3)]===_0x40cb96(0x186)&&(this['_status$']['next'](_0x40cb96(0x1b1)),this['_startFollowing']());}['stopFollowing'](){const _0xcab73e=_0x1ceb6f;this[_0xcab73e(0x1b3)]==='following'&&this[_0xcab73e(0x1e9)]();}[_0x1ceb6f(0x1ee)](_0x4c1081){const _0x18fbe8=_0x1ceb6f;let {presenter:_0x5e21aa}=_0x4c1081[_0x18fbe8(0x1a2)],_0x502fa2=this['_collabSession']['getMemberID']();this[_0x18fbe8(0x19b)]=_0x5e21aa,_0x5e21aa===_0x502fa2?(this[_0x18fbe8(0x1e9)](),this[_0x18fbe8(0x1b0)]()):this[_0x18fbe8(0x1b3)]!==_0x18fbe8(0x186)&&(this[_0x18fbe8(0x181)](),this[_0x18fbe8(0x1ea)]());}['_fetchOperations'](){const _0x260a89=_0x1ceb6f;let _0x3382bd={'eventID':_0xc2fe54[_0x260a89(0x197)]};this[_0x260a89(0x209)]['send'](_0x3382bd,this['_unitID']);}[_0x1ceb6f(0x20b)](){const _0x589cf1=_0x1ceb6f;this[_0x589cf1(0x19b)]=null,this[_0x589cf1(0x1b3)]!==_0x589cf1(0x1f3)&&this[_0x589cf1(0x1ef)]();}[_0x1ceb6f(0x1e0)](_0x14366f){const _0x1a2853=_0x1ceb6f;if(this[_0x1a2853(0x1b3)]===_0x1a2853(0x1b1)&&this[_0x1a2853(0x19b)]===_0x14366f['data'][_0x1a2853(0x18c)]){let _0x94eb8f=_0x5a7fff(_0x14366f[_0x1a2853(0x1a2)])[_0x1a2853(0x203)][_0x1a2853(0x1c6)]()[_0x1a2853(0x1e7)](_0x5a1039=>_0x5a1039['id']===_0x598b51['id']);if(_0x94eb8f){let _0x324519=_0x94eb8f[_0x1a2853(0x1e5)]['unitId'],_0x4328e5=_0x94eb8f[_0x1a2853(0x1e5)][_0x1a2853(0x198)]['id'];setTimeout(()=>{const _0x263a83=_0x1a2853;this[_0x263a83(0x1b6)]['executeCommand'](_0x1a55e4['id'],{'unitId':_0x324519,'subUnitId':_0x4328e5},{'fromCollab':!0x0});});}}}['_startPresenting'](){const _0x4b602c=_0x1ceb6f;this['_status$'][_0x4b602c(0x20e)]('presenting');let _0x47970d=new Map(),_0x39934c=this[_0x4b602c(0x18a)]=new _0x5a4b9d();_0x39934c[_0x4b602c(0x1fc)](_0x5e1636(()=>{const _0x1eebd4=_0x4b602c;_0x47970d['forEach'](_0x4c7567=>_0x4c7567[_0x1eebd4(0x185)]()),_0x47970d['clear']();})),_0x39934c[_0x4b602c(0x1fc)](this[_0x4b602c(0x1b6)]['onCommandExecuted'](_0x540a7b=>{const _0x1c5ae6=_0x4b602c;if(_0x540a7b['type']!==_0x13e285[_0x1c5ae6(0x1f7)]||!this[_0x1c5ae6(0x1d4)][_0x1c5ae6(0x190)](_0x540a7b['id']))return;let {id:_0x4812b3}=_0x540a7b,_0x4ddf37;if(_0x47970d[_0x1c5ae6(0x20a)](_0x4812b3))_0x4ddf37=_0x47970d[_0x1c5ae6(0x1a6)](_0x4812b3);else{var _0x413c59;_0x4ddf37=new _0x1eeb39(),_0x47970d[_0x1c5ae6(0x1c8)](_0x4812b3,_0x4ddf37),_0x4ddf37[_0x1c5ae6(0x180)](_0xdaccc4((_0x413c59=this[_0x1c5ae6(0x1dc)][_0x1c5ae6(0x1fb)](_0x1c5ae6(0x1d7)))==null?0xc8:_0x413c59,void 0x0,{'trailing':!0x0,'leading':!0x0}))[_0x1c5ae6(0x1ec)](_0x14ad6a=>{const _0x4dd93f=_0x1c5ae6;this[_0x4dd93f(0x209)][_0x4dd93f(0x1cc)]({'eventID':_0xc2fe54[_0x4dd93f(0x193)],'data':{'unitID':this['_unitID'],'operations':{[_0x14ad6a['id']]:{'id':_0x14ad6a['id'],'params':JSON[_0x4dd93f(0x213)](_0x14ad6a[_0x4dd93f(0x1e5)])}}}},this[_0x4dd93f(0x1eb)]);});}_0x4ddf37[_0x1c5ae6(0x20e)](_0x540a7b);})),this[_0x4b602c(0x1d4)]['getInitialStates'](this[_0x4b602c(0x1eb)])['forEach'](_0xe1d573=>this[_0x4b602c(0x209)][_0x4b602c(0x1cc)]({'eventID':_0xc2fe54['LIVESHARE_OPERATION'],'data':{'unitID':this['_unitID'],'operations':{[_0xe1d573['id']]:{'id':_0xe1d573['id'],'params':JSON[_0x4b602c(0x213)](_0xe1d573[_0x4b602c(0x1e5)])}}}},this['_unitID']));}['_stopPresenting'](){const _0x2440e6=_0x1ceb6f;var _0x383198;this['_status$'][_0x2440e6(0x20e)](_0x2440e6(0x20f)),(_0x383198=this[_0x2440e6(0x18a)])==null||_0x383198[_0x2440e6(0x1e3)](),this[_0x2440e6(0x18a)]=null;}['_startFollowing'](){const _0x2ca64a=_0x1ceb6f;var _0x46f4ed;(_0x46f4ed=this[_0x2ca64a(0x18a)])==null||_0x46f4ed[_0x2ca64a(0x1e3)](),this[_0x2ca64a(0x1da)][_0x2ca64a(0x20e)](_0x2ca64a(0x1b1));}[_0x1ceb6f(0x1ef)](){const _0x94429b=_0x1ceb6f;var _0x120fc9;this[_0x94429b(0x1da)]['next']('idle'),(_0x120fc9=this[_0x94429b(0x18a)])==null||_0x120fc9[_0x94429b(0x1e3)](),this[_0x94429b(0x18a)]=null;}[_0x1ceb6f(0x1e9)](){const _0x36a280=_0x1ceb6f;var _0x2b043b;this[_0x36a280(0x1da)][_0x36a280(0x20e)](_0x36a280(0x186)),(_0x2b043b=this[_0x36a280(0x18a)])==null||_0x2b043b['dispose']();}['_handleOperation'](_0x5649d3){const _0x31f62d=_0x1ceb6f;if([_0x31f62d(0x1f3),_0x31f62d(0x186),_0x31f62d(0x1a1)][_0x31f62d(0x1b9)](this[_0x31f62d(0x1b3)])||!_0x5649d3[_0x31f62d(0x1a2)][_0x31f62d(0x1c1)]||_0x5649d3[_0x31f62d(0x1a2)][_0x31f62d(0x1c1)]===this[_0x31f62d(0x209)][_0x31f62d(0x19c)]())return;this[_0x31f62d(0x1b3)]===_0x31f62d(0x20f)&&this[_0x31f62d(0x1ea)]();let _0x2f400a=_0x5649d3[_0x31f62d(0x1a2)][_0x31f62d(0x1b7)];Object['values'](_0x2f400a)[_0x31f62d(0x1e6)](_0x5768a7=>{const _0x1c4057=_0x31f62d;this[_0x1c4057(0x1b6)][_0x1c4057(0x1d3)](_0x5768a7['id'],_0x5768a7[_0x1c4057(0x1e5)]?JSON[_0x1c4057(0x1df)](_0x5768a7[_0x1c4057(0x1e5)]):null,{'fromCollab':!0x0});});}[_0x1ceb6f(0x18b)](){const _0x5bb17a=_0x1ceb6f;var _0x3c7e05;this['_status$'][_0x5bb17a(0x20e)](_0x5bb17a(0x1a1)),(_0x3c7e05=this[_0x5bb17a(0x18a)])==null||_0x3c7e05[_0x5bb17a(0x1e3)]();}[_0x1ceb6f(0x1f0)](){const _0x1d3745=_0x1ceb6f;this[_0x1d3745(0x1da)][_0x1d3745(0x20e)](_0x1d3745(0x20f)),this[_0x1d3745(0x1b4)]();}};K=U([H(0x2,_0x2bf9f3),H(0x3,_0x478c03(V)),H(0x4,_0x2b3864)],K);function q(){const _0x567b6b=_0x1ceb6f;let _0x247b4f=_0x5d2936(W),_0x46cb69=_0x5d2936(_0x43e007),_0x4fa823=_0x4b13c5(()=>_0x46cb69['getCurrentTypeOfUnit$'](_0xaf5923[_0x567b6b(0x1f6)]),void 0x0,!0x1,[]),[_0x4eb670,_0x1c81c0]=_0x2cbf33(null),[_0x21ed0c,_0x30b9d0]=_0x2cbf33(_0x567b6b(0x20f)),_0x3d2ca8=_0x54f12e(null);return _0x37bb14(()=>(_0x4fa823&&_0x247b4f[_0x567b6b(0x1de)](_0x4fa823[_0x567b6b(0x194)]())[_0x567b6b(0x1cb)](_0x7d2909=>{const _0x55c766=_0x567b6b;_0x1c81c0(_0x7d2909),_0x3d2ca8[_0x55c766(0x20c)]=_0x7d2909[_0x55c766(0x1dd)][_0x55c766(0x1ec)](_0x2a4b2e=>{_0x30b9d0(_0x2a4b2e);});}),()=>{const _0x3e2956=_0x567b6b;var _0x5eaf64;(_0x5eaf64=_0x3d2ca8[_0x3e2956(0x20c)])==null||_0x5eaf64[_0x3e2956(0x1ac)](),_0x3d2ca8[_0x3e2956(0x20c)]=null;}),[_0x4fa823,_0x247b4f]),_0x4eb670?_0xad4a0d(_0x5e1365,{'align':_0x567b6b(0x207),'disabled':_0x21ed0c==='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':_0xad4a0d(ce,{'status':_0x21ed0c,'coordinator':_0x4eb670}),'children':_0xad4a0d(_0x567b6b(0x1b2),{'className':_0x21aa0f('univer-border-none\x20univer-text-gray-600\x20univer-outline-none',{'univer-cursor-not-allowed':_0x21ed0c===_0x567b6b(0x1a1),'univer-cursor-pointer\x20hover:univer-bg-gray-400':_0x21ed0c!==_0x567b6b(0x1a1)}),'type':_0x567b6b(0x1b2),'children':_0xad4a0d(_0xee1e9c,{'className':_0x567b6b(0x20d)})})}):null;}function ce(_0x3f732b){const _0x434c63=_0x1ceb6f;let {status:_0x3757e9,coordinator:_0x221a76}=_0x3f732b;switch(_0x3757e9){case'idle':return _0xad4a0d(le,{'coordinator':_0x221a76});case _0x434c63(0x1b1):return _0xad4a0d(ue,{'coordinator':_0x221a76});case _0x434c63(0x186):return _0xad4a0d(de,{'coordinator':_0x221a76});case _0x434c63(0x1a1):return _0xad4a0d(fe,{});case _0x434c63(0x1f3):return _0xad4a0d(J,{'coordinator':_0x221a76});default:return null;}}function le(_0x28f13f){const _0x5b2181=_0x1ceb6f;let {coordinator:_0xb9e5e6}=_0x28f13f;return _0x1069d8(_0x75d924,{'children':[_0xad4a0d(_0x5b2181(0x1c3),{'className':_0x5b2181(0x1bb),'children':_0x5b2181(0x206)}),_0xad4a0d(_0x45d162,{'onClick':()=>_0xb9e5e6[_0x5b2181(0x182)](),'children':_0x5b2181(0x1e2)})]});}function ue(_0x4d09ce){const _0x4df3d4=_0x1ceb6f;let {coordinator:_0x53cf08}=_0x4d09ce;return _0x1069d8(_0x75d924,{'children':[_0xad4a0d(_0x4df3d4(0x1c3),{'className':_0x4df3d4(0x1bb),'children':'You\x27re\x20following\x20the\x20presenter'}),_0xad4a0d(_0x45d162,{'onClick':()=>_0x53cf08[_0x4df3d4(0x202)](),'children':'Stop\x20following'})]});}function de(_0xc72e3b){const _0x1315a3=_0x1ceb6f;let {coordinator:_0x15d306}=_0xc72e3b;return _0x1069d8(_0x75d924,{'children':[_0xad4a0d(_0x1315a3(0x1c3),{'className':_0x1315a3(0x1bb),'children':_0x1315a3(0x1b8)}),_0xad4a0d(_0x45d162,{'variant':'text','onClick':()=>_0x15d306[_0x1315a3(0x1c4)](),'children':_0x1315a3(0x1a0)})]});}function J(_0x5342fa){const _0x3306e0=_0x1ceb6f;let {coordinator:_0x37559e}=_0x5342fa;return _0x1069d8(_0x75d924,{'children':[_0xad4a0d('div',{'className':_0x3306e0(0x1bb),'children':_0x3306e0(0x1f9)}),_0xad4a0d(_0x45d162,{'variant':_0x3306e0(0x19e),'onClick':()=>_0x37559e[_0x3306e0(0x1ca)](),'children':_0x3306e0(0x188)})]});}function fe(){return _0xad4a0d(_0x75d924,{'children':'You\x27are\x20offline.'});}let Y=class extends _0x49320b{constructor(_0x5c830e,_0x4f1d59){const _0x338185=_0x1ceb6f;super(),this[_0x338185(0x1ab)]=_0x5c830e,this[_0x338185(0x1a7)]=_0x4f1d59,this[_0x338185(0x1f8)]();}['_mountLiveShare'](){const _0x31eaca=_0x1ceb6f;this[_0x31eaca(0x1c9)](this[_0x31eaca(0x1a7)][_0x31eaca(0x1c2)](_0x6407ff[_0x31eaca(0x1d2)],()=>_0x17807b(q,this[_0x31eaca(0x1ab)])));}};Y=U([H(0x0,_0x478c03(_0x31717f)),H(0x1,_0x5acf09)],Y);var pe=_0x1ceb6f(0x201),me=_0x1ceb6f(0x1d9);const X='live-share.config';function _0x3ce7(){const _0x9766b3=['unsubscribe','defineProperty','3126822YEJWkH','delete','_startPresenting','following','button','_status','_fetchOperations','event$','_commandService','operations','You\x27re\x20not\x20following\x20the\x20presenter','includes','LIVESHARE_TERMINATE','univer-mb-3\x20univer-w-full\x20univer-text-sm','asObservable','LIVESHARE_NEW_HOST','string','LIVESHARE_REQUEST_HOST','NOT_FOLLOWING','presenter','registerComponent','div','startFollowing','toPrimitive','reverse','205JEKNVA','set','disposeWithMe','stopPresenting','then','send','_reporters','UNIVER_LIVE_SHARE_PLUGIN','getValue','registerSharedOperation','_config','HEADER_MENU','executeCommand','_liveShareService','getStatus','onStarting','SAME_OPERATION_SHARE_INTERVAL','call','0.23.0','_status$','2067648bqWgrF','_configService','status$','getLiveShareCoordinator','parse','_handleNewChangeSets','ONLINE','Start','dispose','createInstance','params','forEach','find','decorate','_stopFollowing','_startFollowing','_unitID','subscribe','init','_handleNewHost','_beIdle','_handleOnline','object','version','presenting','registerInitialStateReporter','684373AblLeV','UNIVER_SHEET','OPERATION','_mountLiveShare','You\x27re\x20presenting\x20the\x20document','unit','getConfig','add','_init','_collabSessionService','_entities','prototype','@univerjs-pro/live-share','stopFollowing','mutations','getOwnPropertyDescriptor','setConfig','Present\x20this\x20document','end','symbol','_collabSession','has','_handleTerminate','current','univer-size-4','next','idle','1574982uqdikN','length','override','stringify','FOLLOWING','pipe','_stopPresenting','tryStartPresenting','IDLE','7rCuqgV','complete','not-following','from','Stop\x20presenting','1776ZGruRQ','_commandDisposable','_handleOffline','memberID','getTypeOfUnitAdded$','_sharedOperations','packageName','shouldShareOperation','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','_handleOperation','LIVESHARE_OPERATION','getUnitId','_univerInstanceService','UNIVER_UNKNOWN','LIVESHARE_FETCH_OPERATIONS','sheet','_startLiveShareCoordinator','map','_presenter','getMemberID','1558000Drjjlm','default','dispose$','Start\x20following','offline','data','OFFLINE','getTypeOfUnitDisposed$','type','get','_uiPartsService','constructor','8077712blRRbK','function','_injector'];_0x3ce7=function(){return _0x9766b3;};return _0x3ce7();}Symbol(X);const Z={};let Q=class extends _0x49320b{constructor(_0x58079a){const _0x5893d8=_0x1ceb6f;super(),this[_0x5893d8(0x1d4)]=_0x58079a,this[_0x5893d8(0x1fd)]();}[_0x1ceb6f(0x1fd)](){const _0xf05b41=_0x1ceb6f;[_0x4c9a92['id'],_0x541869['id'],_0x1a55e4['id']][_0xf05b41(0x1e6)](_0x5db70b=>{const _0x35f844=_0xf05b41;this[_0x35f844(0x1c9)](this['_liveShareService'][_0x35f844(0x1d0)](_0x5db70b));});}};Q=U([H(0x0,_0x478c03(V))],Q);let $=class extends _0x58c46d{constructor(_0x13d814=Z,_0x9c8449,_0x5652e4){const _0x17b114=_0x1ceb6f;super(),this[_0x17b114(0x1d1)]=_0x13d814,this[_0x17b114(0x1ab)]=_0x9c8449,this['_configService']=_0x5652e4;let {..._0x407d63}=_0x3d1d44({},Z,this[_0x17b114(0x1d1)]);this[_0x17b114(0x1dc)][_0x17b114(0x205)](X,_0x407d63);}[_0x1ceb6f(0x1d6)](){const _0x2564f4=_0x1ceb6f;_0x25e916(this[_0x2564f4(0x1ab)],_0x352515([[V],[W],[Q],[Y]],this['_config'][_0x2564f4(0x212)])),_0x837966(this[_0x2564f4(0x1ab)],[[Q]]);}['onRendered'](){_0x837966(this['_injector'],[[Y]]);}};B($,_0x1ceb6f(0x1a5),_0xaf5923[_0x1ceb6f(0x196)]),B($,'pluginName',_0x1ceb6f(0x1ce)),B($,_0x1ceb6f(0x18f),pe),B($,_0x1ceb6f(0x1f2),me),$=U([_0x99e981(_0x558de1),H(0x1,_0x478c03(_0x31717f)),H(0x2,_0x2bf9f3)],$);function _0xf242(_0x5731db,_0x1bd9c2){_0x5731db=_0x5731db-0x17f;const _0x3ce787=_0x3ce7();let _0xf2426e=_0x3ce787[_0x5731db];return _0xf2426e;}export{Y as DesktopLiveShareController,q as LiveShare,W as LiveShareController,K as LiveShareCoordinator,V as LiveShareService,G as LiveShareStatus,$ as UniverLiveSharePlugin};
package/lib/facade.js CHANGED
@@ -1 +1 @@
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{};
1
+ const _0x2b2793=_0xfb7e;function _0x2c5b(){const _0x3e0a9b=['3017034IkGHGY','217cqbwht','getStatus','330968eyFqaa','call','_liveShareController','No\x20active\x20workbook\x20found.','25818NbfjtG','UNIVER_SHEET','_injector','startPresenting','getCurrentUnitOfType','283806ThXkUl','constructor','1945ocvhKN','default','327324oUaYST','stopPresenting','getLiveShareStatus','getLiveShareCoordinatorSync','get','1340126yuXMoq','tryStartPresenting','symbol','function','270PYSTYI','477GumFMJ','_initialize','startFollowing','1023QSlcJG','14596STYEhl','prototype','extend','toPrimitive','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','getUnitId','iterator','No\x20LiveShareCoordinator\x20found\x20for\x20the\x20active\x20workbook.','IDLE','string','stopFollowing'];_0x2c5b=function(){return _0x3e0a9b;};return _0x2c5b();}(function(_0xc6e297,_0x387d01){const _0x5b1b04=_0xfb7e,_0x3d036b=_0xc6e297();while(!![]){try{const _0x34f92b=-parseInt(_0x5b1b04(0x1df))/0x1+parseInt(_0x5b1b04(0x1f3))/0x2+-parseInt(_0x5b1b04(0x1e4))/0x3*(parseInt(_0x5b1b04(0x1e8))/0x4)+-parseInt(_0x5b1b04(0x1d8))/0x5*(-parseInt(_0x5b1b04(0x1fa))/0x6)+parseInt(_0x5b1b04(0x1f4))/0x7*(parseInt(_0x5b1b04(0x1f6))/0x8)+-parseInt(_0x5b1b04(0x1d6))/0x9*(-parseInt(_0x5b1b04(0x1e3))/0xa)+-parseInt(_0x5b1b04(0x1e7))/0xb*(parseInt(_0x5b1b04(0x1da))/0xc);if(_0x34f92b===_0x387d01)break;else _0x3d036b['push'](_0x3d036b['shift']());}catch(_0x222e32){_0x3d036b['push'](_0x3d036b['shift']());}}}(_0x2c5b,0xd1c59));import{LiveShareController as _0xef4ec4,LiveShareStatus as _0x3acb3b}from'@univerjs-pro/live-share';import{IUniverInstanceService as _0xcb238d,UniverInstanceType as _0x29e678}from'@univerjs/core';function _0xfb7e(_0x56337f,_0x22fb1a){_0x56337f=_0x56337f-0x1d3;const _0x2c5b12=_0x2c5b();let _0xfb7ebc=_0x2c5b12[_0x56337f];return _0xfb7ebc;}import{FEnum as _0x4164bf,FUniver as _0x82965a}from'@univerjs/core/facade';function o(_0x13af00){'@babel/helpers - typeof';const _0x35659d=_0xfb7e;return o=typeof Symbol==_0x35659d(0x1e2)&&typeof Symbol[_0x35659d(0x1ee)]=='symbol'?function(_0x33c036){return typeof _0x33c036;}:function(_0x355214){const _0x392fa6=_0x35659d;return _0x355214&&typeof Symbol==_0x392fa6(0x1e2)&&_0x355214[_0x392fa6(0x1d7)]===Symbol&&_0x355214!==Symbol[_0x392fa6(0x1e9)]?_0x392fa6(0x1e1):typeof _0x355214;},o(_0x13af00);}function s(_0x4ee508,_0x227648){const _0x49533c=_0xfb7e;if(o(_0x4ee508)!='object'||!_0x4ee508)return _0x4ee508;var _0x26682a=_0x4ee508[Symbol[_0x49533c(0x1eb)]];if(_0x26682a!==void 0x0){var _0x386776=_0x26682a[_0x49533c(0x1f7)](_0x4ee508,_0x227648||_0x49533c(0x1d9));if(o(_0x386776)!='object')return _0x386776;throw TypeError(_0x49533c(0x1ec));}return(_0x227648===_0x49533c(0x1f1)?String:Number)(_0x4ee508);}function c(_0x412104){const _0x4edc78=_0xfb7e;var _0x3fc70b=s(_0x412104,_0x4edc78(0x1f1));return o(_0x3fc70b)==_0x4edc78(0x1e1)?_0x3fc70b:_0x3fc70b+'';}function l(_0x404db2,_0x5dc862,_0x47c5d9){return(_0x5dc862=c(_0x5dc862))in _0x404db2?Object['defineProperty'](_0x404db2,_0x5dc862,{'value':_0x47c5d9,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x404db2[_0x5dc862]=_0x47c5d9,_0x404db2;}var u=class extends _0x82965a{constructor(..._0x454747){const _0x59e190=_0xfb7e;super(..._0x454747),l(this,_0x59e190(0x1f8),void 0x0);}[_0x2b2793(0x1e5)](_0xcbb598){const _0xd09ac9=_0x2b2793;this[_0xd09ac9(0x1f8)]=_0xcbb598[_0xd09ac9(0x1de)](_0xef4ec4);}[_0x2b2793(0x1dc)](){const _0x4152e9=_0x2b2793;var _0x1bee29;let _0x59b522=this['_injector'][_0x4152e9(0x1de)](_0xcb238d)[_0x4152e9(0x1d5)](_0x29e678['UNIVER_SHEET']);if(!_0x59b522)throw Error(_0x4152e9(0x1f9));let _0x5e84f4=_0x59b522[_0x4152e9(0x1ed)](),_0x8c4df1=this[_0x4152e9(0x1f8)][_0x4152e9(0x1dd)](_0x5e84f4);return(_0x1bee29=_0x8c4df1==null?void 0x0:_0x8c4df1[_0x4152e9(0x1f5)]())==null?_0x3acb3b[_0x4152e9(0x1f0)]:_0x1bee29;}[_0x2b2793(0x1e6)](){const _0x5095aa=_0x2b2793;let _0x33636b=this[_0x5095aa(0x1d3)][_0x5095aa(0x1de)](_0xcb238d)[_0x5095aa(0x1d5)](_0x29e678[_0x5095aa(0x1fb)]);if(!_0x33636b)throw Error(_0x5095aa(0x1f9));let _0x158f25=_0x33636b[_0x5095aa(0x1ed)](),_0x45d0a1=this[_0x5095aa(0x1f8)]['getLiveShareCoordinatorSync'](_0x158f25);if(!_0x45d0a1)throw Error(_0x5095aa(0x1ef));_0x45d0a1['startFollowing']();}['stopFollowing'](){const _0x7b297=_0x2b2793;let _0x4870c1=this['_injector'][_0x7b297(0x1de)](_0xcb238d)[_0x7b297(0x1d5)](_0x29e678['UNIVER_SHEET']);if(!_0x4870c1)throw Error(_0x7b297(0x1f9));let _0x405d70=_0x4870c1[_0x7b297(0x1ed)](),_0x4809a1=this[_0x7b297(0x1f8)][_0x7b297(0x1dd)](_0x405d70);if(!_0x4809a1)throw Error('No\x20LiveShareCoordinator\x20found\x20for\x20the\x20active\x20workbook.');_0x4809a1[_0x7b297(0x1f2)]();}[_0x2b2793(0x1d4)](){const _0x126d9f=_0x2b2793;let _0x3611e9=this['_injector'][_0x126d9f(0x1de)](_0xcb238d)[_0x126d9f(0x1d5)](_0x29e678[_0x126d9f(0x1fb)]);if(!_0x3611e9)throw Error('No\x20active\x20workbook\x20found.');let _0x3102aa=_0x3611e9[_0x126d9f(0x1ed)](),_0x3fc61d=this['_liveShareController'][_0x126d9f(0x1dd)](_0x3102aa);if(!_0x3fc61d)throw Error(_0x126d9f(0x1ef));_0x3fc61d[_0x126d9f(0x1e0)]();}[_0x2b2793(0x1db)](){const _0x3d92e2=_0x2b2793;let _0x48364c=this['_injector']['get'](_0xcb238d)[_0x3d92e2(0x1d5)](_0x29e678[_0x3d92e2(0x1fb)]);if(!_0x48364c)throw Error('No\x20active\x20workbook\x20found.');let _0xa08bc=_0x48364c[_0x3d92e2(0x1ed)](),_0x59c961=this['_liveShareController'][_0x3d92e2(0x1dd)](_0xa08bc);if(!_0x59c961)throw Error(_0x3d92e2(0x1ef));_0x59c961['stopPresenting']();}};_0x82965a[_0x2b2793(0x1ea)](u);var d=class extends _0x4164bf{get['LiveShareStatusEnum'](){return _0x3acb3b;}};_0x4164bf[_0x2b2793(0x1ea)](d);export{};
package/lib/index.js CHANGED
@@ -1 +1 @@
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};
1
+ const _0x1ceb6f=_0xf242;(function(_0x3b1cf9,_0x30260b){const _0x5cd423=_0xf242,_0x347ef9=_0x3b1cf9();while(!![]){try{const _0x471c79=parseInt(_0x5cd423(0x1f5))/0x1+-parseInt(_0x5cd423(0x19d))/0x2+-parseInt(_0x5cd423(0x1db))/0x3+-parseInt(_0x5cd423(0x189))/0x4*(parseInt(_0x5cd423(0x1c7))/0x5)+parseInt(_0x5cd423(0x1ae))/0x6*(parseInt(_0x5cd423(0x184))/0x7)+parseInt(_0x5cd423(0x1a9))/0x8+-parseInt(_0x5cd423(0x210))/0x9;if(_0x471c79===_0x30260b)break;else _0x347ef9['push'](_0x347ef9['shift']());}catch(_0xb63a8a){_0x347ef9['push'](_0x347ef9['shift']());}}}(_0x3ce7,0x8734e));import{CommandType as _0x13e285,DependentOn as _0x99e981,Disposable as _0x49320b,DisposableCollection as _0x5a4b9d,ICommandService as _0x2b3864,IConfigService as _0x2bf9f3,IUniverInstanceService as _0x43e007,Inject as _0x478c03,Injector as _0x31717f,Plugin as _0x58c46d,RxDisposable as _0x49b881,UniverInstanceType as _0xaf5923,merge as _0x3d1d44,mergeOverrideWithDependencies as _0x352515,registerDependencies as _0x25e916,toDisposable as _0x5e1636,touchDependencies as _0x837966}from'@univerjs/core';import{BuiltInUIPart as _0x6407ff,IUIPartsService as _0x5acf09,connectInjector as _0x17807b,useDependency as _0x5d2936,useObservable as _0x4b13c5}from'@univerjs/ui';import{Button as _0x45d162,Dropdown as _0x5e1365,clsx as _0x21aa0f}from'@univerjs/design';import{LiveShareIcon as _0xee1e9c}from'@univerjs/icons';import{useEffect as _0x37bb14,useRef as _0x54f12e,useState as _0x2cbf33}from'react';import{CollaborationEvent as _0xc2fe54,parseProtocolChangeset as _0x5a7fff}from'@univerjs-pro/collaboration';import{CollaborationSessionService as _0x11c673,SessionStatus as _0x51afad,UniverCollaborationClientPlugin as _0x558de1}from'@univerjs-pro/collaboration-client';import{InsertSheetMutation as _0x598b51,SetWorksheetActiveOperation as _0x1a55e4}from'@univerjs/sheets';import{BehaviorSubject as _0x35a652,Subject as _0x1eeb39}from'rxjs';import{takeUntil as _0x1df922,throttleTime as _0xdaccc4}from'rxjs/operators';import{Fragment as _0x75d924,jsx as _0xad4a0d,jsxs as _0x1069d8}from'react/jsx-runtime';import{SetScrollOperation as _0x541869,SetZoomRatioOperation as _0x4c9a92}from'@univerjs/sheets-ui';function L(_0x502970){'@babel/helpers - typeof';const _0x5e7438=_0xf242;return L=typeof Symbol==_0x5e7438(0x1aa)&&typeof Symbol['iterator']=='symbol'?function(_0x3b1ddb){return typeof _0x3b1ddb;}:function(_0xa315e9){const _0x37421e=_0x5e7438;return _0xa315e9&&typeof Symbol==_0x37421e(0x1aa)&&_0xa315e9[_0x37421e(0x1a8)]===Symbol&&_0xa315e9!==Symbol[_0x37421e(0x200)]?_0x37421e(0x208):typeof _0xa315e9;},L(_0x502970);}function R(_0x2069b4,_0x5afd55){const _0x50ac9c=_0xf242;if(L(_0x2069b4)!=_0x50ac9c(0x1f1)||!_0x2069b4)return _0x2069b4;var _0x310f51=_0x2069b4[Symbol[_0x50ac9c(0x1c5)]];if(_0x310f51!==void 0x0){var _0x2d0ef7=_0x310f51[_0x50ac9c(0x1d8)](_0x2069b4,_0x5afd55||_0x50ac9c(0x19e));if(L(_0x2d0ef7)!='object')return _0x2d0ef7;throw TypeError(_0x50ac9c(0x191));}return(_0x5afd55===_0x50ac9c(0x1be)?String:Number)(_0x2069b4);}function z(_0x29aedc){const _0xbb8dea=_0xf242;var _0x31cee0=R(_0x29aedc,_0xbb8dea(0x1be));return L(_0x31cee0)==_0xbb8dea(0x208)?_0x31cee0:_0x31cee0+'';}function B(_0x3adf98,_0x508364,_0x13822a){return(_0x508364=z(_0x508364))in _0x3adf98?Object['defineProperty'](_0x3adf98,_0x508364,{'value':_0x13822a,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x3adf98[_0x508364]=_0x13822a,_0x3adf98;}var V=class extends _0x49320b{constructor(..._0x1f2c5b){const _0x3edb34=_0xf242;super(..._0x1f2c5b),B(this,_0x3edb34(0x18e),new Set()),B(this,_0x3edb34(0x1cd),new Set());}[_0x1ceb6f(0x1d0)](_0x430b44){const _0x1dc732=_0x1ceb6f;return this[_0x1dc732(0x18e)][_0x1dc732(0x1fc)](_0x430b44),_0x5e1636(()=>this[_0x1dc732(0x18e)]['delete'](_0x430b44));}[_0x1ceb6f(0x1f4)](_0x30dbb3){const _0x38abe2=_0x1ceb6f;return this[_0x38abe2(0x1cd)]['add'](_0x30dbb3),_0x5e1636(()=>this[_0x38abe2(0x1cd)][_0x38abe2(0x1af)](_0x30dbb3));}[_0x1ceb6f(0x190)](_0x291aa3){const _0x11880e=_0x1ceb6f;return this['_sharedOperations'][_0x11880e(0x20a)](_0x291aa3);}['getInitialStates'](_0x2e5ee0){const _0x350403=_0x1ceb6f;return Array[_0x350403(0x187)](this['_reporters'])[_0x350403(0x19a)](_0x4cafe1=>_0x4cafe1(_0x2e5ee0));}};function H(_0x44db13,_0x1922eb){return function(_0x51f62f,_0xd9aa90){_0x1922eb(_0x51f62f,_0xd9aa90,_0x44db13);};}function U(_0x5c3ad2,_0x17ec96,_0xb7a8f3,_0x5e3061){const _0x124f31=_0x1ceb6f;var _0x25e8d9=arguments[_0x124f31(0x211)],_0x542298=_0x25e8d9<0x3?_0x17ec96:_0x5e3061===null?_0x5e3061=Object[_0x124f31(0x204)](_0x17ec96,_0xb7a8f3):_0x5e3061,_0x421246;if(typeof Reflect==_0x124f31(0x1f1)&&typeof Reflect[_0x124f31(0x1e8)]==_0x124f31(0x1aa))_0x542298=Reflect['decorate'](_0x5c3ad2,_0x17ec96,_0xb7a8f3,_0x5e3061);else{for(var _0x5b963c=_0x5c3ad2['length']-0x1;_0x5b963c>=0x0;_0x5b963c--)(_0x421246=_0x5c3ad2[_0x5b963c])&&(_0x542298=(_0x25e8d9<0x3?_0x421246(_0x542298):_0x25e8d9>0x3?_0x421246(_0x17ec96,_0xb7a8f3,_0x542298):_0x421246(_0x17ec96,_0xb7a8f3))||_0x542298);}return _0x25e8d9>0x3&&_0x542298&&Object[_0x124f31(0x1ad)](_0x17ec96,_0xb7a8f3,_0x542298),_0x542298;}let W=class extends _0x49b881{constructor(_0x4d23df,_0xf7099a,_0x4edc27){const _0x35bdfa=_0x1ceb6f;super(),this[_0x35bdfa(0x195)]=_0x4d23df,this[_0x35bdfa(0x1ab)]=_0xf7099a,this['_collabSessionService']=_0x4edc27,B(this,_0x35bdfa(0x1ff),new Map()),this[_0x35bdfa(0x1fd)]();}async[_0x1ceb6f(0x1de)](_0x58f453){const _0xd25627=_0x1ceb6f;return this[_0xd25627(0x1ff)][_0xd25627(0x20a)](_0x58f453)||await this['_startLiveShareCoordinator'](_0x58f453),this[_0xd25627(0x1ff)][_0xd25627(0x1a6)](_0x58f453);}['getLiveShareCoordinatorSync'](_0x234adb){const _0x1a5a96=_0x1ceb6f;var _0x28268e;return(_0x28268e=this[_0x1a5a96(0x1ff)][_0x1a5a96(0x1a6)](_0x234adb))==null?null:_0x28268e;}[_0x1ceb6f(0x1fd)](){const _0xb8758d=_0x1ceb6f;this[_0xb8758d(0x195)][_0xb8758d(0x18d)](_0xaf5923['UNIVER_SHEET'])['pipe'](_0x1df922(this['dispose$']))[_0xb8758d(0x1ec)](async _0x1377fe=>{const _0x1b1a24=_0xb8758d;let _0xae6b80=_0x1377fe[_0x1b1a24(0x1fa)][_0x1b1a24(0x194)]();this[_0x1b1a24(0x1ff)][_0x1b1a24(0x20a)](_0xae6b80)||this[_0x1b1a24(0x199)](_0xae6b80);}),this[_0xb8758d(0x195)][_0xb8758d(0x1a4)](_0xaf5923[_0xb8758d(0x1f6)])[_0xb8758d(0x180)](_0x1df922(this[_0xb8758d(0x19f)]))[_0xb8758d(0x1ec)](_0x270781=>{const _0x1c37d0=_0xb8758d;let _0x30907c=_0x270781[_0x1c37d0(0x194)](),_0x580051=this[_0x1c37d0(0x1ff)][_0x1c37d0(0x1a6)](_0x30907c);_0x580051==null||_0x580051['dispose']();});}async[_0x1ceb6f(0x199)](_0x3b7753){const _0xe28cad=_0x1ceb6f;let _0x1ea5d5=await this[_0xe28cad(0x1fe)]['requireSession'](_0x3b7753),_0x2ce62f=this[_0xe28cad(0x1ab)][_0xe28cad(0x1e4)](K,_0x3b7753,_0x1ea5d5);return _0x2ce62f[_0xe28cad(0x1ed)](),this[_0xe28cad(0x1ff)][_0xe28cad(0x1c8)](_0x3b7753,_0x2ce62f),_0x2ce62f;}};W=U([H(0x0,_0x43e007),H(0x1,_0x478c03(_0x31717f)),H(0x2,_0x478c03(_0x11c673))],W);let G=function(_0x77396e){const _0xe15eaa=_0x1ceb6f;return _0x77396e[_0xe15eaa(0x1a3)]=_0xe15eaa(0x1a1),_0x77396e[_0xe15eaa(0x183)]='idle',_0x77396e[_0xe15eaa(0x17f)]=_0xe15eaa(0x1b1),_0x77396e[_0xe15eaa(0x1c0)]=_0xe15eaa(0x186),_0x77396e['PRESENTING']=_0xe15eaa(0x1f3),_0x77396e;}({}),K=class extends _0x49b881{get[_0x1ceb6f(0x1b3)](){const _0x334a44=_0x1ceb6f;return this[_0x334a44(0x1da)][_0x334a44(0x1cf)]();}constructor(_0x1dd1ec,_0x2aa674,_0x37d1d3,_0x37f69,_0x1ac378){const _0x368346=_0x1ceb6f;super(),this[_0x368346(0x1eb)]=_0x1dd1ec,this[_0x368346(0x209)]=_0x2aa674,this[_0x368346(0x1dc)]=_0x37d1d3,this[_0x368346(0x1d4)]=_0x37f69,this['_commandService']=_0x1ac378,B(this,'_status$',new _0x35a652('idle')),B(this,_0x368346(0x1dd),this['_status$'][_0x368346(0x1bc)]()),B(this,_0x368346(0x1fd),!0x1),B(this,'_commandDisposable',null),B(this,_0x368346(0x19b),null);}[_0x1ceb6f(0x1e3)](){const _0x5b274e=_0x1ceb6f;var _0x5bdca0;(_0x5bdca0=this['_commandDisposable'])==null||_0x5bdca0[_0x5b274e(0x1e3)](),this[_0x5b274e(0x1da)]['next'](_0x5b274e(0x20f)),this[_0x5b274e(0x1da)]['complete']();}[_0x1ceb6f(0x1d5)](){const _0x79685d=_0x1ceb6f;return this[_0x79685d(0x1b3)];}[_0x1ceb6f(0x1ed)](){const _0x194672=_0x1ceb6f;this[_0x194672(0x1fd)]||(this['_init']=!0x0,this[_0x194672(0x209)]['sessionStatus$'][_0x194672(0x180)](_0x1df922(this['dispose$']))['subscribe'](_0x407ac0=>{const _0x3c2b3d=_0x194672;switch(_0x407ac0){case _0x51afad[_0x3c2b3d(0x1a3)]:this[_0x3c2b3d(0x18b)]();break;case _0x51afad[_0x3c2b3d(0x1e1)]:this[_0x3c2b3d(0x1f0)]();break;default:}}),this['_collabSession'][_0x194672(0x1b5)]['pipe'](_0x1df922(this[_0x194672(0x19f)]))[_0x194672(0x1ec)](_0x5c331f=>{const _0x3fd5f6=_0x194672;let {eventID:_0x3c949c}=_0x5c331f;switch(_0x3c949c){case _0xc2fe54[_0x3fd5f6(0x1bd)]:this[_0x3fd5f6(0x1ee)](_0x5c331f);break;case _0xc2fe54[_0x3fd5f6(0x193)]:this[_0x3fd5f6(0x192)](_0x5c331f);break;case _0xc2fe54['LIVESHARE_TERMINATE']:this[_0x3fd5f6(0x20b)]();break;case _0xc2fe54['NEW_CHANGESETS']:this[_0x3fd5f6(0x1e0)](_0x5c331f);break;default:}}));}[_0x1ceb6f(0x182)](){const _0x28fb1e=_0x1ceb6f;this['_collabSession'][_0x28fb1e(0x1cc)]({'eventID':_0xc2fe54[_0x28fb1e(0x1bf)],'data':{'unitID':this['_unitID'],'userID':this['_collabSession'][_0x28fb1e(0x19c)]()}},this[_0x28fb1e(0x1eb)]);}[_0x1ceb6f(0x1ca)](){const _0x3de99b=_0x1ceb6f;this[_0x3de99b(0x1b3)]==='presenting'&&(this['_status$'][_0x3de99b(0x20e)](_0x3de99b(0x20f)),this['_collabSession'][_0x3de99b(0x1cc)]({'eventID':_0xc2fe54[_0x3de99b(0x1ba)],'data':{'unitID':this['_unitID']}},this[_0x3de99b(0x1eb)]));}[_0x1ceb6f(0x1c4)](){const _0x40cb96=_0x1ceb6f;this[_0x40cb96(0x1b3)]===_0x40cb96(0x186)&&(this['_status$']['next'](_0x40cb96(0x1b1)),this['_startFollowing']());}['stopFollowing'](){const _0xcab73e=_0x1ceb6f;this[_0xcab73e(0x1b3)]==='following'&&this[_0xcab73e(0x1e9)]();}[_0x1ceb6f(0x1ee)](_0x4c1081){const _0x18fbe8=_0x1ceb6f;let {presenter:_0x5e21aa}=_0x4c1081[_0x18fbe8(0x1a2)],_0x502fa2=this['_collabSession']['getMemberID']();this[_0x18fbe8(0x19b)]=_0x5e21aa,_0x5e21aa===_0x502fa2?(this[_0x18fbe8(0x1e9)](),this[_0x18fbe8(0x1b0)]()):this[_0x18fbe8(0x1b3)]!==_0x18fbe8(0x186)&&(this[_0x18fbe8(0x181)](),this[_0x18fbe8(0x1ea)]());}['_fetchOperations'](){const _0x260a89=_0x1ceb6f;let _0x3382bd={'eventID':_0xc2fe54[_0x260a89(0x197)]};this[_0x260a89(0x209)]['send'](_0x3382bd,this['_unitID']);}[_0x1ceb6f(0x20b)](){const _0x589cf1=_0x1ceb6f;this[_0x589cf1(0x19b)]=null,this[_0x589cf1(0x1b3)]!==_0x589cf1(0x1f3)&&this[_0x589cf1(0x1ef)]();}[_0x1ceb6f(0x1e0)](_0x14366f){const _0x1a2853=_0x1ceb6f;if(this[_0x1a2853(0x1b3)]===_0x1a2853(0x1b1)&&this[_0x1a2853(0x19b)]===_0x14366f['data'][_0x1a2853(0x18c)]){let _0x94eb8f=_0x5a7fff(_0x14366f[_0x1a2853(0x1a2)])[_0x1a2853(0x203)][_0x1a2853(0x1c6)]()[_0x1a2853(0x1e7)](_0x5a1039=>_0x5a1039['id']===_0x598b51['id']);if(_0x94eb8f){let _0x324519=_0x94eb8f[_0x1a2853(0x1e5)]['unitId'],_0x4328e5=_0x94eb8f[_0x1a2853(0x1e5)][_0x1a2853(0x198)]['id'];setTimeout(()=>{const _0x263a83=_0x1a2853;this[_0x263a83(0x1b6)]['executeCommand'](_0x1a55e4['id'],{'unitId':_0x324519,'subUnitId':_0x4328e5},{'fromCollab':!0x0});});}}}['_startPresenting'](){const _0x4b602c=_0x1ceb6f;this['_status$'][_0x4b602c(0x20e)]('presenting');let _0x47970d=new Map(),_0x39934c=this[_0x4b602c(0x18a)]=new _0x5a4b9d();_0x39934c[_0x4b602c(0x1fc)](_0x5e1636(()=>{const _0x1eebd4=_0x4b602c;_0x47970d['forEach'](_0x4c7567=>_0x4c7567[_0x1eebd4(0x185)]()),_0x47970d['clear']();})),_0x39934c[_0x4b602c(0x1fc)](this[_0x4b602c(0x1b6)]['onCommandExecuted'](_0x540a7b=>{const _0x1c5ae6=_0x4b602c;if(_0x540a7b['type']!==_0x13e285[_0x1c5ae6(0x1f7)]||!this[_0x1c5ae6(0x1d4)][_0x1c5ae6(0x190)](_0x540a7b['id']))return;let {id:_0x4812b3}=_0x540a7b,_0x4ddf37;if(_0x47970d[_0x1c5ae6(0x20a)](_0x4812b3))_0x4ddf37=_0x47970d[_0x1c5ae6(0x1a6)](_0x4812b3);else{var _0x413c59;_0x4ddf37=new _0x1eeb39(),_0x47970d[_0x1c5ae6(0x1c8)](_0x4812b3,_0x4ddf37),_0x4ddf37[_0x1c5ae6(0x180)](_0xdaccc4((_0x413c59=this[_0x1c5ae6(0x1dc)][_0x1c5ae6(0x1fb)](_0x1c5ae6(0x1d7)))==null?0xc8:_0x413c59,void 0x0,{'trailing':!0x0,'leading':!0x0}))[_0x1c5ae6(0x1ec)](_0x14ad6a=>{const _0x4dd93f=_0x1c5ae6;this[_0x4dd93f(0x209)][_0x4dd93f(0x1cc)]({'eventID':_0xc2fe54[_0x4dd93f(0x193)],'data':{'unitID':this['_unitID'],'operations':{[_0x14ad6a['id']]:{'id':_0x14ad6a['id'],'params':JSON[_0x4dd93f(0x213)](_0x14ad6a[_0x4dd93f(0x1e5)])}}}},this[_0x4dd93f(0x1eb)]);});}_0x4ddf37[_0x1c5ae6(0x20e)](_0x540a7b);})),this[_0x4b602c(0x1d4)]['getInitialStates'](this[_0x4b602c(0x1eb)])['forEach'](_0xe1d573=>this[_0x4b602c(0x209)][_0x4b602c(0x1cc)]({'eventID':_0xc2fe54['LIVESHARE_OPERATION'],'data':{'unitID':this['_unitID'],'operations':{[_0xe1d573['id']]:{'id':_0xe1d573['id'],'params':JSON[_0x4b602c(0x213)](_0xe1d573[_0x4b602c(0x1e5)])}}}},this['_unitID']));}['_stopPresenting'](){const _0x2440e6=_0x1ceb6f;var _0x383198;this['_status$'][_0x2440e6(0x20e)](_0x2440e6(0x20f)),(_0x383198=this[_0x2440e6(0x18a)])==null||_0x383198[_0x2440e6(0x1e3)](),this[_0x2440e6(0x18a)]=null;}['_startFollowing'](){const _0x2ca64a=_0x1ceb6f;var _0x46f4ed;(_0x46f4ed=this[_0x2ca64a(0x18a)])==null||_0x46f4ed[_0x2ca64a(0x1e3)](),this[_0x2ca64a(0x1da)][_0x2ca64a(0x20e)](_0x2ca64a(0x1b1));}[_0x1ceb6f(0x1ef)](){const _0x94429b=_0x1ceb6f;var _0x120fc9;this[_0x94429b(0x1da)]['next']('idle'),(_0x120fc9=this[_0x94429b(0x18a)])==null||_0x120fc9[_0x94429b(0x1e3)](),this[_0x94429b(0x18a)]=null;}[_0x1ceb6f(0x1e9)](){const _0x36a280=_0x1ceb6f;var _0x2b043b;this[_0x36a280(0x1da)][_0x36a280(0x20e)](_0x36a280(0x186)),(_0x2b043b=this[_0x36a280(0x18a)])==null||_0x2b043b['dispose']();}['_handleOperation'](_0x5649d3){const _0x31f62d=_0x1ceb6f;if([_0x31f62d(0x1f3),_0x31f62d(0x186),_0x31f62d(0x1a1)][_0x31f62d(0x1b9)](this[_0x31f62d(0x1b3)])||!_0x5649d3[_0x31f62d(0x1a2)][_0x31f62d(0x1c1)]||_0x5649d3[_0x31f62d(0x1a2)][_0x31f62d(0x1c1)]===this[_0x31f62d(0x209)][_0x31f62d(0x19c)]())return;this[_0x31f62d(0x1b3)]===_0x31f62d(0x20f)&&this[_0x31f62d(0x1ea)]();let _0x2f400a=_0x5649d3[_0x31f62d(0x1a2)][_0x31f62d(0x1b7)];Object['values'](_0x2f400a)[_0x31f62d(0x1e6)](_0x5768a7=>{const _0x1c4057=_0x31f62d;this[_0x1c4057(0x1b6)][_0x1c4057(0x1d3)](_0x5768a7['id'],_0x5768a7[_0x1c4057(0x1e5)]?JSON[_0x1c4057(0x1df)](_0x5768a7[_0x1c4057(0x1e5)]):null,{'fromCollab':!0x0});});}[_0x1ceb6f(0x18b)](){const _0x5bb17a=_0x1ceb6f;var _0x3c7e05;this['_status$'][_0x5bb17a(0x20e)](_0x5bb17a(0x1a1)),(_0x3c7e05=this[_0x5bb17a(0x18a)])==null||_0x3c7e05[_0x5bb17a(0x1e3)]();}[_0x1ceb6f(0x1f0)](){const _0x1d3745=_0x1ceb6f;this[_0x1d3745(0x1da)][_0x1d3745(0x20e)](_0x1d3745(0x20f)),this[_0x1d3745(0x1b4)]();}};K=U([H(0x2,_0x2bf9f3),H(0x3,_0x478c03(V)),H(0x4,_0x2b3864)],K);function q(){const _0x567b6b=_0x1ceb6f;let _0x247b4f=_0x5d2936(W),_0x46cb69=_0x5d2936(_0x43e007),_0x4fa823=_0x4b13c5(()=>_0x46cb69['getCurrentTypeOfUnit$'](_0xaf5923[_0x567b6b(0x1f6)]),void 0x0,!0x1,[]),[_0x4eb670,_0x1c81c0]=_0x2cbf33(null),[_0x21ed0c,_0x30b9d0]=_0x2cbf33(_0x567b6b(0x20f)),_0x3d2ca8=_0x54f12e(null);return _0x37bb14(()=>(_0x4fa823&&_0x247b4f[_0x567b6b(0x1de)](_0x4fa823[_0x567b6b(0x194)]())[_0x567b6b(0x1cb)](_0x7d2909=>{const _0x55c766=_0x567b6b;_0x1c81c0(_0x7d2909),_0x3d2ca8[_0x55c766(0x20c)]=_0x7d2909[_0x55c766(0x1dd)][_0x55c766(0x1ec)](_0x2a4b2e=>{_0x30b9d0(_0x2a4b2e);});}),()=>{const _0x3e2956=_0x567b6b;var _0x5eaf64;(_0x5eaf64=_0x3d2ca8[_0x3e2956(0x20c)])==null||_0x5eaf64[_0x3e2956(0x1ac)](),_0x3d2ca8[_0x3e2956(0x20c)]=null;}),[_0x4fa823,_0x247b4f]),_0x4eb670?_0xad4a0d(_0x5e1365,{'align':_0x567b6b(0x207),'disabled':_0x21ed0c==='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':_0xad4a0d(ce,{'status':_0x21ed0c,'coordinator':_0x4eb670}),'children':_0xad4a0d(_0x567b6b(0x1b2),{'className':_0x21aa0f('univer-border-none\x20univer-text-gray-600\x20univer-outline-none',{'univer-cursor-not-allowed':_0x21ed0c===_0x567b6b(0x1a1),'univer-cursor-pointer\x20hover:univer-bg-gray-400':_0x21ed0c!==_0x567b6b(0x1a1)}),'type':_0x567b6b(0x1b2),'children':_0xad4a0d(_0xee1e9c,{'className':_0x567b6b(0x20d)})})}):null;}function ce(_0x3f732b){const _0x434c63=_0x1ceb6f;let {status:_0x3757e9,coordinator:_0x221a76}=_0x3f732b;switch(_0x3757e9){case'idle':return _0xad4a0d(le,{'coordinator':_0x221a76});case _0x434c63(0x1b1):return _0xad4a0d(ue,{'coordinator':_0x221a76});case _0x434c63(0x186):return _0xad4a0d(de,{'coordinator':_0x221a76});case _0x434c63(0x1a1):return _0xad4a0d(fe,{});case _0x434c63(0x1f3):return _0xad4a0d(J,{'coordinator':_0x221a76});default:return null;}}function le(_0x28f13f){const _0x5b2181=_0x1ceb6f;let {coordinator:_0xb9e5e6}=_0x28f13f;return _0x1069d8(_0x75d924,{'children':[_0xad4a0d(_0x5b2181(0x1c3),{'className':_0x5b2181(0x1bb),'children':_0x5b2181(0x206)}),_0xad4a0d(_0x45d162,{'onClick':()=>_0xb9e5e6[_0x5b2181(0x182)](),'children':_0x5b2181(0x1e2)})]});}function ue(_0x4d09ce){const _0x4df3d4=_0x1ceb6f;let {coordinator:_0x53cf08}=_0x4d09ce;return _0x1069d8(_0x75d924,{'children':[_0xad4a0d(_0x4df3d4(0x1c3),{'className':_0x4df3d4(0x1bb),'children':'You\x27re\x20following\x20the\x20presenter'}),_0xad4a0d(_0x45d162,{'onClick':()=>_0x53cf08[_0x4df3d4(0x202)](),'children':'Stop\x20following'})]});}function de(_0xc72e3b){const _0x1315a3=_0x1ceb6f;let {coordinator:_0x15d306}=_0xc72e3b;return _0x1069d8(_0x75d924,{'children':[_0xad4a0d(_0x1315a3(0x1c3),{'className':_0x1315a3(0x1bb),'children':_0x1315a3(0x1b8)}),_0xad4a0d(_0x45d162,{'variant':'text','onClick':()=>_0x15d306[_0x1315a3(0x1c4)](),'children':_0x1315a3(0x1a0)})]});}function J(_0x5342fa){const _0x3306e0=_0x1ceb6f;let {coordinator:_0x37559e}=_0x5342fa;return _0x1069d8(_0x75d924,{'children':[_0xad4a0d('div',{'className':_0x3306e0(0x1bb),'children':_0x3306e0(0x1f9)}),_0xad4a0d(_0x45d162,{'variant':_0x3306e0(0x19e),'onClick':()=>_0x37559e[_0x3306e0(0x1ca)](),'children':_0x3306e0(0x188)})]});}function fe(){return _0xad4a0d(_0x75d924,{'children':'You\x27are\x20offline.'});}let Y=class extends _0x49320b{constructor(_0x5c830e,_0x4f1d59){const _0x338185=_0x1ceb6f;super(),this[_0x338185(0x1ab)]=_0x5c830e,this[_0x338185(0x1a7)]=_0x4f1d59,this[_0x338185(0x1f8)]();}['_mountLiveShare'](){const _0x31eaca=_0x1ceb6f;this[_0x31eaca(0x1c9)](this[_0x31eaca(0x1a7)][_0x31eaca(0x1c2)](_0x6407ff[_0x31eaca(0x1d2)],()=>_0x17807b(q,this[_0x31eaca(0x1ab)])));}};Y=U([H(0x0,_0x478c03(_0x31717f)),H(0x1,_0x5acf09)],Y);var pe=_0x1ceb6f(0x201),me=_0x1ceb6f(0x1d9);const X='live-share.config';function _0x3ce7(){const _0x9766b3=['unsubscribe','defineProperty','3126822YEJWkH','delete','_startPresenting','following','button','_status','_fetchOperations','event$','_commandService','operations','You\x27re\x20not\x20following\x20the\x20presenter','includes','LIVESHARE_TERMINATE','univer-mb-3\x20univer-w-full\x20univer-text-sm','asObservable','LIVESHARE_NEW_HOST','string','LIVESHARE_REQUEST_HOST','NOT_FOLLOWING','presenter','registerComponent','div','startFollowing','toPrimitive','reverse','205JEKNVA','set','disposeWithMe','stopPresenting','then','send','_reporters','UNIVER_LIVE_SHARE_PLUGIN','getValue','registerSharedOperation','_config','HEADER_MENU','executeCommand','_liveShareService','getStatus','onStarting','SAME_OPERATION_SHARE_INTERVAL','call','0.23.0','_status$','2067648bqWgrF','_configService','status$','getLiveShareCoordinator','parse','_handleNewChangeSets','ONLINE','Start','dispose','createInstance','params','forEach','find','decorate','_stopFollowing','_startFollowing','_unitID','subscribe','init','_handleNewHost','_beIdle','_handleOnline','object','version','presenting','registerInitialStateReporter','684373AblLeV','UNIVER_SHEET','OPERATION','_mountLiveShare','You\x27re\x20presenting\x20the\x20document','unit','getConfig','add','_init','_collabSessionService','_entities','prototype','@univerjs-pro/live-share','stopFollowing','mutations','getOwnPropertyDescriptor','setConfig','Present\x20this\x20document','end','symbol','_collabSession','has','_handleTerminate','current','univer-size-4','next','idle','1574982uqdikN','length','override','stringify','FOLLOWING','pipe','_stopPresenting','tryStartPresenting','IDLE','7rCuqgV','complete','not-following','from','Stop\x20presenting','1776ZGruRQ','_commandDisposable','_handleOffline','memberID','getTypeOfUnitAdded$','_sharedOperations','packageName','shouldShareOperation','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','_handleOperation','LIVESHARE_OPERATION','getUnitId','_univerInstanceService','UNIVER_UNKNOWN','LIVESHARE_FETCH_OPERATIONS','sheet','_startLiveShareCoordinator','map','_presenter','getMemberID','1558000Drjjlm','default','dispose$','Start\x20following','offline','data','OFFLINE','getTypeOfUnitDisposed$','type','get','_uiPartsService','constructor','8077712blRRbK','function','_injector'];_0x3ce7=function(){return _0x9766b3;};return _0x3ce7();}Symbol(X);const Z={};let Q=class extends _0x49320b{constructor(_0x58079a){const _0x5893d8=_0x1ceb6f;super(),this[_0x5893d8(0x1d4)]=_0x58079a,this[_0x5893d8(0x1fd)]();}[_0x1ceb6f(0x1fd)](){const _0xf05b41=_0x1ceb6f;[_0x4c9a92['id'],_0x541869['id'],_0x1a55e4['id']][_0xf05b41(0x1e6)](_0x5db70b=>{const _0x35f844=_0xf05b41;this[_0x35f844(0x1c9)](this['_liveShareService'][_0x35f844(0x1d0)](_0x5db70b));});}};Q=U([H(0x0,_0x478c03(V))],Q);let $=class extends _0x58c46d{constructor(_0x13d814=Z,_0x9c8449,_0x5652e4){const _0x17b114=_0x1ceb6f;super(),this[_0x17b114(0x1d1)]=_0x13d814,this[_0x17b114(0x1ab)]=_0x9c8449,this['_configService']=_0x5652e4;let {..._0x407d63}=_0x3d1d44({},Z,this[_0x17b114(0x1d1)]);this[_0x17b114(0x1dc)][_0x17b114(0x205)](X,_0x407d63);}[_0x1ceb6f(0x1d6)](){const _0x2564f4=_0x1ceb6f;_0x25e916(this[_0x2564f4(0x1ab)],_0x352515([[V],[W],[Q],[Y]],this['_config'][_0x2564f4(0x212)])),_0x837966(this[_0x2564f4(0x1ab)],[[Q]]);}['onRendered'](){_0x837966(this['_injector'],[[Y]]);}};B($,_0x1ceb6f(0x1a5),_0xaf5923[_0x1ceb6f(0x196)]),B($,'pluginName',_0x1ceb6f(0x1ce)),B($,_0x1ceb6f(0x18f),pe),B($,_0x1ceb6f(0x1f2),me),$=U([_0x99e981(_0x558de1),H(0x1,_0x478c03(_0x31717f)),H(0x2,_0x2bf9f3)],$);function _0xf242(_0x5731db,_0x1bd9c2){_0x5731db=_0x5731db-0x17f;const _0x3ce787=_0x3ce7();let _0xf2426e=_0x3ce787[_0x5731db];return _0xf2426e;}export{Y as DesktopLiveShareController,q as LiveShare,W as LiveShareController,K as LiveShareCoordinator,V as LiveShareService,G as LiveShareStatus,$ as UniverLiveSharePlugin};
package/lib/umd/facade.js CHANGED
@@ -1 +1 @@
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);}));
1
+ function _0x5e43(_0x593043,_0x379233){_0x593043=_0x593043-0x6a;const _0x3081ce=_0x3081();let _0x5e43c2=_0x3081ce[_0x593043];return _0x5e43c2;}(function(_0x2a399f,_0x5ef4f0){const _0x912fe2=_0x5e43,_0x5c3a38=_0x2a399f();while(!![]){try{const _0xfd9e0d=parseInt(_0x912fe2(0x77))/0x1+parseInt(_0x912fe2(0x7f))/0x2*(-parseInt(_0x912fe2(0x96))/0x3)+parseInt(_0x912fe2(0x93))/0x4*(parseInt(_0x912fe2(0x9a))/0x5)+parseInt(_0x912fe2(0x78))/0x6+parseInt(_0x912fe2(0x72))/0x7*(-parseInt(_0x912fe2(0x8f))/0x8)+-parseInt(_0x912fe2(0x70))/0x9*(parseInt(_0x912fe2(0x6f))/0xa)+-parseInt(_0x912fe2(0x92))/0xb*(-parseInt(_0x912fe2(0x97))/0xc);if(_0xfd9e0d===_0x5ef4f0)break;else _0x5c3a38['push'](_0x5c3a38['shift']());}catch(_0x1e24e2){_0x5c3a38['push'](_0x5c3a38['shift']());}}}(_0x3081,0x9df86),function(_0x15816d,_0x3f5f17){const _0x2adc4c=_0x5e43;typeof exports==_0x2adc4c(0x76)&&typeof module<'u'?_0x3f5f17(require(`@univerjs-pro/live-share`),require(`@univerjs/core`),require(`@univerjs/core/facade`)):typeof define=='function'&&define[_0x2adc4c(0x6e)]?define(['@univerjs-pro/live-share',_0x2adc4c(0x90),_0x2adc4c(0x80)],_0x3f5f17):(_0x15816d=typeof globalThis<'u'?globalThis:_0x15816d||self,_0x3f5f17(_0x15816d[_0x2adc4c(0x7a)],_0x15816d[_0x2adc4c(0x6b)],_0x15816d[_0x2adc4c(0x8d)]));}(this,function(_0x33ed06,_0x3b0af1,_0x533c7d){const _0x534531=_0x5e43;function _0x6d4ca0(_0x500653){'@babel/helpers - typeof';const _0x372c7a=_0x5e43;return _0x6d4ca0=typeof Symbol=='function'&&typeof Symbol['iterator']==_0x372c7a(0x7e)?function(_0x22f3a3){return typeof _0x22f3a3;}:function(_0x19c040){const _0x231d1f=_0x372c7a;return _0x19c040&&typeof Symbol=='function'&&_0x19c040[_0x231d1f(0x71)]===Symbol&&_0x19c040!==Symbol[_0x231d1f(0x7d)]?'symbol':typeof _0x19c040;},_0x6d4ca0(_0x500653);}function _0x21adc7(_0x28047c,_0x42c118){const _0x186233=_0x5e43;if(_0x6d4ca0(_0x28047c)!=_0x186233(0x76)||!_0x28047c)return _0x28047c;var _0x2188bb=_0x28047c[Symbol[_0x186233(0x88)]];if(_0x2188bb!==void 0x0){var _0x50d6e3=_0x2188bb[_0x186233(0x79)](_0x28047c,_0x42c118||'default');if(_0x6d4ca0(_0x50d6e3)!=_0x186233(0x76))return _0x50d6e3;throw TypeError(_0x186233(0x83));}return(_0x42c118===_0x186233(0x85)?String:Number)(_0x28047c);}function _0x420ac2(_0x1f0bc3){const _0x52de8e=_0x5e43;var _0xa0c81c=_0x21adc7(_0x1f0bc3,_0x52de8e(0x85));return _0x6d4ca0(_0xa0c81c)==_0x52de8e(0x7e)?_0xa0c81c:_0xa0c81c+'';}function _0x2df539(_0x5c4c7e,_0x436dac,_0x2e24f6){const _0x3d21a4=_0x5e43;return(_0x436dac=_0x420ac2(_0x436dac))in _0x5c4c7e?Object[_0x3d21a4(0x87)](_0x5c4c7e,_0x436dac,{'value':_0x2e24f6,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x5c4c7e[_0x436dac]=_0x2e24f6,_0x5c4c7e;}var _0x3a34c3=class extends _0x533c7d[_0x534531(0x95)]{constructor(..._0x8e2701){super(..._0x8e2701),_0x2df539(this,'_liveShareController',void 0x0);}[_0x534531(0x99)](_0x3f3adc){const _0x156b59=_0x534531;this[_0x156b59(0x6d)]=_0x3f3adc['get'](_0x33ed06[_0x156b59(0x8b)]);}[_0x534531(0x89)](){const _0x11ede1=_0x534531;var _0x59c6a5;let _0x12edcd=this[_0x11ede1(0x7b)][_0x11ede1(0x81)](_0x3b0af1['IUniverInstanceService'])[_0x11ede1(0x82)](_0x3b0af1[_0x11ede1(0x98)][_0x11ede1(0x74)]);if(!_0x12edcd)throw Error('No\x20active\x20workbook\x20found.');let _0x5812d6=_0x12edcd[_0x11ede1(0x91)](),_0x51f5fb=this[_0x11ede1(0x6d)][_0x11ede1(0x6a)](_0x5812d6);return(_0x59c6a5=_0x51f5fb==null?void 0x0:_0x51f5fb[_0x11ede1(0x8c)]())==null?_0x33ed06[_0x11ede1(0x75)][_0x11ede1(0x6c)]:_0x59c6a5;}['startFollowing'](){const _0x47cdd5=_0x534531;let _0x2b3393=this[_0x47cdd5(0x7b)][_0x47cdd5(0x81)](_0x3b0af1[_0x47cdd5(0x8a)])['getCurrentUnitOfType'](_0x3b0af1[_0x47cdd5(0x98)][_0x47cdd5(0x74)]);if(!_0x2b3393)throw Error(_0x47cdd5(0x8e));let _0x4c179d=_0x2b3393[_0x47cdd5(0x91)](),_0x2b01e4=this[_0x47cdd5(0x6d)][_0x47cdd5(0x6a)](_0x4c179d);if(!_0x2b01e4)throw Error(_0x47cdd5(0x73));_0x2b01e4['startFollowing']();}[_0x534531(0x7c)](){const _0x4f14c5=_0x534531;let _0x55209d=this[_0x4f14c5(0x7b)][_0x4f14c5(0x81)](_0x3b0af1[_0x4f14c5(0x8a)])[_0x4f14c5(0x82)](_0x3b0af1[_0x4f14c5(0x98)]['UNIVER_SHEET']);if(!_0x55209d)throw Error(_0x4f14c5(0x8e));let _0x288f57=_0x55209d[_0x4f14c5(0x91)](),_0xf9330=this['_liveShareController'][_0x4f14c5(0x6a)](_0x288f57);if(!_0xf9330)throw Error(_0x4f14c5(0x73));_0xf9330[_0x4f14c5(0x7c)]();}['startPresenting'](){const _0x1553d1=_0x534531;let _0x443aed=this[_0x1553d1(0x7b)]['get'](_0x3b0af1[_0x1553d1(0x8a)])[_0x1553d1(0x82)](_0x3b0af1[_0x1553d1(0x98)][_0x1553d1(0x74)]);if(!_0x443aed)throw Error(_0x1553d1(0x8e));let _0x2661dd=_0x443aed[_0x1553d1(0x91)](),_0x4b392d=this['_liveShareController'][_0x1553d1(0x6a)](_0x2661dd);if(!_0x4b392d)throw Error(_0x1553d1(0x73));_0x4b392d['tryStartPresenting']();}[_0x534531(0x84)](){const _0x2fbf72=_0x534531;let _0x23eace=this[_0x2fbf72(0x7b)]['get'](_0x3b0af1['IUniverInstanceService'])[_0x2fbf72(0x82)](_0x3b0af1['UniverInstanceType']['UNIVER_SHEET']);if(!_0x23eace)throw Error(_0x2fbf72(0x8e));let _0x4ea665=_0x23eace[_0x2fbf72(0x91)](),_0x1a50d5=this[_0x2fbf72(0x6d)][_0x2fbf72(0x6a)](_0x4ea665);if(!_0x1a50d5)throw Error(_0x2fbf72(0x73));_0x1a50d5[_0x2fbf72(0x84)]();}};_0x533c7d[_0x534531(0x95)][_0x534531(0x86)](_0x3a34c3);var _0x1dabb0=class extends _0x533c7d[_0x534531(0x94)]{get['LiveShareStatusEnum'](){const _0x47622b=_0x534531;return _0x33ed06[_0x47622b(0x75)];}};_0x533c7d['FEnum'][_0x534531(0x86)](_0x1dabb0);}));function _0x3081(){const _0xdd2333=['UniverInstanceType','_initialize','330FaeMXn','getLiveShareCoordinatorSync','UniverCore','IDLE','_liveShareController','amd','380910hpuPpx','72WRMoXV','constructor','6999181phuldp','No\x20LiveShareCoordinator\x20found\x20for\x20the\x20active\x20workbook.','UNIVER_SHEET','LiveShareStatus','object','1046600lgfihA','4876710cjRfCd','call','UniverProLiveShare','_injector','stopFollowing','prototype','symbol','342666ZdtTjx','@univerjs/core/facade','get','getCurrentUnitOfType','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','stopPresenting','string','extend','defineProperty','toPrimitive','getLiveShareStatus','IUniverInstanceService','LiveShareController','getStatus','UniverCoreFacade','No\x20active\x20workbook\x20found.','8YXMAhj','@univerjs/core','getUnitId','3904714OkZvwf','24868ccZWoQ','FEnum','FUniver','18XTfrjI','24ztcssv'];_0x3081=function(){return _0xdd2333;};return _0x3081();}
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
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;}});}));
1
+ function _0x9b74(_0x8cd209,_0xf4143d){_0x8cd209=_0x8cd209-0x1b0;const _0x4c89f6=_0x4c89();let _0x9b7447=_0x4c89f6[_0x8cd209];return _0x9b7447;}(function(_0x76ea52,_0x1ece5f){const _0x25d8e0=_0x9b74,_0x1671a5=_0x76ea52();while(!![]){try{const _0x38cdba=parseInt(_0x25d8e0(0x285))/0x1+parseInt(_0x25d8e0(0x1eb))/0x2*(-parseInt(_0x25d8e0(0x28a))/0x3)+parseInt(_0x25d8e0(0x1c7))/0x4+parseInt(_0x25d8e0(0x236))/0x5+-parseInt(_0x25d8e0(0x1d1))/0x6+-parseInt(_0x25d8e0(0x27d))/0x7+parseInt(_0x25d8e0(0x29d))/0x8*(parseInt(_0x25d8e0(0x1f8))/0x9);if(_0x38cdba===_0x1ece5f)break;else _0x1671a5['push'](_0x1671a5['shift']());}catch(_0x2fab15){_0x1671a5['push'](_0x1671a5['shift']());}}}(_0x4c89,0x9fac0),function(_0x41eef2,_0x1e7f2b){const _0x299852=_0x9b74;typeof exports=='object'&&typeof module<'u'?_0x1e7f2b(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[_0x299852(0x1cb)]?define([_0x299852(0x256),'@univerjs/core',_0x299852(0x1d8),_0x299852(0x295),_0x299852(0x234),'@univerjs-pro/collaboration',_0x299852(0x20c),'@univerjs/sheets','rxjs',_0x299852(0x276),_0x299852(0x254),_0x299852(0x22c)],_0x1e7f2b):(_0x41eef2=typeof globalThis<'u'?globalThis:_0x41eef2||self,_0x1e7f2b(_0x41eef2[_0x299852(0x284)]={},_0x41eef2[_0x299852(0x252)],_0x41eef2[_0x299852(0x22b)],_0x41eef2[_0x299852(0x221)],_0x41eef2[_0x299852(0x24f)],_0x41eef2[_0x299852(0x27f)],_0x41eef2[_0x299852(0x1be)],_0x41eef2[_0x299852(0x241)],_0x41eef2[_0x299852(0x299)],_0x41eef2[_0x299852(0x299)]['operators'],_0x41eef2[_0x299852(0x24f)],_0x41eef2[_0x299852(0x23d)]));}(this,function(_0x4e4a2f,_0x5ae707,_0x2ed889,_0x3d407a,_0xf28294,_0x239a2b,_0x129209,_0x2a0efe,_0x3fc28c,_0x4a1579,_0x18fca3,_0x4dfcb2){const _0x5c98f5=_0x9b74;Object[_0x5c98f5(0x1b5)](_0x4e4a2f,Symbol[_0x5c98f5(0x20d)],{'value':_0x5c98f5(0x245)});function _0x49492d({ref:_0x1c61e2,..._0x1a1cef}){const _0x9015f0=_0x5c98f5;let {icon:_0x1cac06,id:_0x370f4f,className:_0x1cd756,extend:_0x33fe0e,..._0x505765}=_0x1a1cef,_0x1da149=('univerjs-icon\x20univerjs-icon-'+_0x370f4f+'\x20'+(_0x1cd756||''))['trim'](),_0xe0a9fd=(0x0,_0xf28294[_0x9015f0(0x1e4)])('_'+_0x578b0b());return _0x43c442(_0x1cac06,''+_0x370f4f,{'defIds':_0x1cac06[_0x9015f0(0x25d)],'idSuffix':_0xe0a9fd[_0x9015f0(0x24e)]},{'ref':_0x1c61e2,'className':_0x1da149,..._0x505765},_0x33fe0e);}function _0x43c442(_0x537c0d,_0x415a0f,_0x5f2d1e,_0x534f2f,_0x589e91){const _0x20a829=_0x5c98f5;return(0x0,_0xf28294['createElement'])(_0x537c0d[_0x20a829(0x1bb)],{'key':_0x415a0f,..._0x58f57d(_0x537c0d,_0x5f2d1e,_0x589e91),..._0x534f2f},(_0x53ae2f(_0x537c0d,_0x5f2d1e)[_0x20a829(0x28f)]||[])[_0x20a829(0x1f6)]((_0x86568,_0x541886)=>_0x43c442(_0x86568,_0x415a0f+'-'+_0x537c0d[_0x20a829(0x1bb)]+'-'+_0x541886,_0x5f2d1e,void 0x0,_0x589e91)));}function _0x58f57d(_0x1b8acc,_0x47fb26,_0x23a8f8){const _0x5ae72f=_0x5c98f5;let _0x43dae2={..._0x1b8acc[_0x5ae72f(0x273)]};_0x23a8f8!=null&&_0x23a8f8['colorChannel1']&&_0x43dae2[_0x5ae72f(0x1c2)]===_0x5ae72f(0x22a)&&(_0x43dae2[_0x5ae72f(0x1c2)]=_0x23a8f8[_0x5ae72f(0x22a)]),_0x1b8acc[_0x5ae72f(0x1bb)]===_0x5ae72f(0x227)&&_0x43dae2['id']&&(_0x43dae2['id']+=_0x47fb26['idSuffix']),Object[_0x5ae72f(0x1f2)](_0x43dae2)[_0x5ae72f(0x278)](([_0x1b2e3a,_0x473e11])=>{const _0x3a1121=_0x5ae72f;_0x1b2e3a===_0x3a1121(0x227)&&typeof _0x473e11==_0x3a1121(0x21c)&&(_0x43dae2[_0x1b2e3a]=_0x473e11['replace'](/url\(#(.*)\)/,'url(#$1'+_0x47fb26[_0x3a1121(0x204)]+')'));});let {defIds:_0x258fd1}=_0x47fb26;return!_0x258fd1||_0x258fd1[_0x5ae72f(0x24b)]===0x0?_0x43dae2:(_0x1b8acc[_0x5ae72f(0x1bb)]===_0x5ae72f(0x286)&&_0x43dae2['xlink:href']&&(_0x43dae2[_0x5ae72f(0x232)]+=_0x47fb26[_0x5ae72f(0x204)]),Object[_0x5ae72f(0x1f2)](_0x43dae2)[_0x5ae72f(0x278)](([_0x4eba33,_0x265cea])=>{const _0x1e522a=_0x5ae72f;typeof _0x265cea==_0x1e522a(0x21c)&&(_0x43dae2[_0x4eba33]=_0x265cea[_0x1e522a(0x1e6)](/url\(#(.*)\)/,_0x1e522a(0x23f)+_0x47fb26[_0x1e522a(0x204)]+')'));}),_0x43dae2);}function _0x53ae2f(_0x435d55,_0x3ce31d){const _0x561780=_0x5c98f5;var _0x2febd4;let {defIds:_0x3ac296}=_0x3ce31d;return!_0x3ac296||_0x3ac296[_0x561780(0x24b)]===0x0?_0x435d55:_0x435d55[_0x561780(0x1bb)]===_0x561780(0x255)&&(_0x2febd4=_0x435d55[_0x561780(0x28f)])!=null&&_0x2febd4[_0x561780(0x24b)]?{..._0x435d55,'children':_0x435d55[_0x561780(0x28f)][_0x561780(0x1f6)](_0x13df97=>typeof _0x13df97['attrs']['id']==_0x561780(0x21c)&&_0x3ac296&&_0x3ac296[_0x561780(0x1f5)](_0x13df97[_0x561780(0x273)]['id'])?{..._0x13df97,'attrs':{..._0x13df97['attrs'],'id':_0x13df97[_0x561780(0x273)]['id']+_0x3ce31d[_0x561780(0x204)]}}:_0x13df97)}:_0x435d55;}function _0x578b0b(){const _0x1dcb9f=_0x5c98f5;return Math['random']()[_0x1dcb9f(0x1c6)](0x24)[_0x1dcb9f(0x214)](0x2,0x8);}_0x49492d[_0x5c98f5(0x1f0)]=_0x5c98f5(0x28b);let _0x1753ac={'tag':_0x5c98f5(0x209),'attrs':{'xmlns':'http://www.w3.org/2000/svg','fill':_0x5c98f5(0x1d3),'viewBox':_0x5c98f5(0x25c),'width':_0x5c98f5(0x24c),'height':_0x5c98f5(0x24c)},'children':[{'tag':_0x5c98f5(0x1d4),'attrs':{'fill':_0x5c98f5(0x21e),'d':_0x5c98f5(0x1b1)}},{'tag':_0x5c98f5(0x1d4),'attrs':{'fill':'currentColor','d':_0x5c98f5(0x1c3),'fillRule':_0x5c98f5(0x1b2),'clipRule':'evenodd'}}]},_0x3fbf87=(0x0,_0xf28294[_0x5c98f5(0x1f1)])(function(_0xf10d33,_0xac0b17){const _0x190eee=_0x5c98f5;return(0x0,_0xf28294[_0x190eee(0x2a0)])(_0x49492d,Object[_0x190eee(0x290)]({},_0xf10d33,{'id':'live-share-icon','ref':_0xac0b17,'icon':_0x1753ac}));});_0x3fbf87[_0x5c98f5(0x1f0)]=_0x5c98f5(0x26e);function _0x4ef533(_0x22e384){'@babel/helpers - typeof';const _0x56b250=_0x5c98f5;return _0x4ef533=typeof Symbol==_0x56b250(0x21b)&&typeof Symbol['iterator']==_0x56b250(0x2a2)?function(_0xa2d0b2){return typeof _0xa2d0b2;}:function(_0x29ee1a){const _0x3a2163=_0x56b250;return _0x29ee1a&&typeof Symbol==_0x3a2163(0x21b)&&_0x29ee1a[_0x3a2163(0x1d6)]===Symbol&&_0x29ee1a!==Symbol[_0x3a2163(0x1f3)]?_0x3a2163(0x2a2):typeof _0x29ee1a;},_0x4ef533(_0x22e384);}function _0x3b005c(_0x187add,_0xdbf888){const _0xe845be=_0x5c98f5;if(_0x4ef533(_0x187add)!='object'||!_0x187add)return _0x187add;var _0x5c1c51=_0x187add[Symbol[_0xe845be(0x1d5)]];if(_0x5c1c51!==void 0x0){var _0x1c7e1f=_0x5c1c51['call'](_0x187add,_0xdbf888||'default');if(_0x4ef533(_0x1c7e1f)!=_0xe845be(0x200))return _0x1c7e1f;throw TypeError(_0xe845be(0x22d));}return(_0xdbf888==='string'?String:Number)(_0x187add);}function _0x276f24(_0x39fb3c){const _0x5adec2=_0x5c98f5;var _0x33ecf3=_0x3b005c(_0x39fb3c,_0x5adec2(0x21c));return _0x4ef533(_0x33ecf3)==_0x5adec2(0x2a2)?_0x33ecf3:_0x33ecf3+'';}function _0x7c97b8(_0x1a992d,_0x12a648,_0x24a50b){return(_0x12a648=_0x276f24(_0x12a648))in _0x1a992d?Object['defineProperty'](_0x1a992d,_0x12a648,{'value':_0x24a50b,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x1a992d[_0x12a648]=_0x24a50b,_0x1a992d;}var _0x3e09a7=class extends _0x5ae707[_0x5c98f5(0x248)]{constructor(..._0x13e939){const _0x3f17ba=_0x5c98f5;super(..._0x13e939),_0x7c97b8(this,'_sharedOperations',new Set()),_0x7c97b8(this,_0x3f17ba(0x27a),new Set());}[_0x5c98f5(0x212)](_0x11d2f1){const _0xb5b577=_0x5c98f5;return this[_0xb5b577(0x243)][_0xb5b577(0x1da)](_0x11d2f1),(0x0,_0x5ae707[_0xb5b577(0x23e)])(()=>this[_0xb5b577(0x243)][_0xb5b577(0x259)](_0x11d2f1));}['registerInitialStateReporter'](_0x56bfd0){const _0x5c0498=_0x5c98f5;return this[_0x5c0498(0x27a)][_0x5c0498(0x1da)](_0x56bfd0),(0x0,_0x5ae707['toDisposable'])(()=>this['_reporters']['delete'](_0x56bfd0));}[_0x5c98f5(0x263)](_0x3b7265){const _0x1af28b=_0x5c98f5;return this[_0x1af28b(0x243)][_0x1af28b(0x264)](_0x3b7265);}[_0x5c98f5(0x288)](_0x36a04a){const _0x5a98e4=_0x5c98f5;return Array['from'](this[_0x5a98e4(0x27a)])[_0x5a98e4(0x1f6)](_0x34b1d7=>_0x34b1d7(_0x36a04a));}};function _0x3eddd2(_0x3658ee,_0x483b9c){return function(_0x40a4b1,_0x3568ea){_0x483b9c(_0x40a4b1,_0x3568ea,_0x3658ee);};}function _0x593bc6(_0x37d3d5,_0x106efa,_0x477fec,_0x4cc902){const _0x5de9e8=_0x5c98f5;var _0x207c9c=arguments[_0x5de9e8(0x24b)],_0x43af94=_0x207c9c<0x3?_0x106efa:_0x4cc902===null?_0x4cc902=Object['getOwnPropertyDescriptor'](_0x106efa,_0x477fec):_0x4cc902,_0x258d43;if(typeof Reflect==_0x5de9e8(0x200)&&typeof Reflect[_0x5de9e8(0x219)]==_0x5de9e8(0x21b))_0x43af94=Reflect[_0x5de9e8(0x219)](_0x37d3d5,_0x106efa,_0x477fec,_0x4cc902);else{for(var _0x300dda=_0x37d3d5['length']-0x1;_0x300dda>=0x0;_0x300dda--)(_0x258d43=_0x37d3d5[_0x300dda])&&(_0x43af94=(_0x207c9c<0x3?_0x258d43(_0x43af94):_0x207c9c>0x3?_0x258d43(_0x106efa,_0x477fec,_0x43af94):_0x258d43(_0x106efa,_0x477fec))||_0x43af94);}return _0x207c9c>0x3&&_0x43af94&&Object[_0x5de9e8(0x1b5)](_0x106efa,_0x477fec,_0x43af94),_0x43af94;}let _0x415065=class extends _0x5ae707[_0x5c98f5(0x231)]{constructor(_0x326a58,_0x1a31b9,_0x377f84){const _0x1fd765=_0x5c98f5;super(),this['_univerInstanceService']=_0x326a58,this[_0x1fd765(0x258)]=_0x1a31b9,this[_0x1fd765(0x24d)]=_0x377f84,_0x7c97b8(this,_0x1fd765(0x261),new Map()),this[_0x1fd765(0x1b3)]();}async[_0x5c98f5(0x268)](_0x162a73){const _0x254148=_0x5c98f5;return this[_0x254148(0x261)][_0x254148(0x264)](_0x162a73)||await this['_startLiveShareCoordinator'](_0x162a73),this[_0x254148(0x261)][_0x254148(0x1cd)](_0x162a73);}[_0x5c98f5(0x277)](_0x4aaa5d){const _0xfc9465=_0x5c98f5;var _0x207f8f;return(_0x207f8f=this[_0xfc9465(0x261)][_0xfc9465(0x1cd)](_0x4aaa5d))==null?null:_0x207f8f;}[_0x5c98f5(0x1b3)](){const _0x1623dc=_0x5c98f5;this[_0x1623dc(0x298)][_0x1623dc(0x1cc)](_0x5ae707[_0x1623dc(0x1e8)][_0x1623dc(0x25a)])[_0x1623dc(0x203)]((0x0,_0x4a1579['takeUntil'])(this[_0x1623dc(0x274)]))[_0x1623dc(0x280)](async _0x19b26f=>{const _0x26aff3=_0x1623dc;let _0x4e6752=_0x19b26f[_0x26aff3(0x2a1)][_0x26aff3(0x282)]();this[_0x26aff3(0x261)]['has'](_0x4e6752)||this['_startLiveShareCoordinator'](_0x4e6752);}),this[_0x1623dc(0x298)][_0x1623dc(0x246)](_0x5ae707[_0x1623dc(0x1e8)][_0x1623dc(0x25a)])['pipe']((0x0,_0x4a1579['takeUntil'])(this['dispose$']))[_0x1623dc(0x280)](_0x494d65=>{const _0x4ee163=_0x1623dc;let _0x2a50d0=_0x494d65[_0x4ee163(0x282)](),_0x1ffb35=this[_0x4ee163(0x261)][_0x4ee163(0x1cd)](_0x2a50d0);_0x1ffb35==null||_0x1ffb35['dispose']();});}async[_0x5c98f5(0x1e5)](_0x5cb1fb){const _0x37c152=_0x5c98f5;let _0x14f67f=await this[_0x37c152(0x24d)][_0x37c152(0x223)](_0x5cb1fb),_0x4acae5=this[_0x37c152(0x258)][_0x37c152(0x250)](_0x5bdc3e,_0x5cb1fb,_0x14f67f);return _0x4acae5['init'](),this[_0x37c152(0x261)]['set'](_0x5cb1fb,_0x4acae5),_0x4acae5;}};_0x415065=_0x593bc6([_0x3eddd2(0x0,_0x5ae707['IUniverInstanceService']),_0x3eddd2(0x1,(0x0,_0x5ae707[_0x5c98f5(0x1e9)])(_0x5ae707[_0x5c98f5(0x297)])),_0x3eddd2(0x2,(0x0,_0x5ae707['Inject'])(_0x129209['CollaborationSessionService']))],_0x415065);let _0x185f83=function(_0x46ba3f){const _0x1eee61=_0x5c98f5;return _0x46ba3f[_0x1eee61(0x287)]=_0x1eee61(0x23c),_0x46ba3f[_0x1eee61(0x233)]=_0x1eee61(0x27b),_0x46ba3f[_0x1eee61(0x1cf)]='following',_0x46ba3f[_0x1eee61(0x1ef)]=_0x1eee61(0x201),_0x46ba3f[_0x1eee61(0x1c5)]=_0x1eee61(0x1e7),_0x46ba3f;}({}),_0x5bdc3e=class extends _0x5ae707['RxDisposable']{get[_0x5c98f5(0x291)](){const _0x20ed4f=_0x5c98f5;return this[_0x20ed4f(0x25b)][_0x20ed4f(0x216)]();}constructor(_0x1a0e3a,_0x2122f8,_0x105297,_0x179b0b,_0x2c8f35){const _0x1c338c=_0x5c98f5;super(),this['_unitID']=_0x1a0e3a,this[_0x1c338c(0x205)]=_0x2122f8,this[_0x1c338c(0x253)]=_0x105297,this[_0x1c338c(0x267)]=_0x179b0b,this[_0x1c338c(0x1d0)]=_0x2c8f35,_0x7c97b8(this,_0x1c338c(0x25b),new _0x3fc28c[(_0x1c338c(0x25e))](_0x1c338c(0x27b))),_0x7c97b8(this,_0x1c338c(0x218),this[_0x1c338c(0x25b)][_0x1c338c(0x1b8)]()),_0x7c97b8(this,'_init',!0x1),_0x7c97b8(this,_0x1c338c(0x21f),null),_0x7c97b8(this,_0x1c338c(0x293),null);}[_0x5c98f5(0x1ba)](){const _0x1b8ffc=_0x5c98f5;var _0x194379;(_0x194379=this[_0x1b8ffc(0x21f)])==null||_0x194379[_0x1b8ffc(0x1ba)](),this[_0x1b8ffc(0x25b)][_0x1b8ffc(0x1f7)]('idle'),this['_status$']['complete']();}['getStatus'](){const _0x3e2e9d=_0x5c98f5;return this[_0x3e2e9d(0x291)];}[_0x5c98f5(0x211)](){const _0x167b76=_0x5c98f5;this[_0x167b76(0x1b3)]||(this[_0x167b76(0x1b3)]=!0x0,this[_0x167b76(0x205)][_0x167b76(0x1c8)][_0x167b76(0x203)]((0x0,_0x4a1579['takeUntil'])(this[_0x167b76(0x274)]))['subscribe'](_0x3dc0c6=>{const _0x61386d=_0x167b76;switch(_0x3dc0c6){case _0x129209[_0x61386d(0x1b0)][_0x61386d(0x287)]:this[_0x61386d(0x29b)]();break;case _0x129209[_0x61386d(0x1b0)][_0x61386d(0x1dd)]:this[_0x61386d(0x228)]();break;default:}}),this[_0x167b76(0x205)]['event$'][_0x167b76(0x203)]((0x0,_0x4a1579[_0x167b76(0x1b4)])(this[_0x167b76(0x274)]))[_0x167b76(0x280)](_0x18438f=>{const _0x5a57a1=_0x167b76;let {eventID:_0xb1a5e1}=_0x18438f;switch(_0xb1a5e1){case _0x239a2b[_0x5a57a1(0x21d)]['LIVESHARE_NEW_HOST']:this[_0x5a57a1(0x27c)](_0x18438f);break;case _0x239a2b[_0x5a57a1(0x21d)][_0x5a57a1(0x237)]:this[_0x5a57a1(0x210)](_0x18438f);break;case _0x239a2b['CollaborationEvent'][_0x5a57a1(0x1ec)]:this[_0x5a57a1(0x1ea)]();break;case _0x239a2b[_0x5a57a1(0x21d)][_0x5a57a1(0x270)]:this[_0x5a57a1(0x24a)](_0x18438f);break;default:}}));}[_0x5c98f5(0x1f9)](){const _0x2df77d=_0x5c98f5;this[_0x2df77d(0x205)]['send']({'eventID':_0x239a2b[_0x2df77d(0x21d)][_0x2df77d(0x262)],'data':{'unitID':this[_0x2df77d(0x220)],'userID':this[_0x2df77d(0x205)][_0x2df77d(0x296)]()}},this[_0x2df77d(0x220)]);}['stopPresenting'](){const _0x244090=_0x5c98f5;this['_status']===_0x244090(0x1e7)&&(this[_0x244090(0x25b)][_0x244090(0x1f7)]('idle'),this[_0x244090(0x205)][_0x244090(0x279)]({'eventID':_0x239a2b[_0x244090(0x21d)][_0x244090(0x1ec)],'data':{'unitID':this['_unitID']}},this['_unitID']));}[_0x5c98f5(0x247)](){const _0x4297b3=_0x5c98f5;this[_0x4297b3(0x291)]==='not-following'&&(this[_0x4297b3(0x25b)][_0x4297b3(0x1f7)](_0x4297b3(0x20b)),this[_0x4297b3(0x1c0)]());}['stopFollowing'](){const _0x4048a3=_0x5c98f5;this['_status']===_0x4048a3(0x20b)&&this[_0x4048a3(0x294)]();}[_0x5c98f5(0x27c)](_0x50fa97){const _0x3fffae=_0x5c98f5;let {presenter:_0x183d4c}=_0x50fa97[_0x3fffae(0x272)],_0x38842d=this['_collabSession']['getMemberID']();this['_presenter']=_0x183d4c,_0x183d4c===_0x38842d?(this[_0x3fffae(0x294)](),this[_0x3fffae(0x257)]()):this[_0x3fffae(0x291)]!==_0x3fffae(0x201)&&(this[_0x3fffae(0x20a)](),this[_0x3fffae(0x1c0)]());}[_0x5c98f5(0x20f)](){const _0x85e9e8=_0x5c98f5;let _0x264bde={'eventID':_0x239a2b[_0x85e9e8(0x21d)]['LIVESHARE_FETCH_OPERATIONS']};this['_collabSession'][_0x85e9e8(0x279)](_0x264bde,this[_0x85e9e8(0x220)]);}[_0x5c98f5(0x1ea)](){const _0x52892e=_0x5c98f5;this[_0x52892e(0x293)]=null,this[_0x52892e(0x291)]!==_0x52892e(0x1e7)&&this[_0x52892e(0x206)]();}[_0x5c98f5(0x24a)](_0x3f3522){const _0x832945=_0x5c98f5;if(this[_0x832945(0x291)]===_0x832945(0x20b)&&this[_0x832945(0x293)]===_0x3f3522[_0x832945(0x272)][_0x832945(0x21a)]){let _0x4a87f6=(0x0,_0x239a2b['parseProtocolChangeset'])(_0x3f3522[_0x832945(0x272)])[_0x832945(0x271)][_0x832945(0x1bd)]()[_0x832945(0x1ff)](_0x45c91e=>_0x45c91e['id']===_0x2a0efe[_0x832945(0x240)]['id']);if(_0x4a87f6){let _0x1fd559=_0x4a87f6[_0x832945(0x213)][_0x832945(0x26b)],_0x2fffe1=_0x4a87f6['params'][_0x832945(0x1e0)]['id'];setTimeout(()=>{const _0xbef459=_0x832945;this[_0xbef459(0x1d0)]['executeCommand'](_0x2a0efe['SetWorksheetActiveOperation']['id'],{'unitId':_0x1fd559,'subUnitId':_0x2fffe1},{'fromCollab':!0x0});});}}}['_startPresenting'](){const _0x1a9587=_0x5c98f5;this[_0x1a9587(0x25b)][_0x1a9587(0x1f7)](_0x1a9587(0x1e7));let _0x450d67=new Map(),_0x2bad12=this[_0x1a9587(0x21f)]=new _0x5ae707['DisposableCollection']();_0x2bad12[_0x1a9587(0x1da)]((0x0,_0x5ae707[_0x1a9587(0x23e)])(()=>{const _0x180cef=_0x1a9587;_0x450d67['forEach'](_0x45796a=>_0x45796a['complete']()),_0x450d67[_0x180cef(0x1c1)]();})),_0x2bad12[_0x1a9587(0x1da)](this[_0x1a9587(0x1d0)][_0x1a9587(0x29c)](_0x308221=>{const _0x2e8edf=_0x1a9587;if(_0x308221[_0x2e8edf(0x275)]!==_0x5ae707[_0x2e8edf(0x225)][_0x2e8edf(0x217)]||!this['_liveShareService'][_0x2e8edf(0x263)](_0x308221['id']))return;let {id:_0x16fe3e}=_0x308221,_0x2d6577;if(_0x450d67[_0x2e8edf(0x264)](_0x16fe3e))_0x2d6577=_0x450d67[_0x2e8edf(0x1cd)](_0x16fe3e);else{var _0x47b9f8;_0x2d6577=new _0x3fc28c[(_0x2e8edf(0x28d))](),_0x450d67['set'](_0x16fe3e,_0x2d6577),_0x2d6577[_0x2e8edf(0x203)]((0x0,_0x4a1579[_0x2e8edf(0x215)])((_0x47b9f8=this[_0x2e8edf(0x253)][_0x2e8edf(0x230)](_0x2e8edf(0x29f)))==null?0xc8:_0x47b9f8,void 0x0,{'trailing':!0x0,'leading':!0x0}))[_0x2e8edf(0x280)](_0x4f41e7=>{const _0x2f1034=_0x2e8edf;this[_0x2f1034(0x205)][_0x2f1034(0x279)]({'eventID':_0x239a2b['CollaborationEvent'][_0x2f1034(0x237)],'data':{'unitID':this[_0x2f1034(0x220)],'operations':{[_0x4f41e7['id']]:{'id':_0x4f41e7['id'],'params':JSON['stringify'](_0x4f41e7[_0x2f1034(0x213)])}}}},this[_0x2f1034(0x220)]);});}_0x2d6577[_0x2e8edf(0x1f7)](_0x308221);})),this['_liveShareService'][_0x1a9587(0x288)](this[_0x1a9587(0x220)])[_0x1a9587(0x278)](_0x2e04a8=>this[_0x1a9587(0x205)][_0x1a9587(0x279)]({'eventID':_0x239a2b[_0x1a9587(0x21d)][_0x1a9587(0x237)],'data':{'unitID':this['_unitID'],'operations':{[_0x2e04a8['id']]:{'id':_0x2e04a8['id'],'params':JSON[_0x1a9587(0x1c9)](_0x2e04a8[_0x1a9587(0x213)])}}}},this[_0x1a9587(0x220)]));}[_0x5c98f5(0x20a)](){const _0x59bd93=_0x5c98f5;var _0x32285c;this[_0x59bd93(0x25b)][_0x59bd93(0x1f7)](_0x59bd93(0x27b)),(_0x32285c=this[_0x59bd93(0x21f)])==null||_0x32285c['dispose'](),this[_0x59bd93(0x21f)]=null;}[_0x5c98f5(0x1c0)](){const _0x371fd7=_0x5c98f5;var _0x218e03;(_0x218e03=this[_0x371fd7(0x21f)])==null||_0x218e03[_0x371fd7(0x1ba)](),this['_status$'][_0x371fd7(0x1f7)](_0x371fd7(0x20b));}[_0x5c98f5(0x206)](){const _0x5c9d7e=_0x5c98f5;var _0x11d6d5;this['_status$']['next']('idle'),(_0x11d6d5=this[_0x5c9d7e(0x21f)])==null||_0x11d6d5[_0x5c9d7e(0x1ba)](),this[_0x5c9d7e(0x21f)]=null;}[_0x5c98f5(0x294)](){const _0x3a5ba5=_0x5c98f5;var _0x236e04;this[_0x3a5ba5(0x25b)][_0x3a5ba5(0x1f7)](_0x3a5ba5(0x201)),(_0x236e04=this[_0x3a5ba5(0x21f)])==null||_0x236e04['dispose']();}[_0x5c98f5(0x210)](_0x184aa6){const _0x4eb7c8=_0x5c98f5;if([_0x4eb7c8(0x1e7),_0x4eb7c8(0x201),'offline']['includes'](this[_0x4eb7c8(0x291)])||!_0x184aa6['data'][_0x4eb7c8(0x1fb)]||_0x184aa6[_0x4eb7c8(0x272)][_0x4eb7c8(0x1fb)]===this[_0x4eb7c8(0x205)][_0x4eb7c8(0x296)]())return;this['_status']===_0x4eb7c8(0x27b)&&this[_0x4eb7c8(0x1c0)]();let _0x148e2d=_0x184aa6[_0x4eb7c8(0x272)][_0x4eb7c8(0x29a)];Object['values'](_0x148e2d)['forEach'](_0x356efb=>{const _0x63b3d4=_0x4eb7c8;this[_0x63b3d4(0x1d0)][_0x63b3d4(0x1ed)](_0x356efb['id'],_0x356efb[_0x63b3d4(0x213)]?JSON[_0x63b3d4(0x249)](_0x356efb[_0x63b3d4(0x213)]):null,{'fromCollab':!0x0});});}[_0x5c98f5(0x29b)](){const _0x49c77e=_0x5c98f5;var _0x3dd96c;this[_0x49c77e(0x25b)][_0x49c77e(0x1f7)](_0x49c77e(0x23c)),(_0x3dd96c=this[_0x49c77e(0x21f)])==null||_0x3dd96c[_0x49c77e(0x1ba)]();}['_handleOnline'](){const _0x128230=_0x5c98f5;this[_0x128230(0x25b)][_0x128230(0x1f7)](_0x128230(0x27b)),this[_0x128230(0x20f)]();}};_0x5bdc3e=_0x593bc6([_0x3eddd2(0x2,_0x5ae707[_0x5c98f5(0x1ee)]),_0x3eddd2(0x3,(0x0,_0x5ae707[_0x5c98f5(0x1e9)])(_0x3e09a7)),_0x3eddd2(0x4,_0x5ae707[_0x5c98f5(0x22f)])],_0x5bdc3e);function _0x56a574(){const _0x7a153=_0x5c98f5;let _0x2377ab=(0x0,_0x2ed889['useDependency'])(_0x415065),_0x2257e2=(0x0,_0x2ed889[_0x7a153(0x242)])(_0x5ae707[_0x7a153(0x26c)]),_0xeee352=(0x0,_0x2ed889[_0x7a153(0x292)])(()=>_0x2257e2[_0x7a153(0x229)](_0x5ae707[_0x7a153(0x1e8)][_0x7a153(0x25a)]),void 0x0,!0x1,[]),[_0x28be18,_0x45dfd3]=(0x0,_0xf28294[_0x7a153(0x222)])(null),[_0x5ce0e1,_0x5246b7]=(0x0,_0xf28294[_0x7a153(0x222)])(_0x7a153(0x27b)),_0x33b795=(0x0,_0xf28294[_0x7a153(0x1e4)])(null);return(0x0,_0xf28294['useEffect'])(()=>(_0xeee352&&_0x2377ab[_0x7a153(0x268)](_0xeee352[_0x7a153(0x282)]())[_0x7a153(0x23b)](_0x599272=>{const _0x1bfbea=_0x7a153;_0x45dfd3(_0x599272),_0x33b795[_0x1bfbea(0x24e)]=_0x599272[_0x1bfbea(0x218)]['subscribe'](_0x30da9e=>{_0x5246b7(_0x30da9e);});}),()=>{const _0x22686a=_0x7a153;var _0x18999a;(_0x18999a=_0x33b795[_0x22686a(0x24e)])==null||_0x18999a[_0x22686a(0x1ca)](),_0x33b795[_0x22686a(0x24e)]=null;}),[_0xeee352,_0x2377ab]),_0x28be18?(0x0,_0x18fca3[_0x7a153(0x289)])(_0x3d407a[_0x7a153(0x260)],{'align':_0x7a153(0x26f),'disabled':_0x5ce0e1===_0x7a153(0x23c),'className':_0x7a153(0x1c4),'overlay':(0x0,_0x18fca3[_0x7a153(0x289)])(_0x119ae0,{'status':_0x5ce0e1,'coordinator':_0x28be18}),'children':(0x0,_0x18fca3[_0x7a153(0x289)])(_0x7a153(0x251),{'className':(0x0,_0x3d407a['clsx'])(_0x7a153(0x29e),{'univer-cursor-not-allowed':_0x5ce0e1===_0x7a153(0x23c),'univer-cursor-pointer\x20hover:univer-bg-gray-400':_0x5ce0e1!==_0x7a153(0x23c)}),'type':'button','children':(0x0,_0x18fca3['jsx'])(_0x3fbf87,{'className':_0x7a153(0x1de)})})}):null;}function _0x119ae0(_0x3c418a){const _0xf7393a=_0x5c98f5;let {status:_0x405049,coordinator:_0x5ce4ca}=_0x3c418a;switch(_0x405049){case _0xf7393a(0x27b):return(0x0,_0x18fca3['jsx'])(_0x489aee,{'coordinator':_0x5ce4ca});case _0xf7393a(0x20b):return(0x0,_0x18fca3[_0xf7393a(0x289)])(_0x78cc08,{'coordinator':_0x5ce4ca});case _0xf7393a(0x201):return(0x0,_0x18fca3[_0xf7393a(0x289)])(_0x415b1c,{'coordinator':_0x5ce4ca});case _0xf7393a(0x23c):return(0x0,_0x18fca3['jsx'])(_0x32d18f,{});case _0xf7393a(0x1e7):return(0x0,_0x18fca3['jsx'])(_0x5aebfc,{'coordinator':_0x5ce4ca});default:return null;}}function _0x489aee(_0x1ccdf0){const _0x11f75b=_0x5c98f5;let {coordinator:_0x17463a}=_0x1ccdf0;return(0x0,_0x18fca3[_0x11f75b(0x1bf)])(_0x18fca3[_0x11f75b(0x1e1)],{'children':[(0x0,_0x18fca3[_0x11f75b(0x289)])('div',{'className':'univer-mb-3\x20univer-w-full\x20univer-text-sm','children':'Present\x20this\x20document'}),(0x0,_0x18fca3['jsx'])(_0x3d407a[_0x11f75b(0x269)],{'onClick':()=>_0x17463a[_0x11f75b(0x1f9)](),'children':_0x11f75b(0x1b9)})]});}function _0x78cc08(_0x5c186d){const _0x516cde=_0x5c98f5;let {coordinator:_0x149834}=_0x5c186d;return(0x0,_0x18fca3[_0x516cde(0x1bf)])(_0x18fca3[_0x516cde(0x1e1)],{'children':[(0x0,_0x18fca3[_0x516cde(0x289)])(_0x516cde(0x207),{'className':'univer-mb-3\x20univer-w-full\x20univer-text-sm','children':'You\x27re\x20following\x20the\x20presenter'}),(0x0,_0x18fca3[_0x516cde(0x289)])(_0x3d407a[_0x516cde(0x269)],{'onClick':()=>_0x149834[_0x516cde(0x1db)](),'children':_0x516cde(0x226)})]});}function _0x415b1c(_0x473e53){const _0x1fe7dd=_0x5c98f5;let {coordinator:_0x547643}=_0x473e53;return(0x0,_0x18fca3[_0x1fe7dd(0x1bf)])(_0x18fca3[_0x1fe7dd(0x1e1)],{'children':[(0x0,_0x18fca3[_0x1fe7dd(0x289)])(_0x1fe7dd(0x207),{'className':_0x1fe7dd(0x1fd),'children':_0x1fe7dd(0x1bc)}),(0x0,_0x18fca3['jsx'])(_0x3d407a[_0x1fe7dd(0x269)],{'variant':'text','onClick':()=>_0x547643[_0x1fe7dd(0x247)](),'children':_0x1fe7dd(0x26d)})]});}function _0x5aebfc(_0x5ed024){const _0x2fac2a=_0x5c98f5;let {coordinator:_0x276697}=_0x5ed024;return(0x0,_0x18fca3[_0x2fac2a(0x1bf)])(_0x18fca3[_0x2fac2a(0x1e1)],{'children':[(0x0,_0x18fca3[_0x2fac2a(0x289)])('div',{'className':'univer-mb-3\x20univer-w-full\x20univer-text-sm','children':_0x2fac2a(0x224)}),(0x0,_0x18fca3[_0x2fac2a(0x289)])(_0x3d407a[_0x2fac2a(0x269)],{'variant':_0x2fac2a(0x1fa),'onClick':()=>_0x276697[_0x2fac2a(0x1fc)](),'children':_0x2fac2a(0x281)})]});}function _0x32d18f(){const _0x47d311=_0x5c98f5;return(0x0,_0x18fca3[_0x47d311(0x289)])(_0x18fca3[_0x47d311(0x1e1)],{'children':_0x47d311(0x266)});}let _0x4da1fa=class extends _0x5ae707[_0x5c98f5(0x248)]{constructor(_0x40ee3b,_0x560625){const _0x1012fe=_0x5c98f5;super(),this[_0x1012fe(0x258)]=_0x40ee3b,this[_0x1012fe(0x22e)]=_0x560625,this[_0x1012fe(0x25f)]();}[_0x5c98f5(0x25f)](){const _0x10682d=_0x5c98f5;this['disposeWithMe'](this[_0x10682d(0x22e)][_0x10682d(0x265)](_0x2ed889['BuiltInUIPart'][_0x10682d(0x1f4)],()=>(0x0,_0x2ed889[_0x10682d(0x23a)])(_0x56a574,this[_0x10682d(0x258)])));}};_0x4da1fa=_0x593bc6([_0x3eddd2(0x0,(0x0,_0x5ae707[_0x5c98f5(0x1e9)])(_0x5ae707[_0x5c98f5(0x297)])),_0x3eddd2(0x1,_0x2ed889['IUIPartsService'])],_0x4da1fa);var _0x1b8fcb=_0x5c98f5(0x1ce),_0x18a64c=_0x5c98f5(0x28c);let _0x23eb58=_0x5c98f5(0x27e);Symbol(_0x23eb58);let _0x3083b3={},_0x363ec5=class extends _0x5ae707[_0x5c98f5(0x248)]{constructor(_0x6cf1e1){super(),this['_liveShareService']=_0x6cf1e1,this['_init']();}[_0x5c98f5(0x1b3)](){const _0x51f881=_0x5c98f5;[_0x4dfcb2[_0x51f881(0x1d9)]['id'],_0x4dfcb2['SetScrollOperation']['id'],_0x2a0efe['SetWorksheetActiveOperation']['id']][_0x51f881(0x278)](_0x26e3d9=>{const _0x40820b=_0x51f881;this['disposeWithMe'](this[_0x40820b(0x267)][_0x40820b(0x212)](_0x26e3d9));});}};_0x363ec5=_0x593bc6([_0x3eddd2(0x0,(0x0,_0x5ae707[_0x5c98f5(0x1e9)])(_0x3e09a7))],_0x363ec5);let _0x43c871=class extends _0x5ae707[_0x5c98f5(0x28e)]{constructor(_0x13bf33=_0x3083b3,_0x5a2dd,_0x1b6644){const _0x254c0d=_0x5c98f5;super(),this['_config']=_0x13bf33,this[_0x254c0d(0x258)]=_0x5a2dd,this['_configService']=_0x1b6644;let {..._0x775949}=(0x0,_0x5ae707[_0x254c0d(0x1df)])({},_0x3083b3,this[_0x254c0d(0x1d7)]);this['_configService'][_0x254c0d(0x26a)](_0x23eb58,_0x775949);}['onStarting'](){const _0xd09b19=_0x5c98f5;(0x0,_0x5ae707[_0xd09b19(0x1e2)])(this[_0xd09b19(0x258)],(0x0,_0x5ae707[_0xd09b19(0x239)])([[_0x3e09a7],[_0x415065],[_0x363ec5],[_0x4da1fa]],this['_config'][_0xd09b19(0x244)])),(0x0,_0x5ae707[_0xd09b19(0x1dc)])(this[_0xd09b19(0x258)],[[_0x363ec5]]);}[_0x5c98f5(0x1fe)](){const _0x488a27=_0x5c98f5;(0x0,_0x5ae707[_0x488a27(0x1dc)])(this[_0x488a27(0x258)],[[_0x4da1fa]]);}};_0x7c97b8(_0x43c871,'type',_0x5ae707[_0x5c98f5(0x1e8)]['UNIVER_UNKNOWN']),_0x7c97b8(_0x43c871,_0x5c98f5(0x1b6),_0x5c98f5(0x1e3)),_0x7c97b8(_0x43c871,_0x5c98f5(0x1b7),_0x1b8fcb),_0x7c97b8(_0x43c871,_0x5c98f5(0x235),_0x18a64c),_0x43c871=_0x593bc6([(0x0,_0x5ae707[_0x5c98f5(0x238)])(_0x129209['UniverCollaborationClientPlugin']),_0x3eddd2(0x1,(0x0,_0x5ae707['Inject'])(_0x5ae707[_0x5c98f5(0x297)])),_0x3eddd2(0x2,_0x5ae707['IConfigService'])],_0x43c871),Object[_0x5c98f5(0x1b5)](_0x4e4a2f,'DesktopLiveShareController',{'enumerable':!0x0,'get':function(){return _0x4da1fa;}}),_0x4e4a2f[_0x5c98f5(0x283)]=_0x56a574,Object[_0x5c98f5(0x1b5)](_0x4e4a2f,_0x5c98f5(0x202),{'enumerable':!0x0,'get':function(){return _0x415065;}}),Object['defineProperty'](_0x4e4a2f,_0x5c98f5(0x208),{'enumerable':!0x0,'get':function(){return _0x5bdc3e;}}),_0x4e4a2f[_0x5c98f5(0x1d2)]=_0x3e09a7,_0x4e4a2f[_0x5c98f5(0x20e)]=_0x185f83,Object[_0x5c98f5(0x1b5)](_0x4e4a2f,'UniverLiveSharePlugin',{'enumerable':!0x0,'get':function(){return _0x43c871;}});}));function _0x4c89(){const _0x32bd28=['_stopFollowing','@univerjs/design','getMemberID','Injector','_univerInstanceService','rxjs','operations','_handleOffline','onCommandExecuted','8JsEzKI','univer-border-none\x20univer-text-gray-600\x20univer-outline-none','SAME_OPERATION_SHARE_INTERVAL','createElement','unit','symbol','SessionStatus','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','evenodd','_init','takeUntil','defineProperty','pluginName','packageName','asObservable','Start','dispose','tag','You\x27re\x20not\x20following\x20the\x20presenter','reverse','UniverProCollaborationClient','jsxs','_startFollowing','clear','fill','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','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','PRESENTING','toString','3268984zHfIXb','sessionStatus$','stringify','unsubscribe','amd','getTypeOfUnitAdded$','get','@univerjs-pro/live-share','FOLLOWING','_commandService','6009270iCOIam','LiveShareService','none','path','toPrimitive','constructor','_config','@univerjs/ui','SetZoomRatioOperation','add','stopFollowing','touchDependencies','ONLINE','univer-size-4','merge','sheet','Fragment','registerDependencies','UNIVER_LIVE_SHARE_PLUGIN','useRef','_startLiveShareCoordinator','replace','presenting','UniverInstanceType','Inject','_handleTerminate','3046xtUrOm','LIVESHARE_TERMINATE','executeCommand','IConfigService','NOT_FOLLOWING','displayName','forwardRef','entries','prototype','HEADER_MENU','includes','map','next','7094781oxbiwX','tryStartPresenting','default','presenter','stopPresenting','univer-mb-3\x20univer-w-full\x20univer-text-sm','onRendered','find','object','not-following','LiveShareController','pipe','idSuffix','_collabSession','_beIdle','div','LiveShareCoordinator','svg','_stopPresenting','following','@univerjs-pro/collaboration-client','toStringTag','LiveShareStatus','_fetchOperations','_handleOperation','init','registerSharedOperation','params','substring','throttleTime','getValue','OPERATION','status$','decorate','memberID','function','string','CollaborationEvent','currentColor','_commandDisposable','_unitID','UniverDesign','useState','requireSession','You\x27re\x20presenting\x20the\x20document','CommandType','Stop\x20following','mask','_handleOnline','getCurrentTypeOfUnit$','colorChannel1','UniverUi','@univerjs/sheets-ui','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','_uiPartsService','ICommandService','getConfig','RxDisposable','xlink:href','IDLE','react','version','1125220worUPJ','LIVESHARE_OPERATION','DependentOn','mergeOverrideWithDependencies','connectInjector','then','offline','UniverSheetsUi','toDisposable','url(#$1','InsertSheetMutation','UniverSheets','useDependency','_sharedOperations','override','Module','getTypeOfUnitDisposed$','startFollowing','Disposable','parse','_handleNewChangeSets','length','1em','_collabSessionService','current','React','createInstance','button','UniverCore','_configService','react/jsx-runtime','defs','exports','_startPresenting','_injector','delete','UNIVER_SHEET','_status$','0\x200\x2017\x2017','defIds','BehaviorSubject','_mountLiveShare','Dropdown','_entities','LIVESHARE_REQUEST_HOST','shouldShareOperation','has','registerComponent','You\x27are\x20offline.','_liveShareService','getLiveShareCoordinator','Button','setConfig','unitId','IUniverInstanceService','Start\x20following','LiveShareIcon','end','NEW_CHANGESETS','mutations','data','attrs','dispose$','type','rxjs/operators','getLiveShareCoordinatorSync','forEach','send','_reporters','idle','_handleNewHost','94395VTCHnz','live-share.config','UniverProCollaboration','subscribe','Stop\x20presenting','getUnitId','LiveShare','UniverProLiveShare','1101014JUlRgS','use','OFFLINE','getInitialStates','jsx','2487TytkGX','UniverIcon','0.23.0','Subject','Plugin','children','assign','_status','useObservable','_presenter'];_0x4c89=function(){return _0x32bd28;};return _0x4c89();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/live-share",
3
- "version": "0.22.1",
3
+ "version": "0.23.0",
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/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"
66
+ "@univerjs-pro/collaboration": "0.23.0",
67
+ "@univerjs-pro/collaboration-client": "0.23.0",
68
+ "@univerjs/core": "0.23.0",
69
+ "@univerjs/sheets": "0.23.0",
70
+ "@univerjs/design": "0.23.0",
71
+ "@univerjs/sheets-ui": "0.23.0",
72
+ "@univerjs/ui": "0.23.0"
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.1",
82
- "@univerjs/protocol": "0.22.1"
81
+ "@univerjs-infra/shared": "0.23.0",
82
+ "@univerjs/protocol": "0.23.0"
83
83
  },
84
84
  "scripts": {
85
85
  "test": "vitest run",