@univerjs-pro/collaboration-client 1.2.0 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/lib/cjs/facade.js +1 -1
  2. package/lib/cjs/index.js +1 -1
  3. package/lib/cjs/locale/ar-SA.js +1 -1
  4. package/lib/cjs/locale/ca-ES.js +1 -1
  5. package/lib/cjs/locale/de-DE.js +1 -1
  6. package/lib/cjs/locale/en-US.js +1 -1
  7. package/lib/cjs/locale/es-ES.js +1 -1
  8. package/lib/cjs/locale/fa-IR.js +1 -1
  9. package/lib/cjs/locale/fr-FR.js +1 -1
  10. package/lib/cjs/locale/id-ID.js +1 -1
  11. package/lib/cjs/locale/it-IT.js +1 -1
  12. package/lib/cjs/locale/ja-JP.js +1 -1
  13. package/lib/cjs/locale/ko-KR.js +1 -1
  14. package/lib/cjs/locale/pl-PL.js +1 -1
  15. package/lib/cjs/locale/pt-BR.js +1 -1
  16. package/lib/cjs/locale/ru-RU.js +1 -1
  17. package/lib/cjs/locale/sk-SK.js +1 -1
  18. package/lib/cjs/locale/vi-VN.js +1 -1
  19. package/lib/cjs/locale/zh-CN.js +1 -1
  20. package/lib/cjs/locale/zh-HK.js +1 -1
  21. package/lib/cjs/locale/zh-TW.js +1 -1
  22. package/lib/es/facade.js +1 -1
  23. package/lib/es/index.js +1 -1
  24. package/lib/es/locale/ar-SA.js +1 -1
  25. package/lib/es/locale/ca-ES.js +1 -1
  26. package/lib/es/locale/de-DE.js +1 -1
  27. package/lib/es/locale/en-US.js +1 -1
  28. package/lib/es/locale/es-ES.js +1 -1
  29. package/lib/es/locale/fa-IR.js +1 -1
  30. package/lib/es/locale/fr-FR.js +1 -1
  31. package/lib/es/locale/id-ID.js +1 -1
  32. package/lib/es/locale/it-IT.js +1 -1
  33. package/lib/es/locale/ja-JP.js +1 -1
  34. package/lib/es/locale/ko-KR.js +1 -1
  35. package/lib/es/locale/pl-PL.js +1 -1
  36. package/lib/es/locale/pt-BR.js +1 -1
  37. package/lib/es/locale/ru-RU.js +1 -1
  38. package/lib/es/locale/sk-SK.js +1 -1
  39. package/lib/es/locale/vi-VN.js +1 -1
  40. package/lib/es/locale/zh-CN.js +1 -1
  41. package/lib/es/locale/zh-HK.js +1 -1
  42. package/lib/es/locale/zh-TW.js +1 -1
  43. package/lib/facade.js +1 -1
  44. package/lib/index.js +1 -1
  45. package/lib/locale/ar-SA.js +1 -1
  46. package/lib/locale/ca-ES.js +1 -1
  47. package/lib/locale/de-DE.js +1 -1
  48. package/lib/locale/en-US.js +1 -1
  49. package/lib/locale/es-ES.js +1 -1
  50. package/lib/locale/fa-IR.js +1 -1
  51. package/lib/locale/fr-FR.js +1 -1
  52. package/lib/locale/id-ID.js +1 -1
  53. package/lib/locale/it-IT.js +1 -1
  54. package/lib/locale/ja-JP.js +1 -1
  55. package/lib/locale/ko-KR.js +1 -1
  56. package/lib/locale/pl-PL.js +1 -1
  57. package/lib/locale/pt-BR.js +1 -1
  58. package/lib/locale/ru-RU.js +1 -1
  59. package/lib/locale/sk-SK.js +1 -1
  60. package/lib/locale/vi-VN.js +1 -1
  61. package/lib/locale/zh-CN.js +1 -1
  62. package/lib/locale/zh-HK.js +1 -1
  63. package/lib/locale/zh-TW.js +1 -1
  64. package/lib/types/controllers/collaboration/changeset-submitter.d.ts +2 -2
  65. package/lib/types/controllers/collaboration/collaboration-entity.d.ts +4 -4
  66. package/lib/types/controllers/collaboration/collaboration-state.d.ts +24 -22
  67. package/lib/types/facade/f-event.d.ts +3 -1
  68. package/lib/types/index.d.ts +1 -1
  69. package/lib/types/services/collaboration-session/collaboration-session.service.d.ts +1 -0
  70. package/lib/types/services/collaboration-ui-event/collaboration-ui-event.d.ts +2 -0
  71. package/lib/umd/facade.js +1 -1
  72. package/lib/umd/index.js +1 -1
  73. package/lib/umd/locale/ar-SA.js +1 -1
  74. package/lib/umd/locale/ca-ES.js +1 -1
  75. package/lib/umd/locale/de-DE.js +1 -1
  76. package/lib/umd/locale/en-US.js +1 -1
  77. package/lib/umd/locale/es-ES.js +1 -1
  78. package/lib/umd/locale/fa-IR.js +1 -1
  79. package/lib/umd/locale/fr-FR.js +1 -1
  80. package/lib/umd/locale/id-ID.js +1 -1
  81. package/lib/umd/locale/it-IT.js +1 -1
  82. package/lib/umd/locale/ja-JP.js +1 -1
  83. package/lib/umd/locale/ko-KR.js +1 -1
  84. package/lib/umd/locale/pl-PL.js +1 -1
  85. package/lib/umd/locale/pt-BR.js +1 -1
  86. package/lib/umd/locale/ru-RU.js +1 -1
  87. package/lib/umd/locale/sk-SK.js +1 -1
  88. package/lib/umd/locale/vi-VN.js +1 -1
  89. package/lib/umd/locale/zh-CN.js +1 -1
  90. package/lib/umd/locale/zh-HK.js +1 -1
  91. package/lib/umd/locale/zh-TW.js +1 -1
  92. package/package.json +15 -15
package/lib/cjs/facade.js CHANGED
@@ -1 +1 @@
1
- const _0x833588=_0x4575;function _0x4575(_0x10c83,_0x4d088c){_0x10c83=_0x10c83-0x111;const _0x1b12a5=_0x1b12();let _0x4575e1=_0x1b12a5[_0x10c83];return _0x4575e1;}(function(_0x4dd8f4,_0x4a83b3){const _0x2d2a09=_0x4575,_0x507990=_0x4dd8f4();while(!![]){try{const _0x4cf9d2=-parseInt(_0x2d2a09(0x166))/0x1+parseInt(_0x2d2a09(0x115))/0x2+-parseInt(_0x2d2a09(0x13a))/0x3*(parseInt(_0x2d2a09(0x173))/0x4)+parseInt(_0x2d2a09(0x178))/0x5*(-parseInt(_0x2d2a09(0x15a))/0x6)+-parseInt(_0x2d2a09(0x17e))/0x7*(-parseInt(_0x2d2a09(0x113))/0x8)+parseInt(_0x2d2a09(0x13d))/0x9*(parseInt(_0x2d2a09(0x138))/0xa)+parseInt(_0x2d2a09(0x179))/0xb;if(_0x4cf9d2===_0x4a83b3)break;else _0x507990['push'](_0x507990['shift']());}catch(_0x3bb090){_0x507990['push'](_0x507990['shift']());}}}(_0x1b12,0x49742),Object['defineProperty'](exports,Symbol['toStringTag'],{'value':_0x833588(0x17a)}));let e=require('@univerjs-pro/collaboration-client'),t=require('@univerjs/core/facade'),n=require('@univerjs/core'),r=require('rxjs');var i=class extends t['FEnum']{get['CollaborationStatus'](){const _0x4bfc83=_0x833588;return e[_0x4bfc83(0x145)];}};t['FEnum']['extend'](i);var a=class extends t['FEventName']{get[_0x833588(0x17d)](){const _0x148eef=_0x833588;return _0x148eef(0x17d);}get[_0x833588(0x12c)](){const _0x3bea3d=_0x833588;return _0x3bea3d(0x12c);}get[_0x833588(0x17c)](){const _0x51e52e=_0x833588;return _0x51e52e(0x17c);}};t[_0x833588(0x15d)][_0x833588(0x137)](a);function o(_0x5cb02c,_0x47b3dc){return function(_0x24f1aa,_0x5a8043){_0x47b3dc(_0x24f1aa,_0x5a8043,_0x5cb02c);};}function s(_0x5b1c90,_0x45876c,_0x3bbc17,_0x2e10bd){const _0x5b71ae=_0x833588;var _0x109623=arguments[_0x5b71ae(0x156)],_0xd110ff=_0x109623<0x3?_0x45876c:_0x2e10bd===null?_0x2e10bd=Object[_0x5b71ae(0x150)](_0x45876c,_0x3bbc17):_0x2e10bd,_0x48524d;if(typeof Reflect==_0x5b71ae(0x175)&&typeof Reflect['decorate']==_0x5b71ae(0x11e))_0xd110ff=Reflect[_0x5b71ae(0x123)](_0x5b1c90,_0x45876c,_0x3bbc17,_0x2e10bd);else{for(var _0x1ae740=_0x5b1c90['length']-0x1;_0x1ae740>=0x0;_0x1ae740--)(_0x48524d=_0x5b1c90[_0x1ae740])&&(_0xd110ff=(_0x109623<0x3?_0x48524d(_0xd110ff):_0x109623>0x3?_0x48524d(_0x45876c,_0x3bbc17,_0xd110ff):_0x48524d(_0x45876c,_0x3bbc17))||_0xd110ff);}return _0x109623>0x3&&_0xd110ff&&Object['defineProperty'](_0x45876c,_0x3bbc17,_0xd110ff),_0xd110ff;}let c=class extends t['FBase']{constructor(_0xde9355,_0x542892,_0x5d361f,_0x281f55,_0x434c4b){const _0x57a8b2=_0x833588;super(),this[_0x57a8b2(0x132)]=_0xde9355,this[_0x57a8b2(0x117)]=_0x542892,this[_0x57a8b2(0x13e)]=_0x5d361f,this[_0x57a8b2(0x114)]=_0x281f55,this[_0x57a8b2(0x14c)]=_0x434c4b;}async[_0x833588(0x12b)](_0x4084bf,_0x224529){const _0x4cc8cd=_0x833588;return await this['_dataLoaderService'][_0x4cc8cd(0x135)](_0x4084bf,n[_0x4cc8cd(0x130)][_0x4cc8cd(0x118)],void 0x0,_0x224529)?(await this[_0x4cc8cd(0x14c)][_0x4cc8cd(0x119)](_0x4084bf),this[_0x4cc8cd(0x132)][_0x4cc8cd(0x16f)](_0x4084bf)):null;}async[_0x833588(0x128)](_0x1772a3,_0x9011dd){const _0x272b19=_0x833588;return await this['_dataLoaderService'][_0x272b19(0x135)](_0x1772a3,n[_0x272b19(0x130)][_0x272b19(0x14d)],void 0x0,_0x9011dd)?(await this[_0x272b19(0x14c)][_0x272b19(0x119)](_0x1772a3),this[_0x272b19(0x132)][_0x272b19(0x111)](_0x1772a3)):null;}async[_0x833588(0x155)](_0x2839f5,_0x5a26fc){const _0x11a707=_0x833588;return await this['_dataLoaderService'][_0x11a707(0x135)](_0x2839f5,n[_0x11a707(0x130)]['UNIVER_BASE'],void 0x0,_0x5a26fc)?(await this[_0x11a707(0x14c)]['readyForCollab'](_0x2839f5),this[_0x11a707(0x132)][_0x11a707(0x116)](_0x2839f5)):null;}async['loadSlideAsync'](_0x366b48,_0x5883c8){const _0x3971fa=_0x833588;return await this[_0x3971fa(0x114)][_0x3971fa(0x135)](_0x366b48,n[_0x3971fa(0x130)][_0x3971fa(0x122)],void 0x0,_0x5883c8)?(await this['_collaborationController'][_0x3971fa(0x119)](_0x366b48),this[_0x3971fa(0x132)][_0x3971fa(0x160)](_0x366b48)):null;}async[_0x833588(0x141)](_0x518548,_0x3741c6){const _0x4e0856=_0x833588;return await this[_0x4e0856(0x114)][_0x4e0856(0x135)](_0x518548,n['UniverInstanceType'][_0x4e0856(0x148)],void 0x0,_0x3741c6)?(await this['_collaborationController']['readyForCollab'](_0x518548),this['_handler'][_0x4e0856(0x171)](_0x518548)):null;}async[_0x833588(0x149)](_0xd482d,_0x262007){const _0x35925c=_0x833588;return await this[_0x35925c(0x114)][_0x35925c(0x135)](_0xd482d,n[_0x35925c(0x130)][_0x35925c(0x169)],void 0x0,_0x262007)?(await this[_0x35925c(0x14c)][_0x35925c(0x119)](_0xd482d),this[_0x35925c(0x132)][_0x35925c(0x13c)](_0xd482d)):null;}[_0x833588(0x159)](_0x104557,_0xcc29d6){const _0x59d040=_0x833588;let _0x3b21cb=this[_0x59d040(0x117)]['get'](e[_0x59d040(0x146)])[_0x59d040(0x124)](_0x104557)[_0x59d040(0x142)]((0x0,r[_0x59d040(0x12e)])(_0x1bd9cb=>_0x1bd9cb[_0x59d040(0x11a)]))[_0x59d040(0x129)](_0x56be0c=>_0xcc29d6(Array[_0x59d040(0x17f)](_0x56be0c[_0x59d040(0x121)]())));return(0x0,n['toDisposable'])(_0x3b21cb);}[_0x833588(0x176)](_0x32419e){const _0x4f0a4a=_0x833588;let _0x59c354=this[_0x4f0a4a(0x16a)](_0x32419e);if(!_0x59c354)return e[_0x4f0a4a(0x145)][_0x4f0a4a(0x17b)];let _0x78af48=this[_0x4f0a4a(0x14c)]['getCollabEntity'](_0x59c354);return(_0x78af48==null?void 0x0:_0x78af48[_0x4f0a4a(0x139)][_0x4f0a4a(0x14e)])??e[_0x4f0a4a(0x145)][_0x4f0a4a(0x17b)];}['hasWritePending'](_0x5d87bc){const _0x35d25b=_0x833588;let _0x3e1973=this[_0x35d25b(0x16a)](_0x5d87bc);return _0x3e1973?this['_collaborationController'][_0x35d25b(0x172)](_0x3e1973):!0x1;}[_0x833588(0x143)](_0x3b086d,_0xde1fe6={}){const _0x11a094=_0x833588;let _0x193866=this[_0x11a094(0x16a)](_0x3b086d);if(!_0x193866)return Promise['reject'](Error(_0x11a094(0x14b)));let _0x20a98f=this[_0x11a094(0x14c)][_0x11a094(0x120)](_0x193866);if(!_0x20a98f)return Promise[_0x11a094(0x13b)](Error('[FCollaboration]:\x20Unit\x20\x22'+_0x193866+'\x22\x20is\x20not\x20in\x20collaboration\x20mode.'));let _0x2f61f2=_0x20a98f[_0x11a094(0x139)][_0x11a094(0x14e)];if(_0x2f61f2===e[_0x11a094(0x145)]['SYNCED'])return Promise[_0x11a094(0x134)]();let _0x3523ff=l(_0x193866,_0x2f61f2);if(_0x3523ff)return Promise['reject'](_0x3523ff);let _0x10b1af=_0xde1fe6[_0x11a094(0x12a)]??0x7530;return new Promise((_0x3f8eb2,_0x3f9994)=>{const _0x3e7ed2=_0x11a094;let _0x35aea2=!0x1,_0x2d66f6=null,_0xda4ba8=setTimeout(()=>{const _0x39615e=_0x4575;_0x35aea2=!0x0,_0x2d66f6==null||_0x2d66f6[_0x39615e(0x16b)](),_0x3f9994(Error(_0x39615e(0x12f)+_0x193866+_0x39615e(0x16c)+_0x10b1af+_0x39615e(0x13f)));},_0x10b1af),_0x1f3866=()=>{_0x35aea2=!0x0,clearTimeout(_0xda4ba8),_0x2d66f6==null||_0x2d66f6['unsubscribe']();};_0x2d66f6=_0x20a98f[_0x3e7ed2(0x15f)]['subscribe'](_0x381892=>{const _0xc679cb=_0x3e7ed2;if(_0x35aea2)return;if(_0x381892===e[_0xc679cb(0x145)][_0xc679cb(0x16e)]){_0x1f3866(),_0x3f8eb2();return;}let _0x2e0fff=l(_0x193866,_0x381892);_0x2e0fff&&(_0x1f3866(),_0x3f9994(_0x2e0fff));});});}['_resolveUnitId'](_0x3bb5ef){const _0x326773=_0x833588;var _0x1110ef;return _0x3bb5ef||((_0x1110ef=this[_0x326773(0x13e)]['getFocusedUnit']())==null?void 0x0:_0x1110ef[_0x326773(0x177)]());}};c=s([o(0x1,(0x0,n[_0x833588(0x126)])(n[_0x833588(0x15e)])),o(0x2,n[_0x833588(0x174)]),o(0x3,(0x0,n[_0x833588(0x126)])(e['DataLoaderService'])),o(0x4,(0x0,n[_0x833588(0x126)])(e[_0x833588(0x127)]))],c);function l(_0x4dc2b5,_0x540979){const _0x2ffb1d=_0x833588;return _0x540979===e['CollaborationStatus']['CONFLICT']||_0x540979===e[_0x2ffb1d(0x145)]['NOT_COLLAB']?Error(_0x2ffb1d(0x140)+_0x4dc2b5+_0x2ffb1d(0x168)+_0x540979+'.'):null;}function _0x1b12(){const _0x430182=['loadBaseAsync','length','revert','attempt','subscribeCollaborators','8772OmmonG','get','fireEvent','FEventName','Injector','status$','getPresentation','FCollaboration','cacheCleared','entityInit$','DisposableCollection','add','117221lCOHLy','changesetResend$','\x22\x20while\x20collaboration\x20status\x20is\x20','UNIVER_PDF','_resolveUnitId','unsubscribe','\x22\x20after\x20','loadServerUnitOfRevision','SYNCED','getWorkbook','nextDelayMs','getBoard','hasWritePending','169804swdcsi','IUniverInstanceService','object','getCollaborationStatus','getUnitId','1565anWpmu','12254561KNDfKh','Module','NOT_COLLAB','CollaborationChangesetResend','CollaborationStatusChanged','9401PzuilR','from','unitID','getDocument','unsyncedMutationCount','1408xZAecR','_dataLoaderService','29670NVHiSa','getBase','_injector','UNIVER_SHEET','readyForCollab','members$','distinctUntilChanged','message','loadServerUnit','function','disposeWithMe','getCollabEntity','values','UNIVER_SLIDE','decorate','waitForRoom$','reason','Inject','CollaborationController','loadDocAsync','subscribe','timeout','loadSheetAsync','CollaborationConflict','conflict$','switchMap','[FCollaboration]:\x20Timed\x20out\x20flushing\x20unit\x20\x22','UniverInstanceType','toDisposable','_handler','registerEventHandler','resolve','loadUnit','_initialize','extend','311510FAEdvB','state','39duEspZ','reject','getPdf','18wBfpcI','_univerInstanceService','ms.','[FCollaboration]:\x20Cannot\x20flush\x20unit\x20\x22','loadBoardAsync','pipe','flush','DataLoaderService','CollaborationStatus','MemberService','forEach','UNIVER_BOARD','loadPdfAsync','localChanges','[FCollaboration]:\x20Cannot\x20flush\x20because\x20no\x20unit\x20is\x20focused\x20or\x20specified.','_collaborationController','UNIVER_DOC','status','getCollaboration','getOwnPropertyDescriptor','Event','defineProperty','getCollabEntities','loadUnitOfRevision'];_0x1b12=function(){return _0x430182;};return _0x1b12();}var u=class extends t['FUniver']{[_0x833588(0x136)](_0x1d08b5){const _0x599946=_0x833588;let _0x4facdd=_0x1d08b5[_0x599946(0x15b)](e[_0x599946(0x127)]);this[_0x599946(0x11f)](this[_0x599946(0x133)](this[_0x599946(0x151)][_0x599946(0x17d)],()=>{const _0x48412f=_0x599946;let _0x50a335=new n[(_0x48412f(0x164))](),_0xca10a7=_0x23f9e0=>{const _0xc0cb98=_0x48412f;let _0x13c10a=_0x23f9e0['status$'][_0xc0cb98(0x142)]((0x0,r[_0xc0cb98(0x11b)])())[_0xc0cb98(0x129)](_0x5df87b=>{const _0x41f332=_0xc0cb98;let _0x5f1f14={'unitId':_0x23f9e0[_0x41f332(0x180)],'status':_0x5df87b};this[_0x41f332(0x15c)](this[_0x41f332(0x151)][_0x41f332(0x17d)],_0x5f1f14);});_0x50a335['add']((0x0,n[_0xc0cb98(0x131)])(_0x13c10a));};return _0x4facdd[_0x48412f(0x153)]()[_0x48412f(0x147)](_0xca10a7),_0x50a335[_0x48412f(0x165)]((0x0,n[_0x48412f(0x131)])(_0x4facdd[_0x48412f(0x163)]['subscribe'](_0xca10a7))),_0x50a335;})),this['disposeWithMe'](this[_0x599946(0x133)](this[_0x599946(0x151)][_0x599946(0x12c)],()=>{const _0x147f23=_0x599946;let _0x2ce997=new n[(_0x147f23(0x164))](),_0x2ce695=_0x2d9e74=>{const _0x528f45=_0x147f23;let _0x271337=_0x2d9e74[_0x528f45(0x12d)][_0x528f45(0x129)](_0x69062e=>{const _0x23db59=_0x528f45;let _0x157a89={'unitId':_0x69062e[_0x23db59(0x180)],'reason':_0x69062e[_0x23db59(0x125)],'message':_0x69062e[_0x23db59(0x11c)],'revert':_0x69062e[_0x23db59(0x157)],'localChanges':_0x69062e[_0x23db59(0x14a)],'cacheCleared':_0x69062e[_0x23db59(0x162)]};this[_0x23db59(0x15c)](this[_0x23db59(0x151)][_0x23db59(0x12c)],_0x157a89);});_0x2ce997[_0x528f45(0x165)]((0x0,n[_0x528f45(0x131)])(_0x271337));};return _0x4facdd[_0x147f23(0x153)]()[_0x147f23(0x147)](_0x2ce695),_0x2ce997[_0x147f23(0x165)]((0x0,n['toDisposable'])(_0x4facdd[_0x147f23(0x163)][_0x147f23(0x129)](_0x2ce695))),_0x2ce997;})),this[_0x599946(0x11f)](this[_0x599946(0x133)](this[_0x599946(0x151)][_0x599946(0x17c)],()=>{const _0x33a57a=_0x599946;let _0x2e7f23=new n['DisposableCollection'](),_0xbbd475=_0x1467a8=>{const _0x245d4c=_0x4575;let _0x557c9e=_0x1467a8[_0x245d4c(0x167)][_0x245d4c(0x129)](_0x12faca=>{const _0x2af9c2=_0x245d4c;let _0x2d744c={'unitId':_0x12faca[_0x2af9c2(0x180)],'reqId':_0x12faca['reqId'],'reason':_0x12faca[_0x2af9c2(0x125)],'attempt':_0x12faca[_0x2af9c2(0x158)],'elapsedMs':_0x12faca['elapsedMs'],'unsyncedMutationCount':_0x12faca[_0x2af9c2(0x112)],'nextDelayMs':_0x12faca[_0x2af9c2(0x170)]};this[_0x2af9c2(0x15c)](this[_0x2af9c2(0x151)]['CollaborationChangesetResend'],_0x2d744c);});_0x2e7f23[_0x245d4c(0x165)]((0x0,n['toDisposable'])(_0x557c9e));};return _0x4facdd[_0x33a57a(0x153)]()[_0x33a57a(0x147)](_0xbbd475),_0x2e7f23['add']((0x0,n[_0x33a57a(0x131)])(_0x4facdd[_0x33a57a(0x163)][_0x33a57a(0x129)](_0xbbd475))),_0x2e7f23;}));}[_0x833588(0x14f)](){const _0x41aa25=_0x833588;return this['_injector']['createInstance'](c,{'getWorkbook':_0x5a8ef6=>this[_0x41aa25(0x16f)](_0x5a8ef6),'getDocument':_0x55c394=>this[_0x41aa25(0x111)](_0x55c394),'getPresentation':_0x382800=>this['getPresentation'](_0x382800),'getBase':_0x1111d9=>this[_0x41aa25(0x116)](_0x1111d9),'getBoard':_0x4d3ff8=>this[_0x41aa25(0x171)](_0x4d3ff8),'getPdf':_0x22faf4=>this['getPdf'](_0x22faf4)});}[_0x833588(0x11d)](_0x3b7f1e,_0x3c1f5a,_0x478236){const _0x4d272c=_0x833588;return this[_0x4d272c(0x117)][_0x4d272c(0x15b)](e[_0x4d272c(0x144)])['loadUnit'](_0x3b7f1e,_0x3c1f5a,_0x478236);}[_0x833588(0x16d)](_0x44403e,_0x21c70b,_0x3127c0){const _0x1ce8cb=_0x833588;return this[_0x1ce8cb(0x117)][_0x1ce8cb(0x15b)](e[_0x1ce8cb(0x144)])[_0x1ce8cb(0x154)](_0x44403e,_0x21c70b,_0x3127c0);}};t['FUniver'][_0x833588(0x137)](u),Object[_0x833588(0x152)](exports,_0x833588(0x161),{'enumerable':!0x0,'get':function(){return c;}});
1
+ const _0xc586d9=_0x559d;(function(_0x76315d,_0x3bd20b){const _0x4b3a69=_0x559d,_0xf2dac0=_0x76315d();while(!![]){try{const _0x41fb54=parseInt(_0x4b3a69(0x10f))/0x1+parseInt(_0x4b3a69(0xbe))/0x2+-parseInt(_0x4b3a69(0xc4))/0x3*(parseInt(_0x4b3a69(0x11f))/0x4)+parseInt(_0x4b3a69(0xd9))/0x5*(-parseInt(_0x4b3a69(0xd1))/0x6)+-parseInt(_0x4b3a69(0xdb))/0x7*(-parseInt(_0x4b3a69(0xfb))/0x8)+parseInt(_0x4b3a69(0xd0))/0x9*(-parseInt(_0x4b3a69(0xba))/0xa)+-parseInt(_0x4b3a69(0xe6))/0xb*(parseInt(_0x4b3a69(0x103))/0xc);if(_0x41fb54===_0x3bd20b)break;else _0xf2dac0['push'](_0xf2dac0['shift']());}catch(_0x5746de){_0xf2dac0['push'](_0xf2dac0['shift']());}}}(_0x3673,0x2ecbc),Object['defineProperty'](exports,Symbol['toStringTag'],{'value':_0xc586d9(0xfe)}));let e=require('@univerjs-pro/collaboration-client'),t=require('@univerjs/core/facade'),n=require('@univerjs/core'),r=require('rxjs');var i=class extends t[_0xc586d9(0x109)]{get[_0xc586d9(0x102)](){return e['CollaborationStatus'];}};t[_0xc586d9(0x109)][_0xc586d9(0xda)](i);var a=class extends t[_0xc586d9(0xfd)]{get[_0xc586d9(0xd2)](){return'CollaborationStatusChanged';}get[_0xc586d9(0x107)](){const _0x32aab5=_0xc586d9;return _0x32aab5(0x107);}get['CollaborationChangesetResend'](){const _0x1a72d0=_0xc586d9;return _0x1a72d0(0x110);}};t[_0xc586d9(0xfd)][_0xc586d9(0xda)](a);function o(_0x25c52b,_0x10f72d){return function(_0x142eef,_0x2bcc44){_0x10f72d(_0x142eef,_0x2bcc44,_0x25c52b);};}function _0x559d(_0x5c6461,_0x5d9525){_0x5c6461=_0x5c6461-0xb1;const _0x367358=_0x3673();let _0x559d7b=_0x367358[_0x5c6461];return _0x559d7b;}function s(_0x4a15f2,_0x412cab,_0x36db1a,_0x66c6d6){const _0x3d86ff=_0xc586d9;var _0x4d07c7=arguments[_0x3d86ff(0xcd)],_0x5e640a=_0x4d07c7<0x3?_0x412cab:_0x66c6d6===null?_0x66c6d6=Object[_0x3d86ff(0xeb)](_0x412cab,_0x36db1a):_0x66c6d6,_0x46b034;if(typeof Reflect==_0x3d86ff(0x10a)&&typeof Reflect[_0x3d86ff(0xce)]==_0x3d86ff(0xf2))_0x5e640a=Reflect[_0x3d86ff(0xce)](_0x4a15f2,_0x412cab,_0x36db1a,_0x66c6d6);else{for(var _0x3aff57=_0x4a15f2[_0x3d86ff(0xcd)]-0x1;_0x3aff57>=0x0;_0x3aff57--)(_0x46b034=_0x4a15f2[_0x3aff57])&&(_0x5e640a=(_0x4d07c7<0x3?_0x46b034(_0x5e640a):_0x4d07c7>0x3?_0x46b034(_0x412cab,_0x36db1a,_0x5e640a):_0x46b034(_0x412cab,_0x36db1a))||_0x5e640a);}return _0x4d07c7>0x3&&_0x5e640a&&Object['defineProperty'](_0x412cab,_0x36db1a,_0x5e640a),_0x5e640a;}let c=class extends t['FBase']{constructor(_0x2994c4,_0x5bd6c9,_0x33fe89,_0x684f55,_0x5aa536){const _0x34e4ba=_0xc586d9;super(),this[_0x34e4ba(0x11e)]=_0x2994c4,this['_injector']=_0x5bd6c9,this[_0x34e4ba(0xf6)]=_0x33fe89,this[_0x34e4ba(0xb9)]=_0x684f55,this[_0x34e4ba(0x111)]=_0x5aa536;}async[_0xc586d9(0xc0)](_0x13f078,_0x578ff4){const _0x3cb4f3=_0xc586d9;return await this[_0x3cb4f3(0xb9)]['loadUnit'](_0x13f078,n[_0x3cb4f3(0xc1)][_0x3cb4f3(0xb1)],void 0x0,_0x578ff4)?(await this[_0x3cb4f3(0x111)][_0x3cb4f3(0xc9)](_0x13f078),this[_0x3cb4f3(0x11e)][_0x3cb4f3(0xe0)](_0x13f078)):null;}async[_0xc586d9(0xd6)](_0x372329,_0x352c4e){const _0x547558=_0xc586d9;return await this[_0x547558(0xb9)]['loadUnit'](_0x372329,n[_0x547558(0xc1)][_0x547558(0x101)],void 0x0,_0x352c4e)?(await this[_0x547558(0x111)]['readyForCollab'](_0x372329),this[_0x547558(0x11e)][_0x547558(0xcf)](_0x372329)):null;}async[_0xc586d9(0xb3)](_0x39679e,_0x2788e8){const _0x90fb88=_0xc586d9;return await this['_dataLoaderService']['loadUnit'](_0x39679e,n[_0x90fb88(0xc1)][_0x90fb88(0xd7)],void 0x0,_0x2788e8)?(await this[_0x90fb88(0x111)]['readyForCollab'](_0x39679e),this[_0x90fb88(0x11e)][_0x90fb88(0x108)](_0x39679e)):null;}async[_0xc586d9(0x113)](_0x1f8f2b,_0x37e0ec){const _0x7f0f8c=_0xc586d9;return await this[_0x7f0f8c(0xb9)]['loadUnit'](_0x1f8f2b,n['UniverInstanceType'][_0x7f0f8c(0xc6)],void 0x0,_0x37e0ec)?(await this[_0x7f0f8c(0x111)]['readyForCollab'](_0x1f8f2b),this['_handler'][_0x7f0f8c(0xbc)](_0x1f8f2b)):null;}async[_0xc586d9(0x10d)](_0x3d6588,_0x220486){const _0x255f08=_0xc586d9;return await this[_0x255f08(0xb9)][_0x255f08(0xbf)](_0x3d6588,n[_0x255f08(0xc1)][_0x255f08(0x117)],void 0x0,_0x220486)?(await this[_0x255f08(0x111)][_0x255f08(0xc9)](_0x3d6588),this[_0x255f08(0x11e)]['getBoard'](_0x3d6588)):null;}async[_0xc586d9(0x118)](_0x30d897,_0x29ba3a){const _0x4faaaf=_0xc586d9;return await this['_dataLoaderService']['loadUnit'](_0x30d897,n[_0x4faaaf(0xc1)][_0x4faaaf(0x106)],void 0x0,_0x29ba3a)?(await this[_0x4faaaf(0x111)][_0x4faaaf(0xc9)](_0x30d897),this[_0x4faaaf(0x11e)][_0x4faaaf(0x11b)](_0x30d897)):null;}[_0xc586d9(0xd8)](_0x10a8a2,_0x239424){const _0x3290ec=_0xc586d9;let _0x3c47bb=this[_0x3290ec(0xb7)][_0x3290ec(0xb4)](e[_0x3290ec(0x10c)])['waitForRoom$'](_0x10a8a2)[_0x3290ec(0xef)]((0x0,r[_0x3290ec(0xed)])(_0x5e80da=>_0x5e80da[_0x3290ec(0xf8)]))[_0x3290ec(0x112)](_0x3de00c=>_0x239424(Array[_0x3290ec(0xdc)](_0x3de00c[_0x3290ec(0x104)]())));return(0x0,n[_0x3290ec(0x11a)])(_0x3c47bb);}[_0xc586d9(0x122)](_0x5a14c7){const _0x468de4=_0xc586d9;let _0x29d3a4=this['_resolveUnitId'](_0x5a14c7);if(!_0x29d3a4)return e['CollaborationStatus'][_0x468de4(0xb8)];let _0x54c03b=this[_0x468de4(0x111)][_0x468de4(0xc8)](_0x29d3a4);return(_0x54c03b==null?void 0x0:_0x54c03b[_0x468de4(0xb5)][_0x468de4(0xd3)])??e[_0x468de4(0x102)][_0x468de4(0xb8)];}[_0xc586d9(0xd5)](_0x1d9333){const _0x1ccfaa=_0xc586d9;let _0x3371c1=this[_0x1ccfaa(0xe1)](_0x1d9333);return _0x3371c1?this[_0x1ccfaa(0x111)][_0x1ccfaa(0xd5)](_0x3371c1):!0x1;}[_0xc586d9(0xf3)](_0x28fe08,_0x4f78cd={}){const _0x1a609e=_0xc586d9;let _0x22d1a8=this['_resolveUnitId'](_0x28fe08);if(!_0x22d1a8)return Promise[_0x1a609e(0xff)](Error(_0x1a609e(0x11c)));let _0x427470=this[_0x1a609e(0x111)][_0x1a609e(0xc8)](_0x22d1a8);if(!_0x427470)return Promise[_0x1a609e(0xff)](Error(_0x1a609e(0x120)+_0x22d1a8+'\x22\x20is\x20not\x20in\x20collaboration\x20mode.'));let _0x37ccdb=_0x427470['state'][_0x1a609e(0xd3)];if(_0x37ccdb===e[_0x1a609e(0x102)][_0x1a609e(0xbb)])return Promise['resolve']();let _0x356627=l(_0x22d1a8,_0x37ccdb);if(_0x356627)return Promise[_0x1a609e(0xff)](_0x356627);let _0x520be7=_0x4f78cd[_0x1a609e(0xf7)]??0x7530;return new Promise((_0x4b17f8,_0x57836e)=>{const _0x1b9fba=_0x1a609e;let _0x4448ac=!0x1,_0x333eee=null,_0x233700=setTimeout(()=>{const _0x3699bc=_0x559d;_0x4448ac=!0x0,_0x333eee==null||_0x333eee[_0x3699bc(0xca)](),_0x57836e(Error(_0x3699bc(0x115)+_0x22d1a8+_0x3699bc(0xe4)+_0x520be7+_0x3699bc(0xc3)));},_0x520be7),_0x34b1c8=()=>{_0x4448ac=!0x0,clearTimeout(_0x233700),_0x333eee==null||_0x333eee['unsubscribe']();};_0x333eee=_0x427470[_0x1b9fba(0x10e)][_0x1b9fba(0x112)](_0x1d805b=>{const _0x1436e8=_0x1b9fba;if(_0x4448ac)return;if(_0x1d805b===e['CollaborationStatus'][_0x1436e8(0xbb)]){_0x34b1c8(),_0x4b17f8();return;}let _0x3b1e41=l(_0x22d1a8,_0x1d805b);_0x3b1e41&&(_0x34b1c8(),_0x57836e(_0x3b1e41));});});}['_resolveUnitId'](_0x2b7d82){const _0x3d395f=_0xc586d9;var _0x559ba3;return _0x2b7d82||((_0x559ba3=this[_0x3d395f(0xf6)]['getFocusedUnit']())==null?void 0x0:_0x559ba3['getUnitId']());}};c=s([o(0x1,(0x0,n[_0xc586d9(0xe7)])(n[_0xc586d9(0xd4)])),o(0x2,n[_0xc586d9(0x105)]),o(0x3,(0x0,n['Inject'])(e['DataLoaderService'])),o(0x4,(0x0,n[_0xc586d9(0xe7)])(e[_0xc586d9(0xe9)]))],c);function _0x3673(){const _0x427250=['161524bdwrnj','Inject','add','CollaborationController','defineProperty','getOwnPropertyDescriptor','reason','switchMap','DisposableCollection','pipe','reqId','FCollaboration','function','flush','revert','loadServerUnit','_univerInstanceService','timeout','members$','elapsedMs','conflict$','1405528ghjQYN','entityInit$','FEventName','Module','reject','disposeWithMe','UNIVER_DOC','CollaborationStatus','84fuNnuZ','values','IUniverInstanceService','UNIVER_PDF','CollaborationConflict','getBase','FEnum','object','distinctUntilChanged','MemberService','loadBoardAsync','status$','84709FSFMoq','CollaborationChangesetResend','_collaborationController','subscribe','loadSlideAsync','getBoard','[FCollaboration]:\x20Timed\x20out\x20flushing\x20unit\x20\x22','getCollabEntities','UNIVER_BOARD','loadPdfAsync','unsyncedMutationCount','toDisposable','getPdf','[FCollaboration]:\x20Cannot\x20flush\x20because\x20no\x20unit\x20is\x20focused\x20or\x20specified.','getCollaboration','_handler','12SQsLsM','[FCollaboration]:\x20Unit\x20\x22','localChanges','getCollaborationStatus','UNIVER_SHEET','createInstance','loadBaseAsync','get','state','fireEvent','_injector','NOT_COLLAB','_dataLoaderService','30TqVCJi','SYNCED','getPresentation','FUniver','625496uMspQf','loadUnit','loadSheetAsync','UniverInstanceType','nextDelayMs','ms.','241587AdcXdQ','message','UNIVER_SLIDE','registerEventHandler','getCollabEntity','readyForCollab','unsubscribe','[FCollaboration]:\x20Cannot\x20flush\x20unit\x20\x22','DataLoaderService','length','decorate','getDocument','338535OOgivD','35274iIGyqQ','CollaborationStatusChanged','status','Injector','hasWritePending','loadDocAsync','UNIVER_BASE','subscribeCollaborators','85DtlJnc','extend','14lbDwol','from','_initialize','forEach','cacheCleared','getWorkbook','_resolveUnitId','Event','unitID','\x22\x20after\x20','loadUnitOfRevision'];_0x3673=function(){return _0x427250;};return _0x3673();}function l(_0x3e077b,_0x514749){const _0x5e4ea2=_0xc586d9;return _0x514749===e[_0x5e4ea2(0x102)]['CONFLICT']||_0x514749===e[_0x5e4ea2(0x102)][_0x5e4ea2(0xb8)]?Error(_0x5e4ea2(0xcb)+_0x3e077b+'\x22\x20while\x20collaboration\x20status\x20is\x20'+_0x514749+'.'):null;}var u=class extends t[_0xc586d9(0xbd)]{[_0xc586d9(0xdd)](_0x967967){const _0x2f6322=_0xc586d9;let _0x1ff2e5=_0x967967[_0x2f6322(0xb4)](e[_0x2f6322(0xe9)]);this[_0x2f6322(0x100)](this[_0x2f6322(0xc7)](this['Event'][_0x2f6322(0xd2)],()=>{const _0x2b8502=_0x2f6322;let _0x25c213=new n[(_0x2b8502(0xee))](),_0x32e1da=_0xf86938=>{const _0xc5ae24=_0x2b8502;let _0x52194e=_0xf86938[_0xc5ae24(0x10e)]['pipe']((0x0,r[_0xc5ae24(0x10b)])())[_0xc5ae24(0x112)](_0xfd7084=>{const _0x139fa6=_0xc5ae24;let _0x38d340={'unitId':_0xf86938['unitID'],'status':_0xfd7084};this[_0x139fa6(0xb6)](this[_0x139fa6(0xe2)][_0x139fa6(0xd2)],_0x38d340);});_0x25c213[_0xc5ae24(0xe8)]((0x0,n[_0xc5ae24(0x11a)])(_0x52194e));};return _0x1ff2e5[_0x2b8502(0x116)]()[_0x2b8502(0xde)](_0x32e1da),_0x25c213[_0x2b8502(0xe8)]((0x0,n[_0x2b8502(0x11a)])(_0x1ff2e5[_0x2b8502(0xfc)][_0x2b8502(0x112)](_0x32e1da))),_0x25c213;})),this['disposeWithMe'](this[_0x2f6322(0xc7)](this[_0x2f6322(0xe2)][_0x2f6322(0x107)],()=>{const _0x569f38=_0x2f6322;let _0x1b54cc=new n['DisposableCollection'](),_0x1b8f2e=_0x522a03=>{const _0x576446=_0x559d;let _0x4f348f=_0x522a03[_0x576446(0xfa)][_0x576446(0x112)](_0x3a7a82=>{const _0x3220b3=_0x576446;let _0x31655d={'unitId':_0x3a7a82[_0x3220b3(0xe3)],'reason':_0x3a7a82['reason'],'message':_0x3a7a82[_0x3220b3(0xc5)],'revert':_0x3a7a82[_0x3220b3(0xf4)],'localChanges':_0x3a7a82[_0x3220b3(0x121)],'cacheCleared':_0x3a7a82[_0x3220b3(0xdf)]};this[_0x3220b3(0xb6)](this[_0x3220b3(0xe2)][_0x3220b3(0x107)],_0x31655d);});_0x1b54cc[_0x576446(0xe8)]((0x0,n[_0x576446(0x11a)])(_0x4f348f));};return _0x1ff2e5['getCollabEntities']()['forEach'](_0x1b8f2e),_0x1b54cc[_0x569f38(0xe8)]((0x0,n[_0x569f38(0x11a)])(_0x1ff2e5[_0x569f38(0xfc)][_0x569f38(0x112)](_0x1b8f2e))),_0x1b54cc;})),this[_0x2f6322(0x100)](this['registerEventHandler'](this[_0x2f6322(0xe2)][_0x2f6322(0x110)],()=>{const _0x127717=_0x2f6322;let _0x41ddce=new n['DisposableCollection'](),_0x45ccb7=_0x77228c=>{const _0x11bc7b=_0x559d;let _0x48f77f=_0x77228c['changesetResend$']['subscribe'](_0x20736a=>{const _0x233807=_0x559d;let _0x40bc36={'unitId':_0x20736a[_0x233807(0xe3)],'reqId':_0x20736a[_0x233807(0xf0)],'reason':_0x20736a[_0x233807(0xec)],'attempt':_0x20736a['attempt'],'elapsedMs':_0x20736a[_0x233807(0xf9)],'unsyncedMutationCount':_0x20736a[_0x233807(0x119)],'nextDelayMs':_0x20736a[_0x233807(0xc2)]};this[_0x233807(0xb6)](this[_0x233807(0xe2)][_0x233807(0x110)],_0x40bc36);});_0x41ddce[_0x11bc7b(0xe8)]((0x0,n['toDisposable'])(_0x48f77f));};return _0x1ff2e5[_0x127717(0x116)]()[_0x127717(0xde)](_0x45ccb7),_0x41ddce['add']((0x0,n[_0x127717(0x11a)])(_0x1ff2e5[_0x127717(0xfc)][_0x127717(0x112)](_0x45ccb7))),_0x41ddce;}));}[_0xc586d9(0x11d)](){const _0x1d2b8f=_0xc586d9;return this['_injector'][_0x1d2b8f(0xb2)](c,{'getWorkbook':_0x2ae34a=>this['getWorkbook'](_0x2ae34a),'getDocument':_0x3ffc0b=>this['getDocument'](_0x3ffc0b),'getPresentation':_0x56f193=>this[_0x1d2b8f(0xbc)](_0x56f193),'getBase':_0x41d400=>this['getBase'](_0x41d400),'getBoard':_0x422d6e=>this[_0x1d2b8f(0x114)](_0x422d6e),'getPdf':_0x26a939=>this[_0x1d2b8f(0x11b)](_0x26a939)});}[_0xc586d9(0xf5)](_0x52cb92,_0x333669,_0x36c8e1){const _0x510293=_0xc586d9;return this[_0x510293(0xb7)][_0x510293(0xb4)](e[_0x510293(0xcc)])['loadUnit'](_0x52cb92,_0x333669,_0x36c8e1);}['loadServerUnitOfRevision'](_0x44bf5d,_0x5632ad,_0xd153f0){const _0x49eb2e=_0xc586d9;return this[_0x49eb2e(0xb7)][_0x49eb2e(0xb4)](e['DataLoaderService'])[_0x49eb2e(0xe5)](_0x44bf5d,_0x5632ad,_0xd153f0);}};t[_0xc586d9(0xbd)]['extend'](u),Object[_0xc586d9(0xea)](exports,_0xc586d9(0xf1),{'enumerable':!0x0,'get':function(){return c;}});