@univerjs-pro/collaboration-client 1.1.0 → 1.2.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.
Files changed (100) hide show
  1. package/README.md +2 -0
  2. package/lib/cjs/facade.js +1 -1
  3. package/lib/cjs/index.js +1 -1
  4. package/lib/cjs/locale/ar-SA.js +1 -1
  5. package/lib/cjs/locale/ca-ES.js +1 -1
  6. package/lib/cjs/locale/de-DE.js +1 -1
  7. package/lib/cjs/locale/en-US.js +1 -1
  8. package/lib/cjs/locale/es-ES.js +1 -1
  9. package/lib/cjs/locale/fa-IR.js +1 -1
  10. package/lib/cjs/locale/fr-FR.js +1 -1
  11. package/lib/cjs/locale/id-ID.js +1 -1
  12. package/lib/cjs/locale/it-IT.js +1 -1
  13. package/lib/cjs/locale/ja-JP.js +1 -1
  14. package/lib/cjs/locale/ko-KR.js +1 -1
  15. package/lib/cjs/locale/pl-PL.js +1 -1
  16. package/lib/cjs/locale/pt-BR.js +1 -1
  17. package/lib/cjs/locale/ru-RU.js +1 -1
  18. package/lib/cjs/locale/sk-SK.js +1 -1
  19. package/lib/cjs/locale/vi-VN.js +1 -1
  20. package/lib/cjs/locale/zh-CN.js +1 -1
  21. package/lib/cjs/locale/zh-HK.js +1 -1
  22. package/lib/cjs/locale/zh-TW.js +1 -1
  23. package/lib/es/facade.js +1 -1
  24. package/lib/es/index.js +1 -1
  25. package/lib/es/locale/ar-SA.js +1 -1
  26. package/lib/es/locale/ca-ES.js +1 -1
  27. package/lib/es/locale/de-DE.js +1 -1
  28. package/lib/es/locale/en-US.js +1 -1
  29. package/lib/es/locale/es-ES.js +1 -1
  30. package/lib/es/locale/fa-IR.js +1 -1
  31. package/lib/es/locale/fr-FR.js +1 -1
  32. package/lib/es/locale/id-ID.js +1 -1
  33. package/lib/es/locale/it-IT.js +1 -1
  34. package/lib/es/locale/ja-JP.js +1 -1
  35. package/lib/es/locale/ko-KR.js +1 -1
  36. package/lib/es/locale/pl-PL.js +1 -1
  37. package/lib/es/locale/pt-BR.js +1 -1
  38. package/lib/es/locale/ru-RU.js +1 -1
  39. package/lib/es/locale/sk-SK.js +1 -1
  40. package/lib/es/locale/vi-VN.js +1 -1
  41. package/lib/es/locale/zh-CN.js +1 -1
  42. package/lib/es/locale/zh-HK.js +1 -1
  43. package/lib/es/locale/zh-TW.js +1 -1
  44. package/lib/facade.js +1 -1
  45. package/lib/index.js +1 -1
  46. package/lib/locale/ar-SA.js +1 -1
  47. package/lib/locale/ca-ES.js +1 -1
  48. package/lib/locale/de-DE.js +1 -1
  49. package/lib/locale/en-US.js +1 -1
  50. package/lib/locale/es-ES.js +1 -1
  51. package/lib/locale/fa-IR.js +1 -1
  52. package/lib/locale/fr-FR.js +1 -1
  53. package/lib/locale/id-ID.js +1 -1
  54. package/lib/locale/it-IT.js +1 -1
  55. package/lib/locale/ja-JP.js +1 -1
  56. package/lib/locale/ko-KR.js +1 -1
  57. package/lib/locale/pl-PL.js +1 -1
  58. package/lib/locale/pt-BR.js +1 -1
  59. package/lib/locale/ru-RU.js +1 -1
  60. package/lib/locale/sk-SK.js +1 -1
  61. package/lib/locale/vi-VN.js +1 -1
  62. package/lib/locale/zh-CN.js +1 -1
  63. package/lib/locale/zh-HK.js +1 -1
  64. package/lib/locale/zh-TW.js +1 -1
  65. package/lib/types/config/config.d.ts +19 -0
  66. package/lib/types/controllers/collaboration/changeset-submitter.d.ts +132 -0
  67. package/lib/types/controllers/collaboration/collaboration-entity.d.ts +28 -1
  68. package/lib/types/controllers/collaboration/collaboration-state.d.ts +162 -70
  69. package/lib/types/controllers/collaboration/collaboration.controller.d.ts +7 -0
  70. package/lib/types/controllers/collaboration/utils/changeset-utils.d.ts +7 -3
  71. package/lib/types/facade/f-collaboration.d.ts +17 -0
  72. package/lib/types/facade/f-event.d.ts +87 -2
  73. package/lib/types/index.d.ts +5 -3
  74. package/lib/types/services/collaboration-session/collaboration-session.d.ts +4 -8
  75. package/lib/types/services/collaboration-session/collaboration-session.service.d.ts +1 -1
  76. package/lib/types/services/collaboration-ui-event/collaboration-ui-event.d.ts +8 -0
  77. package/lib/types/services/socket/collaboration-socket.service.d.ts +10 -2
  78. package/lib/types/services/undoredo/collaborative-undoredo.service.d.ts +5 -0
  79. package/lib/umd/facade.js +1 -1
  80. package/lib/umd/index.js +1 -1
  81. package/lib/umd/locale/ar-SA.js +1 -1
  82. package/lib/umd/locale/ca-ES.js +1 -1
  83. package/lib/umd/locale/de-DE.js +1 -1
  84. package/lib/umd/locale/en-US.js +1 -1
  85. package/lib/umd/locale/es-ES.js +1 -1
  86. package/lib/umd/locale/fa-IR.js +1 -1
  87. package/lib/umd/locale/fr-FR.js +1 -1
  88. package/lib/umd/locale/id-ID.js +1 -1
  89. package/lib/umd/locale/it-IT.js +1 -1
  90. package/lib/umd/locale/ja-JP.js +1 -1
  91. package/lib/umd/locale/ko-KR.js +1 -1
  92. package/lib/umd/locale/pl-PL.js +1 -1
  93. package/lib/umd/locale/pt-BR.js +1 -1
  94. package/lib/umd/locale/ru-RU.js +1 -1
  95. package/lib/umd/locale/sk-SK.js +1 -1
  96. package/lib/umd/locale/vi-VN.js +1 -1
  97. package/lib/umd/locale/zh-CN.js +1 -1
  98. package/lib/umd/locale/zh-HK.js +1 -1
  99. package/lib/umd/locale/zh-TW.js +1 -1
  100. package/package.json +15 -15
package/README.md CHANGED
@@ -38,6 +38,8 @@ univer.registerPlugin(UniverCollaborationClientPlugin);
38
38
  - Keep this package on the same version as the other `@univerjs/*` and `@univerjs-pro/*` packages in your application.
39
39
  - Import locale files only for the languages your application enables.
40
40
  - Use the facade entry when integrating through Univer Facade APIs.
41
+ - In Docs collaboration, undoing or redoing local paragraph formatting preserves collaborators' changes to other fields. This includes heading folds, alignment, indentation, spacing, tab stops, named styles, and numbering. Partial-format updates retain their authored fields, while full-paragraph replacements do not treat unchanged attributes as new edits; later collaborator changes to the same field remain in effect.
42
+ - Incoming mutation batches and grouped local history entries are transformed in order so preceding text edits keep paragraph history aligned. These history transformations do not change the document model, snapshot format, or collaboration protocol.
41
43
 
42
44
  ## Resources
43
45
 
package/lib/cjs/facade.js CHANGED
@@ -1 +1 @@
1
- function _0x111d(){const _0x7bb063=['_handler','FUniver','from','[FCollaboration]:\x20Unit\x20\x22','fireEvent','CollaborationStatus','DataLoaderService','UNIVER_SLIDE','getUnitId','FBase','UNIVER_PDF','UniverInstanceType','unitID','_dataLoaderService','loadBaseAsync','getOwnPropertyDescriptor','toStringTag','disposeWithMe','subscribe','getPdf','_resolveUnitId','add','_univerInstanceService','2250720dYahpv','\x22\x20while\x20collaboration\x20status\x20is\x20','waitForRoom$','state','112824lvNBhl','5916858HXEVTH','getBase','_injector','function','defineProperty','2mpkmcK','862183DFSvaN','extend','DisposableCollection','timeout','loadBoardAsync','loadServerUnit','object','Injector','createInstance','_collaborationController','decorate','NOT_COLLAB','getWorkbook','getCollabEntity','values','_initialize','2783901vyqGKN','loadUnit','CollaborationStatusChanged','892810cSlnVl','members$','loadServerUnitOfRevision','length','unsubscribe','get','185073NOoRux','getDocument','status','status$','Event','[FCollaboration]:\x20Cannot\x20flush\x20unit\x20\x22','getCollaborationStatus','[FCollaboration]:\x20Timed\x20out\x20flushing\x20unit\x20\x22','loadPdfAsync','getPresentation','MemberService','UNIVER_DOC','loadUnitOfRevision','pipe','[FCollaboration]:\x20Cannot\x20flush\x20because\x20no\x20unit\x20is\x20focused\x20or\x20specified.','registerEventHandler','CollaborationController','SYNCED','FCollaboration','subscribeCollaborators','toDisposable','reject','Inject','readyForCollab','FEventName','getCollaboration','45gqwqOH'];_0x111d=function(){return _0x7bb063;};return _0x111d();}const _0x2648a6=_0x53bf;(function(_0x7e9410,_0x1335be){const _0x5a587b=_0x53bf,_0x22113d=_0x7e9410();while(!![]){try{const _0x5e62ee=parseInt(_0x5a587b(0x22f))/0x1+parseInt(_0x5a587b(0x215))/0x2*(-parseInt(_0x5a587b(0x226))/0x3)+parseInt(_0x5a587b(0x20b))/0x4+parseInt(_0x5a587b(0x229))/0x5+parseInt(_0x5a587b(0x210))/0x6+-parseInt(_0x5a587b(0x216))/0x7+-parseInt(_0x5a587b(0x20f))/0x8*(-parseInt(_0x5a587b(0x1f3))/0x9);if(_0x5e62ee===_0x1335be)break;else _0x22113d['push'](_0x22113d['shift']());}catch(_0xb8f2d7){_0x22113d['push'](_0x22113d['shift']());}}}(_0x111d,0xe37fd),Object[_0x2648a6(0x214)](exports,Symbol[_0x2648a6(0x204)],{'value':'Module'}));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[_0x2648a6(0x1f9)](){const _0x21b9a2=_0x2648a6;return e[_0x21b9a2(0x1f9)];}};t['FEnum'][_0x2648a6(0x217)](i);var a=class extends t[_0x2648a6(0x1f1)]{get[_0x2648a6(0x228)](){const _0x5148a3=_0x2648a6;return _0x5148a3(0x228);}};function _0x53bf(_0x509f69,_0x31cc04){_0x509f69=_0x509f69-0x1de;const _0x111d1a=_0x111d();let _0x53bf5b=_0x111d1a[_0x509f69];return _0x53bf5b;}t[_0x2648a6(0x1f1)][_0x2648a6(0x217)](a);function o(_0xa0aeb9,_0x5f1ade){return function(_0x57ef44,_0x2e1ebd){_0x5f1ade(_0x57ef44,_0x2e1ebd,_0xa0aeb9);};}function s(_0x439f08,_0x52a899,_0x3decbb,_0x49b0ff){const _0xf76159=_0x2648a6;var _0x3880f7=arguments[_0xf76159(0x22c)],_0x5ec903=_0x3880f7<0x3?_0x52a899:_0x49b0ff===null?_0x49b0ff=Object[_0xf76159(0x203)](_0x52a899,_0x3decbb):_0x49b0ff,_0x9e8770;if(typeof Reflect==_0xf76159(0x21c)&&typeof Reflect['decorate']==_0xf76159(0x213))_0x5ec903=Reflect[_0xf76159(0x220)](_0x439f08,_0x52a899,_0x3decbb,_0x49b0ff);else{for(var _0x37084d=_0x439f08[_0xf76159(0x22c)]-0x1;_0x37084d>=0x0;_0x37084d--)(_0x9e8770=_0x439f08[_0x37084d])&&(_0x5ec903=(_0x3880f7<0x3?_0x9e8770(_0x5ec903):_0x3880f7>0x3?_0x9e8770(_0x52a899,_0x3decbb,_0x5ec903):_0x9e8770(_0x52a899,_0x3decbb))||_0x5ec903);}return _0x3880f7>0x3&&_0x5ec903&&Object[_0xf76159(0x214)](_0x52a899,_0x3decbb,_0x5ec903),_0x5ec903;}let c=class extends t[_0x2648a6(0x1fd)]{constructor(_0x19302c,_0x863243,_0x571c92,_0x45c681,_0x5816f8){const _0x4e7a3b=_0x2648a6;super(),this[_0x4e7a3b(0x1f4)]=_0x19302c,this['_injector']=_0x863243,this['_univerInstanceService']=_0x571c92,this[_0x4e7a3b(0x201)]=_0x45c681,this[_0x4e7a3b(0x21f)]=_0x5816f8;}async['loadSheetAsync'](_0x2b4948,_0x527353){const _0x5ec66a=_0x2648a6;return await this[_0x5ec66a(0x201)][_0x5ec66a(0x227)](_0x2b4948,n[_0x5ec66a(0x1ff)]['UNIVER_SHEET'],void 0x0,_0x527353)?(await this[_0x5ec66a(0x21f)][_0x5ec66a(0x1f0)](_0x2b4948),this['_handler'][_0x5ec66a(0x222)](_0x2b4948)):null;}async['loadDocAsync'](_0xb50a52,_0x5ee4b1){const _0x4d9d07=_0x2648a6;return await this['_dataLoaderService']['loadUnit'](_0xb50a52,n['UniverInstanceType'][_0x4d9d07(0x1e4)],void 0x0,_0x5ee4b1)?(await this[_0x4d9d07(0x21f)][_0x4d9d07(0x1f0)](_0xb50a52),this[_0x4d9d07(0x1f4)][_0x4d9d07(0x230)](_0xb50a52)):null;}async[_0x2648a6(0x202)](_0x4c971b,_0x385f41){const _0x448364=_0x2648a6;return await this[_0x448364(0x201)][_0x448364(0x227)](_0x4c971b,n[_0x448364(0x1ff)]['UNIVER_BASE'],void 0x0,_0x385f41)?(await this['_collaborationController'][_0x448364(0x1f0)](_0x4c971b),this[_0x448364(0x1f4)][_0x448364(0x211)](_0x4c971b)):null;}async['loadSlideAsync'](_0x45c853,_0x13907c){const _0xc85dd0=_0x2648a6;return await this[_0xc85dd0(0x201)]['loadUnit'](_0x45c853,n[_0xc85dd0(0x1ff)][_0xc85dd0(0x1fb)],void 0x0,_0x13907c)?(await this[_0xc85dd0(0x21f)][_0xc85dd0(0x1f0)](_0x45c853),this[_0xc85dd0(0x1f4)][_0xc85dd0(0x1e2)](_0x45c853)):null;}async[_0x2648a6(0x21a)](_0x421344,_0x1f9554){const _0x23e083=_0x2648a6;return await this[_0x23e083(0x201)][_0x23e083(0x227)](_0x421344,n[_0x23e083(0x1ff)]['UNIVER_BOARD'],void 0x0,_0x1f9554)?(await this[_0x23e083(0x21f)][_0x23e083(0x1f0)](_0x421344),this[_0x23e083(0x1f4)]['getBoard'](_0x421344)):null;}async[_0x2648a6(0x1e1)](_0x5f4ab8,_0x3c86a3){const _0x4de5fd=_0x2648a6;return await this['_dataLoaderService'][_0x4de5fd(0x227)](_0x5f4ab8,n[_0x4de5fd(0x1ff)][_0x4de5fd(0x1fe)],void 0x0,_0x3c86a3)?(await this[_0x4de5fd(0x21f)]['readyForCollab'](_0x5f4ab8),this[_0x4de5fd(0x1f4)][_0x4de5fd(0x207)](_0x5f4ab8)):null;}[_0x2648a6(0x1ec)](_0x2cda38,_0x934ebe){const _0xe7a8c6=_0x2648a6;let _0x2eee30=this['_injector'][_0xe7a8c6(0x22e)](e[_0xe7a8c6(0x1e3)])[_0xe7a8c6(0x20d)](_0x2cda38)[_0xe7a8c6(0x1e6)]((0x0,r['switchMap'])(_0x33dae8=>_0x33dae8[_0xe7a8c6(0x22a)]))[_0xe7a8c6(0x206)](_0x1c734c=>_0x934ebe(Array[_0xe7a8c6(0x1f6)](_0x1c734c[_0xe7a8c6(0x224)]())));return(0x0,n[_0xe7a8c6(0x1ed)])(_0x2eee30);}[_0x2648a6(0x1df)](_0x2cf037){const _0x4b2d72=_0x2648a6;let _0x3b947b=this[_0x4b2d72(0x208)](_0x2cf037);if(!_0x3b947b)return e[_0x4b2d72(0x1f9)][_0x4b2d72(0x221)];let _0xb0122e=this['_collaborationController'][_0x4b2d72(0x223)](_0x3b947b);return(_0xb0122e==null?void 0x0:_0xb0122e['state'][_0x4b2d72(0x231)])??e[_0x4b2d72(0x1f9)][_0x4b2d72(0x221)];}['flush'](_0x49121c,_0x11d048={}){const _0xc08f0c=_0x2648a6;let _0x5b909d=this[_0xc08f0c(0x208)](_0x49121c);if(!_0x5b909d)return Promise[_0xc08f0c(0x1ee)](Error(_0xc08f0c(0x1e7)));let _0x27f022=this[_0xc08f0c(0x21f)][_0xc08f0c(0x223)](_0x5b909d);if(!_0x27f022)return Promise[_0xc08f0c(0x1ee)](Error(_0xc08f0c(0x1f7)+_0x5b909d+'\x22\x20is\x20not\x20in\x20collaboration\x20mode.'));let _0x3186e1=_0x27f022[_0xc08f0c(0x20e)][_0xc08f0c(0x231)];if(_0x3186e1===e[_0xc08f0c(0x1f9)][_0xc08f0c(0x1ea)])return Promise['resolve']();let _0x3133e8=l(_0x5b909d,_0x3186e1);if(_0x3133e8)return Promise[_0xc08f0c(0x1ee)](_0x3133e8);let _0x22ef8d=_0x11d048[_0xc08f0c(0x219)]??0x7530;return new Promise((_0xdfe27c,_0xedc54b)=>{const _0x269326=_0xc08f0c;let _0x4609b9=!0x1,_0x2412fe=null,_0x18d53d=setTimeout(()=>{const _0x2b54c0=_0x53bf;_0x4609b9=!0x0,_0x2412fe==null||_0x2412fe[_0x2b54c0(0x22d)](),_0xedc54b(Error(_0x2b54c0(0x1e0)+_0x5b909d+'\x22\x20after\x20'+_0x22ef8d+'ms.'));},_0x22ef8d),_0x4c666e=()=>{const _0x52cedf=_0x53bf;_0x4609b9=!0x0,clearTimeout(_0x18d53d),_0x2412fe==null||_0x2412fe[_0x52cedf(0x22d)]();};_0x2412fe=_0x27f022[_0x269326(0x232)][_0x269326(0x206)](_0x5774b3=>{const _0x12eb4c=_0x269326;if(_0x4609b9)return;if(_0x5774b3===e[_0x12eb4c(0x1f9)][_0x12eb4c(0x1ea)]){_0x4c666e(),_0xdfe27c();return;}let _0x22d722=l(_0x5b909d,_0x5774b3);_0x22d722&&(_0x4c666e(),_0xedc54b(_0x22d722));});});}['_resolveUnitId'](_0x568283){const _0x76cd86=_0x2648a6;var _0x24fd3d;return _0x568283||((_0x24fd3d=this[_0x76cd86(0x20a)]['getFocusedUnit']())==null?void 0x0:_0x24fd3d[_0x76cd86(0x1fc)]());}};c=s([o(0x1,(0x0,n['Inject'])(n[_0x2648a6(0x21d)])),o(0x2,n['IUniverInstanceService']),o(0x3,(0x0,n[_0x2648a6(0x1ef)])(e['DataLoaderService'])),o(0x4,(0x0,n['Inject'])(e[_0x2648a6(0x1e9)]))],c);function l(_0x58178a,_0x66be1a){const _0x1c2328=_0x2648a6;return _0x66be1a===e[_0x1c2328(0x1f9)]['CONFLICT']||_0x66be1a===e['CollaborationStatus'][_0x1c2328(0x221)]?Error(_0x1c2328(0x1de)+_0x58178a+_0x1c2328(0x20c)+_0x66be1a+'.'):null;}var u=class extends t[_0x2648a6(0x1f5)]{[_0x2648a6(0x225)](_0x39b535){const _0x4b4ee7=_0x2648a6;let _0x2b2cf0=_0x39b535['get'](e[_0x4b4ee7(0x1e9)]);this[_0x4b4ee7(0x205)](this[_0x4b4ee7(0x1e8)](this[_0x4b4ee7(0x233)][_0x4b4ee7(0x228)],()=>{const _0x34fd9a=_0x4b4ee7;let _0x4c63c8=new n[(_0x34fd9a(0x218))](),_0x39afb9=_0x2b2cf0['entityInit$']['subscribe'](_0x50f851=>{const _0x4a8167=_0x34fd9a;let _0x473e0c=_0x50f851[_0x4a8167(0x232)][_0x4a8167(0x206)](_0x4d22b5=>{const _0x1d1f2f=_0x4a8167;let _0x38ef49={'unitId':_0x50f851[_0x1d1f2f(0x200)],'status':_0x4d22b5};this[_0x1d1f2f(0x1f8)](this[_0x1d1f2f(0x233)][_0x1d1f2f(0x228)],_0x38ef49);});_0x4c63c8[_0x4a8167(0x209)]((0x0,n[_0x4a8167(0x1ed)])(_0x473e0c));});return _0x4c63c8[_0x34fd9a(0x209)]((0x0,n[_0x34fd9a(0x1ed)])(_0x39afb9)),_0x4c63c8;}));}[_0x2648a6(0x1f2)](){const _0x407f08=_0x2648a6;return this[_0x407f08(0x212)][_0x407f08(0x21e)](c,{'getWorkbook':_0x3d98aa=>this[_0x407f08(0x222)](_0x3d98aa),'getDocument':_0x2b65cc=>this[_0x407f08(0x230)](_0x2b65cc),'getPresentation':_0x3fdc52=>this[_0x407f08(0x1e2)](_0x3fdc52),'getBase':_0x345044=>this[_0x407f08(0x211)](_0x345044),'getBoard':_0x1f536b=>this['getBoard'](_0x1f536b),'getPdf':_0x49f21f=>this['getPdf'](_0x49f21f)});}[_0x2648a6(0x21b)](_0x5be1f6,_0x3449cd,_0x4d6e94){const _0xe105f5=_0x2648a6;return this[_0xe105f5(0x212)][_0xe105f5(0x22e)](e[_0xe105f5(0x1fa)])[_0xe105f5(0x227)](_0x5be1f6,_0x3449cd,_0x4d6e94);}[_0x2648a6(0x22b)](_0x25ad51,_0x5d9fcd,_0x36b271){const _0x178a7e=_0x2648a6;return this['_injector']['get'](e['DataLoaderService'])[_0x178a7e(0x1e5)](_0x25ad51,_0x5d9fcd,_0x36b271);}};t[_0x2648a6(0x1f5)][_0x2648a6(0x217)](u),Object[_0x2648a6(0x214)](exports,_0x2648a6(0x1eb),{'enumerable':!0x0,'get':function(){return c;}});
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;}});