@univerjs-pro/collaboration-client 1.0.3 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/lib/cjs/facade.js +1 -1
  2. package/lib/cjs/index.js +1 -1
  3. package/lib/cjs/locale/ar-SA.js +1 -1
  4. package/lib/cjs/locale/ca-ES.js +1 -1
  5. package/lib/cjs/locale/de-DE.js +1 -1
  6. package/lib/cjs/locale/en-US.js +1 -1
  7. package/lib/cjs/locale/es-ES.js +1 -1
  8. package/lib/cjs/locale/fa-IR.js +1 -1
  9. package/lib/cjs/locale/fr-FR.js +1 -1
  10. package/lib/cjs/locale/id-ID.js +1 -1
  11. package/lib/cjs/locale/it-IT.js +1 -1
  12. package/lib/cjs/locale/ja-JP.js +1 -1
  13. package/lib/cjs/locale/ko-KR.js +1 -1
  14. package/lib/cjs/locale/pl-PL.js +1 -1
  15. package/lib/cjs/locale/pt-BR.js +1 -1
  16. package/lib/cjs/locale/ru-RU.js +1 -1
  17. package/lib/cjs/locale/sk-SK.js +1 -1
  18. package/lib/cjs/locale/vi-VN.js +1 -1
  19. package/lib/cjs/locale/zh-CN.js +1 -1
  20. package/lib/cjs/locale/zh-HK.js +1 -1
  21. package/lib/cjs/locale/zh-TW.js +1 -1
  22. package/lib/es/facade.js +1 -1
  23. package/lib/es/index.js +1 -1
  24. package/lib/es/locale/ar-SA.js +1 -1
  25. package/lib/es/locale/ca-ES.js +1 -1
  26. package/lib/es/locale/de-DE.js +1 -1
  27. package/lib/es/locale/en-US.js +1 -1
  28. package/lib/es/locale/es-ES.js +1 -1
  29. package/lib/es/locale/fa-IR.js +1 -1
  30. package/lib/es/locale/fr-FR.js +1 -1
  31. package/lib/es/locale/id-ID.js +1 -1
  32. package/lib/es/locale/it-IT.js +1 -1
  33. package/lib/es/locale/ja-JP.js +1 -1
  34. package/lib/es/locale/ko-KR.js +1 -1
  35. package/lib/es/locale/pl-PL.js +1 -1
  36. package/lib/es/locale/pt-BR.js +1 -1
  37. package/lib/es/locale/ru-RU.js +1 -1
  38. package/lib/es/locale/sk-SK.js +1 -1
  39. package/lib/es/locale/vi-VN.js +1 -1
  40. package/lib/es/locale/zh-CN.js +1 -1
  41. package/lib/es/locale/zh-HK.js +1 -1
  42. package/lib/es/locale/zh-TW.js +1 -1
  43. package/lib/facade.js +1 -1
  44. package/lib/index.js +1 -1
  45. package/lib/locale/ar-SA.js +1 -1
  46. package/lib/locale/ca-ES.js +1 -1
  47. package/lib/locale/de-DE.js +1 -1
  48. package/lib/locale/en-US.js +1 -1
  49. package/lib/locale/es-ES.js +1 -1
  50. package/lib/locale/fa-IR.js +1 -1
  51. package/lib/locale/fr-FR.js +1 -1
  52. package/lib/locale/id-ID.js +1 -1
  53. package/lib/locale/it-IT.js +1 -1
  54. package/lib/locale/ja-JP.js +1 -1
  55. package/lib/locale/ko-KR.js +1 -1
  56. package/lib/locale/pl-PL.js +1 -1
  57. package/lib/locale/pt-BR.js +1 -1
  58. package/lib/locale/ru-RU.js +1 -1
  59. package/lib/locale/sk-SK.js +1 -1
  60. package/lib/locale/vi-VN.js +1 -1
  61. package/lib/locale/zh-CN.js +1 -1
  62. package/lib/locale/zh-HK.js +1 -1
  63. package/lib/locale/zh-TW.js +1 -1
  64. package/lib/types/controllers/collaboration/collaboration-state.d.ts +51 -11
  65. package/lib/types/facade/f-collaboration.d.ts +3 -4
  66. package/lib/types/services/collaboration-session/collaboration-session.service.d.ts +3 -3
  67. package/lib/types/services/collaboration-ui-event/collaboration-ui-event.d.ts +1 -0
  68. package/lib/types/services/data-loader/data-loader.service.d.ts +9 -2
  69. package/lib/types/services/local-cache/local-cache.service.d.ts +11 -6
  70. package/lib/umd/facade.js +1 -1
  71. package/lib/umd/index.js +1 -1
  72. package/lib/umd/locale/ar-SA.js +1 -1
  73. package/lib/umd/locale/ca-ES.js +1 -1
  74. package/lib/umd/locale/de-DE.js +1 -1
  75. package/lib/umd/locale/en-US.js +1 -1
  76. package/lib/umd/locale/es-ES.js +1 -1
  77. package/lib/umd/locale/fa-IR.js +1 -1
  78. package/lib/umd/locale/fr-FR.js +1 -1
  79. package/lib/umd/locale/id-ID.js +1 -1
  80. package/lib/umd/locale/it-IT.js +1 -1
  81. package/lib/umd/locale/ja-JP.js +1 -1
  82. package/lib/umd/locale/ko-KR.js +1 -1
  83. package/lib/umd/locale/pl-PL.js +1 -1
  84. package/lib/umd/locale/pt-BR.js +1 -1
  85. package/lib/umd/locale/ru-RU.js +1 -1
  86. package/lib/umd/locale/sk-SK.js +1 -1
  87. package/lib/umd/locale/vi-VN.js +1 -1
  88. package/lib/umd/locale/zh-CN.js +1 -1
  89. package/lib/umd/locale/zh-HK.js +1 -1
  90. package/lib/umd/locale/zh-TW.js +1 -1
  91. package/package.json +16 -16
package/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- const _0x276f58=_0x2c2f;(function(_0x4b8afb,_0x2301d5){const _0x3bb607=_0x2c2f,_0x369acb=_0x4b8afb();while(!![]){try{const _0x5769d7=-parseInt(_0x3bb607(0x2f7))/0x1+-parseInt(_0x3bb607(0x1ce))/0x2+parseInt(_0x3bb607(0x3ba))/0x3+-parseInt(_0x3bb607(0x1fb))/0x4*(-parseInt(_0x3bb607(0x41a))/0x5)+-parseInt(_0x3bb607(0x460))/0x6+-parseInt(_0x3bb607(0x1a1))/0x7+parseInt(_0x3bb607(0x212))/0x8*(parseInt(_0x3bb607(0x264))/0x9);if(_0x5769d7===_0x2301d5)break;else _0x369acb['push'](_0x369acb['shift']());}catch(_0x11b3c9){_0x369acb['push'](_0x369acb['shift']());}}}(_0x167f,0xc8623),Object['defineProperty'](exports,Symbol['toStringTag'],{'value':'Module'}));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=_0x276f58(0x2bb),ee={};function _0x2c2f(_0x17e1bc,_0x30f9fa){_0x17e1bc=_0x17e1bc-0x17f;const _0x167f61=_0x167f();let _0x2c2fe4=_0x167f61[_0x17e1bc];return _0x2c2fe4;}function te(_0x1d0ed7){const _0x2eb08c=_0x276f58;return JSON[_0x2eb08c(0x375)](_0x1d0ed7)['length'];}function h(_0x5938fe){'@babel/helpers - typeof';const _0x23b1db=_0x276f58;return h=typeof Symbol==_0x23b1db(0x2cc)&&typeof Symbol[_0x23b1db(0x42d)]=='symbol'?function(_0x2ac27e){return typeof _0x2ac27e;}:function(_0x427cab){const _0x4c18d3=_0x23b1db;return _0x427cab&&typeof Symbol==_0x4c18d3(0x2cc)&&_0x427cab['constructor']===Symbol&&_0x427cab!==Symbol[_0x4c18d3(0x282)]?_0x4c18d3(0x300):typeof _0x427cab;},h(_0x5938fe);}function ne(_0x480d08,_0x411f81){const _0x427204=_0x276f58;if(h(_0x480d08)!=_0x427204(0x20c)||!_0x480d08)return _0x480d08;var _0x2c8b17=_0x480d08[Symbol['toPrimitive']];if(_0x2c8b17!==void 0x0){var _0x213f5c=_0x2c8b17[_0x427204(0x3f8)](_0x480d08,_0x411f81||_0x427204(0x18c));if(h(_0x213f5c)!=_0x427204(0x20c))return _0x213f5c;throw TypeError(_0x427204(0x2d8));}return(_0x411f81===_0x427204(0x3d2)?String:Number)(_0x480d08);}function re(_0x5142c6){const _0x10d3e5=_0x276f58;var _0x832a70=ne(_0x5142c6,_0x10d3e5(0x3d2));return h(_0x832a70)==_0x10d3e5(0x300)?_0x832a70:_0x832a70+'';}function g(_0x1be463,_0x2fa2e7,_0x6a34f2){return(_0x2fa2e7=re(_0x2fa2e7))in _0x1be463?Object['defineProperty'](_0x1be463,_0x2fa2e7,{'value':_0x6a34f2,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x1be463[_0x2fa2e7]=_0x6a34f2,_0x1be463;}let ie=function(_0x1786ca){const _0x26a595=_0x276f58;return _0x1786ca[_0x26a595(0x43a)]='OTHER_CLIENT_EDITING',_0x1786ca['PERMISSION_DENIED']='PERMISSION_DENIED',_0x1786ca['CONFLICT_PROCESSING']=_0x26a595(0x473),_0x1786ca[_0x26a595(0x42c)]=_0x26a595(0x42c),_0x1786ca['CONFLICT']=_0x26a595(0x425),_0x1786ca['CLOSE_ROOM']='CLOSE_ROOM',_0x1786ca[_0x26a595(0x19c)]='JOIN_ROOM_FAILED',_0x1786ca[_0x26a595(0x227)]=_0x26a595(0x227),_0x1786ca[_0x26a595(0x3fe)]='SOCKET_FAILED',_0x1786ca[_0x26a595(0x1af)]=_0x26a595(0x1af),_0x1786ca;}({});var _=class{constructor(){const _0x2f8fa8=_0x276f58;g(this,_0x2f8fa8(0x219),new i['Subject']()),g(this,_0x2f8fa8(0x2a8),this[_0x2f8fa8(0x219)][_0x2f8fa8(0x446)]());}[_0x276f58(0x37a)](_0x486c65){const _0x26dc7a=_0x276f58;this['_event$'][_0x26dc7a(0x267)](_0x486c65);}},ae=class{constructor(){const _0x5ed431=_0x276f58;g(this,_0x5ed431(0x295),new i[(_0x5ed431(0x3b2))]()),g(this,_0x5ed431(0x34a),this[_0x5ed431(0x295)][_0x5ed431(0x446)]());}[_0x276f58(0x398)](_0x494db6){const _0x9b58d9=_0x276f58;this[_0x9b58d9(0x295)][_0x9b58d9(0x267)](_0x494db6);}};function v(_0x4ac4da,_0x5e2d83){return function(_0x531710,_0x3c85c2){_0x5e2d83(_0x531710,_0x3c85c2,_0x4ac4da);};}function y(_0x2b25d3,_0x45efb0,_0x11b499,_0xc5bce0){const _0x25c9e5=_0x276f58;var _0x1c2247=arguments[_0x25c9e5(0x3f4)],_0x316099=_0x1c2247<0x3?_0x45efb0:_0xc5bce0===null?_0xc5bce0=Object[_0x25c9e5(0x449)](_0x45efb0,_0x11b499):_0xc5bce0,_0x29286d;if(typeof Reflect==_0x25c9e5(0x20c)&&typeof Reflect['decorate']==_0x25c9e5(0x2cc))_0x316099=Reflect[_0x25c9e5(0x3ef)](_0x2b25d3,_0x45efb0,_0x11b499,_0xc5bce0);else{for(var _0x3c39e0=_0x2b25d3[_0x25c9e5(0x3f4)]-0x1;_0x3c39e0>=0x0;_0x3c39e0--)(_0x29286d=_0x2b25d3[_0x3c39e0])&&(_0x316099=(_0x1c2247<0x3?_0x29286d(_0x316099):_0x1c2247>0x3?_0x29286d(_0x45efb0,_0x11b499,_0x316099):_0x29286d(_0x45efb0,_0x11b499))||_0x316099);}return _0x1c2247>0x3&&_0x316099&&Object[_0x25c9e5(0x2f2)](_0x45efb0,_0x11b499,_0x316099),_0x316099;}let b=class extends t[_0x276f58(0x387)]{constructor(_0x438a15){const _0x66c122=_0x276f58;super(),this[_0x66c122(0x37e)]=_0x438a15,g(this,_0x66c122(0x409),new Map()),g(this,_0x66c122(0x2b3),new i[(_0x66c122(0x3b2))]()),this[_0x66c122(0x419)]((0x0,i[_0x66c122(0x447)])(this[_0x66c122(0x37e)][_0x66c122(0x26e)](t[_0x66c122(0x35c)][_0x66c122(0x261)])[_0x66c122(0x197)]((0x0,s[_0x66c122(0x187)])(_0x45df3a=>_0x45df3a[_0x66c122(0x2d6)]())),this[_0x66c122(0x37e)][_0x66c122(0x26e)](t[_0x66c122(0x35c)][_0x66c122(0x21f)])[_0x66c122(0x197)]((0x0,s[_0x66c122(0x187)])(_0xe71f93=>_0xe71f93[_0x66c122(0x2d6)]())),this[_0x66c122(0x37e)]['getTypeOfUnitDisposed$'](t['UniverInstanceType'][_0x66c122(0x454)])['pipe']((0x0,s[_0x66c122(0x187)])(_0x433bd9=>_0x433bd9['getUnitId']())),this[_0x66c122(0x37e)][_0x66c122(0x26e)](t[_0x66c122(0x35c)][_0x66c122(0x437)])[_0x66c122(0x197)]((0x0,s[_0x66c122(0x187)])(_0x313999=>_0x313999[_0x66c122(0x2d6)]())))[_0x66c122(0x448)](_0x506673=>this[_0x66c122(0x485)](_0x506673)));}['waitForRoom$'](_0x58394a){const _0x8e316=_0x276f58;return this[_0x8e316(0x409)][_0x8e316(0x2bc)](_0x58394a)?(0x0,i['of'])(this[_0x8e316(0x409)][_0x8e316(0x24e)](_0x58394a)):this['_roomCreated$'][_0x8e316(0x197)]((0x0,s['map'])(_0x50a824=>{const _0xc69224=_0x8e316;if(_0x50a824===_0x58394a)return this[_0xc69224(0x409)][_0xc69224(0x24e)](_0x50a824);}));}['updateMember'](_0xbb9328,_0x4be983){const _0x27bd2e=_0x276f58;let _0x518468=this['_roomMembers'][_0x27bd2e(0x24e)](_0xbb9328);_0x518468||(_0x518468=new oe(),this['_roomMembers'][_0x27bd2e(0x2b4)](_0xbb9328,_0x518468),this[_0x27bd2e(0x2b3)][_0x27bd2e(0x267)](_0xbb9328)),_0x518468[_0x27bd2e(0x3ae)](_0x4be983);}['removeMember'](_0x3a3be8,_0x1b64ba){const _0x46d230=_0x276f58;let _0x4f6a52=this[_0x46d230(0x409)][_0x46d230(0x24e)](_0x3a3be8);_0x4f6a52&&_0x4f6a52['removeMember'](_0x1b64ba);}[_0x276f58(0x1d4)](_0x4a1d3b){const _0x4dd044=_0x276f58;return this['_roomMembers'][_0x4dd044(0x24e)](_0x4a1d3b);}['getMember'](_0x5a6b2d,_0x59dffa){const _0x5985f0=_0x276f58;let _0xb3fb8f=this[_0x5985f0(0x409)][_0x5985f0(0x24e)](_0x5a6b2d);if(_0xb3fb8f)return _0xb3fb8f['getMember'](_0x59dffa);}[_0x276f58(0x485)](_0x588802){const _0x2e3e83=_0x276f58;let _0x1ebbab=this[_0x2e3e83(0x409)]['get'](_0x588802);_0x1ebbab&&(_0x1ebbab['dispose'](),this[_0x2e3e83(0x409)][_0x2e3e83(0x22c)](_0x588802));}[_0x276f58(0x284)](){const _0x4f0351=_0x276f58;this['_roomMembers']['forEach'](_0x398fc1=>_0x398fc1[_0x4f0351(0x284)]()),this['_roomMembers'][_0x4f0351(0x4af)](),this[_0x4f0351(0x2b3)]['complete']();}};b=y([v(0x0,t[_0x276f58(0x30b)])],b);var oe=class extends t[_0x276f58(0x387)]{constructor(..._0x1cac55){const _0x1b4ae9=_0x276f58;super(..._0x1cac55),g(this,_0x1b4ae9(0x3e4),new Map()),g(this,_0x1b4ae9(0x3c4),new i[(_0x1b4ae9(0x218))](this[_0x1b4ae9(0x3e4)])),g(this,_0x1b4ae9(0x190),this['_members$'][_0x1b4ae9(0x446)]());}[_0x276f58(0x284)](){const _0x5e6af1=_0x276f58;this['_members']['clear'](),this[_0x5e6af1(0x3c4)][_0x5e6af1(0x297)]();}[_0x276f58(0x3ae)](_0x53f56b){const _0x55af0a=_0x276f58;this[_0x55af0a(0x3e4)]['set'](_0x53f56b[_0x55af0a(0x3cc)],_0x53f56b),this[_0x55af0a(0x29d)]();}['removeMember'](_0x499b0e){this['_members']['delete'](_0x499b0e),this['_emitMembers']();}['getMember'](_0x119084){const _0x3aa9f0=_0x276f58;return this[_0x3aa9f0(0x3e4)][_0x3aa9f0(0x24e)](_0x119084);}[_0x276f58(0x201)](){const _0x51167e=_0x276f58;return Array[_0x51167e(0x38a)](this[_0x51167e(0x3e4)]['values']());}[_0x276f58(0x29d)](){const _0x1c852f=_0x276f58;this[_0x1c852f(0x3c4)][_0x1c852f(0x267)](this[_0x1c852f(0x3e4)]);}};function se(_0xff3db6,_0x15d629){const _0x19af51=_0x276f58;if(le(_0xff3db6))return _0x15d629;if(_0x15d629[_0x19af51(0x2ce)]===e[_0x19af51(0x275)][_0x19af51(0x1c4)]){let _0x203642=me(_0xff3db6),_0x3acabb=_0x15d629;return{..._0x3acabb,'data':{..._0x3acabb[_0x19af51(0x41c)],'unitID':_0xff3db6['target'][_0x19af51(0x1cd)],'unitType':_0xff3db6['target']['unitType']??_0x3acabb[_0x19af51(0x41c)][_0x19af51(0x363)],'changeset':_0x203642[_0x19af51(0x3b5)](_0x3acabb[_0x19af51(0x41c)][_0x19af51(0x208)],he(_0xff3db6))}};}if(_0x15d629['eventID']===e[_0x19af51(0x275)][_0x19af51(0x1d6)]){let _0x1ed495=_0x15d629;return{..._0x1ed495,'data':{..._0x1ed495[_0x19af51(0x41c)],'unitID':_0xff3db6['target'][_0x19af51(0x1cd)],'unitType':_0xff3db6[_0x19af51(0x2ee)][_0x19af51(0x363)]??_0x1ed495[_0x19af51(0x41c)]['unitType']}};}return _0x15d629;}function ce(_0x3de435,_0x1eb556){const _0x14987d=_0x276f58;if(le(_0x3de435))return[_0x1eb556];switch(_0x1eb556[_0x14987d(0x2ce)]){case e['CollaborationEvent'][_0x14987d(0x3a0)]:return[ue(_0x3de435,_0x1eb556)];case e[_0x14987d(0x275)][_0x14987d(0x2e4)]:return[fe(_0x3de435,_0x1eb556)];case e['CollaborationEvent'][_0x14987d(0x296)]:return[de(_0x3de435,_0x1eb556)];default:return[_0x1eb556];}}function le(_0x33ae4d){const _0x29b1a6=_0x276f58;return _0x33ae4d[_0x29b1a6(0x2ee)][_0x29b1a6(0x41f)]==null&&_0x33ae4d['target'][_0x29b1a6(0x1cd)]===_0x33ae4d[_0x29b1a6(0x477)]&&!_0x33ae4d[_0x29b1a6(0x208)];}function ue(_0x47148a,_0x16327d){const _0x425487=_0x276f58;return{..._0x16327d,'data':(0x0,e[_0x425487(0x3cb)])(pe(_0x47148a,(0x0,e[_0x425487(0x210)])(_0x16327d[_0x425487(0x41c)])))};}function de(_0x316842,_0x3a0600){const _0x3d0e55=_0x276f58;return{..._0x3a0600,'data':pe(_0x316842,_0x3a0600[_0x3d0e55(0x41c)])};}function fe(_0x572a49,_0x495633){const _0x3b31ea=_0x276f58;let _0x5bc7ac=_0x495633[_0x3b31ea(0x41c)];return{..._0x495633,'data':{..._0x5bc7ac,'changesets':_0x5bc7ac[_0x3b31ea(0x1a8)][_0x3b31ea(0x187)](_0x44e406=>(0x0,e[_0x3b31ea(0x3cb)])(pe(_0x572a49,(0x0,e[_0x3b31ea(0x210)])(_0x44e406))))}};}function pe(_0x3cb5bd,_0x2b38fb){return me(_0x3cb5bd)['toLocal'](_0x2b38fb,he(_0x3cb5bd));}function me(_0x1c9117){const _0x7d2088=_0x276f58;if(!_0x1c9117['changeset'])throw Error(_0x7d2088(0x334));return _0x1c9117[_0x7d2088(0x208)];}function he(_0x3a4765){const _0x497590=_0x276f58;return{'localUnitId':_0x3a4765[_0x497590(0x477)],'unitType':_0x3a4765[_0x497590(0x363)],'target':_0x3a4765['target']};}let ge=function(_0x153552){const _0x3eea5f=_0x276f58;return _0x153552[_0x153552['IDLE']=0x0]=_0x3eea5f(0x21e),_0x153552[_0x153552[_0x3eea5f(0x49f)]=0x1]=_0x3eea5f(0x49f),_0x153552[_0x153552['OFFLINE']=0x2]='OFFLINE',_0x153552[_0x153552[_0x3eea5f(0x475)]=0x3]=_0x3eea5f(0x475),_0x153552;}({});const _e={[a['CmdRspCode'][_0x276f58(0x47b)]]:_0x276f58(0x214),[a['CmdRspCode']['JOIN_ROOM_FULL']]:_0x276f58(0x40e),[a[_0x276f58(0x45b)][_0x276f58(0x2f1)]]:_0x276f58(0x2c0),[a[_0x276f58(0x45b)]['JOIN_ROOM_PERMISSION_DENIED']]:_0x276f58(0x415),[a[_0x276f58(0x45b)][_0x276f58(0x380)]]:_0x276f58(0x2e3)};let ve=class extends t[_0x276f58(0x256)]{get[_0x276f58(0x396)](){const _0x202a87=_0x276f58;return this[_0x202a87(0x286)]['getValue']();}constructor(_0x278aed,_0x3c1dee,_0x2547cc,_0x253912,_0x1669db,_0x4c635f,_0xe4fcd0,_0x4edf1c){const _0x11931a=_0x276f58;super(),this[_0x11931a(0x3dc)]=_0x278aed,this[_0x11931a(0x28b)]=_0x2547cc,this[_0x11931a(0x3bf)]=_0x253912,this[_0x11931a(0x228)]=_0x1669db,this[_0x11931a(0x28e)]=_0x4c635f,this[_0x11931a(0x400)]=_0xe4fcd0,this[_0x11931a(0x3b0)]=_0x4edf1c,g(this,_0x11931a(0x286),new i[(_0x11931a(0x218))](0x0)),g(this,_0x11931a(0x31b),this[_0x11931a(0x286)]['asObservable']()),g(this,_0x11931a(0x219),new i[(_0x11931a(0x3b2))]()),g(this,_0x11931a(0x2a8),this[_0x11931a(0x219)]['asObservable']()),g(this,_0x11931a(0x391),void 0x0),g(this,_0x11931a(0x430),void 0x0),g(this,_0x11931a(0x367),void 0x0),g(this,_0x11931a(0x1ef),!0x1),g(this,_0x11931a(0x39b),null),this['_shouldReportTelemetry']=!!this['_telemetryService'],_0x3c1dee[_0x11931a(0x197)]((0x0,i['takeUntil'])(this[_0x11931a(0x34b)]))[_0x11931a(0x448)](_0x2f183a=>{const _0x3a516e=_0x11931a;if(_0x2f183a!==void 0x0){if(this[_0x3a516e(0x391)]=_0x2f183a,_0x2f183a)this['_joinRoom'](_0x2f183a),this['_socketMessageSubscription']=_0x2f183a[_0x3a516e(0x1c0)][_0x3a516e(0x448)](_0x50ae11=>{const _0x57c0e8=_0x3a516e;_0x50ae11[_0x57c0e8(0x3a1)]===this['_identity']['target'][_0x57c0e8(0x1cd)]&&this['_onCombEvent'](_0x50ae11);});else{var _0x4bd32e;this[_0x3a516e(0x39c)](),this[_0x3a516e(0x286)][_0x3a516e(0x267)](0x2),(_0x4bd32e=this['_socketMessageSubscription'])==null||_0x4bd32e[_0x3a516e(0x329)](),this[_0x3a516e(0x430)]=null;}}});}[_0x276f58(0x192)](){const _0x4373a1=_0x276f58;var _0x407cd2;return((_0x407cd2=this[_0x4373a1(0x391)])==null?void 0x0:_0x407cd2[_0x4373a1(0x3cc)])??null;}[_0x276f58(0x284)](){const _0x1abed2=_0x276f58;super[_0x1abed2(0x284)](),this[_0x1abed2(0x436)](),this[_0x1abed2(0x34b)][_0x1abed2(0x267)](),this[_0x1abed2(0x34b)][_0x1abed2(0x297)]();}['close'](){const _0x5b5d2c=_0x276f58;var _0x75354;this[_0x5b5d2c(0x39c)](),(_0x75354=this[_0x5b5d2c(0x391)])==null||_0x75354[_0x5b5d2c(0x3be)]({'cmd':a[_0x5b5d2c(0x193)][_0x5b5d2c(0x3d0)],'data':{'roomID':this[_0x5b5d2c(0x3dc)]['target'][_0x5b5d2c(0x1cd)]}}),this[_0x5b5d2c(0x219)][_0x5b5d2c(0x297)](),this[_0x5b5d2c(0x286)][_0x5b5d2c(0x297)]();}[_0x276f58(0x40d)](_0x25a6f2){const _0x52b0ee=_0x276f58;_0x25a6f2[_0x52b0ee(0x1f1)]===a[_0x52b0ee(0x193)]['JOIN']?this[_0x52b0ee(0x3d5)](_0x25a6f2):_0x25a6f2[_0x52b0ee(0x1f1)]===a[_0x52b0ee(0x193)]['RECV']&&this[_0x52b0ee(0x48f)](_0x25a6f2);}[_0x276f58(0x3e6)](_0x275c75){const _0x5b45a2=_0x276f58;this[_0x5b45a2(0x286)][_0x5b45a2(0x267)](0x1),_0x275c75[_0x5b45a2(0x3be)]({'cmd':a[_0x5b45a2(0x193)]['JOIN'],'routeKey':this['_identity'][_0x5b45a2(0x2ee)][_0x5b45a2(0x1cd)],'routeType':'','data':{'rooms':[{'roomID':this[_0x5b45a2(0x3dc)]['target'][_0x5b45a2(0x1cd)]}]}});}[_0x276f58(0x3d5)](_0x1bbeb9){const _0x52d74f=_0x276f58;var _0x22017c;if(_0x1bbeb9['code']in _e){this[_0x52d74f(0x400)][_0x52d74f(0x37a)]({'id':_0x52d74f(0x19c),'data':_e[_0x1bbeb9['code']]}),this['_sessionStatus$'][_0x52d74f(0x267)](0x2);return;}this[_0x52d74f(0x286)][_0x52d74f(0x267)](0x3);let _0x19fb35=(_0x22017c=_0x1bbeb9[_0x52d74f(0x41c)][_0x52d74f(0x249)][this[_0x52d74f(0x3dc)]['target']['unitId']])==null?void 0x0:_0x22017c[_0x52d74f(0x341)];_0x19fb35&&_0x19fb35[_0x52d74f(0x346)](_0x85404a=>this[_0x52d74f(0x228)][_0x52d74f(0x3ae)](this['_identity'][_0x52d74f(0x477)],_0x85404a));}['_onRecvEvent'](_0x25ddfa){const _0x5d83b9=_0x276f58;try{let _0x2ab9bd=ce(this['_identity'],_0x25ddfa[_0x5d83b9(0x41c)]);for(let _0x356c60 of _0x2ab9bd)switch(_0x356c60[_0x5d83b9(0x2ce)]){case e[_0x5d83b9(0x275)][_0x5d83b9(0x234)]:this[_0x5d83b9(0x2a6)](_0x356c60),this[_0x5d83b9(0x219)][_0x5d83b9(0x267)](_0x356c60);break;case e[_0x5d83b9(0x275)][_0x5d83b9(0x435)]:this[_0x5d83b9(0x31e)](_0x356c60),this['_event$'][_0x5d83b9(0x267)](_0x356c60);break;case e['CollaborationEvent'][_0x5d83b9(0x231)]:case e[_0x5d83b9(0x275)][_0x5d83b9(0x296)]:this[_0x5d83b9(0x32b)](),this[_0x5d83b9(0x4ae)](),this[_0x5d83b9(0x219)][_0x5d83b9(0x267)](_0x356c60);break;case e[_0x5d83b9(0x275)][_0x5d83b9(0x251)]:this[_0x5d83b9(0x28b)][_0x5d83b9(0x453)](_0x5d83b9(0x2a3)+JSON[_0x5d83b9(0x375)](_0x356c60)),this[_0x5d83b9(0x219)][_0x5d83b9(0x267)](_0x356c60);break;case e['CollaborationEvent']['COMMENT_UPDATE']:this[_0x5d83b9(0x28e)][_0x5d83b9(0x398)](_0x356c60[_0x5d83b9(0x41c)]),this['_event$'][_0x5d83b9(0x267)](_0x356c60);break;default:this[_0x5d83b9(0x219)][_0x5d83b9(0x267)](_0x356c60);}}catch(_0x3ad11e){this['_logService'][_0x5d83b9(0x453)](_0x3ad11e,_0x25ddfa);}}[_0x276f58(0x2a6)](_0x4b2acd){const _0xdec93=_0x276f58;this['_memberService'][_0xdec93(0x3ae)](this[_0xdec93(0x3dc)]['localUnitId'],_0x4b2acd['data']);}[_0x276f58(0x31e)](_0x11c02a){const _0x2b7b92=_0x276f58;this[_0x2b7b92(0x228)][_0x2b7b92(0x1a3)](this[_0x2b7b92(0x3dc)][_0x2b7b92(0x477)],_0x11c02a[_0x2b7b92(0x41c)]['memberID']);}async[_0x276f58(0x3be)](_0x5efef5,_0x5a6ddd){const _0x32774a=_0x276f58;if(this[_0x32774a(0x396)]!==0x3||!this['_socket'])throw Error(_0x32774a(0x246));try{let _0x47d0dc=se(this['_identity'],_0x5efef5);_0x47d0dc[_0x32774a(0x2ce)]===e[_0x32774a(0x275)][_0x32774a(0x1c4)]&&(this['_scheduleCollaborationTimeoutTimer'](),this[_0x32774a(0x47f)](_0x47d0dc)),this[_0x32774a(0x391)]['send']({'cmd':a[_0x32774a(0x193)][_0x32774a(0x279)],'routeKey':this['_identity']['target'][_0x32774a(0x1cd)],'routeType':'','data':_0x47d0dc});}catch(_0x1b33c7){this[_0x32774a(0x28b)][_0x32774a(0x453)](_0x1b33c7);}}[_0x276f58(0x18a)](){const _0x410e0a=_0x276f58;this[_0x410e0a(0x367)]=setTimeout(()=>{const _0x334529=_0x410e0a;this[_0x334529(0x367)]=null,this[_0x334529(0x400)][_0x334529(0x37a)]({'id':'SUBMIT_CHANGESET_TIMEOUT'});},this[_0x410e0a(0x3bf)][_0x410e0a(0x45f)]('HEARTBEAT_TIMEOUT')??0x4e20);}['_clearCollaborationTimeoutTimer'](){const _0x88ce93=_0x276f58;this[_0x88ce93(0x367)]&&=(clearTimeout(this[_0x88ce93(0x367)]),null);}['_startTelemetryCollaborationNewChangeset'](_0x50fe33){const _0x3651d2=_0x276f58;if(!this[_0x3651d2(0x1ef)])return;let {data:_0x446c7c}=_0x50fe33,{unitID:_0x510d33,changeset:_0x2fe3e0}=_0x446c7c,{mutations:_0x34838d,type:_0x4a6255}=_0x2fe3e0;this[_0x3651d2(0x39b)]={'unitId':_0x510d33,'type':_0x4a6255,'startTime':performance['now'](),'stopTime':0x0,'duration':0x0,'size':te(_0x34838d)};}['_stopTelemetryCollaborationNewChangeset'](){const _0x6bf672=_0x276f58;if(this[_0x6bf672(0x1ef)]){if(!this[_0x6bf672(0x39b)]){this[_0x6bf672(0x28b)][_0x6bf672(0x453)](_0x6bf672(0x182),_0x6bf672(0x311));return;}this[_0x6bf672(0x39b)][_0x6bf672(0x34f)]=performance[_0x6bf672(0x1b5)](),this[_0x6bf672(0x39b)]['duration']=this['_telemetryInfo'][_0x6bf672(0x34f)]-this[_0x6bf672(0x39b)][_0x6bf672(0x3f1)],this[_0x6bf672(0x3b0)][_0x6bf672(0x39a)](_0x6bf672(0x3b6),this[_0x6bf672(0x39b)]),this['_telemetryInfo']=null;}}[_0x276f58(0x39c)](){const _0x3e5241=_0x276f58;this[_0x3e5241(0x39b)]=null;}};ve=y([v(0x2,t[_0x276f58(0x48b)]),v(0x3,t[_0x276f58(0x1c6)]),v(0x4,(0x0,t[_0x276f58(0x318)])(b)),v(0x5,(0x0,t[_0x276f58(0x318)])(ae)),v(0x6,(0x0,t[_0x276f58(0x318)])(_)),v(0x7,(0x0,t[_0x276f58(0x42b)])(o[_0x276f58(0x294)]))],ve);const x=(0x0,t[_0x276f58(0x4ad)])(_0x276f58(0x2cf));function ye(_0xca826d){const _0x37f920=_0x276f58;return _0x37f920(0x25d)+_0xca826d;}function be(_0x42418c){const _0x4ec732=_0x276f58;let {unitID:_0x1eedb0,mutations:_0x2382da}=_0x42418c;return{'unitId':_0x1eedb0,'subUnitId':_0x2382da['length']>0x0?_0x2382da[0x0][_0x4ec732(0x442)]['subUnitId']:null};}let S=class{constructor(_0x2ca003,_0x245ad1,_0x2bcc0f){const _0x23a638=_0x276f58;this[_0x23a638(0x217)]=_0x2ca003,this[_0x23a638(0x28c)]=_0x245ad1,this['_instanceService']=_0x2bcc0f;}[_0x276f58(0x290)](_0x1a581b){const _0x1ebfa0=_0x276f58;var _0x287740,_0x35776d;let _0x4de3ce=this[_0x1ebfa0(0x217)][_0x1ebfa0(0x24e)](r[_0x1ebfa0(0x408)]),{unitId:_0x5cb476,subUnitId:_0x5a354d}=be(_0x1a581b),_0x2896e8=_0x4de3ce==null?void 0x0:_0x4de3ce[_0x1ebfa0(0x4b3)](_0x5cb476)[_0x1ebfa0(0x3d3)](),_0x3c155d=(_0x287740=this[_0x1ebfa0(0x357)][_0x1ebfa0(0x491)](_0x5cb476))==null||(_0x287740=_0x287740['getActiveSheet']())==null?void 0x0:_0x287740['getSheetId']();if(_0x2896e8[_0x1ebfa0(0x3f4)]===0x0||!_0x5cb476||!_0x5a354d)return;let _0x275f16=[{'id':r[_0x1ebfa0(0x431)]['id'],'params':{'unitId':_0x5cb476,'subUnitId':_0x3c155d,'selections':t[_0x1ebfa0(0x3df)][_0x1ebfa0(0x412)](_0x2896e8)}}],_0x1a6ad3=this['_transformService'][_0x1ebfa0(0x195)](_0x1a581b,_0x275f16);if(!(0x0,e[_0x1ebfa0(0x1a7)])(_0x1a6ad3))throw _0x1a6ad3[_0x1ebfa0(0x453)];let _0x266289=(_0x35776d=_0x1a6ad3[_0x1ebfa0(0x394)][0x0])==null||(_0x35776d=_0x35776d[_0x1ebfa0(0x442)])==null?void 0x0:_0x35776d[_0x1ebfa0(0x4b0)];if(Array[_0x1ebfa0(0x2f9)](_0x266289)&&_0x266289[_0x1ebfa0(0x3f4)]){if(_0x266289['length']===_0x275f16[0x0]['params'][_0x1ebfa0(0x4b0)]['length']&&_0x266289[_0x1ebfa0(0x304)]((_0x388db9,_0x5eb4e7)=>t[_0x1ebfa0(0x335)]['equals'](_0x388db9['range'],_0x275f16[0x0][_0x1ebfa0(0x442)][_0x1ebfa0(0x4b0)][_0x5eb4e7][_0x1ebfa0(0x3f9)])))return;this[_0x1ebfa0(0x217)][_0x1ebfa0(0x24e)](t[_0x1ebfa0(0x2c9)])[_0x1ebfa0(0x211)](r[_0x1ebfa0(0x431)]['id'],{'unitId':_0x5cb476,'subUnitId':_0x3c155d,'selections':_0x266289});}}};S=y([v(0x0,(0x0,t[_0x276f58(0x318)])(t['Injector'])),v(0x1,e[_0x276f58(0x345)]),v(0x2,t['IUniverInstanceService'])],S);const C=(0x0,t[_0x276f58(0x4ad)])('univer-pro.collaboration-client.single-active-unit-service');let xe=function(_0x10b787){const _0x5169b4=_0x276f58;return _0x10b787[_0x10b787[_0x5169b4(0x366)]=0x0]=_0x5169b4(0x366),_0x10b787[_0x10b787['OTHER_CLIENTS_EDITING']=0x1]=_0x5169b4(0x42a),_0x10b787;}({});function Se(_0x3afa16){const _0x1e0f9e=_0x276f58;var _0x4177e1;return!!((_0x4177e1=_0x3afa16[_0x1e0f9e(0x442)])!=null&&_0x4177e1['__splitChunk__']);}const Ce=new Set([r[_0x276f58(0x496)]['id']]),we=new Set([c['AddSlidePageMutation']['id'],c[_0x276f58(0x439)]['id'],c['MoveSlidePageMutation']['id'],c[_0x276f58(0x2b9)]['id']]);function Te(_0x42660b,_0x35e417=Ce){const _0x7de682=_0x276f58;let _0x2eee5c=[];for(let _0x28cd53 of _0x42660b){if(_0x35e417['has'](_0x28cd53['id'])){if(_0x2eee5c['length']>0x0)break;_0x2eee5c['push'](_0x28cd53);break;}if(Se(_0x28cd53)){if(_0x2eee5c[_0x7de682(0x3f4)]>0x0)break;_0x2eee5c[_0x7de682(0x26d)](_0x28cd53);break;}_0x2eee5c[_0x7de682(0x26d)](_0x28cd53);}return _0x2eee5c;}function w(_0x5de468,_0x2393b5,_0x1783d8,_0xc8f9d0,_0x18e816){const _0x4d1803=_0x276f58;let _0x30a782=Te(_0x5de468),_0x3b1a99=_0x18e816[_0x4d1803(0x225)](),_0x5849c8=(_0x3b1a99==null?void 0x0:_0x3b1a99['userID'])??_0x4d1803(0x33a),_0x375648=(_0x3b1a99==null?void 0x0:_0x3b1a99[_0x4d1803(0x3cc)])??_0x4d1803(0x33a);return{'changeset':{'unitID':_0x2393b5,'type':(0x0,e[_0x4d1803(0x1bd)])(_0x1783d8[_0x4d1803(0x3d6)](_0x2393b5)),'baseRev':_0xc8f9d0[_0x4d1803(0x395)](_0x2393b5),'revision':0x0,'userID':_0x5849c8,'memberID':_0x375648,'mutations':_0x30a782},'pendingMutations':_0x5de468['slice'](_0x30a782[_0x4d1803(0x3f4)])};}const Ee=w;function De(_0x32b3f4,_0x3e17cf,_0x56528e,_0x100595,_0x4b7baf){const _0x3b930b=_0x276f58;let _0x97aa3b=Te(_0x32b3f4,we),_0x42a7db=_0x4b7baf[_0x3b930b(0x225)](),_0x4d8f71=(_0x42a7db==null?void 0x0:_0x42a7db[_0x3b930b(0x1d8)])??_0x3b930b(0x33a),_0x413e5a=(_0x42a7db==null?void 0x0:_0x42a7db[_0x3b930b(0x3cc)])??_0x3b930b(0x33a);return{'changeset':{'unitID':_0x3e17cf,'type':(0x0,e[_0x3b930b(0x1bd)])(_0x56528e['getUnitType'](_0x3e17cf)),'baseRev':_0x100595['getCurrentRevOfUnit'](_0x3e17cf),'revision':0x0,'userID':_0x4d8f71,'memberID':_0x413e5a,'mutations':_0x97aa3b},'pendingMutations':_0x32b3f4[_0x3b930b(0x32d)](_0x97aa3b[_0x3b930b(0x3f4)])};}function Oe(_0x24eaec,_0x10dd36,_0x2ebda4,_0x8ec7a,_0x322af3){const _0x37696f=_0x276f58;let _0x17f42e=_0x24eaec['reduce']((_0x45ae15,_0x39878f)=>{const _0xa57848=_0x2c2f;let _0x53ca93=_0x45ae15[_0x45ae15[_0xa57848(0x3f4)]-0x1],{id:_0x1af1a0}=_0x53ca93??{},{id:_0x2f0f5b,type:_0x2dc0b0}=_0x39878f,_0x4bb0f8=_0x39878f['params'];if(_0x1af1a0&&_0x1af1a0!==_0x2f0f5b)throw Error(_0xa57848(0x2f4)+_0x1af1a0+_0xa57848(0x422)+_0x2f0f5b+'.');if(!_0x53ca93)return[{'id':_0x2f0f5b,'type':_0x2dc0b0,'params':{'unitId':_0x4bb0f8['unitId'],'textRanges':_0x4bb0f8[_0xa57848(0x428)],'actions':_0x4bb0f8[_0xa57848(0x356)]}}];let _0x5928aa=_0x53ca93['params'];return ke(_0x5928aa,_0x4bb0f8)?[..._0x45ae15['slice'](0x0,-0x1),{..._0x53ca93,'id':_0x2f0f5b,'type':_0x2dc0b0,'params':{'unitId':_0x4bb0f8[_0xa57848(0x1cd)],'textRanges':_0x4bb0f8[_0xa57848(0x428)],'actions':t[_0xa57848(0x232)][_0xa57848(0x2dc)](_0x5928aa['actions'],_0x4bb0f8[_0xa57848(0x356)])}}]:[..._0x45ae15,{'id':_0x2f0f5b,'type':_0x2dc0b0,'params':{'unitId':_0x4bb0f8['unitId'],'textRanges':_0x4bb0f8[_0xa57848(0x428)],'actions':_0x4bb0f8[_0xa57848(0x356)]}}];},[]),_0x5a722a=_0x322af3['getCurrentUser'](),_0x27798a=(_0x5a722a==null?void 0x0:_0x5a722a['userID'])??_0x37696f(0x33a),_0x16dc04=(_0x5a722a==null?void 0x0:_0x5a722a['memberID'])??_0x37696f(0x33a);return{'changeset':{'unitID':_0x10dd36,'type':(0x0,e[_0x37696f(0x1bd)])(_0x2ebda4['getUnitType'](_0x10dd36)),'baseRev':_0x8ec7a[_0x37696f(0x395)](_0x10dd36),'revision':0x0,'userID':_0x27798a,'memberID':_0x16dc04,'mutations':_0x17f42e},'pendingMutations':_0x24eaec[_0x37696f(0x32d)](_0x24eaec[_0x37696f(0x3f4)])};}function ke(_0xa25eec,_0x3fc3e3){const _0x501f6a=_0x276f58;return!Ae(_0xa25eec)&&!Ae(_0x3fc3e3)&&je(_0xa25eec[_0x501f6a(0x356)],_0x3fc3e3[_0x501f6a(0x356)]);}function Ae(_0x485cdc){const _0x5bd2b7=_0x276f58;return _0x485cdc[_0x5bd2b7(0x29a)]!==void 0x0;}function je(_0x442959,_0x1c99e9){return Me(_0x442959)&&Me(_0x1c99e9)&&!Pe(_0x442959)&&!Pe(_0x1c99e9)&&!Ne(_0x442959)&&!Ne(_0x1c99e9);}function _0x167f(){const _0x245473=['NOT_COLLAB','\x20-\x20','_substituteRedoStack','deserializeToCombResponse','CONFLICT','FileSource','cbc','textRanges','_toggleOnline','OTHER_CLIENTS_EDITING','Optional','CONFLICT_CACHE_CLEAR_FAILED','iterator','objectActions','saveImage','_socketMessageSubscription','SetSelectionsOperation','/allowed','_collaborationPaused','_resendTimer','USERS_LEAVE','close','UNIVER_BASE','pending','EnsureSlideMasterPageMutation','OTHER_CLIENT_EDITING','_transitionLocked','_transformSelections','baseRev','revision','onTransformRemoteChangesetByIMECache','createSocket','_sender','params','backupOfflineData','?size=','_changesetReqId','asObservable','merge','subscribe','getOwnPropertyDescriptor','[FetchMissState]','_refreshUnitPermission','_undoStacks','charCodeAt','close$','CollaborationEntity','getDeserializedSheetBlock','ERROR_IMAGE','includes','error','UNIVER_BOARD','fetch_missing','_checkMissing','_undoRedoService','\x0aAfter:\x20','_getLoginPath','joinEvent','CmdRspCode','hostname','&assign=','LocaleService','getConfig','3696000zGLuSS','[CollaborationAttachmentIoService]:\x20failed\x20to\x20resolve\x20attachment\x20URL.','_sendingTimer','Quantity','updateSnapshot','RichTextEditingMutation','LIVESHARE_OPERATION','socketService','_socketChannels','_changesetSessionId','requestParams','_listenToNetworkCondition','_config','delay','LocalUndoRedoService','/universer-api/oidc/authpage','socket\x20close','createUniverCollaborationAdapter','_transformUndoredo','CONFLICT_PROCESSING','getSnapshotAPIPath','ONLINE','UNISCRIPT_RUN','localUnitId','objectID','origin','_resendWithTimeout','FAIL','Slide','getAttachmentUrl','/universer-api/stream/file/upload','_startTelemetryCollaborationNewChangeset','clearUnit','onSendChangeset','_userManagerService','BoardCollaborationEntity','COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY','_removeRoom','onPrepareTransformSelections','[OfflineState]:\x20received\x20rejection.','utf8ToBytes','_transformStack','ILocalCacheService','ILogService','catch','_disposed','1.0.3','_onRecvEvent','UnitObject','getUnit','[CollaborationAttachmentIoService]:\x20failed\x20to\x20upload\x20attachment.','getLocalCacheKey','_getRedoStack','fetchMissingChangesets','InsertSheetMutation','IUndoRedoService','_waitForHeartbeatResponse','sendHeartbeatTimer','[serializeCombRequest]:\x20should\x20not\x20fall\x20into\x20default\x20branch!','COMMENT_UPDATE','_getConfig','getValue','_createInitialStateImpl','JOINING','batchAllowed','CollaborationStatus','type','refreshUnit','[SyncedState]:\x20received\x20rejection.','localeService','init','_clearUndo','sort','_syncEditingCollabCursor','COMPRESS_MUTATION_SEND','SHOULD_CLOSE_CONN','_replaceFileID','createIdentifier','_clearCollaborationTimeoutTimer','clear','selections','href','_fetchMissChangesets','getWorkbookSelections','_onRemoteRejected','This\x20method\x20should\x20not\x20be\x20called\x20on\x20the\x20client\x20side!','encodeURIComponent','[CollaborationSession]','Failed\x20to\x20update\x20permission\x20point','entityInit$','updateCollaborator','objectPermissionTypes','map','LIVESHARE_REQUEST_HOST','onMissedChangesetFetched','_scheduleCollaborationTimeoutTimer','synced','default','getTypeOfUnitAdded$','subType','getCfgEnableObjInherit','members$','_resolveSessionIdentity','getMemberID','CombCmd','LIVESHARE_NEW_HOST','transformMutationsWithChangeset','_initRequestHeader','pipe','getResourcesRequest','_revisionService','enableCollaboration','_onLocalMutation','JOIN_ROOM_FAILED','originalMeta','_onConflict','focused$','_schedule','3914939ZpVaTe','registerDependencies','removeMember','_acknowledgeAwaitingIfReady','LIVESHARE_FETCH_OPERATIONS','deleteCollaborator','isTransformMutationsWithChangesetSuccess','changesets','find','CHANGESET_REJ','_authzIoService','sendChangesetTimeout','awaiting','headers','SUBMIT_CHANGESET_TIMEOUT','x-univer-host','_clearRetryConnectingTimer','SNAPSHOT_URL_KEY','src','DEFAULT_WS_SESSION_TICKET_URL','now','_tryReconnect','awaitingChangeset','_onRemoteChangeset','[CollaborationEntity]','_getUploadFileURL','registerHTTPInterceptor','unitDisposed$','mapDocumentTypeToUniverInstanceType','PdfCollaborationEntity','candidateSocket','message$','startsWith','UniverNetworkPlugin','_createHandler','SUBMIT_CHANGESET','[CollaborationSocketService]:\x20failed\x20to\x20get\x20web\x20socket\x20factory!','IConfigService','method','append','textEncoder','LOCAL_CACHE_INTERVAL','file','editing\x20status\x20changed\x20to','unitId','2480206PGusvm','ERROR_IMAGE_TYPE','UniverLicensePlugin','_initCloseConn','/object/','requireSession','getRoom','socketMessageSubscription','FETCH_MISSING','takeUntil','userID','c2Prime','_getSignURL','DRAWING_IMAGE_ALLOW_IMAGE_LIST','toDisposable','ThresholdInterceptorFactory','onTransformState','reqId','toggleOnline','code','_toggleOffline','ISocketService','roles','_getSendChangesetTimeout','patch','[CollaborationUndoRedoService]','fetching\x20missing\x20changesets\x20from\x20','generateRandomId','_unlockTransition','enableOfflineEditing','IPermissionService','CommandType','RECV','_shouldReportTelemetry','_state$','cmd','newCsEvent','loadSlide','retryCount','_unitLoaded$','onload','createInstance','DocCollaborationEntity','endsWith','number','4605852FXupGw','OPTIONAL','permissionRejEvent','_createInitialState','retryConnectingTimer','[OfflineState]:\x20received\x20changeset.','getAllMembers','fromCharCode','_localCacheService','Injector','_unitInfo$','_transformAndApplyRemoteChangeset','text-x','changeset','objectId','unit','_exhaustRemoteChangesetQueue','object','SheetTransformSelectionsService','ISnapshotServerService','WorkbookEditablePermission','parseProtocolChangeset','executeCommand','17367440XTBSfT','onMutationExecutedForCollab','session.join-failed','maxSize','readyForCollab','_injector','BehaviorSubject','_event$','fetching\x20the\x20latest\x20document\x20from\x20the\x20server.','_updateState','_transformIMECache','LIVESHARE_TERMINATE','IDLE','UNIVER_DOC','COMPRESS_MUTATION_APPLY','you\x20should\x20override\x20\x22IUndoRedoService\x22\x20provided\x20in\x20\x22core\x22\x20package!','loadOfflineData','create','/universer-api/comb','getCurrentUser','_submitChangeset','SOCKET_FAILED_RETRY','_memberService','onTransformRemoteChangesetByStateCache','put','_clearRedo','delete','_getSocketChannel','RETRY_CONNECTING_MAX_COUNT_KEY','snapshot','mutations','CHANGESET_ACK','JSONX','FileId','USERS_ENTER','_handler','_getCurrentRevision','endpointKey','reconnect','[CollaborationSessionService]','missingChangesets','isTransformMutationsWithChangesetFailure','_change$','{fileID}','_showConflictProcessingNotification','hasOwnProperty','createCollaborator','Error\x20on\x20receiving\x20event','appendMutation','_initDependencies','connection\x20error','session','[CollaborationSession]:\x20should\x20not\x20send\x20message\x20when\x20the\x20session\x20is\x20offline!','ImageSourceType','UNIVER_COLLABORATION_CLIENT_PLUGIN','roomInfos','csRejEvent','objectType','_updateStatus','state$','get','transformChangesets','upload','MSG_FOR_ERROR','\x0aCurrent:\x20','_collaborationSessionService','_prepareConflictRecovery','IAuthzIoService','RxDisposable','c1Prime','interceptor','status$','supports','onRemoteAck','[CollaborationController]:\x20invalid\x20univer\x20type:\x20','unit-cache-','HEARTBEAT_INTERVAL','MUTATION','/universer-api/snapshot/','UNIVER_SHEET','filter','firstValueFrom','9NjamqB','AuthzIoHttpService','[DataLoaderService]','next','_remoteChangesetQueue','_applyRemoteChangeset','/fetchmissing?from=','getAllPermissionPoint','resend','push','getTypeOfUnitDisposed$','_adapter','onRemoteChangeset','retryConnectingInterval','getCollabEntity','sheets','error$','CollaborationEvent','version','_eventService','_entities','INGEST','[PendingState]:\x20invalid\x20calling\x20to\x20`resend`.','change$','SheetPermissionInitController','POST','_httpService','FetchingMissState','_commandService','_isEchoedAwaitingChangeset','prototype','loadUnit','dispose','subject','_sessionStatus$','_getAPIPrefix','onRemoteRetry','PENDING','closeSession','_logService','_transformService','encode','_commentService','_onConnectionOpen','transformSelections','_replayCachedMutations','joinRsp','trim','ITelemetryService','_commentUpdate$','CHANGESET_SHOULD_RETRY','complete','pauseCollaboration','_getUndoStack','isCompositionEnd','CommentService','/-/object/-/batch_allowed','_emitMembers','_entityInit$','list','INetworkConditionService','_decreaseWaiting','SUCCUSS','save\x20fail\x20reason\x20is\x20','HEARTBEAT_TIMEOUT_KEY','touchDependencies','_onUserJoin','IMentionIOService','event$','getUnitOnRev','[FetchMissState]:\x20missing\x20changesets\x20response\x20still\x20has\x20revision\x20gaps.','DataLoaderService','&source=','reject','commentUpdateEvent','DocStateChangeManagerService','fromCollab','_closedUnits','body','_roomCreated$','set','_acknowledgeAwaiting','_tryEnsureSocket','_createSession','Unknown\x20type.\x20Will\x20not\x20load\x20files\x20from\x20remote\x20address.','RemoveSlidePageMutation','\x20in\x20_schedule.','collaboration-client.config','has','enableAuthServer','DEFAULT_FILE_NAME','responseType','session.room-not-exists','saveChangeset','/universer-api/snapshot','IImageIoService','_rescheduleHeartbeat','ws://127.0.0.1:8000/universer-api/comb/connect','getImageSourceCache','resolveUnit','_startCollaboration','ICommandService','loadBase','_socketService','function','MemberService','eventID','collaboration-client.local-cache-service','SheetCollaborationEntity','debug','conflict','splice','@univerjs-pro/collaboration-client','MentionType','getUnitId','_waitCount','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','readAsDataURL','[ConflictState]:\x20invalid\x20calling\x20to\x20`resend`.','CollaborationSessionService','compose','online$','loginUrlKey','listCollaborators','addHandlerCallback','setCfgEnableObjInherit','/universer-api/user/session-ticket','session.room-cnt-exceeds','PSEUDO_FETCH_MISSING_RESULT','collaMsg','_resendTimeout','getInterceptPoints','_initUnitPermissionChange','indexOf','_snapshotServerService','_updateUnitPermissionPoint','update','getImage','target','loadBoard','action','JOIN_ROOM_NOT_EXISTS','defineProperty','updateCursorEvent','Cannot\x20assemble\x20a\x20changeset\x20from\x20multiple\x20mutations\x20of\x20different\x20types:\x20','_transformRemoteChangesetByIMECache','SessionStatus','125891DsIXpy','shouldCloseConn','isArray','_cfgEnableObjInherit','_onMessage','location','objects','ERROR_EXCEED_SIZE','_maxTotalRetryTimeout','symbol','[PendingState]:\x20received\x20acknowledgement.','_permissionService','result','every','UnitEmbedded','BaseCollaborationEntity','getUploadOptions','reduce','unitLoaded$','liveShareNewHost','IUniverInstanceService','[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.','CollaborativeUndoRedoService','add','awaiting_with_pending','timeoutTimer','telemetry\x20info\x20is\x20not\x20initialized','take','override','_type','HTTPService','/unit/','OfflineState','Inject','pluginName','[AuthServerService]:\x20you\x20should\x20provide\x20authentication\x20info\x20on\x20Node.js.','sessionStatus$','COLLABORATION_ENDPOINT_INVALID','transformUndoRedo','_onUserLeave','_lockTransition','accept','AWAITING_WITH_PENDING','setConfig','_clearHeartbeatTimer','_sendHeartbeat','setWaitCount','_disableEditing','_updateLocalCache','AWAITING','unsubscribe','_pendingSessions','_stopTelemetryCollaborationNewChangeset','onlyLocal','slice','unitID','_networkConditionService','UPDATE_PERMISSION_OBJ','_onOffline','_sheetTransformSelectionsService','updatePermissionPoint','COLLABORATION_CHANGESET_TRANSLATION_REQUIRED','Rectangle','HELLO','toString','/collaborator','IContextService','unknown','_transformRemoteChangesetByStateCache','_singleActiveUnitService','_onRemoteRetry','HEARTBEAT','downloadEndpointUrl','PERMISSION_DENIED','members','max','reverse','onSyncEditingCollabCursor','ITransformService','forEach','enableSingleActiveInstanceLock','tables','name','commentUpdate$','dispose$','not_collab','replace','[PendingState]:\x20received\x20rejection.','stopTime','collabSubmitChangesetUrl','Edit','_registerDependencies','/universer-api/authz','DisposableCollection','UnitStatus','actions','_instanceService','offline','_substituteUndoStack','url','_acknowledgedAwaitingRevision','UniverInstanceType','AwaitingState','clearOfflineData','socket$','/universer-api/file/{fileID}/sign-url','RevisionService','_compressMutationService','unitType','sid','_localeService','NO_OTHER_CLIENTS_EDITING','_collaborationTimeoutTimer','failed\x20to\x20apply\x20missed\x20changesets!','_scheduleCompleteTimestamp','_redoStacks','_onRemoteACK','[CollaborationEntity]:\x20initial\x20state\x20has\x20been\x20created\x20before.\x20You\x20should\x20not\x20call\x20\x22init\x22\x20twice.','UPDATE_CURSOR','_clearTimeoutTimer','ISingleActiveUnitService','setShowComponents','People','/resources','collaboration-client.auth.needGotoLoginAlert','onMissingChangesets','stringify','/block/','getCollabEntity$','UNIVER_PDF','[CollaborationSocketService]:\x20failed\x20to\x20create\x20socket!','emitEvent','onTransformIME','PERMISSION_REJ','entries','_univerInstanceService','_getAPIPrefixPath','GLOBAL_ROOMS_CNT_EXCEEDS','REMOTE_UNISCRIPT_EXECUTION_ENDPOINT_KEY','UNIVER_SLIDE','JOIN','_executeRemoteChangeset','base-ui.attachment-io.service','CollaborationSession','Disposable','univer-pro.collaboration-client-socket-service','[FetchingMissState]:\x20received\x20stale\x20ack\x20revision:\x20','from','UUID','loadSheet','_HTTPService','_showConflictNotification','_hasSessionsForEndpoint','ConflictState','_socket','[FetchingMissState]:\x20not\x20expected\x20to\x20receive\x20ack\x20when\x20`this._awaitingChangeset`\x20is\x20null!','editingUnit','m2Prime','getCurrentRevOfUnit','sessionStatus','_onConnectionFailed','onCommentUpdate','status','capture','_telemetryInfo','_throwTelemetryCollaborationNewChangeset','_clearScheduledTask','post','[CollaborationAttachmentIoService]:\x20attachment\x20type\x20is\x20not\x20accepted.','NEW_CHANGESETS','routeKey','collaboratorID','_getCtorByUniverInstanceType','_incrementRevisionNumber','snapshotServerUrl','b64DecodeUnicode','toggleOffline','allowed','DEFAULT_COLLAB_WEB_SOCKET_URL','ErrorCode','loadPdf','getFocusedUnit','some','updateMember','CompressMutationService','_telemetryService','blockRanges','Subject','csAckEvent','withCredentials','toRemote','collaboration_new_changeset','/new_changes','cfgEnableObjInherit','SlideCollaborationEntity','118947DxWJcf','_collabSessionService','UniverCollaborationPlugin','onTransformSelections','send','_configService','fetchThroughInterceptors','authzUrl','values','unitId\x20is\x20not\x20found','_members$','_snapshotService','_sessionChannels','submit\x20changeset\x20error!','initWorkbookPermissionChange','[UniverCollaborationClientPlugin]:\x20you\x20must\x20provide\x20a\x20socketService\x20implementation\x20in\x20config!','collaborators','parseChangesetToProtocol','memberID','_imageSourceCache','signUrlServerUrl','BASE64','LEAVE','_doCreateSocket','string','getCurrentSelections','HEARTBEAT_INTERVAL_KEY','_onJoinRoomEvent','getUnitType','_handleRemoteChangesets','SYNCED','_sessions','_createSocket','/role','_identity','socket\x20open.','unitInfo$','Tools','getUnitStatus$','min','uploadFileServerUrl','isInternalEditorID','_members','loadUnitOfRevision','_joinRoom','collabWebSocketUrl','_awaitingChangeset','RETRY_CONNECTING_MAX_COUNT','onRemoteRej','univer-pro.collaboration-client.network-condition.service','ImageUploadStatusType','leaveEvent','_status$','decorate','_state','startTime','isPermissionRej','fetchMiss','length','_upload','_handlerCallback','PERSON','call','range','ObjectPermissionService','localCacheService','state','SnapshotService','SOCKET_FAILED','socketReady','_collaborationUIEventService','_prepareTransformSelections','_isPermissionRej','_queuedRemoteChangesets','[OfflineState]:\x20invalid\x20calling\x20to\x20`resend`.','_onFetchMissResult','_pendingMutations','CollaborationSocketService','SheetsSelectionsService','_roomMembers','then','_getUnitPermissionPoints','_getDownloadEndpointURL','_onCombEvent','session.room-full','Workbook','size','open$','deepClone','_init','DEFAULT_REMOTE_UNISCRIPT_EXECUTION_ENDPOINT','session.room-permission-denied','UniverCollaborationClientPlugin','_initMergeInterceptor','getLatestCsReqIdBySid','disposeWithMe','5RJspZW','apply','data','onLocalMutation','CollaborationAttachmentIoService','endpoint','resourceIDs'];_0x167f=function(){return _0x245473;};return _0x167f();}function Me(_0x52abc8){const _0x2701b7=_0x276f58;return Fe(_0x52abc8)[_0x2701b7(0x3ad)](_0x79b0c3=>T(_0x79b0c3)&&_0x79b0c3['et']===_0x2701b7(0x207));}function Ne(_0x69b5f5){const _0x3cb7e4=_0x276f58;return Fe(_0x69b5f5)[_0x3cb7e4(0x3ad)](_0x1f2b13=>Array['isArray'](_0x1f2b13)||typeof _0x1f2b13==_0x3cb7e4(0x3d2)||typeof _0x1f2b13==_0x3cb7e4(0x1fa));}function Pe(_0x5cca02){const _0x184fb2=_0x276f58;return Fe(_0x5cca02)[_0x184fb2(0x3ad)](_0xfc5d99=>!T(_0xfc5d99)||_0xfc5d99['et']!==_0x184fb2(0x207)||!Array[_0x184fb2(0x2f9)](_0xfc5d99['e'])?!0x1:_0xfc5d99['e'][_0x184fb2(0x3ad)](_0xdba369=>!T(_0xdba369)||!T(_0xdba369[_0x184fb2(0x2b2)])?!0x1:Object['prototype'][_0x184fb2(0x23f)]['call'](_0xdba369[_0x184fb2(0x2b2)],_0x184fb2(0x348))||Object[_0x184fb2(0x282)][_0x184fb2(0x23f)][_0x184fb2(0x3f8)](_0xdba369[_0x184fb2(0x2b2)],'columnGroups')||Object[_0x184fb2(0x282)][_0x184fb2(0x23f)]['call'](_0xdba369['body'],_0x184fb2(0x3b1))));}function Fe(_0x10a003){const _0x343f68=_0x276f58;if(!Array[_0x343f68(0x2f9)](_0x10a003))return[];let _0x45776a=_0x10a003[_0x343f68(0x452)](_0x343f68(0x2b2))?_0x10a003:_0x10a003[_0x343f68(0x1a9)](_0x258afa=>Array['isArray'](_0x258afa)&&_0x258afa['includes'](_0x343f68(0x2b2)));if(!Array[_0x343f68(0x2f9)](_0x45776a))return[];let _0x20c7f4=_0x45776a[_0x343f68(0x2e9)](_0x343f68(0x2b2));return _0x20c7f4===-0x1?[]:_0x45776a[_0x343f68(0x32d)](_0x20c7f4+0x1);}function T(_0x4d9b30){const _0x216999=_0x276f58;return typeof _0x4d9b30==_0x216999(0x20c)&&!!_0x4d9b30&&!Array[_0x216999(0x2f9)](_0x4d9b30);}function Ie(_0x2bc171,_0x577bf8){const _0x44ac2d=_0x276f58;let _0x331013=new i['ReplaySubject'](0x1);return setTimeout(()=>_0x331013[_0x44ac2d(0x267)](_0x577bf8),_0x2bc171),_0x331013[_0x44ac2d(0x446)]()[_0x44ac2d(0x197)]((0x0,i[_0x44ac2d(0x312)])(0x1));}var Le,Re,ze;let Be=function(_0x552894){const _0xc56f8e=_0x276f58;return _0x552894[_0xc56f8e(0x421)]=_0xc56f8e(0x34c),_0x552894[_0xc56f8e(0x3d8)]=_0xc56f8e(0x18b),_0x552894[_0xc56f8e(0x289)]=_0xc56f8e(0x438),_0x552894[_0xc56f8e(0x328)]=_0xc56f8e(0x1ad),_0x552894[_0xc56f8e(0x321)]='awaiting_with_pending',_0x552894['FETCH_MISS']=_0xc56f8e(0x455),_0x552894[_0xc56f8e(0x425)]='conflict',_0x552894['OFFLINE']='offline',_0x552894;}({});const Ve=0x4e20,He=0x2bf20;var E=class{constructor(_0x614ecf,_0x31b2cb,_0x3b49f5,_0x37f7aa,_0x415a58,_0x311857,_0x2d3432,_0x57353f,_0x4fc6de){const _0x209b1f=_0x276f58;this[_0x209b1f(0x32e)]=_0x614ecf,this[_0x209b1f(0x4a2)]=_0x31b2cb,this[_0x209b1f(0x235)]=_0x415a58,this[_0x209b1f(0x280)]=_0x311857,this[_0x209b1f(0x457)]=_0x2d3432,this[_0x209b1f(0x199)]=_0x57353f,this[_0x209b1f(0x203)]=_0x4fc6de,g(this,_0x209b1f(0x3e8),null),g(this,'_pendingMutations',[]),this['_awaitingChangeset']=_0x3b49f5,this[_0x209b1f(0x406)]=_0x37f7aa;}[_0x276f58(0x456)](_0x335b33){const _0xc03e55=_0x276f58;let _0x503438=this['_revisionService'][_0xc03e55(0x395)](this[_0xc03e55(0x32e)]);return _0x335b33[_0xc03e55(0x43e)]>_0x503438+0x1&&(this[_0xc03e55(0x235)][_0xc03e55(0x374)]({'from':_0x503438,'to':_0x335b33[_0xc03e55(0x43e)]-0x1}),!0x0);}[_0x276f58(0x472)](_0x2f485f){const _0xbab02a=_0x276f58;this['_undoRedoService']['transformUndoRedo'](this[_0xbab02a(0x32e)],_0x2f485f);}[_0x276f58(0x43c)](_0x511017){const _0x15c861=_0x276f58;var _0x298097,_0x33afed;(_0x298097=(_0x33afed=this['_handler'])[_0x15c861(0x3bd)])==null||_0x298097[_0x15c861(0x3f8)](_0x33afed,_0x511017);}[_0x276f58(0x401)](_0x5bb12b){const _0x1a95f8=_0x276f58;var _0x3bba0b,_0x341023;return((_0x3bba0b=(_0x341023=this[_0x1a95f8(0x235)])[_0x1a95f8(0x486)])==null?void 0x0:_0x3bba0b[_0x1a95f8(0x3f8)](_0x341023,_0x5bb12b))??null;}['_transformIMECache'](_0x666f1c){const _0x157115=_0x276f58;var _0x456b71,_0x2525f5;return(_0x456b71=(_0x2525f5=this[_0x157115(0x235)])[_0x157115(0x37b)])==null?void 0x0:_0x456b71[_0x157115(0x3f8)](_0x2525f5,_0x666f1c);}['_transformStateCache'](_0x233a4f){const _0x209cf3=_0x276f58;var _0x195085,_0x35be09;return(_0x195085=(_0x35be09=this[_0x209cf3(0x235)])[_0x209cf3(0x1de)])==null?void 0x0:_0x195085[_0x209cf3(0x3f8)](_0x35be09,_0x233a4f);}[_0x276f58(0x2f5)](_0x2a348e){const _0x35bc39=_0x276f58;var _0x8766c1,_0x539b9b;return((_0x8766c1=(_0x539b9b=this[_0x35bc39(0x235)])[_0x35bc39(0x43f)])==null?void 0x0:_0x8766c1[_0x35bc39(0x3f8)](_0x539b9b,_0x2a348e))??_0x2a348e;}[_0x276f58(0x33b)](_0x55130b){const _0x2421e2=_0x276f58;var _0x5efa41,_0x45750a;return((_0x5efa41=(_0x45750a=this['_handler'])['onTransformRemoteChangesetByStateCache'])==null?void 0x0:_0x5efa41[_0x2421e2(0x3f8)](_0x45750a,_0x55130b))??_0x55130b;}[_0x276f58(0x4a9)](_0x4d4019){const _0x4bdedb=_0x276f58;if(this['type']===t['UniverInstanceType']['UNIVER_DOC']){let {unitID:_0x5731be,mutations:_0x410d0d,memberID:_0x33fc29}=_0x4d4019,_0x1df371=_0x410d0d['length']>0x0?_0x410d0d[0x0][_0x4bdedb(0x442)][_0x4bdedb(0x428)]:[];if(Array[_0x4bdedb(0x2f9)](_0x1df371)&&_0x1df371[_0x4bdedb(0x3f4)]>0x0){var _0x2d5a6c,_0x53a8dc;(_0x2d5a6c=(_0x53a8dc=this[_0x4bdedb(0x235)])[_0x4bdedb(0x344)])==null||_0x2d5a6c[_0x4bdedb(0x3f8)](_0x53a8dc,{'unitID':_0x5731be,'memberID':_0x33fc29,'textRanges':_0x1df371});}}}[_0x276f58(0x327)](){const _0x3f9742=_0x276f58;var _0x3afb6e;(_0x3afb6e=this[_0x3f9742(0x203)])==null||_0x3afb6e['updateOfflineData'](this['unitID'],this[_0x3f9742(0x4a2)],this[_0x3f9742(0x3e8)],this[_0x3f9742(0x406)]);}[_0x276f58(0x236)](){const _0x59f33f=_0x276f58;return this[_0x59f33f(0x199)][_0x59f33f(0x395)](this['unitID']);}[_0x276f58(0x3a4)](){const _0x2286b5=_0x276f58;this[_0x2286b5(0x199)]['incrementRevOfUnit'](this['unitID']);}[_0x276f58(0x384)](_0xd35502){const _0x1da22a=_0x276f58;let _0x27dca3=this[_0x1da22a(0x2f5)](_0xd35502);_0x27dca3=this['_transformRemoteChangesetByStateCache'](_0x27dca3);let _0x42f1b4=this[_0x1da22a(0x401)](_0x27dca3),_0x12a575=(0x0,t['sequenceExecute'])(_0x27dca3[_0x1da22a(0x230)],this[_0x1da22a(0x280)],{'fromCollab':!0x0});if(!_0x12a575[_0x1da22a(0x303)])throw _0x42f1b4==null||_0x42f1b4['rollback'](),_0x12a575[_0x1da22a(0x453)]instanceof Error?_0x12a575[_0x1da22a(0x453)]:Error(_0x12a575[_0x1da22a(0x453)]??'[CollaborationState]:\x20apply\x20error!');_0x42f1b4==null||_0x42f1b4['commit'](),this[_0x1da22a(0x21c)](_0x27dca3),this['_transformStateCache'](_0x27dca3),this['_transformUndoredo'](_0xd35502),this[_0x1da22a(0x43c)](_0x27dca3),this[_0x1da22a(0x4a9)](_0x27dca3),this[_0x1da22a(0x3a4)]();}};let D=class extends E{constructor(_0x1007e6,_0x3691d3,_0x982e25,_0x51c370,_0x700cf,_0x5800f5,_0x5859cc,_0x15b49f,_0x5f0d2a,_0x52a538){const _0x2c840b=_0x276f58;super(_0x1007e6,_0x3691d3,null,[],_0x982e25,_0x5859cc,_0x5800f5,_0x51c370,_0x52a538),this['_injector']=_0x700cf,this[_0x2c840b(0x28b)]=_0x15b49f,this[_0x2c840b(0x28c)]=_0x5f0d2a,this[_0x2c840b(0x3fb)]=_0x52a538,g(this,'status','synced');}[_0x276f58(0x242)](_0x34c21f){const _0x46f992=_0x276f58;let _0x473fb7=this['_injector']['createInstance'](O,this[_0x46f992(0x32e)],this[_0x46f992(0x4a2)],[_0x34c21f],this[_0x46f992(0x235)]);return _0x473fb7[_0x46f992(0x1a0)](),_0x473fb7[_0x46f992(0x327)](),_0x473fb7;}[_0x276f58(0x270)](_0x162555){const _0x452804=_0x276f58;if(this[_0x452804(0x456)](_0x162555))return this[_0x452804(0x217)][_0x452804(0x1f7)](N,this['unitID'],this['type'],null,[],null,[_0x162555],this[_0x452804(0x235)]);try{let _0x7ff087=this['_transformService'][_0x452804(0x195)](_0x162555,[e['EmptyMutationInfo']]);if((0x0,e[_0x452804(0x1a7)])(_0x7ff087)){let {c1Prime:_0x803e74}=_0x7ff087;return this[_0x452804(0x384)](_0x803e74),this;}throw _0x7ff087[_0x452804(0x453)];}catch(_0x5299c6){return this[_0x452804(0x28b)][_0x452804(0x453)](_0x5299c6),this[_0x452804(0x19e)](!0x1);}}[_0x276f58(0x19e)](_0x5f2fc1){const _0x46481c=_0x276f58;return this['_injector'][_0x46481c(0x1f7)](j,this['unitID'],this['type'],null,[],this[_0x46481c(0x235)],_0x5f2fc1);}[_0x276f58(0x25b)](_0x297068){const _0x1897b6=_0x276f58;if(_0x297068[_0x1897b6(0x43e)]<=this[_0x1897b6(0x236)]())return this;throw Error('[SyncedState]:\x20received\x20acknowledgement.');}[_0x276f58(0x3ea)](){const _0xb59e61=_0x276f58;throw Error(_0xb59e61(0x4a4));}[_0x276f58(0x288)](){return this;}[_0x276f58(0x3a7)](){const _0x590fca=_0x276f58;return this['_injector'][_0x590fca(0x1f7)](M,this[_0x590fca(0x32e)],this[_0x590fca(0x4a2)],null,[],this[_0x590fca(0x235)]);}[_0x276f58(0x1e0)](){return this;}[_0x276f58(0x26c)](){throw Error('[SyncedState]:\x20invalid\x20calling\x20to\x20`resend`.');}[_0x276f58(0x3f3)](){const _0x250883=_0x276f58;let _0xcb2e17=this[_0x250883(0x199)][_0x250883(0x395)](this[_0x250883(0x32e)]);return this[_0x250883(0x235)][_0x250883(0x374)]({'from':_0xcb2e17,'to':0x0}),this[_0x250883(0x217)]['createInstance'](N,this[_0x250883(0x32e)],this[_0x250883(0x4a2)],null,[],null,[],this[_0x250883(0x235)]);}};D=y([v(0x3,(0x0,t['Inject'])(e['RevisionService'])),v(0x4,(0x0,t[_0x276f58(0x318)])(t[_0x276f58(0x204)])),v(0x5,t['IUndoRedoService']),v(0x6,t[_0x276f58(0x2c9)]),v(0x7,t['ILogService']),v(0x8,e[_0x276f58(0x345)]),v(0x9,(0x0,t[_0x276f58(0x42b)])(x))],D);let O=Le=class extends E{constructor(_0x16b9ac,_0x387535,_0x2dabb6,_0x5b1530,_0x4e7924,_0x146ab0,_0x46656a,_0x347796,_0x13954f,_0x3172c8,_0x1269c6,_0x24447c,_0x24e1ee,_0x533442){const _0x2fe14b=_0x276f58;super(_0x16b9ac,_0x387535,null,_0x2dabb6,_0x5b1530,_0x13954f,_0x24e1ee,_0x146ab0,_0x533442),this['_injector']=_0x4e7924,this[_0x2fe14b(0x482)]=_0x46656a,this['_logService']=_0x347796,this['_configService']=_0x3172c8,this[_0x2fe14b(0x28c)]=_0x1269c6,this[_0x2fe14b(0x37e)]=_0x24447c,g(this,'status',_0x2fe14b(0x438)),g(this,_0x2fe14b(0x369),null),g(this,_0x2fe14b(0x462),null);}[_0x276f58(0x242)](_0xea8245){const _0x74e6a9=_0x276f58;return this['_pendingMutations'][_0x74e6a9(0x26d)](_0xea8245),this[_0x74e6a9(0x327)](),this;}[_0x276f58(0x270)](_0x16cfa0){const _0x1ee7cb=_0x276f58;if(this['_checkMissing'](_0x16cfa0))return this[_0x1ee7cb(0x39d)](),this[_0x1ee7cb(0x217)][_0x1ee7cb(0x1f7)](N,this[_0x1ee7cb(0x32e)],this[_0x1ee7cb(0x4a2)],null,this[_0x1ee7cb(0x406)],null,[_0x16cfa0],this[_0x1ee7cb(0x235)]);try{let _0x342e70=this[_0x1ee7cb(0x28c)][_0x1ee7cb(0x195)](_0x16cfa0,this[_0x1ee7cb(0x406)]);if((0x0,e['isTransformMutationsWithChangesetSuccess'])(_0x342e70)){let {c1Prime:_0x1a20fa,m2Prime:_0x58df20}=_0x342e70;this['_executeRemoteChangeset'](_0x1a20fa);let _0x104c50=this['_injector'][_0x1ee7cb(0x1f7)](Le,this[_0x1ee7cb(0x32e)],this[_0x1ee7cb(0x4a2)],_0x58df20,this[_0x1ee7cb(0x235)]);this[_0x1ee7cb(0x39d)]();let _0x4ae26a=new Date()['getTime'](),_0x3e02bc=this[_0x1ee7cb(0x369)]?Math[_0x1ee7cb(0x342)](this[_0x1ee7cb(0x369)]-_0x4ae26a,0x0):this[_0x1ee7cb(0x1e5)]();return _0x104c50['_schedule'](_0x3e02bc),_0x104c50;}throw _0x342e70[_0x1ee7cb(0x453)];}catch(_0x2d7371){return this[_0x1ee7cb(0x28b)][_0x1ee7cb(0x453)](_0x2d7371),this[_0x1ee7cb(0x19e)](!0x1);}}['onRemoteAck'](_0x508201){const _0x3e08e8=_0x276f58;if(_0x508201[_0x3e08e8(0x43e)]<=this['_getCurrentRevision']())return this;throw Error(_0x3e08e8(0x301));}[_0x276f58(0x3ea)](){const _0x3940dc=_0x276f58;throw Error(_0x3940dc(0x34e));}[_0x276f58(0x288)](){return this;}[_0x276f58(0x3a7)](){const _0x59605b=_0x276f58;return this[_0x59605b(0x39d)](),this['_injector']['createInstance'](M,this[_0x59605b(0x32e)],this[_0x59605b(0x4a2)],null,this[_0x59605b(0x406)],this[_0x59605b(0x235)]);}['toggleOnline'](){return this;}['_schedule'](_0x5e1908){const _0x5bf28e=_0x276f58;let _0x4c169a=_0x5e1908??this['_getSendChangesetTimeout']();this[_0x5bf28e(0x369)]=new Date()['getTime']()+_0x4c169a,this['_sendingTimer']=setTimeout(()=>{const _0x2dc4be=_0x5bf28e;this[_0x2dc4be(0x39d)]();let _0x4ca832=null;switch(this['type']){case t['UniverInstanceType'][_0x2dc4be(0x261)]:_0x4ca832=w(this[_0x2dc4be(0x406)],this['unitID'],this['_univerInstanceService'],this[_0x2dc4be(0x199)],this[_0x2dc4be(0x482)]);break;case t[_0x2dc4be(0x35c)][_0x2dc4be(0x21f)]:_0x4ca832=this[_0x2dc4be(0x406)]['every'](_0x3e9e6a=>_0x3e9e6a['id']===n['RichTextEditingMutation']['id'])?Oe(this[_0x2dc4be(0x406)],this[_0x2dc4be(0x32e)],this['_univerInstanceService'],this['_revisionService'],this['_userManagerService']):w(this['_pendingMutations'],this[_0x2dc4be(0x32e)],this[_0x2dc4be(0x37e)],this[_0x2dc4be(0x199)],this[_0x2dc4be(0x482)]);break;case t['UniverInstanceType'][_0x2dc4be(0x382)]:_0x4ca832=De(this[_0x2dc4be(0x406)],this[_0x2dc4be(0x32e)],this[_0x2dc4be(0x37e)],this[_0x2dc4be(0x199)],this[_0x2dc4be(0x482)]);break;case t[_0x2dc4be(0x35c)][_0x2dc4be(0x378)]:_0x4ca832=Ee(this[_0x2dc4be(0x406)],this[_0x2dc4be(0x32e)],this[_0x2dc4be(0x37e)],this[_0x2dc4be(0x199)],this['_userManagerService']);break;case t[_0x2dc4be(0x35c)][_0x2dc4be(0x454)]:_0x4ca832=w(this['_pendingMutations'],this[_0x2dc4be(0x32e)],this['_univerInstanceService'],this[_0x2dc4be(0x199)],this[_0x2dc4be(0x482)]);break;case t[_0x2dc4be(0x35c)][_0x2dc4be(0x437)]:_0x4ca832=w(this[_0x2dc4be(0x406)],this[_0x2dc4be(0x32e)],this[_0x2dc4be(0x37e)],this[_0x2dc4be(0x199)],this[_0x2dc4be(0x482)]);break;default:throw Error('[PendingState]:\x20unhandled\x20univer\x20type:\x20'+this[_0x2dc4be(0x4a2)]+_0x2dc4be(0x2ba));}let {changeset:_0x511406,pendingMutations:_0x50e5c9}=_0x4ca832;this[_0x2dc4be(0x235)][_0x2dc4be(0x481)](_0x511406);let _0x4822f2=_0x50e5c9[_0x2dc4be(0x3f4)]?this[_0x2dc4be(0x217)]['createInstance'](A,this[_0x2dc4be(0x32e)],this['type'],_0x511406,_0x50e5c9,this[_0x2dc4be(0x235)],void 0x0):this['_injector'][_0x2dc4be(0x1f7)](k,this[_0x2dc4be(0x32e)],this[_0x2dc4be(0x4a2)],_0x511406,this[_0x2dc4be(0x235)]);_0x4822f2[_0x2dc4be(0x327)](),this[_0x2dc4be(0x235)]['onStateChange'](this,_0x4822f2);},_0x4c169a);}[_0x276f58(0x1e5)](){const _0x4eebd0=_0x276f58;let _0x165ab2=this['_configService']['getConfig'](m);return(_0x165ab2==null?void 0x0:_0x165ab2[_0x4eebd0(0x1ac)])??0x7d0;}['resend'](){const _0x15884f=_0x276f58;throw Error(_0x15884f(0x27a));}['_clearScheduledTask'](){const _0x633849=_0x276f58;this['_sendingTimer']!=null&&(clearTimeout(this[_0x633849(0x462)]),this[_0x633849(0x462)]=null);}[_0x276f58(0x19e)](_0x24f8db){const _0x39e5a5=_0x276f58;return this[_0x39e5a5(0x39d)](),this['_injector'][_0x39e5a5(0x1f7)](j,this[_0x39e5a5(0x32e)],this[_0x39e5a5(0x4a2)],null,this[_0x39e5a5(0x406)],this[_0x39e5a5(0x235)],_0x24f8db);}};O=Le=y([v(0x4,(0x0,t[_0x276f58(0x318)])(t['Injector'])),v(0x5,(0x0,t[_0x276f58(0x318)])(e[_0x276f58(0x361)])),v(0x6,(0x0,t['Inject'])(t['UserManagerService'])),v(0x7,t[_0x276f58(0x48b)]),v(0x8,t[_0x276f58(0x2c9)]),v(0x9,t[_0x276f58(0x1c6)]),v(0xa,e[_0x276f58(0x345)]),v(0xb,t[_0x276f58(0x30b)]),v(0xc,t[_0x276f58(0x497)]),v(0xd,(0x0,t[_0x276f58(0x42b)])(x))],O);let k=Re=class extends E{constructor(_0x154c4e,_0x2528f3,_0x248c42,_0x58bd51,_0x53e6e2,_0x5060a6,_0x237eb1,_0x54c973,_0x56590d,_0x46f564,_0x13f73c){const _0x297368=_0x276f58;super(_0x154c4e,_0x2528f3,_0x248c42,[],_0x58bd51,_0x237eb1,_0x46f564,_0x5060a6,_0x13f73c),this['_injector']=_0x53e6e2,this['_logService']=_0x54c973,this[_0x297368(0x28c)]=_0x56590d,g(this,_0x297368(0x399),'awaiting'),g(this,'_resendTimeout',0x0),g(this,'_maxTotalRetryTimeout',0x0),g(this,_0x297368(0x434),void 0x0),g(this,_0x297368(0x441),void 0x0);}[_0x276f58(0x242)](_0x46f0d3){const _0x2ae73b=_0x276f58;this[_0x2ae73b(0x39d)]();let _0x3c39e1=this[_0x2ae73b(0x217)][_0x2ae73b(0x1f7)](A,this[_0x2ae73b(0x32e)],this[_0x2ae73b(0x4a2)],this['_awaitingChangeset'],[_0x46f0d3],this[_0x2ae73b(0x235)],this[_0x2ae73b(0x434)]);return _0x3c39e1['_updateLocalCache'](),_0x3c39e1;}[_0x276f58(0x270)](_0x482c8c){const _0x31e67b=_0x276f58;if(this[_0x31e67b(0x456)](_0x482c8c))return this[_0x31e67b(0x39d)](),this['_injector'][_0x31e67b(0x1f7)](N,this[_0x31e67b(0x32e)],this[_0x31e67b(0x4a2)],this['_awaitingChangeset'],[],null,[_0x482c8c],this[_0x31e67b(0x235)]);try{let _0x33f1bf=this['_transformService'][_0x31e67b(0x24f)]([_0x482c8c],[this[_0x31e67b(0x3e8)]],!0x1);if((0x0,e['isTransformChangesetsSuccess'])(_0x33f1bf)){let {c1Prime:_0x381ac9,c2Prime:_0x56238f}=_0x33f1bf;this[_0x31e67b(0x384)](_0x381ac9[0x0]),_0x56238f[0x0]['baseRev']=this[_0x31e67b(0x236)](),this[_0x31e67b(0x39d)]();let _0x330dd8=this[_0x31e67b(0x217)][_0x31e67b(0x1f7)](Re,this[_0x31e67b(0x32e)],this[_0x31e67b(0x4a2)],_0x56238f[0x0],this[_0x31e67b(0x235)]);return _0x330dd8['_updateLocalCache'](),_0x330dd8;}throw _0x33f1bf[_0x31e67b(0x453)];}catch(_0x1dfa34){return this['_logService']['error'](_0x1dfa34),this[_0x31e67b(0x19e)](!0x1);}}[_0x276f58(0x25b)](_0x11263e){const _0x2d04fe=_0x276f58;this[_0x2d04fe(0x39d)]();let _0x1a262b=this[_0x2d04fe(0x199)][_0x2d04fe(0x395)](this[_0x2d04fe(0x32e)]);if(_0x11263e[_0x2d04fe(0x43e)]<=_0x1a262b)return this;if(this[_0x2d04fe(0x456)](_0x11263e))return this[_0x2d04fe(0x217)][_0x2d04fe(0x1f7)](N,this[_0x2d04fe(0x32e)],this[_0x2d04fe(0x4a2)],this[_0x2d04fe(0x3e8)],[],_0x11263e[_0x2d04fe(0x43e)],[],this[_0x2d04fe(0x235)]);this[_0x2d04fe(0x3a4)]();let _0xb1c9f=this[_0x2d04fe(0x217)][_0x2d04fe(0x1f7)](D,this[_0x2d04fe(0x32e)],this[_0x2d04fe(0x4a2)],this[_0x2d04fe(0x235)]);return _0xb1c9f[_0x2d04fe(0x327)](),_0xb1c9f;}[_0x276f58(0x3ea)](_0x254232){const _0x725d8c=_0x276f58;return this[_0x725d8c(0x19e)](!!(_0x254232!=null&&_0x254232[_0x725d8c(0x3f2)]));}['onRemoteRetry'](_0x3980ac){const _0x10cd35=_0x276f58;return this[_0x10cd35(0x2ff)]>He?this[_0x10cd35(0x3a7)]():(this[_0x10cd35(0x434)]=Ie(this['_resendTimeout'],{'timeout':this['_resendTimeout'],'reqId':_0x3980ac[_0x10cd35(0x1df)]}),this[_0x10cd35(0x441)]=this[_0x10cd35(0x434)][_0x10cd35(0x448)](({reqId:_0x27719c,timeout:_0x400de4})=>{const _0x21c766=_0x10cd35;this[_0x21c766(0x47a)](_0x27719c,_0x400de4);}),this);}[_0x276f58(0x3a7)](){const _0x439b03=_0x276f58;return this['_clearScheduledTask'](),this[_0x439b03(0x217)][_0x439b03(0x1f7)](M,this[_0x439b03(0x32e)],this[_0x439b03(0x4a2)],this[_0x439b03(0x3e8)],[],this[_0x439b03(0x235)]);}['toggleOnline'](){return this;}['resend'](){const _0xeeac36=_0x276f58;this[_0xeeac36(0x235)][_0xeeac36(0x481)](this[_0xeeac36(0x3e8)]);}[_0x276f58(0x19e)](_0x4b2dbf){const _0x1dfe09=_0x276f58;return this[_0x1dfe09(0x39d)](),this[_0x1dfe09(0x217)]['createInstance'](j,this[_0x1dfe09(0x32e)],this['type'],this[_0x1dfe09(0x3e8)],[],this['_handler'],_0x4b2dbf);}[_0x276f58(0x47a)](_0x281c3c,_0x395ad4){const _0x1c0c11=_0x276f58;var _0x2f5075;_0x281c3c===((_0x2f5075=this['_awaitingChangeset'])==null?void 0x0:_0x2f5075['reqId'])&&(this[_0x1c0c11(0x26c)](),this[_0x1c0c11(0x2e6)]=_0x395ad4===0x0?0x3e8:Math[_0x1c0c11(0x3e1)](_0x395ad4*0x2,Ve),this[_0x1c0c11(0x2ff)]+=this[_0x1c0c11(0x2e6)]);}[_0x276f58(0x39d)](){const _0x9a0e5=_0x276f58;var _0x71d855;(_0x71d855=this[_0x9a0e5(0x441)])==null||_0x71d855[_0x9a0e5(0x329)](),this['_resendTimeout']=0x0,this[_0x9a0e5(0x2ff)]=0x0;}};k=Re=y([v(0x4,(0x0,t['Inject'])(t[_0x276f58(0x204)])),v(0x5,(0x0,t[_0x276f58(0x318)])(e[_0x276f58(0x361)])),v(0x6,t[_0x276f58(0x2c9)]),v(0x7,t[_0x276f58(0x48b)]),v(0x8,e[_0x276f58(0x345)]),v(0x9,t[_0x276f58(0x497)]),v(0xa,(0x0,t[_0x276f58(0x42b)])(x))],k);let A=ze=class extends E{constructor(_0x4517bb,_0x3ca410,_0x238631,_0xb23eb0,_0x1587e2,_0x5ebce7,_0x5df633,_0x90f2b3,_0x3ccbb0,_0x10a745,_0x31db94,_0xb59b6,_0xdad589){const _0x45b0df=_0x276f58;super(_0x4517bb,_0x3ca410,_0x238631,_0xb23eb0,_0x1587e2,_0x3ccbb0,_0xb59b6,_0x90f2b3,_0xdad589),this[_0x45b0df(0x217)]=_0x5df633,this['_logService']=_0x10a745,this['_transformService']=_0x31db94,this[_0x45b0df(0x3fb)]=_0xdad589,g(this,'status',_0x45b0df(0x30f)),g(this,_0x45b0df(0x2e6),0x0),g(this,_0x45b0df(0x2ff),0x0),g(this,_0x45b0df(0x434),void 0x0),g(this,_0x45b0df(0x441),void 0x0),_0x5ebce7&&(this[_0x45b0df(0x434)]=_0x5ebce7,this[_0x45b0df(0x441)]=this[_0x45b0df(0x434)][_0x45b0df(0x448)](({reqId:_0x1620d5,timeout:_0x1d8001})=>{const _0x1ca620=_0x45b0df;this[_0x1ca620(0x47a)](_0x1620d5,_0x1d8001);}));}[_0x276f58(0x242)](_0x3d84f6){const _0x7240fc=_0x276f58;return this[_0x7240fc(0x406)][_0x7240fc(0x26d)](_0x3d84f6),this;}[_0x276f58(0x270)](_0x2a5258){const _0x48fab0=_0x276f58;if(this[_0x48fab0(0x456)](_0x2a5258))return this[_0x48fab0(0x39d)](),this['_injector'][_0x48fab0(0x1f7)](N,this[_0x48fab0(0x32e)],this[_0x48fab0(0x4a2)],this['_awaitingChangeset'],this[_0x48fab0(0x406)],null,[_0x2a5258],this[_0x48fab0(0x235)]);try{let _0x141daf=this[_0x48fab0(0x28c)][_0x48fab0(0x24f)]([_0x2a5258],[this['_awaitingChangeset']],!0x1);if((0x0,e['isTransformChangesetsSuccess'])(_0x141daf)){let {c1Prime:_0x48db73,c2Prime:_0x56112a}=_0x141daf,_0x319e50=this[_0x48fab0(0x28c)]['transformMutationsWithChangeset'](_0x48db73[0x0],this['_pendingMutations']);if((0x0,e[_0x48fab0(0x1a7)])(_0x319e50)){let {c1Prime:_0xff54b4,m2Prime:_0x399cda}=_0x319e50;return this[_0x48fab0(0x384)](_0xff54b4),_0x56112a[0x0][_0x48fab0(0x43d)]=this[_0x48fab0(0x236)](),this[_0x48fab0(0x39d)](),this[_0x48fab0(0x217)][_0x48fab0(0x1f7)](ze,this['unitID'],this[_0x48fab0(0x4a2)],_0x56112a[0x0],_0x399cda,this[_0x48fab0(0x235)],void 0x0);}throw _0x319e50[_0x48fab0(0x453)];}throw _0x141daf[_0x48fab0(0x453)];}catch(_0x38d1d8){return this[_0x48fab0(0x28b)][_0x48fab0(0x453)](_0x38d1d8),this['_onConflict'](!0x1);}}[_0x276f58(0x25b)](_0x8220c4){const _0x4d2be8=_0x276f58;this[_0x4d2be8(0x39d)]();let _0xf663e7=this[_0x4d2be8(0x236)]();if(_0x8220c4[_0x4d2be8(0x43e)]<=_0xf663e7)return this;if(this[_0x4d2be8(0x456)](_0x8220c4))return this[_0x4d2be8(0x217)]['createInstance'](N,this['unitID'],this[_0x4d2be8(0x4a2)],this[_0x4d2be8(0x3e8)],this['_pendingMutations'],_0x8220c4[_0x4d2be8(0x43e)],[],this[_0x4d2be8(0x235)]);this['_incrementRevisionNumber']();let _0x34fe34=this[_0x4d2be8(0x217)][_0x4d2be8(0x1f7)](O,this['unitID'],this[_0x4d2be8(0x4a2)],this['_pendingMutations'],this[_0x4d2be8(0x235)]);return _0x34fe34['_schedule'](),_0x34fe34[_0x4d2be8(0x327)](),_0x34fe34;}[_0x276f58(0x3ea)](_0xd67809){const _0x4cb287=_0x276f58;return this[_0x4cb287(0x19e)](!!(_0xd67809!=null&&_0xd67809[_0x4cb287(0x3f2)]));}['onRemoteRetry'](_0x104bbb){const _0x248c61=_0x276f58;return this[_0x248c61(0x2ff)]>He?this[_0x248c61(0x3a7)]():(this[_0x248c61(0x434)]=Ie(this[_0x248c61(0x2e6)],{'timeout':this[_0x248c61(0x2e6)],'reqId':_0x104bbb[_0x248c61(0x1df)]}),this[_0x248c61(0x441)]=this[_0x248c61(0x434)]['subscribe'](({reqId:_0x20dc0c,timeout:_0x48adb3})=>{const _0x196567=_0x248c61;this[_0x196567(0x47a)](_0x20dc0c,_0x48adb3);}),this);}[_0x276f58(0x3a7)](){const _0x30d559=_0x276f58;return this[_0x30d559(0x39d)](),this[_0x30d559(0x217)][_0x30d559(0x1f7)](M,this['unitID'],this[_0x30d559(0x4a2)],this['_awaitingChangeset'],this[_0x30d559(0x406)],this[_0x30d559(0x235)]);}['toggleOnline'](){return this;}[_0x276f58(0x26c)](){const _0xd3eede=_0x276f58;this['_handler'][_0xd3eede(0x481)](this[_0xd3eede(0x3e8)]);}['_onConflict'](_0x5d8ba9){const _0x1f0e29=_0x276f58;return this[_0x1f0e29(0x39d)](),this[_0x1f0e29(0x217)][_0x1f0e29(0x1f7)](j,this['unitID'],this['type'],null,this[_0x1f0e29(0x406)],this[_0x1f0e29(0x235)],_0x5d8ba9);}[_0x276f58(0x47a)](_0x20c855,_0x1cc4d1){const _0x394bb2=_0x276f58;var _0x51f704;_0x20c855===((_0x51f704=this['_awaitingChangeset'])==null?void 0x0:_0x51f704[_0x394bb2(0x1df)])&&(this[_0x394bb2(0x26c)](),this[_0x394bb2(0x2e6)]=_0x1cc4d1===0x0?0x3e8:Math['min'](_0x1cc4d1*0x2,Ve),this['_maxTotalRetryTimeout']+=this[_0x394bb2(0x2e6)]);}[_0x276f58(0x39d)](){const _0x4c9222=_0x276f58;var _0x5af8ca;(_0x5af8ca=this[_0x4c9222(0x441)])==null||_0x5af8ca[_0x4c9222(0x329)](),this[_0x4c9222(0x2e6)]=0x0,this['_maxTotalRetryTimeout']=0x0;}};A=ze=y([v(0x6,(0x0,t[_0x276f58(0x318)])(t[_0x276f58(0x204)])),v(0x7,(0x0,t['Inject'])(e[_0x276f58(0x361)])),v(0x8,t['ICommandService']),v(0x9,t[_0x276f58(0x48b)]),v(0xa,e[_0x276f58(0x345)]),v(0xb,t[_0x276f58(0x497)]),v(0xc,(0x0,t[_0x276f58(0x42b)])(x))],A);let j=class extends E{constructor(_0xa380f0,_0x5a2e63,_0x2af7fd,_0xa3307b,_0x363101,_0xa2c362=!0x1,_0x459008,_0x1a44d2,_0x6e1c72,_0x56a7ad,_0x53d32c,_0x641a73,_0x17dfb9){const _0x55db22=_0x276f58;super(_0xa380f0,_0x5a2e63,_0x2af7fd,_0xa3307b,_0x363101,_0x1a44d2,_0x6e1c72,_0x56a7ad,_0x17dfb9),this[_0x55db22(0x402)]=_0xa2c362,this[_0x55db22(0x302)]=_0x459008,this[_0x55db22(0x365)]=_0x53d32c,this[_0x55db22(0x400)]=_0x641a73,this[_0x55db22(0x3fb)]=_0x17dfb9,g(this,'status',_0x55db22(0x2d2)),this[_0x55db22(0x326)](),this[_0x55db22(0x23e)](),this[_0x55db22(0x254)]();}[_0x276f58(0x242)](){return this;}[_0x276f58(0x270)](){return this;}[_0x276f58(0x25b)](){return this;}['onRemoteRej'](){return this;}[_0x276f58(0x288)](){return this;}[_0x276f58(0x3a7)](){return this;}[_0x276f58(0x1e0)](){return this;}[_0x276f58(0x26c)](){const _0x278a24=_0x276f58;throw Error(_0x278a24(0x2da));}async['_prepareConflictRecovery'](){const _0x2dd334=_0x276f58;var _0x9061a9,_0x5f4903;await((_0x9061a9=this[_0x2dd334(0x203)])==null||(_0x5f4903=_0x9061a9[_0x2dd334(0x443)])==null?void 0x0:_0x5f4903['call'](_0x9061a9,this[_0x2dd334(0x32e)],'conflict')['catch'](()=>void 0x0));try{var _0x4d328b;await((_0x4d328b=this[_0x2dd334(0x203)])==null?void 0x0:_0x4d328b[_0x2dd334(0x35e)](this[_0x2dd334(0x32e)]));}catch{this[_0x2dd334(0x400)][_0x2dd334(0x37a)]({'id':'CONFLICT_CACHE_CLEAR_FAILED','unitID':this[_0x2dd334(0x32e)]});return;}this[_0x2dd334(0x38e)]();}[_0x276f58(0x23e)](){const _0x3ca821=_0x276f58;this[_0x3ca821(0x400)][_0x3ca821(0x37a)]({'id':_0x3ca821(0x473)});}[_0x276f58(0x38e)](){const _0xa23a83=_0x276f58;this[_0xa23a83(0x402)]?this[_0xa23a83(0x400)][_0xa23a83(0x37a)]({'id':_0xa23a83(0x340)}):this[_0xa23a83(0x400)]['emitEvent']({'id':_0xa23a83(0x425)});}[_0x276f58(0x326)](){const _0x4b42c8=_0x276f58;this['_permissionService'][_0x4b42c8(0x333)](new r[(_0x4b42c8(0x20f))](this['unitID'])['id'],!0x1);}};j=y([v(0x6,(0x0,t[_0x276f58(0x318)])(t[_0x276f58(0x1ec)])),v(0x7,t[_0x276f58(0x2c9)]),v(0x8,t[_0x276f58(0x497)]),v(0x9,(0x0,t[_0x276f58(0x318)])(e[_0x276f58(0x361)])),v(0xa,(0x0,t[_0x276f58(0x318)])(t[_0x276f58(0x45e)])),v(0xb,(0x0,t['Inject'])(_)),v(0xc,(0x0,t[_0x276f58(0x42b)])(x))],j);let M=class extends E{constructor(_0x16bbb3,_0x2ad736,_0xb9a794,_0x4031a3,_0x93a97b,_0x7a3f65,_0x495473,_0x1f2c3b,_0x55db59,_0x170124){const _0x36fd0a=_0x276f58;super(_0x16bbb3,_0x2ad736,_0xb9a794,_0x4031a3,_0x93a97b,_0x1f2c3b,_0x55db59,_0x495473,_0x170124),this[_0x36fd0a(0x217)]=_0x7a3f65,g(this,'status','offline');}[_0x276f58(0x242)](_0x18b6f5){const _0x13e0db=_0x276f58;return this[_0x13e0db(0x406)][_0x13e0db(0x26d)](_0x18b6f5),this[_0x13e0db(0x327)](),this;}[_0x276f58(0x270)](_0x4c9f9d){const _0x28fa52=_0x276f58;throw Error(_0x28fa52(0x200));}[_0x276f58(0x25b)](){throw Error('[OfflineState]:\x20received\x20acknowledgement.');}[_0x276f58(0x3ea)](){const _0x2f7039=_0x276f58;throw Error(_0x2f7039(0x487));}[_0x276f58(0x288)](){return this;}['toggleOffline'](){return this;}[_0x276f58(0x1e0)](){const _0x334ff9=_0x276f58;let {_injector:_0x31763b,_pendingMutations:_0x171cff,_awaitingChangeset:_0xacf9a0,unitID:_0x560681,_handler:_0x3423cd,type:_0x394dfc}=this,_0x3cc009=Ue(_0x31763b,_0x560681,_0x394dfc,_0xacf9a0,_0x171cff,_0x3423cd);return _0x3cc009 instanceof O?_0x3cc009[_0x334ff9(0x1a0)]():(_0x3cc009 instanceof A||_0x3cc009 instanceof k)&&_0x3cc009['resend'](),_0x3cc009;}[_0x276f58(0x26c)](){const _0x3c3559=_0x276f58;throw Error(_0x3c3559(0x404));}};M=y([v(0x5,(0x0,t[_0x276f58(0x318)])(t[_0x276f58(0x204)])),v(0x6,(0x0,t[_0x276f58(0x318)])(e[_0x276f58(0x361)])),v(0x7,t['ICommandService']),v(0x8,t[_0x276f58(0x497)]),v(0x9,(0x0,t['Optional'])(x))],M);let N=class extends E{constructor(_0x4146b9,_0x1ad6ac,_0x2ff7b6,_0x50debb,_0x1eb9a4,_0x3a211c,_0x57d6dd,_0x2152cd,_0xd3f0d7,_0x16542b,_0x1ce81e,_0x547d59,_0x1d6fe2,_0x5c591d){const _0x16b34a=_0x276f58;super(_0x4146b9,_0x1ad6ac,_0x2ff7b6,_0x50debb,_0x57d6dd,_0x1ce81e,_0x547d59,_0xd3f0d7,_0x5c591d),this['_acknowledgedAwaitingRevision']=_0x1eb9a4,this[_0x16b34a(0x403)]=_0x3a211c,this[_0x16b34a(0x217)]=_0x2152cd,this[_0x16b34a(0x28b)]=_0x16542b,this['_transformService']=_0x1d6fe2,this['localCacheService']=_0x5c591d,g(this,_0x16b34a(0x399),'fetch_missing');}['onMissedChangesetFetched'](_0x5c4913){const _0x2434db=_0x276f58;try{if(this[_0x2434db(0x3d7)](_0x5c4913)[_0x2434db(0x23a)])throw Error(_0x2434db(0x2aa));if(this['_handleRemoteChangesets']([...this[_0x2434db(0x403)]][_0x2434db(0x4a8)]((_0x9e881c,_0x2aa42f)=>_0x9e881c[_0x2434db(0x43e)]-_0x2aa42f[_0x2434db(0x43e)]))[_0x2434db(0x23a)])return this['_queuedRemoteChangesets']=[],this[_0x2434db(0x327)](),this[_0x2434db(0x235)][_0x2434db(0x374)]({'from':this[_0x2434db(0x236)](),'to':0x0}),this;let _0x1b5eff=this[_0x2434db(0x3e8)],_0x1daab8=this[_0x2434db(0x406)],_0x382709;if(_0x1b5eff&&_0x1daab8[_0x2434db(0x3f4)]!==0x0)_0x382709=this[_0x2434db(0x217)][_0x2434db(0x1f7)](A,this[_0x2434db(0x32e)],this[_0x2434db(0x4a2)],_0x1b5eff,_0x1daab8,this[_0x2434db(0x235)],void 0x0);else{if(_0x1b5eff&&_0x1daab8[_0x2434db(0x3f4)]===0x0)_0x1b5eff[_0x2434db(0x43d)]=this['_getCurrentRevision'](),_0x382709=this[_0x2434db(0x217)][_0x2434db(0x1f7)](k,this[_0x2434db(0x32e)],this[_0x2434db(0x4a2)],_0x1b5eff,this['_handler']);else{if(_0x1daab8['length']!==0x0){let _0x1d4bce=this[_0x2434db(0x217)]['createInstance'](O,this[_0x2434db(0x32e)],this[_0x2434db(0x4a2)],_0x1daab8,this['_handler']);_0x1d4bce[_0x2434db(0x1a0)](),_0x382709=_0x1d4bce;}else _0x382709=this['_injector'][_0x2434db(0x1f7)](D,this[_0x2434db(0x32e)],this['type'],this[_0x2434db(0x235)]);}}return _0x382709['_updateLocalCache'](),_0x382709;}catch(_0x2f6965){return this[_0x2434db(0x28b)][_0x2434db(0x453)](_0x2434db(0x44a),_0x2434db(0x368),_0x2f6965),this[_0x2434db(0x217)][_0x2434db(0x1f7)](j,this[_0x2434db(0x32e)],this[_0x2434db(0x4a2)],this['_awaitingChangeset'],this[_0x2434db(0x406)],this[_0x2434db(0x235)],!0x1);}}['_handleRemoteChangesets'](_0x438132){const _0x39a933=_0x276f58;this[_0x39a933(0x1a4)]();for(let _0x3e2383=0x0;_0x3e2383<_0x438132[_0x39a933(0x3f4)];_0x3e2383++){let _0x470489=_0x438132[_0x3e2383],_0x519c6f=this[_0x39a933(0x236)]();if(!(_0x470489[_0x39a933(0x43e)]<=_0x519c6f)){if(_0x470489['revision']>_0x519c6f+0x1)return{'missingChangesets':!0x0};if(this[_0x39a933(0x281)](_0x470489)){this[_0x39a933(0x2b5)]();continue;}this[_0x39a933(0x206)](_0x470489),this[_0x39a933(0x1a4)]();}}return{'missingChangesets':!0x1};}[_0x276f58(0x206)](_0x1b7a42){const _0x52ee2e=_0x276f58;let _0x5db04e=_0x1b7a42,_0x285de1=this['_awaitingChangeset'];if(_0x285de1){let _0x40bb7b=this[_0x52ee2e(0x28c)]['transformChangesets']([_0x1b7a42],[_0x285de1],!0x1);if(!(0x0,e['isTransformChangesetsSuccess'])(_0x40bb7b))throw _0x40bb7b[_0x52ee2e(0x453)];_0x5db04e=_0x40bb7b[_0x52ee2e(0x257)][0x0],_0x285de1=_0x40bb7b[_0x52ee2e(0x1d9)][0x0];}let _0x5cae06=this[_0x52ee2e(0x406)];if(_0x5cae06[_0x52ee2e(0x3f4)]){let _0xdeac78=this['_transformService']['transformMutationsWithChangeset'](_0x5db04e,_0x5cae06);if(!(0x0,e[_0x52ee2e(0x1a7)])(_0xdeac78))throw _0xdeac78[_0x52ee2e(0x453)];_0x5db04e=_0xdeac78[_0x52ee2e(0x257)],_0x5cae06=_0xdeac78['m2Prime'];}this['_executeRemoteChangeset'](_0x5db04e),_0x285de1&&(_0x285de1['baseRev']=this[_0x52ee2e(0x236)]()),this['_awaitingChangeset']=_0x285de1,this['_pendingMutations']=_0x5cae06;}[_0x276f58(0x1a4)](){const _0x4a51c8=_0x276f58;if(!this['_awaitingChangeset']||this[_0x4a51c8(0x35b)]==null)return;let _0xd3e2d8=this[_0x4a51c8(0x236)]();if(this[_0x4a51c8(0x35b)]<=_0xd3e2d8)throw Error(_0x4a51c8(0x389)+this['_acknowledgedAwaitingRevision']+'.');this[_0x4a51c8(0x35b)]===_0xd3e2d8+0x1&&this['_acknowledgeAwaiting']();}[_0x276f58(0x2b5)](){const _0x570e6d=_0x276f58;this[_0x570e6d(0x3a4)](),this['_awaitingChangeset']=null,this['_acknowledgedAwaitingRevision']=null;}['_isEchoedAwaitingChangeset'](_0xeaa642){const _0x5d70ed=_0x276f58;let _0x3928f5=this[_0x5d70ed(0x3e8)];return!_0x3928f5||!_0x3928f5[_0x5d70ed(0x364)]||_0x3928f5[_0x5d70ed(0x1df)]===null||_0x3928f5[_0x5d70ed(0x1df)]===void 0x0?!0x1:_0xeaa642[_0x5d70ed(0x32e)]===_0x3928f5[_0x5d70ed(0x32e)]&&_0xeaa642[_0x5d70ed(0x364)]===_0x3928f5[_0x5d70ed(0x364)]&&_0xeaa642['reqId']===_0x3928f5[_0x5d70ed(0x1df)];}[_0x276f58(0x26c)](){throw Error('[FetchingMissState]:\x20invalid\x20calling\x20to\x20`resend`.');}['appendMutation'](_0x5c6063){const _0xf26c8c=_0x276f58;return this[_0xf26c8c(0x406)][_0xf26c8c(0x26d)](_0x5c6063),this;}[_0x276f58(0x270)](_0x118281){const _0x12501a=_0x276f58;return this['_queuedRemoteChangesets'][_0x12501a(0x26d)](_0x118281),this;}[_0x276f58(0x25b)](_0xa3522b){const _0x1a6ce3=_0x276f58;if(this[_0x1a6ce3(0x3e8)]){let _0x31b15b=this[_0x1a6ce3(0x236)]();return _0xa3522b['revision']<=_0x31b15b||(_0x31b15b+0x1===_0xa3522b[_0x1a6ce3(0x43e)]?(this[_0x1a6ce3(0x3a4)](),this[_0x1a6ce3(0x3e8)]=null,this['_acknowledgedAwaitingRevision']=null):this[_0x1a6ce3(0x35b)]=_0xa3522b[_0x1a6ce3(0x43e)]),this;}if(_0xa3522b[_0x1a6ce3(0x43e)]<=this[_0x1a6ce3(0x236)]())return this;throw Error(_0x1a6ce3(0x392));}[_0x276f58(0x3ea)](_0x412fe0){const _0x5f1ee5=_0x276f58;return this[_0x5f1ee5(0x19e)](!!(_0x412fe0!=null&&_0x412fe0['isPermissionRej']));}[_0x276f58(0x288)](){return this;}['toggleOffline'](){const _0x2c3a4f=_0x276f58;return this[_0x2c3a4f(0x217)][_0x2c3a4f(0x1f7)](M,this['unitID'],this[_0x2c3a4f(0x4a2)],this[_0x2c3a4f(0x3e8)],this[_0x2c3a4f(0x406)],this[_0x2c3a4f(0x235)]);}[_0x276f58(0x1e0)](){return this;}[_0x276f58(0x19e)](_0x102823){const _0x462055=_0x276f58;return this['_injector'][_0x462055(0x1f7)](j,this['unitID'],this[_0x462055(0x4a2)],this[_0x462055(0x3e8)],this[_0x462055(0x406)],this[_0x462055(0x235)],_0x102823);}};N=y([v(0x7,(0x0,t[_0x276f58(0x318)])(t[_0x276f58(0x204)])),v(0x8,(0x0,t[_0x276f58(0x318)])(e[_0x276f58(0x361)])),v(0x9,t[_0x276f58(0x48b)]),v(0xa,t[_0x276f58(0x2c9)]),v(0xb,t[_0x276f58(0x497)]),v(0xc,e[_0x276f58(0x345)]),v(0xd,(0x0,t[_0x276f58(0x42b)])(x))],N);function Ue(_0x1079c6,_0x2b7f27,_0x42d1f7,_0x10f29d,_0x3036bf,_0xdde3ec){const _0x5c433e=_0x276f58;return _0x10f29d&&_0x3036bf[_0x5c433e(0x3f4)]?_0x1079c6[_0x5c433e(0x1f7)](A,_0x2b7f27,_0x42d1f7,_0x10f29d,_0x3036bf,_0xdde3ec,void 0x0):_0x10f29d?_0x1079c6[_0x5c433e(0x1f7)](k,_0x2b7f27,_0x42d1f7,_0x10f29d,_0xdde3ec):_0x3036bf[_0x5c433e(0x3f4)]?_0x1079c6[_0x5c433e(0x1f7)](O,_0x2b7f27,_0x42d1f7,_0x3036bf,_0xdde3ec):_0x1079c6[_0x5c433e(0x1f7)](D,_0x2b7f27,_0x42d1f7,_0xdde3ec);}let P=class extends t[_0x276f58(0x256)]{get[_0x276f58(0x3fc)](){const _0x49761e=_0x276f58;return this[_0x49761e(0x3f0)];}constructor(_0x38e8bf,_0x149dd9,_0x5d1333,_0x498b54,_0x5e6fbc,_0x2c782f,_0x4814fb,_0x13ff3f,_0x4197d1,_0x43d039,_0x152e2c,_0x5c4686,_0x39b118,_0x4718d5){const _0x20e864=_0x276f58;super(),this['unitID']=_0x38e8bf,this[_0x20e864(0x245)]=_0x149dd9,this['_type']=_0x5d1333,this[_0x20e864(0x217)]=_0x498b54,this[_0x20e864(0x362)]=_0x5e6fbc,this['_localeService']=_0x2c782f,this[_0x20e864(0x199)]=_0x4814fb,this[_0x20e864(0x277)]=_0x13ff3f,this['_univerInstanceService']=_0x4197d1,this['_logService']=_0x43d039,this[_0x20e864(0x280)]=_0x152e2c,this[_0x20e864(0x302)]=_0x5c4686,this[_0x20e864(0x33c)]=_0x39b118,this[_0x20e864(0x203)]=_0x4718d5,g(this,_0x20e864(0x1f0),new i[(_0x20e864(0x218))](null)),g(this,_0x20e864(0x24d),this[_0x20e864(0x1f0)][_0x20e864(0x446)]()),g(this,_0x20e864(0x3f0),void 0x0),g(this,_0x20e864(0x433),!0x1),g(this,'_changesetSessionId',''),g(this,_0x20e864(0x445),0x0),g(this,_0x20e864(0x259),this['state$'][_0x20e864(0x197)]((0x0,i[_0x20e864(0x187)])(_0x1a0c1a=>_0x1a0c1a?_0x1a0c1a[_0x20e864(0x399)]:_0x20e864(0x358)),(0x0,i['shareReplay'])({'bufferSize':0x1,'refCount':!0x0}))),g(this,_0x20e864(0x43b),!0x1),g(this,'_remoteChangesetQueue',[]);}async[_0x276f58(0x4a6)](){const _0x2a7f98=_0x276f58;if(this[_0x2a7f98(0x3fc)])throw Error(_0x2a7f98(0x36c));await this[_0x2a7f98(0x413)]();}[_0x276f58(0x298)](){const _0x1acc6f=_0x276f58;return this[_0x1acc6f(0x433)]=!0x0,(0x0,t['toDisposable'])(()=>{const _0xde1fdf=_0x1acc6f;this[_0xde1fdf(0x433)]=!0x1,this['_exhaustRemoteChangesetQueue']();});}[_0x276f58(0x41d)](_0x2020dc){const _0x4dcc4f=_0x276f58;this[_0x4dcc4f(0x19b)](_0x2020dc);}[_0x276f58(0x21b)](_0x17c1fc){const _0x2e4ebe=_0x276f58;this[_0x2e4ebe(0x3f0)]=_0x17c1fc,this[_0x2e4ebe(0x1f0)]['next'](_0x17c1fc);}async[_0x276f58(0x413)](){const _0x37d5ce=_0x276f58;if(this[_0x37d5ce(0x21b)](await this['_createInitialState']()),this[_0x37d5ce(0x33c)]){var _0x26fc39;(_0x26fc39=this[_0x37d5ce(0x33c)])==null||_0x26fc39[_0x37d5ce(0x393)](this[_0x37d5ce(0x32e)]),this[_0x37d5ce(0x419)](this[_0x37d5ce(0x33c)][_0x37d5ce(0x3e0)](this[_0x37d5ce(0x32e)])[_0x37d5ce(0x448)](_0x17d666=>{const _0x33b906=_0x37d5ce;this[_0x33b906(0x28b)][_0x33b906(0x2d1)](_0x33b906(0x1b9),_0x33b906(0x1cc),_0x17d666),_0x17d666===0x1?(this['_eventService'][_0x33b906(0x37a)]({'id':_0x33b906(0x43a)}),this['_permissionService']['updatePermissionPoint'](new r[(_0x33b906(0x20f))](this[_0x33b906(0x32e)])['id'],!0x1),this[_0x33b906(0x302)][_0x33b906(0x370)](!0x1)):(this[_0x33b906(0x302)][_0x33b906(0x333)](new r[(_0x33b906(0x20f))](this['unitID'])['id'],!0x0),this[_0x33b906(0x302)][_0x33b906(0x370)](!0x0));}));}let _0xb901eb=!0x1;return this[_0x37d5ce(0x419)](this[_0x37d5ce(0x245)]['sessionStatus$'][_0x37d5ce(0x448)](_0x24c71a=>{const _0x3760d2=_0x37d5ce;_0x24c71a===0x3?this[_0x3760d2(0x429)](_0xb901eb):_0x24c71a===0x2&&(_0xb901eb=!0x0,this['_toggleOffline']());})),this[_0x37d5ce(0x419)](this[_0x37d5ce(0x245)]['event$'][_0x37d5ce(0x448)](_0xd84465=>{const _0x33c40a=_0x37d5ce;try{switch(_0xd84465['eventID']){case e[_0x33c40a(0x275)][_0x33c40a(0x3a0)]:this[_0x33c40a(0x1b8)]((0x0,e[_0x33c40a(0x210)])(_0xd84465[_0x33c40a(0x41c)]));break;case e[_0x33c40a(0x275)][_0x33c40a(0x231)]:this[_0x33c40a(0x36b)](_0xd84465[_0x33c40a(0x41c)]);break;case e[_0x33c40a(0x275)][_0x33c40a(0x1aa)]:this[_0x33c40a(0x17f)]();break;case e[_0x33c40a(0x275)][_0x33c40a(0x296)]:this[_0x33c40a(0x33d)](_0xd84465[_0x33c40a(0x41c)]);break;case e[_0x33c40a(0x275)][_0x33c40a(0x2e4)]:this[_0x33c40a(0x405)](_0xd84465['data'][_0x33c40a(0x1a8)][_0x33c40a(0x187)](_0x17d5be=>(0x0,e[_0x33c40a(0x210)])(_0x17d5be)));break;case e[_0x33c40a(0x275)]['PERMISSION_REJ']:this[_0x33c40a(0x17f)]({'isPermissionRej':!0x0});break;case e[_0x33c40a(0x275)][_0x33c40a(0x476)]:}}catch(_0x2549b4){throw console[_0x33c40a(0x453)](_0x33c40a(0x241),_0x2549b4),_0x2549b4;}})),this[_0x37d5ce(0x3f0)];}[_0x276f58(0x1ea)](){const _0x4561ea=_0x276f58;this[_0x4561ea(0x43b)]=!0x1;}['_lockTransition'](){const _0x18369d=_0x276f58;if(this['_transitionLocked'])throw Error(_0x18369d(0x30c));this[_0x18369d(0x43b)]=!0x0;}[_0x276f58(0x19b)](_0x39386a){const _0x2e8368=_0x276f58;this['_lockTransition'](),this['_updateState'](this[_0x2e8368(0x3f0)][_0x2e8368(0x242)](_0x39386a)),this[_0x2e8368(0x1ea)]();}[_0x276f58(0x1b8)](_0x15f122){const _0x4509d2=_0x276f58;if(!(_0x15f122[_0x4509d2(0x43e)]<=this[_0x4509d2(0x199)][_0x4509d2(0x395)](this['unitID']))){if(this['_collaborationPaused']){this[_0x4509d2(0x268)]['push'](_0x15f122);return;}this['_applyRemoteChangeset'](_0x15f122);}}[_0x276f58(0x20b)](){const _0x207ac4=_0x276f58;this[_0x207ac4(0x268)][_0x207ac4(0x346)](_0x3ac86d=>this[_0x207ac4(0x269)](_0x3ac86d)),this[_0x207ac4(0x268)]=[];}[_0x276f58(0x269)](_0x1d1a5a){const _0x5c78e5=_0x276f58;let _0x356a32=this[_0x5c78e5(0x362)][_0x5c78e5(0x258)][_0x5c78e5(0x3c0)](this[_0x5c78e5(0x362)][_0x5c78e5(0x258)][_0x5c78e5(0x2e7)]()[_0x5c78e5(0x220)])(_0x1d1a5a[_0x5c78e5(0x230)],null)||_0x1d1a5a['mutations'],_0x17da87={..._0x1d1a5a,'mutations':_0x356a32};this[_0x5c78e5(0x31f)](),this[_0x5c78e5(0x21b)](this[_0x5c78e5(0x3f0)][_0x5c78e5(0x270)](_0x17da87)),this[_0x5c78e5(0x1ea)]();}[_0x276f58(0x36b)](_0x4ba03a){const _0x5a8ec5=_0x276f58;this['_lockTransition'](),this[_0x5a8ec5(0x21b)](this['_state'][_0x5a8ec5(0x25b)](_0x4ba03a)),this[_0x5a8ec5(0x1ea)]();}[_0x276f58(0x17f)](_0x52747f){const _0x3d29a1=_0x276f58;this[_0x3d29a1(0x31f)](),this['_updateState'](this[_0x3d29a1(0x3f0)][_0x3d29a1(0x3ea)](_0x52747f)),this[_0x3d29a1(0x1ea)]();}[_0x276f58(0x33d)](_0x511367){const _0x4cdfe3=_0x276f58;this[_0x4cdfe3(0x31f)](),this[_0x4cdfe3(0x21b)](this[_0x4cdfe3(0x3f0)]['onRemoteRetry'](_0x511367)),this[_0x4cdfe3(0x1ea)]();}[_0x276f58(0x405)](_0x1c303f){const _0x13006b=_0x276f58;if(!(this[_0x13006b(0x3f0)]instanceof N))throw TypeError('[CollaborationEntity]:\x20cannot\x20apply\x20missing\x20results\x20on\x20other\x20states!');let _0x32e528=_0x1c303f['map'](_0x57ce45=>{const _0x589309=_0x13006b;let _0x220ecd=this[_0x589309(0x362)][_0x589309(0x258)][_0x589309(0x3c0)](this[_0x589309(0x362)][_0x589309(0x258)][_0x589309(0x2e7)]()[_0x589309(0x220)])(_0x57ce45[_0x589309(0x230)],null)||_0x57ce45[_0x589309(0x230)];return{..._0x57ce45,'mutations':_0x220ecd};});this[_0x13006b(0x31f)](),this[_0x13006b(0x21b)](this[_0x13006b(0x3f0)][_0x13006b(0x189)](_0x32e528)),this[_0x13006b(0x1ea)]();}[_0x276f58(0x1e2)](){const _0x405700=_0x276f58;this['_lockTransition'](),this['_updateState'](this[_0x405700(0x3f0)][_0x405700(0x3a7)]()),this['_unlockTransition']();}[_0x276f58(0x429)](_0x5794c3=!0x1){const _0x21e845=_0x276f58;this[_0x21e845(0x31f)](),this[_0x21e845(0x21b)](this['_state']['toggleOnline']()),this[_0x21e845(0x1ea)]();let _0x80ee43=this['_state'];_0x5794c3&&_0x80ee43 instanceof D&&(this['_lockTransition'](),this[_0x21e845(0x21b)](_0x80ee43[_0x21e845(0x3f3)]()),this['_unlockTransition']());}async[_0x276f58(0x1fe)](){return new Promise(_0x397862=>{const _0x1ee2c4=_0x2c2f;this[_0x1ee2c4(0x245)]['sessionStatus$']['pipe']((0x0,i[_0x1ee2c4(0x312)])(0x1))[_0x1ee2c4(0x448)](async _0x41513b=>{const _0x19975f=_0x1ee2c4;_0x397862(await this[_0x19975f(0x49e)](_0x41513b===0x3));});});}[_0x276f58(0x1c3)](){let _0x542928=this['unitID'];return{'onStateChange':(_0x274964,_0x49839a)=>{const _0x36150f=_0x2c2f;if(_0x274964!==this[_0x36150f(0x3f0)])throw Error('[CollaborationEntity]:\x20invalid\x20state\x20transition!\x20State\x20transferred\x20from\x20is\x20not\x20the\x20current\x20state.\x0aBefore:\x20'+_0x274964['status']+_0x36150f(0x458)+_0x49839a[_0x36150f(0x399)]+_0x36150f(0x252)+this[_0x36150f(0x3f0)]['status']);this[_0x36150f(0x21b)](_0x49839a);},'onSendChangeset':_0xc88c53=>{const _0x1d1fda=_0x2c2f;_0xc88c53[_0x1d1fda(0x364)]||(_0xc88c53['sid']=this[_0x1d1fda(0x469)],_0xc88c53['reqId']=++this['_changesetReqId']);let _0x367a54={'eventID':e[_0x1d1fda(0x275)][_0x1d1fda(0x1c4)],'data':{'unitID':_0xc88c53['unitID'],'unitType':this[_0x1d1fda(0x314)],'changeset':_0xc88c53,'memberID':this['session']['getMemberID']()}};this[_0x1d1fda(0x245)][_0x1d1fda(0x3be)](_0x367a54,this[_0x1d1fda(0x32e)]);},'onMissingChangesets':({from:_0x42d193,to:_0x2643ee})=>{const _0x155dd9=_0x2c2f;this[_0x155dd9(0x28b)][_0x155dd9(0x2d1)](_0x155dd9(0x1b9),_0x155dd9(0x1e8)+_0x42d193+'\x20to\x20'+_0x2643ee);let _0x39b071={'eventID':e[_0x155dd9(0x275)][_0x155dd9(0x1d6)],'data':{'unitID':_0x542928,'unitType':this[_0x155dd9(0x314)],'from':_0x42d193,'to':_0x2643ee}};this[_0x155dd9(0x245)][_0x155dd9(0x3be)](_0x39b071,this[_0x155dd9(0x32e)]);}};}async['_createInitialStateImpl'](_0x42757f){const _0x2386d8=_0x276f58;var _0x2b4f34;let _0x13955f=await((_0x2b4f34=this[_0x2386d8(0x203)])==null?void 0x0:_0x2b4f34[_0x2386d8(0x222)](this[_0x2386d8(0x32e)])),_0x550585=(_0x13955f==null?void 0x0:_0x13955f[_0x2386d8(0x230)])??[],_0x28c518=(_0x13955f==null?void 0x0:_0x13955f[_0x2386d8(0x1b7)])??null,_0x22f6f2=!!(_0x28c518!=null&&_0x28c518[_0x2386d8(0x364)])&&!!(_0x28c518!=null&&_0x28c518[_0x2386d8(0x1df)]);this[_0x2386d8(0x469)]=_0x22f6f2?_0x28c518[_0x2386d8(0x364)]:(0x0,e['uuidv4'])(),this[_0x2386d8(0x445)]=_0x22f6f2?_0x28c518[_0x2386d8(0x1df)]:0x0;let _0x209403=this[_0x2386d8(0x32e)];try{this[_0x2386d8(0x291)](_0x28c518,_0x550585);}catch(_0x5bddc3){this['_logService']['error'](_0x5bddc3);}let _0x44204a=this[_0x2386d8(0x1c3)]();if(_0x42757f){let _0x3fe1d4=Ue(this[_0x2386d8(0x217)],_0x209403,this[_0x2386d8(0x314)],_0x28c518,_0x550585,_0x44204a);return _0x3fe1d4 instanceof O?_0x3fe1d4[_0x2386d8(0x1a0)]():(_0x3fe1d4 instanceof A||_0x3fe1d4 instanceof k)&&_0x3fe1d4[_0x2386d8(0x26c)](),_0x3fe1d4;}return this[_0x2386d8(0x217)][_0x2386d8(0x1f7)](M,_0x209403,this[_0x2386d8(0x314)],_0x28c518,_0x550585,_0x44204a);}['_replayCachedMutations'](_0x413c80,_0xd6e3bd){const _0x42425a=_0x276f58;var _0x50976c,_0x235446;let _0x38a6e1=this[_0x42425a(0x362)]['interceptor'][_0x42425a(0x3c0)](this[_0x42425a(0x362)][_0x42425a(0x258)][_0x42425a(0x2e7)]()[_0x42425a(0x220)]);(_0x50976c=_0x38a6e1((_0x413c80==null?void 0x0:_0x413c80[_0x42425a(0x230)])||[],null))==null||_0x50976c[_0x42425a(0x346)](_0x5b2a0b=>this[_0x42425a(0x280)][_0x42425a(0x211)](_0x5b2a0b['id'],_0x5b2a0b[_0x42425a(0x442)])),(_0x235446=_0x38a6e1(_0xd6e3bd||[],null))==null||_0x235446['forEach'](_0x5d148a=>this[_0x42425a(0x280)][_0x42425a(0x211)](_0x5d148a['id'],_0x5d148a[_0x42425a(0x442)]));}};P=y([v(0x3,(0x0,t[_0x276f58(0x318)])(t[_0x276f58(0x204)])),v(0x4,(0x0,t[_0x276f58(0x318)])(e[_0x276f58(0x3af)])),v(0x5,(0x0,t['Inject'])(t[_0x276f58(0x45e)])),v(0x6,(0x0,t[_0x276f58(0x318)])(e[_0x276f58(0x361)])),v(0x7,(0x0,t[_0x276f58(0x318)])(_)),v(0x8,t['IUniverInstanceService']),v(0x9,t[_0x276f58(0x48b)]),v(0xa,t[_0x276f58(0x2c9)]),v(0xb,t[_0x276f58(0x1ec)]),v(0xc,(0x0,t[_0x276f58(0x42b)])(C)),v(0xd,(0x0,t[_0x276f58(0x42b)])(x))],P);let F=class extends P{constructor(_0x480f68,_0x41e20b,_0x2070a4,_0x111461,_0xf60222,_0x2cd6fb,_0xbf2672,_0x2c77bb,_0x364957,_0x1fd2ae,_0x51c1d6,_0x11887f,_0x976ef5,_0x21df60,_0x642f70){const _0xdbc29f=_0x276f58;super(_0x480f68,_0x2070a4,_0x41e20b,_0x111461,_0xf60222,_0x2cd6fb,_0xbf2672,_0x2c77bb,_0x364957,_0x1fd2ae,_0x51c1d6,_0x11887f,_0x21df60,_0x642f70),this[_0xdbc29f(0x32e)]=_0x480f68,this[_0xdbc29f(0x4a2)]=_0x41e20b,this['_docStateChangeManagerService']=_0x976ef5,g(this,_0xdbc29f(0x3f6),null);}[_0x276f58(0x2e0)](_0x2a5891){const _0x293185=_0x276f58;this[_0x293185(0x3f6)]=_0x2a5891;}[_0x276f58(0x284)](){const _0x3a401c=_0x276f58;this[_0x3a401c(0x3f6)]=null,super['dispose']();}[_0x276f58(0x1c3)](){const _0x469fce=_0x276f58;let _0x289b14=super[_0x469fce(0x1c3)]();return _0x289b14[_0x469fce(0x37b)]=_0x381a3d=>{const _0x54fc69=_0x469fce;var _0x31af7e,_0x1c400c;return(_0x31af7e=this[_0x54fc69(0x3f6)])==null||(_0x1c400c=_0x31af7e[_0x54fc69(0x37b)])==null?void 0x0:_0x1c400c['call'](_0x31af7e,_0x381a3d);},_0x289b14[_0x469fce(0x1de)]=_0x1cbf35=>{const _0x17f9a6=_0x469fce;var _0x40f988,_0x8ce766;return(_0x40f988=this[_0x17f9a6(0x3f6)])==null||(_0x8ce766=_0x40f988[_0x17f9a6(0x1de)])==null?void 0x0:_0x8ce766[_0x17f9a6(0x3f8)](_0x40f988,_0x1cbf35);},_0x289b14[_0x469fce(0x486)]=_0x4f523e=>{const _0x38ac06=_0x469fce;var _0x3d33d7,_0x511c1f;return((_0x3d33d7=this[_0x38ac06(0x3f6)])==null||(_0x511c1f=_0x3d33d7[_0x38ac06(0x486)])==null?void 0x0:_0x511c1f[_0x38ac06(0x3f8)](_0x3d33d7,_0x4f523e))??null;},_0x289b14[_0x469fce(0x3bd)]=_0x18bc2d=>{const _0x5a23a0=_0x469fce;var _0x24e2e2,_0x5a5df6;return(_0x24e2e2=this[_0x5a23a0(0x3f6)])==null||(_0x5a5df6=_0x24e2e2[_0x5a23a0(0x3bd)])==null?void 0x0:_0x5a5df6['call'](_0x24e2e2,_0x18bc2d);},_0x289b14[_0x469fce(0x344)]=_0x5afdab=>{const _0x2e2a80=_0x469fce;var _0xcc5929,_0x4ffc19;return(_0xcc5929=this[_0x2e2a80(0x3f6)])==null||(_0x4ffc19=_0xcc5929['onSyncEditingCollabCursor'])==null?void 0x0:_0x4ffc19[_0x2e2a80(0x3f8)](_0xcc5929,_0x5afdab);},_0x289b14[_0x469fce(0x43f)]=_0x13e899=>{const _0x5a9b9b=_0x469fce;var _0x5bf965,_0x1dd281;return((_0x5bf965=this['_handlerCallback'])==null||(_0x1dd281=_0x5bf965['onTransformRemoteChangesetByIMECache'])==null?void 0x0:_0x1dd281[_0x5a9b9b(0x3f8)](_0x5bf965,_0x13e899))??_0x13e899;},_0x289b14['onTransformRemoteChangesetByStateCache']=_0x54dd65=>{const _0x5aec77=_0x469fce;var _0x23d8a1,_0x4518cd;return((_0x23d8a1=this[_0x5aec77(0x3f6)])==null||(_0x4518cd=_0x23d8a1[_0x5aec77(0x229)])==null?void 0x0:_0x4518cd['call'](_0x23d8a1,_0x54dd65))??_0x54dd65;},_0x289b14;}async['_init'](){const _0x17d68a=_0x276f58;let _0x45b80=await super[_0x17d68a(0x413)]();return this[_0x17d68a(0x419)](this['_docStateChangeManagerService']['docStateChange$']['subscribe'](_0x523547=>{const _0x2a903b=_0x17d68a;if(_0x523547==null||_0x523547[_0x2a903b(0x1cd)]!==this[_0x2a903b(0x32e)])return;let {commandId:_0x585828,redoState:_0x80e049,unitId:_0xfa5bdb}=_0x523547,_0x4500b9={'id':_0x585828,'type':t[_0x2a903b(0x1ed)][_0x2a903b(0x25f)],'params':{'unitId':_0xfa5bdb,'actions':_0x80e049['actions'],'textRanges':null}};this['_onLocalMutation'](_0x4500b9);})),this[_0x17d68a(0x419)](this['_commandService'][_0x17d68a(0x213)]((_0x484c73,_0x28d089)=>{const _0x2a8679=_0x17d68a;if(_0x484c73['type']!==t['CommandType'][_0x2a8679(0x25f)]||_0x28d089!=null&&_0x28d089['fromCollab']||_0x28d089!=null&&_0x28d089[_0x2a8679(0x32c)]||_0x484c73['id']===n[_0x2a8679(0x465)]['id'])return;let _0x2628c9=_0x484c73['params'];if((_0x2628c9==null?void 0x0:_0x2628c9[_0x2a8679(0x1cd)])!==this[_0x2a8679(0x32e)])return;let _0x491253=_0x484c73,_0x183201=this[_0x2a8679(0x362)]['interceptor'][_0x2a8679(0x3c0)](this['_compressMutationService'][_0x2a8679(0x258)][_0x2a8679(0x2e7)]()[_0x2a8679(0x4aa)])([_0x491253],this[_0x2a8679(0x37e)])||[_0x491253];this['_onLocalMutation'](_0x183201[0x0]);})),_0x45b80;}};F=y([v(0x3,(0x0,t[_0x276f58(0x318)])(t[_0x276f58(0x204)])),v(0x4,(0x0,t[_0x276f58(0x318)])(e['CompressMutationService'])),v(0x5,(0x0,t['Inject'])(t['LocaleService'])),v(0x6,(0x0,t[_0x276f58(0x318)])(e[_0x276f58(0x361)])),v(0x7,(0x0,t[_0x276f58(0x318)])(_)),v(0x8,t[_0x276f58(0x30b)]),v(0x9,t[_0x276f58(0x48b)]),v(0xa,t[_0x276f58(0x2c9)]),v(0xb,t[_0x276f58(0x1ec)]),v(0xc,(0x0,t[_0x276f58(0x318)])(n[_0x276f58(0x2af)])),v(0xd,(0x0,t[_0x276f58(0x42b)])(C)),v(0xe,(0x0,t[_0x276f58(0x42b)])(x))],F);let I=class extends P{constructor(_0x231be5,_0x247bf4,_0x3dbd9b,_0x132336,_0x33f8ac,_0x5e045b,_0x495ed8,_0xd1fc09,_0x52726f,_0x5702b5,_0x20b716,_0x5647ff,_0x150c0c,_0xd0579f){const _0xd909b8=_0x276f58;super(_0x231be5,_0x3dbd9b,_0x247bf4,_0x132336,_0x33f8ac,_0x5e045b,_0x495ed8,_0xd1fc09,_0x52726f,_0x5702b5,_0x20b716,_0x5647ff,_0x150c0c,_0xd0579f),this[_0xd909b8(0x32e)]=_0x231be5,this[_0xd909b8(0x4a2)]=_0x247bf4;}async[_0x276f58(0x413)](){const _0x58287d=_0x276f58;let _0x35e156=await super[_0x58287d(0x413)]();return this['disposeWithMe'](this[_0x58287d(0x280)]['onMutationExecutedForCollab']((_0x302b37,_0x1fadcc)=>{const _0x480cc1=_0x58287d;if(_0x302b37[_0x480cc1(0x4a2)]!==t[_0x480cc1(0x1ed)][_0x480cc1(0x25f)]||_0x1fadcc!=null&&_0x1fadcc[_0x480cc1(0x2b0)]||_0x1fadcc!=null&&_0x1fadcc[_0x480cc1(0x32c)])return;let _0x47ae8c=_0x302b37['params'];if((_0x47ae8c==null?void 0x0:_0x47ae8c[_0x480cc1(0x1cd)])!==this['unitID'])return;let _0x1f1b5b=_0x302b37,_0x43adb1=this['_compressMutationService']['interceptor'][_0x480cc1(0x3c0)](this[_0x480cc1(0x362)][_0x480cc1(0x258)][_0x480cc1(0x2e7)]()[_0x480cc1(0x4aa)])([_0x1f1b5b],this[_0x480cc1(0x37e)])||[_0x1f1b5b];this[_0x480cc1(0x19b)](_0x43adb1[0x0]);})),_0x35e156;}};I=y([v(0x3,(0x0,t[_0x276f58(0x318)])(t[_0x276f58(0x204)])),v(0x4,(0x0,t['Inject'])(e[_0x276f58(0x3af)])),v(0x5,(0x0,t['Inject'])(t[_0x276f58(0x45e)])),v(0x6,(0x0,t['Inject'])(e[_0x276f58(0x361)])),v(0x7,(0x0,t[_0x276f58(0x318)])(_)),v(0x8,t[_0x276f58(0x30b)]),v(0x9,t[_0x276f58(0x48b)]),v(0xa,t[_0x276f58(0x2c9)]),v(0xb,t[_0x276f58(0x1ec)]),v(0xc,(0x0,t[_0x276f58(0x42b)])(C)),v(0xd,(0x0,t[_0x276f58(0x42b)])(x))],I);let L=class extends P{constructor(_0x55b088,_0xd930cc,_0x52ff15,_0x148a4f,_0x22cea7,_0x55a29b,_0x4280a7,_0x1bd522,_0x1921f4,_0x3641f6,_0x373188,_0x18b000,_0x1d05f6,_0x513daf,_0x694a9b){const _0x1a4195=_0x276f58;super(_0x55b088,_0x52ff15,_0xd930cc,_0x148a4f,_0x22cea7,_0x55a29b,_0x4280a7,_0x1921f4,_0x3641f6,_0x373188,_0x18b000,_0x1d05f6,_0x513daf,_0x694a9b),this[_0x1a4195(0x32e)]=_0x55b088,this['type']=_0xd930cc,this['_sheetTransformSelectionsService']=_0x1bd522;}[_0x276f58(0x1c3)](){const _0x45b8f5=_0x276f58;let _0x5c6793=super[_0x45b8f5(0x1c3)]();return _0x5c6793['onTransformSelections']=_0x174bee=>this[_0x45b8f5(0x332)][_0x45b8f5(0x290)](_0x174bee),_0x5c6793;}async[_0x276f58(0x413)](){const _0x3f15a5=_0x276f58;let _0x1f887c=await super[_0x3f15a5(0x413)]();return this[_0x3f15a5(0x419)](this['_commandService'][_0x3f15a5(0x213)]((_0x112789,_0x26379f)=>{const _0x15e9d5=_0x3f15a5;if(_0x112789[_0x15e9d5(0x4a2)]!==t[_0x15e9d5(0x1ed)][_0x15e9d5(0x25f)]||_0x26379f!=null&&_0x26379f[_0x15e9d5(0x2b0)]||_0x26379f!=null&&_0x26379f['onlyLocal'])return;let _0x5c82a8=_0x112789['params'];if((_0x5c82a8==null?void 0x0:_0x5c82a8[_0x15e9d5(0x1cd)])!==this['unitID'])return;let _0x2c4b6b=_0x112789,_0x505063=this[_0x15e9d5(0x362)]['interceptor'][_0x15e9d5(0x3c0)](this[_0x15e9d5(0x362)][_0x15e9d5(0x258)][_0x15e9d5(0x2e7)]()[_0x15e9d5(0x4aa)])([_0x2c4b6b],this[_0x15e9d5(0x37e)])||[_0x2c4b6b];this[_0x15e9d5(0x19b)](_0x505063[0x0]);})),_0x1f887c;}};L=y([v(0x3,(0x0,t[_0x276f58(0x318)])(t['Injector'])),v(0x4,(0x0,t['Inject'])(e['CompressMutationService'])),v(0x5,(0x0,t['Inject'])(t[_0x276f58(0x45e)])),v(0x6,(0x0,t[_0x276f58(0x318)])(e[_0x276f58(0x361)])),v(0x7,(0x0,t[_0x276f58(0x318)])(S)),v(0x8,(0x0,t[_0x276f58(0x318)])(_)),v(0x9,t[_0x276f58(0x30b)]),v(0xa,t[_0x276f58(0x48b)]),v(0xb,t[_0x276f58(0x2c9)]),v(0xc,t[_0x276f58(0x1ec)]),v(0xd,(0x0,t[_0x276f58(0x42b)])(C)),v(0xe,(0x0,t[_0x276f58(0x42b)])(x))],L);let R=class extends P{constructor(_0x4dde14,_0x4a99a6,_0x1bfafa,_0x4ab045,_0x1ccd1d,_0x23496e,_0x231b0b,_0x297475,_0x3e734,_0x4c692e,_0x470c5c,_0x14f067,_0x4393fa,_0x3b1a12){const _0x1c2829=_0x276f58;super(_0x4dde14,_0x1bfafa,_0x4a99a6,_0x4ab045,_0x1ccd1d,_0x23496e,_0x231b0b,_0x297475,_0x3e734,_0x4c692e,_0x470c5c,_0x14f067,_0x4393fa,_0x3b1a12),this[_0x1c2829(0x32e)]=_0x4dde14,this[_0x1c2829(0x4a2)]=_0x4a99a6;}async[_0x276f58(0x413)](){const _0x1091dc=_0x276f58;let _0x4282be=await super['_init']();return this['disposeWithMe'](this['_commandService'][_0x1091dc(0x213)]((_0xa5945b,_0xabe971)=>{const _0x3425f5=_0x1091dc;if(_0xa5945b['type']!==t[_0x3425f5(0x1ed)][_0x3425f5(0x25f)]||_0xabe971!=null&&_0xabe971['fromCollab']||_0xabe971!=null&&_0xabe971[_0x3425f5(0x32c)])return;let _0x461e2d=_0xa5945b['params'];if((_0x461e2d==null?void 0x0:_0x461e2d['unitId'])!==this[_0x3425f5(0x32e)])return;let _0x4a53f8=_0xa5945b,_0x989a62=this[_0x3425f5(0x362)]['interceptor'][_0x3425f5(0x3c0)](this[_0x3425f5(0x362)]['interceptor'][_0x3425f5(0x2e7)]()[_0x3425f5(0x4aa)])([_0x4a53f8],this[_0x3425f5(0x37e)])||[_0x4a53f8];this[_0x3425f5(0x19b)](_0x989a62[0x0]);})),_0x4282be;}};R=y([v(0x3,(0x0,t[_0x276f58(0x318)])(t[_0x276f58(0x204)])),v(0x4,(0x0,t[_0x276f58(0x318)])(e[_0x276f58(0x3af)])),v(0x5,(0x0,t[_0x276f58(0x318)])(t['LocaleService'])),v(0x6,(0x0,t[_0x276f58(0x318)])(e[_0x276f58(0x361)])),v(0x7,(0x0,t[_0x276f58(0x318)])(_)),v(0x8,t[_0x276f58(0x30b)]),v(0x9,t['ILogService']),v(0xa,t[_0x276f58(0x2c9)]),v(0xb,t['IPermissionService']),v(0xc,(0x0,t['Optional'])(C)),v(0xd,(0x0,t['Optional'])(x))],R);let z=class extends P{constructor(_0x4fe86c,_0x2a7f58,_0x3e2b96,_0x48890f,_0x1a615a,_0x5964fd,_0x3799e1,_0x10fbc3,_0x5561e6,_0x8a2c2,_0x3c2775,_0x44cb23,_0x46a2fb,_0x376a6){const _0xbaeee=_0x276f58;super(_0x4fe86c,_0x3e2b96,_0x2a7f58,_0x48890f,_0x1a615a,_0x5964fd,_0x3799e1,_0x10fbc3,_0x5561e6,_0x8a2c2,_0x3c2775,_0x44cb23,_0x46a2fb,_0x376a6),this[_0xbaeee(0x32e)]=_0x4fe86c,this['type']=_0x2a7f58;}async[_0x276f58(0x413)](){const _0x3e636c=_0x276f58;let _0xa68b00=await super['_init']();return this[_0x3e636c(0x419)](this[_0x3e636c(0x280)][_0x3e636c(0x213)]((_0x23dbe7,_0x58e2d9)=>{const _0x4c57fc=_0x3e636c;if(_0x23dbe7[_0x4c57fc(0x4a2)]!==t[_0x4c57fc(0x1ed)]['MUTATION']||_0x58e2d9!=null&&_0x58e2d9[_0x4c57fc(0x2b0)]||_0x58e2d9!=null&&_0x58e2d9[_0x4c57fc(0x32c)])return;let _0x23fe16=_0x23dbe7[_0x4c57fc(0x442)];if((_0x23fe16==null?void 0x0:_0x23fe16[_0x4c57fc(0x1cd)])!==this[_0x4c57fc(0x32e)])return;let _0x12c979=_0x23dbe7,_0xabca43=this['_compressMutationService'][_0x4c57fc(0x258)][_0x4c57fc(0x3c0)](this[_0x4c57fc(0x362)]['interceptor']['getInterceptPoints']()[_0x4c57fc(0x4aa)])([_0x12c979],this[_0x4c57fc(0x37e)])||[_0x12c979];this[_0x4c57fc(0x19b)](_0xabca43[0x0]);})),_0xa68b00;}};z=y([v(0x3,(0x0,t['Inject'])(t[_0x276f58(0x204)])),v(0x4,(0x0,t['Inject'])(e[_0x276f58(0x3af)])),v(0x5,(0x0,t[_0x276f58(0x318)])(t[_0x276f58(0x45e)])),v(0x6,(0x0,t[_0x276f58(0x318)])(e[_0x276f58(0x361)])),v(0x7,(0x0,t[_0x276f58(0x318)])(_)),v(0x8,t[_0x276f58(0x30b)]),v(0x9,t[_0x276f58(0x48b)]),v(0xa,t[_0x276f58(0x2c9)]),v(0xb,t[_0x276f58(0x1ec)]),v(0xc,(0x0,t[_0x276f58(0x42b)])(C)),v(0xd,(0x0,t[_0x276f58(0x42b)])(x))],z);let B=class extends P{constructor(_0x5ee6df,_0x106297,_0x5b6218,_0x46baab,_0x146e85,_0x452d4b,_0x1c0f69,_0x1bcc9,_0x408eab,_0x5f0b51,_0x57c603,_0x3abb4d,_0x4af7b1,_0x8074e8){const _0x4020a2=_0x276f58;super(_0x5ee6df,_0x5b6218,_0x106297,_0x46baab,_0x146e85,_0x452d4b,_0x1c0f69,_0x1bcc9,_0x408eab,_0x5f0b51,_0x57c603,_0x3abb4d,_0x4af7b1,_0x8074e8),this['unitID']=_0x5ee6df,this[_0x4020a2(0x4a2)]=_0x106297;}async['_init'](){const _0xfc0b75=_0x276f58;let _0x232712=await super[_0xfc0b75(0x413)]();return this[_0xfc0b75(0x419)](this[_0xfc0b75(0x280)][_0xfc0b75(0x213)]((_0x300ac1,_0x8624a7)=>{const _0x6c7c00=_0xfc0b75;if(_0x300ac1[_0x6c7c00(0x4a2)]!==t[_0x6c7c00(0x1ed)][_0x6c7c00(0x25f)]||_0x8624a7!=null&&_0x8624a7[_0x6c7c00(0x2b0)]||_0x8624a7!=null&&_0x8624a7[_0x6c7c00(0x32c)])return;let _0x12498e=_0x300ac1[_0x6c7c00(0x442)];if((_0x12498e==null?void 0x0:_0x12498e[_0x6c7c00(0x1cd)])!==this[_0x6c7c00(0x32e)])return;let _0x7af169=_0x300ac1,_0x165eec=this[_0x6c7c00(0x362)][_0x6c7c00(0x258)][_0x6c7c00(0x3c0)](this['_compressMutationService'][_0x6c7c00(0x258)][_0x6c7c00(0x2e7)]()[_0x6c7c00(0x4aa)])([_0x7af169],this[_0x6c7c00(0x37e)])||[_0x7af169];this[_0x6c7c00(0x19b)](_0x165eec[0x0]);})),_0x232712;}};B=y([v(0x3,(0x0,t[_0x276f58(0x318)])(t[_0x276f58(0x204)])),v(0x4,(0x0,t['Inject'])(e['CompressMutationService'])),v(0x5,(0x0,t[_0x276f58(0x318)])(t[_0x276f58(0x45e)])),v(0x6,(0x0,t[_0x276f58(0x318)])(e[_0x276f58(0x361)])),v(0x7,(0x0,t['Inject'])(_)),v(0x8,t[_0x276f58(0x30b)]),v(0x9,t[_0x276f58(0x48b)]),v(0xa,t[_0x276f58(0x2c9)]),v(0xb,t[_0x276f58(0x1ec)]),v(0xc,(0x0,t['Optional'])(C)),v(0xd,(0x0,t[_0x276f58(0x42b)])(x))],B);const We=(0x0,t[_0x276f58(0x4ad)])(_0x276f58(0x3eb));function Ge(_0x2dcf7f){const _0x12d707=_0x276f58;let _0x40e5c2=_0x2dcf7f[_0x12d707(0x41c)],_0x2cf40b=JSON['parse'](_0x40e5c2);switch(_0x2cf40b[_0x12d707(0x1f1)]){case a[_0x12d707(0x193)][_0x12d707(0x33e)]:case a['CombCmd']['HELLO']:{let _0x84e16e=_0x2cf40b['infoRsp'];return{..._0x2cf40b,'data':_0x84e16e,'cmd':_0x2cf40b[_0x12d707(0x1f1)]};}case a[_0x12d707(0x193)][_0x12d707(0x383)]:{let _0x3e299b=_0x2cf40b[_0x12d707(0x292)];return{..._0x2cf40b,'data':_0x3e299b,'cmd':_0x2cf40b[_0x12d707(0x1f1)]};}case a['CombCmd'][_0x12d707(0x1ee)]:{let _0x3f352f=_0x2cf40b[_0x12d707(0x2e5)];switch(_0x3f352f[_0x12d707(0x2ce)]){case e[_0x12d707(0x275)][_0x12d707(0x37c)]:var _0x5a6063;return{..._0x2cf40b,'data':{..._0x3f352f,'data':(_0x5a6063=_0x3f352f[_0x12d707(0x1fd)])==null?void 0x0:_0x5a6063['cs']},'cmd':_0x2cf40b[_0x12d707(0x1f1)]};case e[_0x12d707(0x275)][_0x12d707(0x231)]:var _0xc3bf70;return{..._0x2cf40b,'data':{..._0x3f352f,'data':(_0xc3bf70=_0x3f352f[_0x12d707(0x3b3)])==null?void 0x0:_0xc3bf70['cs']},'cmd':_0x2cf40b[_0x12d707(0x1f1)]};case e[_0x12d707(0x275)][_0x12d707(0x3a0)]:var _0x5dab42;return{..._0x2cf40b,'data':{..._0x3f352f,'data':(_0x5dab42=_0x3f352f[_0x12d707(0x1f2)])==null?void 0x0:_0x5dab42['cs']},'cmd':_0x2cf40b[_0x12d707(0x1f1)]};case e[_0x12d707(0x275)][_0x12d707(0x1aa)]:var _0x5e06b4;return{..._0x2cf40b,'data':{..._0x3f352f,'data':(_0x5e06b4=_0x3f352f[_0x12d707(0x24a)])==null?void 0x0:_0x5e06b4['cs']},'cmd':_0x2cf40b[_0x12d707(0x1f1)]};case e['CollaborationEvent'][_0x12d707(0x296)]:var _0x9c51dd;return{..._0x2cf40b,'data':{..._0x3f352f,'data':(_0x9c51dd=_0x3f352f['csShouldRetryEvent'])==null?void 0x0:_0x9c51dd['cs']},'cmd':_0x2cf40b['cmd']};case e['CollaborationEvent'][_0x12d707(0x36d)]:return{..._0x2cf40b,'data':{..._0x3f352f,'data':_0x3f352f[_0x12d707(0x2f3)]},'cmd':_0x2cf40b[_0x12d707(0x1f1)]};case e[_0x12d707(0x275)][_0x12d707(0x234)]:return{..._0x2cf40b,'data':{..._0x3f352f,'data':_0x3f352f[_0x12d707(0x45a)]},'cmd':_0x2cf40b[_0x12d707(0x1f1)]};case e[_0x12d707(0x275)]['USERS_LEAVE']:return{..._0x2cf40b,'data':{..._0x3f352f,'data':_0x3f352f[_0x12d707(0x3ed)]},'cmd':_0x2cf40b[_0x12d707(0x1f1)]};case e['CollaborationEvent'][_0x12d707(0x194)]:return{..._0x2cf40b,'data':{..._0x3f352f,'data':_0x3f352f[_0x12d707(0x30a)]},'cmd':_0x2cf40b[_0x12d707(0x1f1)]};case e[_0x12d707(0x275)]['LIVESHARE_FETCH_OPERATIONS']:case e['CollaborationEvent'][_0x12d707(0x466)]:return{..._0x2cf40b,'data':{..._0x3f352f,'data':_0x3f352f['liveShareOperation']},'cmd':_0x2cf40b[_0x12d707(0x1f1)]};case e[_0x12d707(0x275)][_0x12d707(0x21d)]:return{..._0x2cf40b,'data':{..._0x3f352f,'data':_0x3f352f[_0x12d707(0x30a)]},'cmd':_0x2cf40b[_0x12d707(0x1f1)]};case e[_0x12d707(0x275)][_0x12d707(0x251)]:return{..._0x2cf40b,'data':_0x3f352f,'cmd':_0x2cf40b[_0x12d707(0x1f1)]};case e[_0x12d707(0x275)][_0x12d707(0x49b)]:return{..._0x2cf40b,'data':{..._0x3f352f,'data':_0x3f352f[_0x12d707(0x2ae)]},'cmd':_0x2cf40b['cmd']};case e[_0x12d707(0x275)]['UPDATE_PERMISSION_OBJ']:return{..._0x2cf40b,'data':{..._0x3f352f,'data':_0x3f352f['updatePermissionObjEvent']},'cmd':_0x2cf40b[_0x12d707(0x1f1)]};case e[_0x12d707(0x275)]['SHOULD_CLOSE_CONN']:return{..._0x2cf40b,'data':{..._0x3f352f,'data':_0x3f352f[_0x12d707(0x2f8)]},'cmd':_0x2cf40b[_0x12d707(0x1f1)]};case e[_0x12d707(0x275)]['UNISCRIPT_RUN']:return{..._0x2cf40b,'data':{..._0x3f352f,'data':_0x3f352f['uniscriptRunEvent']},'cmd':_0x2cf40b['cmd']};default:return _0x2cf40b;}}default:return _0x2cf40b;}}function Ke(_0x4d1667){const _0x9b41f1=_0x276f58;switch(_0x4d1667[_0x9b41f1(0x1f1)]){case a['CombCmd'][_0x9b41f1(0x33e)]:case a[_0x9b41f1(0x193)]['HELLO']:return JSON[_0x9b41f1(0x375)]({'cmd':_0x4d1667[_0x9b41f1(0x1f1)],'routeKey':_0x4d1667[_0x9b41f1(0x3a1)]});case a['CombCmd'][_0x9b41f1(0x279)]:{let _0x3d3765;switch(_0x4d1667[_0x9b41f1(0x41c)][_0x9b41f1(0x2ce)]){case e[_0x9b41f1(0x275)][_0x9b41f1(0x36d)]:_0x3d3765={'eventID':e[_0x9b41f1(0x275)]['UPDATE_CURSOR'],'updateCursorEvent':_0x4d1667['data'][_0x9b41f1(0x41c)]};break;case e[_0x9b41f1(0x275)][_0x9b41f1(0x435)]:_0x3d3765={'eventID':e['CollaborationEvent'][_0x9b41f1(0x435)],'leaveEvent':_0x4d1667[_0x9b41f1(0x41c)][_0x9b41f1(0x41c)]};break;case e[_0x9b41f1(0x275)][_0x9b41f1(0x234)]:_0x3d3765={'eventID':e[_0x9b41f1(0x275)]['USERS_ENTER'],'joinEvent':_0x4d1667[_0x9b41f1(0x41c)]['data']};break;case e[_0x9b41f1(0x275)][_0x9b41f1(0x194)]:_0x3d3765={'eventID':e['CollaborationEvent'][_0x9b41f1(0x194)],'liveShareNewHost':_0x4d1667[_0x9b41f1(0x41c)][_0x9b41f1(0x41c)]};break;case e[_0x9b41f1(0x275)][_0x9b41f1(0x466)]:_0x3d3765={'eventID':e[_0x9b41f1(0x275)]['LIVESHARE_OPERATION'],'liveShareOperation':_0x4d1667[_0x9b41f1(0x41c)][_0x9b41f1(0x41c)]};break;case e[_0x9b41f1(0x275)][_0x9b41f1(0x21d)]:_0x3d3765={'eventID':e[_0x9b41f1(0x275)]['LIVESHARE_TERMINATE'],'liveShareTerminate':_0x4d1667[_0x9b41f1(0x41c)][_0x9b41f1(0x41c)]};break;case e[_0x9b41f1(0x275)][_0x9b41f1(0x188)]:_0x3d3765={'eventID':e[_0x9b41f1(0x275)][_0x9b41f1(0x188)],'liveShareRequestHost':_0x4d1667['data'][_0x9b41f1(0x41c)]};break;case e[_0x9b41f1(0x275)][_0x9b41f1(0x1a5)]:_0x3d3765={'eventID':e[_0x9b41f1(0x275)][_0x9b41f1(0x1a5)]};break;default:_0x3d3765={'eventID':_0x4d1667[_0x9b41f1(0x41c)][_0x9b41f1(0x2ce)]};}return JSON[_0x9b41f1(0x375)]({'cmd':_0x4d1667['cmd'],'routeKey':_0x4d1667['routeKey'],'collaMsg':_0x3d3765});}case a['CombCmd'][_0x9b41f1(0x383)]:return JSON[_0x9b41f1(0x375)]({'cmd':_0x4d1667[_0x9b41f1(0x1f1)],'routeKey':_0x4d1667[_0x9b41f1(0x3a1)],'joinReq':_0x4d1667[_0x9b41f1(0x41c)]});case a[_0x9b41f1(0x193)]['LEAVE']:return JSON['stringify']({'cmd':_0x4d1667[_0x9b41f1(0x1f1)],'routeKey':_0x4d1667[_0x9b41f1(0x3a1)],'leaveReq':_0x4d1667['data']});default:throw Error(_0x9b41f1(0x49a));}}const qe=(0x0,t['createIdentifier'])(_0x276f58(0x388));function Je(_0x2a8336,_0x53eba4,_0x567f64){const _0x4a55ba=_0x276f58;return _0x2a8336+'/'+_0x53eba4+_0x4a55ba(0x316)+_0x567f64+_0x4a55ba(0x3b7);}let Ye=class extends t[_0x276f58(0x387)]{constructor(_0x35cb88,_0xbc6336,_0x3d5c66,_0x43a154,_0x120915){const _0xdcfb=_0x276f58;super(),this['_injector']=_0x35cb88,this['_httpService']=_0xbc6336,this[_0xdcfb(0x3bf)]=_0x3d5c66,this[_0xdcfb(0x28b)]=_0x43a154,this[_0xdcfb(0x2ea)]=_0x120915;}[_0x276f58(0x3d1)](_0x223061){const _0x33a84f=_0x276f58;let _0x409875=this[_0x33a84f(0x217)][_0x33a84f(0x24e)](l[_0x33a84f(0x1e3)]);if(!_0x409875)throw Error(_0x33a84f(0x1c5));let _0x351aa1=_0x409875[_0x33a84f(0x440)](_0x223061);if(!_0x351aa1)throw Error(_0x33a84f(0x379));let _0x31d194=new t[(_0x33a84f(0x354))](),_0x5a17b8=new i[(_0x33a84f(0x3b2))]();_0x31d194[_0x33a84f(0x30e)](_0x351aa1[_0x33a84f(0x44e)][_0x33a84f(0x448)](_0x10c4ce=>_0x5a17b8[_0x33a84f(0x267)](_0x10c4ce))),_0x31d194[_0x33a84f(0x30e)]((0x0,t['toDisposable'])(()=>_0x5a17b8[_0x33a84f(0x297)]()));let _0x580550=new i[(_0x33a84f(0x3b2))]();_0x31d194[_0x33a84f(0x30e)](_0x351aa1[_0x33a84f(0x274)][_0x33a84f(0x448)](_0x7a8556=>_0x580550[_0x33a84f(0x267)](_0x7a8556))),_0x31d194['add']((0x0,t[_0x33a84f(0x1dc)])(()=>_0x580550[_0x33a84f(0x297)]()));let _0x2a299b=new i['Subject']();_0x31d194[_0x33a84f(0x30e)](_0x351aa1[_0x33a84f(0x1c0)][_0x33a84f(0x448)](_0x5bbecc=>{const _0x5df8df=_0x33a84f;let _0x2572b9=Ge(_0x5bbecc);_0x2a299b[_0x5df8df(0x267)](_0x2572b9);})),_0x31d194[_0x33a84f(0x30e)]((0x0,t['toDisposable'])(()=>_0x2a299b[_0x33a84f(0x297)]()));let _0x24b367,_0xb8fff5=()=>{const _0x261172=_0x33a84f;_0x580550[_0x261172(0x267)](new Event('connection\x20error')),_0x5a17b8['next'](new Event(_0x261172(0x244))),_0x24b367['close']();};return _0x24b367={'memberID':'','close$':_0x5a17b8[_0x33a84f(0x446)](),'error$':_0x580550[_0x33a84f(0x446)](),'open$':_0x351aa1['open$'],'message$':_0x2a299b[_0x33a84f(0x446)](),'send':_0x114d30=>{const _0xa3c361=_0x33a84f;if(_0x114d30['cmd']===a[_0xa3c361(0x193)]['INGEST']){if(_0x114d30['data'][_0xa3c361(0x2ce)]===e[_0xa3c361(0x275)][_0xa3c361(0x1c4)]){this[_0xa3c361(0x226)](_0x24b367,_0x114d30[_0xa3c361(0x41c)])[_0xa3c361(0x48c)](_0x4e4757=>{const _0x591420=_0xa3c361;this['_logService'][_0x591420(0x453)](_0x4e4757),_0xb8fff5();});return;}if(_0x114d30[_0xa3c361(0x41c)][_0xa3c361(0x2ce)]===e[_0xa3c361(0x275)][_0xa3c361(0x1d6)]){let _0x34027d=_0x114d30[_0xa3c361(0x41c)];this[_0xa3c361(0x4b2)](_0x34027d)[_0xa3c361(0x40a)](_0x2b359e=>{const _0x4dc2bc=_0xa3c361;_0x2a299b[_0x4dc2bc(0x267)]({'cmd':a[_0x4dc2bc(0x193)][_0x4dc2bc(0x1ee)],'code':a['CmdRspCode']['OK'],'routeKey':_0x34027d[_0x4dc2bc(0x41c)][_0x4dc2bc(0x32e)],'routeType':'','data':{'eventID':e[_0x4dc2bc(0x275)][_0x4dc2bc(0x2e4)],'data':{'changesets':_0x2b359e}}});})[_0xa3c361(0x48c)](_0x7b5d7e=>{const _0x699b30=_0xa3c361;this[_0x699b30(0x28b)][_0x699b30(0x453)](_0x7b5d7e),_0xb8fff5();});return;}}_0x351aa1['send'](Ke(_0x114d30));},'close':()=>{const _0x5ee3d2=_0x33a84f;_0x351aa1[_0x5ee3d2(0x436)](),_0x31d194[_0x5ee3d2(0x284)]();}},_0x24b367;}async[_0x276f58(0x226)](_0x18e072,_0x4aaa71){const _0x477ee3=_0x276f58;let {unitType:_0x5c9ba2,unitID:_0x1199a6,changeset:_0x496dcd}=_0x4aaa71[_0x477ee3(0x41c)],_0x59d22a={'unitID':_0x1199a6,'memberID':_0x18e072[_0x477ee3(0x3cc)],'type':_0x5c9ba2,'changeset':(0x0,e['parseChangesetToProtocol'])(_0x496dcd)},_0x438558=this[_0x477ee3(0x3bf)][_0x477ee3(0x45f)](m),_0x445d0b=Je((_0x438558==null?void 0x0:_0x438558[_0x477ee3(0x350)])??_0x477ee3(0x224),_0x5c9ba2,_0x1199a6);try{await this[_0x477ee3(0x27e)][_0x477ee3(0x39e)](_0x445d0b,{'body':_0x59d22a});}catch(_0x2a9ae4){throw this[_0x477ee3(0x28b)][_0x477ee3(0x453)](_0x477ee3(0x182),_0x477ee3(0x3c7)),_0x2a9ae4;}}async['_fetchMissChangesets'](_0x459d4a){const _0x23b42f=_0x276f58;let {unitID:_0x536281,from:_0x30b68e,to:_0x3eb079,unitType:_0x4d78b6}=_0x459d4a[_0x23b42f(0x41c)];return(await this[_0x23b42f(0x2ea)][_0x23b42f(0x495)]({'metadata':void 0x0},{'unitID':_0x536281,'type':_0x4d78b6,'from':_0x30b68e,'to':_0x3eb079}))[_0x23b42f(0x1a8)][_0x23b42f(0x187)](_0x48c01c=>((_0x48c01c[_0x23b42f(0x230)]===null||_0x48c01c[_0x23b42f(0x230)]===void 0x0)&&(_0x48c01c[_0x23b42f(0x230)]=[]),_0x48c01c));}};Ye=y([v(0x0,(0x0,t[_0x276f58(0x318)])(t['Injector'])),v(0x1,(0x0,t[_0x276f58(0x318)])(l[_0x276f58(0x315)])),v(0x2,t[_0x276f58(0x1c6)]),v(0x3,t[_0x276f58(0x48b)]),v(0x4,e[_0x276f58(0x20e)])],Ye);const Xe=(0x0,t['createIdentifier'])('univer-pro.collaboration-client-adapter-service');function Ze(_0x56beda={}){const _0x47bbda=_0x276f58;return _0x56beda[_0x47bbda(0x2c7)]?{'resolveUnit':_0x56beda[_0x47bbda(0x2c7)]}:{'resolveUnit':_0x210064=>({'target':{'unitId':_0x210064[_0x47bbda(0x1cd)],'unitType':_0x210064[_0x47bbda(0x363)]}})};}function Qe(_0x297968,_0x3d3304,_0x19c662){const _0x45c5be=_0x276f58;let _0x106d79=_0x19c662[_0x45c5be(0x2ee)][_0x45c5be(0x41f)];if(_0x106d79!=null&&_0x106d79[_0x45c5be(0x293)]()==='')throw Error(_0x45c5be(0x31c));if(!_0x19c662['target'][_0x45c5be(0x1cd)])throw Error('COLLABORATION_SESSION_TARGET_UNIT_ID_REQUIRED');return{'localUnitId':_0x297968,'unitType':_0x3d3304,'target':{'endpoint':_0x106d79,'unitId':_0x19c662[_0x45c5be(0x2ee)]['unitId'],'unitType':_0x19c662[_0x45c5be(0x2ee)][_0x45c5be(0x363)]??_0x3d3304},'changeset':_0x19c662[_0x45c5be(0x208)]};}let V=class extends t[_0x276f58(0x387)]{constructor(_0x2848e9,_0x1f60c7,_0x1fe097,_0x170de3,_0xb19ccc,_0x456cf8,_0x501383){const _0x4630a4=_0x276f58;super(),this[_0x4630a4(0x217)]=_0x2848e9,this[_0x4630a4(0x28b)]=_0x1f60c7,this[_0x4630a4(0x3bf)]=_0x1fe097,this[_0x4630a4(0x2cb)]=_0x170de3,this[_0x4630a4(0x400)]=_0xb19ccc,this[_0x4630a4(0x26f)]=_0x456cf8,this[_0x4630a4(0x32f)]=_0x501383,g(this,_0x4630a4(0x3d9),new Map()),g(this,_0x4630a4(0x32a),new Map()),g(this,_0x4630a4(0x3c6),new Map()),g(this,_0x4630a4(0x468),new Map()),g(this,'socket$',this['_getSocketChannel'](void 0x0)[_0x4630a4(0x35f)][_0x4630a4(0x446)]()),g(this,_0x4630a4(0x3ee),new i['BehaviorSubject'](0x0)),g(this,'status$',this[_0x4630a4(0x3ee)][_0x4630a4(0x446)]()),this[_0x4630a4(0x46b)]();}[_0x276f58(0x46b)](){const _0x13b11a=_0x276f58;this[_0x13b11a(0x32f)]&&this['disposeWithMe'](this[_0x13b11a(0x32f)][_0x13b11a(0x2dd)]['subscribe'](_0x528951=>{const _0x3633cd=_0x13b11a;_0x528951&&this[_0x3633cd(0x238)](),_0x528951||this[_0x3633cd(0x468)][_0x3633cd(0x346)](_0x1e11ef=>this[_0x3633cd(0x331)](_0x1e11ef));}));}[_0x276f58(0x284)](){const _0x14a0df=_0x276f58;super[_0x14a0df(0x284)](),this[_0x14a0df(0x468)][_0x14a0df(0x346)](_0x562e26=>{const _0x2c8cff=_0x14a0df;var _0x3c817f,_0x14ee60;(_0x3c817f=_0x562e26[_0x2c8cff(0x1d5)])==null||_0x3c817f['unsubscribe'](),_0x562e26[_0x2c8cff(0x1d5)]=null,this[_0x2c8cff(0x1b1)](_0x562e26),this['_clearTimeoutTimer'](_0x562e26),this[_0x2c8cff(0x323)](_0x562e26),(_0x14ee60=_0x562e26[_0x2c8cff(0x35f)][_0x2c8cff(0x49d)]())==null||_0x14ee60[_0x2c8cff(0x436)](),_0x562e26[_0x2c8cff(0x35f)][_0x2c8cff(0x297)]();}),this[_0x14a0df(0x468)][_0x14a0df(0x4af)](),this[_0x14a0df(0x3d9)][_0x14a0df(0x346)](_0x6df02a=>_0x6df02a[_0x14a0df(0x284)]()),this['_sessions'][_0x14a0df(0x4af)](),this[_0x14a0df(0x3c6)][_0x14a0df(0x4af)](),this['_status$'][_0x14a0df(0x297)]();}async[_0x276f58(0x1d3)](_0xf6c793,_0x256054){const _0x12af1f=_0x276f58;if(this[_0x12af1f(0x3d9)]['has'](_0xf6c793))return this['_sessions'][_0x12af1f(0x24e)](_0xf6c793);let _0x9567e0=this[_0x12af1f(0x32a)][_0x12af1f(0x24e)](_0xf6c793);if(_0x9567e0)return _0x9567e0;let _0x2b3044=this[_0x12af1f(0x2b7)](_0xf6c793,_0x256054);this['_pendingSessions'][_0x12af1f(0x2b4)](_0xf6c793,_0x2b3044);try{return await _0x2b3044;}finally{this['_pendingSessions'][_0x12af1f(0x22c)](_0xf6c793);}}async[_0x276f58(0x2b7)](_0xc59f30,_0x24f84d){const _0xfdff9e=_0x276f58;let _0x2f29d1=await this['_resolveSessionIdentity'](_0xc59f30,_0x24f84d),_0x204826=this[_0xfdff9e(0x22d)](_0x2f29d1[_0xfdff9e(0x2ee)]['endpoint']);this[_0xfdff9e(0x2b6)](_0x204826);let _0x3eea3a=this[_0xfdff9e(0x217)][_0xfdff9e(0x1f7)](ve,_0x2f29d1,_0x204826['socket$'][_0xfdff9e(0x446)]());return this[_0xfdff9e(0x3d9)][_0xfdff9e(0x2b4)](_0xc59f30,_0x3eea3a),this[_0xfdff9e(0x3c6)][_0xfdff9e(0x2b4)](_0xc59f30,_0x204826['endpointKey']),_0x3eea3a;}[_0x276f58(0x28a)](_0x1823b8){const _0x494ad7=_0x276f58;let _0x3885df=this[_0x494ad7(0x3d9)][_0x494ad7(0x24e)](_0x1823b8),_0x5317d0=this[_0x494ad7(0x3c6)]['get'](_0x1823b8);if(_0x3885df&&(this[_0x494ad7(0x3d9)][_0x494ad7(0x22c)](_0x1823b8),this[_0x494ad7(0x3c6)][_0x494ad7(0x22c)](_0x1823b8),_0x3885df[_0x494ad7(0x436)]()),_0x5317d0&&!this[_0x494ad7(0x38f)](_0x5317d0)){var _0x1d472c;let _0x416979=this[_0x494ad7(0x468)][_0x494ad7(0x24e)](_0x5317d0);_0x416979==null||(_0x1d472c=_0x416979[_0x494ad7(0x35f)]['getValue']())==null||_0x1d472c[_0x494ad7(0x436)]();}}[_0x276f58(0x238)](){const _0x50afd0=_0x276f58;(this[_0x50afd0(0x468)][_0x50afd0(0x410)]?[...this[_0x50afd0(0x468)][_0x50afd0(0x3c2)]()]:[this[_0x50afd0(0x22d)](void 0x0)])[_0x50afd0(0x346)](_0x98da84=>{const _0x40159e=_0x50afd0;_0x98da84[_0x40159e(0x1f4)]=0x0,this[_0x40159e(0x1b1)](_0x98da84),this['_tryReconnect'](_0x98da84);});}[_0x276f58(0x1b1)](_0x55ddff){const _0xd5bda7=_0x276f58;_0x55ddff[_0xd5bda7(0x1ff)]!=null&&(clearTimeout(_0x55ddff['retryConnectingTimer']),_0x55ddff[_0xd5bda7(0x1ff)]=null);}async[_0x276f58(0x3da)](_0x21dbc2){const _0xf777eb=_0x276f58;let _0x3e3f19=this['_configService']['getConfig'](m),_0x287659=_0x21dbc2[_0xf777eb(0x41f)]??(_0x3e3f19==null?void 0x0:_0x3e3f19[_0xf777eb(0x3e7)])??_0xf777eb(0x2c5),_0x347cab=await this[_0xf777eb(0x2cb)][_0xf777eb(0x440)](_0x287659);return _0x21dbc2[_0xf777eb(0x1bf)]=_0x347cab,_0x347cab;}async[_0x276f58(0x2b6)](_0x5eee72){const _0x389e9b=_0x276f58;try{let _0x492f73=_0x5eee72[_0x389e9b(0x35f)][_0x389e9b(0x49d)]()??_0x5eee72[_0x389e9b(0x1bf)]??await this[_0x389e9b(0x3da)](_0x5eee72);if(_0x492f73){var _0x3e268c;let _0x53bf1f=_0x492f73[_0x389e9b(0x3be)];_0x492f73['send']=_0x3a56e5=>(_0x3a56e5[_0x389e9b(0x1f1)]!==a[_0x389e9b(0x193)][_0x389e9b(0x3d0)]&&this[_0x389e9b(0x2c4)](_0x5eee72),_0x53bf1f[_0x389e9b(0x41b)](_0x492f73,[_0x3a56e5])),(_0x3e268c=_0x5eee72[_0x389e9b(0x1d5)])==null||_0x3e268c['unsubscribe'](),_0x5eee72[_0x389e9b(0x1d5)]=null,_0x5eee72[_0x389e9b(0x1d5)]=_0x492f73[_0x389e9b(0x1c0)]['subscribe'](_0x56af07=>this['_onMessage'](_0x5eee72,_0x492f73,_0x56af07)),_0x492f73[_0x389e9b(0x274)]['pipe']((0x0,s[_0x389e9b(0x312)])(0x1))[_0x389e9b(0x448)](_0x64d046=>this['_logService'][_0x389e9b(0x453)]('[CollaborationSessionService]:\x20socket\x20error',_0x64d046)),_0x492f73[_0x389e9b(0x411)]['pipe']((0x0,s[_0x389e9b(0x312)])(0x1))[_0x389e9b(0x448)](()=>{const _0x59cd38=_0x389e9b;this[_0x59cd38(0x28f)](_0x5eee72,_0x492f73);}),_0x492f73['close$'][_0x389e9b(0x197)]((0x0,s[_0x389e9b(0x312)])(0x1))[_0x389e9b(0x448)](_0x4ff610=>{const _0x2caa48=_0x389e9b;this['_logService'][_0x2caa48(0x2d1)](_0x2caa48(0x239),_0x2caa48(0x470),_0x4ff610),this[_0x2caa48(0x397)](_0x5eee72);});}}catch(_0x1cd711){this['_logService']['error'](_0x1cd711),this['_onConnectionFailed'](_0x5eee72);}}[_0x276f58(0x28f)](_0x1f518f,_0x41a292){const _0x4f91a3=_0x276f58;this['_logService']['debug']('[CollaborationSessionService]',_0x4f91a3(0x3dd)),_0x41a292[_0x4f91a3(0x3be)]({'cmd':a[_0x4f91a3(0x193)][_0x4f91a3(0x336)]}),this[_0x4f91a3(0x2c4)](_0x1f518f);}[_0x276f58(0x331)](_0x5daabb){const _0x13358c=_0x276f58;_0x5daabb[_0x13358c(0x3ff)]=!0x1,_0x5daabb['candidateSocket']=null,this[_0x13358c(0x3ee)][_0x13358c(0x267)](0x2),_0x5daabb[_0x13358c(0x35f)][_0x13358c(0x267)](null),this[_0x13358c(0x36e)](_0x5daabb),this[_0x13358c(0x323)](_0x5daabb);}[_0x276f58(0x397)](_0x482877){const _0xc57d23=_0x276f58;this[_0xc57d23(0x331)](_0x482877),this[_0xc57d23(0x38f)](_0x482877[_0xc57d23(0x237)])&&(_0x482877[_0xc57d23(0x1f4)]<(this[_0xc57d23(0x3bf)][_0xc57d23(0x45f)](_0xc57d23(0x3e9))??0x3)?(this[_0xc57d23(0x400)][_0xc57d23(0x37a)]({'id':_0xc57d23(0x227)}),this[_0xc57d23(0x1b6)](_0x482877)):this['_collaborationUIEventService'][_0xc57d23(0x37a)]({'id':'SOCKET_FAILED'}));}[_0x276f58(0x1b6)](_0x1082b4){const _0x4b7dd0=_0x276f58;let _0x2b9b10=_0x1082b4[_0x4b7dd0(0x1f4)],_0x3df214=this[_0x4b7dd0(0x3bf)]['getConfig'](m),_0x1d4d22=_0x2b9b10===0x0?0x0:((_0x3df214==null?void 0x0:_0x3df214[_0x4b7dd0(0x271)])??0x4e20)*0x2**_0x2b9b10;_0x1082b4[_0x4b7dd0(0x1ff)]=setTimeout(()=>{const _0x132b5a=_0x4b7dd0;clearTimeout(_0x1082b4[_0x132b5a(0x1ff)]),_0x1082b4[_0x132b5a(0x1ff)]=null,this[_0x132b5a(0x2b6)](_0x1082b4);},_0x1d4d22),_0x1082b4[_0x4b7dd0(0x1f4)]+=0x1;}async[_0x276f58(0x191)](_0x5e12be,_0x5c1893){const _0x35d088=_0x276f58;return Qe(_0x5e12be,_0x5c1893,await this[_0x35d088(0x26f)][_0x35d088(0x2c7)]({'unitId':_0x5e12be,'unitType':_0x5c1893}));}[_0x276f58(0x2fb)](_0x455072,_0x40bada,_0xf222b5){const _0x1ed201=_0x276f58;let {cmd:_0x17f33a}=_0xf222b5;_0x17f33a===a[_0x1ed201(0x193)][_0x1ed201(0x336)]&&!_0x455072[_0x1ed201(0x3ff)]&&(_0x40bada['memberID']=_0xf222b5[_0x1ed201(0x41c)][_0x1ed201(0x3cc)],_0x455072['retryCount']=0x0,_0x455072[_0x1ed201(0x35f)][_0x1ed201(0x267)](_0x40bada),this[_0x1ed201(0x3ee)][_0x1ed201(0x267)](0x3),_0x455072[_0x1ed201(0x3ff)]=!0x0,_0x455072['candidateSocket']=null),_0x17f33a===a[_0x1ed201(0x193)][_0x1ed201(0x33e)]&&this['_clearTimeoutTimer'](_0x455072),this[_0x1ed201(0x2c4)](_0x455072);}['_hasSessionsForEndpoint'](_0x3fb94b){const _0x1f556a=_0x276f58;return[...this[_0x1f556a(0x3c6)][_0x1f556a(0x3c2)]()][_0x1f556a(0x3ad)](_0x4133cb=>_0x4133cb===_0x3fb94b);}[_0x276f58(0x22d)](_0x544ca5){const _0x116f3c=_0x276f58;let _0x1b1beb=_0x544ca5??'',_0x10a522=this['_socketChannels'][_0x116f3c(0x24e)](_0x1b1beb);if(_0x10a522)return _0x10a522;let _0x1fac9c={'endpointKey':_0x1b1beb,'endpoint':_0x544ca5,'socket$':new i[(_0x116f3c(0x218))](void 0x0),'candidateSocket':null,'socketReady':!0x1,'socketMessageSubscription':null,'retryConnectingTimer':null,'retryCount':0x0,'sendHeartbeatTimer':null,'timeoutTimer':null};return this['_socketChannels']['set'](_0x1b1beb,_0x1fac9c),_0x1fac9c;}[_0x276f58(0x2c4)](_0x4612c7){const _0x56cbbe=_0x276f58;this[_0x56cbbe(0x323)](_0x4612c7),_0x4612c7['sendHeartbeatTimer']=setTimeout(()=>this[_0x56cbbe(0x324)](_0x4612c7),this['_configService'][_0x56cbbe(0x45f)](_0x56cbbe(0x25e))??0x7530);}[_0x276f58(0x324)](_0x25ca1e){const _0x4f6eca=_0x276f58;_0x25ca1e[_0x4f6eca(0x35f)]['getValue']()[_0x4f6eca(0x3be)]({'cmd':a[_0x4f6eca(0x193)][_0x4f6eca(0x33e)]}),this['_waitForHeartbeatResponse'](_0x25ca1e);}[_0x276f58(0x498)](_0x51debd){const _0x198c80=_0x276f58;_0x51debd[_0x198c80(0x310)]=setTimeout(()=>this[_0x198c80(0x397)](_0x51debd),this[_0x198c80(0x3bf)][_0x198c80(0x45f)]('HEARTBEAT_TIMEOUT')??0x4e20);}['_clearHeartbeatTimer'](_0x25b477){const _0x54e94a=_0x276f58;_0x25b477['sendHeartbeatTimer']!=null&&(clearTimeout(_0x25b477[_0x54e94a(0x499)]),_0x25b477[_0x54e94a(0x499)]=null);}[_0x276f58(0x36e)](_0xcf6798){const _0x30e854=_0x276f58;_0xcf6798[_0x30e854(0x310)]!=null&&(clearTimeout(_0xcf6798['timeoutTimer']),_0xcf6798[_0x30e854(0x310)]=null);}};V=y([v(0x0,(0x0,t[_0x276f58(0x318)])(t[_0x276f58(0x204)])),v(0x1,t[_0x276f58(0x48b)]),v(0x2,t['IConfigService']),v(0x3,qe),v(0x4,(0x0,t['Inject'])(_)),v(0x5,Xe),v(0x6,(0x0,t[_0x276f58(0x42b)])(We))],V);let H=class extends t['RxDisposable']{constructor(_0x2d2677,_0x1059e0,_0x5d42e0,_0x5b3afd){const _0x43eb25=_0x276f58;var _0x49861d;super(),this[_0x43eb25(0x217)]=_0x2d2677,this[_0x43eb25(0x3bb)]=_0x1059e0,this[_0x43eb25(0x3bf)]=_0x5d42e0,this[_0x43eb25(0x37e)]=_0x5b3afd,g(this,_0x43eb25(0x278),new Map()),g(this,_0x43eb25(0x29e),new i[(_0x43eb25(0x3b2))]()),g(this,_0x43eb25(0x184),this[_0x43eb25(0x29e)][_0x43eb25(0x446)]()),((_0x49861d=this['_configService'][_0x43eb25(0x45f)](_0x43eb25(0x2bb)))==null?void 0x0:_0x49861d[_0x43eb25(0x19a)])!==!0x1&&this[_0x43eb25(0x413)]();}[_0x276f58(0x284)](){const _0x3dcfb9=_0x276f58;super[_0x3dcfb9(0x284)](),this[_0x3dcfb9(0x278)][_0x3dcfb9(0x346)](_0x59fafe=>_0x59fafe[_0x3dcfb9(0x284)]()),this['_entities'][_0x3dcfb9(0x4af)]();}[_0x276f58(0x272)](_0x2dd381){const _0x52b39c=_0x276f58;return this['_entities'][_0x52b39c(0x24e)](_0x2dd381)??null;}['getCollabEntity$'](_0x24a97c){const _0x24a16d=_0x276f58;let _0xe7dcac=this[_0x24a16d(0x272)](_0x24a97c);return _0xe7dcac?(0x0,i['of'])(_0xe7dcac):this[_0x24a16d(0x29e)][_0x24a16d(0x197)]((0x0,s[_0x24a16d(0x262)])(_0x252c76=>_0x252c76['unitID']===_0x24a97c));}[_0x276f58(0x216)](_0x4a7c8d){const _0xb77ebe=_0x276f58;return(0x0,i[_0xb77ebe(0x263)])(this[_0xb77ebe(0x377)](_0x4a7c8d)[_0xb77ebe(0x197)]((0x0,s[_0xb77ebe(0x187)])(()=>void 0x0)));}['_init'](){const _0x97f1ae=_0x276f58;this[_0x97f1ae(0x37e)][_0x97f1ae(0x18d)](t[_0x97f1ae(0x35c)][_0x97f1ae(0x261)])[_0x97f1ae(0x197)]((0x0,i[_0x97f1ae(0x1d7)])(this[_0x97f1ae(0x34b)]),(0x0,s[_0x97f1ae(0x46d)])(0x10))[_0x97f1ae(0x448)](async _0x3b4b10=>{const _0x6ca85f=_0x97f1ae;let _0x2ff040=_0x3b4b10[_0x6ca85f(0x20a)][_0x6ca85f(0x2d6)](),_0x1cc812=await this[_0x6ca85f(0x2c8)](_0x2ff040,t[_0x6ca85f(0x35c)][_0x6ca85f(0x261)]);this['_entities']['set'](_0x2ff040,_0x1cc812);}),this[_0x97f1ae(0x37e)]['getTypeOfUnitAdded$'](t[_0x97f1ae(0x35c)]['UNIVER_DOC'])[_0x97f1ae(0x197)]((0x0,i[_0x97f1ae(0x1d7)])(this[_0x97f1ae(0x34b)]),(0x0,s['delay'])(0x10))[_0x97f1ae(0x197)]((0x0,s[_0x97f1ae(0x262)])(_0x26355b=>!_0x26355b[_0x97f1ae(0x20a)]['getUnitId']()[_0x97f1ae(0x1c1)]('__')))[_0x97f1ae(0x448)](async _0x54d8b3=>{const _0x328b90=_0x97f1ae;let _0x4eee36=_0x54d8b3[_0x328b90(0x20a)][_0x328b90(0x2d6)](),_0x22fa29=await this[_0x328b90(0x2c8)](_0x4eee36,t[_0x328b90(0x35c)][_0x328b90(0x21f)]);this[_0x328b90(0x278)][_0x328b90(0x2b4)](_0x4eee36,_0x22fa29);}),this['_univerInstanceService'][_0x97f1ae(0x18d)](t[_0x97f1ae(0x35c)][_0x97f1ae(0x382)])[_0x97f1ae(0x197)]((0x0,i[_0x97f1ae(0x1d7)])(this['dispose$']),(0x0,s[_0x97f1ae(0x46d)])(0x10))[_0x97f1ae(0x448)](async _0x3fc84d=>{const _0x3acc06=_0x97f1ae;let _0x19cda3=_0x3fc84d['unit'][_0x3acc06(0x2d6)](),_0x37058f=await this[_0x3acc06(0x2c8)](_0x19cda3,t[_0x3acc06(0x35c)][_0x3acc06(0x382)]);this[_0x3acc06(0x278)]['set'](_0x19cda3,_0x37058f);}),this[_0x97f1ae(0x37e)][_0x97f1ae(0x18d)](t['UniverInstanceType']['UNIVER_BOARD'])[_0x97f1ae(0x197)]((0x0,i['takeUntil'])(this[_0x97f1ae(0x34b)]),(0x0,s[_0x97f1ae(0x46d)])(0x10))[_0x97f1ae(0x448)](async _0x3664d9=>{const _0x133308=_0x97f1ae;let _0x520ddc=_0x3664d9['unit'][_0x133308(0x2d6)](),_0x47009a=await this[_0x133308(0x2c8)](_0x520ddc,t['UniverInstanceType'][_0x133308(0x454)]);this['_entities']['set'](_0x520ddc,_0x47009a);}),this[_0x97f1ae(0x37e)][_0x97f1ae(0x18d)](t[_0x97f1ae(0x35c)][_0x97f1ae(0x437)])[_0x97f1ae(0x197)]((0x0,i[_0x97f1ae(0x1d7)])(this[_0x97f1ae(0x34b)]),(0x0,s[_0x97f1ae(0x46d)])(0x10))['subscribe'](async _0x1e81c8=>{const _0x4df998=_0x97f1ae;let _0x4af653=_0x1e81c8[_0x4df998(0x20a)][_0x4df998(0x2d6)](),_0x4c9827=await this['_startCollaboration'](_0x4af653,t['UniverInstanceType'][_0x4df998(0x437)]);this[_0x4df998(0x278)][_0x4df998(0x2b4)](_0x4af653,_0x4c9827);}),this[_0x97f1ae(0x37e)][_0x97f1ae(0x18d)](t['UniverInstanceType']['UNIVER_PDF'])[_0x97f1ae(0x197)]((0x0,i['takeUntil'])(this[_0x97f1ae(0x34b)]),(0x0,s['delay'])(0x10))[_0x97f1ae(0x448)](async _0x5aac81=>{const _0x5e2e63=_0x97f1ae;let _0x38f780=_0x5aac81[_0x5e2e63(0x20a)][_0x5e2e63(0x2d6)](),_0x53c16e=await this[_0x5e2e63(0x2c8)](_0x38f780,t[_0x5e2e63(0x35c)][_0x5e2e63(0x378)]);this[_0x5e2e63(0x278)][_0x5e2e63(0x2b4)](_0x38f780,_0x53c16e);}),(0x0,i[_0x97f1ae(0x447)])(this[_0x97f1ae(0x37e)][_0x97f1ae(0x26e)](t[_0x97f1ae(0x35c)]['UNIVER_SHEET']),this[_0x97f1ae(0x37e)][_0x97f1ae(0x26e)](t[_0x97f1ae(0x35c)]['UNIVER_DOC']),this[_0x97f1ae(0x37e)][_0x97f1ae(0x26e)](t['UniverInstanceType'][_0x97f1ae(0x382)]),this[_0x97f1ae(0x37e)]['getTypeOfUnitDisposed$'](t[_0x97f1ae(0x35c)][_0x97f1ae(0x454)]),this[_0x97f1ae(0x37e)][_0x97f1ae(0x26e)](t[_0x97f1ae(0x35c)]['UNIVER_BASE']),this[_0x97f1ae(0x37e)]['getTypeOfUnitDisposed$'](t[_0x97f1ae(0x35c)][_0x97f1ae(0x378)]))['pipe']((0x0,i[_0x97f1ae(0x1d7)])(this['dispose$']))[_0x97f1ae(0x448)](_0x2bda56=>{const _0x2598c4=_0x97f1ae;let _0x22ed15=_0x2bda56[_0x2598c4(0x2d6)](),_0x4e1e66=this[_0x2598c4(0x278)][_0x2598c4(0x24e)](_0x22ed15);_0x4e1e66&&(_0x4e1e66['dispose'](),this[_0x2598c4(0x278)][_0x2598c4(0x22c)](_0x22ed15));});}async['_startCollaboration'](_0x1e5aa5,_0x5baa9c){const _0xdee492=_0x276f58;let _0x3c4f71=await this[_0xdee492(0x3bb)]['requireSession'](_0x1e5aa5),_0x4af628=this[_0xdee492(0x217)][_0xdee492(0x1f7)](this[_0xdee492(0x3a3)](_0x5baa9c),_0x1e5aa5,_0x5baa9c,_0x3c4f71);return await _0x4af628[_0xdee492(0x4a6)](),this[_0xdee492(0x29e)][_0xdee492(0x267)](_0x4af628),_0x4af628;}['_getCtorByUniverInstanceType'](_0x329e9b){const _0x81cda7=_0x276f58;switch(_0x329e9b){case t[_0x81cda7(0x35c)][_0x81cda7(0x21f)]:return F;case t[_0x81cda7(0x35c)][_0x81cda7(0x261)]:return L;case t[_0x81cda7(0x35c)][_0x81cda7(0x382)]:return R;case t[_0x81cda7(0x35c)][_0x81cda7(0x454)]:return z;case t[_0x81cda7(0x35c)][_0x81cda7(0x437)]:return I;case t['UniverInstanceType']['UNIVER_PDF']:return B;default:throw Error(_0x81cda7(0x25c)+_0x329e9b);}}};H=y([v(0x0,(0x0,t[_0x276f58(0x318)])(t['Injector'])),v(0x1,(0x0,t['Inject'])(V)),v(0x2,t[_0x276f58(0x1c6)]),v(0x3,t[_0x276f58(0x30b)])],H);var $e=_0x276f58(0x2d4),et=_0x276f58(0x48e);let tt=class extends t[_0x276f58(0x387)]{constructor(_0x30feea,_0x1ba4ab){const _0x244159=_0x276f58;super(),this['_univerInstanceService']=_0x30feea,this[_0x244159(0x3bf)]=_0x1ba4ab,this[_0x244159(0x413)]();}[_0x276f58(0x413)](){const _0xabbcec=_0x276f58;this['disposeWithMe'](this[_0xabbcec(0x37e)][_0xabbcec(0x19f)][_0xabbcec(0x448)](()=>{const _0x6c0a9a=_0xabbcec;let _0x43d9a2=this['_univerInstanceService'][_0x6c0a9a(0x3ac)](),_0x3f4477=this[_0x6c0a9a(0x3bf)][_0x6c0a9a(0x45f)](_0x6c0a9a(0x2be))??'Univer';_0x43d9a2 instanceof t[_0x6c0a9a(0x40f)]&&(_0x3f4477=_0x43d9a2[_0x6c0a9a(0x349)]),document['title']=_0x3f4477;}));}};tt=y([v(0x0,t[_0x276f58(0x30b)]),v(0x1,t[_0x276f58(0x1c6)])],tt);const nt=(0x0,t[_0x276f58(0x4ad)])(_0x276f58(0x385));let U=class{constructor(_0x2eb7b9,_0x316437,_0x1203a9){const _0x3432b8=_0x276f58;this[_0x3432b8(0x27e)]=_0x2eb7b9,this[_0x3432b8(0x3bf)]=_0x316437,this['_univerInstanceService']=_0x1203a9;}[_0x276f58(0x307)](){const _0x108c75=_0x276f58;return this[_0x108c75(0x49c)]()['attachment']??{};}async['saveAttachment'](_0x1b9d35){const _0x51f923=_0x276f58;let _0x1e5107=this['getUploadOptions']();if(rt(_0x1b9d35,_0x1e5107),_0x1e5107['upload'])return _0x1e5107[_0x51f923(0x250)](_0x1b9d35);let _0x9d3646=await this[_0x51f923(0x3f5)](_0x1b9d35);return{'id':_0x9d3646,'name':_0x1b9d35[_0x51f923(0x349)],'mimeType':_0x1b9d35['type'],'size':_0x1b9d35[_0x51f923(0x410)],'sourceType':t[_0x51f923(0x247)][_0x51f923(0x38b)],'source':_0x9d3646};}async[_0x276f58(0x47d)](_0x4d8cc8,_0x5f3265){const _0x238de7=_0x276f58;if(_0x5f3265!==t[_0x238de7(0x247)][_0x238de7(0x38b)])return _0x4d8cc8;let _0x5cdb3e=(await this[_0x238de7(0x27e)][_0x238de7(0x24e)](this[_0x238de7(0x1da)]()[_0x238de7(0x34d)](_0x238de7(0x23d),_0x4d8cc8)))['body'];if(_0x5cdb3e[_0x238de7(0x453)]&&_0x5cdb3e[_0x238de7(0x453)][_0x238de7(0x1e1)]!==a[_0x238de7(0x3aa)]['OK'])throw _0x5cdb3e[_0x238de7(0x453)];if(!_0x5cdb3e[_0x238de7(0x35a)])throw Error(_0x238de7(0x461));return(0x0,t['resolveWithBasePath'])(_0x5cdb3e[_0x238de7(0x35a)],this['_getDownloadEndpointURL']());}async[_0x276f58(0x3f5)](_0x44eae0){const _0x5a08fe=_0x276f58;let _0x4222ab=this['_univerInstanceService'][_0x5a08fe(0x3ac)](),_0x370fb6=_0x4222ab==null?void 0x0:_0x4222ab['getUnitId']();if(!_0x370fb6)throw Error('[CollaborationAttachmentIoService]:\x20unitId\x20is\x20not\x20found.');let _0x1dc000=new FormData();_0x1dc000[_0x5a08fe(0x1c8)](_0x5a08fe(0x1cb),_0x44eae0);let _0x128ffc=this[_0x5a08fe(0x1ba)]()+_0x5a08fe(0x444)+_0x44eae0[_0x5a08fe(0x410)]['toString']()+_0x5a08fe(0x2ac)+a[_0x5a08fe(0x426)][_0x5a08fe(0x305)]+_0x5a08fe(0x45d)+encodeURIComponent(_0x370fb6),_0x3d23c4=(await this['_httpService'][_0x5a08fe(0x39e)](_0x128ffc,{'body':_0x1dc000}))['body'][_0x5a08fe(0x233)];if(typeof _0x3d23c4!=_0x5a08fe(0x3d2)||!_0x3d23c4)throw Error(_0x5a08fe(0x492));return _0x3d23c4;}['_getUploadFileURL'](){const _0x237d06=_0x276f58;return this[_0x237d06(0x49c)]()[_0x237d06(0x3e2)]??_0x237d06(0x47e);}[_0x276f58(0x1da)](){const _0x4da4f3=_0x276f58;return this[_0x4da4f3(0x49c)]()[_0x4da4f3(0x3ce)]??_0x4da4f3(0x360);}[_0x276f58(0x40c)](){const _0x53de1c=_0x276f58;let _0x281245=this[_0x53de1c(0x49c)]();return _0x281245[_0x53de1c(0x33f)]?_0x281245['downloadEndpointUrl']:typeof location<'u'?location['origin']:_0x281245[_0x53de1c(0x3e2)]??'';}[_0x276f58(0x49c)](){const _0xe34883=_0x276f58;return this[_0xe34883(0x3bf)][_0xe34883(0x45f)]('collaboration-client.config')??{};}};U=y([v(0x0,(0x0,t['Inject'])(l[_0x276f58(0x315)])),v(0x1,(0x0,t[_0x276f58(0x318)])(t[_0x276f58(0x1c6)])),v(0x2,(0x0,t['Inject'])(t[_0x276f58(0x30b)]))],U);function rt(_0x9b7a5,_0x3e0be7){const _0xa894f9=_0x276f58;var _0x53ca38;if(_0x3e0be7[_0xa894f9(0x215)]!=null&&_0x9b7a5[_0xa894f9(0x410)]>_0x3e0be7['maxSize'])throw Error('[CollaborationAttachmentIoService]:\x20attachment\x20exceeds\x20max\x20size.');if((_0x53ca38=_0x3e0be7['accept'])!=null&&_0x53ca38[_0xa894f9(0x3f4)]&&!_0x3e0be7[_0xa894f9(0x320)][_0xa894f9(0x3ad)](_0x231418=>_0x9b7a5[_0xa894f9(0x4a2)]===_0x231418||_0x9b7a5[_0xa894f9(0x349)][_0xa894f9(0x1f9)](_0x231418)||_0x231418[_0xa894f9(0x1f9)]('/*')&&_0x9b7a5[_0xa894f9(0x4a2)][_0xa894f9(0x1c1)](_0x231418['slice'](0x0,-0x1))))throw Error(_0xa894f9(0x39f));}let W=class{constructor(_0x4c0ed9,_0x11bf36,_0x30095e){const _0x4fbd8c=_0x276f58;this[_0x4fbd8c(0x3bf)]=_0x4c0ed9,this[_0x4fbd8c(0x27e)]=_0x11bf36,this['localeService']=_0x30095e,this['init']();}[_0x276f58(0x4a6)](){const _0x57be8a=_0x276f58;this[_0x57be8a(0x27e)][_0x57be8a(0x1bb)]({'priority':0x1,'interceptor':(_0x128429,_0x1aedbf)=>_0x1aedbf(_0x128429)[_0x57be8a(0x197)]((0x0,i['concatMap'])(async _0x462757=>{const _0xe4d467=_0x57be8a;let _0x33df69=_0x462757;if(_0x33df69[_0xe4d467(0x399)]===0x191){if(typeof window>'u')throw Error(_0xe4d467(0x31a));if(window['confirm'](this[_0xe4d467(0x4a5)]['t'](_0xe4d467(0x373)))){let _0x449d0d=window[_0xe4d467(0x181)](window[_0xe4d467(0x2fc)][_0xe4d467(0x4b1)]);window['location']['href']=this[_0xe4d467(0x459)]()+'?url='+_0x449d0d;}}return _0x33df69;}))});}[_0x276f58(0x459)](){const _0x275a1a=_0x276f58;let _0x352dd2=this[_0x275a1a(0x3bf)][_0x275a1a(0x45f)](m);return(_0x352dd2==null?void 0x0:_0x352dd2[_0x275a1a(0x2de)])??_0x275a1a(0x46f);}};W=y([v(0x0,t[_0x276f58(0x1c6)]),v(0x1,(0x0,t[_0x276f58(0x318)])(l[_0x276f58(0x315)])),v(0x2,(0x0,t['Inject'])(t['LocaleService']))],W);let G=class extends t[_0x276f58(0x387)]{constructor(_0x166a08,_0x25079e){const _0x30cc5f=_0x276f58;super(),this[_0x30cc5f(0x38d)]=_0x166a08,this[_0x30cc5f(0x3bf)]=_0x25079e,g(this,_0x30cc5f(0x2fa),!0x1),this[_0x30cc5f(0x417)]();}[_0x276f58(0x417)](){const _0x547759=_0x276f58;let _0x257e06=this;this[_0x547759(0x419)](this[_0x547759(0x38d)][_0x547759(0x1bb)]({'priority':0x3e7,'interceptor':(0x0,l['MergeInterceptorFactory'])({'isMatch'(_0x53733e){const _0x955887=_0x547759;var _0x51b89a;if(_0x53733e[_0x955887(0x1c7)]==='POST'&&(_0x51b89a=_0x53733e[_0x955887(0x46a)])!=null&&_0x51b89a[_0x955887(0x2b2)]){let {objectID:_0x1cb8e2,objectType:_0x3c82f2}=_0x53733e[_0x955887(0x46a)][_0x955887(0x2b2)]||{};if(!_0x1cb8e2||_0x3c82f2===void 0x0)return!0x1;let _0x39e339=_0x257e06[_0x955887(0x37f)]()+'/'+_0x3c82f2+_0x955887(0x1d2)+encodeURIComponent(_0x1cb8e2)+_0x955887(0x432);if(_0x53733e[_0x955887(0x35a)]===_0x39e339)return!0x0;}return!0x1;},'getParamsFromRequest'(_0xfdca10){const _0x4fe493=_0x547759;var _0x4aa792;return(_0x4aa792=_0xfdca10[_0x4fe493(0x46a)])==null?void 0x0:_0x4aa792['body'];},'mergeParamsToRequest'(_0x337492,_0x198b9d){const _0x3649cb=_0x547759;let _0x24280c=_0x257e06[_0x3649cb(0x37f)]()+_0x3649cb(0x29c),_0x59a7c5=_0x337492[_0x3649cb(0x308)]((_0x531fce,_0x640d07)=>{const _0x312613=_0x3649cb;let {unitID:_0x28eb07,objectID:_0x5b42bd,objectType:_0x810c04,actions:_0x130f93}=_0x640d07;return _0x531fce[_0x28eb07]||(_0x531fce[_0x28eb07]=Object[_0x312613(0x223)](null)),_0x531fce[_0x28eb07][_0x5b42bd]||(_0x531fce[_0x28eb07][_0x5b42bd]={'objectID':_0x5b42bd,'objectType':_0x810c04,'actions':[]}),_0x531fce[_0x28eb07][_0x5b42bd]['actions'][_0x312613(0x26d)](..._0x130f93),_0x531fce;},Object['create'](null)),_0x710a2c=[];for(let _0x1ce75c in _0x59a7c5)for(let _0x273b0e in _0x59a7c5[_0x1ce75c]){let {actions:_0x168b0c,objectType:_0x4e3baf}=_0x59a7c5[_0x1ce75c][_0x273b0e],_0x2a520c=[...new Set(_0x168b0c)];_0x710a2c[_0x3649cb(0x26d)]({'unitID':_0x1ce75c,'objectID':_0x273b0e,'objectType':_0x4e3baf,'actions':_0x2a520c});}return new l['HTTPRequest'](_0x3649cb(0x27d),_0x24280c,{'headers':_0x198b9d[_0x3649cb(0x1ae)],'withCredentials':_0x198b9d[_0x3649cb(0x3b4)],'responseType':_0x198b9d[_0x3649cb(0x2bf)],'body':{'requests':_0x710a2c}});}},{'distributeResult'(_0x230a38,_0xb10b5b){const _0xe367b9=_0x547759;let {objectActions:_0x4e2b0e}=_0x230a38;return _0xb10b5b[_0xe367b9(0x187)](_0x1c95ff=>{const _0x4b6a8b=_0xe367b9;let {unitID:_0x2d75d5,objectID:_0x11d3fe,actions:_0x27dfb4}=_0x1c95ff,_0x20b3f6=_0x4e2b0e[_0x4b6a8b(0x1a9)](_0x362ab0=>_0x362ab0['unitID']===_0x2d75d5&&_0x362ab0['objectID']===_0x11d3fe);return{'config':_0x1c95ff,'result':{'actions':_0x27dfb4['map'](_0x42b28f=>_0x20b3f6==null?void 0x0:_0x20b3f6[_0x4b6a8b(0x356)][_0x4b6a8b(0x1a9)](_0x356516=>_0x356516[_0x4b6a8b(0x2f0)]===_0x42b28f))[_0x4b6a8b(0x262)](_0x4f9ae2=>!!_0x4f9ae2),'error':_0x230a38[_0x4b6a8b(0x453)]}};});}})}));}[_0x276f58(0x37f)](){const _0x461a9c=_0x276f58;let _0x6af3bf=this[_0x461a9c(0x3bf)][_0x461a9c(0x45f)](m);return(_0x6af3bf==null?void 0x0:_0x6af3bf[_0x461a9c(0x3c1)])??_0x461a9c(0x353);}async[_0x276f58(0x223)](_0x7e34aa){const _0x5996d0=_0x276f58;let _0x21e29d=this[_0x5996d0(0x37f)]()+'/'+_0x7e34aa[_0x5996d0(0x24b)]+'/object';return(await this[_0x5996d0(0x38d)][_0x5996d0(0x39e)](_0x21e29d,{'body':_0x7e34aa}))[_0x5996d0(0x2b2)]['objectID']||'';}async[_0x276f58(0x29f)](_0x1cfdfd){const _0x265515=_0x276f58;let _0x5bb11e=this[_0x265515(0x37f)]()+'/-/object/list';return(await this[_0x265515(0x38d)][_0x265515(0x39e)](_0x5bb11e,{'body':_0x1cfdfd}))[_0x265515(0x2b2)][_0x265515(0x2fd)];}async[_0x276f58(0x2ec)](_0x19fa12){const _0x3cd8e3=_0x276f58;var _0x51599a;let _0x560daa=this['_getAPIPrefixPath']()+'/'+_0x19fa12['objectType']+_0x3cd8e3(0x1d2)+encodeURIComponent(_0x19fa12[_0x3cd8e3(0x478)]),_0x10ff06=await this[_0x3cd8e3(0x38d)][_0x3cd8e3(0x22a)](_0x560daa,{'body':_0x19fa12});if((_0x10ff06==null||(_0x51599a=_0x10ff06[_0x3cd8e3(0x2b2)])==null||(_0x51599a=_0x51599a[_0x3cd8e3(0x453)])==null?void 0x0:_0x51599a['code'])!==0x1)throw Error(_0x3cd8e3(0x183));}async[_0x276f58(0x3a8)](_0x3f2bb7){const _0x5133c0=_0x276f58;let _0x5f2262=this[_0x5133c0(0x37f)]()+'/'+_0x3f2bb7['objectType']+'/object/'+encodeURIComponent(_0x3f2bb7[_0x5133c0(0x478)])+'/allowed';return(await this[_0x5133c0(0x38d)][_0x5133c0(0x39e)](_0x5f2262,{'body':_0x3f2bb7}))['body'][_0x5133c0(0x356)];}async[_0x276f58(0x4a0)](_0x57068d){const _0xd10b81=_0x276f58;let _0x41f033=this[_0xd10b81(0x37f)]()+_0xd10b81(0x29c);return(await this[_0xd10b81(0x38d)][_0xd10b81(0x39e)](_0x41f033,{'body':{'requests':_0x57068d}}))[_0xd10b81(0x2b2)][_0xd10b81(0x42e)];}async['listRoles'](_0x5db6c5){const _0x1cde69=_0x276f58;let _0x1655f7=this[_0x1cde69(0x37f)]()+'/'+_0x5db6c5[_0x1cde69(0x24b)]+_0x1cde69(0x3db),_0x92e04d=await this['_HTTPService'][_0x1cde69(0x39e)](_0x1655f7,{'body':_0x5db6c5});return{'roles':_0x92e04d[_0x1cde69(0x2b2)][_0x1cde69(0x1e4)],'actions':_0x92e04d['body'][_0x1cde69(0x356)]};}async[_0x276f58(0x1a6)](_0x35789c){const _0x1b1181=_0x276f58;let _0x2fa4f6=this[_0x1b1181(0x37f)]()+_0x1b1181(0x338);await this[_0x1b1181(0x38d)][_0x1b1181(0x22c)](_0x2fa4f6,{'params':{'collaboratorID':_0x35789c[_0x1b1181(0x3a2)],'objectID':_0x35789c[_0x1b1181(0x478)],'unitID':_0x35789c[_0x1b1181(0x32e)]}});}async[_0x276f58(0x185)](_0x23a651){const _0x2d0c3a=_0x276f58;let _0x4fe3e6=this['_getAPIPrefixPath']()+'/collaborator';await this['_HTTPService'][_0x2d0c3a(0x1e6)](_0x4fe3e6,{'body':_0x23a651});}async[_0x276f58(0x240)](_0x3c6857){const _0x26c9e1=_0x276f58;let _0x29fbcf=this[_0x26c9e1(0x37f)]()+'/collaborator';await this[_0x26c9e1(0x38d)][_0x26c9e1(0x39e)](_0x29fbcf,{'body':_0x3c6857});}async[_0x276f58(0x2df)](_0x40864e){const _0x55b7fa=_0x276f58;let _0x268a8c=this['_getAPIPrefixPath']()+_0x55b7fa(0x338),_0x2a6a0e=await this[_0x55b7fa(0x38d)][_0x55b7fa(0x24e)](_0x268a8c,{'params':{'objectID':_0x40864e[_0x55b7fa(0x478)],'unitID':_0x40864e[_0x55b7fa(0x32e)]}});return this['setCfgEnableObjInherit'](_0x2a6a0e[_0x55b7fa(0x2b2)][_0x55b7fa(0x3b8)]??!0x1),_0x2a6a0e[_0x55b7fa(0x2b2)][_0x55b7fa(0x3ca)];}async['putCollaborators'](_0x48bd0d){const _0x5270f7=_0x276f58;let _0x1e1fdb=this[_0x5270f7(0x37f)]()+_0x5270f7(0x338);await this['_HTTPService']['put'](_0x1e1fdb,{'body':_0x48bd0d});}[_0x276f58(0x2e1)](_0x44228e){const _0x57280e=_0x276f58;this[_0x57280e(0x2fa)]=_0x44228e;}[_0x276f58(0x18f)](){return this['_cfgEnableObjInherit'];}};G=y([v(0x0,(0x0,t[_0x276f58(0x318)])(l[_0x276f58(0x315)])),v(0x1,(0x0,t[_0x276f58(0x318)])(t[_0x276f58(0x1c6)]))],G);function it(_0x5d2c19){const _0x32ad33=_0x276f58;let _0x2227b2=atob(_0x5d2c19),_0x17758a=new Uint8Array(_0x2227b2[_0x32ad33(0x3f4)]);for(let _0x400c12=0x0;_0x400c12<_0x2227b2['length'];_0x400c12++)_0x17758a[_0x400c12]=_0x2227b2[_0x32ad33(0x44d)](_0x400c12);return _0x17758a;}function at(_0x3a9730){const _0x196d06=_0x276f58;let _0xe617e0='';for(let _0x151213=0x0;_0x151213<_0x3a9730[_0x196d06(0x3f4)];_0x151213++)_0xe617e0+=String[_0x196d06(0x202)](_0x3a9730[_0x151213]);return btoa(_0xe617e0);}function ot(_0x33507d,_0x4b2c9b){const _0x202053=_0x276f58;let _0x563fb6=it(_0x4b2c9b),_0x29d155=(0x0,f['randomBytes'])(0x10),_0x5a99ee=(0x0,d[_0x202053(0x427)])(_0x563fb6,_0x29d155)['encrypt']((0x0,f[_0x202053(0x488)])(_0x33507d));return at((0x0,f['concatBytes'])(_0x29d155,_0x5a99ee));}function st(){const _0x30bf5f=_0x276f58;let _0x4bcafe=(0x0,u['getGlobalObject'])()['__Key__'];if(typeof window<'u'&&window['location']!==void 0x0&&_0x4bcafe){let _0x6fc73b={'time':Math['floor'](Date['now']()/0x3e8),'domain':location[_0x30bf5f(0x45c)]};return ot(JSON[_0x30bf5f(0x375)](_0x6fc73b),_0x4bcafe);}}let K=class{constructor(_0x3e9000){const _0x3fb3a4=_0x276f58;this[_0x3fb3a4(0x27e)]=_0x3e9000,this[_0x3fb3a4(0x196)]();}[_0x276f58(0x196)](){const _0x117e70=_0x276f58;this[_0x117e70(0x27e)][_0x117e70(0x1bb)]({'interceptor':(_0x1e9201,_0x257f52)=>{const _0x73c8b6=_0x117e70;let _0x533d7a=st();return _0x533d7a&&_0x1e9201['headers']['set'](_0x73c8b6(0x1b0),_0x533d7a),_0x257f52(_0x1e9201);}});}};K=y([v(0x0,(0x0,t['Inject'])(l['HTTPService']))],K);let q=class extends t['RxDisposable']{constructor(_0xd7e823,_0x446e89,_0xc4eaba){const _0x40e2c9=_0x276f58;super(),this['_logService']=_0xd7e823,this[_0x40e2c9(0x3c5)]=_0x446e89,this[_0x40e2c9(0x203)]=_0xc4eaba,g(this,_0x40e2c9(0x205),new i[(_0x40e2c9(0x218))](null)),g(this,'_unitLoaded$',new i[(_0x40e2c9(0x3b2))]()),g(this,_0x40e2c9(0x3de),this['_unitInfo$'][_0x40e2c9(0x446)]()),g(this,_0x40e2c9(0x309),this[_0x40e2c9(0x1f5)][_0x40e2c9(0x446)]());}[_0x276f58(0x284)](){const _0x5a0a61=_0x276f58;super[_0x5a0a61(0x284)](),this[_0x5a0a61(0x1f5)][_0x5a0a61(0x297)](),this[_0x5a0a61(0x205)]['complete']();}async['loadUnitOfRevision'](_0x59a36f,_0x59dc04,_0x4b6248,_0x16bcff){const _0x466633=_0x276f58;this['_unitInfo$'][_0x466633(0x267)]({'unitId':_0x59a36f,'type':_0x59dc04,'subUnitId':_0x16bcff});let _0x565c91=null;switch(_0x59dc04){case t[_0x466633(0x35c)][_0x466633(0x261)]:_0x565c91=await this[_0x466633(0x3c5)][_0x466633(0x38c)](_0x59a36f,_0x4b6248,void 0x0,{'initialSubUnitId':_0x16bcff});break;case t['UniverInstanceType'][_0x466633(0x21f)]:_0x565c91=await this[_0x466633(0x3c5)]['loadDoc'](_0x59a36f,_0x4b6248);break;case t[_0x466633(0x35c)][_0x466633(0x382)]:_0x565c91=await this['_snapshotService'][_0x466633(0x1f3)](_0x59a36f,_0x4b6248);break;case t['UniverInstanceType'][_0x466633(0x454)]:_0x565c91=await this[_0x466633(0x3c5)][_0x466633(0x2ef)](_0x59a36f,_0x4b6248);break;case t[_0x466633(0x35c)][_0x466633(0x437)]:_0x565c91=await this[_0x466633(0x3c5)][_0x466633(0x2ca)](_0x59a36f,_0x4b6248);break;case t[_0x466633(0x35c)]['UNIVER_PDF']:_0x565c91=await this[_0x466633(0x3c5)][_0x466633(0x3ab)](_0x59a36f,_0x4b6248);break;default:this['_logService'][_0x466633(0x453)](_0x466633(0x266),_0x466633(0x2b8));}return _0x565c91&&this['_unitLoaded$'][_0x466633(0x267)](_0x565c91),_0x565c91;}async[_0x276f58(0x283)](_0x281105,_0x1ee3cf,_0x2d4449){const _0x1d2933=_0x276f58;var _0x14de16;this[_0x1d2933(0x205)][_0x1d2933(0x267)]({'unitId':_0x281105,'type':_0x1ee3cf,'subUnitId':_0x2d4449});let _0x37538c=0x0,_0x2951ef=await((_0x14de16=this['_localCacheService'])==null?void 0x0:_0x14de16['loadOfflineData'](_0x281105));return _0x2951ef&&(_0x2951ef[_0x1d2933(0x1b7)]||_0x2951ef[_0x1d2933(0x230)][_0x1d2933(0x3f4)]!==0x0)&&(_0x37538c=_0x2951ef['rev']),_0x37538c===0x0&&this['_logService'][_0x1d2933(0x2d1)](_0x1d2933(0x266),_0x1d2933(0x21a)),this[_0x1d2933(0x3e5)](_0x281105,_0x1ee3cf,_0x37538c,_0x2d4449);}};q=y([v(0x0,t[_0x276f58(0x48b)]),v(0x1,(0x0,t[_0x276f58(0x318)])(e[_0x276f58(0x3fd)])),v(0x2,(0x0,t[_0x276f58(0x42b)])(x))],q);let J=class{constructor(_0x592983,_0x231519,_0x10793d){const _0xabeb6e=_0x276f58;this['_httpService']=_0x592983,this[_0xabeb6e(0x3bf)]=_0x231519,this['_univerInstanceService']=_0x10793d,g(this,_0xabeb6e(0x2d7),0x0),g(this,_0xabeb6e(0x23c),new i[(_0xabeb6e(0x3b2))]()),g(this,_0xabeb6e(0x27b),this[_0xabeb6e(0x23c)]),g(this,_0xabeb6e(0x3cd),new Map());}[_0x276f58(0x325)](_0x4f512e){const _0x34a63b=_0x276f58;this[_0x34a63b(0x2d7)]=_0x4f512e,this[_0x34a63b(0x23c)][_0x34a63b(0x267)](_0x4f512e);}[_0x276f58(0x2c6)](_0x132b17,_0x54cb42){const _0xb740ab=_0x276f58;if(_0x54cb42===t['ImageSourceType']['BASE64']){let _0x316361=new Image();return _0x316361[_0xb740ab(0x1b3)]=_0x132b17,_0x316361;}return this['_imageSourceCache']['get'](_0x132b17);}['addImageSourceCache'](_0x34b52a,_0x49b68d,_0x892c62){const _0x34c300=_0x276f58;_0x49b68d!==t[_0x34c300(0x247)][_0x34c300(0x3cf)]&&_0x892c62!=null&&this[_0x34c300(0x3cd)][_0x34c300(0x2b4)](_0x34b52a,_0x892c62);}async[_0x276f58(0x2ed)](_0x44cd8b){const _0x409ff4=_0x276f58;try{let _0x10a2c0=this[_0x409ff4(0x4ac)](this[_0x409ff4(0x1da)](),''+_0x44cd8b),_0x90d2bb=(await this[_0x409ff4(0x27e)][_0x409ff4(0x24e)](_0x10a2c0))[_0x409ff4(0x2b2)];if(_0x90d2bb['error']&&_0x90d2bb[_0x409ff4(0x453)][_0x409ff4(0x1e1)]===a[_0x409ff4(0x3aa)]['OK']){let _0x3f673c=(0x0,t['resolveWithBasePath'])(_0x90d2bb[_0x409ff4(0x35a)],this[_0x409ff4(0x40c)]());return Promise['resolve'](_0x3f673c);}return Promise[_0x409ff4(0x2ad)](_0x90d2bb[_0x409ff4(0x453)]);}catch(_0x1c4194){return Promise[_0x409ff4(0x2ad)](_0x1c4194);}}async[_0x276f58(0x42f)](_0x47d6f8){const _0x24f709=_0x276f58;let _0x44fa36='';if(!p[_0x24f709(0x1db)][_0x24f709(0x452)](_0x47d6f8[_0x24f709(0x4a2)]))return this[_0x24f709(0x2a1)](),Promise['reject'](Error(t[_0x24f709(0x3ec)][_0x24f709(0x1cf)]));if(_0x47d6f8['size']>(0x0,p['getDrawingImageAllowSize'])())return this[_0x24f709(0x2a1)](),Promise[_0x24f709(0x2ad)](Error(t[_0x24f709(0x3ec)][_0x24f709(0x2fe)]));try{let _0x1b9083=new FormData();_0x1b9083[_0x24f709(0x1c8)](_0x24f709(0x1cb),_0x47d6f8);let _0x1c5070=this['_univerInstanceService'][_0x24f709(0x3ac)](),_0x312cfb=_0x1c5070==null?void 0x0:_0x1c5070[_0x24f709(0x2d6)]();if(!_0x312cfb)throw Error(_0x24f709(0x3c3));let _0x33b39b=this[_0x24f709(0x1ba)]()+'?size='+_0x47d6f8['size'][_0x24f709(0x337)]()+'&source='+a[_0x24f709(0x426)][_0x24f709(0x305)]+_0x24f709(0x45d)+encodeURIComponent(_0x312cfb),_0x1d0321={'body':_0x1b9083},_0x1568f4=(await this[_0x24f709(0x27e)][_0x24f709(0x39e)](_0x33b39b,_0x1d0321))[_0x24f709(0x2b2)];if(typeof _0x1568f4[_0x24f709(0x233)]!=_0x24f709(0x3d2))return this['_decreaseWaiting'](),Promise[_0x24f709(0x2ad)](Error(t[_0x24f709(0x3ec)][_0x24f709(0x451)]));_0x44fa36=_0x1568f4['FileId'];}catch{return this[_0x24f709(0x2a1)](),Promise['reject'](Error(t[_0x24f709(0x3ec)][_0x24f709(0x451)]));}return new Promise((_0x146675,_0x29e72c)=>{const _0x224973=_0x24f709;let _0x18d1f1=new FileReader();_0x18d1f1[_0x224973(0x2d9)](_0x47d6f8),_0x18d1f1[_0x224973(0x1f6)]=_0x331d02=>{const _0x22f705=_0x224973;var _0x36dbb8;let _0x21fc37=(_0x36dbb8=_0x331d02[_0x22f705(0x2ee)])==null?void 0x0:_0x36dbb8[_0x22f705(0x303)];if(_0x21fc37==null){this['_decreaseWaiting'](),_0x29e72c(Error(t[_0x22f705(0x3ec)][_0x22f705(0x451)]));return;}_0x146675({'imageId':(0x0,t[_0x22f705(0x1e9)])(0x6),'imageSourceType':t[_0x22f705(0x247)]['UUID'],'source':_0x44fa36,'base64Cache':_0x21fc37,'status':t['ImageUploadStatusType'][_0x22f705(0x2a2)]}),this[_0x22f705(0x2a1)]();};});}['_getUploadFileURL'](){const _0x33a9d4=_0x276f58;let _0x27861b=this[_0x33a9d4(0x3bf)]['getConfig'](m);return(_0x27861b==null?void 0x0:_0x27861b[_0x33a9d4(0x3e2)])??_0x33a9d4(0x47e);}[_0x276f58(0x1da)](){const _0x3e180e=_0x276f58;let _0x38d840=this[_0x3e180e(0x3bf)][_0x3e180e(0x45f)](m);return(_0x38d840==null?void 0x0:_0x38d840[_0x3e180e(0x3ce)])??'/universer-api/file/{fileID}/sign-url';}[_0x276f58(0x40c)](){const _0x1188da=_0x276f58;let _0x126b34=this[_0x1188da(0x3bf)][_0x1188da(0x45f)](m);return(_0x126b34==null?void 0x0:_0x126b34[_0x1188da(0x33f)])??location[_0x1188da(0x479)];}[_0x276f58(0x4ac)](_0x1c7b65,_0x5f3466){const _0xce213f=_0x276f58;return _0x1c7b65[_0xce213f(0x34d)]('{fileID}',_0x5f3466);}['_decreaseWaiting'](){const _0x517e7d=_0x276f58;--this[_0x517e7d(0x2d7)],this[_0x517e7d(0x23c)][_0x517e7d(0x267)](this['_waitCount']);}};J=y([v(0x0,(0x0,t['Inject'])(l[_0x276f58(0x315)])),v(0x1,t['IConfigService']),v(0x2,(0x0,t['Inject'])(t['IUniverInstanceService']))],J);let Y=class{constructor(_0x2b3c7a,_0x4f2db2){const _0x5073b7=_0x276f58;this[_0x5073b7(0x3bf)]=_0x2b3c7a,this[_0x5073b7(0x38d)]=_0x4f2db2;}[_0x276f58(0x37f)](){const _0x2cb5b7=_0x276f58;let _0x55a00c=this[_0x2cb5b7(0x3bf)][_0x2cb5b7(0x45f)](m);return(_0x55a00c==null?void 0x0:_0x55a00c[_0x2cb5b7(0x3c1)])??_0x2cb5b7(0x353);}async[_0x276f58(0x29f)](_0x236944){const _0x4ff9fb=_0x276f58;let _0x5950fc=this[_0x4ff9fb(0x37f)]()+_0x4ff9fb(0x338);return{'list':[{'title':_0x4ff9fb(0x371),'mentions':(await this[_0x4ff9fb(0x38d)][_0x4ff9fb(0x24e)](_0x5950fc,{'params':{'objectID':_0x236944[_0x4ff9fb(0x1cd)],'unitID':_0x236944['unitId']}}))[_0x4ff9fb(0x2b2)]['collaborators'][_0x4ff9fb(0x187)](_0x22c7f3=>({'objectId':_0x22c7f3['id'],'name':_0x22c7f3[_0x4ff9fb(0x285)][_0x4ff9fb(0x349)],'metadata':{'icon':_0x22c7f3[_0x4ff9fb(0x285)]['avatar']},'label':_0x22c7f3['subject'][_0x4ff9fb(0x349)],'objectType':t[_0x4ff9fb(0x2d5)][_0x4ff9fb(0x3f7)]})),'metadata':{},'type':t['MentionType'][_0x4ff9fb(0x3f7)]}]};}};Y=y([v(0x0,(0x0,t[_0x276f58(0x318)])(t['IConfigService'])),v(0x1,(0x0,t['Inject'])(l[_0x276f58(0x315)]))],Y);let X=class extends t['RxDisposable']{constructor(_0x3467ca,_0x59ffbb,_0x2270a0,_0x472abf,_0x44b755,_0x8e5a63){const _0x4290dc=_0x276f58;super(),this['_injector']=_0x3467ca,this[_0x4290dc(0x37e)]=_0x59ffbb,this[_0x4290dc(0x302)]=_0x2270a0,this['_authzIoService']=_0x472abf,this['_collaborationSessionService']=_0x44b755,this['_collaborationUIEventService']=_0x8e5a63,g(this,_0x4290dc(0x2b1),new Set()),this['disposeWithMe'](()=>this[_0x4290dc(0x2b1)][_0x4290dc(0x4af)]()),this[_0x4290dc(0x419)](ct(this[_0x4290dc(0x37e)])['subscribe'](({unitId:_0x3fb9de})=>this[_0x4290dc(0x2b1)][_0x4290dc(0x22c)](_0x3fb9de))),this[_0x4290dc(0x2e8)](),this['_initCloseConn'](),[t['UniverInstanceType'][_0x4290dc(0x21f)],t[_0x4290dc(0x35c)][_0x4290dc(0x382)],t[_0x4290dc(0x35c)][_0x4290dc(0x437)],t[_0x4290dc(0x35c)][_0x4290dc(0x454)]][_0x4290dc(0x346)](_0x15007a=>{const _0xb8e102=_0x4290dc;this[_0xb8e102(0x419)](this['_univerInstanceService'][_0xb8e102(0x26e)](_0x15007a)[_0xb8e102(0x448)](_0x1767b7=>{const _0x1bb053=_0xb8e102;this['_closedUnits'][_0x1bb053(0x30e)](_0x1767b7[_0x1bb053(0x2d6)]()),this[_0x1bb053(0x217)][_0x1bb053(0x24e)](t['ObjectPermissionService'])[_0x1bb053(0x480)](_0x1767b7['getUnitId']());}));});}[_0x276f58(0x1d1)](){const _0x4fa202=_0x276f58;let _0x15d6d0=async(_0x426588,_0x4dad09)=>{const _0x123642=_0x2c2f;let _0x2891c9=await this[_0x123642(0x253)][_0x123642(0x1d3)](_0x426588);this[_0x123642(0x48d)]||this['_closedUnits'][_0x123642(0x2bc)](_0x426588)||!this[_0x123642(0x37e)][_0x123642(0x491)](_0x426588)||_0x2891c9[_0x123642(0x2a8)][_0x123642(0x197)]((0x0,s['filter'])(_0x17429a=>_0x17429a[_0x123642(0x2ce)]===e[_0x123642(0x275)][_0x123642(0x4ab)]),(0x0,s[_0x123642(0x1d7)])((0x0,i['merge'])(this[_0x123642(0x34b)],this[_0x123642(0x37e)]['unitDisposed$'][_0x123642(0x197)]((0x0,s['filter'])(_0x3bb453=>_0x3bb453['getUnitId']()===_0x426588)))))['subscribe'](_0x3fc0a5=>{const _0x7ad23d=_0x123642;let {reason:_0x32c375}=_0x3fc0a5[_0x7ad23d(0x41c)];this[_0x7ad23d(0x400)][_0x7ad23d(0x37a)]({'id':'CLOSE_ROOM','data':_0x32c375}),this[_0x7ad23d(0x2b1)][_0x7ad23d(0x30e)](_0x426588),this[_0x7ad23d(0x217)][_0x7ad23d(0x24e)](t[_0x7ad23d(0x3fa)])[_0x7ad23d(0x480)](_0x426588);let _0x14b905=lt(_0x4dad09);_0x14b905!=null&&this[_0x7ad23d(0x2eb)](_0x426588,_0x14b905,a['UnitAction'][_0x7ad23d(0x351)],!0x1),this[_0x7ad23d(0x253)][_0x7ad23d(0x28a)](_0x426588);});};ct(this[_0x4fa202(0x37e)])['pipe']((0x0,s[_0x4fa202(0x262)])(({unitId:_0x1886e2})=>!(0x0,t[_0x4fa202(0x3e3)])(_0x1886e2)),(0x0,s[_0x4fa202(0x1d7)])(this[_0x4fa202(0x34b)]))[_0x4fa202(0x448)](({type:_0x5d3522,unitId:_0x44a69c})=>{const _0xa9d06b=_0x4fa202;_0x15d6d0(_0x44a69c,_0x5d3522)[_0xa9d06b(0x48c)](_0xc632ea=>this[_0xa9d06b(0x217)][_0xa9d06b(0x24e)](t[_0xa9d06b(0x48b)])[_0xa9d06b(0x453)](_0xc632ea));});}[_0x276f58(0x2e8)](){const _0x2ff238=_0x276f58;let _0xf86af7=async(_0x27d169,_0x26341c)=>{const _0x3bac2e=_0x2c2f;let _0x36b293=await this[_0x3bac2e(0x253)]['requireSession'](_0x27d169);if(!(this[_0x3bac2e(0x48d)]||this['_closedUnits']['has'](_0x27d169)||!this[_0x3bac2e(0x37e)]['getUnit'](_0x27d169))){if(_0x26341c===t[_0x3bac2e(0x35c)][_0x3bac2e(0x261)]){let _0x2ceef1=this['_injector'][_0x3bac2e(0x24e)](r[_0x3bac2e(0x27c)]);await _0x2ceef1[_0x3bac2e(0x3c8)](_0x27d169),_0x36b293['event$'][_0x3bac2e(0x197)]((0x0,s[_0x3bac2e(0x262)])(_0x4773bf=>_0x4773bf[_0x3bac2e(0x2ce)]===e['CollaborationEvent'][_0x3bac2e(0x330)]),(0x0,s[_0x3bac2e(0x1d7)])((0x0,i['merge'])(this[_0x3bac2e(0x34b)],_0x36b293[_0x3bac2e(0x2a8)]['pipe']((0x0,s[_0x3bac2e(0x262)])(_0x197f62=>_0x197f62['eventID']===e['CollaborationEvent'][_0x3bac2e(0x4ab)])),this[_0x3bac2e(0x37e)][_0x3bac2e(0x1bc)][_0x3bac2e(0x197)]((0x0,s['filter'])(_0x16d2b1=>_0x16d2b1[_0x3bac2e(0x2d6)]()===_0x27d169)))))['subscribe'](_0x2051c9=>{const _0x5747ba=_0x3bac2e;let {objectId:_0x58bdc7}=_0x2051c9[_0x5747ba(0x41c)];_0x58bdc7===_0x27d169?_0x2ceef1[_0x5747ba(0x3c8)](_0x27d169):_0x2ceef1['refreshPermission'](_0x27d169,_0x58bdc7);});return;}_0x36b293[_0x3bac2e(0x2a8)][_0x3bac2e(0x197)]((0x0,s['filter'])(_0x32c8f5=>_0x32c8f5[_0x3bac2e(0x2ce)]===e[_0x3bac2e(0x275)]['UPDATE_PERMISSION_OBJ']),(0x0,s[_0x3bac2e(0x1d7)])((0x0,i['merge'])(this['dispose$'],_0x36b293['event$']['pipe']((0x0,s[_0x3bac2e(0x262)])(_0x3feba0=>_0x3feba0[_0x3bac2e(0x2ce)]===e['CollaborationEvent']['SHOULD_CLOSE_CONN'])),this['_univerInstanceService']['unitDisposed$'][_0x3bac2e(0x197)]((0x0,s[_0x3bac2e(0x262)])(_0x120994=>_0x120994[_0x3bac2e(0x2d6)]()===_0x27d169)))))[_0x3bac2e(0x448)](()=>{const _0x1afe8c=_0x3bac2e;this['_refreshUnitPermission'](_0x27d169,_0x26341c)['catch'](_0x4c5dfb=>this['_injector'][_0x1afe8c(0x24e)](t[_0x1afe8c(0x48b)])['error'](_0x4c5dfb));}),await this[_0x3bac2e(0x44b)](_0x27d169,_0x26341c);}};ct(this['_univerInstanceService'])[_0x2ff238(0x197)]((0x0,s[_0x2ff238(0x262)])(({unitId:_0x371ab3})=>!(0x0,t['isInternalEditorID'])(_0x371ab3)),(0x0,s[_0x2ff238(0x1d7)])(this[_0x2ff238(0x34b)]))[_0x2ff238(0x448)](({type:_0x29c6e6,unitId:_0x1d2403})=>{const _0xc03b26=_0x2ff238;_0xf86af7(_0x1d2403,_0x29c6e6)[_0xc03b26(0x48c)](_0x41374d=>this[_0xc03b26(0x217)][_0xc03b26(0x24e)](t[_0xc03b26(0x48b)])[_0xc03b26(0x453)](_0x41374d));});}async[_0x276f58(0x44b)](_0x140f60,_0x27d6a7){const _0x379395=_0x276f58;let _0x1d325d=lt(_0x27d6a7);if(_0x1d325d==null)return;let _0x5a73a5=this[_0x379395(0x217)][_0x379395(0x24e)](t[_0x379395(0x3fa)]);if(_0x5a73a5[_0x379395(0x25a)]({'unitId':_0x140f60,'objectId':_0x140f60,'objectType':_0x1d325d})){await _0x5a73a5[_0x379395(0x4a3)](_0x140f60);return;}let _0x1c2a28=this[_0x379395(0x40b)](_0x140f60,_0x1d325d);if(!_0x1c2a28[_0x379395(0x3f4)])return;let _0x3b8e02=await this[_0x379395(0x1ab)]['allowed']({'objectID':_0x140f60,'objectType':_0x1d325d,'unitID':_0x140f60,'actions':_0x1c2a28[_0x379395(0x187)](({action:_0xfc5cf7})=>_0xfc5cf7)});this[_0x379395(0x48d)]||this['_closedUnits'][_0x379395(0x2bc)](_0x140f60)||!this['_univerInstanceService'][_0x379395(0x491)](_0x140f60)||_0x3b8e02['forEach'](_0x2a1d3f=>{const _0x3952f2=_0x379395;let _0x8b6152=_0x2a1d3f[_0x3952f2(0x2f0)],_0x5c9188=_0x2a1d3f[_0x3952f2(0x3a8)];_0x8b6152!=null&&_0x5c9188!=null&&_0x1c2a28['filter'](_0x40d44d=>_0x40d44d[_0x3952f2(0x2f0)]===_0x8b6152)['forEach'](_0x4e4486=>this[_0x3952f2(0x302)][_0x3952f2(0x333)](_0x4e4486['id'],_0x5c9188));});}['_getUnitPermissionPoints'](_0x3d6fe4,_0x4ab845){const _0x2ac791=_0x276f58;let _0x446754=[];return this[_0x2ac791(0x302)][_0x2ac791(0x26b)]()[_0x2ac791(0x346)]((_0x1e701a,_0x2b6a2c)=>{const _0x52323d=_0x2ac791;_0x1e701a[_0x52323d(0x448)](_0x2d03c2=>{const _0x2838e0=_0x52323d;_0x2d03c2[_0x2838e0(0x4a2)]===_0x4ab845&&'unitId'in _0x2d03c2&&_0x2d03c2[_0x2838e0(0x1cd)]===_0x3d6fe4&&(!(_0x2838e0(0x209)in _0x2d03c2)||_0x2d03c2[_0x2838e0(0x209)]===_0x3d6fe4)&&_0x446754[_0x2838e0(0x26d)]({'id':_0x2b6a2c,'action':_0x2d03c2['subType']});})[_0x52323d(0x329)]();}),_0x446754;}[_0x276f58(0x2eb)](_0x24803f,_0x1d3a15,_0x1a09d7,_0x21540b){const _0x4af153=_0x276f58;this[_0x4af153(0x302)]['getAllPermissionPoint']()[_0x4af153(0x346)]((_0x2d13eb,_0x40b909)=>{const _0x1833f9=_0x4af153;let _0x24dec2=!0x1;_0x2d13eb[_0x1833f9(0x448)](_0x2aba8f=>{const _0x1fd870=_0x1833f9;_0x24dec2=_0x2aba8f[_0x1fd870(0x4a2)]===_0x1d3a15&&_0x2aba8f[_0x1fd870(0x18e)]===_0x1a09d7&&_0x1fd870(0x1cd)in _0x2aba8f&&_0x2aba8f['unitId']===_0x24803f&&(!('objectId'in _0x2aba8f)||_0x2aba8f[_0x1fd870(0x209)]===_0x24803f);})[_0x1833f9(0x329)](),_0x24dec2&&this[_0x1833f9(0x302)][_0x1833f9(0x333)](_0x40b909,_0x21540b);});}};X=y([v(0x0,(0x0,t[_0x276f58(0x318)])(t['Injector'])),v(0x1,t[_0x276f58(0x30b)]),v(0x2,t[_0x276f58(0x1ec)]),v(0x3,t[_0x276f58(0x255)]),v(0x4,(0x0,t[_0x276f58(0x318)])(V)),v(0x5,(0x0,t[_0x276f58(0x318)])(_))],X);function ct(_0x42ad83){const _0x4d3810=_0x276f58;return(0x0,i[_0x4d3810(0x447)])(...[t['UniverInstanceType'][_0x4d3810(0x261)],t[_0x4d3810(0x35c)][_0x4d3810(0x21f)],t[_0x4d3810(0x35c)][_0x4d3810(0x382)],t[_0x4d3810(0x35c)][_0x4d3810(0x454)],t[_0x4d3810(0x35c)][_0x4d3810(0x437)]][_0x4d3810(0x187)](_0x151a27=>_0x42ad83[_0x4d3810(0x18d)](_0x151a27)[_0x4d3810(0x197)]((0x0,s[_0x4d3810(0x187)])(_0x54f01e=>({'type':_0x151a27,'unitId':_0x54f01e['unit']['getUnitId']()})))));}function lt(_0x21e53c){const _0x10ef45=_0x276f58;switch(_0x21e53c){case t[_0x10ef45(0x35c)][_0x10ef45(0x261)]:return a[_0x10ef45(0x490)][_0x10ef45(0x40f)];case t[_0x10ef45(0x35c)][_0x10ef45(0x21f)]:return a[_0x10ef45(0x490)]['Document'];case t[_0x10ef45(0x35c)][_0x10ef45(0x382)]:return a[_0x10ef45(0x490)][_0x10ef45(0x47c)];case t[_0x10ef45(0x35c)][_0x10ef45(0x454)]:return a['UnitObject']['Board'];case t[_0x10ef45(0x35c)][_0x10ef45(0x437)]:return a[_0x10ef45(0x490)]['Base'];default:return;}}let Z=class{constructor(_0x417f2f,_0x299d99){const _0x318856=_0x276f58;this['_configService']=_0x417f2f,this[_0x318856(0x27e)]=_0x299d99;}async[_0x276f58(0x2a9)](_0xbbae4d,_0x113db4){const _0x400389=_0x276f58;var _0x564ec4;let {unitID:_0x3d1269,type:_0xe81ffb,revision:_0x2d759d=0x0}=_0x113db4,_0x5c676b=this[_0x400389(0x474)]()+'/'+_0xe81ffb+'/unit/'+_0x3d1269+'/rev/'+_0x2d759d,_0x268e13=(await this['_httpService'][_0x400389(0x24e)](_0x5c676b))[_0x400389(0x2b2)],_0x22d9d0=(_0x564ec4=_0x268e13[_0x400389(0x22f)])==null?void 0x0:_0x564ec4['workbook'];if(_0x22d9d0){let _0xc5ba5d=_0x22d9d0==null?void 0x0:_0x22d9d0[_0x400389(0x19d)];_0x22d9d0['originalMeta']=e['textEncoder'][_0x400389(0x28d)]((0x0,e[_0x400389(0x3a6)])(_0xc5ba5d)),Object[_0x400389(0x37d)](_0x22d9d0[_0x400389(0x273)])['forEach'](([,_0x82c879])=>{const _0xb13847=_0x400389;let _0x1f62d7=_0x82c879[_0xb13847(0x19d)];_0x82c879[_0xb13847(0x19d)]=e[_0xb13847(0x1c9)][_0xb13847(0x28d)]((0x0,e['b64DecodeUnicode'])(_0x1f62d7));});}return _0x268e13;}async['getSheetBlock'](_0x567f4d,_0x25df3c){const _0x12cc09=_0x276f58;let {unitID:_0xdfc335,type:_0x5ef2c7,blockID:_0x4959c0}=_0x25df3c,_0x1e79a4=this[_0x12cc09(0x287)]()+'/'+_0x5ef2c7+_0x12cc09(0x316)+_0xdfc335+'/block/'+_0x4959c0;return(await this[_0x12cc09(0x27e)][_0x12cc09(0x24e)](_0x1e79a4))[_0x12cc09(0x2b2)];}async[_0x276f58(0x450)](_0x5e2472,_0x41b4fb){const _0x561edc=_0x276f58;let {unitID:_0x158820,type:_0x323a0f,blockID:_0x52f363}=_0x41b4fb,_0x28a829=this[_0x561edc(0x287)]()+_0x561edc(0x376)+_0x323a0f+_0x561edc(0x316)+_0x158820+'/block/'+_0x52f363;return(await this['_httpService'][_0x561edc(0x24e)](_0x28a829))[_0x561edc(0x2b2)];}async[_0x276f58(0x495)](_0x2caff0,_0x9084d5){const _0x282df8=_0x276f58;let {unitID:_0x1b7f0d,type:_0x1ce42a,from:_0x5ac764,to:_0x269986}=_0x9084d5,_0x383492=this[_0x282df8(0x287)]()+'/'+_0x1ce42a+_0x282df8(0x316)+_0x1b7f0d+_0x282df8(0x26a)+_0x5ac764+'&to='+_0x269986;return(await this['_httpService'][_0x282df8(0x24e)](_0x383492))[_0x282df8(0x2b2)];}[_0x276f58(0x474)](){const _0x1ac1bb=_0x276f58;return this[_0x1ac1bb(0x3bf)][_0x1ac1bb(0x45f)](_0x1ac1bb(0x1b2))??this[_0x1ac1bb(0x287)]();}[_0x276f58(0x287)](){const _0x252f25=_0x276f58;let _0x28a322=this[_0x252f25(0x3bf)][_0x252f25(0x45f)](m);return(_0x28a322==null?void 0x0:_0x28a322[_0x252f25(0x3a5)])??_0x252f25(0x2c2);}async[_0x276f58(0x198)](_0x2befdd,_0x3cc815){const _0x66f33f=_0x276f58;let _0x4c5308=_0x66f33f(0x260)+_0x3cc815[_0x66f33f(0x4a2)]+_0x66f33f(0x316)+_0x3cc815[_0x66f33f(0x32e)]+_0x66f33f(0x372);return(await this[_0x66f33f(0x27e)][_0x66f33f(0x24e)](_0x4c5308,{'params':{'resourceId':JSON['stringify'](_0x3cc815[_0x66f33f(0x420)])}}))['body'];}['saveSnapshot'](){throw Error('This\x20method\x20should\x20not\x20be\x20called\x20on\x20the\x20client\x20side!');}[_0x276f58(0x464)](){const _0x5d3330=_0x276f58;throw Error(_0x5d3330(0x180));}['saveSheetBlock'](){const _0x1e49eb=_0x276f58;throw Error(_0x1e49eb(0x180));}[_0x276f58(0x2c1)](){throw Error('This\x20method\x20should\x20not\x20be\x20called\x20on\x20the\x20client\x20side!');}['copyFileMeta'](){const _0x3775a9=_0x276f58;throw Error(_0x3775a9(0x180));}[_0x276f58(0x418)](){const _0x556798=_0x276f58;throw Error(_0x556798(0x180));}};Z=y([v(0x0,t[_0x276f58(0x1c6)]),v(0x1,(0x0,t['Inject'])(l[_0x276f58(0x315)]))],Z);let Q=class extends t[_0x276f58(0x46e)]{constructor(_0x101d98,_0x4c107f,_0x297128,_0x2c1a15,_0x2ebed7,_0x11aca2){const _0x1abd3d=_0x276f58;super(_0x101d98,_0x4c107f,_0x297128,_0x2c1a15),this['_transformService']=_0x2ebed7,this[_0x1abd3d(0x28b)]=_0x11aca2;}[_0x276f58(0x31d)](_0x39d06c,_0x36c68a){const _0x15af3d=_0x276f58;let _0x29c254=this[_0x15af3d(0x299)](_0x39d06c);if(_0x29c254)try{let _0x22cf9a=this[_0x15af3d(0x489)](_0x29c254,_0x36c68a);this['_substituteUndoStack'](_0x39d06c,_0x22cf9a);}catch(_0x2ecd65){this[_0x15af3d(0x28b)]['error'](_0x15af3d(0x1e7),_0x2ecd65),this[_0x15af3d(0x4a7)](_0x39d06c);}let _0x3b45e3=this[_0x15af3d(0x494)](_0x39d06c);if(_0x3b45e3)try{let _0x1fc001=this['_transformStack'](_0x3b45e3,_0x36c68a);this['_substituteRedoStack'](_0x39d06c,_0x1fc001);}catch(_0x4272fa){this[_0x15af3d(0x28b)][_0x15af3d(0x453)](_0x4272fa),this[_0x15af3d(0x22b)](_0x39d06c);}}[_0x276f58(0x4a7)](_0x20f5b4){const _0x26d629=_0x276f58;let _0x5425d4=this[_0x26d629(0x299)](_0x20f5b4);_0x5425d4&&(_0x5425d4['length']=0x0,this[_0x26d629(0x24c)]());}[_0x276f58(0x22b)](_0x17be4e){const _0x2b36dc=_0x276f58;let _0xe40ace=this[_0x2b36dc(0x494)](_0x17be4e);_0xe40ace&&(_0xe40ace['length']=0x0,this['_updateStatus']());}[_0x276f58(0x359)](_0x1d8c8d,_0x10c841){const _0x3111e2=_0x276f58;this[_0x3111e2(0x44c)][_0x3111e2(0x2b4)](_0x1d8c8d,_0x10c841),this[_0x3111e2(0x24c)]();}[_0x276f58(0x423)](_0x3aa83d,_0x7dedd1){const _0x8dae6c=_0x276f58;this[_0x8dae6c(0x36a)][_0x8dae6c(0x2b4)](_0x3aa83d,_0x7dedd1),this['_updateStatus']();}[_0x276f58(0x489)](_0x290886,_0x1ecf27){const _0x309fc0=_0x276f58;let _0x2292bb=[],_0x54b21c=_0x1ecf27,_0x2d4e05=_0x1ecf27;for(let _0x36892b=_0x290886[_0x309fc0(0x3f4)]-0x1;_0x36892b>=0x0;_0x36892b--){let {unitID:_0x2140aa,undoMutations:_0x4028ce,redoMutations:_0x21848a}=_0x290886[_0x36892b],_0x4e4413=this[_0x309fc0(0x28c)][_0x309fc0(0x195)](_0x54b21c,_0x4028ce),_0x2deb08=this[_0x309fc0(0x28c)]['transformMutationsWithChangeset'](_0x2d4e05,_0x21848a);if((0x0,e[_0x309fc0(0x23b)])(_0x4e4413)||(0x0,e[_0x309fc0(0x23b)])(_0x2deb08)){this[_0x309fc0(0x28b)]['error'](_0x309fc0(0x1e7),'transformStack\x20failed!',_0x4e4413,_0x2deb08);break;}_0x54b21c=_0x4e4413[_0x309fc0(0x257)],_0x2d4e05=_0x2deb08[_0x309fc0(0x257)],_0x2292bb[_0x309fc0(0x26d)]({'unitID':_0x2140aa,'undoMutations':_0x4e4413[_0x309fc0(0x394)],'redoMutations':_0x2deb08['m2Prime']});}return _0x2292bb[_0x309fc0(0x343)]();}};Q=y([v(0x0,t[_0x276f58(0x30b)]),v(0x1,t[_0x276f58(0x2c9)]),v(0x2,t[_0x276f58(0x339)]),v(0x3,t[_0x276f58(0x1c6)]),v(0x4,e[_0x276f58(0x345)]),v(0x5,t[_0x276f58(0x48b)])],Q);let $=class extends t['Plugin']{constructor(_0x417015=ee,_0x2a08c2,_0x2a69b3,_0x197a22){const _0x63ecb3=_0x276f58;super(),this[_0x63ecb3(0x46c)]=_0x417015,this[_0x63ecb3(0x28b)]=_0x2a08c2,this[_0x63ecb3(0x217)]=_0x2a69b3,this['_configService']=_0x197a22;let {..._0x29ee78}=(0x0,t[_0x63ecb3(0x447)])({},ee,this[_0x63ecb3(0x46c)]);if(!_0x29ee78[_0x63ecb3(0x467)])throw Error(_0x63ecb3(0x3c9));this[_0x63ecb3(0x46c)]=_0x29ee78,this[_0x63ecb3(0x3bf)][_0x63ecb3(0x322)](m,_0x29ee78);}['onStarting'](){const _0x200463=_0x276f58;this[_0x200463(0x3bf)][_0x200463(0x322)](t['OBJECT_PERMISSION_CONFIG_KEY'],this[_0x200463(0x46c)][_0x200463(0x186)]??[]),this[_0x200463(0x352)](),this['_initDependencies']();}[_0x276f58(0x352)](){const _0x3ba709=_0x276f58;var _0x1ae669,_0x27218a;this[_0x3ba709(0x217)]['has'](t[_0x3ba709(0x497)])&&this[_0x3ba709(0x28b)][_0x3ba709(0x453)]('[UniverCollaborationClientPlugin]',_0x3ba709(0x221));let _0x371e12=(0x0,t['mergeOverrideWithDependencies'])([[t['IUndoRedoService'],{'useClass':Q}],[Xe,{'useValue':Ze()}],[V],[b],[S],[W],[K],[ae],[X],[_],[q],[qe,{'useClass':this['_config']['socketService']}],[e[_0x3ba709(0x20e)],{'useClass':Z}],[t[_0x3ba709(0x255)],{'useClass':G}],[t[_0x3ba709(0x2c3)],{'useClass':J}],[nt,{'useClass':U}],[t[_0x3ba709(0x2a7)],{'useClass':Y}],[H],[tt]],(_0x1ae669=this[_0x3ba709(0x46c)])==null?void 0x0:_0x1ae669[_0x3ba709(0x313)]);if(!((_0x27218a=this[_0x3ba709(0x46c)])!=null&&_0x27218a[_0x3ba709(0x347)])){let _0x491830=_0x371e12['findIndex'](([_0x36c4bc])=>_0x36c4bc===C);_0x491830!==-0x1&&_0x371e12[_0x3ba709(0x2d3)](_0x491830,0x1);}(0x0,t[_0x3ba709(0x1a2)])(this[_0x3ba709(0x217)],_0x371e12);}[_0x276f58(0x243)](){const _0x69556e=_0x276f58;var _0x330689,_0x8268b1;if(this[_0x69556e(0x217)][_0x69556e(0x24e)](l[_0x69556e(0x315)])['registerHTTPInterceptor']({'priority':0x14,'interceptor':(0x0,l[_0x69556e(0x1dd)])({'maxParallel':0x6})}),!((_0x330689=this[_0x69556e(0x46c)])!=null&&_0x330689[_0x69556e(0x1eb)])){var _0x159adf;(_0x159adf=this[_0x69556e(0x217)]['get'](x,t[_0x69556e(0x463)][_0x69556e(0x1fc)]))==null||_0x159adf['disableLocalCache']();}(_0x8268b1=this[_0x69556e(0x46c)])!=null&&_0x8268b1[_0x69556e(0x2bd)]&&(0x0,t['touchDependencies'])(this[_0x69556e(0x217)],[[W]]),(0x0,t[_0x69556e(0x2a5)])(this[_0x69556e(0x217)],[[K],[H],[X]]);}};g($,_0x276f58(0x319),_0x276f58(0x248)),g($,'packageName',$e),g($,_0x276f58(0x276),et),$=y([(0x0,t['DependentOn'])(u[_0x276f58(0x1d0)],l[_0x276f58(0x1c2)],e[_0x276f58(0x3bc)]),v(0x1,t[_0x276f58(0x48b)]),v(0x2,(0x0,t[_0x276f58(0x318)])(t[_0x276f58(0x204)])),v(0x3,t[_0x276f58(0x1c6)])],$),Object['defineProperty'](exports,_0x276f58(0x265),{'enumerable':!0x0,'get':function(){return G;}}),Object[_0x276f58(0x2f2)](exports,_0x276f58(0x35d),{'enumerable':!0x0,'get':function(){return k;}}),Object['defineProperty'](exports,'AwaitingWithPendingState',{'enumerable':!0x0,'get':function(){return A;}}),Object[_0x276f58(0x2f2)](exports,_0x276f58(0x306),{'enumerable':!0x0,'get':function(){return I;}}),Object[_0x276f58(0x2f2)](exports,_0x276f58(0x483),{'enumerable':!0x0,'get':function(){return z;}}),exports[_0x276f58(0x484)]=m,Object['defineProperty'](exports,_0x276f58(0x41e),{'enumerable':!0x0,'get':function(){return U;}}),Object[_0x276f58(0x2f2)](exports,'CollaborationController',{'enumerable':!0x0,'get':function(){return H;}}),Object['defineProperty'](exports,_0x276f58(0x44f),{'enumerable':!0x0,'get':function(){return P;}}),Object[_0x276f58(0x2f2)](exports,'CollaborationImageIoService',{'enumerable':!0x0,'get':function(){return J;}}),Object[_0x276f58(0x2f2)](exports,_0x276f58(0x386),{'enumerable':!0x0,'get':function(){return ve;}}),Object[_0x276f58(0x2f2)](exports,_0x276f58(0x2db),{'enumerable':!0x0,'get':function(){return V;}}),Object['defineProperty'](exports,_0x276f58(0x407),{'enumerable':!0x0,'get':function(){return Ye;}}),exports[_0x276f58(0x4a1)]=Be,exports['CollaborationUIEventId']=ie,exports['CollaborationUIEventService']=_,Object[_0x276f58(0x2f2)](exports,_0x276f58(0x30d),{'enumerable':!0x0,'get':function(){return Q;}}),exports[_0x276f58(0x29b)]=ae,Object[_0x276f58(0x2f2)](exports,_0x276f58(0x390),{'enumerable':!0x0,'get':function(){return j;}}),exports[_0x276f58(0x3a9)]=_0x276f58(0x2c5),exports[_0x276f58(0x414)]='/universer-api/uniscript',exports[_0x276f58(0x1b4)]=_0x276f58(0x2e2),Object[_0x276f58(0x2f2)](exports,_0x276f58(0x2ab),{'enumerable':!0x0,'get':function(){return q;}}),Object[_0x276f58(0x2f2)](exports,_0x276f58(0x1f8),{'enumerable':!0x0,'get':function(){return F;}}),Object[_0x276f58(0x2f2)](exports,_0x276f58(0x27f),{'enumerable':!0x0,'get':function(){return N;}}),exports[_0x276f58(0x3d4)]=_0x276f58(0x25e),exports[_0x276f58(0x2a4)]='HEARTBEAT_TIMEOUT',exports['IAttachmentIoService']=nt,exports['ICollaborationClientAdapterService']=Xe,exports['ICollaborationSocketService']=qe,exports[_0x276f58(0x48a)]=x,exports[_0x276f58(0x2a0)]=We,exports[_0x276f58(0x36f)]=C,exports['LOCAL_CACHE_INTERVAL']=0x3e8,exports['LOCAL_CACHE_INTERVAL_KEY']=_0x276f58(0x1ca),Object[_0x276f58(0x2f2)](exports,_0x276f58(0x2cd),{'enumerable':!0x0,'get':function(){return b;}}),Object['defineProperty'](exports,'MentionIoHttpService',{'enumerable':!0x0,'get':function(){return Y;}}),Object['defineProperty'](exports,_0x276f58(0x317),{'enumerable':!0x0,'get':function(){return M;}}),Object[_0x276f58(0x2f2)](exports,_0x276f58(0x1be),{'enumerable':!0x0,'get':function(){return B;}}),Object['defineProperty'](exports,'PendingState',{'enumerable':!0x0,'get':function(){return O;}}),exports[_0x276f58(0x381)]='REMOTE_UNISCRIPT_EXECUTION_ENDPOINT',exports[_0x276f58(0x22e)]='RETRY_CONNECTING_MAX_COUNT',exports[_0x276f58(0x2f6)]=ge,Object[_0x276f58(0x2f2)](exports,_0x276f58(0x2d0),{'enumerable':!0x0,'get':function(){return L;}}),Object[_0x276f58(0x2f2)](exports,_0x276f58(0x20d),{'enumerable':!0x0,'get':function(){return S;}}),Object['defineProperty'](exports,_0x276f58(0x3b9),{'enumerable':!0x0,'get':function(){return R;}}),Object['defineProperty'](exports,'SnapshotServerOverHTTPService',{'enumerable':!0x0,'get':function(){return Z;}}),Object[_0x276f58(0x2f2)](exports,'SyncedState',{'enumerable':!0x0,'get':function(){return D;}}),exports[_0x276f58(0x355)]=xe,Object[_0x276f58(0x2f2)](exports,_0x276f58(0x416),{'enumerable':!0x0,'get':function(){return $;}}),exports[_0x276f58(0x471)]=Ze,exports[_0x276f58(0x424)]=Ge,exports[_0x276f58(0x493)]=ye,exports['serializeCombRequest']=Ke;
1
+ const _0x47c516=_0x88a9;(function(_0x4ac19e,_0x39e52e){const _0xad1a30=_0x88a9,_0xb8ac0e=_0x4ac19e();while(!![]){try{const _0x113a92=parseInt(_0xad1a30(0x23a))/0x1*(-parseInt(_0xad1a30(0x4ca))/0x2)+parseInt(_0xad1a30(0x3f3))/0x3+parseInt(_0xad1a30(0x407))/0x4*(-parseInt(_0xad1a30(0x355))/0x5)+-parseInt(_0xad1a30(0x34f))/0x6*(parseInt(_0xad1a30(0x434))/0x7)+parseInt(_0xad1a30(0x52e))/0x8+-parseInt(_0xad1a30(0x22a))/0x9+parseInt(_0xad1a30(0x261))/0xa*(parseInt(_0xad1a30(0x414))/0xb);if(_0x113a92===_0x39e52e)break;else _0xb8ac0e['push'](_0xb8ac0e['shift']());}catch(_0x5e1e75){_0xb8ac0e['push'](_0xb8ac0e['shift']());}}}(_0x6063,0x6a4ee),Object[_0x47c516(0x202)](exports,Symbol[_0x47c516(0x517)],{'value':_0x47c516(0x45d)}));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='collaboration-client.config',ee={};function te(_0x29630b){const _0x2e0734=_0x47c516;return JSON[_0x2e0734(0x307)](_0x29630b)['length'];}function h(_0x34f693){'@babel/helpers - typeof';const _0x2571e4=_0x47c516;return h=typeof Symbol==_0x2571e4(0x484)&&typeof Symbol[_0x2571e4(0x4bd)]==_0x2571e4(0x380)?function(_0x506617){return typeof _0x506617;}:function(_0x1c699d){const _0xccdb02=_0x2571e4;return _0x1c699d&&typeof Symbol=='function'&&_0x1c699d[_0xccdb02(0x253)]===Symbol&&_0x1c699d!==Symbol['prototype']?_0xccdb02(0x380):typeof _0x1c699d;},h(_0x34f693);}function ne(_0x535a94,_0x426faa){const _0x18cef0=_0x47c516;if(h(_0x535a94)!=_0x18cef0(0x227)||!_0x535a94)return _0x535a94;var _0x2ae51f=_0x535a94[Symbol['toPrimitive']];if(_0x2ae51f!==void 0x0){var _0xc3ee7b=_0x2ae51f['call'](_0x535a94,_0x426faa||_0x18cef0(0x46f));if(h(_0xc3ee7b)!=_0x18cef0(0x227))return _0xc3ee7b;throw TypeError(_0x18cef0(0x3b7));}return(_0x426faa==='string'?String:Number)(_0x535a94);}function re(_0x41813d){const _0x5cd8b2=_0x47c516;var _0x22dd5d=ne(_0x41813d,_0x5cd8b2(0x46a));return h(_0x22dd5d)=='symbol'?_0x22dd5d:_0x22dd5d+'';}function g(_0x53a630,_0x99b030,_0x533b57){return(_0x99b030=re(_0x99b030))in _0x53a630?Object['defineProperty'](_0x53a630,_0x99b030,{'value':_0x533b57,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x53a630[_0x99b030]=_0x533b57,_0x53a630;}let ie=function(_0x2aea50){const _0x246dd1=_0x47c516;return _0x2aea50[_0x246dd1(0x451)]='OTHER_CLIENT_EDITING',_0x2aea50[_0x246dd1(0x33b)]=_0x246dd1(0x33b),_0x2aea50[_0x246dd1(0x3f9)]='CONFLICT_PROCESSING',_0x2aea50[_0x246dd1(0x216)]=_0x246dd1(0x216),_0x2aea50[_0x246dd1(0x30f)]=_0x246dd1(0x30f),_0x2aea50['CLOSE_ROOM']='CLOSE_ROOM',_0x2aea50[_0x246dd1(0x345)]='JOIN_ROOM_FAILED',_0x2aea50['SOCKET_FAILED_RETRY']=_0x246dd1(0x3fb),_0x2aea50[_0x246dd1(0x4ce)]=_0x246dd1(0x4ce),_0x2aea50['SUBMIT_CHANGESET_TIMEOUT']=_0x246dd1(0x3e5),_0x2aea50;}({});var _=class{constructor(){const _0x1807f4=_0x47c516;g(this,_0x1807f4(0x21c),new i[(_0x1807f4(0x369))]()),g(this,'event$',this[_0x1807f4(0x21c)]['asObservable']());}['emitEvent'](_0x1b909f){const _0x215380=_0x47c516;this[_0x215380(0x21c)][_0x215380(0x485)](_0x1b909f);}},ae=class{constructor(){const _0xde36e9=_0x47c516;g(this,_0xde36e9(0x338),new i[(_0xde36e9(0x369))]()),g(this,_0xde36e9(0x28d),this['_commentUpdate$'][_0xde36e9(0x404)]());}['onCommentUpdate'](_0x5156e3){const _0x127118=_0x47c516;this['_commentUpdate$'][_0x127118(0x485)](_0x5156e3);}};function v(_0x3bdf90,_0x53ec26){return function(_0x36cccd,_0x2bf602){_0x53ec26(_0x36cccd,_0x2bf602,_0x3bdf90);};}function y(_0x439018,_0x4fa86e,_0x18fbc7,_0x104305){const _0x348ab=_0x47c516;var _0x3c1e38=arguments[_0x348ab(0x476)],_0x22ff1f=_0x3c1e38<0x3?_0x4fa86e:_0x104305===null?_0x104305=Object[_0x348ab(0x2ef)](_0x4fa86e,_0x18fbc7):_0x104305,_0x1ca185;if(typeof Reflect=='object'&&typeof Reflect['decorate']=='function')_0x22ff1f=Reflect[_0x348ab(0x37c)](_0x439018,_0x4fa86e,_0x18fbc7,_0x104305);else{for(var _0x9d5403=_0x439018[_0x348ab(0x476)]-0x1;_0x9d5403>=0x0;_0x9d5403--)(_0x1ca185=_0x439018[_0x9d5403])&&(_0x22ff1f=(_0x3c1e38<0x3?_0x1ca185(_0x22ff1f):_0x3c1e38>0x3?_0x1ca185(_0x4fa86e,_0x18fbc7,_0x22ff1f):_0x1ca185(_0x4fa86e,_0x18fbc7))||_0x22ff1f);}return _0x3c1e38>0x3&&_0x22ff1f&&Object[_0x348ab(0x202)](_0x4fa86e,_0x18fbc7,_0x22ff1f),_0x22ff1f;}let b=class extends t[_0x47c516(0x542)]{constructor(_0x3b6da9){const _0x548d73=_0x47c516;super(),this[_0x548d73(0x2af)]=_0x3b6da9,g(this,_0x548d73(0x27c),new Map()),g(this,_0x548d73(0x35e),new i['Subject']()),this[_0x548d73(0x4dc)]((0x0,i[_0x548d73(0x4f0)])(this[_0x548d73(0x2af)][_0x548d73(0x4bf)](t[_0x548d73(0x4f3)][_0x548d73(0x4ab)])[_0x548d73(0x3e8)]((0x0,s[_0x548d73(0x41a)])(_0x2b5f7f=>_0x2b5f7f[_0x548d73(0x4fc)]())),this[_0x548d73(0x2af)][_0x548d73(0x4bf)](t[_0x548d73(0x4f3)][_0x548d73(0x48e)])[_0x548d73(0x3e8)]((0x0,s[_0x548d73(0x41a)])(_0x42c348=>_0x42c348['getUnitId']())),this['_univerInstanceService'][_0x548d73(0x4bf)](t[_0x548d73(0x4f3)]['UNIVER_BOARD'])[_0x548d73(0x3e8)]((0x0,s[_0x548d73(0x41a)])(_0x59addf=>_0x59addf['getUnitId']())),this['_univerInstanceService'][_0x548d73(0x4bf)](t[_0x548d73(0x4f3)]['UNIVER_BASE'])[_0x548d73(0x3e8)]((0x0,s[_0x548d73(0x41a)])(_0x1adf9c=>_0x1adf9c[_0x548d73(0x4fc)]())))[_0x548d73(0x51a)](_0x7d5735=>this[_0x548d73(0x2c8)](_0x7d5735)));}['waitForRoom$'](_0x21206b){const _0x4e6f06=_0x47c516;return this['_roomMembers'][_0x4e6f06(0x51d)](_0x21206b)?(0x0,i['of'])(this[_0x4e6f06(0x27c)][_0x4e6f06(0x1fa)](_0x21206b)):this[_0x4e6f06(0x35e)][_0x4e6f06(0x3e8)]((0x0,s[_0x4e6f06(0x41a)])(_0x1989d8=>{const _0x492aa4=_0x4e6f06;if(_0x1989d8===_0x21206b)return this[_0x492aa4(0x27c)][_0x492aa4(0x1fa)](_0x1989d8);}));}[_0x47c516(0x388)](_0x4a725f,_0x5dab26){const _0x274fd6=_0x47c516;let _0x329d77=this[_0x274fd6(0x27c)][_0x274fd6(0x1fa)](_0x4a725f);_0x329d77||(_0x329d77=new oe(),this[_0x274fd6(0x27c)][_0x274fd6(0x2f5)](_0x4a725f,_0x329d77),this[_0x274fd6(0x35e)]['next'](_0x4a725f)),_0x329d77[_0x274fd6(0x388)](_0x5dab26);}['removeMember'](_0x14ec26,_0x25c124){const _0x58cb09=_0x47c516;let _0x5bfd9e=this[_0x58cb09(0x27c)][_0x58cb09(0x1fa)](_0x14ec26);_0x5bfd9e&&_0x5bfd9e[_0x58cb09(0x4a5)](_0x25c124);}[_0x47c516(0x2bc)](_0x395396){const _0x190e9e=_0x47c516;return this[_0x190e9e(0x27c)]['get'](_0x395396);}[_0x47c516(0x457)](_0xc6e158,_0x1a9b22){const _0xf75555=_0x47c516;let _0x56c2a5=this[_0xf75555(0x27c)][_0xf75555(0x1fa)](_0xc6e158);if(_0x56c2a5)return _0x56c2a5['getMember'](_0x1a9b22);}[_0x47c516(0x2c8)](_0xb02f40){const _0x18c547=_0x47c516;let _0x5b8988=this[_0x18c547(0x27c)]['get'](_0xb02f40);_0x5b8988&&(_0x5b8988[_0x18c547(0x328)](),this['_roomMembers'][_0x18c547(0x512)](_0xb02f40));}['dispose'](){const _0x23db99=_0x47c516;this['_roomMembers'][_0x23db99(0x4b1)](_0x257923=>_0x257923['dispose']()),this[_0x23db99(0x27c)]['clear'](),this[_0x23db99(0x35e)]['complete']();}};b=y([v(0x0,t['IUniverInstanceService'])],b);var oe=class extends t[_0x47c516(0x542)]{constructor(..._0x26025d){const _0x183587=_0x47c516;super(..._0x26025d),g(this,_0x183587(0x3fd),new Map()),g(this,_0x183587(0x2b3),new i[(_0x183587(0x2f4))](this[_0x183587(0x3fd)])),g(this,_0x183587(0x40a),this[_0x183587(0x2b3)]['asObservable']());}['dispose'](){const _0xbffcc8=_0x47c516;this['_members'][_0xbffcc8(0x4c9)](),this['_members$'][_0xbffcc8(0x2ce)]();}[_0x47c516(0x388)](_0x28fc36){const _0x39df6f=_0x47c516;this['_members']['set'](_0x28fc36[_0x39df6f(0x46e)],_0x28fc36),this[_0x39df6f(0x4af)]();}[_0x47c516(0x4a5)](_0x2bbafb){const _0x3d7f9a=_0x47c516;this[_0x3d7f9a(0x3fd)]['delete'](_0x2bbafb),this['_emitMembers']();}[_0x47c516(0x457)](_0x436ad2){const _0x1439a0=_0x47c516;return this[_0x1439a0(0x3fd)][_0x1439a0(0x1fa)](_0x436ad2);}[_0x47c516(0x3bc)](){const _0x24481e=_0x47c516;return Array['from'](this[_0x24481e(0x3fd)][_0x24481e(0x283)]());}[_0x47c516(0x4af)](){const _0x12c804=_0x47c516;this[_0x12c804(0x2b3)][_0x12c804(0x485)](this[_0x12c804(0x3fd)]);}};function se(_0x54661e,_0x53eb66){const _0x24b451=_0x47c516;if(le(_0x54661e))return _0x53eb66;if(_0x53eb66[_0x24b451(0x393)]===e[_0x24b451(0x427)][_0x24b451(0x45e)]){let _0x5731c4=me(_0x54661e),_0x5b1285=_0x53eb66;return{..._0x5b1285,'data':{..._0x5b1285[_0x24b451(0x3cf)],'unitID':_0x54661e[_0x24b451(0x2cf)][_0x24b451(0x220)],'unitType':_0x54661e[_0x24b451(0x2cf)][_0x24b451(0x4aa)]??_0x5b1285[_0x24b451(0x3cf)][_0x24b451(0x4aa)],'changeset':_0x5731c4['toRemote'](_0x5b1285[_0x24b451(0x3cf)][_0x24b451(0x28a)],he(_0x54661e))}};}if(_0x53eb66[_0x24b451(0x393)]===e[_0x24b451(0x427)][_0x24b451(0x525)]){let _0x5b553b=_0x53eb66;return{..._0x5b553b,'data':{..._0x5b553b[_0x24b451(0x3cf)],'unitID':_0x54661e[_0x24b451(0x2cf)][_0x24b451(0x220)],'unitType':_0x54661e[_0x24b451(0x2cf)]['unitType']??_0x5b553b['data']['unitType']}};}return _0x53eb66;}function ce(_0x2671cd,_0x5f5549){const _0x41a59c=_0x47c516;if(le(_0x2671cd))return[_0x5f5549];switch(_0x5f5549['eventID']){case e[_0x41a59c(0x427)][_0x41a59c(0x363)]:return[ue(_0x2671cd,_0x5f5549)];case e[_0x41a59c(0x427)][_0x41a59c(0x446)]:return[fe(_0x2671cd,_0x5f5549)];case e[_0x41a59c(0x427)][_0x41a59c(0x2fa)]:return[de(_0x2671cd,_0x5f5549)];default:return[_0x5f5549];}}function le(_0x385d21){const _0x591c82=_0x47c516;return _0x385d21[_0x591c82(0x2cf)]['endpoint']==null&&_0x385d21[_0x591c82(0x2cf)][_0x591c82(0x220)]===_0x385d21[_0x591c82(0x399)]&&!_0x385d21[_0x591c82(0x28a)];}function ue(_0x510c01,_0x28e64b){const _0x342d5e=_0x47c516;return{..._0x28e64b,'data':(0x0,e[_0x342d5e(0x505)])(pe(_0x510c01,(0x0,e[_0x342d5e(0x450)])(_0x28e64b[_0x342d5e(0x3cf)])))};}function de(_0x4ba7c5,_0x80ce01){const _0xb9edf3=_0x47c516;return{..._0x80ce01,'data':pe(_0x4ba7c5,_0x80ce01[_0xb9edf3(0x3cf)])};}function fe(_0x5dc88b,_0x560d9e){const _0x9106f3=_0x47c516;let _0x6f951c=_0x560d9e[_0x9106f3(0x3cf)];return{..._0x560d9e,'data':{..._0x6f951c,'changesets':_0x6f951c[_0x9106f3(0x4a9)][_0x9106f3(0x41a)](_0x573f2d=>(0x0,e[_0x9106f3(0x505)])(pe(_0x5dc88b,(0x0,e['parseProtocolChangeset'])(_0x573f2d))))}};}function pe(_0x225916,_0x109844){const _0x26ea88=_0x47c516;return me(_0x225916)[_0x26ea88(0x41b)](_0x109844,he(_0x225916));}function me(_0x547872){const _0x2dc92b=_0x47c516;if(!_0x547872[_0x2dc92b(0x28a)])throw Error(_0x2dc92b(0x364));return _0x547872['changeset'];}function he(_0x3b90f0){const _0x29fbc5=_0x47c516;return{'localUnitId':_0x3b90f0[_0x29fbc5(0x399)],'unitType':_0x3b90f0[_0x29fbc5(0x4aa)],'target':_0x3b90f0['target']};}let ge=function(_0xf7bd12){const _0x5c34ea=_0x47c516;return _0xf7bd12[_0xf7bd12[_0x5c34ea(0x53d)]=0x0]=_0x5c34ea(0x53d),_0xf7bd12[_0xf7bd12[_0x5c34ea(0x428)]=0x1]=_0x5c34ea(0x428),_0xf7bd12[_0xf7bd12['OFFLINE']=0x2]='OFFLINE',_0xf7bd12[_0xf7bd12[_0x5c34ea(0x392)]=0x3]=_0x5c34ea(0x392),_0xf7bd12;}({});const _e={[a[_0x47c516(0x487)][_0x47c516(0x252)]]:_0x47c516(0x3da),[a[_0x47c516(0x487)][_0x47c516(0x211)]]:_0x47c516(0x21b),[a[_0x47c516(0x487)][_0x47c516(0x453)]]:_0x47c516(0x25e),[a[_0x47c516(0x487)][_0x47c516(0x33f)]]:'session.room-permission-denied',[a['CmdRspCode']['GLOBAL_ROOMS_CNT_EXCEEDS']]:_0x47c516(0x300)};let ve=class extends t[_0x47c516(0x3b6)]{get[_0x47c516(0x462)](){const _0x328a2e=_0x47c516;return this[_0x328a2e(0x291)][_0x328a2e(0x28b)]();}constructor(_0x14f800,_0x34e89d,_0x370e7d,_0x2e62a1,_0x5638ab,_0x31729a,_0x8ca638,_0x297e8b){const _0xf0d411=_0x47c516;super(),this[_0xf0d411(0x4c7)]=_0x14f800,this[_0xf0d411(0x266)]=_0x370e7d,this[_0xf0d411(0x469)]=_0x2e62a1,this[_0xf0d411(0x2e6)]=_0x5638ab,this['_commentService']=_0x31729a,this[_0xf0d411(0x396)]=_0x8ca638,this[_0xf0d411(0x228)]=_0x297e8b,g(this,_0xf0d411(0x291),new i[(_0xf0d411(0x2f4))](0x0)),g(this,_0xf0d411(0x455),this[_0xf0d411(0x291)][_0xf0d411(0x404)]()),g(this,_0xf0d411(0x21c),new i[(_0xf0d411(0x369))]()),g(this,_0xf0d411(0x502),this['_event$'][_0xf0d411(0x404)]()),g(this,_0xf0d411(0x36a),void 0x0),g(this,'_socketMessageSubscription',void 0x0),g(this,_0xf0d411(0x4dd),void 0x0),g(this,_0xf0d411(0x49b),!0x1),g(this,'_telemetryInfo',null),this['_shouldReportTelemetry']=!!this[_0xf0d411(0x228)],_0x34e89d[_0xf0d411(0x3e8)]((0x0,i['takeUntil'])(this[_0xf0d411(0x25f)]))[_0xf0d411(0x51a)](_0x15c67b=>{const _0x4d5652=_0xf0d411;if(_0x15c67b!==void 0x0){if(this[_0x4d5652(0x36a)]=_0x15c67b,_0x15c67b)this['_joinRoom'](_0x15c67b),this[_0x4d5652(0x39e)]=_0x15c67b['message$']['subscribe'](_0x499420=>{const _0x44b284=_0x4d5652;_0x499420[_0x44b284(0x46d)]===this[_0x44b284(0x4c7)][_0x44b284(0x2cf)][_0x44b284(0x220)]&&this[_0x44b284(0x2ac)](_0x499420);});else{var _0x37759a;this[_0x4d5652(0x4ff)](),this[_0x4d5652(0x291)]['next'](0x2),(_0x37759a=this[_0x4d5652(0x39e)])==null||_0x37759a[_0x4d5652(0x44d)](),this[_0x4d5652(0x39e)]=null;}}});}['getMemberID'](){const _0x29327d=_0x47c516;var _0x3837ad;return((_0x3837ad=this[_0x29327d(0x36a)])==null?void 0x0:_0x3837ad[_0x29327d(0x46e)])??null;}['dispose'](){const _0x4decf2=_0x47c516;super['dispose'](),this[_0x4decf2(0x37d)](),this[_0x4decf2(0x25f)][_0x4decf2(0x485)](),this[_0x4decf2(0x25f)][_0x4decf2(0x2ce)]();}[_0x47c516(0x37d)](){const _0x8f794f=_0x47c516;var _0x469fdf;this[_0x8f794f(0x4ff)](),(_0x469fdf=this['_socket'])==null||_0x469fdf[_0x8f794f(0x422)]({'cmd':a[_0x8f794f(0x513)][_0x8f794f(0x269)],'data':{'roomID':this[_0x8f794f(0x4c7)]['target'][_0x8f794f(0x220)]}}),this['_event$']['complete'](),this['_sessionStatus$'][_0x8f794f(0x2ce)]();}[_0x47c516(0x2ac)](_0x216bf1){const _0x379a9f=_0x47c516;_0x216bf1[_0x379a9f(0x3ab)]===a[_0x379a9f(0x513)][_0x379a9f(0x342)]?this[_0x379a9f(0x3e7)](_0x216bf1):_0x216bf1[_0x379a9f(0x3ab)]===a[_0x379a9f(0x513)][_0x379a9f(0x2dc)]&&this[_0x379a9f(0x32d)](_0x216bf1);}[_0x47c516(0x4b5)](_0x23e07e){const _0xdd6b44=_0x47c516;this[_0xdd6b44(0x291)]['next'](0x1),_0x23e07e['send']({'cmd':a[_0xdd6b44(0x513)]['JOIN'],'routeKey':this[_0xdd6b44(0x4c7)][_0xdd6b44(0x2cf)][_0xdd6b44(0x220)],'routeType':'','data':{'rooms':[{'roomID':this['_identity'][_0xdd6b44(0x2cf)]['unitId']}]}});}[_0x47c516(0x3e7)](_0x36c7ba){const _0x30e0cb=_0x47c516;var _0x46cca0;if(_0x36c7ba[_0x30e0cb(0x30a)]in _e){this[_0x30e0cb(0x396)]['emitEvent']({'id':_0x30e0cb(0x345),'data':_e[_0x36c7ba[_0x30e0cb(0x30a)]]}),this[_0x30e0cb(0x291)]['next'](0x2);return;}this[_0x30e0cb(0x291)]['next'](0x3);let _0x794874=(_0x46cca0=_0x36c7ba[_0x30e0cb(0x3cf)][_0x30e0cb(0x271)][this['_identity']['target'][_0x30e0cb(0x220)]])==null?void 0x0:_0x46cca0['members'];_0x794874&&_0x794874[_0x30e0cb(0x4b1)](_0x5044a6=>this[_0x30e0cb(0x2e6)][_0x30e0cb(0x388)](this[_0x30e0cb(0x4c7)][_0x30e0cb(0x399)],_0x5044a6));}['_onRecvEvent'](_0x296ca1){const _0x5802ca=_0x47c516;try{let _0x2adf94=ce(this[_0x5802ca(0x4c7)],_0x296ca1[_0x5802ca(0x3cf)]);for(let _0x3949e5 of _0x2adf94)switch(_0x3949e5['eventID']){case e[_0x5802ca(0x427)]['USERS_ENTER']:this[_0x5802ca(0x4d6)](_0x3949e5),this['_event$'][_0x5802ca(0x485)](_0x3949e5);break;case e[_0x5802ca(0x427)][_0x5802ca(0x235)]:this[_0x5802ca(0x21e)](_0x3949e5),this[_0x5802ca(0x21c)][_0x5802ca(0x485)](_0x3949e5);break;case e[_0x5802ca(0x427)][_0x5802ca(0x30b)]:case e['CollaborationEvent']['CHANGESET_SHOULD_RETRY']:this[_0x5802ca(0x4c5)](),this[_0x5802ca(0x523)](),this[_0x5802ca(0x21c)][_0x5802ca(0x485)](_0x3949e5);break;case e[_0x5802ca(0x427)]['MSG_FOR_ERROR']:this[_0x5802ca(0x266)][_0x5802ca(0x492)](_0x5802ca(0x2a2)+JSON[_0x5802ca(0x307)](_0x3949e5)),this[_0x5802ca(0x21c)]['next'](_0x3949e5);break;case e[_0x5802ca(0x427)][_0x5802ca(0x507)]:this[_0x5802ca(0x254)][_0x5802ca(0x4df)](_0x3949e5['data']),this[_0x5802ca(0x21c)][_0x5802ca(0x485)](_0x3949e5);break;default:this[_0x5802ca(0x21c)]['next'](_0x3949e5);}}catch(_0x2d65dd){this[_0x5802ca(0x266)][_0x5802ca(0x492)](_0x2d65dd,_0x296ca1);}}['_onUserJoin'](_0xdb62aa){const _0x1d21a5=_0x47c516;this['_memberService'][_0x1d21a5(0x388)](this[_0x1d21a5(0x4c7)][_0x1d21a5(0x399)],_0xdb62aa[_0x1d21a5(0x3cf)]);}[_0x47c516(0x21e)](_0x3f1aef){const _0x2b3efd=_0x47c516;this[_0x2b3efd(0x2e6)]['removeMember'](this[_0x2b3efd(0x4c7)][_0x2b3efd(0x399)],_0x3f1aef[_0x2b3efd(0x3cf)]['memberID']);}async['send'](_0x1c911c,_0x316b2a){const _0xaaf7e5=_0x47c516;if(this[_0xaaf7e5(0x462)]!==0x3||!this['_socket'])throw Error(_0xaaf7e5(0x2e5));try{let _0x4fabf7=se(this['_identity'],_0x1c911c);_0x4fabf7[_0xaaf7e5(0x393)]===e[_0xaaf7e5(0x427)][_0xaaf7e5(0x45e)]&&(this[_0xaaf7e5(0x296)](),this['_startTelemetryCollaborationNewChangeset'](_0x4fabf7)),this[_0xaaf7e5(0x36a)][_0xaaf7e5(0x422)]({'cmd':a[_0xaaf7e5(0x513)][_0xaaf7e5(0x467)],'routeKey':this['_identity'][_0xaaf7e5(0x2cf)][_0xaaf7e5(0x220)],'routeType':'','data':_0x4fabf7});}catch(_0x2c3430){this[_0xaaf7e5(0x266)][_0xaaf7e5(0x492)](_0x2c3430);}}['_scheduleCollaborationTimeoutTimer'](){const _0x48b056=_0x47c516;this['_collaborationTimeoutTimer']=setTimeout(()=>{const _0x3481d3=_0x88a9;this[_0x3481d3(0x4dd)]=null,this[_0x3481d3(0x396)][_0x3481d3(0x315)]({'id':_0x3481d3(0x3e5)});},this[_0x48b056(0x469)][_0x48b056(0x33e)](_0x48b056(0x540))??0x4e20);}[_0x47c516(0x523)](){this['_collaborationTimeoutTimer']&&=(clearTimeout(this['_collaborationTimeoutTimer']),null);}[_0x47c516(0x336)](_0xe80764){const _0x489bd3=_0x47c516;if(!this['_shouldReportTelemetry'])return;let {data:_0x2853d5}=_0xe80764,{unitID:_0x454715,changeset:_0x49bd93}=_0x2853d5,{mutations:_0x730a2e,type:_0x2f6817}=_0x49bd93;this[_0x489bd3(0x518)]={'unitId':_0x454715,'type':_0x2f6817,'startTime':performance[_0x489bd3(0x3e6)](),'stopTime':0x0,'duration':0x0,'size':te(_0x730a2e)};}[_0x47c516(0x4c5)](){const _0x4d7817=_0x47c516;this[_0x4d7817(0x49b)]&&(this[_0x4d7817(0x518)]?(this[_0x4d7817(0x518)][_0x4d7817(0x368)]=performance['now'](),this[_0x4d7817(0x518)][_0x4d7817(0x49d)]=this['_telemetryInfo'][_0x4d7817(0x368)]-this[_0x4d7817(0x518)]['startTime'],this['_telemetryService'][_0x4d7817(0x4d3)]('collaboration_new_changeset',this[_0x4d7817(0x518)]),this[_0x4d7817(0x518)]=null):this['_logService'][_0x4d7817(0x492)](_0x4d7817(0x239),'telemetry\x20info\x20is\x20not\x20initialized'));}[_0x47c516(0x4ff)](){const _0x2e9b43=_0x47c516;this[_0x2e9b43(0x518)]=null;}};function _0x6063(){const _0x4b802d=['now','_onJoinRoomEvent','pipe','some','_tryEnsureSocket','_handler','_rescheduleHeartbeat','_schedule','getCurrentUser','objects','_substituteRedoStack','BoardCollaborationEntity','resolveUnit','121125hLKEPn','getLocalCacheKey','HEARTBEAT_INTERVAL_KEY','ITransformService','_clearHandshakeTimer','find','CONFLICT_PROCESSING','awaiting','SOCKET_FAILED_RETRY','IAuthzIoService','_members','USERS_ENTER','onTransformSelections','_injector','setCfgEnableObjInherit','[CollaborationAttachmentIoService]:\x20unitId\x20is\x20not\x20found.','/object/','asObservable','_acknowledgedAwaitingRevision','serializeCombRequest','4bveDLV','_loadUnit','getFocusedUnit','members$','_runScheduledResend','ImageUploadStatusType','getUploadOptions','objectActions','_prepareConflictRecovery','refreshUnit','collaboration-client.auth.needGotoLoginAlert','_onOffline','[CollaborationUndoRedoService]','258049UDIbJi','SnapshotService','Injector','editing\x20status\x20changed\x20to','HEARTBEAT_INTERVAL','setWaitCount','map','toLocal','state','_fetchMissChangesets','_getUnitPermissionPoints','onTransformRemoteChangesetByIMECache','unitDisposed$','getCollabEntity','send','DocStateChangeManagerService','getUnitOnRev','_getSignURL','subType','CollaborationEvent','JOINING','isInternalEditorID','RETRY_CONNECTING_MAX_COUNT_KEY','socketReady','_tryReconnect','MoveSlidePageMutation','resend','getImage','equals','ISnapshotServerService','allowed','collaborators','112wPpebV','[SyncedState]:\x20received\x20rejection.','signUrlServerUrl','_getLoginPath','DependentOn','userID','getDeserializedSheetBlock','_maxTotalRetryTimeout','getUnitStatus$','timeoutTimer','reject','text-x','_disposed','filter','OPTIONAL','_compressMutationService','UnitStatus','HELLO','PSEUDO_FETCH_MISSING_RESULT','[OfflineState]:\x20received\x20rejection.','\x20in\x20_schedule.','loadSlide','_pendingSessions','PERSON','textEncoder','unsubscribe','/universer-api/oidc/authpage','_replayCachedMutations','parseProtocolChangeset','OTHER_CLIENT_EDITING','_handlerCallback','JOIN_ROOM_NOT_EXISTS','downloadEndpointUrl','sessionStatus$','docStateChange$','getMember','_eventService','updatePermissionObjEvent','delay','HTTPService','UnitEmbedded','Module','SUBMIT_CHANGESET','unit-cache-','appendMutation','ICollaborationSocketService','sessionStatus','CollaborationImageIoService','error$','location','_authzIoService','INGEST','getTime','_configService','string','_refreshUnitPermission','_executeRemoteChangeset','routeKey','memberID','default','?url=','MentionIoHttpService','socketSubscription','_registerDependencies','IMentionIOService','onStarting','length','_onLocalMutation','_clearUndo','getCurrentRevOfUnit','you\x20should\x20override\x20\x22IUndoRedoService\x22\x20provided\x20in\x20\x22core\x22\x20package!','/universer-api/snapshot','getWorkbookSelections','localeService','deepClone','_type','unit','_showConflictNotification','includes','CollaborationUIEventService','function','next','_unitInfo$','CmdRspCode','_clearHeartbeatTimer','CommentService','/universer-api/stream/file/upload','createCollaborator','_createInitialState','roles','UNIVER_DOC','UNIVER_BOARD','onSyncEditingCollabCursor','_change$','error','IUniverInstanceService','onMissedChangesetFetched','ignored\x20stale\x20ack\x20of\x20revision\x20','_awaitingChangeset','min','_resendTimer','socketService','_status$','_shouldReportTelemetry','[OfflineState]:\x20received\x20changeset.','duration','&source=','[CollaborationSessionService]','method','LIVESHARE_OPERATION','timer','AwaitingState','createIdentifier','removeMember','executeCommand','UNIVER_PDF','PendingState','changesets','unitType','UNIVER_SHEET','getSheetBlock','saveChangeset','closeSession','_emitMembers','_acknowledgeAwaiting','forEach','/block/','[CollaborationSocketService]:\x20failed\x20to\x20get\x20web\x20socket\x20factory!','_exhaustRemoteChangesetQueue','_joinRoom','SheetsSelectionsService','CollaborationSession','endpoint','awaitingChangeset','localCacheService','UnitObject','splice','iterator','unitLoaded$','getTypeOfUnitDisposed$','selections','saveSnapshot','__Key__','_listenToNetworkCondition','onSendChangeset','_stopTelemetryCollaborationNewChangeset','ConflictState','_identity','/collaborator','clear','177830EdptYu','POST','_socketChannels','IContextService','SOCKET_FAILED','call','_sender','UNIVER_BASE','conflict','capture','AWAITING','loadPdf','_onUserJoin','UUID','UserManagerService','sendHeartbeatTimer','c2Prime','UniverLicensePlugin','disposeWithMe','_collaborationTimeoutTimer','DEFAULT_REMOTE_UNISCRIPT_EXECUTION_ENDPOINT','onCommentUpdate','ILogService','onTransformState','not_collab','OTHER_CLIENTS_EDITING','_revisionService','getCollabEntity$','SNAPSHOT_URL_KEY','backupOfflineData','take','unitID','LIVESHARE_FETCH_OPERATIONS','_HTTPService','onPrepareTransformSelections','_snapshotService','_getConfig','collaMsg','merge','\x20at\x20revision\x20','getSnapshotAPIPath','UniverInstanceType','\x0aCurrent:\x20','status','_changesetSessionId','m2Prime','DEFAULT_COLLAB_WEB_SOCKET_URL','baseRev','SUCCUSS','result','getUnitId','_userManagerService','REMOTE_UNISCRIPT_EXECUTION_ENDPOINT_KEY','_throwTelemetryCollaborationNewChangeset','SHOULD_CLOSE_CONN','createSocket','event$','_httpService','_clearScheduledTask','parseChangesetToProtocol','[PendingState]:\x20received\x20rejection.','COMMENT_UPDATE','_collaborationSessionService','_submitChangeset','uuidv4','_isAppliedRevision','/allowed','awaiting_with_pending','IImageIoService','WorkbookEditablePermission','_dropAcknowledgedAwaiting','BaseCollaborationEntity','delete','CombCmd','OFFLINE','_clearTimeoutTimer','textRanges','toStringTag','_telemetryInfo','deleteCollaborator','subscribe','socket$','responseType','has','deserializeToCombResponse','_singleActiveUnitService','revision','prototype','LIVESHARE_REQUEST_HOST','_clearCollaborationTimeoutTimer','_networkConditionService','FETCH_MISSING','IUndoRedoService','_remoteChangesetQueue','Inject','retryConnectingInterval','fetchMiss','getAllPermissionPoint','concatMap','_sheetTransformSelectionsService','4520720bQcUUs','fromCharCode','saveImage','_createSocket','This\x20method\x20should\x20not\x20be\x20called\x20on\x20the\x20client\x20side!','rev','&to=','_transitionLocked','UniverCollaborationPlugin','__splitChunk__','snapshotServerUrl','_permissionService','?size=','onRemoteRej','registerHTTPInterceptor','IDLE','getResourcesRequest','_onConflict','HEARTBEAT_TIMEOUT','number','Disposable','addHandlerCallback','collabWebSocketUrl','entityInit$','encodeURIComponent','_disableEditing','ObjectPermissionService','JSONX','randomBytes','_getSendChangesetTimeout','online','actions','updateSnapshot','resolveWithBasePath','OfflineState','updateCursorEvent','reverse','sid','get','_instanceService','loadSheet','total','type','_snapshotServerService','_queuedRemoteChangesets','onlyLocal','defineProperty','_substituteUndoStack','entries','_transformRemoteChangesetByStateCache','loginUrlKey','unknown','state$','action','Cannot\x20assemble\x20a\x20changeset\x20from\x20multiple\x20mutations\x20of\x20different\x20types:\x20','create','UPDATE_PERMISSION_OBJ','then','\x20to\x20','Board','EmptyMutationInfo','JOIN_ROOM_FULL','ICommandService','_commandService','ErrorCode','ws://127.0.0.1:8000/universer-api/comb/connect','CONFLICT_CACHE_CLEAR_FAILED','_initRequestHeader','isTransformMutationsWithChangesetSuccess','subUnitId','encrypt','session.room-full','_event$','mapDocumentTypeToUniverInstanceType','_onUserLeave','RevisionService','unitId','retryCount','subject','mutations','CollaborationStatus','DataLoaderService','[FetchingMissState]:\x20invalid\x20calling\x20to\x20`resend`.','object','_telemetryService','UnitAction','3702348mHnrcf','PENDING','_getUndoStack','Rectangle','liveShareNewHost','add','ImageSourceType','_getAPIPrefixPath','ThresholdInterceptorFactory','_showConflictProcessingNotification','handshakeTimer','USERS_LEAVE','NO_OTHER_CLIENTS_EDITING','FileSource','fetch_missing','[CollaborationSession]','1gstNtL','_sendHeartbeat','_updateUnitPermissionPoint','/-/object/list','isArray','_sessionChannels','CommandType','enableOfflineEditing','_subscribeResendTimer','init','_collaborationPaused','_transformRemoteChangesetByIMECache','OBJECT_PERMISSION_CONFIG_KEY','_closedUnits','getInterceptPoints','connectionAttempt','b64DecodeUnicode','accept','maxSize','[PendingState]:\x20unhandled\x20univer\x20type:\x20','/universer-api/file/{fileID}/sign-url','_hasSessionsForEndpoint','_updateLocalCache','_replaceFileID','FAIL','constructor','_commentService','CollaborationController','[AuthServerService]:\x20you\x20should\x20provide\x20authentication\x20info\x20on\x20Node.js.','session','/-/object/-/batch_allowed','_incrementRevisionNumber','_startCollaboration','[CollaborationSocketService]:\x20failed\x20to\x20create\x20socket!','IAttachmentIoService','saveAttachment','session.room-not-exists','dispose$','transformUndoRedo','570VaLEeh','ILocalCacheService','Optional','_getUploadFileURL','getLatestCsReqIdBySid','_logService','[FetchingMissState]:\x20not\x20expected\x20to\x20receive\x20ack\x20when\x20`this._awaitingChangeset`\x20is\x20null!','body','LEAVE','getUnit','putCollaborators','every','COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY','LOCAL_CACHE_INTERVAL_KEY','_resendSchedule','range','roomInfos','liveShareOperation','[UniverCollaborationClientPlugin]:\x20you\x20must\x20provide\x20a\x20socketService\x20implementation\x20in\x20config!','[DataLoaderService]','replace','version','requestParams','resourceIDs','message$','_resendTimeout','_transformAndApplyRemoteChangeset','_roomMembers','Failed\x20to\x20update\x20permission\x20point','_loadSnapshot','columnGroups','batchAllowed','file','originalMeta','values','DEFAULT_FILE_NAME','csAckEvent','joinRsp','authzUrl','RichTextEditingMutation','_redoStacks','changeset','getValue','isTransformChangesetsSuccess','commentUpdate$','put','c1Prime','Slide','_sessionStatus$','sequenceExecute','append','indexOf','loadBase','_scheduleCollaborationTimeoutTimer','_updateState','getSheetId','_localeService','[FetchMissState]','loadUnitOfRevision','concatBytes','LOCAL_CACHE_INTERVAL','SlideCollaborationEntity','post','_createHandler','_toggleOnline','save\x20fail\x20reason\x20is\x20','hasOwnProperty','_isEchoedAwaitingChangeset','ICollaborationClientAdapterService','CompressMutationService','upload','candidateSocket','_clearRedo','getActiveSheet','onMissingChangesets','_onCombEvent','offline','IConfigService','_univerInstanceService','\x0aAfter:\x20','/unit/','floor','_members$','UNIVER_SLIDE','_updateStatus','params','x-univer-host','UniverNetworkPlugin','max','COLLABORATION_SESSION_TARGET_UNIT_ID_REQUIRED','COMPRESS_MUTATION_APPLY','getRoom','ReplaySubject','saveSheetBlock','_prepareTransformSelections','CollaborationUIEventId','[AwaitingWithPendingState]','withCredentials','transformSelections','close$','url','CollaborationSocketService','_init','_removeRoom','Quantity','attachment','transformMutationsWithChangeset','initWorkbookPermissionChange','[CollaborationState]:\x20apply\x20error!','complete','target','enableCollaboration','pluginName','getCfgEnableObjInherit','[CollaborationAttachmentIoService]:\x20failed\x20to\x20resolve\x20attachment\x20URL.','toggleOnline','objectType','change$','[SyncedState]:\x20received\x20acknowledgement.','_undoStacks','size','copyFileMeta','readAsDataURL','RECV','_initCloseConn','hostname','uploadFileServerUrl','_lockTransition','onRemoteAck','[CollaborationEntity]:\x20cannot\x20apply\x20missing\x20results\x20on\x20other\x20states!','_transformSelections','Workbook','[CollaborationSession]:\x20should\x20not\x20send\x20message\x20when\x20the\x20session\x20is\x20offline!','_memberService','ITelemetryService','REMOTE_UNISCRIPT_EXECUTION_ENDPOINT','onRemoteChangeset','updateOfflineData','retryConnectingTimer','MentionType','[CollaborationAttachmentIoService]:\x20failed\x20to\x20upload\x20attachment.','getTypeOfUnitAdded$','getOwnPropertyDescriptor','touchDependencies','getCurrentSelections','toggleOffline','HEARTBEAT','BehaviorSubject','set','_entities','_scheduleCompleteTimestamp','_onConnectionFailed','newCsEvent','CHANGESET_SHOULD_RETRY','[FetchingMissState]:\x20received\x20stale\x20ack\x20revision:\x20','loadUnit','_changesetReqId','_initDependencies','_entityInit$','session.room-cnt-exceeds','DEFAULT_WS_SESSION_TICKET_URL','_state$','_cfgEnableObjInherit','_checkMissing','COLLABORATION_ENDPOINT_INVALID','/universer-api/authz','stringify','getUnitType','transformChangesets','code','CHANGESET_ACK','onRemoteRetry','snapshot','endsWith','CONFLICT','name','CollaborationAttachmentIoService','sendChangesetTimeout','collaboration-client.config','focused$','emitEvent','_unitLoaded$','{fileID}','_onConnectionOpen','SheetTransformSelectionsService','isCompositionEnd','ERROR_IMAGE','_toggleOffline','_sendingTimer','RETRY_CONNECTING_MAX_COUNT','confirm','addImageSourceCache','_socketService','_undoRedoService','/rev/','UNIVER_COLLABORATION_CLIENT_PLUGIN','push','_config','1.1.0','dispose','[CollaborationSessionService]:\x20socket\x20error','_onRemoteACK','[CollaborationAttachmentIoService]:\x20attachment\x20exceeds\x20max\x20size.','/object','_onRecvEvent','_unlockTransition','_getCtorByUniverInstanceType','fetchMissingChangesets','FileId','_transformIMECache','IPermissionService','_getDownloadEndpointURL','parse','_startTelemetryCollaborationNewChangeset','_waitForHeartbeatResponse','_commentUpdate$','tables','slice','PERMISSION_DENIED','INetworkConditionService','Univer','getConfig','JOIN_ROOM_PERMISSION_DENIED','readyForCollab','createInstance','JOIN','_pendingMutations','_localCacheService','JOIN_ROOM_FAILED','LocaleService','DRAWING_IMAGE_ALLOW_IMAGE_LIST','unitInfo$','_doCreateSocket','setShowComponents','_transformStateCache','[PendingState]:\x20invalid\x20calling\x20to\x20`resend`.','uniscriptRunEvent','_upload','146562rUxadX','registerDependencies','shouldCloseConn','list','missingChangesets','LIVESHARE_NEW_HOST','3080355eklVmq','_state','takeUntil','packageName','resolve','_docStateChangeManagerService','Plugin','shareReplay','online$','_roomCreated$','_waitCount','[UniverCollaborationClientPlugin]','CHANGESET_REJ','interceptor','NEW_CHANGESETS','COLLABORATION_CHANGESET_TRANSLATION_REQUIRED','origin','listCollaborators','fromCollab','stopTime','Subject','_socket','[CollaborationEntity]:\x20invalid\x20state\x20transition!\x20State\x20transferred\x20from\x20is\x20not\x20the\x20current\x20state.\x0aBefore:\x20','pauseCollaboration','firstValueFrom','SessionStatus','BASE64','_acknowledgeAwaitingIfReady','CollaborationEntity','_onRemoteRejected','workbook','_initUnitPermissionChange','MUTATION','MemberService','univer-pro.collaboration-client.single-active-unit-service','csRejEvent','timeout','_handleRemoteChangesets','loadOfflineData','decorate','close','DisposableCollection','[CollaborationAttachmentIoService]:\x20attachment\x20type\x20is\x20not\x20accepted.','symbol','_sessions','_decreaseWaiting','PERMISSION_REJ','objectID','AuthzIoHttpService','[ConflictState]:\x20invalid\x20calling\x20to\x20`resend`.','status$','updateMember','reconnect','LIVESHARE_TERMINATE','onMutationExecutedForCollab','requireSession','startsWith','@univerjs-pro/collaboration-client','AWAITING_WITH_PENDING','_getCurrentRevision','UPDATE_CURSOR','ONLINE','eventID','SheetPermissionInitController','supports','_collaborationUIEventService','Tools','_isPermissionRej','localUnitId','objectId','loadBoard','updateCollaborator','reduce','_socketMessageSubscription','univer-pro.collaboration-client-socket-service','_onRemoteChangeset','infoRsp','_isAckOfAwaitingChangeset','sheets','clearUnit','EnsureSlideMasterPageMutation','objectPermissionTypes','/universer-api/uniscript','cbc','_transformStack','_initMergeInterceptor','cmd','refreshPermission','pending','SYNCED','_clearRetryConnectingTimer','avatar','MergeInterceptorFactory','_getSocketChannel','_collabSessionService','toDisposable','collaboratorID','RxDisposable','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','fetching\x20the\x20latest\x20document\x20from\x20the\x20server.','UNISCRIPT_RUN','_resolveSessionIdentity','incrementRevOfUnit','getAllMembers','_createInitialStateImpl','updatePermissionPoint','_getAPIPrefix','onLocalMutation','SnapshotServerOverHTTPService','reqId','onTransformRemoteChangesetByStateCache','debug','joinEvent','collabSubmitChangesetUrl','isPermissionRej','compose','InsertSheetMutation','open$','RemoveSlidePageMutation','href','leaveEvent','getAttachmentUrl','data','[SyncedState]:\x20invalid\x20calling\x20to\x20`resend`.','_adapter','Unknown\x20type.\x20Will\x20not\x20load\x20files\x20from\x20remote\x20address.','_onFetchMissResult','listRoles','charCodeAt','title','HEARTBEAT_TIMEOUT_KEY','_onRemoteRetry','SetSelectionsOperation','session.join-failed','HTTPRequest','catch','_applyRemoteChangeset','onTransformIME','COMPRESS_MUTATION_SEND','/universer-api/snapshot/','endpointKey','fetchThroughInterceptors','UniverCollaborationClientPlugin','_transformService','SUBMIT_CHANGESET_TIMEOUT'];_0x6063=function(){return _0x4b802d;};return _0x6063();}ve=y([v(0x2,t[_0x47c516(0x4e0)]),v(0x3,t[_0x47c516(0x2ae)]),v(0x4,(0x0,t[_0x47c516(0x528)])(b)),v(0x5,(0x0,t[_0x47c516(0x528)])(ae)),v(0x6,(0x0,t[_0x47c516(0x528)])(_)),v(0x7,(0x0,t[_0x47c516(0x263)])(o[_0x47c516(0x2e7)]))],ve);const x=(0x0,t[_0x47c516(0x4a4)])('collaboration-client.local-cache-service');function ye(_0x308df2,_0x1e1d08){const _0x48f451=_0x47c516;return _0x1e1d08===''||_0x1e1d08==null?_0x48f451(0x45f)+_0x308df2:_0x48f451(0x45f)+_0x308df2+'-'+encodeURIComponent(_0x1e1d08);}function be(_0x2c4174){const _0x44da82=_0x47c516;let {unitID:_0xdf4b43,mutations:_0x3c1f8a}=_0x2c4174;return{'unitId':_0xdf4b43,'subUnitId':_0x3c1f8a[_0x44da82(0x476)]>0x0?_0x3c1f8a[0x0][_0x44da82(0x2b6)][_0x44da82(0x219)]:null};}let S=class{constructor(_0x1de769,_0x31908a,_0x102fbc){const _0x249d78=_0x47c516;this[_0x249d78(0x400)]=_0x1de769,this[_0x249d78(0x3e4)]=_0x31908a,this[_0x249d78(0x1fb)]=_0x102fbc;}['transformSelections'](_0xd451e5){const _0x443558=_0x47c516;var _0x3a4cbe,_0x4fb713;let _0x145ce6=this['_injector'][_0x443558(0x1fa)](r[_0x443558(0x4b6)]),{unitId:_0x8d453d,subUnitId:_0x3753a7}=be(_0xd451e5),_0x25d2f0=_0x145ce6==null?void 0x0:_0x145ce6[_0x443558(0x47c)](_0x8d453d)[_0x443558(0x2f1)](),_0x1d5cf7=(_0x3a4cbe=this[_0x443558(0x1fb)][_0x443558(0x26a)](_0x8d453d))==null||(_0x3a4cbe=_0x3a4cbe[_0x443558(0x2aa)]())==null?void 0x0:_0x3a4cbe[_0x443558(0x298)]();if(_0x25d2f0[_0x443558(0x476)]===0x0||!_0x8d453d||!_0x3753a7)return;let _0x4cba84=[{'id':r[_0x443558(0x3d9)]['id'],'params':{'unitId':_0x8d453d,'subUnitId':_0x1d5cf7,'selections':t[_0x443558(0x397)][_0x443558(0x47e)](_0x25d2f0)}}],_0x2bffde=this['_transformService']['transformMutationsWithChangeset'](_0xd451e5,_0x4cba84);if(!(0x0,e[_0x443558(0x218)])(_0x2bffde))throw _0x2bffde['error'];let _0x7a742e=(_0x4fb713=_0x2bffde[_0x443558(0x4f7)][0x0])==null||(_0x4fb713=_0x4fb713['params'])==null?void 0x0:_0x4fb713['selections'];if(Array[_0x443558(0x23e)](_0x7a742e)&&_0x7a742e[_0x443558(0x476)]){if(_0x7a742e[_0x443558(0x476)]===_0x4cba84[0x0][_0x443558(0x2b6)]['selections'][_0x443558(0x476)]&&_0x7a742e[_0x443558(0x26c)]((_0x5276ac,_0x114209)=>t[_0x443558(0x22d)][_0x443558(0x430)](_0x5276ac[_0x443558(0x270)],_0x4cba84[0x0][_0x443558(0x2b6)][_0x443558(0x4c0)][_0x114209][_0x443558(0x270)])))return;this['_injector'][_0x443558(0x1fa)](t[_0x443558(0x212)])[_0x443558(0x4a6)](r['SetSelectionsOperation']['id'],{'unitId':_0x8d453d,'subUnitId':_0x1d5cf7,'selections':_0x7a742e});}}};S=y([v(0x0,(0x0,t['Inject'])(t['Injector'])),v(0x1,e[_0x47c516(0x3f6)]),v(0x2,t[_0x47c516(0x493)])],S);const C=(0x0,t[_0x47c516(0x4a4)])(_0x47c516(0x377));let xe=function(_0x28e67f){const _0x30a8d9=_0x47c516;return _0x28e67f[_0x28e67f[_0x30a8d9(0x236)]=0x0]=_0x30a8d9(0x236),_0x28e67f[_0x28e67f[_0x30a8d9(0x4e3)]=0x1]=_0x30a8d9(0x4e3),_0x28e67f;}({});function Se(_0x2930b4){const _0x39969b=_0x47c516;var _0x1b41c6;return!!((_0x1b41c6=_0x2930b4[_0x39969b(0x2b6)])!=null&&_0x1b41c6[_0x39969b(0x537)]);}const Ce=new Set([r[_0x47c516(0x3c9)]['id']]),we=new Set([c['AddSlidePageMutation']['id'],c[_0x47c516(0x3a5)]['id'],c[_0x47c516(0x42d)]['id'],c[_0x47c516(0x3cb)]['id']]);function Te(_0x1e0089,_0x1ad1fd=Ce){const _0x28f75f=_0x47c516;let _0x50dc57=[];for(let _0x43719c of _0x1e0089){if(_0x1ad1fd[_0x28f75f(0x51d)](_0x43719c['id'])||Se(_0x43719c)){if(_0x50dc57['length']>0x0)break;_0x50dc57[_0x28f75f(0x325)](_0x43719c);break;}_0x50dc57[_0x28f75f(0x325)](_0x43719c);}return _0x50dc57;}function w(_0x1cf9c3,_0x32caa7,_0x220684,_0x2af43f,_0x16d7fc){const _0x22a95c=_0x47c516;let _0x1c7448=Te(_0x1cf9c3),_0x4f2c98=_0x16d7fc['getCurrentUser'](),_0x1e1fb9=(_0x4f2c98==null?void 0x0:_0x4f2c98[_0x22a95c(0x439)])??_0x22a95c(0x207),_0x369387=(_0x4f2c98==null?void 0x0:_0x4f2c98[_0x22a95c(0x46e)])??_0x22a95c(0x207);return{'changeset':{'unitID':_0x32caa7,'type':(0x0,e[_0x22a95c(0x21d)])(_0x220684['getUnitType'](_0x32caa7)),'baseRev':_0x2af43f[_0x22a95c(0x479)](_0x32caa7),'revision':0x0,'userID':_0x1e1fb9,'memberID':_0x369387,'mutations':_0x1c7448},'pendingMutations':_0x1cf9c3[_0x22a95c(0x33a)](_0x1c7448[_0x22a95c(0x476)])};}const Ee=w;function De(_0x3077d9,_0x25f4e8,_0x39c3de,_0x44d936,_0x1dcccf){const _0x4db887=_0x47c516;let _0x2986aa=Te(_0x3077d9,we),_0x24e502=_0x1dcccf[_0x4db887(0x3ee)](),_0x4015de=(_0x24e502==null?void 0x0:_0x24e502['userID'])??_0x4db887(0x207),_0x363d52=(_0x24e502==null?void 0x0:_0x24e502[_0x4db887(0x46e)])??'unknown';return{'changeset':{'unitID':_0x25f4e8,'type':(0x0,e[_0x4db887(0x21d)])(_0x39c3de[_0x4db887(0x308)](_0x25f4e8)),'baseRev':_0x44d936['getCurrentRevOfUnit'](_0x25f4e8),'revision':0x0,'userID':_0x4015de,'memberID':_0x363d52,'mutations':_0x2986aa},'pendingMutations':_0x3077d9[_0x4db887(0x33a)](_0x2986aa[_0x4db887(0x476)])};}function Oe(_0x178266,_0x328665,_0x33fdfc,_0x40f9f8,_0x375b8a){const _0x35dfb9=_0x47c516;let _0x4725ec=_0x178266[_0x35dfb9(0x39d)]((_0x326f21,_0x351b80)=>{const _0x8e2129=_0x35dfb9;let _0x4a7a18=_0x326f21[_0x326f21[_0x8e2129(0x476)]-0x1],{id:_0x3b19fa}=_0x4a7a18??{},{id:_0xa41935,type:_0x4685c0}=_0x351b80,_0x46e8c0=_0x351b80[_0x8e2129(0x2b6)];if(_0x3b19fa&&_0x3b19fa!==_0xa41935)throw Error(_0x8e2129(0x20a)+_0x3b19fa+'\x20-\x20'+_0xa41935+'.');if(!_0x4a7a18)return[{'id':_0xa41935,'type':_0x4685c0,'params':{'unitId':_0x46e8c0[_0x8e2129(0x220)],'textRanges':_0x46e8c0[_0x8e2129(0x516)],'actions':_0x46e8c0[_0x8e2129(0x1f3)]}}];let _0x542932=_0x4a7a18[_0x8e2129(0x2b6)];return ke(_0x542932,_0x46e8c0)?[..._0x326f21['slice'](0x0,-0x1),{..._0x4a7a18,'id':_0xa41935,'type':_0x4685c0,'params':{'unitId':_0x46e8c0[_0x8e2129(0x220)],'textRanges':_0x46e8c0[_0x8e2129(0x516)],'actions':t[_0x8e2129(0x1ef)][_0x8e2129(0x3c8)](_0x542932['actions'],_0x46e8c0[_0x8e2129(0x1f3)])}}]:[..._0x326f21,{'id':_0xa41935,'type':_0x4685c0,'params':{'unitId':_0x46e8c0[_0x8e2129(0x220)],'textRanges':_0x46e8c0[_0x8e2129(0x516)],'actions':_0x46e8c0[_0x8e2129(0x1f3)]}}];},[]),_0x3b5ef7=_0x375b8a[_0x35dfb9(0x3ee)](),_0x4cf4e5=(_0x3b5ef7==null?void 0x0:_0x3b5ef7[_0x35dfb9(0x439)])??'unknown',_0x4f53b0=(_0x3b5ef7==null?void 0x0:_0x3b5ef7[_0x35dfb9(0x46e)])??'unknown';return{'changeset':{'unitID':_0x328665,'type':(0x0,e[_0x35dfb9(0x21d)])(_0x33fdfc['getUnitType'](_0x328665)),'baseRev':_0x40f9f8[_0x35dfb9(0x479)](_0x328665),'revision':0x0,'userID':_0x4cf4e5,'memberID':_0x4f53b0,'mutations':_0x4725ec},'pendingMutations':_0x178266[_0x35dfb9(0x33a)](_0x178266['length'])};}function ke(_0x1f378f,_0x170866){const _0x800dd7=_0x47c516;return!Ae(_0x1f378f)&&!Ae(_0x170866)&&je(_0x1f378f[_0x800dd7(0x1f3)],_0x170866[_0x800dd7(0x1f3)]);}function Ae(_0x3a5fef){const _0x52fa3e=_0x47c516;return _0x3a5fef[_0x52fa3e(0x31a)]!==void 0x0;}function je(_0x5b9e88,_0x10cc02){return Me(_0x5b9e88)&&Me(_0x10cc02)&&!Pe(_0x5b9e88)&&!Pe(_0x10cc02)&&!Ne(_0x5b9e88)&&!Ne(_0x10cc02);}function Me(_0x49ed67){const _0x283bdb=_0x47c516;return Fe(_0x49ed67)[_0x283bdb(0x3e9)](_0x5a7370=>T(_0x5a7370)&&_0x5a7370['et']===_0x283bdb(0x43f));}function Ne(_0x3a383b){const _0x22c7d8=_0x47c516;return Fe(_0x3a383b)['some'](_0x13f99e=>Array[_0x22c7d8(0x23e)](_0x13f99e)||typeof _0x13f99e==_0x22c7d8(0x46a)||typeof _0x13f99e==_0x22c7d8(0x541));}function Pe(_0x408188){const _0x22297a=_0x47c516;return Fe(_0x408188)['some'](_0x19f632=>!T(_0x19f632)||_0x19f632['et']!=='text-x'||!Array[_0x22297a(0x23e)](_0x19f632['e'])?!0x1:_0x19f632['e'][_0x22297a(0x3e9)](_0x3d225d=>!T(_0x3d225d)||!T(_0x3d225d[_0x22297a(0x268)])?!0x1:Object['prototype'][_0x22297a(0x2a3)][_0x22297a(0x4cf)](_0x3d225d[_0x22297a(0x268)],_0x22297a(0x339))||Object[_0x22297a(0x521)][_0x22297a(0x2a3)][_0x22297a(0x4cf)](_0x3d225d[_0x22297a(0x268)],_0x22297a(0x27f))||Object[_0x22297a(0x521)][_0x22297a(0x2a3)][_0x22297a(0x4cf)](_0x3d225d[_0x22297a(0x268)],'blockRanges')));}function Fe(_0x362999){const _0x14ae4c=_0x47c516;if(!Array[_0x14ae4c(0x23e)](_0x362999))return[];let _0x4de7bd=_0x362999[_0x14ae4c(0x482)](_0x14ae4c(0x268))?_0x362999:_0x362999[_0x14ae4c(0x3f8)](_0x111a44=>Array[_0x14ae4c(0x23e)](_0x111a44)&&_0x111a44[_0x14ae4c(0x482)](_0x14ae4c(0x268)));if(!Array[_0x14ae4c(0x23e)](_0x4de7bd))return[];let _0x18aeb3=_0x4de7bd[_0x14ae4c(0x294)](_0x14ae4c(0x268));return _0x18aeb3===-0x1?[]:_0x4de7bd[_0x14ae4c(0x33a)](_0x18aeb3+0x1);}function T(_0x2d3501){const _0x46b585=_0x47c516;return typeof _0x2d3501==_0x46b585(0x227)&&!!_0x2d3501&&!Array[_0x46b585(0x23e)](_0x2d3501);}function Ie(_0x368deb,_0x38a1b1){const _0x3fe3a9=_0x47c516;let _0x9a2bb8=new i[(_0x3fe3a9(0x2bd))](0x1);return setTimeout(()=>_0x9a2bb8['next'](_0x38a1b1),_0x368deb),_0x9a2bb8[_0x3fe3a9(0x404)]()[_0x3fe3a9(0x3e8)]((0x0,i[_0x3fe3a9(0x4e8)])(0x1));}var Le,Re,ze;let Be=function(_0x33fe8d){const _0x74c6dc=_0x47c516;return _0x33fe8d['NOT_COLLAB']=_0x74c6dc(0x4e2),_0x33fe8d[_0x74c6dc(0x3ae)]='synced',_0x33fe8d[_0x74c6dc(0x22b)]='pending',_0x33fe8d[_0x74c6dc(0x4d4)]=_0x74c6dc(0x3fa),_0x33fe8d[_0x74c6dc(0x38f)]=_0x74c6dc(0x50d),_0x33fe8d['FETCH_MISS']=_0x74c6dc(0x238),_0x33fe8d[_0x74c6dc(0x30f)]=_0x74c6dc(0x4d2),_0x33fe8d[_0x74c6dc(0x514)]='offline',_0x33fe8d;}({});const Ve=0x4e20,He=0x2bf20;var E=class{constructor(_0x5c76f7,_0x15a372,_0x1ef5b5,_0x26afd0,_0x1a35d3,_0x71871e,_0x1b2de2,_0x5ed80c,_0x43953f){const _0x38a0d0=_0x47c516;this[_0x38a0d0(0x4e9)]=_0x5c76f7,this[_0x38a0d0(0x1fe)]=_0x15a372,this[_0x38a0d0(0x3eb)]=_0x1a35d3,this[_0x38a0d0(0x213)]=_0x71871e,this[_0x38a0d0(0x322)]=_0x1b2de2,this[_0x38a0d0(0x4e4)]=_0x5ed80c,this['_localCacheService']=_0x43953f,g(this,'_awaitingChangeset',null),g(this,_0x38a0d0(0x343),[]),this[_0x38a0d0(0x496)]=_0x1ef5b5,this['_pendingMutations']=_0x26afd0;}[_0x47c516(0x304)](_0x5b529b){const _0x599a94=_0x47c516;let _0x514fb5=this[_0x599a94(0x4e4)][_0x599a94(0x479)](this[_0x599a94(0x4e9)]);return _0x5b529b[_0x599a94(0x520)]>_0x514fb5+0x1&&(this[_0x599a94(0x3eb)][_0x599a94(0x2ab)]({'from':_0x514fb5,'to':_0x5b529b[_0x599a94(0x520)]-0x1}),!0x0);}['_transformUndoredo'](_0x92bdb6){const _0x516b89=_0x47c516;this[_0x516b89(0x322)][_0x516b89(0x260)](this[_0x516b89(0x4e9)],_0x92bdb6);}[_0x47c516(0x2e3)](_0x1fbf66){const _0xfeb4a7=_0x47c516;var _0x334fb9,_0x404337;(_0x334fb9=(_0x404337=this[_0xfeb4a7(0x3eb)])['onTransformSelections'])==null||_0x334fb9[_0xfeb4a7(0x4cf)](_0x404337,_0x1fbf66);}[_0x47c516(0x2bf)](_0x3facf6){const _0x369769=_0x47c516;var _0x4d49d9,_0x3a65ff;return((_0x4d49d9=(_0x3a65ff=this[_0x369769(0x3eb)])[_0x369769(0x4ec)])==null?void 0x0:_0x4d49d9[_0x369769(0x4cf)](_0x3a65ff,_0x3facf6))??null;}[_0x47c516(0x332)](_0x3911d2){const _0x15a781=_0x47c516;var _0xb38569,_0x1274c4;return(_0xb38569=(_0x1274c4=this[_0x15a781(0x3eb)])[_0x15a781(0x3de)])==null?void 0x0:_0xb38569[_0x15a781(0x4cf)](_0x1274c4,_0x3911d2);}[_0x47c516(0x34b)](_0x408352){const _0x5cc7fd=_0x47c516;var _0x4945dd,_0x4ef912;return(_0x4945dd=(_0x4ef912=this[_0x5cc7fd(0x3eb)])[_0x5cc7fd(0x4e1)])==null?void 0x0:_0x4945dd[_0x5cc7fd(0x4cf)](_0x4ef912,_0x408352);}[_0x47c516(0x245)](_0x4d95f5){const _0xc8795e=_0x47c516;var _0x384910,_0x309282;return((_0x384910=(_0x309282=this[_0xc8795e(0x3eb)])['onTransformRemoteChangesetByIMECache'])==null?void 0x0:_0x384910[_0xc8795e(0x4cf)](_0x309282,_0x4d95f5))??_0x4d95f5;}['_transformRemoteChangesetByStateCache'](_0x40242a){const _0x2a1ba8=_0x47c516;var _0x2ceae3,_0x4d49db;return((_0x2ceae3=(_0x4d49db=this[_0x2a1ba8(0x3eb)])[_0x2a1ba8(0x3c3)])==null?void 0x0:_0x2ceae3[_0x2a1ba8(0x4cf)](_0x4d49db,_0x40242a))??_0x40242a;}['_syncEditingCollabCursor'](_0x4932eb){const _0x56c269=_0x47c516;if(this['type']===t[_0x56c269(0x4f3)][_0x56c269(0x48e)]){let {unitID:_0x5520e7,mutations:_0x1ed4ba,memberID:_0x2b1742}=_0x4932eb,_0x2ec751=_0x1ed4ba[_0x56c269(0x476)]>0x0?_0x1ed4ba[0x0]['params'][_0x56c269(0x516)]:[];if(Array[_0x56c269(0x23e)](_0x2ec751)&&_0x2ec751[_0x56c269(0x476)]>0x0){var _0x54a4a4,_0x4fc608;(_0x54a4a4=(_0x4fc608=this[_0x56c269(0x3eb)])[_0x56c269(0x490)])==null||_0x54a4a4[_0x56c269(0x4cf)](_0x4fc608,{'unitID':_0x5520e7,'memberID':_0x2b1742,'textRanges':_0x2ec751});}}}[_0x47c516(0x250)](){const _0x2a6470=_0x47c516;var _0x4a3ef0;(_0x4a3ef0=this[_0x2a6470(0x344)])==null||_0x4a3ef0[_0x2a6470(0x2ea)](this[_0x2a6470(0x4e9)],this[_0x2a6470(0x1fe)],this['_awaitingChangeset'],this[_0x2a6470(0x343)]);}['_getCurrentRevision'](){const _0x2adf45=_0x47c516;return this[_0x2adf45(0x4e4)][_0x2adf45(0x479)](this[_0x2adf45(0x4e9)]);}[_0x47c516(0x50b)](_0x32c2c4){const _0x3e846c=_0x47c516;return _0x32c2c4[_0x3e846c(0x520)]<=this[_0x3e846c(0x390)]();}[_0x47c516(0x2a4)](_0x766827){const _0x3c05b5=_0x47c516;let _0x86cfa3=this[_0x3c05b5(0x496)];return!_0x86cfa3||!_0x86cfa3[_0x3c05b5(0x1f9)]||_0x86cfa3[_0x3c05b5(0x3c2)]===null||_0x86cfa3[_0x3c05b5(0x3c2)]===void 0x0?!0x1:_0x766827[_0x3c05b5(0x4e9)]===_0x86cfa3[_0x3c05b5(0x4e9)]&&_0x766827[_0x3c05b5(0x1f9)]===_0x86cfa3['sid']&&_0x766827[_0x3c05b5(0x3c2)]===_0x86cfa3[_0x3c05b5(0x3c2)];}[_0x47c516(0x3a2)](_0x54e120){const _0x5c5643=_0x47c516;let _0x296da2=this[_0x5c5643(0x496)];return!(_0x296da2!=null&&_0x296da2['sid'])||_0x296da2['reqId']==null||!_0x54e120[_0x5c5643(0x1f9)]||_0x54e120['reqId']==null?!0x1:_0x54e120['sid']===_0x296da2['sid']&&_0x54e120[_0x5c5643(0x3c2)]===_0x296da2[_0x5c5643(0x3c2)];}['_incrementRevisionNumber'](){const _0x27544b=_0x47c516;this[_0x27544b(0x4e4)][_0x27544b(0x3bb)](this[_0x27544b(0x4e9)]);}['_executeRemoteChangeset'](_0x2d4c3b){const _0x328b61=_0x47c516;let _0x52275f=this[_0x328b61(0x245)](_0x2d4c3b);_0x52275f=this[_0x328b61(0x205)](_0x52275f);let _0x329f15=this[_0x328b61(0x2bf)](_0x52275f),_0x545360=(0x0,t[_0x328b61(0x292)])(_0x52275f[_0x328b61(0x223)],this['_commandService'],{'fromCollab':!0x0});if(!_0x545360['result'])throw _0x329f15==null||_0x329f15['rollback'](),_0x545360[_0x328b61(0x492)]instanceof Error?_0x545360[_0x328b61(0x492)]:Error(_0x545360['error']??_0x328b61(0x2cd));_0x329f15==null||_0x329f15['commit'](),this[_0x328b61(0x332)](_0x52275f),this[_0x328b61(0x34b)](_0x52275f),this['_transformUndoredo'](_0x2d4c3b),this[_0x328b61(0x2e3)](_0x52275f),this['_syncEditingCollabCursor'](_0x52275f),this['_incrementRevisionNumber']();}};let D=class extends E{constructor(_0x6e8898,_0x15a6ae,_0x30963b,_0x15b0a4,_0x318077,_0x530950,_0x49b18d,_0x58c19c,_0x27d2dc,_0x5c5ffb){const _0x1d1d26=_0x47c516;super(_0x6e8898,_0x15a6ae,null,[],_0x30963b,_0x49b18d,_0x530950,_0x15b0a4,_0x5c5ffb),this[_0x1d1d26(0x400)]=_0x318077,this[_0x1d1d26(0x266)]=_0x58c19c,this[_0x1d1d26(0x3e4)]=_0x27d2dc,this[_0x1d1d26(0x4ba)]=_0x5c5ffb,g(this,'status','synced');}[_0x47c516(0x460)](_0x3dd408){const _0x3e47ff=_0x47c516;let _0xa6b0d9=this[_0x3e47ff(0x400)]['createInstance'](O,this[_0x3e47ff(0x4e9)],this['type'],[_0x3dd408],this[_0x3e47ff(0x3eb)]);return _0xa6b0d9['_schedule'](),_0xa6b0d9['_updateLocalCache'](),_0xa6b0d9;}[_0x47c516(0x2e9)](_0x4a3206){const _0x517983=_0x47c516;if(this['_isAppliedRevision'](_0x4a3206))return this;if(this[_0x517983(0x304)](_0x4a3206))return this[_0x517983(0x400)][_0x517983(0x341)](N,this[_0x517983(0x4e9)],this[_0x517983(0x1fe)],null,[],null,[_0x4a3206],this[_0x517983(0x3eb)],void 0x0);try{let _0x22102e=this[_0x517983(0x3e4)][_0x517983(0x2cb)](_0x4a3206,[e[_0x517983(0x210)]]);if((0x0,e['isTransformMutationsWithChangesetSuccess'])(_0x22102e)){let {c1Prime:_0x3fc64b}=_0x22102e;return this[_0x517983(0x46c)](_0x3fc64b),this;}throw _0x22102e[_0x517983(0x492)];}catch(_0x2c0483){return this[_0x517983(0x266)][_0x517983(0x492)](_0x2c0483),this[_0x517983(0x53f)](!0x1);}}[_0x47c516(0x53f)](_0xbf75ed){const _0x195918=_0x47c516;return this[_0x195918(0x400)]['createInstance'](j,this[_0x195918(0x4e9)],this['type'],null,[],this[_0x195918(0x3eb)],_0xbf75ed);}[_0x47c516(0x2e1)](_0x3d2261){const _0x69ba05=_0x47c516;if(_0x3d2261[_0x69ba05(0x520)]<=this[_0x69ba05(0x390)]())return this;throw Error(_0x69ba05(0x2d7));}['onRemoteRej'](){const _0x3f1186=_0x47c516;throw Error(_0x3f1186(0x435));}['onRemoteRetry'](){return this;}[_0x47c516(0x2f2)](){const _0x3c0fae=_0x47c516;return this[_0x3c0fae(0x400)]['createInstance'](M,this['unitID'],this[_0x3c0fae(0x1fe)],null,[],this[_0x3c0fae(0x3eb)]);}[_0x47c516(0x2d4)](){return this;}[_0x47c516(0x42e)](){const _0x361f80=_0x47c516;throw Error(_0x361f80(0x3d0));}[_0x47c516(0x52a)](){const _0x227ab5=_0x47c516;let _0x52c234=this[_0x227ab5(0x4e4)][_0x227ab5(0x479)](this[_0x227ab5(0x4e9)]);return this[_0x227ab5(0x3eb)][_0x227ab5(0x2ab)]({'from':_0x52c234,'to':0x0}),this[_0x227ab5(0x400)][_0x227ab5(0x341)](N,this[_0x227ab5(0x4e9)],this['type'],null,[],null,[],this['_handler'],void 0x0);}};D=y([v(0x3,(0x0,t['Inject'])(e['RevisionService'])),v(0x4,(0x0,t['Inject'])(t['Injector'])),v(0x5,t['IUndoRedoService']),v(0x6,t[_0x47c516(0x212)]),v(0x7,t[_0x47c516(0x4e0)]),v(0x8,e['ITransformService']),v(0x9,(0x0,t['Optional'])(x))],D);let O=Le=class extends E{constructor(_0x4abf50,_0x3fa849,_0x5c1536,_0x4802fb,_0x26d9f5,_0x4dc70f,_0x16bc32,_0x403759,_0x1b8fe3,_0x1c3df2,_0x471599,_0x406bac,_0x34652a,_0x219f8b){const _0x5e887f=_0x47c516;super(_0x4abf50,_0x3fa849,null,_0x5c1536,_0x4802fb,_0x1b8fe3,_0x34652a,_0x4dc70f,_0x219f8b),this[_0x5e887f(0x400)]=_0x26d9f5,this[_0x5e887f(0x4fd)]=_0x16bc32,this[_0x5e887f(0x266)]=_0x403759,this[_0x5e887f(0x469)]=_0x1c3df2,this[_0x5e887f(0x3e4)]=_0x471599,this[_0x5e887f(0x2af)]=_0x406bac,g(this,'status',_0x5e887f(0x3ad)),g(this,_0x5e887f(0x2f7),null),g(this,_0x5e887f(0x31d),null);}[_0x47c516(0x460)](_0x19b6d){const _0x525fbe=_0x47c516;return this[_0x525fbe(0x343)][_0x525fbe(0x325)](_0x19b6d),this['_updateLocalCache'](),this;}['onRemoteChangeset'](_0x20d0c2){const _0x1064da=_0x47c516;if(this[_0x1064da(0x50b)](_0x20d0c2))return this;if(this['_checkMissing'](_0x20d0c2))return this['_clearScheduledTask'](),this[_0x1064da(0x400)][_0x1064da(0x341)](N,this['unitID'],this[_0x1064da(0x1fe)],null,this[_0x1064da(0x343)],null,[_0x20d0c2],this[_0x1064da(0x3eb)],void 0x0);try{let _0x3b86bc=this[_0x1064da(0x3e4)][_0x1064da(0x2cb)](_0x20d0c2,this['_pendingMutations']);if((0x0,e[_0x1064da(0x218)])(_0x3b86bc)){let {c1Prime:_0x50e723,m2Prime:_0x447549}=_0x3b86bc;this[_0x1064da(0x46c)](_0x50e723);let _0x2e2854=this[_0x1064da(0x400)]['createInstance'](Le,this[_0x1064da(0x4e9)],this[_0x1064da(0x1fe)],_0x447549,this['_handler']);this[_0x1064da(0x504)]();let _0x4d2d5b=new Date()[_0x1064da(0x468)](),_0x4f47cd=this[_0x1064da(0x2f7)]?Math[_0x1064da(0x2b9)](this[_0x1064da(0x2f7)]-_0x4d2d5b,0x0):this[_0x1064da(0x1f1)]();return _0x2e2854[_0x1064da(0x3ed)](_0x4f47cd),_0x2e2854;}throw _0x3b86bc[_0x1064da(0x492)];}catch(_0x5aef27){return this[_0x1064da(0x266)]['error'](_0x5aef27),this['_onConflict'](!0x1);}}[_0x47c516(0x2e1)](_0x17c595){const _0x57c13a=_0x47c516;if(_0x17c595['revision']<=this[_0x57c13a(0x390)]())return this;throw Error('[PendingState]:\x20received\x20acknowledgement.');}[_0x47c516(0x53b)](){const _0x9be495=_0x47c516;throw Error(_0x9be495(0x506));}[_0x47c516(0x30c)](){return this;}[_0x47c516(0x2f2)](){const _0x2289ea=_0x47c516;return this[_0x2289ea(0x504)](),this['_injector'][_0x2289ea(0x341)](M,this[_0x2289ea(0x4e9)],this['type'],null,this[_0x2289ea(0x343)],this[_0x2289ea(0x3eb)]);}[_0x47c516(0x2d4)](){return this;}[_0x47c516(0x3ed)](_0x58e474){const _0x5642e5=_0x47c516;let _0x27c3bd=_0x58e474??this['_getSendChangesetTimeout']();this[_0x5642e5(0x2f7)]=new Date()[_0x5642e5(0x468)]()+_0x27c3bd,this[_0x5642e5(0x31d)]=setTimeout(()=>{const _0x4869cb=_0x5642e5;this[_0x4869cb(0x504)]();let _0x54635e=null;switch(this[_0x4869cb(0x1fe)]){case t[_0x4869cb(0x4f3)][_0x4869cb(0x4ab)]:_0x54635e=w(this[_0x4869cb(0x343)],this['unitID'],this[_0x4869cb(0x2af)],this[_0x4869cb(0x4e4)],this[_0x4869cb(0x4fd)]);break;case t[_0x4869cb(0x4f3)][_0x4869cb(0x48e)]:_0x54635e=this['_pendingMutations'][_0x4869cb(0x26c)](_0x9fa69d=>_0x9fa69d['id']===n['RichTextEditingMutation']['id'])?Oe(this[_0x4869cb(0x343)],this[_0x4869cb(0x4e9)],this['_univerInstanceService'],this[_0x4869cb(0x4e4)],this[_0x4869cb(0x4fd)]):w(this[_0x4869cb(0x343)],this['unitID'],this[_0x4869cb(0x2af)],this[_0x4869cb(0x4e4)],this[_0x4869cb(0x4fd)]);break;case t['UniverInstanceType'][_0x4869cb(0x2b4)]:_0x54635e=De(this[_0x4869cb(0x343)],this[_0x4869cb(0x4e9)],this['_univerInstanceService'],this[_0x4869cb(0x4e4)],this[_0x4869cb(0x4fd)]);break;case t[_0x4869cb(0x4f3)][_0x4869cb(0x4a7)]:_0x54635e=Ee(this[_0x4869cb(0x343)],this[_0x4869cb(0x4e9)],this[_0x4869cb(0x2af)],this[_0x4869cb(0x4e4)],this[_0x4869cb(0x4fd)]);break;case t[_0x4869cb(0x4f3)][_0x4869cb(0x48f)]:_0x54635e=w(this['_pendingMutations'],this['unitID'],this[_0x4869cb(0x2af)],this[_0x4869cb(0x4e4)],this['_userManagerService']);break;case t['UniverInstanceType']['UNIVER_BASE']:_0x54635e=w(this[_0x4869cb(0x343)],this[_0x4869cb(0x4e9)],this[_0x4869cb(0x2af)],this['_revisionService'],this[_0x4869cb(0x4fd)]);break;default:throw Error(_0x4869cb(0x24d)+this['type']+_0x4869cb(0x448));}let {changeset:_0x3d410d,pendingMutations:_0x121818}=_0x54635e;this['_handler'][_0x4869cb(0x4c4)](_0x3d410d);let _0x224379=_0x121818[_0x4869cb(0x476)]?this[_0x4869cb(0x400)]['createInstance'](A,this[_0x4869cb(0x4e9)],this[_0x4869cb(0x1fe)],_0x3d410d,_0x121818,this[_0x4869cb(0x3eb)],void 0x0):this[_0x4869cb(0x400)][_0x4869cb(0x341)](k,this[_0x4869cb(0x4e9)],this[_0x4869cb(0x1fe)],_0x3d410d,this['_handler'],void 0x0);_0x224379[_0x4869cb(0x250)](),this[_0x4869cb(0x3eb)]['onStateChange'](this,_0x224379);},_0x27c3bd);}[_0x47c516(0x1f1)](){const _0x7677e2=_0x47c516;let _0x22d602=this[_0x7677e2(0x469)]['getConfig'](m);return(_0x22d602==null?void 0x0:_0x22d602[_0x7677e2(0x312)])??0x7d0;}['resend'](){const _0x8c6a5c=_0x47c516;throw Error(_0x8c6a5c(0x34c));}[_0x47c516(0x504)](){const _0x7ef2de=_0x47c516;this[_0x7ef2de(0x31d)]!=null&&(clearTimeout(this[_0x7ef2de(0x31d)]),this[_0x7ef2de(0x31d)]=null);}[_0x47c516(0x53f)](_0x2094fb){const _0x5edadf=_0x47c516;return this[_0x5edadf(0x504)](),this['_injector']['createInstance'](j,this[_0x5edadf(0x4e9)],this[_0x5edadf(0x1fe)],null,this[_0x5edadf(0x343)],this['_handler'],_0x2094fb);}};O=Le=y([v(0x4,(0x0,t['Inject'])(t[_0x47c516(0x416)])),v(0x5,(0x0,t['Inject'])(e[_0x47c516(0x21f)])),v(0x6,(0x0,t[_0x47c516(0x528)])(t[_0x47c516(0x4d8)])),v(0x7,t[_0x47c516(0x4e0)]),v(0x8,t['ICommandService']),v(0x9,t[_0x47c516(0x2ae)]),v(0xa,e[_0x47c516(0x3f6)]),v(0xb,t[_0x47c516(0x493)]),v(0xc,t[_0x47c516(0x526)]),v(0xd,(0x0,t[_0x47c516(0x263)])(x))],O);let k=Re=class extends E{constructor(_0x4b11c4,_0x45719e,_0x1b9cf1,_0x4642c8,_0x358e38,_0x2cfc8e,_0x109f06,_0x17d06f,_0x53026a,_0x2db839,_0x1eb1ee,_0x2fa88b){const _0x362826=_0x47c516;super(_0x4b11c4,_0x45719e,_0x1b9cf1,[],_0x4642c8,_0x17d06f,_0x1eb1ee,_0x109f06,_0x2fa88b),this[_0x362826(0x400)]=_0x2cfc8e,this[_0x362826(0x266)]=_0x53026a,this[_0x362826(0x3e4)]=_0x2db839,g(this,_0x362826(0x4f5),_0x362826(0x3fa)),g(this,_0x362826(0x27a),0x0),g(this,_0x362826(0x43b),0x0),g(this,'_resendTimer',void 0x0),g(this,_0x362826(0x4d0),void 0x0),_0x358e38&&(this['_resendTimeout']=_0x358e38[_0x362826(0x379)],this[_0x362826(0x43b)]=_0x358e38['total'],this['_subscribeResendTimer'](_0x358e38[_0x362826(0x4a2)]));}[_0x47c516(0x460)](_0x4441b1){const _0xec1562=_0x47c516;this[_0xec1562(0x504)]();let _0x2b2fca=this[_0xec1562(0x400)][_0xec1562(0x341)](A,this['unitID'],this[_0xec1562(0x1fe)],this[_0xec1562(0x496)],[_0x4441b1],this[_0xec1562(0x3eb)],this[_0xec1562(0x26f)]());return _0x2b2fca[_0xec1562(0x250)](),_0x2b2fca;}[_0x47c516(0x2e9)](_0x1e7b5c){const _0x4be7ca=_0x47c516;if(this[_0x4be7ca(0x2a4)](_0x1e7b5c))return this[_0x4be7ca(0x2e1)](_0x1e7b5c);if(this[_0x4be7ca(0x50b)](_0x1e7b5c))return this;if(this[_0x4be7ca(0x304)](_0x1e7b5c))return this[_0x4be7ca(0x504)](),this[_0x4be7ca(0x400)][_0x4be7ca(0x341)](N,this[_0x4be7ca(0x4e9)],this[_0x4be7ca(0x1fe)],this[_0x4be7ca(0x496)],[],null,[_0x1e7b5c],this[_0x4be7ca(0x3eb)],this[_0x4be7ca(0x26f)]());try{let _0x341854=this['_transformService'][_0x4be7ca(0x309)]([_0x1e7b5c],[this[_0x4be7ca(0x496)]],!0x1);if((0x0,e['isTransformChangesetsSuccess'])(_0x341854)){let {c1Prime:_0x45d921,c2Prime:_0x235dd4}=_0x341854;this[_0x4be7ca(0x46c)](_0x45d921[0x0]),_0x235dd4[0x0]['baseRev']=this[_0x4be7ca(0x390)](),this[_0x4be7ca(0x504)]();let _0x307b33=this[_0x4be7ca(0x400)][_0x4be7ca(0x341)](Re,this[_0x4be7ca(0x4e9)],this[_0x4be7ca(0x1fe)],_0x235dd4[0x0],this['_handler'],this[_0x4be7ca(0x26f)]());return _0x307b33[_0x4be7ca(0x250)](),_0x307b33;}throw _0x341854[_0x4be7ca(0x492)];}catch(_0x5df29b){return this[_0x4be7ca(0x266)][_0x4be7ca(0x492)](_0x5df29b),this[_0x4be7ca(0x53f)](!0x1);}}[_0x47c516(0x2e1)](_0x4d182f){const _0x51f319=_0x47c516;let _0x420824=this[_0x51f319(0x4e4)][_0x51f319(0x479)](this[_0x51f319(0x4e9)]);if(_0x4d182f['revision']<=_0x420824){if(this[_0x51f319(0x3a2)](_0x4d182f)){this[_0x51f319(0x504)]();let _0x1cdede=this[_0x51f319(0x400)][_0x51f319(0x341)](D,this[_0x51f319(0x4e9)],this[_0x51f319(0x1fe)],this[_0x51f319(0x3eb)]);return _0x1cdede[_0x51f319(0x250)](),_0x1cdede;}return this[_0x51f319(0x266)][_0x51f319(0x3c4)]('[AwaitingState]',_0x51f319(0x495)+_0x4d182f[_0x51f319(0x520)]+_0x51f319(0x4f1)+_0x420824+'.'),this;}if(this[_0x51f319(0x504)](),this['_checkMissing'](_0x4d182f))return this[_0x51f319(0x400)][_0x51f319(0x341)](N,this['unitID'],this['type'],this[_0x51f319(0x496)],[],_0x4d182f[_0x51f319(0x520)],[],this[_0x51f319(0x3eb)],void 0x0);this[_0x51f319(0x259)]();let _0x48f2f2=this[_0x51f319(0x400)]['createInstance'](D,this[_0x51f319(0x4e9)],this[_0x51f319(0x1fe)],this[_0x51f319(0x3eb)]);return _0x48f2f2['_updateLocalCache'](),_0x48f2f2;}['onRemoteRej'](_0x355e66){const _0x340681=_0x47c516;return this[_0x340681(0x53f)](!!(_0x355e66!=null&&_0x355e66['isPermissionRej']));}[_0x47c516(0x30c)](_0x2fee08){const _0x32aa73=_0x47c516;var _0x3c9a98;return _0x2fee08[_0x32aa73(0x3c2)]===((_0x3c9a98=this['_awaitingChangeset'])==null?void 0x0:_0x3c9a98[_0x32aa73(0x3c2)])?this[_0x32aa73(0x43b)]>He?this['toggleOffline']():(this[_0x32aa73(0x242)](Ie(this[_0x32aa73(0x27a)],{'reqId':_0x2fee08[_0x32aa73(0x3c2)]})),this):this;}['toggleOffline'](){const _0x49937c=_0x47c516;return this[_0x49937c(0x504)](),this[_0x49937c(0x400)]['createInstance'](M,this['unitID'],this[_0x49937c(0x1fe)],this[_0x49937c(0x496)],[],this['_handler']);}[_0x47c516(0x2d4)](){return this;}[_0x47c516(0x42e)](){const _0x5cc0f5=_0x47c516;this[_0x5cc0f5(0x3eb)][_0x5cc0f5(0x4c4)](this['_awaitingChangeset']);}[_0x47c516(0x53f)](_0x3668be){const _0x2206fd=_0x47c516;return this['_clearScheduledTask'](),this[_0x2206fd(0x400)][_0x2206fd(0x341)](j,this[_0x2206fd(0x4e9)],this['type'],this[_0x2206fd(0x496)],[],this[_0x2206fd(0x3eb)],_0x3668be);}[_0x47c516(0x242)](_0x5a22d1){const _0x5f5b2d=_0x47c516;var _0x2f3d23;(_0x2f3d23=this[_0x5f5b2d(0x4d0)])==null||_0x2f3d23[_0x5f5b2d(0x44d)](),this[_0x5f5b2d(0x498)]=_0x5a22d1,this[_0x5f5b2d(0x4d0)]=_0x5a22d1==null?void 0x0:_0x5a22d1[_0x5f5b2d(0x51a)](({reqId:_0x164d85})=>this[_0x5f5b2d(0x40b)](_0x164d85));}[_0x47c516(0x40b)](_0x357311){const _0x324e51=_0x47c516;var _0x54c005;_0x357311===((_0x54c005=this[_0x324e51(0x496)])==null?void 0x0:_0x54c005[_0x324e51(0x3c2)])&&(this[_0x324e51(0x498)]=void 0x0,this[_0x324e51(0x42e)](),this[_0x324e51(0x27a)]=this['_resendTimeout']===0x0?0x3e8:Math[_0x324e51(0x497)](this['_resendTimeout']*0x2,Ve),this[_0x324e51(0x43b)]+=this[_0x324e51(0x27a)]);}[_0x47c516(0x26f)](){const _0x3306c6=_0x47c516;return{'timer':this[_0x3306c6(0x498)],'timeout':this['_resendTimeout'],'total':this[_0x3306c6(0x43b)]};}[_0x47c516(0x504)](){const _0x66dc38=_0x47c516;var _0x4a0ccb;(_0x4a0ccb=this['_sender'])==null||_0x4a0ccb[_0x66dc38(0x44d)]();}};k=Re=y([v(0x5,(0x0,t['Inject'])(t[_0x47c516(0x416)])),v(0x6,(0x0,t[_0x47c516(0x528)])(e[_0x47c516(0x21f)])),v(0x7,t[_0x47c516(0x212)]),v(0x8,t[_0x47c516(0x4e0)]),v(0x9,e['ITransformService']),v(0xa,t['IUndoRedoService']),v(0xb,(0x0,t[_0x47c516(0x263)])(x))],k);let A=ze=class extends E{constructor(_0x109189,_0x1ab65e,_0x4532a6,_0x32aa1f,_0x2bdca5,_0xcd5d8,_0x434865,_0x18c6d8,_0x563569,_0x5a1bfd,_0x2384f7,_0x1a6570,_0x5f3713){const _0x529b40=_0x47c516;super(_0x109189,_0x1ab65e,_0x4532a6,_0x32aa1f,_0x2bdca5,_0x563569,_0x1a6570,_0x18c6d8,_0x5f3713),this[_0x529b40(0x400)]=_0x434865,this[_0x529b40(0x266)]=_0x5a1bfd,this[_0x529b40(0x3e4)]=_0x2384f7,this[_0x529b40(0x4ba)]=_0x5f3713,g(this,_0x529b40(0x4f5),_0x529b40(0x50d)),g(this,'_resendTimeout',0x0),g(this,_0x529b40(0x43b),0x0),g(this,_0x529b40(0x498),void 0x0),g(this,'_sender',void 0x0),_0xcd5d8&&(this[_0x529b40(0x27a)]=_0xcd5d8[_0x529b40(0x379)],this[_0x529b40(0x43b)]=_0xcd5d8['total'],this[_0x529b40(0x242)](_0xcd5d8['timer']));}['appendMutation'](_0x15b87b){const _0xc8656c=_0x47c516;return this[_0xc8656c(0x343)][_0xc8656c(0x325)](_0x15b87b),this;}['onRemoteChangeset'](_0x4632e6){const _0x41b46a=_0x47c516;if(this['_isEchoedAwaitingChangeset'](_0x4632e6))return this[_0x41b46a(0x2e1)](_0x4632e6);if(this[_0x41b46a(0x50b)](_0x4632e6))return this;if(this['_checkMissing'](_0x4632e6))return this['_clearScheduledTask'](),this[_0x41b46a(0x400)]['createInstance'](N,this[_0x41b46a(0x4e9)],this[_0x41b46a(0x1fe)],this[_0x41b46a(0x496)],this['_pendingMutations'],null,[_0x4632e6],this[_0x41b46a(0x3eb)],this[_0x41b46a(0x26f)]());try{let _0x25c412=this['_transformService'][_0x41b46a(0x309)]([_0x4632e6],[this[_0x41b46a(0x496)]],!0x1);if((0x0,e['isTransformChangesetsSuccess'])(_0x25c412)){let {c1Prime:_0x332c4c,c2Prime:_0x8d44ea}=_0x25c412,_0x40b0f6=this['_transformService'][_0x41b46a(0x2cb)](_0x332c4c[0x0],this[_0x41b46a(0x343)]);if((0x0,e['isTransformMutationsWithChangesetSuccess'])(_0x40b0f6)){let {c1Prime:_0x1423eb,m2Prime:_0x45ad94}=_0x40b0f6;return this[_0x41b46a(0x46c)](_0x1423eb),_0x8d44ea[0x0][_0x41b46a(0x4f9)]=this[_0x41b46a(0x390)](),this[_0x41b46a(0x504)](),this[_0x41b46a(0x400)][_0x41b46a(0x341)](ze,this[_0x41b46a(0x4e9)],this[_0x41b46a(0x1fe)],_0x8d44ea[0x0],_0x45ad94,this[_0x41b46a(0x3eb)],this[_0x41b46a(0x26f)]());}throw _0x40b0f6[_0x41b46a(0x492)];}throw _0x25c412[_0x41b46a(0x492)];}catch(_0x33829d){return this[_0x41b46a(0x266)][_0x41b46a(0x492)](_0x33829d),this[_0x41b46a(0x53f)](!0x1);}}[_0x47c516(0x2e1)](_0x39c511){const _0x12d906=_0x47c516;let _0x4cd881=this[_0x12d906(0x390)]();if(_0x39c511[_0x12d906(0x520)]<=_0x4cd881){if(this[_0x12d906(0x3a2)](_0x39c511)){this[_0x12d906(0x504)]();let _0x21b5e2=this['_injector'][_0x12d906(0x341)](O,this[_0x12d906(0x4e9)],this[_0x12d906(0x1fe)],this['_pendingMutations'],this[_0x12d906(0x3eb)]);return _0x21b5e2[_0x12d906(0x3ed)](),_0x21b5e2[_0x12d906(0x250)](),_0x21b5e2;}return this[_0x12d906(0x266)][_0x12d906(0x3c4)](_0x12d906(0x2c1),'ignored\x20stale\x20ack\x20of\x20revision\x20'+_0x39c511[_0x12d906(0x520)]+_0x12d906(0x4f1)+_0x4cd881+'.'),this;}if(this[_0x12d906(0x504)](),this[_0x12d906(0x304)](_0x39c511))return this[_0x12d906(0x400)]['createInstance'](N,this['unitID'],this[_0x12d906(0x1fe)],this[_0x12d906(0x496)],this[_0x12d906(0x343)],_0x39c511['revision'],[],this[_0x12d906(0x3eb)],void 0x0);this['_incrementRevisionNumber']();let _0x1b5ff7=this[_0x12d906(0x400)][_0x12d906(0x341)](O,this[_0x12d906(0x4e9)],this[_0x12d906(0x1fe)],this[_0x12d906(0x343)],this[_0x12d906(0x3eb)]);return _0x1b5ff7[_0x12d906(0x3ed)](),_0x1b5ff7[_0x12d906(0x250)](),_0x1b5ff7;}[_0x47c516(0x53b)](_0x439365){const _0x5c4f5d=_0x47c516;return this[_0x5c4f5d(0x53f)](!!(_0x439365!=null&&_0x439365[_0x5c4f5d(0x3c7)]));}['onRemoteRetry'](_0x35c6fe){const _0x55f18f=_0x47c516;var _0x1d8366;return _0x35c6fe[_0x55f18f(0x3c2)]===((_0x1d8366=this[_0x55f18f(0x496)])==null?void 0x0:_0x1d8366['reqId'])?this['_maxTotalRetryTimeout']>He?this[_0x55f18f(0x2f2)]():(this['_subscribeResendTimer'](Ie(this[_0x55f18f(0x27a)],{'reqId':_0x35c6fe[_0x55f18f(0x3c2)]})),this):this;}[_0x47c516(0x2f2)](){const _0x52be52=_0x47c516;return this['_clearScheduledTask'](),this[_0x52be52(0x400)][_0x52be52(0x341)](M,this[_0x52be52(0x4e9)],this[_0x52be52(0x1fe)],this[_0x52be52(0x496)],this[_0x52be52(0x343)],this[_0x52be52(0x3eb)]);}[_0x47c516(0x2d4)](){return this;}[_0x47c516(0x42e)](){const _0x5f2c2c=_0x47c516;this[_0x5f2c2c(0x3eb)][_0x5f2c2c(0x4c4)](this[_0x5f2c2c(0x496)]);}[_0x47c516(0x53f)](_0x2d43aa){const _0x3594a4=_0x47c516;return this[_0x3594a4(0x504)](),this[_0x3594a4(0x400)][_0x3594a4(0x341)](j,this[_0x3594a4(0x4e9)],this[_0x3594a4(0x1fe)],null,this[_0x3594a4(0x343)],this['_handler'],_0x2d43aa);}[_0x47c516(0x242)](_0x315551){const _0x44a4a9=_0x47c516;var _0x1d9a05;(_0x1d9a05=this[_0x44a4a9(0x4d0)])==null||_0x1d9a05[_0x44a4a9(0x44d)](),this[_0x44a4a9(0x498)]=_0x315551,this[_0x44a4a9(0x4d0)]=_0x315551==null?void 0x0:_0x315551[_0x44a4a9(0x51a)](({reqId:_0x416211})=>this[_0x44a4a9(0x40b)](_0x416211));}['_runScheduledResend'](_0x1ceaac){const _0x18acea=_0x47c516;var _0x13f936;_0x1ceaac===((_0x13f936=this[_0x18acea(0x496)])==null?void 0x0:_0x13f936[_0x18acea(0x3c2)])&&(this[_0x18acea(0x498)]=void 0x0,this[_0x18acea(0x42e)](),this[_0x18acea(0x27a)]=this[_0x18acea(0x27a)]===0x0?0x3e8:Math[_0x18acea(0x497)](this['_resendTimeout']*0x2,Ve),this[_0x18acea(0x43b)]+=this[_0x18acea(0x27a)]);}[_0x47c516(0x26f)](){const _0x338edb=_0x47c516;return{'timer':this[_0x338edb(0x498)],'timeout':this[_0x338edb(0x27a)],'total':this['_maxTotalRetryTimeout']};}[_0x47c516(0x504)](){const _0x189db8=_0x47c516;var _0x2429ca;(_0x2429ca=this[_0x189db8(0x4d0)])==null||_0x2429ca['unsubscribe']();}};A=ze=y([v(0x6,(0x0,t[_0x47c516(0x528)])(t[_0x47c516(0x416)])),v(0x7,(0x0,t[_0x47c516(0x528)])(e[_0x47c516(0x21f)])),v(0x8,t['ICommandService']),v(0x9,t[_0x47c516(0x4e0)]),v(0xa,e[_0x47c516(0x3f6)]),v(0xb,t[_0x47c516(0x526)]),v(0xc,(0x0,t['Optional'])(x))],A);let j=class extends E{constructor(_0x7b7434,_0x78440,_0x519430,_0x355891,_0x117648,_0x262b96=!0x1,_0x32a22c,_0xa89d2d,_0x53c134,_0xa9e77e,_0x3e4c8c,_0x50e395,_0x576921,_0x40bd11,_0x2e66d2){const _0x587537=_0x47c516;super(_0x7b7434,_0x78440,_0x519430,_0x355891,_0x117648,_0xa89d2d,_0x53c134,_0xa9e77e,_0x2e66d2),this[_0x587537(0x398)]=_0x262b96,this[_0x587537(0x539)]=_0x32a22c,this[_0x587537(0x299)]=_0x3e4c8c,this['_userManagerService']=_0x50e395,this[_0x587537(0x266)]=_0x576921,this['_collaborationUIEventService']=_0x40bd11,this[_0x587537(0x4ba)]=_0x2e66d2,g(this,_0x587537(0x4f5),_0x587537(0x4d2)),this[_0x587537(0x547)](),this[_0x587537(0x233)](),this[_0x587537(0x40f)]()['catch'](_0x21815c=>this[_0x587537(0x266)]['error'](_0x21815c));}[_0x47c516(0x460)](){return this;}[_0x47c516(0x2e9)](){return this;}[_0x47c516(0x2e1)](){return this;}[_0x47c516(0x53b)](){return this;}[_0x47c516(0x30c)](){return this;}[_0x47c516(0x2f2)](){return this;}['toggleOnline'](){return this;}[_0x47c516(0x42e)](){const _0x3d36dc=_0x47c516;throw Error(_0x3d36dc(0x386));}async['_prepareConflictRecovery'](){const _0x3e56d0=_0x47c516;var _0x3a724b,_0x488333,_0xfeff9e;let _0x43148a=((_0x3a724b=this[_0x3e56d0(0x4fd)][_0x3e56d0(0x3ee)]())==null?void 0x0:_0x3a724b['userID'])??'';await((_0x488333=this[_0x3e56d0(0x344)])==null||(_0xfeff9e=_0x488333[_0x3e56d0(0x4e7)])==null?void 0x0:_0xfeff9e[_0x3e56d0(0x4cf)](_0x488333,this[_0x3e56d0(0x4e9)],_0x3e56d0(0x4d2),_0x43148a)['catch'](()=>void 0x0));try{var _0x249e53;await((_0x249e53=this[_0x3e56d0(0x344)])==null?void 0x0:_0x249e53['clearOfflineData'](this[_0x3e56d0(0x4e9)],_0x43148a));}catch{this[_0x3e56d0(0x396)][_0x3e56d0(0x315)]({'id':'CONFLICT_CACHE_CLEAR_FAILED','unitID':this[_0x3e56d0(0x4e9)],'userId':_0x43148a});return;}this[_0x3e56d0(0x481)]();}[_0x47c516(0x233)](){const _0x9243e5=_0x47c516;this['_collaborationUIEventService'][_0x9243e5(0x315)]({'id':'CONFLICT_PROCESSING'});}['_showConflictNotification'](){const _0x2c2a2e=_0x47c516;this[_0x2c2a2e(0x398)]?this[_0x2c2a2e(0x396)][_0x2c2a2e(0x315)]({'id':_0x2c2a2e(0x33b)}):this[_0x2c2a2e(0x396)]['emitEvent']({'id':_0x2c2a2e(0x30f)});}[_0x47c516(0x547)](){const _0x424044=_0x47c516;this[_0x424044(0x539)][_0x424044(0x3be)](new r[(_0x424044(0x50f))](this['unitID'])['id'],!0x1);}};j=y([v(0x6,(0x0,t[_0x47c516(0x528)])(t[_0x47c516(0x333)])),v(0x7,t[_0x47c516(0x212)]),v(0x8,t[_0x47c516(0x526)]),v(0x9,(0x0,t[_0x47c516(0x528)])(e[_0x47c516(0x21f)])),v(0xa,(0x0,t['Inject'])(t[_0x47c516(0x346)])),v(0xb,(0x0,t[_0x47c516(0x528)])(t[_0x47c516(0x4d8)])),v(0xc,t[_0x47c516(0x4e0)]),v(0xd,(0x0,t[_0x47c516(0x528)])(_)),v(0xe,(0x0,t[_0x47c516(0x263)])(x))],j);let M=class extends E{constructor(_0x597d71,_0x19f8ee,_0x556f12,_0x5f2e11,_0x130c8c,_0x235303,_0x7e9dd1,_0x3a47a1,_0x22e24a,_0x3ceca8){const _0x32183b=_0x47c516;super(_0x597d71,_0x19f8ee,_0x556f12,_0x5f2e11,_0x130c8c,_0x3a47a1,_0x22e24a,_0x7e9dd1,_0x3ceca8),this[_0x32183b(0x400)]=_0x235303,g(this,_0x32183b(0x4f5),_0x32183b(0x2ad));}[_0x47c516(0x460)](_0x4e5c2a){const _0x5d29b7=_0x47c516;return this['_pendingMutations'][_0x5d29b7(0x325)](_0x4e5c2a),this['_updateLocalCache'](),this;}[_0x47c516(0x2e9)](_0x4d8c11){const _0x4b034e=_0x47c516;throw Error(_0x4b034e(0x49c));}[_0x47c516(0x2e1)](){throw Error('[OfflineState]:\x20received\x20acknowledgement.');}[_0x47c516(0x53b)](){const _0x238989=_0x47c516;throw Error(_0x238989(0x447));}[_0x47c516(0x30c)](){return this;}['toggleOffline'](){return this;}[_0x47c516(0x2d4)](){const _0x3382f8=_0x47c516;let {_injector:_0x33588e,_pendingMutations:_0xbce035,_awaitingChangeset:_0x1041f0,unitID:_0x22893d,_handler:_0x40154f,type:_0x4e420a}=this,_0xe7c175=Ue(_0x33588e,_0x22893d,_0x4e420a,_0x1041f0,_0xbce035,_0x40154f);return _0xe7c175 instanceof O?_0xe7c175[_0x3382f8(0x3ed)]():(_0xe7c175 instanceof A||_0xe7c175 instanceof k)&&_0xe7c175['resend'](),_0xe7c175;}[_0x47c516(0x42e)](){throw Error('[OfflineState]:\x20invalid\x20calling\x20to\x20`resend`.');}};M=y([v(0x5,(0x0,t['Inject'])(t[_0x47c516(0x416)])),v(0x6,(0x0,t['Inject'])(e[_0x47c516(0x21f)])),v(0x7,t['ICommandService']),v(0x8,t[_0x47c516(0x526)]),v(0x9,(0x0,t[_0x47c516(0x263)])(x))],M);function _0x88a9(_0x444fdc,_0x50131f){_0x444fdc=_0x444fdc-0x1ee;const _0x606370=_0x6063();let _0x88a978=_0x606370[_0x444fdc];return _0x88a978;}let N=class extends E{constructor(_0x14701a,_0x15af1a,_0x53bcfb,_0x3a9fd5,_0x3799da,_0x869b8b,_0x5c397f,_0x1966fb,_0x5c8825,_0x1310b8,_0x1c7db0,_0x27d364,_0x57206d,_0x8b134a,_0x543c90){const _0x3fd50d=_0x47c516;super(_0x14701a,_0x15af1a,_0x53bcfb,_0x3a9fd5,_0x5c397f,_0x27d364,_0x57206d,_0x1310b8,_0x543c90),this['_acknowledgedAwaitingRevision']=_0x3799da,this[_0x3fd50d(0x200)]=_0x869b8b,this['_resendSchedule']=_0x1966fb,this[_0x3fd50d(0x400)]=_0x5c8825,this['_logService']=_0x1c7db0,this[_0x3fd50d(0x3e4)]=_0x8b134a,this[_0x3fd50d(0x4ba)]=_0x543c90,g(this,'status',_0x3fd50d(0x238));}[_0x47c516(0x494)](_0x12fcf7){const _0x1504e5=_0x47c516;try{if(this[_0x1504e5(0x37a)](_0x12fcf7)[_0x1504e5(0x353)])throw Error('[FetchMissState]:\x20missing\x20changesets\x20response\x20still\x20has\x20revision\x20gaps.');if(this['_handleRemoteChangesets']([...this[_0x1504e5(0x200)]]['sort']((_0x1a83f8,_0xdbeefd)=>_0x1a83f8[_0x1504e5(0x520)]-_0xdbeefd[_0x1504e5(0x520)]))[_0x1504e5(0x353)])return this['_queuedRemoteChangesets']=[],this[_0x1504e5(0x250)](),this[_0x1504e5(0x3eb)][_0x1504e5(0x2ab)]({'from':this[_0x1504e5(0x390)](),'to':0x0}),this;let _0x45ce7d=this[_0x1504e5(0x496)],_0x178c51=this['_pendingMutations'],_0x1f391e;if(_0x45ce7d&&_0x178c51['length']!==0x0)_0x1f391e=this['_injector'][_0x1504e5(0x341)](A,this[_0x1504e5(0x4e9)],this[_0x1504e5(0x1fe)],_0x45ce7d,_0x178c51,this[_0x1504e5(0x3eb)],this[_0x1504e5(0x26f)]);else{if(_0x45ce7d&&_0x178c51['length']===0x0)_0x45ce7d[_0x1504e5(0x4f9)]=this[_0x1504e5(0x390)](),_0x1f391e=this[_0x1504e5(0x400)][_0x1504e5(0x341)](k,this[_0x1504e5(0x4e9)],this['type'],_0x45ce7d,this[_0x1504e5(0x3eb)],this[_0x1504e5(0x26f)]);else{if(_0x178c51['length']!==0x0){let _0x3c42d2=this[_0x1504e5(0x400)][_0x1504e5(0x341)](O,this[_0x1504e5(0x4e9)],this[_0x1504e5(0x1fe)],_0x178c51,this[_0x1504e5(0x3eb)]);_0x3c42d2[_0x1504e5(0x3ed)](),_0x1f391e=_0x3c42d2;}else _0x1f391e=this[_0x1504e5(0x400)][_0x1504e5(0x341)](D,this[_0x1504e5(0x4e9)],this[_0x1504e5(0x1fe)],this[_0x1504e5(0x3eb)]);}}return _0x1f391e[_0x1504e5(0x250)](),_0x1f391e;}catch(_0x566a29){return this[_0x1504e5(0x266)][_0x1504e5(0x492)](_0x1504e5(0x29a),'failed\x20to\x20apply\x20missed\x20changesets!',_0x566a29),this['_injector']['createInstance'](j,this[_0x1504e5(0x4e9)],this[_0x1504e5(0x1fe)],this[_0x1504e5(0x496)],this[_0x1504e5(0x343)],this[_0x1504e5(0x3eb)],!0x1);}}['_handleRemoteChangesets'](_0x345b92){const _0x902ce9=_0x47c516;this[_0x902ce9(0x370)]();for(let _0x4096b7=0x0;_0x4096b7<_0x345b92['length'];_0x4096b7++){let _0x430c56=_0x345b92[_0x4096b7],_0x1f1c39=this['_getCurrentRevision']();if(this[_0x902ce9(0x2a4)](_0x430c56)){if(_0x430c56[_0x902ce9(0x520)]>_0x1f1c39+0x1)return{'missingChangesets':!0x0};_0x430c56[_0x902ce9(0x520)]<=_0x1f1c39?this[_0x902ce9(0x510)]():this[_0x902ce9(0x4b0)]();}else{if(!(_0x430c56['revision']<=_0x1f1c39)){if(_0x430c56['revision']>_0x1f1c39+0x1)return{'missingChangesets':!0x0};this['_transformAndApplyRemoteChangeset'](_0x430c56),this['_acknowledgeAwaitingIfReady']();}}}return{'missingChangesets':!0x1};}[_0x47c516(0x27b)](_0x387d1b){const _0x1e06e8=_0x47c516;let _0x2aeee8=_0x387d1b,_0x4053e4=this['_awaitingChangeset'];if(_0x4053e4){let _0x2a5fb7=this[_0x1e06e8(0x3e4)][_0x1e06e8(0x309)]([_0x387d1b],[_0x4053e4],!0x1);if(!(0x0,e[_0x1e06e8(0x28c)])(_0x2a5fb7))throw _0x2a5fb7['error'];_0x2aeee8=_0x2a5fb7['c1Prime'][0x0],_0x4053e4=_0x2a5fb7[_0x1e06e8(0x4da)][0x0];}let _0x4362e1=this[_0x1e06e8(0x343)];if(_0x4362e1[_0x1e06e8(0x476)]){let _0x35c235=this['_transformService'][_0x1e06e8(0x2cb)](_0x2aeee8,_0x4362e1);if(!(0x0,e['isTransformMutationsWithChangesetSuccess'])(_0x35c235))throw _0x35c235[_0x1e06e8(0x492)];_0x2aeee8=_0x35c235[_0x1e06e8(0x28f)],_0x4362e1=_0x35c235[_0x1e06e8(0x4f7)];}this['_executeRemoteChangeset'](_0x2aeee8),_0x4053e4&&(_0x4053e4[_0x1e06e8(0x4f9)]=this[_0x1e06e8(0x390)]()),this['_awaitingChangeset']=_0x4053e4,this[_0x1e06e8(0x343)]=_0x4362e1;}['_acknowledgeAwaitingIfReady'](){const _0x24cafd=_0x47c516;if(!this[_0x24cafd(0x496)]||this['_acknowledgedAwaitingRevision']==null)return;let _0x4c8523=this[_0x24cafd(0x390)]();if(this['_acknowledgedAwaitingRevision']<=_0x4c8523)throw Error(_0x24cafd(0x2fb)+this[_0x24cafd(0x405)]+'.');this[_0x24cafd(0x405)]===_0x4c8523+0x1&&this['_acknowledgeAwaiting']();}[_0x47c516(0x4b0)](){const _0x2d0c5d=_0x47c516;this[_0x2d0c5d(0x259)](),this[_0x2d0c5d(0x510)]();}['_dropAcknowledgedAwaiting'](){const _0xc3139e=_0x47c516;this['_awaitingChangeset']=null,this[_0xc3139e(0x405)]=null,this['_resendSchedule']=void 0x0;}['resend'](){const _0x35ed9d=_0x47c516;throw Error(_0x35ed9d(0x226));}['appendMutation'](_0x106f5d){const _0x4847d2=_0x47c516;return this[_0x4847d2(0x343)][_0x4847d2(0x325)](_0x106f5d),this;}[_0x47c516(0x2e9)](_0x4767f8){const _0x7cec81=_0x47c516;return this[_0x7cec81(0x200)][_0x7cec81(0x325)](_0x4767f8),this;}[_0x47c516(0x2e1)](_0x3eaeb6){const _0x5d2301=_0x47c516;if(this[_0x5d2301(0x496)]){let _0x5803c5=this['_getCurrentRevision']();return _0x3eaeb6[_0x5d2301(0x520)]<=_0x5803c5?(this[_0x5d2301(0x3a2)](_0x3eaeb6)&&this[_0x5d2301(0x510)](),this):(_0x5803c5+0x1===_0x3eaeb6[_0x5d2301(0x520)]?this[_0x5d2301(0x4b0)]():(this['_acknowledgedAwaitingRevision']=_0x3eaeb6[_0x5d2301(0x520)],this[_0x5d2301(0x26f)]=void 0x0),this);}if(_0x3eaeb6[_0x5d2301(0x520)]<=this[_0x5d2301(0x390)]())return this;throw Error(_0x5d2301(0x267));}[_0x47c516(0x53b)](_0x1f4362){const _0x552e7b=_0x47c516;return this[_0x552e7b(0x53f)](!!(_0x1f4362!=null&&_0x1f4362[_0x552e7b(0x3c7)]));}['onRemoteRetry'](_0x3ebea9){const _0x23a6c0=_0x47c516;var _0x1d1a32;if(this[_0x23a6c0(0x405)]!=null||_0x3ebea9[_0x23a6c0(0x3c2)]!==((_0x1d1a32=this[_0x23a6c0(0x496)])==null?void 0x0:_0x1d1a32[_0x23a6c0(0x3c2)]))return this;let _0xfd4773=this[_0x23a6c0(0x26f)]??{'timer':void 0x0,'timeout':0x0,'total':0x0};return _0xfd4773[_0x23a6c0(0x4a2)]?this:_0xfd4773[_0x23a6c0(0x1fd)]>He?this[_0x23a6c0(0x2f2)]():(this[_0x23a6c0(0x26f)]={..._0xfd4773,'timer':Ie(_0xfd4773[_0x23a6c0(0x379)],{'reqId':_0x3ebea9[_0x23a6c0(0x3c2)]})},this);}[_0x47c516(0x2f2)](){const _0x36190d=_0x47c516;return this[_0x36190d(0x400)][_0x36190d(0x341)](M,this['unitID'],this['type'],this[_0x36190d(0x496)],this[_0x36190d(0x343)],this[_0x36190d(0x3eb)]);}['toggleOnline'](){return this;}[_0x47c516(0x53f)](_0x41e0db){const _0xf2003f=_0x47c516;return this[_0xf2003f(0x400)][_0xf2003f(0x341)](j,this['unitID'],this[_0xf2003f(0x1fe)],this['_awaitingChangeset'],this[_0xf2003f(0x343)],this[_0xf2003f(0x3eb)],_0x41e0db);}};N=y([v(0x8,(0x0,t['Inject'])(t[_0x47c516(0x416)])),v(0x9,(0x0,t['Inject'])(e['RevisionService'])),v(0xa,t[_0x47c516(0x4e0)]),v(0xb,t[_0x47c516(0x212)]),v(0xc,t[_0x47c516(0x526)]),v(0xd,e['ITransformService']),v(0xe,(0x0,t[_0x47c516(0x263)])(x))],N);function Ue(_0x12963e,_0x4f4421,_0x1a91e9,_0xf95dae,_0xa0d25e,_0x4c0374){const _0x5dfcd9=_0x47c516;return _0xf95dae&&_0xa0d25e[_0x5dfcd9(0x476)]?_0x12963e[_0x5dfcd9(0x341)](A,_0x4f4421,_0x1a91e9,_0xf95dae,_0xa0d25e,_0x4c0374,void 0x0):_0xf95dae?_0x12963e[_0x5dfcd9(0x341)](k,_0x4f4421,_0x1a91e9,_0xf95dae,_0x4c0374,void 0x0):_0xa0d25e[_0x5dfcd9(0x476)]?_0x12963e['createInstance'](O,_0x4f4421,_0x1a91e9,_0xa0d25e,_0x4c0374):_0x12963e[_0x5dfcd9(0x341)](D,_0x4f4421,_0x1a91e9,_0x4c0374);}let P=class extends t[_0x47c516(0x3b6)]{get[_0x47c516(0x41c)](){const _0x39913a=_0x47c516;return this[_0x39913a(0x356)];}constructor(_0xe7ac27,_0x15c45a,_0x43872f,_0x1e1b5f,_0x3d46bf,_0x586f06,_0x42768e,_0x54c7fc,_0x4ba864,_0xaec247,_0x4badea,_0x17ca9a,_0x586f70,_0x3db6e){const _0xcbba4=_0x47c516;super(),this[_0xcbba4(0x4e9)]=_0xe7ac27,this[_0xcbba4(0x257)]=_0x15c45a,this['_type']=_0x43872f,this[_0xcbba4(0x400)]=_0x1e1b5f,this[_0xcbba4(0x443)]=_0x3d46bf,this['_localeService']=_0x586f06,this[_0xcbba4(0x4e4)]=_0x42768e,this[_0xcbba4(0x458)]=_0x54c7fc,this[_0xcbba4(0x2af)]=_0x4ba864,this[_0xcbba4(0x266)]=_0xaec247,this[_0xcbba4(0x213)]=_0x4badea,this['_permissionService']=_0x17ca9a,this[_0xcbba4(0x51f)]=_0x586f70,this[_0xcbba4(0x344)]=_0x3db6e,g(this,_0xcbba4(0x302),new i[(_0xcbba4(0x2f4))](null)),g(this,_0xcbba4(0x208),this[_0xcbba4(0x302)][_0xcbba4(0x404)]()),g(this,_0xcbba4(0x356),void 0x0),g(this,_0xcbba4(0x244),!0x1),g(this,_0xcbba4(0x4f6),''),g(this,'_changesetReqId',0x0),g(this,'status$',this['state$']['pipe']((0x0,i[_0xcbba4(0x41a)])(_0x47cd68=>_0x47cd68?_0x47cd68[_0xcbba4(0x4f5)]:_0xcbba4(0x2ad)),(0x0,i[_0xcbba4(0x35c)])({'bufferSize':0x1,'refCount':!0x0}))),g(this,_0xcbba4(0x535),!0x1),g(this,_0xcbba4(0x527),[]);}async[_0x47c516(0x243)](){const _0x5ea469=_0x47c516;if(this[_0x5ea469(0x41c)])throw Error('[CollaborationEntity]:\x20initial\x20state\x20has\x20been\x20created\x20before.\x20You\x20should\x20not\x20call\x20\x22init\x22\x20twice.');await this['_init']();}[_0x47c516(0x36c)](){const _0x35337b=_0x47c516;return this[_0x35337b(0x244)]=!0x0,(0x0,t[_0x35337b(0x3b4)])(()=>{this['_collaborationPaused']=!0x1,this['_exhaustRemoteChangesetQueue']();});}[_0x47c516(0x3c0)](_0x130c47){const _0x85ae4=_0x47c516;this[_0x85ae4(0x477)](_0x130c47);}['_updateState'](_0x7eab3b){const _0x5e4f42=_0x47c516;this['_state']=_0x7eab3b,this[_0x5e4f42(0x302)][_0x5e4f42(0x485)](_0x7eab3b);}async[_0x47c516(0x2c7)](){const _0x54e190=_0x47c516;if(this[_0x54e190(0x297)](await this[_0x54e190(0x48c)]()),this[_0x54e190(0x51f)]){var _0x162043;(_0x162043=this['_singleActiveUnitService'])==null||_0x162043['editingUnit'](this[_0x54e190(0x4e9)]),this['disposeWithMe'](this['_singleActiveUnitService'][_0x54e190(0x43c)](this[_0x54e190(0x4e9)])[_0x54e190(0x51a)](_0xffa5b1=>{const _0xe9a271=_0x54e190;this[_0xe9a271(0x266)][_0xe9a271(0x3c4)]('[CollaborationEntity]',_0xe9a271(0x417),_0xffa5b1),_0xffa5b1===0x1?(this[_0xe9a271(0x458)]['emitEvent']({'id':_0xe9a271(0x451)}),this[_0xe9a271(0x539)][_0xe9a271(0x3be)](new r['WorkbookEditablePermission'](this[_0xe9a271(0x4e9)])['id'],!0x1),this[_0xe9a271(0x539)][_0xe9a271(0x34a)](!0x1)):(this[_0xe9a271(0x539)][_0xe9a271(0x3be)](new r[(_0xe9a271(0x50f))](this[_0xe9a271(0x4e9)])['id'],!0x0),this['_permissionService'][_0xe9a271(0x34a)](!0x0));}));}let _0x2ee624=!0x1;return this[_0x54e190(0x4dc)](this['session'][_0x54e190(0x455)]['subscribe'](_0x518069=>{const _0x56d6a9=_0x54e190;_0x518069===0x3?this[_0x56d6a9(0x2a1)](_0x2ee624):_0x518069===0x2&&(_0x2ee624=!0x0,this[_0x56d6a9(0x31c)]());})),this[_0x54e190(0x4dc)](this['session'][_0x54e190(0x502)][_0x54e190(0x51a)](_0x394057=>{const _0x50d73a=_0x54e190;try{switch(_0x394057[_0x50d73a(0x393)]){case e['CollaborationEvent'][_0x50d73a(0x363)]:this[_0x50d73a(0x3a0)]((0x0,e[_0x50d73a(0x450)])(_0x394057[_0x50d73a(0x3cf)]));break;case e[_0x50d73a(0x427)]['CHANGESET_ACK']:this[_0x50d73a(0x32a)](_0x394057[_0x50d73a(0x3cf)]);break;case e[_0x50d73a(0x427)][_0x50d73a(0x361)]:this[_0x50d73a(0x372)]();break;case e[_0x50d73a(0x427)][_0x50d73a(0x2fa)]:this[_0x50d73a(0x3d8)](_0x394057[_0x50d73a(0x3cf)]);break;case e[_0x50d73a(0x427)][_0x50d73a(0x446)]:this['_onFetchMissResult'](_0x394057[_0x50d73a(0x3cf)][_0x50d73a(0x4a9)]['map'](_0x552131=>(0x0,e['parseProtocolChangeset'])(_0x552131)));break;case e[_0x50d73a(0x427)][_0x50d73a(0x383)]:this[_0x50d73a(0x372)]({'isPermissionRej':!0x0});break;case e[_0x50d73a(0x427)]['UNISCRIPT_RUN']:}}catch(_0x4b7ea0){throw console[_0x50d73a(0x492)]('Error\x20on\x20receiving\x20event',_0x4b7ea0),_0x4b7ea0;}})),this[_0x54e190(0x356)];}[_0x47c516(0x32e)](){const _0x2beb65=_0x47c516;this[_0x2beb65(0x535)]=!0x1;}[_0x47c516(0x2e0)](){const _0x5a4366=_0x47c516;if(this[_0x5a4366(0x535)])throw Error('[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.');this[_0x5a4366(0x535)]=!0x0;}[_0x47c516(0x477)](_0x5ee127){const _0x285de4=_0x47c516;this['_lockTransition'](),this[_0x285de4(0x297)](this[_0x285de4(0x356)]['appendMutation'](_0x5ee127)),this[_0x285de4(0x32e)]();}[_0x47c516(0x3a0)](_0xdfdeb){const _0x2c50cd=_0x47c516;this['_collaborationPaused']?this[_0x2c50cd(0x527)][_0x2c50cd(0x325)](_0xdfdeb):this['_applyRemoteChangeset'](_0xdfdeb);}[_0x47c516(0x4b4)](){const _0x7bfab6=_0x47c516;this['_remoteChangesetQueue'][_0x7bfab6(0x4b1)](_0x116d77=>this['_applyRemoteChangeset'](_0x116d77)),this[_0x7bfab6(0x527)]=[];}[_0x47c516(0x3dd)](_0x59f584){const _0x41b518=_0x47c516;let _0x59dd95=this[_0x41b518(0x443)][_0x41b518(0x362)][_0x41b518(0x3e2)](this[_0x41b518(0x443)][_0x41b518(0x362)][_0x41b518(0x248)]()['COMPRESS_MUTATION_APPLY'])(_0x59f584[_0x41b518(0x223)],null)||_0x59f584[_0x41b518(0x223)],_0x59a6c8={..._0x59f584,'mutations':_0x59dd95};this[_0x41b518(0x2e0)](),this[_0x41b518(0x297)](this['_state'][_0x41b518(0x2e9)](_0x59a6c8)),this[_0x41b518(0x32e)]();}[_0x47c516(0x32a)](_0x3de175){const _0x4562ad=_0x47c516;this[_0x4562ad(0x2e0)](),this[_0x4562ad(0x297)](this[_0x4562ad(0x356)][_0x4562ad(0x2e1)](_0x3de175)),this[_0x4562ad(0x32e)]();}['_onRemoteRejected'](_0x3a35e4){const _0x2ae0ae=_0x47c516;this['_lockTransition'](),this['_updateState'](this['_state'][_0x2ae0ae(0x53b)](_0x3a35e4)),this[_0x2ae0ae(0x32e)]();}[_0x47c516(0x3d8)](_0x157d44){const _0x4f8bfe=_0x47c516;this[_0x4f8bfe(0x2e0)](),this['_updateState'](this['_state'][_0x4f8bfe(0x30c)](_0x157d44)),this['_unlockTransition']();}[_0x47c516(0x3d3)](_0x4d208e){const _0x470fba=_0x47c516;if(!(this['_state']instanceof N))throw TypeError(_0x470fba(0x2e2));let _0x55d612=_0x4d208e[_0x470fba(0x41a)](_0x3041a9=>{const _0x4db05d=_0x470fba;let _0x3fe027=this[_0x4db05d(0x443)]['interceptor'][_0x4db05d(0x3e2)](this[_0x4db05d(0x443)][_0x4db05d(0x362)][_0x4db05d(0x248)]()[_0x4db05d(0x2bb)])(_0x3041a9[_0x4db05d(0x223)],null)||_0x3041a9[_0x4db05d(0x223)];return{..._0x3041a9,'mutations':_0x3fe027};});this[_0x470fba(0x2e0)](),this['_updateState'](this['_state'][_0x470fba(0x494)](_0x55d612)),this[_0x470fba(0x32e)]();}['_toggleOffline'](){const _0x509c8b=_0x47c516;this[_0x509c8b(0x2e0)](),this['_updateState'](this[_0x509c8b(0x356)]['toggleOffline']()),this[_0x509c8b(0x32e)]();}[_0x47c516(0x2a1)](_0x823a9a=!0x1){const _0x47a8d6=_0x47c516;this[_0x47a8d6(0x2e0)](),this['_updateState'](this[_0x47a8d6(0x356)][_0x47a8d6(0x2d4)]()),this[_0x47a8d6(0x32e)]();let _0x4e2d7f=this[_0x47a8d6(0x356)];_0x823a9a&&_0x4e2d7f instanceof D&&(this[_0x47a8d6(0x2e0)](),this['_updateState'](_0x4e2d7f['fetchMiss']()),this[_0x47a8d6(0x32e)]());}async[_0x47c516(0x48c)](){return new Promise(_0x5c352c=>{const _0x5bafb5=_0x88a9;this['session'][_0x5bafb5(0x455)]['pipe']((0x0,i['take'])(0x1))[_0x5bafb5(0x51a)](async _0x54611a=>{const _0x2dd7fc=_0x5bafb5;_0x5c352c(await this[_0x2dd7fc(0x3bd)](_0x54611a===0x3));});});}[_0x47c516(0x2a0)](){const _0x40f881=_0x47c516;let _0x1b2f13=this[_0x40f881(0x4e9)];return{'onStateChange':(_0x46adad,_0x2fcda0)=>{const _0x178e52=_0x40f881;if(_0x46adad!==this[_0x178e52(0x356)])throw Error(_0x178e52(0x36b)+_0x46adad[_0x178e52(0x4f5)]+_0x178e52(0x2b0)+_0x2fcda0[_0x178e52(0x4f5)]+_0x178e52(0x4f4)+this[_0x178e52(0x356)][_0x178e52(0x4f5)]);this['_updateState'](_0x2fcda0);},'onSendChangeset':_0x27ea3d=>{const _0x5043a9=_0x40f881;_0x27ea3d[_0x5043a9(0x1f9)]||(_0x27ea3d[_0x5043a9(0x1f9)]=this['_changesetSessionId'],_0x27ea3d['reqId']=++this[_0x5043a9(0x2fd)]);let _0x5786a4={'eventID':e[_0x5043a9(0x427)][_0x5043a9(0x45e)],'data':{'unitID':_0x27ea3d[_0x5043a9(0x4e9)],'unitType':this[_0x5043a9(0x47f)],'changeset':_0x27ea3d,'memberID':this['session']['getMemberID']()}};this[_0x5043a9(0x257)][_0x5043a9(0x422)](_0x5786a4,this[_0x5043a9(0x4e9)]);},'onMissingChangesets':({from:_0x575321,to:_0x17ae77})=>{const _0x1796c3=_0x40f881;this[_0x1796c3(0x266)][_0x1796c3(0x3c4)]('[CollaborationEntity]','fetching\x20missing\x20changesets\x20from\x20'+_0x575321+_0x1796c3(0x20e)+_0x17ae77);let _0x44e70d={'eventID':e[_0x1796c3(0x427)]['FETCH_MISSING'],'data':{'unitID':_0x1b2f13,'unitType':this[_0x1796c3(0x47f)],'from':_0x575321,'to':_0x17ae77}};this[_0x1796c3(0x257)]['send'](_0x44e70d,this['unitID']);}};}async[_0x47c516(0x3bd)](_0x34a839){const _0x10e133=_0x47c516;var _0x2480f3;let _0x47572c=await((_0x2480f3=this[_0x10e133(0x344)])==null?void 0x0:_0x2480f3[_0x10e133(0x37b)](this['unitID'])),_0x5a51ca=(_0x47572c==null?void 0x0:_0x47572c[_0x10e133(0x223)])??[],_0x2561ad=(_0x47572c==null?void 0x0:_0x47572c[_0x10e133(0x4b9)])??null,_0x375973=!!(_0x2561ad!=null&&_0x2561ad[_0x10e133(0x1f9)])&&!!(_0x2561ad!=null&&_0x2561ad[_0x10e133(0x3c2)]);this['_changesetSessionId']=_0x375973?_0x2561ad['sid']:(0x0,e[_0x10e133(0x50a)])(),this[_0x10e133(0x2fd)]=_0x375973?_0x2561ad[_0x10e133(0x3c2)]:0x0;let _0x459a69=this[_0x10e133(0x4e9)];try{this['_replayCachedMutations'](_0x2561ad,_0x5a51ca);}catch(_0x59da74){this[_0x10e133(0x266)][_0x10e133(0x492)](_0x59da74);}let _0xc4c466=this[_0x10e133(0x2a0)]();if(_0x34a839){let _0x2c74f5=Ue(this[_0x10e133(0x400)],_0x459a69,this[_0x10e133(0x47f)],_0x2561ad,_0x5a51ca,_0xc4c466);return _0x2c74f5 instanceof O?_0x2c74f5[_0x10e133(0x3ed)]():(_0x2c74f5 instanceof A||_0x2c74f5 instanceof k)&&_0x2c74f5[_0x10e133(0x42e)](),_0x2c74f5;}return this[_0x10e133(0x400)][_0x10e133(0x341)](M,_0x459a69,this[_0x10e133(0x47f)],_0x2561ad,_0x5a51ca,_0xc4c466);}[_0x47c516(0x44f)](_0x35911b,_0x244d4b){const _0x10b837=_0x47c516;var _0x44aa8c,_0x34622c;let _0x577349=this['_compressMutationService'][_0x10b837(0x362)][_0x10b837(0x3e2)](this[_0x10b837(0x443)][_0x10b837(0x362)][_0x10b837(0x248)]()[_0x10b837(0x2bb)]);(_0x44aa8c=_0x577349((_0x35911b==null?void 0x0:_0x35911b['mutations'])||[],null))==null||_0x44aa8c[_0x10b837(0x4b1)](_0x5c6688=>this[_0x10b837(0x213)][_0x10b837(0x4a6)](_0x5c6688['id'],_0x5c6688[_0x10b837(0x2b6)])),(_0x34622c=_0x577349(_0x244d4b||[],null))==null||_0x34622c[_0x10b837(0x4b1)](_0x29801c=>this[_0x10b837(0x213)][_0x10b837(0x4a6)](_0x29801c['id'],_0x29801c[_0x10b837(0x2b6)]));}};P=y([v(0x3,(0x0,t['Inject'])(t['Injector'])),v(0x4,(0x0,t[_0x47c516(0x528)])(e['CompressMutationService'])),v(0x5,(0x0,t[_0x47c516(0x528)])(t['LocaleService'])),v(0x6,(0x0,t[_0x47c516(0x528)])(e[_0x47c516(0x21f)])),v(0x7,(0x0,t[_0x47c516(0x528)])(_)),v(0x8,t['IUniverInstanceService']),v(0x9,t[_0x47c516(0x4e0)]),v(0xa,t[_0x47c516(0x212)]),v(0xb,t[_0x47c516(0x333)]),v(0xc,(0x0,t[_0x47c516(0x263)])(C)),v(0xd,(0x0,t[_0x47c516(0x263)])(x))],P);let F=class extends P{constructor(_0x5271bb,_0x5241fb,_0x13a64e,_0x17dec9,_0x55fc01,_0x3b4e7c,_0x286237,_0x6f46fa,_0x3008e0,_0x3f0c4c,_0x449c3a,_0x32b7b3,_0x1fc657,_0x30f4ad,_0x343a40){const _0x27ab98=_0x47c516;super(_0x5271bb,_0x13a64e,_0x5241fb,_0x17dec9,_0x55fc01,_0x3b4e7c,_0x286237,_0x6f46fa,_0x3008e0,_0x3f0c4c,_0x449c3a,_0x32b7b3,_0x30f4ad,_0x343a40),this['unitID']=_0x5271bb,this[_0x27ab98(0x1fe)]=_0x5241fb,this[_0x27ab98(0x35a)]=_0x1fc657,g(this,'_handlerCallback',null);}[_0x47c516(0x543)](_0x253b1f){const _0x528204=_0x47c516;this[_0x528204(0x452)]=_0x253b1f;}['dispose'](){const _0xf5cf53=_0x47c516;this[_0xf5cf53(0x452)]=null,super[_0xf5cf53(0x328)]();}[_0x47c516(0x2a0)](){const _0x3978c1=_0x47c516;let _0x59e15c=super[_0x3978c1(0x2a0)]();return _0x59e15c[_0x3978c1(0x3de)]=_0x7fffef=>{const _0x2a1568=_0x3978c1;var _0x4089f7,_0x5b9b7f;return(_0x4089f7=this[_0x2a1568(0x452)])==null||(_0x5b9b7f=_0x4089f7[_0x2a1568(0x3de)])==null?void 0x0:_0x5b9b7f[_0x2a1568(0x4cf)](_0x4089f7,_0x7fffef);},_0x59e15c[_0x3978c1(0x4e1)]=_0x4e55ea=>{const _0x3effd1=_0x3978c1;var _0x2ab44e,_0x511d39;return(_0x2ab44e=this[_0x3effd1(0x452)])==null||(_0x511d39=_0x2ab44e[_0x3effd1(0x4e1)])==null?void 0x0:_0x511d39['call'](_0x2ab44e,_0x4e55ea);},_0x59e15c[_0x3978c1(0x4ec)]=_0x2462ad=>{const _0x4014f7=_0x3978c1;var _0x21746f,_0x25e8f8;return((_0x21746f=this[_0x4014f7(0x452)])==null||(_0x25e8f8=_0x21746f[_0x4014f7(0x4ec)])==null?void 0x0:_0x25e8f8[_0x4014f7(0x4cf)](_0x21746f,_0x2462ad))??null;},_0x59e15c[_0x3978c1(0x3ff)]=_0x5a7f41=>{var _0x41dff2,_0x410ff8;return(_0x41dff2=this['_handlerCallback'])==null||(_0x410ff8=_0x41dff2['onTransformSelections'])==null?void 0x0:_0x410ff8['call'](_0x41dff2,_0x5a7f41);},_0x59e15c[_0x3978c1(0x490)]=_0x10d14b=>{const _0x314f47=_0x3978c1;var _0x10cd7a,_0x4ad7d8;return(_0x10cd7a=this[_0x314f47(0x452)])==null||(_0x4ad7d8=_0x10cd7a['onSyncEditingCollabCursor'])==null?void 0x0:_0x4ad7d8[_0x314f47(0x4cf)](_0x10cd7a,_0x10d14b);},_0x59e15c[_0x3978c1(0x41f)]=_0x37861b=>{const _0x4b74dc=_0x3978c1;var _0x353764,_0x487dd3;return((_0x353764=this['_handlerCallback'])==null||(_0x487dd3=_0x353764[_0x4b74dc(0x41f)])==null?void 0x0:_0x487dd3[_0x4b74dc(0x4cf)](_0x353764,_0x37861b))??_0x37861b;},_0x59e15c[_0x3978c1(0x3c3)]=_0x43c3f4=>{const _0x14501a=_0x3978c1;var _0x5dc8f5,_0x58f1f2;return((_0x5dc8f5=this['_handlerCallback'])==null||(_0x58f1f2=_0x5dc8f5[_0x14501a(0x3c3)])==null?void 0x0:_0x58f1f2[_0x14501a(0x4cf)](_0x5dc8f5,_0x43c3f4))??_0x43c3f4;},_0x59e15c;}async[_0x47c516(0x2c7)](){const _0x13ccaa=_0x47c516;let _0x2697a4=await super['_init']();return this[_0x13ccaa(0x4dc)](this['_docStateChangeManagerService'][_0x13ccaa(0x456)][_0x13ccaa(0x51a)](_0x418d97=>{const _0x595675=_0x13ccaa;if(_0x418d97==null||_0x418d97[_0x595675(0x220)]!==this[_0x595675(0x4e9)])return;let {commandId:_0x408c0b,redoState:_0x3cb623,unitId:_0x550a0c}=_0x418d97,_0x5dde7e={'id':_0x408c0b,'type':t[_0x595675(0x240)]['MUTATION'],'params':{'unitId':_0x550a0c,'actions':_0x3cb623['actions'],'textRanges':null}};this['_onLocalMutation'](_0x5dde7e);})),this[_0x13ccaa(0x4dc)](this[_0x13ccaa(0x213)]['onMutationExecutedForCollab']((_0x4ddb3e,_0x28f5ce)=>{const _0x472869=_0x13ccaa;if(_0x4ddb3e[_0x472869(0x1fe)]!==t[_0x472869(0x240)][_0x472869(0x375)]||_0x28f5ce!=null&&_0x28f5ce[_0x472869(0x367)]||_0x28f5ce!=null&&_0x28f5ce[_0x472869(0x201)]||_0x4ddb3e['id']===n[_0x472869(0x288)]['id'])return;let _0xc6a2dd=_0x4ddb3e[_0x472869(0x2b6)];if((_0xc6a2dd==null?void 0x0:_0xc6a2dd[_0x472869(0x220)])!==this[_0x472869(0x4e9)])return;let _0x46ebe1=_0x4ddb3e,_0x3d3085=this[_0x472869(0x443)][_0x472869(0x362)][_0x472869(0x3e2)](this[_0x472869(0x443)][_0x472869(0x362)]['getInterceptPoints']()[_0x472869(0x3df)])([_0x46ebe1],this[_0x472869(0x2af)])||[_0x46ebe1];this[_0x472869(0x477)](_0x3d3085[0x0]);})),_0x2697a4;}};F=y([v(0x3,(0x0,t['Inject'])(t[_0x47c516(0x416)])),v(0x4,(0x0,t['Inject'])(e[_0x47c516(0x2a6)])),v(0x5,(0x0,t[_0x47c516(0x528)])(t[_0x47c516(0x346)])),v(0x6,(0x0,t[_0x47c516(0x528)])(e['RevisionService'])),v(0x7,(0x0,t[_0x47c516(0x528)])(_)),v(0x8,t[_0x47c516(0x493)]),v(0x9,t[_0x47c516(0x4e0)]),v(0xa,t[_0x47c516(0x212)]),v(0xb,t[_0x47c516(0x333)]),v(0xc,(0x0,t[_0x47c516(0x528)])(n[_0x47c516(0x423)])),v(0xd,(0x0,t[_0x47c516(0x263)])(C)),v(0xe,(0x0,t['Optional'])(x))],F);let I=class extends P{constructor(_0x1b8e5e,_0x40863d,_0x396694,_0x308a48,_0x4da81d,_0x1673ff,_0x59d716,_0x2de02c,_0x61f743,_0x26f335,_0x5b191c,_0x4bf198,_0x33ceeb,_0x475c23){const _0x49f529=_0x47c516;super(_0x1b8e5e,_0x396694,_0x40863d,_0x308a48,_0x4da81d,_0x1673ff,_0x59d716,_0x2de02c,_0x61f743,_0x26f335,_0x5b191c,_0x4bf198,_0x33ceeb,_0x475c23),this['unitID']=_0x1b8e5e,this[_0x49f529(0x1fe)]=_0x40863d;}async[_0x47c516(0x2c7)](){const _0x44f905=_0x47c516;let _0x4e1f97=await super[_0x44f905(0x2c7)]();return this[_0x44f905(0x4dc)](this[_0x44f905(0x213)][_0x44f905(0x38b)]((_0x40f48e,_0x4a48dd)=>{const _0x59a23b=_0x44f905;if(_0x40f48e[_0x59a23b(0x1fe)]!==t[_0x59a23b(0x240)][_0x59a23b(0x375)]||_0x4a48dd!=null&&_0x4a48dd[_0x59a23b(0x367)]||_0x4a48dd!=null&&_0x4a48dd[_0x59a23b(0x201)])return;let _0x294df0=_0x40f48e[_0x59a23b(0x2b6)];if((_0x294df0==null?void 0x0:_0x294df0['unitId'])!==this[_0x59a23b(0x4e9)])return;let _0x1cbb74=_0x40f48e,_0x288bc2=this[_0x59a23b(0x443)][_0x59a23b(0x362)][_0x59a23b(0x3e2)](this[_0x59a23b(0x443)][_0x59a23b(0x362)][_0x59a23b(0x248)]()[_0x59a23b(0x3df)])([_0x1cbb74],this['_univerInstanceService'])||[_0x1cbb74];this[_0x59a23b(0x477)](_0x288bc2[0x0]);})),_0x4e1f97;}};I=y([v(0x3,(0x0,t[_0x47c516(0x528)])(t['Injector'])),v(0x4,(0x0,t['Inject'])(e['CompressMutationService'])),v(0x5,(0x0,t[_0x47c516(0x528)])(t['LocaleService'])),v(0x6,(0x0,t[_0x47c516(0x528)])(e[_0x47c516(0x21f)])),v(0x7,(0x0,t[_0x47c516(0x528)])(_)),v(0x8,t[_0x47c516(0x493)]),v(0x9,t[_0x47c516(0x4e0)]),v(0xa,t['ICommandService']),v(0xb,t[_0x47c516(0x333)]),v(0xc,(0x0,t[_0x47c516(0x263)])(C)),v(0xd,(0x0,t[_0x47c516(0x263)])(x))],I);let L=class extends P{constructor(_0x203163,_0x55c474,_0x278808,_0x33491d,_0x38ef55,_0x3acc79,_0x3d2e43,_0x58d44c,_0x1d70a7,_0x2a397a,_0x2e5d9b,_0x2154df,_0xbcaf5f,_0x59ddcc,_0x205222){const _0x4b19f=_0x47c516;super(_0x203163,_0x278808,_0x55c474,_0x33491d,_0x38ef55,_0x3acc79,_0x3d2e43,_0x1d70a7,_0x2a397a,_0x2e5d9b,_0x2154df,_0xbcaf5f,_0x59ddcc,_0x205222),this[_0x4b19f(0x4e9)]=_0x203163,this[_0x4b19f(0x1fe)]=_0x55c474,this[_0x4b19f(0x52d)]=_0x58d44c;}[_0x47c516(0x2a0)](){const _0x159619=_0x47c516;let _0x6fa60d=super[_0x159619(0x2a0)]();return _0x6fa60d[_0x159619(0x3ff)]=_0xbf5888=>this[_0x159619(0x52d)][_0x159619(0x2c3)](_0xbf5888),_0x6fa60d;}async['_init'](){const _0x3e760d=_0x47c516;let _0x22cd63=await super[_0x3e760d(0x2c7)]();return this[_0x3e760d(0x4dc)](this[_0x3e760d(0x213)]['onMutationExecutedForCollab']((_0x5bdcb6,_0x32118c)=>{const _0x43a383=_0x3e760d;if(_0x5bdcb6['type']!==t[_0x43a383(0x240)][_0x43a383(0x375)]||_0x32118c!=null&&_0x32118c[_0x43a383(0x367)]||_0x32118c!=null&&_0x32118c[_0x43a383(0x201)])return;let _0x448aa0=_0x5bdcb6[_0x43a383(0x2b6)];if((_0x448aa0==null?void 0x0:_0x448aa0[_0x43a383(0x220)])!==this[_0x43a383(0x4e9)])return;let _0x2e32c5=_0x5bdcb6,_0xc3e544=this['_compressMutationService']['interceptor']['fetchThroughInterceptors'](this[_0x43a383(0x443)][_0x43a383(0x362)][_0x43a383(0x248)]()[_0x43a383(0x3df)])([_0x2e32c5],this[_0x43a383(0x2af)])||[_0x2e32c5];this['_onLocalMutation'](_0xc3e544[0x0]);})),_0x22cd63;}};L=y([v(0x3,(0x0,t[_0x47c516(0x528)])(t[_0x47c516(0x416)])),v(0x4,(0x0,t[_0x47c516(0x528)])(e[_0x47c516(0x2a6)])),v(0x5,(0x0,t[_0x47c516(0x528)])(t['LocaleService'])),v(0x6,(0x0,t['Inject'])(e[_0x47c516(0x21f)])),v(0x7,(0x0,t[_0x47c516(0x528)])(S)),v(0x8,(0x0,t['Inject'])(_)),v(0x9,t[_0x47c516(0x493)]),v(0xa,t['ILogService']),v(0xb,t[_0x47c516(0x212)]),v(0xc,t['IPermissionService']),v(0xd,(0x0,t[_0x47c516(0x263)])(C)),v(0xe,(0x0,t[_0x47c516(0x263)])(x))],L);let R=class extends P{constructor(_0x454a03,_0x20f58f,_0x233fd,_0x20b82d,_0x3d131f,_0x291322,_0x55db48,_0x55a601,_0x303744,_0x6053a4,_0x135e15,_0x5ae066,_0x57e718,_0x322bba){const _0x574855=_0x47c516;super(_0x454a03,_0x233fd,_0x20f58f,_0x20b82d,_0x3d131f,_0x291322,_0x55db48,_0x55a601,_0x303744,_0x6053a4,_0x135e15,_0x5ae066,_0x57e718,_0x322bba),this[_0x574855(0x4e9)]=_0x454a03,this[_0x574855(0x1fe)]=_0x20f58f;}async[_0x47c516(0x2c7)](){const _0x2f9cc1=_0x47c516;let _0x1eae05=await super[_0x2f9cc1(0x2c7)]();return this[_0x2f9cc1(0x4dc)](this[_0x2f9cc1(0x213)][_0x2f9cc1(0x38b)]((_0xce2a85,_0x2b368c)=>{const _0x265a3a=_0x2f9cc1;if(_0xce2a85['type']!==t[_0x265a3a(0x240)][_0x265a3a(0x375)]||_0x2b368c!=null&&_0x2b368c[_0x265a3a(0x367)]||_0x2b368c!=null&&_0x2b368c[_0x265a3a(0x201)])return;let _0x28ec55=_0xce2a85[_0x265a3a(0x2b6)];if((_0x28ec55==null?void 0x0:_0x28ec55[_0x265a3a(0x220)])!==this['unitID'])return;let _0x5abb7a=_0xce2a85,_0x3955f8=this[_0x265a3a(0x443)][_0x265a3a(0x362)]['fetchThroughInterceptors'](this[_0x265a3a(0x443)]['interceptor'][_0x265a3a(0x248)]()[_0x265a3a(0x3df)])([_0x5abb7a],this['_univerInstanceService'])||[_0x5abb7a];this[_0x265a3a(0x477)](_0x3955f8[0x0]);})),_0x1eae05;}};R=y([v(0x3,(0x0,t[_0x47c516(0x528)])(t[_0x47c516(0x416)])),v(0x4,(0x0,t[_0x47c516(0x528)])(e[_0x47c516(0x2a6)])),v(0x5,(0x0,t[_0x47c516(0x528)])(t[_0x47c516(0x346)])),v(0x6,(0x0,t[_0x47c516(0x528)])(e[_0x47c516(0x21f)])),v(0x7,(0x0,t['Inject'])(_)),v(0x8,t[_0x47c516(0x493)]),v(0x9,t[_0x47c516(0x4e0)]),v(0xa,t[_0x47c516(0x212)]),v(0xb,t[_0x47c516(0x333)]),v(0xc,(0x0,t[_0x47c516(0x263)])(C)),v(0xd,(0x0,t[_0x47c516(0x263)])(x))],R);let z=class extends P{constructor(_0x324edc,_0xd52cf9,_0x19b824,_0x5b0e9d,_0x19302c,_0x17adea,_0x1e12d1,_0x52b902,_0x160714,_0xe72212,_0x177b64,_0x5c8aad,_0x3e0958,_0x3440c4){const _0x4cba9c=_0x47c516;super(_0x324edc,_0x19b824,_0xd52cf9,_0x5b0e9d,_0x19302c,_0x17adea,_0x1e12d1,_0x52b902,_0x160714,_0xe72212,_0x177b64,_0x5c8aad,_0x3e0958,_0x3440c4),this[_0x4cba9c(0x4e9)]=_0x324edc,this[_0x4cba9c(0x1fe)]=_0xd52cf9;}async['_init'](){const _0x24eac7=_0x47c516;let _0x408625=await super[_0x24eac7(0x2c7)]();return this[_0x24eac7(0x4dc)](this['_commandService'][_0x24eac7(0x38b)]((_0xf3cd1b,_0x3bcdeb)=>{const _0x76e673=_0x24eac7;if(_0xf3cd1b[_0x76e673(0x1fe)]!==t['CommandType'][_0x76e673(0x375)]||_0x3bcdeb!=null&&_0x3bcdeb[_0x76e673(0x367)]||_0x3bcdeb!=null&&_0x3bcdeb[_0x76e673(0x201)])return;let _0x581931=_0xf3cd1b[_0x76e673(0x2b6)];if((_0x581931==null?void 0x0:_0x581931[_0x76e673(0x220)])!==this[_0x76e673(0x4e9)])return;let _0x1db547=_0xf3cd1b,_0x2f450b=this[_0x76e673(0x443)]['interceptor'][_0x76e673(0x3e2)](this[_0x76e673(0x443)][_0x76e673(0x362)][_0x76e673(0x248)]()['COMPRESS_MUTATION_SEND'])([_0x1db547],this[_0x76e673(0x2af)])||[_0x1db547];this[_0x76e673(0x477)](_0x2f450b[0x0]);})),_0x408625;}};z=y([v(0x3,(0x0,t[_0x47c516(0x528)])(t[_0x47c516(0x416)])),v(0x4,(0x0,t[_0x47c516(0x528)])(e[_0x47c516(0x2a6)])),v(0x5,(0x0,t[_0x47c516(0x528)])(t['LocaleService'])),v(0x6,(0x0,t[_0x47c516(0x528)])(e[_0x47c516(0x21f)])),v(0x7,(0x0,t['Inject'])(_)),v(0x8,t[_0x47c516(0x493)]),v(0x9,t[_0x47c516(0x4e0)]),v(0xa,t['ICommandService']),v(0xb,t[_0x47c516(0x333)]),v(0xc,(0x0,t[_0x47c516(0x263)])(C)),v(0xd,(0x0,t['Optional'])(x))],z);let B=class extends P{constructor(_0x1c4905,_0x22e48a,_0xc0d6c6,_0x426f0c,_0x2be24f,_0x1c3372,_0x8df6c3,_0x1599a5,_0x21b196,_0x4f2852,_0x254045,_0x5489da,_0x1f8b1e,_0x2630bd){const _0xf29db3=_0x47c516;super(_0x1c4905,_0xc0d6c6,_0x22e48a,_0x426f0c,_0x2be24f,_0x1c3372,_0x8df6c3,_0x1599a5,_0x21b196,_0x4f2852,_0x254045,_0x5489da,_0x1f8b1e,_0x2630bd),this[_0xf29db3(0x4e9)]=_0x1c4905,this['type']=_0x22e48a;}async['_init'](){const _0x23477f=_0x47c516;let _0x1113a6=await super[_0x23477f(0x2c7)]();return this['disposeWithMe'](this[_0x23477f(0x213)][_0x23477f(0x38b)]((_0x16ea77,_0x40d22d)=>{const _0x45ad9c=_0x23477f;if(_0x16ea77['type']!==t[_0x45ad9c(0x240)][_0x45ad9c(0x375)]||_0x40d22d!=null&&_0x40d22d['fromCollab']||_0x40d22d!=null&&_0x40d22d[_0x45ad9c(0x201)])return;let _0x51a468=_0x16ea77['params'];if((_0x51a468==null?void 0x0:_0x51a468[_0x45ad9c(0x220)])!==this[_0x45ad9c(0x4e9)])return;let _0xce5eaf=_0x16ea77,_0x2fd7ad=this['_compressMutationService'][_0x45ad9c(0x362)][_0x45ad9c(0x3e2)](this[_0x45ad9c(0x443)]['interceptor'][_0x45ad9c(0x248)]()[_0x45ad9c(0x3df)])([_0xce5eaf],this[_0x45ad9c(0x2af)])||[_0xce5eaf];this[_0x45ad9c(0x477)](_0x2fd7ad[0x0]);})),_0x1113a6;}};B=y([v(0x3,(0x0,t[_0x47c516(0x528)])(t[_0x47c516(0x416)])),v(0x4,(0x0,t[_0x47c516(0x528)])(e[_0x47c516(0x2a6)])),v(0x5,(0x0,t[_0x47c516(0x528)])(t[_0x47c516(0x346)])),v(0x6,(0x0,t[_0x47c516(0x528)])(e[_0x47c516(0x21f)])),v(0x7,(0x0,t[_0x47c516(0x528)])(_)),v(0x8,t[_0x47c516(0x493)]),v(0x9,t[_0x47c516(0x4e0)]),v(0xa,t[_0x47c516(0x212)]),v(0xb,t['IPermissionService']),v(0xc,(0x0,t['Optional'])(C)),v(0xd,(0x0,t[_0x47c516(0x263)])(x))],B);const We=(0x0,t[_0x47c516(0x4a4)])('univer-pro.collaboration-client.network-condition.service');function Ge(_0x2cc5de){const _0x49cc5c=_0x47c516;let _0xcfe1a4=_0x2cc5de[_0x49cc5c(0x3cf)],_0x96d731=JSON[_0x49cc5c(0x335)](_0xcfe1a4);switch(_0x96d731[_0x49cc5c(0x3ab)]){case a[_0x49cc5c(0x513)][_0x49cc5c(0x2f3)]:case a['CombCmd'][_0x49cc5c(0x445)]:{let _0x31a3ef=_0x96d731[_0x49cc5c(0x3a1)];return{..._0x96d731,'data':_0x31a3ef,'cmd':_0x96d731[_0x49cc5c(0x3ab)]};}case a[_0x49cc5c(0x513)][_0x49cc5c(0x342)]:{let _0x12985b=_0x96d731[_0x49cc5c(0x286)];return{..._0x96d731,'data':_0x12985b,'cmd':_0x96d731[_0x49cc5c(0x3ab)]};}case a[_0x49cc5c(0x513)][_0x49cc5c(0x2dc)]:{let _0x4747fc=_0x96d731[_0x49cc5c(0x4ef)];switch(_0x4747fc[_0x49cc5c(0x393)]){case e['CollaborationEvent']['PERMISSION_REJ']:var _0x285917;return{..._0x96d731,'data':{..._0x4747fc,'data':(_0x285917=_0x4747fc['permissionRejEvent'])==null?void 0x0:_0x285917['cs']},'cmd':_0x96d731[_0x49cc5c(0x3ab)]};case e['CollaborationEvent'][_0x49cc5c(0x30b)]:var _0x2a8055;return{..._0x96d731,'data':{..._0x4747fc,'data':(_0x2a8055=_0x4747fc[_0x49cc5c(0x285)])==null?void 0x0:_0x2a8055['cs']},'cmd':_0x96d731[_0x49cc5c(0x3ab)]};case e['CollaborationEvent']['NEW_CHANGESETS']:var _0x5192e5;return{..._0x96d731,'data':{..._0x4747fc,'data':(_0x5192e5=_0x4747fc[_0x49cc5c(0x2f9)])==null?void 0x0:_0x5192e5['cs']},'cmd':_0x96d731[_0x49cc5c(0x3ab)]};case e['CollaborationEvent']['CHANGESET_REJ']:var _0x42aa68;return{..._0x96d731,'data':{..._0x4747fc,'data':(_0x42aa68=_0x4747fc[_0x49cc5c(0x378)])==null?void 0x0:_0x42aa68['cs']},'cmd':_0x96d731[_0x49cc5c(0x3ab)]};case e[_0x49cc5c(0x427)][_0x49cc5c(0x2fa)]:var _0x419955;return{..._0x96d731,'data':{..._0x4747fc,'data':(_0x419955=_0x4747fc['csShouldRetryEvent'])==null?void 0x0:_0x419955['cs']},'cmd':_0x96d731[_0x49cc5c(0x3ab)]};case e[_0x49cc5c(0x427)][_0x49cc5c(0x391)]:return{..._0x96d731,'data':{..._0x4747fc,'data':_0x4747fc[_0x49cc5c(0x1f7)]},'cmd':_0x96d731['cmd']};case e['CollaborationEvent']['USERS_ENTER']:return{..._0x96d731,'data':{..._0x4747fc,'data':_0x4747fc[_0x49cc5c(0x3c5)]},'cmd':_0x96d731[_0x49cc5c(0x3ab)]};case e['CollaborationEvent'][_0x49cc5c(0x235)]:return{..._0x96d731,'data':{..._0x4747fc,'data':_0x4747fc[_0x49cc5c(0x3cd)]},'cmd':_0x96d731[_0x49cc5c(0x3ab)]};case e[_0x49cc5c(0x427)][_0x49cc5c(0x354)]:return{..._0x96d731,'data':{..._0x4747fc,'data':_0x4747fc[_0x49cc5c(0x22e)]},'cmd':_0x96d731[_0x49cc5c(0x3ab)]};case e[_0x49cc5c(0x427)][_0x49cc5c(0x4ea)]:case e[_0x49cc5c(0x427)]['LIVESHARE_OPERATION']:return{..._0x96d731,'data':{..._0x4747fc,'data':_0x4747fc[_0x49cc5c(0x272)]},'cmd':_0x96d731[_0x49cc5c(0x3ab)]};case e[_0x49cc5c(0x427)][_0x49cc5c(0x38a)]:return{..._0x96d731,'data':{..._0x4747fc,'data':_0x4747fc[_0x49cc5c(0x22e)]},'cmd':_0x96d731[_0x49cc5c(0x3ab)]};case e[_0x49cc5c(0x427)]['MSG_FOR_ERROR']:return{..._0x96d731,'data':_0x4747fc,'cmd':_0x96d731[_0x49cc5c(0x3ab)]};case e[_0x49cc5c(0x427)][_0x49cc5c(0x507)]:return{..._0x96d731,'data':{..._0x4747fc,'data':_0x4747fc['commentUpdateEvent']},'cmd':_0x96d731[_0x49cc5c(0x3ab)]};case e['CollaborationEvent']['UPDATE_PERMISSION_OBJ']:return{..._0x96d731,'data':{..._0x4747fc,'data':_0x4747fc[_0x49cc5c(0x459)]},'cmd':_0x96d731[_0x49cc5c(0x3ab)]};case e['CollaborationEvent']['SHOULD_CLOSE_CONN']:return{..._0x96d731,'data':{..._0x4747fc,'data':_0x4747fc[_0x49cc5c(0x351)]},'cmd':_0x96d731['cmd']};case e[_0x49cc5c(0x427)][_0x49cc5c(0x3b9)]:return{..._0x96d731,'data':{..._0x4747fc,'data':_0x4747fc[_0x49cc5c(0x34d)]},'cmd':_0x96d731[_0x49cc5c(0x3ab)]};default:return _0x96d731;}}default:return _0x96d731;}}function Ke(_0x3d13b8){const _0xae62ff=_0x47c516;switch(_0x3d13b8[_0xae62ff(0x3ab)]){case a[_0xae62ff(0x513)][_0xae62ff(0x2f3)]:case a[_0xae62ff(0x513)][_0xae62ff(0x445)]:return JSON[_0xae62ff(0x307)]({'cmd':_0x3d13b8[_0xae62ff(0x3ab)],'routeKey':_0x3d13b8[_0xae62ff(0x46d)]});case a[_0xae62ff(0x513)]['INGEST']:{let _0x14397c;switch(_0x3d13b8[_0xae62ff(0x3cf)]['eventID']){case e[_0xae62ff(0x427)][_0xae62ff(0x391)]:_0x14397c={'eventID':e['CollaborationEvent'][_0xae62ff(0x391)],'updateCursorEvent':_0x3d13b8[_0xae62ff(0x3cf)][_0xae62ff(0x3cf)]};break;case e['CollaborationEvent'][_0xae62ff(0x235)]:_0x14397c={'eventID':e[_0xae62ff(0x427)][_0xae62ff(0x235)],'leaveEvent':_0x3d13b8['data'][_0xae62ff(0x3cf)]};break;case e['CollaborationEvent']['USERS_ENTER']:_0x14397c={'eventID':e[_0xae62ff(0x427)][_0xae62ff(0x3fe)],'joinEvent':_0x3d13b8[_0xae62ff(0x3cf)]['data']};break;case e[_0xae62ff(0x427)]['LIVESHARE_NEW_HOST']:_0x14397c={'eventID':e['CollaborationEvent']['LIVESHARE_NEW_HOST'],'liveShareNewHost':_0x3d13b8[_0xae62ff(0x3cf)][_0xae62ff(0x3cf)]};break;case e[_0xae62ff(0x427)]['LIVESHARE_OPERATION']:_0x14397c={'eventID':e[_0xae62ff(0x427)][_0xae62ff(0x4a1)],'liveShareOperation':_0x3d13b8['data']['data']};break;case e[_0xae62ff(0x427)][_0xae62ff(0x38a)]:_0x14397c={'eventID':e[_0xae62ff(0x427)][_0xae62ff(0x38a)],'liveShareTerminate':_0x3d13b8[_0xae62ff(0x3cf)][_0xae62ff(0x3cf)]};break;case e[_0xae62ff(0x427)][_0xae62ff(0x522)]:_0x14397c={'eventID':e[_0xae62ff(0x427)][_0xae62ff(0x522)],'liveShareRequestHost':_0x3d13b8[_0xae62ff(0x3cf)]['data']};break;case e[_0xae62ff(0x427)][_0xae62ff(0x4ea)]:_0x14397c={'eventID':e[_0xae62ff(0x427)][_0xae62ff(0x4ea)]};break;default:_0x14397c={'eventID':_0x3d13b8[_0xae62ff(0x3cf)][_0xae62ff(0x393)]};}return JSON[_0xae62ff(0x307)]({'cmd':_0x3d13b8[_0xae62ff(0x3ab)],'routeKey':_0x3d13b8[_0xae62ff(0x46d)],'collaMsg':_0x14397c});}case a['CombCmd'][_0xae62ff(0x342)]:return JSON[_0xae62ff(0x307)]({'cmd':_0x3d13b8['cmd'],'routeKey':_0x3d13b8[_0xae62ff(0x46d)],'joinReq':_0x3d13b8[_0xae62ff(0x3cf)]});case a['CombCmd'][_0xae62ff(0x269)]:return JSON[_0xae62ff(0x307)]({'cmd':_0x3d13b8[_0xae62ff(0x3ab)],'routeKey':_0x3d13b8['routeKey'],'leaveReq':_0x3d13b8[_0xae62ff(0x3cf)]});default:throw Error('[serializeCombRequest]:\x20should\x20not\x20fall\x20into\x20default\x20branch!');}}const qe=(0x0,t['createIdentifier'])(_0x47c516(0x39f));function Je(_0x5df600,_0x4306ad,_0x519a1c){const _0x4a0e3d=_0x47c516;return _0x5df600+'/'+_0x4306ad+_0x4a0e3d(0x2b1)+_0x519a1c+'/new_changes';}let Ye=class extends t['Disposable']{constructor(_0x29b781,_0x3495df,_0x1f3426,_0x34d7c9,_0x51253c){const _0x3c3c79=_0x47c516;super(),this['_injector']=_0x29b781,this['_httpService']=_0x3495df,this[_0x3c3c79(0x469)]=_0x1f3426,this['_logService']=_0x34d7c9,this[_0x3c3c79(0x1ff)]=_0x51253c;}[_0x47c516(0x349)](_0x181233){const _0x3173a9=_0x47c516;let _0x2d5824=this[_0x3173a9(0x400)][_0x3173a9(0x1fa)](l['ISocketService']);if(!_0x2d5824)throw Error(_0x3173a9(0x4b3));let _0x1b88b6=_0x2d5824[_0x3173a9(0x501)](_0x181233);if(!_0x1b88b6)throw Error(_0x3173a9(0x25b));let _0x2b6dc4=new t[(_0x3173a9(0x37e))](),_0x24c814=new i[(_0x3173a9(0x369))]();_0x2b6dc4[_0x3173a9(0x22f)](_0x1b88b6[_0x3173a9(0x2c4)]['subscribe'](_0x54b94b=>_0x24c814[_0x3173a9(0x485)](_0x54b94b))),_0x2b6dc4[_0x3173a9(0x22f)]((0x0,t['toDisposable'])(()=>_0x24c814[_0x3173a9(0x2ce)]()));let _0x2eb531=new i['Subject']();_0x2b6dc4[_0x3173a9(0x22f)](_0x1b88b6['error$'][_0x3173a9(0x51a)](_0x2814c1=>_0x2eb531['next'](_0x2814c1))),_0x2b6dc4[_0x3173a9(0x22f)]((0x0,t[_0x3173a9(0x3b4)])(()=>_0x2eb531['complete']()));let _0x1fdb29=new i[(_0x3173a9(0x369))]();_0x2b6dc4[_0x3173a9(0x22f)](_0x1b88b6[_0x3173a9(0x279)]['subscribe'](_0xe5926=>{let _0xcf19bc=Ge(_0xe5926);_0x1fdb29['next'](_0xcf19bc);})),_0x2b6dc4[_0x3173a9(0x22f)]((0x0,t[_0x3173a9(0x3b4)])(()=>_0x1fdb29[_0x3173a9(0x2ce)]()));let _0x3c4e1a,_0x18779a=()=>{const _0x43b9b4=_0x3173a9;_0x2eb531[_0x43b9b4(0x485)](new Event('connection\x20error')),_0x24c814[_0x43b9b4(0x485)](new Event('connection\x20error')),_0x3c4e1a[_0x43b9b4(0x37d)]();};return _0x3c4e1a={'memberID':'','close$':_0x24c814[_0x3173a9(0x404)](),'error$':_0x2eb531['asObservable'](),'open$':_0x1b88b6[_0x3173a9(0x3ca)],'message$':_0x1fdb29[_0x3173a9(0x404)](),'send':_0x4f420d=>{const _0x1468f2=_0x3173a9;if(_0x4f420d[_0x1468f2(0x3ab)]===a['CombCmd'][_0x1468f2(0x467)]){if(_0x4f420d['data'][_0x1468f2(0x393)]===e[_0x1468f2(0x427)][_0x1468f2(0x45e)]){this[_0x1468f2(0x509)](_0x3c4e1a,_0x4f420d[_0x1468f2(0x3cf)])[_0x1468f2(0x3dc)](_0x2484c7=>{const _0x459963=_0x1468f2;this[_0x459963(0x266)]['error'](_0x2484c7),_0x18779a();});return;}if(_0x4f420d[_0x1468f2(0x3cf)]['eventID']===e[_0x1468f2(0x427)]['FETCH_MISSING']){let _0x195197=_0x4f420d['data'];this[_0x1468f2(0x41d)](_0x195197)[_0x1468f2(0x20d)](_0x55279f=>{const _0x5d9dc1=_0x1468f2;_0x1fdb29[_0x5d9dc1(0x485)]({'cmd':a[_0x5d9dc1(0x513)]['RECV'],'code':a['CmdRspCode']['OK'],'routeKey':_0x195197[_0x5d9dc1(0x3cf)]['unitID'],'routeType':'','data':{'eventID':e[_0x5d9dc1(0x427)][_0x5d9dc1(0x446)],'data':{'changesets':_0x55279f}}});})[_0x1468f2(0x3dc)](_0x19d9e8=>{const _0x171c5d=_0x1468f2;this['_logService'][_0x171c5d(0x492)](_0x19d9e8),_0x18779a();});return;}}_0x1b88b6['send'](Ke(_0x4f420d));},'close':()=>{const _0x30d754=_0x3173a9;_0x1b88b6[_0x30d754(0x37d)](),_0x2b6dc4[_0x30d754(0x328)]();}},_0x3c4e1a;}async[_0x47c516(0x509)](_0x33b6e4,_0x377c95){const _0xa4fac2=_0x47c516;let {unitType:_0x347af0,unitID:_0x2769e6,changeset:_0x2eb819}=_0x377c95[_0xa4fac2(0x3cf)],_0x1ef198={'unitID':_0x2769e6,'memberID':_0x33b6e4[_0xa4fac2(0x46e)],'type':_0x347af0,'changeset':(0x0,e['parseChangesetToProtocol'])(_0x2eb819)},_0x32a64f=this['_configService']['getConfig'](m),_0x117d33=Je((_0x32a64f==null?void 0x0:_0x32a64f[_0xa4fac2(0x3c6)])??'/universer-api/comb',_0x347af0,_0x2769e6);try{await this[_0xa4fac2(0x503)][_0xa4fac2(0x29f)](_0x117d33,{'body':_0x1ef198});}catch(_0x17d144){throw this[_0xa4fac2(0x266)][_0xa4fac2(0x492)](_0xa4fac2(0x239),'submit\x20changeset\x20error!'),_0x17d144;}}async[_0x47c516(0x41d)](_0x362ee3){const _0x28cab4=_0x47c516;let {unitID:_0x57f476,from:_0x4479df,to:_0x59fd7d,unitType:_0x5ed9bb}=_0x362ee3[_0x28cab4(0x3cf)];return(await this[_0x28cab4(0x1ff)][_0x28cab4(0x330)]({'metadata':void 0x0},{'unitID':_0x57f476,'type':_0x5ed9bb,'from':_0x4479df,'to':_0x59fd7d}))['changesets'][_0x28cab4(0x41a)](_0x23bc7d=>((_0x23bc7d[_0x28cab4(0x223)]===null||_0x23bc7d[_0x28cab4(0x223)]===void 0x0)&&(_0x23bc7d['mutations']=[]),_0x23bc7d));}};Ye=y([v(0x0,(0x0,t[_0x47c516(0x528)])(t[_0x47c516(0x416)])),v(0x1,(0x0,t['Inject'])(l[_0x47c516(0x45b)])),v(0x2,t[_0x47c516(0x2ae)]),v(0x3,t[_0x47c516(0x4e0)]),v(0x4,e['ISnapshotServerService'])],Ye);const Xe=(0x0,t[_0x47c516(0x4a4)])('univer-pro.collaboration-client-adapter-service');function Ze(_0x2ccc1a={}){const _0x47b8d5=_0x47c516;return _0x2ccc1a['resolveUnit']?{'resolveUnit':_0x2ccc1a[_0x47b8d5(0x3f2)]}:{'resolveUnit':_0x3e5a43=>({'target':{'unitId':_0x3e5a43[_0x47b8d5(0x220)],'unitType':_0x3e5a43[_0x47b8d5(0x4aa)]}})};}function Qe(_0x57b33a,_0x18fbac,_0x22a09f){const _0x53f5c7=_0x47c516;let _0x1057d9=_0x22a09f[_0x53f5c7(0x2cf)][_0x53f5c7(0x4b8)];if(_0x1057d9!=null&&_0x1057d9['trim']()==='')throw Error(_0x53f5c7(0x305));if(!_0x22a09f[_0x53f5c7(0x2cf)][_0x53f5c7(0x220)])throw Error(_0x53f5c7(0x2ba));return{'localUnitId':_0x57b33a,'unitType':_0x18fbac,'target':{'endpoint':_0x1057d9,'unitId':_0x22a09f[_0x53f5c7(0x2cf)]['unitId'],'unitType':_0x22a09f[_0x53f5c7(0x2cf)][_0x53f5c7(0x4aa)]??_0x18fbac},'changeset':_0x22a09f[_0x53f5c7(0x28a)]};}let V=class extends t[_0x47c516(0x542)]{constructor(_0x1331bf,_0x4f4244,_0x41a1d4,_0x916a98,_0x525495,_0x3a5c28){const _0x573c05=_0x47c516;super(),this[_0x573c05(0x400)]=_0x1331bf,this[_0x573c05(0x266)]=_0x4f4244,this[_0x573c05(0x469)]=_0x41a1d4,this[_0x573c05(0x321)]=_0x916a98,this['_collaborationUIEventService']=_0x525495,this['_adapter']=_0x3a5c28,g(this,_0x573c05(0x381),new Map()),g(this,_0x573c05(0x44a),new Map()),g(this,_0x573c05(0x23f),new Map()),g(this,_0x573c05(0x4cc),new Map()),g(this,_0x573c05(0x524),void 0x0),g(this,_0x573c05(0x51b),this[_0x573c05(0x3b2)](void 0x0)[_0x573c05(0x51b)][_0x573c05(0x404)]()),g(this,_0x573c05(0x49a),new i[(_0x573c05(0x2f4))](0x0)),g(this,_0x573c05(0x387),this['_status$'][_0x573c05(0x404)]());}[_0x47c516(0x4c3)](){const _0x417c99=_0x47c516;this['_networkConditionService']||(this[_0x417c99(0x524)]=this[_0x417c99(0x400)]['get'](We,t[_0x417c99(0x2c9)][_0x417c99(0x442)])??void 0x0,this['_networkConditionService']&&this[_0x417c99(0x4dc)](this[_0x417c99(0x524)][_0x417c99(0x35d)]['subscribe'](_0x1e7c04=>{const _0x5769ce=_0x417c99;_0x1e7c04&&this[_0x5769ce(0x389)](),_0x1e7c04||this['_socketChannels'][_0x5769ce(0x4b1)](_0x4db9d6=>this['_onOffline'](_0x4db9d6));})));}['dispose'](){const _0x7e871b=_0x47c516;super[_0x7e871b(0x328)](),this[_0x7e871b(0x4cc)][_0x7e871b(0x4b1)](_0x30b03d=>{const _0x3df5f9=_0x7e871b;var _0x5ea9df,_0xa31039,_0x203cf8;(_0x5ea9df=_0x30b03d[_0x3df5f9(0x472)])==null||_0x5ea9df[_0x3df5f9(0x44d)](),_0x30b03d[_0x3df5f9(0x472)]=null,this[_0x3df5f9(0x3f7)](_0x30b03d),this[_0x3df5f9(0x3af)](_0x30b03d),this[_0x3df5f9(0x515)](_0x30b03d),this[_0x3df5f9(0x488)](_0x30b03d),(_0xa31039=_0x30b03d[_0x3df5f9(0x51b)][_0x3df5f9(0x28b)]())==null||_0xa31039[_0x3df5f9(0x37d)](),(_0x203cf8=_0x30b03d['candidateSocket'])==null||_0x203cf8[_0x3df5f9(0x37d)](),_0x30b03d[_0x3df5f9(0x51b)][_0x3df5f9(0x2ce)]();}),this['_socketChannels']['clear'](),this[_0x7e871b(0x381)][_0x7e871b(0x4b1)](_0x34ed06=>_0x34ed06[_0x7e871b(0x328)]()),this[_0x7e871b(0x381)][_0x7e871b(0x4c9)](),this[_0x7e871b(0x23f)][_0x7e871b(0x4c9)](),this[_0x7e871b(0x49a)][_0x7e871b(0x2ce)]();}async[_0x47c516(0x38c)](_0x56223a,_0x343079){const _0x345d26=_0x47c516;if(this[_0x345d26(0x4c3)](),this[_0x345d26(0x381)][_0x345d26(0x51d)](_0x56223a))return this['_sessions']['get'](_0x56223a);let _0xef0fa=this[_0x345d26(0x44a)][_0x345d26(0x1fa)](_0x56223a);if(_0xef0fa)return _0xef0fa;let _0x349573=this['_createSession'](_0x56223a,_0x343079);this['_pendingSessions'][_0x345d26(0x2f5)](_0x56223a,_0x349573);try{return await _0x349573;}finally{this[_0x345d26(0x44a)][_0x345d26(0x512)](_0x56223a);}}async['_createSession'](_0x5864f5,_0x20cf87){const _0x448b62=_0x47c516;let _0x437296=await this[_0x448b62(0x3ba)](_0x5864f5,_0x20cf87),_0x1cb261=this[_0x448b62(0x3b2)](_0x437296[_0x448b62(0x2cf)][_0x448b62(0x4b8)]);this['_tryEnsureSocket'](_0x1cb261);let _0x1b52fb=this[_0x448b62(0x400)][_0x448b62(0x341)](ve,_0x437296,_0x1cb261[_0x448b62(0x51b)][_0x448b62(0x404)]());return this[_0x448b62(0x381)][_0x448b62(0x2f5)](_0x5864f5,_0x1b52fb),this['_sessionChannels'][_0x448b62(0x2f5)](_0x5864f5,_0x1cb261[_0x448b62(0x3e1)]),_0x1b52fb;}[_0x47c516(0x4ae)](_0x399873){const _0x2d4044=_0x47c516;let _0x370cca=this[_0x2d4044(0x381)][_0x2d4044(0x1fa)](_0x399873),_0x272921=this['_sessionChannels'][_0x2d4044(0x1fa)](_0x399873);if(_0x370cca&&(this[_0x2d4044(0x381)][_0x2d4044(0x512)](_0x399873),this['_sessionChannels'][_0x2d4044(0x512)](_0x399873),_0x370cca[_0x2d4044(0x37d)]()),_0x272921!==void 0x0&&!this[_0x2d4044(0x24f)](_0x272921)){let _0x59a305=this[_0x2d4044(0x4cc)][_0x2d4044(0x1fa)](_0x272921);_0x59a305&&this[_0x2d4044(0x412)](_0x59a305);}}[_0x47c516(0x389)](){const _0x224e31=_0x47c516;(this[_0x224e31(0x4cc)][_0x224e31(0x2d9)]?[...this[_0x224e31(0x4cc)][_0x224e31(0x283)]()]:[this[_0x224e31(0x3b2)](void 0x0)])[_0x224e31(0x4b1)](_0x245a43=>{const _0x298799=_0x224e31;!this[_0x298799(0x24f)](_0x245a43[_0x298799(0x3e1)])||_0x245a43[_0x298799(0x42b)]||_0x245a43[_0x298799(0x2a8)]||_0x245a43[_0x298799(0x249)]||(_0x245a43[_0x298799(0x221)]=0x0,this[_0x298799(0x3af)](_0x245a43),this['_tryReconnect'](_0x245a43));});}['_clearRetryConnectingTimer'](_0xe39d0b){const _0x5f3003=_0x47c516;_0xe39d0b['retryConnectingTimer']!=null&&(clearTimeout(_0xe39d0b[_0x5f3003(0x2eb)]),_0xe39d0b[_0x5f3003(0x2eb)]=null);}[_0x47c516(0x531)](_0x12a89f){const _0x198a48=_0x47c516;let _0x1a87cd=this[_0x198a48(0x469)][_0x198a48(0x33e)](m),_0x56e4c3=_0x12a89f[_0x198a48(0x4b8)]??(_0x1a87cd==null?void 0x0:_0x1a87cd[_0x198a48(0x544)])??_0x198a48(0x215);return this['_socketService']['createSocket'](_0x56e4c3);}async[_0x47c516(0x3ea)](_0x363bf1){const _0x5ebb3a=_0x47c516;var _0x371171;if(this['_disposed']||((_0x371171=this[_0x5ebb3a(0x524)])==null?void 0x0:_0x371171['online'])===!0x1||_0x363bf1[_0x5ebb3a(0x42b)]||_0x363bf1['candidateSocket']||_0x363bf1['connectionAttempt'])return;let _0x87e9b7={};_0x363bf1[_0x5ebb3a(0x249)]=_0x87e9b7;try{let _0x41f58f=await this[_0x5ebb3a(0x531)](_0x363bf1);if(this[_0x5ebb3a(0x440)]||_0x363bf1[_0x5ebb3a(0x249)]!==_0x87e9b7){_0x41f58f==null||_0x41f58f['close']();return;}if(_0x41f58f){var _0x187cdc;_0x363bf1[_0x5ebb3a(0x2a8)]=_0x41f58f,_0x363bf1['handshakeTimer']=setTimeout(()=>{const _0x562f19=_0x5ebb3a;!this['_disposed']&&_0x363bf1[_0x562f19(0x2a8)]===_0x41f58f&&this[_0x562f19(0x2f8)](_0x363bf1);},0x4e20);let _0x3b4873=_0x41f58f[_0x5ebb3a(0x422)];_0x41f58f['send']=_0x1c2dc4=>(_0x1c2dc4[_0x5ebb3a(0x3ab)]!==a['CombCmd'][_0x5ebb3a(0x269)]&&_0x363bf1[_0x5ebb3a(0x42b)]&&_0x363bf1[_0x5ebb3a(0x51b)][_0x5ebb3a(0x28b)]()===_0x41f58f&&this[_0x5ebb3a(0x3ec)](_0x363bf1),_0x3b4873['apply'](_0x41f58f,[_0x1c2dc4])),(_0x187cdc=_0x363bf1['socketSubscription'])==null||_0x187cdc['unsubscribe']();let _0x5a5f3a=new i['Subscription']();_0x363bf1[_0x5ebb3a(0x472)]=_0x5a5f3a,_0x5a5f3a['add'](_0x41f58f[_0x5ebb3a(0x279)][_0x5ebb3a(0x51a)](_0x3b3862=>this['_onMessage'](_0x363bf1,_0x41f58f,_0x3b3862))),_0x5a5f3a[_0x5ebb3a(0x22f)](_0x41f58f[_0x5ebb3a(0x464)][_0x5ebb3a(0x3e8)]((0x0,s[_0x5ebb3a(0x4e8)])(0x1))[_0x5ebb3a(0x51a)](_0xa7767d=>this[_0x5ebb3a(0x266)]['error'](_0x5ebb3a(0x329),_0xa7767d))),_0x5a5f3a[_0x5ebb3a(0x22f)](_0x41f58f[_0x5ebb3a(0x3ca)]['pipe']((0x0,s['take'])(0x1))[_0x5ebb3a(0x51a)](()=>{const _0x16a729=_0x5ebb3a;this[_0x16a729(0x318)](_0x363bf1,_0x41f58f);})),_0x5a5f3a[_0x5ebb3a(0x22f)](_0x41f58f[_0x5ebb3a(0x2c4)]['pipe']((0x0,s[_0x5ebb3a(0x4e8)])(0x1))[_0x5ebb3a(0x51a)](_0xaca9f6=>{const _0x1b616c=_0x5ebb3a;(_0x363bf1['candidateSocket']===_0x41f58f||_0x363bf1[_0x1b616c(0x51b)][_0x1b616c(0x28b)]()===_0x41f58f)&&(this['_logService']['debug'](_0x1b616c(0x49f),'socket\x20close',_0xaca9f6),this[_0x1b616c(0x2f8)](_0x363bf1));}));}}catch(_0xe1446){if(_0x363bf1['connectionAttempt']!==_0x87e9b7)return;this[_0x5ebb3a(0x266)][_0x5ebb3a(0x492)](_0xe1446),this[_0x5ebb3a(0x2f8)](_0x363bf1);}finally{_0x363bf1[_0x5ebb3a(0x249)]===_0x87e9b7&&(_0x363bf1['connectionAttempt']=null);}}['_onConnectionOpen'](_0x20424b,_0x4687df){const _0x37faa3=_0x47c516;this[_0x37faa3(0x440)]||_0x20424b[_0x37faa3(0x2a8)]!==_0x4687df||(this[_0x37faa3(0x266)][_0x37faa3(0x3c4)](_0x37faa3(0x49f),'socket\x20open.'),_0x4687df[_0x37faa3(0x422)]({'cmd':a[_0x37faa3(0x513)]['HELLO']}));}['_onOffline'](_0x44ba15){const _0x27fdd2=_0x47c516;var _0x54b633;let _0x375c03=_0x44ba15[_0x27fdd2(0x51b)][_0x27fdd2(0x28b)]()??_0x44ba15[_0x27fdd2(0x2a8)];_0x44ba15[_0x27fdd2(0x249)]=null,_0x44ba15['socketReady']=!0x1,_0x44ba15[_0x27fdd2(0x2a8)]=null,(_0x54b633=_0x44ba15[_0x27fdd2(0x472)])==null||_0x54b633[_0x27fdd2(0x44d)](),_0x44ba15['socketSubscription']=null,this[_0x27fdd2(0x49a)][_0x27fdd2(0x485)](0x2),_0x44ba15[_0x27fdd2(0x51b)]['next'](null),this[_0x27fdd2(0x3af)](_0x44ba15),this[_0x27fdd2(0x3f7)](_0x44ba15),this['_clearTimeoutTimer'](_0x44ba15),this[_0x27fdd2(0x488)](_0x44ba15),_0x375c03==null||_0x375c03[_0x27fdd2(0x37d)]();}[_0x47c516(0x2f8)](_0x1b5198){const _0x17ace0=_0x47c516;var _0x590c0f;this['_onOffline'](_0x1b5198),!this[_0x17ace0(0x440)]&&((_0x590c0f=this[_0x17ace0(0x524)])==null?void 0x0:_0x590c0f[_0x17ace0(0x1f2)])!==!0x1&&this[_0x17ace0(0x24f)](_0x1b5198[_0x17ace0(0x3e1)])&&(_0x1b5198['retryCount']<(this['_configService'][_0x17ace0(0x33e)](_0x17ace0(0x31e))??0x3)?(this[_0x17ace0(0x396)][_0x17ace0(0x315)]({'id':_0x17ace0(0x3fb)}),this[_0x17ace0(0x42c)](_0x1b5198)):this[_0x17ace0(0x396)][_0x17ace0(0x315)]({'id':_0x17ace0(0x4ce)}));}['_tryReconnect'](_0x4ab34d){const _0x38b213=_0x47c516;let _0x20468c=_0x4ab34d[_0x38b213(0x221)],_0x583479=this[_0x38b213(0x469)][_0x38b213(0x33e)](m),_0x487b89=_0x20468c===0x0?0x0:((_0x583479==null?void 0x0:_0x583479[_0x38b213(0x529)])??0x4e20)*0x2**_0x20468c;_0x4ab34d['retryConnectingTimer']=setTimeout(()=>{const _0x1caba2=_0x38b213;clearTimeout(_0x4ab34d[_0x1caba2(0x2eb)]),_0x4ab34d['retryConnectingTimer']=null,this[_0x1caba2(0x3ea)](_0x4ab34d);},_0x487b89),_0x4ab34d[_0x38b213(0x221)]+=0x1;}async[_0x47c516(0x3ba)](_0x57e69d,_0x5f5521){const _0x56fd03=_0x47c516;return Qe(_0x57e69d,_0x5f5521,await this[_0x56fd03(0x3d1)][_0x56fd03(0x3f2)]({'unitId':_0x57e69d,'unitType':_0x5f5521}));}['_onMessage'](_0x334421,_0x415a3b,_0x2d59b5){const _0x2fa49e=_0x47c516;if(this[_0x2fa49e(0x440)]||_0x334421[_0x2fa49e(0x2a8)]!==_0x415a3b&&_0x334421[_0x2fa49e(0x51b)][_0x2fa49e(0x28b)]()!==_0x415a3b)return;let {cmd:_0x4df583}=_0x2d59b5;if(_0x4df583===a[_0x2fa49e(0x513)][_0x2fa49e(0x445)]&&!_0x334421['socketReady']){var _0x35ae99;if((_0x2d59b5[_0x2fa49e(0x30a)]??a[_0x2fa49e(0x487)]['OK'])!==a[_0x2fa49e(0x487)]['OK']||!((_0x35ae99=_0x2d59b5['data'])!=null&&_0x35ae99[_0x2fa49e(0x46e)])){this[_0x2fa49e(0x2f8)](_0x334421);return;}this[_0x2fa49e(0x3f7)](_0x334421),_0x415a3b[_0x2fa49e(0x46e)]=_0x2d59b5['data'][_0x2fa49e(0x46e)],_0x334421[_0x2fa49e(0x221)]=0x0,_0x334421[_0x2fa49e(0x42b)]=!0x0,_0x334421['candidateSocket']=null,_0x334421['socket$']['next'](_0x415a3b),this['_status$']['next'](0x3);}_0x4df583===a['CombCmd'][_0x2fa49e(0x2f3)]&&this[_0x2fa49e(0x515)](_0x334421),this['_rescheduleHeartbeat'](_0x334421);}[_0x47c516(0x24f)](_0x4ec065){const _0x3a8c90=_0x47c516;return[...this[_0x3a8c90(0x23f)][_0x3a8c90(0x283)]()]['some'](_0x3fc933=>_0x3fc933===_0x4ec065);}[_0x47c516(0x3b2)](_0x1e49c3){const _0x5f2b10=_0x47c516;let _0x57fa7c=_0x1e49c3??'',_0x11f692=this[_0x5f2b10(0x4cc)]['get'](_0x57fa7c);if(_0x11f692)return _0x11f692;let _0x5f1ce6={'endpointKey':_0x57fa7c,'endpoint':_0x1e49c3,'socket$':new i[(_0x5f2b10(0x2f4))](void 0x0),'candidateSocket':null,'connectionAttempt':null,'socketReady':!0x1,'socketSubscription':null,'handshakeTimer':null,'retryConnectingTimer':null,'retryCount':0x0,'sendHeartbeatTimer':null,'timeoutTimer':null};return this[_0x5f2b10(0x4cc)][_0x5f2b10(0x2f5)](_0x57fa7c,_0x5f1ce6),_0x5f1ce6;}[_0x47c516(0x3f7)](_0x14067c){const _0x50cb53=_0x47c516;_0x14067c[_0x50cb53(0x234)]!=null&&(clearTimeout(_0x14067c[_0x50cb53(0x234)]),_0x14067c[_0x50cb53(0x234)]=null);}[_0x47c516(0x3ec)](_0x2c7044){const _0x299674=_0x47c516;this[_0x299674(0x488)](_0x2c7044),_0x2c7044[_0x299674(0x42b)]&&(_0x2c7044['sendHeartbeatTimer']=setTimeout(()=>this[_0x299674(0x23b)](_0x2c7044),this['_configService'][_0x299674(0x33e)](_0x299674(0x418))??0x7530));}[_0x47c516(0x23b)](_0x1fbfaa){const _0x3090a3=_0x47c516;let _0x49eca5=_0x1fbfaa[_0x3090a3(0x51b)][_0x3090a3(0x28b)]();_0x1fbfaa[_0x3090a3(0x42b)]&&_0x49eca5&&(_0x49eca5[_0x3090a3(0x422)]({'cmd':a[_0x3090a3(0x513)][_0x3090a3(0x2f3)]}),this[_0x3090a3(0x337)](_0x1fbfaa));}[_0x47c516(0x337)](_0x18d6b8){const _0x40549b=_0x47c516;_0x18d6b8['timeoutTimer']=setTimeout(()=>this[_0x40549b(0x2f8)](_0x18d6b8),this[_0x40549b(0x469)][_0x40549b(0x33e)]('HEARTBEAT_TIMEOUT')??0x4e20);}['_clearHeartbeatTimer'](_0x2ad265){const _0x22968e=_0x47c516;_0x2ad265[_0x22968e(0x4d9)]!=null&&(clearTimeout(_0x2ad265['sendHeartbeatTimer']),_0x2ad265[_0x22968e(0x4d9)]=null);}[_0x47c516(0x515)](_0x1e3a71){const _0x3ac7e4=_0x47c516;_0x1e3a71[_0x3ac7e4(0x43d)]!=null&&(clearTimeout(_0x1e3a71[_0x3ac7e4(0x43d)]),_0x1e3a71['timeoutTimer']=null);}};V=y([v(0x0,(0x0,t[_0x47c516(0x528)])(t[_0x47c516(0x416)])),v(0x1,t[_0x47c516(0x4e0)]),v(0x2,t['IConfigService']),v(0x3,qe),v(0x4,(0x0,t[_0x47c516(0x528)])(_)),v(0x5,Xe)],V);let H=class extends t[_0x47c516(0x3b6)]{constructor(_0x4fc1be,_0xaa4f8c,_0x537c29,_0x3a8e2b){const _0x449c60=_0x47c516;var _0x256cba;super(),this[_0x449c60(0x400)]=_0x4fc1be,this[_0x449c60(0x3b3)]=_0xaa4f8c,this[_0x449c60(0x469)]=_0x537c29,this[_0x449c60(0x2af)]=_0x3a8e2b,g(this,_0x449c60(0x2f6),new Map()),g(this,'_entityInit$',new i[(_0x449c60(0x369))]()),g(this,_0x449c60(0x545),this[_0x449c60(0x2ff)][_0x449c60(0x404)]()),((_0x256cba=this['_configService'][_0x449c60(0x33e)](_0x449c60(0x313)))==null?void 0x0:_0x256cba[_0x449c60(0x2d0)])!==!0x1&&this['_init']();}[_0x47c516(0x328)](){const _0x2f5322=_0x47c516;super[_0x2f5322(0x328)](),this[_0x2f5322(0x2f6)]['forEach'](_0x56b3ae=>_0x56b3ae[_0x2f5322(0x328)]()),this[_0x2f5322(0x2f6)][_0x2f5322(0x4c9)]();}[_0x47c516(0x421)](_0x2144b6){const _0xee2ecd=_0x47c516;return this[_0xee2ecd(0x2f6)][_0xee2ecd(0x1fa)](_0x2144b6)??null;}[_0x47c516(0x4e5)](_0x58151e){const _0x57bf41=_0x47c516;let _0x312380=this[_0x57bf41(0x421)](_0x58151e);return _0x312380?(0x0,i['of'])(_0x312380):this[_0x57bf41(0x2ff)][_0x57bf41(0x3e8)]((0x0,s[_0x57bf41(0x441)])(_0x3e2015=>_0x3e2015[_0x57bf41(0x4e9)]===_0x58151e));}[_0x47c516(0x340)](_0x53460c){const _0x8f5458=_0x47c516;return(0x0,i[_0x8f5458(0x36d)])(this['getCollabEntity$'](_0x53460c)[_0x8f5458(0x3e8)]((0x0,s[_0x8f5458(0x41a)])(()=>void 0x0)));}[_0x47c516(0x2c7)](){const _0x43e2a7=_0x47c516;this['_univerInstanceService'][_0x43e2a7(0x2ee)](t['UniverInstanceType'][_0x43e2a7(0x4ab)])[_0x43e2a7(0x3e8)]((0x0,i['takeUntil'])(this['dispose$']),(0x0,s[_0x43e2a7(0x45a)])(0x10))[_0x43e2a7(0x51a)](async _0x58a050=>{const _0x14fc65=_0x43e2a7;let _0x75212c=_0x58a050['unit'][_0x14fc65(0x4fc)](),_0x278b0f=await this[_0x14fc65(0x25a)](_0x75212c,t[_0x14fc65(0x4f3)][_0x14fc65(0x4ab)]);this[_0x14fc65(0x2f6)][_0x14fc65(0x2f5)](_0x75212c,_0x278b0f);}),this['_univerInstanceService'][_0x43e2a7(0x2ee)](t[_0x43e2a7(0x4f3)][_0x43e2a7(0x48e)])[_0x43e2a7(0x3e8)]((0x0,i[_0x43e2a7(0x357)])(this['dispose$']),(0x0,s['delay'])(0x10))[_0x43e2a7(0x3e8)]((0x0,s['filter'])(_0x3358a9=>!_0x3358a9[_0x43e2a7(0x480)][_0x43e2a7(0x4fc)]()[_0x43e2a7(0x38d)]('__')))[_0x43e2a7(0x51a)](async _0x3dde4b=>{const _0x4bca5c=_0x43e2a7;let _0x157108=_0x3dde4b[_0x4bca5c(0x480)][_0x4bca5c(0x4fc)](),_0x29deb6=await this['_startCollaboration'](_0x157108,t[_0x4bca5c(0x4f3)]['UNIVER_DOC']);this[_0x4bca5c(0x2f6)]['set'](_0x157108,_0x29deb6);}),this[_0x43e2a7(0x2af)][_0x43e2a7(0x2ee)](t[_0x43e2a7(0x4f3)][_0x43e2a7(0x2b4)])['pipe']((0x0,i[_0x43e2a7(0x357)])(this['dispose$']),(0x0,s['delay'])(0x10))[_0x43e2a7(0x51a)](async _0x32f6e2=>{const _0xb8a53d=_0x43e2a7;let _0xca2b1e=_0x32f6e2[_0xb8a53d(0x480)][_0xb8a53d(0x4fc)](),_0x58af0b=await this[_0xb8a53d(0x25a)](_0xca2b1e,t['UniverInstanceType']['UNIVER_SLIDE']);this[_0xb8a53d(0x2f6)][_0xb8a53d(0x2f5)](_0xca2b1e,_0x58af0b);}),this[_0x43e2a7(0x2af)]['getTypeOfUnitAdded$'](t[_0x43e2a7(0x4f3)][_0x43e2a7(0x48f)])['pipe']((0x0,i[_0x43e2a7(0x357)])(this[_0x43e2a7(0x25f)]),(0x0,s[_0x43e2a7(0x45a)])(0x10))[_0x43e2a7(0x51a)](async _0x2d0567=>{const _0x777777=_0x43e2a7;let _0x10b14f=_0x2d0567[_0x777777(0x480)][_0x777777(0x4fc)](),_0x141cc5=await this[_0x777777(0x25a)](_0x10b14f,t['UniverInstanceType'][_0x777777(0x48f)]);this[_0x777777(0x2f6)]['set'](_0x10b14f,_0x141cc5);}),this[_0x43e2a7(0x2af)][_0x43e2a7(0x2ee)](t[_0x43e2a7(0x4f3)]['UNIVER_BASE'])[_0x43e2a7(0x3e8)]((0x0,i[_0x43e2a7(0x357)])(this[_0x43e2a7(0x25f)]),(0x0,s['delay'])(0x10))['subscribe'](async _0x1d05f2=>{const _0x2986ab=_0x43e2a7;let _0x2c38e1=_0x1d05f2['unit'][_0x2986ab(0x4fc)](),_0x42cafa=await this[_0x2986ab(0x25a)](_0x2c38e1,t[_0x2986ab(0x4f3)][_0x2986ab(0x4d1)]);this[_0x2986ab(0x2f6)][_0x2986ab(0x2f5)](_0x2c38e1,_0x42cafa);}),this['_univerInstanceService'][_0x43e2a7(0x2ee)](t[_0x43e2a7(0x4f3)][_0x43e2a7(0x4a7)])['pipe']((0x0,i['takeUntil'])(this[_0x43e2a7(0x25f)]),(0x0,s[_0x43e2a7(0x45a)])(0x10))['subscribe'](async _0x542676=>{const _0x531721=_0x43e2a7;let _0x154a87=_0x542676['unit']['getUnitId'](),_0x19289a=await this['_startCollaboration'](_0x154a87,t[_0x531721(0x4f3)][_0x531721(0x4a7)]);this[_0x531721(0x2f6)][_0x531721(0x2f5)](_0x154a87,_0x19289a);}),(0x0,i['merge'])(this[_0x43e2a7(0x2af)][_0x43e2a7(0x4bf)](t[_0x43e2a7(0x4f3)][_0x43e2a7(0x4ab)]),this[_0x43e2a7(0x2af)][_0x43e2a7(0x4bf)](t[_0x43e2a7(0x4f3)][_0x43e2a7(0x48e)]),this['_univerInstanceService'][_0x43e2a7(0x4bf)](t[_0x43e2a7(0x4f3)]['UNIVER_SLIDE']),this[_0x43e2a7(0x2af)][_0x43e2a7(0x4bf)](t[_0x43e2a7(0x4f3)]['UNIVER_BOARD']),this['_univerInstanceService']['getTypeOfUnitDisposed$'](t[_0x43e2a7(0x4f3)][_0x43e2a7(0x4d1)]),this[_0x43e2a7(0x2af)]['getTypeOfUnitDisposed$'](t[_0x43e2a7(0x4f3)][_0x43e2a7(0x4a7)]))[_0x43e2a7(0x3e8)]((0x0,i[_0x43e2a7(0x357)])(this[_0x43e2a7(0x25f)]))['subscribe'](_0x38b6e1=>{const _0x1f3125=_0x43e2a7;let _0x4a2cfe=_0x38b6e1[_0x1f3125(0x4fc)](),_0x5abd64=this['_entities']['get'](_0x4a2cfe);_0x5abd64&&(_0x5abd64[_0x1f3125(0x328)](),this['_entities'][_0x1f3125(0x512)](_0x4a2cfe));});}async[_0x47c516(0x25a)](_0x4130a6,_0x293741){const _0x1e9ad2=_0x47c516;let _0xec4247=await this[_0x1e9ad2(0x3b3)]['requireSession'](_0x4130a6),_0x379237=this['_injector']['createInstance'](this[_0x1e9ad2(0x32f)](_0x293741),_0x4130a6,_0x293741,_0xec4247);return await _0x379237[_0x1e9ad2(0x243)](),this[_0x1e9ad2(0x2ff)]['next'](_0x379237),_0x379237;}[_0x47c516(0x32f)](_0x2b6cb1){const _0x55b91e=_0x47c516;switch(_0x2b6cb1){case t[_0x55b91e(0x4f3)][_0x55b91e(0x48e)]:return F;case t[_0x55b91e(0x4f3)]['UNIVER_SHEET']:return L;case t[_0x55b91e(0x4f3)][_0x55b91e(0x2b4)]:return R;case t['UniverInstanceType'][_0x55b91e(0x48f)]:return z;case t[_0x55b91e(0x4f3)][_0x55b91e(0x4d1)]:return I;case t[_0x55b91e(0x4f3)]['UNIVER_PDF']:return B;default:throw Error('[CollaborationController]:\x20invalid\x20univer\x20type:\x20'+_0x2b6cb1);}}};H=y([v(0x0,(0x0,t[_0x47c516(0x528)])(t[_0x47c516(0x416)])),v(0x1,(0x0,t['Inject'])(V)),v(0x2,t[_0x47c516(0x2ae)]),v(0x3,t[_0x47c516(0x493)])],H);var $e=_0x47c516(0x38e),et=_0x47c516(0x327);let tt=class extends t[_0x47c516(0x542)]{constructor(_0xada6b8,_0x2e4fc4){const _0x3460e0=_0x47c516;super(),this[_0x3460e0(0x2af)]=_0xada6b8,this['_configService']=_0x2e4fc4,this[_0x3460e0(0x2c7)]();}['_init'](){const _0xc2156=_0x47c516;this[_0xc2156(0x4dc)](this['_univerInstanceService'][_0xc2156(0x314)][_0xc2156(0x51a)](()=>{const _0x5c49ba=_0xc2156;let _0x38bc11=this[_0x5c49ba(0x2af)][_0x5c49ba(0x409)](),_0x1f3d37=this['_configService'][_0x5c49ba(0x33e)](_0x5c49ba(0x284))??_0x5c49ba(0x33d);_0x38bc11 instanceof t[_0x5c49ba(0x2e4)]&&(_0x1f3d37=_0x38bc11[_0x5c49ba(0x310)]),document[_0x5c49ba(0x3d6)]=_0x1f3d37;}));}};tt=y([v(0x0,t[_0x47c516(0x493)]),v(0x1,t[_0x47c516(0x2ae)])],tt);const nt=(0x0,t[_0x47c516(0x4a4)])('base-ui.attachment-io.service');let U=class{constructor(_0x469b12,_0x4d369b,_0x2235ce){const _0x4b766f=_0x47c516;this[_0x4b766f(0x503)]=_0x469b12,this[_0x4b766f(0x469)]=_0x4d369b,this[_0x4b766f(0x2af)]=_0x2235ce;}[_0x47c516(0x40d)](){const _0x45d218=_0x47c516;return this[_0x45d218(0x4ee)]()[_0x45d218(0x2ca)]??{};}async[_0x47c516(0x25d)](_0x3847b7){const _0x1c6c0f=_0x47c516;let _0x2f3d8a=this[_0x1c6c0f(0x40d)]();if(rt(_0x3847b7,_0x2f3d8a),_0x2f3d8a[_0x1c6c0f(0x2a7)])return _0x2f3d8a['upload'](_0x3847b7);let _0x569b58=await this['_upload'](_0x3847b7);return{'id':_0x569b58,'name':_0x3847b7[_0x1c6c0f(0x310)],'mimeType':_0x3847b7[_0x1c6c0f(0x1fe)],'size':_0x3847b7[_0x1c6c0f(0x2d9)],'sourceType':t[_0x1c6c0f(0x230)][_0x1c6c0f(0x4d7)],'source':_0x569b58};}async[_0x47c516(0x3ce)](_0x17395c,_0x569774){const _0x21e364=_0x47c516;if(_0x569774!==t[_0x21e364(0x230)]['UUID'])return _0x17395c;let _0x3318a2=(await this[_0x21e364(0x503)][_0x21e364(0x1fa)](this['_getSignURL']()[_0x21e364(0x275)](_0x21e364(0x317),_0x17395c)))[_0x21e364(0x268)];if(_0x3318a2[_0x21e364(0x492)]&&_0x3318a2[_0x21e364(0x492)]['code']!==a[_0x21e364(0x214)]['OK'])throw _0x3318a2['error'];if(!_0x3318a2[_0x21e364(0x2c5)])throw Error(_0x21e364(0x2d3));return(0x0,t[_0x21e364(0x1f5)])(_0x3318a2[_0x21e364(0x2c5)],this[_0x21e364(0x334)]());}async[_0x47c516(0x34e)](_0x484eb5){const _0x7f6d70=_0x47c516;let _0x40b7cb=this[_0x7f6d70(0x2af)][_0x7f6d70(0x409)](),_0x1407cd=_0x40b7cb==null?void 0x0:_0x40b7cb[_0x7f6d70(0x4fc)]();if(!_0x1407cd)throw Error(_0x7f6d70(0x402));let _0x51edb2=new FormData();_0x51edb2[_0x7f6d70(0x293)](_0x7f6d70(0x281),_0x484eb5);let _0x35c2c9=this['_getUploadFileURL']()+'?size='+_0x484eb5['size']['toString']()+'&source='+a['FileSource']['UnitEmbedded']+'&assign='+encodeURIComponent(_0x1407cd),_0x1766d6=(await this[_0x7f6d70(0x503)]['post'](_0x35c2c9,{'body':_0x51edb2}))[_0x7f6d70(0x268)]['FileId'];if(typeof _0x1766d6!=_0x7f6d70(0x46a)||!_0x1766d6)throw Error(_0x7f6d70(0x2ed));return _0x1766d6;}[_0x47c516(0x264)](){const _0x8cdbbc=_0x47c516;return this['_getConfig']()['uploadFileServerUrl']??_0x8cdbbc(0x48a);}[_0x47c516(0x425)](){const _0x414d7b=_0x47c516;return this[_0x414d7b(0x4ee)]()['signUrlServerUrl']??_0x414d7b(0x24e);}[_0x47c516(0x334)](){const _0x543d99=_0x47c516;let _0x62e88=this[_0x543d99(0x4ee)]();return _0x62e88[_0x543d99(0x454)]?_0x62e88['downloadEndpointUrl']:typeof location<'u'?location[_0x543d99(0x365)]:_0x62e88[_0x543d99(0x2df)]??'';}[_0x47c516(0x4ee)](){const _0x323863=_0x47c516;return this['_configService'][_0x323863(0x33e)](_0x323863(0x313))??{};}};U=y([v(0x0,(0x0,t['Inject'])(l[_0x47c516(0x45b)])),v(0x1,(0x0,t[_0x47c516(0x528)])(t[_0x47c516(0x2ae)])),v(0x2,(0x0,t['Inject'])(t[_0x47c516(0x493)]))],U);function rt(_0x21e556,_0x4a89e8){const _0x456211=_0x47c516;var _0xb5af35;if(_0x4a89e8['maxSize']!=null&&_0x21e556[_0x456211(0x2d9)]>_0x4a89e8[_0x456211(0x24c)])throw Error(_0x456211(0x32b));if((_0xb5af35=_0x4a89e8[_0x456211(0x24b)])!=null&&_0xb5af35[_0x456211(0x476)]&&!_0x4a89e8[_0x456211(0x24b)][_0x456211(0x3e9)](_0x12ae28=>_0x21e556[_0x456211(0x1fe)]===_0x12ae28||_0x21e556[_0x456211(0x310)][_0x456211(0x30e)](_0x12ae28)||_0x12ae28[_0x456211(0x30e)]('/*')&&_0x21e556[_0x456211(0x1fe)][_0x456211(0x38d)](_0x12ae28[_0x456211(0x33a)](0x0,-0x1))))throw Error(_0x456211(0x37f));}let W=class{constructor(_0x469ce5,_0x59a34d,_0x17c65d){const _0x116d1d=_0x47c516;this[_0x116d1d(0x469)]=_0x469ce5,this[_0x116d1d(0x503)]=_0x59a34d,this['localeService']=_0x17c65d,this[_0x116d1d(0x243)]();}[_0x47c516(0x243)](){const _0x3293d8=_0x47c516;this['_httpService']['registerHTTPInterceptor']({'priority':0x1,'interceptor':(_0x439a00,_0x23744a)=>_0x23744a(_0x439a00)[_0x3293d8(0x3e8)]((0x0,i[_0x3293d8(0x52c)])(async _0x5be297=>{const _0x3b3089=_0x3293d8;let _0x386b84=_0x5be297;if(_0x386b84[_0x3b3089(0x4f5)]===0x191){if(typeof window>'u')throw Error(_0x3b3089(0x256));if(window[_0x3b3089(0x31f)](this[_0x3b3089(0x47d)]['t'](_0x3b3089(0x411)))){let _0x14dd4b=window[_0x3b3089(0x546)](window[_0x3b3089(0x465)][_0x3b3089(0x3cc)]);window['location']['href']=this[_0x3b3089(0x437)]()+_0x3b3089(0x470)+_0x14dd4b;}}return _0x386b84;}))});}[_0x47c516(0x437)](){const _0x528dbe=_0x47c516;let _0x305715=this[_0x528dbe(0x469)][_0x528dbe(0x33e)](m);return(_0x305715==null?void 0x0:_0x305715[_0x528dbe(0x206)])??_0x528dbe(0x44e);}};W=y([v(0x0,t['IConfigService']),v(0x1,(0x0,t[_0x47c516(0x528)])(l[_0x47c516(0x45b)])),v(0x2,(0x0,t[_0x47c516(0x528)])(t[_0x47c516(0x346)]))],W);let G=class extends t[_0x47c516(0x542)]{constructor(_0x3e9200,_0x2ca22a){const _0x31a218=_0x47c516;super(),this[_0x31a218(0x4eb)]=_0x3e9200,this[_0x31a218(0x469)]=_0x2ca22a,g(this,'_cfgEnableObjInherit',!0x1),this[_0x31a218(0x3aa)]();}[_0x47c516(0x3aa)](){const _0x1eb340=_0x47c516;let _0x37aa34=this;this[_0x1eb340(0x4dc)](this[_0x1eb340(0x4eb)][_0x1eb340(0x53c)]({'priority':0x3e7,'interceptor':(0x0,l[_0x1eb340(0x3b1)])({'isMatch'(_0x83bb45){const _0x51b1e9=_0x1eb340;var _0x2a0fbf;if(_0x83bb45[_0x51b1e9(0x4a0)]==='POST'&&(_0x2a0fbf=_0x83bb45[_0x51b1e9(0x277)])!=null&&_0x2a0fbf[_0x51b1e9(0x268)]){let {objectID:_0x23eeff,objectType:_0x420a4e}=_0x83bb45[_0x51b1e9(0x277)][_0x51b1e9(0x268)]||{};if(!_0x23eeff||_0x420a4e===void 0x0)return!0x1;let _0x32ca39=_0x37aa34[_0x51b1e9(0x231)]()+'/'+_0x420a4e+'/object/'+encodeURIComponent(_0x23eeff)+_0x51b1e9(0x50c);if(_0x83bb45['url']===_0x32ca39)return!0x0;}return!0x1;},'getParamsFromRequest'(_0x191fee){const _0x4dd376=_0x1eb340;var _0x1b1342;return(_0x1b1342=_0x191fee[_0x4dd376(0x277)])==null?void 0x0:_0x1b1342['body'];},'mergeParamsToRequest'(_0x297515,_0x2a428a){const _0x43dab2=_0x1eb340;let _0x438cf5=_0x37aa34[_0x43dab2(0x231)]()+_0x43dab2(0x258),_0x3c2a17=_0x297515[_0x43dab2(0x39d)]((_0x101d9d,_0x231b05)=>{const _0x28eced=_0x43dab2;let {unitID:_0x21d0ca,objectID:_0x4517a1,objectType:_0x25b405,actions:_0x4e5f46}=_0x231b05;return _0x101d9d[_0x21d0ca]||(_0x101d9d[_0x21d0ca]=Object['create'](null)),_0x101d9d[_0x21d0ca][_0x4517a1]||(_0x101d9d[_0x21d0ca][_0x4517a1]={'objectID':_0x4517a1,'objectType':_0x25b405,'actions':[]}),_0x101d9d[_0x21d0ca][_0x4517a1][_0x28eced(0x1f3)][_0x28eced(0x325)](..._0x4e5f46),_0x101d9d;},Object['create'](null)),_0xb396f5=[];for(let _0x2f3cbf in _0x3c2a17)for(let _0x4cca14 in _0x3c2a17[_0x2f3cbf]){let {actions:_0x133db0,objectType:_0x3eb52f}=_0x3c2a17[_0x2f3cbf][_0x4cca14],_0x4337d0=[...new Set(_0x133db0)];_0xb396f5[_0x43dab2(0x325)]({'unitID':_0x2f3cbf,'objectID':_0x4cca14,'objectType':_0x3eb52f,'actions':_0x4337d0});}return new l[(_0x43dab2(0x3db))](_0x43dab2(0x4cb),_0x438cf5,{'headers':_0x2a428a['headers'],'withCredentials':_0x2a428a[_0x43dab2(0x2c2)],'responseType':_0x2a428a[_0x43dab2(0x51c)],'body':{'requests':_0xb396f5}});}},{'distributeResult'(_0x51df89,_0x594ef4){let {objectActions:_0x6dc5b8}=_0x51df89;return _0x594ef4['map'](_0x1bdfe3=>{const _0x53eee1=_0x88a9;let {unitID:_0x3fba2e,objectID:_0x45f8c5,actions:_0x40de98}=_0x1bdfe3,_0x35ddd9=_0x6dc5b8['find'](_0x13d70b=>_0x13d70b[_0x53eee1(0x4e9)]===_0x3fba2e&&_0x13d70b[_0x53eee1(0x384)]===_0x45f8c5);return{'config':_0x1bdfe3,'result':{'actions':_0x40de98[_0x53eee1(0x41a)](_0xc0dc35=>_0x35ddd9==null?void 0x0:_0x35ddd9['actions'][_0x53eee1(0x3f8)](_0x5c3313=>_0x5c3313[_0x53eee1(0x209)]===_0xc0dc35))[_0x53eee1(0x441)](_0x51049f=>!!_0x51049f),'error':_0x51df89[_0x53eee1(0x492)]}};});}})}));}['_getAPIPrefixPath'](){const _0x5b86d0=_0x47c516;let _0x42a5c1=this[_0x5b86d0(0x469)][_0x5b86d0(0x33e)](m);return(_0x42a5c1==null?void 0x0:_0x42a5c1[_0x5b86d0(0x287)])??_0x5b86d0(0x306);}async[_0x47c516(0x20b)](_0xda19a1){const _0x32aa65=_0x47c516;let _0x5ce8b8=this[_0x32aa65(0x231)]()+'/'+_0xda19a1[_0x32aa65(0x2d5)]+_0x32aa65(0x32c);return(await this[_0x32aa65(0x4eb)][_0x32aa65(0x29f)](_0x5ce8b8,{'body':_0xda19a1}))[_0x32aa65(0x268)][_0x32aa65(0x384)]||'';}async[_0x47c516(0x352)](_0x113dc3){const _0x1ead66=_0x47c516;let _0x4dc4a6=this['_getAPIPrefixPath']()+_0x1ead66(0x23d);return(await this[_0x1ead66(0x4eb)][_0x1ead66(0x29f)](_0x4dc4a6,{'body':_0x113dc3}))[_0x1ead66(0x268)][_0x1ead66(0x3ef)];}async['update'](_0x4a9236){const _0x5039b4=_0x47c516;var _0xabf7e4;let _0x1797b7=this[_0x5039b4(0x231)]()+'/'+_0x4a9236['objectType']+_0x5039b4(0x403)+encodeURIComponent(_0x4a9236['objectID']),_0x1d0907=await this[_0x5039b4(0x4eb)][_0x5039b4(0x28e)](_0x1797b7,{'body':_0x4a9236});if((_0x1d0907==null||(_0xabf7e4=_0x1d0907[_0x5039b4(0x268)])==null||(_0xabf7e4=_0xabf7e4[_0x5039b4(0x492)])==null?void 0x0:_0xabf7e4[_0x5039b4(0x30a)])!==0x1)throw Error(_0x5039b4(0x27d));}async['allowed'](_0x4030ad){const _0x521573=_0x47c516;let _0x310821=this[_0x521573(0x231)]()+'/'+_0x4030ad['objectType']+'/object/'+encodeURIComponent(_0x4030ad['objectID'])+_0x521573(0x50c);return(await this[_0x521573(0x4eb)][_0x521573(0x29f)](_0x310821,{'body':_0x4030ad}))[_0x521573(0x268)][_0x521573(0x1f3)];}async[_0x47c516(0x280)](_0x5de166){const _0x260571=_0x47c516;let _0x82a23e=this[_0x260571(0x231)]()+'/-/object/-/batch_allowed';return(await this[_0x260571(0x4eb)][_0x260571(0x29f)](_0x82a23e,{'body':{'requests':_0x5de166}}))[_0x260571(0x268)][_0x260571(0x40e)];}async[_0x47c516(0x3d4)](_0x39d04e){const _0x3d4aec=_0x47c516;let _0x3a787d=this[_0x3d4aec(0x231)]()+'/'+_0x39d04e[_0x3d4aec(0x2d5)]+'/role',_0x2d79fb=await this[_0x3d4aec(0x4eb)][_0x3d4aec(0x29f)](_0x3a787d,{'body':_0x39d04e});return{'roles':_0x2d79fb['body'][_0x3d4aec(0x48d)],'actions':_0x2d79fb[_0x3d4aec(0x268)]['actions']};}async[_0x47c516(0x519)](_0x1872c6){const _0x2a411b=_0x47c516;let _0x714e98=this['_getAPIPrefixPath']()+'/collaborator';await this['_HTTPService'][_0x2a411b(0x512)](_0x714e98,{'params':{'collaboratorID':_0x1872c6[_0x2a411b(0x3b5)],'objectID':_0x1872c6[_0x2a411b(0x384)],'unitID':_0x1872c6['unitID']}});}async[_0x47c516(0x39c)](_0x71edbe){const _0x5a2a9e=_0x47c516;let _0x26ef07=this[_0x5a2a9e(0x231)]()+_0x5a2a9e(0x4c8);await this['_HTTPService']['patch'](_0x26ef07,{'body':_0x71edbe});}async[_0x47c516(0x48b)](_0x305bf9){const _0x5bf040=_0x47c516;let _0x1f481b=this[_0x5bf040(0x231)]()+_0x5bf040(0x4c8);await this[_0x5bf040(0x4eb)][_0x5bf040(0x29f)](_0x1f481b,{'body':_0x305bf9});}async[_0x47c516(0x366)](_0x397fc3){const _0x163c19=_0x47c516;let _0x1515a0=this['_getAPIPrefixPath']()+_0x163c19(0x4c8),_0x182385=await this[_0x163c19(0x4eb)][_0x163c19(0x1fa)](_0x1515a0,{'params':{'objectID':_0x397fc3[_0x163c19(0x384)],'unitID':_0x397fc3[_0x163c19(0x4e9)]}});return this[_0x163c19(0x401)](_0x182385['body']['cfgEnableObjInherit']??!0x1),_0x182385[_0x163c19(0x268)]['collaborators'];}async[_0x47c516(0x26b)](_0x5de595){const _0x401884=_0x47c516;let _0x2c709b=this[_0x401884(0x231)]()+_0x401884(0x4c8);await this[_0x401884(0x4eb)][_0x401884(0x28e)](_0x2c709b,{'body':_0x5de595});}[_0x47c516(0x401)](_0x4ae532){const _0x3591b3=_0x47c516;this[_0x3591b3(0x303)]=_0x4ae532;}[_0x47c516(0x2d2)](){const _0x326a0e=_0x47c516;return this[_0x326a0e(0x303)];}};G=y([v(0x0,(0x0,t['Inject'])(l[_0x47c516(0x45b)])),v(0x1,(0x0,t[_0x47c516(0x528)])(t[_0x47c516(0x2ae)]))],G);function it(_0x5c491f){const _0x10b04f=_0x47c516;let _0x413d8b=atob(_0x5c491f),_0x5d2627=new Uint8Array(_0x413d8b[_0x10b04f(0x476)]);for(let _0x3f1622=0x0;_0x3f1622<_0x413d8b[_0x10b04f(0x476)];_0x3f1622++)_0x5d2627[_0x3f1622]=_0x413d8b[_0x10b04f(0x3d5)](_0x3f1622);return _0x5d2627;}function at(_0x590987){const _0x15b24e=_0x47c516;let _0x31db10='';for(let _0x1f4716=0x0;_0x1f4716<_0x590987['length'];_0x1f4716++)_0x31db10+=String[_0x15b24e(0x52f)](_0x590987[_0x1f4716]);return btoa(_0x31db10);}function ot(_0x194114,_0x1e8369){const _0x5f4ff5=_0x47c516;let _0x53187d=it(_0x1e8369),_0x38f2fe=(0x0,f[_0x5f4ff5(0x1f0)])(0x10),_0x29ecc0=(0x0,d[_0x5f4ff5(0x3a8)])(_0x53187d,_0x38f2fe)[_0x5f4ff5(0x21a)]((0x0,f['utf8ToBytes'])(_0x194114));return at((0x0,f[_0x5f4ff5(0x29c)])(_0x38f2fe,_0x29ecc0));}function st(){const _0x52c5ee=_0x47c516;let _0xe9e151=(0x0,u['getGlobalObject'])()[_0x52c5ee(0x4c2)];if(typeof window<'u'&&window[_0x52c5ee(0x465)]!==void 0x0&&_0xe9e151){let _0x25c872={'time':Math[_0x52c5ee(0x2b2)](Date[_0x52c5ee(0x3e6)]()/0x3e8),'domain':location[_0x52c5ee(0x2de)]};return ot(JSON[_0x52c5ee(0x307)](_0x25c872),_0xe9e151);}}let K=class{constructor(_0x51d6f2){const _0x3394b0=_0x47c516;this['_httpService']=_0x51d6f2,this[_0x3394b0(0x217)]();}[_0x47c516(0x217)](){const _0x580441=_0x47c516;this[_0x580441(0x503)][_0x580441(0x53c)]({'interceptor':(_0x1ec577,_0x553a03)=>{const _0x34918=_0x580441;let _0x140742=st();return _0x140742&&_0x1ec577['headers'][_0x34918(0x2f5)](_0x34918(0x2b7),_0x140742),_0x553a03(_0x1ec577);}});}};K=y([v(0x0,(0x0,t[_0x47c516(0x528)])(l[_0x47c516(0x45b)]))],K);let q=class extends t[_0x47c516(0x3b6)]{constructor(_0x5d74f9,_0x298cff,_0x1363ff){const _0x57ca26=_0x47c516;super(),this[_0x57ca26(0x266)]=_0x5d74f9,this[_0x57ca26(0x4ed)]=_0x298cff,this[_0x57ca26(0x344)]=_0x1363ff,g(this,_0x57ca26(0x486),new i['BehaviorSubject'](null)),g(this,_0x57ca26(0x316),new i['Subject']()),g(this,_0x57ca26(0x348),this[_0x57ca26(0x486)]['asObservable']()),g(this,_0x57ca26(0x4be),this[_0x57ca26(0x316)]['asObservable']());}[_0x47c516(0x328)](){const _0x1a7f99=_0x47c516;super['dispose'](),this[_0x1a7f99(0x316)][_0x1a7f99(0x2ce)](),this[_0x1a7f99(0x486)][_0x1a7f99(0x2ce)]();}[_0x47c516(0x29b)](_0xa50bff,_0x5f03f8,_0x94042c,_0x327232,_0x4b07e4){const _0x24b210=_0x47c516;return this[_0x24b210(0x408)](_0xa50bff,_0x5f03f8,_0x94042c,_0x327232,_0x4b07e4);}[_0x47c516(0x2fc)](_0x42a930,_0x33f2fc,_0x2e826c,_0x2833b0){const _0x3d2f26=_0x47c516;return this[_0x3d2f26(0x408)](_0x42a930,_0x33f2fc,void 0x0,_0x2e826c,_0x2833b0);}async[_0x47c516(0x408)](_0x52c907,_0x43d45c,_0x5e031a,_0x5f25ed,_0x566436){const _0x4110e5=_0x47c516;this[_0x4110e5(0x486)][_0x4110e5(0x485)]({'unitId':_0x52c907,'type':_0x43d45c,'subUnitId':_0x5f25ed});let _0x37f9a8=_0x5e031a;if(_0x37f9a8===void 0x0){var _0x11340c;let _0x56b989=await((_0x11340c=this[_0x4110e5(0x344)])==null?void 0x0:_0x11340c[_0x4110e5(0x37b)](_0x52c907));_0x37f9a8=_0x56b989&&(_0x56b989[_0x4110e5(0x4b9)]||_0x56b989[_0x4110e5(0x223)][_0x4110e5(0x476)]!==0x0)?_0x56b989[_0x4110e5(0x533)]:0x0,_0x37f9a8===0x0&&this[_0x4110e5(0x266)][_0x4110e5(0x3c4)](_0x4110e5(0x274),_0x4110e5(0x3b8));}return this[_0x4110e5(0x27e)](_0x52c907,_0x43d45c,_0x37f9a8,_0x5f25ed,_0x566436);}async['_loadSnapshot'](_0x57adf3,_0x2c8f3b,_0x3d7ed8,_0x5c4db4,_0x4c0e3f){const _0x335526=_0x47c516;let _0x3acc40=null;switch(_0x2c8f3b){case t[_0x335526(0x4f3)]['UNIVER_SHEET']:_0x3acc40=await this[_0x335526(0x4ed)][_0x335526(0x1fc)](_0x57adf3,_0x3d7ed8,_0x4c0e3f,{'initialSubUnitId':_0x5c4db4});break;case t[_0x335526(0x4f3)]['UNIVER_DOC']:_0x3acc40=await this[_0x335526(0x4ed)]['loadDoc'](_0x57adf3,_0x3d7ed8,_0x4c0e3f);break;case t[_0x335526(0x4f3)][_0x335526(0x2b4)]:_0x3acc40=await this['_snapshotService'][_0x335526(0x449)](_0x57adf3,_0x3d7ed8,_0x4c0e3f);break;case t['UniverInstanceType'][_0x335526(0x48f)]:_0x3acc40=await this[_0x335526(0x4ed)][_0x335526(0x39b)](_0x57adf3,_0x3d7ed8,_0x4c0e3f);break;case t[_0x335526(0x4f3)][_0x335526(0x4d1)]:_0x3acc40=await this[_0x335526(0x4ed)][_0x335526(0x295)](_0x57adf3,_0x3d7ed8,_0x4c0e3f);break;case t[_0x335526(0x4f3)][_0x335526(0x4a7)]:_0x3acc40=await this[_0x335526(0x4ed)][_0x335526(0x4d5)](_0x57adf3,_0x3d7ed8,_0x4c0e3f);break;default:this['_logService'][_0x335526(0x492)](_0x335526(0x274),_0x335526(0x3d2));}return _0x3acc40&&this[_0x335526(0x316)][_0x335526(0x485)](_0x3acc40),_0x3acc40;}};q=y([v(0x0,t[_0x47c516(0x4e0)]),v(0x1,(0x0,t[_0x47c516(0x528)])(e[_0x47c516(0x415)])),v(0x2,(0x0,t[_0x47c516(0x263)])(x))],q);let J=class{constructor(_0x3b638e,_0x483dc8,_0x158698){const _0x52b492=_0x47c516;this[_0x52b492(0x503)]=_0x3b638e,this[_0x52b492(0x469)]=_0x483dc8,this[_0x52b492(0x2af)]=_0x158698,g(this,_0x52b492(0x35f),0x0),g(this,_0x52b492(0x491),new i['Subject']()),g(this,_0x52b492(0x2d6),this[_0x52b492(0x491)]),g(this,'_imageSourceCache',new Map());}[_0x47c516(0x419)](_0x243daa){const _0x27ed76=_0x47c516;this['_waitCount']=_0x243daa,this[_0x27ed76(0x491)]['next'](_0x243daa);}['getImageSourceCache'](_0x3b66a9,_0x492ff1){const _0x4826f4=_0x47c516;if(_0x492ff1===t[_0x4826f4(0x230)][_0x4826f4(0x36f)]){let _0x206090=new Image();return _0x206090['src']=_0x3b66a9,_0x206090;}return this['_imageSourceCache'][_0x4826f4(0x1fa)](_0x3b66a9);}[_0x47c516(0x320)](_0x6e9f78,_0x3a94d2,_0x11f813){const _0x31fdc8=_0x47c516;_0x3a94d2!==t['ImageSourceType'][_0x31fdc8(0x36f)]&&_0x11f813!=null&&this['_imageSourceCache'][_0x31fdc8(0x2f5)](_0x6e9f78,_0x11f813);}async[_0x47c516(0x42f)](_0x4c4d99){const _0x389215=_0x47c516;try{let _0x98ad00=this['_replaceFileID'](this[_0x389215(0x425)](),''+_0x4c4d99),_0x2dca4f=(await this[_0x389215(0x503)][_0x389215(0x1fa)](_0x98ad00))['body'];if(_0x2dca4f['error']&&_0x2dca4f[_0x389215(0x492)][_0x389215(0x30a)]===a['ErrorCode']['OK']){let _0x584172=(0x0,t[_0x389215(0x1f5)])(_0x2dca4f['url'],this[_0x389215(0x334)]());return Promise[_0x389215(0x359)](_0x584172);}return Promise['reject'](_0x2dca4f[_0x389215(0x492)]);}catch(_0x16edc2){return Promise[_0x389215(0x43e)](_0x16edc2);}}async[_0x47c516(0x530)](_0x47eb65){const _0x290c69=_0x47c516;let _0xb51cc='';if(!p[_0x290c69(0x347)][_0x290c69(0x482)](_0x47eb65['type']))return this[_0x290c69(0x382)](),Promise[_0x290c69(0x43e)](Error(t[_0x290c69(0x40c)]['ERROR_IMAGE_TYPE']));if(_0x47eb65[_0x290c69(0x2d9)]>(0x0,p['getDrawingImageAllowSize'])())return this[_0x290c69(0x382)](),Promise['reject'](Error(t['ImageUploadStatusType']['ERROR_EXCEED_SIZE']));try{let _0x511890=new FormData();_0x511890[_0x290c69(0x293)]('file',_0x47eb65);let _0x1cb85d=this[_0x290c69(0x2af)][_0x290c69(0x409)](),_0x583e1b=_0x1cb85d==null?void 0x0:_0x1cb85d[_0x290c69(0x4fc)]();if(!_0x583e1b)throw Error('unitId\x20is\x20not\x20found');let _0x110af6=this['_getUploadFileURL']()+_0x290c69(0x53a)+_0x47eb65[_0x290c69(0x2d9)]['toString']()+_0x290c69(0x49e)+a[_0x290c69(0x237)][_0x290c69(0x45c)]+'&assign='+encodeURIComponent(_0x583e1b),_0x4030d8={'body':_0x511890},_0x2ff453=(await this[_0x290c69(0x503)]['post'](_0x110af6,_0x4030d8))[_0x290c69(0x268)];if(typeof _0x2ff453[_0x290c69(0x331)]!=_0x290c69(0x46a))return this[_0x290c69(0x382)](),Promise[_0x290c69(0x43e)](Error(t['ImageUploadStatusType'][_0x290c69(0x31b)]));_0xb51cc=_0x2ff453[_0x290c69(0x331)];}catch{return this[_0x290c69(0x382)](),Promise[_0x290c69(0x43e)](Error(t[_0x290c69(0x40c)][_0x290c69(0x31b)]));}return new Promise((_0x3981f6,_0x2262a0)=>{const _0x2030c1=_0x290c69;let _0x3e8e36=new FileReader();_0x3e8e36[_0x2030c1(0x2db)](_0x47eb65),_0x3e8e36['onload']=_0x107fde=>{const _0x580d50=_0x2030c1;var _0xa6ad42;let _0x3a0b72=(_0xa6ad42=_0x107fde['target'])==null?void 0x0:_0xa6ad42[_0x580d50(0x4fb)];_0x3a0b72==null?(this[_0x580d50(0x382)](),_0x2262a0(Error(t['ImageUploadStatusType'][_0x580d50(0x31b)]))):(_0x3981f6({'imageId':(0x0,t['generateRandomId'])(0x6),'imageSourceType':t[_0x580d50(0x230)][_0x580d50(0x4d7)],'source':_0xb51cc,'base64Cache':_0x3a0b72,'status':t[_0x580d50(0x40c)][_0x580d50(0x4fa)]}),this['_decreaseWaiting']());};});}[_0x47c516(0x264)](){const _0x2c9aa6=_0x47c516;let _0x369e12=this[_0x2c9aa6(0x469)][_0x2c9aa6(0x33e)](m);return(_0x369e12==null?void 0x0:_0x369e12[_0x2c9aa6(0x2df)])??'/universer-api/stream/file/upload';}[_0x47c516(0x425)](){const _0x46e275=_0x47c516;let _0xbd4e4d=this[_0x46e275(0x469)][_0x46e275(0x33e)](m);return(_0xbd4e4d==null?void 0x0:_0xbd4e4d[_0x46e275(0x436)])??_0x46e275(0x24e);}['_getDownloadEndpointURL'](){const _0x595e27=_0x47c516;let _0x1b7500=this['_configService'][_0x595e27(0x33e)](m);return(_0x1b7500==null?void 0x0:_0x1b7500[_0x595e27(0x454)])??location[_0x595e27(0x365)];}[_0x47c516(0x251)](_0x149bd5,_0x47142d){const _0x249ff5=_0x47c516;return _0x149bd5[_0x249ff5(0x275)](_0x249ff5(0x317),_0x47142d);}[_0x47c516(0x382)](){const _0x209bb8=_0x47c516;--this[_0x209bb8(0x35f)],this['_change$'][_0x209bb8(0x485)](this['_waitCount']);}};J=y([v(0x0,(0x0,t['Inject'])(l[_0x47c516(0x45b)])),v(0x1,t['IConfigService']),v(0x2,(0x0,t[_0x47c516(0x528)])(t['IUniverInstanceService']))],J);let Y=class{constructor(_0x2008d7,_0x362fe8){const _0x3d2d25=_0x47c516;this[_0x3d2d25(0x469)]=_0x2008d7,this[_0x3d2d25(0x4eb)]=_0x362fe8;}[_0x47c516(0x231)](){const _0x2bda0b=_0x47c516;let _0x28e6fa=this['_configService']['getConfig'](m);return(_0x28e6fa==null?void 0x0:_0x28e6fa[_0x2bda0b(0x287)])??_0x2bda0b(0x306);}async[_0x47c516(0x352)](_0x267a59){const _0x4a9cfe=_0x47c516;let _0xaa1778=this[_0x4a9cfe(0x231)]()+_0x4a9cfe(0x4c8);return{'list':[{'title':'People','mentions':(await this[_0x4a9cfe(0x4eb)]['get'](_0xaa1778,{'params':{'objectID':_0x267a59[_0x4a9cfe(0x220)],'unitID':_0x267a59['unitId']}}))[_0x4a9cfe(0x268)][_0x4a9cfe(0x433)][_0x4a9cfe(0x41a)](_0x38d7c8=>({'objectId':_0x38d7c8['id'],'name':_0x38d7c8[_0x4a9cfe(0x222)][_0x4a9cfe(0x310)],'metadata':{'icon':_0x38d7c8[_0x4a9cfe(0x222)][_0x4a9cfe(0x3b0)]},'label':_0x38d7c8['subject']['name'],'objectType':t['MentionType'][_0x4a9cfe(0x44b)]})),'metadata':{},'type':t[_0x4a9cfe(0x2ec)]['PERSON']}]};}};Y=y([v(0x0,(0x0,t[_0x47c516(0x528)])(t[_0x47c516(0x2ae)])),v(0x1,(0x0,t[_0x47c516(0x528)])(l[_0x47c516(0x45b)]))],Y);let X=class extends t[_0x47c516(0x3b6)]{constructor(_0x57fe0e,_0x51ea56,_0x61fa49,_0x5b8a27,_0x105247,_0x867327){const _0x2aa5f5=_0x47c516;super(),this[_0x2aa5f5(0x400)]=_0x57fe0e,this[_0x2aa5f5(0x2af)]=_0x51ea56,this[_0x2aa5f5(0x539)]=_0x61fa49,this[_0x2aa5f5(0x466)]=_0x5b8a27,this['_collaborationSessionService']=_0x105247,this[_0x2aa5f5(0x396)]=_0x867327,g(this,_0x2aa5f5(0x247),new Set()),this[_0x2aa5f5(0x4dc)](()=>this[_0x2aa5f5(0x247)][_0x2aa5f5(0x4c9)]()),this[_0x2aa5f5(0x4dc)](ct(this[_0x2aa5f5(0x2af)])[_0x2aa5f5(0x51a)](({unitId:_0x1d7c7b})=>this[_0x2aa5f5(0x247)]['delete'](_0x1d7c7b))),this[_0x2aa5f5(0x374)](),this['_initCloseConn'](),[t[_0x2aa5f5(0x4f3)][_0x2aa5f5(0x48e)],t[_0x2aa5f5(0x4f3)][_0x2aa5f5(0x2b4)],t['UniverInstanceType'][_0x2aa5f5(0x4d1)],t[_0x2aa5f5(0x4f3)][_0x2aa5f5(0x48f)]][_0x2aa5f5(0x4b1)](_0x2cc506=>{const _0x2c7a16=_0x2aa5f5;this['disposeWithMe'](this[_0x2c7a16(0x2af)]['getTypeOfUnitDisposed$'](_0x2cc506)[_0x2c7a16(0x51a)](_0x1be67e=>{const _0x10ed92=_0x2c7a16;this[_0x10ed92(0x247)][_0x10ed92(0x22f)](_0x1be67e[_0x10ed92(0x4fc)]()),this['_injector'][_0x10ed92(0x1fa)](t[_0x10ed92(0x1ee)])[_0x10ed92(0x3a4)](_0x1be67e[_0x10ed92(0x4fc)]());}));});}[_0x47c516(0x2dd)](){const _0xe1ad5d=_0x47c516;let _0x13e85d=async(_0x144667,_0x1afc92)=>{const _0x445a66=_0x88a9;let _0x175929=await this['_collaborationSessionService'][_0x445a66(0x38c)](_0x144667);this[_0x445a66(0x440)]||this[_0x445a66(0x247)][_0x445a66(0x51d)](_0x144667)||!this[_0x445a66(0x2af)][_0x445a66(0x26a)](_0x144667)||_0x175929[_0x445a66(0x502)][_0x445a66(0x3e8)]((0x0,s['filter'])(_0x5d51a2=>_0x5d51a2[_0x445a66(0x393)]===e['CollaborationEvent'][_0x445a66(0x500)]),(0x0,s['takeUntil'])((0x0,i[_0x445a66(0x4f0)])(this['dispose$'],this[_0x445a66(0x2af)][_0x445a66(0x420)][_0x445a66(0x3e8)]((0x0,s[_0x445a66(0x441)])(_0x2934f9=>_0x2934f9[_0x445a66(0x4fc)]()===_0x144667)))))['subscribe'](_0xd408a3=>{const _0xa35c4f=_0x445a66;let {reason:_0xff5b96}=_0xd408a3[_0xa35c4f(0x3cf)];this[_0xa35c4f(0x396)][_0xa35c4f(0x315)]({'id':'CLOSE_ROOM','data':_0xff5b96}),this[_0xa35c4f(0x247)][_0xa35c4f(0x22f)](_0x144667),this['_injector'][_0xa35c4f(0x1fa)](t[_0xa35c4f(0x1ee)])[_0xa35c4f(0x3a4)](_0x144667);let _0x53037e=lt(_0x1afc92);_0x53037e!=null&&this['_updateUnitPermissionPoint'](_0x144667,_0x53037e,a[_0xa35c4f(0x229)]['Edit'],!0x1),this[_0xa35c4f(0x508)][_0xa35c4f(0x4ae)](_0x144667);});};ct(this[_0xe1ad5d(0x2af)])[_0xe1ad5d(0x3e8)]((0x0,s[_0xe1ad5d(0x441)])(({unitId:_0x4b2c17})=>!(0x0,t[_0xe1ad5d(0x429)])(_0x4b2c17)),(0x0,s[_0xe1ad5d(0x357)])(this[_0xe1ad5d(0x25f)]))['subscribe'](({type:_0x1bdf77,unitId:_0x4997d2})=>{const _0x429d6c=_0xe1ad5d;_0x13e85d(_0x4997d2,_0x1bdf77)['catch'](_0x48c3dd=>this[_0x429d6c(0x400)][_0x429d6c(0x1fa)](t[_0x429d6c(0x4e0)])['error'](_0x48c3dd));});}[_0x47c516(0x374)](){const _0x36432a=_0x47c516;let _0x3d8593=async(_0x813fd2,_0x5755db)=>{const _0x2689e1=_0x88a9;let _0x30585a=await this[_0x2689e1(0x508)]['requireSession'](_0x813fd2);if(!(this[_0x2689e1(0x440)]||this[_0x2689e1(0x247)][_0x2689e1(0x51d)](_0x813fd2)||!this['_univerInstanceService'][_0x2689e1(0x26a)](_0x813fd2))){if(_0x5755db===t['UniverInstanceType'][_0x2689e1(0x4ab)]){let _0x3bfe3b=this['_injector'][_0x2689e1(0x1fa)](r[_0x2689e1(0x394)]);await _0x3bfe3b[_0x2689e1(0x2cc)](_0x813fd2),_0x30585a['event$'][_0x2689e1(0x3e8)]((0x0,s[_0x2689e1(0x441)])(_0x50d060=>_0x50d060['eventID']===e[_0x2689e1(0x427)][_0x2689e1(0x20c)]),(0x0,s[_0x2689e1(0x357)])((0x0,i[_0x2689e1(0x4f0)])(this[_0x2689e1(0x25f)],_0x30585a[_0x2689e1(0x502)][_0x2689e1(0x3e8)]((0x0,s[_0x2689e1(0x441)])(_0xf47c7d=>_0xf47c7d[_0x2689e1(0x393)]===e[_0x2689e1(0x427)][_0x2689e1(0x500)])),this[_0x2689e1(0x2af)][_0x2689e1(0x420)][_0x2689e1(0x3e8)]((0x0,s['filter'])(_0x2ca111=>_0x2ca111[_0x2689e1(0x4fc)]()===_0x813fd2)))))[_0x2689e1(0x51a)](_0x3edb2a=>{const _0x299188=_0x2689e1;let {objectId:_0x23db1e}=_0x3edb2a[_0x299188(0x3cf)];_0x23db1e===_0x813fd2?_0x3bfe3b[_0x299188(0x2cc)](_0x813fd2):_0x3bfe3b[_0x299188(0x3ac)](_0x813fd2,_0x23db1e);});}else _0x30585a['event$']['pipe']((0x0,s['filter'])(_0xf7c23c=>_0xf7c23c[_0x2689e1(0x393)]===e[_0x2689e1(0x427)][_0x2689e1(0x20c)]),(0x0,s['takeUntil'])((0x0,i[_0x2689e1(0x4f0)])(this['dispose$'],_0x30585a['event$'][_0x2689e1(0x3e8)]((0x0,s['filter'])(_0x2532d1=>_0x2532d1[_0x2689e1(0x393)]===e[_0x2689e1(0x427)][_0x2689e1(0x500)])),this[_0x2689e1(0x2af)][_0x2689e1(0x420)][_0x2689e1(0x3e8)]((0x0,s[_0x2689e1(0x441)])(_0x9466ce=>_0x9466ce[_0x2689e1(0x4fc)]()===_0x813fd2)))))[_0x2689e1(0x51a)](()=>{const _0xcbae20=_0x2689e1;this[_0xcbae20(0x46b)](_0x813fd2,_0x5755db)[_0xcbae20(0x3dc)](_0x3741ee=>this[_0xcbae20(0x400)]['get'](t[_0xcbae20(0x4e0)])[_0xcbae20(0x492)](_0x3741ee));}),await this[_0x2689e1(0x46b)](_0x813fd2,_0x5755db);}};ct(this[_0x36432a(0x2af)])[_0x36432a(0x3e8)]((0x0,s[_0x36432a(0x441)])(({unitId:_0x582221})=>!(0x0,t[_0x36432a(0x429)])(_0x582221)),(0x0,s[_0x36432a(0x357)])(this[_0x36432a(0x25f)]))[_0x36432a(0x51a)](({type:_0x52582b,unitId:_0x120cff})=>{const _0x908e7b=_0x36432a;_0x3d8593(_0x120cff,_0x52582b)[_0x908e7b(0x3dc)](_0x366dca=>this[_0x908e7b(0x400)]['get'](t[_0x908e7b(0x4e0)])[_0x908e7b(0x492)](_0x366dca));});}async[_0x47c516(0x46b)](_0x5b401a,_0x23c356){const _0x35da36=_0x47c516;let _0x119b16=lt(_0x23c356);if(_0x119b16==null)return;let _0xe3c23c=this[_0x35da36(0x400)]['get'](t[_0x35da36(0x1ee)]);if(_0xe3c23c[_0x35da36(0x395)]({'unitId':_0x5b401a,'objectId':_0x5b401a,'objectType':_0x119b16})){await _0xe3c23c[_0x35da36(0x410)](_0x5b401a);return;}let _0x2871cc=this['_getUnitPermissionPoints'](_0x5b401a,_0x119b16);if(!_0x2871cc[_0x35da36(0x476)])return;let _0x73dbc2=await this[_0x35da36(0x466)]['allowed']({'objectID':_0x5b401a,'objectType':_0x119b16,'unitID':_0x5b401a,'actions':_0x2871cc[_0x35da36(0x41a)](({action:_0x50b62c})=>_0x50b62c)});this[_0x35da36(0x440)]||this[_0x35da36(0x247)]['has'](_0x5b401a)||!this['_univerInstanceService'][_0x35da36(0x26a)](_0x5b401a)||_0x73dbc2[_0x35da36(0x4b1)](_0x4fb444=>{const _0x9f7b6c=_0x35da36;let _0x4c2b8a=_0x4fb444[_0x9f7b6c(0x209)],_0x532820=_0x4fb444[_0x9f7b6c(0x432)];_0x4c2b8a!=null&&_0x532820!=null&&_0x2871cc[_0x9f7b6c(0x441)](_0x741149=>_0x741149[_0x9f7b6c(0x209)]===_0x4c2b8a)['forEach'](_0x49b98a=>this['_permissionService'][_0x9f7b6c(0x3be)](_0x49b98a['id'],_0x532820));});}[_0x47c516(0x41e)](_0x3b7de1,_0x1b0f6b){const _0x553912=_0x47c516;let _0x1c343a=[];return this[_0x553912(0x539)][_0x553912(0x52b)]()[_0x553912(0x4b1)]((_0x3dc00d,_0x5cb8d6)=>{const _0x380338=_0x553912;_0x3dc00d['subscribe'](_0x4ce2d2=>{const _0x24d001=_0x88a9;_0x4ce2d2['type']===_0x1b0f6b&&'unitId'in _0x4ce2d2&&_0x4ce2d2[_0x24d001(0x220)]===_0x3b7de1&&(!(_0x24d001(0x39a)in _0x4ce2d2)||_0x4ce2d2[_0x24d001(0x39a)]===_0x3b7de1)&&_0x1c343a[_0x24d001(0x325)]({'id':_0x5cb8d6,'action':_0x4ce2d2[_0x24d001(0x426)]});})[_0x380338(0x44d)]();}),_0x1c343a;}[_0x47c516(0x23c)](_0x35951a,_0x2586c8,_0x3cbc20,_0x2f954a){const _0x44f608=_0x47c516;this[_0x44f608(0x539)][_0x44f608(0x52b)]()[_0x44f608(0x4b1)]((_0x16b8b3,_0x4b8a3f)=>{const _0x53a7af=_0x44f608;let _0x3631d5=!0x1;_0x16b8b3[_0x53a7af(0x51a)](_0x579951=>{const _0xa22b4d=_0x53a7af;_0x3631d5=_0x579951[_0xa22b4d(0x1fe)]===_0x2586c8&&_0x579951[_0xa22b4d(0x426)]===_0x3cbc20&&_0xa22b4d(0x220)in _0x579951&&_0x579951[_0xa22b4d(0x220)]===_0x35951a&&(!(_0xa22b4d(0x39a)in _0x579951)||_0x579951['objectId']===_0x35951a);})[_0x53a7af(0x44d)](),_0x3631d5&&this[_0x53a7af(0x539)][_0x53a7af(0x3be)](_0x4b8a3f,_0x2f954a);});}};X=y([v(0x0,(0x0,t[_0x47c516(0x528)])(t[_0x47c516(0x416)])),v(0x1,t['IUniverInstanceService']),v(0x2,t[_0x47c516(0x333)]),v(0x3,t[_0x47c516(0x3fc)]),v(0x4,(0x0,t[_0x47c516(0x528)])(V)),v(0x5,(0x0,t[_0x47c516(0x528)])(_))],X);function ct(_0x29127c){const _0x54b6b3=_0x47c516;return(0x0,i[_0x54b6b3(0x4f0)])(...[t['UniverInstanceType'][_0x54b6b3(0x4ab)],t[_0x54b6b3(0x4f3)][_0x54b6b3(0x48e)],t[_0x54b6b3(0x4f3)][_0x54b6b3(0x2b4)],t[_0x54b6b3(0x4f3)][_0x54b6b3(0x48f)],t['UniverInstanceType'][_0x54b6b3(0x4d1)]][_0x54b6b3(0x41a)](_0xdca99f=>_0x29127c[_0x54b6b3(0x2ee)](_0xdca99f)[_0x54b6b3(0x3e8)]((0x0,s[_0x54b6b3(0x41a)])(_0x4b31ed=>({'type':_0xdca99f,'unitId':_0x4b31ed['unit'][_0x54b6b3(0x4fc)]()})))));}function lt(_0x870ff7){const _0x46924d=_0x47c516;switch(_0x870ff7){case t[_0x46924d(0x4f3)][_0x46924d(0x4ab)]:return a[_0x46924d(0x4bb)][_0x46924d(0x2e4)];case t[_0x46924d(0x4f3)][_0x46924d(0x48e)]:return a['UnitObject']['Document'];case t['UniverInstanceType'][_0x46924d(0x2b4)]:return a[_0x46924d(0x4bb)][_0x46924d(0x290)];case t[_0x46924d(0x4f3)][_0x46924d(0x48f)]:return a['UnitObject'][_0x46924d(0x20f)];case t[_0x46924d(0x4f3)][_0x46924d(0x4d1)]:return a[_0x46924d(0x4bb)]['Base'];default:return;}}let Z=class{constructor(_0x5bb902,_0x42503b){const _0x526f74=_0x47c516;this[_0x526f74(0x469)]=_0x5bb902,this[_0x526f74(0x503)]=_0x42503b;}async[_0x47c516(0x424)](_0x5c5044,_0x2c0abd){const _0x47849e=_0x47c516;var _0x2747c0;let {unitID:_0x294a8d,type:_0x4fe899,revision:_0x417b9e=0x0}=_0x2c0abd,_0x39be96=this[_0x47849e(0x4f2)]()+'/'+_0x4fe899+_0x47849e(0x2b1)+_0x294a8d+_0x47849e(0x323)+_0x417b9e,_0x3fa1aa=(await this['_httpService'][_0x47849e(0x1fa)](_0x39be96))['body'],_0x659ad=(_0x2747c0=_0x3fa1aa[_0x47849e(0x30d)])==null?void 0x0:_0x2747c0[_0x47849e(0x373)];if(_0x659ad){let _0x1322f2=_0x659ad==null?void 0x0:_0x659ad['originalMeta'];_0x659ad[_0x47849e(0x282)]=e[_0x47849e(0x44c)]['encode']((0x0,e[_0x47849e(0x24a)])(_0x1322f2)),Object[_0x47849e(0x204)](_0x659ad[_0x47849e(0x3a3)])[_0x47849e(0x4b1)](([,_0x200f5c])=>{let _0x37ac2b=_0x200f5c['originalMeta'];_0x200f5c['originalMeta']=e['textEncoder']['encode']((0x0,e['b64DecodeUnicode'])(_0x37ac2b));});}return _0x3fa1aa;}async[_0x47c516(0x4ac)](_0x2bc1e1,_0x9c2cb3){const _0x7e44fa=_0x47c516;let {unitID:_0x168e23,type:_0x55078a,blockID:_0x1edca9}=_0x9c2cb3,_0x2396d2=this[_0x7e44fa(0x3bf)]()+'/'+_0x55078a+'/unit/'+_0x168e23+_0x7e44fa(0x4b2)+_0x1edca9;return(await this[_0x7e44fa(0x503)]['get'](_0x2396d2))[_0x7e44fa(0x268)];}async[_0x47c516(0x43a)](_0x4de253,_0x485deb){const _0x19e1c6=_0x47c516;let {unitID:_0x20e9ee,type:_0x3d7d17,blockID:_0x5090c2}=_0x485deb,_0x13eb7d=this[_0x19e1c6(0x3bf)]()+'/block/'+_0x3d7d17+'/unit/'+_0x20e9ee+_0x19e1c6(0x4b2)+_0x5090c2;return(await this[_0x19e1c6(0x503)][_0x19e1c6(0x1fa)](_0x13eb7d))[_0x19e1c6(0x268)];}async['fetchMissingChangesets'](_0x1e2c75,_0x3e6e44){const _0x4a7589=_0x47c516;let {unitID:_0x1c1d49,type:_0x168947,from:_0x300942,to:_0x3e686b}=_0x3e6e44,_0x444729=this[_0x4a7589(0x3bf)]()+'/'+_0x168947+_0x4a7589(0x2b1)+_0x1c1d49+'/fetchmissing?from='+_0x300942+_0x4a7589(0x534)+_0x3e686b;return(await this[_0x4a7589(0x503)][_0x4a7589(0x1fa)](_0x444729))['body'];}[_0x47c516(0x4f2)](){const _0x3feb3a=_0x47c516;return this[_0x3feb3a(0x469)][_0x3feb3a(0x33e)](_0x3feb3a(0x4e6))??this['_getAPIPrefix']();}[_0x47c516(0x3bf)](){const _0x222ac2=_0x47c516;let _0x20d766=this[_0x222ac2(0x469)][_0x222ac2(0x33e)](m);return(_0x20d766==null?void 0x0:_0x20d766[_0x222ac2(0x538)])??_0x222ac2(0x47b);}async[_0x47c516(0x53e)](_0x5d5865,_0x14c274){const _0x11e631=_0x47c516;let _0x1ac025=_0x11e631(0x3e0)+_0x14c274[_0x11e631(0x1fe)]+_0x11e631(0x2b1)+_0x14c274['unitID']+'/resources';return(await this['_httpService'][_0x11e631(0x1fa)](_0x1ac025,{'params':{'resourceId':JSON[_0x11e631(0x307)](_0x14c274[_0x11e631(0x278)])}}))[_0x11e631(0x268)];}[_0x47c516(0x4c1)](){const _0x1005e2=_0x47c516;throw Error(_0x1005e2(0x532));}[_0x47c516(0x1f4)](){const _0x609ed4=_0x47c516;throw Error(_0x609ed4(0x532));}[_0x47c516(0x2be)](){throw Error('This\x20method\x20should\x20not\x20be\x20called\x20on\x20the\x20client\x20side!');}[_0x47c516(0x4ad)](){const _0x51fafe=_0x47c516;throw Error(_0x51fafe(0x532));}[_0x47c516(0x2da)](){throw Error('This\x20method\x20should\x20not\x20be\x20called\x20on\x20the\x20client\x20side!');}[_0x47c516(0x265)](){const _0x5a3baf=_0x47c516;throw Error(_0x5a3baf(0x532));}};Z=y([v(0x0,t[_0x47c516(0x2ae)]),v(0x1,(0x0,t[_0x47c516(0x528)])(l[_0x47c516(0x45b)]))],Z);let Q=class extends t['LocalUndoRedoService']{constructor(_0x38f697,_0x256cc1,_0x3c533b,_0x110a6e,_0x4ade2f,_0x30790b){const _0x39c6c7=_0x47c516;super(_0x38f697,_0x256cc1,_0x3c533b,_0x110a6e),this[_0x39c6c7(0x3e4)]=_0x4ade2f,this[_0x39c6c7(0x266)]=_0x30790b;}[_0x47c516(0x260)](_0x1c1443,_0x5e9f42){const _0x3efe09=_0x47c516;let _0x44c0dd=this[_0x3efe09(0x22c)](_0x1c1443);if(_0x44c0dd)try{let _0x3f81e0=this[_0x3efe09(0x3a9)](_0x44c0dd,_0x5e9f42);this[_0x3efe09(0x203)](_0x1c1443,_0x3f81e0);}catch(_0x3c47bc){this[_0x3efe09(0x266)][_0x3efe09(0x492)](_0x3efe09(0x413),_0x3c47bc),this[_0x3efe09(0x478)](_0x1c1443);}let _0x235903=this['_getRedoStack'](_0x1c1443);if(_0x235903)try{let _0x398af9=this['_transformStack'](_0x235903,_0x5e9f42);this[_0x3efe09(0x3f0)](_0x1c1443,_0x398af9);}catch(_0xa9d8a7){this[_0x3efe09(0x266)]['error'](_0xa9d8a7),this[_0x3efe09(0x2a9)](_0x1c1443);}}[_0x47c516(0x478)](_0x21ae0d){const _0x356734=_0x47c516;let _0x4b97ee=this[_0x356734(0x22c)](_0x21ae0d);_0x4b97ee&&(_0x4b97ee[_0x356734(0x476)]=0x0,this[_0x356734(0x2b5)]());}[_0x47c516(0x2a9)](_0x449909){let _0x7e109a=this['_getRedoStack'](_0x449909);_0x7e109a&&(_0x7e109a['length']=0x0,this['_updateStatus']());}['_substituteUndoStack'](_0x54232b,_0x33d8ac){const _0x25a042=_0x47c516;this[_0x25a042(0x2d8)]['set'](_0x54232b,_0x33d8ac),this[_0x25a042(0x2b5)]();}[_0x47c516(0x3f0)](_0x23488b,_0x140510){const _0xc5722c=_0x47c516;this[_0xc5722c(0x289)][_0xc5722c(0x2f5)](_0x23488b,_0x140510),this[_0xc5722c(0x2b5)]();}['_transformStack'](_0x3b7c96,_0x503036){const _0x448d5f=_0x47c516;let _0x9e61ac=[],_0x593b7b=_0x503036,_0x18309f=_0x503036;for(let _0x30ab5d=_0x3b7c96[_0x448d5f(0x476)]-0x1;_0x30ab5d>=0x0;_0x30ab5d--){let {unitID:_0x1c0548,undoMutations:_0x3e0c52,redoMutations:_0x564d72}=_0x3b7c96[_0x30ab5d],_0x2e9849=this[_0x448d5f(0x3e4)]['transformMutationsWithChangeset'](_0x593b7b,_0x3e0c52),_0x57342e=this['_transformService']['transformMutationsWithChangeset'](_0x18309f,_0x564d72);if((0x0,e['isTransformMutationsWithChangesetFailure'])(_0x2e9849)||(0x0,e['isTransformMutationsWithChangesetFailure'])(_0x57342e)){this[_0x448d5f(0x266)][_0x448d5f(0x492)]('[CollaborationUndoRedoService]','transformStack\x20failed!',_0x2e9849,_0x57342e);break;}_0x593b7b=_0x2e9849[_0x448d5f(0x28f)],_0x18309f=_0x57342e[_0x448d5f(0x28f)],_0x9e61ac[_0x448d5f(0x325)]({'unitID':_0x1c0548,'undoMutations':_0x2e9849['m2Prime'],'redoMutations':_0x57342e['m2Prime']});}return _0x9e61ac[_0x448d5f(0x1f8)]();}};Q=y([v(0x0,t[_0x47c516(0x493)]),v(0x1,t[_0x47c516(0x212)]),v(0x2,t[_0x47c516(0x4cd)]),v(0x3,t[_0x47c516(0x2ae)]),v(0x4,e[_0x47c516(0x3f6)]),v(0x5,t[_0x47c516(0x4e0)])],Q);let $=class extends t[_0x47c516(0x35b)]{constructor(_0x4a331c=ee,_0x249303,_0x1ac833,_0x358196){const _0x19cbcd=_0x47c516;super(),this[_0x19cbcd(0x326)]=_0x4a331c,this['_logService']=_0x249303,this[_0x19cbcd(0x400)]=_0x1ac833,this[_0x19cbcd(0x469)]=_0x358196;let {..._0x3bd00f}=(0x0,t[_0x19cbcd(0x4f0)])({},ee,this['_config']);if(!_0x3bd00f[_0x19cbcd(0x499)])throw Error(_0x19cbcd(0x273));this[_0x19cbcd(0x326)]=_0x3bd00f,this[_0x19cbcd(0x469)]['setConfig'](m,_0x3bd00f);}[_0x47c516(0x475)](){const _0x4c9fb5=_0x47c516;this[_0x4c9fb5(0x469)]['setConfig'](t[_0x4c9fb5(0x246)],this[_0x4c9fb5(0x326)][_0x4c9fb5(0x3a6)]??[]),this['_registerDependencies'](),this[_0x4c9fb5(0x2fe)]();}[_0x47c516(0x473)](){const _0x2bf828=_0x47c516;var _0x206c62,_0xae688;this[_0x2bf828(0x400)]['has'](t[_0x2bf828(0x526)])&&this[_0x2bf828(0x266)][_0x2bf828(0x492)](_0x2bf828(0x360),_0x2bf828(0x47a));let _0x3d581e=(0x0,t['mergeOverrideWithDependencies'])([[t[_0x2bf828(0x526)],{'useClass':Q}],[Xe,{'useValue':Ze()}],[V],[b],[S],[W],[K],[ae],[X],[_],[q],[qe,{'useClass':this[_0x2bf828(0x326)][_0x2bf828(0x499)]}],[e[_0x2bf828(0x431)],{'useClass':Z}],[t[_0x2bf828(0x3fc)],{'useClass':G}],[t[_0x2bf828(0x50e)],{'useClass':J}],[nt,{'useClass':U}],[t[_0x2bf828(0x474)],{'useClass':Y}],[H],[tt]],(_0x206c62=this[_0x2bf828(0x326)])==null?void 0x0:_0x206c62['override']);if(!((_0xae688=this[_0x2bf828(0x326)])!=null&&_0xae688['enableSingleActiveInstanceLock'])){let _0x4a5fa2=_0x3d581e['findIndex'](([_0x5a7559])=>_0x5a7559===C);_0x4a5fa2!==-0x1&&_0x3d581e[_0x2bf828(0x4bc)](_0x4a5fa2,0x1);}(0x0,t[_0x2bf828(0x350)])(this[_0x2bf828(0x400)],_0x3d581e);}[_0x47c516(0x2fe)](){const _0x548e8b=_0x47c516;var _0x1ad70a,_0x2d3c34;if(this[_0x548e8b(0x400)][_0x548e8b(0x1fa)](l[_0x548e8b(0x45b)])[_0x548e8b(0x53c)]({'priority':0x14,'interceptor':(0x0,l[_0x548e8b(0x232)])({'maxParallel':0x6})}),!((_0x1ad70a=this['_config'])!=null&&_0x1ad70a[_0x548e8b(0x241)])){var _0x235586;(_0x235586=this[_0x548e8b(0x400)][_0x548e8b(0x1fa)](x,t[_0x548e8b(0x2c9)][_0x548e8b(0x442)]))==null||_0x235586['disableLocalCache']();}(_0x2d3c34=this[_0x548e8b(0x326)])!=null&&_0x2d3c34['enableAuthServer']&&(0x0,t[_0x548e8b(0x2f0)])(this[_0x548e8b(0x400)],[[W]]),(0x0,t[_0x548e8b(0x2f0)])(this[_0x548e8b(0x400)],[[K],[H],[X]]);}};g($,_0x47c516(0x2d1),_0x47c516(0x324)),g($,_0x47c516(0x358),$e),g($,_0x47c516(0x276),et),$=y([(0x0,t[_0x47c516(0x438)])(u[_0x47c516(0x4db)],l[_0x47c516(0x2b8)],e[_0x47c516(0x536)]),v(0x1,t[_0x47c516(0x4e0)]),v(0x2,(0x0,t[_0x47c516(0x528)])(t['Injector'])),v(0x3,t[_0x47c516(0x2ae)])],$),Object[_0x47c516(0x202)](exports,_0x47c516(0x385),{'enumerable':!0x0,'get':function(){return G;}}),Object[_0x47c516(0x202)](exports,_0x47c516(0x4a3),{'enumerable':!0x0,'get':function(){return k;}}),Object['defineProperty'](exports,'AwaitingWithPendingState',{'enumerable':!0x0,'get':function(){return A;}}),Object[_0x47c516(0x202)](exports,_0x47c516(0x511),{'enumerable':!0x0,'get':function(){return I;}}),Object[_0x47c516(0x202)](exports,_0x47c516(0x3f1),{'enumerable':!0x0,'get':function(){return z;}}),exports[_0x47c516(0x26d)]=m,Object[_0x47c516(0x202)](exports,_0x47c516(0x311),{'enumerable':!0x0,'get':function(){return U;}}),Object[_0x47c516(0x202)](exports,_0x47c516(0x255),{'enumerable':!0x0,'get':function(){return H;}}),Object[_0x47c516(0x202)](exports,_0x47c516(0x371),{'enumerable':!0x0,'get':function(){return P;}}),Object[_0x47c516(0x202)](exports,_0x47c516(0x463),{'enumerable':!0x0,'get':function(){return J;}}),Object[_0x47c516(0x202)](exports,_0x47c516(0x4b7),{'enumerable':!0x0,'get':function(){return ve;}}),Object[_0x47c516(0x202)](exports,'CollaborationSessionService',{'enumerable':!0x0,'get':function(){return V;}}),Object[_0x47c516(0x202)](exports,_0x47c516(0x2c6),{'enumerable':!0x0,'get':function(){return Ye;}}),exports[_0x47c516(0x224)]=Be,exports[_0x47c516(0x2c0)]=ie,exports[_0x47c516(0x483)]=_,Object['defineProperty'](exports,'CollaborativeUndoRedoService',{'enumerable':!0x0,'get':function(){return Q;}}),exports[_0x47c516(0x489)]=ae,Object[_0x47c516(0x202)](exports,_0x47c516(0x4c6),{'enumerable':!0x0,'get':function(){return j;}}),exports[_0x47c516(0x4f8)]=_0x47c516(0x215),exports[_0x47c516(0x4de)]=_0x47c516(0x3a7),exports[_0x47c516(0x301)]='/universer-api/user/session-ticket',Object[_0x47c516(0x202)](exports,_0x47c516(0x225),{'enumerable':!0x0,'get':function(){return q;}}),Object['defineProperty'](exports,'DocCollaborationEntity',{'enumerable':!0x0,'get':function(){return F;}}),Object[_0x47c516(0x202)](exports,'FetchingMissState',{'enumerable':!0x0,'get':function(){return N;}}),exports[_0x47c516(0x3f5)]=_0x47c516(0x418),exports[_0x47c516(0x3d7)]=_0x47c516(0x540),exports[_0x47c516(0x25c)]=nt,exports[_0x47c516(0x2a5)]=Xe,exports[_0x47c516(0x461)]=qe,exports[_0x47c516(0x262)]=x,exports[_0x47c516(0x33c)]=We,exports['ISingleActiveUnitService']=C,exports[_0x47c516(0x29d)]=0x3e8,exports[_0x47c516(0x26e)]='LOCAL_CACHE_INTERVAL',Object[_0x47c516(0x202)](exports,_0x47c516(0x376),{'enumerable':!0x0,'get':function(){return b;}}),Object[_0x47c516(0x202)](exports,_0x47c516(0x471),{'enumerable':!0x0,'get':function(){return Y;}}),Object[_0x47c516(0x202)](exports,_0x47c516(0x1f6),{'enumerable':!0x0,'get':function(){return M;}}),Object[_0x47c516(0x202)](exports,'PdfCollaborationEntity',{'enumerable':!0x0,'get':function(){return B;}}),Object[_0x47c516(0x202)](exports,_0x47c516(0x4a8),{'enumerable':!0x0,'get':function(){return O;}}),exports[_0x47c516(0x4fe)]=_0x47c516(0x2e8),exports[_0x47c516(0x42a)]=_0x47c516(0x31e),exports[_0x47c516(0x36e)]=ge,Object['defineProperty'](exports,'SheetCollaborationEntity',{'enumerable':!0x0,'get':function(){return L;}}),Object[_0x47c516(0x202)](exports,_0x47c516(0x319),{'enumerable':!0x0,'get':function(){return S;}}),Object['defineProperty'](exports,_0x47c516(0x29e),{'enumerable':!0x0,'get':function(){return R;}}),Object[_0x47c516(0x202)](exports,_0x47c516(0x3c1),{'enumerable':!0x0,'get':function(){return Z;}}),Object['defineProperty'](exports,'SyncedState',{'enumerable':!0x0,'get':function(){return D;}}),exports[_0x47c516(0x444)]=xe,Object[_0x47c516(0x202)](exports,_0x47c516(0x3e3),{'enumerable':!0x0,'get':function(){return $;}}),exports['createUniverCollaborationAdapter']=Ze,exports[_0x47c516(0x51e)]=Ge,exports[_0x47c516(0x3f4)]=ye,exports[_0x47c516(0x406)]=Ke;