@univerjs-pro/collaboration-client 1.0.0-rc.0 → 1.0.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 (89) 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/config/config.d.ts +0 -12
  65. package/lib/types/controllers/collaboration/collaboration-state.d.ts +2 -1
  66. package/lib/types/services/collaboration-ui-event/collaboration-ui-event.d.ts +3 -0
  67. package/lib/types/services/local-cache/local-cache.service.d.ts +1 -0
  68. package/lib/umd/facade.js +1 -1
  69. package/lib/umd/index.js +1 -1
  70. package/lib/umd/locale/ar-SA.js +1 -1
  71. package/lib/umd/locale/ca-ES.js +1 -1
  72. package/lib/umd/locale/de-DE.js +1 -1
  73. package/lib/umd/locale/en-US.js +1 -1
  74. package/lib/umd/locale/es-ES.js +1 -1
  75. package/lib/umd/locale/fa-IR.js +1 -1
  76. package/lib/umd/locale/fr-FR.js +1 -1
  77. package/lib/umd/locale/id-ID.js +1 -1
  78. package/lib/umd/locale/it-IT.js +1 -1
  79. package/lib/umd/locale/ja-JP.js +1 -1
  80. package/lib/umd/locale/ko-KR.js +1 -1
  81. package/lib/umd/locale/pl-PL.js +1 -1
  82. package/lib/umd/locale/pt-BR.js +1 -1
  83. package/lib/umd/locale/ru-RU.js +1 -1
  84. package/lib/umd/locale/sk-SK.js +1 -1
  85. package/lib/umd/locale/vi-VN.js +1 -1
  86. package/lib/umd/locale/zh-CN.js +1 -1
  87. package/lib/umd/locale/zh-HK.js +1 -1
  88. package/lib/umd/locale/zh-TW.js +1 -1
  89. package/package.json +16 -16
package/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- const _0x4d465b=_0x4feb;(function(_0x4606e7,_0x32973a){const _0x1d5361=_0x4feb,_0x59ae97=_0x4606e7();while(!![]){try{const _0x1e46cd=-parseInt(_0x1d5361(0x191))/0x1+parseInt(_0x1d5361(0x3df))/0x2*(parseInt(_0x1d5361(0x364))/0x3)+parseInt(_0x1d5361(0x346))/0x4*(parseInt(_0x1d5361(0x1e9))/0x5)+-parseInt(_0x1d5361(0x214))/0x6+-parseInt(_0x1d5361(0x4ab))/0x7*(-parseInt(_0x1d5361(0x378))/0x8)+parseInt(_0x1d5361(0x486))/0x9*(-parseInt(_0x1d5361(0x47b))/0xa)+parseInt(_0x1d5361(0x444))/0xb;if(_0x1e46cd===_0x32973a)break;else _0x59ae97['push'](_0x59ae97['shift']());}catch(_0x4e335b){_0x59ae97['push'](_0x59ae97['shift']());}}}(_0x2b54,0xe75cd),Object['defineProperty'](exports,Symbol['toStringTag'],{'value':_0x4d465b(0x344)}));let e=require('@univerjs-pro/collaboration'),t=require('@univerjs/core'),n=require('@univerjs/docs'),r=require('@univerjs/sheets'),i=require('rxjs'),a=require('@univerjs/protocol'),o=require('@univerjs/telemetry'),s=require('rxjs/operators'),c=require('@univerjs-pro/slides'),l=require('@univerjs/network'),u=require('@univerjs-pro/license'),d=require('@noble/ciphers/aes.js'),f=require('@noble/ciphers/utils.js'),p=require('@univerjs/drawing');const m=_0x4d465b(0x379),ee={};function te(_0x2c9a79){const _0x34c542=_0x4d465b;return JSON[_0x34c542(0x21b)](_0x2c9a79)[_0x34c542(0x41f)];}function h(_0x21c114){'@babel/helpers - typeof';const _0x4e24e=_0x4d465b;return h=typeof Symbol==_0x4e24e(0x276)&&typeof Symbol['iterator']=='symbol'?function(_0x4045e0){return typeof _0x4045e0;}:function(_0x1517b1){const _0x3cb2c5=_0x4e24e;return _0x1517b1&&typeof Symbol==_0x3cb2c5(0x276)&&_0x1517b1[_0x3cb2c5(0x217)]===Symbol&&_0x1517b1!==Symbol['prototype']?_0x3cb2c5(0x46e):typeof _0x1517b1;},h(_0x21c114);}function ne(_0x271959,_0x1eb974){const _0x24b2d4=_0x4d465b;if(h(_0x271959)!=_0x24b2d4(0x36c)||!_0x271959)return _0x271959;var _0x2a5274=_0x271959[Symbol[_0x24b2d4(0x2d1)]];if(_0x2a5274!==void 0x0){var _0x458541=_0x2a5274[_0x24b2d4(0x2c3)](_0x271959,_0x1eb974||_0x24b2d4(0x465));if(h(_0x458541)!=_0x24b2d4(0x36c))return _0x458541;throw TypeError(_0x24b2d4(0x313));}return(_0x1eb974===_0x24b2d4(0x449)?String:Number)(_0x271959);}function re(_0x39d69d){const _0x4c78ab=_0x4d465b;var _0x5f2884=ne(_0x39d69d,_0x4c78ab(0x449));return h(_0x5f2884)==_0x4c78ab(0x46e)?_0x5f2884:_0x5f2884+'';}function g(_0x5af419,_0x2adf23,_0x19ddee){const _0x1c00a6=_0x4d465b;return(_0x2adf23=re(_0x2adf23))in _0x5af419?Object[_0x1c00a6(0x466)](_0x5af419,_0x2adf23,{'value':_0x19ddee,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x5af419[_0x2adf23]=_0x19ddee,_0x5af419;}let ie=function(_0x523ca9){const _0x23f1e1=_0x4d465b;return _0x523ca9[_0x23f1e1(0x332)]=_0x23f1e1(0x332),_0x523ca9['PERMISSION_DENIED']='PERMISSION_DENIED',_0x523ca9['CONFLICT']=_0x23f1e1(0x4a2),_0x523ca9[_0x23f1e1(0x261)]=_0x23f1e1(0x261),_0x523ca9[_0x23f1e1(0x321)]=_0x23f1e1(0x321),_0x523ca9[_0x23f1e1(0x414)]=_0x23f1e1(0x414),_0x523ca9[_0x23f1e1(0x402)]='SOCKET_FAILED',_0x523ca9[_0x23f1e1(0x20d)]=_0x23f1e1(0x20d),_0x523ca9;}({});function _0x4feb(_0x3665b8,_0x4cc682){_0x3665b8=_0x3665b8-0x18f;const _0x2b546f=_0x2b54();let _0x4feb86=_0x2b546f[_0x3665b8];return _0x4feb86;}var _=class{constructor(){const _0x53253a=_0x4d465b;g(this,_0x53253a(0x45c),new i[(_0x53253a(0x40a))]()),g(this,_0x53253a(0x3a5),this[_0x53253a(0x45c)][_0x53253a(0x2f9)]());}[_0x4d465b(0x316)](_0x1c161b){const _0x308126=_0x4d465b;this[_0x308126(0x45c)][_0x308126(0x3fc)](_0x1c161b);}},ae=class{constructor(){const _0x5a3afe=_0x4d465b;g(this,'_commentUpdate$',new i[(_0x5a3afe(0x40a))]()),g(this,_0x5a3afe(0x2c6),this[_0x5a3afe(0x4d5)][_0x5a3afe(0x2f9)]());}[_0x4d465b(0x26e)](_0x33312a){const _0x4468fc=_0x4d465b;this[_0x4468fc(0x4d5)][_0x4468fc(0x3fc)](_0x33312a);}};function v(_0x100a04,_0x57dc59){return function(_0xfaab48,_0xe5851e){_0x57dc59(_0xfaab48,_0xe5851e,_0x100a04);};}function y(_0x699c38,_0x1bad6c,_0x142497,_0x138cde){const _0x5ecd6e=_0x4d465b;var _0x10270e=arguments[_0x5ecd6e(0x41f)],_0x3303d1=_0x10270e<0x3?_0x1bad6c:_0x138cde===null?_0x138cde=Object[_0x5ecd6e(0x4c3)](_0x1bad6c,_0x142497):_0x138cde,_0x284de9;if(typeof Reflect==_0x5ecd6e(0x36c)&&typeof Reflect[_0x5ecd6e(0x3b3)]==_0x5ecd6e(0x276))_0x3303d1=Reflect['decorate'](_0x699c38,_0x1bad6c,_0x142497,_0x138cde);else{for(var _0x1b5389=_0x699c38['length']-0x1;_0x1b5389>=0x0;_0x1b5389--)(_0x284de9=_0x699c38[_0x1b5389])&&(_0x3303d1=(_0x10270e<0x3?_0x284de9(_0x3303d1):_0x10270e>0x3?_0x284de9(_0x1bad6c,_0x142497,_0x3303d1):_0x284de9(_0x1bad6c,_0x142497))||_0x3303d1);}return _0x10270e>0x3&&_0x3303d1&&Object['defineProperty'](_0x1bad6c,_0x142497,_0x3303d1),_0x3303d1;}let b=class extends t[_0x4d465b(0x271)]{constructor(_0x17489f){const _0x146671=_0x4d465b;super(),this[_0x146671(0x2dd)]=_0x17489f,g(this,_0x146671(0x3aa),new Map()),g(this,_0x146671(0x4ca),new i[(_0x146671(0x40a))]()),this[_0x146671(0x43a)]((0x0,i[_0x146671(0x2dc)])(this[_0x146671(0x2dd)][_0x146671(0x1b8)](t[_0x146671(0x410)][_0x146671(0x459)])[_0x146671(0x30c)]((0x0,s[_0x146671(0x1f2)])(_0x18fd1c=>_0x18fd1c[_0x146671(0x48f)]())),this[_0x146671(0x2dd)][_0x146671(0x1b8)](t['UniverInstanceType'][_0x146671(0x24a)])[_0x146671(0x30c)]((0x0,s[_0x146671(0x1f2)])(_0xa49982=>_0xa49982[_0x146671(0x48f)]())),this[_0x146671(0x2dd)][_0x146671(0x1b8)](t['UniverInstanceType'][_0x146671(0x216)])['pipe']((0x0,s[_0x146671(0x1f2)])(_0xde01c3=>_0xde01c3[_0x146671(0x48f)]())),this['_univerInstanceService'][_0x146671(0x1b8)](t[_0x146671(0x410)]['UNIVER_BASE'])[_0x146671(0x30c)]((0x0,s['map'])(_0x202a32=>_0x202a32[_0x146671(0x48f)]())))[_0x146671(0x2b1)](_0x258406=>this[_0x146671(0x1f0)](_0x258406)));}[_0x4d465b(0x407)](_0x45776f){const _0x30794f=_0x4d465b;return this[_0x30794f(0x3aa)]['has'](_0x45776f)?(0x0,i['of'])(this['_roomMembers'][_0x30794f(0x34e)](_0x45776f)):this[_0x30794f(0x4ca)]['pipe']((0x0,s['map'])(_0x9b65b7=>{const _0x1d555b=_0x30794f;if(_0x9b65b7===_0x45776f)return this[_0x1d555b(0x3aa)][_0x1d555b(0x34e)](_0x9b65b7);}));}[_0x4d465b(0x359)](_0xc2fa91,_0x43e521){const _0x5c5d8b=_0x4d465b;let _0x2edc63=this[_0x5c5d8b(0x3aa)][_0x5c5d8b(0x34e)](_0xc2fa91);_0x2edc63||(_0x2edc63=new oe(),this['_roomMembers']['set'](_0xc2fa91,_0x2edc63),this[_0x5c5d8b(0x4ca)][_0x5c5d8b(0x3fc)](_0xc2fa91)),_0x2edc63[_0x5c5d8b(0x359)](_0x43e521);}[_0x4d465b(0x347)](_0x5f4f3e,_0x216fc9){const _0x48ea9d=_0x4d465b;let _0x12ff7b=this[_0x48ea9d(0x3aa)]['get'](_0x5f4f3e);_0x12ff7b&&_0x12ff7b[_0x48ea9d(0x347)](_0x216fc9);}[_0x4d465b(0x42b)](_0x1b77f0){const _0x509e06=_0x4d465b;return this[_0x509e06(0x3aa)][_0x509e06(0x34e)](_0x1b77f0);}['getMember'](_0x4ceb12,_0x2dff2f){const _0x1c9e69=_0x4d465b;let _0x307b7f=this['_roomMembers'][_0x1c9e69(0x34e)](_0x4ceb12);if(_0x307b7f)return _0x307b7f[_0x1c9e69(0x3be)](_0x2dff2f);}[_0x4d465b(0x1f0)](_0x4eed64){const _0x2f9e7c=_0x4d465b;let _0x26d44d=this['_roomMembers']['get'](_0x4eed64);_0x26d44d&&(_0x26d44d[_0x2f9e7c(0x380)](),this['_roomMembers']['delete'](_0x4eed64));}['dispose'](){const _0x12e8c4=_0x4d465b;this[_0x12e8c4(0x3aa)]['forEach'](_0x3d6e48=>_0x3d6e48['dispose']()),this[_0x12e8c4(0x3aa)][_0x12e8c4(0x1f4)](),this[_0x12e8c4(0x4ca)]['complete']();}};b=y([v(0x0,t[_0x4d465b(0x2af)])],b);var oe=class extends t[_0x4d465b(0x271)]{constructor(..._0x2f9a50){const _0x168fa2=_0x4d465b;super(..._0x2f9a50),g(this,_0x168fa2(0x3d2),new Map()),g(this,_0x168fa2(0x31e),new i['BehaviorSubject'](this['_members'])),g(this,_0x168fa2(0x34b),this[_0x168fa2(0x31e)]['asObservable']());}[_0x4d465b(0x380)](){const _0x4787a0=_0x4d465b;this[_0x4787a0(0x3d2)][_0x4787a0(0x1f4)](),this[_0x4787a0(0x31e)][_0x4787a0(0x3d8)]();}['updateMember'](_0x3e8598){const _0x41f451=_0x4d465b;this['_members']['set'](_0x3e8598[_0x41f451(0x250)],_0x3e8598),this['_emitMembers']();}[_0x4d465b(0x347)](_0x3f327f){const _0xd9c7b0=_0x4d465b;this['_members']['delete'](_0x3f327f),this[_0xd9c7b0(0x249)]();}['getMember'](_0x2b03b2){const _0x3636d6=_0x4d465b;return this[_0x3636d6(0x3d2)][_0x3636d6(0x34e)](_0x2b03b2);}['getAllMembers'](){const _0x330df1=_0x4d465b;return Array[_0x330df1(0x38f)](this[_0x330df1(0x3d2)]['values']());}[_0x4d465b(0x249)](){const _0x19b9ff=_0x4d465b;this[_0x19b9ff(0x31e)][_0x19b9ff(0x3fc)](this[_0x19b9ff(0x3d2)]);}};function se(_0x503234,_0x1f9669){const _0x4618e3=_0x4d465b;if(le(_0x503234))return _0x1f9669;if(_0x1f9669[_0x4618e3(0x1f9)]===e[_0x4618e3(0x4a0)]['SUBMIT_CHANGESET']){let _0x1db3a4=me(_0x503234),_0x363e32=_0x1f9669;return{..._0x363e32,'data':{..._0x363e32['data'],'unitID':_0x503234[_0x4618e3(0x31d)][_0x4618e3(0x4d7)],'unitType':_0x503234[_0x4618e3(0x31d)]['unitType']??_0x363e32['data'][_0x4618e3(0x44d)],'changeset':_0x1db3a4[_0x4618e3(0x2d8)](_0x363e32[_0x4618e3(0x2db)][_0x4618e3(0x1f1)],he(_0x503234))}};}if(_0x1f9669['eventID']===e[_0x4618e3(0x4a0)]['FETCH_MISSING']){let _0x377e6f=_0x1f9669;return{..._0x377e6f,'data':{..._0x377e6f[_0x4618e3(0x2db)],'unitID':_0x503234[_0x4618e3(0x31d)][_0x4618e3(0x4d7)],'unitType':_0x503234[_0x4618e3(0x31d)][_0x4618e3(0x44d)]??_0x377e6f[_0x4618e3(0x2db)][_0x4618e3(0x44d)]}};}return _0x1f9669;}function ce(_0x14b2f9,_0x3cef52){const _0x100f65=_0x4d465b;if(le(_0x14b2f9))return[_0x3cef52];switch(_0x3cef52[_0x100f65(0x1f9)]){case e[_0x100f65(0x4a0)][_0x100f65(0x270)]:return[ue(_0x14b2f9,_0x3cef52)];case e[_0x100f65(0x4a0)][_0x100f65(0x399)]:return[fe(_0x14b2f9,_0x3cef52)];case e[_0x100f65(0x4a0)]['CHANGESET_SHOULD_RETRY']:return[de(_0x14b2f9,_0x3cef52)];default:return[_0x3cef52];}}function le(_0x551486){const _0x5955a4=_0x4d465b;return _0x551486[_0x5955a4(0x31d)][_0x5955a4(0x230)]==null&&_0x551486[_0x5955a4(0x31d)][_0x5955a4(0x4d7)]===_0x551486['localUnitId']&&!_0x551486[_0x5955a4(0x1f1)];}function ue(_0x2d6450,_0x171820){const _0x276074=_0x4d465b;return{..._0x171820,'data':(0x0,e[_0x276074(0x3b2)])(pe(_0x2d6450,(0x0,e[_0x276074(0x3b8)])(_0x171820[_0x276074(0x2db)])))};}function de(_0x353f53,_0x1eb94b){const _0x3ea23d=_0x4d465b;return{..._0x1eb94b,'data':pe(_0x353f53,_0x1eb94b[_0x3ea23d(0x2db)])};}function fe(_0x3ce2c0,_0x58998e){const _0x50d07b=_0x4d465b;let _0x5451d6=_0x58998e[_0x50d07b(0x2db)];return{..._0x58998e,'data':{..._0x5451d6,'changesets':_0x5451d6[_0x50d07b(0x1c0)][_0x50d07b(0x1f2)](_0x52302b=>(0x0,e[_0x50d07b(0x3b2)])(pe(_0x3ce2c0,(0x0,e['parseProtocolChangeset'])(_0x52302b))))}};}function pe(_0x56df0e,_0x1260b6){const _0x7a26c5=_0x4d465b;return me(_0x56df0e)[_0x7a26c5(0x4be)](_0x1260b6,he(_0x56df0e));}function me(_0x5bd388){const _0x150d07=_0x4d465b;if(!_0x5bd388[_0x150d07(0x1f1)])throw Error(_0x150d07(0x267));return _0x5bd388['changeset'];}function he(_0x26e64f){const _0xd6549d=_0x4d465b;return{'localUnitId':_0x26e64f[_0xd6549d(0x44a)],'unitType':_0x26e64f[_0xd6549d(0x44d)],'target':_0x26e64f[_0xd6549d(0x31d)]};}let ge=function(_0x36cf0b){const _0x275f90=_0x4d465b;return _0x36cf0b[_0x36cf0b[_0x275f90(0x3a4)]=0x0]='IDLE',_0x36cf0b[_0x36cf0b[_0x275f90(0x2a7)]=0x1]=_0x275f90(0x2a7),_0x36cf0b[_0x36cf0b[_0x275f90(0x336)]=0x2]='OFFLINE',_0x36cf0b[_0x36cf0b[_0x275f90(0x38d)]=0x3]=_0x275f90(0x38d),_0x36cf0b;}({});const _e={[a['CmdRspCode'][_0x4d465b(0x1d7)]]:'session.join-failed',[a[_0x4d465b(0x413)][_0x4d465b(0x4ce)]]:_0x4d465b(0x33b),[a[_0x4d465b(0x413)][_0x4d465b(0x3c1)]]:'session.room-not-exists',[a[_0x4d465b(0x413)][_0x4d465b(0x2ad)]]:_0x4d465b(0x3b4),[a['CmdRspCode'][_0x4d465b(0x30a)]]:_0x4d465b(0x1f8)};let ve=class extends t[_0x4d465b(0x3b5)]{get['sessionStatus'](){const _0x5c3684=_0x4d465b;return this[_0x5c3684(0x1b5)][_0x5c3684(0x24e)]();}constructor(_0x56f380,_0xb81f5a,_0x5b7cf5,_0x29a62b,_0x179b22,_0x3574e7,_0x1c0c00,_0x331fe7){const _0x3aad06=_0x4d465b;super(),this['_identity']=_0x56f380,this[_0x3aad06(0x280)]=_0x5b7cf5,this[_0x3aad06(0x367)]=_0x29a62b,this['_memberService']=_0x179b22,this[_0x3aad06(0x1d1)]=_0x3574e7,this[_0x3aad06(0x454)]=_0x1c0c00,this[_0x3aad06(0x1aa)]=_0x331fe7,g(this,_0x3aad06(0x1b5),new i['BehaviorSubject'](0x0)),g(this,'sessionStatus$',this[_0x3aad06(0x1b5)][_0x3aad06(0x2f9)]()),g(this,_0x3aad06(0x45c),new i[(_0x3aad06(0x40a))]()),g(this,_0x3aad06(0x3a5),this[_0x3aad06(0x45c)][_0x3aad06(0x2f9)]()),g(this,_0x3aad06(0x28f),void 0x0),g(this,_0x3aad06(0x325),void 0x0),g(this,'_collaborationTimeoutTimer',void 0x0),g(this,'_shouldReportTelemetry',!0x1),g(this,_0x3aad06(0x209),null),this['_shouldReportTelemetry']=!!this[_0x3aad06(0x1aa)],_0xb81f5a[_0x3aad06(0x30c)]((0x0,i[_0x3aad06(0x4a9)])(this[_0x3aad06(0x1ec)]))['subscribe'](_0x22a1ec=>{const _0x1582d0=_0x3aad06;if(_0x22a1ec!==void 0x0){if(this['_socket']=_0x22a1ec,_0x22a1ec)this['_joinRoom'](_0x22a1ec),this['_socketMessageSubscription']=_0x22a1ec[_0x1582d0(0x343)]['subscribe'](_0x4ffba8=>{const _0x42b4ac=_0x1582d0;_0x4ffba8[_0x42b4ac(0x3e4)]===this['_identity']['target'][_0x42b4ac(0x4d7)]&&this[_0x42b4ac(0x4b8)](_0x4ffba8);});else{var _0x5dc366;this['_throwTelemetryCollaborationNewChangeset'](),this[_0x1582d0(0x1b5)][_0x1582d0(0x3fc)](0x2),(_0x5dc366=this[_0x1582d0(0x325)])==null||_0x5dc366['unsubscribe'](),this[_0x1582d0(0x325)]=null;}}});}[_0x4d465b(0x420)](){const _0x3baba5=_0x4d465b;var _0x5c7b64;return((_0x5c7b64=this[_0x3baba5(0x28f)])==null?void 0x0:_0x5c7b64[_0x3baba5(0x250)])??null;}[_0x4d465b(0x380)](){const _0xdabfbd=_0x4d465b;super[_0xdabfbd(0x380)](),this[_0xdabfbd(0x1c9)](),this[_0xdabfbd(0x1ec)][_0xdabfbd(0x3fc)](),this['dispose$'][_0xdabfbd(0x3d8)]();}[_0x4d465b(0x1c9)](){const _0x1be8f2=_0x4d465b;var _0x35777d;this[_0x1be8f2(0x438)](),(_0x35777d=this['_socket'])==null||_0x35777d[_0x1be8f2(0x49f)]({'cmd':a[_0x1be8f2(0x235)]['LEAVE'],'data':{'roomID':this[_0x1be8f2(0x318)][_0x1be8f2(0x31d)]['unitId']}}),this[_0x1be8f2(0x45c)]['complete'](),this[_0x1be8f2(0x1b5)][_0x1be8f2(0x3d8)]();}['_onCombEvent'](_0xc07971){const _0x9b74f1=_0x4d465b;_0xc07971[_0x9b74f1(0x43e)]===a[_0x9b74f1(0x235)]['JOIN']?this[_0x9b74f1(0x1d3)](_0xc07971):_0xc07971[_0x9b74f1(0x43e)]===a[_0x9b74f1(0x235)][_0x9b74f1(0x1d5)]&&this['_onRecvEvent'](_0xc07971);}[_0x4d465b(0x436)](_0x3af722){const _0x3bad07=_0x4d465b;this[_0x3bad07(0x1b5)][_0x3bad07(0x3fc)](0x1),_0x3af722[_0x3bad07(0x49f)]({'cmd':a[_0x3bad07(0x235)]['JOIN'],'routeKey':this['_identity'][_0x3bad07(0x31d)][_0x3bad07(0x4d7)],'routeType':'','data':{'rooms':[{'roomID':this['_identity'][_0x3bad07(0x31d)][_0x3bad07(0x4d7)]}]}});}[_0x4d465b(0x1d3)](_0x457ac6){const _0x4386d0=_0x4d465b;var _0x599033;if(_0x457ac6[_0x4386d0(0x2c8)]in _e){this[_0x4386d0(0x454)][_0x4386d0(0x316)]({'id':_0x4386d0(0x321),'data':_e[_0x457ac6[_0x4386d0(0x2c8)]]}),this[_0x4386d0(0x1b5)][_0x4386d0(0x3fc)](0x2);return;}this['_sessionStatus$']['next'](0x3);let _0x4acb93=(_0x599033=_0x457ac6[_0x4386d0(0x2db)][_0x4386d0(0x3ff)][this[_0x4386d0(0x318)]['target'][_0x4386d0(0x4d7)]])==null?void 0x0:_0x599033[_0x4386d0(0x365)];_0x4acb93&&_0x4acb93[_0x4386d0(0x2ea)](_0xf8d1f0=>this[_0x4386d0(0x251)][_0x4386d0(0x359)](this[_0x4386d0(0x318)]['localUnitId'],_0xf8d1f0));}[_0x4d465b(0x299)](_0x4f4a14){const _0x456dd8=_0x4d465b;try{let _0x120d37=ce(this['_identity'],_0x4f4a14[_0x456dd8(0x2db)]);for(let _0x386ef4 of _0x120d37)switch(_0x386ef4[_0x456dd8(0x1f9)]){case e[_0x456dd8(0x4a0)][_0x456dd8(0x455)]:this['_onUserJoin'](_0x386ef4),this[_0x456dd8(0x45c)][_0x456dd8(0x3fc)](_0x386ef4);break;case e[_0x456dd8(0x4a0)][_0x456dd8(0x2a8)]:this['_onUserLeave'](_0x386ef4),this['_event$']['next'](_0x386ef4);break;case e[_0x456dd8(0x4a0)][_0x456dd8(0x4cc)]:case e['CollaborationEvent'][_0x456dd8(0x328)]:this[_0x456dd8(0x1f5)](),this[_0x456dd8(0x3ea)](),this[_0x456dd8(0x45c)]['next'](_0x386ef4);break;case e['CollaborationEvent'][_0x456dd8(0x39c)]:this['_logService'][_0x456dd8(0x38b)](_0x456dd8(0x1b2)+JSON[_0x456dd8(0x21b)](_0x386ef4)),this[_0x456dd8(0x45c)]['next'](_0x386ef4);break;case e['CollaborationEvent']['COMMENT_UPDATE']:this[_0x456dd8(0x1d1)]['onCommentUpdate'](_0x386ef4[_0x456dd8(0x2db)]),this[_0x456dd8(0x45c)]['next'](_0x386ef4);break;default:this[_0x456dd8(0x45c)][_0x456dd8(0x3fc)](_0x386ef4);}}catch(_0x3fb296){this[_0x456dd8(0x280)][_0x456dd8(0x38b)](_0x3fb296,_0x4f4a14);}}[_0x4d465b(0x483)](_0x4068a0){const _0x1b320d=_0x4d465b;this[_0x1b320d(0x251)]['updateMember'](this['_identity'][_0x1b320d(0x44a)],_0x4068a0[_0x1b320d(0x2db)]);}[_0x4d465b(0x3a2)](_0x24d218){const _0xf55083=_0x4d465b;this[_0xf55083(0x251)][_0xf55083(0x347)](this['_identity'][_0xf55083(0x44a)],_0x24d218[_0xf55083(0x2db)][_0xf55083(0x250)]);}async['send'](_0x5be242,_0x2343ad){const _0x4bb60e=_0x4d465b;if(this[_0x4bb60e(0x4c6)]!==0x3||!this['_socket'])throw Error('[CollaborationSession]:\x20should\x20not\x20send\x20message\x20when\x20the\x20session\x20is\x20offline!');try{let _0x2a5b57=se(this[_0x4bb60e(0x318)],_0x5be242);_0x2a5b57[_0x4bb60e(0x1f9)]===e[_0x4bb60e(0x4a0)][_0x4bb60e(0x1ae)]&&(this['_scheduleCollaborationTimeoutTimer'](),this[_0x4bb60e(0x4c2)](_0x2a5b57)),this[_0x4bb60e(0x28f)][_0x4bb60e(0x49f)]({'cmd':a['CombCmd'][_0x4bb60e(0x1e1)],'routeKey':this[_0x4bb60e(0x318)][_0x4bb60e(0x31d)][_0x4bb60e(0x4d7)],'routeType':'','data':_0x2a5b57});}catch(_0xe4774c){this[_0x4bb60e(0x280)]['error'](_0xe4774c);}}[_0x4d465b(0x1d4)](){const _0x323628=_0x4d465b;this[_0x323628(0x428)]=setTimeout(()=>{const _0x4b2491=_0x323628;this[_0x4b2491(0x428)]=null,this[_0x4b2491(0x454)]['emitEvent']({'id':_0x4b2491(0x20d)});},this['_configService']['getConfig']('HEARTBEAT_TIMEOUT')??0x4e20);}['_clearCollaborationTimeoutTimer'](){const _0x44d575=_0x4d465b;this[_0x44d575(0x428)]&&=(clearTimeout(this['_collaborationTimeoutTimer']),null);}[_0x4d465b(0x4c2)](_0x596ad0){const _0x2631e1=_0x4d465b;if(!this[_0x2631e1(0x3f9)])return;let {data:_0x4dc3ef}=_0x596ad0,{unitID:_0x430d6b,changeset:_0x3b1081}=_0x4dc3ef,{mutations:_0x3d53e6,type:_0x3beeed}=_0x3b1081;this[_0x2631e1(0x209)]={'unitId':_0x430d6b,'type':_0x3beeed,'startTime':performance[_0x2631e1(0x1a3)](),'stopTime':0x0,'duration':0x0,'size':te(_0x3d53e6)};}['_stopTelemetryCollaborationNewChangeset'](){const _0x321028=_0x4d465b;if(this[_0x321028(0x3f9)]){if(!this[_0x321028(0x209)]){this[_0x321028(0x280)][_0x321028(0x38b)](_0x321028(0x322),_0x321028(0x433));return;}this[_0x321028(0x209)][_0x321028(0x222)]=performance[_0x321028(0x1a3)](),this['_telemetryInfo'][_0x321028(0x248)]=this[_0x321028(0x209)][_0x321028(0x222)]-this[_0x321028(0x209)][_0x321028(0x40f)],this['_telemetryService'][_0x321028(0x284)](_0x321028(0x3eb),this[_0x321028(0x209)]),this[_0x321028(0x209)]=null;}}[_0x4d465b(0x438)](){const _0x4819fe=_0x4d465b;this[_0x4819fe(0x209)]=null;}};ve=y([v(0x2,t[_0x4d465b(0x3cd)]),v(0x3,t[_0x4d465b(0x1b6)]),v(0x4,(0x0,t[_0x4d465b(0x296)])(b)),v(0x5,(0x0,t[_0x4d465b(0x296)])(ae)),v(0x6,(0x0,t['Inject'])(_)),v(0x7,(0x0,t[_0x4d465b(0x417)])(o[_0x4d465b(0x1b4)]))],ve);const x=(0x0,t['createIdentifier'])('collaboration-client.local-cache-service');function ye(_0x5dd149){const _0x4de127=_0x4d465b;return _0x4de127(0x3fb)+_0x5dd149;}function be(_0x5260fd){const _0xcb529b=_0x4d465b;let {unitID:_0x2d3578,mutations:_0x59e47f}=_0x5260fd;return{'unitId':_0x2d3578,'subUnitId':_0x59e47f['length']>0x0?_0x59e47f[0x0]['params'][_0xcb529b(0x287)]:null};}let S=class{constructor(_0x31e3cc,_0x5810e8,_0x28c588){const _0x131518=_0x4d465b;this[_0x131518(0x26d)]=_0x31e3cc,this['_transformService']=_0x5810e8,this[_0x131518(0x47d)]=_0x28c588;}['transformSelections'](_0x499d81){const _0x345d1f=_0x4d465b;var _0x1d9ffb,_0x54f75b;let _0x26e3d1=this['_injector'][_0x345d1f(0x34e)](r[_0x345d1f(0x32d)]),{unitId:_0xd8f2a2,subUnitId:_0xf45653}=be(_0x499d81),_0x7d7ac8=_0x26e3d1==null?void 0x0:_0x26e3d1[_0x345d1f(0x31a)](_0xd8f2a2)[_0x345d1f(0x3e6)](),_0x4187c2=(_0x1d9ffb=this['_instanceService']['getUnit'](_0xd8f2a2))==null||(_0x1d9ffb=_0x1d9ffb[_0x345d1f(0x43d)]())==null?void 0x0:_0x1d9ffb[_0x345d1f(0x1af)]();if(_0x7d7ac8[_0x345d1f(0x41f)]===0x0||!_0xd8f2a2||!_0xf45653)return;let _0x4d4515=[{'id':r[_0x345d1f(0x2cb)]['id'],'params':{'unitId':_0xd8f2a2,'subUnitId':_0x4187c2,'selections':t['Tools'][_0x345d1f(0x2ec)](_0x7d7ac8)}}],_0x2b1dce=this['_transformService'][_0x345d1f(0x3fa)](_0x499d81,_0x4d4515);if(!(0x0,e['isTransformMutationsWithChangesetSuccess'])(_0x2b1dce))throw _0x2b1dce['error'];let _0x37e50c=(_0x54f75b=_0x2b1dce['m2Prime'][0x0])==null||(_0x54f75b=_0x54f75b[_0x345d1f(0x256)])==null?void 0x0:_0x54f75b[_0x345d1f(0x2bd)];if(Array[_0x345d1f(0x4c5)](_0x37e50c)&&_0x37e50c[_0x345d1f(0x41f)]){if(_0x37e50c['length']===_0x4d4515[0x0][_0x345d1f(0x256)]['selections'][_0x345d1f(0x41f)]&&_0x37e50c[_0x345d1f(0x27b)]((_0x391c3d,_0x3fe257)=>t[_0x345d1f(0x46b)][_0x345d1f(0x383)](_0x391c3d[_0x345d1f(0x1a4)],_0x4d4515[0x0][_0x345d1f(0x256)][_0x345d1f(0x2bd)][_0x3fe257][_0x345d1f(0x1a4)])))return;this['_injector'][_0x345d1f(0x34e)](t[_0x345d1f(0x2ce)])[_0x345d1f(0x3a9)](r[_0x345d1f(0x2cb)]['id'],{'unitId':_0xd8f2a2,'subUnitId':_0x4187c2,'selections':_0x37e50c});}}};S=y([v(0x0,(0x0,t[_0x4d465b(0x296)])(t[_0x4d465b(0x49b)])),v(0x1,e['ITransformService']),v(0x2,t[_0x4d465b(0x2af)])],S);const C=(0x0,t[_0x4d465b(0x2f8)])(_0x4d465b(0x293));let xe=function(_0x40f4f5){const _0x21875f=_0x4d465b;return _0x40f4f5[_0x40f4f5[_0x21875f(0x204)]=0x0]='NO_OTHER_CLIENTS_EDITING',_0x40f4f5[_0x40f4f5['OTHER_CLIENTS_EDITING']=0x1]='OTHER_CLIENTS_EDITING',_0x40f4f5;}({});function Se(_0x5143c5){const _0x110dba=_0x4d465b;var _0x1d52c4;return!!((_0x1d52c4=_0x5143c5[_0x110dba(0x256)])!=null&&_0x1d52c4[_0x110dba(0x453)]);}const Ce=new Set([r[_0x4d465b(0x4b1)]['id']]),we=new Set([c['AddSlidePageMutation']['id'],c['EnsureSlideMasterPageMutation']['id'],c[_0x4d465b(0x393)]['id'],c[_0x4d465b(0x4d6)]['id']]);function Te(_0x57327c,_0x209d2e=Ce){const _0x53b85e=_0x4d465b;let _0x2bdc08=[];for(let _0x1e331d of _0x57327c){if(_0x209d2e[_0x53b85e(0x396)](_0x1e331d['id'])){if(_0x2bdc08['length']>0x0)break;_0x2bdc08['push'](_0x1e331d);break;}if(Se(_0x1e331d)){if(_0x2bdc08[_0x53b85e(0x41f)]>0x0)break;_0x2bdc08[_0x53b85e(0x41d)](_0x1e331d);break;}_0x2bdc08['push'](_0x1e331d);}return _0x2bdc08;}function w(_0x115d7c,_0x21ca2c,_0x19b522,_0x5ce78b,_0x3ec417){const _0x5b902d=_0x4d465b;let _0x540882=Te(_0x115d7c),_0x56e89d=_0x3ec417[_0x5b902d(0x3d7)](),_0x4f361d=(_0x56e89d==null?void 0x0:_0x56e89d['userID'])??_0x5b902d(0x357),_0x39bb71=(_0x56e89d==null?void 0x0:_0x56e89d[_0x5b902d(0x250)])??_0x5b902d(0x357);return{'changeset':{'unitID':_0x21ca2c,'type':(0x0,e[_0x5b902d(0x4d9)])(_0x19b522[_0x5b902d(0x2cc)](_0x21ca2c)),'baseRev':_0x5ce78b[_0x5b902d(0x1a8)](_0x21ca2c),'revision':0x0,'userID':_0x4f361d,'memberID':_0x39bb71,'mutations':_0x540882},'pendingMutations':_0x115d7c[_0x5b902d(0x297)](_0x540882['length'])};}const Ee=w;function De(_0x776e4e,_0x1e1543,_0x170b7c,_0x16e65c,_0x2ed58b){const _0xd6a7eb=_0x4d465b;let _0x2a8ff3=Te(_0x776e4e,we),_0x3ada08=_0x2ed58b[_0xd6a7eb(0x3d7)](),_0x2a1579=(_0x3ada08==null?void 0x0:_0x3ada08[_0xd6a7eb(0x37e)])??_0xd6a7eb(0x357),_0x5a72da=(_0x3ada08==null?void 0x0:_0x3ada08[_0xd6a7eb(0x250)])??'unknown';return{'changeset':{'unitID':_0x1e1543,'type':(0x0,e[_0xd6a7eb(0x4d9)])(_0x170b7c[_0xd6a7eb(0x2cc)](_0x1e1543)),'baseRev':_0x16e65c['getCurrentRevOfUnit'](_0x1e1543),'revision':0x0,'userID':_0x2a1579,'memberID':_0x5a72da,'mutations':_0x2a8ff3},'pendingMutations':_0x776e4e['slice'](_0x2a8ff3[_0xd6a7eb(0x41f)])};}function Oe(_0x181380,_0xdfbbd2,_0x1145eb,_0x6f29fe,_0x4f4339){const _0xf48e74=_0x4d465b;let _0x1cee1f=_0x181380['reduce']((_0x4d0e7f,_0x484519)=>{const _0x3e3ff2=_0x4feb;let _0x4e6863=_0x4d0e7f[_0x4d0e7f[_0x3e3ff2(0x41f)]-0x1],{id:_0x3781bd}=_0x4e6863??{},{id:_0x46d00a,type:_0xda00f7}=_0x484519,_0x34359c=_0x484519['params'];if(_0x3781bd&&_0x3781bd!==_0x46d00a)throw Error(_0x3e3ff2(0x441)+_0x3781bd+_0x3e3ff2(0x1ee)+_0x46d00a+'.');if(!_0x4e6863)return[{'id':_0x46d00a,'type':_0xda00f7,'params':{'unitId':_0x34359c['unitId'],'textRanges':_0x34359c['textRanges'],'actions':_0x34359c[_0x3e3ff2(0x2d7)]}}];let _0x32e3a2=_0x4e6863[_0x3e3ff2(0x256)];return ke(_0x32e3a2,_0x34359c)?[..._0x4d0e7f['slice'](0x0,-0x1),{..._0x4e6863,'id':_0x46d00a,'type':_0xda00f7,'params':{'unitId':_0x34359c[_0x3e3ff2(0x4d7)],'textRanges':_0x34359c[_0x3e3ff2(0x1e3)],'actions':t[_0x3e3ff2(0x307)][_0x3e3ff2(0x331)](_0x32e3a2['actions'],_0x34359c[_0x3e3ff2(0x2d7)])}}]:[..._0x4d0e7f,{'id':_0x46d00a,'type':_0xda00f7,'params':{'unitId':_0x34359c[_0x3e3ff2(0x4d7)],'textRanges':_0x34359c[_0x3e3ff2(0x1e3)],'actions':_0x34359c[_0x3e3ff2(0x2d7)]}}];},[]),_0x22ff47=_0x4f4339[_0xf48e74(0x3d7)](),_0x1e7355=(_0x22ff47==null?void 0x0:_0x22ff47[_0xf48e74(0x37e)])??_0xf48e74(0x357),_0x27e3e6=(_0x22ff47==null?void 0x0:_0x22ff47[_0xf48e74(0x250)])??_0xf48e74(0x357);return{'changeset':{'unitID':_0xdfbbd2,'type':(0x0,e['mapDocumentTypeToUniverInstanceType'])(_0x1145eb['getUnitType'](_0xdfbbd2)),'baseRev':_0x6f29fe[_0xf48e74(0x1a8)](_0xdfbbd2),'revision':0x0,'userID':_0x1e7355,'memberID':_0x27e3e6,'mutations':_0x1cee1f},'pendingMutations':_0x181380['slice'](_0x181380[_0xf48e74(0x41f)])};}function ke(_0x548524,_0x4d248a){const _0x174ce6=_0x4d465b;return!Ae(_0x548524)&&!Ae(_0x4d248a)&&je(_0x548524[_0x174ce6(0x2d7)],_0x4d248a['actions']);}function Ae(_0x100be1){const _0x7dccb5=_0x4d465b;return _0x100be1[_0x7dccb5(0x1ce)]!==void 0x0;}function je(_0x2451b1,_0x54b3bc){return Me(_0x2451b1)&&Me(_0x54b3bc)&&!Pe(_0x2451b1)&&!Pe(_0x54b3bc)&&!Ne(_0x2451b1)&&!Ne(_0x54b3bc);}function Me(_0x2b9c2b){const _0x3d1808=_0x4d465b;return Fe(_0x2b9c2b)[_0x3d1808(0x2a4)](_0x5c3069=>T(_0x5c3069)&&_0x5c3069['et']===_0x3d1808(0x237));}function Ne(_0x5a669a){const _0xa60af5=_0x4d465b;return Fe(_0x5a669a)[_0xa60af5(0x2a4)](_0x7c2175=>Array[_0xa60af5(0x4c5)](_0x7c2175)||typeof _0x7c2175==_0xa60af5(0x449)||typeof _0x7c2175==_0xa60af5(0x1d2));}function Pe(_0x283ab6){const _0x421b68=_0x4d465b;return Fe(_0x283ab6)[_0x421b68(0x2a4)](_0x4e92d6=>!T(_0x4e92d6)||_0x4e92d6['et']!==_0x421b68(0x237)||!Array[_0x421b68(0x4c5)](_0x4e92d6['e'])?!0x1:_0x4e92d6['e']['some'](_0x29fd6f=>!T(_0x29fd6f)||!T(_0x29fd6f[_0x421b68(0x352)])?!0x1:Object['prototype'][_0x421b68(0x211)][_0x421b68(0x2c3)](_0x29fd6f[_0x421b68(0x352)],'tables')||Object[_0x421b68(0x397)][_0x421b68(0x211)][_0x421b68(0x2c3)](_0x29fd6f[_0x421b68(0x352)],_0x421b68(0x36d))||Object[_0x421b68(0x397)]['hasOwnProperty'][_0x421b68(0x2c3)](_0x29fd6f[_0x421b68(0x352)],_0x421b68(0x404))));}function Fe(_0x142145){const _0x198e63=_0x4d465b;if(!Array[_0x198e63(0x4c5)](_0x142145))return[];let _0x12dbd8=_0x142145[_0x198e63(0x4b7)](_0x198e63(0x352))?_0x142145:_0x142145['find'](_0x443084=>Array[_0x198e63(0x4c5)](_0x443084)&&_0x443084[_0x198e63(0x4b7)]('body'));if(!Array[_0x198e63(0x4c5)](_0x12dbd8))return[];let _0x329b49=_0x12dbd8[_0x198e63(0x3f2)](_0x198e63(0x352));return _0x329b49===-0x1?[]:_0x12dbd8['slice'](_0x329b49+0x1);}function T(_0x2cc431){const _0x1f2987=_0x4d465b;return typeof _0x2cc431=='object'&&!!_0x2cc431&&!Array[_0x1f2987(0x4c5)](_0x2cc431);}function Ie(_0x2bec4b,_0x31c7d7){const _0x265d50=_0x4d465b;let _0x103867=new i[(_0x265d50(0x32f))](0x1);return setTimeout(()=>_0x103867['next'](_0x31c7d7),_0x2bec4b),_0x103867[_0x265d50(0x2f9)]()[_0x265d50(0x30c)]((0x0,i[_0x265d50(0x3d1)])(0x1));}var Le,Re,ze;let Be=function(_0x3b7c3d){const _0x12ce64=_0x4d465b;return _0x3b7c3d[_0x12ce64(0x41e)]=_0x12ce64(0x342),_0x3b7c3d[_0x12ce64(0x2b3)]=_0x12ce64(0x3c4),_0x3b7c3d[_0x12ce64(0x22a)]='pending',_0x3b7c3d[_0x12ce64(0x25b)]=_0x12ce64(0x1fc),_0x3b7c3d[_0x12ce64(0x33e)]='awaiting_with_pending',_0x3b7c3d[_0x12ce64(0x208)]=_0x12ce64(0x368),_0x3b7c3d['CONFLICT']=_0x12ce64(0x3a8),_0x3b7c3d[_0x12ce64(0x336)]='offline',_0x3b7c3d;}({});const Ve=0x4e20,He=0x2bf20;var E=class{constructor(_0x22c41b,_0x53cc3d,_0x126b10,_0x133755,_0x43688b,_0x45520f,_0x270268,_0x5b9fb8,_0xa2c937){const _0x1e0c79=_0x4d465b;this[_0x1e0c79(0x25a)]=_0x22c41b,this[_0x1e0c79(0x487)]=_0x53cc3d,this[_0x1e0c79(0x19d)]=_0x43688b,this[_0x1e0c79(0x384)]=_0x45520f,this[_0x1e0c79(0x2c0)]=_0x270268,this[_0x1e0c79(0x2ff)]=_0x5b9fb8,this[_0x1e0c79(0x31f)]=_0xa2c937,g(this,_0x1e0c79(0x35c),null),g(this,_0x1e0c79(0x231),[]),this[_0x1e0c79(0x35c)]=_0x126b10,this[_0x1e0c79(0x231)]=_0x133755;}[_0x4d465b(0x1fd)](_0x2b99a6){const _0x3efe06=_0x4d465b;let _0x4f1f0b=this[_0x3efe06(0x2ff)][_0x3efe06(0x1a8)](this[_0x3efe06(0x25a)]);return _0x2b99a6[_0x3efe06(0x3dc)]>_0x4f1f0b+0x1?(this['_handler'][_0x3efe06(0x197)]({'from':_0x4f1f0b,'to':_0x2b99a6[_0x3efe06(0x3dc)]-0x1}),!0x0):!0x1;}[_0x4d465b(0x39e)](_0xf1f676){const _0x118b35=_0x4d465b;this['_undoRedoService'][_0x118b35(0x456)](this[_0x118b35(0x25a)],_0xf1f676);}['_transformSelections'](_0x454294){const _0x1241fa=_0x4d465b;var _0x2b1ff3,_0x50b018;(_0x2b1ff3=(_0x50b018=this['_handler'])['onTransformSelections'])==null||_0x2b1ff3[_0x1241fa(0x2c3)](_0x50b018,_0x454294);}['_prepareTransformSelections'](_0xaefce1){var _0x11200d,_0x1515ee;return((_0x11200d=(_0x1515ee=this['_handler'])['onPrepareTransformSelections'])==null?void 0x0:_0x11200d['call'](_0x1515ee,_0xaefce1))??null;}[_0x4d465b(0x373)](_0xd144e3){const _0x4bf8ee=_0x4d465b;var _0x33566f,_0x5614fd;return(_0x33566f=(_0x5614fd=this[_0x4bf8ee(0x19d)])[_0x4bf8ee(0x427)])==null?void 0x0:_0x33566f[_0x4bf8ee(0x2c3)](_0x5614fd,_0xd144e3);}[_0x4d465b(0x4dc)](_0x452684){const _0x3d9a0b=_0x4d465b;var _0x5c9e4f,_0x40a377;return(_0x5c9e4f=(_0x40a377=this['_handler'])[_0x3d9a0b(0x23e)])==null?void 0x0:_0x5c9e4f[_0x3d9a0b(0x2c3)](_0x40a377,_0x452684);}[_0x4d465b(0x2e7)](_0x418126){const _0xe8d5eb=_0x4d465b;var _0x3c13b6,_0x5a4d7e;return((_0x3c13b6=(_0x5a4d7e=this[_0xe8d5eb(0x19d)])['onTransformRemoteChangesetByIMECache'])==null?void 0x0:_0x3c13b6[_0xe8d5eb(0x2c3)](_0x5a4d7e,_0x418126))??_0x418126;}['_transformRemoteChangesetByStateCache'](_0x541206){const _0x1ca74f=_0x4d465b;var _0x44da7f,_0x5c6d39;return((_0x44da7f=(_0x5c6d39=this[_0x1ca74f(0x19d)])['onTransformRemoteChangesetByStateCache'])==null?void 0x0:_0x44da7f['call'](_0x5c6d39,_0x541206))??_0x541206;}['_syncEditingCollabCursor'](_0x35fe23){const _0x59e5a3=_0x4d465b;if(this[_0x59e5a3(0x487)]===t[_0x59e5a3(0x410)][_0x59e5a3(0x24a)]){let {unitID:_0x41aa92,mutations:_0x4107fc,memberID:_0x5ab4f5}=_0x35fe23,_0x598b66=_0x4107fc[_0x59e5a3(0x41f)]>0x0?_0x4107fc[0x0][_0x59e5a3(0x256)][_0x59e5a3(0x1e3)]:[];if(Array[_0x59e5a3(0x4c5)](_0x598b66)&&_0x598b66[_0x59e5a3(0x41f)]>0x0){var _0x2f0c78,_0x329897;(_0x2f0c78=(_0x329897=this[_0x59e5a3(0x19d)])['onSyncEditingCollabCursor'])==null||_0x2f0c78[_0x59e5a3(0x2c3)](_0x329897,{'unitID':_0x41aa92,'memberID':_0x5ab4f5,'textRanges':_0x598b66});}}}[_0x4d465b(0x4d2)](){const _0x43e435=_0x4d465b;var _0x428204;(_0x428204=this[_0x43e435(0x31f)])==null||_0x428204['updateOfflineData'](this[_0x43e435(0x25a)],this[_0x43e435(0x487)],this[_0x43e435(0x35c)],this[_0x43e435(0x231)]);}[_0x4d465b(0x326)](){return this['_revisionService']['getCurrentRevOfUnit'](this['unitID']);}[_0x4d465b(0x28b)](){const _0x3490b7=_0x4d465b;this['_revisionService'][_0x3490b7(0x431)](this[_0x3490b7(0x25a)]);}[_0x4d465b(0x195)](_0x1e4cb3){const _0x510c20=_0x4d465b;let _0x1ac6cc=this['_transformRemoteChangesetByIMECache'](_0x1e4cb3);_0x1ac6cc=this[_0x510c20(0x35b)](_0x1ac6cc);let _0x3d1fe5=this['_prepareTransformSelections'](_0x1ac6cc),_0x1ba274=(0x0,t['sequenceExecute'])(_0x1ac6cc['mutations'],this[_0x510c20(0x384)],{'fromCollab':!0x0});if(!_0x1ba274[_0x510c20(0x2f4)])throw _0x3d1fe5==null||_0x3d1fe5['rollback'](),_0x1ba274[_0x510c20(0x38b)]instanceof Error?_0x1ba274['error']:Error(_0x1ba274[_0x510c20(0x38b)]??_0x510c20(0x38a));_0x3d1fe5==null||_0x3d1fe5['commit'](),this[_0x510c20(0x373)](_0x1ac6cc),this[_0x510c20(0x4dc)](_0x1ac6cc),this[_0x510c20(0x39e)](_0x1e4cb3),this[_0x510c20(0x1c4)](_0x1ac6cc),this[_0x510c20(0x18f)](_0x1ac6cc),this[_0x510c20(0x28b)]();}};let D=class extends E{constructor(_0x663baf,_0x3fc74c,_0x4e2cb2,_0x488b6c,_0x1993a6,_0x45af4b,_0x146d5c,_0x1507e5,_0x2462f6,_0x3b151b){const _0x4b9f18=_0x4d465b;super(_0x663baf,_0x3fc74c,null,[],_0x4e2cb2,_0x146d5c,_0x45af4b,_0x488b6c,_0x3b151b),this[_0x4b9f18(0x26d)]=_0x1993a6,this[_0x4b9f18(0x280)]=_0x1507e5,this[_0x4b9f18(0x2aa)]=_0x2462f6,this[_0x4b9f18(0x43b)]=_0x3b151b,g(this,_0x4b9f18(0x19e),'synced');}[_0x4d465b(0x3bb)](_0x468fc0){const _0x19af08=_0x4d465b;let _0x2a1ea9=this[_0x19af08(0x26d)][_0x19af08(0x403)](O,this[_0x19af08(0x25a)],this[_0x19af08(0x487)],[_0x468fc0],this[_0x19af08(0x19d)]);return _0x2a1ea9[_0x19af08(0x3f6)](),_0x2a1ea9[_0x19af08(0x4d2)](),_0x2a1ea9;}['onRemoteChangeset'](_0x41ed3){const _0x48b713=_0x4d465b;if(this[_0x48b713(0x1fd)](_0x41ed3))return this[_0x48b713(0x26d)][_0x48b713(0x403)](N,this[_0x48b713(0x25a)],this[_0x48b713(0x487)],null,[],null,[_0x41ed3],this['_handler']);try{let _0x5fa4e6=this[_0x48b713(0x2aa)][_0x48b713(0x3fa)](_0x41ed3,[e[_0x48b713(0x450)]]);if((0x0,e[_0x48b713(0x38e)])(_0x5fa4e6)){let {c1Prime:_0x4e8aa5}=_0x5fa4e6;return this[_0x48b713(0x195)](_0x4e8aa5),this;}throw _0x5fa4e6[_0x48b713(0x38b)];}catch(_0x4cb1f5){return this['_logService'][_0x48b713(0x38b)](_0x4cb1f5),this[_0x48b713(0x260)](!0x1);}}[_0x4d465b(0x260)](_0x5e5749){const _0xc8a3ed=_0x4d465b;return this[_0xc8a3ed(0x26d)][_0xc8a3ed(0x403)](j,this['unitID'],this[_0xc8a3ed(0x487)],null,[],this['_handler'],_0x5e5749);}[_0x4d465b(0x3cf)](_0x3ab259){const _0x5e1275=_0x4d465b;if(_0x3ab259[_0x5e1275(0x3dc)]<=this['_getCurrentRevision']())return this;throw Error(_0x5e1275(0x224));}[_0x4d465b(0x462)](){const _0xa4d2ed=_0x4d465b;throw Error(_0xa4d2ed(0x3f3));}['onRemoteRetry'](){return this;}[_0x4d465b(0x434)](){const _0x136967=_0x4d465b;return this[_0x136967(0x26d)][_0x136967(0x403)](M,this['unitID'],this[_0x136967(0x487)],null,[],this[_0x136967(0x19d)]);}[_0x4d465b(0x305)](){return this;}[_0x4d465b(0x27a)](){throw Error('[SyncedState]:\x20invalid\x20calling\x20to\x20`resend`.');}[_0x4d465b(0x1d6)](){const _0x39ee30=_0x4d465b;let _0x5d1c81=this[_0x39ee30(0x2ff)][_0x39ee30(0x1a8)](this[_0x39ee30(0x25a)]);return this['_handler'][_0x39ee30(0x197)]({'from':_0x5d1c81,'to':0x0}),this[_0x39ee30(0x26d)][_0x39ee30(0x403)](N,this[_0x39ee30(0x25a)],this[_0x39ee30(0x487)],null,[],null,[],this[_0x39ee30(0x19d)]);}};D=y([v(0x3,(0x0,t['Inject'])(e['RevisionService'])),v(0x4,(0x0,t[_0x4d465b(0x296)])(t[_0x4d465b(0x49b)])),v(0x5,t[_0x4d465b(0x1e4)]),v(0x6,t[_0x4d465b(0x2ce)]),v(0x7,t[_0x4d465b(0x3cd)]),v(0x8,e[_0x4d465b(0x2bc)]),v(0x9,(0x0,t[_0x4d465b(0x417)])(x))],D);let O=Le=class extends E{constructor(_0x440d83,_0x57308a,_0x410734,_0x41569e,_0x27b23f,_0x4d882b,_0x1d6592,_0x1f3aa3,_0x28d17b,_0x11dd34,_0x29c66a,_0x53bf90,_0x239a4d,_0x2e35b2){const _0x2b091f=_0x4d465b;super(_0x440d83,_0x57308a,null,_0x410734,_0x41569e,_0x28d17b,_0x239a4d,_0x4d882b,_0x2e35b2),this[_0x2b091f(0x26d)]=_0x27b23f,this['_userManagerService']=_0x1d6592,this['_logService']=_0x1f3aa3,this['_configService']=_0x11dd34,this[_0x2b091f(0x2aa)]=_0x29c66a,this[_0x2b091f(0x2dd)]=_0x53bf90,g(this,_0x2b091f(0x19e),_0x2b091f(0x46c)),g(this,_0x2b091f(0x3d0),null),g(this,_0x2b091f(0x478),null);}[_0x4d465b(0x3bb)](_0x323db4){const _0xcf2129=_0x4d465b;return this['_pendingMutations'][_0xcf2129(0x41d)](_0x323db4),this[_0xcf2129(0x4d2)](),this;}[_0x4d465b(0x394)](_0x599a64){const _0x23c92e=_0x4d465b;if(this[_0x23c92e(0x1fd)](_0x599a64))return this['_clearScheduledTask'](),this[_0x23c92e(0x26d)][_0x23c92e(0x403)](N,this['unitID'],this['type'],null,this['_pendingMutations'],null,[_0x599a64],this[_0x23c92e(0x19d)]);try{let _0x34274b=this[_0x23c92e(0x2aa)]['transformMutationsWithChangeset'](_0x599a64,this[_0x23c92e(0x231)]);if((0x0,e[_0x23c92e(0x38e)])(_0x34274b)){let {c1Prime:_0x4cbec4,m2Prime:_0xfa54b}=_0x34274b;this[_0x23c92e(0x195)](_0x4cbec4);let _0x3b0fad=this[_0x23c92e(0x26d)][_0x23c92e(0x403)](Le,this[_0x23c92e(0x25a)],this[_0x23c92e(0x487)],_0xfa54b,this[_0x23c92e(0x19d)]);this[_0x23c92e(0x1c1)]();let _0x546a43=new Date()[_0x23c92e(0x451)](),_0x57bc30=this[_0x23c92e(0x3d0)]?Math['max'](this[_0x23c92e(0x3d0)]-_0x546a43,0x0):this[_0x23c92e(0x39a)]();return _0x3b0fad[_0x23c92e(0x3f6)](_0x57bc30),_0x3b0fad;}throw _0x34274b[_0x23c92e(0x38b)];}catch(_0x1d6e60){return this[_0x23c92e(0x280)]['error'](_0x1d6e60),this[_0x23c92e(0x260)](!0x1);}}[_0x4d465b(0x3cf)](_0x440e39){const _0x40ad4e=_0x4d465b;if(_0x440e39[_0x40ad4e(0x3dc)]<=this['_getCurrentRevision']())return this;throw Error(_0x40ad4e(0x341));}['onRemoteRej'](){const _0x40a06b=_0x4d465b;throw Error(_0x40a06b(0x477));}[_0x4d465b(0x286)](){return this;}[_0x4d465b(0x434)](){const _0x4c7aea=_0x4d465b;return this[_0x4c7aea(0x1c1)](),this[_0x4c7aea(0x26d)][_0x4c7aea(0x403)](M,this[_0x4c7aea(0x25a)],this[_0x4c7aea(0x487)],null,this['_pendingMutations'],this[_0x4c7aea(0x19d)]);}[_0x4d465b(0x305)](){return this;}[_0x4d465b(0x3f6)](_0x491a0f){const _0x442f37=_0x4d465b;let _0x569d5f=_0x491a0f??this[_0x442f37(0x39a)]();this['_scheduleCompleteTimestamp']=new Date()['getTime']()+_0x569d5f,this['_sendingTimer']=setTimeout(()=>{const _0x7259cd=_0x442f37;this[_0x7259cd(0x1c1)]();let _0xdab22a=null;switch(this[_0x7259cd(0x487)]){case t[_0x7259cd(0x410)]['UNIVER_SHEET']:_0xdab22a=w(this[_0x7259cd(0x231)],this[_0x7259cd(0x25a)],this[_0x7259cd(0x2dd)],this[_0x7259cd(0x2ff)],this['_userManagerService']);break;case t[_0x7259cd(0x410)][_0x7259cd(0x24a)]:_0xdab22a=this[_0x7259cd(0x231)][_0x7259cd(0x27b)](_0x46c978=>_0x46c978['id']===n[_0x7259cd(0x43f)]['id'])?Oe(this[_0x7259cd(0x231)],this[_0x7259cd(0x25a)],this['_univerInstanceService'],this[_0x7259cd(0x2ff)],this[_0x7259cd(0x4c4)]):w(this['_pendingMutations'],this[_0x7259cd(0x25a)],this[_0x7259cd(0x2dd)],this[_0x7259cd(0x2ff)],this[_0x7259cd(0x4c4)]);break;case t[_0x7259cd(0x410)]['UNIVER_SLIDE']:_0xdab22a=De(this[_0x7259cd(0x231)],this[_0x7259cd(0x25a)],this[_0x7259cd(0x2dd)],this[_0x7259cd(0x2ff)],this[_0x7259cd(0x4c4)]);break;case t[_0x7259cd(0x410)][_0x7259cd(0x206)]:_0xdab22a=Ee(this[_0x7259cd(0x231)],this[_0x7259cd(0x25a)],this['_univerInstanceService'],this[_0x7259cd(0x2ff)],this['_userManagerService']);break;case t[_0x7259cd(0x410)][_0x7259cd(0x216)]:_0xdab22a=w(this[_0x7259cd(0x231)],this[_0x7259cd(0x25a)],this[_0x7259cd(0x2dd)],this[_0x7259cd(0x2ff)],this[_0x7259cd(0x4c4)]);break;case t[_0x7259cd(0x410)][_0x7259cd(0x376)]:_0xdab22a=w(this[_0x7259cd(0x231)],this[_0x7259cd(0x25a)],this['_univerInstanceService'],this[_0x7259cd(0x2ff)],this['_userManagerService']);break;default:throw Error(_0x7259cd(0x2b8)+this['type']+_0x7259cd(0x3fd));}let {changeset:_0x2b585a,pendingMutations:_0x3b06f8}=_0xdab22a;this[_0x7259cd(0x19d)][_0x7259cd(0x292)](_0x2b585a);let _0x414d2e=_0x3b06f8[_0x7259cd(0x41f)]?this[_0x7259cd(0x26d)]['createInstance'](A,this[_0x7259cd(0x25a)],this['type'],_0x2b585a,_0x3b06f8,this[_0x7259cd(0x19d)],void 0x0):this[_0x7259cd(0x26d)][_0x7259cd(0x403)](k,this[_0x7259cd(0x25a)],this[_0x7259cd(0x487)],_0x2b585a,this[_0x7259cd(0x19d)]);_0x414d2e['_updateLocalCache'](),this[_0x7259cd(0x19d)][_0x7259cd(0x4ad)](this,_0x414d2e);},_0x569d5f);}[_0x4d465b(0x39a)](){const _0x7c6a18=_0x4d465b;let _0x3032f4=this[_0x7c6a18(0x367)]['getConfig'](m);return(_0x3032f4==null?void 0x0:_0x3032f4[_0x7c6a18(0x1b3)])??0x7d0;}[_0x4d465b(0x27a)](){const _0x1a96a9=_0x4d465b;throw Error(_0x1a96a9(0x4de));}['_clearScheduledTask'](){const _0x1491ad=_0x4d465b;this[_0x1491ad(0x478)]!=null&&(clearTimeout(this[_0x1491ad(0x478)]),this['_sendingTimer']=null);}['_onConflict'](_0x2c29dd){const _0x342f42=_0x4d465b;return this[_0x342f42(0x1c1)](),this[_0x342f42(0x26d)]['createInstance'](j,this[_0x342f42(0x25a)],this[_0x342f42(0x487)],null,this[_0x342f42(0x231)],this[_0x342f42(0x19d)],_0x2c29dd);}};O=Le=y([v(0x4,(0x0,t['Inject'])(t[_0x4d465b(0x49b)])),v(0x5,(0x0,t[_0x4d465b(0x296)])(e['RevisionService'])),v(0x6,(0x0,t[_0x4d465b(0x296)])(t[_0x4d465b(0x463)])),v(0x7,t[_0x4d465b(0x3cd)]),v(0x8,t[_0x4d465b(0x2ce)]),v(0x9,t[_0x4d465b(0x1b6)]),v(0xa,e[_0x4d465b(0x2bc)]),v(0xb,t[_0x4d465b(0x2af)]),v(0xc,t['IUndoRedoService']),v(0xd,(0x0,t['Optional'])(x))],O);let k=Re=class extends E{constructor(_0x222d19,_0x5c8c76,_0x519441,_0xc78615,_0x21bf10,_0x1e6e59,_0x3fcc04,_0x1bbbe2,_0x5c1c50,_0x3b95cd,_0x5f4db5){const _0x2f5f9e=_0x4d465b;super(_0x222d19,_0x5c8c76,_0x519441,[],_0xc78615,_0x3fcc04,_0x3b95cd,_0x1e6e59,_0x5f4db5),this[_0x2f5f9e(0x26d)]=_0x21bf10,this['_logService']=_0x1bbbe2,this['_transformService']=_0x5c1c50,g(this,_0x2f5f9e(0x19e),_0x2f5f9e(0x1fc)),g(this,'_resendTimeout',0x0),g(this,_0x2f5f9e(0x42e),0x0),g(this,'_resendTimer',void 0x0),g(this,_0x2f5f9e(0x1ba),void 0x0);}[_0x4d465b(0x3bb)](_0x101421){const _0x4650c2=_0x4d465b;this[_0x4650c2(0x1c1)]();let _0x30d010=this[_0x4650c2(0x26d)]['createInstance'](A,this[_0x4650c2(0x25a)],this['type'],this[_0x4650c2(0x35c)],[_0x101421],this[_0x4650c2(0x19d)],this[_0x4650c2(0x317)]);return _0x30d010['_updateLocalCache'](),_0x30d010;}[_0x4d465b(0x394)](_0x4253b2){const _0x3e4b05=_0x4d465b;if(this['_checkMissing'](_0x4253b2))return this[_0x3e4b05(0x1c1)](),this[_0x3e4b05(0x26d)][_0x3e4b05(0x403)](N,this[_0x3e4b05(0x25a)],this[_0x3e4b05(0x487)],this[_0x3e4b05(0x35c)],[],null,[_0x4253b2],this[_0x3e4b05(0x19d)]);try{let _0x404f72=this[_0x3e4b05(0x2aa)][_0x3e4b05(0x201)]([_0x4253b2],[this['_awaitingChangeset']],!0x1);if((0x0,e[_0x3e4b05(0x2f1)])(_0x404f72)){let {c1Prime:_0x3405f5,c2Prime:_0x3b75e1}=_0x404f72;this[_0x3e4b05(0x195)](_0x3405f5[0x0]),_0x3b75e1[0x0][_0x3e4b05(0x1bc)]=this['_getCurrentRevision'](),this[_0x3e4b05(0x1c1)]();let _0x432c1f=this[_0x3e4b05(0x26d)][_0x3e4b05(0x403)](Re,this['unitID'],this[_0x3e4b05(0x487)],_0x3b75e1[0x0],this[_0x3e4b05(0x19d)]);return _0x432c1f[_0x3e4b05(0x4d2)](),_0x432c1f;}throw _0x404f72[_0x3e4b05(0x38b)];}catch(_0x2796fb){return this[_0x3e4b05(0x280)][_0x3e4b05(0x38b)](_0x2796fb),this[_0x3e4b05(0x260)](!0x1);}}['onRemoteAck'](_0x238f4a){const _0x189083=_0x4d465b;this[_0x189083(0x1c1)]();let _0x245648=this[_0x189083(0x2ff)][_0x189083(0x1a8)](this[_0x189083(0x25a)]);if(_0x238f4a['revision']<=_0x245648)return this;if(this[_0x189083(0x1fd)](_0x238f4a))return this[_0x189083(0x26d)][_0x189083(0x403)](N,this[_0x189083(0x25a)],this['type'],this[_0x189083(0x35c)],[],_0x238f4a[_0x189083(0x3dc)],[],this[_0x189083(0x19d)]);this['_incrementRevisionNumber']();let _0x52b43a=this[_0x189083(0x26d)]['createInstance'](D,this['unitID'],this[_0x189083(0x487)],this[_0x189083(0x19d)]);return _0x52b43a[_0x189083(0x4d2)](),_0x52b43a;}[_0x4d465b(0x462)](_0x340483){const _0x7672ee=_0x4d465b;return this['_onConflict'](!!(_0x340483!=null&&_0x340483[_0x7672ee(0x3f8)]));}[_0x4d465b(0x286)](_0x13affd){const _0x1c8dcf=_0x4d465b;return this[_0x1c8dcf(0x42e)]>He?this[_0x1c8dcf(0x434)]():(this[_0x1c8dcf(0x317)]=Ie(this['_resendTimeout'],{'timeout':this['_resendTimeout'],'reqId':_0x13affd['reqId']}),this['_sender']=this['_resendTimer'][_0x1c8dcf(0x2b1)](({reqId:_0x1464b4,timeout:_0x4bd647})=>{const _0x2983dc=_0x1c8dcf;this[_0x2983dc(0x350)](_0x1464b4,_0x4bd647);}),this);}[_0x4d465b(0x434)](){const _0x4ad3e3=_0x4d465b;return this[_0x4ad3e3(0x1c1)](),this[_0x4ad3e3(0x26d)][_0x4ad3e3(0x403)](M,this[_0x4ad3e3(0x25a)],this['type'],this[_0x4ad3e3(0x35c)],[],this[_0x4ad3e3(0x19d)]);}['toggleOnline'](){return this;}[_0x4d465b(0x27a)](){const _0x817eff=_0x4d465b;this[_0x817eff(0x19d)]['onSendChangeset'](this[_0x817eff(0x35c)]);}[_0x4d465b(0x260)](_0x409552){const _0x39dfd1=_0x4d465b;return this[_0x39dfd1(0x1c1)](),this[_0x39dfd1(0x26d)][_0x39dfd1(0x403)](j,this[_0x39dfd1(0x25a)],this[_0x39dfd1(0x487)],this['_awaitingChangeset'],[],this[_0x39dfd1(0x19d)],_0x409552);}['_resendWithTimeout'](_0x1d560f,_0x50cf35){const _0x4b53a6=_0x4d465b;var _0x45e7da;_0x1d560f===((_0x45e7da=this[_0x4b53a6(0x35c)])==null?void 0x0:_0x45e7da[_0x4b53a6(0x24d)])&&(this[_0x4b53a6(0x27a)](),this[_0x4b53a6(0x42c)]=_0x50cf35===0x0?0x3e8:Math['min'](_0x50cf35*0x2,Ve),this[_0x4b53a6(0x42e)]+=this[_0x4b53a6(0x42c)]);}[_0x4d465b(0x1c1)](){const _0x5c8484=_0x4d465b;var _0x2722d1;(_0x2722d1=this[_0x5c8484(0x1ba)])==null||_0x2722d1['unsubscribe'](),this[_0x5c8484(0x42c)]=0x0,this[_0x5c8484(0x42e)]=0x0;}};k=Re=y([v(0x4,(0x0,t[_0x4d465b(0x296)])(t[_0x4d465b(0x49b)])),v(0x5,(0x0,t['Inject'])(e[_0x4d465b(0x1bd)])),v(0x6,t[_0x4d465b(0x2ce)]),v(0x7,t[_0x4d465b(0x3cd)]),v(0x8,e[_0x4d465b(0x2bc)]),v(0x9,t[_0x4d465b(0x1e4)]),v(0xa,(0x0,t[_0x4d465b(0x417)])(x))],k);let A=ze=class extends E{constructor(_0x334e5e,_0x563075,_0x45377d,_0x110027,_0x1759c2,_0xf8e5ab,_0x4a1790,_0x543c95,_0x246f58,_0x1e92a9,_0xa2f363,_0x48277f,_0x3063c5){const _0x2134c2=_0x4d465b;super(_0x334e5e,_0x563075,_0x45377d,_0x110027,_0x1759c2,_0x246f58,_0x48277f,_0x543c95,_0x3063c5),this[_0x2134c2(0x26d)]=_0x4a1790,this[_0x2134c2(0x280)]=_0x1e92a9,this['_transformService']=_0xa2f363,this[_0x2134c2(0x43b)]=_0x3063c5,g(this,'status',_0x2134c2(0x25c)),g(this,_0x2134c2(0x42c),0x0),g(this,_0x2134c2(0x42e),0x0),g(this,_0x2134c2(0x317),void 0x0),g(this,'_sender',void 0x0),_0xf8e5ab&&(this[_0x2134c2(0x317)]=_0xf8e5ab,this[_0x2134c2(0x1ba)]=this['_resendTimer'][_0x2134c2(0x2b1)](({reqId:_0x27d390,timeout:_0x5d1b07})=>{const _0x385134=_0x2134c2;this[_0x385134(0x350)](_0x27d390,_0x5d1b07);}));}[_0x4d465b(0x3bb)](_0x45e9c8){const _0x53b6e9=_0x4d465b;return this[_0x53b6e9(0x231)]['push'](_0x45e9c8),this;}[_0x4d465b(0x394)](_0x12b168){const _0x37f885=_0x4d465b;if(this[_0x37f885(0x1fd)](_0x12b168))return this['_clearScheduledTask'](),this[_0x37f885(0x26d)][_0x37f885(0x403)](N,this[_0x37f885(0x25a)],this[_0x37f885(0x487)],this[_0x37f885(0x35c)],this[_0x37f885(0x231)],null,[_0x12b168],this[_0x37f885(0x19d)]);try{let _0x4c1a74=this[_0x37f885(0x2aa)][_0x37f885(0x201)]([_0x12b168],[this[_0x37f885(0x35c)]],!0x1);if((0x0,e[_0x37f885(0x2f1)])(_0x4c1a74)){let {c1Prime:_0x196668,c2Prime:_0x4d1af9}=_0x4c1a74,_0x3a4bd2=this['_transformService'][_0x37f885(0x3fa)](_0x196668[0x0],this[_0x37f885(0x231)]);if((0x0,e[_0x37f885(0x38e)])(_0x3a4bd2)){let {c1Prime:_0x295e0d,m2Prime:_0x314c58}=_0x3a4bd2;return this[_0x37f885(0x195)](_0x295e0d),_0x4d1af9[0x0]['baseRev']=this[_0x37f885(0x326)](),this[_0x37f885(0x1c1)](),this[_0x37f885(0x26d)][_0x37f885(0x403)](ze,this[_0x37f885(0x25a)],this[_0x37f885(0x487)],_0x4d1af9[0x0],_0x314c58,this[_0x37f885(0x19d)],void 0x0);}throw _0x3a4bd2['error'];}throw _0x4c1a74[_0x37f885(0x38b)];}catch(_0x3148d2){return this[_0x37f885(0x280)][_0x37f885(0x38b)](_0x3148d2),this[_0x37f885(0x260)](!0x1);}}[_0x4d465b(0x3cf)](_0x6f8a10){const _0x424f1e=_0x4d465b;this[_0x424f1e(0x1c1)]();let _0x4d7549=this[_0x424f1e(0x326)]();if(_0x6f8a10[_0x424f1e(0x3dc)]<=_0x4d7549)return this;if(this[_0x424f1e(0x1fd)](_0x6f8a10))return this['_injector'][_0x424f1e(0x403)](N,this['unitID'],this['type'],this[_0x424f1e(0x35c)],this[_0x424f1e(0x231)],_0x6f8a10[_0x424f1e(0x3dc)],[],this[_0x424f1e(0x19d)]);this[_0x424f1e(0x28b)]();let _0x50d360=this['_injector'][_0x424f1e(0x403)](O,this[_0x424f1e(0x25a)],this[_0x424f1e(0x487)],this[_0x424f1e(0x231)],this['_handler']);return _0x50d360[_0x424f1e(0x3f6)](),_0x50d360[_0x424f1e(0x4d2)](),_0x50d360;}[_0x4d465b(0x462)](_0xd75ef6){const _0x1ef617=_0x4d465b;return this[_0x1ef617(0x260)](!!(_0xd75ef6!=null&&_0xd75ef6[_0x1ef617(0x3f8)]));}['onRemoteRetry'](_0x3d967c){const _0x5b0c80=_0x4d465b;return this[_0x5b0c80(0x42e)]>He?this[_0x5b0c80(0x434)]():(this[_0x5b0c80(0x317)]=Ie(this[_0x5b0c80(0x42c)],{'timeout':this[_0x5b0c80(0x42c)],'reqId':_0x3d967c['reqId']}),this['_sender']=this[_0x5b0c80(0x317)][_0x5b0c80(0x2b1)](({reqId:_0x15642e,timeout:_0x47ef88})=>{const _0x4f4c2a=_0x5b0c80;this[_0x4f4c2a(0x350)](_0x15642e,_0x47ef88);}),this);}[_0x4d465b(0x434)](){const _0x54d129=_0x4d465b;return this[_0x54d129(0x1c1)](),this[_0x54d129(0x26d)][_0x54d129(0x403)](M,this['unitID'],this[_0x54d129(0x487)],this[_0x54d129(0x35c)],this[_0x54d129(0x231)],this['_handler']);}[_0x4d465b(0x305)](){return this;}[_0x4d465b(0x27a)](){const _0x519727=_0x4d465b;this['_handler'][_0x519727(0x292)](this[_0x519727(0x35c)]);}[_0x4d465b(0x260)](_0x37284b){const _0x566f0e=_0x4d465b;return this[_0x566f0e(0x1c1)](),this[_0x566f0e(0x26d)][_0x566f0e(0x403)](j,this['unitID'],this['type'],null,this[_0x566f0e(0x231)],this[_0x566f0e(0x19d)],_0x37284b);}[_0x4d465b(0x350)](_0x1deb37,_0x7b4cb7){const _0x3c59db=_0x4d465b;var _0x58f399;_0x1deb37===((_0x58f399=this['_awaitingChangeset'])==null?void 0x0:_0x58f399[_0x3c59db(0x24d)])&&(this[_0x3c59db(0x27a)](),this[_0x3c59db(0x42c)]=_0x7b4cb7===0x0?0x3e8:Math[_0x3c59db(0x308)](_0x7b4cb7*0x2,Ve),this[_0x3c59db(0x42e)]+=this[_0x3c59db(0x42c)]);}[_0x4d465b(0x1c1)](){const _0xa35ea7=_0x4d465b;var _0x3a6b3f;(_0x3a6b3f=this[_0xa35ea7(0x1ba)])==null||_0x3a6b3f[_0xa35ea7(0x4b2)](),this[_0xa35ea7(0x42c)]=0x0,this[_0xa35ea7(0x42e)]=0x0;}};A=ze=y([v(0x6,(0x0,t[_0x4d465b(0x296)])(t[_0x4d465b(0x49b)])),v(0x7,(0x0,t[_0x4d465b(0x296)])(e[_0x4d465b(0x1bd)])),v(0x8,t[_0x4d465b(0x2ce)]),v(0x9,t[_0x4d465b(0x3cd)]),v(0xa,e['ITransformService']),v(0xb,t[_0x4d465b(0x1e4)]),v(0xc,(0x0,t['Optional'])(x))],A);let j=class extends E{constructor(_0x2dcd97,_0x5b2ee8,_0x453873,_0x368886,_0x3e65d1,_0x1204fc=!0x1,_0x33e4bd,_0x31f8f1,_0x82e43a,_0x4bacec,_0x1ab782,_0x6f6de4,_0x55a51c){const _0x564fcc=_0x4d465b;super(_0x2dcd97,_0x5b2ee8,_0x453873,_0x368886,_0x3e65d1,_0x31f8f1,_0x82e43a,_0x4bacec,_0x55a51c),this[_0x564fcc(0x381)]=_0x1204fc,this[_0x564fcc(0x372)]=_0x33e4bd,this['_localeService']=_0x1ab782,this[_0x564fcc(0x454)]=_0x6f6de4,this[_0x564fcc(0x43b)]=_0x55a51c,g(this,'status',_0x564fcc(0x3a8)),this[_0x564fcc(0x468)](),this['_clearLocalCache'](),this[_0x564fcc(0x3f1)]();}['appendMutation'](){return this;}[_0x4d465b(0x394)](){return this;}['onRemoteAck'](){return this;}[_0x4d465b(0x462)](){return this;}[_0x4d465b(0x286)](){return this;}[_0x4d465b(0x434)](){return this;}[_0x4d465b(0x305)](){return this;}[_0x4d465b(0x27a)](){const _0x304f97=_0x4d465b;throw Error(_0x304f97(0x2ba));}[_0x4d465b(0x212)](){const _0x5b8443=_0x4d465b;var _0x4705ee,_0x4e822e,_0x5e146a;(_0x4705ee=this[_0x5b8443(0x31f)])==null||(_0x4e822e=_0x4705ee[_0x5b8443(0x333)])==null||(_0x4e822e=_0x4e822e[_0x5b8443(0x2c3)](_0x4705ee,this[_0x5b8443(0x25a)],'conflict'))==null||_0x4e822e['catch'](()=>void 0x0),(_0x5e146a=this[_0x5b8443(0x31f)])==null||_0x5e146a[_0x5b8443(0x21e)](this[_0x5b8443(0x25a)],this[_0x5b8443(0x487)],null,[]);}[_0x4d465b(0x468)](){const _0x279fff=_0x4d465b;this[_0x279fff(0x381)]?this['_collaborationUIEventService'][_0x279fff(0x316)]({'id':_0x279fff(0x25e)}):this[_0x279fff(0x454)][_0x279fff(0x316)]({'id':'CONFLICT'});}[_0x4d465b(0x3f1)](){const _0x333520=_0x4d465b;this[_0x333520(0x372)][_0x333520(0x19b)](new r[(_0x333520(0x2df))](this[_0x333520(0x25a)])['id'],!0x1);}};j=y([v(0x6,(0x0,t['Inject'])(t[_0x4d465b(0x42f)])),v(0x7,t['ICommandService']),v(0x8,t[_0x4d465b(0x1e4)]),v(0x9,(0x0,t[_0x4d465b(0x296)])(e[_0x4d465b(0x1bd)])),v(0xa,(0x0,t[_0x4d465b(0x296)])(t[_0x4d465b(0x327)])),v(0xb,(0x0,t[_0x4d465b(0x296)])(_)),v(0xc,(0x0,t[_0x4d465b(0x417)])(x))],j);let M=class extends E{constructor(_0x3f1bdb,_0x10de9d,_0x57ad12,_0x3195b2,_0x3b55ce,_0x37094f,_0x1646be,_0x2fbfb2,_0x517cb3,_0x15b175){const _0x2ef1a7=_0x4d465b;super(_0x3f1bdb,_0x10de9d,_0x57ad12,_0x3195b2,_0x3b55ce,_0x2fbfb2,_0x517cb3,_0x1646be,_0x15b175),this[_0x2ef1a7(0x26d)]=_0x37094f,g(this,'status',_0x2ef1a7(0x37c));}[_0x4d465b(0x3bb)](_0x41f638){const _0x4583de=_0x4d465b;return this[_0x4583de(0x231)][_0x4583de(0x41d)](_0x41f638),this[_0x4583de(0x4d2)](),this;}[_0x4d465b(0x394)](_0x3a0753){const _0x171a61=_0x4d465b;throw Error(_0x171a61(0x3e2));}['onRemoteAck'](){const _0x52189c=_0x4d465b;throw Error(_0x52189c(0x2da));}[_0x4d465b(0x462)](){const _0x4a9322=_0x4d465b;throw Error(_0x4a9322(0x472));}[_0x4d465b(0x286)](){return this;}[_0x4d465b(0x434)](){return this;}[_0x4d465b(0x305)](){const _0x180730=_0x4d465b;let {_injector:_0x4a91b2,_pendingMutations:_0x2f9da3,_awaitingChangeset:_0x3e36c1,unitID:_0xb0f470,_handler:_0x19a063,type:_0x2a6d97}=this,_0x280f6e=Ue(_0x4a91b2,_0xb0f470,_0x2a6d97,_0x3e36c1,_0x2f9da3,_0x19a063);return _0x280f6e instanceof O?_0x280f6e[_0x180730(0x3f6)]():(_0x280f6e instanceof A||_0x280f6e instanceof k)&&_0x280f6e[_0x180730(0x27a)](),_0x280f6e;}[_0x4d465b(0x27a)](){const _0x3d386b=_0x4d465b;throw Error(_0x3d386b(0x20c));}};M=y([v(0x5,(0x0,t[_0x4d465b(0x296)])(t[_0x4d465b(0x49b)])),v(0x6,(0x0,t[_0x4d465b(0x296)])(e['RevisionService'])),v(0x7,t[_0x4d465b(0x2ce)]),v(0x8,t['IUndoRedoService']),v(0x9,(0x0,t[_0x4d465b(0x417)])(x))],M);let N=class extends E{constructor(_0x19a6a5,_0x370bae,_0x2a07dd,_0x52fccc,_0x3801b4,_0x17a409,_0x46b098,_0xf4c44e,_0x346249,_0x2f2abe,_0x2b597c,_0x19b72b,_0x27f324,_0x22fe4b){const _0x43cbdb=_0x4d465b;super(_0x19a6a5,_0x370bae,_0x2a07dd,_0x52fccc,_0x46b098,_0x2b597c,_0x19b72b,_0x346249,_0x22fe4b),this[_0x43cbdb(0x334)]=_0x3801b4,this[_0x43cbdb(0x1c7)]=_0x17a409,this[_0x43cbdb(0x26d)]=_0xf4c44e,this[_0x43cbdb(0x280)]=_0x2f2abe,this[_0x43cbdb(0x2aa)]=_0x27f324,this[_0x43cbdb(0x43b)]=_0x22fe4b,g(this,_0x43cbdb(0x19e),_0x43cbdb(0x368));}[_0x4d465b(0x2b0)](_0x51cb8d){const _0x33c0b9=_0x4d465b;try{if(this['_handleRemoteChangesets'](_0x51cb8d)[_0x33c0b9(0x1f6)])throw Error(_0x33c0b9(0x2a2));if(this[_0x33c0b9(0x3c6)]([...this['_queuedRemoteChangesets']][_0x33c0b9(0x479)]((_0x1d6a03,_0x1ae851)=>_0x1d6a03[_0x33c0b9(0x3dc)]-_0x1ae851['revision']))[_0x33c0b9(0x1f6)])return this['_queuedRemoteChangesets']=[],this[_0x33c0b9(0x4d2)](),this['_handler'][_0x33c0b9(0x197)]({'from':this['_getCurrentRevision'](),'to':0x0}),this;let _0x2257cd=this[_0x33c0b9(0x35c)],_0x3df1b0=this[_0x33c0b9(0x231)],_0xbb8ca3;if(_0x2257cd&&_0x3df1b0[_0x33c0b9(0x41f)]!==0x0)_0xbb8ca3=this[_0x33c0b9(0x26d)][_0x33c0b9(0x403)](A,this['unitID'],this[_0x33c0b9(0x487)],_0x2257cd,_0x3df1b0,this['_handler'],void 0x0);else{if(_0x2257cd&&_0x3df1b0[_0x33c0b9(0x41f)]===0x0)_0x2257cd[_0x33c0b9(0x1bc)]=this[_0x33c0b9(0x326)](),_0xbb8ca3=this[_0x33c0b9(0x26d)][_0x33c0b9(0x403)](k,this[_0x33c0b9(0x25a)],this['type'],_0x2257cd,this['_handler']);else{if(_0x3df1b0['length']!==0x0){let _0x38e45b=this[_0x33c0b9(0x26d)]['createInstance'](O,this[_0x33c0b9(0x25a)],this[_0x33c0b9(0x487)],_0x3df1b0,this[_0x33c0b9(0x19d)]);_0x38e45b[_0x33c0b9(0x3f6)](),_0xbb8ca3=_0x38e45b;}else _0xbb8ca3=this[_0x33c0b9(0x26d)][_0x33c0b9(0x403)](D,this[_0x33c0b9(0x25a)],this['type'],this[_0x33c0b9(0x19d)]);}}return _0xbb8ca3['_updateLocalCache'](),_0xbb8ca3;}catch(_0x367797){return this[_0x33c0b9(0x280)][_0x33c0b9(0x38b)](_0x33c0b9(0x213),'failed\x20to\x20apply\x20missed\x20changesets!',_0x367797),this[_0x33c0b9(0x26d)][_0x33c0b9(0x403)](j,this['unitID'],this[_0x33c0b9(0x487)],this[_0x33c0b9(0x35c)],this['_pendingMutations'],this[_0x33c0b9(0x19d)],!0x1);}}[_0x4d465b(0x3c6)](_0x4ebbf5){const _0x48d673=_0x4d465b;this[_0x48d673(0x31b)]();for(let _0x2e28af=0x0;_0x2e28af<_0x4ebbf5['length'];_0x2e28af++){let _0x393f60=_0x4ebbf5[_0x2e28af],_0x250536=this[_0x48d673(0x326)]();if(!(_0x393f60[_0x48d673(0x3dc)]<=_0x250536)){if(_0x393f60[_0x48d673(0x3dc)]>_0x250536+0x1)return{'missingChangesets':!0x0};if(this['_isEchoedAwaitingChangeset'](_0x393f60)){this[_0x48d673(0x283)]();continue;}this[_0x48d673(0x337)](_0x393f60),this['_acknowledgeAwaitingIfReady']();}}return{'missingChangesets':!0x1};}['_transformAndApplyRemoteChangeset'](_0x374a95){const _0x2231cd=_0x4d465b;let _0x195453=_0x374a95,_0x2c1e5e=this[_0x2231cd(0x35c)];if(_0x2c1e5e){let _0x5b7fb8=this[_0x2231cd(0x2aa)][_0x2231cd(0x201)]([_0x374a95],[_0x2c1e5e],!0x1);if(!(0x0,e[_0x2231cd(0x2f1)])(_0x5b7fb8))throw _0x5b7fb8['error'];_0x195453=_0x5b7fb8[_0x2231cd(0x482)][0x0],_0x2c1e5e=_0x5b7fb8[_0x2231cd(0x371)][0x0];}let _0x31f14e=this[_0x2231cd(0x231)];if(_0x31f14e[_0x2231cd(0x41f)]){let _0x19f462=this[_0x2231cd(0x2aa)]['transformMutationsWithChangeset'](_0x195453,_0x31f14e);if(!(0x0,e['isTransformMutationsWithChangesetSuccess'])(_0x19f462))throw _0x19f462[_0x2231cd(0x38b)];_0x195453=_0x19f462[_0x2231cd(0x482)],_0x31f14e=_0x19f462[_0x2231cd(0x37d)];}this[_0x2231cd(0x195)](_0x195453),_0x2c1e5e&&(_0x2c1e5e[_0x2231cd(0x1bc)]=this[_0x2231cd(0x326)]()),this[_0x2231cd(0x35c)]=_0x2c1e5e,this['_pendingMutations']=_0x31f14e;}[_0x4d465b(0x31b)](){const _0x46f3a3=_0x4d465b;if(!this[_0x46f3a3(0x35c)]||this[_0x46f3a3(0x334)]==null)return;let _0x471d64=this[_0x46f3a3(0x326)]();if(this[_0x46f3a3(0x334)]<=_0x471d64)throw Error('[FetchingMissState]:\x20received\x20stale\x20ack\x20revision:\x20'+this[_0x46f3a3(0x334)]+'.');this['_acknowledgedAwaitingRevision']===_0x471d64+0x1&&this['_acknowledgeAwaiting']();}['_acknowledgeAwaiting'](){const _0xac2a09=_0x4d465b;this[_0xac2a09(0x28b)](),this[_0xac2a09(0x35c)]=null,this[_0xac2a09(0x334)]=null;}[_0x4d465b(0x210)](_0x33f855){const _0x40a79f=_0x4d465b;let _0x3898ce=this[_0x40a79f(0x35c)];return!_0x3898ce||!_0x3898ce['sid']||_0x3898ce[_0x40a79f(0x24d)]===null||_0x3898ce[_0x40a79f(0x24d)]===void 0x0?!0x1:_0x33f855[_0x40a79f(0x25a)]===_0x3898ce['unitID']&&_0x33f855['sid']===_0x3898ce[_0x40a79f(0x22e)]&&_0x33f855[_0x40a79f(0x24d)]===_0x3898ce['reqId'];}[_0x4d465b(0x27a)](){throw Error('[FetchingMissState]:\x20invalid\x20calling\x20to\x20`resend`.');}[_0x4d465b(0x3bb)](_0x28f5dc){const _0x4682a0=_0x4d465b;return this[_0x4682a0(0x231)][_0x4682a0(0x41d)](_0x28f5dc),this;}[_0x4d465b(0x394)](_0x516d2d){const _0x11edb5=_0x4d465b;return this['_queuedRemoteChangesets'][_0x11edb5(0x41d)](_0x516d2d),this;}[_0x4d465b(0x3cf)](_0x100528){const _0xf49797=_0x4d465b;if(this['_awaitingChangeset']){let _0x59a6c2=this[_0xf49797(0x326)]();return _0x100528[_0xf49797(0x3dc)]<=_0x59a6c2||(_0x59a6c2+0x1===_0x100528[_0xf49797(0x3dc)]?(this[_0xf49797(0x28b)](),this['_awaitingChangeset']=null,this[_0xf49797(0x334)]=null):this[_0xf49797(0x334)]=_0x100528[_0xf49797(0x3dc)]),this;}if(_0x100528[_0xf49797(0x3dc)]<=this['_getCurrentRevision']())return this;throw Error(_0xf49797(0x32a));}[_0x4d465b(0x462)](_0x3a2452){const _0x559947=_0x4d465b;return this[_0x559947(0x260)](!!(_0x3a2452!=null&&_0x3a2452[_0x559947(0x3f8)]));}[_0x4d465b(0x286)](){return this;}[_0x4d465b(0x434)](){const _0x4f32b9=_0x4d465b;return this[_0x4f32b9(0x26d)][_0x4f32b9(0x403)](M,this[_0x4f32b9(0x25a)],this[_0x4f32b9(0x487)],this[_0x4f32b9(0x35c)],this[_0x4f32b9(0x231)],this[_0x4f32b9(0x19d)]);}[_0x4d465b(0x305)](){return this;}['_onConflict'](_0x4456ab){const _0x65a91e=_0x4d465b;return this[_0x65a91e(0x26d)][_0x65a91e(0x403)](j,this['unitID'],this['type'],this['_awaitingChangeset'],this[_0x65a91e(0x231)],this[_0x65a91e(0x19d)],_0x4456ab);}};N=y([v(0x7,(0x0,t[_0x4d465b(0x296)])(t[_0x4d465b(0x49b)])),v(0x8,(0x0,t[_0x4d465b(0x296)])(e[_0x4d465b(0x1bd)])),v(0x9,t[_0x4d465b(0x3cd)]),v(0xa,t[_0x4d465b(0x2ce)]),v(0xb,t[_0x4d465b(0x1e4)]),v(0xc,e[_0x4d465b(0x2bc)]),v(0xd,(0x0,t[_0x4d465b(0x417)])(x))],N);function Ue(_0x3b3519,_0x4ddb78,_0x3a8b0d,_0x2ee8b9,_0x56552c,_0x4763ea){const _0x1f1be5=_0x4d465b;return _0x2ee8b9&&_0x56552c['length']?_0x3b3519[_0x1f1be5(0x403)](A,_0x4ddb78,_0x3a8b0d,_0x2ee8b9,_0x56552c,_0x4763ea,void 0x0):_0x2ee8b9?_0x3b3519[_0x1f1be5(0x403)](k,_0x4ddb78,_0x3a8b0d,_0x2ee8b9,_0x4763ea):_0x56552c[_0x1f1be5(0x41f)]?_0x3b3519[_0x1f1be5(0x403)](O,_0x4ddb78,_0x3a8b0d,_0x56552c,_0x4763ea):_0x3b3519[_0x1f1be5(0x403)](D,_0x4ddb78,_0x3a8b0d,_0x4763ea);}let P=class extends t[_0x4d465b(0x3b5)]{get['state'](){const _0x13b9f0=_0x4d465b;return this[_0x13b9f0(0x288)];}constructor(_0xc5107e,_0x440fc9,_0x1417cd,_0x5d34cc,_0x3c0b90,_0xdedfae,_0x4a8995,_0x22a3d1,_0x496e8d,_0x4f646c,_0xe06db7,_0x17e002,_0x549f32,_0x26e780){const _0x1917ba=_0x4d465b;super(),this[_0x1917ba(0x25a)]=_0xc5107e,this[_0x1917ba(0x2ef)]=_0x440fc9,this['_type']=_0x1417cd,this[_0x1917ba(0x26d)]=_0x5d34cc,this[_0x1917ba(0x1ea)]=_0x3c0b90,this[_0x1917ba(0x22f)]=_0xdedfae,this[_0x1917ba(0x2ff)]=_0x4a8995,this[_0x1917ba(0x279)]=_0x22a3d1,this['_univerInstanceService']=_0x496e8d,this[_0x1917ba(0x280)]=_0x4f646c,this[_0x1917ba(0x384)]=_0xe06db7,this[_0x1917ba(0x372)]=_0x17e002,this['_singleActiveUnitService']=_0x549f32,this['_localCacheService']=_0x26e780,g(this,_0x1917ba(0x203),new i[(_0x1917ba(0x4bf))](null)),g(this,_0x1917ba(0x37a),this[_0x1917ba(0x203)][_0x1917ba(0x2f9)]()),g(this,_0x1917ba(0x288),void 0x0),g(this,_0x1917ba(0x26f),!0x1),g(this,_0x1917ba(0x24f),''),g(this,_0x1917ba(0x3c9),0x0),g(this,'status$',this['state$'][_0x1917ba(0x30c)]((0x0,i[_0x1917ba(0x1f2)])(_0x4aecdf=>_0x4aecdf?_0x4aecdf['status']:_0x1917ba(0x37c)),(0x0,i[_0x1917ba(0x499)])({'bufferSize':0x1,'refCount':!0x0}))),g(this,_0x1917ba(0x3bf),!0x1),g(this,'_remoteChangesetQueue',[]);}async[_0x4d465b(0x1ac)](){const _0x4d9152=_0x4d465b;if(this[_0x4d9152(0x448)])throw Error(_0x4d9152(0x295));await this[_0x4d9152(0x3bd)]();}[_0x4d465b(0x4a3)](){const _0xff9e92=_0x4d465b;return this[_0xff9e92(0x26f)]=!0x0,(0x0,t[_0xff9e92(0x27f)])(()=>{const _0x1923a4=_0xff9e92;this[_0x1923a4(0x26f)]=!0x1,this[_0x1923a4(0x39b)]();});}[_0x4d465b(0x36b)](_0x41ab96){const _0x5563cb=_0x4d465b;this[_0x5563cb(0x48b)](_0x41ab96);}['_updateState'](_0x349f5a){const _0x9d0594=_0x4d465b;this['_state']=_0x349f5a,this[_0x9d0594(0x203)]['next'](_0x349f5a);}async[_0x4d465b(0x3bd)](){const _0x553385=_0x4d465b;if(this[_0x553385(0x1d8)](await this[_0x553385(0x236)]()),this[_0x553385(0x29d)]){var _0x1203b0;(_0x1203b0=this['_singleActiveUnitService'])==null||_0x1203b0['editingUnit'](this['unitID']),this[_0x553385(0x43a)](this[_0x553385(0x29d)][_0x553385(0x200)](this[_0x553385(0x25a)])[_0x553385(0x2b1)](_0x47ae36=>{const _0x2ca40b=_0x553385;this[_0x2ca40b(0x280)]['debug'](_0x2ca40b(0x274),'editing\x20status\x20changed\x20to',_0x47ae36),_0x47ae36===0x1?(this[_0x2ca40b(0x279)][_0x2ca40b(0x316)]({'id':_0x2ca40b(0x332)}),this[_0x2ca40b(0x372)][_0x2ca40b(0x19b)](new r[(_0x2ca40b(0x2df))](this[_0x2ca40b(0x25a)])['id'],!0x1),this[_0x2ca40b(0x372)][_0x2ca40b(0x198)](!0x1)):(this[_0x2ca40b(0x372)]['updatePermissionPoint'](new r[(_0x2ca40b(0x2df))](this[_0x2ca40b(0x25a)])['id'],!0x0),this[_0x2ca40b(0x372)]['setShowComponents'](!0x0));}));}let _0x488455=!0x1;return this[_0x553385(0x43a)](this['session'][_0x553385(0x2e1)]['subscribe'](_0x2d69a3=>{const _0xf00d95=_0x553385;_0x2d69a3===0x3?this[_0xf00d95(0x4bc)](_0x488455):_0x2d69a3===0x2&&(_0x488455=!0x0,this[_0xf00d95(0x47f)]());})),this[_0x553385(0x43a)](this[_0x553385(0x2ef)][_0x553385(0x3a5)]['subscribe'](_0x2b4b0c=>{const _0x16073d=_0x553385;try{switch(_0x2b4b0c[_0x16073d(0x1f9)]){case e[_0x16073d(0x4a0)][_0x16073d(0x270)]:this[_0x16073d(0x281)]((0x0,e[_0x16073d(0x3b8)])(_0x2b4b0c[_0x16073d(0x2db)]));break;case e[_0x16073d(0x4a0)]['CHANGESET_ACK']:this[_0x16073d(0x48e)](_0x2b4b0c[_0x16073d(0x2db)]);break;case e['CollaborationEvent'][_0x16073d(0x2de)]:this[_0x16073d(0x3dd)]();break;case e[_0x16073d(0x4a0)]['CHANGESET_SHOULD_RETRY']:this[_0x16073d(0x312)](_0x2b4b0c['data']);break;case e[_0x16073d(0x4a0)][_0x16073d(0x399)]:this['_onFetchMissResult'](_0x2b4b0c[_0x16073d(0x2db)]['changesets']['map'](_0x159e6c=>(0x0,e[_0x16073d(0x3b8)])(_0x159e6c)));break;case e['CollaborationEvent'][_0x16073d(0x369)]:this[_0x16073d(0x3dd)]({'isPermissionRej':!0x0});break;case e[_0x16073d(0x4a0)][_0x16073d(0x382)]:break;}}catch(_0x20c8f1){throw console[_0x16073d(0x38b)](_0x16073d(0x4b6),_0x20c8f1),_0x20c8f1;}})),this[_0x553385(0x288)];}[_0x4d465b(0x1c5)](){this['_transitionLocked']=!0x1;}['_lockTransition'](){const _0x3f0800=_0x4d465b;if(this['_transitionLocked'])throw Error(_0x3f0800(0x361));this[_0x3f0800(0x3bf)]=!0x0;}[_0x4d465b(0x48b)](_0x57edc3){const _0x31d6bc=_0x4d465b;this['_lockTransition'](),this['_updateState'](this[_0x31d6bc(0x288)][_0x31d6bc(0x3bb)](_0x57edc3)),this[_0x31d6bc(0x1c5)]();}['_onRemoteChangeset'](_0x5784de){const _0x59054f=_0x4d465b;if(!(_0x5784de[_0x59054f(0x3dc)]<=this[_0x59054f(0x2ff)][_0x59054f(0x1a8)](this[_0x59054f(0x25a)]))){if(this[_0x59054f(0x26f)]){this[_0x59054f(0x49a)][_0x59054f(0x41d)](_0x5784de);return;}this[_0x59054f(0x423)](_0x5784de);}}['_exhaustRemoteChangesetQueue'](){const _0x82122a=_0x4d465b;this[_0x82122a(0x49a)][_0x82122a(0x2ea)](_0x5021a7=>this[_0x82122a(0x423)](_0x5021a7)),this[_0x82122a(0x49a)]=[];}[_0x4d465b(0x423)](_0x2292e4){const _0x35dc14=_0x4d465b;let _0x383292=this['_compressMutationService'][_0x35dc14(0x1dc)][_0x35dc14(0x366)](this['_compressMutationService'][_0x35dc14(0x1dc)]['getInterceptPoints']()[_0x35dc14(0x277)])(_0x2292e4[_0x35dc14(0x30d)],null)||_0x2292e4[_0x35dc14(0x30d)],_0x5de415={..._0x2292e4,'mutations':_0x383292};this['_lockTransition'](),this[_0x35dc14(0x1d8)](this[_0x35dc14(0x288)][_0x35dc14(0x394)](_0x5de415)),this[_0x35dc14(0x1c5)]();}[_0x4d465b(0x48e)](_0x266927){const _0x529a88=_0x4d465b;this['_lockTransition'](),this[_0x529a88(0x1d8)](this[_0x529a88(0x288)]['onRemoteAck'](_0x266927)),this[_0x529a88(0x1c5)]();}[_0x4d465b(0x3dd)](_0x36a418){const _0x4a666c=_0x4d465b;this[_0x4a666c(0x291)](),this[_0x4a666c(0x1d8)](this[_0x4a666c(0x288)][_0x4a666c(0x462)](_0x36a418)),this[_0x4a666c(0x1c5)]();}['_onRemoteRetry'](_0x4423d0){const _0x5365af=_0x4d465b;this[_0x5365af(0x291)](),this['_updateState'](this[_0x5365af(0x288)]['onRemoteRetry'](_0x4423d0)),this[_0x5365af(0x1c5)]();}[_0x4d465b(0x3de)](_0x4c7db8){const _0x471f33=_0x4d465b;if(!(this[_0x471f33(0x288)]instanceof N))throw TypeError(_0x471f33(0x27e));let _0xabc915=_0x4c7db8[_0x471f33(0x1f2)](_0x25bc3d=>{const _0x4ef545=_0x471f33;let _0x10cdfb=this[_0x4ef545(0x1ea)][_0x4ef545(0x1dc)][_0x4ef545(0x366)](this[_0x4ef545(0x1ea)]['interceptor'][_0x4ef545(0x4a7)]()['COMPRESS_MUTATION_APPLY'])(_0x25bc3d['mutations'],null)||_0x25bc3d[_0x4ef545(0x30d)];return{..._0x25bc3d,'mutations':_0x10cdfb};});this['_lockTransition'](),this[_0x471f33(0x1d8)](this[_0x471f33(0x288)][_0x471f33(0x2b0)](_0xabc915)),this[_0x471f33(0x1c5)]();}[_0x4d465b(0x47f)](){const _0x472741=_0x4d465b;this[_0x472741(0x291)](),this[_0x472741(0x1d8)](this['_state'][_0x472741(0x434)]()),this[_0x472741(0x1c5)]();}[_0x4d465b(0x4bc)](_0x279e4e=!0x1){const _0x20ec4f=_0x4d465b;this[_0x20ec4f(0x291)](),this[_0x20ec4f(0x1d8)](this['_state']['toggleOnline']()),this['_unlockTransition']();let _0xed61a6=this['_state'];_0x279e4e&&_0xed61a6 instanceof D&&(this[_0x20ec4f(0x291)](),this['_updateState'](_0xed61a6[_0x20ec4f(0x1d6)]()),this[_0x20ec4f(0x1c5)]());}async['_createInitialState'](){return new Promise(_0x37660a=>{const _0x1ece4d=_0x4feb;this['session'][_0x1ece4d(0x2e1)][_0x1ece4d(0x30c)]((0x0,i[_0x1ece4d(0x3d1)])(0x1))['subscribe'](async _0x128f87=>{const _0x88e8e8=_0x1ece4d;_0x37660a(await this[_0x88e8e8(0x4c9)](_0x128f87===0x3));});});}[_0x4d465b(0x385)](){const _0x2c3c76=_0x4d465b;let _0x534eb2=this[_0x2c3c76(0x25a)];return{'onStateChange':(_0x9bfc8f,_0x475bbe)=>{const _0x2df77c=_0x2c3c76;if(_0x9bfc8f!==this[_0x2df77c(0x288)])throw Error(_0x2df77c(0x44f)+_0x9bfc8f[_0x2df77c(0x19e)]+_0x2df77c(0x24b)+_0x475bbe[_0x2df77c(0x19e)]+_0x2df77c(0x422)+this[_0x2df77c(0x288)][_0x2df77c(0x19e)]);this['_updateState'](_0x475bbe);},'onSendChangeset':_0x5ec1ee=>{const _0x42d8b9=_0x2c3c76;_0x5ec1ee[_0x42d8b9(0x22e)]||(_0x5ec1ee[_0x42d8b9(0x22e)]=this[_0x42d8b9(0x24f)],_0x5ec1ee['reqId']=++this[_0x42d8b9(0x3c9)]);let _0x1874ec={'eventID':e['CollaborationEvent'][_0x42d8b9(0x1ae)],'data':{'unitID':_0x5ec1ee['unitID'],'unitType':this['_type'],'changeset':_0x5ec1ee,'memberID':this['session']['getMemberID']()}};this[_0x42d8b9(0x2ef)][_0x42d8b9(0x49f)](_0x1874ec,this[_0x42d8b9(0x25a)]);},'onMissingChangesets':({from:_0x391c01,to:_0x56e1ec})=>{const _0x4be56f=_0x2c3c76;this[_0x4be56f(0x280)]['debug'](_0x4be56f(0x274),'fetching\x20missing\x20changesets\x20from\x20'+_0x391c01+_0x4be56f(0x3a0)+_0x56e1ec);let _0x2f3f08={'eventID':e[_0x4be56f(0x4a0)][_0x4be56f(0x229)],'data':{'unitID':_0x534eb2,'unitType':this[_0x4be56f(0x22d)],'from':_0x391c01,'to':_0x56e1ec}};this[_0x4be56f(0x2ef)][_0x4be56f(0x49f)](_0x2f3f08,this['unitID']);}};}async[_0x4d465b(0x4c9)](_0x2a8574){const _0x170bf4=_0x4d465b;var _0xe945cd;let _0x299d74=await((_0xe945cd=this[_0x170bf4(0x31f)])==null?void 0x0:_0xe945cd['loadOfflineData'](this[_0x170bf4(0x25a)])),_0x2cf608=(_0x299d74==null?void 0x0:_0x299d74['mutations'])??[],_0x2ba3de=(_0x299d74==null?void 0x0:_0x299d74[_0x170bf4(0x439)])??null,_0x24ca01=!!(_0x2ba3de!=null&&_0x2ba3de[_0x170bf4(0x22e)])&&!!(_0x2ba3de!=null&&_0x2ba3de[_0x170bf4(0x24d)]);this[_0x170bf4(0x24f)]=_0x24ca01?_0x2ba3de['sid']:(0x0,e[_0x170bf4(0x2e3)])(),this[_0x170bf4(0x3c9)]=_0x24ca01?_0x2ba3de[_0x170bf4(0x24d)]:0x0;let _0x86dcfd=this[_0x170bf4(0x25a)];try{this['_replayCachedMutations'](_0x2ba3de,_0x2cf608);}catch(_0x4020ee){this[_0x170bf4(0x280)][_0x170bf4(0x38b)](_0x4020ee);}let _0x2d515e=this[_0x170bf4(0x385)]();if(_0x2a8574){let _0x28419a=Ue(this[_0x170bf4(0x26d)],_0x86dcfd,this[_0x170bf4(0x22d)],_0x2ba3de,_0x2cf608,_0x2d515e);return _0x28419a instanceof O?_0x28419a['_schedule']():(_0x28419a instanceof A||_0x28419a instanceof k)&&_0x28419a[_0x170bf4(0x27a)](),_0x28419a;}return this[_0x170bf4(0x26d)][_0x170bf4(0x403)](M,_0x86dcfd,this[_0x170bf4(0x22d)],_0x2ba3de,_0x2cf608,_0x2d515e);}['_replayCachedMutations'](_0x5e9c88,_0x2ee2d1){const _0x4923b1=_0x4d465b;var _0x57bc52,_0x3162b5;let _0x222cf3=this[_0x4923b1(0x1ea)][_0x4923b1(0x1dc)][_0x4923b1(0x366)](this[_0x4923b1(0x1ea)][_0x4923b1(0x1dc)][_0x4923b1(0x4a7)]()[_0x4923b1(0x277)]);(_0x57bc52=_0x222cf3((_0x5e9c88==null?void 0x0:_0x5e9c88['mutations'])||[],null))==null||_0x57bc52[_0x4923b1(0x2ea)](_0x5472d7=>this[_0x4923b1(0x384)][_0x4923b1(0x3a9)](_0x5472d7['id'],_0x5472d7['params'])),(_0x3162b5=_0x222cf3(_0x2ee2d1||[],null))==null||_0x3162b5[_0x4923b1(0x2ea)](_0x1d28ea=>this['_commandService']['executeCommand'](_0x1d28ea['id'],_0x1d28ea['params']));}};P=y([v(0x3,(0x0,t[_0x4d465b(0x296)])(t['Injector'])),v(0x4,(0x0,t[_0x4d465b(0x296)])(e[_0x4d465b(0x467)])),v(0x5,(0x0,t[_0x4d465b(0x296)])(t['LocaleService'])),v(0x6,(0x0,t[_0x4d465b(0x296)])(e['RevisionService'])),v(0x7,(0x0,t[_0x4d465b(0x296)])(_)),v(0x8,t[_0x4d465b(0x2af)]),v(0x9,t[_0x4d465b(0x3cd)]),v(0xa,t[_0x4d465b(0x2ce)]),v(0xb,t[_0x4d465b(0x42f)]),v(0xc,(0x0,t[_0x4d465b(0x417)])(C)),v(0xd,(0x0,t['Optional'])(x))],P);let F=class extends P{constructor(_0x396fbb,_0x26f5da,_0x1ffd8d,_0x191d09,_0x2097d4,_0xb742f4,_0x5cb3f9,_0x450c51,_0x27e22e,_0xa74476,_0x5dcb32,_0x2a718c,_0xe9f082,_0x2b7c64,_0x24fbf6){const _0x52d6ae=_0x4d465b;super(_0x396fbb,_0x1ffd8d,_0x26f5da,_0x191d09,_0x2097d4,_0xb742f4,_0x5cb3f9,_0x450c51,_0x27e22e,_0xa74476,_0x5dcb32,_0x2a718c,_0x2b7c64,_0x24fbf6),this['unitID']=_0x396fbb,this[_0x52d6ae(0x487)]=_0x26f5da,this[_0x52d6ae(0x46d)]=_0xe9f082,g(this,_0x52d6ae(0x3b0),null);}[_0x4d465b(0x45b)](_0x1947a1){const _0x263af7=_0x4d465b;this[_0x263af7(0x3b0)]=_0x1947a1;}[_0x4d465b(0x380)](){const _0x4da884=_0x4d465b;this[_0x4da884(0x3b0)]=null,super['dispose']();}[_0x4d465b(0x385)](){const _0xdfe6f6=_0x4d465b;let _0x124796=super[_0xdfe6f6(0x385)]();return _0x124796['onTransformIME']=_0x3dd880=>{const _0x122598=_0xdfe6f6;var _0x374188,_0x47031e;return(_0x374188=this[_0x122598(0x3b0)])==null||(_0x47031e=_0x374188['onTransformIME'])==null?void 0x0:_0x47031e[_0x122598(0x2c3)](_0x374188,_0x3dd880);},_0x124796['onTransformState']=_0x29487c=>{const _0x4f28f0=_0xdfe6f6;var _0x5ce46a,_0x240deb;return(_0x5ce46a=this[_0x4f28f0(0x3b0)])==null||(_0x240deb=_0x5ce46a[_0x4f28f0(0x23e)])==null?void 0x0:_0x240deb[_0x4f28f0(0x2c3)](_0x5ce46a,_0x29487c);},_0x124796[_0xdfe6f6(0x33d)]=_0x272179=>{const _0x3a82b1=_0xdfe6f6;var _0x45a7de,_0x31a594;return((_0x45a7de=this[_0x3a82b1(0x3b0)])==null||(_0x31a594=_0x45a7de[_0x3a82b1(0x33d)])==null?void 0x0:_0x31a594['call'](_0x45a7de,_0x272179))??null;},_0x124796[_0xdfe6f6(0x406)]=_0x4e9f99=>{const _0x78f18f=_0xdfe6f6;var _0x2167a4,_0x34ace9;return(_0x2167a4=this[_0x78f18f(0x3b0)])==null||(_0x34ace9=_0x2167a4[_0x78f18f(0x406)])==null?void 0x0:_0x34ace9[_0x78f18f(0x2c3)](_0x2167a4,_0x4e9f99);},_0x124796[_0xdfe6f6(0x4e1)]=_0x5a54cc=>{const _0x2f4ccc=_0xdfe6f6;var _0x4937aa,_0x33bdb6;return(_0x4937aa=this[_0x2f4ccc(0x3b0)])==null||(_0x33bdb6=_0x4937aa[_0x2f4ccc(0x4e1)])==null?void 0x0:_0x33bdb6[_0x2f4ccc(0x2c3)](_0x4937aa,_0x5a54cc);},_0x124796[_0xdfe6f6(0x1c8)]=_0x4cc5f5=>{var _0x478a65,_0x367dbd;return((_0x478a65=this['_handlerCallback'])==null||(_0x367dbd=_0x478a65['onTransformRemoteChangesetByIMECache'])==null?void 0x0:_0x367dbd['call'](_0x478a65,_0x4cc5f5))??_0x4cc5f5;},_0x124796[_0xdfe6f6(0x358)]=_0x44fe5b=>{const _0x20629a=_0xdfe6f6;var _0x3df2c1,_0x10d807;return((_0x3df2c1=this[_0x20629a(0x3b0)])==null||(_0x10d807=_0x3df2c1['onTransformRemoteChangesetByStateCache'])==null?void 0x0:_0x10d807[_0x20629a(0x2c3)](_0x3df2c1,_0x44fe5b))??_0x44fe5b;},_0x124796;}async[_0x4d465b(0x3bd)](){const _0x459c8f=_0x4d465b;let _0x42381d=await super[_0x459c8f(0x3bd)]();return this[_0x459c8f(0x43a)](this[_0x459c8f(0x46d)][_0x459c8f(0x33f)]['subscribe'](_0x340fd8=>{const _0x23f3e2=_0x459c8f;if(_0x340fd8==null||_0x340fd8[_0x23f3e2(0x4d7)]!==this[_0x23f3e2(0x25a)])return;let {commandId:_0x397636,redoState:_0x2fe113,unitId:_0x5dcbd0}=_0x340fd8,_0x2db266={'id':_0x397636,'type':t['CommandType']['MUTATION'],'params':{'unitId':_0x5dcbd0,'actions':_0x2fe113[_0x23f3e2(0x2d7)],'textRanges':null}};this[_0x23f3e2(0x48b)](_0x2db266);})),this[_0x459c8f(0x43a)](this[_0x459c8f(0x384)]['onMutationExecutedForCollab']((_0x5e2fb7,_0x1fe8ff)=>{const _0xf7a9c7=_0x459c8f;if(_0x5e2fb7[_0xf7a9c7(0x487)]!==t['CommandType']['MUTATION']||_0x1fe8ff!=null&&_0x1fe8ff[_0xf7a9c7(0x412)]||_0x1fe8ff!=null&&_0x1fe8ff[_0xf7a9c7(0x46a)]||_0x5e2fb7['id']===n[_0xf7a9c7(0x43f)]['id'])return;let _0x263e9d=_0x5e2fb7[_0xf7a9c7(0x256)];if((_0x263e9d==null?void 0x0:_0x263e9d['unitId'])!==this['unitID'])return;let _0x521236=_0x5e2fb7,_0x2a7265=this[_0xf7a9c7(0x1ea)][_0xf7a9c7(0x1dc)][_0xf7a9c7(0x366)](this[_0xf7a9c7(0x1ea)]['interceptor'][_0xf7a9c7(0x4a7)]()[_0xf7a9c7(0x3c5)])([_0x521236],this[_0xf7a9c7(0x2dd)])||[_0x521236];this[_0xf7a9c7(0x48b)](_0x2a7265[0x0]);})),_0x42381d;}};F=y([v(0x3,(0x0,t['Inject'])(t[_0x4d465b(0x49b)])),v(0x4,(0x0,t[_0x4d465b(0x296)])(e[_0x4d465b(0x467)])),v(0x5,(0x0,t[_0x4d465b(0x296)])(t['LocaleService'])),v(0x6,(0x0,t[_0x4d465b(0x296)])(e[_0x4d465b(0x1bd)])),v(0x7,(0x0,t[_0x4d465b(0x296)])(_)),v(0x8,t[_0x4d465b(0x2af)]),v(0x9,t[_0x4d465b(0x3cd)]),v(0xa,t[_0x4d465b(0x2ce)]),v(0xb,t[_0x4d465b(0x42f)]),v(0xc,(0x0,t[_0x4d465b(0x296)])(n['DocStateChangeManagerService'])),v(0xd,(0x0,t[_0x4d465b(0x417)])(C)),v(0xe,(0x0,t[_0x4d465b(0x417)])(x))],F);let I=class extends P{constructor(_0xf42a44,_0x330712,_0x5cb0e9,_0x96bbab,_0x2c8dbb,_0x6349ae,_0x4a99df,_0x1ef94a,_0x3f4e63,_0x489b3f,_0x5ac903,_0x1c11a2,_0x1b0cc6,_0x58ece0){const _0x58d6c9=_0x4d465b;super(_0xf42a44,_0x5cb0e9,_0x330712,_0x96bbab,_0x2c8dbb,_0x6349ae,_0x4a99df,_0x1ef94a,_0x3f4e63,_0x489b3f,_0x5ac903,_0x1c11a2,_0x1b0cc6,_0x58ece0),this[_0x58d6c9(0x25a)]=_0xf42a44,this[_0x58d6c9(0x487)]=_0x330712;}async[_0x4d465b(0x3bd)](){const _0x2714b0=_0x4d465b;let _0x46191b=await super[_0x2714b0(0x3bd)]();return this['disposeWithMe'](this[_0x2714b0(0x384)][_0x2714b0(0x1ef)]((_0x23ded8,_0xb96151)=>{const _0x46036e=_0x2714b0;if(_0x23ded8[_0x46036e(0x487)]!==t[_0x46036e(0x1fa)][_0x46036e(0x4da)]||_0xb96151!=null&&_0xb96151[_0x46036e(0x412)]||_0xb96151!=null&&_0xb96151[_0x46036e(0x46a)])return;let _0xb20191=_0x23ded8[_0x46036e(0x256)];if((_0xb20191==null?void 0x0:_0xb20191[_0x46036e(0x4d7)])!==this['unitID'])return;let _0x366844=_0x23ded8,_0x52bbf4=this['_compressMutationService'][_0x46036e(0x1dc)][_0x46036e(0x366)](this['_compressMutationService'][_0x46036e(0x1dc)][_0x46036e(0x4a7)]()[_0x46036e(0x3c5)])([_0x366844],this[_0x46036e(0x2dd)])||[_0x366844];this['_onLocalMutation'](_0x52bbf4[0x0]);})),_0x46191b;}};I=y([v(0x3,(0x0,t[_0x4d465b(0x296)])(t[_0x4d465b(0x49b)])),v(0x4,(0x0,t[_0x4d465b(0x296)])(e[_0x4d465b(0x467)])),v(0x5,(0x0,t[_0x4d465b(0x296)])(t[_0x4d465b(0x327)])),v(0x6,(0x0,t[_0x4d465b(0x296)])(e[_0x4d465b(0x1bd)])),v(0x7,(0x0,t['Inject'])(_)),v(0x8,t[_0x4d465b(0x2af)]),v(0x9,t[_0x4d465b(0x3cd)]),v(0xa,t['ICommandService']),v(0xb,t[_0x4d465b(0x42f)]),v(0xc,(0x0,t['Optional'])(C)),v(0xd,(0x0,t['Optional'])(x))],I);let L=class extends P{constructor(_0x4f9561,_0x45a4cd,_0x1f9968,_0x33736e,_0x4e1db9,_0x4a098e,_0x5549e5,_0x2514ce,_0x18deae,_0x463733,_0x2f038d,_0x3b52b3,_0x37648f,_0x3670ac,_0x3d304e){const _0x200554=_0x4d465b;super(_0x4f9561,_0x1f9968,_0x45a4cd,_0x33736e,_0x4e1db9,_0x4a098e,_0x5549e5,_0x18deae,_0x463733,_0x2f038d,_0x3b52b3,_0x37648f,_0x3670ac,_0x3d304e),this[_0x200554(0x25a)]=_0x4f9561,this[_0x200554(0x487)]=_0x45a4cd,this['_sheetTransformSelectionsService']=_0x2514ce;}[_0x4d465b(0x385)](){const _0x322a49=_0x4d465b;let _0x26d8b3=super['_createHandler']();return _0x26d8b3['onTransformSelections']=_0x502dc0=>this[_0x322a49(0x290)][_0x322a49(0x360)](_0x502dc0),_0x26d8b3;}async['_init'](){const _0x4818d3=_0x4d465b;let _0x26e85c=await super[_0x4818d3(0x3bd)]();return this[_0x4818d3(0x43a)](this[_0x4818d3(0x384)][_0x4818d3(0x1ef)]((_0x11260a,_0x1ef81d)=>{const _0x1f2a8e=_0x4818d3;if(_0x11260a['type']!==t['CommandType'][_0x1f2a8e(0x4da)]||_0x1ef81d!=null&&_0x1ef81d['fromCollab']||_0x1ef81d!=null&&_0x1ef81d['onlyLocal'])return;let _0x56908e=_0x11260a['params'];if((_0x56908e==null?void 0x0:_0x56908e[_0x1f2a8e(0x4d7)])!==this[_0x1f2a8e(0x25a)])return;let _0x57dfcb=_0x11260a,_0x1ed82d=this['_compressMutationService'][_0x1f2a8e(0x1dc)][_0x1f2a8e(0x366)](this['_compressMutationService'][_0x1f2a8e(0x1dc)][_0x1f2a8e(0x4a7)]()[_0x1f2a8e(0x3c5)])([_0x57dfcb],this[_0x1f2a8e(0x2dd)])||[_0x57dfcb];this[_0x1f2a8e(0x48b)](_0x1ed82d[0x0]);})),_0x26e85c;}};L=y([v(0x3,(0x0,t[_0x4d465b(0x296)])(t[_0x4d465b(0x49b)])),v(0x4,(0x0,t[_0x4d465b(0x296)])(e[_0x4d465b(0x467)])),v(0x5,(0x0,t[_0x4d465b(0x296)])(t['LocaleService'])),v(0x6,(0x0,t['Inject'])(e['RevisionService'])),v(0x7,(0x0,t['Inject'])(S)),v(0x8,(0x0,t[_0x4d465b(0x296)])(_)),v(0x9,t[_0x4d465b(0x2af)]),v(0xa,t[_0x4d465b(0x3cd)]),v(0xb,t['ICommandService']),v(0xc,t[_0x4d465b(0x42f)]),v(0xd,(0x0,t[_0x4d465b(0x417)])(C)),v(0xe,(0x0,t['Optional'])(x))],L);let R=class extends P{constructor(_0x52e5e7,_0x1f3d85,_0x16f669,_0x2e64bc,_0x1a1af4,_0x5a1644,_0x1eb7ef,_0xd0582e,_0x5a0db9,_0xb07c50,_0x2d823f,_0x21db79,_0x272789,_0x5172a7){const _0x49f893=_0x4d465b;super(_0x52e5e7,_0x16f669,_0x1f3d85,_0x2e64bc,_0x1a1af4,_0x5a1644,_0x1eb7ef,_0xd0582e,_0x5a0db9,_0xb07c50,_0x2d823f,_0x21db79,_0x272789,_0x5172a7),this[_0x49f893(0x25a)]=_0x52e5e7,this[_0x49f893(0x487)]=_0x1f3d85;}async[_0x4d465b(0x3bd)](){const _0x5e557e=_0x4d465b;let _0x3f4074=await super[_0x5e557e(0x3bd)]();return this[_0x5e557e(0x43a)](this[_0x5e557e(0x384)]['onMutationExecutedForCollab']((_0x11ad55,_0x5759df)=>{const _0x2c0fd4=_0x5e557e;if(_0x11ad55[_0x2c0fd4(0x487)]!==t['CommandType']['MUTATION']||_0x5759df!=null&&_0x5759df[_0x2c0fd4(0x412)]||_0x5759df!=null&&_0x5759df[_0x2c0fd4(0x46a)])return;let _0x5b693f=_0x11ad55[_0x2c0fd4(0x256)];if((_0x5b693f==null?void 0x0:_0x5b693f[_0x2c0fd4(0x4d7)])!==this['unitID'])return;let _0x1b7029=_0x11ad55,_0x198c73=this[_0x2c0fd4(0x1ea)]['interceptor'][_0x2c0fd4(0x366)](this[_0x2c0fd4(0x1ea)][_0x2c0fd4(0x1dc)][_0x2c0fd4(0x4a7)]()[_0x2c0fd4(0x3c5)])([_0x1b7029],this[_0x2c0fd4(0x2dd)])||[_0x1b7029];this[_0x2c0fd4(0x48b)](_0x198c73[0x0]);})),_0x3f4074;}};R=y([v(0x3,(0x0,t['Inject'])(t[_0x4d465b(0x49b)])),v(0x4,(0x0,t[_0x4d465b(0x296)])(e[_0x4d465b(0x467)])),v(0x5,(0x0,t[_0x4d465b(0x296)])(t['LocaleService'])),v(0x6,(0x0,t['Inject'])(e[_0x4d465b(0x1bd)])),v(0x7,(0x0,t[_0x4d465b(0x296)])(_)),v(0x8,t[_0x4d465b(0x2af)]),v(0x9,t['ILogService']),v(0xa,t[_0x4d465b(0x2ce)]),v(0xb,t[_0x4d465b(0x42f)]),v(0xc,(0x0,t['Optional'])(C)),v(0xd,(0x0,t[_0x4d465b(0x417)])(x))],R);let z=class extends P{constructor(_0x106885,_0x4b11ea,_0x52b597,_0x4652cb,_0x5d0dea,_0x1e1abd,_0x5757cc,_0x1b8ea1,_0x32f967,_0x49466c,_0x140130,_0x14b759,_0x43fce1,_0x24819a){const _0x31468e=_0x4d465b;super(_0x106885,_0x52b597,_0x4b11ea,_0x4652cb,_0x5d0dea,_0x1e1abd,_0x5757cc,_0x1b8ea1,_0x32f967,_0x49466c,_0x140130,_0x14b759,_0x43fce1,_0x24819a),this[_0x31468e(0x25a)]=_0x106885,this[_0x31468e(0x487)]=_0x4b11ea;}async[_0x4d465b(0x3bd)](){const _0x2dde27=_0x4d465b;let _0x4aea04=await super[_0x2dde27(0x3bd)]();return this[_0x2dde27(0x43a)](this['_commandService'][_0x2dde27(0x1ef)]((_0x1ae81a,_0x559ef2)=>{const _0x68fdb8=_0x2dde27;if(_0x1ae81a[_0x68fdb8(0x487)]!==t['CommandType'][_0x68fdb8(0x4da)]||_0x559ef2!=null&&_0x559ef2[_0x68fdb8(0x412)]||_0x559ef2!=null&&_0x559ef2[_0x68fdb8(0x46a)])return;let _0x23a01c=_0x1ae81a[_0x68fdb8(0x256)];if((_0x23a01c==null?void 0x0:_0x23a01c['unitId'])!==this[_0x68fdb8(0x25a)])return;let _0x29fbc8=_0x1ae81a,_0x5d2b25=this['_compressMutationService'][_0x68fdb8(0x1dc)][_0x68fdb8(0x366)](this[_0x68fdb8(0x1ea)]['interceptor'][_0x68fdb8(0x4a7)]()[_0x68fdb8(0x3c5)])([_0x29fbc8],this[_0x68fdb8(0x2dd)])||[_0x29fbc8];this['_onLocalMutation'](_0x5d2b25[0x0]);})),_0x4aea04;}};z=y([v(0x3,(0x0,t[_0x4d465b(0x296)])(t[_0x4d465b(0x49b)])),v(0x4,(0x0,t[_0x4d465b(0x296)])(e[_0x4d465b(0x467)])),v(0x5,(0x0,t['Inject'])(t[_0x4d465b(0x327)])),v(0x6,(0x0,t[_0x4d465b(0x296)])(e[_0x4d465b(0x1bd)])),v(0x7,(0x0,t[_0x4d465b(0x296)])(_)),v(0x8,t[_0x4d465b(0x2af)]),v(0x9,t[_0x4d465b(0x3cd)]),v(0xa,t[_0x4d465b(0x2ce)]),v(0xb,t[_0x4d465b(0x42f)]),v(0xc,(0x0,t[_0x4d465b(0x417)])(C)),v(0xd,(0x0,t[_0x4d465b(0x417)])(x))],z);function _0x2b54(){const _0x419570=['create','conflict','executeCommand','_roomMembers','_createSession','reduce','values','{fileID}','CollaborationController','_handlerCallback','url','parseChangesetToProtocol','decorate','session.room-permission-denied','RxDisposable','CollaborationSocketService','BoardCollaborationEntity','parseProtocolChangeset','?url=','SnapshotServerOverHTTPService','appendMutation','CollaborationStatus','_init','getMember','_transitionLocked','DEFAULT_WS_SESSION_TICKET_URL','JOIN_ROOM_NOT_EXISTS','loadSheet','_initMergeInterceptor','synced','COMPRESS_MUTATION_SEND','_handleRemoteChangesets','Unknown\x20type.\x20Will\x20not\x20load\x20files\x20from\x20remote\x20address.','UNIVER_COLLABORATION_CLIENT_PLUGIN','_changesetReqId','[CollaborationUndoRedoService]','COLLABORATION_SESSION_TARGET_UNIT_ID_REQUIRED','CommentService','ILogService','upload','onRemoteAck','_scheduleCompleteTimestamp','take','_members','_socketChannels','liveShareNewHost','DataLoaderService','HEARTBEAT_TIMEOUT','getCurrentUser','complete','localeService','[CollaborationAttachmentIoService]:\x20failed\x20to\x20upload\x20attachment.','IMentionIOService','revision','_onRemoteRejected','_onFetchMissResult','514346vsUIjt','headers','REMOTE_UNISCRIPT_EXECUTION_ENDPOINT_KEY','[OfflineState]:\x20received\x20changeset.','/-/object/-/batch_allowed','routeKey','getUploadOptions','getCurrentSelections','_waitForHeartbeatResponse','unitDisposed$','getSheetBlock','_clearCollaborationTimeoutTimer','collaboration_new_changeset','unitId\x20is\x20not\x20found','SheetCollaborationEntity','_socketService','addImageSourceCache','/collaborator','_disableEditing','indexOf','[SyncedState]:\x20received\x20rejection.','_initUnitPermissionChange','/universer-api/authz','_schedule','_clearRedo','isPermissionRej','_shouldReportTelemetry','transformMutationsWithChangeset','unit-cache-','next','\x20in\x20_schedule.','_getUploadFileURL','roomInfos','/object','enableOfflineEditing','SOCKET_FAILED','createInstance','blockRanges','getDrawingImageAllowSize','onTransformSelections','waitForRoom$','authzUrl','[AuthServerService]:\x20you\x20should\x20provide\x20authentication\x20info\x20on\x20Node.js.','Subject','socket\x20open.','_rescheduleHeartbeat','CollaborationSession','/new_changes','startTime','UniverInstanceType','reject','fromCollab','CmdRspCode','SOCKET_FAILED_RETRY','_registerDependencies','HELLO','Optional','DocCollaborationEntity','csRejEvent','ImageUploadStatusType','requestParams','/universer-api/user/session-ticket','push','NOT_COLLAB','length','getMemberID','_onConnectionFailed','\x0aCurrent:\x20','_applyRemoteChangeset','[CollaborationAttachmentIoService]:\x20unitId\x20is\x20not\x20found.','confirm','cfgEnableObjInherit','onTransformIME','_collaborationTimeoutTimer','_entities','permissionRejEvent','getRoom','_resendTimeout','_transformStack','_maxTotalRetryTimeout','IPermissionService','_getLoginPath','incrementRevOfUnit','joinEvent','telemetry\x20info\x20is\x20not\x20initialized','toggleOffline','catch','_joinRoom','UnitEmbedded','_throwTelemetryCollaborationNewChangeset','awaitingChangeset','disposeWithMe','localCacheService','LIVESHARE_OPERATION','getActiveSheet','cmd','RichTextEditingMutation','CollaborativeUndoRedoService','Cannot\x20assemble\x20a\x20changeset\x20from\x20multiple\x20mutations\x20of\x20different\x20types:\x20','csAckEvent','loadBoard','16399966VgJLfP','append','LEAVE','textEncoder','state','string','localUnitId','collaborators','unit','unitType','_snapshotService','[CollaborationEntity]:\x20invalid\x20state\x20transition!\x20State\x20transferred\x20from\x20is\x20not\x20the\x20current\x20state.\x0aBefore:\x20','EmptyMutationInfo','getTime','href','__splitChunk__','_collaborationUIEventService','USERS_ENTER','transformUndoRedo','action','_status$','UNIVER_SHEET','COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY','addHandlerCallback','_event$','objectType','retryCount','createUniverCollaborationAdapter','getUnitOnRev','ThresholdInterceptorFactory','onRemoteRej','UserManagerService','_getCtorByUniverInstanceType','default','defineProperty','CompressMutationService','_showConflictNotification','location','onlyLocal','Rectangle','pending','_docStateChangeManagerService','symbol','_pendingSessions','readAsDataURL','socket\x20close','[OfflineState]:\x20received\x20rejection.','_initDependencies','serializeCombRequest','_entityInit$','_updateUnitPermissionPoint','[PendingState]:\x20received\x20rejection.','_sendingTimer','sort','PERSON','777030ZDGgHW','mergeOverrideWithDependencies','_instanceService','requireSession','_toggleOffline','pluginName','then','c1Prime','_onUserJoin','univer-pro.collaboration-client-socket-service','HEARTBEAT','126xUJuLO','type','socketService','add','HEARTBEAT_INTERVAL_KEY','_onLocalMutation','update','/universer-api/stream/file/upload','_onRemoteACK','getUnitId','OPTIONAL','_getUndoStack','_doCreateSocket','_getRedoStack','CollaborationImageIoService','getLocalCacheKey','SUCCUSS','origin','saveImage','shareReplay','_remoteChangesetQueue','Injector','attachment','LIVESHARE_NEW_HOST','_startCollaboration','send','CollaborationEvent','responseType','CONFLICT','pauseCollaboration','workbook','FileSource','createSocket','getInterceptPoints','[CollaborationSessionService]:\x20socket\x20error','takeUntil','UPDATE_CURSOR','7GoBNIV','toString','onStateChange','PdfCollaborationEntity','connection\x20error','collabSubmitChangesetUrl','InsertSheetMutation','unsubscribe','subject','IAttachmentIoService','randomBytes','Error\x20on\x20receiving\x20event','includes','_onCombEvent','loadOfflineData','file','Document','_toggleOnline','collabWebSocketUrl','toLocal','BehaviorSubject','findIndex','_change$','_startTelemetryCollaborationNewChangeset','getOwnPropertyDescriptor','_userManagerService','isArray','sessionStatus','transformStack\x20failed!','[CollaborationAttachmentIoService]:\x20attachment\x20type\x20is\x20not\x20accepted.','_createInitialStateImpl','_roomCreated$','saveAttachment','CHANGESET_ACK','enableSingleActiveInstanceLock','JOIN_ROOM_FULL','_collaborationSessionService','ConflictState','filter','_updateLocalCache','@univerjs-pro/collaboration-client','/universer-api/oidc/authpage','_commentUpdate$','RemoveSlidePageMutation','unitId','retryConnectingInterval','mapDocumentTypeToUniverInstanceType','MUTATION','[CollaborationSessionService]','_transformStateCache','IContextService','[PendingState]:\x20invalid\x20calling\x20to\x20`resend`.','HEARTBEAT_TIMEOUT_KEY','/role','onSyncEditingCollabCursor','_syncEditingCollabCursor','loadDoc','869311CnbhCc','_clearUndo','disableLocalCache','timeoutTimer','_executeRemoteChangeset','_authzIoService','onMissingChangesets','setShowComponents','deserializeToCombResponse','saveSnapshot','updatePermissionPoint','debug','_handler','status','ISocketService','find','&to=','online$','now','range','x-univer-host','_clearRetryConnectingTimer','_getUnitPermissionPoints','getCurrentRevOfUnit','SessionStatus','_telemetryService','_hasSessionsForEndpoint','init','_onMessage','SUBMIT_CHANGESET','getSheetId','shouldCloseConn','resourceIDs','save\x20fail\x20reason\x20is\x20','sendChangesetTimeout','ITelemetryService','_sessionStatus$','IConfigService','isTransformMutationsWithChangesetFailure','getTypeOfUnitDisposed$','UPDATE_PERMISSION_OBJ','_sender','POST','baseRev','RevisionService','CollaborationUIEventService','_decreaseWaiting','changesets','_clearScheduledTask','endsWith','Workbook','_transformSelections','_unlockTransition','supports','_queuedRemoteChangesets','onTransformRemoteChangesetByIMECache','close','socketReady','UnitAction','snapshotServerUrl','startsWith','isCompositionEnd','utf8ToBytes','error$','_commentService','number','_onJoinRoomEvent','_scheduleCollaborationTimeoutTimer','RECV','fetchMiss','FAIL','_updateState','touchDependencies','refreshUnit','_tryReconnect','interceptor','OfflineState','CollaborationUIEventId','_snapshotServerService','OBJECT_PERMISSION_CONFIG_KEY','INGEST','registerHTTPInterceptor','textRanges','IUndoRedoService','loadBase','resolveUnit','_unitInfo$','SheetTransformSelectionsService','8725ZZGMBf','_compressMutationService','FetchingMissState','dispose$','close$','\x20-\x20','onMutationExecutedForCollab','_removeRoom','changeset','map','unitLoaded$','clear','_stopTelemetryCollaborationNewChangeset','missingChangesets','_substituteRedoStack','session.room-cnt-exceeds','eventID','CommandType','BASE64','awaiting','_checkMissing','put','updateCursorEvent','getUnitStatus$','transformChangesets','/fetchmissing?from=','_state$','NO_OTHER_CLIENTS_EDITING','ICollaborationSocketService','UNIVER_PDF','originalMeta','FETCH_MISS','_telemetryInfo','_getDownloadEndpointURL','AuthzIoHttpService','[OfflineState]:\x20invalid\x20calling\x20to\x20`resend`.','SUBMIT_CHANGESET_TIMEOUT','Slide','_getSignURL','_isEchoedAwaitingChangeset','hasOwnProperty','_clearLocalCache','[FetchMissState]','8454816JDOOfJ','RETRY_CONNECTING_MAX_COUNT','UNIVER_BOARD','constructor','delay','_httpService','encode','stringify','method','name','updateOfflineData','maxSize','/allowed','HEARTBEAT_INTERVAL','stopTime','SNAPSHOT_URL_KEY','[SyncedState]:\x20received\x20acknowledgement.','_getAPIPrefix','_tryEnsureSocket','/object/','_adapter','FETCH_MISSING','PENDING','getAttachmentUrl','_createSocket','_type','sid','_localeService','endpoint','_pendingMutations','getFocusedUnit','DEFAULT_REMOTE_UNISCRIPT_EXECUTION_ENDPOINT','liveShareOperation','CombCmd','_createInitialState','text-x','trim','rev','/universer-api/uniscript','saveSheetBlock','collaboration-client.auth.needGotoLoginAlert','onload','onTransformState','objectID','src','getImageSourceCache','loginUrlKey','JOIN','leaveEvent','UUID','_sessionChannels','concatMap','duration','_emitMembers','UNIVER_DOC','\x0aAfter:\x20','getLatestCsReqIdBySid','reqId','getValue','_changesetSessionId','memberID','_memberService','candidateSocket','_resolveSessionIdentity','resolve','_replaceFileID','params','avatar','clearUnit','_HTTPService','unitID','AWAITING','awaiting_with_pending','getAllPermissionPoint','PERMISSION_DENIED','[DataLoaderService]','_onConflict','CLOSE_ROOM','?size=','SnapshotService','closeSession','joinRsp','change$','COLLABORATION_CHANGESET_TRANSLATION_REQUIRED','fetching\x20the\x20latest\x20document\x20from\x20the\x20server.','apply','_unitLoaded$','ISingleActiveUnitService','_clearHeartbeatTimer','_injector','onCommentUpdate','_collaborationPaused','NEW_CHANGESETS','Disposable','IImageIoService','isInternalEditorID','[CollaborationEntity]','withCredentials','function','COMPRESS_MUTATION_APPLY','objectPermissionTypes','_eventService','resend','every','_networkConditionService','MentionIoHttpService','[CollaborationEntity]:\x20cannot\x20apply\x20missing\x20results\x20on\x20other\x20states!','toDisposable','_logService','_onRemoteChangeset','This\x20method\x20should\x20not\x20be\x20called\x20on\x20the\x20client\x20side!','_acknowledgeAwaiting','capture','subType','onRemoteRetry','subUnitId','_state','setCfgEnableObjInherit','UnitStatus','_incrementRevisionNumber','IAuthzIoService','PendingState','patch','_socket','_sheetTransformSelectionsService','_lockTransition','onSendChangeset','univer-pro.collaboration-client.single-active-unit-service','AwaitingState','[CollaborationEntity]:\x20initial\x20state\x20has\x20been\x20created\x20before.\x20You\x20should\x20not\x20call\x20\x22init\x22\x20twice.','Inject','slice','_getSocketChannel','_onRecvEvent','getDeserializedSheetBlock','_getConfig','getCollabEntity$','_singleActiveUnitService','1.0.0-rc.0','createCollaborator','ICollaborationClientAdapterService','_waitCount','[FetchMissState]:\x20missing\x20changesets\x20response\x20still\x20has\x20revision\x20gaps.','MentionType','some','objects','putCollaborators','JOINING','USERS_LEAVE','refreshPermission','_transformService','FileId','ws://127.0.0.1:8000/universer-api/comb/connect','JOIN_ROOM_PERMISSION_DENIED','_cfgEnableObjInherit','IUniverInstanceService','onMissedChangesetFetched','subscribe','ImageSourceType','SYNCED','override','endpointKey','[CollaborationSocketService]:\x20failed\x20to\x20get\x20web\x20socket\x20factory!','[UniverCollaborationClientPlugin]','[PendingState]:\x20unhandled\x20univer\x20type:\x20','UNIVER_SLIDE','[ConflictState]:\x20invalid\x20calling\x20to\x20`resend`.','retryConnectingTimer','ITransformService','selections','deleteCollaborator','enableCollaboration','_undoRedoService','post','__Key__','call','_updateStatus','floor','commentUpdate$','ObjectPermissionService','code','getTypeOfUnitAdded$','entityInit$','SetSelectionsOperation','getUnitType','base-ui.attachment-io.service','ICommandService','list','socket$','toPrimitive','_initRequestHeader','_imageSourceCache','status$','SHOULD_CLOSE_CONN','allowed','actions','toRemote','Board','[OfflineState]:\x20received\x20acknowledgement.','data','merge','_univerInstanceService','CHANGESET_REJ','WorkbookEditablePermission','objectId','sessionStatus$','MergeInterceptorFactory','uuidv4','ERROR_IMAGE_TYPE','_upload','setConfig','_transformRemoteChangesetByIMECache','generateRandomId','_getAPIPrefixPath','forEach','LIVESHARE_FETCH_OPERATIONS','deepClone','objectActions','enableAuthServer','session','HTTPRequest','isTransformChangesetsSuccess','sendHeartbeatTimer','getSnapshotAPIPath','result','/resources','[serializeCombRequest]:\x20should\x20not\x20fall\x20into\x20default\x20branch!','firstValueFrom','createIdentifier','asObservable','delete','_config','commentUpdateEvent','getCollabEntity','loadUnit','_revisionService','collaboratorID','_sessions','_disposed','UnitObject','size','toggleOnline','socketMessageSubscription','JSONX','min','encodeURIComponent','GLOBAL_ROOMS_CNT_EXCEEDS','_onOffline','pipe','mutations','[CollaborationAttachmentIoService]:\x20attachment\x20exceeds\x20max\x20size.','/universer-api/snapshot/','getUnit','downloadEndpointUrl','_onRemoteRetry','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','initWorkbookPermissionChange','HTTPService','emitEvent','_resendTimer','_identity','LIVESHARE_REQUEST_HOST','getWorkbookSelections','_acknowledgeAwaitingIfReady','INetworkConditionService','target','_members$','_localCacheService','version','JOIN_ROOM_FAILED','[CollaborationSession]','listCollaborators','reconnect','_socketMessageSubscription','_getCurrentRevision','LocaleService','CHANGESET_SHOULD_RETRY','/universer-api/comb','[FetchingMissState]:\x20not\x20expected\x20to\x20receive\x20ack\x20when\x20`this._awaitingChangeset`\x20is\x20null!','AwaitingWithPendingState','accept','SheetsSelectionsService','splice','ReplaySubject','fromCharCode','compose','OTHER_CLIENT_EDITING','backupOfflineData','_acknowledgedAwaitingRevision','CollaborationEntity','OFFLINE','_transformAndApplyRemoteChangeset','setWaitCount','_listenToNetworkCondition','snapshot','session.room-full','getImage','onPrepareTransformSelections','AWAITING_WITH_PENDING','docStateChange$','hostname','[PendingState]:\x20received\x20acknowledgement.','not_collab','message$','Module','&assign=','2288WVKUWk','removeMember','uniscriptRunEvent','Failed\x20to\x20update\x20permission\x20point','_substituteUndoStack','members$','ERROR_IMAGE','DEFAULT_FILE_NAME','get','[CollaborationController]:\x20invalid\x20univer\x20type:\x20','_resendWithTimeout','LIVESHARE_TERMINATE','body','resolveWithBasePath','Quantity','replace','&source=','unknown','onTransformRemoteChangesetByStateCache','updateMember','getGlobalObject','_transformRemoteChangesetByStateCache','_awaitingChangeset','getConfig','set','readyForCollab','transformSelections','[CollaborationEntity]:\x20cannot\x20lock\x20transition\x20twice!\x20This\x20is\x20an\x20implementation\x20error,\x20meaning\x20you\x20transit\x20the\x20collaboration\x20state\x20again\x20in\x20the\x20process\x20of\x20a\x20previous\x20transition.\x20This\x20should\x20never\x20happen.','DisposableCollection','UniverCollaborationClientPlugin','3xbjFzR','members','fetchThroughInterceptors','_configService','fetch_missing','PERMISSION_REJ','_submitChangeset','onLocalMutation','object','columnGroups','_refreshUnitPermission','Edit','univer-pro.collaboration-client-adapter-service','c2Prime','_permissionService','_transformIMECache','_initCloseConn','LOCAL_CACHE_INTERVAL','UNIVER_BASE','loadUnitOfRevision','12541848TuUOvV','collaboration-client.config','state$','ISnapshotServerService','offline','m2Prime','userID','/universer-api/snapshot','dispose','_isPermissionRej','UNISCRIPT_RUN','equals','_commandService','_createHandler','open$','_sendHeartbeat','/rev/','UniverNetworkPlugin','[CollaborationState]:\x20apply\x20error!','error','_clearTimeoutTimer','ONLINE','isTransformMutationsWithChangesetSuccess','from','/block/','_closedUnits','BaseCollaborationEntity','MoveSlidePageMutation','onRemoteChangeset','/unit/','has','prototype','submit\x20changeset\x20error!','PSEUDO_FETCH_MISSING_RESULT','_getSendChangesetTimeout','_exhaustRemoteChangesetQueue','MSG_FOR_ERROR','ErrorCode','_transformUndoredo','onStarting','\x20to\x20','concatBytes','_onUserLeave','uploadFileServerUrl','IDLE','event$','signUrlServerUrl'];_0x2b54=function(){return _0x419570;};return _0x2b54();}let B=class extends P{constructor(_0xc1be89,_0x406dce,_0x4ab64c,_0x1c99ed,_0x15ce41,_0x5ae101,_0x22b476,_0x570ec3,_0x437d8c,_0x3402b3,_0x171b49,_0x26ee3e,_0x288c1c,_0x35ab9d){const _0x16b07e=_0x4d465b;super(_0xc1be89,_0x4ab64c,_0x406dce,_0x1c99ed,_0x15ce41,_0x5ae101,_0x22b476,_0x570ec3,_0x437d8c,_0x3402b3,_0x171b49,_0x26ee3e,_0x288c1c,_0x35ab9d),this[_0x16b07e(0x25a)]=_0xc1be89,this['type']=_0x406dce;}async[_0x4d465b(0x3bd)](){const _0x1ad60a=_0x4d465b;let _0x29f945=await super[_0x1ad60a(0x3bd)]();return this['disposeWithMe'](this['_commandService']['onMutationExecutedForCollab']((_0x2b11e7,_0x145384)=>{const _0x1ceb6c=_0x1ad60a;if(_0x2b11e7[_0x1ceb6c(0x487)]!==t[_0x1ceb6c(0x1fa)][_0x1ceb6c(0x4da)]||_0x145384!=null&&_0x145384[_0x1ceb6c(0x412)]||_0x145384!=null&&_0x145384['onlyLocal'])return;let _0x302411=_0x2b11e7[_0x1ceb6c(0x256)];if((_0x302411==null?void 0x0:_0x302411[_0x1ceb6c(0x4d7)])!==this[_0x1ceb6c(0x25a)])return;let _0x311629=_0x2b11e7,_0x3472ad=this['_compressMutationService'][_0x1ceb6c(0x1dc)][_0x1ceb6c(0x366)](this[_0x1ceb6c(0x1ea)][_0x1ceb6c(0x1dc)][_0x1ceb6c(0x4a7)]()[_0x1ceb6c(0x3c5)])([_0x311629],this[_0x1ceb6c(0x2dd)])||[_0x311629];this[_0x1ceb6c(0x48b)](_0x3472ad[0x0]);})),_0x29f945;}};B=y([v(0x3,(0x0,t['Inject'])(t[_0x4d465b(0x49b)])),v(0x4,(0x0,t[_0x4d465b(0x296)])(e[_0x4d465b(0x467)])),v(0x5,(0x0,t[_0x4d465b(0x296)])(t['LocaleService'])),v(0x6,(0x0,t[_0x4d465b(0x296)])(e[_0x4d465b(0x1bd)])),v(0x7,(0x0,t['Inject'])(_)),v(0x8,t['IUniverInstanceService']),v(0x9,t[_0x4d465b(0x3cd)]),v(0xa,t[_0x4d465b(0x2ce)]),v(0xb,t['IPermissionService']),v(0xc,(0x0,t[_0x4d465b(0x417)])(C)),v(0xd,(0x0,t[_0x4d465b(0x417)])(x))],B);const We=(0x0,t[_0x4d465b(0x2f8)])('univer-pro.collaboration-client.network-condition.service');function Ge(_0x31e37d){const _0x542c41=_0x4d465b;let _0xa00578=_0x31e37d[_0x542c41(0x2db)],_0x3d4308=JSON['parse'](_0xa00578);switch(_0x3d4308[_0x542c41(0x43e)]){case a[_0x542c41(0x235)][_0x542c41(0x485)]:case a[_0x542c41(0x235)]['HELLO']:{let _0x3879a6=_0x3d4308['infoRsp'];return{..._0x3d4308,'data':_0x3879a6,'cmd':_0x3d4308[_0x542c41(0x43e)]};}case a['CombCmd'][_0x542c41(0x243)]:{let _0x49e4a8=_0x3d4308[_0x542c41(0x265)];return{..._0x3d4308,'data':_0x49e4a8,'cmd':_0x3d4308[_0x542c41(0x43e)]};}case a[_0x542c41(0x235)][_0x542c41(0x1d5)]:{let _0x59a505=_0x3d4308['collaMsg'];switch(_0x59a505[_0x542c41(0x1f9)]){case e[_0x542c41(0x4a0)]['PERMISSION_REJ']:var _0x1ea60f;return{..._0x3d4308,'data':{..._0x59a505,'data':(_0x1ea60f=_0x59a505[_0x542c41(0x42a)])==null?void 0x0:_0x1ea60f['cs']},'cmd':_0x3d4308['cmd']};case e['CollaborationEvent']['CHANGESET_ACK']:var _0x3edd9b;return{..._0x3d4308,'data':{..._0x59a505,'data':(_0x3edd9b=_0x59a505[_0x542c41(0x442)])==null?void 0x0:_0x3edd9b['cs']},'cmd':_0x3d4308['cmd']};case e['CollaborationEvent'][_0x542c41(0x270)]:var _0x134870;return{..._0x3d4308,'data':{..._0x59a505,'data':(_0x134870=_0x59a505['newCsEvent'])==null?void 0x0:_0x134870['cs']},'cmd':_0x3d4308[_0x542c41(0x43e)]};case e[_0x542c41(0x4a0)]['CHANGESET_REJ']:var _0x1287eb;return{..._0x3d4308,'data':{..._0x59a505,'data':(_0x1287eb=_0x59a505[_0x542c41(0x419)])==null?void 0x0:_0x1287eb['cs']},'cmd':_0x3d4308['cmd']};case e[_0x542c41(0x4a0)][_0x542c41(0x328)]:var _0x1505c7;return{..._0x3d4308,'data':{..._0x59a505,'data':(_0x1505c7=_0x59a505['csShouldRetryEvent'])==null?void 0x0:_0x1505c7['cs']},'cmd':_0x3d4308[_0x542c41(0x43e)]};case e['CollaborationEvent'][_0x542c41(0x4aa)]:return{..._0x3d4308,'data':{..._0x59a505,'data':_0x59a505[_0x542c41(0x1ff)]},'cmd':_0x3d4308[_0x542c41(0x43e)]};case e['CollaborationEvent'][_0x542c41(0x455)]:return{..._0x3d4308,'data':{..._0x59a505,'data':_0x59a505[_0x542c41(0x432)]},'cmd':_0x3d4308[_0x542c41(0x43e)]};case e['CollaborationEvent'][_0x542c41(0x2a8)]:return{..._0x3d4308,'data':{..._0x59a505,'data':_0x59a505[_0x542c41(0x244)]},'cmd':_0x3d4308[_0x542c41(0x43e)]};case e[_0x542c41(0x4a0)][_0x542c41(0x49d)]:return{..._0x3d4308,'data':{..._0x59a505,'data':_0x59a505[_0x542c41(0x3d4)]},'cmd':_0x3d4308[_0x542c41(0x43e)]};case e[_0x542c41(0x4a0)]['LIVESHARE_FETCH_OPERATIONS']:case e[_0x542c41(0x4a0)][_0x542c41(0x43c)]:return{..._0x3d4308,'data':{..._0x59a505,'data':_0x59a505[_0x542c41(0x234)]},'cmd':_0x3d4308[_0x542c41(0x43e)]};case e[_0x542c41(0x4a0)][_0x542c41(0x351)]:return{..._0x3d4308,'data':{..._0x59a505,'data':_0x59a505[_0x542c41(0x3d4)]},'cmd':_0x3d4308[_0x542c41(0x43e)]};case e[_0x542c41(0x4a0)][_0x542c41(0x39c)]:return{..._0x3d4308,'data':_0x59a505,'cmd':_0x3d4308['cmd']};case e['CollaborationEvent']['COMMENT_UPDATE']:return{..._0x3d4308,'data':{..._0x59a505,'data':_0x59a505[_0x542c41(0x2fc)]},'cmd':_0x3d4308[_0x542c41(0x43e)]};case e[_0x542c41(0x4a0)]['UPDATE_PERMISSION_OBJ']:return{..._0x3d4308,'data':{..._0x59a505,'data':_0x59a505['updatePermissionObjEvent']},'cmd':_0x3d4308[_0x542c41(0x43e)]};case e['CollaborationEvent'][_0x542c41(0x2d5)]:return{..._0x3d4308,'data':{..._0x59a505,'data':_0x59a505[_0x542c41(0x1b0)]},'cmd':_0x3d4308[_0x542c41(0x43e)]};case e[_0x542c41(0x4a0)][_0x542c41(0x382)]:return{..._0x3d4308,'data':{..._0x59a505,'data':_0x59a505[_0x542c41(0x348)]},'cmd':_0x3d4308[_0x542c41(0x43e)]};default:return _0x3d4308;}}default:return _0x3d4308;}}function Ke(_0x59e1fd){const _0x3ad974=_0x4d465b;switch(_0x59e1fd[_0x3ad974(0x43e)]){case a[_0x3ad974(0x235)]['HEARTBEAT']:case a[_0x3ad974(0x235)][_0x3ad974(0x416)]:return JSON['stringify']({'cmd':_0x59e1fd[_0x3ad974(0x43e)],'routeKey':_0x59e1fd[_0x3ad974(0x3e4)]});case a[_0x3ad974(0x235)][_0x3ad974(0x1e1)]:{let _0x539d75;switch(_0x59e1fd[_0x3ad974(0x2db)]['eventID']){case e['CollaborationEvent']['UPDATE_CURSOR']:_0x539d75={'eventID':e['CollaborationEvent'][_0x3ad974(0x4aa)],'updateCursorEvent':_0x59e1fd[_0x3ad974(0x2db)][_0x3ad974(0x2db)]};break;case e[_0x3ad974(0x4a0)][_0x3ad974(0x2a8)]:_0x539d75={'eventID':e[_0x3ad974(0x4a0)][_0x3ad974(0x2a8)],'leaveEvent':_0x59e1fd[_0x3ad974(0x2db)][_0x3ad974(0x2db)]};break;case e[_0x3ad974(0x4a0)][_0x3ad974(0x455)]:_0x539d75={'eventID':e[_0x3ad974(0x4a0)]['USERS_ENTER'],'joinEvent':_0x59e1fd[_0x3ad974(0x2db)][_0x3ad974(0x2db)]};break;case e[_0x3ad974(0x4a0)]['LIVESHARE_NEW_HOST']:_0x539d75={'eventID':e[_0x3ad974(0x4a0)][_0x3ad974(0x49d)],'liveShareNewHost':_0x59e1fd[_0x3ad974(0x2db)][_0x3ad974(0x2db)]};break;case e[_0x3ad974(0x4a0)][_0x3ad974(0x43c)]:_0x539d75={'eventID':e[_0x3ad974(0x4a0)][_0x3ad974(0x43c)],'liveShareOperation':_0x59e1fd[_0x3ad974(0x2db)][_0x3ad974(0x2db)]};break;case e['CollaborationEvent'][_0x3ad974(0x351)]:_0x539d75={'eventID':e[_0x3ad974(0x4a0)][_0x3ad974(0x351)],'liveShareTerminate':_0x59e1fd[_0x3ad974(0x2db)][_0x3ad974(0x2db)]};break;case e[_0x3ad974(0x4a0)][_0x3ad974(0x319)]:_0x539d75={'eventID':e['CollaborationEvent'][_0x3ad974(0x319)],'liveShareRequestHost':_0x59e1fd[_0x3ad974(0x2db)]['data']};break;case e[_0x3ad974(0x4a0)]['LIVESHARE_FETCH_OPERATIONS']:_0x539d75={'eventID':e[_0x3ad974(0x4a0)][_0x3ad974(0x2eb)]};break;default:_0x539d75={'eventID':_0x59e1fd[_0x3ad974(0x2db)]['eventID']};}return JSON['stringify']({'cmd':_0x59e1fd[_0x3ad974(0x43e)],'routeKey':_0x59e1fd[_0x3ad974(0x3e4)],'collaMsg':_0x539d75});}case a[_0x3ad974(0x235)][_0x3ad974(0x243)]:return JSON['stringify']({'cmd':_0x59e1fd['cmd'],'routeKey':_0x59e1fd[_0x3ad974(0x3e4)],'joinReq':_0x59e1fd[_0x3ad974(0x2db)]});case a['CombCmd'][_0x3ad974(0x446)]:return JSON[_0x3ad974(0x21b)]({'cmd':_0x59e1fd['cmd'],'routeKey':_0x59e1fd[_0x3ad974(0x3e4)],'leaveReq':_0x59e1fd['data']});default:throw Error(_0x3ad974(0x2f6));}}const qe=(0x0,t[_0x4d465b(0x2f8)])(_0x4d465b(0x484));function Je(_0xf6a2fd,_0x409f2e,_0x13a0dd){const _0x4cc30a=_0x4d465b;return _0xf6a2fd+'/'+_0x409f2e+_0x4cc30a(0x395)+_0x13a0dd+_0x4cc30a(0x40e);}let Ye=class extends t[_0x4d465b(0x271)]{constructor(_0x53bf5e,_0x34c2fb,_0x2e9404,_0x4f1169,_0x3bb66c){const _0x405f36=_0x4d465b;super(),this[_0x405f36(0x26d)]=_0x53bf5e,this['_httpService']=_0x34c2fb,this[_0x405f36(0x367)]=_0x2e9404,this[_0x405f36(0x280)]=_0x4f1169,this[_0x405f36(0x1df)]=_0x3bb66c;}[_0x4d465b(0x492)](_0x44275e){const _0xe51b00=_0x4d465b;let _0x1ae980=this[_0xe51b00(0x26d)][_0xe51b00(0x34e)](l[_0xe51b00(0x19f)]);if(!_0x1ae980)throw Error(_0xe51b00(0x2b6));let _0x3fb850=_0x1ae980[_0xe51b00(0x4a6)](_0x44275e);if(!_0x3fb850)throw Error('[CollaborationSocketService]:\x20failed\x20to\x20create\x20socket!');let _0x20eae7=new t[(_0xe51b00(0x362))](),_0x58a245=new i[(_0xe51b00(0x40a))]();_0x20eae7['add'](_0x3fb850[_0xe51b00(0x1ed)][_0xe51b00(0x2b1)](_0x65e1ee=>_0x58a245['next'](_0x65e1ee))),_0x20eae7[_0xe51b00(0x489)]((0x0,t[_0xe51b00(0x27f)])(()=>_0x58a245[_0xe51b00(0x3d8)]()));let _0x336738=new i[(_0xe51b00(0x40a))]();_0x20eae7[_0xe51b00(0x489)](_0x3fb850[_0xe51b00(0x1d0)][_0xe51b00(0x2b1)](_0x2ec825=>_0x336738[_0xe51b00(0x3fc)](_0x2ec825))),_0x20eae7[_0xe51b00(0x489)]((0x0,t[_0xe51b00(0x27f)])(()=>_0x336738['complete']()));let _0x50b924=new i[(_0xe51b00(0x40a))]();_0x20eae7[_0xe51b00(0x489)](_0x3fb850[_0xe51b00(0x343)][_0xe51b00(0x2b1)](_0x9239dd=>{const _0x250659=_0xe51b00;let _0x5d75e1=Ge(_0x9239dd);_0x50b924[_0x250659(0x3fc)](_0x5d75e1);})),_0x20eae7[_0xe51b00(0x489)]((0x0,t[_0xe51b00(0x27f)])(()=>_0x50b924['complete']()));let _0x1d1790,_0x3c8223=()=>{const _0x5e603b=_0xe51b00;_0x336738['next'](new Event(_0x5e603b(0x4af))),_0x58a245[_0x5e603b(0x3fc)](new Event(_0x5e603b(0x4af))),_0x1d1790[_0x5e603b(0x1c9)]();};return _0x1d1790={'memberID':'','close$':_0x58a245[_0xe51b00(0x2f9)](),'error$':_0x336738[_0xe51b00(0x2f9)](),'open$':_0x3fb850[_0xe51b00(0x386)],'message$':_0x50b924[_0xe51b00(0x2f9)](),'send':_0x368a3d=>{const _0x19c57a=_0xe51b00;if(_0x368a3d[_0x19c57a(0x43e)]===a[_0x19c57a(0x235)][_0x19c57a(0x1e1)]){if(_0x368a3d[_0x19c57a(0x2db)][_0x19c57a(0x1f9)]===e[_0x19c57a(0x4a0)][_0x19c57a(0x1ae)]){this[_0x19c57a(0x36a)](_0x1d1790,_0x368a3d['data'])[_0x19c57a(0x435)](_0x192047=>{const _0x52dd6d=_0x19c57a;this[_0x52dd6d(0x280)]['error'](_0x192047),_0x3c8223();});return;}if(_0x368a3d[_0x19c57a(0x2db)][_0x19c57a(0x1f9)]===e[_0x19c57a(0x4a0)]['FETCH_MISSING']){let _0x6d1704=_0x368a3d[_0x19c57a(0x2db)];this['_fetchMissChangesets'](_0x6d1704)[_0x19c57a(0x481)](_0x2ee5f0=>{const _0x499aaa=_0x19c57a;_0x50b924[_0x499aaa(0x3fc)]({'cmd':a[_0x499aaa(0x235)][_0x499aaa(0x1d5)],'code':a[_0x499aaa(0x413)]['OK'],'routeKey':_0x6d1704[_0x499aaa(0x2db)][_0x499aaa(0x25a)],'routeType':'','data':{'eventID':e[_0x499aaa(0x4a0)][_0x499aaa(0x399)],'data':{'changesets':_0x2ee5f0}}});})['catch'](_0x5917c8=>{const _0x2c25f3=_0x19c57a;this[_0x2c25f3(0x280)][_0x2c25f3(0x38b)](_0x5917c8),_0x3c8223();});return;}}_0x3fb850[_0x19c57a(0x49f)](Ke(_0x368a3d));},'close':()=>{const _0x3ddd30=_0xe51b00;_0x3fb850[_0x3ddd30(0x1c9)](),_0x20eae7['dispose']();}},_0x1d1790;}async[_0x4d465b(0x36a)](_0x42c1ef,_0x47abc6){const _0x15d4cc=_0x4d465b;let {unitType:_0x3757f7,unitID:_0x18b806,changeset:_0x3067ea}=_0x47abc6[_0x15d4cc(0x2db)],_0x487a5c={'unitID':_0x18b806,'memberID':_0x42c1ef[_0x15d4cc(0x250)],'type':_0x3757f7,'changeset':(0x0,e['parseChangesetToProtocol'])(_0x3067ea)},_0x3a7d30=this[_0x15d4cc(0x367)][_0x15d4cc(0x35d)](m),_0x1ab992=Je((_0x3a7d30==null?void 0x0:_0x3a7d30[_0x15d4cc(0x4b0)])??_0x15d4cc(0x329),_0x3757f7,_0x18b806);try{await this[_0x15d4cc(0x219)][_0x15d4cc(0x2c1)](_0x1ab992,{'body':_0x487a5c});}catch(_0x4b1feb){throw this[_0x15d4cc(0x280)][_0x15d4cc(0x38b)](_0x15d4cc(0x322),_0x15d4cc(0x398)),_0x4b1feb;}}async['_fetchMissChangesets'](_0x4ad164){const _0x238da2=_0x4d465b;let {unitID:_0x59a15a,from:_0x109410,to:_0x3af05a,unitType:_0x3adc2}=_0x4ad164[_0x238da2(0x2db)];return(await this[_0x238da2(0x1df)]['fetchMissingChangesets']({'metadata':void 0x0},{'unitID':_0x59a15a,'type':_0x3adc2,'from':_0x109410,'to':_0x3af05a}))[_0x238da2(0x1c0)]['map'](_0x2be5bc=>((_0x2be5bc['mutations']===null||_0x2be5bc[_0x238da2(0x30d)]===void 0x0)&&(_0x2be5bc[_0x238da2(0x30d)]=[]),_0x2be5bc));}};Ye=y([v(0x0,(0x0,t[_0x4d465b(0x296)])(t['Injector'])),v(0x1,(0x0,t[_0x4d465b(0x296)])(l[_0x4d465b(0x315)])),v(0x2,t['IConfigService']),v(0x3,t[_0x4d465b(0x3cd)]),v(0x4,e[_0x4d465b(0x37b)])],Ye);const Xe=(0x0,t['createIdentifier'])(_0x4d465b(0x370));function Ze(_0x12a95f={}){const _0x3a0d3b=_0x4d465b;return _0x12a95f[_0x3a0d3b(0x1e6)]?{'resolveUnit':_0x12a95f[_0x3a0d3b(0x1e6)]}:{'resolveUnit':_0x2f885b=>({'target':{'unitId':_0x2f885b[_0x3a0d3b(0x4d7)],'unitType':_0x2f885b[_0x3a0d3b(0x44d)]}})};}function Qe(_0x1fa359,_0xdbd000,_0x81a794){const _0x38415d=_0x4d465b;let _0x65def8=_0x81a794['target'][_0x38415d(0x230)];if(_0x65def8!=null&&_0x65def8[_0x38415d(0x238)]()==='')throw Error('COLLABORATION_ENDPOINT_INVALID');if(!_0x81a794['target'][_0x38415d(0x4d7)])throw Error(_0x38415d(0x3cb));return{'localUnitId':_0x1fa359,'unitType':_0xdbd000,'target':{'endpoint':_0x65def8,'unitId':_0x81a794[_0x38415d(0x31d)][_0x38415d(0x4d7)],'unitType':_0x81a794[_0x38415d(0x31d)][_0x38415d(0x44d)]??_0xdbd000},'changeset':_0x81a794[_0x38415d(0x1f1)]};}let V=class extends t[_0x4d465b(0x271)]{constructor(_0x4fc76c,_0x506765,_0x382782,_0x430204,_0x5ddbef,_0x3ceddc,_0x5e51e0){const _0xc61f26=_0x4d465b;super(),this['_injector']=_0x4fc76c,this[_0xc61f26(0x280)]=_0x506765,this[_0xc61f26(0x367)]=_0x382782,this['_socketService']=_0x430204,this['_collaborationUIEventService']=_0x5ddbef,this[_0xc61f26(0x228)]=_0x3ceddc,this[_0xc61f26(0x27c)]=_0x5e51e0,g(this,_0xc61f26(0x301),new Map()),g(this,'_pendingSessions',new Map()),g(this,_0xc61f26(0x246),new Map()),g(this,_0xc61f26(0x3d3),new Map()),g(this,_0xc61f26(0x2d0),this[_0xc61f26(0x298)](void 0x0)[_0xc61f26(0x2d0)][_0xc61f26(0x2f9)]()),g(this,_0xc61f26(0x458),new i[(_0xc61f26(0x4bf))](0x0)),g(this,_0xc61f26(0x2d4),this[_0xc61f26(0x458)][_0xc61f26(0x2f9)]()),this[_0xc61f26(0x339)]();}[_0x4d465b(0x339)](){const _0xad9e33=_0x4d465b;this['_networkConditionService']&&this[_0xad9e33(0x43a)](this['_networkConditionService'][_0xad9e33(0x1a2)]['subscribe'](_0x5dd1a1=>{const _0x4443ea=_0xad9e33;_0x5dd1a1&&this[_0x4443ea(0x324)](),_0x5dd1a1||this[_0x4443ea(0x3d3)][_0x4443ea(0x2ea)](_0x122165=>this[_0x4443ea(0x30b)](_0x122165));}));}[_0x4d465b(0x380)](){const _0x1e1b6b=_0x4d465b;super['dispose'](),this[_0x1e1b6b(0x3d3)][_0x1e1b6b(0x2ea)](_0x229e67=>{const _0x4fb5dc=_0x1e1b6b;var _0x396488,_0xb133bd;(_0x396488=_0x229e67[_0x4fb5dc(0x306)])==null||_0x396488[_0x4fb5dc(0x4b2)](),_0x229e67[_0x4fb5dc(0x306)]=null,this['_clearRetryConnectingTimer'](_0x229e67),this[_0x4fb5dc(0x38c)](_0x229e67),this['_clearHeartbeatTimer'](_0x229e67),(_0xb133bd=_0x229e67[_0x4fb5dc(0x2d0)][_0x4fb5dc(0x24e)]())==null||_0xb133bd[_0x4fb5dc(0x1c9)](),_0x229e67[_0x4fb5dc(0x2d0)][_0x4fb5dc(0x3d8)]();}),this[_0x1e1b6b(0x3d3)]['clear'](),this[_0x1e1b6b(0x301)][_0x1e1b6b(0x2ea)](_0x2a13bd=>_0x2a13bd['dispose']()),this[_0x1e1b6b(0x301)][_0x1e1b6b(0x1f4)](),this['_sessionChannels'][_0x1e1b6b(0x1f4)](),this[_0x1e1b6b(0x458)][_0x1e1b6b(0x3d8)]();}async[_0x4d465b(0x47e)](_0x312823,_0x2e200c){const _0x261664=_0x4d465b;if(this[_0x261664(0x301)][_0x261664(0x396)](_0x312823))return this[_0x261664(0x301)][_0x261664(0x34e)](_0x312823);let _0xbc8096=this['_pendingSessions'][_0x261664(0x34e)](_0x312823);if(_0xbc8096)return _0xbc8096;let _0x107d77=this[_0x261664(0x3ab)](_0x312823,_0x2e200c);this[_0x261664(0x46f)][_0x261664(0x35e)](_0x312823,_0x107d77);try{return await _0x107d77;}finally{this[_0x261664(0x46f)]['delete'](_0x312823);}}async[_0x4d465b(0x3ab)](_0x55e6fa,_0x463ea8){const _0x14da25=_0x4d465b;let _0x274b0e=await this[_0x14da25(0x253)](_0x55e6fa,_0x463ea8),_0x36672a=this['_getSocketChannel'](_0x274b0e['target'][_0x14da25(0x230)]);this[_0x14da25(0x226)](_0x36672a);let _0x4f1a40=this['_injector'][_0x14da25(0x403)](ve,_0x274b0e,_0x36672a[_0x14da25(0x2d0)][_0x14da25(0x2f9)]());return this[_0x14da25(0x301)][_0x14da25(0x35e)](_0x55e6fa,_0x4f1a40),this[_0x14da25(0x246)][_0x14da25(0x35e)](_0x55e6fa,_0x36672a[_0x14da25(0x2b5)]),_0x4f1a40;}[_0x4d465b(0x264)](_0x3c163e){const _0x503da2=_0x4d465b;let _0x416898=this[_0x503da2(0x301)][_0x503da2(0x34e)](_0x3c163e),_0x130837=this[_0x503da2(0x246)]['get'](_0x3c163e);if(_0x416898&&(this[_0x503da2(0x301)][_0x503da2(0x2fa)](_0x3c163e),this[_0x503da2(0x246)][_0x503da2(0x2fa)](_0x3c163e),_0x416898[_0x503da2(0x1c9)]()),_0x130837&&!this[_0x503da2(0x1ab)](_0x130837)){var _0x358b50;let _0x3f58f3=this[_0x503da2(0x3d3)][_0x503da2(0x34e)](_0x130837);_0x3f58f3==null||(_0x358b50=_0x3f58f3['socket$']['getValue']())==null||_0x358b50['close']();}}['reconnect'](){const _0x976540=_0x4d465b;(this[_0x976540(0x3d3)]['size']?[...this[_0x976540(0x3d3)]['values']()]:[this[_0x976540(0x298)](void 0x0)])[_0x976540(0x2ea)](_0x4fa0c6=>{const _0x21700e=_0x976540;_0x4fa0c6[_0x21700e(0x45e)]=0x0,this['_clearRetryConnectingTimer'](_0x4fa0c6),this[_0x21700e(0x1db)](_0x4fa0c6);});}[_0x4d465b(0x1a6)](_0x2b75f4){const _0xbe2d0=_0x4d465b;_0x2b75f4[_0xbe2d0(0x2bb)]!=null&&(clearTimeout(_0x2b75f4['retryConnectingTimer']),_0x2b75f4[_0xbe2d0(0x2bb)]=null);}async[_0x4d465b(0x22c)](_0x246afb){const _0x4a13f0=_0x4d465b;let _0x1b391b=this[_0x4a13f0(0x367)][_0x4a13f0(0x35d)](m),_0x268aca=_0x246afb[_0x4a13f0(0x230)]??(_0x1b391b==null?void 0x0:_0x1b391b[_0x4a13f0(0x4bd)])??_0x4a13f0(0x2ac),_0x56a9ce=await this[_0x4a13f0(0x3ee)]['createSocket'](_0x268aca);return _0x246afb['candidateSocket']=_0x56a9ce,_0x56a9ce;}async[_0x4d465b(0x226)](_0x1ad162){const _0x1acbf6=_0x4d465b;try{let _0x1b7de6=_0x1ad162[_0x1acbf6(0x2d0)][_0x1acbf6(0x24e)]()??_0x1ad162[_0x1acbf6(0x252)]??await this[_0x1acbf6(0x22c)](_0x1ad162);if(_0x1b7de6){var _0x490e4;let _0xd697eb=_0x1b7de6[_0x1acbf6(0x49f)];_0x1b7de6[_0x1acbf6(0x49f)]=_0x276502=>(_0x276502['cmd']!==a[_0x1acbf6(0x235)]['LEAVE']&&this[_0x1acbf6(0x40c)](_0x1ad162),_0xd697eb[_0x1acbf6(0x269)](_0x1b7de6,[_0x276502])),(_0x490e4=_0x1ad162[_0x1acbf6(0x306)])==null||_0x490e4[_0x1acbf6(0x4b2)](),_0x1ad162['socketMessageSubscription']=null,_0x1ad162[_0x1acbf6(0x306)]=_0x1b7de6[_0x1acbf6(0x343)][_0x1acbf6(0x2b1)](_0x49a641=>this[_0x1acbf6(0x1ad)](_0x1ad162,_0x1b7de6,_0x49a641)),_0x1b7de6[_0x1acbf6(0x1d0)][_0x1acbf6(0x30c)]((0x0,s[_0x1acbf6(0x3d1)])(0x1))[_0x1acbf6(0x2b1)](_0x5bc5d5=>this[_0x1acbf6(0x280)][_0x1acbf6(0x38b)](_0x1acbf6(0x4a8),_0x5bc5d5)),_0x1b7de6[_0x1acbf6(0x386)][_0x1acbf6(0x30c)]((0x0,s[_0x1acbf6(0x3d1)])(0x1))[_0x1acbf6(0x2b1)](()=>{this['_onConnectionOpen'](_0x1ad162,_0x1b7de6);}),_0x1b7de6[_0x1acbf6(0x1ed)][_0x1acbf6(0x30c)]((0x0,s[_0x1acbf6(0x3d1)])(0x1))['subscribe'](_0x5b6df8=>{const _0x3c4e54=_0x1acbf6;this[_0x3c4e54(0x280)]['debug'](_0x3c4e54(0x4db),_0x3c4e54(0x471),_0x5b6df8),this[_0x3c4e54(0x421)](_0x1ad162);});}}catch(_0x2710f6){this[_0x1acbf6(0x280)][_0x1acbf6(0x38b)](_0x2710f6),this[_0x1acbf6(0x421)](_0x1ad162);}}['_onConnectionOpen'](_0x2e7cdb,_0x402438){const _0x5d928f=_0x4d465b;this[_0x5d928f(0x280)][_0x5d928f(0x19c)](_0x5d928f(0x4db),_0x5d928f(0x40b)),_0x402438['send']({'cmd':a[_0x5d928f(0x235)]['HELLO']}),this[_0x5d928f(0x40c)](_0x2e7cdb);}[_0x4d465b(0x30b)](_0x2818ca){const _0x25bce3=_0x4d465b;_0x2818ca[_0x25bce3(0x1ca)]=!0x1,_0x2818ca[_0x25bce3(0x252)]=null,this[_0x25bce3(0x458)][_0x25bce3(0x3fc)](0x2),_0x2818ca[_0x25bce3(0x2d0)][_0x25bce3(0x3fc)](null),this[_0x25bce3(0x38c)](_0x2818ca),this['_clearHeartbeatTimer'](_0x2818ca);}[_0x4d465b(0x421)](_0x58588e){const _0x4481b8=_0x4d465b;this[_0x4481b8(0x30b)](_0x58588e),this[_0x4481b8(0x1ab)](_0x58588e[_0x4481b8(0x2b5)])&&(_0x58588e[_0x4481b8(0x45e)]<(this[_0x4481b8(0x367)]['getConfig'](_0x4481b8(0x215))??0x3)?(this[_0x4481b8(0x454)]['emitEvent']({'id':'SOCKET_FAILED_RETRY'}),this[_0x4481b8(0x1db)](_0x58588e)):this[_0x4481b8(0x454)][_0x4481b8(0x316)]({'id':_0x4481b8(0x402)}));}['_tryReconnect'](_0x378f63){const _0x5aa975=_0x4d465b;let _0x5ee211=_0x378f63[_0x5aa975(0x45e)],_0x7773bb=this[_0x5aa975(0x367)][_0x5aa975(0x35d)](m),_0x94f94c=_0x5ee211===0x0?0x0:((_0x7773bb==null?void 0x0:_0x7773bb[_0x5aa975(0x4d8)])??0x4e20)*0x2**_0x5ee211;_0x378f63[_0x5aa975(0x2bb)]=setTimeout(()=>{const _0x3be1f6=_0x5aa975;clearTimeout(_0x378f63['retryConnectingTimer']),_0x378f63[_0x3be1f6(0x2bb)]=null,this[_0x3be1f6(0x226)](_0x378f63);},_0x94f94c),_0x378f63[_0x5aa975(0x45e)]+=0x1;}async[_0x4d465b(0x253)](_0x1fbbdb,_0x4c4381){const _0x43683c=_0x4d465b;return Qe(_0x1fbbdb,_0x4c4381,await this[_0x43683c(0x228)][_0x43683c(0x1e6)]({'unitId':_0x1fbbdb,'unitType':_0x4c4381}));}[_0x4d465b(0x1ad)](_0x307fa5,_0x591002,_0xf620b0){const _0x3b5035=_0x4d465b;let {cmd:_0x401f0c}=_0xf620b0;_0x401f0c===a['CombCmd']['HELLO']&&!_0x307fa5[_0x3b5035(0x1ca)]&&(_0x591002[_0x3b5035(0x250)]=_0xf620b0['data'][_0x3b5035(0x250)],_0x307fa5[_0x3b5035(0x2d0)][_0x3b5035(0x3fc)](_0x591002),this['_status$'][_0x3b5035(0x3fc)](0x3),_0x307fa5[_0x3b5035(0x1ca)]=!0x0,_0x307fa5[_0x3b5035(0x252)]=null),_0x401f0c===a[_0x3b5035(0x235)][_0x3b5035(0x485)]&&this[_0x3b5035(0x38c)](_0x307fa5),this[_0x3b5035(0x40c)](_0x307fa5);}[_0x4d465b(0x1ab)](_0x57ce3b){const _0xf1e46f=_0x4d465b;return[...this[_0xf1e46f(0x246)][_0xf1e46f(0x3ad)]()][_0xf1e46f(0x2a4)](_0x10e1e3=>_0x10e1e3===_0x57ce3b);}[_0x4d465b(0x298)](_0x5723f0){const _0x35af1a=_0x4d465b;let _0x3d3832=_0x5723f0??'',_0x49a885=this[_0x35af1a(0x3d3)][_0x35af1a(0x34e)](_0x3d3832);if(_0x49a885)return _0x49a885;let _0x23f6c0={'endpointKey':_0x3d3832,'endpoint':_0x5723f0,'socket$':new i['BehaviorSubject'](void 0x0),'candidateSocket':null,'socketReady':!0x1,'socketMessageSubscription':null,'retryConnectingTimer':null,'retryCount':0x0,'sendHeartbeatTimer':null,'timeoutTimer':null};return this[_0x35af1a(0x3d3)]['set'](_0x3d3832,_0x23f6c0),_0x23f6c0;}[_0x4d465b(0x40c)](_0x4e87ac){const _0xf66b27=_0x4d465b;this[_0xf66b27(0x26c)](_0x4e87ac),_0x4e87ac[_0xf66b27(0x2f2)]=setTimeout(()=>this[_0xf66b27(0x387)](_0x4e87ac),this['_configService'][_0xf66b27(0x35d)](_0xf66b27(0x221))??0x7530);}[_0x4d465b(0x387)](_0x3eece9){const _0xfd37ee=_0x4d465b;_0x3eece9[_0xfd37ee(0x2d0)][_0xfd37ee(0x24e)]()[_0xfd37ee(0x49f)]({'cmd':a['CombCmd']['HEARTBEAT']}),this['_waitForHeartbeatResponse'](_0x3eece9);}[_0x4d465b(0x3e7)](_0x2ce435){const _0x66df54=_0x4d465b;_0x2ce435[_0x66df54(0x194)]=setTimeout(()=>this[_0x66df54(0x421)](_0x2ce435),this[_0x66df54(0x367)]['getConfig'](_0x66df54(0x3d6))??0x4e20);}['_clearHeartbeatTimer'](_0x328769){const _0x31d359=_0x4d465b;_0x328769[_0x31d359(0x2f2)]!=null&&(clearTimeout(_0x328769[_0x31d359(0x2f2)]),_0x328769[_0x31d359(0x2f2)]=null);}[_0x4d465b(0x38c)](_0x16e9a1){const _0xc19cc1=_0x4d465b;_0x16e9a1['timeoutTimer']!=null&&(clearTimeout(_0x16e9a1[_0xc19cc1(0x194)]),_0x16e9a1[_0xc19cc1(0x194)]=null);}};V=y([v(0x0,(0x0,t['Inject'])(t['Injector'])),v(0x1,t[_0x4d465b(0x3cd)]),v(0x2,t[_0x4d465b(0x1b6)]),v(0x3,qe),v(0x4,(0x0,t['Inject'])(_)),v(0x5,Xe),v(0x6,(0x0,t[_0x4d465b(0x417)])(We))],V);let H=class extends t[_0x4d465b(0x3b5)]{constructor(_0xb04ee0,_0x1f02df,_0x95f254,_0x28a525){const _0x543c0c=_0x4d465b;var _0x5a2e9d;super(),this[_0x543c0c(0x26d)]=_0xb04ee0,this['_collabSessionService']=_0x1f02df,this[_0x543c0c(0x367)]=_0x95f254,this[_0x543c0c(0x2dd)]=_0x28a525,g(this,_0x543c0c(0x429),new Map()),g(this,'_entityInit$',new i[(_0x543c0c(0x40a))]()),g(this,_0x543c0c(0x2ca),this[_0x543c0c(0x475)]['asObservable']()),((_0x5a2e9d=this[_0x543c0c(0x367)][_0x543c0c(0x35d)]('collaboration-client.config'))==null?void 0x0:_0x5a2e9d[_0x543c0c(0x2bf)])!==!0x1&&this[_0x543c0c(0x3bd)]();}[_0x4d465b(0x380)](){const _0x36fbbb=_0x4d465b;super[_0x36fbbb(0x380)](),this[_0x36fbbb(0x429)]['forEach'](_0x266dd7=>_0x266dd7[_0x36fbbb(0x380)]()),this[_0x36fbbb(0x429)][_0x36fbbb(0x1f4)]();}[_0x4d465b(0x2fd)](_0x1761b3){const _0x4b0156=_0x4d465b;return this[_0x4b0156(0x429)][_0x4b0156(0x34e)](_0x1761b3)??null;}[_0x4d465b(0x29c)](_0x38ceba){const _0x65852b=_0x4d465b;let _0x306e02=this['getCollabEntity'](_0x38ceba);return _0x306e02?(0x0,i['of'])(_0x306e02):this[_0x65852b(0x475)]['pipe']((0x0,s[_0x65852b(0x4d1)])(_0x49d718=>_0x49d718[_0x65852b(0x25a)]===_0x38ceba));}[_0x4d465b(0x35f)](_0xa8331d){const _0x511446=_0x4d465b;return(0x0,i[_0x511446(0x2f7)])(this[_0x511446(0x29c)](_0xa8331d)[_0x511446(0x30c)]((0x0,s[_0x511446(0x1f2)])(()=>void 0x0)));}[_0x4d465b(0x3bd)](){const _0x17b3f4=_0x4d465b;this[_0x17b3f4(0x2dd)]['getTypeOfUnitAdded$'](t['UniverInstanceType'][_0x17b3f4(0x459)])[_0x17b3f4(0x30c)]((0x0,i[_0x17b3f4(0x4a9)])(this[_0x17b3f4(0x1ec)]),(0x0,s[_0x17b3f4(0x218)])(0x10))[_0x17b3f4(0x2b1)](async _0x3ed5dc=>{const _0x3b1517=_0x17b3f4;let _0x1d57e8=_0x3ed5dc['unit'][_0x3b1517(0x48f)](),_0x19df1f=await this['_startCollaboration'](_0x1d57e8,t[_0x3b1517(0x410)]['UNIVER_SHEET']);this[_0x3b1517(0x429)][_0x3b1517(0x35e)](_0x1d57e8,_0x19df1f);}),this[_0x17b3f4(0x2dd)]['getTypeOfUnitAdded$'](t[_0x17b3f4(0x410)][_0x17b3f4(0x24a)])[_0x17b3f4(0x30c)]((0x0,i[_0x17b3f4(0x4a9)])(this[_0x17b3f4(0x1ec)]),(0x0,s['delay'])(0x10))[_0x17b3f4(0x30c)]((0x0,s[_0x17b3f4(0x4d1)])(_0x145bc7=>!_0x145bc7[_0x17b3f4(0x44c)][_0x17b3f4(0x48f)]()[_0x17b3f4(0x1cd)]('__')))[_0x17b3f4(0x2b1)](async _0x3fe08c=>{const _0x204264=_0x17b3f4;let _0x3c6cf3=_0x3fe08c[_0x204264(0x44c)][_0x204264(0x48f)](),_0x13c569=await this[_0x204264(0x49e)](_0x3c6cf3,t['UniverInstanceType']['UNIVER_DOC']);this[_0x204264(0x429)][_0x204264(0x35e)](_0x3c6cf3,_0x13c569);}),this[_0x17b3f4(0x2dd)][_0x17b3f4(0x2c9)](t[_0x17b3f4(0x410)]['UNIVER_SLIDE'])[_0x17b3f4(0x30c)]((0x0,i[_0x17b3f4(0x4a9)])(this[_0x17b3f4(0x1ec)]),(0x0,s[_0x17b3f4(0x218)])(0x10))[_0x17b3f4(0x2b1)](async _0x259b61=>{const _0x217bbd=_0x17b3f4;let _0x1066e6=_0x259b61[_0x217bbd(0x44c)][_0x217bbd(0x48f)](),_0x4b3a60=await this[_0x217bbd(0x49e)](_0x1066e6,t[_0x217bbd(0x410)][_0x217bbd(0x2b9)]);this[_0x217bbd(0x429)][_0x217bbd(0x35e)](_0x1066e6,_0x4b3a60);}),this[_0x17b3f4(0x2dd)][_0x17b3f4(0x2c9)](t[_0x17b3f4(0x410)][_0x17b3f4(0x216)])['pipe']((0x0,i['takeUntil'])(this[_0x17b3f4(0x1ec)]),(0x0,s[_0x17b3f4(0x218)])(0x10))[_0x17b3f4(0x2b1)](async _0xf2aba6=>{const _0x3a18e3=_0x17b3f4;let _0x4f774e=_0xf2aba6[_0x3a18e3(0x44c)][_0x3a18e3(0x48f)](),_0x38fde8=await this['_startCollaboration'](_0x4f774e,t[_0x3a18e3(0x410)][_0x3a18e3(0x216)]);this['_entities'][_0x3a18e3(0x35e)](_0x4f774e,_0x38fde8);}),this['_univerInstanceService'][_0x17b3f4(0x2c9)](t['UniverInstanceType']['UNIVER_BASE'])[_0x17b3f4(0x30c)]((0x0,i[_0x17b3f4(0x4a9)])(this[_0x17b3f4(0x1ec)]),(0x0,s['delay'])(0x10))['subscribe'](async _0x3a2cd7=>{const _0xa0fccb=_0x17b3f4;let _0x2e3b2f=_0x3a2cd7['unit']['getUnitId'](),_0x3d2f83=await this[_0xa0fccb(0x49e)](_0x2e3b2f,t[_0xa0fccb(0x410)][_0xa0fccb(0x376)]);this[_0xa0fccb(0x429)][_0xa0fccb(0x35e)](_0x2e3b2f,_0x3d2f83);}),this[_0x17b3f4(0x2dd)][_0x17b3f4(0x2c9)](t[_0x17b3f4(0x410)][_0x17b3f4(0x206)])[_0x17b3f4(0x30c)]((0x0,i[_0x17b3f4(0x4a9)])(this['dispose$']),(0x0,s[_0x17b3f4(0x218)])(0x10))['subscribe'](async _0x1873f7=>{const _0x48b78c=_0x17b3f4;let _0x538ad2=_0x1873f7[_0x48b78c(0x44c)]['getUnitId'](),_0x3126d3=await this['_startCollaboration'](_0x538ad2,t['UniverInstanceType'][_0x48b78c(0x206)]);this[_0x48b78c(0x429)]['set'](_0x538ad2,_0x3126d3);}),(0x0,i[_0x17b3f4(0x2dc)])(this[_0x17b3f4(0x2dd)][_0x17b3f4(0x1b8)](t[_0x17b3f4(0x410)][_0x17b3f4(0x459)]),this['_univerInstanceService']['getTypeOfUnitDisposed$'](t['UniverInstanceType'][_0x17b3f4(0x24a)]),this['_univerInstanceService'][_0x17b3f4(0x1b8)](t[_0x17b3f4(0x410)][_0x17b3f4(0x2b9)]),this['_univerInstanceService'][_0x17b3f4(0x1b8)](t[_0x17b3f4(0x410)][_0x17b3f4(0x216)]),this[_0x17b3f4(0x2dd)][_0x17b3f4(0x1b8)](t['UniverInstanceType'][_0x17b3f4(0x376)]),this[_0x17b3f4(0x2dd)][_0x17b3f4(0x1b8)](t[_0x17b3f4(0x410)][_0x17b3f4(0x206)]))[_0x17b3f4(0x30c)]((0x0,i['takeUntil'])(this[_0x17b3f4(0x1ec)]))[_0x17b3f4(0x2b1)](_0x46b031=>{const _0x2c1a50=_0x17b3f4;let _0x28e162=_0x46b031[_0x2c1a50(0x48f)](),_0x272e0a=this[_0x2c1a50(0x429)]['get'](_0x28e162);_0x272e0a&&(_0x272e0a['dispose'](),this[_0x2c1a50(0x429)][_0x2c1a50(0x2fa)](_0x28e162));});}async[_0x4d465b(0x49e)](_0x455b0f,_0x68e185){const _0x5d39e1=_0x4d465b;let _0x3f4daf=await this['_collabSessionService'][_0x5d39e1(0x47e)](_0x455b0f),_0x403cff=this[_0x5d39e1(0x26d)][_0x5d39e1(0x403)](this[_0x5d39e1(0x464)](_0x68e185),_0x455b0f,_0x68e185,_0x3f4daf);return await _0x403cff['init'](),this[_0x5d39e1(0x475)]['next'](_0x403cff),_0x403cff;}[_0x4d465b(0x464)](_0x860e11){const _0x83fdcb=_0x4d465b;switch(_0x860e11){case t[_0x83fdcb(0x410)][_0x83fdcb(0x24a)]:return F;case t[_0x83fdcb(0x410)][_0x83fdcb(0x459)]:return L;case t[_0x83fdcb(0x410)][_0x83fdcb(0x2b9)]:return R;case t[_0x83fdcb(0x410)][_0x83fdcb(0x216)]:return z;case t[_0x83fdcb(0x410)][_0x83fdcb(0x376)]:return I;case t[_0x83fdcb(0x410)][_0x83fdcb(0x206)]:return B;default:throw Error(_0x83fdcb(0x34f)+_0x860e11);}}};H=y([v(0x0,(0x0,t[_0x4d465b(0x296)])(t[_0x4d465b(0x49b)])),v(0x1,(0x0,t['Inject'])(V)),v(0x2,t['IConfigService']),v(0x3,t[_0x4d465b(0x2af)])],H);var $e=_0x4d465b(0x4d3),et=_0x4d465b(0x29e);let tt=class extends t['Disposable']{constructor(_0x11a27f,_0x396362){const _0x2d52af=_0x4d465b;super(),this[_0x2d52af(0x2dd)]=_0x11a27f,this['_configService']=_0x396362,this[_0x2d52af(0x3bd)]();}[_0x4d465b(0x3bd)](){const _0x106828=_0x4d465b;this[_0x106828(0x43a)](this[_0x106828(0x2dd)]['focused$'][_0x106828(0x2b1)](()=>{const _0x4826b6=_0x106828;let _0x577167=this[_0x4826b6(0x2dd)][_0x4826b6(0x232)](),_0x162c90=this['_configService'][_0x4826b6(0x35d)](_0x4826b6(0x34d))??'Univer';_0x577167 instanceof t['Workbook']&&(_0x162c90=_0x577167[_0x4826b6(0x21d)]),document['title']=_0x162c90;}));}};tt=y([v(0x0,t[_0x4d465b(0x2af)]),v(0x1,t['IConfigService'])],tt);const nt=(0x0,t[_0x4d465b(0x2f8)])(_0x4d465b(0x2cd));let U=class{constructor(_0x286356,_0x28a970,_0x2b6de6){const _0x441d54=_0x4d465b;this[_0x441d54(0x219)]=_0x286356,this[_0x441d54(0x367)]=_0x28a970,this[_0x441d54(0x2dd)]=_0x2b6de6;}[_0x4d465b(0x3e5)](){const _0x2d2f86=_0x4d465b;return this['_getConfig']()[_0x2d2f86(0x49c)]??{};}async[_0x4d465b(0x4cb)](_0x2033a3){const _0x2fb689=_0x4d465b;let _0x23bb40=this[_0x2fb689(0x3e5)]();if(rt(_0x2033a3,_0x23bb40),_0x23bb40[_0x2fb689(0x3ce)])return _0x23bb40[_0x2fb689(0x3ce)](_0x2033a3);let _0x230cf8=await this[_0x2fb689(0x2e5)](_0x2033a3);return{'id':_0x230cf8,'name':_0x2033a3['name'],'mimeType':_0x2033a3['type'],'size':_0x2033a3[_0x2fb689(0x304)],'sourceType':t['ImageSourceType']['UUID'],'source':_0x230cf8};}async[_0x4d465b(0x22b)](_0x1a3c5f,_0x594737){const _0x1abbb4=_0x4d465b;if(_0x594737!==t[_0x1abbb4(0x2b2)][_0x1abbb4(0x245)])return _0x1a3c5f;let _0x26534b=(await this[_0x1abbb4(0x219)][_0x1abbb4(0x34e)](this[_0x1abbb4(0x20f)]()[_0x1abbb4(0x355)](_0x1abbb4(0x3ae),_0x1a3c5f)))[_0x1abbb4(0x352)];if(_0x26534b[_0x1abbb4(0x38b)]&&_0x26534b[_0x1abbb4(0x38b)][_0x1abbb4(0x2c8)]!==a[_0x1abbb4(0x39d)]['OK'])throw _0x26534b[_0x1abbb4(0x38b)];if(!_0x26534b[_0x1abbb4(0x3b1)])throw Error('[CollaborationAttachmentIoService]:\x20failed\x20to\x20resolve\x20attachment\x20URL.');return(0x0,t[_0x1abbb4(0x353)])(_0x26534b[_0x1abbb4(0x3b1)],this['_getDownloadEndpointURL']());}async[_0x4d465b(0x2e5)](_0x3c3080){const _0x59511b=_0x4d465b;let _0xa742fd=this[_0x59511b(0x2dd)][_0x59511b(0x232)](),_0x2e94ec=_0xa742fd==null?void 0x0:_0xa742fd[_0x59511b(0x48f)]();if(!_0x2e94ec)throw Error(_0x59511b(0x424));let _0x25113a=new FormData();_0x25113a[_0x59511b(0x445)](_0x59511b(0x4ba),_0x3c3080);let _0x4ce27b=this[_0x59511b(0x3fe)]()+_0x59511b(0x262)+_0x3c3080[_0x59511b(0x304)][_0x59511b(0x4ac)]()+_0x59511b(0x356)+a[_0x59511b(0x4a5)]['UnitEmbedded']+_0x59511b(0x345)+encodeURIComponent(_0x2e94ec),_0x363147=(await this[_0x59511b(0x219)][_0x59511b(0x2c1)](_0x4ce27b,{'body':_0x25113a}))[_0x59511b(0x352)]['FileId'];if(typeof _0x363147!='string'||!_0x363147)throw Error(_0x59511b(0x3da));return _0x363147;}[_0x4d465b(0x3fe)](){const _0x444af7=_0x4d465b;return this['_getConfig']()['uploadFileServerUrl']??_0x444af7(0x48d);}[_0x4d465b(0x20f)](){const _0x3a9df1=_0x4d465b;return this[_0x3a9df1(0x29b)]()[_0x3a9df1(0x3a6)]??'/universer-api/file/{fileID}/sign-url';}[_0x4d465b(0x20a)](){const _0x1719d8=_0x4d465b;let _0x3339d7=this[_0x1719d8(0x29b)]();return _0x3339d7[_0x1719d8(0x311)]?_0x3339d7[_0x1719d8(0x311)]:typeof location<'u'?location[_0x1719d8(0x497)]:_0x3339d7[_0x1719d8(0x3a3)]??'';}[_0x4d465b(0x29b)](){const _0x3fd4a9=_0x4d465b;return this[_0x3fd4a9(0x367)][_0x3fd4a9(0x35d)](_0x3fd4a9(0x379))??{};}};U=y([v(0x0,(0x0,t['Inject'])(l['HTTPService'])),v(0x1,(0x0,t[_0x4d465b(0x296)])(t[_0x4d465b(0x1b6)])),v(0x2,(0x0,t['Inject'])(t[_0x4d465b(0x2af)]))],U);function rt(_0x3c3e08,_0xfeb3e8){const _0x56353c=_0x4d465b;var _0x329890;if(_0xfeb3e8['maxSize']!=null&&_0x3c3e08[_0x56353c(0x304)]>_0xfeb3e8[_0x56353c(0x21f)])throw Error(_0x56353c(0x30e));if((_0x329890=_0xfeb3e8[_0x56353c(0x32c)])!=null&&_0x329890[_0x56353c(0x41f)]&&!_0xfeb3e8[_0x56353c(0x32c)][_0x56353c(0x2a4)](_0x4f5a10=>_0x3c3e08[_0x56353c(0x487)]===_0x4f5a10||_0x3c3e08['name'][_0x56353c(0x1c2)](_0x4f5a10)||_0x4f5a10[_0x56353c(0x1c2)]('/*')&&_0x3c3e08['type'][_0x56353c(0x1cd)](_0x4f5a10[_0x56353c(0x297)](0x0,-0x1))))throw Error(_0x56353c(0x4c8));}let W=class{constructor(_0x2881eb,_0x40c6bd,_0x2a4a6f){const _0x45c645=_0x4d465b;this[_0x45c645(0x367)]=_0x2881eb,this['_httpService']=_0x40c6bd,this[_0x45c645(0x3d9)]=_0x2a4a6f,this[_0x45c645(0x1ac)]();}['init'](){const _0x199ade=_0x4d465b;this[_0x199ade(0x219)][_0x199ade(0x1e2)]({'priority':0x1,'interceptor':(_0x3a60b1,_0x371811)=>_0x371811(_0x3a60b1)[_0x199ade(0x30c)]((0x0,i[_0x199ade(0x247)])(async _0x57c6ce=>{const _0x4e36ab=_0x199ade;let _0x3bf533=_0x57c6ce;if(_0x3bf533[_0x4e36ab(0x19e)]===0x191){if(typeof window>'u')throw Error(_0x4e36ab(0x409));if(window[_0x4e36ab(0x425)](this[_0x4e36ab(0x3d9)]['t'](_0x4e36ab(0x23c)))){let _0x1623d5=window[_0x4e36ab(0x309)](window['location'][_0x4e36ab(0x452)]);window[_0x4e36ab(0x469)][_0x4e36ab(0x452)]=this[_0x4e36ab(0x430)]()+_0x4e36ab(0x3b9)+_0x1623d5;}}return _0x3bf533;}))});}[_0x4d465b(0x430)](){const _0x2dedb0=_0x4d465b;let _0x28d70f=this['_configService'][_0x2dedb0(0x35d)](m);return(_0x28d70f==null?void 0x0:_0x28d70f[_0x2dedb0(0x242)])??_0x2dedb0(0x4d4);}};W=y([v(0x0,t['IConfigService']),v(0x1,(0x0,t[_0x4d465b(0x296)])(l[_0x4d465b(0x315)])),v(0x2,(0x0,t[_0x4d465b(0x296)])(t[_0x4d465b(0x327)]))],W);let G=class extends t['Disposable']{constructor(_0x68da7d,_0x31df49){const _0x170228=_0x4d465b;super(),this[_0x170228(0x259)]=_0x68da7d,this[_0x170228(0x367)]=_0x31df49,g(this,_0x170228(0x2ae),!0x1),this[_0x170228(0x3c3)]();}[_0x4d465b(0x3c3)](){const _0x57389f=_0x4d465b;let _0x320e7a=this;this[_0x57389f(0x43a)](this[_0x57389f(0x259)][_0x57389f(0x1e2)]({'priority':0x3e7,'interceptor':(0x0,l[_0x57389f(0x2e2)])({'isMatch'(_0x46f94c){const _0xd249b5=_0x57389f;var _0x23e8d6;if(_0x46f94c[_0xd249b5(0x21c)]===_0xd249b5(0x1bb)&&(_0x23e8d6=_0x46f94c[_0xd249b5(0x41b)])!=null&&_0x23e8d6['body']){let {objectID:_0x229349,objectType:_0x1489d3}=_0x46f94c['requestParams']['body']||{};if(!_0x229349||_0x1489d3===void 0x0)return!0x1;let _0x4419a2=_0x320e7a[_0xd249b5(0x2e9)]()+'/'+_0x1489d3+'/object/'+encodeURIComponent(_0x229349)+_0xd249b5(0x220);if(_0x46f94c[_0xd249b5(0x3b1)]===_0x4419a2)return!0x0;}return!0x1;},'getParamsFromRequest'(_0x814ee1){const _0x1dac11=_0x57389f;var _0x568204;return(_0x568204=_0x814ee1[_0x1dac11(0x41b)])==null?void 0x0:_0x568204[_0x1dac11(0x352)];},'mergeParamsToRequest'(_0x5b5512,_0x3f7b81){const _0x27aa54=_0x57389f;let _0x466287=_0x320e7a[_0x27aa54(0x2e9)]()+'/-/object/-/batch_allowed',_0x5b8f13=_0x5b5512[_0x27aa54(0x3ac)]((_0x4fa30b,_0x493d72)=>{const _0x3eca1b=_0x27aa54;let {unitID:_0x2ce518,objectID:_0x1c248f,objectType:_0x4b03c2,actions:_0x5755a9}=_0x493d72;return _0x4fa30b[_0x2ce518]||(_0x4fa30b[_0x2ce518]={}),_0x4fa30b[_0x2ce518][_0x1c248f]||(_0x4fa30b[_0x2ce518][_0x1c248f]={'objectID':_0x1c248f,'objectType':_0x4b03c2,'actions':[]}),_0x4fa30b[_0x2ce518][_0x1c248f][_0x3eca1b(0x2d7)][_0x3eca1b(0x41d)](..._0x5755a9),_0x4fa30b;},{}),_0x640040=[];for(let _0x5e86af in _0x5b8f13)for(let _0x1936b0 in _0x5b8f13[_0x5e86af]){let {actions:_0x2b99c9,objectType:_0x4df499}=_0x5b8f13[_0x5e86af][_0x1936b0],_0x19feb9=[...new Set(_0x2b99c9)];_0x640040['push']({'unitID':_0x5e86af,'objectID':_0x1936b0,'objectType':_0x4df499,'actions':_0x19feb9});}return new l[(_0x27aa54(0x2f0))](_0x27aa54(0x1bb),_0x466287,{'headers':_0x3f7b81[_0x27aa54(0x3e0)],'withCredentials':_0x3f7b81[_0x27aa54(0x275)],'responseType':_0x3f7b81[_0x27aa54(0x4a1)],'body':{'requests':_0x640040}});}},{'distributeResult'(_0x3cd944,_0x2901f3){const _0x58ad64=_0x57389f;let {objectActions:_0x163010}=_0x3cd944;return _0x2901f3[_0x58ad64(0x1f2)](_0x486c85=>{const _0x311439=_0x58ad64;let {unitID:_0x2845a6,objectID:_0x2cb6a1,actions:_0x214db6}=_0x486c85,_0x2fdfcc=_0x163010['find'](_0x6279ff=>_0x6279ff[_0x311439(0x25a)]===_0x2845a6&&_0x6279ff[_0x311439(0x23f)]===_0x2cb6a1);return{'config':_0x486c85,'result':{'actions':_0x214db6[_0x311439(0x1f2)](_0x148553=>_0x2fdfcc==null?void 0x0:_0x2fdfcc[_0x311439(0x2d7)][_0x311439(0x1a0)](_0x531290=>_0x531290[_0x311439(0x457)]===_0x148553))['filter'](_0x1f0c39=>!!_0x1f0c39),'error':_0x3cd944[_0x311439(0x38b)]}};});}})}));}[_0x4d465b(0x2e9)](){const _0x2f44bc=_0x4d465b;let _0x26a5fc=this['_configService'][_0x2f44bc(0x35d)](m);return(_0x26a5fc==null?void 0x0:_0x26a5fc['authzUrl'])??'/universer-api/authz';}async[_0x4d465b(0x3a7)](_0x3bc211){const _0x425066=_0x4d465b;let _0x2e9e3c=this['_getAPIPrefixPath']()+'/'+_0x3bc211['objectType']+_0x425066(0x400);return(await this[_0x425066(0x259)]['post'](_0x2e9e3c,{'body':_0x3bc211}))[_0x425066(0x352)][_0x425066(0x23f)]||'';}async['list'](_0x448b5c){const _0xb924ef=_0x4d465b;let _0x26ac1a=this[_0xb924ef(0x2e9)]()+'/-/object/list';return(await this[_0xb924ef(0x259)][_0xb924ef(0x2c1)](_0x26ac1a,{'body':_0x448b5c}))[_0xb924ef(0x352)][_0xb924ef(0x2a5)];}async[_0x4d465b(0x48c)](_0x145a26){const _0x27e896=_0x4d465b;var _0x8aec0f;let _0x3d3b99=this['_getAPIPrefixPath']()+'/'+_0x145a26[_0x27e896(0x45d)]+'/object/'+encodeURIComponent(_0x145a26[_0x27e896(0x23f)]),_0x1c603c=await this[_0x27e896(0x259)][_0x27e896(0x1fe)](_0x3d3b99,{'body':_0x145a26});if((_0x1c603c==null||(_0x8aec0f=_0x1c603c['body'])==null||(_0x8aec0f=_0x8aec0f['error'])==null?void 0x0:_0x8aec0f[_0x27e896(0x2c8)])!==0x1)throw Error(_0x27e896(0x349));}async['allowed'](_0x4bc3c4){const _0x4dd1da=_0x4d465b;let _0x51ba3f=this[_0x4dd1da(0x2e9)]()+'/'+_0x4bc3c4['objectType']+_0x4dd1da(0x227)+encodeURIComponent(_0x4bc3c4['objectID'])+_0x4dd1da(0x220);return(await this[_0x4dd1da(0x259)][_0x4dd1da(0x2c1)](_0x51ba3f,{'body':_0x4bc3c4}))['body'][_0x4dd1da(0x2d7)];}async['batchAllowed'](_0x5ac829){const _0xf27723=_0x4d465b;let _0x256b1a=this[_0xf27723(0x2e9)]()+_0xf27723(0x3e3);return(await this[_0xf27723(0x259)]['post'](_0x256b1a,{'body':{'requests':_0x5ac829}}))[_0xf27723(0x352)][_0xf27723(0x2ed)];}async['listRoles'](_0x405948){const _0x446fca=_0x4d465b;let _0x341d94=this[_0x446fca(0x2e9)]()+'/'+_0x405948[_0x446fca(0x45d)]+_0x446fca(0x4e0),_0x31f605=await this[_0x446fca(0x259)]['post'](_0x341d94,{'body':_0x405948});return{'roles':_0x31f605[_0x446fca(0x352)]['roles'],'actions':_0x31f605[_0x446fca(0x352)]['actions']};}async[_0x4d465b(0x2be)](_0x1d7b60){const _0x39b6e5=_0x4d465b;let _0x1d9b7b=this[_0x39b6e5(0x2e9)]()+_0x39b6e5(0x3f0);await this[_0x39b6e5(0x259)]['delete'](_0x1d9b7b,{'params':{'collaboratorID':_0x1d7b60[_0x39b6e5(0x300)],'objectID':_0x1d7b60[_0x39b6e5(0x23f)],'unitID':_0x1d7b60[_0x39b6e5(0x25a)]}});}async['updateCollaborator'](_0x2f0a80){const _0x24eff4=_0x4d465b;let _0x70162f=this['_getAPIPrefixPath']()+_0x24eff4(0x3f0);await this[_0x24eff4(0x259)][_0x24eff4(0x28e)](_0x70162f,{'body':_0x2f0a80});}async[_0x4d465b(0x29f)](_0x323b72){const _0x4933cd=_0x4d465b;let _0x1ddab4=this[_0x4933cd(0x2e9)]()+_0x4933cd(0x3f0);await this[_0x4933cd(0x259)][_0x4933cd(0x2c1)](_0x1ddab4,{'body':_0x323b72});}async[_0x4d465b(0x323)](_0x1e6109){const _0x1d5328=_0x4d465b;let _0xf5a174=this['_getAPIPrefixPath']()+_0x1d5328(0x3f0),_0x58a203=await this[_0x1d5328(0x259)][_0x1d5328(0x34e)](_0xf5a174,{'params':{'objectID':_0x1e6109[_0x1d5328(0x23f)],'unitID':_0x1e6109[_0x1d5328(0x25a)]}});return this[_0x1d5328(0x289)](_0x58a203[_0x1d5328(0x352)][_0x1d5328(0x426)]??!0x1),_0x58a203[_0x1d5328(0x352)][_0x1d5328(0x44b)];}async[_0x4d465b(0x2a6)](_0x2b1b79){const _0x30fc55=_0x4d465b;let _0x554f18=this['_getAPIPrefixPath']()+'/collaborator';await this[_0x30fc55(0x259)][_0x30fc55(0x1fe)](_0x554f18,{'body':_0x2b1b79});}[_0x4d465b(0x289)](_0x47d6fc){const _0x23ca87=_0x4d465b;this[_0x23ca87(0x2ae)]=_0x47d6fc;}['getCfgEnableObjInherit'](){const _0x263a16=_0x4d465b;return this[_0x263a16(0x2ae)];}};G=y([v(0x0,(0x0,t['Inject'])(l[_0x4d465b(0x315)])),v(0x1,(0x0,t[_0x4d465b(0x296)])(t[_0x4d465b(0x1b6)]))],G);function it(_0x199f3e){const _0x50efe4=_0x4d465b;let _0x2c440a=atob(_0x199f3e),_0x393418=new Uint8Array(_0x2c440a[_0x50efe4(0x41f)]);for(let _0x1a1fd1=0x0;_0x1a1fd1<_0x2c440a['length'];_0x1a1fd1++)_0x393418[_0x1a1fd1]=_0x2c440a['charCodeAt'](_0x1a1fd1);return _0x393418;}function at(_0x548d28){const _0x306fba=_0x4d465b;let _0x538eab='';for(let _0x3b459f=0x0;_0x3b459f<_0x548d28[_0x306fba(0x41f)];_0x3b459f++)_0x538eab+=String[_0x306fba(0x330)](_0x548d28[_0x3b459f]);return btoa(_0x538eab);}function ot(_0x57028b,_0x248511){const _0x4fdbf9=_0x4d465b;let _0x365dd3=it(_0x248511),_0x239f90=(0x0,f[_0x4fdbf9(0x4b5)])(0x10);return at((0x0,f[_0x4fdbf9(0x3a1)])(_0x239f90,(0x0,d['cbc'])(_0x365dd3,_0x239f90)['encrypt']((0x0,f[_0x4fdbf9(0x1cf)])(_0x57028b))));}function st(){const _0x3e6f25=_0x4d465b;let _0xff5374=(0x0,u[_0x3e6f25(0x35a)])()[_0x3e6f25(0x2c2)];if(typeof window<'u'&&window[_0x3e6f25(0x469)]!==void 0x0&&_0xff5374){let _0x3b2807={'time':Math[_0x3e6f25(0x2c5)](Date[_0x3e6f25(0x1a3)]()/0x3e8),'domain':location[_0x3e6f25(0x340)]};return ot(JSON['stringify'](_0x3b2807),_0xff5374);}}let K=class{constructor(_0x57b4f2){const _0x4bc363=_0x4d465b;this[_0x4bc363(0x219)]=_0x57b4f2,this[_0x4bc363(0x2d2)]();}[_0x4d465b(0x2d2)](){const _0xc36564=_0x4d465b;this[_0xc36564(0x219)]['registerHTTPInterceptor']({'interceptor':(_0x11e587,_0x3c12d0)=>{const _0xc007f7=_0xc36564;let _0x165903=st();return _0x165903&&_0x11e587[_0xc007f7(0x3e0)][_0xc007f7(0x35e)](_0xc007f7(0x1a5),_0x165903),_0x3c12d0(_0x11e587);}});}};K=y([v(0x0,(0x0,t['Inject'])(l[_0x4d465b(0x315)]))],K);let q=class extends t[_0x4d465b(0x3b5)]{constructor(_0x4a1d59,_0x5877ad,_0x1f5355){const _0x734a81=_0x4d465b;super(),this[_0x734a81(0x280)]=_0x4a1d59,this[_0x734a81(0x44e)]=_0x5877ad,this[_0x734a81(0x31f)]=_0x1f5355,g(this,_0x734a81(0x1e7),new i['BehaviorSubject'](null)),g(this,_0x734a81(0x26a),new i[(_0x734a81(0x40a))]()),g(this,'unitInfo$',this[_0x734a81(0x1e7)][_0x734a81(0x2f9)]()),g(this,_0x734a81(0x1f3),this[_0x734a81(0x26a)]['asObservable']());}[_0x4d465b(0x380)](){const _0x406eaf=_0x4d465b;super[_0x406eaf(0x380)](),this[_0x406eaf(0x26a)][_0x406eaf(0x3d8)](),this[_0x406eaf(0x1e7)][_0x406eaf(0x3d8)]();}async[_0x4d465b(0x377)](_0x392cea,_0x22ea0b,_0x4bba57,_0x274324){const _0x4b8e20=_0x4d465b;this[_0x4b8e20(0x1e7)][_0x4b8e20(0x3fc)]({'unitId':_0x392cea,'type':_0x22ea0b,'subUnitId':_0x274324});let _0x435f2f=null;switch(_0x22ea0b){case t['UniverInstanceType'][_0x4b8e20(0x459)]:_0x435f2f=await this[_0x4b8e20(0x44e)][_0x4b8e20(0x3c2)](_0x392cea,_0x4bba57,void 0x0,{'initialSubUnitId':_0x274324});break;case t[_0x4b8e20(0x410)][_0x4b8e20(0x24a)]:_0x435f2f=await this[_0x4b8e20(0x44e)][_0x4b8e20(0x190)](_0x392cea,_0x4bba57);break;case t[_0x4b8e20(0x410)][_0x4b8e20(0x2b9)]:_0x435f2f=await this['_snapshotService']['loadSlide'](_0x392cea,_0x4bba57);break;case t[_0x4b8e20(0x410)][_0x4b8e20(0x216)]:_0x435f2f=await this[_0x4b8e20(0x44e)][_0x4b8e20(0x443)](_0x392cea,_0x4bba57);break;case t['UniverInstanceType']['UNIVER_BASE']:_0x435f2f=await this[_0x4b8e20(0x44e)][_0x4b8e20(0x1e5)](_0x392cea,_0x4bba57);break;case t[_0x4b8e20(0x410)][_0x4b8e20(0x206)]:_0x435f2f=await this[_0x4b8e20(0x44e)]['loadPdf'](_0x392cea,_0x4bba57);break;default:this[_0x4b8e20(0x280)]['error']('[DataLoaderService]',_0x4b8e20(0x3c7));break;}return _0x435f2f&&this['_unitLoaded$']['next'](_0x435f2f),_0x435f2f;}async[_0x4d465b(0x2fe)](_0x3a748d,_0x3d4754,_0x1b61c8){const _0x3bc55e=_0x4d465b;var _0xcb20da;this[_0x3bc55e(0x1e7)][_0x3bc55e(0x3fc)]({'unitId':_0x3a748d,'type':_0x3d4754,'subUnitId':_0x1b61c8});let _0x27a98b=0x0,_0x14ac80=await((_0xcb20da=this['_localCacheService'])==null?void 0x0:_0xcb20da[_0x3bc55e(0x4b9)](_0x3a748d));return _0x14ac80&&(_0x14ac80[_0x3bc55e(0x439)]||_0x14ac80[_0x3bc55e(0x30d)][_0x3bc55e(0x41f)]!==0x0)&&(_0x27a98b=_0x14ac80[_0x3bc55e(0x239)]),_0x27a98b===0x0&&this[_0x3bc55e(0x280)][_0x3bc55e(0x19c)](_0x3bc55e(0x25f),_0x3bc55e(0x268)),this[_0x3bc55e(0x377)](_0x3a748d,_0x3d4754,_0x27a98b,_0x1b61c8);}};q=y([v(0x0,t['ILogService']),v(0x1,(0x0,t[_0x4d465b(0x296)])(e[_0x4d465b(0x263)])),v(0x2,(0x0,t[_0x4d465b(0x417)])(x))],q);let J=class{constructor(_0x3fdd04,_0x5aa353,_0x453820){const _0x1e256e=_0x4d465b;this[_0x1e256e(0x219)]=_0x3fdd04,this[_0x1e256e(0x367)]=_0x5aa353,this[_0x1e256e(0x2dd)]=_0x453820,g(this,_0x1e256e(0x2a1),0x0),g(this,'_change$',new i['Subject']()),g(this,_0x1e256e(0x266),this[_0x1e256e(0x4c1)]),g(this,'_imageSourceCache',new Map());}[_0x4d465b(0x338)](_0x17477f){const _0x3b4381=_0x4d465b;this[_0x3b4381(0x2a1)]=_0x17477f,this[_0x3b4381(0x4c1)][_0x3b4381(0x3fc)](_0x17477f);}[_0x4d465b(0x241)](_0x599e46,_0x5db5ea){const _0x2978dc=_0x4d465b;if(_0x5db5ea===t[_0x2978dc(0x2b2)][_0x2978dc(0x1fb)]){let _0x2d7d0c=new Image();return _0x2d7d0c[_0x2978dc(0x240)]=_0x599e46,_0x2d7d0c;}return this[_0x2978dc(0x2d3)]['get'](_0x599e46);}[_0x4d465b(0x3ef)](_0x508fe4,_0x1d7d96,_0x377012){const _0x2473f6=_0x4d465b;_0x1d7d96!==t['ImageSourceType']['BASE64']&&_0x377012!=null&&this[_0x2473f6(0x2d3)][_0x2473f6(0x35e)](_0x508fe4,_0x377012);}async[_0x4d465b(0x33c)](_0x301f36){const _0x17af9e=_0x4d465b;try{let _0x2a3a38=this[_0x17af9e(0x255)](this[_0x17af9e(0x20f)](),''+_0x301f36),_0x316753=(await this[_0x17af9e(0x219)][_0x17af9e(0x34e)](_0x2a3a38))[_0x17af9e(0x352)];if(_0x316753['error']&&_0x316753['error']['code']===a[_0x17af9e(0x39d)]['OK']){let _0x23d90b=(0x0,t[_0x17af9e(0x353)])(_0x316753[_0x17af9e(0x3b1)],this[_0x17af9e(0x20a)]());return Promise[_0x17af9e(0x254)](_0x23d90b);}return Promise['reject'](_0x316753['error']);}catch(_0x335fa4){return Promise[_0x17af9e(0x411)](_0x335fa4);}}async[_0x4d465b(0x498)](_0x24f48b){const _0x1a9f7=_0x4d465b;let _0x5346b1='';if(!p['DRAWING_IMAGE_ALLOW_IMAGE_LIST'][_0x1a9f7(0x4b7)](_0x24f48b[_0x1a9f7(0x487)]))return this[_0x1a9f7(0x1bf)](),Promise[_0x1a9f7(0x411)](Error(t[_0x1a9f7(0x41a)][_0x1a9f7(0x2e4)]));if(_0x24f48b[_0x1a9f7(0x304)]>(0x0,p[_0x1a9f7(0x405)])())return this[_0x1a9f7(0x1bf)](),Promise[_0x1a9f7(0x411)](Error(t[_0x1a9f7(0x41a)]['ERROR_EXCEED_SIZE']));try{let _0x299047=new FormData();_0x299047[_0x1a9f7(0x445)](_0x1a9f7(0x4ba),_0x24f48b);let _0x589f21=this[_0x1a9f7(0x2dd)][_0x1a9f7(0x232)](),_0x357993=_0x589f21==null?void 0x0:_0x589f21[_0x1a9f7(0x48f)]();if(!_0x357993)throw Error(_0x1a9f7(0x3ec));let _0x4e7b60=this[_0x1a9f7(0x3fe)]()+_0x1a9f7(0x262)+_0x24f48b['size'][_0x1a9f7(0x4ac)]()+_0x1a9f7(0x356)+a[_0x1a9f7(0x4a5)][_0x1a9f7(0x437)]+_0x1a9f7(0x345)+encodeURIComponent(_0x357993),_0x2b8e8e={'body':_0x299047},_0x13a293=(await this[_0x1a9f7(0x219)]['post'](_0x4e7b60,_0x2b8e8e))['body'];if(typeof _0x13a293[_0x1a9f7(0x2ab)]!='string')return this['_decreaseWaiting'](),Promise[_0x1a9f7(0x411)](Error(t[_0x1a9f7(0x41a)][_0x1a9f7(0x34c)]));_0x5346b1=_0x13a293['FileId'];}catch{return this[_0x1a9f7(0x1bf)](),Promise[_0x1a9f7(0x411)](Error(t[_0x1a9f7(0x41a)][_0x1a9f7(0x34c)]));}return new Promise((_0x420b6e,_0x2caf41)=>{const _0x1a3d4a=_0x1a9f7;let _0xc85cca=new FileReader();_0xc85cca[_0x1a3d4a(0x470)](_0x24f48b),_0xc85cca[_0x1a3d4a(0x23d)]=_0x19a149=>{const _0x57955d=_0x1a3d4a;var _0x241367;let _0x3bc624=(_0x241367=_0x19a149[_0x57955d(0x31d)])==null?void 0x0:_0x241367[_0x57955d(0x2f4)];if(_0x3bc624==null){this['_decreaseWaiting'](),_0x2caf41(Error(t[_0x57955d(0x41a)]['ERROR_IMAGE']));return;}_0x420b6e({'imageId':(0x0,t[_0x57955d(0x2e8)])(0x6),'imageSourceType':t['ImageSourceType'][_0x57955d(0x245)],'source':_0x5346b1,'base64Cache':_0x3bc624,'status':t['ImageUploadStatusType'][_0x57955d(0x496)]}),this[_0x57955d(0x1bf)]();};});}['_getUploadFileURL'](){const _0x26a168=_0x4d465b;let _0x3a4c3c=this['_configService'][_0x26a168(0x35d)](m);return(_0x3a4c3c==null?void 0x0:_0x3a4c3c[_0x26a168(0x3a3)])??'/universer-api/stream/file/upload';}[_0x4d465b(0x20f)](){const _0x442aa9=_0x4d465b;let _0x46a657=this[_0x442aa9(0x367)]['getConfig'](m);return(_0x46a657==null?void 0x0:_0x46a657[_0x442aa9(0x3a6)])??'/universer-api/file/{fileID}/sign-url';}['_getDownloadEndpointURL'](){const _0x12cf28=_0x4d465b;let _0xdf7951=this[_0x12cf28(0x367)][_0x12cf28(0x35d)](m);return(_0xdf7951==null?void 0x0:_0xdf7951['downloadEndpointUrl'])??location['origin'];}['_replaceFileID'](_0x58ffb3,_0x493224){const _0x4542a2=_0x4d465b;return _0x58ffb3[_0x4542a2(0x355)]('{fileID}',_0x493224);}[_0x4d465b(0x1bf)](){const _0x2a921a=_0x4d465b;--this['_waitCount'],this[_0x2a921a(0x4c1)][_0x2a921a(0x3fc)](this[_0x2a921a(0x2a1)]);}};J=y([v(0x0,(0x0,t[_0x4d465b(0x296)])(l[_0x4d465b(0x315)])),v(0x1,t[_0x4d465b(0x1b6)]),v(0x2,(0x0,t[_0x4d465b(0x296)])(t[_0x4d465b(0x2af)]))],J);let Y=class{constructor(_0x2ccdfc,_0x576c33){const _0x5616c7=_0x4d465b;this[_0x5616c7(0x367)]=_0x2ccdfc,this[_0x5616c7(0x259)]=_0x576c33;}['_getAPIPrefixPath'](){const _0x45a2d2=_0x4d465b;let _0x90db62=this['_configService'][_0x45a2d2(0x35d)](m);return(_0x90db62==null?void 0x0:_0x90db62[_0x45a2d2(0x408)])??_0x45a2d2(0x3f5);}async[_0x4d465b(0x2cf)](_0x436dd5){const _0x37de64=_0x4d465b;let _0x531fd2=this[_0x37de64(0x2e9)]()+_0x37de64(0x3f0);return{'list':[{'title':'People','mentions':(await this['_HTTPService'][_0x37de64(0x34e)](_0x531fd2,{'params':{'objectID':_0x436dd5[_0x37de64(0x4d7)],'unitID':_0x436dd5[_0x37de64(0x4d7)]}}))[_0x37de64(0x352)]['collaborators'][_0x37de64(0x1f2)](_0x2ea870=>({'objectId':_0x2ea870['id'],'name':_0x2ea870[_0x37de64(0x4b3)][_0x37de64(0x21d)],'metadata':{'icon':_0x2ea870['subject'][_0x37de64(0x257)]},'label':_0x2ea870['subject'][_0x37de64(0x21d)],'objectType':t[_0x37de64(0x2a3)][_0x37de64(0x47a)]})),'metadata':{},'type':t[_0x37de64(0x2a3)][_0x37de64(0x47a)]}]};}};Y=y([v(0x0,(0x0,t['Inject'])(t[_0x4d465b(0x1b6)])),v(0x1,(0x0,t['Inject'])(l['HTTPService']))],Y);let X=class extends t[_0x4d465b(0x3b5)]{constructor(_0x19f67b,_0x12cfdd,_0xfa603,_0x44b018,_0x10b132,_0x1834df){const _0x3453cb=_0x4d465b;super(),this['_injector']=_0x19f67b,this[_0x3453cb(0x2dd)]=_0x12cfdd,this[_0x3453cb(0x372)]=_0xfa603,this[_0x3453cb(0x196)]=_0x44b018,this[_0x3453cb(0x4cf)]=_0x10b132,this[_0x3453cb(0x454)]=_0x1834df,g(this,_0x3453cb(0x391),new Set()),this[_0x3453cb(0x43a)](()=>this[_0x3453cb(0x391)][_0x3453cb(0x1f4)]()),this[_0x3453cb(0x43a)](ct(this[_0x3453cb(0x2dd)])[_0x3453cb(0x2b1)](({unitId:_0x264c87})=>this[_0x3453cb(0x391)][_0x3453cb(0x2fa)](_0x264c87))),this[_0x3453cb(0x3f4)](),this[_0x3453cb(0x374)](),[t[_0x3453cb(0x410)][_0x3453cb(0x24a)],t['UniverInstanceType'][_0x3453cb(0x2b9)],t[_0x3453cb(0x410)][_0x3453cb(0x376)],t[_0x3453cb(0x410)][_0x3453cb(0x216)]][_0x3453cb(0x2ea)](_0x45df82=>{const _0x59ad79=_0x3453cb;this[_0x59ad79(0x43a)](this[_0x59ad79(0x2dd)][_0x59ad79(0x1b8)](_0x45df82)[_0x59ad79(0x2b1)](_0xaf8e3d=>{const _0xdfc70a=_0x59ad79;this[_0xdfc70a(0x391)]['add'](_0xaf8e3d[_0xdfc70a(0x48f)]()),this[_0xdfc70a(0x26d)][_0xdfc70a(0x34e)](t['ObjectPermissionService'])[_0xdfc70a(0x258)](_0xaf8e3d[_0xdfc70a(0x48f)]());}));});}['_initCloseConn'](){const _0xf9dd72=_0x4d465b;let _0x3ac1ac=async(_0x65db97,_0xc4eb7d)=>{const _0x5c9e34=_0x4feb;let _0x399be6=await this['_collaborationSessionService'][_0x5c9e34(0x47e)](_0x65db97);this[_0x5c9e34(0x302)]||this['_closedUnits'][_0x5c9e34(0x396)](_0x65db97)||!this[_0x5c9e34(0x2dd)][_0x5c9e34(0x310)](_0x65db97)||_0x399be6[_0x5c9e34(0x3a5)][_0x5c9e34(0x30c)]((0x0,s[_0x5c9e34(0x4d1)])(_0x47f236=>_0x47f236[_0x5c9e34(0x1f9)]===e[_0x5c9e34(0x4a0)][_0x5c9e34(0x2d5)]),(0x0,s[_0x5c9e34(0x4a9)])((0x0,i[_0x5c9e34(0x2dc)])(this[_0x5c9e34(0x1ec)],this[_0x5c9e34(0x2dd)]['unitDisposed$'][_0x5c9e34(0x30c)]((0x0,s[_0x5c9e34(0x4d1)])(_0x256451=>_0x256451[_0x5c9e34(0x48f)]()===_0x65db97)))))[_0x5c9e34(0x2b1)](_0x52b571=>{const _0x27a362=_0x5c9e34;let {reason:_0x1da41f}=_0x52b571[_0x27a362(0x2db)];this[_0x27a362(0x454)][_0x27a362(0x316)]({'id':_0x27a362(0x261),'data':_0x1da41f}),this['_closedUnits'][_0x27a362(0x489)](_0x65db97),this[_0x27a362(0x26d)]['get'](t[_0x27a362(0x2c7)])[_0x27a362(0x258)](_0x65db97);let _0x3606c1=lt(_0xc4eb7d);_0x3606c1!=null&&this[_0x27a362(0x476)](_0x65db97,_0x3606c1,a[_0x27a362(0x1cb)][_0x27a362(0x36f)],!0x1),this[_0x27a362(0x4cf)][_0x27a362(0x264)](_0x65db97);});};ct(this[_0xf9dd72(0x2dd)])['pipe']((0x0,s[_0xf9dd72(0x4d1)])(({unitId:_0x437a62})=>!(0x0,t[_0xf9dd72(0x273)])(_0x437a62)),(0x0,s['takeUntil'])(this[_0xf9dd72(0x1ec)]))[_0xf9dd72(0x2b1)](({type:_0x23f144,unitId:_0x4f0160})=>{const _0x24721f=_0xf9dd72;_0x3ac1ac(_0x4f0160,_0x23f144)[_0x24721f(0x435)](_0x48cc29=>this['_injector'][_0x24721f(0x34e)](t[_0x24721f(0x3cd)])[_0x24721f(0x38b)](_0x48cc29));});}['_initUnitPermissionChange'](){const _0x355675=_0x4d465b;let _0x34d014=async(_0x1dd203,_0x5b4fe7)=>{const _0x29adbb=_0x4feb;let _0x1834e0=await this[_0x29adbb(0x4cf)][_0x29adbb(0x47e)](_0x1dd203);if(!(this['_disposed']||this[_0x29adbb(0x391)][_0x29adbb(0x396)](_0x1dd203)||!this[_0x29adbb(0x2dd)]['getUnit'](_0x1dd203))){if(_0x5b4fe7===t[_0x29adbb(0x410)][_0x29adbb(0x459)]){let _0xfa34e6=this[_0x29adbb(0x26d)]['get'](r['SheetPermissionInitController']);await _0xfa34e6[_0x29adbb(0x314)](_0x1dd203),_0x1834e0['event$'][_0x29adbb(0x30c)]((0x0,s[_0x29adbb(0x4d1)])(_0x20dc77=>_0x20dc77[_0x29adbb(0x1f9)]===e[_0x29adbb(0x4a0)][_0x29adbb(0x1b9)]),(0x0,s['takeUntil'])((0x0,i['merge'])(this[_0x29adbb(0x1ec)],_0x1834e0[_0x29adbb(0x3a5)][_0x29adbb(0x30c)]((0x0,s[_0x29adbb(0x4d1)])(_0xb73267=>_0xb73267[_0x29adbb(0x1f9)]===e[_0x29adbb(0x4a0)][_0x29adbb(0x2d5)])),this[_0x29adbb(0x2dd)][_0x29adbb(0x3e8)][_0x29adbb(0x30c)]((0x0,s[_0x29adbb(0x4d1)])(_0x228d07=>_0x228d07['getUnitId']()===_0x1dd203)))))['subscribe'](_0x509a49=>{const _0x5cd7d4=_0x29adbb;let {objectId:_0x112530}=_0x509a49[_0x5cd7d4(0x2db)];_0x112530===_0x1dd203?_0xfa34e6[_0x5cd7d4(0x314)](_0x1dd203):_0xfa34e6[_0x5cd7d4(0x2a9)](_0x1dd203,_0x112530);});return;}_0x1834e0[_0x29adbb(0x3a5)][_0x29adbb(0x30c)]((0x0,s[_0x29adbb(0x4d1)])(_0x2b333e=>_0x2b333e[_0x29adbb(0x1f9)]===e[_0x29adbb(0x4a0)][_0x29adbb(0x1b9)]),(0x0,s['takeUntil'])((0x0,i[_0x29adbb(0x2dc)])(this[_0x29adbb(0x1ec)],_0x1834e0[_0x29adbb(0x3a5)][_0x29adbb(0x30c)]((0x0,s[_0x29adbb(0x4d1)])(_0x1c836d=>_0x1c836d['eventID']===e[_0x29adbb(0x4a0)]['SHOULD_CLOSE_CONN'])),this[_0x29adbb(0x2dd)]['unitDisposed$']['pipe']((0x0,s[_0x29adbb(0x4d1)])(_0x3c8f7d=>_0x3c8f7d[_0x29adbb(0x48f)]()===_0x1dd203)))))[_0x29adbb(0x2b1)](()=>{const _0xbebfdd=_0x29adbb;this[_0xbebfdd(0x36e)](_0x1dd203,_0x5b4fe7)['catch'](_0x2cfbe4=>this[_0xbebfdd(0x26d)]['get'](t[_0xbebfdd(0x3cd)])[_0xbebfdd(0x38b)](_0x2cfbe4));}),await this[_0x29adbb(0x36e)](_0x1dd203,_0x5b4fe7);}};ct(this['_univerInstanceService'])[_0x355675(0x30c)]((0x0,s[_0x355675(0x4d1)])(({unitId:_0x3fb42c})=>!(0x0,t[_0x355675(0x273)])(_0x3fb42c)),(0x0,s[_0x355675(0x4a9)])(this[_0x355675(0x1ec)]))[_0x355675(0x2b1)](({type:_0x2155cc,unitId:_0x3bdc8a})=>{const _0x5e7463=_0x355675;_0x34d014(_0x3bdc8a,_0x2155cc)[_0x5e7463(0x435)](_0x5cebbb=>this['_injector'][_0x5e7463(0x34e)](t[_0x5e7463(0x3cd)])[_0x5e7463(0x38b)](_0x5cebbb));});}async[_0x4d465b(0x36e)](_0x3bbf50,_0x7c08db){const _0x51c0c5=_0x4d465b;let _0x5b823f=lt(_0x7c08db);if(_0x5b823f==null)return;let _0x593987=this['_injector'][_0x51c0c5(0x34e)](t[_0x51c0c5(0x2c7)]);if(_0x593987[_0x51c0c5(0x1c6)]({'unitId':_0x3bbf50,'objectId':_0x3bbf50,'objectType':_0x5b823f})){await _0x593987[_0x51c0c5(0x1da)](_0x3bbf50);return;}let _0x17d36b=this['_getUnitPermissionPoints'](_0x3bbf50,_0x5b823f);if(!_0x17d36b['length'])return;let _0x56f6cb=await this['_authzIoService']['allowed']({'objectID':_0x3bbf50,'objectType':_0x5b823f,'unitID':_0x3bbf50,'actions':_0x17d36b[_0x51c0c5(0x1f2)](({action:_0x3ae185})=>_0x3ae185)});this[_0x51c0c5(0x302)]||this[_0x51c0c5(0x391)][_0x51c0c5(0x396)](_0x3bbf50)||!this[_0x51c0c5(0x2dd)]['getUnit'](_0x3bbf50)||_0x56f6cb[_0x51c0c5(0x2ea)](_0x392873=>{const _0xe70cb9=_0x51c0c5;let _0x334b71=_0x392873[_0xe70cb9(0x457)],_0x1c7ad9=_0x392873[_0xe70cb9(0x2d6)];_0x334b71!=null&&_0x1c7ad9!=null&&_0x17d36b[_0xe70cb9(0x4d1)](_0x586df8=>_0x586df8[_0xe70cb9(0x457)]===_0x334b71)[_0xe70cb9(0x2ea)](_0x490f9f=>this['_permissionService'][_0xe70cb9(0x19b)](_0x490f9f['id'],_0x1c7ad9));});}[_0x4d465b(0x1a7)](_0x4be519,_0x4830ae){const _0x26c2f7=_0x4d465b;let _0x45f5c9=[];return this['_permissionService'][_0x26c2f7(0x25d)]()['forEach']((_0x452188,_0x1865b7)=>{const _0x1eb499=_0x26c2f7;_0x452188[_0x1eb499(0x2b1)](_0x4b1c29=>{const _0x188500=_0x1eb499;_0x4b1c29['type']===_0x4830ae&&_0x188500(0x4d7)in _0x4b1c29&&_0x4b1c29['unitId']===_0x4be519&&(!(_0x188500(0x2e0)in _0x4b1c29)||_0x4b1c29[_0x188500(0x2e0)]===_0x4be519)&&_0x45f5c9[_0x188500(0x41d)]({'id':_0x1865b7,'action':_0x4b1c29[_0x188500(0x285)]});})[_0x1eb499(0x4b2)]();}),_0x45f5c9;}['_updateUnitPermissionPoint'](_0x3dfd6c,_0xe5110c,_0x41ef90,_0x2f1592){const _0x59267d=_0x4d465b;this[_0x59267d(0x372)]['getAllPermissionPoint']()[_0x59267d(0x2ea)]((_0xb4ebda,_0x213565)=>{const _0x3a5947=_0x59267d;let _0x6fad44=!0x1;_0xb4ebda[_0x3a5947(0x2b1)](_0x5d3d2b=>{const _0x421f9d=_0x3a5947;_0x6fad44=_0x5d3d2b[_0x421f9d(0x487)]===_0xe5110c&&_0x5d3d2b[_0x421f9d(0x285)]===_0x41ef90&&_0x421f9d(0x4d7)in _0x5d3d2b&&_0x5d3d2b[_0x421f9d(0x4d7)]===_0x3dfd6c&&(!(_0x421f9d(0x2e0)in _0x5d3d2b)||_0x5d3d2b[_0x421f9d(0x2e0)]===_0x3dfd6c);})['unsubscribe'](),_0x6fad44&&this[_0x3a5947(0x372)][_0x3a5947(0x19b)](_0x213565,_0x2f1592);});}};X=y([v(0x0,(0x0,t[_0x4d465b(0x296)])(t['Injector'])),v(0x1,t[_0x4d465b(0x2af)]),v(0x2,t['IPermissionService']),v(0x3,t[_0x4d465b(0x28c)]),v(0x4,(0x0,t[_0x4d465b(0x296)])(V)),v(0x5,(0x0,t['Inject'])(_))],X);function ct(_0x85ebba){const _0x3340a9=_0x4d465b;return(0x0,i[_0x3340a9(0x2dc)])(...[t[_0x3340a9(0x410)][_0x3340a9(0x459)],t[_0x3340a9(0x410)][_0x3340a9(0x24a)],t[_0x3340a9(0x410)][_0x3340a9(0x2b9)],t[_0x3340a9(0x410)][_0x3340a9(0x216)],t[_0x3340a9(0x410)][_0x3340a9(0x376)]][_0x3340a9(0x1f2)](_0x1a15b0=>_0x85ebba[_0x3340a9(0x2c9)](_0x1a15b0)['pipe']((0x0,s[_0x3340a9(0x1f2)])(_0x3e0651=>({'type':_0x1a15b0,'unitId':_0x3e0651[_0x3340a9(0x44c)][_0x3340a9(0x48f)]()})))));}function lt(_0x463e3f){const _0x255476=_0x4d465b;switch(_0x463e3f){case t[_0x255476(0x410)][_0x255476(0x459)]:return a[_0x255476(0x303)][_0x255476(0x1c3)];case t[_0x255476(0x410)][_0x255476(0x24a)]:return a[_0x255476(0x303)][_0x255476(0x4bb)];case t['UniverInstanceType'][_0x255476(0x2b9)]:return a[_0x255476(0x303)][_0x255476(0x20e)];case t[_0x255476(0x410)][_0x255476(0x216)]:return a[_0x255476(0x303)][_0x255476(0x2d9)];case t['UniverInstanceType'][_0x255476(0x376)]:return a[_0x255476(0x303)]['Base'];default:return;}}let Z=class{constructor(_0x4f3470,_0x1345cd){const _0x1cbab1=_0x4d465b;this[_0x1cbab1(0x367)]=_0x4f3470,this[_0x1cbab1(0x219)]=_0x1345cd;}async[_0x4d465b(0x460)](_0xd40b1e,_0x1d1694){const _0x2677b0=_0x4d465b;var _0x3d59fb;let {unitID:_0x26ceea,type:_0x5280aa,revision:_0x239f1b=0x0}=_0x1d1694,_0x16af03=this[_0x2677b0(0x2f3)]()+'/'+_0x5280aa+_0x2677b0(0x395)+_0x26ceea+_0x2677b0(0x388)+_0x239f1b,_0x39f228=(await this[_0x2677b0(0x219)][_0x2677b0(0x34e)](_0x16af03))[_0x2677b0(0x352)],_0x445ad4=(_0x3d59fb=_0x39f228[_0x2677b0(0x33a)])==null?void 0x0:_0x3d59fb[_0x2677b0(0x4a4)];if(_0x445ad4){let _0x1ccb42=_0x445ad4==null?void 0x0:_0x445ad4[_0x2677b0(0x207)];_0x445ad4[_0x2677b0(0x207)]=e[_0x2677b0(0x447)][_0x2677b0(0x21a)]((0x0,e['b64DecodeUnicode'])(_0x1ccb42)),Object['entries'](_0x445ad4['sheets'])[_0x2677b0(0x2ea)](([,_0x570ccf])=>{const _0x5151ba=_0x2677b0;let _0x3aa85e=_0x570ccf[_0x5151ba(0x207)];_0x570ccf[_0x5151ba(0x207)]=e[_0x5151ba(0x447)]['encode']((0x0,e['b64DecodeUnicode'])(_0x3aa85e));});}return _0x39f228;}async[_0x4d465b(0x3e9)](_0x430b87,_0x4dd945){const _0x3af07f=_0x4d465b;let {unitID:_0x1a2cd2,type:_0x2eb11a,blockID:_0x1c55ca}=_0x4dd945,_0x2439ae=this[_0x3af07f(0x225)]()+'/'+_0x2eb11a+'/unit/'+_0x1a2cd2+_0x3af07f(0x390)+_0x1c55ca;return(await this[_0x3af07f(0x219)][_0x3af07f(0x34e)](_0x2439ae))['body'];}async[_0x4d465b(0x29a)](_0x37ffa7,_0x3b1c75){const _0x3e5a43=_0x4d465b;let {unitID:_0x1558b2,type:_0x533ecd,blockID:_0x2b80a9}=_0x3b1c75,_0x505165=this['_getAPIPrefix']()+_0x3e5a43(0x390)+_0x533ecd+'/unit/'+_0x1558b2+'/block/'+_0x2b80a9;return(await this[_0x3e5a43(0x219)][_0x3e5a43(0x34e)](_0x505165))[_0x3e5a43(0x352)];}async['fetchMissingChangesets'](_0x3d71a9,_0x5c05c0){const _0x59c20b=_0x4d465b;let {unitID:_0xfa0fbd,type:_0x5b5044,from:_0x4f72a8,to:_0x500ae7}=_0x5c05c0,_0x5165bc=this['_getAPIPrefix']()+'/'+_0x5b5044+'/unit/'+_0xfa0fbd+_0x59c20b(0x202)+_0x4f72a8+_0x59c20b(0x1a1)+_0x500ae7;return(await this[_0x59c20b(0x219)][_0x59c20b(0x34e)](_0x5165bc))['body'];}['getSnapshotAPIPath'](){const _0x385ce6=_0x4d465b;return this[_0x385ce6(0x367)]['getConfig'](_0x385ce6(0x223))??this['_getAPIPrefix']();}['_getAPIPrefix'](){const _0x22c87d=_0x4d465b;let _0x52e355=this[_0x22c87d(0x367)][_0x22c87d(0x35d)](m);return(_0x52e355==null?void 0x0:_0x52e355[_0x22c87d(0x1cc)])??_0x22c87d(0x37f);}async['getResourcesRequest'](_0x3390b7,_0x4418f4){const _0x58cb4e=_0x4d465b;let _0x4d9779=_0x58cb4e(0x30f)+_0x4418f4[_0x58cb4e(0x487)]+'/unit/'+_0x4418f4[_0x58cb4e(0x25a)]+_0x58cb4e(0x2f5);return(await this[_0x58cb4e(0x219)][_0x58cb4e(0x34e)](_0x4d9779,{'params':{'resourceId':JSON[_0x58cb4e(0x21b)](_0x4418f4[_0x58cb4e(0x1b1)])}}))[_0x58cb4e(0x352)];}[_0x4d465b(0x19a)](){const _0x2b5968=_0x4d465b;throw Error(_0x2b5968(0x282));}['updateSnapshot'](){const _0x1ad7c7=_0x4d465b;throw Error(_0x1ad7c7(0x282));}[_0x4d465b(0x23b)](){const _0x5b9d24=_0x4d465b;throw Error(_0x5b9d24(0x282));}['saveChangeset'](){const _0x6d533d=_0x4d465b;throw Error(_0x6d533d(0x282));}['copyFileMeta'](){throw Error('This\x20method\x20should\x20not\x20be\x20called\x20on\x20the\x20client\x20side!');}[_0x4d465b(0x24c)](){const _0x41bee4=_0x4d465b;throw Error(_0x41bee4(0x282));}};Z=y([v(0x0,t[_0x4d465b(0x1b6)]),v(0x1,(0x0,t[_0x4d465b(0x296)])(l[_0x4d465b(0x315)]))],Z);let Q=class extends t['LocalUndoRedoService']{constructor(_0x497e7d,_0x56a13d,_0x4953fc,_0x5c27b1,_0xfb1110,_0xfbb8f2){const _0x4a8c40=_0x4d465b;super(_0x497e7d,_0x56a13d,_0x4953fc,_0x5c27b1),this[_0x4a8c40(0x2aa)]=_0xfb1110,this[_0x4a8c40(0x280)]=_0xfbb8f2;}['transformUndoRedo'](_0x442262,_0x302d2e){const _0x51231a=_0x4d465b;let _0x4a6b98=this['_getUndoStack'](_0x442262);if(_0x4a6b98)try{let _0x30e24b=this['_transformStack'](_0x4a6b98,_0x302d2e);this[_0x51231a(0x34a)](_0x442262,_0x30e24b);}catch(_0x3afca4){this[_0x51231a(0x280)][_0x51231a(0x38b)]('[CollaborationUndoRedoService]',_0x3afca4),this[_0x51231a(0x192)](_0x442262);}let _0x470f05=this[_0x51231a(0x493)](_0x442262);if(_0x470f05)try{let _0x3a4380=this[_0x51231a(0x42d)](_0x470f05,_0x302d2e);this[_0x51231a(0x1f7)](_0x442262,_0x3a4380);}catch(_0x177f89){this[_0x51231a(0x280)]['error'](_0x177f89),this['_clearRedo'](_0x442262);}}[_0x4d465b(0x192)](_0x492c8c){const _0x91a07f=_0x4d465b;let _0x5a5313=this[_0x91a07f(0x491)](_0x492c8c);_0x5a5313&&(_0x5a5313[_0x91a07f(0x41f)]=0x0,this[_0x91a07f(0x2c4)]());}[_0x4d465b(0x3f7)](_0x1c15e1){const _0x1bc621=_0x4d465b;let _0x38efb6=this[_0x1bc621(0x493)](_0x1c15e1);_0x38efb6&&(_0x38efb6[_0x1bc621(0x41f)]=0x0,this[_0x1bc621(0x2c4)]());}[_0x4d465b(0x34a)](_0x1822b2,_0x4a84db){const _0x29b160=_0x4d465b;this['_undoStacks'][_0x29b160(0x35e)](_0x1822b2,_0x4a84db),this[_0x29b160(0x2c4)]();}[_0x4d465b(0x1f7)](_0x3507df,_0x380fe8){const _0x596a08=_0x4d465b;this['_redoStacks'][_0x596a08(0x35e)](_0x3507df,_0x380fe8),this['_updateStatus']();}[_0x4d465b(0x42d)](_0x483aa2,_0x4e940f){const _0x5dccce=_0x4d465b;let _0x498281=[],_0x3cc212=_0x4e940f,_0x49cf45=_0x4e940f;for(let _0x553f7d=_0x483aa2[_0x5dccce(0x41f)]-0x1;_0x553f7d>=0x0;_0x553f7d--){let {unitID:_0x35625a,undoMutations:_0xa52ea3,redoMutations:_0x425ed4}=_0x483aa2[_0x553f7d],_0x59eb3d=this['_transformService']['transformMutationsWithChangeset'](_0x3cc212,_0xa52ea3),_0x149137=this[_0x5dccce(0x2aa)][_0x5dccce(0x3fa)](_0x49cf45,_0x425ed4);if((0x0,e[_0x5dccce(0x1b7)])(_0x59eb3d)||(0x0,e[_0x5dccce(0x1b7)])(_0x149137)){this[_0x5dccce(0x280)][_0x5dccce(0x38b)](_0x5dccce(0x3ca),_0x5dccce(0x4c7),_0x59eb3d,_0x149137);break;}_0x3cc212=_0x59eb3d[_0x5dccce(0x482)],_0x49cf45=_0x149137['c1Prime'],_0x498281[_0x5dccce(0x41d)]({'unitID':_0x35625a,'undoMutations':_0x59eb3d[_0x5dccce(0x37d)],'redoMutations':_0x149137[_0x5dccce(0x37d)]});}return _0x498281['reverse']();}};Q=y([v(0x0,t[_0x4d465b(0x2af)]),v(0x1,t[_0x4d465b(0x2ce)]),v(0x2,t[_0x4d465b(0x4dd)]),v(0x3,t['IConfigService']),v(0x4,e[_0x4d465b(0x2bc)]),v(0x5,t[_0x4d465b(0x3cd)])],Q);let $=class extends t['Plugin']{constructor(_0x10f78d=ee,_0x43cc97,_0x5ea15c,_0x147022){const _0x50d531=_0x4d465b;super(),this[_0x50d531(0x2fb)]=_0x10f78d,this[_0x50d531(0x280)]=_0x43cc97,this[_0x50d531(0x26d)]=_0x5ea15c,this[_0x50d531(0x367)]=_0x147022;let {..._0x2a7235}=(0x0,t[_0x50d531(0x2dc)])({},ee,this[_0x50d531(0x2fb)]);if(!_0x2a7235[_0x50d531(0x488)])throw Error('[UniverCollaborationClientPlugin]:\x20you\x20must\x20provide\x20a\x20socketService\x20implementation\x20in\x20config!');this[_0x50d531(0x2fb)]=_0x2a7235,this[_0x50d531(0x367)][_0x50d531(0x2e6)](m,_0x2a7235);}[_0x4d465b(0x39f)](){const _0x2d1537=_0x4d465b;this[_0x2d1537(0x367)][_0x2d1537(0x2e6)](t[_0x2d1537(0x1e0)],this['_config'][_0x2d1537(0x278)]??[]),this[_0x2d1537(0x415)](),this[_0x2d1537(0x473)]();}[_0x4d465b(0x415)](){const _0x2896a2=_0x4d465b;var _0x321c44,_0x2206a3;this[_0x2896a2(0x26d)][_0x2896a2(0x396)](t[_0x2896a2(0x1e4)])&&this['_logService'][_0x2896a2(0x38b)](_0x2896a2(0x2b7),'you\x20should\x20override\x20\x22IUndoRedoService\x22\x20provided\x20in\x20\x22core\x22\x20package!');let _0x202c95=(0x0,t[_0x2896a2(0x47c)])([[t[_0x2896a2(0x1e4)],{'useClass':Q}],[Xe,{'useValue':Ze()}],[V],[b],[S],[W],[K],[ae],[X],[_],[q],[qe,{'useClass':this[_0x2896a2(0x2fb)][_0x2896a2(0x488)]}],[e['ISnapshotServerService'],{'useClass':Z}],[t[_0x2896a2(0x28c)],{'useClass':G}],[t[_0x2896a2(0x272)],{'useClass':J}],[nt,{'useClass':U}],[t[_0x2896a2(0x3db)],{'useClass':Y}],[H],[tt]],(_0x321c44=this[_0x2896a2(0x2fb)])==null?void 0x0:_0x321c44[_0x2896a2(0x2b4)]);if(!((_0x2206a3=this[_0x2896a2(0x2fb)])!=null&&_0x2206a3[_0x2896a2(0x4cd)])){let _0x5c3142=_0x202c95[_0x2896a2(0x4c0)](([_0x2de1bc])=>_0x2de1bc===C);_0x5c3142!==-0x1&&_0x202c95[_0x2896a2(0x32e)](_0x5c3142,0x1);}(0x0,t['registerDependencies'])(this[_0x2896a2(0x26d)],_0x202c95);}[_0x4d465b(0x473)](){const _0x2a4b52=_0x4d465b;var _0x46e9dc,_0x440816;if(this[_0x2a4b52(0x26d)]['get'](l[_0x2a4b52(0x315)])[_0x2a4b52(0x1e2)]({'priority':0x14,'interceptor':(0x0,l[_0x2a4b52(0x461)])({'maxParallel':0x6})}),!((_0x46e9dc=this[_0x2a4b52(0x2fb)])!=null&&_0x46e9dc[_0x2a4b52(0x401)])){var _0x5a49f4;(_0x5a49f4=this[_0x2a4b52(0x26d)][_0x2a4b52(0x34e)](x,t[_0x2a4b52(0x354)][_0x2a4b52(0x490)]))==null||_0x5a49f4[_0x2a4b52(0x193)]();}(_0x440816=this[_0x2a4b52(0x2fb)])!=null&&_0x440816[_0x2a4b52(0x2ee)]&&(0x0,t[_0x2a4b52(0x1d9)])(this['_injector'],[[W]]),(0x0,t[_0x2a4b52(0x1d9)])(this['_injector'],[[K],[H],[X]]);}};g($,_0x4d465b(0x480),_0x4d465b(0x3c8)),g($,'packageName',$e),g($,_0x4d465b(0x320),et),$=y([(0x0,t['DependentOn'])(u['UniverLicensePlugin'],l[_0x4d465b(0x389)],e['UniverCollaborationPlugin']),v(0x1,t['ILogService']),v(0x2,(0x0,t[_0x4d465b(0x296)])(t[_0x4d465b(0x49b)])),v(0x3,t['IConfigService'])],$),Object[_0x4d465b(0x466)](exports,_0x4d465b(0x20b),{'enumerable':!0x0,'get':function(){return G;}}),Object['defineProperty'](exports,_0x4d465b(0x294),{'enumerable':!0x0,'get':function(){return k;}}),Object[_0x4d465b(0x466)](exports,_0x4d465b(0x32b),{'enumerable':!0x0,'get':function(){return A;}}),Object[_0x4d465b(0x466)](exports,_0x4d465b(0x392),{'enumerable':!0x0,'get':function(){return I;}}),Object['defineProperty'](exports,_0x4d465b(0x3b7),{'enumerable':!0x0,'get':function(){return z;}}),exports[_0x4d465b(0x45a)]=m,Object[_0x4d465b(0x466)](exports,'CollaborationAttachmentIoService',{'enumerable':!0x0,'get':function(){return U;}}),Object[_0x4d465b(0x466)](exports,_0x4d465b(0x3af),{'enumerable':!0x0,'get':function(){return H;}}),Object[_0x4d465b(0x466)](exports,_0x4d465b(0x335),{'enumerable':!0x0,'get':function(){return P;}}),Object[_0x4d465b(0x466)](exports,_0x4d465b(0x494),{'enumerable':!0x0,'get':function(){return J;}}),Object[_0x4d465b(0x466)](exports,_0x4d465b(0x40d),{'enumerable':!0x0,'get':function(){return ve;}}),Object[_0x4d465b(0x466)](exports,'CollaborationSessionService',{'enumerable':!0x0,'get':function(){return V;}}),Object[_0x4d465b(0x466)](exports,_0x4d465b(0x3b6),{'enumerable':!0x0,'get':function(){return Ye;}}),exports[_0x4d465b(0x3bc)]=Be,exports[_0x4d465b(0x1de)]=ie,exports[_0x4d465b(0x1be)]=_,Object['defineProperty'](exports,_0x4d465b(0x440),{'enumerable':!0x0,'get':function(){return Q;}}),exports[_0x4d465b(0x3cc)]=ae,Object[_0x4d465b(0x466)](exports,_0x4d465b(0x4d0),{'enumerable':!0x0,'get':function(){return j;}}),exports['DEFAULT_COLLAB_WEB_SOCKET_URL']=_0x4d465b(0x2ac),exports[_0x4d465b(0x233)]=_0x4d465b(0x23a),exports[_0x4d465b(0x3c0)]=_0x4d465b(0x41c),Object['defineProperty'](exports,_0x4d465b(0x3d5),{'enumerable':!0x0,'get':function(){return q;}}),Object[_0x4d465b(0x466)](exports,_0x4d465b(0x418),{'enumerable':!0x0,'get':function(){return F;}}),Object['defineProperty'](exports,_0x4d465b(0x1eb),{'enumerable':!0x0,'get':function(){return N;}}),exports[_0x4d465b(0x48a)]=_0x4d465b(0x221),exports[_0x4d465b(0x4df)]=_0x4d465b(0x3d6),exports[_0x4d465b(0x4b4)]=nt,exports[_0x4d465b(0x2a0)]=Xe,exports[_0x4d465b(0x205)]=qe,exports['ILocalCacheService']=x,exports[_0x4d465b(0x31c)]=We,exports[_0x4d465b(0x26b)]=C,exports[_0x4d465b(0x375)]=0x3e8,exports['LOCAL_CACHE_INTERVAL_KEY']=_0x4d465b(0x375),Object[_0x4d465b(0x466)](exports,'MemberService',{'enumerable':!0x0,'get':function(){return b;}}),Object['defineProperty'](exports,_0x4d465b(0x27d),{'enumerable':!0x0,'get':function(){return Y;}}),Object[_0x4d465b(0x466)](exports,_0x4d465b(0x1dd),{'enumerable':!0x0,'get':function(){return M;}}),Object[_0x4d465b(0x466)](exports,_0x4d465b(0x4ae),{'enumerable':!0x0,'get':function(){return B;}}),Object[_0x4d465b(0x466)](exports,_0x4d465b(0x28d),{'enumerable':!0x0,'get':function(){return O;}}),exports[_0x4d465b(0x3e1)]='REMOTE_UNISCRIPT_EXECUTION_ENDPOINT',exports['RETRY_CONNECTING_MAX_COUNT_KEY']=_0x4d465b(0x215),exports[_0x4d465b(0x1a9)]=ge,Object['defineProperty'](exports,_0x4d465b(0x3ed),{'enumerable':!0x0,'get':function(){return L;}}),Object[_0x4d465b(0x466)](exports,_0x4d465b(0x1e8),{'enumerable':!0x0,'get':function(){return S;}}),Object['defineProperty'](exports,'SlideCollaborationEntity',{'enumerable':!0x0,'get':function(){return R;}}),Object[_0x4d465b(0x466)](exports,_0x4d465b(0x3ba),{'enumerable':!0x0,'get':function(){return Z;}}),Object[_0x4d465b(0x466)](exports,'SyncedState',{'enumerable':!0x0,'get':function(){return D;}}),exports[_0x4d465b(0x28a)]=xe,Object['defineProperty'](exports,_0x4d465b(0x363),{'enumerable':!0x0,'get':function(){return $;}}),exports[_0x4d465b(0x45f)]=Ze,exports[_0x4d465b(0x199)]=Ge,exports[_0x4d465b(0x495)]=ye,exports[_0x4d465b(0x474)]=Ke;
1
+ const _0x193bc9=_0x5d42;(function(_0x45fac2,_0x376ee6){const _0x28657f=_0x5d42,_0x58eec9=_0x45fac2();while(!![]){try{const _0x18ef36=parseInt(_0x28657f(0x11f))/0x1*(-parseInt(_0x28657f(0x2d8))/0x2)+parseInt(_0x28657f(0x152))/0x3*(parseInt(_0x28657f(0x21f))/0x4)+-parseInt(_0x28657f(0xdd))/0x5+parseInt(_0x28657f(0x3db))/0x6*(parseInt(_0x28657f(0xbf))/0x7)+-parseInt(_0x28657f(0x316))/0x8+-parseInt(_0x28657f(0xdb))/0x9+parseInt(_0x28657f(0x2a2))/0xa*(parseInt(_0x28657f(0x15e))/0xb);if(_0x18ef36===_0x376ee6)break;else _0x58eec9['push'](_0x58eec9['shift']());}catch(_0x2dd0e7){_0x58eec9['push'](_0x58eec9['shift']());}}}(_0x57b4,0x581b1),Object['defineProperty'](exports,Symbol['toStringTag'],{'value':_0x193bc9(0xc6)}));let e=require('@univerjs-pro/collaboration'),t=require('@univerjs/core'),n=require('@univerjs/docs'),r=require('@univerjs/sheets'),i=require('rxjs'),a=require('@univerjs/protocol'),o=require('@univerjs/telemetry'),s=require('rxjs/operators'),c=require('@univerjs-pro/slides'),l=require('@univerjs/network'),u=require('@univerjs-pro/license'),d=require('@noble/ciphers/aes.js'),f=require('@noble/ciphers/utils.js'),p=require('@univerjs/drawing');const m=_0x193bc9(0xe7),ee={};function te(_0x41e093){return JSON['stringify'](_0x41e093)['length'];}function h(_0x86fba7){'@babel/helpers - typeof';const _0x5e8f6f=_0x193bc9;return h=typeof Symbol==_0x5e8f6f(0x23f)&&typeof Symbol[_0x5e8f6f(0x250)]==_0x5e8f6f(0x37a)?function(_0x3fd850){return typeof _0x3fd850;}:function(_0x20c66d){const _0x6344dd=_0x5e8f6f;return _0x20c66d&&typeof Symbol=='function'&&_0x20c66d[_0x6344dd(0x160)]===Symbol&&_0x20c66d!==Symbol[_0x6344dd(0x1f1)]?'symbol':typeof _0x20c66d;},h(_0x86fba7);}function ne(_0x2e77c5,_0x3e05de){const _0x1e0d3d=_0x193bc9;if(h(_0x2e77c5)!=_0x1e0d3d(0x241)||!_0x2e77c5)return _0x2e77c5;var _0xe25dbc=_0x2e77c5[Symbol[_0x1e0d3d(0x24e)]];if(_0xe25dbc!==void 0x0){var _0x101877=_0xe25dbc['call'](_0x2e77c5,_0x3e05de||_0x1e0d3d(0x285));if(h(_0x101877)!=_0x1e0d3d(0x241))return _0x101877;throw TypeError(_0x1e0d3d(0x221));}return(_0x3e05de===_0x1e0d3d(0x2fa)?String:Number)(_0x2e77c5);}function re(_0x57d3b5){const _0x494aac=_0x193bc9;var _0x44e270=ne(_0x57d3b5,_0x494aac(0x2fa));return h(_0x44e270)=='symbol'?_0x44e270:_0x44e270+'';}function g(_0x3b81f1,_0xfaa0e1,_0x21bb35){const _0x16f30d=_0x193bc9;return(_0xfaa0e1=re(_0xfaa0e1))in _0x3b81f1?Object[_0x16f30d(0x2d7)](_0x3b81f1,_0xfaa0e1,{'value':_0x21bb35,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x3b81f1[_0xfaa0e1]=_0x21bb35,_0x3b81f1;}let ie=function(_0x23a403){const _0x32af89=_0x193bc9;return _0x23a403['OTHER_CLIENT_EDITING']=_0x32af89(0x24c),_0x23a403[_0x32af89(0x1eb)]='PERMISSION_DENIED',_0x23a403[_0x32af89(0x127)]=_0x32af89(0x127),_0x23a403[_0x32af89(0xad)]='CONFLICT_CACHE_CLEAR_FAILED',_0x23a403[_0x32af89(0x1b6)]=_0x32af89(0x1b6),_0x23a403[_0x32af89(0xa6)]='CLOSE_ROOM',_0x23a403[_0x32af89(0x204)]=_0x32af89(0x204),_0x23a403[_0x32af89(0x19a)]='SOCKET_FAILED_RETRY',_0x23a403['SOCKET_FAILED']=_0x32af89(0x14f),_0x23a403['SUBMIT_CHANGESET_TIMEOUT']=_0x32af89(0x1f8),_0x23a403;}({});var _=class{constructor(){const _0x310360=_0x193bc9;g(this,'_event$',new i[(_0x310360(0xa7))]()),g(this,_0x310360(0xe0),this['_event$'][_0x310360(0x2db)]());}[_0x193bc9(0x169)](_0x21e45){const _0x31ba3d=_0x193bc9;this[_0x31ba3d(0x228)][_0x31ba3d(0x37d)](_0x21e45);}},ae=class{constructor(){const _0x34d438=_0x193bc9;g(this,'_commentUpdate$',new i[(_0x34d438(0xa7))]()),g(this,'commentUpdate$',this[_0x34d438(0x27a)][_0x34d438(0x2db)]());}[_0x193bc9(0x225)](_0x4e7155){const _0x667de8=_0x193bc9;this[_0x667de8(0x27a)][_0x667de8(0x37d)](_0x4e7155);}};function v(_0x378f14,_0x428193){return function(_0x4a0e21,_0x37afe4){_0x428193(_0x4a0e21,_0x37afe4,_0x378f14);};}function y(_0x38b6f8,_0x5e0e11,_0x2df9ce,_0x23ef8c){const _0x43b401=_0x193bc9;var _0x5f5c31=arguments[_0x43b401(0x3c9)],_0x1c145e=_0x5f5c31<0x3?_0x5e0e11:_0x23ef8c===null?_0x23ef8c=Object[_0x43b401(0x1b2)](_0x5e0e11,_0x2df9ce):_0x23ef8c,_0x517f69;if(typeof Reflect==_0x43b401(0x241)&&typeof Reflect[_0x43b401(0x33a)]==_0x43b401(0x23f))_0x1c145e=Reflect[_0x43b401(0x33a)](_0x38b6f8,_0x5e0e11,_0x2df9ce,_0x23ef8c);else{for(var _0x22f8bc=_0x38b6f8['length']-0x1;_0x22f8bc>=0x0;_0x22f8bc--)(_0x517f69=_0x38b6f8[_0x22f8bc])&&(_0x1c145e=(_0x5f5c31<0x3?_0x517f69(_0x1c145e):_0x5f5c31>0x3?_0x517f69(_0x5e0e11,_0x2df9ce,_0x1c145e):_0x517f69(_0x5e0e11,_0x2df9ce))||_0x1c145e);}return _0x5f5c31>0x3&&_0x1c145e&&Object[_0x43b401(0x2d7)](_0x5e0e11,_0x2df9ce,_0x1c145e),_0x1c145e;}let b=class extends t['Disposable']{constructor(_0x4b1943){const _0x2adec2=_0x193bc9;super(),this[_0x2adec2(0xac)]=_0x4b1943,g(this,_0x2adec2(0x292),new Map()),g(this,_0x2adec2(0xf6),new i['Subject']()),this[_0x2adec2(0x240)]((0x0,i[_0x2adec2(0x27f)])(this[_0x2adec2(0xac)][_0x2adec2(0x2f3)](t[_0x2adec2(0xa8)][_0x2adec2(0x1fb)])[_0x2adec2(0x3da)]((0x0,s['map'])(_0xb45098=>_0xb45098[_0x2adec2(0x1a7)]())),this[_0x2adec2(0xac)][_0x2adec2(0x2f3)](t[_0x2adec2(0xa8)][_0x2adec2(0x281)])[_0x2adec2(0x3da)]((0x0,s[_0x2adec2(0x1f4)])(_0x57340b=>_0x57340b['getUnitId']())),this['_univerInstanceService']['getTypeOfUnitDisposed$'](t[_0x2adec2(0xa8)][_0x2adec2(0x181)])['pipe']((0x0,s['map'])(_0x5ae4fa=>_0x5ae4fa[_0x2adec2(0x1a7)]())),this['_univerInstanceService'][_0x2adec2(0x2f3)](t[_0x2adec2(0xa8)][_0x2adec2(0x387)])[_0x2adec2(0x3da)]((0x0,s[_0x2adec2(0x1f4)])(_0x40d187=>_0x40d187[_0x2adec2(0x1a7)]())))[_0x2adec2(0x1d4)](_0x2e80e7=>this[_0x2adec2(0xe9)](_0x2e80e7)));}['waitForRoom$'](_0x2a8c0c){const _0x25822c=_0x193bc9;return this[_0x25822c(0x292)][_0x25822c(0x3c8)](_0x2a8c0c)?(0x0,i['of'])(this['_roomMembers'][_0x25822c(0xa2)](_0x2a8c0c)):this['_roomCreated$']['pipe']((0x0,s[_0x25822c(0x1f4)])(_0x1b36ac=>{const _0x456f51=_0x25822c;if(_0x1b36ac===_0x2a8c0c)return this[_0x456f51(0x292)]['get'](_0x1b36ac);}));}[_0x193bc9(0x3a9)](_0x313511,_0x22124e){const _0x113f63=_0x193bc9;let _0x55962d=this[_0x113f63(0x292)][_0x113f63(0xa2)](_0x313511);_0x55962d||(_0x55962d=new oe(),this[_0x113f63(0x292)]['set'](_0x313511,_0x55962d),this[_0x113f63(0xf6)][_0x113f63(0x37d)](_0x313511)),_0x55962d['updateMember'](_0x22124e);}[_0x193bc9(0x303)](_0x3767dc,_0x3d552b){const _0x1d237e=_0x193bc9;let _0x44f6a7=this['_roomMembers'][_0x1d237e(0xa2)](_0x3767dc);_0x44f6a7&&_0x44f6a7[_0x1d237e(0x303)](_0x3d552b);}[_0x193bc9(0x184)](_0x1c6756){const _0x540fbc=_0x193bc9;return this[_0x540fbc(0x292)][_0x540fbc(0xa2)](_0x1c6756);}[_0x193bc9(0x1c6)](_0x5e9eeb,_0x5255fb){const _0x5ba6f7=_0x193bc9;let _0x6823=this[_0x5ba6f7(0x292)][_0x5ba6f7(0xa2)](_0x5e9eeb);if(_0x6823)return _0x6823[_0x5ba6f7(0x1c6)](_0x5255fb);}[_0x193bc9(0xe9)](_0x216707){const _0x512965=_0x193bc9;let _0x1f0c2d=this[_0x512965(0x292)][_0x512965(0xa2)](_0x216707);_0x1f0c2d&&(_0x1f0c2d[_0x512965(0x3d1)](),this['_roomMembers'][_0x512965(0x1f2)](_0x216707));}['dispose'](){const _0x1f98c1=_0x193bc9;this[_0x1f98c1(0x292)][_0x1f98c1(0x2ea)](_0x20adc0=>_0x20adc0[_0x1f98c1(0x3d1)]()),this[_0x1f98c1(0x292)][_0x1f98c1(0xc4)](),this[_0x1f98c1(0xf6)]['complete']();}};b=y([v(0x0,t[_0x193bc9(0xfe)])],b);var oe=class extends t[_0x193bc9(0x190)]{constructor(..._0x43d972){const _0x5aaef4=_0x193bc9;super(..._0x43d972),g(this,_0x5aaef4(0x373),new Map()),g(this,'_members$',new i[(_0x5aaef4(0x1d2))](this[_0x5aaef4(0x373)])),g(this,_0x5aaef4(0x26d),this[_0x5aaef4(0x28b)][_0x5aaef4(0x2db)]());}[_0x193bc9(0x3d1)](){const _0x53e3b2=_0x193bc9;this[_0x53e3b2(0x373)][_0x53e3b2(0xc4)](),this[_0x53e3b2(0x28b)][_0x53e3b2(0x1f3)]();}['updateMember'](_0x348f37){const _0x37af30=_0x193bc9;this[_0x37af30(0x373)][_0x37af30(0x191)](_0x348f37[_0x37af30(0x154)],_0x348f37),this[_0x37af30(0x248)]();}[_0x193bc9(0x303)](_0x75044c){const _0x4a859f=_0x193bc9;this[_0x4a859f(0x373)]['delete'](_0x75044c),this[_0x4a859f(0x248)]();}[_0x193bc9(0x1c6)](_0x32fabf){const _0x58b084=_0x193bc9;return this['_members'][_0x58b084(0xa2)](_0x32fabf);}[_0x193bc9(0x150)](){const _0x50e753=_0x193bc9;return Array[_0x50e753(0x1ae)](this[_0x50e753(0x373)]['values']());}[_0x193bc9(0x248)](){const _0x2b9863=_0x193bc9;this['_members$'][_0x2b9863(0x37d)](this[_0x2b9863(0x373)]);}};function se(_0x49d0f0,_0x4663d3){const _0x4e3e5e=_0x193bc9;if(le(_0x49d0f0))return _0x4663d3;if(_0x4663d3['eventID']===e[_0x4e3e5e(0x3cc)][_0x4e3e5e(0x176)]){let _0x5e3da3=me(_0x49d0f0),_0xa4be28=_0x4663d3;return{..._0xa4be28,'data':{..._0xa4be28['data'],'unitID':_0x49d0f0['target'][_0x4e3e5e(0xb0)],'unitType':_0x49d0f0[_0x4e3e5e(0x171)][_0x4e3e5e(0x29a)]??_0xa4be28[_0x4e3e5e(0x2ef)][_0x4e3e5e(0x29a)],'changeset':_0x5e3da3['toRemote'](_0xa4be28[_0x4e3e5e(0x2ef)][_0x4e3e5e(0x273)],he(_0x49d0f0))}};}if(_0x4663d3[_0x4e3e5e(0x1fa)]===e['CollaborationEvent'][_0x4e3e5e(0x389)]){let _0x33da9e=_0x4663d3;return{..._0x33da9e,'data':{..._0x33da9e[_0x4e3e5e(0x2ef)],'unitID':_0x49d0f0[_0x4e3e5e(0x171)][_0x4e3e5e(0xb0)],'unitType':_0x49d0f0['target'][_0x4e3e5e(0x29a)]??_0x33da9e[_0x4e3e5e(0x2ef)][_0x4e3e5e(0x29a)]}};}return _0x4663d3;}function ce(_0x181092,_0x2a0823){const _0x5e82cb=_0x193bc9;if(le(_0x181092))return[_0x2a0823];switch(_0x2a0823[_0x5e82cb(0x1fa)]){case e[_0x5e82cb(0x3cc)][_0x5e82cb(0xdf)]:return[ue(_0x181092,_0x2a0823)];case e[_0x5e82cb(0x3cc)]['PSEUDO_FETCH_MISSING_RESULT']:return[fe(_0x181092,_0x2a0823)];case e[_0x5e82cb(0x3cc)][_0x5e82cb(0x309)]:return[de(_0x181092,_0x2a0823)];default:return[_0x2a0823];}}function le(_0x1756dd){const _0xe82af=_0x193bc9;return _0x1756dd[_0xe82af(0x171)]['endpoint']==null&&_0x1756dd[_0xe82af(0x171)]['unitId']===_0x1756dd[_0xe82af(0x101)]&&!_0x1756dd['changeset'];}function ue(_0x3c7a36,_0x18741e){const _0x5b1acc=_0x193bc9;return{..._0x18741e,'data':(0x0,e['parseChangesetToProtocol'])(pe(_0x3c7a36,(0x0,e[_0x5b1acc(0x3ad)])(_0x18741e[_0x5b1acc(0x2ef)])))};}function de(_0x3e410,_0x1025d6){return{..._0x1025d6,'data':pe(_0x3e410,_0x1025d6['data'])};}function fe(_0x1bb882,_0x4333b6){const _0x36ff9c=_0x193bc9;let _0x4e0ffa=_0x4333b6['data'];return{..._0x4333b6,'data':{..._0x4e0ffa,'changesets':_0x4e0ffa[_0x36ff9c(0x3ba)][_0x36ff9c(0x1f4)](_0x19d9cb=>(0x0,e[_0x36ff9c(0x343)])(pe(_0x1bb882,(0x0,e[_0x36ff9c(0x3ad)])(_0x19d9cb))))}};}function pe(_0x3a69c4,_0x1cd9e2){const _0x4c782b=_0x193bc9;return me(_0x3a69c4)[_0x4c782b(0x22d)](_0x1cd9e2,he(_0x3a69c4));}function me(_0x2b8198){const _0x1715f6=_0x193bc9;if(!_0x2b8198['changeset'])throw Error(_0x1715f6(0x103));return _0x2b8198[_0x1715f6(0x273)];}function he(_0x3c45ca){const _0xfa2faa=_0x193bc9;return{'localUnitId':_0x3c45ca[_0xfa2faa(0x101)],'unitType':_0x3c45ca[_0xfa2faa(0x29a)],'target':_0x3c45ca['target']};}let ge=function(_0x57ba9a){const _0x181048=_0x193bc9;return _0x57ba9a[_0x57ba9a[_0x181048(0x2ad)]=0x0]=_0x181048(0x2ad),_0x57ba9a[_0x57ba9a[_0x181048(0x172)]=0x1]=_0x181048(0x172),_0x57ba9a[_0x57ba9a[_0x181048(0x129)]=0x2]='OFFLINE',_0x57ba9a[_0x57ba9a['ONLINE']=0x3]='ONLINE',_0x57ba9a;}({});const _e={[a['CmdRspCode'][_0x193bc9(0x2f9)]]:_0x193bc9(0x2a5),[a[_0x193bc9(0x33b)][_0x193bc9(0x31b)]]:_0x193bc9(0x3c3),[a[_0x193bc9(0x33b)][_0x193bc9(0x26e)]]:_0x193bc9(0x3a0),[a['CmdRspCode'][_0x193bc9(0x27c)]]:'session.room-permission-denied',[a['CmdRspCode']['GLOBAL_ROOMS_CNT_EXCEEDS']]:'session.room-cnt-exceeds'};let ve=class extends t[_0x193bc9(0x108)]{get[_0x193bc9(0x2c4)](){const _0x4acfd1=_0x193bc9;return this[_0x4acfd1(0x2d1)][_0x4acfd1(0x3b9)]();}constructor(_0x596646,_0x3a67c8,_0x39c5b5,_0x3ce44b,_0x495794,_0x2f79fb,_0x273276,_0x57c7f7){const _0x4b7d39=_0x193bc9;super(),this[_0x4b7d39(0x27d)]=_0x596646,this[_0x4b7d39(0x131)]=_0x39c5b5,this[_0x4b7d39(0x2e1)]=_0x3ce44b,this[_0x4b7d39(0x22b)]=_0x495794,this[_0x4b7d39(0x3af)]=_0x2f79fb,this[_0x4b7d39(0x2a9)]=_0x273276,this[_0x4b7d39(0x259)]=_0x57c7f7,g(this,_0x4b7d39(0x2d1),new i[(_0x4b7d39(0x1d2))](0x0)),g(this,'sessionStatus$',this['_sessionStatus$']['asObservable']()),g(this,_0x4b7d39(0x228),new i['Subject']()),g(this,_0x4b7d39(0xe0),this[_0x4b7d39(0x228)][_0x4b7d39(0x2db)]()),g(this,_0x4b7d39(0x275),void 0x0),g(this,_0x4b7d39(0x29b),void 0x0),g(this,_0x4b7d39(0x350),void 0x0),g(this,'_shouldReportTelemetry',!0x1),g(this,_0x4b7d39(0x28e),null),this[_0x4b7d39(0x175)]=!!this[_0x4b7d39(0x259)],_0x3a67c8[_0x4b7d39(0x3da)]((0x0,i[_0x4b7d39(0x21c)])(this[_0x4b7d39(0x2c8)]))[_0x4b7d39(0x1d4)](_0x3a849e=>{const _0x207662=_0x4b7d39;if(_0x3a849e!==void 0x0){if(this[_0x207662(0x275)]=_0x3a849e,_0x3a849e)this[_0x207662(0xf9)](_0x3a849e),this[_0x207662(0x29b)]=_0x3a849e['message$'][_0x207662(0x1d4)](_0x586292=>{const _0x453de4=_0x207662;_0x586292[_0x453de4(0x22c)]===this['_identity']['target'][_0x453de4(0xb0)]&&this[_0x453de4(0x1da)](_0x586292);});else{var _0x387afd;this[_0x207662(0x1bc)](),this[_0x207662(0x2d1)][_0x207662(0x37d)](0x2),(_0x387afd=this[_0x207662(0x29b)])==null||_0x387afd[_0x207662(0x237)](),this['_socketMessageSubscription']=null;}}});}[_0x193bc9(0x336)](){const _0x42176b=_0x193bc9;var _0x2b10e6;return((_0x2b10e6=this[_0x42176b(0x275)])==null?void 0x0:_0x2b10e6['memberID'])??null;}[_0x193bc9(0x3d1)](){const _0x2bb6a1=_0x193bc9;super[_0x2bb6a1(0x3d1)](),this[_0x2bb6a1(0x159)](),this['dispose$'][_0x2bb6a1(0x37d)](),this['dispose$'][_0x2bb6a1(0x1f3)]();}[_0x193bc9(0x159)](){const _0x5ddafb=_0x193bc9;var _0x2c7c55;this['_throwTelemetryCollaborationNewChangeset'](),(_0x2c7c55=this['_socket'])==null||_0x2c7c55[_0x5ddafb(0xce)]({'cmd':a[_0x5ddafb(0x386)][_0x5ddafb(0x3ce)],'data':{'roomID':this[_0x5ddafb(0x27d)][_0x5ddafb(0x171)][_0x5ddafb(0xb0)]}}),this['_event$']['complete'](),this['_sessionStatus$'][_0x5ddafb(0x1f3)]();}[_0x193bc9(0x1da)](_0x20bc06){const _0x52d41a=_0x193bc9;_0x20bc06['cmd']===a[_0x52d41a(0x386)][_0x52d41a(0x13c)]?this[_0x52d41a(0x1bb)](_0x20bc06):_0x20bc06[_0x52d41a(0x3a7)]===a[_0x52d41a(0x386)][_0x52d41a(0x2c5)]&&this['_onRecvEvent'](_0x20bc06);}[_0x193bc9(0xf9)](_0x12185b){const _0x290e9e=_0x193bc9;this[_0x290e9e(0x2d1)]['next'](0x1),_0x12185b['send']({'cmd':a[_0x290e9e(0x386)][_0x290e9e(0x13c)],'routeKey':this[_0x290e9e(0x27d)][_0x290e9e(0x171)][_0x290e9e(0xb0)],'routeType':'','data':{'rooms':[{'roomID':this['_identity']['target']['unitId']}]}});}[_0x193bc9(0x1bb)](_0x1c4746){const _0x31e996=_0x193bc9;var _0x2b6c05;if(_0x1c4746[_0x31e996(0x2f1)]in _e){this['_collaborationUIEventService']['emitEvent']({'id':_0x31e996(0x204),'data':_e[_0x1c4746['code']]}),this[_0x31e996(0x2d1)][_0x31e996(0x37d)](0x2);return;}this[_0x31e996(0x2d1)][_0x31e996(0x37d)](0x3);let _0x14d036=(_0x2b6c05=_0x1c4746[_0x31e996(0x2ef)]['roomInfos'][this[_0x31e996(0x27d)][_0x31e996(0x171)][_0x31e996(0xb0)]])==null?void 0x0:_0x2b6c05[_0x31e996(0x18f)];_0x14d036&&_0x14d036['forEach'](_0x305c2b=>this[_0x31e996(0x22b)][_0x31e996(0x3a9)](this['_identity'][_0x31e996(0x101)],_0x305c2b));}[_0x193bc9(0x13b)](_0xf546b1){const _0x42449e=_0x193bc9;try{let _0x31d9a6=ce(this[_0x42449e(0x27d)],_0xf546b1[_0x42449e(0x2ef)]);for(let _0x472e80 of _0x31d9a6)switch(_0x472e80[_0x42449e(0x1fa)]){case e['CollaborationEvent'][_0x42449e(0x208)]:this[_0x42449e(0x299)](_0x472e80),this['_event$'][_0x42449e(0x37d)](_0x472e80);break;case e[_0x42449e(0x3cc)][_0x42449e(0xe2)]:this[_0x42449e(0x2d2)](_0x472e80),this[_0x42449e(0x228)]['next'](_0x472e80);break;case e[_0x42449e(0x3cc)][_0x42449e(0x26c)]:case e['CollaborationEvent'][_0x42449e(0x309)]:this[_0x42449e(0x105)](),this[_0x42449e(0x1e9)](),this['_event$'][_0x42449e(0x37d)](_0x472e80);break;case e['CollaborationEvent']['MSG_FOR_ERROR']:this[_0x42449e(0x131)][_0x42449e(0x146)](_0x42449e(0x183)+JSON[_0x42449e(0x25e)](_0x472e80)),this[_0x42449e(0x228)][_0x42449e(0x37d)](_0x472e80);break;case e[_0x42449e(0x3cc)][_0x42449e(0x3cd)]:this[_0x42449e(0x3af)][_0x42449e(0x225)](_0x472e80[_0x42449e(0x2ef)]),this[_0x42449e(0x228)]['next'](_0x472e80);break;default:this[_0x42449e(0x228)][_0x42449e(0x37d)](_0x472e80);}}catch(_0x472bc8){this['_logService'][_0x42449e(0x146)](_0x472bc8,_0xf546b1);}}['_onUserJoin'](_0x1db045){const _0x12af6d=_0x193bc9;this['_memberService'][_0x12af6d(0x3a9)](this[_0x12af6d(0x27d)][_0x12af6d(0x101)],_0x1db045[_0x12af6d(0x2ef)]);}['_onUserLeave'](_0x2584d2){const _0x1d4b82=_0x193bc9;this[_0x1d4b82(0x22b)][_0x1d4b82(0x303)](this[_0x1d4b82(0x27d)][_0x1d4b82(0x101)],_0x2584d2[_0x1d4b82(0x2ef)][_0x1d4b82(0x154)]);}async[_0x193bc9(0xce)](_0x8b430b,_0x278321){const _0x4aabb2=_0x193bc9;if(this[_0x4aabb2(0x2c4)]!==0x3||!this[_0x4aabb2(0x275)])throw Error('[CollaborationSession]:\x20should\x20not\x20send\x20message\x20when\x20the\x20session\x20is\x20offline!');try{let _0x198031=se(this['_identity'],_0x8b430b);_0x198031[_0x4aabb2(0x1fa)]===e['CollaborationEvent'][_0x4aabb2(0x176)]&&(this['_scheduleCollaborationTimeoutTimer'](),this[_0x4aabb2(0x1c8)](_0x198031)),this[_0x4aabb2(0x275)]['send']({'cmd':a[_0x4aabb2(0x386)]['INGEST'],'routeKey':this[_0x4aabb2(0x27d)][_0x4aabb2(0x171)][_0x4aabb2(0xb0)],'routeType':'','data':_0x198031});}catch(_0x541b60){this[_0x4aabb2(0x131)][_0x4aabb2(0x146)](_0x541b60);}}[_0x193bc9(0x282)](){const _0x2be5b4=_0x193bc9;this[_0x2be5b4(0x350)]=setTimeout(()=>{this['_collaborationTimeoutTimer']=null,this['_collaborationUIEventService']['emitEvent']({'id':'SUBMIT_CHANGESET_TIMEOUT'});},this['_configService']['getConfig'](_0x2be5b4(0x164))??0x4e20);}[_0x193bc9(0x1e9)](){const _0x2aee1e=_0x193bc9;this[_0x2aee1e(0x350)]&&=(clearTimeout(this[_0x2aee1e(0x350)]),null);}['_startTelemetryCollaborationNewChangeset'](_0x4053b8){const _0x1acb5b=_0x193bc9;if(!this[_0x1acb5b(0x175)])return;let {data:_0x52d1b2}=_0x4053b8,{unitID:_0x11525a,changeset:_0x5ae75a}=_0x52d1b2,{mutations:_0x4e1ee3,type:_0x875852}=_0x5ae75a;this[_0x1acb5b(0x28e)]={'unitId':_0x11525a,'type':_0x875852,'startTime':performance['now'](),'stopTime':0x0,'duration':0x0,'size':te(_0x4e1ee3)};}[_0x193bc9(0x105)](){const _0x224011=_0x193bc9;if(this[_0x224011(0x175)]){if(!this[_0x224011(0x28e)]){this[_0x224011(0x131)]['error']('[CollaborationSession]',_0x224011(0x2a6));return;}this[_0x224011(0x28e)][_0x224011(0x30d)]=performance[_0x224011(0x174)](),this[_0x224011(0x28e)][_0x224011(0x3ae)]=this[_0x224011(0x28e)][_0x224011(0x30d)]-this[_0x224011(0x28e)][_0x224011(0x18c)],this[_0x224011(0x259)][_0x224011(0x1cb)](_0x224011(0x32a),this[_0x224011(0x28e)]),this['_telemetryInfo']=null;}}[_0x193bc9(0x1bc)](){const _0x8e2cf=_0x193bc9;this[_0x8e2cf(0x28e)]=null;}};ve=y([v(0x2,t['ILogService']),v(0x3,t['IConfigService']),v(0x4,(0x0,t[_0x193bc9(0x394)])(b)),v(0x5,(0x0,t['Inject'])(ae)),v(0x6,(0x0,t[_0x193bc9(0x394)])(_)),v(0x7,(0x0,t[_0x193bc9(0x294)])(o[_0x193bc9(0x391)]))],ve);const x=(0x0,t[_0x193bc9(0x199)])(_0x193bc9(0x374));function ye(_0x1555a4){const _0xd49ce7=_0x193bc9;return _0xd49ce7(0x35a)+_0x1555a4;}function be(_0x54d95f){const _0x5551a6=_0x193bc9;let {unitID:_0xe9092c,mutations:_0x2d3876}=_0x54d95f;return{'unitId':_0xe9092c,'subUnitId':_0x2d3876['length']>0x0?_0x2d3876[0x0][_0x5551a6(0x203)]['subUnitId']:null};}let S=class{constructor(_0x1d60b9,_0x466867,_0x309561){const _0x57f935=_0x193bc9;this[_0x57f935(0x254)]=_0x1d60b9,this[_0x57f935(0x33e)]=_0x466867,this[_0x57f935(0x37e)]=_0x309561;}[_0x193bc9(0x30c)](_0x35c279){const _0x2ace7b=_0x193bc9;var _0xa712e5,_0x43f7f2;let _0x2bcc7b=this[_0x2ace7b(0x254)]['get'](r[_0x2ace7b(0x2a7)]),{unitId:_0x876a87,subUnitId:_0x3f9a35}=be(_0x35c279),_0x19b431=_0x2bcc7b==null?void 0x0:_0x2bcc7b[_0x2ace7b(0x2e3)](_0x876a87)[_0x2ace7b(0x1d0)](),_0x2b42e1=(_0xa712e5=this[_0x2ace7b(0x37e)][_0x2ace7b(0xe8)](_0x876a87))==null||(_0xa712e5=_0xa712e5[_0x2ace7b(0x227)]())==null?void 0x0:_0xa712e5[_0x2ace7b(0x341)]();if(_0x19b431[_0x2ace7b(0x3c9)]===0x0||!_0x876a87||!_0x3f9a35)return;let _0x3b3966=[{'id':r[_0x2ace7b(0x118)]['id'],'params':{'unitId':_0x876a87,'subUnitId':_0x2b42e1,'selections':t['Tools'][_0x2ace7b(0x29e)](_0x19b431)}}],_0x269440=this[_0x2ace7b(0x33e)]['transformMutationsWithChangeset'](_0x35c279,_0x3b3966);if(!(0x0,e['isTransformMutationsWithChangesetSuccess'])(_0x269440))throw _0x269440[_0x2ace7b(0x146)];let _0x552713=(_0x43f7f2=_0x269440[_0x2ace7b(0x2ec)][0x0])==null||(_0x43f7f2=_0x43f7f2[_0x2ace7b(0x203)])==null?void 0x0:_0x43f7f2[_0x2ace7b(0x226)];if(Array[_0x2ace7b(0x140)](_0x552713)&&_0x552713['length']){if(_0x552713['length']===_0x3b3966[0x0][_0x2ace7b(0x203)][_0x2ace7b(0x226)]['length']&&_0x552713[_0x2ace7b(0x29f)]((_0x22e1e2,_0x5a6568)=>t[_0x2ace7b(0x3bf)][_0x2ace7b(0xd8)](_0x22e1e2['range'],_0x3b3966[0x0]['params'][_0x2ace7b(0x226)][_0x5a6568][_0x2ace7b(0x353)])))return;this[_0x2ace7b(0x254)][_0x2ace7b(0xa2)](t[_0x2ace7b(0x2ae)])[_0x2ace7b(0x1a4)](r['SetSelectionsOperation']['id'],{'unitId':_0x876a87,'subUnitId':_0x2b42e1,'selections':_0x552713});}}};S=y([v(0x0,(0x0,t['Inject'])(t[_0x193bc9(0xb4)])),v(0x1,e[_0x193bc9(0x31f)]),v(0x2,t['IUniverInstanceService'])],S);const C=(0x0,t[_0x193bc9(0x199)])(_0x193bc9(0x1fd));let xe=function(_0x2fa608){const _0x5549a6=_0x193bc9;return _0x2fa608[_0x2fa608[_0x5549a6(0x246)]=0x0]=_0x5549a6(0x246),_0x2fa608[_0x2fa608[_0x5549a6(0x24d)]=0x1]=_0x5549a6(0x24d),_0x2fa608;}({});function Se(_0x52f2b5){const _0xcb31b=_0x193bc9;var _0x418e6a;return!!((_0x418e6a=_0x52f2b5[_0xcb31b(0x203)])!=null&&_0x418e6a[_0xcb31b(0x362)]);}const Ce=new Set([r[_0x193bc9(0x106)]['id']]),we=new Set([c['AddSlidePageMutation']['id'],c[_0x193bc9(0xf5)]['id'],c[_0x193bc9(0x10b)]['id'],c[_0x193bc9(0x35e)]['id']]);function Te(_0x5a4f02,_0x590882=Ce){const _0xf21908=_0x193bc9;let _0x4c9ed2=[];for(let _0x47aa0e of _0x5a4f02){if(_0x590882['has'](_0x47aa0e['id'])){if(_0x4c9ed2['length']>0x0)break;_0x4c9ed2[_0xf21908(0x12d)](_0x47aa0e);break;}if(Se(_0x47aa0e)){if(_0x4c9ed2['length']>0x0)break;_0x4c9ed2[_0xf21908(0x12d)](_0x47aa0e);break;}_0x4c9ed2[_0xf21908(0x12d)](_0x47aa0e);}return _0x4c9ed2;}function w(_0x14155a,_0x31fed4,_0xc1311,_0x8b5ac3,_0x353922){const _0x39c04f=_0x193bc9;let _0x484869=Te(_0x14155a),_0x6eef71=_0x353922[_0x39c04f(0x218)](),_0x50074b=(_0x6eef71==null?void 0x0:_0x6eef71[_0x39c04f(0x257)])??_0x39c04f(0x27e),_0x32f54c=(_0x6eef71==null?void 0x0:_0x6eef71[_0x39c04f(0x154)])??_0x39c04f(0x27e);return{'changeset':{'unitID':_0x31fed4,'type':(0x0,e[_0x39c04f(0x251)])(_0xc1311[_0x39c04f(0x351)](_0x31fed4)),'baseRev':_0x8b5ac3[_0x39c04f(0x1d1)](_0x31fed4),'revision':0x0,'userID':_0x50074b,'memberID':_0x32f54c,'mutations':_0x484869},'pendingMutations':_0x14155a[_0x39c04f(0x3d7)](_0x484869[_0x39c04f(0x3c9)])};}const Ee=w;function De(_0xa0b721,_0xdcf7f0,_0x177e5e,_0x3f1cbe,_0x36db7b){const _0x521790=_0x193bc9;let _0x38dda6=Te(_0xa0b721,we),_0xe5ae77=_0x36db7b['getCurrentUser'](),_0x4b8f91=(_0xe5ae77==null?void 0x0:_0xe5ae77[_0x521790(0x257)])??_0x521790(0x27e),_0x33d73c=(_0xe5ae77==null?void 0x0:_0xe5ae77[_0x521790(0x154)])??'unknown';return{'changeset':{'unitID':_0xdcf7f0,'type':(0x0,e['mapDocumentTypeToUniverInstanceType'])(_0x177e5e['getUnitType'](_0xdcf7f0)),'baseRev':_0x3f1cbe[_0x521790(0x1d1)](_0xdcf7f0),'revision':0x0,'userID':_0x4b8f91,'memberID':_0x33d73c,'mutations':_0x38dda6},'pendingMutations':_0xa0b721[_0x521790(0x3d7)](_0x38dda6[_0x521790(0x3c9)])};}function Oe(_0x2360e8,_0x3ccf5b,_0x1ccc4c,_0x2fd186,_0x2f04e0){const _0x44e104=_0x193bc9;let _0x3a78cf=_0x2360e8['reduce']((_0xdc9028,_0x1bdb23)=>{const _0x27aac3=_0x5d42;let _0x405b62=_0xdc9028[_0xdc9028[_0x27aac3(0x3c9)]-0x1],{id:_0x5876ce}=_0x405b62??{},{id:_0x50a9ea,type:_0x48fc4b}=_0x1bdb23,_0x3a263d=_0x1bdb23[_0x27aac3(0x203)];if(_0x5876ce&&_0x5876ce!==_0x50a9ea)throw Error(_0x27aac3(0x340)+_0x5876ce+_0x27aac3(0x20b)+_0x50a9ea+'.');if(!_0x405b62)return[{'id':_0x50a9ea,'type':_0x48fc4b,'params':{'unitId':_0x3a263d[_0x27aac3(0xb0)],'textRanges':_0x3a263d[_0x27aac3(0x215)],'actions':_0x3a263d['actions']}}];let _0x2bee08=_0x405b62[_0x27aac3(0x203)];return ke(_0x2bee08,_0x3a263d)?[..._0xdc9028[_0x27aac3(0x3d7)](0x0,-0x1),{..._0x405b62,'id':_0x50a9ea,'type':_0x48fc4b,'params':{'unitId':_0x3a263d[_0x27aac3(0xb0)],'textRanges':_0x3a263d[_0x27aac3(0x215)],'actions':t[_0x27aac3(0x155)][_0x27aac3(0x26a)](_0x2bee08[_0x27aac3(0x17f)],_0x3a263d['actions'])}}]:[..._0xdc9028,{'id':_0x50a9ea,'type':_0x48fc4b,'params':{'unitId':_0x3a263d['unitId'],'textRanges':_0x3a263d['textRanges'],'actions':_0x3a263d['actions']}}];},[]),_0x42583a=_0x2f04e0[_0x44e104(0x218)](),_0x8bc026=(_0x42583a==null?void 0x0:_0x42583a['userID'])??_0x44e104(0x27e),_0x22935f=(_0x42583a==null?void 0x0:_0x42583a['memberID'])??_0x44e104(0x27e);return{'changeset':{'unitID':_0x3ccf5b,'type':(0x0,e[_0x44e104(0x251)])(_0x1ccc4c[_0x44e104(0x351)](_0x3ccf5b)),'baseRev':_0x2fd186['getCurrentRevOfUnit'](_0x3ccf5b),'revision':0x0,'userID':_0x8bc026,'memberID':_0x22935f,'mutations':_0x3a78cf},'pendingMutations':_0x2360e8[_0x44e104(0x3d7)](_0x2360e8[_0x44e104(0x3c9)])};}function ke(_0x61d200,_0x1f11df){const _0x329b8c=_0x193bc9;return!Ae(_0x61d200)&&!Ae(_0x1f11df)&&je(_0x61d200['actions'],_0x1f11df[_0x329b8c(0x17f)]);}function Ae(_0x9808e7){return _0x9808e7['isCompositionEnd']!==void 0x0;}function je(_0x3d1238,_0x235618){return Me(_0x3d1238)&&Me(_0x235618)&&!Pe(_0x3d1238)&&!Pe(_0x235618)&&!Ne(_0x3d1238)&&!Ne(_0x235618);}function Me(_0x33f0ad){const _0x23158d=_0x193bc9;return Fe(_0x33f0ad)[_0x23158d(0xf1)](_0x592587=>T(_0x592587)&&_0x592587['et']===_0x23158d(0x2b5));}function Ne(_0x1a2493){const _0x2b7ef4=_0x193bc9;return Fe(_0x1a2493)[_0x2b7ef4(0xf1)](_0x4e0a6c=>Array[_0x2b7ef4(0x140)](_0x4e0a6c)||typeof _0x4e0a6c==_0x2b7ef4(0x2fa)||typeof _0x4e0a6c==_0x2b7ef4(0x1d8));}function Pe(_0x195e49){const _0x4fc6b3=_0x193bc9;return Fe(_0x195e49)[_0x4fc6b3(0xf1)](_0x127788=>!T(_0x127788)||_0x127788['et']!=='text-x'||!Array[_0x4fc6b3(0x140)](_0x127788['e'])?!0x1:_0x127788['e'][_0x4fc6b3(0xf1)](_0x3a1e8b=>!T(_0x3a1e8b)||!T(_0x3a1e8b['body'])?!0x1:Object[_0x4fc6b3(0x1f1)][_0x4fc6b3(0x270)][_0x4fc6b3(0x306)](_0x3a1e8b[_0x4fc6b3(0x328)],_0x4fc6b3(0x304))||Object[_0x4fc6b3(0x1f1)]['hasOwnProperty'][_0x4fc6b3(0x306)](_0x3a1e8b['body'],'columnGroups')||Object['prototype'][_0x4fc6b3(0x270)][_0x4fc6b3(0x306)](_0x3a1e8b[_0x4fc6b3(0x328)],_0x4fc6b3(0x262))));}function Fe(_0x210d5a){const _0x419b89=_0x193bc9;if(!Array['isArray'](_0x210d5a))return[];let _0x6a5a72=_0x210d5a[_0x419b89(0x30f)](_0x419b89(0x328))?_0x210d5a:_0x210d5a[_0x419b89(0x193)](_0x2804a8=>Array['isArray'](_0x2804a8)&&_0x2804a8['includes'](_0x419b89(0x328)));if(!Array[_0x419b89(0x140)](_0x6a5a72))return[];let _0x375ed4=_0x6a5a72[_0x419b89(0x378)]('body');return _0x375ed4===-0x1?[]:_0x6a5a72[_0x419b89(0x3d7)](_0x375ed4+0x1);}function T(_0x2ab87f){const _0x2dae1e=_0x193bc9;return typeof _0x2ab87f==_0x2dae1e(0x241)&&!!_0x2ab87f&&!Array[_0x2dae1e(0x140)](_0x2ab87f);}function Ie(_0x54db96,_0x399500){const _0x1d93ca=_0x193bc9;let _0x491a57=new i['ReplaySubject'](0x1);return setTimeout(()=>_0x491a57[_0x1d93ca(0x37d)](_0x399500),_0x54db96),_0x491a57[_0x1d93ca(0x2db)]()['pipe']((0x0,i[_0x1d93ca(0x308)])(0x1));}var Le,Re,ze;let Be=function(_0x42e75d){const _0x5c6dd6=_0x193bc9;return _0x42e75d['NOT_COLLAB']=_0x5c6dd6(0x19d),_0x42e75d[_0x5c6dd6(0x132)]=_0x5c6dd6(0x288),_0x42e75d['PENDING']=_0x5c6dd6(0x2a0),_0x42e75d[_0x5c6dd6(0x35f)]='awaiting',_0x42e75d[_0x5c6dd6(0x232)]=_0x5c6dd6(0x2a8),_0x42e75d['FETCH_MISS']=_0x5c6dd6(0x12b),_0x42e75d[_0x5c6dd6(0x1b6)]=_0x5c6dd6(0xc5),_0x42e75d[_0x5c6dd6(0x129)]='offline',_0x42e75d;}({});const Ve=0x4e20,He=0x2bf20;var E=class{constructor(_0xc6d5d3,_0x2c62c1,_0x50fd7f,_0x79a475,_0x5124c7,_0x10790a,_0x1af0be,_0x14ffe9,_0x127e4c){const _0x3d424a=_0x193bc9;this['unitID']=_0xc6d5d3,this[_0x3d424a(0x213)]=_0x2c62c1,this[_0x3d424a(0x1aa)]=_0x5124c7,this[_0x3d424a(0x28d)]=_0x10790a,this['_undoRedoService']=_0x1af0be,this[_0x3d424a(0x13e)]=_0x14ffe9,this['_localCacheService']=_0x127e4c,g(this,_0x3d424a(0x2fe),null),g(this,'_pendingMutations',[]),this[_0x3d424a(0x2fe)]=_0x50fd7f,this['_pendingMutations']=_0x79a475;}[_0x193bc9(0x157)](_0x22a45c){const _0x1dc8e4=_0x193bc9;let _0x1e6f71=this[_0x1dc8e4(0x13e)][_0x1dc8e4(0x1d1)](this[_0x1dc8e4(0x29c)]);return _0x22a45c['revision']>_0x1e6f71+0x1&&(this['_handler'][_0x1dc8e4(0x268)]({'from':_0x1e6f71,'to':_0x22a45c['revision']-0x1}),!0x0);}['_transformUndoredo'](_0x16aca3){const _0x59da71=_0x193bc9;this[_0x59da71(0x395)][_0x59da71(0x2c3)](this['unitID'],_0x16aca3);}[_0x193bc9(0x2bd)](_0x3b99ad){const _0x12f1e8=_0x193bc9;var _0x430e56,_0x366d05;(_0x430e56=(_0x366d05=this[_0x12f1e8(0x1aa)])['onTransformSelections'])==null||_0x430e56[_0x12f1e8(0x306)](_0x366d05,_0x3b99ad);}['_prepareTransformSelections'](_0x4dd52a){const _0x2018c7=_0x193bc9;var _0x4c7ae7,_0x4c14fe;return((_0x4c7ae7=(_0x4c14fe=this[_0x2018c7(0x1aa)])['onPrepareTransformSelections'])==null?void 0x0:_0x4c7ae7[_0x2018c7(0x306)](_0x4c14fe,_0x4dd52a))??null;}[_0x193bc9(0x161)](_0x3a389f){const _0x5a12f2=_0x193bc9;var _0x2cf443,_0x2a9b30;return(_0x2cf443=(_0x2a9b30=this[_0x5a12f2(0x1aa)])[_0x5a12f2(0x2aa)])==null?void 0x0:_0x2cf443['call'](_0x2a9b30,_0x3a389f);}['_transformStateCache'](_0x3d7f25){const _0x420a3e=_0x193bc9;var _0x32ff92,_0x5b85e0;return(_0x32ff92=(_0x5b85e0=this[_0x420a3e(0x1aa)])[_0x420a3e(0x188)])==null?void 0x0:_0x32ff92[_0x420a3e(0x306)](_0x5b85e0,_0x3d7f25);}[_0x193bc9(0xfb)](_0x14b02f){const _0x571701=_0x193bc9;var _0x58bd48,_0xb8e048;return((_0x58bd48=(_0xb8e048=this[_0x571701(0x1aa)])[_0x571701(0x242)])==null?void 0x0:_0x58bd48[_0x571701(0x306)](_0xb8e048,_0x14b02f))??_0x14b02f;}[_0x193bc9(0x149)](_0x1e62c1){var _0x372c6c,_0x5cebe4;return((_0x372c6c=(_0x5cebe4=this['_handler'])['onTransformRemoteChangesetByStateCache'])==null?void 0x0:_0x372c6c['call'](_0x5cebe4,_0x1e62c1))??_0x1e62c1;}[_0x193bc9(0x1a3)](_0x3ad42b){const _0x981338=_0x193bc9;if(this[_0x981338(0x213)]===t[_0x981338(0xa8)]['UNIVER_DOC']){let {unitID:_0x8b1f72,mutations:_0x2b4d1d,memberID:_0x3399f9}=_0x3ad42b,_0x205460=_0x2b4d1d[_0x981338(0x3c9)]>0x0?_0x2b4d1d[0x0][_0x981338(0x203)][_0x981338(0x215)]:[];if(Array['isArray'](_0x205460)&&_0x205460[_0x981338(0x3c9)]>0x0){var _0x2f516b,_0xe28c47;(_0x2f516b=(_0xe28c47=this[_0x981338(0x1aa)])[_0x981338(0x331)])==null||_0x2f516b['call'](_0xe28c47,{'unitID':_0x8b1f72,'memberID':_0x3399f9,'textRanges':_0x205460});}}}['_updateLocalCache'](){const _0x394441=_0x193bc9;var _0x1bb1c0;(_0x1bb1c0=this[_0x394441(0x337)])==null||_0x1bb1c0['updateOfflineData'](this['unitID'],this[_0x394441(0x213)],this[_0x394441(0x2fe)],this['_pendingMutations']);}[_0x193bc9(0x1ab)](){const _0x9661e7=_0x193bc9;return this[_0x9661e7(0x13e)][_0x9661e7(0x1d1)](this['unitID']);}['_incrementRevisionNumber'](){const _0x1dcb07=_0x193bc9;this[_0x1dcb07(0x13e)]['incrementRevOfUnit'](this['unitID']);}[_0x193bc9(0x25a)](_0x256d6c){const _0x164fd2=_0x193bc9;let _0x4d0111=this[_0x164fd2(0xfb)](_0x256d6c);_0x4d0111=this['_transformRemoteChangesetByStateCache'](_0x4d0111);let _0x1682e1=this[_0x164fd2(0x313)](_0x4d0111),_0x21a484=(0x0,t[_0x164fd2(0x300)])(_0x4d0111[_0x164fd2(0xa5)],this[_0x164fd2(0x28d)],{'fromCollab':!0x0});if(!_0x21a484[_0x164fd2(0x355)])throw _0x1682e1==null||_0x1682e1[_0x164fd2(0x182)](),_0x21a484[_0x164fd2(0x146)]instanceof Error?_0x21a484['error']:Error(_0x21a484[_0x164fd2(0x146)]??_0x164fd2(0x38b));_0x1682e1==null||_0x1682e1[_0x164fd2(0x10d)](),this[_0x164fd2(0x161)](_0x4d0111),this['_transformStateCache'](_0x4d0111),this[_0x164fd2(0x12f)](_0x256d6c),this[_0x164fd2(0x2bd)](_0x4d0111),this[_0x164fd2(0x1a3)](_0x4d0111),this[_0x164fd2(0xcf)]();}};let D=class extends E{constructor(_0x29e4ce,_0x5ee426,_0x44aa1a,_0x59e469,_0x5415c8,_0x2fa93a,_0x23b62a,_0x272fa3,_0x45d174,_0x5c5a8f){const _0x25f90f=_0x193bc9;super(_0x29e4ce,_0x5ee426,null,[],_0x44aa1a,_0x23b62a,_0x2fa93a,_0x59e469,_0x5c5a8f),this[_0x25f90f(0x254)]=_0x5415c8,this[_0x25f90f(0x131)]=_0x272fa3,this[_0x25f90f(0x33e)]=_0x45d174,this[_0x25f90f(0x33d)]=_0x5c5a8f,g(this,_0x25f90f(0x206),_0x25f90f(0x288));}[_0x193bc9(0x2d9)](_0x216cbc){const _0x4d494b=_0x193bc9;let _0x21d9cc=this[_0x4d494b(0x254)][_0x4d494b(0x1a5)](O,this['unitID'],this[_0x4d494b(0x213)],[_0x216cbc],this[_0x4d494b(0x1aa)]);return _0x21d9cc['_schedule'](),_0x21d9cc[_0x4d494b(0x1c0)](),_0x21d9cc;}['onRemoteChangeset'](_0x49b207){const _0x38dc9c=_0x193bc9;if(this[_0x38dc9c(0x157)](_0x49b207))return this[_0x38dc9c(0x254)][_0x38dc9c(0x1a5)](N,this[_0x38dc9c(0x29c)],this[_0x38dc9c(0x213)],null,[],null,[_0x49b207],this['_handler']);try{let _0x5b9a3d=this['_transformService'][_0x38dc9c(0x3bd)](_0x49b207,[e[_0x38dc9c(0x165)]]);if((0x0,e[_0x38dc9c(0x2f0)])(_0x5b9a3d)){let {c1Prime:_0x1b9c2a}=_0x5b9a3d;return this[_0x38dc9c(0x25a)](_0x1b9c2a),this;}throw _0x5b9a3d['error'];}catch(_0x5d3305){return this['_logService'][_0x38dc9c(0x146)](_0x5d3305),this['_onConflict'](!0x1);}}[_0x193bc9(0x2c6)](_0x332fba){const _0x40b286=_0x193bc9;return this[_0x40b286(0x254)][_0x40b286(0x1a5)](j,this[_0x40b286(0x29c)],this[_0x40b286(0x213)],null,[],this[_0x40b286(0x1aa)],_0x332fba);}['onRemoteAck'](_0x26d8f1){const _0x2b6a9b=_0x193bc9;if(_0x26d8f1['revision']<=this[_0x2b6a9b(0x1ab)]())return this;throw Error('[SyncedState]:\x20received\x20acknowledgement.');}[_0x193bc9(0x32e)](){const _0x16f3f7=_0x193bc9;throw Error(_0x16f3f7(0xd4));}[_0x193bc9(0xd1)](){return this;}[_0x193bc9(0x1ff)](){const _0x1b0115=_0x193bc9;return this[_0x1b0115(0x254)][_0x1b0115(0x1a5)](M,this['unitID'],this[_0x1b0115(0x213)],null,[],this['_handler']);}['toggleOnline'](){return this;}['resend'](){throw Error('[SyncedState]:\x20invalid\x20calling\x20to\x20`resend`.');}[_0x193bc9(0x2c2)](){const _0x5ea422=_0x193bc9;let _0x1bfa90=this['_revisionService'][_0x5ea422(0x1d1)](this[_0x5ea422(0x29c)]);return this[_0x5ea422(0x1aa)]['onMissingChangesets']({'from':_0x1bfa90,'to':0x0}),this['_injector'][_0x5ea422(0x1a5)](N,this[_0x5ea422(0x29c)],this[_0x5ea422(0x213)],null,[],null,[],this[_0x5ea422(0x1aa)]);}};D=y([v(0x3,(0x0,t[_0x193bc9(0x394)])(e[_0x193bc9(0x390)])),v(0x4,(0x0,t[_0x193bc9(0x394)])(t[_0x193bc9(0xb4)])),v(0x5,t[_0x193bc9(0x3dc)]),v(0x6,t[_0x193bc9(0x2ae)]),v(0x7,t['ILogService']),v(0x8,e['ITransformService']),v(0x9,(0x0,t[_0x193bc9(0x294)])(x))],D);let O=Le=class extends E{constructor(_0x2f7e40,_0x24baf0,_0x92cbad,_0x3e6a9b,_0x822167,_0x447c09,_0x7a1373,_0x113ed2,_0x42f041,_0x56667f,_0x34124e,_0x48bfc8,_0x4092bd,_0x5982e3){const _0x1da73b=_0x193bc9;super(_0x2f7e40,_0x24baf0,null,_0x92cbad,_0x3e6a9b,_0x42f041,_0x4092bd,_0x447c09,_0x5982e3),this[_0x1da73b(0x254)]=_0x822167,this['_userManagerService']=_0x7a1373,this['_logService']=_0x113ed2,this['_configService']=_0x56667f,this[_0x1da73b(0x33e)]=_0x34124e,this[_0x1da73b(0xac)]=_0x48bfc8,g(this,_0x1da73b(0x206),_0x1da73b(0x2a0)),g(this,_0x1da73b(0x344),null),g(this,_0x1da73b(0x25b),null);}[_0x193bc9(0x2d9)](_0x5ccfba){return this['_pendingMutations']['push'](_0x5ccfba),this['_updateLocalCache'](),this;}[_0x193bc9(0x192)](_0x541ee3){const _0x5b3ed2=_0x193bc9;if(this[_0x5b3ed2(0x157)](_0x541ee3))return this[_0x5b3ed2(0x1df)](),this['_injector'][_0x5b3ed2(0x1a5)](N,this['unitID'],this[_0x5b3ed2(0x213)],null,this[_0x5b3ed2(0xbd)],null,[_0x541ee3],this[_0x5b3ed2(0x1aa)]);try{let _0x4774c4=this[_0x5b3ed2(0x33e)]['transformMutationsWithChangeset'](_0x541ee3,this[_0x5b3ed2(0xbd)]);if((0x0,e[_0x5b3ed2(0x2f0)])(_0x4774c4)){let {c1Prime:_0xae77a2,m2Prime:_0x727f6f}=_0x4774c4;this[_0x5b3ed2(0x25a)](_0xae77a2);let _0x2e4625=this['_injector']['createInstance'](Le,this['unitID'],this['type'],_0x727f6f,this['_handler']);this['_clearScheduledTask']();let _0x3c01f7=new Date()[_0x5b3ed2(0x392)](),_0x5307ff=this['_scheduleCompleteTimestamp']?Math[_0x5b3ed2(0x245)](this['_scheduleCompleteTimestamp']-_0x3c01f7,0x0):this[_0x5b3ed2(0x23b)]();return _0x2e4625['_schedule'](_0x5307ff),_0x2e4625;}throw _0x4774c4['error'];}catch(_0x427ca4){return this[_0x5b3ed2(0x131)][_0x5b3ed2(0x146)](_0x427ca4),this[_0x5b3ed2(0x2c6)](!0x1);}}[_0x193bc9(0x3a2)](_0x13b9c5){const _0x114abb=_0x193bc9;if(_0x13b9c5['revision']<=this[_0x114abb(0x1ab)]())return this;throw Error(_0x114abb(0x233));}[_0x193bc9(0x32e)](){const _0xa20a85=_0x193bc9;throw Error(_0xa20a85(0x39c));}[_0x193bc9(0xd1)](){return this;}[_0x193bc9(0x1ff)](){const _0xe57502=_0x193bc9;return this[_0xe57502(0x1df)](),this[_0xe57502(0x254)][_0xe57502(0x1a5)](M,this[_0xe57502(0x29c)],this[_0xe57502(0x213)],null,this[_0xe57502(0xbd)],this['_handler']);}[_0x193bc9(0x151)](){return this;}['_schedule'](_0x2ca0a4){const _0x18b65c=_0x193bc9;let _0x3d067a=_0x2ca0a4??this['_getSendChangesetTimeout']();this[_0x18b65c(0x344)]=new Date()[_0x18b65c(0x392)]()+_0x3d067a,this[_0x18b65c(0x25b)]=setTimeout(()=>{const _0xf6f63=_0x18b65c;this[_0xf6f63(0x1df)]();let _0x176567=null;switch(this['type']){case t['UniverInstanceType']['UNIVER_SHEET']:_0x176567=w(this[_0xf6f63(0xbd)],this['unitID'],this[_0xf6f63(0xac)],this['_revisionService'],this[_0xf6f63(0x104)]);break;case t['UniverInstanceType']['UNIVER_DOC']:_0x176567=this['_pendingMutations'][_0xf6f63(0x29f)](_0x4163ef=>_0x4163ef['id']===n[_0xf6f63(0x1ba)]['id'])?Oe(this[_0xf6f63(0xbd)],this[_0xf6f63(0x29c)],this[_0xf6f63(0xac)],this[_0xf6f63(0x13e)],this[_0xf6f63(0x104)]):w(this[_0xf6f63(0xbd)],this[_0xf6f63(0x29c)],this[_0xf6f63(0xac)],this['_revisionService'],this[_0xf6f63(0x104)]);break;case t['UniverInstanceType'][_0xf6f63(0x2b7)]:_0x176567=De(this[_0xf6f63(0xbd)],this['unitID'],this[_0xf6f63(0xac)],this[_0xf6f63(0x13e)],this[_0xf6f63(0x104)]);break;case t[_0xf6f63(0xa8)][_0xf6f63(0x18d)]:_0x176567=Ee(this[_0xf6f63(0xbd)],this[_0xf6f63(0x29c)],this[_0xf6f63(0xac)],this['_revisionService'],this[_0xf6f63(0x104)]);break;case t[_0xf6f63(0xa8)][_0xf6f63(0x181)]:_0x176567=w(this[_0xf6f63(0xbd)],this[_0xf6f63(0x29c)],this[_0xf6f63(0xac)],this[_0xf6f63(0x13e)],this[_0xf6f63(0x104)]);break;case t[_0xf6f63(0xa8)]['UNIVER_BASE']:_0x176567=w(this['_pendingMutations'],this[_0xf6f63(0x29c)],this[_0xf6f63(0xac)],this[_0xf6f63(0x13e)],this['_userManagerService']);break;default:throw Error('[PendingState]:\x20unhandled\x20univer\x20type:\x20'+this['type']+_0xf6f63(0xb2));}let {changeset:_0x5dcbf5,pendingMutations:_0x78de3}=_0x176567;this[_0xf6f63(0x1aa)][_0xf6f63(0x271)](_0x5dcbf5);let _0x4266de=_0x78de3[_0xf6f63(0x3c9)]?this[_0xf6f63(0x254)][_0xf6f63(0x1a5)](A,this[_0xf6f63(0x29c)],this[_0xf6f63(0x213)],_0x5dcbf5,_0x78de3,this['_handler'],void 0x0):this[_0xf6f63(0x254)][_0xf6f63(0x1a5)](k,this[_0xf6f63(0x29c)],this[_0xf6f63(0x213)],_0x5dcbf5,this[_0xf6f63(0x1aa)]);_0x4266de['_updateLocalCache'](),this[_0xf6f63(0x1aa)][_0xf6f63(0x210)](this,_0x4266de);},_0x3d067a);}[_0x193bc9(0x23b)](){const _0x141765=_0x193bc9;let _0x24e32f=this[_0x141765(0x2e1)][_0x141765(0x372)](m);return(_0x24e32f==null?void 0x0:_0x24e32f[_0x141765(0x276)])??0x7d0;}['resend'](){const _0x59c6e6=_0x193bc9;throw Error(_0x59c6e6(0x35b));}['_clearScheduledTask'](){const _0x2dd3b5=_0x193bc9;this[_0x2dd3b5(0x25b)]!=null&&(clearTimeout(this['_sendingTimer']),this[_0x2dd3b5(0x25b)]=null);}[_0x193bc9(0x2c6)](_0x1901f4){const _0x18ae90=_0x193bc9;return this['_clearScheduledTask'](),this[_0x18ae90(0x254)][_0x18ae90(0x1a5)](j,this[_0x18ae90(0x29c)],this[_0x18ae90(0x213)],null,this[_0x18ae90(0xbd)],this[_0x18ae90(0x1aa)],_0x1901f4);}};O=Le=y([v(0x4,(0x0,t[_0x193bc9(0x394)])(t[_0x193bc9(0xb4)])),v(0x5,(0x0,t[_0x193bc9(0x394)])(e[_0x193bc9(0x390)])),v(0x6,(0x0,t['Inject'])(t[_0x193bc9(0x135)])),v(0x7,t[_0x193bc9(0x185)]),v(0x8,t[_0x193bc9(0x2ae)]),v(0x9,t['IConfigService']),v(0xa,e[_0x193bc9(0x31f)]),v(0xb,t[_0x193bc9(0xfe)]),v(0xc,t['IUndoRedoService']),v(0xd,(0x0,t[_0x193bc9(0x294)])(x))],O);let k=Re=class extends E{constructor(_0x5d5db6,_0x3d371a,_0x2a7d0d,_0x15d555,_0x38ef31,_0x3f46a1,_0x5263b5,_0x229190,_0x42bb83,_0x2d9845,_0x24bcbb){const _0x275f4b=_0x193bc9;super(_0x5d5db6,_0x3d371a,_0x2a7d0d,[],_0x15d555,_0x5263b5,_0x2d9845,_0x3f46a1,_0x24bcbb),this[_0x275f4b(0x254)]=_0x38ef31,this[_0x275f4b(0x131)]=_0x229190,this[_0x275f4b(0x33e)]=_0x42bb83,g(this,'status',_0x275f4b(0x111)),g(this,_0x275f4b(0x1fc),0x0),g(this,_0x275f4b(0x295),0x0),g(this,'_resendTimer',void 0x0),g(this,_0x275f4b(0x31c),void 0x0);}[_0x193bc9(0x2d9)](_0x1916c1){const _0x35ae8f=_0x193bc9;this['_clearScheduledTask']();let _0x495a68=this[_0x35ae8f(0x254)][_0x35ae8f(0x1a5)](A,this[_0x35ae8f(0x29c)],this['type'],this[_0x35ae8f(0x2fe)],[_0x1916c1],this[_0x35ae8f(0x1aa)],this[_0x35ae8f(0x114)]);return _0x495a68[_0x35ae8f(0x1c0)](),_0x495a68;}[_0x193bc9(0x192)](_0x38527a){const _0xb35b11=_0x193bc9;if(this[_0xb35b11(0x157)](_0x38527a))return this['_clearScheduledTask'](),this[_0xb35b11(0x254)][_0xb35b11(0x1a5)](N,this[_0xb35b11(0x29c)],this['type'],this[_0xb35b11(0x2fe)],[],null,[_0x38527a],this['_handler']);try{let _0x5dfabe=this['_transformService'][_0xb35b11(0xeb)]([_0x38527a],[this['_awaitingChangeset']],!0x1);if((0x0,e['isTransformChangesetsSuccess'])(_0x5dfabe)){let {c1Prime:_0x391e3a,c2Prime:_0x1874d8}=_0x5dfabe;this[_0xb35b11(0x25a)](_0x391e3a[0x0]),_0x1874d8[0x0]['baseRev']=this['_getCurrentRevision'](),this[_0xb35b11(0x1df)]();let _0x4cafd2=this[_0xb35b11(0x254)][_0xb35b11(0x1a5)](Re,this[_0xb35b11(0x29c)],this[_0xb35b11(0x213)],_0x1874d8[0x0],this[_0xb35b11(0x1aa)]);return _0x4cafd2['_updateLocalCache'](),_0x4cafd2;}throw _0x5dfabe[_0xb35b11(0x146)];}catch(_0x3a8229){return this[_0xb35b11(0x131)][_0xb35b11(0x146)](_0x3a8229),this[_0xb35b11(0x2c6)](!0x1);}}[_0x193bc9(0x3a2)](_0x2b4919){const _0x29143c=_0x193bc9;this[_0x29143c(0x1df)]();let _0x18cc50=this[_0x29143c(0x13e)]['getCurrentRevOfUnit'](this[_0x29143c(0x29c)]);if(_0x2b4919[_0x29143c(0x310)]<=_0x18cc50)return this;if(this[_0x29143c(0x157)](_0x2b4919))return this['_injector'][_0x29143c(0x1a5)](N,this[_0x29143c(0x29c)],this['type'],this[_0x29143c(0x2fe)],[],_0x2b4919[_0x29143c(0x310)],[],this[_0x29143c(0x1aa)]);this[_0x29143c(0xcf)]();let _0x22a0c5=this[_0x29143c(0x254)][_0x29143c(0x1a5)](D,this[_0x29143c(0x29c)],this[_0x29143c(0x213)],this[_0x29143c(0x1aa)]);return _0x22a0c5[_0x29143c(0x1c0)](),_0x22a0c5;}[_0x193bc9(0x32e)](_0x13f930){const _0x7a1fb6=_0x193bc9;return this['_onConflict'](!!(_0x13f930!=null&&_0x13f930[_0x7a1fb6(0x1e7)]));}[_0x193bc9(0xd1)](_0x54d610){const _0x142a9c=_0x193bc9;return this[_0x142a9c(0x295)]>He?this[_0x142a9c(0x1ff)]():(this['_resendTimer']=Ie(this[_0x142a9c(0x1fc)],{'timeout':this[_0x142a9c(0x1fc)],'reqId':_0x54d610['reqId']}),this['_sender']=this[_0x142a9c(0x114)][_0x142a9c(0x1d4)](({reqId:_0x312a6a,timeout:_0x5c2c9b})=>{this['_resendWithTimeout'](_0x312a6a,_0x5c2c9b);}),this);}[_0x193bc9(0x1ff)](){const _0x55ce2c=_0x193bc9;return this[_0x55ce2c(0x1df)](),this['_injector'][_0x55ce2c(0x1a5)](M,this['unitID'],this[_0x55ce2c(0x213)],this['_awaitingChangeset'],[],this[_0x55ce2c(0x1aa)]);}[_0x193bc9(0x151)](){return this;}['resend'](){const _0x348c3b=_0x193bc9;this[_0x348c3b(0x1aa)]['onSendChangeset'](this[_0x348c3b(0x2fe)]);}[_0x193bc9(0x2c6)](_0x5b31a6){const _0x3280c9=_0x193bc9;return this[_0x3280c9(0x1df)](),this[_0x3280c9(0x254)][_0x3280c9(0x1a5)](j,this['unitID'],this[_0x3280c9(0x213)],this[_0x3280c9(0x2fe)],[],this[_0x3280c9(0x1aa)],_0x5b31a6);}[_0x193bc9(0x2a3)](_0x496e76,_0x9ac743){const _0x5bc3e7=_0x193bc9;var _0x3d3e31;_0x496e76===((_0x3d3e31=this[_0x5bc3e7(0x2fe)])==null?void 0x0:_0x3d3e31[_0x5bc3e7(0xb8)])&&(this[_0x5bc3e7(0x15d)](),this[_0x5bc3e7(0x1fc)]=_0x9ac743===0x0?0x3e8:Math[_0x5bc3e7(0x265)](_0x9ac743*0x2,Ve),this[_0x5bc3e7(0x295)]+=this[_0x5bc3e7(0x1fc)]);}[_0x193bc9(0x1df)](){const _0x1121ec=_0x193bc9;var _0x192da6;(_0x192da6=this['_sender'])==null||_0x192da6['unsubscribe'](),this['_resendTimeout']=0x0,this[_0x1121ec(0x295)]=0x0;}};k=Re=y([v(0x4,(0x0,t['Inject'])(t[_0x193bc9(0xb4)])),v(0x5,(0x0,t[_0x193bc9(0x394)])(e[_0x193bc9(0x390)])),v(0x6,t[_0x193bc9(0x2ae)]),v(0x7,t[_0x193bc9(0x185)]),v(0x8,e[_0x193bc9(0x31f)]),v(0x9,t[_0x193bc9(0x3dc)]),v(0xa,(0x0,t[_0x193bc9(0x294)])(x))],k);let A=ze=class extends E{constructor(_0x287379,_0x2fda25,_0x156d7a,_0x22ff42,_0x1419d5,_0x31306a,_0x40a105,_0x906302,_0x58d4c2,_0x272da9,_0x718b2d,_0x15971c,_0x146476){const _0x38a78c=_0x193bc9;super(_0x287379,_0x2fda25,_0x156d7a,_0x22ff42,_0x1419d5,_0x58d4c2,_0x15971c,_0x906302,_0x146476),this[_0x38a78c(0x254)]=_0x40a105,this[_0x38a78c(0x131)]=_0x272da9,this[_0x38a78c(0x33e)]=_0x718b2d,this['localCacheService']=_0x146476,g(this,'status','awaiting_with_pending'),g(this,_0x38a78c(0x1fc),0x0),g(this,_0x38a78c(0x295),0x0),g(this,_0x38a78c(0x114),void 0x0),g(this,_0x38a78c(0x31c),void 0x0),_0x31306a&&(this['_resendTimer']=_0x31306a,this[_0x38a78c(0x31c)]=this[_0x38a78c(0x114)][_0x38a78c(0x1d4)](({reqId:_0x1b657c,timeout:_0x3edcbc})=>{const _0x5e5f0e=_0x38a78c;this[_0x5e5f0e(0x2a3)](_0x1b657c,_0x3edcbc);}));}['appendMutation'](_0x40ae34){const _0x44eeb0=_0x193bc9;return this[_0x44eeb0(0xbd)][_0x44eeb0(0x12d)](_0x40ae34),this;}[_0x193bc9(0x192)](_0x215e3b){const _0x173930=_0x193bc9;if(this[_0x173930(0x157)](_0x215e3b))return this['_clearScheduledTask'](),this[_0x173930(0x254)]['createInstance'](N,this[_0x173930(0x29c)],this[_0x173930(0x213)],this[_0x173930(0x2fe)],this[_0x173930(0xbd)],null,[_0x215e3b],this[_0x173930(0x1aa)]);try{let _0x4eb137=this[_0x173930(0x33e)]['transformChangesets']([_0x215e3b],[this['_awaitingChangeset']],!0x1);if((0x0,e[_0x173930(0x35d)])(_0x4eb137)){let {c1Prime:_0x1c7a6d,c2Prime:_0x2a825f}=_0x4eb137,_0x1ba78d=this[_0x173930(0x33e)]['transformMutationsWithChangeset'](_0x1c7a6d[0x0],this[_0x173930(0xbd)]);if((0x0,e[_0x173930(0x2f0)])(_0x1ba78d)){let {c1Prime:_0x2f704e,m2Prime:_0xdb7f6e}=_0x1ba78d;return this['_executeRemoteChangeset'](_0x2f704e),_0x2a825f[0x0][_0x173930(0x196)]=this[_0x173930(0x1ab)](),this['_clearScheduledTask'](),this[_0x173930(0x254)][_0x173930(0x1a5)](ze,this[_0x173930(0x29c)],this[_0x173930(0x213)],_0x2a825f[0x0],_0xdb7f6e,this[_0x173930(0x1aa)],void 0x0);}throw _0x1ba78d[_0x173930(0x146)];}throw _0x4eb137['error'];}catch(_0x5c6f6d){return this[_0x173930(0x131)][_0x173930(0x146)](_0x5c6f6d),this[_0x173930(0x2c6)](!0x1);}}[_0x193bc9(0x3a2)](_0xfdb12d){const _0x587fe2=_0x193bc9;this[_0x587fe2(0x1df)]();let _0x5e9e5e=this[_0x587fe2(0x1ab)]();if(_0xfdb12d[_0x587fe2(0x310)]<=_0x5e9e5e)return this;if(this[_0x587fe2(0x157)](_0xfdb12d))return this['_injector']['createInstance'](N,this[_0x587fe2(0x29c)],this['type'],this[_0x587fe2(0x2fe)],this[_0x587fe2(0xbd)],_0xfdb12d[_0x587fe2(0x310)],[],this['_handler']);this[_0x587fe2(0xcf)]();let _0x10d6d6=this[_0x587fe2(0x254)][_0x587fe2(0x1a5)](O,this[_0x587fe2(0x29c)],this[_0x587fe2(0x213)],this['_pendingMutations'],this[_0x587fe2(0x1aa)]);return _0x10d6d6[_0x587fe2(0xd3)](),_0x10d6d6['_updateLocalCache'](),_0x10d6d6;}[_0x193bc9(0x32e)](_0x999829){const _0x348cf6=_0x193bc9;return this[_0x348cf6(0x2c6)](!!(_0x999829!=null&&_0x999829[_0x348cf6(0x1e7)]));}[_0x193bc9(0xd1)](_0x56701d){const _0x54dc1f=_0x193bc9;return this['_maxTotalRetryTimeout']>He?this[_0x54dc1f(0x1ff)]():(this[_0x54dc1f(0x114)]=Ie(this['_resendTimeout'],{'timeout':this[_0x54dc1f(0x1fc)],'reqId':_0x56701d[_0x54dc1f(0xb8)]}),this[_0x54dc1f(0x31c)]=this[_0x54dc1f(0x114)][_0x54dc1f(0x1d4)](({reqId:_0x295ab7,timeout:_0x3a87b9})=>{const _0x123593=_0x54dc1f;this[_0x123593(0x2a3)](_0x295ab7,_0x3a87b9);}),this);}[_0x193bc9(0x1ff)](){const _0x4c52d4=_0x193bc9;return this['_clearScheduledTask'](),this[_0x4c52d4(0x254)][_0x4c52d4(0x1a5)](M,this[_0x4c52d4(0x29c)],this[_0x4c52d4(0x213)],this[_0x4c52d4(0x2fe)],this[_0x4c52d4(0xbd)],this[_0x4c52d4(0x1aa)]);}[_0x193bc9(0x151)](){return this;}[_0x193bc9(0x15d)](){const _0x28cc61=_0x193bc9;this[_0x28cc61(0x1aa)][_0x28cc61(0x271)](this['_awaitingChangeset']);}[_0x193bc9(0x2c6)](_0x1db7de){const _0x40f7cf=_0x193bc9;return this[_0x40f7cf(0x1df)](),this[_0x40f7cf(0x254)][_0x40f7cf(0x1a5)](j,this[_0x40f7cf(0x29c)],this[_0x40f7cf(0x213)],null,this[_0x40f7cf(0xbd)],this[_0x40f7cf(0x1aa)],_0x1db7de);}['_resendWithTimeout'](_0x4207f6,_0x3ded11){const _0x3deef7=_0x193bc9;var _0x15e700;_0x4207f6===((_0x15e700=this[_0x3deef7(0x2fe)])==null?void 0x0:_0x15e700['reqId'])&&(this['resend'](),this[_0x3deef7(0x1fc)]=_0x3ded11===0x0?0x3e8:Math['min'](_0x3ded11*0x2,Ve),this['_maxTotalRetryTimeout']+=this[_0x3deef7(0x1fc)]);}[_0x193bc9(0x1df)](){const _0x2b09ef=_0x193bc9;var _0x40f4e0;(_0x40f4e0=this[_0x2b09ef(0x31c)])==null||_0x40f4e0[_0x2b09ef(0x237)](),this[_0x2b09ef(0x1fc)]=0x0,this[_0x2b09ef(0x295)]=0x0;}};A=ze=y([v(0x6,(0x0,t[_0x193bc9(0x394)])(t['Injector'])),v(0x7,(0x0,t['Inject'])(e[_0x193bc9(0x390)])),v(0x8,t[_0x193bc9(0x2ae)]),v(0x9,t['ILogService']),v(0xa,e[_0x193bc9(0x31f)]),v(0xb,t[_0x193bc9(0x3dc)]),v(0xc,(0x0,t[_0x193bc9(0x294)])(x))],A);let j=class extends E{constructor(_0x3d42b5,_0x245261,_0xcd7416,_0x305664,_0x5e232b,_0x3d64b6=!0x1,_0x373dfb,_0x3dd19d,_0x333308,_0xad939a,_0x5c39e9,_0x13e664,_0x370d1c){const _0x2b30b3=_0x193bc9;super(_0x3d42b5,_0x245261,_0xcd7416,_0x305664,_0x5e232b,_0x3dd19d,_0x333308,_0xad939a,_0x370d1c),this['_isPermissionRej']=_0x3d64b6,this[_0x2b30b3(0x1d3)]=_0x373dfb,this['_localeService']=_0x5c39e9,this[_0x2b30b3(0x2a9)]=_0x13e664,this[_0x2b30b3(0x33d)]=_0x370d1c,g(this,'status',_0x2b30b3(0xc5)),this[_0x2b30b3(0x207)](),this[_0x2b30b3(0x128)](),this[_0x2b30b3(0x323)]();}['appendMutation'](){return this;}[_0x193bc9(0x192)](){return this;}[_0x193bc9(0x3a2)](){return this;}[_0x193bc9(0x32e)](){return this;}[_0x193bc9(0xd1)](){return this;}[_0x193bc9(0x1ff)](){return this;}[_0x193bc9(0x151)](){return this;}[_0x193bc9(0x15d)](){throw Error('[ConflictState]:\x20invalid\x20calling\x20to\x20`resend`.');}async[_0x193bc9(0x323)](){const _0x131b74=_0x193bc9;var _0x49951c,_0x40d8b5;await((_0x49951c=this['_localCacheService'])==null||(_0x40d8b5=_0x49951c[_0x131b74(0x2e8)])==null?void 0x0:_0x40d8b5[_0x131b74(0x306)](_0x49951c,this[_0x131b74(0x29c)],_0x131b74(0xc5))[_0x131b74(0xf0)](()=>void 0x0));try{var _0x341305;await((_0x341305=this['_localCacheService'])==null?void 0x0:_0x341305[_0x131b74(0x236)](this['unitID']));}catch{this[_0x131b74(0x2a9)][_0x131b74(0x169)]({'id':_0x131b74(0xad),'unitID':this['unitID']});return;}this['_showConflictNotification']();}['_showConflictProcessingNotification'](){const _0x158187=_0x193bc9;this['_collaborationUIEventService'][_0x158187(0x169)]({'id':_0x158187(0x127)});}[_0x193bc9(0x100)](){const _0x4642b9=_0x193bc9;this['_isPermissionRej']?this[_0x4642b9(0x2a9)][_0x4642b9(0x169)]({'id':'PERMISSION_DENIED'}):this['_collaborationUIEventService'][_0x4642b9(0x169)]({'id':_0x4642b9(0x1b6)});}[_0x193bc9(0x207)](){const _0x7bf91a=_0x193bc9;this['_permissionService'][_0x7bf91a(0x36a)](new r[(_0x7bf91a(0x22f))](this[_0x7bf91a(0x29c)])['id'],!0x1);}};j=y([v(0x6,(0x0,t['Inject'])(t[_0x193bc9(0x3bc)])),v(0x7,t[_0x193bc9(0x2ae)]),v(0x8,t[_0x193bc9(0x3dc)]),v(0x9,(0x0,t[_0x193bc9(0x394)])(e[_0x193bc9(0x390)])),v(0xa,(0x0,t['Inject'])(t['LocaleService'])),v(0xb,(0x0,t[_0x193bc9(0x394)])(_)),v(0xc,(0x0,t['Optional'])(x))],j);let M=class extends E{constructor(_0x616fe7,_0x59dade,_0x553f70,_0x54ec73,_0x253e3f,_0x58d358,_0x2344c8,_0x46eabd,_0x189829,_0x1dfa69){const _0x14faea=_0x193bc9;super(_0x616fe7,_0x59dade,_0x553f70,_0x54ec73,_0x253e3f,_0x46eabd,_0x189829,_0x2344c8,_0x1dfa69),this[_0x14faea(0x254)]=_0x58d358,g(this,_0x14faea(0x206),_0x14faea(0x3c1));}[_0x193bc9(0x2d9)](_0x449738){const _0x2650ac=_0x193bc9;return this[_0x2650ac(0xbd)][_0x2650ac(0x12d)](_0x449738),this[_0x2650ac(0x1c0)](),this;}[_0x193bc9(0x192)](_0x5524b0){throw Error('[OfflineState]:\x20received\x20changeset.');}['onRemoteAck'](){const _0x46e18f=_0x193bc9;throw Error(_0x46e18f(0xcb));}[_0x193bc9(0x32e)](){const _0x270c9a=_0x193bc9;throw Error(_0x270c9a(0x30b));}[_0x193bc9(0xd1)](){return this;}[_0x193bc9(0x1ff)](){return this;}[_0x193bc9(0x151)](){const _0x4de73e=_0x193bc9;let {_injector:_0x15c787,_pendingMutations:_0x25179b,_awaitingChangeset:_0x1d3fbd,unitID:_0x4b5583,_handler:_0x31ed5a,type:_0x2e63a2}=this,_0x58284e=Ue(_0x15c787,_0x4b5583,_0x2e63a2,_0x1d3fbd,_0x25179b,_0x31ed5a);return _0x58284e instanceof O?_0x58284e[_0x4de73e(0xd3)]():(_0x58284e instanceof A||_0x58284e instanceof k)&&_0x58284e[_0x4de73e(0x15d)](),_0x58284e;}[_0x193bc9(0x15d)](){const _0x31cdd7=_0x193bc9;throw Error(_0x31cdd7(0x1f0));}};M=y([v(0x5,(0x0,t[_0x193bc9(0x394)])(t[_0x193bc9(0xb4)])),v(0x6,(0x0,t[_0x193bc9(0x394)])(e['RevisionService'])),v(0x7,t[_0x193bc9(0x2ae)]),v(0x8,t[_0x193bc9(0x3dc)]),v(0x9,(0x0,t[_0x193bc9(0x294)])(x))],M);let N=class extends E{constructor(_0x19d477,_0x259b01,_0x30b3b5,_0x50a885,_0x10b29d,_0x5ee963,_0x2f99e9,_0x2a1e3a,_0x5c414e,_0x16e3c7,_0x2f1928,_0xeda795,_0x2e0309,_0x2474bb){const _0x504e45=_0x193bc9;super(_0x19d477,_0x259b01,_0x30b3b5,_0x50a885,_0x2f99e9,_0x2f1928,_0xeda795,_0x5c414e,_0x2474bb),this['_acknowledgedAwaitingRevision']=_0x10b29d,this[_0x504e45(0x318)]=_0x5ee963,this[_0x504e45(0x254)]=_0x2a1e3a,this['_logService']=_0x16e3c7,this[_0x504e45(0x33e)]=_0x2e0309,this[_0x504e45(0x33d)]=_0x2474bb,g(this,_0x504e45(0x206),_0x504e45(0x12b));}['onMissedChangesetFetched'](_0x476477){const _0x52bdc8=_0x193bc9;try{if(this[_0x52bdc8(0x21a)](_0x476477)[_0x52bdc8(0x34d)])throw Error('[FetchMissState]:\x20missing\x20changesets\x20response\x20still\x20has\x20revision\x20gaps.');if(this[_0x52bdc8(0x21a)]([...this[_0x52bdc8(0x318)]][_0x52bdc8(0x222)]((_0x38234c,_0x10aac3)=>_0x38234c[_0x52bdc8(0x310)]-_0x10aac3[_0x52bdc8(0x310)]))['missingChangesets'])return this['_queuedRemoteChangesets']=[],this[_0x52bdc8(0x1c0)](),this[_0x52bdc8(0x1aa)][_0x52bdc8(0x268)]({'from':this[_0x52bdc8(0x1ab)](),'to':0x0}),this;let _0x1efd70=this[_0x52bdc8(0x2fe)],_0x1ee98c=this['_pendingMutations'],_0x34fab9;if(_0x1efd70&&_0x1ee98c[_0x52bdc8(0x3c9)]!==0x0)_0x34fab9=this['_injector'][_0x52bdc8(0x1a5)](A,this[_0x52bdc8(0x29c)],this[_0x52bdc8(0x213)],_0x1efd70,_0x1ee98c,this[_0x52bdc8(0x1aa)],void 0x0);else{if(_0x1efd70&&_0x1ee98c[_0x52bdc8(0x3c9)]===0x0)_0x1efd70[_0x52bdc8(0x196)]=this[_0x52bdc8(0x1ab)](),_0x34fab9=this[_0x52bdc8(0x254)][_0x52bdc8(0x1a5)](k,this['unitID'],this['type'],_0x1efd70,this[_0x52bdc8(0x1aa)]);else{if(_0x1ee98c[_0x52bdc8(0x3c9)]!==0x0){let _0xa7f27e=this[_0x52bdc8(0x254)][_0x52bdc8(0x1a5)](O,this[_0x52bdc8(0x29c)],this[_0x52bdc8(0x213)],_0x1ee98c,this[_0x52bdc8(0x1aa)]);_0xa7f27e[_0x52bdc8(0xd3)](),_0x34fab9=_0xa7f27e;}else _0x34fab9=this[_0x52bdc8(0x254)]['createInstance'](D,this['unitID'],this[_0x52bdc8(0x213)],this[_0x52bdc8(0x1aa)]);}}return _0x34fab9[_0x52bdc8(0x1c0)](),_0x34fab9;}catch(_0x30a119){return this[_0x52bdc8(0x131)][_0x52bdc8(0x146)](_0x52bdc8(0x38e),_0x52bdc8(0x102),_0x30a119),this[_0x52bdc8(0x254)]['createInstance'](j,this[_0x52bdc8(0x29c)],this[_0x52bdc8(0x213)],this[_0x52bdc8(0x2fe)],this[_0x52bdc8(0xbd)],this['_handler'],!0x1);}}[_0x193bc9(0x21a)](_0x48d2f4){const _0x5ae0f8=_0x193bc9;this[_0x5ae0f8(0x145)]();for(let _0x285c93=0x0;_0x285c93<_0x48d2f4[_0x5ae0f8(0x3c9)];_0x285c93++){let _0x484c42=_0x48d2f4[_0x285c93],_0x4c70e9=this[_0x5ae0f8(0x1ab)]();if(!(_0x484c42[_0x5ae0f8(0x310)]<=_0x4c70e9)){if(_0x484c42[_0x5ae0f8(0x310)]>_0x4c70e9+0x1)return{'missingChangesets':!0x0};if(this[_0x5ae0f8(0x121)](_0x484c42)){this['_acknowledgeAwaiting']();continue;}this[_0x5ae0f8(0x3d9)](_0x484c42),this[_0x5ae0f8(0x145)]();}}return{'missingChangesets':!0x1};}[_0x193bc9(0x3d9)](_0x148c72){const _0x57ffc4=_0x193bc9;let _0x7c299d=_0x148c72,_0x27d5d1=this[_0x57ffc4(0x2fe)];if(_0x27d5d1){let _0x506002=this[_0x57ffc4(0x33e)][_0x57ffc4(0xeb)]([_0x148c72],[_0x27d5d1],!0x1);if(!(0x0,e[_0x57ffc4(0x35d)])(_0x506002))throw _0x506002[_0x57ffc4(0x146)];_0x7c299d=_0x506002['c1Prime'][0x0],_0x27d5d1=_0x506002[_0x57ffc4(0x2b9)][0x0];}let _0xf4db95=this[_0x57ffc4(0xbd)];if(_0xf4db95[_0x57ffc4(0x3c9)]){let _0x4dc996=this[_0x57ffc4(0x33e)][_0x57ffc4(0x3bd)](_0x7c299d,_0xf4db95);if(!(0x0,e[_0x57ffc4(0x2f0)])(_0x4dc996))throw _0x4dc996[_0x57ffc4(0x146)];_0x7c299d=_0x4dc996['c1Prime'],_0xf4db95=_0x4dc996[_0x57ffc4(0x2ec)];}this['_executeRemoteChangeset'](_0x7c299d),_0x27d5d1&&(_0x27d5d1[_0x57ffc4(0x196)]=this['_getCurrentRevision']()),this[_0x57ffc4(0x2fe)]=_0x27d5d1,this[_0x57ffc4(0xbd)]=_0xf4db95;}[_0x193bc9(0x145)](){const _0x2066f8=_0x193bc9;if(!this['_awaitingChangeset']||this[_0x2066f8(0x2b4)]==null)return;let _0x22add2=this['_getCurrentRevision']();if(this[_0x2066f8(0x2b4)]<=_0x22add2)throw Error(_0x2066f8(0x147)+this[_0x2066f8(0x2b4)]+'.');this[_0x2066f8(0x2b4)]===_0x22add2+0x1&&this[_0x2066f8(0x133)]();}['_acknowledgeAwaiting'](){const _0x3492bb=_0x193bc9;this[_0x3492bb(0xcf)](),this[_0x3492bb(0x2fe)]=null,this[_0x3492bb(0x2b4)]=null;}['_isEchoedAwaitingChangeset'](_0x39619d){const _0x5aecd5=_0x193bc9;let _0x1cd4ee=this[_0x5aecd5(0x2fe)];return!_0x1cd4ee||!_0x1cd4ee[_0x5aecd5(0x18b)]||_0x1cd4ee[_0x5aecd5(0xb8)]===null||_0x1cd4ee[_0x5aecd5(0xb8)]===void 0x0?!0x1:_0x39619d[_0x5aecd5(0x29c)]===_0x1cd4ee[_0x5aecd5(0x29c)]&&_0x39619d[_0x5aecd5(0x18b)]===_0x1cd4ee[_0x5aecd5(0x18b)]&&_0x39619d[_0x5aecd5(0xb8)]===_0x1cd4ee['reqId'];}[_0x193bc9(0x15d)](){const _0x288e25=_0x193bc9;throw Error(_0x288e25(0x31d));}[_0x193bc9(0x2d9)](_0xdef1b4){const _0x435d0a=_0x193bc9;return this[_0x435d0a(0xbd)][_0x435d0a(0x12d)](_0xdef1b4),this;}[_0x193bc9(0x192)](_0x353d98){const _0x4b0ba3=_0x193bc9;return this['_queuedRemoteChangesets'][_0x4b0ba3(0x12d)](_0x353d98),this;}['onRemoteAck'](_0x4ed6c6){const _0x2014f9=_0x193bc9;if(this[_0x2014f9(0x2fe)]){let _0x2e053e=this[_0x2014f9(0x1ab)]();return _0x4ed6c6[_0x2014f9(0x310)]<=_0x2e053e||(_0x2e053e+0x1===_0x4ed6c6[_0x2014f9(0x310)]?(this['_incrementRevisionNumber'](),this[_0x2014f9(0x2fe)]=null,this[_0x2014f9(0x2b4)]=null):this[_0x2014f9(0x2b4)]=_0x4ed6c6[_0x2014f9(0x310)]),this;}if(_0x4ed6c6[_0x2014f9(0x310)]<=this['_getCurrentRevision']())return this;throw Error(_0x2014f9(0x2b6));}[_0x193bc9(0x32e)](_0x3e9445){const _0x37582d=_0x193bc9;return this[_0x37582d(0x2c6)](!!(_0x3e9445!=null&&_0x3e9445[_0x37582d(0x1e7)]));}[_0x193bc9(0xd1)](){return this;}[_0x193bc9(0x1ff)](){const _0x2eca9b=_0x193bc9;return this[_0x2eca9b(0x254)][_0x2eca9b(0x1a5)](M,this[_0x2eca9b(0x29c)],this[_0x2eca9b(0x213)],this[_0x2eca9b(0x2fe)],this[_0x2eca9b(0xbd)],this['_handler']);}[_0x193bc9(0x151)](){return this;}[_0x193bc9(0x2c6)](_0x1e0ab6){const _0x190651=_0x193bc9;return this['_injector']['createInstance'](j,this['unitID'],this[_0x190651(0x213)],this[_0x190651(0x2fe)],this[_0x190651(0xbd)],this[_0x190651(0x1aa)],_0x1e0ab6);}};N=y([v(0x7,(0x0,t[_0x193bc9(0x394)])(t[_0x193bc9(0xb4)])),v(0x8,(0x0,t['Inject'])(e[_0x193bc9(0x390)])),v(0x9,t[_0x193bc9(0x185)]),v(0xa,t['ICommandService']),v(0xb,t[_0x193bc9(0x3dc)]),v(0xc,e['ITransformService']),v(0xd,(0x0,t['Optional'])(x))],N);function Ue(_0xeb5ec,_0x1027f9,_0x2c9cbe,_0x4728ac,_0x114432,_0x1a6c33){const _0x329ab5=_0x193bc9;return _0x4728ac&&_0x114432[_0x329ab5(0x3c9)]?_0xeb5ec[_0x329ab5(0x1a5)](A,_0x1027f9,_0x2c9cbe,_0x4728ac,_0x114432,_0x1a6c33,void 0x0):_0x4728ac?_0xeb5ec['createInstance'](k,_0x1027f9,_0x2c9cbe,_0x4728ac,_0x1a6c33):_0x114432[_0x329ab5(0x3c9)]?_0xeb5ec[_0x329ab5(0x1a5)](O,_0x1027f9,_0x2c9cbe,_0x114432,_0x1a6c33):_0xeb5ec['createInstance'](D,_0x1027f9,_0x2c9cbe,_0x1a6c33);}let P=class extends t['RxDisposable']{get[_0x193bc9(0x1ed)](){const _0x11ac47=_0x193bc9;return this[_0x11ac47(0x23d)];}constructor(_0x56b17b,_0x212ae3,_0x586b87,_0x8e96f3,_0x2b76b4,_0x415d57,_0x1d7061,_0x568b58,_0x129887,_0x1345d2,_0x43a18d,_0x5e3820,_0x107aa6,_0x5d84e4){const _0xef0202=_0x193bc9;super(),this[_0xef0202(0x29c)]=_0x56b17b,this[_0xef0202(0x15a)]=_0x212ae3,this[_0xef0202(0x22a)]=_0x586b87,this[_0xef0202(0x254)]=_0x8e96f3,this[_0xef0202(0x361)]=_0x2b76b4,this[_0xef0202(0x346)]=_0x415d57,this['_revisionService']=_0x1d7061,this['_eventService']=_0x568b58,this['_univerInstanceService']=_0x129887,this[_0xef0202(0x131)]=_0x1345d2,this[_0xef0202(0x28d)]=_0x43a18d,this[_0xef0202(0x1d3)]=_0x5e3820,this[_0xef0202(0x263)]=_0x107aa6,this['_localCacheService']=_0x5d84e4,g(this,_0xef0202(0x3b0),new i['BehaviorSubject'](null)),g(this,_0xef0202(0x178),this['_state$'][_0xef0202(0x2db)]()),g(this,_0xef0202(0x23d),void 0x0),g(this,_0xef0202(0x278),!0x1),g(this,_0xef0202(0x1b4),''),g(this,_0xef0202(0x380),0x0),g(this,_0xef0202(0x220),this['state$'][_0xef0202(0x3da)]((0x0,i[_0xef0202(0x1f4)])(_0x21f2ba=>_0x21f2ba?_0x21f2ba[_0xef0202(0x206)]:_0xef0202(0x3c1)),(0x0,i['shareReplay'])({'bufferSize':0x1,'refCount':!0x0}))),g(this,_0xef0202(0x3d8),!0x1),g(this,_0xef0202(0x1e2),[]);}async[_0x193bc9(0x168)](){const _0x2ff8ef=_0x193bc9;if(this['state'])throw Error(_0x2ff8ef(0x16e));await this['_init']();}[_0x193bc9(0x319)](){const _0x4b7ec7=_0x193bc9;return this[_0x4b7ec7(0x278)]=!0x0,(0x0,t[_0x4b7ec7(0x200)])(()=>{const _0x2499ad=_0x4b7ec7;this[_0x2499ad(0x278)]=!0x1,this[_0x2499ad(0x166)]();});}['onLocalMutation'](_0x21bd19){const _0x1c4e1c=_0x193bc9;this[_0x1c4e1c(0x36d)](_0x21bd19);}['_updateState'](_0x234d2d){const _0x4906e5=_0x193bc9;this[_0x4906e5(0x23d)]=_0x234d2d,this[_0x4906e5(0x3b0)][_0x4906e5(0x37d)](_0x234d2d);}async['_init'](){const _0xdc33fa=_0x193bc9;if(this[_0xdc33fa(0x28a)](await this[_0xdc33fa(0x3c6)]()),this[_0xdc33fa(0x263)]){var _0x2948e7;(_0x2948e7=this[_0xdc33fa(0x263)])==null||_0x2948e7[_0xdc33fa(0x247)](this[_0xdc33fa(0x29c)]),this[_0xdc33fa(0x240)](this['_singleActiveUnitService'][_0xdc33fa(0x3be)](this[_0xdc33fa(0x29c)])['subscribe'](_0xc67459=>{const _0x1318e1=_0xdc33fa;this[_0x1318e1(0x131)]['debug'](_0x1318e1(0x1b5),_0x1318e1(0x20f),_0xc67459),_0xc67459===0x1?(this['_eventService'][_0x1318e1(0x169)]({'id':_0x1318e1(0x24c)}),this[_0x1318e1(0x1d3)][_0x1318e1(0x36a)](new r[(_0x1318e1(0x22f))](this['unitID'])['id'],!0x1),this[_0x1318e1(0x1d3)][_0x1318e1(0x3ab)](!0x1)):(this[_0x1318e1(0x1d3)][_0x1318e1(0x36a)](new r['WorkbookEditablePermission'](this[_0x1318e1(0x29c)])['id'],!0x0),this['_permissionService'][_0x1318e1(0x3ab)](!0x0));}));}let _0x4a638e=!0x1;return this[_0xdc33fa(0x240)](this[_0xdc33fa(0x15a)][_0xdc33fa(0x1e6)][_0xdc33fa(0x1d4)](_0x25b1d8=>{const _0x15db0f=_0xdc33fa;_0x25b1d8===0x3?this[_0x15db0f(0x314)](_0x4a638e):_0x25b1d8===0x2&&(_0x4a638e=!0x0,this[_0x15db0f(0x2d5)]());})),this[_0xdc33fa(0x240)](this['session'][_0xdc33fa(0xe0)][_0xdc33fa(0x1d4)](_0x2f7608=>{const _0x2d5a82=_0xdc33fa;try{switch(_0x2f7608['eventID']){case e[_0x2d5a82(0x3cc)][_0x2d5a82(0xdf)]:this[_0x2d5a82(0x2dc)]((0x0,e[_0x2d5a82(0x3ad)])(_0x2f7608[_0x2d5a82(0x2ef)]));break;case e[_0x2d5a82(0x3cc)][_0x2d5a82(0x26c)]:this[_0x2d5a82(0x239)](_0x2f7608[_0x2d5a82(0x2ef)]);break;case e['CollaborationEvent'][_0x2d5a82(0xd6)]:this[_0x2d5a82(0x23e)]();break;case e[_0x2d5a82(0x3cc)]['CHANGESET_SHOULD_RETRY']:this[_0x2d5a82(0x3c4)](_0x2f7608[_0x2d5a82(0x2ef)]);break;case e['CollaborationEvent'][_0x2d5a82(0x17b)]:this['_onFetchMissResult'](_0x2f7608['data']['changesets'][_0x2d5a82(0x1f4)](_0x25caaa=>(0x0,e[_0x2d5a82(0x3ad)])(_0x25caaa)));break;case e[_0x2d5a82(0x3cc)][_0x2d5a82(0x1c5)]:this[_0x2d5a82(0x23e)]({'isPermissionRej':!0x0});break;case e[_0x2d5a82(0x3cc)]['UNISCRIPT_RUN']:}}catch(_0x575faf){throw console['error'](_0x2d5a82(0xd9),_0x575faf),_0x575faf;}})),this[_0xdc33fa(0x23d)];}[_0x193bc9(0x1e5)](){this['_transitionLocked']=!0x1;}[_0x193bc9(0x27b)](){const _0x38d8c5=_0x193bc9;if(this[_0x38d8c5(0x3d8)])throw Error(_0x38d8c5(0xfd));this[_0x38d8c5(0x3d8)]=!0x0;}[_0x193bc9(0x36d)](_0x3b8917){const _0x21ee61=_0x193bc9;this[_0x21ee61(0x27b)](),this[_0x21ee61(0x28a)](this[_0x21ee61(0x23d)][_0x21ee61(0x2d9)](_0x3b8917)),this[_0x21ee61(0x1e5)]();}[_0x193bc9(0x2dc)](_0xd33ec8){const _0x578bda=_0x193bc9;if(!(_0xd33ec8[_0x578bda(0x310)]<=this[_0x578bda(0x13e)]['getCurrentRevOfUnit'](this[_0x578bda(0x29c)]))){if(this[_0x578bda(0x278)]){this[_0x578bda(0x1e2)][_0x578bda(0x12d)](_0xd33ec8);return;}this[_0x578bda(0x339)](_0xd33ec8);}}['_exhaustRemoteChangesetQueue'](){const _0x3864f6=_0x193bc9;this[_0x3864f6(0x1e2)]['forEach'](_0x30688c=>this[_0x3864f6(0x339)](_0x30688c)),this[_0x3864f6(0x1e2)]=[];}[_0x193bc9(0x339)](_0x1ecd86){const _0x537054=_0x193bc9;let _0x5738d9=this[_0x537054(0x361)][_0x537054(0x25d)][_0x537054(0x217)](this[_0x537054(0x361)]['interceptor'][_0x537054(0xfc)]()[_0x537054(0x399)])(_0x1ecd86[_0x537054(0xa5)],null)||_0x1ecd86[_0x537054(0xa5)],_0x9b6ef1={..._0x1ecd86,'mutations':_0x5738d9};this[_0x537054(0x27b)](),this[_0x537054(0x28a)](this[_0x537054(0x23d)][_0x537054(0x192)](_0x9b6ef1)),this[_0x537054(0x1e5)]();}[_0x193bc9(0x239)](_0x1d6023){const _0x33907b=_0x193bc9;this[_0x33907b(0x27b)](),this[_0x33907b(0x28a)](this[_0x33907b(0x23d)]['onRemoteAck'](_0x1d6023)),this[_0x33907b(0x1e5)]();}[_0x193bc9(0x23e)](_0x223af0){const _0x253298=_0x193bc9;this[_0x253298(0x27b)](),this[_0x253298(0x28a)](this['_state'][_0x253298(0x32e)](_0x223af0)),this[_0x253298(0x1e5)]();}[_0x193bc9(0x3c4)](_0x256fc3){const _0x33323c=_0x193bc9;this['_lockTransition'](),this['_updateState'](this[_0x33323c(0x23d)][_0x33323c(0xd1)](_0x256fc3)),this[_0x33323c(0x1e5)]();}['_onFetchMissResult'](_0x199a20){const _0x25460c=_0x193bc9;if(!(this['_state']instanceof N))throw TypeError(_0x25460c(0x13f));let _0x3b38d3=_0x199a20[_0x25460c(0x1f4)](_0x37c114=>{const _0xf48db3=_0x25460c;let _0x13f030=this[_0xf48db3(0x361)][_0xf48db3(0x25d)][_0xf48db3(0x217)](this['_compressMutationService'][_0xf48db3(0x25d)][_0xf48db3(0xfc)]()[_0xf48db3(0x399)])(_0x37c114[_0xf48db3(0xa5)],null)||_0x37c114[_0xf48db3(0xa5)];return{..._0x37c114,'mutations':_0x13f030};});this['_lockTransition'](),this[_0x25460c(0x28a)](this['_state'][_0x25460c(0x1c9)](_0x3b38d3)),this[_0x25460c(0x1e5)]();}['_toggleOffline'](){const _0x573701=_0x193bc9;this[_0x573701(0x27b)](),this[_0x573701(0x28a)](this[_0x573701(0x23d)][_0x573701(0x1ff)]()),this[_0x573701(0x1e5)]();}[_0x193bc9(0x314)](_0x1598d8=!0x1){const _0x362519=_0x193bc9;this[_0x362519(0x27b)](),this[_0x362519(0x28a)](this[_0x362519(0x23d)][_0x362519(0x151)]()),this[_0x362519(0x1e5)]();let _0x24abc5=this[_0x362519(0x23d)];_0x1598d8&&_0x24abc5 instanceof D&&(this['_lockTransition'](),this['_updateState'](_0x24abc5[_0x362519(0x2c2)]()),this[_0x362519(0x1e5)]());}async['_createInitialState'](){return new Promise(_0xc13c27=>{const _0x1dfc06=_0x5d42;this[_0x1dfc06(0x15a)][_0x1dfc06(0x1e6)][_0x1dfc06(0x3da)]((0x0,i[_0x1dfc06(0x308)])(0x1))[_0x1dfc06(0x1d4)](async _0xe00fae=>{const _0x48fc20=_0x1dfc06;_0xc13c27(await this[_0x48fc20(0x1a0)](_0xe00fae===0x3));});});}[_0x193bc9(0x349)](){let _0x539f2c=this['unitID'];return{'onStateChange':(_0x178742,_0x3fc6a3)=>{const _0x3fb877=_0x5d42;if(_0x178742!==this['_state'])throw Error(_0x3fb877(0x3d0)+_0x178742['status']+'\x0aAfter:\x20'+_0x3fc6a3[_0x3fb877(0x206)]+_0x3fb877(0x2b8)+this[_0x3fb877(0x23d)][_0x3fb877(0x206)]);this[_0x3fb877(0x28a)](_0x3fc6a3);},'onSendChangeset':_0x20afa0=>{const _0x3010ed=_0x5d42;_0x20afa0[_0x3010ed(0x18b)]||(_0x20afa0[_0x3010ed(0x18b)]=this[_0x3010ed(0x1b4)],_0x20afa0[_0x3010ed(0xb8)]=++this[_0x3010ed(0x380)]);let _0x2e26ad={'eventID':e['CollaborationEvent']['SUBMIT_CHANGESET'],'data':{'unitID':_0x20afa0[_0x3010ed(0x29c)],'unitType':this[_0x3010ed(0x22a)],'changeset':_0x20afa0,'memberID':this['session'][_0x3010ed(0x336)]()}};this['session'][_0x3010ed(0xce)](_0x2e26ad,this[_0x3010ed(0x29c)]);},'onMissingChangesets':({from:_0x565c28,to:_0x3761cc})=>{const _0x5b02b2=_0x5d42;this[_0x5b02b2(0x131)][_0x5b02b2(0x30e)](_0x5b02b2(0x1b5),'fetching\x20missing\x20changesets\x20from\x20'+_0x565c28+'\x20to\x20'+_0x3761cc);let _0xc13d6b={'eventID':e[_0x5b02b2(0x3cc)]['FETCH_MISSING'],'data':{'unitID':_0x539f2c,'unitType':this['_type'],'from':_0x565c28,'to':_0x3761cc}};this['session'][_0x5b02b2(0xce)](_0xc13d6b,this[_0x5b02b2(0x29c)]);}};}async[_0x193bc9(0x1a0)](_0x5480ee){const _0x136629=_0x193bc9;var _0x3a07e0;let _0x113b43=await((_0x3a07e0=this[_0x136629(0x337)])==null?void 0x0:_0x3a07e0[_0x136629(0x382)](this[_0x136629(0x29c)])),_0x216764=(_0x113b43==null?void 0x0:_0x113b43[_0x136629(0xa5)])??[],_0x11c619=(_0x113b43==null?void 0x0:_0x113b43['awaitingChangeset'])??null,_0x17d95b=!!(_0x11c619!=null&&_0x11c619[_0x136629(0x18b)])&&!!(_0x11c619!=null&&_0x11c619[_0x136629(0xb8)]);this[_0x136629(0x1b4)]=_0x17d95b?_0x11c619[_0x136629(0x18b)]:(0x0,e['uuidv4'])(),this['_changesetReqId']=_0x17d95b?_0x11c619[_0x136629(0xb8)]:0x0;let _0x51a799=this[_0x136629(0x29c)];try{this['_replayCachedMutations'](_0x11c619,_0x216764);}catch(_0x3a69c1){this[_0x136629(0x131)][_0x136629(0x146)](_0x3a69c1);}let _0x193eaf=this[_0x136629(0x349)]();if(_0x5480ee){let _0x172559=Ue(this[_0x136629(0x254)],_0x51a799,this[_0x136629(0x22a)],_0x11c619,_0x216764,_0x193eaf);return _0x172559 instanceof O?_0x172559['_schedule']():(_0x172559 instanceof A||_0x172559 instanceof k)&&_0x172559[_0x136629(0x15d)](),_0x172559;}return this[_0x136629(0x254)][_0x136629(0x1a5)](M,_0x51a799,this['_type'],_0x11c619,_0x216764,_0x193eaf);}[_0x193bc9(0x347)](_0x1e87e0,_0x40c102){const _0x2cff7f=_0x193bc9;var _0x343645,_0x13e607;let _0x51c69d=this[_0x2cff7f(0x361)][_0x2cff7f(0x25d)][_0x2cff7f(0x217)](this[_0x2cff7f(0x361)][_0x2cff7f(0x25d)][_0x2cff7f(0xfc)]()[_0x2cff7f(0x399)]);(_0x343645=_0x51c69d((_0x1e87e0==null?void 0x0:_0x1e87e0[_0x2cff7f(0xa5)])||[],null))==null||_0x343645[_0x2cff7f(0x2ea)](_0xdc6dd6=>this['_commandService'][_0x2cff7f(0x1a4)](_0xdc6dd6['id'],_0xdc6dd6[_0x2cff7f(0x203)])),(_0x13e607=_0x51c69d(_0x40c102||[],null))==null||_0x13e607['forEach'](_0x374d00=>this[_0x2cff7f(0x28d)][_0x2cff7f(0x1a4)](_0x374d00['id'],_0x374d00['params']));}};P=y([v(0x3,(0x0,t[_0x193bc9(0x394)])(t['Injector'])),v(0x4,(0x0,t[_0x193bc9(0x394)])(e[_0x193bc9(0x2a4)])),v(0x5,(0x0,t[_0x193bc9(0x394)])(t[_0x193bc9(0xec)])),v(0x6,(0x0,t[_0x193bc9(0x394)])(e[_0x193bc9(0x390)])),v(0x7,(0x0,t['Inject'])(_)),v(0x8,t[_0x193bc9(0xfe)]),v(0x9,t[_0x193bc9(0x185)]),v(0xa,t[_0x193bc9(0x2ae)]),v(0xb,t[_0x193bc9(0x3bc)]),v(0xc,(0x0,t['Optional'])(C)),v(0xd,(0x0,t[_0x193bc9(0x294)])(x))],P);let F=class extends P{constructor(_0x52dc64,_0x44dc48,_0x26aeec,_0x47bc65,_0x178527,_0x1bb5b7,_0x3bf8be,_0x40620b,_0x57fe1c,_0x20cacf,_0x2ccfb6,_0x672799,_0x107d37,_0x5a2b7d,_0x40c163){const _0x42faa7=_0x193bc9;super(_0x52dc64,_0x26aeec,_0x44dc48,_0x47bc65,_0x178527,_0x1bb5b7,_0x3bf8be,_0x40620b,_0x57fe1c,_0x20cacf,_0x2ccfb6,_0x672799,_0x5a2b7d,_0x40c163),this['unitID']=_0x52dc64,this[_0x42faa7(0x213)]=_0x44dc48,this[_0x42faa7(0xaf)]=_0x107d37,g(this,_0x42faa7(0xbe),null);}[_0x193bc9(0x2c9)](_0x2b3063){const _0x84cc3a=_0x193bc9;this[_0x84cc3a(0xbe)]=_0x2b3063;}[_0x193bc9(0x3d1)](){this['_handlerCallback']=null,super['dispose']();}[_0x193bc9(0x349)](){const _0x37412d=_0x193bc9;let _0x53379a=super[_0x37412d(0x349)]();return _0x53379a[_0x37412d(0x2aa)]=_0x575160=>{const _0x191f05=_0x37412d;var _0x249b2c,_0x21805d;return(_0x249b2c=this[_0x191f05(0xbe)])==null||(_0x21805d=_0x249b2c[_0x191f05(0x2aa)])==null?void 0x0:_0x21805d['call'](_0x249b2c,_0x575160);},_0x53379a['onTransformState']=_0x217441=>{const _0x11728c=_0x37412d;var _0x2f7031,_0xfd8f8c;return(_0x2f7031=this[_0x11728c(0xbe)])==null||(_0xfd8f8c=_0x2f7031[_0x11728c(0x188)])==null?void 0x0:_0xfd8f8c[_0x11728c(0x306)](_0x2f7031,_0x217441);},_0x53379a[_0x37412d(0x2ed)]=_0x4cd7ae=>{const _0xffb23d=_0x37412d;var _0x9ecbb8,_0x5042bc;return((_0x9ecbb8=this['_handlerCallback'])==null||(_0x5042bc=_0x9ecbb8[_0xffb23d(0x2ed)])==null?void 0x0:_0x5042bc[_0xffb23d(0x306)](_0x9ecbb8,_0x4cd7ae))??null;},_0x53379a[_0x37412d(0x1ec)]=_0x20b09b=>{const _0x31ed4f=_0x37412d;var _0x260305,_0x11e936;return(_0x260305=this[_0x31ed4f(0xbe)])==null||(_0x11e936=_0x260305[_0x31ed4f(0x1ec)])==null?void 0x0:_0x11e936[_0x31ed4f(0x306)](_0x260305,_0x20b09b);},_0x53379a[_0x37412d(0x331)]=_0x3b40f7=>{const _0x15fdc4=_0x37412d;var _0x489bec,_0x1c851c;return(_0x489bec=this[_0x15fdc4(0xbe)])==null||(_0x1c851c=_0x489bec[_0x15fdc4(0x331)])==null?void 0x0:_0x1c851c[_0x15fdc4(0x306)](_0x489bec,_0x3b40f7);},_0x53379a[_0x37412d(0x242)]=_0xce5fc5=>{var _0xf3f20,_0x23a382;return((_0xf3f20=this['_handlerCallback'])==null||(_0x23a382=_0xf3f20['onTransformRemoteChangesetByIMECache'])==null?void 0x0:_0x23a382['call'](_0xf3f20,_0xce5fc5))??_0xce5fc5;},_0x53379a[_0x37412d(0x1d7)]=_0x32c16b=>{const _0x191d54=_0x37412d;var _0x1bc291,_0x33952;return((_0x1bc291=this[_0x191d54(0xbe)])==null||(_0x33952=_0x1bc291['onTransformRemoteChangesetByStateCache'])==null?void 0x0:_0x33952['call'](_0x1bc291,_0x32c16b))??_0x32c16b;},_0x53379a;}async[_0x193bc9(0x317)](){const _0x5d5642=_0x193bc9;let _0x57e17e=await super[_0x5d5642(0x317)]();return this[_0x5d5642(0x240)](this[_0x5d5642(0xaf)][_0x5d5642(0x12c)][_0x5d5642(0x1d4)](_0x4309dd=>{const _0x3fba4b=_0x5d5642;if(_0x4309dd==null||_0x4309dd[_0x3fba4b(0xb0)]!==this[_0x3fba4b(0x29c)])return;let {commandId:_0x4b607a,redoState:_0x3bfab8,unitId:_0x2b697e}=_0x4309dd,_0x281bfa={'id':_0x4b607a,'type':t[_0x3fba4b(0x2f4)][_0x3fba4b(0xe6)],'params':{'unitId':_0x2b697e,'actions':_0x3bfab8['actions'],'textRanges':null}};this[_0x3fba4b(0x36d)](_0x281bfa);})),this[_0x5d5642(0x240)](this[_0x5d5642(0x28d)]['onMutationExecutedForCollab']((_0x47d5fd,_0x1fc447)=>{const _0x1fcb57=_0x5d5642;if(_0x47d5fd[_0x1fcb57(0x213)]!==t[_0x1fcb57(0x2f4)][_0x1fcb57(0xe6)]||_0x1fc447!=null&&_0x1fc447[_0x1fcb57(0x1b7)]||_0x1fc447!=null&&_0x1fc447[_0x1fcb57(0xcd)]||_0x47d5fd['id']===n['RichTextEditingMutation']['id'])return;let _0x576ec7=_0x47d5fd[_0x1fcb57(0x203)];if((_0x576ec7==null?void 0x0:_0x576ec7[_0x1fcb57(0xb0)])!==this['unitID'])return;let _0x3ef8c9=_0x47d5fd,_0x5de038=this[_0x1fcb57(0x361)][_0x1fcb57(0x25d)][_0x1fcb57(0x217)](this[_0x1fcb57(0x361)]['interceptor'][_0x1fcb57(0xfc)]()['COMPRESS_MUTATION_SEND'])([_0x3ef8c9],this[_0x1fcb57(0xac)])||[_0x3ef8c9];this[_0x1fcb57(0x36d)](_0x5de038[0x0]);})),_0x57e17e;}};F=y([v(0x3,(0x0,t[_0x193bc9(0x394)])(t['Injector'])),v(0x4,(0x0,t[_0x193bc9(0x394)])(e[_0x193bc9(0x2a4)])),v(0x5,(0x0,t[_0x193bc9(0x394)])(t[_0x193bc9(0xec)])),v(0x6,(0x0,t[_0x193bc9(0x394)])(e[_0x193bc9(0x390)])),v(0x7,(0x0,t[_0x193bc9(0x394)])(_)),v(0x8,t[_0x193bc9(0xfe)]),v(0x9,t['ILogService']),v(0xa,t[_0x193bc9(0x2ae)]),v(0xb,t[_0x193bc9(0x3bc)]),v(0xc,(0x0,t[_0x193bc9(0x394)])(n[_0x193bc9(0x238)])),v(0xd,(0x0,t[_0x193bc9(0x294)])(C)),v(0xe,(0x0,t['Optional'])(x))],F);let I=class extends P{constructor(_0x14cfcd,_0x15248e,_0x4d71f2,_0x2ef2b9,_0x147499,_0x4b3f42,_0x1dde5d,_0x49cc67,_0x4ba68c,_0x2f2f20,_0x4c876d,_0x22f6e7,_0x1969f4,_0x2fb570){const _0x4fcd81=_0x193bc9;super(_0x14cfcd,_0x4d71f2,_0x15248e,_0x2ef2b9,_0x147499,_0x4b3f42,_0x1dde5d,_0x49cc67,_0x4ba68c,_0x2f2f20,_0x4c876d,_0x22f6e7,_0x1969f4,_0x2fb570),this[_0x4fcd81(0x29c)]=_0x14cfcd,this[_0x4fcd81(0x213)]=_0x15248e;}async[_0x193bc9(0x317)](){const _0x1e6963=_0x193bc9;let _0x438a13=await super[_0x1e6963(0x317)]();return this['disposeWithMe'](this['_commandService']['onMutationExecutedForCollab']((_0x50b43b,_0x1e2be5)=>{const _0x39b2a8=_0x1e6963;if(_0x50b43b['type']!==t['CommandType'][_0x39b2a8(0xe6)]||_0x1e2be5!=null&&_0x1e2be5[_0x39b2a8(0x1b7)]||_0x1e2be5!=null&&_0x1e2be5[_0x39b2a8(0xcd)])return;let _0x5e4512=_0x50b43b[_0x39b2a8(0x203)];if((_0x5e4512==null?void 0x0:_0x5e4512[_0x39b2a8(0xb0)])!==this['unitID'])return;let _0x49fcf8=_0x50b43b,_0x2fd7f2=this['_compressMutationService']['interceptor']['fetchThroughInterceptors'](this[_0x39b2a8(0x361)]['interceptor'][_0x39b2a8(0xfc)]()[_0x39b2a8(0x1ca)])([_0x49fcf8],this[_0x39b2a8(0xac)])||[_0x49fcf8];this['_onLocalMutation'](_0x2fd7f2[0x0]);})),_0x438a13;}};I=y([v(0x3,(0x0,t[_0x193bc9(0x394)])(t['Injector'])),v(0x4,(0x0,t[_0x193bc9(0x394)])(e['CompressMutationService'])),v(0x5,(0x0,t['Inject'])(t[_0x193bc9(0xec)])),v(0x6,(0x0,t[_0x193bc9(0x394)])(e[_0x193bc9(0x390)])),v(0x7,(0x0,t['Inject'])(_)),v(0x8,t[_0x193bc9(0xfe)]),v(0x9,t[_0x193bc9(0x185)]),v(0xa,t[_0x193bc9(0x2ae)]),v(0xb,t[_0x193bc9(0x3bc)]),v(0xc,(0x0,t[_0x193bc9(0x294)])(C)),v(0xd,(0x0,t[_0x193bc9(0x294)])(x))],I);let L=class extends P{constructor(_0x440405,_0x5f117b,_0x1130c0,_0x2bb334,_0x70c24,_0x546dbc,_0x4a08fa,_0x86d266,_0x29b1ef,_0x506e16,_0x32a1d1,_0x50bf64,_0x21c4cd,_0x493d3d,_0x2a4cfd){const _0x5af665=_0x193bc9;super(_0x440405,_0x1130c0,_0x5f117b,_0x2bb334,_0x70c24,_0x546dbc,_0x4a08fa,_0x29b1ef,_0x506e16,_0x32a1d1,_0x50bf64,_0x21c4cd,_0x493d3d,_0x2a4cfd),this[_0x5af665(0x29c)]=_0x440405,this['type']=_0x5f117b,this[_0x5af665(0x320)]=_0x86d266;}[_0x193bc9(0x349)](){const _0xfb3862=_0x193bc9;let _0x101562=super[_0xfb3862(0x349)]();return _0x101562[_0xfb3862(0x1ec)]=_0xaa3344=>this[_0xfb3862(0x320)]['transformSelections'](_0xaa3344),_0x101562;}async[_0x193bc9(0x317)](){const _0x3d74f0=_0x193bc9;let _0x313090=await super['_init']();return this[_0x3d74f0(0x240)](this[_0x3d74f0(0x28d)][_0x3d74f0(0x3c2)]((_0x4b8432,_0x5ce681)=>{const _0x1bcf8b=_0x3d74f0;if(_0x4b8432[_0x1bcf8b(0x213)]!==t['CommandType']['MUTATION']||_0x5ce681!=null&&_0x5ce681[_0x1bcf8b(0x1b7)]||_0x5ce681!=null&&_0x5ce681[_0x1bcf8b(0xcd)])return;let _0x1fa46a=_0x4b8432[_0x1bcf8b(0x203)];if((_0x1fa46a==null?void 0x0:_0x1fa46a['unitId'])!==this[_0x1bcf8b(0x29c)])return;let _0x93ce0b=_0x4b8432,_0x31df47=this['_compressMutationService']['interceptor'][_0x1bcf8b(0x217)](this['_compressMutationService'][_0x1bcf8b(0x25d)][_0x1bcf8b(0xfc)]()[_0x1bcf8b(0x1ca)])([_0x93ce0b],this[_0x1bcf8b(0xac)])||[_0x93ce0b];this[_0x1bcf8b(0x36d)](_0x31df47[0x0]);})),_0x313090;}};L=y([v(0x3,(0x0,t['Inject'])(t['Injector'])),v(0x4,(0x0,t[_0x193bc9(0x394)])(e[_0x193bc9(0x2a4)])),v(0x5,(0x0,t['Inject'])(t[_0x193bc9(0xec)])),v(0x6,(0x0,t['Inject'])(e['RevisionService'])),v(0x7,(0x0,t[_0x193bc9(0x394)])(S)),v(0x8,(0x0,t['Inject'])(_)),v(0x9,t['IUniverInstanceService']),v(0xa,t[_0x193bc9(0x185)]),v(0xb,t[_0x193bc9(0x2ae)]),v(0xc,t['IPermissionService']),v(0xd,(0x0,t['Optional'])(C)),v(0xe,(0x0,t[_0x193bc9(0x294)])(x))],L);let R=class extends P{constructor(_0x8ae13d,_0x1a0c34,_0x14d153,_0x2ea0c8,_0x13712e,_0x1f2308,_0x4bf1bc,_0x575eb0,_0x5a1f88,_0x26753f,_0x42ce50,_0xc66cec,_0x58fb76,_0x38ecf1){const _0x16b088=_0x193bc9;super(_0x8ae13d,_0x14d153,_0x1a0c34,_0x2ea0c8,_0x13712e,_0x1f2308,_0x4bf1bc,_0x575eb0,_0x5a1f88,_0x26753f,_0x42ce50,_0xc66cec,_0x58fb76,_0x38ecf1),this['unitID']=_0x8ae13d,this[_0x16b088(0x213)]=_0x1a0c34;}async[_0x193bc9(0x317)](){const _0x2e4b04=_0x193bc9;let _0x235b3e=await super[_0x2e4b04(0x317)]();return this[_0x2e4b04(0x240)](this[_0x2e4b04(0x28d)][_0x2e4b04(0x3c2)]((_0x5141b6,_0x382f3f)=>{const _0x50232c=_0x2e4b04;if(_0x5141b6[_0x50232c(0x213)]!==t[_0x50232c(0x2f4)][_0x50232c(0xe6)]||_0x382f3f!=null&&_0x382f3f[_0x50232c(0x1b7)]||_0x382f3f!=null&&_0x382f3f[_0x50232c(0xcd)])return;let _0x4f2ac8=_0x5141b6['params'];if((_0x4f2ac8==null?void 0x0:_0x4f2ac8[_0x50232c(0xb0)])!==this['unitID'])return;let _0x5c67dd=_0x5141b6,_0x217140=this[_0x50232c(0x361)][_0x50232c(0x25d)]['fetchThroughInterceptors'](this[_0x50232c(0x361)][_0x50232c(0x25d)][_0x50232c(0xfc)]()[_0x50232c(0x1ca)])([_0x5c67dd],this[_0x50232c(0xac)])||[_0x5c67dd];this[_0x50232c(0x36d)](_0x217140[0x0]);})),_0x235b3e;}};R=y([v(0x3,(0x0,t[_0x193bc9(0x394)])(t['Injector'])),v(0x4,(0x0,t[_0x193bc9(0x394)])(e[_0x193bc9(0x2a4)])),v(0x5,(0x0,t[_0x193bc9(0x394)])(t['LocaleService'])),v(0x6,(0x0,t[_0x193bc9(0x394)])(e['RevisionService'])),v(0x7,(0x0,t[_0x193bc9(0x394)])(_)),v(0x8,t['IUniverInstanceService']),v(0x9,t['ILogService']),v(0xa,t[_0x193bc9(0x2ae)]),v(0xb,t[_0x193bc9(0x3bc)]),v(0xc,(0x0,t[_0x193bc9(0x294)])(C)),v(0xd,(0x0,t['Optional'])(x))],R);let z=class extends P{constructor(_0x3124a2,_0x1495e5,_0x46820c,_0x4b7548,_0x19e6b4,_0x285fa6,_0x30b02f,_0x4d8178,_0x5bc2b7,_0x39f260,_0x1a2217,_0x205687,_0x17d662,_0x1cb08f){const _0x5a2503=_0x193bc9;super(_0x3124a2,_0x46820c,_0x1495e5,_0x4b7548,_0x19e6b4,_0x285fa6,_0x30b02f,_0x4d8178,_0x5bc2b7,_0x39f260,_0x1a2217,_0x205687,_0x17d662,_0x1cb08f),this[_0x5a2503(0x29c)]=_0x3124a2,this[_0x5a2503(0x213)]=_0x1495e5;}async['_init'](){const _0x38536b=_0x193bc9;let _0x9e2a3d=await super[_0x38536b(0x317)]();return this[_0x38536b(0x240)](this[_0x38536b(0x28d)][_0x38536b(0x3c2)]((_0x4a7e75,_0x5870dd)=>{const _0x344147=_0x38536b;if(_0x4a7e75[_0x344147(0x213)]!==t[_0x344147(0x2f4)][_0x344147(0xe6)]||_0x5870dd!=null&&_0x5870dd[_0x344147(0x1b7)]||_0x5870dd!=null&&_0x5870dd[_0x344147(0xcd)])return;let _0x1a5921=_0x4a7e75[_0x344147(0x203)];if((_0x1a5921==null?void 0x0:_0x1a5921[_0x344147(0xb0)])!==this[_0x344147(0x29c)])return;let _0x411709=_0x4a7e75,_0x4f26b2=this[_0x344147(0x361)][_0x344147(0x25d)][_0x344147(0x217)](this['_compressMutationService'][_0x344147(0x25d)][_0x344147(0xfc)]()[_0x344147(0x1ca)])([_0x411709],this['_univerInstanceService'])||[_0x411709];this['_onLocalMutation'](_0x4f26b2[0x0]);})),_0x9e2a3d;}};z=y([v(0x3,(0x0,t['Inject'])(t['Injector'])),v(0x4,(0x0,t['Inject'])(e[_0x193bc9(0x2a4)])),v(0x5,(0x0,t[_0x193bc9(0x394)])(t[_0x193bc9(0xec)])),v(0x6,(0x0,t[_0x193bc9(0x394)])(e[_0x193bc9(0x390)])),v(0x7,(0x0,t['Inject'])(_)),v(0x8,t[_0x193bc9(0xfe)]),v(0x9,t['ILogService']),v(0xa,t[_0x193bc9(0x2ae)]),v(0xb,t[_0x193bc9(0x3bc)]),v(0xc,(0x0,t[_0x193bc9(0x294)])(C)),v(0xd,(0x0,t[_0x193bc9(0x294)])(x))],z);let B=class extends P{constructor(_0xc80fc4,_0xd2633d,_0x1b1ba9,_0x1b725e,_0x6c6c78,_0x53500c,_0x472e4d,_0x4912b9,_0x6dd14a,_0x3645f8,_0x5c8ceb,_0x5a2180,_0x5cfbd2,_0x348ad0){const _0xc26ba5=_0x193bc9;super(_0xc80fc4,_0x1b1ba9,_0xd2633d,_0x1b725e,_0x6c6c78,_0x53500c,_0x472e4d,_0x4912b9,_0x6dd14a,_0x3645f8,_0x5c8ceb,_0x5a2180,_0x5cfbd2,_0x348ad0),this['unitID']=_0xc80fc4,this[_0xc26ba5(0x213)]=_0xd2633d;}async[_0x193bc9(0x317)](){const _0x3fcab3=_0x193bc9;let _0x1b136c=await super[_0x3fcab3(0x317)]();return this['disposeWithMe'](this['_commandService'][_0x3fcab3(0x3c2)]((_0x4459cd,_0x46314b)=>{const _0x2871bb=_0x3fcab3;if(_0x4459cd[_0x2871bb(0x213)]!==t[_0x2871bb(0x2f4)][_0x2871bb(0xe6)]||_0x46314b!=null&&_0x46314b[_0x2871bb(0x1b7)]||_0x46314b!=null&&_0x46314b['onlyLocal'])return;let _0x1f85d3=_0x4459cd['params'];if((_0x1f85d3==null?void 0x0:_0x1f85d3[_0x2871bb(0xb0)])!==this['unitID'])return;let _0x5a75f9=_0x4459cd,_0x55fff5=this[_0x2871bb(0x361)][_0x2871bb(0x25d)]['fetchThroughInterceptors'](this[_0x2871bb(0x361)][_0x2871bb(0x25d)][_0x2871bb(0xfc)]()['COMPRESS_MUTATION_SEND'])([_0x5a75f9],this[_0x2871bb(0xac)])||[_0x5a75f9];this[_0x2871bb(0x36d)](_0x55fff5[0x0]);})),_0x1b136c;}};B=y([v(0x3,(0x0,t[_0x193bc9(0x394)])(t[_0x193bc9(0xb4)])),v(0x4,(0x0,t[_0x193bc9(0x394)])(e[_0x193bc9(0x2a4)])),v(0x5,(0x0,t[_0x193bc9(0x394)])(t[_0x193bc9(0xec)])),v(0x6,(0x0,t['Inject'])(e[_0x193bc9(0x390)])),v(0x7,(0x0,t[_0x193bc9(0x394)])(_)),v(0x8,t[_0x193bc9(0xfe)]),v(0x9,t[_0x193bc9(0x185)]),v(0xa,t['ICommandService']),v(0xb,t[_0x193bc9(0x3bc)]),v(0xc,(0x0,t[_0x193bc9(0x294)])(C)),v(0xd,(0x0,t[_0x193bc9(0x294)])(x))],B);const We=(0x0,t[_0x193bc9(0x199)])('univer-pro.collaboration-client.network-condition.service');function Ge(_0x226984){const _0x23e01d=_0x193bc9;let _0x37bfdd=_0x226984[_0x23e01d(0x2ef)],_0x2e2acf=JSON[_0x23e01d(0x2ff)](_0x37bfdd);switch(_0x2e2acf['cmd']){case a[_0x23e01d(0x386)][_0x23e01d(0x3b3)]:case a[_0x23e01d(0x386)]['HELLO']:{let _0x216708=_0x2e2acf[_0x23e01d(0x1ad)];return{..._0x2e2acf,'data':_0x216708,'cmd':_0x2e2acf[_0x23e01d(0x3a7)]};}case a[_0x23e01d(0x386)]['JOIN']:{let _0xacf566=_0x2e2acf['joinRsp'];return{..._0x2e2acf,'data':_0xacf566,'cmd':_0x2e2acf[_0x23e01d(0x3a7)]};}case a[_0x23e01d(0x386)]['RECV']:{let _0x27c0bc=_0x2e2acf['collaMsg'];switch(_0x27c0bc[_0x23e01d(0x1fa)]){case e[_0x23e01d(0x3cc)]['PERMISSION_REJ']:var _0x17759c;return{..._0x2e2acf,'data':{..._0x27c0bc,'data':(_0x17759c=_0x27c0bc['permissionRejEvent'])==null?void 0x0:_0x17759c['cs']},'cmd':_0x2e2acf['cmd']};case e[_0x23e01d(0x3cc)]['CHANGESET_ACK']:var _0x509be;return{..._0x2e2acf,'data':{..._0x27c0bc,'data':(_0x509be=_0x27c0bc[_0x23e01d(0x2fd)])==null?void 0x0:_0x509be['cs']},'cmd':_0x2e2acf[_0x23e01d(0x3a7)]};case e['CollaborationEvent'][_0x23e01d(0xdf)]:var _0x313ebc;return{..._0x2e2acf,'data':{..._0x27c0bc,'data':(_0x313ebc=_0x27c0bc['newCsEvent'])==null?void 0x0:_0x313ebc['cs']},'cmd':_0x2e2acf[_0x23e01d(0x3a7)]};case e[_0x23e01d(0x3cc)][_0x23e01d(0xd6)]:var _0x11e909;return{..._0x2e2acf,'data':{..._0x27c0bc,'data':(_0x11e909=_0x27c0bc[_0x23e01d(0x194)])==null?void 0x0:_0x11e909['cs']},'cmd':_0x2e2acf['cmd']};case e[_0x23e01d(0x3cc)][_0x23e01d(0x309)]:var _0x313241;return{..._0x2e2acf,'data':{..._0x27c0bc,'data':(_0x313241=_0x27c0bc['csShouldRetryEvent'])==null?void 0x0:_0x313241['cs']},'cmd':_0x2e2acf[_0x23e01d(0x3a7)]};case e[_0x23e01d(0x3cc)]['UPDATE_CURSOR']:return{..._0x2e2acf,'data':{..._0x27c0bc,'data':_0x27c0bc['updateCursorEvent']},'cmd':_0x2e2acf['cmd']};case e[_0x23e01d(0x3cc)]['USERS_ENTER']:return{..._0x2e2acf,'data':{..._0x27c0bc,'data':_0x27c0bc[_0x23e01d(0x224)]},'cmd':_0x2e2acf[_0x23e01d(0x3a7)]};case e[_0x23e01d(0x3cc)][_0x23e01d(0xe2)]:return{..._0x2e2acf,'data':{..._0x27c0bc,'data':_0x27c0bc[_0x23e01d(0x302)]},'cmd':_0x2e2acf[_0x23e01d(0x3a7)]};case e[_0x23e01d(0x3cc)]['LIVESHARE_NEW_HOST']:return{..._0x2e2acf,'data':{..._0x27c0bc,'data':_0x27c0bc[_0x23e01d(0x17e)]},'cmd':_0x2e2acf[_0x23e01d(0x3a7)]};case e[_0x23e01d(0x3cc)]['LIVESHARE_FETCH_OPERATIONS']:case e['CollaborationEvent'][_0x23e01d(0x272)]:return{..._0x2e2acf,'data':{..._0x27c0bc,'data':_0x27c0bc['liveShareOperation']},'cmd':_0x2e2acf[_0x23e01d(0x3a7)]};case e['CollaborationEvent'][_0x23e01d(0x130)]:return{..._0x2e2acf,'data':{..._0x27c0bc,'data':_0x27c0bc[_0x23e01d(0x17e)]},'cmd':_0x2e2acf[_0x23e01d(0x3a7)]};case e[_0x23e01d(0x3cc)][_0x23e01d(0x36c)]:return{..._0x2e2acf,'data':_0x27c0bc,'cmd':_0x2e2acf['cmd']};case e[_0x23e01d(0x3cc)][_0x23e01d(0x3cd)]:return{..._0x2e2acf,'data':{..._0x27c0bc,'data':_0x27c0bc['commentUpdateEvent']},'cmd':_0x2e2acf[_0x23e01d(0x3a7)]};case e[_0x23e01d(0x3cc)][_0x23e01d(0x11e)]:return{..._0x2e2acf,'data':{..._0x27c0bc,'data':_0x27c0bc[_0x23e01d(0x3bb)]},'cmd':_0x2e2acf[_0x23e01d(0x3a7)]};case e[_0x23e01d(0x3cc)][_0x23e01d(0x38d)]:return{..._0x2e2acf,'data':{..._0x27c0bc,'data':_0x27c0bc['shouldCloseConn']},'cmd':_0x2e2acf[_0x23e01d(0x3a7)]};case e[_0x23e01d(0x3cc)][_0x23e01d(0x24a)]:return{..._0x2e2acf,'data':{..._0x27c0bc,'data':_0x27c0bc[_0x23e01d(0x1d5)]},'cmd':_0x2e2acf[_0x23e01d(0x3a7)]};default:return _0x2e2acf;}}default:return _0x2e2acf;}}function Ke(_0x3f8bdb){const _0x34579f=_0x193bc9;switch(_0x3f8bdb[_0x34579f(0x3a7)]){case a['CombCmd'][_0x34579f(0x3b3)]:case a[_0x34579f(0x386)][_0x34579f(0x2f5)]:return JSON[_0x34579f(0x25e)]({'cmd':_0x3f8bdb[_0x34579f(0x3a7)],'routeKey':_0x3f8bdb[_0x34579f(0x22c)]});case a[_0x34579f(0x386)][_0x34579f(0x3b8)]:{let _0x5d4a3b;switch(_0x3f8bdb[_0x34579f(0x2ef)][_0x34579f(0x1fa)]){case e[_0x34579f(0x3cc)][_0x34579f(0x2ee)]:_0x5d4a3b={'eventID':e[_0x34579f(0x3cc)][_0x34579f(0x2ee)],'updateCursorEvent':_0x3f8bdb[_0x34579f(0x2ef)][_0x34579f(0x2ef)]};break;case e[_0x34579f(0x3cc)][_0x34579f(0xe2)]:_0x5d4a3b={'eventID':e['CollaborationEvent']['USERS_LEAVE'],'leaveEvent':_0x3f8bdb['data'][_0x34579f(0x2ef)]};break;case e[_0x34579f(0x3cc)][_0x34579f(0x208)]:_0x5d4a3b={'eventID':e[_0x34579f(0x3cc)][_0x34579f(0x208)],'joinEvent':_0x3f8bdb['data'][_0x34579f(0x2ef)]};break;case e[_0x34579f(0x3cc)][_0x34579f(0x2d3)]:_0x5d4a3b={'eventID':e[_0x34579f(0x3cc)][_0x34579f(0x2d3)],'liveShareNewHost':_0x3f8bdb[_0x34579f(0x2ef)][_0x34579f(0x2ef)]};break;case e[_0x34579f(0x3cc)][_0x34579f(0x272)]:_0x5d4a3b={'eventID':e['CollaborationEvent']['LIVESHARE_OPERATION'],'liveShareOperation':_0x3f8bdb[_0x34579f(0x2ef)]['data']};break;case e[_0x34579f(0x3cc)][_0x34579f(0x130)]:_0x5d4a3b={'eventID':e[_0x34579f(0x3cc)][_0x34579f(0x130)],'liveShareTerminate':_0x3f8bdb[_0x34579f(0x2ef)][_0x34579f(0x2ef)]};break;case e['CollaborationEvent'][_0x34579f(0x244)]:_0x5d4a3b={'eventID':e[_0x34579f(0x3cc)][_0x34579f(0x244)],'liveShareRequestHost':_0x3f8bdb[_0x34579f(0x2ef)]['data']};break;case e[_0x34579f(0x3cc)][_0x34579f(0x216)]:_0x5d4a3b={'eventID':e['CollaborationEvent']['LIVESHARE_FETCH_OPERATIONS']};break;default:_0x5d4a3b={'eventID':_0x3f8bdb[_0x34579f(0x2ef)][_0x34579f(0x1fa)]};}return JSON['stringify']({'cmd':_0x3f8bdb[_0x34579f(0x3a7)],'routeKey':_0x3f8bdb[_0x34579f(0x22c)],'collaMsg':_0x5d4a3b});}case a[_0x34579f(0x386)]['JOIN']:return JSON[_0x34579f(0x25e)]({'cmd':_0x3f8bdb[_0x34579f(0x3a7)],'routeKey':_0x3f8bdb['routeKey'],'joinReq':_0x3f8bdb[_0x34579f(0x2ef)]});case a[_0x34579f(0x386)][_0x34579f(0x3ce)]:return JSON[_0x34579f(0x25e)]({'cmd':_0x3f8bdb[_0x34579f(0x3a7)],'routeKey':_0x3f8bdb[_0x34579f(0x22c)],'leaveReq':_0x3f8bdb[_0x34579f(0x2ef)]});default:throw Error(_0x34579f(0x249));}}const qe=(0x0,t[_0x193bc9(0x199)])(_0x193bc9(0x393));function _0x5d42(_0x2abe9a,_0x46da47){_0x2abe9a=_0x2abe9a-0xa1;const _0x57b4f6=_0x57b4();let _0x5d428e=_0x57b4f6[_0x2abe9a];return _0x5d428e;}function Je(_0x240b45,_0xef4f1a,_0x44e251){const _0x87fa0f=_0x193bc9;return _0x240b45+'/'+_0xef4f1a+_0x87fa0f(0xb1)+_0x44e251+'/new_changes';}let Ye=class extends t['Disposable']{constructor(_0x5912bb,_0x84555,_0x852ce6,_0x1ee075,_0x58a2f7){const _0x4859ed=_0x193bc9;super(),this[_0x4859ed(0x254)]=_0x5912bb,this['_httpService']=_0x84555,this['_configService']=_0x852ce6,this['_logService']=_0x1ee075,this[_0x4859ed(0xff)]=_0x58a2f7;}[_0x193bc9(0x33f)](_0x6529c5){const _0x4695b1=_0x193bc9;let _0x49ead7=this[_0x4695b1(0x254)]['get'](l[_0x4695b1(0x365)]);if(!_0x49ead7)throw Error(_0x4695b1(0x2da));let _0x12ccae=_0x49ead7[_0x4695b1(0x388)](_0x6529c5);if(!_0x12ccae)throw Error(_0x4695b1(0x137));let _0x44dfc9=new t[(_0x4695b1(0x173))](),_0x1eb05d=new i[(_0x4695b1(0xa7))]();_0x44dfc9[_0x4695b1(0x25c)](_0x12ccae[_0x4695b1(0x1e4)]['subscribe'](_0x408e59=>_0x1eb05d[_0x4695b1(0x37d)](_0x408e59))),_0x44dfc9['add']((0x0,t[_0x4695b1(0x200)])(()=>_0x1eb05d[_0x4695b1(0x1f3)]()));let _0x50e3e2=new i[(_0x4695b1(0xa7))]();_0x44dfc9[_0x4695b1(0x25c)](_0x12ccae['error$'][_0x4695b1(0x1d4)](_0x3c800a=>_0x50e3e2[_0x4695b1(0x37d)](_0x3c800a))),_0x44dfc9[_0x4695b1(0x25c)]((0x0,t['toDisposable'])(()=>_0x50e3e2[_0x4695b1(0x1f3)]()));let _0x16954e=new i[(_0x4695b1(0xa7))]();_0x44dfc9['add'](_0x12ccae[_0x4695b1(0x327)][_0x4695b1(0x1d4)](_0x3aeb40=>{const _0x40683a=_0x4695b1;let _0x2f9526=Ge(_0x3aeb40);_0x16954e[_0x40683a(0x37d)](_0x2f9526);})),_0x44dfc9[_0x4695b1(0x25c)]((0x0,t[_0x4695b1(0x200)])(()=>_0x16954e[_0x4695b1(0x1f3)]()));let _0x101e88,_0x21a1d8=()=>{const _0x422d8f=_0x4695b1;_0x50e3e2[_0x422d8f(0x37d)](new Event(_0x422d8f(0x359))),_0x1eb05d['next'](new Event('connection\x20error')),_0x101e88['close']();};return _0x101e88={'memberID':'','close$':_0x1eb05d[_0x4695b1(0x2db)](),'error$':_0x50e3e2[_0x4695b1(0x2db)](),'open$':_0x12ccae[_0x4695b1(0x290)],'message$':_0x16954e[_0x4695b1(0x2db)](),'send':_0x3ffad8=>{const _0x448fa6=_0x4695b1;if(_0x3ffad8[_0x448fa6(0x3a7)]===a[_0x448fa6(0x386)][_0x448fa6(0x3b8)]){if(_0x3ffad8[_0x448fa6(0x2ef)][_0x448fa6(0x1fa)]===e[_0x448fa6(0x3cc)][_0x448fa6(0x176)]){this[_0x448fa6(0x2bf)](_0x101e88,_0x3ffad8[_0x448fa6(0x2ef)])[_0x448fa6(0xf0)](_0x585400=>{const _0x231e6e=_0x448fa6;this['_logService'][_0x231e6e(0x146)](_0x585400),_0x21a1d8();});return;}if(_0x3ffad8[_0x448fa6(0x2ef)][_0x448fa6(0x1fa)]===e[_0x448fa6(0x3cc)][_0x448fa6(0x389)]){let _0x30e599=_0x3ffad8[_0x448fa6(0x2ef)];this[_0x448fa6(0x3a6)](_0x30e599)['then'](_0x5b9fd0=>{const _0x35ce75=_0x448fa6;_0x16954e[_0x35ce75(0x37d)]({'cmd':a[_0x35ce75(0x386)][_0x35ce75(0x2c5)],'code':a[_0x35ce75(0x33b)]['OK'],'routeKey':_0x30e599[_0x35ce75(0x2ef)]['unitID'],'routeType':'','data':{'eventID':e[_0x35ce75(0x3cc)]['PSEUDO_FETCH_MISSING_RESULT'],'data':{'changesets':_0x5b9fd0}}});})[_0x448fa6(0xf0)](_0x5b1b46=>{const _0x28ffec=_0x448fa6;this[_0x28ffec(0x131)][_0x28ffec(0x146)](_0x5b1b46),_0x21a1d8();});return;}}_0x12ccae[_0x448fa6(0xce)](Ke(_0x3ffad8));},'close':()=>{_0x12ccae['close'](),_0x44dfc9['dispose']();}},_0x101e88;}async['_submitChangeset'](_0x35c5c5,_0x7c9fc3){const _0x2777cd=_0x193bc9;let {unitType:_0x4999bd,unitID:_0x21488f,changeset:_0x3b9b4e}=_0x7c9fc3[_0x2777cd(0x2ef)],_0x2fa768={'unitID':_0x21488f,'memberID':_0x35c5c5['memberID'],'type':_0x4999bd,'changeset':(0x0,e[_0x2777cd(0x343)])(_0x3b9b4e)},_0x56dfa3=this['_configService'][_0x2777cd(0x372)](m),_0x54b941=Je((_0x56dfa3==null?void 0x0:_0x56dfa3['collabSubmitChangesetUrl'])??_0x2777cd(0x107),_0x4999bd,_0x21488f);try{await this[_0x2777cd(0x332)][_0x2777cd(0xa4)](_0x54b941,{'body':_0x2fa768});}catch(_0x17cb18){throw this['_logService'][_0x2777cd(0x146)](_0x2777cd(0x307),_0x2777cd(0x2fc)),_0x17cb18;}}async[_0x193bc9(0x3a6)](_0x6cca26){const _0x1ce03d=_0x193bc9;let {unitID:_0x34747e,from:_0x184d91,to:_0xcd58a6,unitType:_0x411fa4}=_0x6cca26[_0x1ce03d(0x2ef)];return(await this[_0x1ce03d(0xff)][_0x1ce03d(0x141)]({'metadata':void 0x0},{'unitID':_0x34747e,'type':_0x411fa4,'from':_0x184d91,'to':_0xcd58a6}))[_0x1ce03d(0x3ba)]['map'](_0x259a92=>((_0x259a92[_0x1ce03d(0xa5)]===null||_0x259a92[_0x1ce03d(0xa5)]===void 0x0)&&(_0x259a92[_0x1ce03d(0xa5)]=[]),_0x259a92));}};Ye=y([v(0x0,(0x0,t[_0x193bc9(0x394)])(t[_0x193bc9(0xb4)])),v(0x1,(0x0,t[_0x193bc9(0x394)])(l[_0x193bc9(0x14e)])),v(0x2,t['IConfigService']),v(0x3,t[_0x193bc9(0x185)]),v(0x4,e['ISnapshotServerService'])],Ye);const Xe=(0x0,t[_0x193bc9(0x199)])('univer-pro.collaboration-client-adapter-service');function Ze(_0x48b5fa={}){const _0x36761e=_0x193bc9;return _0x48b5fa[_0x36761e(0x1cf)]?{'resolveUnit':_0x48b5fa[_0x36761e(0x1cf)]}:{'resolveUnit':_0x266641=>({'target':{'unitId':_0x266641[_0x36761e(0xb0)],'unitType':_0x266641[_0x36761e(0x29a)]}})};}function Qe(_0x3a443e,_0xa5c100,_0x2d7886){const _0x4bb184=_0x193bc9;let _0x4fd7d1=_0x2d7886[_0x4bb184(0x171)][_0x4bb184(0x261)];if(_0x4fd7d1!=null&&_0x4fd7d1['trim']()==='')throw Error('COLLABORATION_ENDPOINT_INVALID');if(!_0x2d7886['target'][_0x4bb184(0xb0)])throw Error(_0x4bb184(0x383));return{'localUnitId':_0x3a443e,'unitType':_0xa5c100,'target':{'endpoint':_0x4fd7d1,'unitId':_0x2d7886['target'][_0x4bb184(0xb0)],'unitType':_0x2d7886['target'][_0x4bb184(0x29a)]??_0xa5c100},'changeset':_0x2d7886[_0x4bb184(0x273)]};}let V=class extends t['Disposable']{constructor(_0x45cd0c,_0x45f447,_0x510431,_0xf88276,_0x61dc88,_0x50487c,_0x3b146f){const _0x3704c7=_0x193bc9;super(),this['_injector']=_0x45cd0c,this[_0x3704c7(0x131)]=_0x45f447,this[_0x3704c7(0x2e1)]=_0x510431,this[_0x3704c7(0x1ce)]=_0xf88276,this[_0x3704c7(0x2a9)]=_0x61dc88,this['_adapter']=_0x50487c,this['_networkConditionService']=_0x3b146f,g(this,_0x3704c7(0xae),new Map()),g(this,'_pendingSessions',new Map()),g(this,_0x3704c7(0x1e8),new Map()),g(this,'_socketChannels',new Map()),g(this,_0x3704c7(0xb3),this['_getSocketChannel'](void 0x0)['socket$'][_0x3704c7(0x2db)]()),g(this,_0x3704c7(0xab),new i[(_0x3704c7(0x1d2))](0x0)),g(this,_0x3704c7(0x220),this[_0x3704c7(0xab)][_0x3704c7(0x2db)]()),this[_0x3704c7(0x3cf)]();}[_0x193bc9(0x3cf)](){const _0x3b1ee8=_0x193bc9;this[_0x3b1ee8(0x348)]&&this[_0x3b1ee8(0x240)](this[_0x3b1ee8(0x348)][_0x3b1ee8(0x24b)][_0x3b1ee8(0x1d4)](_0x4ce9bc=>{const _0x7d5d94=_0x3b1ee8;_0x4ce9bc&&this[_0x7d5d94(0x1a1)](),_0x4ce9bc||this[_0x7d5d94(0x186)]['forEach'](_0x2cb82c=>this['_onOffline'](_0x2cb82c));}));}['dispose'](){const _0x4540c3=_0x193bc9;super['dispose'](),this[_0x4540c3(0x186)][_0x4540c3(0x2ea)](_0x2dee02=>{const _0xda131d=_0x4540c3;var _0x4ea90d,_0x1dee45;(_0x4ea90d=_0x2dee02['socketMessageSubscription'])==null||_0x4ea90d[_0xda131d(0x237)](),_0x2dee02[_0xda131d(0x375)]=null,this[_0xda131d(0x20a)](_0x2dee02),this['_clearTimeoutTimer'](_0x2dee02),this['_clearHeartbeatTimer'](_0x2dee02),(_0x1dee45=_0x2dee02[_0xda131d(0xb3)][_0xda131d(0x3b9)]())==null||_0x1dee45['close'](),_0x2dee02[_0xda131d(0xb3)][_0xda131d(0x1f3)]();}),this[_0x4540c3(0x186)][_0x4540c3(0xc4)](),this['_sessions']['forEach'](_0x4e2574=>_0x4e2574[_0x4540c3(0x3d1)]()),this['_sessions'][_0x4540c3(0xc4)](),this[_0x4540c3(0x1e8)][_0x4540c3(0xc4)](),this['_status$'][_0x4540c3(0x1f3)]();}async[_0x193bc9(0x3b4)](_0xf6b81f,_0x4792fe){const _0x537b3b=_0x193bc9;if(this[_0x537b3b(0xae)][_0x537b3b(0x3c8)](_0xf6b81f))return this['_sessions']['get'](_0xf6b81f);let _0x1ea194=this[_0x537b3b(0x379)][_0x537b3b(0xa2)](_0xf6b81f);if(_0x1ea194)return _0x1ea194;let _0x2466c1=this[_0x537b3b(0x34b)](_0xf6b81f,_0x4792fe);this[_0x537b3b(0x379)][_0x537b3b(0x191)](_0xf6b81f,_0x2466c1);try{return await _0x2466c1;}finally{this[_0x537b3b(0x379)][_0x537b3b(0x1f2)](_0xf6b81f);}}async['_createSession'](_0x460f22,_0x3b4c7d){const _0x4541ad=_0x193bc9;let _0x2c655c=await this[_0x4541ad(0x21d)](_0x460f22,_0x3b4c7d),_0x2d713b=this[_0x4541ad(0x116)](_0x2c655c['target'][_0x4541ad(0x261)]);this['_tryEnsureSocket'](_0x2d713b);let _0x4f4891=this[_0x4541ad(0x254)]['createInstance'](ve,_0x2c655c,_0x2d713b[_0x4541ad(0xb3)][_0x4541ad(0x2db)]());return this[_0x4541ad(0xae)]['set'](_0x460f22,_0x4f4891),this[_0x4541ad(0x1e8)]['set'](_0x460f22,_0x2d713b[_0x4541ad(0x296)]),_0x4f4891;}[_0x193bc9(0x113)](_0x3ae3f1){const _0x3321a6=_0x193bc9;let _0x1fc815=this[_0x3321a6(0xae)][_0x3321a6(0xa2)](_0x3ae3f1),_0x485641=this[_0x3321a6(0x1e8)][_0x3321a6(0xa2)](_0x3ae3f1);if(_0x1fc815&&(this[_0x3321a6(0xae)][_0x3321a6(0x1f2)](_0x3ae3f1),this[_0x3321a6(0x1e8)]['delete'](_0x3ae3f1),_0x1fc815[_0x3321a6(0x159)]()),_0x485641&&!this[_0x3321a6(0x1f6)](_0x485641)){var _0x35cac8;let _0x3b8d11=this[_0x3321a6(0x186)][_0x3321a6(0xa2)](_0x485641);_0x3b8d11==null||(_0x35cac8=_0x3b8d11[_0x3321a6(0xb3)][_0x3321a6(0x3b9)]())==null||_0x35cac8['close']();}}[_0x193bc9(0x1a1)](){const _0x31990d=_0x193bc9;(this[_0x31990d(0x186)][_0x31990d(0x170)]?[...this['_socketChannels'][_0x31990d(0x32c)]()]:[this[_0x31990d(0x116)](void 0x0)])[_0x31990d(0x2ea)](_0x551d88=>{const _0x1680e7=_0x31990d;_0x551d88[_0x1680e7(0xda)]=0x0,this[_0x1680e7(0x20a)](_0x551d88),this[_0x1680e7(0xe4)](_0x551d88);});}[_0x193bc9(0x20a)](_0x44d3a3){const _0x4b49cc=_0x193bc9;_0x44d3a3[_0x4b49cc(0x179)]!=null&&(clearTimeout(_0x44d3a3['retryConnectingTimer']),_0x44d3a3[_0x4b49cc(0x179)]=null);}async[_0x193bc9(0x1db)](_0x3c2575){const _0x43faca=_0x193bc9;let _0x80766b=this[_0x43faca(0x2e1)][_0x43faca(0x372)](m),_0x1ac3a4=_0x3c2575[_0x43faca(0x261)]??(_0x80766b==null?void 0x0:_0x80766b[_0x43faca(0x158)])??_0x43faca(0xd7),_0x3aeb89=await this[_0x43faca(0x1ce)][_0x43faca(0x388)](_0x1ac3a4);return _0x3c2575[_0x43faca(0xef)]=_0x3aeb89,_0x3aeb89;}async[_0x193bc9(0x17c)](_0x713e1c){const _0x5e231f=_0x193bc9;try{let _0x5bee70=_0x713e1c['socket$'][_0x5e231f(0x3b9)]()??_0x713e1c['candidateSocket']??await this[_0x5e231f(0x1db)](_0x713e1c);if(_0x5bee70){var _0x18aceb;let _0x4259dd=_0x5bee70[_0x5e231f(0xce)];_0x5bee70['send']=_0x12614f=>(_0x12614f[_0x5e231f(0x3a7)]!==a[_0x5e231f(0x386)]['LEAVE']&&this[_0x5e231f(0x1a6)](_0x713e1c),_0x4259dd['apply'](_0x5bee70,[_0x12614f])),(_0x18aceb=_0x713e1c[_0x5e231f(0x375)])==null||_0x18aceb[_0x5e231f(0x237)](),_0x713e1c[_0x5e231f(0x375)]=null,_0x713e1c['socketMessageSubscription']=_0x5bee70[_0x5e231f(0x327)][_0x5e231f(0x1d4)](_0x2b4350=>this[_0x5e231f(0x2dd)](_0x713e1c,_0x5bee70,_0x2b4350)),_0x5bee70['error$']['pipe']((0x0,s[_0x5e231f(0x308)])(0x1))['subscribe'](_0x317762=>this[_0x5e231f(0x131)][_0x5e231f(0x146)](_0x5e231f(0x139),_0x317762)),_0x5bee70[_0x5e231f(0x290)][_0x5e231f(0x3da)]((0x0,s[_0x5e231f(0x308)])(0x1))[_0x5e231f(0x1d4)](()=>{const _0x4c694b=_0x5e231f;this[_0x4c694b(0x20d)](_0x713e1c,_0x5bee70);}),_0x5bee70['close$'][_0x5e231f(0x3da)]((0x0,s['take'])(0x1))[_0x5e231f(0x1d4)](_0x2ccf05=>{const _0x174bb3=_0x5e231f;this[_0x174bb3(0x131)][_0x174bb3(0x30e)]('[CollaborationSessionService]',_0x174bb3(0x18e),_0x2ccf05),this['_onConnectionFailed'](_0x713e1c);});}}catch(_0x375433){this[_0x5e231f(0x131)][_0x5e231f(0x146)](_0x375433),this[_0x5e231f(0x330)](_0x713e1c);}}['_onConnectionOpen'](_0x43c761,_0x1c0d06){const _0x43534a=_0x193bc9;this[_0x43534a(0x131)][_0x43534a(0x30e)](_0x43534a(0x156),'socket\x20open.'),_0x1c0d06['send']({'cmd':a[_0x43534a(0x386)]['HELLO']}),this[_0x43534a(0x1a6)](_0x43c761);}['_onOffline'](_0xe64992){const _0x8b2314=_0x193bc9;_0xe64992[_0x8b2314(0x1e3)]=!0x1,_0xe64992[_0x8b2314(0xef)]=null,this['_status$'][_0x8b2314(0x37d)](0x2),_0xe64992[_0x8b2314(0xb3)][_0x8b2314(0x37d)](null),this[_0x8b2314(0x125)](_0xe64992),this[_0x8b2314(0x153)](_0xe64992);}[_0x193bc9(0x330)](_0x44f74b){const _0x4a8497=_0x193bc9;this[_0x4a8497(0x371)](_0x44f74b),this['_hasSessionsForEndpoint'](_0x44f74b[_0x4a8497(0x296)])&&(_0x44f74b[_0x4a8497(0xda)]<(this['_configService'][_0x4a8497(0x372)](_0x4a8497(0xc9))??0x3)?(this[_0x4a8497(0x2a9)]['emitEvent']({'id':_0x4a8497(0x19a)}),this[_0x4a8497(0xe4)](_0x44f74b)):this[_0x4a8497(0x2a9)][_0x4a8497(0x169)]({'id':_0x4a8497(0x14f)}));}[_0x193bc9(0xe4)](_0x5523bf){const _0x204627=_0x193bc9;let _0x5088ff=_0x5523bf[_0x204627(0xda)],_0x4e5654=this['_configService']['getConfig'](m),_0x308891=_0x5088ff===0x0?0x0:((_0x4e5654==null?void 0x0:_0x4e5654['retryConnectingInterval'])??0x4e20)*0x2**_0x5088ff;_0x5523bf['retryConnectingTimer']=setTimeout(()=>{const _0x49e8d9=_0x204627;clearTimeout(_0x5523bf[_0x49e8d9(0x179)]),_0x5523bf[_0x49e8d9(0x179)]=null,this['_tryEnsureSocket'](_0x5523bf);},_0x308891),_0x5523bf[_0x204627(0xda)]+=0x1;}async[_0x193bc9(0x21d)](_0x4c52ed,_0x5cea6f){const _0x722acd=_0x193bc9;return Qe(_0x4c52ed,_0x5cea6f,await this[_0x722acd(0x2bb)][_0x722acd(0x1cf)]({'unitId':_0x4c52ed,'unitType':_0x5cea6f}));}[_0x193bc9(0x2dd)](_0x1f68a9,_0x347434,_0x390ca3){const _0x3fa254=_0x193bc9;let {cmd:_0x49b527}=_0x390ca3;_0x49b527===a[_0x3fa254(0x386)][_0x3fa254(0x2f5)]&&!_0x1f68a9['socketReady']&&(_0x347434[_0x3fa254(0x154)]=_0x390ca3[_0x3fa254(0x2ef)]['memberID'],_0x1f68a9[_0x3fa254(0xda)]=0x0,_0x1f68a9['socket$']['next'](_0x347434),this['_status$']['next'](0x3),_0x1f68a9[_0x3fa254(0x1e3)]=!0x0,_0x1f68a9[_0x3fa254(0xef)]=null),_0x49b527===a['CombCmd'][_0x3fa254(0x3b3)]&&this[_0x3fa254(0x125)](_0x1f68a9),this[_0x3fa254(0x1a6)](_0x1f68a9);}[_0x193bc9(0x1f6)](_0x4b8225){const _0x5a8359=_0x193bc9;return[...this['_sessionChannels'][_0x5a8359(0x32c)]()][_0x5a8359(0xf1)](_0x1d456b=>_0x1d456b===_0x4b8225);}['_getSocketChannel'](_0x25aa8c){const _0x213aef=_0x193bc9;let _0x4a9944=_0x25aa8c??'',_0x840cc4=this[_0x213aef(0x186)][_0x213aef(0xa2)](_0x4a9944);if(_0x840cc4)return _0x840cc4;let _0x597ea5={'endpointKey':_0x4a9944,'endpoint':_0x25aa8c,'socket$':new i[(_0x213aef(0x1d2))](void 0x0),'candidateSocket':null,'socketReady':!0x1,'socketMessageSubscription':null,'retryConnectingTimer':null,'retryCount':0x0,'sendHeartbeatTimer':null,'timeoutTimer':null};return this[_0x213aef(0x186)]['set'](_0x4a9944,_0x597ea5),_0x597ea5;}[_0x193bc9(0x1a6)](_0x2f974d){const _0x3243bb=_0x193bc9;this['_clearHeartbeatTimer'](_0x2f974d),_0x2f974d[_0x3243bb(0x1e0)]=setTimeout(()=>this['_sendHeartbeat'](_0x2f974d),this['_configService'][_0x3243bb(0x372)](_0x3243bb(0x297))??0x7530);}[_0x193bc9(0x205)](_0x2d991b){const _0x2aa1ad=_0x193bc9;_0x2d991b[_0x2aa1ad(0xb3)][_0x2aa1ad(0x3b9)]()[_0x2aa1ad(0xce)]({'cmd':a['CombCmd'][_0x2aa1ad(0x3b3)]}),this['_waitForHeartbeatResponse'](_0x2d991b);}[_0x193bc9(0x32d)](_0x4a6cbd){const _0x530782=_0x193bc9;_0x4a6cbd[_0x530782(0x119)]=setTimeout(()=>this[_0x530782(0x330)](_0x4a6cbd),this[_0x530782(0x2e1)][_0x530782(0x372)](_0x530782(0x164))??0x4e20);}[_0x193bc9(0x153)](_0x5b8978){const _0x4bf24d=_0x193bc9;_0x5b8978[_0x4bf24d(0x1e0)]!=null&&(clearTimeout(_0x5b8978[_0x4bf24d(0x1e0)]),_0x5b8978['sendHeartbeatTimer']=null);}[_0x193bc9(0x125)](_0x1c6ff5){const _0x2817e5=_0x193bc9;_0x1c6ff5[_0x2817e5(0x119)]!=null&&(clearTimeout(_0x1c6ff5[_0x2817e5(0x119)]),_0x1c6ff5['timeoutTimer']=null);}};V=y([v(0x0,(0x0,t['Inject'])(t[_0x193bc9(0xb4)])),v(0x1,t[_0x193bc9(0x185)]),v(0x2,t['IConfigService']),v(0x3,qe),v(0x4,(0x0,t[_0x193bc9(0x394)])(_)),v(0x5,Xe),v(0x6,(0x0,t[_0x193bc9(0x294)])(We))],V);let H=class extends t['RxDisposable']{constructor(_0xb1a72a,_0x3160ff,_0x15878a,_0x542919){const _0x5032cd=_0x193bc9;var _0x5c300e;super(),this[_0x5032cd(0x254)]=_0xb1a72a,this[_0x5032cd(0x2b0)]=_0x3160ff,this[_0x5032cd(0x2e1)]=_0x15878a,this[_0x5032cd(0xac)]=_0x542919,g(this,_0x5032cd(0x2ab),new Map()),g(this,_0x5032cd(0x255),new i[(_0x5032cd(0xa7))]()),g(this,_0x5032cd(0x2de),this[_0x5032cd(0x255)][_0x5032cd(0x2db)]()),((_0x5c300e=this[_0x5032cd(0x2e1)]['getConfig'](_0x5032cd(0xe7)))==null?void 0x0:_0x5c300e[_0x5032cd(0x12e)])!==!0x1&&this[_0x5032cd(0x317)]();}[_0x193bc9(0x3d1)](){const _0x56b575=_0x193bc9;super[_0x56b575(0x3d1)](),this[_0x56b575(0x2ab)][_0x56b575(0x2ea)](_0x2c7eba=>_0x2c7eba['dispose']()),this[_0x56b575(0x2ab)][_0x56b575(0xc4)]();}[_0x193bc9(0x136)](_0x4153d7){const _0x2cdabc=_0x193bc9;return this[_0x2cdabc(0x2ab)][_0x2cdabc(0xa2)](_0x4153d7)??null;}[_0x193bc9(0x324)](_0x45b4c8){const _0x27cb3d=_0x193bc9;let _0x35c637=this[_0x27cb3d(0x136)](_0x45b4c8);return _0x35c637?(0x0,i['of'])(_0x35c637):this[_0x27cb3d(0x255)]['pipe']((0x0,s['filter'])(_0x2d2332=>_0x2d2332['unitID']===_0x45b4c8));}[_0x193bc9(0x1d9)](_0x2c0ace){const _0x35a481=_0x193bc9;return(0x0,i['firstValueFrom'])(this['getCollabEntity$'](_0x2c0ace)[_0x35a481(0x3da)]((0x0,s[_0x35a481(0x1f4)])(()=>void 0x0)));}['_init'](){const _0x114679=_0x193bc9;this['_univerInstanceService'][_0x114679(0x2eb)](t[_0x114679(0xa8)]['UNIVER_SHEET'])['pipe']((0x0,i['takeUntil'])(this[_0x114679(0x2c8)]),(0x0,s[_0x114679(0x1c7)])(0x10))[_0x114679(0x1d4)](async _0x37206f=>{const _0x4d92ac=_0x114679;let _0x2b0e7c=_0x37206f['unit'][_0x4d92ac(0x1a7)](),_0x2c6fe0=await this[_0x4d92ac(0xdc)](_0x2b0e7c,t[_0x4d92ac(0xa8)]['UNIVER_SHEET']);this[_0x4d92ac(0x2ab)][_0x4d92ac(0x191)](_0x2b0e7c,_0x2c6fe0);}),this['_univerInstanceService'][_0x114679(0x2eb)](t['UniverInstanceType'][_0x114679(0x281)])[_0x114679(0x3da)]((0x0,i[_0x114679(0x21c)])(this[_0x114679(0x2c8)]),(0x0,s[_0x114679(0x1c7)])(0x10))['pipe']((0x0,s[_0x114679(0x2f8)])(_0x1875f3=>!_0x1875f3[_0x114679(0x23c)][_0x114679(0x1a7)]()[_0x114679(0x197)]('__')))[_0x114679(0x1d4)](async _0x3b8e49=>{const _0x527a0b=_0x114679;let _0x22432f=_0x3b8e49['unit'][_0x527a0b(0x1a7)](),_0x2a9c84=await this['_startCollaboration'](_0x22432f,t[_0x527a0b(0xa8)]['UNIVER_DOC']);this[_0x527a0b(0x2ab)][_0x527a0b(0x191)](_0x22432f,_0x2a9c84);}),this['_univerInstanceService'][_0x114679(0x2eb)](t[_0x114679(0xa8)][_0x114679(0x2b7)])[_0x114679(0x3da)]((0x0,i[_0x114679(0x21c)])(this[_0x114679(0x2c8)]),(0x0,s[_0x114679(0x1c7)])(0x10))['subscribe'](async _0x2e3324=>{const _0x4518f5=_0x114679;let _0x5d1390=_0x2e3324['unit'][_0x4518f5(0x1a7)](),_0x30c83e=await this[_0x4518f5(0xdc)](_0x5d1390,t['UniverInstanceType'][_0x4518f5(0x2b7)]);this['_entities']['set'](_0x5d1390,_0x30c83e);}),this[_0x114679(0xac)][_0x114679(0x2eb)](t[_0x114679(0xa8)][_0x114679(0x181)])[_0x114679(0x3da)]((0x0,i['takeUntil'])(this['dispose$']),(0x0,s['delay'])(0x10))['subscribe'](async _0x18428e=>{const _0x574517=_0x114679;let _0xb02d76=_0x18428e[_0x574517(0x23c)][_0x574517(0x1a7)](),_0x50abb4=await this[_0x574517(0xdc)](_0xb02d76,t[_0x574517(0xa8)]['UNIVER_BOARD']);this[_0x574517(0x2ab)][_0x574517(0x191)](_0xb02d76,_0x50abb4);}),this['_univerInstanceService']['getTypeOfUnitAdded$'](t[_0x114679(0xa8)][_0x114679(0x387)])[_0x114679(0x3da)]((0x0,i[_0x114679(0x21c)])(this[_0x114679(0x2c8)]),(0x0,s['delay'])(0x10))[_0x114679(0x1d4)](async _0x27ca09=>{const _0x2d5852=_0x114679;let _0x6b2552=_0x27ca09[_0x2d5852(0x23c)][_0x2d5852(0x1a7)](),_0x28d65e=await this[_0x2d5852(0xdc)](_0x6b2552,t['UniverInstanceType']['UNIVER_BASE']);this['_entities'][_0x2d5852(0x191)](_0x6b2552,_0x28d65e);}),this[_0x114679(0xac)][_0x114679(0x2eb)](t[_0x114679(0xa8)]['UNIVER_PDF'])[_0x114679(0x3da)]((0x0,i['takeUntil'])(this[_0x114679(0x2c8)]),(0x0,s['delay'])(0x10))[_0x114679(0x1d4)](async _0x26b5fc=>{const _0x561c81=_0x114679;let _0xfe6903=_0x26b5fc[_0x561c81(0x23c)][_0x561c81(0x1a7)](),_0x5c9008=await this[_0x561c81(0xdc)](_0xfe6903,t[_0x561c81(0xa8)][_0x561c81(0x18d)]);this[_0x561c81(0x2ab)][_0x561c81(0x191)](_0xfe6903,_0x5c9008);}),(0x0,i[_0x114679(0x27f)])(this[_0x114679(0xac)]['getTypeOfUnitDisposed$'](t[_0x114679(0xa8)]['UNIVER_SHEET']),this['_univerInstanceService'][_0x114679(0x2f3)](t[_0x114679(0xa8)]['UNIVER_DOC']),this[_0x114679(0xac)][_0x114679(0x2f3)](t['UniverInstanceType'][_0x114679(0x2b7)]),this[_0x114679(0xac)][_0x114679(0x2f3)](t[_0x114679(0xa8)][_0x114679(0x181)]),this[_0x114679(0xac)]['getTypeOfUnitDisposed$'](t['UniverInstanceType'][_0x114679(0x387)]),this[_0x114679(0xac)][_0x114679(0x2f3)](t['UniverInstanceType'][_0x114679(0x18d)]))['pipe']((0x0,i[_0x114679(0x21c)])(this[_0x114679(0x2c8)]))[_0x114679(0x1d4)](_0x10a63a=>{const _0x259d86=_0x114679;let _0x5b6d25=_0x10a63a[_0x259d86(0x1a7)](),_0x5d7958=this[_0x259d86(0x2ab)][_0x259d86(0xa2)](_0x5b6d25);_0x5d7958&&(_0x5d7958[_0x259d86(0x3d1)](),this['_entities'][_0x259d86(0x1f2)](_0x5b6d25));});}async[_0x193bc9(0xdc)](_0x429a19,_0x3756f4){const _0x572ace=_0x193bc9;let _0x19256e=await this[_0x572ace(0x2b0)]['requireSession'](_0x429a19),_0x2193b8=this[_0x572ace(0x254)][_0x572ace(0x1a5)](this[_0x572ace(0x274)](_0x3756f4),_0x429a19,_0x3756f4,_0x19256e);return await _0x2193b8['init'](),this['_entityInit$'][_0x572ace(0x37d)](_0x2193b8),_0x2193b8;}[_0x193bc9(0x274)](_0x8d1658){const _0x5873d0=_0x193bc9;switch(_0x8d1658){case t[_0x5873d0(0xa8)][_0x5873d0(0x281)]:return F;case t[_0x5873d0(0xa8)][_0x5873d0(0x1fb)]:return L;case t[_0x5873d0(0xa8)]['UNIVER_SLIDE']:return R;case t['UniverInstanceType'][_0x5873d0(0x181)]:return z;case t[_0x5873d0(0xa8)][_0x5873d0(0x387)]:return I;case t[_0x5873d0(0xa8)][_0x5873d0(0x18d)]:return B;default:throw Error('[CollaborationController]:\x20invalid\x20univer\x20type:\x20'+_0x8d1658);}}};H=y([v(0x0,(0x0,t[_0x193bc9(0x394)])(t['Injector'])),v(0x1,(0x0,t[_0x193bc9(0x394)])(V)),v(0x2,t[_0x193bc9(0x1ee)]),v(0x3,t['IUniverInstanceService'])],H);var $e='@univerjs-pro/collaboration-client',et=_0x193bc9(0xbc);let tt=class extends t[_0x193bc9(0x190)]{constructor(_0x4d5bb0,_0x50f0ce){const _0x24c3b6=_0x193bc9;super(),this[_0x24c3b6(0xac)]=_0x4d5bb0,this[_0x24c3b6(0x2e1)]=_0x50f0ce,this['_init']();}[_0x193bc9(0x317)](){const _0xa3d0b8=_0x193bc9;this[_0xa3d0b8(0x240)](this[_0xa3d0b8(0xac)][_0xa3d0b8(0x2be)]['subscribe'](()=>{const _0x15cb33=_0xa3d0b8;let _0xb80a55=this[_0x15cb33(0xac)][_0x15cb33(0x2b2)](),_0x1a494c=this[_0x15cb33(0x2e1)][_0x15cb33(0x372)](_0x15cb33(0x366))??_0x15cb33(0x357);_0xb80a55 instanceof t['Workbook']&&(_0x1a494c=_0xb80a55[_0x15cb33(0x38c)]),document[_0x15cb33(0x329)]=_0x1a494c;}));}};tt=y([v(0x0,t['IUniverInstanceService']),v(0x1,t[_0x193bc9(0x1ee)])],tt);const nt=(0x0,t['createIdentifier'])(_0x193bc9(0x37b));function _0x57b4(){const _0x79fcb=['_state','_onRemoteRejected','function','disposeWithMe','object','onTransformRemoteChangesetByIMECache','ILocalCacheService','LIVESHARE_REQUEST_HOST','max','NO_OTHER_CLIENTS_EDITING','editingUnit','_emitMembers','[serializeCombRequest]:\x20should\x20not\x20fall\x20into\x20default\x20branch!','UNISCRIPT_RUN','online$','OTHER_CLIENT_EDITING','OTHER_CLIENTS_EDITING','toPrimitive','fetching\x20the\x20latest\x20document\x20from\x20the\x20server.','iterator','mapDocumentTypeToUniverInstanceType','resolve','packageName','_injector','_entityInit$','OBJECT_PERMISSION_CONFIG_KEY','userID','textEncoder','_telemetryService','_executeRemoteChangeset','_sendingTimer','add','interceptor','stringify','Document','Workbook','endpoint','blockRanges','_singleActiveUnitService','PERSON','min','OPTIONAL','UnitStatus','onMissingChangesets','ISnapshotServerService','compose','randomBytes','CHANGESET_ACK','members$','JOIN_ROOM_NOT_EXISTS','&to=','hasOwnProperty','onSendChangeset','LIVESHARE_OPERATION','changeset','_getCtorByUniverInstanceType','_socket','sendChangesetTimeout','HEARTBEAT_TIMEOUT_KEY','_collaborationPaused','_initRequestHeader','_commentUpdate$','_lockTransition','JOIN_ROOM_PERMISSION_DENIED','_identity','unknown','merge','/universer-api/authz','UNIVER_DOC','_scheduleCollaborationTimeoutTimer','resolveWithBasePath','_updateUnitPermissionPoint','default','_replaceFileID','DataLoaderService','synced','href','_updateState','_members$','This\x20method\x20should\x20not\x20be\x20called\x20on\x20the\x20client\x20side!','_commandService','_telemetryInfo','supports','open$','FileSource','_roomMembers','create','Optional','_maxTotalRetryTimeout','endpointKey','HEARTBEAT_INTERVAL','isTransformMutationsWithChangesetFailure','_onUserJoin','unitType','_socketMessageSubscription','unitID','CollaborationSession','deepClone','every','pending','_getRedoStack','150UYOWse','_resendWithTimeout','CompressMutationService','session.join-failed','telemetry\x20info\x20is\x20not\x20initialized','SheetsSelectionsService','awaiting_with_pending','_collaborationUIEventService','onTransformIME','_entities','_redoStacks','IDLE','ICommandService','uploadFileServerUrl','_collabSessionService','DependentOn','getFocusedUnit','_transformStack','_acknowledgedAwaitingRevision','text-x','[FetchingMissState]:\x20not\x20expected\x20to\x20receive\x20ack\x20when\x20`this._awaitingChangeset`\x20is\x20null!','UNIVER_SLIDE','\x0aCurrent:\x20','c2Prime','_decreaseWaiting','_adapter','BoardCollaborationEntity','_transformSelections','focused$','_submitChangeset','initWorkbookPermissionChange','encode','fetchMiss','transformUndoRedo','sessionStatus','RECV','_onConflict','splice','dispose$','addHandlerCallback','_imageSourceCache','getGlobalObject','MergeInterceptorFactory','_undoStacks','_HTTPService','collaboratorID','charCodeAt','_sessionStatus$','_onUserLeave','LIVESHARE_NEW_HOST','DEFAULT_COLLAB_WEB_SOCKET_URL','_toggleOffline','toString','defineProperty','283876gqJtfN','appendMutation','[CollaborationSocketService]:\x20failed\x20to\x20get\x20web\x20socket\x20factory!','asObservable','_onRemoteChangeset','_onMessage','entityInit$','reduce','ObjectPermissionService','_configService','_getAPIPrefixPath','getWorkbookSelections','serializeCombRequest','RETRY_CONNECTING_MAX_COUNT_KEY','loadSlide','_cfgEnableObjInherit','backupOfflineData','[CollaborationUndoRedoService]','forEach','getTypeOfUnitAdded$','m2Prime','onPrepareTransformSelections','UPDATE_CURSOR','data','isTransformMutationsWithChangesetSuccess','code','headers','getTypeOfUnitDisposed$','CommandType','HELLO','rev','loadSheet','filter','FAIL','string','SUCCUSS','submit\x20changeset\x20error!','csAckEvent','_awaitingChangeset','parse','sequenceExecute','_substituteUndoStack','leaveEvent','removeMember','tables','isInternalEditorID','call','[CollaborationSession]','take','CHANGESET_SHOULD_RETRY','REMOTE_UNISCRIPT_EXECUTION_ENDPOINT_KEY','[OfflineState]:\x20received\x20rejection.','transformSelections','stopTime','debug','includes','revision','mergeOverrideWithDependencies','/allowed','_prepareTransformSelections','_toggleOnline','_substituteRedoStack','2771432opXwAo','_init','_queuedRemoteChangesets','pauseCollaboration','reject','JOIN_ROOM_FULL','_sender','[FetchingMissState]:\x20invalid\x20calling\x20to\x20`resend`.','UniverCollaborationPlugin','ITransformService','_sheetTransformSelectionsService','confirm','getImageSourceCache','_prepareConflictRecovery','getCollabEntity$','/universer-api/stream/file/upload','ImageSourceType','message$','body','title','collaboration_new_changeset','workbook','values','_waitForHeartbeatResponse','onRemoteRej','addImageSourceCache','_onConnectionFailed','onSyncEditingCollabCursor','_httpService','subject','loadPdf','/object/','getMemberID','_localCacheService','_initCloseConn','_applyRemoteChangeset','decorate','CmdRspCode','loginUrlKey','localCacheService','_transformService','_doCreateSocket','Cannot\x20assemble\x20a\x20changeset\x20from\x20multiple\x20mutations\x20of\x20different\x20types:\x20','getSheetId','setCfgEnableObjInherit','parseChangesetToProtocol','_scheduleCompleteTimestamp','upload','_localeService','_replayCachedMutations','_networkConditionService','_createHandler','put','_createSession','saveImage','missingChangesets','transformStack\x20failed!','resourceIDs','_collaborationTimeoutTimer','getUnitType','listCollaborators','range','enableOfflineEditing','result','Quantity','Univer','getAllPermissionPoint','connection\x20error','unit-cache-','[PendingState]:\x20invalid\x20calling\x20to\x20`resend`.','registerHTTPInterceptor','isTransformChangesetsSuccess','RemoveSlidePageMutation','AWAITING','listRoles','_compressMutationService','__splitChunk__','/role','DEFAULT_REMOTE_UNISCRIPT_EXECUTION_ENDPOINT','ISocketService','DEFAULT_FILE_NAME','saveAttachment','snapshot','_unitInfo$','updatePermissionPoint','?size=','MSG_FOR_ERROR','_onLocalMutation','UnitObject','?url=','pluginName','_onOffline','getConfig','_members','collaboration-client.local-cache-service','socketMessageSubscription','UniverNetworkPlugin','/universer-api/file/{fileID}/sign-url','indexOf','_pendingSessions','symbol','base-ui.attachment-io.service','localeService','next','_instanceService','readAsDataURL','_changesetReqId','saveSnapshot','loadOfflineData','COLLABORATION_SESSION_TARGET_UNIT_ID_REQUIRED','ICollaborationSocketService','[CollaborationAttachmentIoService]:\x20failed\x20to\x20resolve\x20attachment\x20URL.','CombCmd','UNIVER_BASE','createSocket','FETCH_MISSING','/rev/','[CollaborationState]:\x20apply\x20error!','name','SHOULD_CLOSE_CONN','[FetchMissState]','concatBytes','RevisionService','ITelemetryService','getTime','univer-pro.collaboration-client-socket-service','Inject','_undoRedoService','concatMap','BASE64','/universer-api/uniscript','COMPRESS_MUTATION_APPLY','[DataLoaderService]','_waitCount','[PendingState]:\x20received\x20rejection.','authzUrl','[UniverCollaborationClientPlugin]:\x20you\x20must\x20provide\x20a\x20socketService\x20implementation\x20in\x20config!','_config','session.room-not-exists','LocalUndoRedoService','onRemoteAck','getUnitOnRev','subType','CommentService','_fetchMissChangesets','cmd','snapshotServerUrl','updateMember','setWaitCount','setShowComponents','/universer-api/snapshot/','parseProtocolChangeset','duration','_commentService','_state$','People','patch','HEARTBEAT','requireSession','createUniverCollaborationAdapter','/-/object/-/batch_allowed','objectPermissionTypes','INGEST','getValue','changesets','updatePermissionObjEvent','IPermissionService','transformMutationsWithChangeset','getUnitStatus$','Rectangle','endsWith','offline','onMutationExecutedForCollab','session.room-full','_onRemoteRetry','getDeserializedSheetBlock','_createInitialState','_upload','has','length','update','socketService','CollaborationEvent','COMMENT_UPDATE','LEAVE','_listenToNetworkCondition','[CollaborationEntity]:\x20invalid\x20state\x20transition!\x20State\x20transferred\x20from\x20is\x20not\x20the\x20current\x20state.\x0aBefore:\x20','dispose','withCredentials','CollaborativeUndoRedoService','createCollaborator','/universer-api/user/session-ticket','list','slice','_transitionLocked','_transformAndApplyRemoteChangeset','pipe','291066fLsKHL','IUndoRedoService','REMOTE_UNISCRIPT_EXECUTION_ENDPOINT','get','url','post','mutations','CLOSE_ROOM','Subject','UniverInstanceType','Base','_initUnitPermissionChange','_status$','_univerInstanceService','CONFLICT_CACHE_CLEAR_FAILED','_sessions','_docStateChangeManagerService','unitId','/unit/','\x20in\x20_schedule.','socket$','Injector','batchAllowed','unitDisposed$','enableAuthServer','reqId','ThresholdInterceptorFactory','PendingState','origin','1.0.1','_pendingMutations','_handlerCallback','49ceBwMC','/block/','_initDependencies','OfflineState','FileId','clear','conflict','Module','ICollaborationClientAdapterService','Unknown\x20type.\x20Will\x20not\x20load\x20files\x20from\x20remote\x20address.','RETRY_CONNECTING_MAX_COUNT','CollaborationAttachmentIoService','[OfflineState]:\x20received\x20acknowledgement.','_getAPIPrefix','onlyLocal','send','_incrementRevisionNumber','UNIVER_COLLABORATION_CLIENT_PLUGIN','onRemoteRetry','signUrlServerUrl','_schedule','[SyncedState]:\x20received\x20rejection.','MemberService','CHANGESET_REJ','ws://127.0.0.1:8000/universer-api/comb/connect','equals','Error\x20on\x20receiving\x20event','retryCount','6354315THOQbd','_startCollaboration','608900cIPWdj','LOCAL_CACHE_INTERVAL','NEW_CHANGESETS','event$','_updateStatus','USERS_LEAVE','getUploadOptions','_tryReconnect','requestParams','MUTATION','collaboration-client.config','getUnit','_removeRoom','_change$','transformChangesets','LocaleService','[CollaborationAttachmentIoService]:\x20attachment\x20exceeds\x20max\x20size.','getImage','candidateSocket','catch','some','getLocalCacheKey','{fileID}','[CollaborationAttachmentIoService]:\x20attachment\x20type\x20is\x20not\x20accepted.','EnsureSlideMasterPageMutation','_roomCreated$','UUID','_refreshUnitPermission','_joinRoom','originalMeta','_transformRemoteChangesetByIMECache','getInterceptPoints','[CollaborationEntity]:\x20cannot\x20lock\x20transition\x20twice!\x20This\x20is\x20an\x20implementation\x20error,\x20meaning\x20you\x20transit\x20the\x20collaboration\x20state\x20again\x20in\x20the\x20process\x20of\x20a\x20previous\x20transition.\x20This\x20should\x20never\x20happen.','IUniverInstanceService','_snapshotServerService','_showConflictNotification','localUnitId','failed\x20to\x20apply\x20missed\x20changesets!','COLLABORATION_CHANGESET_TRANSLATION_REQUIRED','_userManagerService','_stopTelemetryCollaborationNewChangeset','InsertSheetMutation','/universer-api/comb','RxDisposable','objectActions','disableLocalCache','MoveSlidePageMutation','utf8ToBytes','commit','_getUndoStack','CollaborationStatus','getCfgEnableObjInherit','awaiting','encrypt','closeSession','_resendTimer','unitLoaded$','_getSocketChannel','action','SetSelectionsOperation','timeoutTimer','_getSignURL','avatar','SnapshotService','c1Prime','UPDATE_PERMISSION_OBJ','2OjqDEN','append','_isEchoedAwaitingChangeset','clearUnit','getSnapshotAPIPath','_authzIoService','_clearTimeoutTimer','_getLoginPath','CONFLICT_PROCESSING','_showConflictProcessingNotification','OFFLINE','updateSnapshot','fetch_missing','docStateChange$','push','enableCollaboration','_transformUndoredo','LIVESHARE_TERMINATE','_logService','SYNCED','_acknowledgeAwaiting','DocCollaborationEntity','UserManagerService','getCollabEntity','[CollaborationSocketService]:\x20failed\x20to\x20create\x20socket!','&source=','[CollaborationSessionService]:\x20socket\x20error','CollaborationUIEventService','_onRecvEvent','JOIN','accept','_revisionService','[CollaborationEntity]:\x20cannot\x20apply\x20missing\x20results\x20on\x20other\x20states!','isArray','fetchMissingChangesets','getResourcesRequest','floor','b64DecodeUnicode','_acknowledgeAwaitingIfReady','error','[FetchingMissState]:\x20received\x20stale\x20ack\x20revision:\x20','_snapshotService','_transformRemoteChangesetByStateCache','unitInfo$','cfgEnableObjInherit','_closedUnits','deserializeToCombResponse','HTTPService','SOCKET_FAILED','getAllMembers','toggleOnline','3YCIxEV','_clearHeartbeatTimer','memberID','JSONX','[CollaborationSessionService]','_checkMissing','collabWebSocketUrl','close','session','_disposed','MentionType','resend','948959MmOBOP','UnitEmbedded','constructor','_transformIMECache','AwaitingState','IAuthzIoService','HEARTBEAT_TIMEOUT','EmptyMutationInfo','_exhaustRemoteChangesetQueue','CollaborationSocketService','init','emitEvent','getLatestCsReqIdBySid','version','loadBoard','cbc','[CollaborationEntity]:\x20initial\x20state\x20has\x20been\x20created\x20before.\x20You\x20should\x20not\x20call\x20\x22init\x22\x20twice.','_clearRedo','size','target','JOINING','DisposableCollection','now','_shouldReportTelemetry','SUBMIT_CHANGESET','SheetTransformSelectionsService','state$','retryConnectingTimer','touchDependencies','PSEUDO_FETCH_MISSING_RESULT','_tryEnsureSocket','objectType','liveShareNewHost','actions','UniverLicensePlugin','UNIVER_BOARD','rollback','save\x20fail\x20reason\x20is\x20','getRoom','ILogService','_socketChannels','DEFAULT_WS_SESSION_TICKET_URL','onTransformState','override','Plugin','sid','startTime','UNIVER_PDF','socket\x20close','members','Disposable','set','onRemoteChangeset','find','csRejEvent','/universer-api/oidc/authpage','baseRev','startsWith','loadUnitOfRevision','createIdentifier','SOCKET_FAILED_RETRY','objectID','allowed','not_collab','_getUploadFileURL','getSheetBlock','_createInitialStateImpl','reconnect','CollaborationImageIoService','_syncEditingCollabCursor','executeCommand','createInstance','_rescheduleHeartbeat','getUnitId','setConfig','location','_handler','_getCurrentRevision','/object','infoRsp','from','INetworkConditionService','/collaborator','ErrorCode','getOwnPropertyDescriptor','&assign=','_changesetSessionId','[CollaborationEntity]','CONFLICT','fromCollab','_unitLoaded$','_initMergeInterceptor','RichTextEditingMutation','_onJoinRoomEvent','_throwTelemetryCollaborationNewChangeset','ImageUploadStatusType','hostname','__Key__','_updateLocalCache','CollaborationSessionService','collaboration-client.auth.needGotoLoginAlert','maxSize','you\x20should\x20override\x20\x22IUndoRedoService\x22\x20provided\x20in\x20\x22core\x22\x20package!','PERMISSION_REJ','getMember','delay','_startTelemetryCollaborationNewChangeset','onMissedChangesetFetched','COMPRESS_MUTATION_SEND','capture','Failed\x20to\x20update\x20permission\x20point','sheets','_socketService','resolveUnit','getCurrentSelections','getCurrentRevOfUnit','BehaviorSubject','_permissionService','subscribe','uniscriptRunEvent','_getDownloadEndpointURL','onTransformRemoteChangesetByStateCache','number','readyForCollab','_onCombEvent','_createSocket','onStarting','Slide','registerDependencies','_clearScheduledTask','sendHeartbeatTimer','deleteCollaborator','_remoteChangesetQueue','socketReady','close$','_unlockTransition','sessionStatus$','isPermissionRej','_sessionChannels','_clearCollaborationTimeoutTimer','HTTPRequest','PERMISSION_DENIED','onTransformSelections','state','IConfigService','POST','[OfflineState]:\x20invalid\x20calling\x20to\x20`resend`.','prototype','delete','complete','map','change$','_hasSessionsForEndpoint','Board','SUBMIT_CHANGESET_TIMEOUT','BaseCollaborationEntity','eventID','UNIVER_SHEET','_resendTimeout','univer-pro.collaboration-client.single-active-unit-service','collaborators','toggleOffline','toDisposable','ERROR_IMAGE_TYPE','objectId','params','JOIN_ROOM_FAILED','_sendHeartbeat','status','_disableEditing','USERS_ENTER','onload','_clearRetryConnectingTimer','\x20-\x20','MentionIoHttpService','_onConnectionOpen','_collaborationSessionService','editing\x20status\x20changed\x20to','onStateChange','attachment','downloadEndpointUrl','type','_getConfig','textRanges','LIVESHARE_FETCH_OPERATIONS','fetchThroughInterceptors','getCurrentUser','findIndex','_handleRemoteChangesets','ERROR_IMAGE','takeUntil','_resolveSessionIdentity','SnapshotServerOverHTTPService','741556KUbWep','status$','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','sort','IMentionIOService','joinEvent','onCommentUpdate','selections','getActiveSheet','_event$','saveSheetBlock','_type','_memberService','routeKey','toLocal','method','WorkbookEditablePermission','SyncedState','/fetchmissing?from=','AWAITING_WITH_PENDING','[PendingState]:\x20received\x20acknowledgement.','SheetPermissionInitController','UniverCollaborationClientPlugin','clearOfflineData','unsubscribe','DocStateChangeManagerService','_onRemoteACK','getAttachmentUrl','_getSendChangesetTimeout','unit'];_0x57b4=function(){return _0x79fcb;};return _0x57b4();}let U=class{constructor(_0x4f078b,_0xb3db05,_0x251482){this['_httpService']=_0x4f078b,this['_configService']=_0xb3db05,this['_univerInstanceService']=_0x251482;}['getUploadOptions'](){const _0x5ae19f=_0x193bc9;return this[_0x5ae19f(0x214)]()[_0x5ae19f(0x211)]??{};}async[_0x193bc9(0x367)](_0x487ec4){const _0x349423=_0x193bc9;let _0x1a9fa6=this[_0x349423(0xe3)]();if(rt(_0x487ec4,_0x1a9fa6),_0x1a9fa6[_0x349423(0x345)])return _0x1a9fa6[_0x349423(0x345)](_0x487ec4);let _0x48e6af=await this[_0x349423(0x3c7)](_0x487ec4);return{'id':_0x48e6af,'name':_0x487ec4[_0x349423(0x38c)],'mimeType':_0x487ec4['type'],'size':_0x487ec4[_0x349423(0x170)],'sourceType':t[_0x349423(0x326)][_0x349423(0xf7)],'source':_0x48e6af};}async[_0x193bc9(0x23a)](_0x23853d,_0x531245){const _0x544918=_0x193bc9;if(_0x531245!==t['ImageSourceType'][_0x544918(0xf7)])return _0x23853d;let _0x9358c2=(await this[_0x544918(0x332)]['get'](this[_0x544918(0x11a)]()['replace'](_0x544918(0xf3),_0x23853d)))['body'];if(_0x9358c2['error']&&_0x9358c2[_0x544918(0x146)][_0x544918(0x2f1)]!==a[_0x544918(0x1b1)]['OK'])throw _0x9358c2[_0x544918(0x146)];if(!_0x9358c2[_0x544918(0xa3)])throw Error(_0x544918(0x385));return(0x0,t['resolveWithBasePath'])(_0x9358c2[_0x544918(0xa3)],this[_0x544918(0x1d6)]());}async[_0x193bc9(0x3c7)](_0x20682b){const _0x472281=_0x193bc9;let _0xf98444=this['_univerInstanceService'][_0x472281(0x2b2)](),_0x56708d=_0xf98444==null?void 0x0:_0xf98444['getUnitId']();if(!_0x56708d)throw Error('[CollaborationAttachmentIoService]:\x20unitId\x20is\x20not\x20found.');let _0x5c87d9=new FormData();_0x5c87d9['append']('file',_0x20682b);let _0x288e22=this[_0x472281(0x19e)]()+'?size='+_0x20682b['size'][_0x472281(0x2d6)]()+'&source='+a[_0x472281(0x291)][_0x472281(0x15f)]+'&assign='+encodeURIComponent(_0x56708d),_0x473aae=(await this[_0x472281(0x332)][_0x472281(0xa4)](_0x288e22,{'body':_0x5c87d9}))[_0x472281(0x328)][_0x472281(0xc3)];if(typeof _0x473aae!=_0x472281(0x2fa)||!_0x473aae)throw Error('[CollaborationAttachmentIoService]:\x20failed\x20to\x20upload\x20attachment.');return _0x473aae;}[_0x193bc9(0x19e)](){const _0x2ab157=_0x193bc9;return this['_getConfig']()[_0x2ab157(0x2af)]??_0x2ab157(0x325);}[_0x193bc9(0x11a)](){const _0x560705=_0x193bc9;return this[_0x560705(0x214)]()[_0x560705(0xd2)]??_0x560705(0x377);}[_0x193bc9(0x1d6)](){const _0x2eb0ef=_0x193bc9;let _0x191563=this[_0x2eb0ef(0x214)]();return _0x191563[_0x2eb0ef(0x212)]?_0x191563['downloadEndpointUrl']:typeof location<'u'?location[_0x2eb0ef(0xbb)]:_0x191563['uploadFileServerUrl']??'';}[_0x193bc9(0x214)](){const _0x20bc4b=_0x193bc9;return this[_0x20bc4b(0x2e1)]['getConfig']('collaboration-client.config')??{};}};U=y([v(0x0,(0x0,t['Inject'])(l['HTTPService'])),v(0x1,(0x0,t['Inject'])(t[_0x193bc9(0x1ee)])),v(0x2,(0x0,t['Inject'])(t['IUniverInstanceService']))],U);function rt(_0x2c1866,_0x363409){const _0x3942b9=_0x193bc9;var _0x43e658;if(_0x363409[_0x3942b9(0x1c3)]!=null&&_0x2c1866['size']>_0x363409['maxSize'])throw Error(_0x3942b9(0xed));if((_0x43e658=_0x363409[_0x3942b9(0x13d)])!=null&&_0x43e658[_0x3942b9(0x3c9)]&&!_0x363409[_0x3942b9(0x13d)][_0x3942b9(0xf1)](_0x36153e=>_0x2c1866['type']===_0x36153e||_0x2c1866['name']['endsWith'](_0x36153e)||_0x36153e[_0x3942b9(0x3c0)]('/*')&&_0x2c1866[_0x3942b9(0x213)][_0x3942b9(0x197)](_0x36153e[_0x3942b9(0x3d7)](0x0,-0x1))))throw Error(_0x3942b9(0xf4));}let W=class{constructor(_0x3fc460,_0x3ca3e7,_0x399204){const _0x554b8b=_0x193bc9;this[_0x554b8b(0x2e1)]=_0x3fc460,this[_0x554b8b(0x332)]=_0x3ca3e7,this[_0x554b8b(0x37c)]=_0x399204,this[_0x554b8b(0x168)]();}['init'](){const _0x4ee846=_0x193bc9;this[_0x4ee846(0x332)][_0x4ee846(0x35c)]({'priority':0x1,'interceptor':(_0x1bc12b,_0x4838f6)=>_0x4838f6(_0x1bc12b)[_0x4ee846(0x3da)]((0x0,i[_0x4ee846(0x396)])(async _0x338bfe=>{const _0x4b6edf=_0x4ee846;let _0x3bc68f=_0x338bfe;if(_0x3bc68f['status']===0x191){if(typeof window>'u')throw Error('[AuthServerService]:\x20you\x20should\x20provide\x20authentication\x20info\x20on\x20Node.js.');if(window[_0x4b6edf(0x321)](this['localeService']['t'](_0x4b6edf(0x1c2)))){let _0x37d6f9=window['encodeURIComponent'](window['location'][_0x4b6edf(0x289)]);window[_0x4b6edf(0x1a9)][_0x4b6edf(0x289)]=this['_getLoginPath']()+_0x4b6edf(0x36f)+_0x37d6f9;}}return _0x3bc68f;}))});}[_0x193bc9(0x126)](){const _0x2d5a4d=_0x193bc9;let _0x1f9337=this['_configService'][_0x2d5a4d(0x372)](m);return(_0x1f9337==null?void 0x0:_0x1f9337[_0x2d5a4d(0x33c)])??_0x2d5a4d(0x195);}};W=y([v(0x0,t[_0x193bc9(0x1ee)]),v(0x1,(0x0,t['Inject'])(l[_0x193bc9(0x14e)])),v(0x2,(0x0,t[_0x193bc9(0x394)])(t['LocaleService']))],W);let G=class extends t[_0x193bc9(0x190)]{constructor(_0x34b933,_0x469842){const _0x262ee0=_0x193bc9;super(),this['_HTTPService']=_0x34b933,this['_configService']=_0x469842,g(this,'_cfgEnableObjInherit',!0x1),this[_0x262ee0(0x1b9)]();}[_0x193bc9(0x1b9)](){const _0x2333f7=_0x193bc9;let _0xd1559d=this;this[_0x2333f7(0x240)](this[_0x2333f7(0x2ce)][_0x2333f7(0x35c)]({'priority':0x3e7,'interceptor':(0x0,l[_0x2333f7(0x2cc)])({'isMatch'(_0x5ecf9b){const _0x3eb642=_0x2333f7;var _0x5d7396;if(_0x5ecf9b[_0x3eb642(0x22e)]===_0x3eb642(0x1ef)&&(_0x5d7396=_0x5ecf9b[_0x3eb642(0xe5)])!=null&&_0x5d7396[_0x3eb642(0x328)]){let {objectID:_0x57aea4,objectType:_0x3f8621}=_0x5ecf9b[_0x3eb642(0xe5)][_0x3eb642(0x328)]||{};if(!_0x57aea4||_0x3f8621===void 0x0)return!0x1;let _0xe2a457=_0xd1559d[_0x3eb642(0x2e2)]()+'/'+_0x3f8621+_0x3eb642(0x335)+encodeURIComponent(_0x57aea4)+_0x3eb642(0x312);if(_0x5ecf9b[_0x3eb642(0xa3)]===_0xe2a457)return!0x0;}return!0x1;},'getParamsFromRequest'(_0x876dc4){const _0x290157=_0x2333f7;var _0x569bbf;return(_0x569bbf=_0x876dc4['requestParams'])==null?void 0x0:_0x569bbf[_0x290157(0x328)];},'mergeParamsToRequest'(_0x63f9ae,_0x1e6159){const _0x1eb7b0=_0x2333f7;let _0x2bfb89=_0xd1559d[_0x1eb7b0(0x2e2)]()+_0x1eb7b0(0x3b6),_0x4c2b77=_0x63f9ae[_0x1eb7b0(0x2df)]((_0x2f0f51,_0x399a27)=>{const _0x9c133b=_0x1eb7b0;let {unitID:_0x1fe991,objectID:_0x42949c,objectType:_0x264b7d,actions:_0x35c47a}=_0x399a27;return _0x2f0f51[_0x1fe991]||(_0x2f0f51[_0x1fe991]=Object[_0x9c133b(0x293)](null)),_0x2f0f51[_0x1fe991][_0x42949c]||(_0x2f0f51[_0x1fe991][_0x42949c]={'objectID':_0x42949c,'objectType':_0x264b7d,'actions':[]}),_0x2f0f51[_0x1fe991][_0x42949c][_0x9c133b(0x17f)][_0x9c133b(0x12d)](..._0x35c47a),_0x2f0f51;},Object[_0x1eb7b0(0x293)](null)),_0xaf3561=[];for(let _0x114f35 in _0x4c2b77)for(let _0x1b5b38 in _0x4c2b77[_0x114f35]){let {actions:_0x11f42d,objectType:_0x23ec57}=_0x4c2b77[_0x114f35][_0x1b5b38],_0xa429f0=[...new Set(_0x11f42d)];_0xaf3561[_0x1eb7b0(0x12d)]({'unitID':_0x114f35,'objectID':_0x1b5b38,'objectType':_0x23ec57,'actions':_0xa429f0});}return new l[(_0x1eb7b0(0x1ea))]('POST',_0x2bfb89,{'headers':_0x1e6159[_0x1eb7b0(0x2f2)],'withCredentials':_0x1e6159[_0x1eb7b0(0x3d2)],'responseType':_0x1e6159['responseType'],'body':{'requests':_0xaf3561}});}},{'distributeResult'(_0x2b5921,_0x10d3f7){let {objectActions:_0x405e04}=_0x2b5921;return _0x10d3f7['map'](_0x130352=>{const _0x4b94f0=_0x5d42;let {unitID:_0x3216b5,objectID:_0x455428,actions:_0x7216e8}=_0x130352,_0x26f1ec=_0x405e04[_0x4b94f0(0x193)](_0x570d6b=>_0x570d6b['unitID']===_0x3216b5&&_0x570d6b['objectID']===_0x455428);return{'config':_0x130352,'result':{'actions':_0x7216e8[_0x4b94f0(0x1f4)](_0x23de05=>_0x26f1ec==null?void 0x0:_0x26f1ec['actions'][_0x4b94f0(0x193)](_0x397cd5=>_0x397cd5[_0x4b94f0(0x117)]===_0x23de05))[_0x4b94f0(0x2f8)](_0x4b5878=>!!_0x4b5878),'error':_0x2b5921[_0x4b94f0(0x146)]}};});}})}));}[_0x193bc9(0x2e2)](){const _0x5eda9f=_0x193bc9;let _0x586818=this[_0x5eda9f(0x2e1)][_0x5eda9f(0x372)](m);return(_0x586818==null?void 0x0:_0x586818[_0x5eda9f(0x39d)])??_0x5eda9f(0x280);}async['create'](_0x3fafc2){const _0x4a0b1a=_0x193bc9;let _0x55fead=this[_0x4a0b1a(0x2e2)]()+'/'+_0x3fafc2[_0x4a0b1a(0x17d)]+_0x4a0b1a(0x1ac);return(await this[_0x4a0b1a(0x2ce)][_0x4a0b1a(0xa4)](_0x55fead,{'body':_0x3fafc2}))[_0x4a0b1a(0x328)][_0x4a0b1a(0x19b)]||'';}async['list'](_0x983753){const _0x456b21=_0x193bc9;let _0x124793=this[_0x456b21(0x2e2)]()+'/-/object/list';return(await this[_0x456b21(0x2ce)][_0x456b21(0xa4)](_0x124793,{'body':_0x983753}))[_0x456b21(0x328)]['objects'];}async[_0x193bc9(0x3ca)](_0x28c005){const _0x2b8511=_0x193bc9;var _0x6bfd95;let _0x26c856=this['_getAPIPrefixPath']()+'/'+_0x28c005[_0x2b8511(0x17d)]+_0x2b8511(0x335)+encodeURIComponent(_0x28c005[_0x2b8511(0x19b)]),_0x369113=await this[_0x2b8511(0x2ce)][_0x2b8511(0x34a)](_0x26c856,{'body':_0x28c005});if((_0x369113==null||(_0x6bfd95=_0x369113['body'])==null||(_0x6bfd95=_0x6bfd95[_0x2b8511(0x146)])==null?void 0x0:_0x6bfd95[_0x2b8511(0x2f1)])!==0x1)throw Error(_0x2b8511(0x1cc));}async[_0x193bc9(0x19c)](_0x38ff31){const _0xc49e96=_0x193bc9;let _0x47a908=this[_0xc49e96(0x2e2)]()+'/'+_0x38ff31[_0xc49e96(0x17d)]+_0xc49e96(0x335)+encodeURIComponent(_0x38ff31[_0xc49e96(0x19b)])+_0xc49e96(0x312);return(await this['_HTTPService'][_0xc49e96(0xa4)](_0x47a908,{'body':_0x38ff31}))[_0xc49e96(0x328)][_0xc49e96(0x17f)];}async[_0x193bc9(0xb5)](_0x1da422){const _0x3dfcfe=_0x193bc9;let _0x1d60b0=this['_getAPIPrefixPath']()+_0x3dfcfe(0x3b6);return(await this[_0x3dfcfe(0x2ce)][_0x3dfcfe(0xa4)](_0x1d60b0,{'body':{'requests':_0x1da422}}))[_0x3dfcfe(0x328)][_0x3dfcfe(0x109)];}async[_0x193bc9(0x360)](_0x1d4ac1){const _0x397b6b=_0x193bc9;let _0x4f77a1=this[_0x397b6b(0x2e2)]()+'/'+_0x1d4ac1['objectType']+_0x397b6b(0x363),_0x52a32c=await this[_0x397b6b(0x2ce)]['post'](_0x4f77a1,{'body':_0x1d4ac1});return{'roles':_0x52a32c[_0x397b6b(0x328)]['roles'],'actions':_0x52a32c[_0x397b6b(0x328)][_0x397b6b(0x17f)]};}async[_0x193bc9(0x1e1)](_0x3c1ce9){const _0x198e4c=_0x193bc9;let _0x280b8c=this[_0x198e4c(0x2e2)]()+_0x198e4c(0x1b0);await this[_0x198e4c(0x2ce)]['delete'](_0x280b8c,{'params':{'collaboratorID':_0x3c1ce9[_0x198e4c(0x2cf)],'objectID':_0x3c1ce9['objectID'],'unitID':_0x3c1ce9['unitID']}});}async['updateCollaborator'](_0x537678){const _0x2ef543=_0x193bc9;let _0x105566=this[_0x2ef543(0x2e2)]()+_0x2ef543(0x1b0);await this[_0x2ef543(0x2ce)][_0x2ef543(0x3b2)](_0x105566,{'body':_0x537678});}async[_0x193bc9(0x3d4)](_0x117457){const _0x50690c=_0x193bc9;let _0x245629=this[_0x50690c(0x2e2)]()+_0x50690c(0x1b0);await this[_0x50690c(0x2ce)][_0x50690c(0xa4)](_0x245629,{'body':_0x117457});}async[_0x193bc9(0x352)](_0x289636){const _0x5d8982=_0x193bc9;let _0xb2e774=this[_0x5d8982(0x2e2)]()+_0x5d8982(0x1b0),_0x31bc14=await this[_0x5d8982(0x2ce)][_0x5d8982(0xa2)](_0xb2e774,{'params':{'objectID':_0x289636[_0x5d8982(0x19b)],'unitID':_0x289636[_0x5d8982(0x29c)]}});return this[_0x5d8982(0x342)](_0x31bc14[_0x5d8982(0x328)][_0x5d8982(0x14b)]??!0x1),_0x31bc14[_0x5d8982(0x328)]['collaborators'];}async['putCollaborators'](_0x4ef27d){const _0x34e62d=_0x193bc9;let _0x1af66b=this[_0x34e62d(0x2e2)]()+_0x34e62d(0x1b0);await this[_0x34e62d(0x2ce)]['put'](_0x1af66b,{'body':_0x4ef27d});}['setCfgEnableObjInherit'](_0xdb2c2a){const _0x1b72f1=_0x193bc9;this[_0x1b72f1(0x2e7)]=_0xdb2c2a;}[_0x193bc9(0x110)](){const _0xaaa3bc=_0x193bc9;return this[_0xaaa3bc(0x2e7)];}};G=y([v(0x0,(0x0,t[_0x193bc9(0x394)])(l[_0x193bc9(0x14e)])),v(0x1,(0x0,t[_0x193bc9(0x394)])(t['IConfigService']))],G);function it(_0x4a4bb4){const _0x9189d5=_0x193bc9;let _0x38bc4a=atob(_0x4a4bb4),_0x43303c=new Uint8Array(_0x38bc4a[_0x9189d5(0x3c9)]);for(let _0x4e05f0=0x0;_0x4e05f0<_0x38bc4a[_0x9189d5(0x3c9)];_0x4e05f0++)_0x43303c[_0x4e05f0]=_0x38bc4a[_0x9189d5(0x2d0)](_0x4e05f0);return _0x43303c;}function at(_0x836934){const _0x1abc10=_0x193bc9;let _0x113bd8='';for(let _0xd9ed80=0x0;_0xd9ed80<_0x836934[_0x1abc10(0x3c9)];_0xd9ed80++)_0x113bd8+=String['fromCharCode'](_0x836934[_0xd9ed80]);return btoa(_0x113bd8);}function ot(_0x464b8d,_0xb518ca){const _0x32ca1d=_0x193bc9;let _0x113485=it(_0xb518ca),_0x44d70c=(0x0,f[_0x32ca1d(0x26b)])(0x10),_0xac1acb=(0x0,d[_0x32ca1d(0x16d)])(_0x113485,_0x44d70c)[_0x32ca1d(0x112)]((0x0,f[_0x32ca1d(0x10c)])(_0x464b8d));return at((0x0,f[_0x32ca1d(0x38f)])(_0x44d70c,_0xac1acb));}function st(){const _0x227b9c=_0x193bc9;let _0x2eeb57=(0x0,u[_0x227b9c(0x2cb)])()[_0x227b9c(0x1bf)];if(typeof window<'u'&&window[_0x227b9c(0x1a9)]!==void 0x0&&_0x2eeb57){let _0x2efaea={'time':Math[_0x227b9c(0x143)](Date[_0x227b9c(0x174)]()/0x3e8),'domain':location[_0x227b9c(0x1be)]};return ot(JSON[_0x227b9c(0x25e)](_0x2efaea),_0x2eeb57);}}let K=class{constructor(_0x1bee67){const _0x324672=_0x193bc9;this[_0x324672(0x332)]=_0x1bee67,this[_0x324672(0x279)]();}['_initRequestHeader'](){const _0xb0c5b3=_0x193bc9;this[_0xb0c5b3(0x332)]['registerHTTPInterceptor']({'interceptor':(_0x245335,_0x306cad)=>{const _0x3e84d3=_0xb0c5b3;let _0x8448d4=st();return _0x8448d4&&_0x245335[_0x3e84d3(0x2f2)]['set']('x-univer-host',_0x8448d4),_0x306cad(_0x245335);}});}};K=y([v(0x0,(0x0,t[_0x193bc9(0x394)])(l[_0x193bc9(0x14e)]))],K);let q=class extends t[_0x193bc9(0x108)]{constructor(_0x438a23,_0x10f49a,_0x38174d){const _0xfa8dc0=_0x193bc9;super(),this[_0xfa8dc0(0x131)]=_0x438a23,this[_0xfa8dc0(0x148)]=_0x10f49a,this[_0xfa8dc0(0x337)]=_0x38174d,g(this,_0xfa8dc0(0x369),new i[(_0xfa8dc0(0x1d2))](null)),g(this,_0xfa8dc0(0x1b8),new i[(_0xfa8dc0(0xa7))]()),g(this,_0xfa8dc0(0x14a),this[_0xfa8dc0(0x369)][_0xfa8dc0(0x2db)]()),g(this,_0xfa8dc0(0x115),this['_unitLoaded$'][_0xfa8dc0(0x2db)]());}[_0x193bc9(0x3d1)](){const _0x205850=_0x193bc9;super[_0x205850(0x3d1)](),this['_unitLoaded$']['complete'](),this[_0x205850(0x369)][_0x205850(0x1f3)]();}async[_0x193bc9(0x198)](_0x1f3ebd,_0xdc8b7d,_0x15cf8e,_0x436f56){const _0x21c527=_0x193bc9;this[_0x21c527(0x369)][_0x21c527(0x37d)]({'unitId':_0x1f3ebd,'type':_0xdc8b7d,'subUnitId':_0x436f56});let _0x147c01=null;switch(_0xdc8b7d){case t[_0x21c527(0xa8)][_0x21c527(0x1fb)]:_0x147c01=await this[_0x21c527(0x148)][_0x21c527(0x2f7)](_0x1f3ebd,_0x15cf8e,void 0x0,{'initialSubUnitId':_0x436f56});break;case t[_0x21c527(0xa8)][_0x21c527(0x281)]:_0x147c01=await this[_0x21c527(0x148)]['loadDoc'](_0x1f3ebd,_0x15cf8e);break;case t[_0x21c527(0xa8)][_0x21c527(0x2b7)]:_0x147c01=await this['_snapshotService'][_0x21c527(0x2e6)](_0x1f3ebd,_0x15cf8e);break;case t[_0x21c527(0xa8)]['UNIVER_BOARD']:_0x147c01=await this[_0x21c527(0x148)][_0x21c527(0x16c)](_0x1f3ebd,_0x15cf8e);break;case t[_0x21c527(0xa8)][_0x21c527(0x387)]:_0x147c01=await this['_snapshotService']['loadBase'](_0x1f3ebd,_0x15cf8e);break;case t[_0x21c527(0xa8)][_0x21c527(0x18d)]:_0x147c01=await this[_0x21c527(0x148)][_0x21c527(0x334)](_0x1f3ebd,_0x15cf8e);break;default:this['_logService'][_0x21c527(0x146)](_0x21c527(0x39a),_0x21c527(0xc8));}return _0x147c01&&this[_0x21c527(0x1b8)][_0x21c527(0x37d)](_0x147c01),_0x147c01;}async['loadUnit'](_0x7c6a25,_0x309163,_0x121e3a){const _0xcb3c8c=_0x193bc9;var _0x559eed;this[_0xcb3c8c(0x369)][_0xcb3c8c(0x37d)]({'unitId':_0x7c6a25,'type':_0x309163,'subUnitId':_0x121e3a});let _0x51d3cd=0x0,_0x28ee64=await((_0x559eed=this['_localCacheService'])==null?void 0x0:_0x559eed[_0xcb3c8c(0x382)](_0x7c6a25));return _0x28ee64&&(_0x28ee64['awaitingChangeset']||_0x28ee64['mutations'][_0xcb3c8c(0x3c9)]!==0x0)&&(_0x51d3cd=_0x28ee64[_0xcb3c8c(0x2f6)]),_0x51d3cd===0x0&&this['_logService'][_0xcb3c8c(0x30e)](_0xcb3c8c(0x39a),_0xcb3c8c(0x24f)),this[_0xcb3c8c(0x198)](_0x7c6a25,_0x309163,_0x51d3cd,_0x121e3a);}};q=y([v(0x0,t[_0x193bc9(0x185)]),v(0x1,(0x0,t['Inject'])(e[_0x193bc9(0x11c)])),v(0x2,(0x0,t[_0x193bc9(0x294)])(x))],q);let J=class{constructor(_0x209ae4,_0x6192a1,_0x558afc){const _0x5ceb5b=_0x193bc9;this[_0x5ceb5b(0x332)]=_0x209ae4,this[_0x5ceb5b(0x2e1)]=_0x6192a1,this[_0x5ceb5b(0xac)]=_0x558afc,g(this,_0x5ceb5b(0x39b),0x0),g(this,_0x5ceb5b(0xea),new i[(_0x5ceb5b(0xa7))]()),g(this,_0x5ceb5b(0x1f5),this['_change$']),g(this,_0x5ceb5b(0x2ca),new Map());}[_0x193bc9(0x3aa)](_0x2aab16){const _0x20de17=_0x193bc9;this['_waitCount']=_0x2aab16,this['_change$'][_0x20de17(0x37d)](_0x2aab16);}[_0x193bc9(0x322)](_0x29b903,_0x35f108){const _0x504170=_0x193bc9;if(_0x35f108===t[_0x504170(0x326)][_0x504170(0x397)]){let _0x58fe73=new Image();return _0x58fe73['src']=_0x29b903,_0x58fe73;}return this['_imageSourceCache'][_0x504170(0xa2)](_0x29b903);}[_0x193bc9(0x32f)](_0x73b968,_0x5e4245,_0x12f3d5){const _0x1202e1=_0x193bc9;_0x5e4245!==t[_0x1202e1(0x326)][_0x1202e1(0x397)]&&_0x12f3d5!=null&&this[_0x1202e1(0x2ca)][_0x1202e1(0x191)](_0x73b968,_0x12f3d5);}async[_0x193bc9(0xee)](_0x4a7c60){const _0x20a736=_0x193bc9;try{let _0x5ea7c0=this[_0x20a736(0x286)](this[_0x20a736(0x11a)](),''+_0x4a7c60),_0x555dfc=(await this['_httpService'][_0x20a736(0xa2)](_0x5ea7c0))[_0x20a736(0x328)];if(_0x555dfc[_0x20a736(0x146)]&&_0x555dfc['error'][_0x20a736(0x2f1)]===a['ErrorCode']['OK']){let _0x275424=(0x0,t[_0x20a736(0x283)])(_0x555dfc[_0x20a736(0xa3)],this['_getDownloadEndpointURL']());return Promise[_0x20a736(0x252)](_0x275424);}return Promise[_0x20a736(0x31a)](_0x555dfc['error']);}catch(_0x259c77){return Promise['reject'](_0x259c77);}}async[_0x193bc9(0x34c)](_0x3c9ca1){const _0x523dd0=_0x193bc9;let _0x4a5385='';if(!p['DRAWING_IMAGE_ALLOW_IMAGE_LIST'][_0x523dd0(0x30f)](_0x3c9ca1[_0x523dd0(0x213)]))return this[_0x523dd0(0x2ba)](),Promise[_0x523dd0(0x31a)](Error(t[_0x523dd0(0x1bd)][_0x523dd0(0x201)]));if(_0x3c9ca1[_0x523dd0(0x170)]>(0x0,p['getDrawingImageAllowSize'])())return this['_decreaseWaiting'](),Promise['reject'](Error(t[_0x523dd0(0x1bd)]['ERROR_EXCEED_SIZE']));try{let _0x34aa41=new FormData();_0x34aa41[_0x523dd0(0x120)]('file',_0x3c9ca1);let _0x3dc346=this['_univerInstanceService'][_0x523dd0(0x2b2)](),_0x16a2fd=_0x3dc346==null?void 0x0:_0x3dc346[_0x523dd0(0x1a7)]();if(!_0x16a2fd)throw Error('unitId\x20is\x20not\x20found');let _0x146153=this[_0x523dd0(0x19e)]()+_0x523dd0(0x36b)+_0x3c9ca1[_0x523dd0(0x170)][_0x523dd0(0x2d6)]()+_0x523dd0(0x138)+a[_0x523dd0(0x291)][_0x523dd0(0x15f)]+_0x523dd0(0x1b3)+encodeURIComponent(_0x16a2fd),_0x3089f2={'body':_0x34aa41},_0x1b1a33=(await this[_0x523dd0(0x332)][_0x523dd0(0xa4)](_0x146153,_0x3089f2))[_0x523dd0(0x328)];if(typeof _0x1b1a33[_0x523dd0(0xc3)]!=_0x523dd0(0x2fa))return this['_decreaseWaiting'](),Promise[_0x523dd0(0x31a)](Error(t[_0x523dd0(0x1bd)][_0x523dd0(0x21b)]));_0x4a5385=_0x1b1a33['FileId'];}catch{return this[_0x523dd0(0x2ba)](),Promise[_0x523dd0(0x31a)](Error(t[_0x523dd0(0x1bd)][_0x523dd0(0x21b)]));}return new Promise((_0x5464ae,_0x376bf6)=>{const _0x7534a9=_0x523dd0;let _0x1ce999=new FileReader();_0x1ce999[_0x7534a9(0x37f)](_0x3c9ca1),_0x1ce999[_0x7534a9(0x209)]=_0x17e8ad=>{const _0x1d5018=_0x7534a9;var _0x3ee7c0;let _0x351a6d=(_0x3ee7c0=_0x17e8ad[_0x1d5018(0x171)])==null?void 0x0:_0x3ee7c0['result'];if(_0x351a6d==null){this[_0x1d5018(0x2ba)](),_0x376bf6(Error(t[_0x1d5018(0x1bd)][_0x1d5018(0x21b)]));return;}_0x5464ae({'imageId':(0x0,t['generateRandomId'])(0x6),'imageSourceType':t[_0x1d5018(0x326)][_0x1d5018(0xf7)],'source':_0x4a5385,'base64Cache':_0x351a6d,'status':t[_0x1d5018(0x1bd)][_0x1d5018(0x2fb)]}),this[_0x1d5018(0x2ba)]();};});}[_0x193bc9(0x19e)](){const _0x418146=_0x193bc9;let _0xb3cd1e=this['_configService'][_0x418146(0x372)](m);return(_0xb3cd1e==null?void 0x0:_0xb3cd1e[_0x418146(0x2af)])??_0x418146(0x325);}[_0x193bc9(0x11a)](){const _0x34f0fe=_0x193bc9;let _0x2a154a=this[_0x34f0fe(0x2e1)][_0x34f0fe(0x372)](m);return(_0x2a154a==null?void 0x0:_0x2a154a[_0x34f0fe(0xd2)])??_0x34f0fe(0x377);}[_0x193bc9(0x1d6)](){const _0x474f6f=_0x193bc9;let _0x50faf0=this['_configService']['getConfig'](m);return(_0x50faf0==null?void 0x0:_0x50faf0[_0x474f6f(0x212)])??location[_0x474f6f(0xbb)];}['_replaceFileID'](_0x50b013,_0x3e2bd6){const _0x455a09=_0x193bc9;return _0x50b013['replace'](_0x455a09(0xf3),_0x3e2bd6);}['_decreaseWaiting'](){const _0xcaf953=_0x193bc9;--this['_waitCount'],this[_0xcaf953(0xea)][_0xcaf953(0x37d)](this[_0xcaf953(0x39b)]);}};J=y([v(0x0,(0x0,t[_0x193bc9(0x394)])(l[_0x193bc9(0x14e)])),v(0x1,t[_0x193bc9(0x1ee)]),v(0x2,(0x0,t['Inject'])(t[_0x193bc9(0xfe)]))],J);let Y=class{constructor(_0x31a8b4,_0x51235a){this['_configService']=_0x31a8b4,this['_HTTPService']=_0x51235a;}[_0x193bc9(0x2e2)](){const _0x31415a=_0x193bc9;let _0x25f555=this[_0x31415a(0x2e1)][_0x31415a(0x372)](m);return(_0x25f555==null?void 0x0:_0x25f555[_0x31415a(0x39d)])??_0x31415a(0x280);}async[_0x193bc9(0x3d6)](_0x176eaa){const _0xf5dbac=_0x193bc9;let _0xee9465=this[_0xf5dbac(0x2e2)]()+'/collaborator';return{'list':[{'title':_0xf5dbac(0x3b1),'mentions':(await this[_0xf5dbac(0x2ce)][_0xf5dbac(0xa2)](_0xee9465,{'params':{'objectID':_0x176eaa[_0xf5dbac(0xb0)],'unitID':_0x176eaa[_0xf5dbac(0xb0)]}}))[_0xf5dbac(0x328)][_0xf5dbac(0x1fe)][_0xf5dbac(0x1f4)](_0x262111=>({'objectId':_0x262111['id'],'name':_0x262111['subject'][_0xf5dbac(0x38c)],'metadata':{'icon':_0x262111['subject'][_0xf5dbac(0x11b)]},'label':_0x262111[_0xf5dbac(0x333)][_0xf5dbac(0x38c)],'objectType':t[_0xf5dbac(0x15c)]['PERSON']})),'metadata':{},'type':t['MentionType'][_0xf5dbac(0x264)]}]};}};Y=y([v(0x0,(0x0,t[_0x193bc9(0x394)])(t[_0x193bc9(0x1ee)])),v(0x1,(0x0,t[_0x193bc9(0x394)])(l[_0x193bc9(0x14e)]))],Y);let X=class extends t[_0x193bc9(0x108)]{constructor(_0x546f15,_0x57a237,_0x5df766,_0x4d3e66,_0x29d745,_0x345a76){const _0xa8015d=_0x193bc9;super(),this[_0xa8015d(0x254)]=_0x546f15,this[_0xa8015d(0xac)]=_0x57a237,this[_0xa8015d(0x1d3)]=_0x5df766,this['_authzIoService']=_0x4d3e66,this['_collaborationSessionService']=_0x29d745,this[_0xa8015d(0x2a9)]=_0x345a76,g(this,_0xa8015d(0x14c),new Set()),this[_0xa8015d(0x240)](()=>this['_closedUnits'][_0xa8015d(0xc4)]()),this[_0xa8015d(0x240)](ct(this[_0xa8015d(0xac)])[_0xa8015d(0x1d4)](({unitId:_0x358638})=>this[_0xa8015d(0x14c)][_0xa8015d(0x1f2)](_0x358638))),this['_initUnitPermissionChange'](),this[_0xa8015d(0x338)](),[t[_0xa8015d(0xa8)][_0xa8015d(0x281)],t[_0xa8015d(0xa8)]['UNIVER_SLIDE'],t[_0xa8015d(0xa8)][_0xa8015d(0x387)],t[_0xa8015d(0xa8)]['UNIVER_BOARD']][_0xa8015d(0x2ea)](_0x5192d6=>{const _0x163046=_0xa8015d;this[_0x163046(0x240)](this[_0x163046(0xac)]['getTypeOfUnitDisposed$'](_0x5192d6)['subscribe'](_0x216200=>{const _0x462464=_0x163046;this[_0x462464(0x14c)]['add'](_0x216200[_0x462464(0x1a7)]()),this['_injector'][_0x462464(0xa2)](t[_0x462464(0x2e0)])[_0x462464(0x122)](_0x216200['getUnitId']());}));});}[_0x193bc9(0x338)](){const _0x46c3f4=_0x193bc9;let _0x8efe09=async(_0x97ed14,_0xefcc55)=>{const _0x1390f1=_0x5d42;let _0x2147fa=await this[_0x1390f1(0x20e)][_0x1390f1(0x3b4)](_0x97ed14);this[_0x1390f1(0x15b)]||this[_0x1390f1(0x14c)]['has'](_0x97ed14)||!this[_0x1390f1(0xac)]['getUnit'](_0x97ed14)||_0x2147fa[_0x1390f1(0xe0)][_0x1390f1(0x3da)]((0x0,s[_0x1390f1(0x2f8)])(_0x249b08=>_0x249b08[_0x1390f1(0x1fa)]===e[_0x1390f1(0x3cc)][_0x1390f1(0x38d)]),(0x0,s['takeUntil'])((0x0,i[_0x1390f1(0x27f)])(this[_0x1390f1(0x2c8)],this[_0x1390f1(0xac)]['unitDisposed$'][_0x1390f1(0x3da)]((0x0,s[_0x1390f1(0x2f8)])(_0x46765c=>_0x46765c[_0x1390f1(0x1a7)]()===_0x97ed14)))))[_0x1390f1(0x1d4)](_0x1ce9b5=>{const _0x40072a=_0x1390f1;let {reason:_0x4e0efd}=_0x1ce9b5[_0x40072a(0x2ef)];this[_0x40072a(0x2a9)][_0x40072a(0x169)]({'id':_0x40072a(0xa6),'data':_0x4e0efd}),this['_closedUnits'][_0x40072a(0x25c)](_0x97ed14),this['_injector'][_0x40072a(0xa2)](t[_0x40072a(0x2e0)])[_0x40072a(0x122)](_0x97ed14);let _0x5d64ef=lt(_0xefcc55);_0x5d64ef!=null&&this[_0x40072a(0x284)](_0x97ed14,_0x5d64ef,a['UnitAction']['Edit'],!0x1),this[_0x40072a(0x20e)][_0x40072a(0x113)](_0x97ed14);});};ct(this[_0x46c3f4(0xac)])['pipe']((0x0,s[_0x46c3f4(0x2f8)])(({unitId:_0x3fe19c})=>!(0x0,t[_0x46c3f4(0x305)])(_0x3fe19c)),(0x0,s[_0x46c3f4(0x21c)])(this[_0x46c3f4(0x2c8)]))[_0x46c3f4(0x1d4)](({type:_0x8d4e05,unitId:_0x323a68})=>{const _0x2e9d8b=_0x46c3f4;_0x8efe09(_0x323a68,_0x8d4e05)['catch'](_0x24d4a5=>this[_0x2e9d8b(0x254)][_0x2e9d8b(0xa2)](t[_0x2e9d8b(0x185)])[_0x2e9d8b(0x146)](_0x24d4a5));});}[_0x193bc9(0xaa)](){const _0x41cdfa=_0x193bc9;let _0x136f7d=async(_0x40bb42,_0x454609)=>{const _0x3f0990=_0x5d42;let _0x51a4d0=await this[_0x3f0990(0x20e)][_0x3f0990(0x3b4)](_0x40bb42);if(!(this[_0x3f0990(0x15b)]||this[_0x3f0990(0x14c)][_0x3f0990(0x3c8)](_0x40bb42)||!this['_univerInstanceService']['getUnit'](_0x40bb42))){if(_0x454609===t[_0x3f0990(0xa8)][_0x3f0990(0x1fb)]){let _0x4af9a8=this['_injector'][_0x3f0990(0xa2)](r[_0x3f0990(0x234)]);await _0x4af9a8[_0x3f0990(0x2c0)](_0x40bb42),_0x51a4d0[_0x3f0990(0xe0)][_0x3f0990(0x3da)]((0x0,s[_0x3f0990(0x2f8)])(_0xc3e347=>_0xc3e347[_0x3f0990(0x1fa)]===e[_0x3f0990(0x3cc)]['UPDATE_PERMISSION_OBJ']),(0x0,s['takeUntil'])((0x0,i[_0x3f0990(0x27f)])(this[_0x3f0990(0x2c8)],_0x51a4d0[_0x3f0990(0xe0)][_0x3f0990(0x3da)]((0x0,s[_0x3f0990(0x2f8)])(_0x8268d5=>_0x8268d5[_0x3f0990(0x1fa)]===e[_0x3f0990(0x3cc)][_0x3f0990(0x38d)])),this[_0x3f0990(0xac)][_0x3f0990(0xb6)][_0x3f0990(0x3da)]((0x0,s['filter'])(_0x154625=>_0x154625[_0x3f0990(0x1a7)]()===_0x40bb42)))))[_0x3f0990(0x1d4)](_0x1d5464=>{const _0x1f7230=_0x3f0990;let {objectId:_0x417179}=_0x1d5464[_0x1f7230(0x2ef)];_0x417179===_0x40bb42?_0x4af9a8[_0x1f7230(0x2c0)](_0x40bb42):_0x4af9a8['refreshPermission'](_0x40bb42,_0x417179);});return;}_0x51a4d0[_0x3f0990(0xe0)][_0x3f0990(0x3da)]((0x0,s[_0x3f0990(0x2f8)])(_0x16d99d=>_0x16d99d[_0x3f0990(0x1fa)]===e[_0x3f0990(0x3cc)][_0x3f0990(0x11e)]),(0x0,s[_0x3f0990(0x21c)])((0x0,i[_0x3f0990(0x27f)])(this['dispose$'],_0x51a4d0[_0x3f0990(0xe0)][_0x3f0990(0x3da)]((0x0,s[_0x3f0990(0x2f8)])(_0x558676=>_0x558676[_0x3f0990(0x1fa)]===e[_0x3f0990(0x3cc)]['SHOULD_CLOSE_CONN'])),this[_0x3f0990(0xac)]['unitDisposed$'][_0x3f0990(0x3da)]((0x0,s['filter'])(_0x4f7b29=>_0x4f7b29[_0x3f0990(0x1a7)]()===_0x40bb42)))))[_0x3f0990(0x1d4)](()=>{const _0x591a30=_0x3f0990;this[_0x591a30(0xf8)](_0x40bb42,_0x454609)['catch'](_0x1cd22a=>this[_0x591a30(0x254)][_0x591a30(0xa2)](t[_0x591a30(0x185)])['error'](_0x1cd22a));}),await this['_refreshUnitPermission'](_0x40bb42,_0x454609);}};ct(this[_0x41cdfa(0xac)])['pipe']((0x0,s[_0x41cdfa(0x2f8)])(({unitId:_0x514724})=>!(0x0,t[_0x41cdfa(0x305)])(_0x514724)),(0x0,s['takeUntil'])(this['dispose$']))[_0x41cdfa(0x1d4)](({type:_0x2fe6d4,unitId:_0x1629d6})=>{const _0x99db92=_0x41cdfa;_0x136f7d(_0x1629d6,_0x2fe6d4)[_0x99db92(0xf0)](_0x530207=>this[_0x99db92(0x254)]['get'](t[_0x99db92(0x185)])[_0x99db92(0x146)](_0x530207));});}async['_refreshUnitPermission'](_0x5effce,_0x384c98){const _0x3ca3ca=_0x193bc9;let _0x439692=lt(_0x384c98);if(_0x439692==null)return;let _0x4b5404=this['_injector'][_0x3ca3ca(0xa2)](t['ObjectPermissionService']);if(_0x4b5404[_0x3ca3ca(0x28f)]({'unitId':_0x5effce,'objectId':_0x5effce,'objectType':_0x439692})){await _0x4b5404['refreshUnit'](_0x5effce);return;}let _0x4f7feb=this['_getUnitPermissionPoints'](_0x5effce,_0x439692);if(!_0x4f7feb[_0x3ca3ca(0x3c9)])return;let _0x3994f9=await this[_0x3ca3ca(0x124)][_0x3ca3ca(0x19c)]({'objectID':_0x5effce,'objectType':_0x439692,'unitID':_0x5effce,'actions':_0x4f7feb[_0x3ca3ca(0x1f4)](({action:_0x35f24d})=>_0x35f24d)});this[_0x3ca3ca(0x15b)]||this[_0x3ca3ca(0x14c)][_0x3ca3ca(0x3c8)](_0x5effce)||!this['_univerInstanceService'][_0x3ca3ca(0xe8)](_0x5effce)||_0x3994f9[_0x3ca3ca(0x2ea)](_0x162878=>{const _0x3b40d2=_0x3ca3ca;let _0x446ffc=_0x162878['action'],_0x4cdcd8=_0x162878['allowed'];_0x446ffc!=null&&_0x4cdcd8!=null&&_0x4f7feb['filter'](_0x5049b5=>_0x5049b5[_0x3b40d2(0x117)]===_0x446ffc)[_0x3b40d2(0x2ea)](_0x4c86ff=>this[_0x3b40d2(0x1d3)][_0x3b40d2(0x36a)](_0x4c86ff['id'],_0x4cdcd8));});}['_getUnitPermissionPoints'](_0x15c1d0,_0x4e1c92){const _0x450127=_0x193bc9;let _0x6cff0b=[];return this['_permissionService'][_0x450127(0x358)]()['forEach']((_0x2c9fdf,_0x4962db)=>{const _0x3a4f7b=_0x450127;_0x2c9fdf[_0x3a4f7b(0x1d4)](_0xbb0ab9=>{const _0x1d7e25=_0x3a4f7b;_0xbb0ab9['type']===_0x4e1c92&&_0x1d7e25(0xb0)in _0xbb0ab9&&_0xbb0ab9[_0x1d7e25(0xb0)]===_0x15c1d0&&(!(_0x1d7e25(0x202)in _0xbb0ab9)||_0xbb0ab9['objectId']===_0x15c1d0)&&_0x6cff0b[_0x1d7e25(0x12d)]({'id':_0x4962db,'action':_0xbb0ab9[_0x1d7e25(0x3a4)]});})[_0x3a4f7b(0x237)]();}),_0x6cff0b;}[_0x193bc9(0x284)](_0x33b2d4,_0x45e74b,_0x408a03,_0x4356e4){const _0x466184=_0x193bc9;this[_0x466184(0x1d3)]['getAllPermissionPoint']()[_0x466184(0x2ea)]((_0x4364ec,_0x325010)=>{const _0xdfbdc9=_0x466184;let _0x28d511=!0x1;_0x4364ec[_0xdfbdc9(0x1d4)](_0x15c826=>{const _0x34c8b1=_0xdfbdc9;_0x28d511=_0x15c826[_0x34c8b1(0x213)]===_0x45e74b&&_0x15c826[_0x34c8b1(0x3a4)]===_0x408a03&&_0x34c8b1(0xb0)in _0x15c826&&_0x15c826['unitId']===_0x33b2d4&&(!(_0x34c8b1(0x202)in _0x15c826)||_0x15c826[_0x34c8b1(0x202)]===_0x33b2d4);})[_0xdfbdc9(0x237)](),_0x28d511&&this[_0xdfbdc9(0x1d3)]['updatePermissionPoint'](_0x325010,_0x4356e4);});}};X=y([v(0x0,(0x0,t[_0x193bc9(0x394)])(t[_0x193bc9(0xb4)])),v(0x1,t['IUniverInstanceService']),v(0x2,t[_0x193bc9(0x3bc)]),v(0x3,t[_0x193bc9(0x163)]),v(0x4,(0x0,t[_0x193bc9(0x394)])(V)),v(0x5,(0x0,t[_0x193bc9(0x394)])(_))],X);function ct(_0x5200e1){const _0x4ae65f=_0x193bc9;return(0x0,i['merge'])(...[t[_0x4ae65f(0xa8)]['UNIVER_SHEET'],t[_0x4ae65f(0xa8)]['UNIVER_DOC'],t[_0x4ae65f(0xa8)][_0x4ae65f(0x2b7)],t['UniverInstanceType']['UNIVER_BOARD'],t[_0x4ae65f(0xa8)][_0x4ae65f(0x387)]][_0x4ae65f(0x1f4)](_0x5f375a=>_0x5200e1[_0x4ae65f(0x2eb)](_0x5f375a)['pipe']((0x0,s['map'])(_0x518e3c=>({'type':_0x5f375a,'unitId':_0x518e3c[_0x4ae65f(0x23c)][_0x4ae65f(0x1a7)]()})))));}function lt(_0x1294b0){const _0xa1dbf8=_0x193bc9;switch(_0x1294b0){case t[_0xa1dbf8(0xa8)][_0xa1dbf8(0x1fb)]:return a[_0xa1dbf8(0x36e)][_0xa1dbf8(0x260)];case t[_0xa1dbf8(0xa8)][_0xa1dbf8(0x281)]:return a[_0xa1dbf8(0x36e)][_0xa1dbf8(0x25f)];case t['UniverInstanceType']['UNIVER_SLIDE']:return a['UnitObject'][_0xa1dbf8(0x1dd)];case t[_0xa1dbf8(0xa8)]['UNIVER_BOARD']:return a[_0xa1dbf8(0x36e)][_0xa1dbf8(0x1f7)];case t[_0xa1dbf8(0xa8)][_0xa1dbf8(0x387)]:return a[_0xa1dbf8(0x36e)][_0xa1dbf8(0xa9)];default:return;}}let Z=class{constructor(_0xf6f588,_0x25d486){const _0x2f1b0c=_0x193bc9;this['_configService']=_0xf6f588,this[_0x2f1b0c(0x332)]=_0x25d486;}async[_0x193bc9(0x3a3)](_0xcc5c1,_0x5258b1){const _0x4d199b=_0x193bc9;var _0x1c5b6f;let {unitID:_0xce51b6,type:_0x44d47,revision:_0x42ed1e=0x0}=_0x5258b1,_0x112ba6=this[_0x4d199b(0x123)]()+'/'+_0x44d47+'/unit/'+_0xce51b6+_0x4d199b(0x38a)+_0x42ed1e,_0x277c92=(await this['_httpService'][_0x4d199b(0xa2)](_0x112ba6))[_0x4d199b(0x328)],_0x2ad197=(_0x1c5b6f=_0x277c92[_0x4d199b(0x368)])==null?void 0x0:_0x1c5b6f[_0x4d199b(0x32b)];if(_0x2ad197){let _0x159367=_0x2ad197==null?void 0x0:_0x2ad197[_0x4d199b(0xfa)];_0x2ad197[_0x4d199b(0xfa)]=e[_0x4d199b(0x258)][_0x4d199b(0x2c1)]((0x0,e[_0x4d199b(0x144)])(_0x159367)),Object['entries'](_0x2ad197[_0x4d199b(0x1cd)])[_0x4d199b(0x2ea)](([,_0x437411])=>{const _0x42beb7=_0x4d199b;let _0x2c51ad=_0x437411[_0x42beb7(0xfa)];_0x437411['originalMeta']=e['textEncoder']['encode']((0x0,e['b64DecodeUnicode'])(_0x2c51ad));});}return _0x277c92;}async[_0x193bc9(0x19f)](_0x8080b2,_0x36b924){const _0x3b1466=_0x193bc9;let {unitID:_0x2434d1,type:_0x38fa0a,blockID:_0xda1ac6}=_0x36b924,_0x1b7f17=this[_0x3b1466(0xcc)]()+'/'+_0x38fa0a+_0x3b1466(0xb1)+_0x2434d1+'/block/'+_0xda1ac6;return(await this['_httpService']['get'](_0x1b7f17))[_0x3b1466(0x328)];}async[_0x193bc9(0x3c5)](_0x5745f2,_0x2c8fbd){const _0x1b366d=_0x193bc9;let {unitID:_0x1a8e6b,type:_0x241a36,blockID:_0x1f3ed4}=_0x2c8fbd,_0x151424=this['_getAPIPrefix']()+_0x1b366d(0xc0)+_0x241a36+_0x1b366d(0xb1)+_0x1a8e6b+_0x1b366d(0xc0)+_0x1f3ed4;return(await this[_0x1b366d(0x332)][_0x1b366d(0xa2)](_0x151424))[_0x1b366d(0x328)];}async[_0x193bc9(0x141)](_0x321d34,_0x5a9a75){const _0x3ff524=_0x193bc9;let {unitID:_0x442b2e,type:_0x3eb872,from:_0x167b58,to:_0x45fe4a}=_0x5a9a75,_0x476418=this[_0x3ff524(0xcc)]()+'/'+_0x3eb872+_0x3ff524(0xb1)+_0x442b2e+_0x3ff524(0x231)+_0x167b58+_0x3ff524(0x26f)+_0x45fe4a;return(await this[_0x3ff524(0x332)][_0x3ff524(0xa2)](_0x476418))[_0x3ff524(0x328)];}[_0x193bc9(0x123)](){const _0x17ad74=_0x193bc9;return this[_0x17ad74(0x2e1)][_0x17ad74(0x372)]('SNAPSHOT_URL_KEY')??this[_0x17ad74(0xcc)]();}[_0x193bc9(0xcc)](){const _0x45f938=_0x193bc9;let _0x167596=this[_0x45f938(0x2e1)]['getConfig'](m);return(_0x167596==null?void 0x0:_0x167596[_0x45f938(0x3a8)])??'/universer-api/snapshot';}async[_0x193bc9(0x142)](_0x4571e9,_0x1fcc0b){const _0x2150c2=_0x193bc9;let _0x5a4766=_0x2150c2(0x3ac)+_0x1fcc0b[_0x2150c2(0x213)]+_0x2150c2(0xb1)+_0x1fcc0b['unitID']+'/resources';return(await this[_0x2150c2(0x332)][_0x2150c2(0xa2)](_0x5a4766,{'params':{'resourceId':JSON[_0x2150c2(0x25e)](_0x1fcc0b[_0x2150c2(0x34f)])}}))['body'];}[_0x193bc9(0x381)](){const _0x1dc0a8=_0x193bc9;throw Error(_0x1dc0a8(0x28c));}[_0x193bc9(0x12a)](){const _0x1c53be=_0x193bc9;throw Error(_0x1c53be(0x28c));}[_0x193bc9(0x229)](){const _0x52ac84=_0x193bc9;throw Error(_0x52ac84(0x28c));}['saveChangeset'](){const _0x128f57=_0x193bc9;throw Error(_0x128f57(0x28c));}['copyFileMeta'](){throw Error('This\x20method\x20should\x20not\x20be\x20called\x20on\x20the\x20client\x20side!');}[_0x193bc9(0x16a)](){const _0x50d4a7=_0x193bc9;throw Error(_0x50d4a7(0x28c));}};Z=y([v(0x0,t[_0x193bc9(0x1ee)]),v(0x1,(0x0,t[_0x193bc9(0x394)])(l['HTTPService']))],Z);let Q=class extends t[_0x193bc9(0x3a1)]{constructor(_0x47c849,_0x3941f1,_0x308586,_0x58e9c0,_0x368669,_0x26eb8e){const _0x49ce7c=_0x193bc9;super(_0x47c849,_0x3941f1,_0x308586,_0x58e9c0),this[_0x49ce7c(0x33e)]=_0x368669,this[_0x49ce7c(0x131)]=_0x26eb8e;}[_0x193bc9(0x2c3)](_0x1121ea,_0x59032d){const _0x38a785=_0x193bc9;let _0x3a5858=this[_0x38a785(0x10e)](_0x1121ea);if(_0x3a5858)try{let _0x48ff15=this['_transformStack'](_0x3a5858,_0x59032d);this[_0x38a785(0x301)](_0x1121ea,_0x48ff15);}catch(_0x53f96b){this[_0x38a785(0x131)][_0x38a785(0x146)](_0x38a785(0x2e9),_0x53f96b),this['_clearUndo'](_0x1121ea);}let _0x1ac339=this[_0x38a785(0x2a1)](_0x1121ea);if(_0x1ac339)try{let _0x4d9cab=this[_0x38a785(0x2b3)](_0x1ac339,_0x59032d);this[_0x38a785(0x315)](_0x1121ea,_0x4d9cab);}catch(_0x47ce0b){this[_0x38a785(0x131)][_0x38a785(0x146)](_0x47ce0b),this['_clearRedo'](_0x1121ea);}}['_clearUndo'](_0xb4cd1d){const _0x1ba1c1=_0x193bc9;let _0x27e7a7=this[_0x1ba1c1(0x10e)](_0xb4cd1d);_0x27e7a7&&(_0x27e7a7['length']=0x0,this['_updateStatus']());}[_0x193bc9(0x16f)](_0x34c3ab){const _0x383773=_0x193bc9;let _0xd30e2b=this[_0x383773(0x2a1)](_0x34c3ab);_0xd30e2b&&(_0xd30e2b['length']=0x0,this['_updateStatus']());}[_0x193bc9(0x301)](_0x48035c,_0x1bb846){const _0x2da2cd=_0x193bc9;this[_0x2da2cd(0x2cd)]['set'](_0x48035c,_0x1bb846),this[_0x2da2cd(0xe1)]();}[_0x193bc9(0x315)](_0x236fed,_0x43179f){const _0x25c961=_0x193bc9;this[_0x25c961(0x2ac)][_0x25c961(0x191)](_0x236fed,_0x43179f),this[_0x25c961(0xe1)]();}[_0x193bc9(0x2b3)](_0x29021e,_0x2a457d){const _0x1c07ee=_0x193bc9;let _0x588115=[],_0x4ff306=_0x2a457d,_0x5c486e=_0x2a457d;for(let _0x4f8dc7=_0x29021e[_0x1c07ee(0x3c9)]-0x1;_0x4f8dc7>=0x0;_0x4f8dc7--){let {unitID:_0x211f21,undoMutations:_0x2e65d1,redoMutations:_0x513cd7}=_0x29021e[_0x4f8dc7],_0x3b4b6f=this['_transformService'][_0x1c07ee(0x3bd)](_0x4ff306,_0x2e65d1),_0x46bd79=this[_0x1c07ee(0x33e)][_0x1c07ee(0x3bd)](_0x5c486e,_0x513cd7);if((0x0,e['isTransformMutationsWithChangesetFailure'])(_0x3b4b6f)||(0x0,e[_0x1c07ee(0x298)])(_0x46bd79)){this[_0x1c07ee(0x131)][_0x1c07ee(0x146)]('[CollaborationUndoRedoService]',_0x1c07ee(0x34e),_0x3b4b6f,_0x46bd79);break;}_0x4ff306=_0x3b4b6f['c1Prime'],_0x5c486e=_0x46bd79[_0x1c07ee(0x11d)],_0x588115[_0x1c07ee(0x12d)]({'unitID':_0x211f21,'undoMutations':_0x3b4b6f[_0x1c07ee(0x2ec)],'redoMutations':_0x46bd79[_0x1c07ee(0x2ec)]});}return _0x588115['reverse']();}};Q=y([v(0x0,t[_0x193bc9(0xfe)]),v(0x1,t['ICommandService']),v(0x2,t['IContextService']),v(0x3,t[_0x193bc9(0x1ee)]),v(0x4,e[_0x193bc9(0x31f)]),v(0x5,t['ILogService'])],Q);let $=class extends t[_0x193bc9(0x18a)]{constructor(_0x17a590=ee,_0x4d775f,_0x278877,_0x169df2){const _0x2887e1=_0x193bc9;super(),this[_0x2887e1(0x39f)]=_0x17a590,this['_logService']=_0x4d775f,this[_0x2887e1(0x254)]=_0x278877,this[_0x2887e1(0x2e1)]=_0x169df2;let {..._0x2ac9bf}=(0x0,t['merge'])({},ee,this[_0x2887e1(0x39f)]);if(!_0x2ac9bf[_0x2887e1(0x3cb)])throw Error(_0x2887e1(0x39e));this[_0x2887e1(0x39f)]=_0x2ac9bf,this[_0x2887e1(0x2e1)][_0x2887e1(0x1a8)](m,_0x2ac9bf);}[_0x193bc9(0x1dc)](){const _0x4441a6=_0x193bc9;this['_configService'][_0x4441a6(0x1a8)](t[_0x4441a6(0x256)],this['_config'][_0x4441a6(0x3b7)]??[]),this['_registerDependencies'](),this[_0x4441a6(0xc1)]();}['_registerDependencies'](){const _0x8b66a0=_0x193bc9;var _0x63e3dc,_0x5e1d12;this[_0x8b66a0(0x254)][_0x8b66a0(0x3c8)](t[_0x8b66a0(0x3dc)])&&this[_0x8b66a0(0x131)]['error']('[UniverCollaborationClientPlugin]',_0x8b66a0(0x1c4));let _0xe8f129=(0x0,t[_0x8b66a0(0x311)])([[t[_0x8b66a0(0x3dc)],{'useClass':Q}],[Xe,{'useValue':Ze()}],[V],[b],[S],[W],[K],[ae],[X],[_],[q],[qe,{'useClass':this['_config'][_0x8b66a0(0x3cb)]}],[e[_0x8b66a0(0x269)],{'useClass':Z}],[t[_0x8b66a0(0x163)],{'useClass':G}],[t['IImageIoService'],{'useClass':J}],[nt,{'useClass':U}],[t[_0x8b66a0(0x223)],{'useClass':Y}],[H],[tt]],(_0x63e3dc=this['_config'])==null?void 0x0:_0x63e3dc[_0x8b66a0(0x189)]);if(!((_0x5e1d12=this['_config'])!=null&&_0x5e1d12['enableSingleActiveInstanceLock'])){let _0x101b21=_0xe8f129[_0x8b66a0(0x219)](([_0x5c8884])=>_0x5c8884===C);_0x101b21!==-0x1&&_0xe8f129[_0x8b66a0(0x2c7)](_0x101b21,0x1);}(0x0,t[_0x8b66a0(0x1de)])(this['_injector'],_0xe8f129);}[_0x193bc9(0xc1)](){const _0x3f9edb=_0x193bc9;var _0x505ddd,_0x1b471a;if(this['_injector'][_0x3f9edb(0xa2)](l[_0x3f9edb(0x14e)])[_0x3f9edb(0x35c)]({'priority':0x14,'interceptor':(0x0,l[_0x3f9edb(0xb9)])({'maxParallel':0x6})}),!((_0x505ddd=this[_0x3f9edb(0x39f)])!=null&&_0x505ddd[_0x3f9edb(0x354)])){var _0x1dd419;(_0x1dd419=this['_injector'][_0x3f9edb(0xa2)](x,t[_0x3f9edb(0x356)][_0x3f9edb(0x266)]))==null||_0x1dd419[_0x3f9edb(0x10a)]();}(_0x1b471a=this['_config'])!=null&&_0x1b471a[_0x3f9edb(0xb7)]&&(0x0,t[_0x3f9edb(0x17a)])(this[_0x3f9edb(0x254)],[[W]]),(0x0,t['touchDependencies'])(this[_0x3f9edb(0x254)],[[K],[H],[X]]);}};g($,_0x193bc9(0x370),_0x193bc9(0xd0)),g($,_0x193bc9(0x253),$e),g($,_0x193bc9(0x16b),et),$=y([(0x0,t[_0x193bc9(0x2b1)])(u[_0x193bc9(0x180)],l[_0x193bc9(0x376)],e[_0x193bc9(0x31e)]),v(0x1,t[_0x193bc9(0x185)]),v(0x2,(0x0,t[_0x193bc9(0x394)])(t[_0x193bc9(0xb4)])),v(0x3,t['IConfigService'])],$),Object[_0x193bc9(0x2d7)](exports,'AuthzIoHttpService',{'enumerable':!0x0,'get':function(){return G;}}),Object['defineProperty'](exports,_0x193bc9(0x162),{'enumerable':!0x0,'get':function(){return k;}}),Object[_0x193bc9(0x2d7)](exports,'AwaitingWithPendingState',{'enumerable':!0x0,'get':function(){return A;}}),Object[_0x193bc9(0x2d7)](exports,_0x193bc9(0x1f9),{'enumerable':!0x0,'get':function(){return I;}}),Object[_0x193bc9(0x2d7)](exports,_0x193bc9(0x2bc),{'enumerable':!0x0,'get':function(){return z;}}),exports['COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY']=m,Object[_0x193bc9(0x2d7)](exports,_0x193bc9(0xca),{'enumerable':!0x0,'get':function(){return U;}}),Object['defineProperty'](exports,'CollaborationController',{'enumerable':!0x0,'get':function(){return H;}}),Object[_0x193bc9(0x2d7)](exports,'CollaborationEntity',{'enumerable':!0x0,'get':function(){return P;}}),Object['defineProperty'](exports,_0x193bc9(0x1a2),{'enumerable':!0x0,'get':function(){return J;}}),Object[_0x193bc9(0x2d7)](exports,_0x193bc9(0x29d),{'enumerable':!0x0,'get':function(){return ve;}}),Object[_0x193bc9(0x2d7)](exports,_0x193bc9(0x1c1),{'enumerable':!0x0,'get':function(){return V;}}),Object[_0x193bc9(0x2d7)](exports,_0x193bc9(0x167),{'enumerable':!0x0,'get':function(){return Ye;}}),exports[_0x193bc9(0x10f)]=Be,exports['CollaborationUIEventId']=ie,exports[_0x193bc9(0x13a)]=_,Object[_0x193bc9(0x2d7)](exports,_0x193bc9(0x3d3),{'enumerable':!0x0,'get':function(){return Q;}}),exports[_0x193bc9(0x3a5)]=ae,Object[_0x193bc9(0x2d7)](exports,'ConflictState',{'enumerable':!0x0,'get':function(){return j;}}),exports[_0x193bc9(0x2d4)]=_0x193bc9(0xd7),exports[_0x193bc9(0x364)]=_0x193bc9(0x398),exports[_0x193bc9(0x187)]=_0x193bc9(0x3d5),Object[_0x193bc9(0x2d7)](exports,_0x193bc9(0x287),{'enumerable':!0x0,'get':function(){return q;}}),Object[_0x193bc9(0x2d7)](exports,_0x193bc9(0x134),{'enumerable':!0x0,'get':function(){return F;}}),Object[_0x193bc9(0x2d7)](exports,'FetchingMissState',{'enumerable':!0x0,'get':function(){return N;}}),exports['HEARTBEAT_INTERVAL_KEY']=_0x193bc9(0x297),exports[_0x193bc9(0x277)]='HEARTBEAT_TIMEOUT',exports['IAttachmentIoService']=nt,exports[_0x193bc9(0xc7)]=Xe,exports[_0x193bc9(0x384)]=qe,exports[_0x193bc9(0x243)]=x,exports[_0x193bc9(0x1af)]=We,exports['ISingleActiveUnitService']=C,exports['LOCAL_CACHE_INTERVAL']=0x3e8,exports['LOCAL_CACHE_INTERVAL_KEY']=_0x193bc9(0xde),Object['defineProperty'](exports,_0x193bc9(0xd5),{'enumerable':!0x0,'get':function(){return b;}}),Object[_0x193bc9(0x2d7)](exports,_0x193bc9(0x20c),{'enumerable':!0x0,'get':function(){return Y;}}),Object['defineProperty'](exports,_0x193bc9(0xc2),{'enumerable':!0x0,'get':function(){return M;}}),Object[_0x193bc9(0x2d7)](exports,'PdfCollaborationEntity',{'enumerable':!0x0,'get':function(){return B;}}),Object['defineProperty'](exports,_0x193bc9(0xba),{'enumerable':!0x0,'get':function(){return O;}}),exports[_0x193bc9(0x30a)]=_0x193bc9(0xa1),exports[_0x193bc9(0x2e5)]=_0x193bc9(0xc9),exports['SessionStatus']=ge,Object[_0x193bc9(0x2d7)](exports,'SheetCollaborationEntity',{'enumerable':!0x0,'get':function(){return L;}}),Object[_0x193bc9(0x2d7)](exports,_0x193bc9(0x177),{'enumerable':!0x0,'get':function(){return S;}}),Object[_0x193bc9(0x2d7)](exports,'SlideCollaborationEntity',{'enumerable':!0x0,'get':function(){return R;}}),Object[_0x193bc9(0x2d7)](exports,_0x193bc9(0x21e),{'enumerable':!0x0,'get':function(){return Z;}}),Object[_0x193bc9(0x2d7)](exports,_0x193bc9(0x230),{'enumerable':!0x0,'get':function(){return D;}}),exports[_0x193bc9(0x267)]=xe,Object[_0x193bc9(0x2d7)](exports,_0x193bc9(0x235),{'enumerable':!0x0,'get':function(){return $;}}),exports[_0x193bc9(0x3b5)]=Ze,exports[_0x193bc9(0x14d)]=Ge,exports[_0x193bc9(0xf2)]=ye,exports[_0x193bc9(0x2e4)]=Ke;